aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_cpuid_x86.c
diff options
context:
space:
mode:
authorTim Deegan <tim@xen.org>2011-11-03 12:19:23 +0000
committerTim Deegan <tim@xen.org>2011-11-03 12:19:23 +0000
commitbbff299b86323c76f0d8ec593e7ea98368e6ea77 (patch)
treeac043b1b5ed286bf7f8b001fae1fdd2da83b3b12 /tools/libxc/xc_cpuid_x86.c
parentb07e31c4ab83d7e0d37df9e5d6335282489f3244 (diff)
downloadxen-bbff299b86323c76f0d8ec593e7ea98368e6ea77.tar.gz
xen-bbff299b86323c76f0d8ec593e7ea98368e6ea77.tar.bz2
xen-bbff299b86323c76f0d8ec593e7ea98368e6ea77.zip
xen: provide pse36 cpuid bit
Provide pse36 cpuid bit if guest runs in 32bit PAE or in long mode. Hyper-V refuses to start as the "cpu does not provide required hw features" if it does not find the pse36 cpuid bits. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Tim Deegan <tim@xen.org> Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'tools/libxc/xc_cpuid_x86.c')
-rw-r--r--tools/libxc/xc_cpuid_x86.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index 74dc4ca6bf..f7e1b61a02 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -98,7 +98,6 @@ static void amd_xc_cpuid_policy(
if ( !is_pae )
clear_bit(X86_FEATURE_PAE, regs[3]);
- clear_bit(X86_FEATURE_PSE36, regs[3]);
/* Filter all other features according to a whitelist. */
regs[2] &= ((is_64bit ? bitmaskof(X86_FEATURE_LAHF_LM) : 0) |
@@ -340,6 +339,7 @@ static void xc_cpuid_hvm_policy(
bitmaskof(X86_FEATURE_CMOV) |
bitmaskof(X86_FEATURE_PAT) |
bitmaskof(X86_FEATURE_CLFLSH) |
+ bitmaskof(X86_FEATURE_PSE36) |
bitmaskof(X86_FEATURE_MMX) |
bitmaskof(X86_FEATURE_FXSR) |
bitmaskof(X86_FEATURE_XMM) |
@@ -349,8 +349,10 @@ static void xc_cpuid_hvm_policy(
/* We always support MTRR MSRs. */
regs[3] |= bitmaskof(X86_FEATURE_MTRR);
- if ( !is_pae )
+ if ( !is_pae ) {
clear_bit(X86_FEATURE_PAE, regs[3]);
+ clear_bit(X86_FEATURE_PSE36, regs[3]);
+ }
break;
case 0x00000007: /* Intel-defined CPU features */
@@ -372,8 +374,10 @@ static void xc_cpuid_hvm_policy(
break;
case 0x80000001:
- if ( !is_pae )
+ if ( !is_pae ) {
clear_bit(X86_FEATURE_NX, regs[3]);
+ clear_bit(X86_FEATURE_PSE36, regs[3]);
+ }
break;
case 0x80000007: