aboutsummaryrefslogtreecommitdiff
path: root/hw/display/virtio-vga.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-06-26 08:09:41 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-06-26 16:03:40 +0200
commit93abfc88bd649de1933588bfc7175605331b3ea9 (patch)
tree8821fb65c40968ba4d1d0f646b7d55877d71c09b /hw/display/virtio-vga.c
parente409d9a158c77c650651e8118f6c86c8dc76eba6 (diff)
vga: set owner for mmio regions
This makes sure the regions are properly cleaned when unplugging -device seconday-vga. Reported-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Thomas Huth <thuth@redhat.com> Message-id: 20180626060941.8326-1-kraxel@redhat.com
Diffstat (limited to 'hw/display/virtio-vga.c')
-rw-r--r--hw/display/virtio-vga.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
index baa74ba82c..97db6c3372 100644
--- a/hw/display/virtio-vga.c
+++ b/hw/display/virtio-vga.c
@@ -152,7 +152,7 @@ static void virtio_vga_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
}
/* add stdvga mmio regions */
- pci_std_vga_mmio_region_init(vga, &vpci_dev->modern_bar,
+ pci_std_vga_mmio_region_init(vga, OBJECT(vvga), &vpci_dev->modern_bar,
vvga->vga_mrs, true);
vga->con = g->scanout[0].con;