aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/include/asm/svm.h
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2017-12-04 10:57:24 -0600
committerBrijesh Singh <brijesh.singh@amd.com>2017-12-04 10:57:24 -0600
commitcea3a19b007a690a40fac373f22bf34ea69761a2 (patch)
tree0a678246c69d06d20178c9d82455c7253a38fd21 /arch/x86/include/asm/svm.h
parentx86/CPU/AMD: Add the Secure Encrypted Virtualization CPU feature (diff)
downloadwireguard-linux-cea3a19b007a690a40fac373f22bf34ea69761a2.tar.xz
wireguard-linux-cea3a19b007a690a40fac373f22bf34ea69761a2.zip
kvm: svm: prepare for new bit definition in nested_ctl
Currently the nested_ctl variable in the vmcb_control_area structure is used to indicate nested paging support. The nested paging support field is actually defined as bit 0 of the field. In order to support a new feature flag the usage of the nested_ctl and nested paging support must be converted to operate on a single bit. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: Joerg Roedel <joro@8bytes.org> Cc: Borislav Petkov <bp@suse.de> Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> Reviewed-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'arch/x86/include/asm/svm.h')
-rw-r--r--arch/x86/include/asm/svm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
index 78dd9df88157..c936c9824405 100644
--- a/arch/x86/include/asm/svm.h
+++ b/arch/x86/include/asm/svm.h
@@ -146,6 +146,8 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
#define SVM_VM_CR_SVM_LOCK_MASK 0x0008ULL
#define SVM_VM_CR_SVM_DIS_MASK 0x0010ULL
+#define SVM_NESTED_CTL_NP_ENABLE BIT(0)
+
struct __attribute__ ((__packed__)) vmcb_seg {
u16 selector;
u16 attrib;