From: Alex Williamson <alex.williamson@redhat.com>
To: "Liu, Yi L" <yi.l.liu@linux.intel.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com,
david@gibson.dropbear.id.au, pbonzini@redhat.com, aik@ozlabs.ru,
yi.l.liu@intel.com
Subject: Re: [Qemu-devel] [PATCH] vfio/common: init giommu_list and hostwin_list of vfio container
Date: Wed, 29 Nov 2017 08:41:04 -0700 [thread overview]
Message-ID: <20171129084104.44f8b8c2@t450s.home> (raw)
In-Reply-To: <1511337482-15505-1-git-send-email-yi.l.liu@linux.intel.com>
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
bug. Let's save it for after QEMU-2.11. Thanks,
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);
next prev parent reply other threads:[~2017-11-29 15:41 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 [this message]
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=20171129084104.44f8b8c2@t450s.home \
--to=alex.williamson@redhat.com \
--cc=aik@ozlabs.ru \
--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 \
--cc=yi.l.liu@linux.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).