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

[PATCH 1/2] x86/cpuid: expose MCDT_NO to guests


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Fri, 13 May 2022 12:34:59 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Uk9f0N1rH3Yo6aS6T6eBxtTMatId3THh2C6wf3pFK8g=; b=eKzlHTaxWyAP5ZOyibeRyhDapj0jl2bSZmF46Q8I8ER2HX2W1j7scT4Osp/YAHXvKw2dwWwrP3gT4xay3lfGjQA8N/F3UB0cgWI7MTvOKy5Y+8GNhygIbijFxpXwk+hu1zJjdZtga9Bb756e5oqmj9Yh/dIRrQMr/wVCV4XBqNhxosWmJIs3apzsbOvR39R0L/87klLwGg2zJF0cywhwHPRydCVWxzqp3dIvDwFMhZfALFOqYPOX/iXqdT/6GDB7IYoueM06omgiDTWhVY22feKK5P5o4tXncaech6CwjCpDrlQg1sFa1sgRPISX1ioXlL74vW/dGySad5sDNXiKBw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L2rqloEC8xMjxoTXgJ3LItnZeDtyBBfOoJXFVIpmbG/CmoFCFIM5jj94PRMLATYnfBF/kmb4gGio3kT3giWUWv4CSCTQ+cAWEZnBMchFhAVsZOkjRDopGd8+BrDruqRmp2gERrM696OoIDk3oZYB/HVvlxAsaMEqdOWG1V2uPQJpz7ny61t8wIerQJQizBwsJXQgE7v8rv5PxzwjjBPRM2zNicaHpe7SeIsBoDU2ZrDR9VDQAB1F2hHbJ/dLxZ8Pli4Y8JpKMreglmW9Eusi6XoQ0ii4kRkw1/WKBjt25E1A3fi/TUs/iIqz1vpJ7I3nJ0kLc6XAgtwQ4gWeKXbj1Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Fri, 13 May 2022 10:35:52 +0000
  • Ironport-data: A9a23:bGf5QaDb/2zPwxVW/y7iw5YqxClBgxIJ4kV8jS/XYbTApGhzgmYEm DMcWjqOP/mMZWfyLox2bYy//BsOuJbQx95jQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E/raNANlFEkvU2ybuOU5NXsZ2YgHGeIdA970Ug5w7Ng2dYx6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPhB2 dxdpZXrYjw5FbOWvssCbytFDiBHaPguFL/veRBTsOS15mifKT7A5qsrC0s7e4oF5uxwHGdCs +QCLywAZQyCgOTwx6+nTu5rhYIoK8yD0IE34yk8i22GS6t3B8mcHs0m5vcBtNs0rtpJEvvEI dIQdBJkbQjaYg0JMVASYH47tLjx3CKiKmQEwL6TjZor5TX36hx964Xga4v1R92URN1vwm/N8 woq+Ey8WHn2Lue32TeDt36hmOLLtSf6Q54JUq218OZwh1+ezXBVDwcZPXOkpdGph0j4XMhQQ 2QW9TAptrMa71GwQ5/2WBjQiHyOswMYWtFQO/Yn8wzLwa3Rizt1HUABRz9FLdAj6sk/QGVw0 kfTxoy0QztyrLeSVHSRsK+Oqi+/MjQUKmlEYjIYSQwC4J/op4RbYg/zc+uP2ZWd1rXdcQwcC RjWxMTir93/VfI26pg=
  • Ironport-hdrordr: A9a23:SpXkVqtrEpkJ4mCGFB4FvKF17skC5IMji2hC6mlwRA09TyXGra 2TdaUgvyMc1gx7ZJhBo7+90We7MBHhHPlOkPMs1NaZLXLbUQ6TQL2KgrGSpwEIdxefygcZ79 YYT0EcMqyOMbEFt7ec3ODQKb9Jrri6GeKT9J/jJh9WPH1XgspbnmJE42igYy5LrF4sP+tFKH PQ3LsPmxOQPVAsKuirDHgMWObO4/XNiZLdeBYDQzoq8hOHgz+E4KPzV0Hw5GZUbxp/hZMZtU TVmQ3w4auu99m91x/nzmfWq7BbgsHoxNdvDNGFzuIVNjLvoAC1Y5kJYczLgBkF5MWUrHo6mt jFpBkte+x19nPqZ2mw5SDg3gHxuQxen0PK+Bu9uz/OsMb5TDU1B45qnoRCaCbU7EImoZVVzL 9L93jxjesZMTrw2ADGo/TYXRBjkUS55VA4l/QIsnBZWYwCLJdMsI0k+l9PGptoJlO31GkeKp guMCjg3ocXTbvDBEqp/VWHgebcE0jbJy32DHTr4aeuonprdHMQ9Tps+CVQpAZEyHsHceg02w 31CNUXqFhwdL5nUUsEPpZmfSKWMB27ffueChPlHbzYfJt3SE7lmtrQ3Igfwt2MVdgh8KYS8a 6xIm+w81RCMX7TNQ==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Expose the MCDT_NO CPUID flag to guests if available.  The bit signals
that the CPU does not exhibit MCDT behavior, and as such can be
exposed without requiring any additional work.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 tools/libs/light/libxl_cpuid.c              | 1 +
 tools/misc/xen-cpuid.c                      | 1 +
 xen/include/public/arch-x86/cpufeatureset.h | 1 +
 3 files changed, 3 insertions(+)

diff --git a/tools/libs/light/libxl_cpuid.c b/tools/libs/light/libxl_cpuid.c
index d462f9e421..697ee38270 100644
--- a/tools/libs/light/libxl_cpuid.c
+++ b/tools/libs/light/libxl_cpuid.c
@@ -235,6 +235,7 @@ int libxl_cpuid_parse_config(libxl_cpuid_policy_list 
*cpuid, const char* str)
         {"fsrcs",        0x00000007,  1, CPUID_REG_EAX, 12,  1},
 
         {"intel-psfd",   0x00000007,  2, CPUID_REG_EDX,  0,  1},
+        {"mcdt_no",      0x00000007,  2, CPUID_REG_EDX,  5,  1},
 
         {"lahfsahf",     0x80000001, NA, CPUID_REG_ECX,  0,  1},
         {"cmplegacy",    0x80000001, NA, CPUID_REG_ECX,  1,  1},
diff --git a/tools/misc/xen-cpuid.c b/tools/misc/xen-cpuid.c
index 0b1b3333fe..bc40aa06ca 100644
--- a/tools/misc/xen-cpuid.c
+++ b/tools/misc/xen-cpuid.c
@@ -203,6 +203,7 @@ static const char *const str_7b1[32] =
 static const char *const str_7d2[32] =
 {
     [ 0] = "intel-psfd",
+    [ 5] = "mcdt_no",
 };
 
 static const struct {
diff --git a/xen/include/public/arch-x86/cpufeatureset.h 
b/xen/include/public/arch-x86/cpufeatureset.h
index 5aa3c82fc6..aa12280f25 100644
--- a/xen/include/public/arch-x86/cpufeatureset.h
+++ b/xen/include/public/arch-x86/cpufeatureset.h
@@ -304,6 +304,7 @@ XEN_CPUFEATURE(INTEL_PPIN,         12*32+ 0) /*   Protected 
Processor Inventory
 
 /* Intel-defined CPU features, CPUID level 0x00000007:2.edx, word 13 */
 XEN_CPUFEATURE(INTEL_PSFD,         13*32+ 0) /*A  MSR_SPEC_CTRL.PSFD */
+XEN_CPUFEATURE(MCDT_NO,            13*32+ 5) /*A  MCDT_NO */
 
 #endif /* XEN_CPUFEATURE */
 
-- 
2.36.0




 


Rackspace

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