[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.3] VMX: don't unintentionally leave x2APIC MSR intercepts disabled
commit c7d1bb848e1817273081bfc4ecb21d3e1e4e32b0 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Oct 17 16:03:01 2014 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Oct 17 16:03:01 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 bf7d8f1..fb76a34 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2052,6 +2052,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) && @@ -2068,8 +2069,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 |= @@ -2098,15 +2097,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.3 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |