From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PULL 2/7] virtio-vga: propagate on gpu realized error
Date: Mon, 23 May 2016 14:32:38 +0200 [thread overview]
Message-ID: <1464006764-8115-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1464006764-8115-1-git-send-email-kraxel@redhat.com>
From: Marc-André Lureau <marcandre.lureau@redhat.com>
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>
---
hw/display/virtio-gpu-3d.c | 1 +
hw/display/virtio-vga.c | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
index fa19294..20e8865 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 e58b165..f49f8de 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,
--
1.8.3.1
next prev parent reply other threads:[~2016-05-23 12:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-23 12:32 [Qemu-devel] [PULL 0/7] vga fixes Gerd Hoffmann
2016-05-23 12:32 ` [Qemu-devel] [PULL 1/7] virtio-gpu: check early scanout id Gerd Hoffmann
2016-05-23 12:32 ` Gerd Hoffmann [this message]
2016-05-23 12:32 ` [Qemu-devel] [PULL 3/7] virtio-gpu: check max_outputs value Gerd Hoffmann
2016-05-23 12:32 ` [Qemu-devel] [PULL 4/7] virtio-gpu: check max_outputs only Gerd Hoffmann
2016-05-23 12:32 ` [Qemu-devel] [PULL 5/7] virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS Gerd Hoffmann
2016-05-23 12:32 ` [Qemu-devel] [PULL 6/7] virtio-gpu: fix ui idx check Gerd Hoffmann
2016-05-23 12:32 ` [Qemu-devel] [PULL 7/7] vga: add sr_vbe register set Gerd Hoffmann
2016-05-23 14:52 ` [Qemu-devel] [PULL 0/7] vga fixes 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=1464006764-8115-3-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).