]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/emul: ASSERT that X86EMUL_DONE doesn't escape to callers
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 15 Sep 2023 15:10:58 +0000 (16:10 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Sep 2023 15:00:17 +0000 (16:00 +0100)
This property is far from clear.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/x86_emulate/x86_emulate.c

index e88245eae9fbd0038063498f738b0908593c763f..94caec1d142ccfa7570b54c7e5af6c7117b3dc3e 100644 (file)
@@ -8651,6 +8651,12 @@ int x86_emulate_wrapper(
 
     rc = x86_emulate(ctxt, ops);
 
+    /*
+     * X86EMUL_DONE is an internal signal in the emulator, and is not expected
+     * to ever escape out to callers.
+     */
+    ASSERT(rc != X86EMUL_DONE);
+
     /*
      * Most retire flags should only be set for successful instruction
      * emulation.