|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] libxc: Expose the 1GB pages cpuid flag to guest
commit ace4e40029167123e706006583ec87c88731081a
Author: Liang Li <liang.z.li@xxxxxxxxx>
AuthorDate: Fri Nov 28 18:52:05 2014 +0800
Commit: Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Thu Jan 8 13:50:06 2015 +0000
libxc: Expose the 1GB pages cpuid flag to guest
If hardware support the 1GB pages, expose the feature to guest by
default. Users don't have to use a 'cpuid= ' option in config fil
e to turn it on.
If guest use shadow mode, the 1GB pages feature will be hidden from
guest, this is done in the function hvm_cpuid(). So the change is
okay for shadow mode case.
Signed-off-by: Liang Li <liang.z.li@xxxxxxxxx>
Signed-off-by: Yang Zhang <yang.z.zhang@xxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
tools/libxc/xc_cpuid_x86.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index a18b1ff..c97f91a 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -109,6 +109,7 @@ static void amd_xc_cpuid_policy(
regs[3] &= (0x0183f3ff | /* features shared with 0x00000001:EDX */
bitmaskof(X86_FEATURE_NX) |
bitmaskof(X86_FEATURE_LM) |
+ bitmaskof(X86_FEATURE_PAGE1GB) |
bitmaskof(X86_FEATURE_SYSCALL) |
bitmaskof(X86_FEATURE_MP) |
bitmaskof(X86_FEATURE_MMXEXT) |
@@ -192,6 +193,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;
@@ -386,6 +388,7 @@ static void xc_cpuid_hvm_policy(
clear_bit(X86_FEATURE_LM, regs[3]);
clear_bit(X86_FEATURE_NX, regs[3]);
clear_bit(X86_FEATURE_PSE36, regs[3]);
+ clear_bit(X86_FEATURE_PAGE1GB, regs[3]);
}
break;
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |