On Thu, 21 Feb 2019, Halil Pasic wrote: > On Thu, 21 Feb 2019 15:46:08 +0000 > "Dr. David Alan Gilbert" <dgilbert@xxxxxxxxxx> wrote: > > * Cornelia Huck (cohuck@xxxxxxxxxx) wrote: > > > This is getting a bit confusing... let me try to summarize: > > > > > > - We introduce a special area where shared memory areas are supposed to > > > live. > > > - If a virtio device accessed via ccw defines shared regions, the > > > driver can discover them via a new ccw that indicates an address in > > > that special area. > > > > Right. > > > > > - If a virtio device accessed via pci defines shared regions, the > > > driver will want to discover them via the same mechanism as on other > > > platforms. If I read > > > https://lists.oasis-open.org/archives/virtio-comment/201901/msg00003.html > > > correctly, this will mean an offset into a BAR. This will be a normal > > > pci memory region. > > > > Right; note that like any other BAR it's upto the guest to write the BAR > > to select which area of GPA it wants the BAR to map to. > > > > > Now, this sounds to me that we'll have regions in different memory > > > regions, depending on whether they are accessed via ccw or via pci. Not > > > sure if that's a problem. > > > > As long as they stay out of each others way it shouldn't be. > > > > I'm not sure. What I'm concerted about is: > * if it is a virtio-ccw device it would need to access the shared memory via > normal memory access instructions. > * if it is a virtio-pci device it would need to access the shared memory as > pci memory, that is via special PCI memory access instructions. I spent all morning going through this thread trying to understand what you want to do here. Frankly, I fail to understand what's even new here. We have emulated devices which are recognized by the guest OS' standard bus code (PCI, CCW) but have a special ID such that a virtio driver is bound to them. This driver uses standard accessors (pci_iomap, readb; ccw_device_start) which have to be trapped by QEMU/KVM. What do you want to change in this setup? Aren't the resources the virtio drivers access shared memory today? The iomap, readb stuff is only usable in a PCI context on s390. But what is the problem here? virtio_ccw knows it's not a PCI driver - it doesn't have to use this stuff.. Regards, Sebastian