[Devel] [PATCH] KVM: Missing hunk for ms commit 3ce424e

Evgeny Yakovlev eyakovlev at virtuozzo.com
Mon Dec 26 07:25:58 PST 2016


This part of mentioned commit has been lost, restore it
Fixes https://jira.sw.ru/browse/PSBM-57821

Signed-off-by: Evgeny Yakovlev <eyakovlev at virtuozzo.com>
---
 arch/x86/kvm/vmx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index d2d52c3..3d39923 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2329,7 +2329,9 @@ static void vmx_set_msr_bitmap(struct kvm_vcpu *vcpu)
 
 	if (is_guest_mode(vcpu))
 		msr_bitmap = vmx_msr_bitmap_nested;
-	else if (vcpu->arch.apic_base & X2APIC_ENABLE) {
+    else if (cpu_has_secondary_exec_ctrls() &&
+             (vmcs_read32(SECONDARY_VM_EXEC_CONTROL) &
+              SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE)) {
 		if (is_long_mode(vcpu))
 			msr_bitmap = vmx_msr_bitmap_longmode_x2apic;
 		else
-- 
1.8.3.1



More information about the Devel mailing list