diff --git a/SOURCES/0001-Add-AArch64-and-ppc64le-support-to-QEMU-backend.patch b/SOURCES/0001-Add-AArch64-and-ppc64le-support-to-QEMU-backend.patch index def830d..74e27df 100644 --- a/SOURCES/0001-Add-AArch64-and-ppc64le-support-to-QEMU-backend.patch +++ b/SOURCES/0001-Add-AArch64-and-ppc64le-support-to-QEMU-backend.patch @@ -17,72 +17,108 @@ 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. - -Note: originally this patch also disabled boot-order (`-boot once=d` / -`-boot order=`). That turned out to be wrong - QEMU spapr (pseries) -does honor these flags, and without them install tests that supply -both an ISO and an HDD_1 boot the HDD instead of the installer CD on -ppc64le. The boot-order disable has been dropped so ppc64le behaves -like x86_64. +- Set $arch_supports_boot_order = 0 so the QEMU command line gets no + `-boot once=d` / `-boot order=` by default. This matches upstream + behavior on aarch64 / s390x and avoids the SLOF spapr-NVRAM trap + where `-boot once=d` is *not* a one-shot on QEMU pseries (SLOF + caches the chosen boot device and re-picks the empty CD on the + post-install reboot, dropping the guest at the OF prompt with + E3405). With boot-order generation off, an empty HDD naturally + falls through to the installer CD and a populated HDD wins the + post-install boot. +- For tests that supply both an installer ISO and a populated HDD_1 + and need the CD to win the first boot (e.g. install_resize_lvm), + set BOOTFROM=d in the test settings. The patch translates this + into `-boot once=d` and clears $bootfrom so Proc::configure_blockdevs + does NOT assign a persistent bootindex(0) to the CD — that would + loop the installer on every reboot. Signed-off-by: Elkhan Mammadli +Signed-off-by: Andrew Lukoshko --- - backend/qemu.pm | 14 +++++++++----- - 1 file changed, 9 insertions(+), 5 deletions(-) + backend/qemu.pm | 35 ++++++++++++++++++++++++++++++----- + 1 file changed, 30 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) { +@@ -733,6 +733,8 @@ 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'; - ++ my $ppc64le_once_d = 0; + $self->_set_graphics_backend($is_arm); - -@@ -762,7 +763,10 @@ sub start_qemu ($self) { + +@@ -749,7 +751,26 @@ sub start_qemu ($self) { $arch_supports_boot_order = 0; $use_virtio_kbd = 1; } - elsif ($vars->{OFW}) { + elsif ($is_ppc64le) { ++ # AlmaLinux ppc64le: keep arch_supports_boot_order=0 by default so ++ # we match upstream / AL9 behavior — empty HDD falls through to the ++ # installer CD, populated HDD boots its own bootloader. Avoids the ++ # SLOF spapr-nvram trap where `-boot once=d` is *not* a one-shot. ++ # ++ # For tests that supply both an ISO and a populated HDD_1 and need ++ # the installer to win the first boot (e.g. install_resize_lvm), ++ # the test sets BOOTFROM=d. We translate that into `-boot once=d` ++ # below and clear $bootfrom so Proc::configure_blockdevs() does NOT ++ # assign a *persistent* bootindex(0) to the CD — that would loop ++ # the installer on every reboot. ++ $arch_supports_boot_order = 0; + $use_virtio_kbd = 1; ++ if ($bootfrom eq 'cdrom') { ++ $bootfrom = ''; ++ $ppc64le_once_d = 1; ++ } + } + elsif ($vars->{OFW} && !$is_ppc64le) { $use_usb_kbd = $self->qemu_params_ofw; } - -@@ -851,7 +856,7 @@ sub start_qemu ($self) { + +@@ -838,7 +859,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) { +@@ -856,7 +877,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) { +@@ -928,6 +949,10 @@ sub start_qemu ($self) { + push @boot_args, 'once=d'; + } } - ++ elsif ($ppc64le_once_d) { ++ # ppc64le opt-in (BOOTFROM=d): one-shot CD boot, then default order. ++ push @boot_args, 'once=d'; ++ } + sp('boot', join(',', @boot_args)) if @boot_args; + + if (!$vars->{UEFI} && $vars->{BIOS}) { +@@ -939,8 +964,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 + sp('device', 'usb-kbd') if $use_usb_kbd; +-- +2.41.0 diff --git a/SPECS/os-autoinst.spec b/SPECS/os-autoinst.spec index 0a5d27b..bd65855 100644 --- a/SPECS/os-autoinst.spec +++ b/SPECS/os-autoinst.spec @@ -37,7 +37,7 @@ Name: os-autoinst Version: %{github_version}%{?github_date:^%{github_date}git%{shortcommit}} -Release: 4%{?dist} +Release: 5%{?dist} Summary: OS-level test automation License: GPLv2+ URL: https://os-autoinst.github.io/openQA/ @@ -255,6 +255,17 @@ rm tools/lib/perlcritic/Perl/Critic/Policy/*.pm %files devel %changelog +* Wed Apr 29 2026 Andrew Lukoshko - 4.6^20230731git6c17e24-5 +- Re-disable arch_supports_boot_order for ppc64le and add a BOOTFROM=d + opt-in path that emits `-boot once=d` (and clears Proc.pm's persistent + bootindex(0) on the CD). The previous "drop disable" change was wrong: + on QEMU spapr, SLOF caches the chosen boot device in spapr-NVRAM, so + `-boot once=d` is *not* a one-shot, and the post-install reboot loops + back into the installer. With the new behavior an empty HDD naturally + falls through to the installer CD on first boot, a populated HDD wins + the post-install reboot, and tests that need CD-first when the HDD is + already populated (install_resize_lvm) opt in via BOOTFROM=d. + * Thu Apr 23 2026 Andrew Lukoshko - 4.6^20230731git6c17e24-4 - Drop the ppc64le "disable arch_supports_boot_order" bit from the AArch64/ppc64le QEMU backend patch. QEMU spapr supports -boot