]> Git Repo - qemu.git/commitdiff
ppc/pnv: Use the chip class to check the index of PHB3 devices
authorCédric Le Goater <[email protected]>
Fri, 17 Dec 2021 16:57:19 +0000 (17:57 +0100)
committerCédric Le Goater <[email protected]>
Fri, 17 Dec 2021 16:57:19 +0000 (17:57 +0100)
The maximum number of PHB3 devices per chip can be different depending
on the POWER8 processor model.

Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Daniel Henrique Barboza <[email protected]>
Message-Id: <20211213132830[email protected]>
Signed-off-by: Cédric Le Goater <[email protected]>
hw/pci-host/pnv_phb3.c

index 3aa42ef9d4b9ddd6f260dc7176dda714bc28b422..9c4451ca0d1cb71f9f8d45f227d1dcbbe789bf9c 100644 (file)
@@ -993,7 +993,7 @@ static void pnv_phb3_realize(DeviceState *dev, Error **errp)
     PnvMachineState *pnv = PNV_MACHINE(qdev_get_machine());
     int i;
 
-    if (phb->phb_id >= PNV8_CHIP_PHB3_MAX) {
+    if (phb->phb_id >= PNV_CHIP_GET_CLASS(phb->chip)->num_phbs) {
         error_setg(errp, "invalid PHB index: %d", phb->phb_id);
         return;
     }
This page took 0.029976 seconds and 4 git commands to generate.