lkml.org 
[lkml]   [2021]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pciehp: fast unplug for virtual machines
On Sun, Nov 14, 2021 at 07:06:04PM +0100, Lukas Wunner wrote:
> On Sun, Nov 14, 2021 at 12:24:43PM -0500, Michael S. Tsirkin wrote:
> > On Sun, Nov 14, 2021 at 05:39:58PM +0100, Lukas Wunner wrote:
> > > Why does virtual hardware implement the Attention Button if it's
> > > perceived as annoying? Just amend qemu so that it doesn't advertise
> > > presence of an Attention Button to get rid of the delay. (Clear the
> > > Attention Button Present bit in the Slot Capabilities register.)
> >
> > Because we want ability to request device removal from outside the
> > guest.
>
> Please elaborate. Does "outside the guest" mean on the host?
> How do you represent the Attention Button outside the guest
> and route events through to the guest?

The usual way, using kvm ioctls.

>
> > > An Attention Button doesn't make any sense for virtual hardware
> > > except to test or debug support for it in the kernel. Just make
> > > presence of the Attention Button optional and be done with it.
> > >
> > > You'll still be able to bring down the slot in software via the
> > > "remove" attribute in sysfs.
> >
> > This requires guest specific code though. Emulating the attention button
> > works in a guest independent way.
>
> It sounds like you're using the Attention Button because it does
> almost, but not quite what you want for your specific use case.
> Now you're trying to change its behavior in a way that deviates
> from the spec to align it with your use case.
>
> Why don't you just trigger surprise-removal from outside the guest?
>
> Thanks,
>
> Lukas

Because linux does not handle it well for all devices. Fixing that
requires fixing all drivers.

--
MST

\
 
 \ /
  Last update: 2021-11-14 23:38    [W:0.767 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site