[PATCH kvm-unit-tests 5/9] x86: nVMX: Define VMCS field encoding constants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Liran Alon <liran.alon@xxxxxxxxxx>
Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx>
---
 x86/vmx.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/x86/vmx.h b/x86/vmx.h
index 50f4afdb6b84..2126df36f0ba 100644
--- a/x86/vmx.h
+++ b/x86/vmx.h
@@ -596,6 +596,21 @@ enum vm_instruction_error_number {
 #define ACTV_ACTIVE		0
 #define ACTV_HLT		1
 
+/*
+ * VMCS field encoding:
+ * Bit 0: High-access
+ * Bits 1-9: Index
+ * Bits 10-12: Type
+ * Bits 13-15: Width
+ * Bits 15-64: Reserved
+ */
+#define VMCS_FIELD_HIGH_SHIFT		(0)
+#define VMCS_FIELD_INDEX_SHIFT		(1)
+#define VMCS_FIELD_TYPE_SHIFT		(10)
+#define VMCS_FIELD_WIDTH_SHIFT		(13)
+#define VMCS_FIELD_RESERVED_SHIFT	(15)
+#define VMCS_FIELD_BIT_SIZE		(BITS_PER_LONG)
+
 extern struct regs regs;
 
 extern union vmx_basic basic;
-- 
1.9.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux