[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.4] VMX: don't unintentionally leave x2APIC MSR intercepts disabled
commit c9e1e5b6b1968b09f7eccf8292bdbdc1b51d47f3 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Oct 17 15:52:27 2014 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Oct 17 15:52:27 2014 +0200 VMX: don't unintentionally leave x2APIC MSR intercepts disabled These should be re-enabled in particular when the virtualized APIC transitions to HW-disabled state. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx> master commit: 72af6f455ac6afcd46d9a556f90349f2397507e8 master date: 2014-09-16 13:58:20 +0200 --- xen/arch/x86/hvm/vmx/vmx.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 678cc59..b05c88e 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2090,6 +2090,7 @@ void vmx_vlapic_msr_changed(struct vcpu *v) { int virtualize_x2apic_mode; struct vlapic *vlapic = vcpu_vlapic(v); + unsigned int msr; virtualize_x2apic_mode = ( (cpu_has_vmx_apic_reg_virt || cpu_has_vmx_virtual_intr_delivery) && @@ -2106,8 +2107,6 @@ void vmx_vlapic_msr_changed(struct vcpu *v) if ( !vlapic_hw_disabled(vlapic) && (vlapic_base_address(vlapic) == APIC_DEFAULT_PHYS_BASE) ) { - unsigned int msr; - if ( virtualize_x2apic_mode && vlapic_x2apic_mode(vlapic) ) { v->arch.hvm_vmx.secondary_exec_control |= @@ -2136,15 +2135,15 @@ void vmx_vlapic_msr_changed(struct vcpu *v) } } else - { v->arch.hvm_vmx.secondary_exec_control |= SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES; - for ( msr = MSR_IA32_APICBASE_MSR; - msr <= MSR_IA32_APICBASE_MSR + 0xff; msr++ ) - vmx_enable_intercept_for_msr(v, msr, - MSR_TYPE_R | MSR_TYPE_W); - } } + if ( !(v->arch.hvm_vmx.secondary_exec_control & + SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE) ) + for ( msr = MSR_IA32_APICBASE_MSR; + msr <= MSR_IA32_APICBASE_MSR + 0xff; msr++ ) + vmx_enable_intercept_for_msr(v, msr, MSR_TYPE_R | MSR_TYPE_W); + vmx_update_secondary_exec_control(v); vmx_vmcs_exit(v); } -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.4 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |