Add AArch64 and ppc64le support to QEMU backend
Patch by Elkhan Mammadli <elkhan.mammadli@protonmail.com>. Adjusts the QEMU backend for the QEMU build shipped in Enterprise Linux on AArch64 and ppc64le: use qemu-xhci on AArch64, wire virtio keyboard/tablet on ppc64le, disable audio, and skip unsupported boot-order and floppy handling.
This commit is contained in:
parent
03d6dff9e1
commit
8d3dd9de1a
@ -0,0 +1,83 @@
|
||||
From dffd32bb5418f6eb183bf8518dd1d82d70463c94 Mon Sep 17 00:00:00 2001
|
||||
From: Elkhan Mammadli <elkhan.mammadli@protonmail.com>
|
||||
Date: Thu, 2 Nov 2023 16:09:37 +0400
|
||||
Subject: [PATCH 1/1] Add AArch64 and ppc64le support to QEMU backend
|
||||
|
||||
Disable audio device support since it's not available
|
||||
in the QEMU of Enterprise Linux on AArch64 and ppc64le
|
||||
|
||||
AArch64:
|
||||
|
||||
- Use XHCI (qemu-xhci) as USB controller.
|
||||
It's more modern than nec-usb-xhci
|
||||
which is not available in the QEMU of Enterprise Linux
|
||||
|
||||
ppc64le:
|
||||
|
||||
- Use VirtIO Keyboard as a keyboard device.
|
||||
- Use VirtIO Tablet as a tablet device.
|
||||
- Do not remove floppy drive device since it's not supported.
|
||||
- Do not add boot order since it's not supported for this architecture.
|
||||
|
||||
Signed-off-by: Elkhan Mammadli <elkhan.mammadli@protonmail.com>
|
||||
---
|
||||
backend/qemu.pm | 15 ++++++++++-----
|
||||
1 file changed, 10 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/backend/qemu.pm b/backend/qemu.pm
|
||||
index 0a6275f4..904ec7bf 100644
|
||||
--- a/backend/qemu.pm
|
||||
+++ b/backend/qemu.pm
|
||||
@@ -746,6 +746,7 @@ sub start_qemu ($self) {
|
||||
$arch = 'arm' if ($arch =~ /armv6|armv7/);
|
||||
my $is_arm = $arch eq 'aarch64' || $arch eq 'arm';
|
||||
my $is_s390x = $arch eq 's390x';
|
||||
+ my $is_ppc64le = $arch eq 'ppc64le';
|
||||
|
||||
$self->_set_graphics_backend($is_arm);
|
||||
|
||||
@@ -762,7 +763,11 @@ sub start_qemu ($self) {
|
||||
$arch_supports_boot_order = 0;
|
||||
$use_virtio_kbd = 1;
|
||||
}
|
||||
- elsif ($vars->{OFW}) {
|
||||
+ elsif ($is_ppc64le) {
|
||||
+ $arch_supports_boot_order = 0;
|
||||
+ $use_virtio_kbd = 1;
|
||||
+ }
|
||||
+ elsif ($vars->{OFW} && !$is_ppc64le) {
|
||||
$use_usb_kbd = $self->qemu_params_ofw;
|
||||
}
|
||||
|
||||
@@ -851,7 +856,7 @@ sub start_qemu ($self) {
|
||||
sp('chardev', 'ringbuf,id=serial0,logfile=serial0,logappend=on');
|
||||
sp('serial', 'chardev:serial0');
|
||||
|
||||
- if (!$is_s390x) {
|
||||
+ if (!$is_s390x && !$is_arm && !$is_ppc64le) {
|
||||
if ($self->requires_audiodev) {
|
||||
my $audiodev = $vars->{QEMU_AUDIODEV} // 'intel-hda';
|
||||
my $audiobackend = $vars->{QEMU_AUDIOBACKEND} // 'none';
|
||||
@@ -869,7 +874,7 @@ sub start_qemu ($self) {
|
||||
}
|
||||
{
|
||||
# Remove floppy drive device on architectures
|
||||
- sp('global', 'isa-fdc.fdtypeA=none') unless ($is_arm || $is_s390x || $vars->{QEMU_NO_FDC_SET});
|
||||
+ sp('global', 'isa-fdc.fdtypeA=none') unless ($is_arm || $is_s390x || $is_ppc64le || $vars->{QEMU_NO_FDC_SET});
|
||||
|
||||
sp('m', $vars->{QEMURAM}) if $vars->{QEMURAM};
|
||||
sp('machine', $vars->{QEMUMACHINE}) if $vars->{QEMUMACHINE};
|
||||
@@ -952,8 +957,8 @@ sub start_qemu ($self) {
|
||||
}
|
||||
|
||||
unless ($vars->{QEMU_NO_TABLET}) {
|
||||
- sp('device', ($vars->{OFW} || $arch eq 'aarch64') ? 'nec-usb-xhci' : $is_s390x ? 'virtio-tablet' : 'qemu-xhci');
|
||||
- sp('device', 'usb-tablet') unless $is_s390x;
|
||||
+ sp('device', ($vars->{OFW} && !$is_ppc64le) ? 'nec-usb-xhci' : ($is_s390x || $is_ppc64le) ? 'virtio-tablet' : 'qemu-xhci');
|
||||
+ sp('device', 'usb-tablet') unless ($is_s390x || $is_ppc64le);
|
||||
}
|
||||
|
||||
sp('device', 'usb-kbd') if $use_usb_kbd;
|
||||
--
|
||||
2.41.0
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
Name: os-autoinst
|
||||
Version: %{github_version}%{?github_date:^%{github_date}git%{shortcommit}}
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: OS-level test automation
|
||||
License: GPLv2+
|
||||
URL: https://os-autoinst.github.io/openQA/
|
||||
@ -48,6 +48,11 @@ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{gith
|
||||
# migration capability has been removed)
|
||||
Patch0: os-autoinst-enable-multifd-support.patch
|
||||
|
||||
# AlmaLinux-specific: adjust the QEMU backend for the QEMU build shipped
|
||||
# in Enterprise Linux on AArch64 and ppc64le (USB/keyboard/tablet wiring,
|
||||
# disable audio, drop unsupported boot order and floppy handling)
|
||||
Patch1: 0001-Add-AArch64-and-ppc64le-support-to-QEMU-backend.patch
|
||||
|
||||
# on SUSE this is conditional, for us it doesn't have to be but we
|
||||
# still use a macro just to keep build_requires similar for ease of
|
||||
# cross-comparison
|
||||
@ -250,6 +255,9 @@ rm tools/lib/perlcritic/Perl/Critic/Policy/*.pm
|
||||
%files devel
|
||||
|
||||
%changelog
|
||||
* Tue Apr 21 2026 Andrew Lukoshko <alukoshko@almalinux.org> - 4.6^20230731git6c17e24-3
|
||||
- Add AArch64 and ppc64le support to QEMU backend (by Elkhan Mammadli)
|
||||
|
||||
* Tue Apr 21 2026 Andrew Lukoshko <alukoshko@almalinux.org> - 4.6^20230731git6c17e24-2
|
||||
- Backport upstream commit 10216249 to enable multifd support (required
|
||||
for qemu >= 9.1 where the "compress" migration capability was removed)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user