KVM: SVM: Report Nested Paging support to userspace
authorJoerg Roedel <joerg.roedel@amd.com>
Fri, 10 Sep 2010 15:31:05 +0000 (17:31 +0200)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:52:47 +0000 (10:52 +0200)
This patch implements the reporting of the nested paging
feature support to userspace.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/svm.c

index de1930ee2abb833b04f21fe396f538e36b1118ff..36e6c88913dcbd39260c45528141106d06b6ede6 100644 (file)
@@ -3481,6 +3481,10 @@ static void svm_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry)
                if (svm_has(SVM_FEATURE_NRIP))
                        entry->edx |= SVM_FEATURE_NRIP;
 
+               /* Support NPT for the guest if enabled */
+               if (npt_enabled)
+                       entry->edx |= SVM_FEATURE_NPT;
+
                break;
        }
 }