This follows the Linux example of naming the entry point by how it is arrived
at, rather than its purpose.
Doing so highlights that the SAVE_VOLATILE instantiation sets up the wrong
entry_vector on the stack (although this is currently benign as we never
sysret back to a 32bit PV, and the iret path doesn't care).
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
/* The 32-on-64 hypercall vector is only accessible from ring 1. */
_set_gate(idt_table + HYPERCALL_VECTOR,
- SYS_DESC_trap_gate, 1, &compat_hypercall);
+ SYS_DESC_trap_gate, 1, entry_int82);
/* Fast trap for int80 (faster than taking the #GP-fixup path). */
_set_gate(idt_table + 0x80, SYS_DESC_trap_gate, 3, &int80_direct_trap);
#include <public/xen.h>
#include <irq_vectors.h>
-ENTRY(compat_hypercall)
+ENTRY(entry_int82)
ASM_CLAC
pushq $0
- SAVE_VOLATILE type=TRAP_syscall compat=1
+ SAVE_VOLATILE type=HYPERCALL_VECTOR compat=1
CR4_PV32_RESTORE
cmpb $0,untrusted_msi(%rip)
DECLARE_TRAP_HANDLER_CONST(machine_check);
DECLARE_TRAP_HANDLER(alignment_check);
+DECLARE_TRAP_HANDLER(entry_int82);
+
#undef DECLARE_TRAP_HANDLER_CONST
#undef DECLARE_TRAP_HANDLER
void sysenter_entry(void);
void sysenter_eflags_saved(void);
-void compat_hypercall(void);
void int80_direct_trap(void);
#define STUBS_PER_PAGE (PAGE_SIZE / STUB_BUF_SIZE)