From: "Michael S. Tsirkin" <mst@redhat.com>
To: Parav Pandit <parav@nvidia.com>
Cc: "virtualization@lists.linux.dev" <virtualization@lists.linux.dev>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"stefanha@redhat.com" <stefanha@redhat.com>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"xuanzhuo@linux.alibaba.com" <xuanzhuo@linux.alibaba.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
Max Gurtovoy <mgurtovoy@nvidia.com>,
"NBU-Contact-Li Rongqing (EXTERNAL)" <lirongqing@baidu.com>
Subject: Re: [PATCH] Revert "virtio_pci: Support surprise removal of virtio pci device"
Date: Fri, 22 Aug 2025 09:59:32 -0400 [thread overview]
Message-ID: <20250822095225-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CY8PR12MB7195392690042EF1600CEAC5DC3DA@CY8PR12MB7195.namprd12.prod.outlook.com>
On Fri, Aug 22, 2025 at 01:49:36PM +0000, Parav Pandit wrote:
>
> > From: Michael S. Tsirkin <mst@redhat.com>
> > Sent: 22 August 2025 06:34 PM
> >
> > On Fri, Aug 22, 2025 at 12:22:50PM +0000, Parav Pandit wrote:
> > > > From: Michael S. Tsirkin <mst@redhat.com>
> > > > Sent: 22 August 2025 03:52 PM
> > > >
> > > > On Fri, Aug 22, 2025 at 12:17:06PM +0300, Parav Pandit wrote:
> > > > > This reverts commit 43bb40c5b926 ("virtio_pci: Support surprise
> > > > > removal of
> > > > virtio pci device").
> > > > >
> > > > > Virtio drivers and PCI devices have never fully supported true
> > > > > surprise (aka hot unplug) removal. Drivers historically continued
> > > > > processing and waiting for pending I/O and even continued
> > > > > synchronous device reset during surprise removal. Devices have
> > > > > also continued completing I/Os, doing DMA and allowing device
> > > > > reset after surprise removal to support such drivers.
> > > > >
> > > > > Supporting it correctly would require a new device capability
> > > >
> > > > If a device is removed, it is removed.
> > > This is how it was implemented and none of the virtio drivers supported it.
> > > So vendors had stepped away from such device implementation.
> > > (not just us).
> >
> >
> > If the slot does not have a mechanical interlock, I can pull the device out. It's
> > not up to a device implementation.
>
> Sure yes, stack is not there yet to support it.
> Each of the virtio device drivers are not there yet.
> Lets build that infra, let device indicate it and it will be smooth ride for driver and device.
There is simply no way for the device to "support" for surprise removal,
or lack such support thereof. The support is up to the slot, not the
device. Any pci compliant device can be placed in a slot that allows
surprise removal and that is all. The user can then remove the device.
Software can then either recover gracefully - it should - or hang or
crash - it does sometimes, now. The patch you are trying to revert
is an attempt to move some use-cases from the 1st to the 2nd category.
But what is going on now, as far as I could tell, is that someone developed
a surprise removal emulation that does not actually remove the device,
and is using that for testing the code in linux that
supports surprise removal. That weird emulation
seems to lead to all kind of weird issues. You answer is to remove the
existing code and tell your testing team "we do not support surprise removal".
But just go ahead and tell this to them straight away. You do not need
this patch for this.
Or better still, let's fix the issues please.
--
MST
next prev parent reply other threads:[~2025-08-22 13:59 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-22 9:17 [PATCH] Revert "virtio_pci: Support surprise removal of virtio pci device" Parav Pandit
2025-08-22 10:21 ` Michael S. Tsirkin
2025-08-22 12:22 ` Parav Pandit
2025-08-22 13:03 ` Michael S. Tsirkin
2025-08-22 13:49 ` Parav Pandit
2025-08-22 13:59 ` Michael S. Tsirkin [this message]
2025-08-24 2:36 ` Parav Pandit
2025-08-24 14:33 ` Michael S. Tsirkin
2025-08-26 18:52 ` Parav Pandit
2025-08-27 10:19 ` Michael S. Tsirkin
2025-08-27 11:33 ` Cornelia Huck
2025-08-28 6:24 ` Parav Pandit
2025-08-28 12:16 ` Cornelia Huck
2025-08-28 12:19 ` Michael S. Tsirkin
2025-08-28 12:22 ` Cornelia Huck
2025-08-28 12:33 ` Parav Pandit
2025-08-28 13:00 ` Michael S. Tsirkin
2025-08-28 13:37 ` Parav Pandit
-- strict thread matches above, loose matches on Subject: below --
2025-08-22 10:27 Li,Rongqing
2025-08-22 12:24 ` Parav Pandit
2025-08-22 13:04 ` Michael S. Tsirkin
2025-08-22 13:53 ` Parav Pandit
2025-08-22 14:02 ` Michael S. Tsirkin
2025-08-24 2:36 ` Parav Pandit
2025-08-24 14:29 ` Michael S. Tsirkin
2025-08-26 18:52 ` Parav Pandit
2025-08-27 10:21 ` Michael S. Tsirkin
2025-08-27 10:49 ` Michael S. Tsirkin
2025-08-28 6:23 ` Parav Pandit
2025-08-28 6:34 ` Michael S. Tsirkin
2025-08-28 6:59 ` Parav Pandit
2025-08-28 9:23 ` Michael S. Tsirkin
2025-08-28 10:41 ` Parav Pandit
2025-04-08 14:59 Parav Pandit
2025-04-08 20:15 ` Michael S. Tsirkin
2025-04-09 13:50 ` Parav Pandit
2025-04-09 16:02 ` Michael S. Tsirkin
2025-04-16 3:01 ` Parav Pandit
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=20250822095225-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=jasowang@redhat.com \
--cc=lirongqing@baidu.com \
--cc=mgurtovoy@nvidia.com \
--cc=parav@nvidia.com \
--cc=pbonzini@redhat.com \
--cc=stable@vger.kernel.org \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.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).