提交 9dbae977 编写于 作者: B Badari Pulavarty 提交者: Alexander Graf

spapr_pci: Advertise MSI quota

Hotplug of multiple disks fails due to MSI vector quota check.
Number of MSI vectors default to 8 allowing only 4 devices.
This happens on RHEL6.5 guest. RHEL7 and SLES11 guests fallback
to INTX.

One way to workaround the issue is to increase total MSIs,
so that MSI quota check allows us to hotplug multiple disks.

This sets the quota to the maximum number of interupts XICS has
which is 1024 now (XICS_IRQS). This moves XICS_IRQS from spapr.c
to xics.h for wider visibility.
Signed-off-by: NBadari Pulavarty <pbadari@us.ibm.com>
[aik: put XICS_IRQS=1024 instead of 64i, fixed endianness and size]
Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: NAlexander Graf <agraf@suse.de>
上级 d13fc32e
...@@ -80,7 +80,6 @@ ...@@ -80,7 +80,6 @@
#define TIMEBASE_FREQ 512000000ULL #define TIMEBASE_FREQ 512000000ULL
#define MAX_CPUS 256 #define MAX_CPUS 256
#define XICS_IRQS 1024
#define PHANDLE_XICP 0x00001111 #define PHANDLE_XICP 0x00001111
......
...@@ -876,6 +876,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb, ...@@ -876,6 +876,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,
_FDT(fdt_setprop(fdt, bus_off, "ranges", &ranges, sizeof(ranges))); _FDT(fdt_setprop(fdt, bus_off, "ranges", &ranges, sizeof(ranges)));
_FDT(fdt_setprop(fdt, bus_off, "reg", &bus_reg, sizeof(bus_reg))); _FDT(fdt_setprop(fdt, bus_off, "reg", &bus_reg, sizeof(bus_reg)));
_FDT(fdt_setprop_cell(fdt, bus_off, "ibm,pci-config-space-type", 0x1)); _FDT(fdt_setprop_cell(fdt, bus_off, "ibm,pci-config-space-type", 0x1));
_FDT(fdt_setprop_cell(fdt, bus_off, "ibm,pe-total-#msi", XICS_IRQS));
/* Build the interrupt-map, this must matches what is done /* Build the interrupt-map, this must matches what is done
* in pci_spapr_map_irq * in pci_spapr_map_irq
......
...@@ -152,6 +152,8 @@ struct ICSIRQState { ...@@ -152,6 +152,8 @@ struct ICSIRQState {
uint8_t status; uint8_t status;
}; };
#define XICS_IRQS 1024
qemu_irq xics_get_qirq(XICSState *icp, int irq); qemu_irq xics_get_qirq(XICSState *icp, int irq);
void xics_set_irq_type(XICSState *icp, int irq, bool lsi); void xics_set_irq_type(XICSState *icp, int irq, bool lsi);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册