From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>,
"remy.noel" <remy.noel@blade-group.com>
Subject: [Qemu-devel] [PULL 3/4] secondary-vga: delete mmio subregions upon exit
Date: Fri, 5 Oct 2018 13:11:56 +0200 [thread overview]
Message-ID: <20181005111157.12801-4-kraxel@redhat.com> (raw)
In-Reply-To: <20181005111157.12801-1-kraxel@redhat.com>
From: "remy.noel" <remy.noel@blade-group.com>
93abfc88bd649de1933588bfc7175605331b3ea9 introduced a reference cycle in
the vga-pci devices, preventing cleanup of the object upon hotblug.
This patch allows to break the cycle.
Signed-off-by: remy.noel <remy.noel@blade-group.com>
Message-id: 20181002121935.23706-1-remy.noel@blade-group.com
[ kraxel: delete the recently added edid region too ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/display/vga-pci.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index 24ca1b3e1f..a17c96e703 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -309,6 +309,14 @@ static void pci_secondary_vga_exit(PCIDevice *dev)
VGACommonState *s = &d->vga;
graphic_console_close(s->con);
+ memory_region_del_subregion(&d->mmio, &d->mrs[0]);
+ memory_region_del_subregion(&d->mmio, &d->mrs[1]);
+ if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) {
+ memory_region_del_subregion(&d->mmio, &d->mrs[2]);
+ }
+ if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_EDID)) {
+ memory_region_del_subregion(&d->mmio, &d->mrs[3]);
+ }
}
static void pci_secondary_vga_init(Object *obj)
--
2.9.3
next prev parent reply other threads:[~2018-10-05 11:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 11:11 [Qemu-devel] [PULL 0/4] Vga 20181005 patches Gerd Hoffmann
2018-10-05 11:11 ` [Qemu-devel] [PULL 1/4] edid: Ignore built binary Gerd Hoffmann
2018-10-05 11:11 ` [Qemu-devel] [PULL 2/4] hw/display/qxl: Suppress clang-7 warning about misaligned atomic operation Gerd Hoffmann
2018-10-05 11:11 ` Gerd Hoffmann [this message]
2018-10-05 11:11 ` [Qemu-devel] [PULL 4/4] edid: fix vendor default Gerd Hoffmann
2018-10-08 9:02 ` [Qemu-devel] [PULL 0/4] Vga 20181005 patches Peter Maydell
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=20181005111157.12801-4-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=remy.noel@blade-group.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).