diff mbox

[v2,2/3] x86/vpmu: Disable VPMU if guest's CPUID indicates no PMU support

Message ID ab08285d-ba79-983f-50dc-898fe4e73f3b@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andrew Cooper Feb. 22, 2017, 4:42 p.m. UTC
On 22/02/17 16:34, Boris Ostrovsky wrote:
>> I think the code as-is is ok, although it would be nice to extend the
>> basic{} union to have a named uint8_t for pmu_version.
>
> Something like this?

This please, to match the AMD side.

~Andrew
diff mbox

Patch

diff --git a/xen/include/asm-x86/cpuid.h b/xen/include/asm-x86/cpuid.h
index bc3fc7c..363ef32 100644
--- a/xen/include/asm-x86/cpuid.h
+++ b/xen/include/asm-x86/cpuid.h
@@ -118,6 +118,18 @@  struct cpuid_policy
 
             /* Leaf 0x2 - TLB/Cache/Prefetch. */
             uint8_t l2_nr_queries; /* Documented as fixed to 1. */
+            uint8_t l2_desc[15];
+
+            uint64_t :64, :64; /* PSN. */
+            uint64_t :64, :64; /* Structured Cache. */
+            uint64_t :64, :64; /* MONITOR. */
+            uint64_t :64, :64; /* Therm/Perf. */
+            uint64_t :64, :64; /* Structured Features. */
+            uint64_t :64, :64; /* rsvd */
+            uint64_t :64, :64; /* DCA */
+
+            /* Leaf 0xa - Intel PMU. */
+            uint8_t pmu_version;
         };
     } basic;