All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Ewan Hai-oc <ewanhai-oc@zhaoxin.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Shuah Khan <shuah@kernel.org>,  Frank Zhu <frankzhu@zhaoxin.com>,
	kvm@vger.kernel.org, linux-kselftest@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/8] KVM: selftests: Add Zhaoxin (ZX) CPU detection support
Date: Tue, 1 Sep 2026 17:19:10 -0700	[thread overview]
Message-ID: <apdrfkO8ALRz59yl@google.com> (raw)
In-Reply-To: <20260730110524.2539316-2-ewanhai-oc@zhaoxin.com>

On Thu, Jul 30, 2026, Ewan Hai-oc wrote:
> From: Frank Zhu <frankzhu@zhaoxin.com>
> 
> Add infrastructure to detect Zhaoxin CPUs in KVM selftests. Zhaoxin
> CPUs use vendor strings "CentaurHauls" or "  Shanghai  " and implement
> VMX-compatible virtualization technology.
> 
> Signed-off-by: Frank Zhu <frankzhu@zhaoxin.com>
> Signed-off-by: Ewan Hai <ewanhai-oc@zhaoxin.com>
> ---
>  tools/testing/selftests/kvm/include/x86/processor.h | 7 +++++++
>  tools/testing/selftests/kvm/lib/x86/processor.c     | 3 +++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/tools/testing/selftests/kvm/include/x86/processor.h b/tools/testing/selftests/kvm/include/x86/processor.h
> index b161174ece45..9840b583877c 100644
> --- a/tools/testing/selftests/kvm/include/x86/processor.h
> +++ b/tools/testing/selftests/kvm/include/x86/processor.h
> @@ -23,6 +23,7 @@ extern bool host_cpu_is_intel;
>  extern bool host_cpu_is_amd;
>  extern bool host_cpu_is_hygon;
>  extern bool host_cpu_is_amd_compatible;
> +extern bool host_cpu_is_zx;

Please spell out "zhaoxin", "zx" isn't intuitive for most of us (I keep thinking
it's a compression feature).

And do the same thing we did in commit 53b2869231d3 ("KVM: selftests: Add a flag
to identify AMD compatible test cases"), and add host_cpu_is_intel_compatible.
That should cut down on the number of checks on is_zhaoxin, and should help avoid
issues like the ones Sashiko pointed out.

  parent reply	other threads:[~2026-09-02  0:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 11:05 [PATCH 0/8] KVM: selftests: Add Zhaoxin CPU support Ewan Hai-oc
2026-07-30 11:05 ` [PATCH 1/8] KVM: selftests: Add Zhaoxin (ZX) CPU detection support Ewan Hai-oc
2026-07-30 11:26   ` sashiko-bot
2026-09-02  0:19   ` Sean Christopherson [this message]
2026-09-10 11:39     ` Ewan Hai-oc
2026-07-30 11:05 ` [PATCH 2/8] KVM: selftests: nx_huge_pages_test: Add TDP detection for Zhaoxin CPUs Ewan Hai-oc
2026-07-30 11:43   ` sashiko-bot
2026-07-30 11:05 ` [PATCH 3/8] KVM: selftests: vmx_exception_with_invalid_guest_state: Support " Ewan Hai-oc
2026-07-30 11:05 ` [PATCH 4/8] KVM: selftests: fix_hypercall_test: Add Zhaoxin CPU support Ewan Hai-oc
2026-07-30 11:05 ` [PATCH 5/8] KVM: selftests: Skip PERF_CAPABILITIES vCPU checks without PDCM Ewan Hai-oc
2026-07-30 11:05 ` [PATCH 6/8] KVM: selftests: feature_msrs_test: Extend MSR_IA32_UCODE_REV quirk to Zhaoxin Ewan Hai-oc
2026-07-30 11:05 ` [PATCH 7/8] KVM: selftests: nested_exceptions_test: Add Zhaoxin CPU support Ewan Hai-oc
2026-09-02  0:20   ` Sean Christopherson
2026-09-10 11:40     ` Ewan Hai-oc
2026-07-30 11:05 ` [PATCH 8/8] KVM: selftests: vmx_apic_access_test: Check APIC virtualization support Ewan Hai-oc

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=apdrfkO8ALRz59yl@google.com \
    --to=seanjc@google.com \
    --cc=ewanhai-oc@zhaoxin.com \
    --cc=frankzhu@zhaoxin.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=shuah@kernel.org \
    /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.