[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH-for-10.0 v2 05/13] hw/pci: Propagate bar_at_addr_0_refused to pci
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH-for-10.0 v2 05/13] hw/pci: Propagate bar_at_addr_0_refused to pci_root_bus_internal_init() |
Date: |
Tue, 26 Nov 2024 12:22:04 +0100 |
Have pci_root_bus_internal_init() callers set the
'bar_at_addr_0_refused' argument. No logical change.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/pci/pci.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 27b66583e54..8eacb8f82fc 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -529,7 +529,8 @@ static bool machine_refuses_bar_at_addr_0(void)
static void pci_root_bus_internal_init(PCIBus *bus, DeviceState *parent,
MemoryRegion *mem, MemoryRegion *io,
- uint8_t devfn_min)
+ uint8_t devfn_min,
+ bool bar_at_addr_0_refused)
{
assert(PCI_FUNC(devfn_min) == 0);
bus->devfn_min = devfn_min;
@@ -537,7 +538,7 @@ static void pci_root_bus_internal_init(PCIBus *bus,
DeviceState *parent,
bus->address_space_mem = mem;
bus->address_space_io = io;
bus->flags |= PCI_BUS_IS_ROOT;
- if (machine_refuses_bar_at_addr_0()) {
+ if (bar_at_addr_0_refused && machine_refuses_bar_at_addr_0()) {
bus->flags |= PCI_BUS_BAR_AT_ADDR0_REFUSED;
}
@@ -563,7 +564,8 @@ void pci_root_bus_init(PCIBus *bus, size_t bus_size,
DeviceState *parent,
uint8_t devfn_min, const char *typename)
{
qbus_init(bus, bus_size, typename, parent, name);
- pci_root_bus_internal_init(bus, parent, mem, io, devfn_min);
+ pci_root_bus_internal_init(bus, parent, mem, io, devfn_min,
+ true);
}
PCIBus *pci_root_bus_new(DeviceState *parent, const char *name,
@@ -573,7 +575,8 @@ PCIBus *pci_root_bus_new(DeviceState *parent, const char
*name,
PCIBus *bus;
bus = PCI_BUS(qbus_new(typename, parent, name));
- pci_root_bus_internal_init(bus, parent, mem, io, devfn_min);
+ pci_root_bus_internal_init(bus, parent, mem, io, devfn_min,
+ true);
return bus;
}
--
2.45.2
- [PATCH-for-10.0 v2 00/13] hw/boards: Remove legacy MachineClass::pci_allow_0_address flag, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 01/13] hw/pci: Do not declare PCIBus::flags mask as enum, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 02/13] hw/pci-bridge: Initialize bridge with parent bus flags, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 03/13] hw/pci: Factor machine_refuses_bar_at_addr_0() helper out, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 04/13] hw/pci: Introduce PCIBusFlag::PCI_BUS_BAR_AT_ADDR0_REFUSED, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 06/13] hw/pci: Propagate bar_at_addr_0_refused to pci_root_bus_init(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 07/13] hw/pci: Propagate bar_at_addr_0_refused to pci_root_bus_new(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 05/13] hw/pci: Propagate bar_at_addr_0_refused to pci_root_bus_internal_init(),
Philippe Mathieu-Daudé <=
- [PATCH-for-10.0 v2 09/13] hw/ppc/spapr: Create host bridge setting bar_at_addr_0_refused=false, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 08/13] hw/pci: Propagate bar_at_addr_0_refused to pci_register_root_bus(), Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 11/13] hw/arm/virt: Create GPEX host bridge without refuse-bar-at-addr-0, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 10/13] hw/pci-host/gpex: Expose 'refuse-bar-at-addr-0' property, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 13/13] hw/pci/pci: Remove legacy MachineClass::pci_allow_0_address flag, Philippe Mathieu-Daudé, 2024/11/26
- [PATCH-for-10.0 v2 12/13] hw/riscv/virt: Create GPEX host bridge without refuse-bar-at-addr-0, Philippe Mathieu-Daudé, 2024/11/26