]> git.ipfire.org Git - thirdparty/qemu.git/commit
spapr_pci: fix device tree props for MSI/MSI-X
authorMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 15 Sep 2015 21:34:59 +0000 (16:34 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 21 Oct 2015 03:53:50 +0000 (22:53 -0500)
commit6d62d0e3dd47cbdc8a486a7c99cb0c07a1b916d8
treec4f0d026358b3845303efe4f54e23c2abefec486
parent5644f6f9242895db837d2c825cfe083f2a1d71ab
spapr_pci: fix device tree props for MSI/MSI-X

PAPR requires ibm,req#msi and ibm,req#msi-x to be present in the
device node to define the number of msi/msi-x interrupts the device
supports, respectively.

Currently we have ibm,req#msi-x hardcoded to a non-sensical constant
that happens to be 2, and are missing ibm,req#msi entirely. The result
of that is that msi-x capable devices get limited to 2 msi-x
interrupts (which can impact performance), and msi-only devices likely
wouldn't work at all. Additionally, if devices expect a minimum that
exceeds 2, the guest driver may fail to load entirely.

SLOF still owns the generation of these properties at boot-time
(although other device properties have since been offloaded to QEMU),
but for hotplugged devices we rely on the values generated by QEMU
and thus hit the limitations above.

Fix this by generating these properties in QEMU as expected by guests.

In the future it may make sense to modify SLOF to pass through these
values directly as we do with other props since we're duplicating SLOF
code.

Cc: qemu-ppc@nongnu.org
Cc: qemu-stable@nongnu.org
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
(cherry picked from commit a8ad731a001d41582c9cec4015f73ab3bc11a28d)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/spapr_pci.c