From: Joerg Roedel Date: Fri, 10 Sep 2010 15:31:05 +0000 (+0200) Subject: KVM: SVM: Report Nested Paging support to userspace X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d4aeaad8bb8f8084a414819934b73ab49c26c92;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git KVM: SVM: Report Nested Paging support to userspace This patch implements the reporting of the nested paging feature support to userspace. Signed-off-by: Joerg Roedel Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index de1930ee2abb..36e6c88913dc 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -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; } }