spapr_pci: Advertise MSI quota
PATCH 1/1 spapr_pci: Advertise MSI quota
From: Badari Pulavarty <[email protected]>
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.
--- hw/ppc/spapr_pci.c | 2 ++ 1 file changed, 2 insertions(+)
hw/ppc/spapr_pci.c +2 -0
@@ -831,6 +831,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,int bus_off, i, j;char nodename[256 ];uint32_t bus_range[] = {cpu_to_be32 (0 ),cpu_to_be32 (0xff ) }; +uint16_t nmsi =64 ;struct {uint32_t hi;uint64_t child;
@@ -879,6 +880,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,_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_cell (fdt, bus_off,"ibm,pci-config-space-type" ,0x1 )); +_FDT (fdt_setprop (fdt, bus_off,"ibm,pe-total-#msi" , &nmsi,sizeof (nmsi)));/* Build the interrupt-map, this must matches what is done * in pci_spapr_map_irq
Signature · 1 line
2.0.0
Quoted 21 lines · Alexey Kardashevskiy
From: Badari Pulavarty <[email protected]>
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.
Signed-off-by Badari Pulavarty <[email protected]>Signed-off-by Alexey Kardashevskiy <[email protected]>--- hw/ppc/spapr_pci.c | 2 ++ 1 file changed, 2 insertions(+)hw/ppc/spapr_pci.c +0
-0
hw/ppc/spapr_pci.c int spapr_populate_pci_dt(sPAPRPHBState *phb, · line 834
Quoted 4 lines
hw/ppc/spapr_pci.c +1
-0@@ -831,6 +831,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,int bus_off, i, j;char nodename[256 ];uint32_t bus_range[] = {cpu_to_be32 (0 ),cpu_to_be32 (0xff ) }; +uint16_t nmsi =64 ;
Why 64?
Alex
Quoted 11 lines
hw/ppc/spapr_pci.c +1
-0struct {uint32_t hi;uint64_t child;@@ -879,6 +880,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,_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_cell (fdt, bus_off,"ibm,pci-config-space-type" ,0x1 )); +_FDT (fdt_setprop (fdt, bus_off,"ibm,pe-total-#msi" , &nmsi,sizeof (nmsi)));/* Build the interrupt-map, this must matches what is done * in pci_spapr_map_irq
Quoted 33 lines · Alexander Graf
Quoted 21 lines · Alexey Kardashevskiy
From: Badari Pulavarty <[email protected]>
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.
Signed-off-by Badari Pulavarty <[email protected]>Signed-off-by Alexey Kardashevskiy <[email protected]>--- hw/ppc/spapr_pci.c | 2 ++ 1 file changed, 2 insertions(+)hw/ppc/spapr_pci.c +0
-0hw/ppc/spapr_pci.c int spapr_populate_pci_dt(sPAPRPHBState *phb, · line 834
Quoted 4 lines
hw/ppc/spapr_pci.c +1
-0@@ -831,6 +831,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,int bus_off, i, j;char nodename[256 ];uint32_t bus_range[] = {cpu_to_be32 (0 ),cpu_to_be32 (0xff ) }; +uint16_t nmsi =64 ;Why 64?
Alex
Quoted 11 lines
hw/ppc/spapr_pci.c int spapr_populate_pci_dt(sPAPRPHBState *phb, · line 886
Quoted 11 lines
hw/ppc/spapr_pci.c +1
-0struct {uint32_t hi;uint64_t child;@@ -879,6 +880,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,_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_cell (fdt, bus_off,"ibm,pci-config-space-type" ,0x1 )); +_FDT (fdt_setprop (fdt, bus_off,"ibm,pe-total-#msi" , &nmsi,sizeof (nmsi)));
Also this value will get written with the wrong endianness on an LE host.
Alexey, I'm not happy with you just forwarding random patches from people. It's on you to properly review them before you send them to the list if they go through your hands.
Alex
Quoted 18 lines · Alexander Graf
Quoted 16 lines · Alexey Kardashevskiy
From: Badari Pulavarty <[email protected]>
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.
Signed-off-by Badari Pulavarty <[email protected]>Signed-off-by Alexey Kardashevskiy <[email protected]>--- hw/ppc/spapr_pci.c | 2 ++ 1 file changed, 2 insertions(+)
Quoted 11 lines
hw/ppc/spapr_pci.c int spapr_populate_pci_dt(sPAPRPHBState *phb, · line 834
Quoted 9 lines
hw/ppc/spapr_pci.c +1
-0@@ -831,6 +831,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,int bus_off, i, j;char nodename[256 ];uint32_t bus_range[] = {cpu_to_be32 (0 ),cpu_to_be32 (0xff ) }; +uint16_t nmsi =64 ;Why 64?
Why not? :)
We need some number here instead of default 8, that's pretty much it. 256?
Quoted 17 lines
Alex
Quoted 12 lines
hw/ppc/spapr_pci.c +1
-0struct {uint32_t hi;uint64_t child;@@ -879,6 +880,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,_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_cell (fdt, bus_off,"ibm,pci-config-space-type" ,0x1 )); +_FDT (fdt_setprop (fdt, bus_off,"ibm,pe-total-#msi" , &nmsi,sizeof (nmsi)));/* Build the interrupt-map, this must matches what is done * in
pci_spapr_map_irq
Signature · 1 line
Alexey
Quoted 28 lines · Alexey Kardashevskiy
Quoted 17 lines · Alexander Graf
Quoted 16 lines · Alexey Kardashevskiy
From: Badari Pulavarty <[email protected]>
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.
Signed-off-by Badari Pulavarty <[email protected]>Signed-off-by Alexey Kardashevskiy <[email protected]>--- hw/ppc/spapr_pci.c | 2 ++ 1 file changed, 2 insertions(+)Quoted 10 lines
hw/ppc/spapr_pci.c int spapr_populate_pci_dt(sPAPRPHBState *phb, · line 834
Quoted 9 lines
hw/ppc/spapr_pci.c +1
-0@@ -831,6 +831,7 @@ int spapr_populate_pci_dt(sPAPRPHBState *phb,int bus_off, i, j;char nodename[256 ];uint32_t bus_range[] = {cpu_to_be32 (0 ),cpu_to_be32 (0xff ) }; +uint16_t nmsi =64 ;Why 64?
Quoted 2 lines
Why not? :)
We need some number here instead of default 8, that's pretty much it. 256?
How is 64 any better than 8? How many MSIs can we support? Can't we just put that number in? If it's more than 64k, just put in 64k?
Alex