x86/platform: Permit reading the TSX control MSRs via XENPF_resource_op
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 10 Jun 2021 10:02:47 +0000 (11:02 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 15 Jun 2021 19:50:32 +0000 (20:50 +0100)
We are going to want this to write some tests with.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/platform_hypercall.c

index 41d8e59563b55b35c574e9ece49453cd706eb20b..284c2dfb9efec1762f56dc9019a18753e8f2d5ba 100644 (file)
@@ -74,6 +74,12 @@ static bool msr_read_allowed(unsigned int msr)
 
     case MSR_IA32_TSC:
         return true;
+
+    case MSR_TSX_FORCE_ABORT:
+        return cpu_has_tsx_force_abort;
+
+    case MSR_TSX_CTRL:
+        return cpu_has_tsx_ctrl;
     }
 
     if ( ppin_msr && msr == ppin_msr )