From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4p2a-00041a-Hq for qemu-devel@nongnu.org; Mon, 23 May 2016 08:33:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4p2S-0008IQ-Ux for qemu-devel@nongnu.org; Mon, 23 May 2016 08:33:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4p2S-0008Hh-Pr for qemu-devel@nongnu.org; Mon, 23 May 2016 08:32:52 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 31F2C85545 for ; Mon, 23 May 2016 12:32:50 +0000 (UTC) From: Gerd Hoffmann Date: Mon, 23 May 2016 14:32:38 +0200 Message-Id: <1464006764-8115-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1464006764-8115-1-git-send-email-kraxel@redhat.com> References: <1464006764-8115-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 2/7] virtio-vga: propagate on gpu realized error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , "Michael S. Tsirkin" From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 1463653560-26958-3-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- 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" =20 #ifdef CONFIG_VIRGL =20 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" =20 /* * virtio-vga: This extends VirtioPCIProxy. @@ -89,6 +90,7 @@ static void virtio_vga_realize(VirtIOPCIProxy *vpci_dev= , Error **errp) VirtIOVGA *vvga =3D VIRTIO_VGA(vpci_dev); VirtIOGPU *g =3D &vvga->vdev; VGACommonState *vga =3D &vvga->vga; + Error *err =3D NULL; uint32_t offset; int i; =20 @@ -124,7 +126,11 @@ static void virtio_vga_realize(VirtIOPCIProxy *vpci_= dev, Error **errp) /* force virtio-1.0 */ vpci_dev->flags &=3D ~VIRTIO_PCI_FLAG_DISABLE_MODERN; vpci_dev->flags |=3D 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; + } =20 /* add stdvga mmio regions */ pci_std_vga_mmio_region_init(vga, &vpci_dev->modern_bar, --=20 1.8.3.1