Skip to contentSkip to conversation

vpmu intel: pass through cpuid bits when BTS is enabled

PATCH New Dietmar Hahn 1 participant 1 message Mar 12, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vpmu intel: pass through cpuid bits when BTS is enabled

Hi,

this patch passes the orginal cpuid bits for X86_FEATURE_DTES64 (64-bit DS Area) and X86_FEATURE_DSCPL (CPL Qualified Debug Store) to the guest when the BTS feature is switched on.
I forgot this when I did this BTS emulation.
Thanks.

Dietmar.

xen/arch/x86/hvm/vmx/vpmu_core2.c Tue Mar 12 13:58:40 2013 +0100 renamed from xen/arch/x86/hvm/vmx/vpmu_core2.c Mon Mar 11 16:13:42 2013 +0000 +4 -0
diff -r a6b81234b189 xen/arch/x86/hvm/vmx/vpmu_core2.c
@@ -607,6 +607,10 @@ static void core2_vpmu_do_cpuid(unsigned
         {
             /* Switch on the 'Debug Store' feature in CPUID.EAX[1]:EDX[21] */
             *edx |= cpufeat_mask(X86_FEATURE_DS);
+            if ( cpu_has(&current_cpu_data, X86_FEATURE_DTES64) )
+                *ecx |= cpufeat_mask(X86_FEATURE_DTES64);
+            if ( cpu_has(&current_cpu_data, X86_FEATURE_DSCPL) )
+                *ecx |= cpufeat_mask(X86_FEATURE_DSCPL);
         }
     }
 }
Signature · 1 line
Company details: http://ts.fujitsu.com/imprint.html