qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Liu, Yi L" <yi.l.liu@linux.intel.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: yi.l.liu@intel.com, mst@redhat.com, aik@ozlabs.ru,
	qemu-devel@nongnu.org, pbonzini@redhat.com,
	david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [PATCH] vfio/common: init giommu_list and hostwin_list of vfio container
Date: Thu, 30 Nov 2017 12:45:23 +0800	[thread overview]
Message-ID: <20171130044523.GA30936@sky-dev> (raw)
In-Reply-To: <20171129084104.44f8b8c2@t450s.home>

On Wed, Nov 29, 2017 at 08:41:04AM -0700, Alex Williamson wrote:
> On Wed, 22 Nov 2017 15:58:02 +0800
> "Liu, Yi L" <yi.l.liu@linux.intel.com> wrote:
> 
> > The init of giommu_list and hostwin_list is missed during container
> > initialization.
> > 
> > Signed-off-by: Liu, Yi L <yi.l.liu@linux.intel.com>
> > ---
> >  hw/vfio/common.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/hw/vfio/common.c b/hw/vfio/common.c
> > index 7b2924c..14c5940 100644
> > --- a/hw/vfio/common.c
> > +++ b/hw/vfio/common.c
> > @@ -990,6 +990,8 @@ static int vfio_connect_container(VFIOGroup *group, AddressSpace *as,
> >      container = g_malloc0(sizeof(*container));
> >      container->space = space;
> >      container->fd = fd;
> > +    QLIST_INIT(&container->giommu_list);
> > +    QLIST_INIT(&container->hostwin_list);
> 
> container is g_malloc0'd above and QLIST_INIT does:
> 
> #define QLIST_INIT(head) do {                                           \
>         (head)->lh_first = NULL;                                        \
> } while (/*CONSTCOND*/0)
> 
> So the only net change is the explicit initialization, which is a fair
> fix, but given the current QLIST implementation is not actually a

Agree.

> bug.  Let's save it for after QEMU-2.11.  Thanks,

Thx, Alex. It's a nice plan.

Regards,
Yi L 
> Alex
> 
> >      if (ioctl(fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1_IOMMU) ||
> >          ioctl(fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1v2_IOMMU)) {
> >          bool v2 = !!ioctl(fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1v2_IOMMU);
> 
> 

      reply	other threads:[~2017-11-30  5:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22  7:58 [Qemu-devel] [PATCH] vfio/common: init giommu_list and hostwin_list of vfio container Liu, Yi L
2017-11-22  8:45 ` no-reply
2017-11-29 15:41 ` Alex Williamson
2017-11-30  4:45   ` Liu, Yi L [this message]

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=20171130044523.GA30936@sky-dev \
    --to=yi.l.liu@linux.intel.com \
    --cc=aik@ozlabs.ru \
    --cc=alex.williamson@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yi.l.liu@intel.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).