]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ppc/pnv: Remove LSI on the PCIE host bridge
authorFrederic Barrat <fbarrat@linux.ibm.com>
Fri, 8 Apr 2022 13:13:03 +0000 (15:13 +0200)
committerDaniel Henrique Barboza <danielhb413@gmail.com>
Wed, 20 Apr 2022 21:00:30 +0000 (18:00 -0300)
The phb3/phb4/phb5 root ports inherit from the default PCIE root port
implementation, which requests a LSI interrupt (#INTA). On real
hardware (POWER8/POWER9/POWER10), there is no such LSI. This patch
corrects it so that it matches the hardware.

As a consequence, the device tree previously generated was bogus, as
the root bridge LSI was not properly mapped. On some
implementation (powernv9), it was leading to inconsistent interrupt
controller (xive) data. With this patch, it is now clean.

Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220408131303.147840-3-fbarrat@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
hw/pci-host/pnv_phb3.c
hw/pci-host/pnv_phb4.c

index 4e68ad4f03fcd7ca11b8f2bf5e590949410b46ea..3f03467dde0a48ddf62572aaa53adf8cd9f578a3 100644 (file)
@@ -1161,6 +1161,7 @@ static void pnv_phb3_root_port_realize(DeviceState *dev, Error **errp)
         error_propagate(errp, local_err);
         return;
     }
+    pci_config_set_interrupt_pin(pci->config, 0);
 }
 
 static void pnv_phb3_root_port_class_init(ObjectClass *klass, void *data)
index 3c4c2dace0a33fbd20a1fd86abdf0bfe30786e85..13ba9e45d8b6f91a6171f7e8a1e25fb2d77b4f1a 100644 (file)
@@ -1771,6 +1771,7 @@ static void pnv_phb4_root_port_reset(DeviceState *dev)
     pci_set_word(conf + PCI_PREF_MEMORY_LIMIT, 0xfff1);
     pci_set_long(conf + PCI_PREF_BASE_UPPER32, 0x1); /* Hack */
     pci_set_long(conf + PCI_PREF_LIMIT_UPPER32, 0xffffffff);
+    pci_config_set_interrupt_pin(conf, 0);
 }
 
 static void pnv_phb4_root_port_realize(DeviceState *dev, Error **errp)