]> xenbits.xensource.com Git - xen.git/commitdiff
x86/traps: Fix typo in do_entry_CP()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 28 Sep 2021 20:55:56 +0000 (21:55 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 3 Nov 2021 19:13:17 +0000 (19:13 +0000)
The call to debugger_trap_entry() should pass the correct vector.  The
break-for-gdbsx logic is in practice unreachable because PV guests can't
generate #CP, but it will interfere with anyone inserting custom debugging
into debugger_trap_entry().

Fixes: 5ad05b9c2490 ("x86/traps: Implement #CP handler and extend #PF for shadow stacks")
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
xen/arch/x86/traps.c

index 79fd276a414e088930f8dbac51b1a390853a54bf..d483aa91f2f17aab0ca16f6bbb225480109f1543 100644 (file)
@@ -2134,7 +2134,7 @@ void do_entry_CP(struct cpu_user_regs *regs)
     const char *err = "??";
     unsigned int ec = regs->error_code;
 
-    if ( debugger_trap_entry(TRAP_debug, regs) )
+    if ( debugger_trap_entry(X86_EXC_CP, regs) )
         return;
 
     /* Decode ec if possible */