[kvm-unit-tests PATCH 12/32] x86: test VMPTRLD does not drop VMWRITEs

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

 



Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
---
 x86/vmx.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/x86/vmx.c b/x86/vmx.c
index fd1aa3bc6c2e..9ca37f63b636 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -257,7 +257,7 @@ static bool check_vmcs_field(struct vmcs_field *f, u8 cookie)
 	if (expected == actual)
 		return true;
 
-	printf("FAIL: VMWRITE/VMREAD %lx (expected: %lx, actual: %lx)",
+	printf("FAIL: VMWRITE/VMREAD %lx (expected: %lx, actual: %lx)\n",
 	       f->encoding, (unsigned long) expected, (unsigned long) actual);
 
 	return false;
@@ -349,6 +349,11 @@ void test_vmcs_lifecycle(void)
 	VMCLEAR(0);
 	report("current:VMCS1 active:[VCMS1]", check_all_vmcs_fields(1));
 
+	/* VMPTRLD should not erase VMWRITEs to the current VMCS */
+	set_all_vmcs_fields(2);
+	VMPTRLD(1);
+	report("current:VMCS1 active:[VCMS1]", check_all_vmcs_fields(2));
+
 	for (i = 0; i < ARRAY_SIZE(vmcs); i++) {
 		VMCLEAR(i);
 		free_page(vmcs[i]);
-- 
2.12.2.816.g2cccc81164-goog




[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