mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-13 11:33:58 +00:00
vlapic: refine IPI broadcast to support x2APIC mode
According to SDM 10.6.1, if dest fields is 0xffU for register ICR operation, that means the IPI is for broadcast. According to SDM 10.12.9, 0xffffffffU of dest fields for x2APIC means IPI is for broadcast. We add new parameter to vlapic_calc_dest() to show whether the dest is for broadcast. For IPI, we will set it according to dest fields. For ioapic and MSI, we hardcode it to false because no broadcast for ioapic and MSI. Tracked-On: #3003 Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -89,7 +89,7 @@ static void ptirq_build_physical_msi(struct acrn_vm *vm, struct ptirq_msi_info *
|
||||
dest = info->vmsi_addr.bits.dest_field;
|
||||
phys = (info->vmsi_addr.bits.dest_mode == MSI_ADDR_DESTMODE_PHYS);
|
||||
|
||||
vlapic_calc_dest(vm, &vdmask, dest, phys, false);
|
||||
vlapic_calc_dest(vm, &vdmask, false, dest, phys, false);
|
||||
pdmask = vcpumask2pcpumask(vm, vdmask);
|
||||
|
||||
/* get physical delivery mode */
|
||||
@@ -183,7 +183,7 @@ ptirq_build_physical_rte(struct acrn_vm *vm, struct ptirq_remapping_info *entry)
|
||||
/* physical destination cpu mask */
|
||||
phys = (virt_rte.bits.dest_mode == IOAPIC_RTE_DESTMODE_PHY);
|
||||
dest = (uint32_t)virt_rte.bits.dest_field;
|
||||
vlapic_calc_dest(vm, &vdmask, dest, phys, false);
|
||||
vlapic_calc_dest(vm, &vdmask, false, dest, phys, false);
|
||||
pdmask = vcpumask2pcpumask(vm, vdmask);
|
||||
|
||||
/* physical delivery mode */
|
||||
|
||||
Reference in New Issue
Block a user