From nobody Sun May 19 04:55:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557217361; cv=none; d=zoho.com; s=zohoarc; b=Q++/wlujsoMHYGmGqrui1U0R2W9vCEwQPzLi5iwKsKY587DoJzY7LIV42BLNtWjN+yVCuO4MyF1FOqCh7YRPnyfKFozLxvhAtDVwTlfEBvdjyHBcUDqvW22Gbv5bLxxoGzv5BzaJ/QGsWQ3r1JOas6IDnJvEobpCU8z5Vtacogw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557217361; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=TKe64jQwheMAS31A430hSQOy+ZwUNyZ3U9yJ3MEawpA=; b=WrO9HLUgPo34+spSQGvgY7ihtuXDZZARawNIFQ9K+eUGkscq510x0y+7kcwOeXwjK0nP21h6oHI5cwyb3Tm41Kbk8twCweBxpsTvTc9VG8gv8u6S95SPSFFt507hC6Cr7S5uemmR0Tqkz2LcAGCEJFkaq3rwDzrmR+1VpczIcYM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557217361367247.0978884421272; Tue, 7 May 2019 01:22:41 -0700 (PDT) Received: from localhost ([127.0.0.1]:42059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvMz-00034w-5M for importer@patchew.org; Tue, 07 May 2019 04:22:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvKL-0000dz-O2 for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNvKK-00088s-Ns for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46226) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNvKI-00086v-Nc; Tue, 07 May 2019 04:19:50 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F3C313097025; Tue, 7 May 2019 08:19:49 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 931E6171F1; Tue, 7 May 2019 08:19:47 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 801431750B; Tue, 7 May 2019 10:19:46 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 7 May 2019 10:19:39 +0200 Message-Id: <20190507081946.19264-2-kraxel@redhat.com> In-Reply-To: <20190507081946.19264-1-kraxel@redhat.com> References: <20190507081946.19264-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 07 May 2019 08:19:50 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/8] qxl: check release info object 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: Peter Maydell , Prasad J Pandit , Alistair Francis , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Gerd Hoffmann , "Edgar E. Iglesias" , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Prasad J Pandit When releasing spice resources in release_resource() routine, if release info object 'ext.info' is null, it leads to null pointer dereference. Add check to avoid it. Reported-by: Bugs SysSec Signed-off-by: Prasad J Pandit Message-id: 20190425063534.32747-1-ppandit@redhat.com Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index c8ce5781e037..632923add239 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -777,6 +777,9 @@ static void interface_release_resource(QXLInstance *sin, QXLReleaseRing *ring; uint64_t *item, id; =20 + if (!ext.info) { + return; + } if (ext.group_id =3D=3D MEMSLOT_GROUP_HOST) { /* host group -> vga mode update request */ QXLCommandExt *cmdext =3D (void *)(intptr_t)(ext.info->id); --=20 2.18.1 From nobody Sun May 19 04:55:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557217518; cv=none; d=zoho.com; s=zohoarc; b=b6xScg440EOJnx2lGnMKbmdUHke+FL4lsRK8x+MMDXv8MMe6PyZs3AEMgU48y4J1MJkwRoTSSN42eY8bi/Lw4FSmr/Ew0h2Nqbd6tfaCCkU+9p5hMsxRiRyK7mhNGd4TU/TS0lONuCLfbbIjl/MgIkoIindQHwUgxzug7UO4SGA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557217518; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=8fE1A95Hx2odv+sVhf+dt/S3iKdzFB6EyC2GZZbFhOQ=; b=kOYp0fvurIfkf4MEeuYCJcG+wg9P5p9DRYNkpS5nR5H/88UtNzsApgvlszSyNTZPKBEsL+lBW3y4POoGlkvvhtueWV9nn1QijvscAo257ZfZqyoBjqaHfFF+YF7b3ws+N7oBBqyUXxBB76cGncSRdTJlp9SEh3CfVY4YxMJyPuw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557217518055513.3034191740587; Tue, 7 May 2019 01:25:18 -0700 (PDT) Received: from localhost ([127.0.0.1]:42086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvPO-00053l-0c for importer@patchew.org; Tue, 07 May 2019 04:25:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvKO-0000gz-T3 for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNvKN-0008Bq-RR for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35588) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNvKL-00088m-2N; Tue, 07 May 2019 04:19:53 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D20A30842B5; Tue, 7 May 2019 08:19:52 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 82E425D9E1; Tue, 7 May 2019 08:19:47 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 887FFA1E1; Tue, 7 May 2019 10:19:46 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 7 May 2019 10:19:40 +0200 Message-Id: <20190507081946.19264-3-kraxel@redhat.com> In-Reply-To: <20190507081946.19264-1-kraxel@redhat.com> References: <20190507081946.19264-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 07 May 2019 08:19:52 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/8] hw/display/cirrus_vga: Update the documentation URL 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: Peter Maydell , Alistair Francis , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Gerd Hoffmann , "Edgar E. Iglesias" , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 The documentation URL is not working, but is backed up by the Wayback Machine on the Internet Archive. Replace the outdated link by a captured one. Add another link to the VGADOC4b.ZIP archive content. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20190504121650.12651-1-philmd@redhat.com Signed-off-by: Gerd Hoffmann --- hw/display/cirrus_vga.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index a0e71469f4d0..a04440b3748c 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -23,8 +23,13 @@ * THE SOFTWARE. */ /* - * Reference: Finn Thogersons' VGADOC4b - * available at http://home.worldonline.dk/~finth/ + * Reference: Finn Thogersons' VGADOC4b: + * + * http://web.archive.org/web/20021019054927/http://home.worldonline.dk/f= inth/ + * + * VGADOC4b.ZIP content available at: + * + * https://pdos.csail.mit.edu/6.828/2005/readings/hardware/vgadoc */ #include "qemu/osdep.h" #include "qemu/units.h" --=20 2.18.1 From nobody Sun May 19 04:55:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557217409; cv=none; d=zoho.com; s=zohoarc; b=WHpY0WIZf1TFciqxl27zJewoNcMfsN56m/8amY2Qz2MtnD7H2XAA3PKdcdos6wPSc5QztpYpCLzXIZxy/jnkhDTp5LTeC0LZnKXnNvdcHFuQscOymImQmTzv6PDHzMc3CHxfVxFxmkBxnGAltxr6IklH6nj5yvomSUpfv9DGyLQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557217409; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=+kpTzrs2AV5MM+7pm6biM4tit3FfYgwu+CraFuiapuo=; b=af6mUp7BZPKyX5DM4TH21cILSLAME4EL5LYTJdgiYOqn6Dr1IDE+C/T1AFrhtkQ4iVamlsLKzVb/mQRdKjNVFluZYKzQQ5NSgjiaA8HjWaYCM3KPg3I8UaBu2Gx3oWY2F6LvqZB7ooT9+vwRNriUOitQcc2pSKjRlZosfUJ7+3g= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557217409000270.1437611299177; Tue, 7 May 2019 01:23:29 -0700 (PDT) Received: from localhost ([127.0.0.1]:42063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvNk-0003h4-V1 for importer@patchew.org; Tue, 07 May 2019 04:23:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvKO-0000ga-AE for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNvKN-0008BO-CQ for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38136) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNvKK-00088b-UJ; Tue, 07 May 2019 04:19:53 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3195E308A9BE; Tue, 7 May 2019 08:19:52 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8295F171C5; Tue, 7 May 2019 08:19:47 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 90A91A1E2; Tue, 7 May 2019 10:19:46 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 7 May 2019 10:19:41 +0200 Message-Id: <20190507081946.19264-4-kraxel@redhat.com> In-Reply-To: <20190507081946.19264-1-kraxel@redhat.com> References: <20190507081946.19264-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 07 May 2019 08:19:52 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/8] hw/display/cirrus_vga: Remove unused include 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: Peter Maydell , Alistair Francis , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Gerd Hoffmann , "Edgar E. Iglesias" , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Commit ce3cf70edaaf split the ISA device out of the PCI one, but forgot to remove the "hw/loader.h" header inclusion (the ISA device calls rom_add_vga()). Remove the now unused include. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Message-id: 20190505225640.4592-1-philmd@redhat.com Signed-off-by: Gerd Hoffmann --- hw/display/cirrus_vga.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index a04440b3748c..76c052c702ef 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -38,7 +38,6 @@ #include "hw/hw.h" #include "hw/pci/pci.h" #include "ui/pixel_ops.h" -#include "hw/loader.h" #include "cirrus_vga_internal.h" =20 /* --=20 2.18.1 From nobody Sun May 19 04:55:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557217579; cv=none; d=zoho.com; s=zohoarc; b=LQfeDr/9LO2RgRHIMiyTGtT+Tz0kHaOoqO4fHFuq3KgsFOB4J02K+JwTFUxKUu2fUfbH6zTTP/9jZxiY6aQG2Lg4hDkwa7CQ8HAWlxhQIoQH10P2V665Q3iJdZc8LzAR3msdx0ZIortP8XBQC3BVFjMWqd0a6BkV49hRMsVVLyE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557217579; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=5CfZiVkftWY/3ow9nrKpwJXnetUQ+lbdQLQWWg5uA8s=; b=ZIIRBf65Hxb63nGOcV6z3/sq0xdobdE3PzpAE5TWgl6QBw/9X9Oqv+w0m70bxKZvbomMWXfB3+Vn7hnKqIxlq6f84zn3StpQglbcXjAKsVVBoCuvPXGr+VKMZpm/JbqNjOikfJNynTUOAvdNuMRpAclm65kzg5WCju+fNRkxqwY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557217579598332.767100585668; Tue, 7 May 2019 01:26:19 -0700 (PDT) Received: from localhost ([127.0.0.1]:42133 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvQW-00060n-GX for importer@patchew.org; Tue, 07 May 2019 04:26:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvKO-0000gX-9K for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNvKN-0008BG-BT for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45704) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNvKL-00088e-03; Tue, 07 May 2019 04:19:53 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3D8B8308338F; Tue, 7 May 2019 08:19:52 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9369261B6C; Tue, 7 May 2019 08:19:47 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 98EACA1E3; Tue, 7 May 2019 10:19:46 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 7 May 2019 10:19:42 +0200 Message-Id: <20190507081946.19264-5-kraxel@redhat.com> In-Reply-To: <20190507081946.19264-1-kraxel@redhat.com> References: <20190507081946.19264-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Tue, 07 May 2019 08:19:52 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/8] vl: constify VGAInterfaceInfo 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: Peter Maydell , Alistair Francis , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Gerd Hoffmann , "Edgar E. Iglesias" , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20190412152713.16018-2-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- vl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vl.c b/vl.c index d9fea0a11966..6b2820483c43 100644 --- a/vl.c +++ b/vl.c @@ -2015,7 +2015,7 @@ typedef struct VGAInterfaceInfo { const char *class_names[2]; } VGAInterfaceInfo; =20 -static VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] =3D { +static const VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] =3D { [VGA_NONE] =3D { .opt_name =3D "none", }, @@ -2061,7 +2061,7 @@ static VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] = =3D { =20 static bool vga_interface_available(VGAInterfaceType t) { - VGAInterfaceInfo *ti =3D &vga_interfaces[t]; + const VGAInterfaceInfo *ti =3D &vga_interfaces[t]; =20 assert(t < VGA_TYPE_MAX); return !ti->class_names[0] || @@ -2076,7 +2076,7 @@ static void select_vgahw(const char *p) =20 assert(vga_interface_type =3D=3D VGA_NONE); for (t =3D 0; t < VGA_TYPE_MAX; t++) { - VGAInterfaceInfo *ti =3D &vga_interfaces[t]; + const VGAInterfaceInfo *ti =3D &vga_interfaces[t]; if (ti->opt_name && strstart(p, ti->opt_name, &opts)) { if (!vga_interface_available(t)) { error_report("%s not available", ti->name); --=20 2.18.1 From nobody Sun May 19 04:55:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557217637; cv=none; d=zoho.com; s=zohoarc; b=XGv0/qDUVH4pZTsWf3w/SFw3lAwbwDhYYJs+CNBxe5UTDl9F0Bq0aMuJkJpZXIU5/MsbMMppS096LiW9i9fhsrqgoCluYjMWkIA+U/6ZqCwUz3kCsbrFr22Exoa4s1l3hkoJAanM0I1cMXb/8kAWzCwfiYzvFs7JfKlxdUjp/c8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557217637; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=kvnhc47Iwf65Hq/fR0ew/48WA5GznF2dB4FmCj6mxcM=; b=VIGwpCnNmQhkAC8skYI+HHfV98bK4M6Bq9PdV8X7DGxBb3FWWD+WPL2iG/GaXuUDGWRqmRcao+8UVmuIZ1xtsfx/BUMrvDvxS1bbYLPXOXgoAqncX1JJr4zqcOqDKRcPjdRpUs/h0jCkaPi1U0hJydxDs1w8s7Naci+ggE0w9pE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 155721763745957.804972164581386; Tue, 7 May 2019 01:27:17 -0700 (PDT) Received: from localhost ([127.0.0.1]:42149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvRS-00078h-Fy for importer@patchew.org; Tue, 07 May 2019 04:27:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvKS-0000id-AS for qemu-devel@nongnu.org; Tue, 07 May 2019 04:20:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNvKR-0008EL-CI for qemu-devel@nongnu.org; Tue, 07 May 2019 04:20:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43264) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNvKN-0008BS-UE; Tue, 07 May 2019 04:19:56 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 31900C007344; Tue, 7 May 2019 08:19:55 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id C0B945B097; Tue, 7 May 2019 08:19:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A145AA1E4; Tue, 7 May 2019 10:19:46 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 7 May 2019 10:19:43 +0200 Message-Id: <20190507081946.19264-6-kraxel@redhat.com> In-Reply-To: <20190507081946.19264-1-kraxel@redhat.com> References: <20190507081946.19264-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 07 May 2019 08:19:55 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 5/8] vl: add -vga help support 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: Peter Maydell , Alistair Francis , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Gerd Hoffmann , "Edgar E. Iglesias" , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Marc-Andr=C3=A9 Lureau Provide help output similar to other argument help handling: $ qemu-system-x86_64 -vga help none std standard VGA (default) cirrus Cirrus VGA vmware VMWare SVGA xenfb qxl QXL VGA virtio Virtio VG Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20190412152713.16018-3-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- vl.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/vl.c b/vl.c index 6b2820483c43..b6709514c1bb 100644 --- a/vl.c +++ b/vl.c @@ -2069,11 +2069,39 @@ static bool vga_interface_available(VGAInterfaceTyp= e t) object_class_by_name(ti->class_names[1]); } =20 -static void select_vgahw(const char *p) +static const char * +get_default_vga_model(const MachineClass *machine_class) +{ + if (machine_class->default_display) { + return machine_class->default_display; + } else if (vga_interface_available(VGA_CIRRUS)) { + return "cirrus"; + } else if (vga_interface_available(VGA_STD)) { + return "std"; + } + + return NULL; +} + +static void select_vgahw(const MachineClass *machine_class, const char *p) { const char *opts; int t; =20 + if (g_str_equal(p, "help")) { + const char *def =3D get_default_vga_model(machine_class); + + for (t =3D 0; t < VGA_TYPE_MAX; t++) { + const VGAInterfaceInfo *ti =3D &vga_interfaces[t]; + + if (vga_interface_available(t) && ti->opt_name) { + printf("%-20s %s%s\n", ti->opt_name, ti->name ?: "", + g_str_equal(ti->opt_name, def) ? " (default)" : ""); + } + } + exit(0); + } + assert(vga_interface_type =3D=3D VGA_NONE); for (t =3D 0; t < VGA_TYPE_MAX; t++) { const VGAInterfaceInfo *ti =3D &vga_interfaces[t]; @@ -4424,16 +4452,10 @@ int main(int argc, char **argv, char **envp) =20 /* If no default VGA is requested, the default is "none". */ if (default_vga) { - if (machine_class->default_display) { - vga_model =3D machine_class->default_display; - } else if (vga_interface_available(VGA_CIRRUS)) { - vga_model =3D "cirrus"; - } else if (vga_interface_available(VGA_STD)) { - vga_model =3D "std"; - } + vga_model =3D get_default_vga_model(machine_class); } if (vga_model) { - select_vgahw(vga_model); + select_vgahw(machine_class, vga_model); } =20 if (watchdog) { --=20 2.18.1 From nobody Sun May 19 04:55:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557217728; cv=none; d=zoho.com; s=zohoarc; b=X8TsTgwV43jVe2mKJXbpvtMFkDevpdWFEDfpVLaMULOX9GVgb/UyzWgz3jZpkrRFSsT/aZpnX6E1/tj1ABhHxHyOxx66H5If1AL+tZ1mjDrpedIk2DM9ntyHJPCO53wt8cOn7vk9eehLYtqZ/Cqp1yMVjVLYyHlMOLvoF1RcccI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557217728; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=I21YvCPcgIVWbXvdF2W09kroqqJtXmX6zqaLH/cAbjI=; b=jTw3BbP0xHNg5U+92I7kDKlTSogRsJw5PkerwDWUwf3WvdJ3+LupvYVl/tKPBfRm/ccSBY6Xe/4+tXXqpolGOaqTsCCtUBwt82846Zdjj9LOxWRpcBh1/MCzxrmTfXbveiNAHlZpLPHnaH8wFR1NU0cWb6zHQqbmbdJ/+yG/RFQ= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557217728627969.7304299076161; Tue, 7 May 2019 01:28:48 -0700 (PDT) Received: from localhost ([127.0.0.1]:42171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvSs-0008NR-Jl for importer@patchew.org; Tue, 07 May 2019 04:28:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvKU-0000lD-2Y for qemu-devel@nongnu.org; Tue, 07 May 2019 04:20:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNvKS-0008Ff-Uh for qemu-devel@nongnu.org; Tue, 07 May 2019 04:20:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49478) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNvKM-0008AC-HF; Tue, 07 May 2019 04:19:54 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ABBC630821A3; Tue, 7 May 2019 08:19:53 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id C451F277A5; Tue, 7 May 2019 08:19:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id A9B73A1E8; Tue, 7 May 2019 10:19:46 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 7 May 2019 10:19:44 +0200 Message-Id: <20190507081946.19264-7-kraxel@redhat.com> In-Reply-To: <20190507081946.19264-1-kraxel@redhat.com> References: <20190507081946.19264-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 07 May 2019 08:19:53 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 6/8] qxl: avoid unaligned pointer reads/writes 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: Peter Maydell , Alistair Francis , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Gerd Hoffmann , "Edgar E. Iglesias" , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Daniel P. Berrang=C3=A9 The SPICE_RING_PROD_ITEM() macro is initializing a local 'uint64_t *' variable to point to the 'el' field inside the QXLReleaseRing struct. This uint64_t field is not guaranteed aligned as the struct is packed. Code should not take the address of fields within a packed struct. Changing the SPICE_RING_PROD_ITEM() macro to avoid taking the address of the field is impractical. It is clearer to just remove the macro and inline its functionality in the three call sites that need it. Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20190412121626.19829-6-berrange@redhat.com> Signed-off-by: Gerd Hoffmann --- hw/display/qxl.c | 55 +++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 632923add239..3880a7410b73 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -33,24 +33,6 @@ =20 #include "qxl.h" =20 -/* - * NOTE: SPICE_RING_PROD_ITEM accesses memory on the pci bar and as - * such can be changed by the guest, so to avoid a guest trigerrable - * abort we just qxl_set_guest_bug and set the return to NULL. Still - * it may happen as a result of emulator bug as well. - */ -#undef SPICE_RING_PROD_ITEM -#define SPICE_RING_PROD_ITEM(qxl, r, ret) { \ - uint32_t prod =3D (r)->prod & SPICE_RING_INDEX_MASK(r); \ - if (prod >=3D ARRAY_SIZE((r)->items)) { \ - qxl_set_guest_bug(qxl, "SPICE_RING_PROD_ITEM indices mismatch = " \ - "%u >=3D %zu", prod, ARRAY_SIZE((r)->items)); \ - ret =3D NULL; \ - } else { \ - ret =3D &(r)->items[prod].el; \ - } \ - } - #undef SPICE_RING_CONS_ITEM #define SPICE_RING_CONS_ITEM(qxl, r, ret) { \ uint32_t cons =3D (r)->cons & SPICE_RING_INDEX_MASK(r); \ @@ -414,7 +396,8 @@ static void init_qxl_rom(PCIQXLDevice *d) static void init_qxl_ram(PCIQXLDevice *d) { uint8_t *buf; - uint64_t *item; + uint32_t prod; + QXLReleaseRing *ring; =20 buf =3D d->vga.vram_ptr; d->ram =3D (QXLRam *)(buf + le32_to_cpu(d->shadow_rom.ram_header_offse= t)); @@ -426,9 +409,12 @@ static void init_qxl_ram(PCIQXLDevice *d) SPICE_RING_INIT(&d->ram->cmd_ring); SPICE_RING_INIT(&d->ram->cursor_ring); SPICE_RING_INIT(&d->ram->release_ring); - SPICE_RING_PROD_ITEM(d, &d->ram->release_ring, item); - assert(item); - *item =3D 0; + + ring =3D &d->ram->release_ring; + prod =3D ring->prod & SPICE_RING_INDEX_MASK(ring); + assert(prod < ARRAY_SIZE(ring->items)); + ring->items[prod].el =3D 0; + qxl_ring_set_dirty(d); } =20 @@ -732,7 +718,7 @@ static int interface_req_cmd_notification(QXLInstance *= sin) static inline void qxl_push_free_res(PCIQXLDevice *d, int flush) { QXLReleaseRing *ring =3D &d->ram->release_ring; - uint64_t *item; + uint32_t prod; int notify; =20 #define QXL_FREE_BUNCH_SIZE 32 @@ -759,11 +745,15 @@ static inline void qxl_push_free_res(PCIQXLDevice *d,= int flush) if (notify) { qxl_send_events(d, QXL_INTERRUPT_DISPLAY); } - SPICE_RING_PROD_ITEM(d, ring, item); - if (!item) { + + ring =3D &d->ram->release_ring; + prod =3D ring->prod & SPICE_RING_INDEX_MASK(ring); + if (prod >=3D ARRAY_SIZE(ring->items)) { + qxl_set_guest_bug(d, "SPICE_RING_PROD_ITEM indices mismatch " + "%u >=3D %zu", prod, ARRAY_SIZE(ring->items)); return; } - *item =3D 0; + ring->items[prod].el =3D 0; d->num_free_res =3D 0; d->last_release =3D NULL; qxl_ring_set_dirty(d); @@ -775,7 +765,8 @@ static void interface_release_resource(QXLInstance *sin, { PCIQXLDevice *qxl =3D container_of(sin, PCIQXLDevice, ssd.qxl); QXLReleaseRing *ring; - uint64_t *item, id; + uint32_t prod; + uint64_t id; =20 if (!ext.info) { return; @@ -795,16 +786,18 @@ static void interface_release_resource(QXLInstance *s= in, * pci bar 0, $command.release_info */ ring =3D &qxl->ram->release_ring; - SPICE_RING_PROD_ITEM(qxl, ring, item); - if (!item) { + prod =3D ring->prod & SPICE_RING_INDEX_MASK(ring); + if (prod >=3D ARRAY_SIZE(ring->items)) { + qxl_set_guest_bug(qxl, "SPICE_RING_PROD_ITEM indices mismatch " + "%u >=3D %zu", prod, ARRAY_SIZE(ring->items)); return; } - if (*item =3D=3D 0) { + if (ring->items[prod].el =3D=3D 0) { /* stick head into the ring */ id =3D ext.info->id; ext.info->next =3D 0; qxl_ram_set_dirty(qxl, &ext.info->next); - *item =3D id; + ring->items[prod].el =3D id; qxl_ring_set_dirty(qxl); } else { /* append item to the list */ --=20 2.18.1 From nobody Sun May 19 04:55:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557217371; cv=none; d=zoho.com; s=zohoarc; b=fQ6L0mO+BCy0nv+ZqDDJ3fpVjPf8hVM79wGhGKUEiGP1zFI+lbh2QesPeglhweB4VVd6Szlxh9aHQGaNbQY5M19xljk/96j1TakPGMFQBV+nopI2815bCy/wCR0Y/31FHuCN42FjpboD+iU0tDrndRLbV+tdmjDKyDENIUrVygc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557217371; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=sF4g5YBTChoqXzlCzbAgoz6oX5cWHotMAiuOzE1YM2c=; b=Qtxz3kIobzewFnSPzwDmz+i3tVin4y3WaAwkFX4BW82o1gFZB9C0ypOYc3n/02AM9QTaDPZxxrjVYDQNdM/Lf2D0DcaltKQA23H//kBZirpoGrXFOdk7yK1njSeBJqsN9WJdzBgrLYTBzv2ri1ibiRkL3o1hHFskbzH0j2hSLzs= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557217371785355.4755418847244; Tue, 7 May 2019 01:22:51 -0700 (PDT) Received: from localhost ([127.0.0.1]:42061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvNA-0003Dq-Ph for importer@patchew.org; Tue, 07 May 2019 04:22:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvKP-0000h2-Jd for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNvKO-0008Cu-KI for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53826) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNvKM-0008A7-DX; Tue, 07 May 2019 04:19:54 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A18843082134; Tue, 7 May 2019 08:19:53 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id DDD39614D6; Tue, 7 May 2019 08:19:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B1C8AA1E9; Tue, 7 May 2019 10:19:46 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 7 May 2019 10:19:45 +0200 Message-Id: <20190507081946.19264-8-kraxel@redhat.com> In-Reply-To: <20190507081946.19264-1-kraxel@redhat.com> References: <20190507081946.19264-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 07 May 2019 08:19:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 7/8] ati-vga: Fix check for blt outside vram 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: Peter Maydell , Alistair Francis , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Gerd Hoffmann , "Edgar E. Iglesias" , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan Fix the check preventing calling pixman functions that would access memory outside allocated vram. The r128 X driver sometimes seem to try blits that span outside vram, this check prevents crashing QEMU in that case. (The r128 X driver may have problems even on real hardware so I'm not sure if it's a client bug or emulation problem but at least QEMU should survive.) Signed-off-by: BALATON Zoltan Tested-by: Andrew Randrianasulu Message-Id: <20190409110732.5C5FF7465DB@zero.eik.bme.hu> Signed-off-by: Gerd Hoffmann --- hw/display/ati_2d.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/display/ati_2d.c b/hw/display/ati_2d.c index bc98ba6eebf6..fe3ae148647b 100644 --- a/hw/display/ati_2d.c +++ b/hw/display/ati_2d.c @@ -79,10 +79,10 @@ void ati_2d_blt(ATIVGAState *s) s->regs.dst_width, s->regs.dst_height); end =3D s->vga.vram_ptr + s->vga.vram_size; if (src_bits >=3D end || dst_bits >=3D end || - src_bits + (s->regs.src_y + s->regs.dst_height) * src_stride + - s->regs.src_x >=3D end || - dst_bits + (s->regs.dst_y + s->regs.dst_height) * dst_stride + - s->regs.dst_x >=3D end) { + src_bits + s->regs.src_x + (s->regs.src_y + s->regs.dst_height= ) * + src_stride * sizeof(uint32_t) >=3D end || + dst_bits + s->regs.dst_x + (s->regs.dst_y + s->regs.dst_height= ) * + dst_stride * sizeof(uint32_t) >=3D end) { qemu_log_mask(LOG_UNIMP, "blt outside vram not implemented\n"); return; } @@ -140,8 +140,8 @@ void ati_2d_blt(ATIVGAState *s) filler); end =3D s->vga.vram_ptr + s->vga.vram_size; if (dst_bits >=3D end || - dst_bits + (s->regs.dst_y + s->regs.dst_height) * dst_stride + - s->regs.dst_x >=3D end) { + dst_bits + s->regs.dst_x + (s->regs.dst_y + s->regs.dst_height= ) * + dst_stride * sizeof(uint32_t) >=3D end) { qemu_log_mask(LOG_UNIMP, "blt outside vram not implemented\n"); return; } --=20 2.18.1 From nobody Sun May 19 04:55:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1557217550; cv=none; d=zoho.com; s=zohoarc; b=kZvgdPVoPDDE1QmJ6d+9oMGmPZ4acnDpEkNjfqTO294Mk/NxsGJh44E39VA1LYWhGbJzu21s1HcspeYXDjv8HBCuzhMWoTG5s621Sb+8cm2iGlO4EUSsv9+FJuZW1CTdjtk6K1AwD/ZZSstUYKxanMFTbo4lTW1kYpkIroaqwAY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557217550; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=cezArTSQJn5DV1ANFpz7CZJhepwT89nmuQEX7MjA+HQ=; b=a3aXejIXtOHBHIE/4YQb8X/OwmXBZt2KWmHKxjM3I13Qw0rD3lR5CTqZQ8WvWtAL11r9WBoRj5qBJJ2PQnkaPfr+fwJOlyNEq0EVEd4fa7uKxbW+HmsgRIQGVF1g1sChHnpQn62EbaRjMRE9vP3LKmzRQD0jX2D2Oi9aMfgivrY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557217550665780.4929593457921; Tue, 7 May 2019 01:25:50 -0700 (PDT) Received: from localhost ([127.0.0.1]:42118 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvQ2-0005YT-KA for importer@patchew.org; Tue, 07 May 2019 04:25:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNvKO-0000gT-76 for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNvKN-0008B4-0U for qemu-devel@nongnu.org; Tue, 07 May 2019 04:19:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28115) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hNvKK-000881-8d; Tue, 07 May 2019 04:19:52 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C2A983F3C; Tue, 7 May 2019 08:19:51 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-45.ams2.redhat.com [10.36.116.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB21F171F1; Tue, 7 May 2019 08:19:50 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C3765A1EA; Tue, 7 May 2019 10:19:46 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 7 May 2019 10:19:46 +0200 Message-Id: <20190507081946.19264-9-kraxel@redhat.com> In-Reply-To: <20190507081946.19264-1-kraxel@redhat.com> References: <20190507081946.19264-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 07 May 2019 08:19:51 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 8/8] i2c-ddc: move it to hw/display 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: Peter Maydell , Alistair Francis , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, Gerd Hoffmann , "Edgar E. Iglesias" , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Paolo Bonzini Move it together with the other EDID code. hw/i2c should only include the core and the adapters, not the slaves. Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20190325155923.30987-1-pbonzini@redhat.com Signed-off-by: Gerd Hoffmann --- include/hw/{i2c =3D> display}/i2c-ddc.h | 0 include/hw/display/xlnx_dp.h | 2 +- hw/{i2c =3D> display}/i2c-ddc.c | 2 +- hw/display/sii9022.c | 2 +- hw/display/sm501.c | 2 +- hw/display/Kconfig | 5 +++++ hw/display/Makefile.objs | 1 + hw/i2c/Kconfig | 5 ----- hw/i2c/Makefile.objs | 1 - 9 files changed, 10 insertions(+), 10 deletions(-) rename include/hw/{i2c =3D> display}/i2c-ddc.h (100%) rename hw/{i2c =3D> display}/i2c-ddc.c (99%) diff --git a/include/hw/i2c/i2c-ddc.h b/include/hw/display/i2c-ddc.h similarity index 100% rename from include/hw/i2c/i2c-ddc.h rename to include/hw/display/i2c-ddc.h diff --git a/include/hw/display/xlnx_dp.h b/include/hw/display/xlnx_dp.h index 26b759cd448d..45a805033a53 100644 --- a/include/hw/display/xlnx_dp.h +++ b/include/hw/display/xlnx_dp.h @@ -27,7 +27,7 @@ #include "hw/misc/auxbus.h" #include "hw/i2c/i2c.h" #include "hw/display/dpcd.h" -#include "hw/i2c/i2c-ddc.h" +#include "hw/display/i2c-ddc.h" #include "qemu/fifo8.h" #include "qemu/units.h" #include "hw/dma/xlnx_dpdma.h" diff --git a/hw/i2c/i2c-ddc.c b/hw/display/i2c-ddc.c similarity index 99% rename from hw/i2c/i2c-ddc.c rename to hw/display/i2c-ddc.c index 7aa872777145..9fe5403a923e 100644 --- a/hw/i2c/i2c-ddc.c +++ b/hw/display/i2c-ddc.c @@ -20,7 +20,7 @@ #include "qemu-common.h" #include "qemu/log.h" #include "hw/i2c/i2c.h" -#include "hw/i2c/i2c-ddc.h" +#include "hw/display/i2c-ddc.h" =20 #ifndef DEBUG_I2CDDC #define DEBUG_I2CDDC 0 diff --git a/hw/display/sii9022.c b/hw/display/sii9022.c index 9994385c35a2..9c36e4c17ec9 100644 --- a/hw/display/sii9022.c +++ b/hw/display/sii9022.c @@ -16,7 +16,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "hw/i2c/i2c.h" -#include "hw/i2c/i2c-ddc.h" +#include "hw/display/i2c-ddc.h" #include "trace.h" =20 #define SII9022_SYS_CTRL_DATA 0x1a diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 2122291308f0..1e2709b2d002 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -35,7 +35,7 @@ #include "hw/sysbus.h" #include "hw/pci/pci.h" #include "hw/i2c/i2c.h" -#include "hw/i2c/i2c-ddc.h" +#include "hw/display/i2c-ddc.h" #include "qemu/range.h" #include "ui/pixel_ops.h" #include "qemu/bswap.h" diff --git a/hw/display/Kconfig b/hw/display/Kconfig index 72be57a40311..c236cd2d0a7c 100644 --- a/hw/display/Kconfig +++ b/hw/display/Kconfig @@ -1,3 +1,8 @@ +config DDC + bool + depends on I2C + select EDID + config EDID bool =20 diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index dbd453ab1b01..650031f72536 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -1,3 +1,4 @@ +common-obj-$(CONFIG_DDC) +=3D i2c-ddc.o common-obj-$(CONFIG_EDID) +=3D edid-generate.o edid-region.o =20 common-obj-$(CONFIG_FW_CFG_DMA) +=3D ramfb.o diff --git a/hw/i2c/Kconfig b/hw/i2c/Kconfig index 820b24de5b27..78a2008e3ad5 100644 --- a/hw/i2c/Kconfig +++ b/hw/i2c/Kconfig @@ -5,11 +5,6 @@ config SMBUS_EEPROM bool depends on I2C =20 -config DDC - bool - depends on I2C - select EDID - config VERSATILE_I2C bool select I2C diff --git a/hw/i2c/Makefile.objs b/hw/i2c/Makefile.objs index 5f76b6a9909a..d7073a401f1c 100644 --- a/hw/i2c/Makefile.objs +++ b/hw/i2c/Makefile.objs @@ -1,6 +1,5 @@ common-obj-$(CONFIG_I2C) +=3D core.o smbus_slave.o smbus_master.o common-obj-$(CONFIG_SMBUS_EEPROM) +=3D smbus_eeprom.o -common-obj-$(CONFIG_DDC) +=3D i2c-ddc.o common-obj-$(CONFIG_VERSATILE_I2C) +=3D versatile_i2c.o common-obj-$(CONFIG_ACPI_X86_ICH) +=3D smbus_ich9.o common-obj-$(CONFIG_ACPI_SMBUS) +=3D pm_smbus.o --=20 2.18.1