[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/5] x86/platform: Permit reading the TSX control MSRs via XENPF_resource_op


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 11 Jun 2021 17:36:24 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>, Edwin Torok <edvin.torok@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "Jan Beulich" <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 11 Jun 2021 16:36:57 +0000
  • Ironport-hdrordr: A9a23:InE0Sa2ax5NQUwOoxYFI5QqjBIgkLtp133Aq2lEZdPRUGvb4qy nIpoVi6faUskdpZJhOo6HiBEDtexzhHNtOkO0s1NSZLW/bUQmTXeNfBOLZqlWKcUCTygce79 YGT0EXMqyKMbEQt6bHCWeDferIuOP3lZyVuQ==
  • Ironport-sdr: KHWKseF7XjIeVzjmp3F1vZTuP1yEelPBkcq1vTL/hEpqnckMxU2Lb/l5h5Kto+YsIWPmJrSaR/ t75CE0FdW2AEikEQirZjHAj/N3mHgEwImpOaA7NFgFcd7+SBMigOZrZruBkaPFsybFAjh0TxzU cH81rl7+m/7JORFCqrkgdDhBNfNUxLpKYuv5YuNIeQtxE39wk78l2i8Y5q2rdqdooLTHe8bGOD SlSlJ9WhcVY1saKKLUbVg0LVwp8R7WBIDn+WdP8xHt26Dwg+y4woSF6uMtaguxd/qPMnDb1VDu gU0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

We are going to want this to write some tests with.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
---
 xen/arch/x86/platform_hypercall.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/xen/arch/x86/platform_hypercall.c 
b/xen/arch/x86/platform_hypercall.c
index 41d8e59563..284c2dfb9e 100644
--- a/xen/arch/x86/platform_hypercall.c
+++ b/xen/arch/x86/platform_hypercall.c
@@ -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 )
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.