From: Zhao Liu <zhao1.liu@intel.com>
To: EwanHai <ewanhai-oc@zhaoxin.com>
Cc: pbonzini@redhat.com, xiaoyao.li@intel.com, qemu-devel@nongnu.org,
ewanhai@zhaoxin.com, cobechen@zhaoxin.com, rockcui@zhaoxin.com,
louisqi@zhaoxin.com, liamni@zhaoxin.com, frankzhu@zhaoxin.com
Subject: Re: [PATCH v2 4/4] target/i386: Update CMPLegacy handling for Zhaoxin CPUs
Date: Thu, 8 Aug 2024 18:30:09 +0800 [thread overview]
Message-ID: <ZrSeMfpBm8NrXRWK@intel.com> (raw)
In-Reply-To: <20240704112511.184257-5-ewanhai-oc@zhaoxin.com>
Hi EwanHai,
On Thu, Jul 04, 2024 at 07:25:11AM -0400, EwanHai wrote:
> Date: Thu, 4 Jul 2024 07:25:11 -0400
> From: EwanHai <ewanhai-oc@zhaoxin.com>
> Subject: [PATCH v2 4/4] target/i386: Update CMPLegacy handling for Zhaoxin
> CPUs
> X-Mailer: git-send-email 2.34.1
>
> Zhaoxin CPUs handle the CMPLegacy bit in the same way
> as Intel CPUs. This patch simplifies the existing logic by
> using the IS_XXX_CPU macro and includes checks for Zhaoxin
> vendor to align their behavior with Intel.
>
> Signed-off-by: EwanHai <ewanhai-oc@zhaoxin.com>
> ---
> target/i386/cpu.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index a3747fc487..c52a4cf3ba 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -6945,9 +6945,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
> * So don't set it here for Intel to make Linux guests happy.
> */
> if (threads_per_pkg > 1) {
> - if (env->cpuid_vendor1 != CPUID_VENDOR_INTEL_1 ||
> - env->cpuid_vendor2 != CPUID_VENDOR_INTEL_2 ||
> - env->cpuid_vendor3 != CPUID_VENDOR_INTEL_3) {
> + if (!IS_INTEL_CPU(env) && !IS_ZHAOXIN_CPU(env)) {
This change implicitly changes the behavior of existing VIA CPU.
Is this a bug for the original VIA? If so, I suggest a separate patch to
fix it and explain the effect on the VIA (Zhaoxin1) CPU.
Regards,
Zhao
> *ecx |= 1 << 1; /* CmpLegacy bit */
> }
> }
> --
> 2.34.1
>
next prev parent reply other threads:[~2024-08-08 10:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 11:25 [PATCH v2 0/4] Add support for Zhaoxin Yongfeng CPU model and other improvements EwanHai
2024-07-04 11:25 ` [PATCH v2 1/4] target/i386: Add support for Zhaoxin CPU vendor identification EwanHai
2024-08-08 10:31 ` Zhao Liu
2024-07-04 11:25 ` [PATCH v2 2/4] target/i386: Add CPUID leaf 0xC000_0001 EDX definitions EwanHai
2024-08-08 10:35 ` Zhao Liu
2024-07-04 11:25 ` [PATCH v2 3/4] target/i386: Introduce Zhaoxin Yongfeng CPU model EwanHai
2024-08-08 10:55 ` Zhao Liu
2024-07-04 11:25 ` [PATCH v2 4/4] target/i386: Update CMPLegacy handling for Zhaoxin CPUs EwanHai
2024-08-08 10:30 ` Zhao Liu [this message]
2024-08-09 1:44 ` Ewan Hai
2024-08-09 3:22 ` Zhao Liu
2024-08-09 3:25 ` Ewan Hai
2024-08-09 3:47 ` Zhao Liu
2024-08-09 3:37 ` Ewan Hai
2024-08-08 9:23 ` [PATCH v2 0/4] Add support for Zhaoxin Yongfeng CPU model and other improvements Ewan Hai
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=ZrSeMfpBm8NrXRWK@intel.com \
--to=zhao1.liu@intel.com \
--cc=cobechen@zhaoxin.com \
--cc=ewanhai-oc@zhaoxin.com \
--cc=ewanhai@zhaoxin.com \
--cc=frankzhu@zhaoxin.com \
--cc=liamni@zhaoxin.com \
--cc=louisqi@zhaoxin.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rockcui@zhaoxin.com \
--cc=xiaoyao.li@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).