Skip to contentSkip to conversation

x86/vmx: Avoid using domain_crash_syncrhonous() in vmx_vmentry_failure()

PATCH In review Andrew Cooper 3 participants 3 messages Aug 1, 2018 – Aug 2, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/vmx: Avoid using domain_crash_syncrhonous() in vmx_vmentry_failure()

There is no need for the syncrhonous varient, as the vmentry failure path can just return to processing softirqs.

This is in aid of trying to remove domain_crash_syncrhonous() from the codebase.

---
CC: Jan Beulich <[email protected]>
CC: Jun Nakajima <[email protected]>
CC: Kevin Tian <[email protected]>

---
 xen/arch/x86/hvm/vmx/entry.S | 2 +-
 xen/arch/x86/hvm/vmx/vmcs.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/hvm/vmx/entry.S +1 -1
index a7d1356..d18c149 100644
@@ -128,7 +128,7 @@ UNLIKELY_END(realmode)
         /* WARNING! `ret`, `call *`, `jmp *` not safe before this point. */
 
         call vmx_vmentry_failure
-        BUG  /* vmx_vmentry_failure() shouldn't return. */
+        jmp  .Lvmx_process_softirqs
 
 ENTRY(vmx_asm_do_vmentry)
         GET_CURRENT(bx)
xen/arch/x86/hvm/vmx/vmcs.c +1 -1
index 096a26a..262c252 100644
@@ -1784,7 +1784,7 @@ void vmx_vmentry_failure(void)
          error == VMX_INSN_INVALID_HOST_STATE )
         vmcs_dump_vcpu(curr);
 
-    domain_crash_synchronous();
+    domain_crash(curr->domain);
 }
 
 void vmx_do_resume(struct vcpu *v)
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 01.08.18 at 14:55, <[email protected]> wrote:

There is no need for the syncrhonous varient, as the vmentry failure path can just return to processing softirqs.

This is in aid of trying to remove domain_crash_syncrhonous() from the codebase.

With the name of the function fixed in title and description

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Acked-by on v1 1/1
#2 lore raw
In reply to Andrew Cooper
Quoted 11 lines

From: Andrew Cooper [mailto:[email protected]]
Sent: Wednesday, August 1, 2018 8:55 PM

There is no need for the syncrhonous varient, as the vmentry failure path can
just return to processing softirqs.

This is in aid of trying to remove domain_crash_syncrhonous() from the codebase.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel