Repository navigation
Commit 93081fd
committed
virtio: Support live PCI queue MSI-X mapping
Virtio 1.2 sections 4.1.5.1.2.1 and 4.1.5.3.1 require event mapping,
unmapping and suppression of queue interrupts for NO_VECTOR.
Allow queue MSI-X mapping and unmapping after DRIVER_OK while preserving
queue configuration restrictions. Validate vectors against the MSI-X
table and report rejected mappings through NO_VECTOR.
Keep a stable event for each queue so vhost backends retain direct irqfd
delivery across mapping changes. Update routes when MSI-X table entries
or masks change. Preserve pending interrupts on the old vector and drop
events received while the queue is unmapped.
Save pending interrupts and rebuild routes from restored MSI-X state.
Reconstruct queue mappings on activation and restore, and unmap them on
reset. Preserve INTx and MMIO interrupt behavior.
Add regression tests for live routing, stable events, interrupt
suppression, shared vectors, queue size protection and lifecycle
transitions. Verify that irqfd delivery does not require EventProxy.
Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>1 parent a22173a commit 93081fd
5 files changed
Lines changed: 693 additions & 52 deletions
File tree
- vm/devices
- pci/pci_core
- src/capabilities
- virtio/virtio/src
- transport
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6559 | 6559 | | |
6560 | 6560 | | |
6561 | 6561 | | |
| 6562 | + | |
6562 | 6563 | | |
6563 | 6564 | | |
6564 | 6565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
0 commit comments