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

Sandipan Das <[email protected]>
Newsgroups org.kernel.vger.kvm
Message-ID <cdea00ec61978f097d15202a2d5fe4f8fc9c4948.1786345201.git.sandipan.das@amd.com>
Define 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. Hence,
this is a required host capability for enabling hardware-switched
mediated PMU in KVM.

Signed-off-by: Sandipan Das <[email protected]>
---
 arch/x86/include/asm/cpufeatures.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index 30bb8fdf2a8b..b551ba381b6e 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -384,6 +384,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 */
 #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 */
-- 
2.53.0
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.