[xen stable-4.8] libxc/x86/PV: don't hand through CPUID leaf 0x80000008 as is

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

[xen stable-4.8] libxc/x86/PV: don't hand through CPUID leaf 0x80000008 as is

patchbot
commit 028656f0424fad1a9626ee05737d7bd2b271c2ce
Author:     Jan Beulich <[hidden email]>
AuthorDate: Thu Jun 28 11:18:06 2018 +0200
Commit:     Jan Beulich <[hidden email]>
CommitDate: Thu Jun 28 11:18:06 2018 +0200

    libxc/x86/PV: don't hand through CPUID leaf 0x80000008 as is
   
    Just like for HVM the feature set should be used for EBX output, while
    EAX should be restricted to the low 16 bits and ECX/EDX should be zero.
   
    Signed-off-by: Jan Beulich <[hidden email]>
    Reviewed-by: Andrew Cooper <[hidden email]>
    master commit: 849cc9ac56eff8a8d575ed9f484aad72f383862c
    master date: 2018-05-29 10:51:02 +0100
---
 tools/libxc/xc_cpuid_x86.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index 978451aa55..1e0072df95 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -672,6 +672,12 @@ static void xc_cpuid_pv_policy(xc_interface *xch,
         break;
     }
 
+    case 0x80000008:
+        regs[0] &= 0x0000ffffu;
+        regs[1] = info->featureset[featureword_of(X86_FEATURE_CLZERO)];
+        regs[2] = regs[3] = 0;
+        break;
+
     case 0x00000005: /* MONITOR/MWAIT */
     case 0x0000000a: /* Architectural Performance Monitor Features */
     case 0x0000000b: /* Extended Topology Enumeration */
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.8

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