aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-07-27 10:30:48 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:33:19 -0400
commit344f414fa0f16254dd07195d4cd11b2f92931d3d (patch)
tree53ddc04108934f945898ac16160353c3bf04af9c /arch/x86/kvm/x86.c
parent04326caacff2b162d359c15a2edf634448897d1a (diff)
KVM: report 1GB page support to userspace
If userspace knows that the kernel part supports 1GB pages it can enable the corresponding cpuid bit so that guests actually use GB pages. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 69de7248083f..fa525d511d92 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1444,6 +1444,7 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
1444 u32 index, int *nent, int maxnent) 1444 u32 index, int *nent, int maxnent)
1445{ 1445{
1446 unsigned f_nx = is_efer_nx() ? F(NX) : 0; 1446 unsigned f_nx = is_efer_nx() ? F(NX) : 0;
1447 unsigned f_gbpages = kvm_x86_ops->gb_page_enable() ? F(GBPAGES) : 0;
1447#ifdef CONFIG_X86_64 1448#ifdef CONFIG_X86_64
1448 unsigned f_lm = F(LM); 1449 unsigned f_lm = F(LM);
1449#else 1450#else
@@ -1468,7 +1469,7 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
1468 F(MTRR) | F(PGE) | F(MCA) | F(CMOV) | 1469 F(MTRR) | F(PGE) | F(MCA) | F(CMOV) |
1469 F(PAT) | F(PSE36) | 0 /* Reserved */ | 1470 F(PAT) | F(PSE36) | 0 /* Reserved */ |
1470 f_nx | 0 /* Reserved */ | F(MMXEXT) | F(MMX) | 1471 f_nx | 0 /* Reserved */ | F(MMXEXT) | F(MMX) |
1471 F(FXSR) | F(FXSR_OPT) | 0 /* GBPAGES */ | 0 /* RDTSCP */ | 1472 F(FXSR) | F(FXSR_OPT) | f_gbpages | 0 /* RDTSCP */ |
1472 0 /* Reserved */ | f_lm | F(3DNOWEXT) | F(3DNOW); 1473 0 /* Reserved */ | f_lm | F(3DNOWEXT) | F(3DNOW);
1473 /* cpuid 1.ecx */ 1474 /* cpuid 1.ecx */
1474 const u32 kvm_supported_word4_x86_features = 1475 const u32 kvm_supported_word4_x86_features =