Re: [PATCH v3 01/10] target/i386: Sync AMD CPUID aliases for Hygon
Zhao Liu <[email protected]>
| Newsgroups | org.kernel.vger.kvm,org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Aug 24, 2026 at 12:53:05PM +0800, Tina Zhang wrote: > Date: Mon, 24 Aug 2026 12:53:05 +0800 > From: Tina Zhang <[email protected]> > Subject: [PATCH v3 01/10] target/i386: Sync AMD CPUID aliases for Hygon > X-Mailer: git-send-email 2.43.7 > > AMD defines CPUID[0x80000001].EDX bits as aliases for a subset of > CPUID[1].EDX. QEMU currently synchronizes those aliases only when the > guest CPU vendor is AuthenticAMD. > > Hygon Dhyana uses the HygonGenuine vendor string, but implements the > same AMD-compatible extended CPUID feature aliases. This can leave QEMU > advertising a feature in CPUID[1].EDX while the matching extended alias > in CPUID[0x80000001].EDX stays clear. This inconsistent CPUID state can > confuse guest OS feature detection. > > Apply the alias synchronization to Hygon CPUs as well. Gate the new > behavior with x-hygon-vendor-abi-fixes and disable it for pc-11.1 and > older machine types, because the CPUID result is guest-visible ABI and > must remain migration-compatible. > > Add qtest coverage for the Dhyana model, including the compat property. > > Signed-off-by: Tina Zhang <[email protected]> > Tested-by: Yongwei Xu <[email protected]> > --- > hw/i386/pc.c | 4 +- > target/i386/cpu.c | 10 ++-- > target/i386/cpu.h | 12 +++++ > tests/qtest/test-x86-cpuid-compat.c | 76 +++++++++++++++++++++++++++++ > 4 files changed, 98 insertions(+), 4 deletions(-) Reviewed-by: Zhao Liu <[email protected]>