[PATCH 12/15] VMX: Simplify basic handlers

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

 



Be less verbose and remove any unused code from the basic handlers.
Properly fail if a vmexit occurs during the early tests.

Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
---
 x86/vmx_tests.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index fe7bbdf..36c56b4 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -44,27 +44,11 @@ static inline u32 get_stage()
 
 void basic_guest_main()
 {
-	/* Here is a basic guest_main, print Hello World */
-	printf("\tHello World, this is null_guest_main!\n");
 }
 
 int basic_exit_handler()
 {
-	u64 guest_rip;
-	ulong reason;
-
-	guest_rip = vmcs_read(GUEST_RIP);
-	reason = vmcs_read(EXI_REASON) & 0xff;
-
-	switch (reason) {
-	case VMX_VMCALL:
-		print_vmexit_info();
-		vmcs_write(GUEST_RIP, guest_rip + 3);
-		return VMX_TEST_RESUME;
-	default:
-		break;
-	}
-	printf("ERROR : Unhandled vmx exit.\n");
+	report("Basic VMX test", 0);
 	print_vmexit_info();
 	return VMX_TEST_EXIT;
 }
-- 
1.8.1.1.298.ge7eed54

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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