mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
hv:move 'fire_vhm_interrupt' to io_emul.c
-- this api is related with arch_x86, then move to x86 folder -- rename 'set_vhm_vector' to 'set_vhm_notification_vector' -- rename 'acrn_vhm_vector' to 'acrn_vhm_notification_vector' -- add an API 'get_vhm_notification_vector' Tracked-On: #1842 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -22,6 +22,21 @@
|
||||
#define MMIO_DEFAULT_VALUE_SIZE_4 (0xFFFFFFFFUL)
|
||||
#define MMIO_DEFAULT_VALUE_SIZE_8 (0xFFFFFFFFFFFFFFFFUL)
|
||||
|
||||
void arch_fire_vhm_interrupt(void)
|
||||
{
|
||||
/*
|
||||
* use vLAPIC to inject vector to SOS vcpu 0 if vlapic is enabled
|
||||
* otherwise, send IPI hardcoded to BOOT_CPU_ID
|
||||
*/
|
||||
struct acrn_vm *sos_vm;
|
||||
struct acrn_vcpu *vcpu;
|
||||
|
||||
sos_vm = get_sos_vm();
|
||||
vcpu = vcpu_from_vid(sos_vm, BOOT_CPU_ID);
|
||||
|
||||
vlapic_set_intr(vcpu, get_vhm_notification_vector(), LAPIC_TRIG_EDGE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief General complete-work for port I/O emulation
|
||||
*
|
||||
|
Reference in New Issue
Block a user