On 09/17/2019 11:57 AM, Marc Orr wrote:
__enter_guest() should only set the launched flag when a launch has
succeeded. Thus, don't set the launched flag when the VMX_ENTRY_FAILURE,
bit 31, is set in the VMCS exit reason.
Signed-off-by: Marc Orr <marcorr@xxxxxxxxxx>
---
x86/vmx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/x86/vmx.c b/x86/vmx.c
index 6079420db33a..7313c78f15c2 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -1820,7 +1820,7 @@ static void __enter_guest(u8 abort_flag, struct vmentry_failure *failure)
abort();
}
- if (!failure->early) {
+ if (!failure->early && !(vmcs_read(EXI_REASON) & VMX_ENTRY_FAILURE)) {
launched = 1;
check_for_guest_termination();
}
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@xxxxxxxxxx>