libxc: Turn on the pdpe1gb cpuid flag by default
PATCH 1/1 libxc: Turn on the pdpe1gb cpuid flag by default
Now it's no need to set the "cpuid= " option in the config file to expose the 1GB hugepage feature to guest.
Signed-off-by Li Liang <[email protected]>
--- tools/libxc/xc_cpuid_x86.c | 1 + 1 file changed, 1 insertion(+)
tools/libxc/xc_cpuid_x86.c +1 -0
@@ -192,6 +192,7 @@ static void intel_xc_cpuid_policy( bitmaskof(X86_FEATURE_ABM)); regs[3 ] &= (bitmaskof (X86_FEATURE_NX ) |bitmaskof (X86_FEATURE_LM ) | +bitmaskof (X86_FEATURE_PAGE1GB ) |bitmaskof (X86_FEATURE_SYSCALL ) |bitmaskof (X86_FEATURE_RDTSCP ));break ;
Signature · 1 line
1.9.1
Quoted 1 line
Quoted 1 line
Quoted 1 line · On 13.11.14 at 06:31, <[email protected]> wrote:
Apart from the subject being kind of wrong (you're not turning it on by default, but only expose it if the hardware supports it), ...
tools/libxc/xc_cpuid_x86.c static void intel_xc_cpuid_policy( · line 198
Quoted 10 lines
tools/libxc/xc_cpuid_x86.c +1
-0@@ -192,6 +192,7 @@ static void intel_xc_cpuid_policy( bitmaskof(X86_FEATURE_ABM)); regs[3 ] &= (bitmaskof (X86_FEATURE_NX ) |bitmaskof (X86_FEATURE_LM ) | +bitmaskof (X86_FEATURE_PAGE1GB ) |bitmaskof (X86_FEATURE_SYSCALL ) |bitmaskof (X86_FEATURE_RDTSCP ));break ;
... this is incomplete: The AMD function would seem to need the same change, and the !PAE special casing in xc_cpuid_hvm_policy() should imo disable the flag.
Jan