]> xenbits.xensource.com Git - people/julieng/xen-unstable.git/commitdiff
x86: replace unqualified ud2 instructions with BUG frames
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 3 Nov 2015 17:14:27 +0000 (18:14 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 3 Nov 2015 17:14:27 +0000 (18:14 +0100)
No functional change, other than the failure cases, which now produce a
far more clear error message.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/boot/x86_64.S
xen/arch/x86/hvm/vmx/entry.S
xen/arch/x86/x86_64/entry.S
xen/include/asm-x86/asm_defns.h

index c8bf9d02c797f84d2b0ee0a5b2af0e21725e6af5..94cf08956c4dbd1f50d1fbeb01bbb020906c6593 100644 (file)
@@ -34,7 +34,7 @@ ENTRY(__high_start)
         /* Pass off the Multiboot info structure to C land. */
         mov     multiboot_ptr(%rip),%edi
         call    __start_xen
-        ud2     /* Force a panic (invalid opcode). */
+        BUG     /* __start_xen() shouldn't return. */
 
 /*** DESCRIPTOR TABLES ***/
 
index a5438a47f363e13d33c76c8eea9a9061a38a7e14..5a1757ed637e35b20f55419a02bfd95b7ff533a9 100644 (file)
@@ -110,7 +110,7 @@ UNLIKELY_END(realmode)
         sti
         SAVE_ALL
         call vmx_vmentry_failure
-        ud2
+        BUG  /* vmx_vmentry_failure() shouldn't return. */
 
 ENTRY(vmx_asm_do_vmentry)
         GET_CURRENT(%rbx)
index 28c32143f7980d0649e19bb7245eb811f3b2824c..d4dd8e811400e53ae557a02adaab5e66b90da93b 100644 (file)
@@ -547,7 +547,7 @@ exception_with_ints_disabled:
 FATAL_exception_with_ints_disabled:
         movq  %rsp,%rdi
         call  fatal_trap
-        ud2
+        BUG   /* fatal_trap() shouldn't return. */
 
 ENTRY(divide_error)
         pushq $0
@@ -620,7 +620,7 @@ ENTRY(double_fault)
         SAVE_ALL STAC
         movq  %rsp,%rdi
         call  do_double_fault
-        ud2
+        BUG   /* do_double_fault() shouldn't return. */
 
         .pushsection .init.text, "ax", @progbits
 ENTRY(early_page_fault)
index d750f03bcbc76d0fe404de83f182d7ae9916ce97..95ea21debebec39a7c0a0cdf4e3ddd08baef8686 100644 (file)
@@ -324,7 +324,7 @@ static always_inline void stac(void)
         jne   789f
         cmpq  UREGS_r12(%rsp),%r12
         je    987f
-789:    ud2
+789:    BUG   /* Corruption of partial register state. */
         .subsection 0
 #endif
 .endif