[Devel] [PATCH RHEL7 COMMIT] ms/kvm:vmx: more complete state update on APICv on/off: lost hunk

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jan 9 08:22:55 PST 2017


The commit is pushed to "branch-rh7-3.10.0-514.vz7.27.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.vz7.27.6
------>
commit 8e6dc095dd5d4494f8ecf1e4a1b3209e55910fd3
Author: Evgeny Yakovlev <eyakovlev at virtuozzo.com>
Date:   Mon Jan 9 20:22:54 2017 +0400

    ms/kvm:vmx: more complete state update on APICv on/off: lost hunk
    
    Fixes: 54b01f8 ("ms/kvm:vmx: more complete state update on APICv on/off")
    ms commit: 3ce424e
    
    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


More information about the Devel mailing list