kvm tools: MSI-X fixes
commit38dd384fd3aa4aa8975b69cf21ed7f107cbdfb08
authorSasha Levin <levinsasha928@gmail.com>
Tue, 23 Aug 2011 19:28:53 +0000 (23 22:28 +0300)
committerPekka Enberg <penberg@kernel.org>
Wed, 24 Aug 2011 15:09:48 +0000 (24 18:09 +0300)
tree18ece6c7bc77aa1d93fea27da52a54ebc90e5ce1
parentc3d81a05b6b8b5c43025bfdee9d36a6ddf6ad703
kvm tools: MSI-X fixes

Several fixes in this patch:

* Don't ignore function level and per-vector masking. We're not
supposed to signal when masked and not doing so will improve
performance a bit (in addition to behaving correctly).

* Implement the missing PBA array. 'lspci -vv' will now show the correct
output:
Capabilities: [40] MSI-X: Enable+ Count=5 Masked-
Vector table: BAR=1 offset=00000000
PBA: BAR=3 offset=00000000

* Checking whether MSI-X is enabled or not is done by probing the
corresponding bit within the PCI header instead of trying to track
the status ourselves.

* Fallback to INTx if MSI-X isn't enabled.

* Use correct max size for MSI-X table.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/include/kvm/pci.h
tools/kvm/include/kvm/virtio-pci.h
tools/kvm/virtio/pci.c