[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.4] VMX: fix PAT value seen by guest
commit be5c793b143825bca6f231f0c648982ac1afef0c Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Fri Apr 4 10:46:13 2014 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Apr 4 10:46:13 2014 +0200 VMX: fix PAT value seen by guest The XSA-60 fixes introduced a window during which the guest PAT gets forced to all zeros. This shouldn't be visible to the guest. Therefore we need to intercept PAT MSR accesses during that time period. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Liu Jinsong <jinsong.liu@xxxxxxxxx> master commit: fce79f8ce91dc45f3a4d699ee67c49e6cbeb1197 master date: 2014-04-01 16:49:18 +0200 --- xen/arch/x86/hvm/vmx/vmx.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index fb514a6..39c6d83 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -984,6 +984,8 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value) vmx_get_guest_pat(v, pat); vmx_set_guest_pat(v, uc_pat); + vmx_enable_intercept_for_msr(v, MSR_IA32_CR_PAT, + MSR_TYPE_R | MSR_TYPE_W); wbinvd(); /* flush possibly polluted cache */ hvm_asid_flush_vcpu(v); /* invalidate memory type cached in TLB */ @@ -993,6 +995,9 @@ static void vmx_handle_cd(struct vcpu *v, unsigned long value) { v->arch.hvm_vcpu.cache_mode = NORMAL_CACHE_MODE; vmx_set_guest_pat(v, *pat); + if ( !iommu_enabled || iommu_snoop ) + vmx_disable_intercept_for_msr(v, MSR_IA32_CR_PAT, + MSR_TYPE_R | MSR_TYPE_W); hvm_asid_flush_vcpu(v); /* no need to flush cache */ } } -- 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 |