mirror of
				https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
				synced 2025-11-04 08:34:47 +10:00 
			
		
		
		
	Track "virtual NMI exposed to L1" via a governed feature flag instead of using a dedicated bit/flag in vcpu_svm. Note, checking KVM's capabilities instead of the "vnmi" param means that the code isn't strictly equivalent, as vnmi_enabled could have been set if nested=false where as that the governed feature cannot. But that's a glorified nop as the feature/flag is consumed only by paths that are gated by nSVM being enabled. Link: https://lore.kernel.org/r/20230815203653.519297-15-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
		
			
				
	
	
		
			22 lines
		
	
	
		
			644 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			644 B
		
	
	
	
		
			C
		
	
	
	
	
	
/* SPDX-License-Identifier: GPL-2.0 */
 | 
						|
#if !defined(KVM_GOVERNED_FEATURE) || defined(KVM_GOVERNED_X86_FEATURE)
 | 
						|
BUILD_BUG()
 | 
						|
#endif
 | 
						|
 | 
						|
#define KVM_GOVERNED_X86_FEATURE(x) KVM_GOVERNED_FEATURE(X86_FEATURE_##x)
 | 
						|
 | 
						|
KVM_GOVERNED_X86_FEATURE(GBPAGES)
 | 
						|
KVM_GOVERNED_X86_FEATURE(XSAVES)
 | 
						|
KVM_GOVERNED_X86_FEATURE(VMX)
 | 
						|
KVM_GOVERNED_X86_FEATURE(NRIPS)
 | 
						|
KVM_GOVERNED_X86_FEATURE(TSCRATEMSR)
 | 
						|
KVM_GOVERNED_X86_FEATURE(V_VMSAVE_VMLOAD)
 | 
						|
KVM_GOVERNED_X86_FEATURE(LBRV)
 | 
						|
KVM_GOVERNED_X86_FEATURE(PAUSEFILTER)
 | 
						|
KVM_GOVERNED_X86_FEATURE(PFTHRESHOLD)
 | 
						|
KVM_GOVERNED_X86_FEATURE(VGIF)
 | 
						|
KVM_GOVERNED_X86_FEATURE(VNMI)
 | 
						|
 | 
						|
#undef KVM_GOVERNED_X86_FEATURE
 | 
						|
#undef KVM_GOVERNED_FEATURE
 |