x86: don't setup legacy syscall vector when !CONFIG_PV
authorWei Liu <wei.liu2@citrix.com>
Fri, 19 Oct 2018 14:28:36 +0000 (15:28 +0100)
committerWei Liu <wei.liu2@citrix.com>
Mon, 22 Oct 2018 11:31:09 +0000 (12:31 +0100)
The code snippet is to switch between SYS_DECS_trap_gate and
SYS_DESC_irq_gate depending on whether XPTI is used. When PV is
disabled there is no need to switch.

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

index 35abfc4ea4c2288f67034127d65cf6ab76a5b2a6..43deb82e531680026cd416a15f53c14c0969f335 100644 (file)
@@ -1094,12 +1094,14 @@ void __init smp_prepare_cpus(void)
     {
         get_cpu_info()->pv_cr3 = 0;
 
+#ifdef CONFIG_PV
         /*
          * All entry points which may need to switch page tables have to start
          * with interrupts off. Re-write what pv_trap_init() has put there.
          */
         _set_gate(idt_table + LEGACY_SYSCALL_VECTOR, SYS_DESC_irq_gate, 3,
                   &int80_direct_trap);
+#endif
     }
 
     set_nr_sockets();