qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] secondary-vga: unregister vram on unplug.
@ 2018-07-20  8:19 remy.noel
  2018-08-07 13:19 ` Gerd Hoffmann
  0 siblings, 1 reply; 9+ messages in thread
From: remy.noel @ 2018-07-20  8:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: Remy Noel, Gerd Hoffmann

From: "Remy Noel" <remy.noel@blade-group.com>

When removing a secondary-vga device and then adding it back (or adding
an other one), qemu aborts with:
    "RAMBlock "0000:00:02.0/vga.vram" already registered, abort!".

It is caused by the vram staying registered, preventing vga replugging.

Signed-off-by: Remy Noel <remy.noel@blade-group.com>
---
 hw/display/vga-pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index e9e62eac70..1c89571e46 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -288,6 +288,7 @@ static void pci_secondary_vga_exit(PCIDevice *dev)
     VGACommonState *s = &d->vga;
 
     graphic_console_close(s->con);
+    vmstate_unregister_ram(&s->vram, DEVICE(dev));
 }
 
 static void pci_secondary_vga_init(Object *obj)
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-10-02 12:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-20  8:19 [Qemu-devel] [PATCH] secondary-vga: unregister vram on unplug remy.noel
2018-08-07 13:19 ` Gerd Hoffmann
2018-08-07 14:57   ` Dr. David Alan Gilbert
2018-08-07 15:06     ` Peter Maydell
2018-08-07 15:09       ` Dr. David Alan Gilbert
2018-08-11 19:07         ` Remy NOEL
2018-08-12 10:19           ` Paolo Bonzini
2018-08-30 11:28             ` Gerd Hoffmann
2018-10-02 11:55               ` Remy NOEL

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).