mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-09 20:18:19 +00:00
hv: fix sos kernel hang when migrate irq to different cpu
With kernel 4.19, it's possible that same irq vector assigned to different devices on different cpu. So when we update the tmr, we should update the value for cpu which is irq target. Tracked-On: #2212 Signed-off-by: Alek Du <alek.du@intel.com>
This commit is contained in:
parent
ea1ac8a939
commit
2c70a1e115
@ -195,7 +195,17 @@ vioapic_update_tmr(struct acrn_vcpu *vcpu)
|
||||
spinlock_obtain(&(vioapic->mtx));
|
||||
pincount = vioapic_pincount(vcpu->vm);
|
||||
for (pin = 0U; pin < pincount; pin++) {
|
||||
uint64_t mask;
|
||||
uint32_t dest;
|
||||
bool phys;
|
||||
|
||||
rte = vioapic->rtbl[pin];
|
||||
dest = rte.full >> IOAPIC_RTE_DEST_SHIFT;
|
||||
phys = ((rte.full & IOAPIC_RTE_DESTLOG) == 0UL);
|
||||
|
||||
calcvdest(vcpu->vm, &mask, dest, phys);
|
||||
if ((mask & (1 << vcpu->vcpu_id)) == 0)
|
||||
continue;
|
||||
|
||||
level = ((rte.full & IOAPIC_RTE_TRGRLVL) != 0UL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user