@@ -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;
}
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@siemens.com> --- x86/vmx_tests.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-)