mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-20 04:33:55 +00:00
hv: vlapic: add vector check for x2apic SELF IPI
Set when the local APIC detects an illegal vector (one in the range 0 to 15) in the message that it is sending. This occurs as the result of a write to the ICR (in both xAPIC and x2APIC modes) or to SELF IPI register (x2APIC mode only) with an illegal vector. Tracked-On: #1842 Signed-off-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
e5d3a49894
commit
473d31c073
@ -2456,10 +2456,15 @@ static void vlapic_x2apic_self_ipi_handler(struct acrn_vlapic *vlapic)
|
||||
struct acrn_vcpu *target_vcpu;
|
||||
|
||||
lapic = &(vlapic->apic_page);
|
||||
vector = lapic->self_ipi.v & 0xFFU;
|
||||
vector = lapic->self_ipi.v & APIC_VECTOR_MASK;
|
||||
target_vcpu = vlapic->vcpu;
|
||||
if (vector < 16U) {
|
||||
vlapic_set_error(vlapic, APIC_ESR_SEND_ILLEGAL_VECTOR);
|
||||
dev_dbg(ACRN_DBG_LAPIC, "Ignoring invalid IPI %u", vector);
|
||||
} else {
|
||||
vlapic_set_intr(target_vcpu, vector, LAPIC_TRIG_EDGE);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t apic_write_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user