mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86/traps: export the exception_table[] function pointer table to C
and use it in preference to the direct call to do_nmi() in vmx.c
The value 'TRAP_last_reserved' was only used where 'TRAP_nr' would be more
appropriate, so is replaced.
No functional change
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: d3eb16b8a7
master date: 2015-02-11 17:16:18 +0100
This commit is contained in:
1 parent
e71c4e54d9
commit
5b2d4e87af
3 files changed
+6
-2
No files matched your search
@@ -2507,7 +2507,7 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
|
||||
&& ((intr_info & INTR_INFO_INTR_TYPE_MASK) ==
|
||||
(X86_EVENTTYPE_NMI << 8)) )
|
||||
{
|
||||
do_nmi(regs);
|
||||
exception_table[TRAP_nmi](regs);
|
||||
enable_nmis();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -721,6 +721,7 @@ ENTRY(exception_table)
|
||||
.quad do_alignment_check
|
||||
.quad do_machine_check
|
||||
.quad do_simd_coprocessor_error
|
||||
.size exception_table, . - exception_table
|
||||
|
||||
ENTRY(hypercall_table)
|
||||
.quad do_set_trap_table /* 0 */
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
#define TRAP_alignment_check 17
|
||||
#define TRAP_machine_check 18
|
||||
#define TRAP_simd_error 19
|
||||
#define TRAP_last_reserved 31
|
||||
#define TRAP_nr 32
|
||||
|
||||
/* Set for entry via SYSCALL. Informs return code to use SYSRETQ not IRETQ. */
|
||||
/* NB. Same as VGCF_in_syscall. No bits in common with any other TRAP_ defn. */
|
||||
@@ -522,6 +522,9 @@ extern void mtrr_bp_init(void);
|
||||
|
||||
void mcheck_init(struct cpuinfo_x86 *c, bool_t bsp);
|
||||
|
||||
/* Dispatch table for exceptions */
|
||||
extern void (* const exception_table[TRAP_nr])(struct cpu_user_regs *regs);
|
||||
|
||||
#define DECLARE_TRAP_HANDLER(_name) \
|
||||
void _name(void); \
|
||||
void do_ ## _name(struct cpu_user_regs *regs)
|
||||
|
||||