On 29.04.22 06:59, Viresh Kumar wrote:
Hello Viresh
On 29-04-22, 09:18, Viresh Kumar wrote:
Now, it was just yesterday that I started looking into MMIO modern stuff as the GPIO device needs it and you sent me working code to look how to do it as well. You saved at least 1-2 days of my time :)
One question though, do we need to support Legacy mode at all in the work we are doing ?
I am not 100% sure I can answer precisely here. virtio-disk backend worked perfectly fine in legacy virtio-mmio transport mode with the latest vanilla Linux. For the "restricted memory access using Xen grant mappings" feature to work I had to switch it to use modern virtio-mmio transport. CONFIG_ARCH_HAS_RESTRICTED_VIRTIO_MEMORY_ACCESS requires the virtio devices to support VIRTIO_F_VERSION_1. In addition, we do need 64-bit addresses in the virtqueue.
BTW, the virtio-iommu also requires VIRTIO_F_VERSION_1.