summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorJoerg Roedel2009-07-27 16:30:48 +0200
committerAvi Kivity2009-09-10 07:33:19 +0200
commit344f414fa0f16254dd07195d4cd11b2f92931d3d (patch)
tree53ddc04108934f945898ac16160353c3bf04af9c /arch/x86/kvm/svm.c
parentKVM: MMU: enable gbpages by increasing nr of pagesizes (diff)
downloadkernel-qcow2-linux-344f414fa0f16254dd07195d4cd11b2f92931d3d.tar.gz
kernel-qcow2-linux-344f414fa0f16254dd07195d4cd11b2f92931d3d.tar.xz
kernel-qcow2-linux-344f414fa0f16254dd07195d4cd11b2f92931d3d.zip
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/svm.c')
-rw-r--r--arch/x86/kvm/svm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 92fc0dab505d..10e718db990b 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2754,6 +2754,11 @@ static const struct trace_print_flags svm_exit_reasons_str[] = {
{ -1, NULL }
};
+static bool svm_gb_page_enable(void)
+{
+ return true;
+}
+
static struct kvm_x86_ops svm_x86_ops = {
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
@@ -2817,6 +2822,7 @@ static struct kvm_x86_ops svm_x86_ops = {
.get_mt_mask = svm_get_mt_mask,
.exit_reasons_str = svm_exit_reasons_str,
+ .gb_page_enable = svm_gb_page_enable,
};
static int __init svm_init(void)