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 5/9] secondary-vga: properly close QemuConsole on unplug
Date: Wed, 28 Feb 2018 13:31:06 +0100	[thread overview]
Message-ID: <20180228123110.6507-6-kraxel@redhat.com> (raw)
In-Reply-To: <20180228123110.6507-1-kraxel@redhat.com>

Using the new graphic_console_close() function.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/vga-pci.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index 1674bd3581..f312930664 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -292,6 +292,14 @@ static void pci_secondary_vga_realize(PCIDevice *dev, Error **errp)
     pci_register_bar(&d->dev, 2, PCI_BASE_ADDRESS_SPACE_MEMORY, &d->mmio);
 }
 
+static void pci_secondary_vga_exit(PCIDevice *dev)
+{
+    PCIVGAState *d = PCI_VGA(dev);
+    VGACommonState *s = &d->vga;
+
+    graphic_console_close(s->con);
+}
+
 static void pci_secondary_vga_init(Object *obj)
 {
     /* Expose framebuffer byteorder via QOM */
@@ -361,6 +369,7 @@ static void secondary_class_init(ObjectClass *klass, void *data)
     PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
 
     k->realize = pci_secondary_vga_realize;
+    k->exit = pci_secondary_vga_exit;
     k->class_id = PCI_CLASS_DISPLAY_OTHER;
     dc->props = secondary_pci_properties;
     dc->reset = pci_secondary_vga_reset;
-- 
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 ` Gerd Hoffmann [this message]
2018-02-28 12:31 ` [Qemu-devel] [PATCH v6 6/9] vfio/common: cleanup in vfio_region_finalize Gerd Hoffmann
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-6-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).