From: Joerg Roedel <joerg.roe...@amd.com>

This patch implements the reporting of the nested paging
feature support to userspace.

Signed-off-by: Joerg Roedel <joerg.roe...@amd.com>
Signed-off-by: Avi Kivity <a...@redhat.com>

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index ede95e0..678602e 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -3476,6 +3476,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;
        }
 }
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to