qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Liu, Yi L" <yi.l.liu@linux.intel.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, david@gibson.dropbear.id.au, pbonzini@redhat.com,
	alex.williamson@redhat.com, aik@ozlabs.ru, yi.l.liu@intel.com,
	"Liu, Yi L" <yi.l.liu@linux.intel.com>
Subject: [Qemu-devel] [PATCH] vfio/common: init giommu_list and hostwin_list of vfio container
Date: Wed, 22 Nov 2017 15:58:02 +0800	[thread overview]
Message-ID: <1511337482-15505-1-git-send-email-yi.l.liu@linux.intel.com> (raw)

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);
     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);
-- 
1.9.1

             reply	other threads:[~2017-11-22  8:14 UTC|newest]

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

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=1511337482-15505-1-git-send-email-yi.l.liu@linux.intel.com \
    --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).