]> xenbits.xensource.com Git - xen.git/commitdiff
vpmu intel: pass through cpuid bits when BTS is enabled
authorDietmar Hahn <dietmar.hahn@ts.fujitsu.com>
Tue, 12 Mar 2013 14:37:45 +0000 (15:37 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Mar 2013 14:37:45 +0000 (15:37 +0100)
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.

Signed-off-by: Dietmar Hahn <dietmar.hahn@ts.fujitsu.com>
xen/arch/x86/hvm/vmx/vpmu_core2.c

index 2af8966483bc67ca70b4a8798d55ae229b3be5b9..afad35b04c8b13cf11340bb94b7cc9bdde3574b1 100644 (file)
@@ -607,6 +607,10 @@ static void core2_vpmu_do_cpuid(unsigned int input,
         {
             /* 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);
         }
     }
 }