mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-03 04:39:50 +00:00
a guest may use per-cpu vector allocation mechanism which may lead to same vector on different vcpu for different vioapic pins. when we broadcast EOI from vlapic to vioapic, it could trigger ptdev_intx_ack for incorrect vioapic pin which will lead to incorrect vioapic irq deassert. old implementation is recording assert & deassert by acnt, like: - assert -> acnt++ - deassert -> acnt-- which means an incorrect deassert may descrease acnt from 0 to -1, it leads to error. this patch change the recording method for a pin assert/deassert, it just use pin_state bit set/clear to indicate line state: - high -> pin_state bitmap set - low -> pin_state bitmap clear and the irq assert will be triggered based on polarity setting during line state changing. it can avoid the failure of incorrect deassert on old implementation, and for ptdev sharing irq, the dev hardware could re-trigger interrupt after deassert. but for emulated device, there is no mechanism to re-trigger interrupt if there is irq sharing - for DM, we already has constraint to restrict vGSI sharing, so there is no problem of it. Tracked-On: #1269 Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> |
||
---|---|---|
.. | ||
vpci | ||
vioapic.c | ||
vpic.c | ||
vrtc.c |