Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-24 Thread schspa
On Mon, 2021-02-08 at 12:59 +, Peter Maydell wrote: > 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

Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-08 Thread Peter Maydell
On Fri, 5 Feb 2021 at 14:08, Edgar E. Iglesias 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

Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-08 Thread Laszlo Ersek
On 02/08/21 06:34, schspa wrote: > On Fri, 2021-02-05 at 15:08 +0100, Edgar E. Iglesias wrote: >> Thanks, that matches how I thought things should work. >> >> I wonder if virtio_mmio_bus_get_dev_path() really should be peeking >> into >> Sysbus internals mmio[].addr? >> > I think mmio[].addr needs

Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-08 Thread schspa
On Fri, 2021-02-05 at 15:08 +0100, Edgar E. Iglesias wrote: > Thanks, that matches how I thought things should work. > > I wonder if virtio_mmio_bus_get_dev_path() really should be peeking > into > Sysbus internals mmio[].addr? > I think mmio[].addr needs to be given a meaningful value even if we

Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-05 Thread Edgar E. Iglesias
On Fri, Feb 05, 2021 at 11:18:28AM +, Peter Maydell wrote: > On Fri, 5 Feb 2021 at 10:31, Philippe Mathieu-Daudé wrote: > > 1/ virtio-mmio must be sysbus-device, > > Yes. > > > 2/ we can not sysbus-map out of main memory so private container > > is incorrect, and Versal can not use "mr-ps-sw

Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-05 Thread Peter Maydell
On Fri, 5 Feb 2021 at 10:31, Philippe Mathieu-Daudé wrote: > 1/ virtio-mmio must be sysbus-device, Yes. > 2/ we can not sysbus-map out of main memory so private container > is incorrect, and Versal can not use "mr-ps-switch"? No. If you have a sysbus device, and you want to map it somewhere oth

Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-05 Thread Philippe Mathieu-Daudé
On 2/5/21 11:03 AM, Peter Maydell wrote: > On Fri, 5 Feb 2021 at 07:53, Philippe Mathieu-Daudé wrote: >> Indeed, you found a design issue IMO: >> >> Versal creates the "mr-ps-switch" to be explicitly different from >> the main sysbus memory. TYPE_VIRTIO_MMIO is a SYSBUS device, thus >> can not be

Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-05 Thread Peter Maydell
On Fri, 5 Feb 2021 at 07:53, Philippe Mathieu-Daudé wrote: > Indeed, you found a design issue IMO: > > Versal creates the "mr-ps-switch" to be explicitly different from > the main sysbus memory. TYPE_VIRTIO_MMIO is a SYSBUS device, thus > can not be created without being plugged on sysbus. > We wa

Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-04 Thread Philippe Mathieu-Daudé
On 2/4/21 10:04 AM, schspa wrote: > On Thu, 2021-02-04 at 09:19 +0100, Philippe Mathieu-Daudé wrote: >> Hi, >> >> Please Cc the maintainers when posting your patch: >> >> ./scripts/get_maintainer.pl -f hw/arm/xlnx-versal-virt.c >> Alistair Francis (maintainer:Xilinx ZynqMP >> and...) >> "Edgar E.

Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-04 Thread schspa
On Thu, 2021-02-04 at 09:19 +0100, Philippe Mathieu-Daudé wrote: > Hi, > > Please Cc the maintainers when posting your patch: > > ./scripts/get_maintainer.pl -f hw/arm/xlnx-versal-virt.c > Alistair Francis (maintainer:Xilinx ZynqMP > and...) > "Edgar E. Iglesias" (maintainer:Xilinx > ZynqMP > a

Re: [PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-04 Thread Philippe Mathieu-Daudé
Hi, Please Cc the maintainers when posting your patch: ./scripts/get_maintainer.pl -f hw/arm/xlnx-versal-virt.c Alistair Francis (maintainer:Xilinx ZynqMP and...) "Edgar E. Iglesias" (maintainer:Xilinx ZynqMP and...) Peter Maydell (maintainer:Xilinx ZynqMP and...) qemu-...@nongnu.org (open lis

[PATCH] arm: xlnx-versal: fix virtio-mmio base address assignment

2021-02-03 Thread schspa
At the moment the following QEMU command line triggers an assertion failure On xlnx-versal SOC:   qemu-system-aarch64 \   -machine xlnx-versal-virt -nographic -smp 2 -m 128 \   -fsdev local,id=shareid,path=${HOME}/work,security_model=none \   -device virtio-9p-device,fsdev=shareid,mou