]> xenbits.xensource.com Git - people/jgross/xen.git/commitdiff
x86/svm: silently drop writes to SYSCFG and related MSRs
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 7 Sep 2020 08:38:00 +0000 (10:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 7 Sep 2020 08:38:00 +0000 (10:38 +0200)
The SYSCFG, TOP_MEM1 and TOP_MEM2 MSRs are currently exposed to guests
and writes are silently discarded. Make this explicit in the SVM code
now, and just return default constant values when attempting to read
any of the MSRs, while continuing to silently drop writes.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/svm/svm.c

index ca3bbfcbb35565baf96276d011e9270cf1fc3d73..af584ff5d19c605d15fa66585b4c723e0a24d6b8 100644 (file)
@@ -1917,6 +1917,9 @@ static int svm_msr_read_intercept(unsigned int msr, uint64_t *msr_content)
             goto gpf;
         break;
 
+    case MSR_K8_SYSCFG:
+    case MSR_K8_TOP_MEM1:
+    case MSR_K8_TOP_MEM2:
     case MSR_K8_VM_CR:
         *msr_content = 0;
         break;
@@ -2094,6 +2097,9 @@ static int svm_msr_write_intercept(unsigned int msr, uint64_t msr_content)
             goto gpf;
         break;
 
+    case MSR_K8_TOP_MEM1:
+    case MSR_K8_TOP_MEM2:
+    case MSR_K8_SYSCFG:
     case MSR_K8_VM_CR:
         /* ignore write. handle all bits as read-only. */
         break;