[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 28/40] hw/pci-host/i440fx: Inline sysbus_add_io()
|
From: |
Michael S. Tsirkin |
|
Subject: |
[PULL 28/40] hw/pci-host/i440fx: Inline sysbus_add_io() |
|
Date: |
Fri, 19 May 2023 10:52:02 -0400 |
From: Bernhard Beschow <shentey@gmail.com>
sysbus_add_io() just wraps memory_region_add_subregion() while also
obscuring where the memory is attached. So use
memory_region_add_subregion() directly and attach it to the existing
memory region s->bus->address_space_io which is set as an alias to
get_system_io() by the pc machine.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230213162004.2797-2-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/pci-host/i440fx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c
index 262f82c303..9c6882d3fc 100644
--- a/hw/pci-host/i440fx.c
+++ b/hw/pci-host/i440fx.c
@@ -27,6 +27,7 @@
#include "qemu/range.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
+#include "hw/pci/pci_bus.h"
#include "hw/pci/pci_host.h"
#include "hw/pci-host/i440fx.h"
#include "hw/qdev-properties.h"
@@ -217,10 +218,10 @@ static void i440fx_pcihost_realize(DeviceState *dev,
Error **errp)
PCIHostState *s = PCI_HOST_BRIDGE(dev);
SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
- sysbus_add_io(sbd, 0xcf8, &s->conf_mem);
+ memory_region_add_subregion(s->bus->address_space_io, 0xcf8, &s->conf_mem);
sysbus_init_ioports(sbd, 0xcf8, 4);
- sysbus_add_io(sbd, 0xcfc, &s->data_mem);
+ memory_region_add_subregion(s->bus->address_space_io, 0xcfc, &s->data_mem);
sysbus_init_ioports(sbd, 0xcfc, 4);
/* register i440fx 0xcf8 port as coalesced pio */
--
MST
- [PULL 19/40] hw/pci: Disable PCI_ERR_UNCOR_MASK register for machine type < 8.0, (continued)
- [PULL 19/40] hw/pci: Disable PCI_ERR_UNCOR_MASK register for machine type < 8.0, Michael S. Tsirkin, 2023/05/19
- [PULL 20/40] virtio-mem: Default to "unplugged-inaccessible=on" with 8.1 on x86-64, Michael S. Tsirkin, 2023/05/19
- [PULL 21/40] vhost-user: Remove acpi-specific memslot limit, Michael S. Tsirkin, 2023/05/19
- [PULL 22/40] virtio-net: not enable vq reset feature unconditionally, Michael S. Tsirkin, 2023/05/19
- [PULL 23/40] virtio-crypto: fix NULL pointer dereference in virtio_crypto_free_request, Michael S. Tsirkin, 2023/05/19
- [PULL 26/40] vhost-vdpa: Add check for full 64-bit in region delete, Michael S. Tsirkin, 2023/05/19
- [PULL 24/40] vhost: expose function vhost_dev_has_iommu(), Michael S. Tsirkin, 2023/05/19
- [PULL 15/40] ACPI: bios-tables-test.c step 5 (update expected table binaries), Michael S. Tsirkin, 2023/05/19
- [PULL 29/40] hw/pci-host/q35: Inline sysbus_add_io(), Michael S. Tsirkin, 2023/05/19
- [PULL 25/40] vhost_vdpa: fix the input in trace_vhost_vdpa_listener_region_del(), Michael S. Tsirkin, 2023/05/19
- [PULL 28/40] hw/pci-host/i440fx: Inline sysbus_add_io(),
Michael S. Tsirkin <=
- [PULL 27/40] vhost-vdpa: Add support for vIOMMU., Michael S. Tsirkin, 2023/05/19
- [PULL 30/40] hw/i386/pc_q35: Reuse machine parameter, Michael S. Tsirkin, 2023/05/19
- [PULL 31/40] hw/i386/pc_{q35,piix}: Reuse MachineClass::desc as SMB product name, Michael S. Tsirkin, 2023/05/19
- [PULL 32/40] hw/i386/pc_{q35,piix}: Minimize usage of get_system_memory(), Michael S. Tsirkin, 2023/05/19
- [PULL 33/40] hw/i386/pc: Initialize ram_memory variable directly, Michael S. Tsirkin, 2023/05/19
- [PULL 34/40] hw/pci-host/pam: Make init_pam() usage more readable, Michael S. Tsirkin, 2023/05/19
- [PULL 36/40] hw/pci-bridge: make building pcie-to-pci bridge configurable, Michael S. Tsirkin, 2023/05/19
- [PULL 35/40] virtio-pci: add handling of PCI ATS and Device-TLB enable/disable, Michael S. Tsirkin, 2023/05/19
- [PULL 37/40] hw/cxl: rename mailbox return code type from ret_code to CXLRetCode, Michael S. Tsirkin, 2023/05/19
- [PULL 38/40] hw/cxl: Introduce cxl_device_get_timestamp() utility function, Michael S. Tsirkin, 2023/05/19