RE: [PATCH] virtio_pci: Wait for legacy device to be reset

From: Angus Chen
Date: Tue Apr 11 2023 - 08:11:04 EST




> -----Original Message-----
> From: Michael S. Tsirkin <mst@xxxxxxxxxx>
> Sent: Tuesday, April 11, 2023 7:14 PM
> To: Angus Chen <angus.chen@xxxxxxxxxxxxxxx>
> Cc: Jason Wang <jasowang@xxxxxxxxxx>;
> virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] virtio_pci: Wait for legacy device to be reset
>
> On Tue, Apr 11, 2023 at 10:57:51AM +0000, Angus Chen wrote:
> > > > > Yes, not very clear still. What are the device and vendor ID of the
> > > > > card? Does it have the virtio capabilities?
> > > > > Thanks
> > > > It's have the virtio capabilities.
> > > > When it is used in bare metal ,
> > > > it just use PCI_VENDOR_ID_REDHAT_QUMRANET.
> > > > When it use in vm,
> > > > It is just like :
> > > > { PCI_DEVICE_SUB(PCI_VENDOR_ID_REDHAT_QUMRANET,
> > > > VIRTIO_TRANS_ID_NET,
> > > > PCI_VENDOR_ID_JAGUARMICRO,
> > > > VIRTIO_ID_NET) },
> > > > { PCI_DEVICE_SUB(PCI_VENDOR_ID_REDHAT_QUMRANET,
> > > > VIRTIO_TRANS_ID_BLOCK,
> > > > PCI_VENDOR_ID_JAGUARMICRO,
> > > > VIRTIO_ID_BLOCK) },
> > > >
> > >
> > > Okay. So it's a transitional device. The question, then,
> > > is how come you end up with drivers/virtio/virtio_pci_legacy.c
> > > with a modern linux at all?
> > > Did you by chance set force_legacy = true ?
> > Yes,I can provide more information about it.
> > We can test it use force_legacy ,or we use a server with multi os but it use only
> one card.
> > Thanks.
>
> Okay, so I don't yet see lots of value of merging this patch upstream.
> The problematic code does not run by default as the modern driver is
> used, and applying the patch upstream does nothing to fix the multi-os
> case.
>
En, I thought the same way you did,so I just fixed it out of tree one year ago.
But the legacy virtio model is used more than we thought in real cloud computing.

Btw,I will show the mail to my boss that Although it is merged failed, I tried,haha.

> What did I miss?
>
>
> --
> MST