]> xenbits.xensource.com Git - xen.git/commitdiff
x86/vmx: Avoid hitting BUG_ON() after EPTP-related domain_crash()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 1 Aug 2018 11:47:50 +0000 (12:47 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 2 Aug 2018 09:10:43 +0000 (10:10 +0100)
If the EPTP pointer can't be located in the altp2m list, the domain
is (legitimately) crashed.

Under those circumstances, execution will continue and guarentee to hit the
BUG_ON(idx >= MAX_ALTP2M) (unfortunately, just out of context).

Return from vmx_vmexit_handler() after the domain_crash(), which also has the
side effect of reentering the scheduler more promptly.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/arch/x86/hvm/vmx/vmx.c

index bcf95f9a5f710c25a0f55df7b5ef1eea121bb1fa..257efbe3228606c31e6f4a0413b928b1b6963223 100644 (file)
@@ -3666,6 +3666,8 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
             {
                 gdprintk(XENLOG_ERR, "EPTP not found in alternate p2m list\n");
                 domain_crash(v->domain);
+
+                return;
             }
         }