vfio-platform: Deprecate all forms of vfio-platform devices

As an outcome of KVM forum 2024 "vfio-platform: live and let die?"
talk, let's deprecate vfio-platform devices.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250305124225.952791-1-eric.auger@redhat.com
[ clg: Fixed spelling in vfio-amd-xgbe section ]
Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
Eric Auger 2025-03-05 13:42:25 +01:00 committed by Cédric Le Goater
parent 515d80d665
commit 8d8a30d1ac
4 changed files with 30 additions and 0 deletions

View file

@ -434,6 +434,31 @@ Stream ``reconnect`` (since 9.2)
The ``reconnect`` option only allows specifiying second granularity timeouts, The ``reconnect`` option only allows specifiying second granularity timeouts,
which is not enough for all types of use cases, use ``reconnect-ms`` instead. which is not enough for all types of use cases, use ``reconnect-ms`` instead.
VFIO device options
'''''''''''''''''''
``-device vfio-calxeda-xgmac`` (since 10.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The vfio-calxeda-xgmac device allows to assign a host Calxeda Highbank
10Gb XGMAC Ethernet controller device ("calxeda,hb-xgmac" compatibility
string) to a guest. Calxeda HW has been ewasted now and there is no point
keeping that device.
``-device vfio-amd-xgbe`` (since 10.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The vfio-amd-xgbe device allows to assign a host AMD 10GbE controller
to a guest ("amd,xgbe-seattle-v1a" compatibility string). AMD "Seattle"
is not supported anymore and there is no point keeping that device.
``-device vfio-platform`` (since 10.0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The vfio-platform device allows to assign a host platform device
to a guest in a generic manner. Integrating a new device into
the vfio-platform infrastructure requires some adaptation at
both kernel and qemu level. No such attempt has been done for years
and the conclusion is that vfio-platform has not got any traction.
PCIe passthrough shall be the mainline solution.
CPU device properties CPU device properties
''''''''''''''''''''' '''''''''''''''''''''

View file

@ -15,12 +15,14 @@
#include "hw/vfio/vfio-amd-xgbe.h" #include "hw/vfio/vfio-amd-xgbe.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "qemu/module.h" #include "qemu/module.h"
#include "qemu/error-report.h"
static void amd_xgbe_realize(DeviceState *dev, Error **errp) static void amd_xgbe_realize(DeviceState *dev, Error **errp)
{ {
VFIOPlatformDevice *vdev = VFIO_PLATFORM_DEVICE(dev); VFIOPlatformDevice *vdev = VFIO_PLATFORM_DEVICE(dev);
VFIOAmdXgbeDeviceClass *k = VFIO_AMD_XGBE_DEVICE_GET_CLASS(dev); VFIOAmdXgbeDeviceClass *k = VFIO_AMD_XGBE_DEVICE_GET_CLASS(dev);
warn_report("-device vfio-amd-xgbe is deprecated");
vdev->compat = g_strdup("amd,xgbe-seattle-v1a"); vdev->compat = g_strdup("amd,xgbe-seattle-v1a");
vdev->num_compat = 1; vdev->num_compat = 1;

View file

@ -15,12 +15,14 @@
#include "hw/vfio/vfio-calxeda-xgmac.h" #include "hw/vfio/vfio-calxeda-xgmac.h"
#include "migration/vmstate.h" #include "migration/vmstate.h"
#include "qemu/module.h" #include "qemu/module.h"
#include "qemu/error-report.h"
static void calxeda_xgmac_realize(DeviceState *dev, Error **errp) static void calxeda_xgmac_realize(DeviceState *dev, Error **errp)
{ {
VFIOPlatformDevice *vdev = VFIO_PLATFORM_DEVICE(dev); VFIOPlatformDevice *vdev = VFIO_PLATFORM_DEVICE(dev);
VFIOCalxedaXgmacDeviceClass *k = VFIO_CALXEDA_XGMAC_DEVICE_GET_CLASS(dev); VFIOCalxedaXgmacDeviceClass *k = VFIO_CALXEDA_XGMAC_DEVICE_GET_CLASS(dev);
warn_report("-device vfio-calxeda-xgmac is deprecated");
vdev->compat = g_strdup("calxeda,hb-xgmac"); vdev->compat = g_strdup("calxeda,hb-xgmac");
vdev->num_compat = 1; vdev->num_compat = 1;

View file

@ -575,6 +575,7 @@ static void vfio_platform_realize(DeviceState *dev, Error **errp)
VFIODevice *vbasedev = &vdev->vbasedev; VFIODevice *vbasedev = &vdev->vbasedev;
int i; int i;
warn_report("-device vfio-platform is deprecated");
qemu_mutex_init(&vdev->intp_mutex); qemu_mutex_init(&vdev->intp_mutex);
trace_vfio_platform_realize(vbasedev->sysfsdev ? trace_vfio_platform_realize(vbasedev->sysfsdev ?