On 25.09.24 09:39, Pankaj Gupta wrote:
Virtio memory devices rely on PCI BARs to expose the contents of memory.
Because of this they cannot be used (yet) with virtio-mmio or virtio-ccw.
In fact the code that is common to virtio-mem and virtio-pmem, which
is in hw/virtio/virtio-md-pci.c, is only included if CONFIG_VIRTIO_PCI
is set.  Reproduce the same condition in the Kconfig file, only allowing
VIRTIO_MEM and VIRTIO_PMEM to be defined if the transport supports it.

Without this patch it is possible to create a configuration with
CONFIG_VIRTIO_PCI=n and CONFIG_VIRTIO_MEM=y, but that causes a
linking failure.

Just curious what is required to make virtio-mem & virtio-pmem compatible with
virtio-mmio?

I assume not that much: primarily implementing the virtio-md-mmio abstraction, and the virtio-mem-mmio/virtio-pmem-mmio proxy devices. Then, it needs to be wired up in the machine hotplug code.

I posted the virtio-ccw variant a couple of days ago [1].


Maybe late but still:
Reviewed-by: Pankaj Gupta <pankaj.gu...@amd.com>

I already sent a merge request that includes this change. If I have to resend it, I'll include that. Thanks!


[1] https://lkml.kernel.org/r/20240910175809.2135596-1-da...@redhat.com

--
Cheers,

David / dhildenb


Reply via email to