From: Edwin Török <edvin.to...@citrix.com>

This is part of 'Architectural Performance Monitoring Version 1'
and implemented on Icelake.

Backport: 4.13+

Signed-off-by: Edwin Török <edvin.to...@citrix.com>
---
 xen/arch/x86/cpu/vpmu_intel.c | 1 +
 xen/arch/x86/cpuid.c          | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c
index ec9ab01fde..44a1ed5b10 100644
--- a/xen/arch/x86/cpu/vpmu_intel.c
+++ b/xen/arch/x86/cpu/vpmu_intel.c
@@ -645,6 +645,7 @@ static int cf_check core2_vpmu_do_wrmsr(unsigned int msr, 
uint64_t msr_content)
                 case 0x412e:   /* Last Level Cache Misses */
                 case 0x00c4:   /* Branch Instructions Retired */
                 case 0x00c5:   /* All Branch Mispredict Retired */
+                case 0x01a4:   /* Topdown Slots */
                     blocked = 0;
                     break;
                }
diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index dfbcd1b3a4..51ee89afc4 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -328,7 +328,7 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf,
 
             if ( vpmu_features & (XENPMU_FEATURE_IPC_ONLY |
                                   XENPMU_FEATURE_ARCH_ONLY) ) {
-                unsigned limit = ( vpmu_features & XENPMU_FEATURE_ARCH_ONLY ) 
? 7 : 3;
+                unsigned limit = ( vpmu_features & XENPMU_FEATURE_ARCH_ONLY ) 
? 8 : 3;
                 if (limit < u.arch_nr) {
                     gdprintk(XENLOG_WARNING, "Limiting architectural PMU 
events to %d (actual %d)", limit, u.arch_nr);
                     u.arch_nr = limit;
-- 
2.41.0


Reply via email to