[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/9] hw/pci-host/xilinx-pcie: don't make "io" region
From: |
Aleksandar Markovic |
Subject: |
[Qemu-devel] [PULL 4/9] hw/pci-host/xilinx-pcie: don't make "io" region be RAM |
Date: |
Mon, 25 Jun 2018 22:05:59 +0200 |
From: Peter Maydell <address@hidden>
Currently we use memory_region_init_rom_nomigrate() to create
the "io" memory region to pass to pci_register_root_bus().
This is a dummy region, because this PCI controller doesn't
support accesses to PCI IO space.
There is no reason for the dummy region to be a RAM region;
it is only used as a place where PCI BARs can be mapped,
and if you could get a PCI card to do a bus master access
to the IO space it should not get acts-like-RAM behaviour.
Use a simple container memory region instead. (We do have
one PCI card model which can do bus master accesses to IO
space -- the LSI53C895A SCSI adaptor.)
This avoids the oddity of having a memory region which is
RAM but where the RAM is not migrated.
Note that the size of the region we use here has no
effect on behaviour.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
---
hw/pci-host/xilinx-pcie.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hw/pci-host/xilinx-pcie.c b/hw/pci-host/xilinx-pcie.c
index 044e312..b0a31b9 100644
--- a/hw/pci-host/xilinx-pcie.c
+++ b/hw/pci-host/xilinx-pcie.c
@@ -120,9 +120,8 @@ static void xilinx_pcie_host_realize(DeviceState *dev,
Error **errp)
memory_region_init(&s->mmio, OBJECT(s), "mmio", UINT64_MAX);
memory_region_set_enabled(&s->mmio, false);
- /* dummy I/O region */
- memory_region_init_ram_nomigrate(&s->io, OBJECT(s), "io", 16, NULL);
- memory_region_set_enabled(&s->io, false);
+ /* dummy PCI I/O region (not visible to the CPU) */
+ memory_region_init(&s->io, OBJECT(s), "io", 16);
/* interrupt out */
qdev_init_gpio_out_named(dev, &s->irq, "interrupt_out", 1);
--
2.7.4
- [Qemu-devel] [PULL 0/9] Target MIPS queue, 2018-06-25, Aleksandar Markovic, 2018/06/25
- [Qemu-devel] [PULL 9/9] target/mips: Fix gdbstub to read/write 64 bit FP registers, Aleksandar Markovic, 2018/06/25
- [Qemu-devel] [PULL 3/9] hw/mips/mips_malta: don't make bios region 'nomigrate', Aleksandar Markovic, 2018/06/25
- [Qemu-devel] [PULL 8/9] target/mips: Fix data type for offset, Aleksandar Markovic, 2018/06/25
- [Qemu-devel] [PULL 5/9] target/mips: Raise a RI when given fs is n/a from CTC1, Aleksandar Markovic, 2018/06/25
- [Qemu-devel] [PULL 2/9] hw/mips/boston: don't make flash region 'nomigrate', Aleksandar Markovic, 2018/06/25
- [Qemu-devel] [PULL 4/9] hw/pci-host/xilinx-pcie: don't make "io" region be RAM,
Aleksandar Markovic <=
- [Qemu-devel] [PULL 6/9] target/mips: Fix microMIPS on reset, Aleksandar Markovic, 2018/06/25
- [Qemu-devel] [PULL 7/9] target/mips: Update gen_flt_ldst(), Aleksandar Markovic, 2018/06/25
- [Qemu-devel] [PULL 1/9] MAINTAINERS: update target-mips maintainers, Aleksandar Markovic, 2018/06/25
- Re: [Qemu-devel] [PULL 0/9] Target MIPS queue, 2018-06-25, Peter Maydell, 2018/06/26