virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Li,Rongqing" <lirongqing@baidu.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "jasowang@redhat.com" <jasowang@redhat.com>,
	"xuanzhuo@linux.alibaba.com" <xuanzhuo@linux.alibaba.com>,
	"virtualization@lists.linux.dev" <virtualization@lists.linux.dev>,
	"parav@nvidia.com" <parav@nvidia.com>,
	songyang23 <songyang23@baidu.com>, liubokai <liubokai@baidu.com>,
	"Song,Zhan" <songzhan@baidu.com>
Subject: RE: [RFC] Revert "virtio_pci: Support surprise removal of virtio pci
Date: Fri, 12 Jan 2024 02:28:46 +0000	[thread overview]
Message-ID: <bb7ded91cfae43439bea555d87fa96a0@baidu.com> (raw)
In-Reply-To: <20240111111921-mutt-send-email-mst@kernel.org>


> > diff --git a/drivers/virtio/virtio_pci_common.c
> > b/drivers/virtio/virtio_pci_common.c
> > index 7a55939..d60fe99 100644
> > --- a/drivers/virtio/virtio_pci_common.c
> > +++ b/drivers/virtio/virtio_pci_common.c
> > @@ -584,13 +584,6 @@ static void virtio_pci_remove(struct pci_dev
> *pci_dev)
> >         struct virtio_pci_device *vp_dev = pci_get_drvdata(pci_dev);
> >         struct device *dev = get_device(&vp_dev->vdev.dev);
> >
> > -       /*
> > -        * Device is marked broken on surprise removal so that virtio upper
> > -        * layers can abort any ongoing operation.
> > -        */
> > -       if (!pci_device_is_present(pci_dev))
> > -               virtio_break_device(&vp_dev->vdev);
> > -
> >         pci_disable_sriov(pci_dev);
> 
> 
> Maybe break device is not the right thing to do. Indeed, request buffers which
> have been already used are not completed by driver.

True, break device makes virtio-blk no longer work for surprise removal

And seems no simple method can work for all devices.

-Li


  reply	other threads:[~2024-01-12  2:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11  9:14 [RFC] Revert "virtio_pci: Support surprise removal of virtio pci Li,Rongqing
2024-01-11 10:18 ` Parav Pandit
2024-01-11 11:47   ` Li,Rongqing
2024-01-11 11:54     ` Parav Pandit
2024-01-11 11:58       ` Li,Rongqing
2024-01-11 12:01         ` Parav Pandit
2024-01-11 16:21 ` Michael S. Tsirkin
2024-01-12  2:28   ` Li,Rongqing [this message]
2024-01-12  5:56     ` 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=bb7ded91cfae43439bea555d87fa96a0@baidu.com \
    --to=lirongqing@baidu.com \
    --cc=jasowang@redhat.com \
    --cc=liubokai@baidu.com \
    --cc=mst@redhat.com \
    --cc=parav@nvidia.com \
    --cc=songyang23@baidu.com \
    --cc=songzhan@baidu.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).