From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Aniket Sahu <asahu1x@linux.ibm.com>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, peterx@redhat.com,
farosas@suse.de, npiggin@gmail.com, adityag@linux.ibm.com,
milesg@linux.ibm.com, harshpb@linux.ibm.com, rathc@linux.ibm.com,
anushree.mathur@linux.ibm.com, misanjum@linux.ibm.com,
gautam@linux.ibm.com, thuth@redhat.com, amachhiw@linux.ibm.com
Subject: Re: [PATCH 2/5] tests/functional/ppc64: pin machine types for hypervisor tests
Date: Fri, 20 Nov 2026 10:06:57 +0000 [thread overview]
Message-ID: <awAbwZ_w992RXUDY@redhat.com> (raw)
In-Reply-To: <20261120095854.35941-9-asahu1x@linux.ibm.com>
On Fri, Nov 20, 2026 at 03:28:55PM +0530, Aniket Sahu wrote:
> Pin machine types to avoid CPU compatibility issues:
> - Use pseries-8.2 (POWER9) for pseries tests instead of generic 'pseries'
> alias which resolves to pseries-11.2 (power11_v2.0)
> - Use powernv9 for powernv test to ensure consistent PCIe topology
> - Fix test_hv_pseries_kvm to use TCG accelerator (L1 runs under TCG,
> L2 uses KVM inside L1)
>
> The generic 'pseries' alias now resolves to a machine whose default CPU
> (power11) is not known to the qemu-system-ppc64 packaged by Alpine,
> causing the L2 guest to fail with "Register sync failed" error.
>
> Signed-off-by: Misbah Anjum N <misanjum@linux.ibm.com>
> Signed-off-by: Aniket Sahu <asahu1x@linux.ibm.com>
> ---
> tests/functional/ppc64/test_hv.py | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/tests/functional/ppc64/test_hv.py b/tests/functional/ppc64/test_hv.py
> index 8a1fca2cb1..d977038271 100755
> --- a/tests/functional/ppc64/test_hv.py
> +++ b/tests/functional/ppc64/test_hv.py
> @@ -125,7 +125,12 @@ def do_test_kvm(self, hpt=False):
> def test_hv_pseries(self):
> self.require_accelerator("tcg")
> self.require_netdev('user')
> - self.set_machine('pseries')
> + # Pin to pseries-8.2 (default CPU power9_v2.2) so that kvm-hv.ko inside
> + # the L1 Alpine guest sees a POWER9 register set. The generic 'pseries'
> + # alias resolves to pseries-11.2 (power11_v2.0) which Alpine's packaged
> + # qemu-system-ppc64 does not recognise, causing the L2 "Register sync
> + # failed" error. The L2 script passes '-cpu POWER9' to match.
> + self.set_machine('pseries-8.2')
If the guest needs POWER9, why not add a "-cpu POWER9" flag to the L1
QEMU here, instead of making assumptions about what the machine type
exposes.
Using old versioned machine types in functional tests is undesirable
as we automatically delete versioned machines after 6 years, at
which point we'll need to address the CPU model choice anyway.
> self.vm.add_args("-accel", "tcg,thread=multi")
> self.vm.add_args('-device', 'nvme,serial=1234,drive=drive0')
> self.vm.add_args("-machine", "x-vof=on,cap-nested-hv=on")
> @@ -135,10 +140,13 @@ def test_hv_pseries(self):
> self.do_stop_alpine()
>
> def test_hv_pseries_kvm(self):
> - self.require_accelerator("kvm")
> + # L1 runs under TCG; L2 is launched with accel=kvm inside L1
> + # (see do_test_kvm).
> + self.require_accelerator("tcg")
> self.require_netdev('user')
> - self.set_machine('pseries')
> - self.vm.add_args("-accel", "kvm")
> + # Same CPU pinning rationale as test_hv_pseries above.
> + self.set_machine('pseries-8.2')
> + self.vm.add_args("-accel", "tcg,thread=multi")
> self.vm.add_args('-device', 'nvme,serial=1234,drive=drive0')
> self.vm.add_args("-machine", "x-vof=on,cap-nested-hv=on,cap-ccf-assist=off")
> self.do_start_alpine()
> @@ -149,7 +157,9 @@ def test_hv_pseries_kvm(self):
> def test_hv_powernv(self):
> self.require_accelerator("tcg")
> self.require_netdev('user')
> - self.set_machine('powernv')
> + # Pin to powernv9 so the PCIe topology matches (pcie.0, pcie.2) and
> + # kvm-hv.ko runs with the POWER9 CPU model.
> + self.set_machine('powernv9')
> self.vm.add_args("-accel", "tcg,thread=multi")
> self.vm.add_args('-device', 'nvme,bus=pcie.2,addr=0x0,serial=1234,drive=drive0',
> '-device', 'e1000e,netdev=net0,mac=C0:FF:EE:00:00:02,bus=pcie.0,addr=0x0',
> --
> 2.52.0
>
>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-11-20 10:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 9:58 [PATCH 0/5] tests/functional/ppc64: Fixes and improvements for hypervisor tests Aniket Sahu
2026-11-20 9:58 ` [PATCH 1/5] tests/functional/ppc64: replace deprecated datetime.utcnow() Aniket Sahu
2026-11-20 9:58 ` [PATCH 2/5] tests/functional/ppc64: pin machine types for hypervisor tests Aniket Sahu
2026-11-20 10:06 ` Daniel P. Berrangé [this message]
2026-11-20 10:29 ` Aniket Sahu
2026-11-20 9:58 ` [PATCH 3/5] tests/functional/ppc64: add kernel params and early panic detection Aniket Sahu
2026-11-20 9:58 ` [PATCH 4/5] tests/functional/ppc64: dynamically resolve NVMe device path Aniket Sahu
2026-11-20 9:58 ` [PATCH 5/5] tests/functional/ppc64: increase timeout for hypervisor tests Aniket Sahu
2026-11-20 16:06 ` [PATCH 0/5] tests/functional/ppc64: Fixes and improvements " Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=awAbwZ_w992RXUDY@redhat.com \
--to=berrange@redhat.com \
--cc=adityag@linux.ibm.com \
--cc=amachhiw@linux.ibm.com \
--cc=anushree.mathur@linux.ibm.com \
--cc=asahu1x@linux.ibm.com \
--cc=farosas@suse.de \
--cc=gautam@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=milesg@linux.ibm.com \
--cc=misanjum@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rathc@linux.ibm.com \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.