linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] pciehp: fast unplug for virtual machines
Date: Mon, 15 Nov 2021 10:59:46 +0100	[thread overview]
Message-ID: <20211115095946.54tp5glmgfged3rz@sirius.home.kraxel.org> (raw)
In-Reply-To: <20211114180604.GA23907@wunner.de>

  Hi,

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

Well, we want send a request to the guest to shutdown and poweroff the
device.

> Why don't you just trigger surprise-removal from outside the guest?

To give the guest a chance to shutdown the device gracefully?
Umount filesystems, flush data to disk.

Also guest stability.  Traditionally linux isn't very good at dealing
with surprise removal, although the situation is improving.

Emulating surprise-removal has been discussed too.  More as fallback
in case the guest doesn't respond to the attention button.  Right now
we don't have it but should be doable.  For some kinds of devices it
shouldn't be a problem to go straight to surprise-removal.

I'll go experiment with that.

take care,
  Gerd


  parent reply	other threads:[~2021-11-15 10:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  9:02 [PATCH] pciehp: fast unplug for virtual machines Gerd Hoffmann
2021-11-11 17:00 ` Michael S. Tsirkin
2021-11-12  9:56   ` Gerd Hoffmann
2021-11-12 10:09     ` Michael S. Tsirkin
2021-11-11 21:50 ` Bjorn Helgaas
2021-11-12 11:28   ` Gerd Hoffmann
2021-11-12  0:00 ` Krzysztof Wilczyński
2021-11-14 16:39 ` Lukas Wunner
2021-11-14 17:24   ` Michael S. Tsirkin
2021-11-14 18:06     ` Lukas Wunner
2021-11-14 22:37       ` Michael S. Tsirkin
2021-11-15  9:59       ` Gerd Hoffmann [this message]
2021-11-15  7:45     ` Lukas Wunner
2021-11-15 10:09   ` Gerd Hoffmann

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=20211115095946.54tp5glmgfged3rz@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mst@redhat.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;
as well as URLs for NNTP newsgroup(s).