hv/mod_irq: cleanup x86/irq.h

Move exception stack layout struct and exception/NMI handling
declarations from x86/irq.h into x86/cpu.h.

Tracked-On: #5825
Signed-off-by: Peter Fang <peter.fang@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Liang Yi 2021-03-16 14:16:07 +08:00 committed by wenlingz
parent 3a50f949e1
commit 6098648373
2 changed files with 27 additions and 25 deletions

View File

@ -414,6 +414,31 @@ struct cpu_context {
struct ext_context ext_ctx;
};
/*
* Definition of the stack frame layout
*/
struct intr_excp_ctx {
struct acrn_gp_regs gp_regs;
uint64_t vector;
uint64_t error_code;
uint64_t rip;
uint64_t cs;
uint64_t rflags;
uint64_t rsp;
uint64_t ss;
};
void dispatch_exception(struct intr_excp_ctx *ctx);
/**
* @brief Handle NMI
*
* To handle an NMI
*
* @param ctx Pointer to interrupt exception context
*/
void handle_nmi(__unused struct intr_excp_ctx *ctx);
/* Function prototypes */
void cpu_do_idle(void);
void cpu_dead(void);

View File

@ -94,23 +94,11 @@ struct x86_irq_data {
#endif
};
struct intr_excp_ctx;
struct acrn_vcpu;
struct acrn_vm;
/*
* Definition of the stack frame layout
*/
struct intr_excp_ctx {
struct acrn_gp_regs gp_regs;
uint64_t vector;
uint64_t error_code;
uint64_t rip;
uint64_t cs;
uint64_t rflags;
uint64_t rsp;
uint64_t ss;
};
typedef void (*smp_call_func_t)(void *data);
struct smp_call_info_data {
smp_call_func_t func;
@ -120,8 +108,6 @@ struct smp_call_info_data {
void smp_call_function(uint64_t mask, smp_call_func_t func, void *data);
bool is_notification_nmi(const struct acrn_vm *vm);
void dispatch_exception(struct intr_excp_ctx *ctx);
void setup_notification(void);
void setup_pi_notification(void);
@ -269,15 +255,6 @@ uint32_t irq_to_vector(uint32_t irq);
*/
void dispatch_interrupt(const struct intr_excp_ctx *ctx);
/**
* @brief Handle NMI
*
* To handle an NMI
*
* @param ctx Pointer to interrupt exception context
*/
void handle_nmi(__unused struct intr_excp_ctx *ctx);
/**
* @}
*/