x86: stub out PV only code in do_debug
authorWei Liu <wei.liu2@citrix.com>
Fri, 19 Oct 2018 14:28:38 +0000 (15:28 +0100)
committerWei Liu <wei.liu2@citrix.com>
Sat, 20 Oct 2018 11:31:48 +0000 (12:31 +0100)
When PV is disabled those symbols won't be available. It is impossible
for Xen to hit #DB there.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/traps.c

index 3988753682dfd13700c47c558e6d46ca7421a997..f834ae2b31312923d7f1f73b25a524c06838ae6c 100644 (file)
@@ -1822,6 +1822,7 @@ void do_debug(struct cpu_user_regs *regs)
 
         if ( regs->eflags & X86_EFLAGS_TF )
         {
+#ifdef CONFIG_PV
             /* In SYSENTER entry path we can't zap TF until EFLAGS is saved. */
             if ( (regs->rip >= (unsigned long)sysenter_entry) &&
                  (regs->rip <= (unsigned long)sysenter_eflags_saved) )
@@ -1830,6 +1831,7 @@ void do_debug(struct cpu_user_regs *regs)
                     regs->eflags &= ~X86_EFLAGS_TF;
                 return;
             }
+#endif
             if ( !debugger_trap_fatal(TRAP_debug, regs) )
             {
                 WARN();