From patchwork Thu May 19 10:25:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 9126151 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8ECFE9F1C3 for ; Thu, 19 May 2016 10:26:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E162F20219 for ; Thu, 19 May 2016 10:26:45 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3E86D20218 for ; Thu, 19 May 2016 10:26:45 +0000 (UTC) Received: from localhost ([::1]:49244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3LAC-00057i-94 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 19 May 2016 06:26:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3L9f-00053z-FU for qemu-devel@nongnu.org; Thu, 19 May 2016 06:26:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3L9d-0005RY-GB for qemu-devel@nongnu.org; Thu, 19 May 2016 06:26:10 -0400 Received: from mail-qg0-x241.google.com ([2607:f8b0:400d:c04::241]:32980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3L9d-0005RU-Bi for qemu-devel@nongnu.org; Thu, 19 May 2016 06:26:09 -0400 Received: by mail-qg0-x241.google.com with SMTP id 90so6455887qgz.0 for ; Thu, 19 May 2016 03:26:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FPh1Bygs8yr8uQKlnEogUupFVQqGj3WLFJN2KyQxp/A=; b=L114pz3LFudjQQhsEjDu2QFfxqnBQKKnBP/5yok7bPC5Vo0j2v0ncy1goX5hTKsgvH mT/x4Ey31nwgn9NiT5IpI71UCLb83ggCBhf9mOJu3/JPHIWbRUErYYo2/8FtT46mdBnE zQ8gIx64TDHTAzJFqG9TBYTVij8fqvOMPVo9pEM+ZBY2mowKWDde8pyW5HtDbANli70Z FtJLaou0XWKmKS9x9nhrZE3LNUCVd1ChBzwPAaOwYrBQ6lrIYYCFwB1tWF/LRlM55KOk w8qTRM1tgJNQNPdWlrKX+iO1N3razMcEUdqdYtAYxh8QJCsB5GcbpBq1++VAVjVSqIwL WGYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=FPh1Bygs8yr8uQKlnEogUupFVQqGj3WLFJN2KyQxp/A=; b=TjzGTS20dI8Zw0otgNcm92NiStpxQc1R6QbqnNJRIhXkC+W/gEjEfiUuMLQC7UDv9L 698/x9/yzWtbxuB2CMJkr5of8fu+xpPL1Wk8ghuQXquRlfHQVemvVUpWUVo7tqqXR//o xoW9K500oKQXLp1Gq6z5hLgFu7LjSt7LDWol91hxNLU3P+G8I5rB6ytuAiHulYalWgij EQszVI1nljRaZwOW2n2vzQ4bIf7rV1ogV73bUF2iWFqhYURrSp2HPRF65eVBYt9yTgzX plj4yjg21iUh7BrD4psvilfq6N8q/kxCd3Wf5oOX72ZRdhTqGlGyDErS5r+Pbzz06jc0 VzmA== X-Gm-Message-State: AOPr4FVh0LDV9USIuPBCMydkbm22za2azFUatFgqJrKr/bAQV38czTS8SXl/zTbgWIPMzQ== X-Received: by 10.140.233.140 with SMTP id e134mr13423459qhc.38.1463653569066; Thu, 19 May 2016 03:26:09 -0700 (PDT) Received: from localhost (bne75-h02-31-39-163-232.dsl.sta.abo.bbox.fr. [31.39.163.232]) by smtp.gmail.com with ESMTPSA id f204sm6305271qhe.1.2016.05.19.03.26.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 May 2016 03:26:08 -0700 (PDT) From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Date: Thu, 19 May 2016 12:25:56 +0200 Message-Id: <1463653560-26958-3-git-send-email-marcandre.lureau@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1463653560-26958-1-git-send-email-marcandre.lureau@redhat.com> References: <1463653560-26958-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c04::241 Subject: [Qemu-devel] [PATCH 2/6] virtio-vga: propagate on gpu realized error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , kraxel@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- 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,