RE: [PATCH v8 04/33] x86/traps: add install_system_interrupt_handler()
From: Li, Xin3
Date: Tue Jun 06 2023 - 01:46:43 EST
> #ifdef CONFIG_X86_64
> static inline void sysvec_setup_fred(unsigned int vector, void (*func)(struct
> pt_regs*)) {
> ...
> }
> #else
> static inline void sysvec_setup_fred(unsigned int vector, void (*func)(struct
> pt_regs*)) { } #endif
>
> #define sysvec_install(vector, func) { \
> sysvec_setup_fred(vector, func); \
> alloc_intr_gate(vector, asm_##func); \
> }
>
> - alloc_intr_gate(HYPERVISOR_CALLBACK_VECTOR,
> asm_sysvec_xen_hvm_callback);
> + sysvec_install(HYPERVISOR_CALLBACK_VECTOR,
> sysvec_xen_hvm_callback);
This is a better way, and I will do so in the next iteration.
Thanks!
Xin