Skip to contentSkip to conversation

vmx_tests: Add Page Modification Logging tests

PATCH New Bandan Das 1 participant 1 message May 5, 2017 KVM

lore
Share & tools
lore

Bandan Das

author
#0 lore raw

PATCH 1/1 vmx_tests: Add Page Modification Logging tests

Verify that a gpa is logged in the pml buffer when it's written to. Also verify that when the PML buffer overflows, a PML FULL event occurs.

---
 x86/vmx.h       |  8 ++++-
 x86/vmx_tests.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 100 insertions(+), 1 deletion(-)
x86/vmx.h +7 -1
index 290e6bd..087eb0c 100644
@@ -108,6 +108,7 @@ enum Encoding {
 	GUEST_SEL_LDTR		= 0x080cul,
 	GUEST_SEL_TR		= 0x080eul,
 	GUEST_INT_STATUS	= 0x0810ul,
+	GUEST_PML_INDEX         = 0x0812ul,
 
 	/* 16-Bit Host State Fields */
 	HOST_SEL_ES		= 0x0c00ul,
@@ -132,6 +133,9 @@ enum Encoding {
 	APIC_ACCS_ADDR		= 0x2014ul,
 	EPTP			= 0x201aul,
 	EPTP_HI			= 0x201bul,
+	PMLADDR                 = 0x200eul,
+	PMLADDR_HI              = 0x200ful,
+
 
 	/* 64-Bit Readonly Data Field */
 	INFO_PHYS_ADDR		= 0x2400ul,
@@ -317,7 +321,8 @@ enum Reason {
 	VMX_PREEMPT		= 52,
 	VMX_INVVPID		= 53,
 	VMX_WBINVD		= 54,
-	VMX_XSETBV		= 55
+	VMX_XSETBV		= 55,
+	VMX_PMLFULL             = 62,
 };
 
 enum Ctrl_exi {
@@ -375,6 +380,7 @@ enum Ctrl1 {
 	CPU_URG			= 1ul << 7,
 	CPU_WBINVD		= 1ul << 6,
 	CPU_RDRAND		= 1ul << 11,
+	CPU_PML                 = 1ul << 17,
 };
 
 enum Intr_type {
x86/vmx_tests.c +93 -0

117 lines not on this page · raw message

Signature · 1 line
2.9.3