All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mostafa Saleh <smostafa@google.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	eric.auger@redhat.com, clg@redhat.com
Subject: Re: [PATCH 2/2] vfio/platform: Mark for removal
Date: Fri, 15 Aug 2025 16:59:37 +0000	[thread overview]
Message-ID: <aJ9neYocl8sSjpOG@google.com> (raw)
In-Reply-To: <20250806170314.3768750-3-alex.williamson@redhat.com>

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@redhat.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@redhat.com>
>  L:	kvm@vger.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
> 

  parent reply	other threads:[~2025-08-15 16:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06 17:03 [PATCH 0/2] vfio: Deprecate fsl-mc, platform, and amba Alex Williamson
2025-08-06 17:03 ` [PATCH 1/2] vfio/fsl-mc: Mark for removal Alex Williamson
2025-08-15 10:02   ` Tian, Kevin
2025-08-06 17:03 ` [PATCH 2/2] vfio/platform: " Alex Williamson
2025-08-15 10:02   ` Tian, Kevin
2025-08-15 16:59   ` Mostafa Saleh [this message]
2025-08-18 16:52     ` Alex Williamson
2025-08-18 17:33       ` Mostafa Saleh
2025-08-19  9:58         ` Eric Auger
2025-08-20 15:20           ` Mostafa Saleh
2025-08-20 16:29             ` Eric Auger
2025-08-20 20:25               ` Mostafa Saleh
2025-08-25 13:48                 ` Pranjal Shrivastava
2025-08-25 16:15                   ` Alex Williamson
2025-08-25 16:48                     ` Eric Auger
2025-08-07  8:12 ` [PATCH 0/2] vfio: Deprecate fsl-mc, platform, and amba Eric Auger
2025-08-11 20:23 ` Jason Gunthorpe
2025-08-15 14:47 ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aJ9neYocl8sSjpOG@google.com \
    --to=smostafa@google.com \
    --cc=alex.williamson@redhat.com \
    --cc=clg@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.