qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Alex Williamson <alex.williamson@redhat.com>,
	Tina Zhang <tina.zhang@intel.com>,
	intel-gvt-dev@lists.freedesktop.org,
	Kirti Wankhede <kwankhede@nvidia.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH v6 6/9] vfio/common: cleanup in vfio_region_finalize
Date: Wed, 28 Feb 2018 13:31:07 +0100	[thread overview]
Message-ID: <20180228123110.6507-7-kraxel@redhat.com> (raw)
In-Reply-To: <20180228123110.6507-1-kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/vfio/common.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index f895e3c335..6a8203a532 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -858,6 +858,13 @@ void vfio_region_finalize(VFIORegion *region)
     g_free(region->mmaps);
 
     trace_vfio_region_finalize(region->vbasedev->name, region->nr);
+
+    region->mem = NULL;
+    region->mmaps = NULL;
+    region->nr_mmaps = 0;
+    region->size = 0;
+    region->flags = 0;
+    region->nr = 0;
 }
 
 void vfio_region_mmaps_set_enabled(VFIORegion *region, bool enabled)
-- 
2.9.3

  parent reply	other threads:[~2018-02-28 12:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 12:31 [Qemu-devel] [PATCH v6 0/9] vfio: add display support Gerd Hoffmann
2018-02-28 12:31 ` [Qemu-devel] [PATCH v6 1/9] linux-headers: update to 4.16-rc1 Gerd Hoffmann
2018-02-28 12:31 ` [Qemu-devel] [PATCH v6 2/9] standard-headers: add drm/drm_fourcc.h Gerd Hoffmann
2018-02-28 12:31 ` [Qemu-devel] [PATCH v6 3/9] ui/pixman: add qemu_drm_format_to_pixman() Gerd Hoffmann
2018-02-28 12:31 ` [Qemu-devel] [PATCH v6 4/9] console: minimal hotplug suport Gerd Hoffmann
2018-02-28 12:31 ` [Qemu-devel] [PATCH v6 5/9] secondary-vga: properly close QemuConsole on unplug Gerd Hoffmann
2018-02-28 12:31 ` Gerd Hoffmann [this message]
2018-02-28 12:31 ` [Qemu-devel] [PATCH v6 7/9] vfio/display: core & wireup Gerd Hoffmann
2018-03-05  8:52   ` Erik Skultety
2018-03-12 22:33     ` Alex Williamson
2018-02-28 12:31 ` [Qemu-devel] [PATCH v6 8/9] vfio/display: adding region support Gerd Hoffmann
2018-02-28 12:31 ` [Qemu-devel] [PATCH v6 9/9] vfio/display: adding dmabuf support Gerd Hoffmann
2018-03-01  8:59   ` Zhang, Tina
2018-02-28 12:50 ` [Qemu-devel] [PATCH v6 0/9] vfio: add display support no-reply

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=20180228123110.6507-7-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=kwankhede@nvidia.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tina.zhang@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).