mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Mostafa Saleh <smostafa@google.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: Mon, 18 Aug 2025 10:52:42 -0600	[thread overview]
Message-ID: <20250818105242.4e6b96ed.alex.williamson@redhat.com> (raw)
In-Reply-To: <aJ9neYocl8sSjpOG@google.com>

On Fri, 15 Aug 2025 16:59:37 +0000
Mostafa Saleh <smostafa@google.com> wrote:

> 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.

I think what we attempt to achieve in vfio is repeatability and data
integrity independent of the hypervisor.  IOW, if we 'kill -9' the
hypervisor process, the kernel can bring the device back to a default
state where the device isn't wedged or leaking information through the
device to the next use case.  If the hypervisor wants to support
enhanced resets on top of that, that's great, but I think it becomes
difficult to argue that vfio-platform itself holds up its end of the
bargain if we're really trusting the hypervisor to handle these aspects.

> 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)

Ultimately I'll lean on Eric to make the call.  I know he's concerned
about testing, but he raised that and various other concerns whether
platform device really have a future with vfio nearly a year ago and
nothing has changed.  Currently it requires a module option opt-in to
enable devices that the kernel doesn't know how to reset.  Is that
sufficient or should use of such a device taint the kernel?  If any
device beyond the few e-waste devices that we know how to reset taint
the kernel, should this support really even be in the kernel?  Thanks,

Alex


  reply	other threads:[~2025-08-18 16:52 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
2025-08-18 16:52     ` Alex Williamson [this message]
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=20250818105242.4e6b96ed.alex.williamson@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=clg@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=smostafa@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®