mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
hv: send IPI instead of irq injection to notify vcpu with lapic pt
For VM with local apic pt for realtime scenatios, we support virtio device with PMD backend. But we still need to inject MSI to notify the front-end, to avoid changing the front-end drivers. Since the lapic is passed through, irq injection to vlapic won't work. This commit fix it by sending IPI with vector need to inject. Tracked-On: #2351 Signed-off-by: Yan, Like <like.yan@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
@@ -249,6 +249,7 @@ int32_t apic_write_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t veoi_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
int32_t tpr_below_threshold_vmexit_handler(__unused struct acrn_vcpu *vcpu);
|
||||
void vlapic_calcdest(struct acrn_vm *vm, uint64_t *dmask, uint32_t dest, bool phys, bool lowprio);
|
||||
void vlapic_calcdest_lapic_pt(struct acrn_vm *vm, uint64_t *dmask, uint32_t dest, bool phys);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
@@ -51,6 +51,26 @@ enum intr_cpu_startup_shorthand {
|
||||
INTR_CPU_STARTUP_UNKNOWN,
|
||||
};
|
||||
|
||||
/* x2APIC Interrupt Command Register (ICR) structure */
|
||||
union apic_icr {
|
||||
uint64_t value;
|
||||
struct {
|
||||
uint32_t lo_32;
|
||||
uint32_t hi_32;
|
||||
} value_32;
|
||||
struct {
|
||||
uint32_t vector:8;
|
||||
uint32_t delivery_mode:3;
|
||||
uint32_t destination_mode:1;
|
||||
uint32_t rsvd_1:2;
|
||||
uint32_t level:1;
|
||||
uint32_t trigger_mode:1;
|
||||
uint32_t rsvd_2:2;
|
||||
uint32_t shorthand:2;
|
||||
uint32_t rsvd_3:12;
|
||||
uint32_t dest_field:32;
|
||||
} bits;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Save context of lapic
|
||||
|
@@ -27,6 +27,7 @@
|
||||
*/
|
||||
#define LOG_MESSAGE_MAX_SIZE (4U * LOG_ENTRY_SIZE)
|
||||
|
||||
#define ACRN_DBG_LAPICPT 5U
|
||||
#if defined(HV_DEBUG)
|
||||
|
||||
extern uint16_t console_loglevel;
|
||||
|
Reference in New Issue
Block a user