mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-05 19:47:48 +00:00
According to SDM Vol3 11.12.10, in x2APIC mode, Logical Destination has two parts: - Cluster ID (LDR[31:16]) - Logical ID (LDR[15:0]) Cluster ID is a numerical address, while Logical ID is a 16bit mask. We can only use Logical ID to address multi destinations within a Cluster. So we can't just 'or' all the Logical Destination in LDR registers to get one mask for all target pCPUs. This would get a wrong destination mask if the target Destinations are from different Clusters. For example in ADL/RPL x2APIC LDRs for core 2-5 are 0x10001 0x10100 0x20001 0x20100. If we 'or' them together, we would get a Logical Destination of 0x30101, which points to core 6 and another core. If core 6 is running a RTVM, then the irq is unable to get to core 2-5, causing the guest on core 2-5 driver fail. Guests working in xAPIC mode may use 'Flat Model' to select an arbitrary list of CPUs as its irq destination. HV may not be able to include them all when transfering to physical destinations, because the HW is working in x2APIC mode and can only use 'Cluster Model'. There would be no perfect fix for this issue. This patch is a simple fix, by just keep the first Cluster of all target Logical Destinations. Tracked-On: #8435 Signed-off-by: Wu Zhou <wu.zhou@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com> |
||
---|---|---|
.. | ||
arch/x86/asm | ||
common | ||
debug | ||
dm | ||
hw | ||
lib | ||
public |