Skip to content

Commit a8e688e

Browse files
yakuizhaolijinxia
authored andcommitted
HV: Use the variable to fire VHM interrupt
This is to do the preparation of switch the notifier vector from PLATFORM_IPI to HYPERVISOR_CALLBACK_VECTOR. Currently the acrn-hypervisor is using the PLATFORM_IPI vector to notify the sos_kernel. And then sos_kernel will handle the notification from acrn hypervisor in PLATFORM_IPI ISR. But as the PLATFORM_IPI ISR can be registered by the other modules, it will have the conflict when trying to register acrn intr ISR. So the HYPERVISOR_CALLBACK_VECTOR will be used instead. Tracked-On: #1325 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 89ca54c commit a8e688e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

hypervisor/common/io_request.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
#define ACRN_DBG_IOREQUEST 6U
99

10+
uint32_t acrn_vhm_vector = VECTOR_VIRT_IRQ_VHM;
11+
1012
static void fire_vhm_interrupt(void)
1113
{
1214
/*
@@ -22,7 +24,7 @@ static void fire_vhm_interrupt(void)
2224
vcpu = vcpu_from_vid(vm0, 0U);
2325
ASSERT(vcpu != NULL, "vcpu_from_vid failed");
2426

25-
vlapic_intr_edge(vcpu, VECTOR_VIRT_IRQ_VHM);
27+
vlapic_intr_edge(vcpu, acrn_vhm_vector);
2628
}
2729

2830
static void acrn_print_request(uint16_t vcpu_id, struct vhm_request *req)

hypervisor/include/arch/x86/irq.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,6 @@ void cancel_event_injection(struct vcpu *vcpu);
121121
void get_cpu_interrupt_info(char *str_arg, int str_max);
122122
#endif /* HV_DEBUG */
123123

124+
extern uint32_t acrn_vhm_vector;
125+
124126
#endif /* ARCH_IRQ_H */

0 commit comments

Comments
 (0)