diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2013-05-13 11:06:17 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-06-03 22:40:44 +0200 |
commit | 5fec945105448b958b8418b7e5d043d630ec3155 (patch) | |
tree | 36c15f32c2622622ab10f0a2c512592b4ea7ef0f /drivers/pci | |
parent | PCI: Allocate only as many MSI vectors as requested by driver (diff) | |
download | linux-5fec945105448b958b8418b7e5d043d630ec3155.tar.xz linux-5fec945105448b958b8418b7e5d043d630ec3155.zip |
x86/MSI: Conserve interrupt resources when using multiple-MSIs
Current multiple-MSI implementation does not take into account actual
number of requested MSIs and always rounds that number to a larger
power-of-two value. Yet, the number of MSIs a PCI device could send (and
therefore the number of messages a device driver could request) may be
smaller. As result, resources allocated for extra MSIs are just wasted.
This update takes advantage of 'msi_desc::nvec_used' field introduced with
generic MSI code to track the number of requested and used MSIs. As
result, resources associated with interrupts are conserved. Of those
resources most noticeable are x86 interrupt vectors.
The initial version of this fix also conserved IRTEs, but Jan noticed that
a malfunctioning PCI device might send a message number it did not claim
and thus refer to an IRTE it does not own. To avoid this security hole,
as many IRTEs are reserved as the device could possibly send.
[bhelgaas: changelog, rename to "nvec_used"]
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
0 files changed, 0 insertions, 0 deletions