[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment
From: |
Peter Maydell |
Subject: |
Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment |
Date: |
Mon, 8 Feb 2021 12:59:45 +0000 |
On Fri, 5 Feb 2021 at 14:08, Edgar E. Iglesias <edgar.iglesias@gmail.com> wrote:
> I wonder if virtio_mmio_bus_get_dev_path() really should be peeking into
> Sysbus internals mmio[].addr?
Nope, it should not.
> Sysbus mmio[].addr looks like a candidate for removal if we ever get rid
> of the default system_memory...
>
> I don't have any good suggestions how to fix this. I guess we could wrap
> memory_region_add_subregion() with a sysbus version of it that sets
> mmio[].addr but that seems like a step backwards to me.
> Perhaps there's a way fix this in virtio_mmio_bus_get_dev_path()?
I just suggested something on another thread: call memory_region_find()
and then look at the offset_within_address_space field of the returned
MemoryRegionSection. I think that should get you the offset of the
transport within the system address space regardless of how much
use of containers and other oddball mappings are involved. (If the
transport is not mapped into the system address space at all then
you'll get its offset within whatever that other address space is,
but I think we can reasonably ignore that unlikely corner case.)
thanks
-- PMM
- [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment, schspa, 2021/02/04
- Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment, Philippe Mathieu-Daudé, 2021/02/04
- Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment, schspa, 2021/02/04
- Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment, Philippe Mathieu-Daudé, 2021/02/05
- Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment, Peter Maydell, 2021/02/05
- Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment, Philippe Mathieu-Daudé, 2021/02/05
- Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment, Peter Maydell, 2021/02/05
- Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment, Edgar E. Iglesias, 2021/02/05
- Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment,
Peter Maydell <=
- [PATCH v4] virtio-mmio: improve virtio-mmio get_dev_path alog, schspa, 2021/02/25
- Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment, schspa, 2021/02/25
- Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment, schspa, 2021/02/08
- Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment, Laszlo Ersek, 2021/02/08