[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] IOMMU not supported by vhost-user.
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v2] IOMMU not supported by vhost-user. |
Date: |
Wed, 31 Mar 2021 10:11:43 +0100 |
On Tue, Feb 23, 2021 at 04:55:41PM +0100, Greg Kurz wrote:
> > diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
> > index 6e17d631f7..78e58d2148 100644
> > --- a/hw/virtio/vhost.c
> > +++ b/hw/virtio/vhost.c
> > @@ -1293,7 +1293,6 @@ int vhost_dev_init(struct vhost_dev *hdev, void
> > *opaque,
> > int i, r, n_initialized_vqs = 0;
> > Error *local_err = NULL;
> >
> > - hdev->vdev = NULL;
>
> With this change, vhost_dev_init() no longer offers the guarantee
> that ->vdev is valid, which might cause problems for any device
> that doesn't set ->vdev itself like this patch does for vhost-user-fs.
>
> I suggest you to turn vhost_dev_init() into a vhost_dev_init_vdev()
> with an extra vdev argument and use it for all vhost-user devices.
> Introduce a vhost_dev_init() inline that does vhost_dev_init_vdev(NULL)
> and call it everywhere else.
Yes, I agree. Passing vdev in as an argument is a clean solution.
Stefan
signature.asc
Description: PGP signature
- Re: [PATCH v2] IOMMU not supported by vhost-user.,
Stefan Hajnoczi <=