[PATCH 1/5] nSVM: Expose FLUSHBYASID CPUID feature to nested guests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The FLUSHBYASID CPUID feature controls the availability of  commands
0x3 and 0x7 of TLB_CONTROL. If FLUSHBYASID is supported by the VCPU,
those TLB_CONTROL commands will be available to nested guests. Therefore,
expose FLUSHBYASID CPUID feature to nested guests.

Signed-off-by: Krish Sadhukhan <krish.sadhukhan@xxxxxxxxxx>
---
 arch/x86/kvm/svm/svm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 1a70e11f0487..0f8748af8569 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -931,6 +931,9 @@ static __init void svm_set_cpu_caps(void)
 
 		/* Nested VM can receive #VMEXIT instead of triggering #GP */
 		kvm_cpu_cap_set(X86_FEATURE_SVME_ADDR_CHK);
+
+		if (boot_cpu_has(X86_FEATURE_FLUSHBYASID))
+			kvm_cpu_cap_set(X86_FEATURE_FLUSHBYASID);
 	}
 
 	/* CPUID 0x80000008 */
-- 
2.27.0




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux