From nobody Thu Nov 13 17:44:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582054875381598.6155160101141; Tue, 18 Feb 2020 11:41:15 -0800 (PST) Received: from localhost ([::1]:41066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48k6-0005Hd-4N for importer@patchew.org; Tue, 18 Feb 2020 14:41:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54830) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48iV-0003YQ-DG for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j48iU-0004Cx-AV for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:35 -0500 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:43602) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j48iU-0004BO-4v for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:34 -0500 Received: by mail-pf1-x429.google.com with SMTP id s1so11149970pfh.10 for ; Tue, 18 Feb 2020 11:39:34 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id y15sm424395pgj.78.2020.02.18.11.39.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:39:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oxNPd/QkKRHeWi1ZwK35YEXvYDOJm8fo+psN51CFfCE=; b=QqNDPA96P6n8HKuahSWYbC6VO/tDywq9jGpeOVoQIlhZnod8THLzSpU9IJQkmMT9x1 I5/P7WfapfgYf1hLF5GFkAtfK5lBxnU5C+zgOEClroyU/hzD5dKusLAplgJHAP2rhKPN LURe35h5QbwEdLLfrMH8Nn4S7dpLKYZTUTvq0EiivEaZz74NPaFwtG7c7XM7ntcLN1Jo +rF1/9OjvZyvZLk07k+Uov/vEyCF6mqsH4v7YF92g12uRKEAglMco9z3ywatVliCsq/K MOjc59ccpXPdwaR5nuYfr1wZMl1DMDrxj09kGKZiiJ2mTB7ENa3mNxAdTRoL18YjblzB iZsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oxNPd/QkKRHeWi1ZwK35YEXvYDOJm8fo+psN51CFfCE=; b=CC6EyFdDQ3MQktAqtrft471LZC3zeMegZ0BNtwfxRmrfGeKIFuk3i4KU+w55ExWL86 9KyOVJqVvyDaX/UZZv0xv1lyUAaAHUnfhXnyF2PoCI4K9NxXNFHLAWeE+3JxVCh6zIJN pwpivyQ7dcPYycc3jYQFg0tmEaSW1U2N9tUgz1dFcrSNAeHaq6j9A4iqWvIpby10hd2U VqLpZU1D91W6vpdvSXrRbkVGPWWa/hppfyUBM6ngzfVZ3/VaGW+2Aah9qHgM1KPZxaUK b5A94NG/mqCP75MttoZqLPBPMOKNYktAGhdApv94oMz5zueeBRNWOwPaZ0Iy3WwDgcAQ xTSQ== X-Gm-Message-State: APjAAAXNXFwsBXv9rgYZ/07ICnl0IN6SfM7gyIB/I11MPY1JXzA3Z2zS rBy+tRsFax4KzToIzpOK9c50NYJtcnM= X-Google-Smtp-Source: APXvYqyI9DnLipebkx5F5sPCi4mcKwdTAnF/oSEJoDfacdBQIG869LxzOCd6bd98qoaA2nsJWfWu6g== X-Received: by 2002:aa7:9ec9:: with SMTP id r9mr23001986pfq.85.1582054772794; Tue, 18 Feb 2020 11:39:32 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 1/9] hw/display/artist: Move trace event to draw_line() Date: Tue, 18 Feb 2020 11:39:21 -0800 Message-Id: <20200218193929.11404-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218193929.11404-1-richard.henderson@linaro.org> References: <20200218193929.11404-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::429 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Sven Schnelle , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Instead of emitting the trace event before each call to draw_line(), call it once at draw_line() entrance. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Sven Schnelle Message-Id: <20200214001303.12873-2-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/display/artist.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/display/artist.c b/hw/display/artist.c index 65be9e3554..abacb0e27d 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -563,6 +563,7 @@ static void draw_line(ARTISTState *s, int x1, int y1, i= nt x2, int y2, bool c1; uint8_t *p; =20 + trace_artist_draw_line(x1, y1, x2, y2); =20 if (update_start) { s->vram_start =3D (x2 << 16) | y2; @@ -654,7 +655,6 @@ static void draw_line_pattern_start(ARTISTState *s) int endy =3D artist_get_y(s->blockmove_size); int pstart =3D s->line_pattern_start >> 16; =20 - trace_artist_draw_line(startx, starty, endx, endy); draw_line(s, startx, starty, endx, endy, false, -1, pstart); s->line_pattern_skip =3D pstart; } @@ -668,7 +668,6 @@ static void draw_line_pattern_next(ARTISTState *s) int endy =3D artist_get_y(s->blockmove_size); int line_xy =3D s->line_xy >> 16; =20 - trace_artist_draw_line(startx, starty, endx, endy); draw_line(s, startx, starty, endx, endy, false, s->line_pattern_skip, s->line_pattern_skip + line_xy); s->line_pattern_skip +=3D line_xy; @@ -683,7 +682,6 @@ static void draw_line_size(ARTISTState *s, bool update_= start) int endx =3D artist_get_x(s->line_size); int endy =3D artist_get_y(s->line_size); =20 - trace_artist_draw_line(startx, starty, endx, endy); draw_line(s, startx, starty, endx, endy, update_start, -1, -1); } =20 @@ -743,7 +741,6 @@ static void draw_line_xy(ARTISTState *s, bool update_st= art) return; } =20 - trace_artist_draw_line(startx, starty, endx, endy); draw_line(s, startx, starty, endx, endy, false, -1, -1); } =20 @@ -755,7 +752,6 @@ static void draw_line_end(ARTISTState *s, bool update_s= tart) int endx =3D artist_get_x(s->line_end); int endy =3D artist_get_y(s->line_end); =20 - trace_artist_draw_line(startx, starty, endx, endy); draw_line(s, startx, starty, endx, endy, update_start, -1, -1); } =20 --=20 2.20.1 From nobody Thu Nov 13 17:44:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158205487542088.86917144782524; Tue, 18 Feb 2020 11:41:15 -0800 (PST) Received: from localhost ([::1]:41058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48k5-0005G4-G9 for importer@patchew.org; Tue, 18 Feb 2020 14:41:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54912) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48iW-0003Z1-O5 for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j48iV-0004GJ-Qs for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:36 -0500 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]:45753) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j48iV-0004EM-KJ for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:35 -0500 Received: by mail-pf1-x42c.google.com with SMTP id 2so11142079pfg.12 for ; Tue, 18 Feb 2020 11:39:35 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id y15sm424395pgj.78.2020.02.18.11.39.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:39:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9xp9YT+6BXF/GDcu+K5TvURlBEjt56+scFGDcoCg8XI=; b=rdq+mRnlGdvIWcenw2xPzU7WNU/j2DqSZy2NjxrUkjLMMGLByuPfYOhu9vlhDipfcm KlC50yJ3NYUnW6g+6l127yLp8lnj5yxhDCRCrnc6hfi/yh52v6THJrlx90ZzthLVkHr1 KRC6c5vEKqSm2ZbqXqSVqNWHZPdC6WKJdXKwdE6lhM9jMqYjM4kNPBrJLY/xU5985nok ZQ6mhaDTGq8nbuG8AzaE1TUc0sWdBoNgyHazJrdppLwppQbmcHOa+srx1xKooESfO9vS h+3SbgWCpkpDp29UjSTPk2G6vW7J8hZpts5sJDKpzWuiDS4wWgB0yvOTvjBCyHIxAmui chjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9xp9YT+6BXF/GDcu+K5TvURlBEjt56+scFGDcoCg8XI=; b=XfkzOo/Qb7ZCgJfr5tUILzGx/SJKcpmnJck4HyHhuzDqU1/xkC4J/SJ0+VWF8WGYPW ttbl3NdIFQc+hzlQEZcWWJW0J/lD20JDQhI2E+x9DDL7TNleXbboaO1Ew35DDKF3vhfv BdWQ9k91t2jHH0Jx3Yr1mWDZJ4KoEXZW9i1xa8dlJ01D5Up+csUggBtCSqFwUs4zoGcZ tveq3rUDDyrS8z4Glux9aqcjxkMLxKJW7/HcSNROv/wEsQ2bXRkZGS+0SLCfxOSbT3qy YRFyP50YbLbI2UyuzLI+1/uAe37+A2NHk1xL6Tm3/v5rSMNemmP9vtEfMa+Kk0VwkTbm alaQ== X-Gm-Message-State: APjAAAVmW+MhWgiXyBBMBHfL2vLozBCqdK9xLnZyD/0kxorJQn4gMDmS Y+bAPk2Ia6YyeB7uZydDM6K2owVMfR4= X-Google-Smtp-Source: APXvYqzmav0L416/hgm6vkFmeVjp5sbY85GYkqbfi3wYw+wnmMhnLT/L0EpYqCzCK+djgjDNuAsTBA== X-Received: by 2002:a63:78c4:: with SMTP id t187mr21661123pgc.88.1582054774237; Tue, 18 Feb 2020 11:39:34 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 2/9] hw/display/artist: Remove pointless initialization Date: Tue, 18 Feb 2020 11:39:22 -0800 Message-Id: <20200218193929.11404-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218193929.11404-1-richard.henderson@linaro.org> References: <20200218193929.11404-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Sven Schnelle , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 We are initializating incy inconditionally: if (y1 <=3D y2) { incy =3D 1; } else { incy =3D -1; } Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Sven Schnelle Message-Id: <20200214001303.12873-3-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/display/artist.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/display/artist.c b/hw/display/artist.c index abacb0e27d..47f0e9f0bc 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -572,7 +572,6 @@ static void draw_line(ARTISTState *s, int x1, int y1, i= nt x2, int y2, buf =3D &s->vram_buffer[ARTIST_BUFFER_AP]; =20 c1 =3D false; - incy =3D 1; =20 if (x2 > x1) { dx =3D x2 - x1; --=20 2.20.1 From nobody Thu Nov 13 17:44:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582054970378316.4967634523181; Tue, 18 Feb 2020 11:42:50 -0800 (PST) Received: from localhost ([::1]:41108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48ld-00009i-CP for importer@patchew.org; Tue, 18 Feb 2020 14:42:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54965) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48iX-0003Za-UO for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j48iW-0004Id-VP for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:37 -0500 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:43521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j48iW-0004HA-P8 for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:36 -0500 Received: by mail-pg1-x534.google.com with SMTP id u12so11079556pgb.10 for ; Tue, 18 Feb 2020 11:39:36 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id y15sm424395pgj.78.2020.02.18.11.39.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:39:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UwMVy3DhT2jUtkg7ZPdWAKnQO+6DWfWffPjgYExKp2o=; b=USz99uwmXbaCrCFCIdZdP+xafQVcgC6G98Bq9WZr7x1asRBL5IjEieOMIxYsGBarDR RWr1c2bUsWvCsjuvhg/nt8MzYfcmwmAIHKXsUDbVjQpjAbDx49WIDb2Wa4C4gwcK0F2t cn8iBQkkDOsDBoBADfA2Efu40UmlE2mGaIdx+/BCSadlAFYkSolKViTwfgh23LzMqFKr 4sCpKl5Q/eYBAzbcuigEbM4/49/WJLSwdZ67U4XHIl74uh8zlWNcVgZ2alp4OBWtf/5p KcRi/283uE1vpmLIFwQD9MkWJf0vZfFdD8ut1QG4kofFsq7dou1NMTL3WqCCRS2/cVZg HUJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UwMVy3DhT2jUtkg7ZPdWAKnQO+6DWfWffPjgYExKp2o=; b=gkjpAV3K6GFOWoeU3FO/n19RJj+QR5DoOpAdyfctJ7z1nTAVORyqgiOi0XN2H8aQ0s VvUw70J0zMJYuC7Ps3hAx8OPThFIYoKECiapjyDb1Kv/2e3WsvsBij+1KuuBMGjU/5wu YtaO0nwOE0m4ESS4pajy+EKsdXdStLP+44J8XDzganesaxlx5+60awfDcJjQE8LzYBik lBB8mjQLLZBnLHnPaUsraRxWZMHJxy1RBPcyLU+XISt7rie+H4t5zpnbBFsnlHuhtSX1 C+IIc4NxFwb+g/YbvnXjhL2rjRfILbi3A2U6GjkdLiRbBTM1Ebr+/Gk1c+u4bkHPdJZi LKgg== X-Gm-Message-State: APjAAAXuSny9ImHaGRPsdiJM4r/yF0CTtkjqEeriCOh7/S11S97xiKpC TRm5rXL3DC6V+FhYYBE1HG337C3FT3c= X-Google-Smtp-Source: APXvYqyuuM7yxe9PKF8rws8qjylXhQ6D3pBz6Rj4zEYeoimt0MeF7+9anuIRUQ84btrvjNcnNP9/jA== X-Received: by 2002:a63:d207:: with SMTP id a7mr24561623pgg.225.1582054775469; Tue, 18 Feb 2020 11:39:35 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 3/9] hw/display/artist: Delay some variables initialization Date: Tue, 18 Feb 2020 11:39:23 -0800 Message-Id: <20200218193929.11404-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218193929.11404-1-richard.henderson@linaro.org> References: <20200218193929.11404-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::534 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Sven Schnelle , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 We want to have an early exit path. Delay some initializations before the variables are used. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Sven Schnelle Message-Id: <20200214001303.12873-4-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/display/artist.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/display/artist.c b/hw/display/artist.c index 47f0e9f0bc..97c811b35e 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -558,7 +558,7 @@ static void draw_line(ARTISTState *s, int x1, int y1, i= nt x2, int y2, bool update_start, int skip_pix, int max_pix) { struct vram_buffer *buf; - uint8_t color =3D artist_get_color(s); + uint8_t color; int dx, dy, t, e, x, y, incy, diago, horiz; bool c1; uint8_t *p; @@ -569,10 +569,6 @@ static void draw_line(ARTISTState *s, int x1, int y1, = int x2, int y2, s->vram_start =3D (x2 << 16) | y2; } =20 - buf =3D &s->vram_buffer[ARTIST_BUFFER_AP]; - - c1 =3D false; - if (x2 > x1) { dx =3D x2 - x1; } else { @@ -583,6 +579,8 @@ static void draw_line(ARTISTState *s, int x1, int y1, i= nt x2, int y2, } else { dy =3D y1 - y2; } + + c1 =3D false; if (dy > dx) { t =3D y2; y2 =3D x2; @@ -620,6 +618,8 @@ static void draw_line(ARTISTState *s, int x1, int y1, i= nt x2, int y2, } x =3D x1; y =3D y1; + color =3D artist_get_color(s); + buf =3D &s->vram_buffer[ARTIST_BUFFER_AP]; =20 do { if (c1) { --=20 2.20.1 From nobody Thu Nov 13 17:44:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582054971386704.7301749376776; Tue, 18 Feb 2020 11:42:51 -0800 (PST) Received: from localhost ([::1]:41113 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48le-0000D3-BJ for importer@patchew.org; Tue, 18 Feb 2020 14:42:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55060) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48iZ-0003co-F7 for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j48iY-0004Lg-GJ for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:39 -0500 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:42812) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j48iY-0004K7-Ag for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:38 -0500 Received: by mail-pg1-x529.google.com with SMTP id w21so11428992pgl.9 for ; Tue, 18 Feb 2020 11:39:38 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id y15sm424395pgj.78.2020.02.18.11.39.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VWkmmOSNRrmSWVThvM1btX2IQ2jQ25rI+tGcKooV13k=; b=RUYFJ2yBNNB/FI7ZcZaMOn8rTEZ+F93tRFKn0W8+h0ccY49o6pkEK5NCCN1NFgRg2C wzIwa1CUwDgPi2j8yKasWW10C+TW+ojUGT+eyzNSMWkvDp+XFkOiBPXPJZRSgOCQJkzb mUFNWsne7c5mmXgxhHQavOr1d9kT+dJyGI/EtyPpYAkkafCxSUXd3ocxlt+QFxYck3Hy wwWxwdmX2oICJ7QFUA3hw5C8+HnBVPad+polGMGpXcn4iJRr6mJ/VSUSZ+hW0hRE6GGs rqFHsrpS52Rqp5t7Blyl43osNdAZv3u3kcZXDznH2y+A1SJ/3SDEbEF3Wyz52yJPOEf+ yM9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VWkmmOSNRrmSWVThvM1btX2IQ2jQ25rI+tGcKooV13k=; b=oda91bcmlEmJz7K+YoZ9Tb9PWa60Nf4YCDgwHc+M0klxRu9WDIDUrgmyrB3GDMM3Et ikqF/l0nHpicy7QydXzdfp8LjWVKZ+oqbnL3GPVOcKqAJFMFNeCNKA4qBf5vHe1kuZFX l9TZ2KQo8XjGUINfkkxYbIVlbX3QmkdIPhSdhoHjSdG9u2lKPYAMnAcNau7XUHUTPJgs OQJkgaTNYanz911jiwdYaZH4MdO4/ppukfMH/I6dND6YgEuZHX5EBhIJ7WBoj0H5VS4o yixv7MOc287QSLCKNGMVMG/wberZCWfZvL48ZDVwDxJ7WaQP4HXusJG3r+zJEpsY4VNY mkEA== X-Gm-Message-State: APjAAAXp6hyK0i/cPyEwgDEVOEW/z/zq6e1HFphVs5hQCM3+0MgELXTW 3UT+aLxuOe55DOGapKKe/x1J5PF73mw= X-Google-Smtp-Source: APXvYqyA7qE32ZvlMFM5lBu/BNrz+hfUDRXG94ZN3t1fXbjejvSEk852WMSf7KA2XksPv2V7hfxVKw== X-Received: by 2002:a63:445e:: with SMTP id t30mr24625651pgk.367.1582054776923; Tue, 18 Feb 2020 11:39:36 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 4/9] hw/display/artist: Avoid drawing line when nothing to display Date: Tue, 18 Feb 2020 11:39:24 -0800 Message-Id: <20200218193929.11404-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218193929.11404-1-richard.henderson@linaro.org> References: <20200218193929.11404-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::529 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200214001303.12873-5-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/display/artist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/display/artist.c b/hw/display/artist.c index 97c811b35e..5492079116 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -579,6 +579,9 @@ static void draw_line(ARTISTState *s, int x1, int y1, i= nt x2, int y2, } else { dy =3D y1 - y2; } + if (!dx || !dy) { + return; + } =20 c1 =3D false; if (dy > dx) { --=20 2.20.1 From nobody Thu Nov 13 17:44:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582054884606420.82763858748865; Tue, 18 Feb 2020 11:41:24 -0800 (PST) Received: from localhost ([::1]:41070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48kF-0005US-Gj for importer@patchew.org; Tue, 18 Feb 2020 14:41:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55133) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48ia-0003fd-Pa for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j48iZ-0004O4-NB for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:40 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:42681) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j48iZ-0004M7-GT for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:39 -0500 Received: by mail-pf1-x42e.google.com with SMTP id 4so11147922pfz.9 for ; Tue, 18 Feb 2020 11:39:39 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id y15sm424395pgj.78.2020.02.18.11.39.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:39:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jAN9/5WEnE9dxJr6iL5ixKsH798kIxR23zQ9JVcmqi8=; b=fXerTJA/78ZheSMhs2rpB8CviX/9SYutyA4Ct9KpYId2tli/PRUoCCi+a97qP4X0en KEZjvDulRV9zO09FuiTuPnXYblt3B0iHwv8CJQlTU+Ch1UbHqroqTSs481vcjT7rkDVn zsmr/cDLeB/ueyBN7JLkhkcJ03UzOcdMxy+qVL6u+lOCYTyn7z2y2sednQknpOXMn1Gj X1bDkwftYSlYkcOR1Gcb6NGnp/rTNEA+KsyS/MH/9jGAVYDBXm3//V1S7xGpwKUbtO05 rHHE8ctINLN2TIM0DOIWQW4ND6PjP88d5K6uDbkwIKbY9GWEgv0li61svmRvLkHw4nh/ Tlfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jAN9/5WEnE9dxJr6iL5ixKsH798kIxR23zQ9JVcmqi8=; b=Yf1wQjihJsCu3EaqGuDgfFZf7+D5ChQOkctG/J5xkDHegnCvC1Y8NYCxDSbU2h9Blv 74IvY51N45IeZbQ89iZCVHJD/yS5QBkD8nfbKaHaDeLiKxyP/WsISmjmHyp9uITduyJq N+AY2OjwtHaP//KM1+N2HZJW1ZDDWaZWXK+7x25NRl/lr3GkAVeYpm8RfjPrlC6TpL/8 j+vxRkYBhruKEohi1mdCTk8kcjwm7BnAkJm+sszZb2wbsgSOePOUjHzH22l3kg4aDOtW kLwhO+SNNdQSn8HVGpNAH/ktn/Zxi5gNBtupqCxS9Xr4eUsXrFB2LDIaQu2D2F+ELYso Tcsw== X-Gm-Message-State: APjAAAVNUOdHy1G2zvcrQKSpBAKsXhJET6WvSrkv7VeTk8xOjdHMBAQq JPLCO+jU9C3iq/ThZi402gC09MKBum8= X-Google-Smtp-Source: APXvYqyGzJ+uFuMa5Xu14iEcBpQfewF+tFt+3pdltaZMo7g3D3rWg9e/oHEztCJxvZzewczeWSl36g== X-Received: by 2002:a63:6407:: with SMTP id y7mr24377957pgb.45.1582054778035; Tue, 18 Feb 2020 11:39:38 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 5/9] hw/display/artist: Remove dead code (CID 1419388 & 1419389) Date: Tue, 18 Feb 2020 11:39:25 -0800 Message-Id: <20200218193929.11404-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218193929.11404-1-richard.henderson@linaro.org> References: <20200218193929.11404-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42e X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Sven Schnelle , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Coverity reports: *** CID 1419388: Control flow issues (DEADCODE) /hw/display/artist.c: 739 in draw_line_xy() 733 if (endy < 0) { 734 endy =3D 0; 735 } 736 737 738 if (endx < 0) { >>> CID 1419388: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "return;". 739 return; 740 } 741 742 if (endy < 0) { 743 return; 744 } *** CID 1419389: Control flow issues (DEADCODE) /hw/display/artist.c: 743 in draw_line_xy() 737 738 if (endx < 0) { 739 return; 740 } 741 742 if (endy < 0) { >>> CID 1419389: Control flow issues (DEADCODE) >>> Execution cannot reach this statement: "return;". 743 return; 744 } 745 746 trace_artist_draw_line(startx, starty, endx, endy); 747 draw_line(s, startx, starty, endx, endy, false, -1, -1); 748 } Fixes: Covertiy CID 1419388 and 1419389 (commit 4765384ce33) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Sven Schnelle Message-Id: <20200214001303.12873-6-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/display/artist.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/hw/display/artist.c b/hw/display/artist.c index 5492079116..753dbb9a77 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -734,15 +734,6 @@ static void draw_line_xy(ARTISTState *s, bool update_s= tart) endy =3D 0; } =20 - - if (endx < 0) { - return; - } - - if (endy < 0) { - return; - } - draw_line(s, startx, starty, endx, endy, false, -1, -1); } =20 --=20 2.20.1 From nobody Thu Nov 13 17:44:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582055071278494.0925121208476; Tue, 18 Feb 2020 11:44:31 -0800 (PST) Received: from localhost ([::1]:41142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48nG-0002aC-Bi for importer@patchew.org; Tue, 18 Feb 2020 14:44:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55208) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48ic-0003hz-8G for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j48ib-0004Qo-7J for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:42 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:35795) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j48ib-0004PT-1R for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:41 -0500 Received: by mail-pl1-x62a.google.com with SMTP id g6so8487794plt.2 for ; Tue, 18 Feb 2020 11:39:40 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id y15sm424395pgj.78.2020.02.18.11.39.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:39:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oZO5RKA9Grp6ITlGi7FVOEFNRvhDdW0o8hVNMgXHdmY=; b=z5PZcdM3GwfshQMTb+zkOYVWQxLMe8XtkmZqYkJdrc92e/r8MZUVqGsfVy9QAbBAAf /yvajMui0bQH9bVNuH539y0Ce8CedmHmiO5zmiwosDHjFfxOqb/TPpYXAQr1IXfc4FIQ OKCyCbXJ77pbWZ+6UsbXdKOFGPJL1heXOmi+xovIztzXx9+2aXKvQlsA/oQhOGV92prL /FHNURWpHnW28ywc7QsXzNquhaXqt0Vz7bSkyy4Qmzwh8jwy6h47/5Fw5ZutD6rky9ZS YI7JVVnG6Smm25aaNJfyDYfI4gmXsZnLFv/J1IkYAiZfxKSbEHT46Xbr791zWNFdxf7E 0Zrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oZO5RKA9Grp6ITlGi7FVOEFNRvhDdW0o8hVNMgXHdmY=; b=azVHyeTk2uI5MwCXkfBKv3ZT3j6KkiyCsTk0L9f2y6dvWrXYIea2J2tbN972c6Den3 K9xYu3EAoiybl24IbOh/lUKX4XrC+EOYRFguHprGKn5NEED2oM0rw7ebPQtRso1GAl+4 FSqR3DxWUiqDrMUgVcJUY2XrbZf6AJNtcZqPiuJMTOjDJj4R6M5NmEz11d/7TknKqvz8 odPAfgdvz71GOBjmh3mo15voNGS8eyFGCeMg7D7wWkCy/e5eD0aje7ju6ZnRZmJBZrvi gqU0cGerTNLuh+IJ3DfQAKLirEvzD6yv5W6O4snCfw8bgJB7cb3zeWapfo+28+8UeaXZ sbYA== X-Gm-Message-State: APjAAAWgmPRIA83lXY+SvYNcQC6oOfPRKGS0voCqE4KA/iEglK0OwJji H2VtXoyUl+Ir3g9FpuVQDuoTwcA0WU8= X-Google-Smtp-Source: APXvYqxlpeMl5Vr3NbRjwzUh7EVnLc0egj8jw7aF5cye/pcUh5850dJGtrBvmOowzSmvkzFJ47rtrw== X-Received: by 2002:a17:90a:db0b:: with SMTP id g11mr4395370pjv.140.1582054779627; Tue, 18 Feb 2020 11:39:39 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 6/9] hw/hppa/dino: Add comments with register name Date: Tue, 18 Feb 2020 11:39:26 -0800 Message-Id: <20200218193929.11404-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218193929.11404-1-richard.henderson@linaro.org> References: <20200218193929.11404-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::62a X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Helge Deller , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Add a comment with the name of each register in the 0x800-0x8ff range. Acked-by: Helge Deller Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200218063355.18577-2-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/hppa/dino.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c index 9797a7f0d9..c237ad3b1b 100644 --- a/hw/hppa/dino.c +++ b/hw/hppa/dino.c @@ -85,18 +85,18 @@ =20 #define DINO800_REGS ((DINO_TLTIM - DINO_GMASK) / 4) static const uint32_t reg800_keep_bits[DINO800_REGS] =3D { - MAKE_64BIT_MASK(0, 1), - MAKE_64BIT_MASK(0, 7), - MAKE_64BIT_MASK(0, 7), - MAKE_64BIT_MASK(0, 8), - MAKE_64BIT_MASK(0, 7), - MAKE_64BIT_MASK(0, 9), - MAKE_64BIT_MASK(0, 32), - MAKE_64BIT_MASK(0, 8), - MAKE_64BIT_MASK(0, 30), - MAKE_64BIT_MASK(0, 25), - MAKE_64BIT_MASK(0, 22), - MAKE_64BIT_MASK(0, 9), + MAKE_64BIT_MASK(0, 1), /* GMASK */ + MAKE_64BIT_MASK(0, 7), /* PAMR */ + MAKE_64BIT_MASK(0, 7), /* PAPR */ + MAKE_64BIT_MASK(0, 8), /* DAMODE */ + MAKE_64BIT_MASK(0, 7), /* PCICMD */ + MAKE_64BIT_MASK(0, 9), /* PCISTS */ + MAKE_64BIT_MASK(0, 32), /* Undefined */ + MAKE_64BIT_MASK(0, 8), /* MLTIM */ + MAKE_64BIT_MASK(0, 30), /* BRDG_FEAT */ + MAKE_64BIT_MASK(0, 25), /* PCIROR */ + MAKE_64BIT_MASK(0, 22), /* PCIWOR */ + MAKE_64BIT_MASK(0, 9), /* TLTIM */ }; =20 typedef struct DinoState { --=20 2.20.1 From nobody Thu Nov 13 17:44:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582055065717402.53099994113063; Tue, 18 Feb 2020 11:44:25 -0800 (PST) Received: from localhost ([::1]:41138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48nA-0002W1-Hs for importer@patchew.org; Tue, 18 Feb 2020 14:44:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55322) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48ie-0003nQ-Cd for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j48ic-0004Te-LU for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:44 -0500 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:50809) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j48ic-0004SE-Cx for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:42 -0500 Received: by mail-pj1-x1042.google.com with SMTP id r67so1478948pjb.0 for ; Tue, 18 Feb 2020 11:39:42 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id y15sm424395pgj.78.2020.02.18.11.39.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1tElKPiRfZ14QGmD+h4hKk0xES24fZ4k3wRcrxxOi0E=; b=qnjieUOzxuvQ5Qpyhwj7NRW+7/uxkrjBChajfKII0yTgGom+d3yDh06y47nfg7qxLq lZ9ueKylZl+5ad494qiPFSavkZObmJ5oxm+Iaigo9/oqDUPuZMXyNnVLyaZW8XCTXHXU yFiZSh6IYqkla1/qZRB1iZQkwFCzzdNL3wAeGzTY3ngvIRMnn+FxVw+jQlfroAJ5LJwh lUcxEPWNDbfBS58Tuqvc+0AnmO4hN6jXnr4Pag+YcCiz7Tl7xmLHahjKRAnfOyBPWo0o YnlfrxRuMucXwF9hy/HyHDG31d0+/PzPoL0et7PaEREWTsppyYckONsDcWFhDVtM1qfc 0feA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1tElKPiRfZ14QGmD+h4hKk0xES24fZ4k3wRcrxxOi0E=; b=G8bkk2DU7TMkK76iMhmMdw7Jc4EuVGGe1ikS2KHZOw0jkFb2mM7y5zhu3hOMF1fsim cdr3TY0V0wqok1elaVHP0ia/1gRHQx0DFMwfkZERxvbnnWWqN+KjoRCNkJpeEsB3OD1l mkFBE5JLjqRKoUQWbzqmlZDfNJtue8OX3BqCNdUt0nYUopuHtNNYFq+x/+YJWd0ySn5o BwTfjQ6lD42tCP4hTSaab3sk9Ta+hROjePE9z0S/CY0l94/vEH/hOouAFf2LLS3iuOMz 3HKss/Ry6j6J8Ggo9o6AAddsDdpMIk7fgyBYosCrI2TyFOXQQuDfQQVzAG14+ngjnZVT O/ig== X-Gm-Message-State: APjAAAVKsfkD2L7a5PkAkP8wU37VhbjU+fyroVpE+KgPUaqcsS8sUl6g gOhCQ8y02JMlViYh8VFwPWCrXuDuvbk= X-Google-Smtp-Source: APXvYqwAJIWGpBx+xiwGX/peZTTo7cYOXCwDMmixukqtgj8PBn9QySIBrfqZxBuiMSiOgmrdjoTq4Q== X-Received: by 2002:a17:90a:c084:: with SMTP id o4mr4379091pjs.35.1582054780800; Tue, 18 Feb 2020 11:39:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 7/9] hw/hppa/dino: Fix reg800_keep_bits overrun (CID 1419387 1419393 1419394) Date: Tue, 18 Feb 2020 11:39:27 -0800 Message-Id: <20200218193929.11404-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218193929.11404-1-richard.henderson@linaro.org> References: <20200218193929.11404-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::1042 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Helge Deller , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Coverity reports: *** CID 1419387: Memory - illegal accesses (OVERRUN) /hw/hppa/dino.c: 267 in dino_chip_read_with_attrs() 261 val =3D s->ilr & s->imr & s->icr; 262 break; 263 case DINO_TOC_ADDR: 264 val =3D s->toc_addr; 265 break; 266 case DINO_GMASK ... DINO_TLTIM: >>> CID 1419387: Memory - illegal accesses (OVERRUN) >>> Overrunning array "s->reg800" of 12 4-byte elements at element in= dex 12 (byte offset 48) using index "(addr - 2048UL) / 4UL" (which evaluate= s to 12). 267 val =3D s->reg800[(addr - DINO_GMASK) / 4]; 268 if (addr =3D=3D DINO_PAMR) { 269 val &=3D ~0x01; /* LSB is hardwired to 0 */ 270 } 271 if (addr =3D=3D DINO_MLTIM) { 272 val &=3D ~0x07; /* 3 LSB are hardwired to 0 */ *** CID 1419393: Memory - corruptions (OVERRUN) /hw/hppa/dino.c: 363 in dino_chip_write_with_attrs() 357 /* These registers are read-only. */ 358 break; 359 360 case DINO_GMASK ... DINO_TLTIM: 361 i =3D (addr - DINO_GMASK) / 4; 362 val &=3D reg800_keep_bits[i]; >>> CID 1419393: Memory - corruptions (OVERRUN) >>> Overrunning array "s->reg800" of 12 4-byte elements at element in= dex 12 (byte offset 48) using index "i" (which evaluates to 12). 363 s->reg800[i] =3D val; 364 break; 365 366 default: 367 /* Controlled by dino_chip_mem_valid above. */ 368 g_assert_not_reached(); *** CID 1419394: Memory - illegal accesses (OVERRUN) /hw/hppa/dino.c: 362 in dino_chip_write_with_attrs() 356 case DINO_IRR1: 357 /* These registers are read-only. */ 358 break; 359 360 case DINO_GMASK ... DINO_TLTIM: 361 i =3D (addr - DINO_GMASK) / 4; >>> CID 1419394: Memory - illegal accesses (OVERRUN) >>> Overrunning array "reg800_keep_bits" of 12 4-byte elements at ele= ment index 12 (byte offset 48) using index "i" (which evaluates to 12). 362 val &=3D reg800_keep_bits[i]; 363 s->reg800[i] =3D val; 364 break; 365 366 default: 367 /* Controlled by dino_chip_mem_valid above. */ Indeed the array should contain 13 entries, the undocumented register 0x82c is missing. Fix by increasing the array size and adding the missing register. CID 1419387 can be verified with: $ echo x 0xfff80830 | hppa-softmmu/qemu-system-hppa -S -monitor stdio -di= splay none QEMU 4.2.50 monitor - type 'help' for more information (qemu) x 0xfff80830 qemu/hw/hppa/dino.c:267:15: runtime error: index 12 out of bounds for typ= e 'uint32_t [12]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/phil/source= /qemu/hw/hppa/dino.c:267:15 in 00000000fff80830: 0x00000000 and CID 1419393/1419394 with: $ echo writeb 0xfff80830 0x69 \ | hppa-softmmu/qemu-system-hppa -S -accel qtest -qtest stdio -display n= one [I 1581634452.654113] OPENED [R +4.105415] writeb 0xfff80830 0x69 qemu/hw/hppa/dino.c:362:16: runtime error: index 12 out of bounds for typ= e 'const uint32_t [12]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior qemu/hw/hppa/dino= .c:362:16 in =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D29607=3D=3DERROR: AddressSanitizer: global-buffer-overflow on addre= ss 0x5577dae32f30 at pc 0x5577d93f2463 bp 0x7ffd97ea11b0 sp 0x7ffd97ea11a8 READ of size 4 at 0x5577dae32f30 thread T0 #0 0x5577d93f2462 in dino_chip_write_with_attrs qemu/hw/hppa/dino.c:3= 62:16 #1 0x5577d9025664 in memory_region_write_with_attrs_accessor qemu/mem= ory.c:503:12 #2 0x5577d9024920 in access_with_adjusted_size qemu/memory.c:539:18 #3 0x5577d9023608 in memory_region_dispatch_write qemu/memory.c:1482:= 13 #4 0x5577d8e3177a in flatview_write_continue qemu/exec.c:3166:23 #5 0x5577d8e20357 in flatview_write qemu/exec.c:3206:14 #6 0x5577d8e1fef4 in address_space_write qemu/exec.c:3296:18 #7 0x5577d8e20693 in address_space_rw qemu/exec.c:3306:16 #8 0x5577d9011595 in qtest_process_command qemu/qtest.c:432:13 #9 0x5577d900d19f in qtest_process_inbuf qemu/qtest.c:705:9 #10 0x5577d900ca22 in qtest_read qemu/qtest.c:717:5 #11 0x5577da8c4254 in qemu_chr_be_write_impl qemu/chardev/char.c:183:9 #12 0x5577da8c430c in qemu_chr_be_write qemu/chardev/char.c:195:9 #13 0x5577da8cf587 in fd_chr_read qemu/chardev/char-fd.c:68:9 #14 0x5577da9836cd in qio_channel_fd_source_dispatch qemu/io/channel-= watch.c:84:12 #15 0x7faf44509ecc in g_main_context_dispatch (/lib64/libglib-2.0.so.= 0+0x4fecc) #16 0x5577dab75f96 in glib_pollfds_poll qemu/util/main-loop.c:219:9 #17 0x5577dab74797 in os_host_main_loop_wait qemu/util/main-loop.c:24= 2:5 #18 0x5577dab7435a in main_loop_wait qemu/util/main-loop.c:518:11 #19 0x5577d9514eb3 in main_loop qemu/vl.c:1682:9 #20 0x5577d950699d in main qemu/vl.c:4450:5 #21 0x7faf41a87f42 in __libc_start_main (/lib64/libc.so.6+0x23f42) #22 0x5577d8cd4d4d in _start (qemu/build/sanitizer/hppa-softmmu/qemu-= system-hppa+0x1256d4d) 0x5577dae32f30 is located 0 bytes to the right of global variable 'reg800= _keep_bits' defined in 'qemu/hw/hppa/dino.c:87:23' (0x5577dae32f00) of size= 48 SUMMARY: AddressSanitizer: global-buffer-overflow qemu/hw/hppa/dino.c:362= :16 in dino_chip_write_with_attrs Shadow bytes around the buggy address: 0x0aaf7b5be590: 00 f9 f9 f9 f9 f9 f9 f9 00 02 f9 f9 f9 f9 f9 f9 0x0aaf7b5be5a0: 07 f9 f9 f9 f9 f9 f9 f9 07 f9 f9 f9 f9 f9 f9 f9 0x0aaf7b5be5b0: 07 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00 0x0aaf7b5be5c0: 00 00 00 02 f9 f9 f9 f9 00 00 00 00 00 00 00 00 0x0aaf7b5be5d0: 00 00 00 00 00 00 00 00 00 00 00 03 f9 f9 f9 f9 =3D>0x0aaf7b5be5e0: 00 00 00 00 00 00[f9]f9 f9 f9 f9 f9 00 00 00 00 0x0aaf7b5be5f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0aaf7b5be600: 00 00 01 f9 f9 f9 f9 f9 00 00 00 00 07 f9 f9 f9 0x0aaf7b5be610: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00 0x0aaf7b5be620: 00 00 00 05 f9 f9 f9 f9 00 00 00 00 07 f9 f9 f9 0x0aaf7b5be630: f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9 07 f9 f9 f9 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc =3D=3D29607=3D=3DABORTING Fixes: Covertiy CID 1419387 / 1419393 / 1419394 (commit 18092598a5) Acked-by: Helge Deller Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200218063355.18577-3-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/hppa/dino.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c index c237ad3b1b..8868e31793 100644 --- a/hw/hppa/dino.c +++ b/hw/hppa/dino.c @@ -83,7 +83,7 @@ #define DINO_PCI_HOST_BRIDGE(obj) \ OBJECT_CHECK(DinoState, (obj), TYPE_DINO_PCI_HOST_BRIDGE) =20 -#define DINO800_REGS ((DINO_TLTIM - DINO_GMASK) / 4) +#define DINO800_REGS (1 + (DINO_TLTIM - DINO_GMASK) / 4) static const uint32_t reg800_keep_bits[DINO800_REGS] =3D { MAKE_64BIT_MASK(0, 1), /* GMASK */ MAKE_64BIT_MASK(0, 7), /* PAMR */ @@ -96,6 +96,7 @@ static const uint32_t reg800_keep_bits[DINO800_REGS] =3D { MAKE_64BIT_MASK(0, 30), /* BRDG_FEAT */ MAKE_64BIT_MASK(0, 25), /* PCIROR */ MAKE_64BIT_MASK(0, 22), /* PCIWOR */ + MAKE_64BIT_MASK(0, 32), /* Undocumented */ MAKE_64BIT_MASK(0, 9), /* TLTIM */ }; =20 --=20 2.20.1 From nobody Thu Nov 13 17:44:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582054969780524.6599815855121; Tue, 18 Feb 2020 11:42:49 -0800 (PST) Received: from localhost ([::1]:41104 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48lc-00009A-Q4 for importer@patchew.org; Tue, 18 Feb 2020 14:42:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55342) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48ie-0003oK-NK for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j48id-0004Vg-LJ for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:44 -0500 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:41457) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j48id-0004U4-Ex for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:43 -0500 Received: by mail-pf1-x42d.google.com with SMTP id j9so11147339pfa.8 for ; Tue, 18 Feb 2020 11:39:43 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id y15sm424395pgj.78.2020.02.18.11.39.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:39:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fkf1cCU+0nMjQ3/Y/EWHF6ItnUhhF98WWxF5yKDha6U=; b=Jng6cjJ1KQzNj5yLYHF63m6IEbsOSuKsIS91rowT385wkEdGQ1jP8qJloYgS7q3AnH cmPVgZYrz6yoxuac+AAK/yYhkzP+cvqiLA3rY3kzXkM/JaTe1c2/0tbczAVkwjm1p7ME a2nvC5isR0/65eQ4C8vqNPvEldVkm+dElsftBpqJybuWmKu1cV/mmb9/M/AQl7C9s8O9 4Hee8IFJSgTHUO+xyMh2IjkhpuJNnjPbXXPjEjXtg0aPFplTYHZgHsSw8eLknW2k8HJF 0jQ1R3ZM0CHM+2PfdYht4z4mzRYmsf5NraPNyj76Iy8PNbWw/UtLJjEu8UcvP8dCNfYy smCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fkf1cCU+0nMjQ3/Y/EWHF6ItnUhhF98WWxF5yKDha6U=; b=TBc/bxbs+UfBsLAYUZo27hS4npmYFn/NI/xxF6EkNWbr5Fj1Gwt8fIuO0pFajQRB26 ise2LtBrxZeTUcO2rO8kaCmsNsSULw8IvMW/+j4vUR8GJFVXqVApfkUMCNXntil2eVTB rV6tbMcpU50o/nDyGmeatM1m4/Xf0UewaWOg6f5Tx3ml62fflK/XHzLeQC0+bGCjqta9 Tyl/MIHRSelO1Sk7z3ePQ6ji8y+2sW0Yiv2JNvjZIYkzgi/fWn0o+Q8lAH+6yA8ItkKl xmEunvFS0TXzUBSA/A0WM0fFIZzY7wrnTOjhDlpjeT50XobAmBbN1OzxocY6zIlnDVBl h9lA== X-Gm-Message-State: APjAAAVV/UwJ1VLXg7gUNlJ4QXvnfCsIKwcIac6WlcgkSwjqkxdGQEEZ jc7sJFJOFRggykobixeM/OHuM20YsD0= X-Google-Smtp-Source: APXvYqwDjnpwbc7hCgl/845q9C81U9dqTQ7JsdMtBpufLcZp6XRHIOQu6CywTDLErfB/D/EvJQ/fwg== X-Received: by 2002:a63:1e5e:: with SMTP id p30mr25945016pgm.112.1582054782116; Tue, 18 Feb 2020 11:39:42 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 8/9] hw/hppa/dino: Fix bitmask for the PCIROR register Date: Tue, 18 Feb 2020 11:39:28 -0800 Message-Id: <20200218193929.11404-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218193929.11404-1-richard.henderson@linaro.org> References: <20200218193929.11404-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42d X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Helge Deller , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Only 24 bits of the PCIROR register are documented (see pp. 37 of datasheet referenced in this file header). Acked-by: Helge Deller Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200218063355.18577-4-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/hppa/dino.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c index 8868e31793..be799aad43 100644 --- a/hw/hppa/dino.c +++ b/hw/hppa/dino.c @@ -94,7 +94,7 @@ static const uint32_t reg800_keep_bits[DINO800_REGS] =3D { MAKE_64BIT_MASK(0, 32), /* Undefined */ MAKE_64BIT_MASK(0, 8), /* MLTIM */ MAKE_64BIT_MASK(0, 30), /* BRDG_FEAT */ - MAKE_64BIT_MASK(0, 25), /* PCIROR */ + MAKE_64BIT_MASK(0, 24), /* PCIROR */ MAKE_64BIT_MASK(0, 22), /* PCIWOR */ MAKE_64BIT_MASK(0, 32), /* Undocumented */ MAKE_64BIT_MASK(0, 9), /* TLTIM */ --=20 2.20.1 From nobody Thu Nov 13 17:44:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.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; dkim=fail; spf=pass (zohomail.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=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582055145798563.9466976369765; Tue, 18 Feb 2020 11:45:45 -0800 (PST) Received: from localhost ([::1]:41172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48oS-0004FI-QQ for importer@patchew.org; Tue, 18 Feb 2020 14:45:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55417) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j48if-0003r4-RU for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j48ie-0004Xz-Rq for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:45 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]:46356) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j48ie-0004WR-Kb for qemu-devel@nongnu.org; Tue, 18 Feb 2020 14:39:44 -0500 Received: by mail-pf1-x42e.google.com with SMTP id k29so11140217pfp.13 for ; Tue, 18 Feb 2020 11:39:44 -0800 (PST) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id y15sm424395pgj.78.2020.02.18.11.39.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2020 11:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QSNJImV6Sv3hjKepfQ333kr7g+hkYoplwMWy8vc32R4=; b=p+nUt1NZPZDuAmJfkVnK457U7ab00RT3CzSfwMmbu1JFbVFfr0bYGKMDks1xhEa+jR jlwfmZYxHrnCmHI9src3LkTtA9CG5Jomo5lfLSz1IJs5EKnrN+MOcOdNovthW1OiFdjz ujCqSU3gKPIhzrddlFxDQTyNCWHONDeuFWP8h/3Zp2ci1SBMCDq+ZzzxrbC0j9SwpDLq QhVFTr5FErXWnyoN0O+bLOCnwX96wCMwD1qKFt/jxfaWVXuRZHYbzLIMNzWN/rrSghPu o4bp660AsTREEi46fPICnti0+M9SImkYe3Xv29zFj6nes/gTqoLHUo4awtmv2w2Bf1JY 1Z6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QSNJImV6Sv3hjKepfQ333kr7g+hkYoplwMWy8vc32R4=; b=RXz2oHnZGVqyidS+6PSD/IiiyspTzkpobHC1wI+L1z1WEVcKrPiQVGGwkAzgIagQiH sVkq0t+Qwcf7FgloAeMnKsvDuW2I5ynUi3lI3HGR41JJbi2ans4tgUTRm4aK0vOrN+Kw gLI/1nNdSeRToAvZRYr9uryqMIaGwYt9JLQTIRWnIoDQ+4/sq3eT+OaHMBdw0gDGrXpX yH6iAnG94ulg4iOlqvq4k2+x1XFsOkfx8rakQ3/RWYeYPP7ZoK3WAI8Hquc9cFmYomJr IM6+8AiEz5Eu6HlcurnI1fWzQedbc/mSvrOTa5+xSEGF8ZWMEsr0VEoQjQgzalE3iYAx v5Hw== X-Gm-Message-State: APjAAAX5tAfadVKDoz1GATq1GE9/2z3JIi/2KshS7vmHHKbDz/O9XwJz xJJ2JlNZHQcFW4AgW6IFPdVEcC0bquE= X-Google-Smtp-Source: APXvYqz9xNWTqL3tgfuf8ghhq9A7rWrU9IEpJTWL1MMfFU/zPYRkEaoDEBcVwiIVYf+qVMJbSYc1LQ== X-Received: by 2002:a63:5f4e:: with SMTP id t75mr23941327pgb.7.1582054783296; Tue, 18 Feb 2020 11:39:43 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 9/9] hw/hppa/dino: Do not accept accesses to registers 0x818 and 0x82c Date: Tue, 18 Feb 2020 11:39:29 -0800 Message-Id: <20200218193929.11404-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200218193929.11404-1-richard.henderson@linaro.org> References: <20200218193929.11404-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42e X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Helge Deller , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Register 0x818 is documented as 'undefined', and register 0x82c is not documented. Refuse their access. Acked-by: Helge Deller Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200218063355.18577-5-f4bug@amsat.org> Signed-off-by: Richard Henderson --- hw/hppa/dino.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/hppa/dino.c b/hw/hppa/dino.c index be799aad43..2b1b38c58a 100644 --- a/hw/hppa/dino.c +++ b/hw/hppa/dino.c @@ -181,7 +181,9 @@ static bool dino_chip_mem_valid(void *opaque, hwaddr ad= dr, case DINO_IO_ADDR_EN: case DINO_PCI_IO_DATA: case DINO_TOC_ADDR: - case DINO_GMASK ... DINO_TLTIM: + case DINO_GMASK ... DINO_PCISTS: + case DINO_MLTIM ... DINO_PCIWOR: + case DINO_TLTIM: ret =3D true; break; case DINO_PCI_IO_DATA + 2: --=20 2.20.1