From: Zhao Liu <zhao1.liu@intel.com>
To: Tina Zhang <zhang_wei@open-hieco.net>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org,
"Michael S . Tsirkin" <mst@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Yanjing Zhou <zhouyanjing@hygon.cn>
Subject: Re: [PATCH v2 9/9] target/i386: Use AMD ucode-rev default for Hygon
Date: Sun, 23 Aug 2026 17:24:03 +0800 [thread overview]
Message-ID: <aoq8M9lQKGywIOIu@intel.com> (raw)
In-Reply-To: <20260810082956.1768042-10-zhang_wei@open-hieco.net>
On Mon, Aug 10, 2026 at 04:29:56PM +0800, Tina Zhang wrote:
> Date: Mon, 10 Aug 2026 16:29:56 +0800
> From: Tina Zhang <zhang_wei@open-hieco.net>
> Subject: [PATCH v2 9/9] target/i386: Use AMD ucode-rev default for Hygon
> X-Mailer: git-send-email 2.43.7
>
> QEMU currently gives named Hygon Dhyana CPUs the non-AMD default
> ucode-rev value, 0x100000000. That is the Intel/KVM-VMX-shaped
> encoding, where the visible revision is in the high 32 bits.
>
> Linux reads MSR 0x8b for Hygon CPUs through the AMD patch-level path,
> using MSR_AMD64_PATCH_LEVEL and storing the low 32 bits as
> cpuinfo_x86.microcode. With the old QEMU default, a Dhyana guest sees
> microcode revision 0.
>
> Use the AMD/KVM-SVM-shaped default, 0x01000065, for Hygon on this
> specific MSR 0x8b default path. This does not route Hygon through AMD
> microcode loading and does not claim that Hygon CPUs are otherwise
> identical to AMD CPUs.
>
> Preserve migration ABI through the vendor CPU ABI compatibility gate used
> by this Hygon bug-fix group. pc-11.0 and older machine types leave that
> gate off, so they retain the previous ucode-rev default. Explicit
> user-provided ucode-rev values still override the default.
>
> Add qtest coverage for the new default, the compatibility cases, and an
> explicit user override.
>
> Signed-off-by: Tina Zhang <zhang_wei@open-hieco.net>
> ---
> target/i386/cpu.c | 8 ++++++--
> tests/qtest/test-x86-cpuid-compat.c | 19 +++++++++++++++++++
> 2 files changed, 25 insertions(+), 2 deletions(-)
>
> + * Hygon uses the AMD patch-level MSR 0x8b encoding, where the visible
> + * microcode revision is in the low 32 bits.
I feel like this description is redundant regarding the commit message
is already self-explanatory. Adding one for each vendor might clutter
the comments.
Others, LGTM,
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
prev parent reply other threads:[~2026-08-23 9:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 8:29 [PATCH v2 0/9] target/i386: Fix Hygon vendor-specific CPU behavior Tina Zhang
2026-08-10 8:29 ` [PATCH v2 1/9] target/i386: Sync AMD CPUID aliases for Hygon Tina Zhang
2026-08-23 8:47 ` Zhao Liu
2026-08-10 8:29 ` [PATCH v2 2/9] target/i386: Hide Intel cache CPUID leaves " Tina Zhang
2026-08-23 8:49 ` Zhao Liu
2026-08-10 8:29 ` [PATCH v2 3/9] target/i386: Hide ARCH_CAPABILITIES " Tina Zhang
2026-08-23 8:50 ` Zhao Liu
2026-08-10 8:29 ` [PATCH v2 4/9] target/i386/kvm: Use AMD MCE status encoding " Tina Zhang
2026-08-23 8:51 ` Zhao Liu
2026-08-10 8:29 ` [PATCH v2 5/9] target/i386/kvm: Use AMD PMU MSR paths " Tina Zhang
2026-08-23 9:32 ` Zhao Liu
2026-08-10 8:29 ` [PATCH v2 6/9] target/i386: Do not broadcast injected MCEs " Tina Zhang
2026-08-23 8:55 ` Zhao Liu
2026-08-10 8:29 ` [PATCH v2 7/9] hw/i386: Reserve AMD IOMMU HT GPA range " Tina Zhang
2026-08-23 9:17 ` Zhao Liu
2026-08-10 8:29 ` [PATCH v2 8/9] target/i386: Use AMD legacy cache fallback " Tina Zhang
2026-08-23 9:18 ` Zhao Liu
2026-08-10 8:29 ` [PATCH v2 9/9] target/i386: Use AMD ucode-rev default " Tina Zhang
2026-08-23 9:24 ` Zhao Liu [this message]
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=aoq8M9lQKGywIOIu@intel.com \
--to=zhao1.liu@intel.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhang_wei@open-hieco.net \
--cc=zhouyanjing@hygon.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox