qemu: MSI-X support
Subsystems (2)
Michael S. Tsirkin
maintainerv6 cover qemu: MSI-X support
Here is the port of MSI-X support patches to upstream qemu. Please comment or commit.
This patchset adds generic support for MSI-X, adds implementation in APIC, and uses MSI-X in virtio-net.
Changelog:
- since v5
make sure that load does not modify registers that guest can not change replace global msix disable flag with a per-device flag to control the number of vectors
- since v4
rebased to latest bits
- since v3
call to resize_region on load
split patches a bit differently to address style comments by Glauber update commit message to clarify what msix_support flag does
- since v2
rename mask -> wmask to avoid conflict with work by Yamahata
- since v1
At Paul's suggestion, use stl_phy to decouple APIC and MSI-X implementation
This uses the mask table patch that I posted previously, and which is included in the series. That patch has been slightly updated due to mask -> wmask rename. Isaku Yamahata, maybe you want to update your patch series with that.
Signature · 34 lines
MST Michael S. Tsirkin (12): qemu/pci: make default_write_config use mask table qemu/pci: helper routines for pci access qemu/pci: add routines to manage PCI capabilities qemu/pci: check constant registers on load qemu/pci: MSI-X support functions qemu/apic: minimal MSI/MSI-X implementation for PC qemu/virtio: virtio support for many interrupt vectors qemu/virtio: MSI-X support in virtio PCI qemu/virtio: virtio save/load bindings qemu/pci: add pci_get/set_byte qemu/net: request 3 vectors in virtio-net qemu/net: flag to control the number of vectors a nic has Makefile.target | 2 +- hw/apic.c | 43 ++++++- hw/msix.c | 378 ++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/msix.h | 34 +++++ hw/pci.c | 245 ++++++++++++++++++---------------- hw/pci.h | 106 ++++++++++++++- hw/syborg_virtio.c | 13 ++- hw/virtio-net.c | 4 + hw/virtio-pci.c | 212 +++++++++++++++++++++++------ hw/virtio.c | 70 +++++++--- hw/virtio.h | 14 ++- net.c | 18 +++- net.h | 4 + qemu-options.hx | 14 +- rules.mak | 2 +- 15 files changed, 956 insertions(+), 203 deletions(-) create mode 100644 hw/msix.c create mode 100644 hw/msix.h
Quoted 4 lines · Michael S. Tsirkin
This uses the mask table patch that I posted previously, and which is included in the series. That patch has been slightly updated due to mask -> wmask rename. Isaku Yamahata, maybe you want to update your patch series with that.
Thank you for reminding me.
I've updated the patches in my local repo.
Signature · 1 line
yamahata
Quoted 4 lines · Michael S. Tsirkin
This uses the mask table patch that I posted previously, and which is included in the series. That patch has been slightly updated due to mask -> wmask rename. Isaku Yamahata, maybe you want to update your patch series with that.
Thank you for reminding me.
I've updated the patches in my local repo.
Signature · 1 line
yamahata