diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-05-19 12:25:56 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-05-23 13:30:03 +0200 |
commit | d0f0c8654a1a97cfa7a19208afc6a6d3d0fb4326 (patch) | |
tree | 76f37242c8ff7b4e4e3323b6caaa0893922be5d4 /hw | |
parent | fe89fdebcaab696d525f2905b33d7b303111eade (diff) |
virtio-vga: propagate on gpu realized error
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1463653560-26958-3-git-send-email-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/display/virtio-gpu-3d.c | 1 | ||||
-rw-r--r-- | hw/display/virtio-vga.c | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c index fa192946a3..20e886535b 100644 --- a/hw/display/virtio-gpu-3d.c +++ b/hw/display/virtio-gpu-3d.c @@ -17,6 +17,7 @@ #include "trace.h" #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-gpu.h" +#include "qapi/error.h" #ifdef CONFIG_VIRGL diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c index e58b165ae5..f49f8deee7 100644 --- a/hw/display/virtio-vga.c +++ b/hw/display/virtio-vga.c @@ -4,6 +4,7 @@ #include "ui/console.h" #include "vga_int.h" #include "hw/virtio/virtio-pci.h" +#include "qapi/error.h" /* * virtio-vga: This extends VirtioPCIProxy. @@ -89,6 +90,7 @@ static void virtio_vga_realize(VirtIOPCIProxy *vpci_dev, Error **errp) VirtIOVGA *vvga = VIRTIO_VGA(vpci_dev); VirtIOGPU *g = &vvga->vdev; VGACommonState *vga = &vvga->vga; + Error *err = NULL; uint32_t offset; int i; @@ -124,7 +126,11 @@ static void virtio_vga_realize(VirtIOPCIProxy *vpci_dev, Error **errp) /* force virtio-1.0 */ vpci_dev->flags &= ~VIRTIO_PCI_FLAG_DISABLE_MODERN; vpci_dev->flags |= VIRTIO_PCI_FLAG_DISABLE_LEGACY; - object_property_set_bool(OBJECT(g), true, "realized", errp); + object_property_set_bool(OBJECT(g), true, "realized", &err); + if (err) { + error_propagate(errp, err); + return; + } /* add stdvga mmio regions */ pci_std_vga_mmio_region_init(vga, &vpci_dev->modern_bar, |