vfio/virtio: Enable live migration once VIRTIO_PCI was configured
authorYishai Hadas <yishaih@nvidia.com>
Wed, 13 Nov 2024 11:52:00 +0000 (13:52 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 13 Nov 2024 23:28:32 +0000 (16:28 -0700)
commit40bcdb12c68dbb6f457deb0adab5008ef61c13d7
treea0b54e16e546060667acb87336aeb81a9bfc27e6
parent6cea64b1db8885b82c226f9f80c2325f39d9d309
vfio/virtio: Enable live migration once VIRTIO_PCI was configured

Now that the driver supports live migration, only the legacy IO
functionality depends on config VIRTIO_PCI_ADMIN_LEGACY.

As part of that we introduce a bool configuration option as a sub menu
under the driver's main live migration feature named
VIRTIO_VFIO_PCI_ADMIN_LEGACY, to control the legacy IO functionality.

This will let users configuring the kernel, know which features from the
description might be available in the resulting driver.

As of that, move the legacy IO into a separate file to be compiled only
once CONFIG_VIRTIO_VFIO_PCI_ADMIN_LEGACY was configured and let the live
migration depends only on VIRTIO_PCI.

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20241113115200.209269-8-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/virtio/Kconfig
drivers/vfio/pci/virtio/Makefile
drivers/vfio/pci/virtio/common.h
drivers/vfio/pci/virtio/legacy_io.c [new file with mode: 0644]
drivers/vfio/pci/virtio/main.c