From: Stefan Hajnoczi <stefanha@redhat.com>
To: Greg Kurz <groug@kaod.org>
Cc: farosas@br.ibm.com, Leonardo Garcia <lagarcia@br.ibm.com>,
lagarcia@linux.ibm.com, qemu-devel@nongnu.org,
dgilbert@redhat.com
Subject: Re: [PATCH v2] IOMMU not supported by vhost-user.
Date: Wed, 31 Mar 2021 10:11:43 +0100 [thread overview]
Message-ID: <YGQ8z+Uv4QTmbYTl@stefanha-x1.localdomain> (raw)
In-Reply-To: <20210223165541.5aafc638@bahia.lan>
[-- Attachment #1: Type: text/plain, Size: 958 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-03-31 9:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-17 19:55 [PATCH v2] IOMMU not supported by vhost-user lagarcia
2021-02-23 15:55 ` Greg Kurz
2021-03-31 9:11 ` Stefan Hajnoczi [this message]
2021-03-31 9:14 ` Stefan Hajnoczi
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=YGQ8z+Uv4QTmbYTl@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=dgilbert@redhat.com \
--cc=farosas@br.ibm.com \
--cc=groug@kaod.org \
--cc=lagarcia@br.ibm.com \
--cc=lagarcia@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
/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).