[xen stable-4.9] VMX: PLATFORM_INFO MSR is r/o

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen stable-4.9] VMX: PLATFORM_INFO MSR is r/o

patchbot
commit 61b6df9d821481ba4e26e5843aa9320345077319
Author:     Jan Beulich <[hidden email]>
AuthorDate: Tue Oct 24 16:17:23 2017 +0200
Commit:     Jan Beulich <[hidden email]>
CommitDate: Tue Oct 24 16:17:23 2017 +0200

    VMX: PLATFORM_INFO MSR is r/o
   
    Therefore all write attempts should produce #GP, just like on real
    hardware.
   
    Signed-off-by: Jan Beulich <[hidden email]>
    Reviewed-by: Roger Pau Monné <[hidden email]>
    Acked-by: Kevin Tian <[hidden email]>
---
 xen/arch/x86/hvm/vmx/vmx.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 6b066fe..bcbb746 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -3100,6 +3100,7 @@ static int vmx_msr_write_intercept(unsigned int msr, uint64_t msr_content)
         break;
     }
     case MSR_IA32_FEATURE_CONTROL:
+    case MSR_INTEL_PLATFORM_INFO:
     case MSR_IA32_VMX_BASIC ... MSR_IA32_VMX_VMFUNC:
         /* None of these MSRs are writeable. */
         goto gp_fault;
@@ -3114,12 +3115,6 @@ static int vmx_msr_write_intercept(unsigned int msr, uint64_t msr_content)
             goto gp_fault;
         break;
 
-    case MSR_INTEL_PLATFORM_INFO:
-        if ( msr_content ||
-             rdmsr_safe(MSR_INTEL_PLATFORM_INFO, msr_content) )
-            goto gp_fault;
-        break;
-
     case MSR_INTEL_MISC_FEATURES_ENABLES:
     {
         bool old_cpuid_faulting = v->arch.cpuid_faulting;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.9


_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog