]> xenbits.xensource.com Git - qemu-upstream-unstable.git/commit
spapr_pci: Fix number of returned vectors in ibm, change-msi
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 7 Apr 2014 12:53:21 +0000 (22:53 +1000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 21 Jul 2014 03:20:07 +0000 (22:20 -0500)
commit32c113c182baf66fa01a4f863fac3689ac838b6c
tree6963dbf9200d5700bcedddf9be41068608a5a3da
parent912d9cc089fbc8044d97106e9abfec603d83ef52
spapr_pci: Fix number of returned vectors in ibm, change-msi

Current guest kernels try allocating as many vectors as the quota is.
For example, in the case of virtio-net (which has just 3 vectors)
the guest requests 4 vectors (that is the quota in the test) and
the existing ibm,change-msi handler returns 4. But before it returns,
it calls msix_set_message() in a loop and corrupts memory behind
the end of msix_table.

This limits the number of vectors returned by ibm,change-msi to
the maximum supported by the actual device.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: qemu-stable@nongnu.org
[agraf: squash in bugfix from aik]
Signed-off-by: Alexander Graf <agraf@suse.de>
(cherry picked from commit b26696b519f853c9844e5154858e583600ee3cdc)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/spapr_pci.c