Re: [PATCH 4/8] x86/cpufeatures: Add PerfCtrVirt feature bit

[email protected]
Newsgroups org.kernel.vger.kvm
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch modifies `arch/x86/include/asm/cpufeatures.h` but fails to update its synchronized copy in `tools/arch/x86/include/asm/cpufeatures.h`.
--

--- Patch [4]: [PATCH 4/8] x86/cpufeatures: Add PerfCtrVirt feature bit ---
commit d0af0746d5778097e8c3fa7f7763e5d0b909732c
Author: Sandipan Das <[email protected]>

x86/cpufeatures: Add PerfCtrVirt feature bit

This commit defines a feature flag for bit 8 of CPUID leaf 0x8000000A EDX
which indicates support for PMC virtualization. Hypervisors can use this
feature to offload the guest PMU context switch to hardware. This enables
hardware-switched mediated PMU in KVM.

> diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
> index 1b4a48bff18f7..d6281870efe02 100644
> --- a/arch/x86/include/asm/cpufeatures.h
> +++ b/arch/x86/include/asm/cpufeatures.h
> @@ -374,6 +374,7 @@
>  #define X86_FEATURE_VMCBCLEAN		(15*32+ 5) /* "vmcb_clean" VMCB clean bits support */
>  #define X86_FEATURE_FLUSHBYASID		(15*32+ 6) /* "flushbyasid" Flush-by-ASID support */
>  #define X86_FEATURE_DECODEASSISTS	(15*32+ 7) /* "decodeassists" Decode Assists support */
> +#define X86_FEATURE_PERFCTR_VIRT	(15*32+ 8) /* PMC virtualization support */

[Severity: Low]
Should this addition also be mirrored in the tools directory?

When arch/x86/include/asm/cpufeatures.h is modified, it usually requires a
synchronized update in tools/arch/x86/include/asm/cpufeatures.h.

Does omitting this update trigger a kernel ABI header differences warning
from check-headers.sh during the tools/perf build?

>  #define X86_FEATURE_PAUSEFILTER		(15*32+10) /* "pausefilter" Filtered pause intercept */
>  #define X86_FEATURE_PFTHRESHOLD		(15*32+12) /* "pfthreshold" Pause filter threshold */
>  #define X86_FEATURE_AVIC		(15*32+13) /* "avic" Virtual Interrupt Controller */

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.