[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aJ9neYocl8sSjpOG@google.com>
Date: Fri, 15 Aug 2025 16:59:37 +0000
From: Mostafa Saleh <smostafa@...gle.com>
To: Alex Williamson <alex.williamson@...hat.com>
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
eric.auger@...hat.com, clg@...hat.com
Subject: Re: [PATCH 2/2] vfio/platform: Mark for removal
Hi Alex,
On Wed, Aug 06, 2025 at 11:03:12AM -0600, Alex Williamson wrote:
> vfio-platform hasn't had a meaningful contribution in years. In-tree
> hardware support is predominantly only for devices which are long since
> e-waste. QEMU support for platform devices is slated for removal in
> QEMU-10.2. Eric Auger presented on the future of the vfio-platform
> driver and difficulties supporting new devices at KVM Forum 2024,
> gaining some support for removal, some disagreement, but garnering no
> new hardware support, leaving the driver in a state where it cannot
> be tested.
>
> Mark as obsolete and subject to removal.
Recently(this year) in Android, we enabled VFIO-platform for protected KVM,
and it’s supported in our VMM (CrosVM) [1].
CrosVM support is different from Qemu, as it doesn't require any device
specific logic in the VMM, however, it relies on loading a device tree
template in runtime (with “compatiable” string...) and it will just
override regs, irqs.. So it doesn’t need device knowledge (at least for now)
Similarly, the kernel doesn’t need reset drivers as the hypervisor handles that.
Unfortunately, there is no upstream support at the moment, we are making
some -slow- progress on that [2][3]
If it helps, I have access to HW that can run that and I can review/test
changes, until upstream support lands; if you are open to keeping VFIO-platform.
Or I can look into adding support for existing upstream HW(with platforms I am
familiar with as Pixel-6)
Thanks,
Mostafa
[1] https://chromium.googlesource.com/chromiumos/platform/crosvm/+/refs/heads/chromeos/devices/src/platform/vfio_platform.rs
[2] https://lore.kernel.org/linux-iommu/20250728175316.3706196-1-smostafa@google.com/
[3] https://lore.kernel.org/all/20250729225455.670324-1-seanjc@google.com/
>
> Link: https://lore.kernel.org/all/20250731121947.1346927-1-clg@redhat.com/
> Link: https://www.youtube.com/watch?v=Q5BOSbtwRr8
> Signed-off-by: Alex Williamson <alex.williamson@...hat.com>
> ---
> MAINTAINERS | 2 +-
> drivers/vfio/platform/Kconfig | 10 ++++++++--
> drivers/vfio/platform/reset/Kconfig | 6 +++---
> drivers/vfio/platform/vfio_amba.c | 2 ++
> drivers/vfio/platform/vfio_platform.c | 2 ++
> 5 files changed, 16 insertions(+), 6 deletions(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 25a520467dec..c19b60032aa3 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -26084,7 +26084,7 @@ F: drivers/vfio/pci/pds/
> VFIO PLATFORM DRIVER
> M: Eric Auger <eric.auger@...hat.com>
> L: kvm@...r.kernel.org
> -S: Maintained
> +S: Obsolete
> F: drivers/vfio/platform/
>
> VFIO QAT PCI DRIVER
> diff --git a/drivers/vfio/platform/Kconfig b/drivers/vfio/platform/Kconfig
> index 88fcde51f024..a8bde833e9e5 100644
> --- a/drivers/vfio/platform/Kconfig
> +++ b/drivers/vfio/platform/Kconfig
> @@ -7,9 +7,12 @@ config VFIO_PLATFORM_BASE
> select VFIO_VIRQFD
>
> config VFIO_PLATFORM
> - tristate "Generic VFIO support for any platform device"
> + tristate "Generic VFIO support for any platform device (DEPRECATED)"
> select VFIO_PLATFORM_BASE
> help
> + The vfio-platform driver is deprecated and will be removed in a
> + future kernel release.
> +
> Support for platform devices with VFIO. This is required to make
> use of platform devices present on the system using the VFIO
> framework.
> @@ -17,10 +20,13 @@ config VFIO_PLATFORM
> If you don't know what to do here, say N.
>
> config VFIO_AMBA
> - tristate "VFIO support for AMBA devices"
> + tristate "VFIO support for AMBA devices (DEPRECATED)"
> depends on ARM_AMBA || COMPILE_TEST
> select VFIO_PLATFORM_BASE
> help
> + The vfio-amba driver is deprecated and will be removed in a
> + future kernel release.
> +
> Support for ARM AMBA devices with VFIO. This is required to make
> use of ARM AMBA devices present on the system using the VFIO
> framework.
> diff --git a/drivers/vfio/platform/reset/Kconfig b/drivers/vfio/platform/reset/Kconfig
> index dcc08dc145a5..70af0dbe293b 100644
> --- a/drivers/vfio/platform/reset/Kconfig
> +++ b/drivers/vfio/platform/reset/Kconfig
> @@ -1,21 +1,21 @@
> # SPDX-License-Identifier: GPL-2.0-only
> if VFIO_PLATFORM
> config VFIO_PLATFORM_CALXEDAXGMAC_RESET
> - tristate "VFIO support for calxeda xgmac reset"
> + tristate "VFIO support for calxeda xgmac reset (DEPRECATED)"
> help
> Enables the VFIO platform driver to handle reset for Calxeda xgmac
>
> If you don't know what to do here, say N.
>
> config VFIO_PLATFORM_AMDXGBE_RESET
> - tristate "VFIO support for AMD XGBE reset"
> + tristate "VFIO support for AMD XGBE reset (DEPRECATED)"
> help
> Enables the VFIO platform driver to handle reset for AMD XGBE
>
> If you don't know what to do here, say N.
>
> config VFIO_PLATFORM_BCMFLEXRM_RESET
> - tristate "VFIO support for Broadcom FlexRM reset"
> + tristate "VFIO support for Broadcom FlexRM reset (DEPRECATED)"
> depends on ARCH_BCM_IPROC || COMPILE_TEST
> default ARCH_BCM_IPROC
> help
> diff --git a/drivers/vfio/platform/vfio_amba.c b/drivers/vfio/platform/vfio_amba.c
> index ff8ff8480968..9f5c527baa8a 100644
> --- a/drivers/vfio/platform/vfio_amba.c
> +++ b/drivers/vfio/platform/vfio_amba.c
> @@ -70,6 +70,8 @@ static int vfio_amba_probe(struct amba_device *adev, const struct amba_id *id)
> struct vfio_platform_device *vdev;
> int ret;
>
> + dev_err_once(&adev->dev, "DEPRECATION: vfio-amba is deprecated and will be removed in a future kernel release\n");
> +
> vdev = vfio_alloc_device(vfio_platform_device, vdev, &adev->dev,
> &vfio_amba_ops);
> if (IS_ERR(vdev))
> diff --git a/drivers/vfio/platform/vfio_platform.c b/drivers/vfio/platform/vfio_platform.c
> index 512533501eb7..48a49b14164a 100644
> --- a/drivers/vfio/platform/vfio_platform.c
> +++ b/drivers/vfio/platform/vfio_platform.c
> @@ -59,6 +59,8 @@ static int vfio_platform_probe(struct platform_device *pdev)
> struct vfio_platform_device *vdev;
> int ret;
>
> + dev_err_once(&pdev->dev, "DEPRECATION: vfio-platform is deprecated and will be removed in a future kernel release\n");
> +
> vdev = vfio_alloc_device(vfio_platform_device, vdev, &pdev->dev,
> &vfio_platform_ops);
> if (IS_ERR(vdev))
> --
> 2.50.1
>
Powered by blists - more mailing lists