From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785241922; cv=none; d=zohomail.com; s=zohoarc; b=YRlbMZeF5/xLOcifiHRm87+ZYh5I+Wwemn2IyIqgePeyP7euYJHhkVCIbrG0mbL2658O8sOjHhtJDNAaZ61/iOGB/af3WqNqRJC1/wTfPVwgcIye6TaNDm+RQWXhNTfACpLqlnHTkoGdLiXSAwfNquEyORsAmhIa6T8jqiSPe9s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785241922; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=HjzRm4/vAf36krK1NQLIMmFfWZ78E2Nswa/LRXVgusY=; b=bQ5g7k6Jmc5irqKW2zpIM5qqg0sheVEJb09Oc7854EEClb89VVPnvZ/VFZB6VoKg775OqtxBNDHpziAKJ3rU2V5rZI7d7yPq3eiHfxUSp2Za7VYv64bPhk1aQH6+xScti4+agKXHc/XOiC+t66x8KPtFSEVo+QG/3zL0MdyS8Ro= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785241922958539.1124290126476; Tue, 28 Jul 2026 05:32:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogy8-0005K5-8Y; Tue, 28 Jul 2026 08:31:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogy5-0005IS-SU for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:34 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogy3-0002yc-Vb for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:33 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-49545ba3d4eso21940115e9.3 for ; Tue, 28 Jul 2026 05:31:31 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241890; x=1785846690; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=HjzRm4/vAf36krK1NQLIMmFfWZ78E2Nswa/LRXVgusY=; b=IqObXCHQkf+cr8mvRm0Tkk0H6ZxgvRpAS4XS3xDoc/UjRv9V3G1ir5g6XHhRou8bJq fL+UcqT1d4DqoMUBXLyU5LzJ5T1K3yLbNK2kSB8VA/4EXQzrtvxcAjZPnRMLWHYZdD9q UYuTI++6zBEnVraZ721/OL6AU+uKabWorTS4OIu/RoKPLUmSKcPplsIxuT+t9tg5OhZl AsEPlTsgSsXO6N9lI96uENBEHPgTcym5K6FH1Rpt+gUYEykCa8K3AwOfJeIrmemCyBqg X+FSuRvpGGDcOrBP5+hjoc0GzHMlU8aWzP9UGVTx0lDVopKvFrRCc783qxKWSwvJSrTF 6pjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241890; x=1785846690; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=HjzRm4/vAf36krK1NQLIMmFfWZ78E2Nswa/LRXVgusY=; b=IwmDiMo2tslV/LW/sX3uSYii3Vwdj2AOilevGZCDucej5KqOctj6p8Gn++JCRH08zX Vj8do4xB7ULvdQlZvdpGa4O3EbUy7pxsjhuI8HYHeVRX/sxd/znwLQybY5ViEsSueyKM O1JbrngBw7ocHpwZbi+YixiOYhDpEKqik2Ak/E2X6/51G21VGoVZZQ0cdmCNEz24fBVW 4dV5ToMYA4Wv4OLFILLGCJY0Sj12jG5R2HIneQ6Yka4x4SXBPtt/Rq3TRfXde221Q/MA y7yAXWkXRpJqvp6b5DmzS9v7SakowQfYVQ1kOzEY5F5NZ26IhN2xuLcEnP7LyWkjOgGB plDA== X-Gm-Message-State: AOJu0Yx32l18Jsy2L3W+KmrYtdQfVUZLAPwSHFWYfs7hy00YmAeGZ7Hu qDqYLMpUI9XkbSzW0vrZmepr+91GEm5GcauiQDvv8v5LkneAnHW9ArODOyNk75KDdGP8DNh8Rpy OM34Y X-Gm-Gg: AR+sD12ZeMmYn6CnkK3vKVSWpeUI2YjvBdindcYYW7PS3JW1vdaJYYVWNjomwJsGN2U FRylglcBYdJwzAOE/xK3Ns4ugRwRwZ2KwBrCvNjD8WQaaFPJJ4efNIHI7JQXKWbSqdmP2hCXFEw lCBGchmz37Fmlkx2N8TNEYlxuf0qTbObQ6Esb+eHmTQpyj27AnVqLCklvkG4L8SDU3g+dtkRTLZ LFdrAVHZ1Wn6qS2bZIhRhtQY2/A53Sc985gClilKLCuclLHaMIuH1w+RSZksijQR47UC/SQVidE AeKRFzBVMZHRamiMMO5p5kBqK3JVV98La0yBlR+uohJWaFqVbLr1pmYOmmXy+xokLoOopZ4fdHm i7D2ZRfBPX4WmntTmNz+F5yyknzNyT9hxfiP4jR28P3URW637Fgj1fCm4fkRaNNBBV1rkp7BVxS 3eSvlbEBIEj48SSRR4MdRnko4CyCacOYVHfgyVgPskxv19G8tCqw8l3HRds75EsGWzrGweOKSzu z3/7DqC+b4= X-Received: by 2002:a05:600c:1d06:b0:494:282:106c with SMTP id 5b1f17b1804b1-496c643562amr23677735e9.16.1785241889895; Tue, 28 Jul 2026 05:31:29 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/20] hw/intc/arm_gicv3: Fix ARM_GICV3 dependency for KVM / WHPX Date: Tue, 28 Jul 2026 13:31:08 +0100 Message-ID: <20260728123127.1711653-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785241924266158500 From: Philippe Mathieu-Daud=C3=A9 KVM and WHPX GICv3 implementations call gicv3_init_irqs_and_mmio() which is defined in arm_gicv3_common.c, itself build when ARM_GIC is selected. Both KVM and WHPX are conditional on ARM_GICV3, itself selecting ARM_GIC. Only build the ARM_GICV3 accelerator variants when ARM_GICV3 is selected. $ git grep -w gicv3_init_irqs_and_mmio hw/intc/arm_gicv3_common.c:314:void gicv3_init_irqs_and_mmio(GICv3State *s, hw/intc/arm_gicv3.c:450: gicv3_init_irqs_and_mmio(s, gicv3_set_irq, gic= _ops); hw/intc/arm_gicv3_hvf.c:710: gicv3_init_irqs_and_mmio(s, hvf_gicv3_set_= irq, NULL); hw/intc/arm_gicv3_kvm.c:822: gicv3_init_irqs_and_mmio(s, kvm_arm_gicv3_= set_irq, NULL); hw/intc/arm_gicv3_whpx.c:186: gicv3_init_irqs_and_mmio(s, whpx_gicv3_se= t_irq, NULL); Fixes: a7bf30342e6 ("hw/intc: Initial implementation of vGICv3") Fixes: e4c95f78a47 ("hw, target, accel: whpx: change apic_in_platform to ke= rnel_irqchip") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20260721122135.6288-2-philmd@oss.qualcomm.com Signed-off-by: Peter Maydell --- hw/intc/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/intc/meson.build b/hw/intc/meson.build index fac2d228f9b..377de78bb41 100644 --- a/hw/intc/meson.build +++ b/hw/intc/meson.build @@ -45,10 +45,10 @@ specific_ss.add(when: 'CONFIG_APIC', if_true: files('ap= ic.c', 'apic_common.c')) arm_common_ss.add(when: 'CONFIG_ARM_GIC', if_true: files('arm_gicv3_cpuif_= common.c')) arm_common_ss.add(when: 'CONFIG_ARM_GICV3', if_true: files('arm_gicv3_cpui= f.c')) specific_ss.add(when: 'CONFIG_ARM_GIC_KVM', if_true: files('arm_gic_kvm.c'= )) -specific_ss.add(when: ['CONFIG_WHPX', 'TARGET_AARCH64'], if_true: files('a= rm_gicv3_whpx.c')) +specific_ss.add(when: ['CONFIG_WHPX', 'CONFIG_ARM_GICV3'], if_true: files(= 'arm_gicv3_whpx.c')) specific_ss.add(when: ['CONFIG_HVF', 'CONFIG_ARM_GICV3'], if_true: files('= arm_gicv3_hvf.c')) stub_ss.add(files('arm_gicv3_hvf_stub.c')) -specific_ss.add(when: ['CONFIG_ARM_GIC_KVM', 'TARGET_AARCH64'], if_true: f= iles('arm_gicv3_kvm.c', 'arm_gicv3_its_kvm.c')) +specific_ss.add(when: ['CONFIG_ARM_GIC_KVM', 'CONFIG_ARM_GICV3'], if_true:= files('arm_gicv3_kvm.c', 'arm_gicv3_its_kvm.c')) arm_common_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m_nvic.c')) specific_ss.add(when: 'CONFIG_GRLIB', if_true: files('grlib_irqmp.c')) specific_ss.add(when: 'CONFIG_IOAPIC', if_true: files('ioapic.c')) --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785241983; cv=none; d=zohomail.com; s=zohoarc; b=ldq2E4sChKjkpJbCrIg2k9JoEq6PlIfxEnBmKB6VIOa8Q+JwLBLxERy/Sn1J/vfGuKwz69DthrjI7aSd4x3wZsG1LuzsTL1VU1Rqd4lK8sYKL0JjoU8BQrQSMwym1YqokF3puM+4s4nESKS5T9c0VX/cELbYsA81jDOnpmqkCnk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785241983; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=eHJg2TI8NW97mO+REE/Db1uHVBK+LSsko2hTZNzs3wo=; b=kQHtVolIaU2o1rP8K9RE0GXPb0XTy6KsgY3yvvN+PgZfprpmEfOTke4CByar9gTuR9zoSJyel0i7vWGDnNmoTwMPn/TK0dEVcv3aEyI5lwPoUnuo/gyC8vZdZVJLxddC6NdoUQb/BamCH6+AEZnQusSsRPDuBKcbm3YC0d73ACw= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17852419831707.192745720588277; Tue, 28 Jul 2026 05:33:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyA-0005Lw-SX; Tue, 28 Jul 2026 08:31:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogy7-0005JS-KW for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:35 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogy4-0002zB-Ay for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:35 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-47f7027ca11so2118641f8f.3 for ; Tue, 28 Jul 2026 05:31:31 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241891; x=1785846691; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=eHJg2TI8NW97mO+REE/Db1uHVBK+LSsko2hTZNzs3wo=; b=eqMkxaqjdwqTfojIQYF507DePMRD762GYzqcTa3+1u4SE+UExNLMkYU9JMbWFtVLQp hhL/lLzJwV6pZBhBGFoUGVXYd/lPJXSiThsG+8TzDM2LtouODa5Ix5YNH22gboYqXy8W GiX5J5JLuDYhGAAVAYuDEHfq3hFUDIrQedTHHFLwKkeXEnOUsSnxDp5xNIIAU35RgH8I 96b6bgDPaW2gydasDxx6GosgEYMK84L3tPCjReTfs3JorCdv0kO8UKCF5zFHgv2glSrs gz3RufMKbBS8kKV/wJs5B8PuTnB1ZsHQg8sigxPuL/yhynaAk5r6VgIDPyHezPgWp0cS JQyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241891; x=1785846691; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=eHJg2TI8NW97mO+REE/Db1uHVBK+LSsko2hTZNzs3wo=; b=XXQoYRk1Z+ffjgqjhfgOmK8+LyC19AnQ8NhR+EoQpmxRuODD8ii722TVAxcn2Q4m4f GFizQ+dJ0lWdpeccePEhTl0u9GO5gwB0Bg4/Es7CMwjpZClIgTIAtQVF04TVuPQlSiQo 6hT3Z359afibWpbP5QFe63s46qYttnNzAvY2HkeXVLdt8TbfZGSRfMS7k4XtWwQdjsMv w3p9i52UHj4SvBfWhKT215roP7z1anzRdkyEe3I8MxHLSk3Zg8SUVev6rm8bUzy1xnoU KrR9hRqj3cSPBrDHtIz0386SI9QJJ88iEnx80jIl2M6ZwPI4BHRM8qRMZ9FcWM5aE2cT JEnQ== X-Gm-Message-State: AOJu0Yw5dYItVk3d/5ZM3ER6TYygSeIrO3Sos20HBrb+wHeWEedpeO4k BFIImgc/KAARA3y66La9xhZA9D6eaTNtyCMSWHkM55FofN+imZXPgEPLBjzJg6H4h21hRhRkyzd JgYIy X-Gm-Gg: AR+sD12K1TMwpSEN7USiUSF/pv/rIdBe+y/a5x3YVpoQuc6xfEVk/lKgwEKXCDOuHtw acj4uDnAiExR7ZogUx0rg2M5IGYauRvqCq5tPIVPgYHYxoot0l8u9pmyDcf7gw5+B98z0PJqRyo pLcL7186Uu14aGPNloJgLmyLNLlS3zCYF/Tv5e+yG8Va5BDtrcl1PojlJj2vQyInAQE1rGLp7bF NunT6QWF57qpbu+WTVERBUDZtOSVWP9r4JaaLdWNKGvmq7dpxvBpVGIJ30Prqpt1bb/uYyt8WcC GjcXGKT5yZaRuoO35WZuQPFndBiYWkqyVREi/Muhh+hAL2FGh2I7jgUeQBgRvTqrZt0LZMK59rG eYv8YpqBmcyZlQ4Jmtf8MjWtn6wOom/LDLCbUXRvCjctNqwPuibV0rllN+hNjrDlu+zMjrdZGFZ HMDXt9uFpGcMCGWgHBvwvO/3U7t/3f4M9EY0UxLtcDDOlOZ0/lcEn/zuSBfFCr3zQOu7ELDjdUu tTXKI8x8cN2TFSeS/KeSw== X-Received: by 2002:a05:6000:1865:b0:47f:8abb:7476 with SMTP id ffacd0b85a97d-47fb1e72377mr2568128f8f.19.1785241890715; Tue, 28 Jul 2026 05:31:30 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/20] target/arm: Add stub for define_gicv5_cpuif_regs() Date: Tue, 28 Jul 2026 13:31:09 +0100 Message-ID: <20260728123127.1711653-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785241984114158500 From: Philippe Mathieu-Daud=C3=A9 The common helper.c file calls define_gicv5_cpuif_regs() which is only defined when TCG is built: $ git grep -w define_gicv5_cpuif_regs target/arm/internals.h:1885:void define_gicv5_cpuif_regs(ARMCPU *cpu); target/arm/helper.c:6334: define_gicv5_cpuif_regs(cpu); target/arm/tcg/gicv5-cpuif.c:923:void define_gicv5_cpuif_regs(ARMCPU *cpu) This fixes when building on macOS with --disable-tcg: Undefined symbols for architecture arm64: "_define_gicv5_cpuif_regs", referenced from: _register_cp_regs_for_features in target_arm_helper.c.o Define the GICv5 stubs in their own compilation unit, otherwise we get the following error: duplicate symbol '_raise_exception_ra' in: libsystem_arm.a.p/target_arm_tcg_op_helper.c.o libstubs_arm.a[4](target_arm_tcg-stubs.c.o) Fixes: ee0f1ce00db ("target/arm: GICv5 cpuif: Initial skeleton and GSB barr= ier insns") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20260721122135.6288-3-philmd@oss.qualcomm.com Signed-off-by: Peter Maydell --- target/arm/gicv5-stubs.c | 17 +++++++++++++++++ target/arm/meson.build | 1 + target/arm/tcg-stubs.c | 4 ---- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 target/arm/gicv5-stubs.c diff --git a/target/arm/gicv5-stubs.c b/target/arm/gicv5-stubs.c new file mode 100644 index 00000000000..845626d7c6b --- /dev/null +++ b/target/arm/gicv5-stubs.c @@ -0,0 +1,17 @@ +/* + * QEMU ARM stubs for GICv5 TCG helper functions + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "internals.h" + +void define_gicv5_cpuif_regs(ARMCPU *cpu) +{ + g_assert_not_reached(); +} + +void gicv5_update_ppi_state(CPUARMState *env, int ppi, bool level) +{ +} diff --git a/target/arm/meson.build b/target/arm/meson.build index 4412fde065f..f6ae8934d1b 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -37,6 +37,7 @@ arm_system_ss.add(when: 'CONFIG_HVF', if_true: files('hyp= _gdbstub.c')) arm_user_ss.add(files('cpu.c')) arm_stubs_ss.add(files( 'cpu32-stubs.c', + 'gicv5-stubs.c', 'kvm-stub.c' )) arm_user_ss.add(files( diff --git a/target/arm/tcg-stubs.c b/target/arm/tcg-stubs.c index 8d97449cfc6..aeeede80661 100644 --- a/target/arm/tcg-stubs.c +++ b/target/arm/tcg-stubs.c @@ -43,7 +43,3 @@ void vfp_clear_float_status_exc_flags(CPUARMState *env) void vfp_set_fpcr_to_host(CPUARMState *env, uint32_t val, uint32_t mask) { } - -void gicv5_update_ppi_state(CPUARMState *env, int ppi, bool level) -{ -} --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785241922; cv=none; d=zohomail.com; s=zohoarc; b=TtObU+2YU1Ix0heF3DouhJGgbb39zysiLQ3Rvge4yGDvXMYG8QGyGvN3pblest8W5CA5sm6TmLQ8Ng6BoxTt17KxV7oC6ARsQiP0MPjUdcD7FuF+bPuNPYERoshhJiLBteso9zSNPknLURjVf1jF3AVi8/HCmm+AiELfhnQvuZY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785241922; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=cRcnjDOvFXhyS+1VsfHi35z98OmmmrC2zPHwTW0UIAk=; b=bAuNS0Ks1e7dRzu95XM7m51ODphHQXBvSSO9Ohbl+q6etLFLfH3YTEqaLpcIBuY/MugLhJkIO7LehfOk5E7slMnA+BPeeMWt5f5mnae1NePHykELLO5GcKmyf3nl3HDyqFkmze8gJasI+E50IqviW97pKk9vCYbw+r7HPkQP/lI= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785241922959827.3695856210447; Tue, 28 Jul 2026 05:32:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogy9-0005L0-Uc; Tue, 28 Jul 2026 08:31:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogy7-0005JN-Hs for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:35 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogy5-000308-JV for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:35 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-4720f3bf164so593129f8f.1 for ; Tue, 28 Jul 2026 05:31:33 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241892; x=1785846692; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=cRcnjDOvFXhyS+1VsfHi35z98OmmmrC2zPHwTW0UIAk=; b=PKBCVmibdyPVEz30JsYgvalG4uFcPZwxUROUJjieetntirCONI3qWOaVXJTuBlOhlW XQkvWPAbtwPuetP5Viom4bcK6otognguwcUsh97foB0wwqal87EsT3kLTkzvq6yo0mfy 6bK9vHatLSsNa3SMgAD+1sF++790gGQjLaJ7n6DI6ZXIqm+e8haU6iplIAMfVdIILC+A 4ZQUCs3V56mK77si4MQhHM4ZD0INImnDQDmOVr9YQ5ACiAjBjLIMsY0/E8yuTd6F19bF ZlRkhpHk1nmC+MwP3yqzZbG0cqzt8xQujC+r5eCGJXa380UHwq2tC7Hh/T2V3iYxBOzl TRvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241892; x=1785846692; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=cRcnjDOvFXhyS+1VsfHi35z98OmmmrC2zPHwTW0UIAk=; b=E+QWH4EGV6LgAEFl+0NKxWbT8kOuP5Mo1Qhb4DN+eyUwbzSLDADpqyFPFLq/G29cCT pY7AtQFzVX6yLL1TNTfNEFcvqeQlBokIO7Ah2W4fOIt39jawWz4W/pDb4T0I92QbtDAG UfGjTnnDa6DADsxi0UXBivdi7bNUcre/lkHsdtAGU0WJQOr/2tlYOqP27bdv3XEzuxu7 onIW4PMDRW7fKPWuM326LVXyveA526BGcCsqnWijCi+XgESKPwWeGYSNhaiXgVOpaeX3 YgnU1BMFu/tm6pdLPr1x7pEZ8DFpH/O37Mok2YuxF0SvQTh+vr6whp1pu2JsojOXgu9J ULfQ== X-Gm-Message-State: AOJu0YzpQIWf7zuMjqsfMkC+IDYCO4dcDiKKSE0R5yHJnYxzbOZnzfSU rO9wGHuXos1DzK2jjTTElZKDMJHbeGGIsx1iSA86naYoImu8U01bG0iFMNTYXCbGkTk1PeiQC5r c9yPV X-Gm-Gg: AR+sD12lmaq91BECO58eH2gmGGhwtHgwaJYvMPTETe4l8kmT65Vzo2lByPKaBer+E1q 6ZqhA80YcAEaoZbSpJ+FCz+izUuYNNf82DwdRBfF+MnLbvUfDp5nZvNZCZPkX+7xEuMnfU/l0UV S0y71EI5FAs79LRUjvScDau02Q+kT5JotP9lv0mgmJmfgHorUYD7A50hSO+BmHxXvhmhVVuOZ28 ELlMI4DOrIH9DWha4+i9jRGxAl/ztIydhC+7y+PgfZoV8lzxi01R7KAdVHyE4aC4YMzFRsZy4fd kbQPG4kVQORTWYqiAaRqL5KuKBbrr9pGxKtMZezppEVV1/XU2Ph1vKPgc70CFaakirtYgakGPDE UFaHcU5WohGVubNj/bc0SgDF6iaxLuPkPzSIXzp0cKt7vvY2Ko0HO+FYv0rdvCOiI6JR5WBsid2 mB0VNgzDVOE4Hb6j4jECvDite8O/cDvFoBC5sh0RbJH4xLHeeMOP9KrYCv88JqWZKJTJPJOUixs QPCuvNH474= X-Received: by 2002:a05:6000:1ac5:b0:47f:8c78:6b3e with SMTP id ffacd0b85a97d-47fb1e85c2bmr2546131f8f.5.1785241891937; Tue, 28 Jul 2026 05:31:31 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/20] target/arm: Only compile gicv5-cpuif.c when GICv5 is selected Date: Tue, 28 Jul 2026 13:31:10 +0100 Message-ID: <20260728123127.1711653-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785241924375158500 From: Philippe Mathieu-Daud=C3=A9 Only compile gicv5-cpuif.c when ARM_GICV5 is Kconfig-selected, otherwise we get when building with --without-default-devices: Undefined symbols for architecture arm64: "_gicv5_activate", referenced from: _gicr_cdia_read in target_arm_tcg_gicv5-cpuif.c.o "_gicv5_deactivate", referenced from: _gic_cddi_write in target_arm_tcg_gicv5-cpuif.c.o "_gicv5_get_hppi", referenced from: _gic_hppi in target_arm_tcg_gicv5-cpuif.c.o "_gicv5_request_config", referenced from: _gic_cdrcfg_write in target_arm_tcg_gicv5-cpuif.c.o "_gicv5_set_enabled", referenced from: _gic_cddis_write in target_arm_tcg_gicv5-cpuif.c.o _gic_cden_write in target_arm_tcg_gicv5-cpuif.c.o "_gicv5_set_handling", referenced from: _gic_cdhm_write in target_arm_tcg_gicv5-cpuif.c.o "_gicv5_set_pending", referenced from: _gic_cdpend_write in target_arm_tcg_gicv5-cpuif.c.o "_gicv5_set_priority", referenced from: _gic_cdpri_write in target_arm_tcg_gicv5-cpuif.c.o "_gicv5_set_target", referenced from: _gic_cdaff_write in target_arm_tcg_gicv5-cpuif.c.o Fixes: ee0f1ce00db ("target/arm: GICv5 cpuif: Initial skeleton and GSB barr= ier insns") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20260721122135.6288-4-philmd@oss.qualcomm.com Signed-off-by: Peter Maydell --- target/arm/tcg/meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build index 227e674ae2f..cbfac0036e7 100644 --- a/target/arm/tcg/meson.build +++ b/target/arm/tcg/meson.build @@ -91,6 +91,9 @@ arm_common_system_ss.add(files( 'tlb_helper.c', 'tlb-insns.c', )) +arm_common_system_ss.add(when: 'CONFIG_ARM_GICV5', if_true: files( + 'gicv5-cpuif.c', +)) arm_user_ss.add(files( 'tlb_helper.c', )) --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785241939; cv=none; d=zohomail.com; s=zohoarc; b=JCFDiI5/SNlU7NqOAX4AHldCp4NaZudxCdlP6kBL6iFHwGd1+nLZijVPixGjmc7Tb5229KZHqmbo2ocarVzmamnsCDcAFZQpOcSuSvA0aXTxoqp3aBWTx5n6cawkEBv0ik0j4BL3x+gRVx2E7j7vW9789P96ArFOK0eM4VwpM8Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785241939; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=7UYGFLgmCUwo+Tmi9quT2d9jX0zt0KMl1Zv6YOhYJJI=; b=D8+pWWF0crDfIaKkirl629/Cpq2+K6/q92rF25Iw1C7ho7F08dbUaBdDk76w+B8jLdXWS4H+KasMjRLiwwVsa1zp457WHdvQNDlPewpV50MshQiUPcGpZww8gTtJS6Nt/wLz6JrNMfloVV6/xlxAB4+flEmmlm56gr8av3im2HI= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785241939566100.16776236877593; Tue, 28 Jul 2026 05:32:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyB-0005Nc-Om; Tue, 28 Jul 2026 08:31:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogy8-0005KN-To for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:36 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogy6-00030V-Os for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:36 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-47f703a9d05so2536571f8f.0 for ; Tue, 28 Jul 2026 05:31:34 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241893; x=1785846693; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=7UYGFLgmCUwo+Tmi9quT2d9jX0zt0KMl1Zv6YOhYJJI=; b=KsElx9UxNDle+8U1Mcq5QbeZLAk+J8AuX+2zmOwx3YEhY/96dizL1SKPC3Syp+wsV0 drwJxq+IrKGnVhEVOz2V9xQwmT9YPEh5y8/GaopljP6Im/zrPvBjhElt8hWqzFz4Uyr3 eI5eXijcELOO/I+N+lwsc6yZazqGoZ/jlZ8ABMAiQukkwiEq3T7HGi6sv2dGWWK25NJP Dk/FnEa7BBJdt/Jt5mzb+8Io9qw4DtbD05HTWm7I8twhL0ZjWM568mVZxWPprxnasoai NikBy/VSvkhwHzQGFX8dWjk7xDaruhjUoQph4SFkPWFF8XGBlY7ccBkq4R+pPz9L3LLx kokw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241893; x=1785846693; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=7UYGFLgmCUwo+Tmi9quT2d9jX0zt0KMl1Zv6YOhYJJI=; b=D6V56szfTHVH3SfLwhwXaFHrPuPqncFqBtm5kp6CmOklFgWvS/OYiCeYyo8kDLKDRj aJrMZfpwvYS5x/qbO/MyTWiBLn2Zn7MQHiEGlEhcUHy5YSy2fL3q/xWuBCekt2KMzJui EGQCjB0ZYOcBG8cPhpsNd1dgMK4fX+BNnKR4AHsxBCPjxiSsmZhE8Sy9f9CSjKyupJHh y2yZcWmXakuWx9XmhrBDMhZzV10jkQwMjwM5LYJ19G4E4JJS2xgn++FgjrR3wPRAC52U bAiJey76RRw0Y8XMAZBDIRefbzET0aIArxy/22tMLANwU5TOAQShBQS0ht7PLzAFQWP/ xncA== X-Gm-Message-State: AOJu0YwRbNjBZp7dkmLkpa4rQdUJ4N0b922KdXjObiPJJAR1o4xvqyHD 88Tn0G1TH1hhYyA6wwhA4qrRYF95fZGu9lBCWW4IocigMAad6VtOMSakKymbPITqJOULOwcF3W9 seyve X-Gm-Gg: AR+sD10J+cDeQRxGjdA9vPoocu1hKNX9I6AYk0blT+O8kFnAScaitR7a2hE83CjtfDE m5wBMt0V9KwAOtSfeuEfYLYZfdm6xpWZg7YudVyNqQCVHB/XfAMnKAanHlfedPFpQkXdUwIrJtH KteN+w9nV7ZG972Ab4NbQKCwSUcb7yTJrXTnpEeoZ8SxzhSY1IpiHu/ja3ecfF42k+HbYFrZRIo FrKQTZ5gKzY0Qo14hino67fUujJXUonZ2g84WJqYSVObBSZZI0lfnHo8Pr7N9thf1pHPWKioLgf 8sSs+JXlDpE9KS4X/oWM+cjElceZKogJBRi+8gYN3+8k685VuAqGB3h4yYFU/zFSz+iLUc2jwwu bdmjaORW0llQ/XIdwBwqKDdZyPde6AfOXFSIybZt5U3pF6TZSILvZKixZ3h+k5wt4w3oKWbfkFF DPURu/t1M2tZfgWMoS3h/rH1UhZPBmLCHf0MtRwFGA04hP+Qb3TVdYaPOckEyNH/F2v2/rpvZTP 14JOGVYDcw= X-Received: by 2002:a5d:64c5:0:b0:47f:93ea:cf47 with SMTP id ffacd0b85a97d-47fb1ea7cbcmr2663634f8f.37.1785241892802; Tue, 28 Jul 2026 05:31:32 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/20] target/arm: Build TCG stubs as stub library Date: Tue, 28 Jul 2026 13:31:11 +0100 Message-ID: <20260728123127.1711653-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785241941808158500 From: Philippe Mathieu-Daud=C3=A9 Use the stub library introduced in commit 0da978cdbc6 ("target/arm: define stub library") to prevent symbol conflicts. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20260721122135.6288-5-philmd@oss.qualcomm.com Signed-off-by: Peter Maydell --- target/arm/meson.build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/arm/meson.build b/target/arm/meson.build index f6ae8934d1b..0369f96b4cc 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -38,7 +38,8 @@ arm_user_ss.add(files('cpu.c')) arm_stubs_ss.add(files( 'cpu32-stubs.c', 'gicv5-stubs.c', - 'kvm-stub.c' + 'kvm-stub.c', + 'tcg-stubs.c', )) arm_user_ss.add(files( 'el2-stubs.c', @@ -65,8 +66,6 @@ subdir('whpx') =20 if 'CONFIG_TCG' in config_all_accel subdir('tcg') -else - arm_common_system_ss.add(files('tcg-stubs.c')) endif =20 arm_user_ss.add_all(arm_common_user_system_ss) --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785242146; cv=none; d=zohomail.com; s=zohoarc; b=eFUFrPJR1X13kquhA8E5lPdFB70wEY7JAxoHNC5UHTCJPL7oFUGUmFARnGSWicF3AWTRB+29tasHxaourTh71ioEFw/sTS35kM0VxAJPMb8ugfHLW1rGE9Upy8/v8MI4lXv79Av0Ux+tskvpSes0JCYexaMV7MEV8nG6tSt5wq8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785242146; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=gUUiNLWtaOE76P9Ld8dPEc8PLTGOYX0cCZJT6bvTEgk=; b=VTM32s5imGtfrTyItWpQfSvDVfOmNziBgTpQHwH5lKQQxpGe5K94SGAIZ/+PLgliSLgeyFxoFqIU3226NK0EvwLYj2f4REf5UUCVfkEG6K5jlNxKHf/Vp5DOK71F/zniUmDX7DNwNc59BezPNNA5Dr8GN5aw07LvHSlk7DQti1I= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178524214625158.59663438181326; Tue, 28 Jul 2026 05:35:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyD-0005Op-4t; Tue, 28 Jul 2026 08:31:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyA-0005LN-9Y for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:38 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogy8-00031k-CH for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:37 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-47ddf7b09e5so3814787f8f.1 for ; Tue, 28 Jul 2026 05:31:35 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241894; x=1785846694; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=gUUiNLWtaOE76P9Ld8dPEc8PLTGOYX0cCZJT6bvTEgk=; b=NouFk9+vnaJUcPHpR378lcyTyXRgUV0m7mooFEfl2a16PJDosGH2/M+bBX45xssljX 0E3qB03usZAEAsZmR9EssERx+I2QZqdA9zHc2ufXa6xw6WmSheVjSDH/OJAzzBDIbKW5 dGLcmsgioOLZBVMUyLkq4m66jgXt1DCBn8U5MQnz8TnBs8KHjaZj6E7CzHs2Vn54sRjW 6rJK2NNhJehv+JcsUXXtD0Knk/bkZvb3j2hKsf8kvCJDcF3pm+DxumhFXaTgAsRZX+hw 47xHQGUxFBkPr8AmbO+vZlilzBcms0DUWukQb47YYSMAoPGFDc37IaBYTiQflgomiZRA mC0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241894; x=1785846694; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=gUUiNLWtaOE76P9Ld8dPEc8PLTGOYX0cCZJT6bvTEgk=; b=J1ArvzRpEKeRIEqjQeAuqH6H9eRgwulG2MKtieDrUofweoQ8WqtBbbGJqQ9p3i24mS OldssSbCvgGXr3tbZ5PWEkNQZVsCsBpSdnVIlEi8IgWk9kc5eS6s6utkuPC+twqsmzKJ PLAkZyEJKqSwDqNYxwjOFXLYCFcJDHVJAnUeXKHtnA2hvXWDyR7Nve4uHbFWUvWvMF1F nhdsYMmEbAgQFoSvg4IZcrbz+FFJkNY43Dsl04OCB/yrP4EwAI5dFsRUTPXt3NizmOfz vTOEdZSLCY9K/x6UC9y3vo4fcqEY2oEGH66WCPK/UEogWl7RSt0WWgTu5eB+sZv0ZCQa D0iQ== X-Gm-Message-State: AOJu0Ywg0auTtn5DBc5v0sfQPpypz6nEGrxie2Cc477v4HNOvXzn5hw1 2cuUgdgEBlKOztOvE3fxybsOvhHQaD3EqzYd1gJGQniFG85c519+GjBvSshlKiAhp70yUKIZUMT +wydZ X-Gm-Gg: AR+sD11zP+O2bi+TcYKOw2W64S132yYiObdFweyIN8y81YMtmMr+AqfC9tN/WdmKAkv jBXLFfB20r0XO/St0Q8PIuo43rq1OzLSodzTJ7XJx1KumPViQ2yQUfTKCU7ql05u+YWBegvGmFT mgbuwNb0C8ydumEyzxINAn9cruuR5AMi8ciFpPgzgLRF+QfZdb3BLifMAE4lMnW33HbAcCZ7Kr3 t6HETa77unzmeXMn2n5WEgzaGII7OyCshGWtwuUdPc9zpe43qoZ+Q8Pmfg0Igror2mOgL/0HBiJ t6IAQnE9/+z2mf5yEJjb/YiShsjKoHcltFKc05cja9fyU+L/uplSdSFNkFtjFv/YaBbkF8JffSn UIU4JOx4uBd1XK40ok0z8z6slXNc/TExnfDB59E/I7xs2hJX3ehbaL8H9QEvUx6oRFgkSqj9Esy MmVNLSt4nV+dvMlgYliCiuxGiCSA64KSwCkSsJjfJdXIAcWeLkBVzBwZZoIQpz6oZ5kRwomy/ZD tO2CBcrj08= X-Received: by 2002:a05:6000:25f9:b0:47f:73fb:daa1 with SMTP id ffacd0b85a97d-47fb1e8e7efmr2532926f8f.19.1785241894283; Tue, 28 Jul 2026 05:31:34 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/20] hw/net/can/flexcan: Use mbs[] array for FIFO pop Date: Tue, 28 Jul 2026 13:31:12 +0100 Message-ID: <20260728123127.1711653-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785242147230158500 From: Bernhard Beschow Implement FIFO entry shifting using the underlying `mbs[]` array instead of the overlapping `fifo` union view. This makes it explicit that the operation copies within a contiguous mailbox array and avoids Coverity CID 1662971. Reported-by: Peter Maydell Signed-off-by: Bernhard Beschow Tested-by: Pavel Pisa Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260723070059.6332-2-shentey@gmail.com Signed-off-by: Peter Maydell --- hw/net/can/flexcan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/net/can/flexcan.c b/hw/net/can/flexcan.c index da36d10bd33..3a97edf7a4d 100644 --- a/hw/net/can/flexcan.c +++ b/hw/net/can/flexcan.c @@ -879,22 +879,22 @@ static bool flexcan_can_receive(CanBusClientState *cl= ient) */ static void flexcan_fifo_pop(FlexcanState *s) { - if (s->regs.fifo.mb_back.can_ctrl !=3D 0) { + if (s->regs.mbs[0].can_ctrl !=3D 0) { /* move queue elements forward */ - memmove(&s->regs.fifo.mb_back, &s->regs.fifo.mbs_queue[0], - sizeof(s->regs.fifo.mbs_queue)); + memmove(&s->regs.mbs[0], &s->regs.mbs[1], + sizeof(s->regs.mbs[0]) * (FLEXCAN_FIFO_DEPTH - 1)); =20 /* clear the first-in slot */ memset(&s->regs.mbs[FLEXCAN_FIFO_DEPTH - 1], 0, sizeof(FlexcanRegsMessageBuffer)); =20 trace_flexcan_fifo_pop(DEVICE(s)->canonical_path, 1, - s->regs.fifo.mb_back.can_ctrl !=3D 0); + s->regs.mbs[0].can_ctrl !=3D 0); } else { trace_flexcan_fifo_pop(DEVICE(s)->canonical_path, 0, 0); } =20 - if (s->regs.fifo.mb_back.can_ctrl !=3D 0) { + if (s->regs.mbs[0].can_ctrl !=3D 0) { flexcan_irq_iflag_set(s, I_FIFO_AVAILABLE); } else { flexcan_irq_iflag_clear(s, I_FIFO_AVAILABLE); --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785242031; cv=none; d=zohomail.com; s=zohoarc; b=BXJnk9BtA95jDYQTlcr4kL5XUD8NasYmQnZkMm59C7IjNqk8slsfjuhVKwveJY4kOoH30MzdyrhOqjeKKNGB5PvCoeZIr1HDAGQn2B/4vh1wQA7Azz25tsjr962tfeK2Q01/4W5U90JgB59QyP9ZuBTNViXPgMg7Di0gbdvKVN0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785242031; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=53t/PC/IOFLB1bZ1tVW3ef3eYmULen1B96mTJRH3Ugk=; b=NE4PE2iPy0sGhF3G0RK4gwEe5r1HYAiztYpOOzMgqb5GbaqLD6u2Gg41xrNikdC1IE+E/FwDSvzCi86Of8PaL7chJpjxfBFYVkS5XeM7jcLM/v+lcp03iYgfDuiNG0rs2hxXh3Zeq0htr9T2ZHsz44zP6vSq1+YWBuhBXmPMn+U= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785242031550806.846064658394; Tue, 28 Jul 2026 05:33:51 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyC-0005OA-HI; Tue, 28 Jul 2026 08:31:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyB-0005MQ-0A for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:39 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogy9-00032b-5M for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:38 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-49553515a8bso46714495e9.1 for ; Tue, 28 Jul 2026 05:31:36 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241895; x=1785846695; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=53t/PC/IOFLB1bZ1tVW3ef3eYmULen1B96mTJRH3Ugk=; b=qFbFHY1fyFe4fANfVfHQ4LPumvNuzGIUa0gVUAyTUKak/SdH3/b9/cXhUwZRDh7C9k 5qWKnv0bz7/K32dFNarUwows8TQxer1UyxCSipIpALbZst9yykB597Ah/N8EuzZ2/KD7 chUkVRhO1hAIUmPv9p8ZEE88FuNpPLBatWNPfuw9ZNiyBPwfeGiffPjau9jzEd/28Cx9 zqkhacYXwR9ecWVCXhluD/MViOyHCT379kGamwoRmvli2wyXsPQ/IgtDALrn7z9q+47N kXJx9kwALoBnhA3yXJfVRla8MpedKE/x0NwsDr2qeSPegZ7VkNdUt/pLiznJbFo4jRt6 p/DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241895; x=1785846695; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=53t/PC/IOFLB1bZ1tVW3ef3eYmULen1B96mTJRH3Ugk=; b=SPRECNnnmmvdCgENzSi1JSPDZbI/utm2HbDobQ3DOgPbWurKe5E8UwqhiOFK1mmwic jROaT1reH50QdBvtHCGm1a5+okh0SbUmwJ5hWZMyUYLP7Dxz1FmiiyrO9W8xDCEFbbB1 wCNn9aYGT4l8qn6NqSyb3b8rOLbeSlXgfutSfTPRG+3qZB4s3j5DVtIYK+KxBRKedLBI BHP8U91pwnifcYaJvTCZpAUSbOBfVx54SO3v46e4cJ7UkoK2fJ2uSy/PURpKSmul8sXU 9mg2VLxGDZWad1dznn+o8t+R6+oeehGp9NmKwTUhDcDyor5JpJFQ8LurPFOw319PIZ6n rRjA== X-Gm-Message-State: AOJu0YxPhWF72ol2poGYEfWyFQB2xo8yz9Gu6p2c1Etctk9WZdYennK7 CvpPmZZvizYqwmt7LvXeeWQKtT+BzBG/lTGHsv7906i8nOdOnNX0SnKBJYHCeBLGHJ8hHrQnUAn KwBhg X-Gm-Gg: AR+sD12TanT5Ru8fxJkRU7QGf7WrPMhG8ElMjI0bfhgTaE1AtrDeYnCNEy76YC46t5c /VhvZKp4AonPecrGB7estgdWATlqoDJhs/OKlAhwOji06xl069xvIN16s88z3o0n9R8UMeGUBFr WBZMONauri2mrT5zWumOrfp8J7ldV8qTtc0UnJNMZpBFb7eLuhJAESNCma1CRleVo/oOq6RGFH3 T/ax71FeL6a2FoUMzHeIsbvDnnPsfx6nkcaxmaOlwzhayBdtBR7NgecOHWZnJi6Ax8Yt5pg0MHP 4eOnov1OJ7nxS5IYfj5guifI5yQXMHyMw1MMM2a6PxLZ+/gDXgaMtD0egPNzFHAoFn71CnrBgS6 EOASH6kHxyBKvzScDaW+RWY6Sdc3xmZYVu+ArhWbxymm0Qb1nsLVVvI1IGnX+h8DwR8SDFHR6xX C5WQq/dkKFdLfzzuOMU7D0/VftB6w4AmvLmmAp9vpEV2XPL1OgJJuujfWRnFKUa+QVgoI+1K5uC ZGLVPp8rgg= X-Received: by 2002:a05:6000:310a:b0:46d:8169:bb39 with SMTP id ffacd0b85a97d-47fb1ecd5damr2570721f8f.37.1785241895541; Tue, 28 Jul 2026 05:31:35 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/20] hw/net/flexcan: Drop unused RX FIFO register overlay Date: Tue, 28 Jul 2026 13:31:13 +0100 Message-ID: <20260728123127.1711653-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785242032527158500 From: Bernhard Beschow Remove the unused `FlexcanRegsRXFifo` union view now that FIFO accesses use the underlying `mbs[]` array directly. Signed-off-by: Bernhard Beschow Tested-by: Pavel Pisa Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260723070059.6332-3-shentey@gmail.com Signed-off-by: Peter Maydell --- include/hw/net/flexcan.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/include/hw/net/flexcan.h b/include/hw/net/flexcan.h index 32de7b904af..d8159475e04 100644 --- a/include/hw/net/flexcan.h +++ b/include/hw/net/flexcan.h @@ -35,16 +35,6 @@ typedef struct FlexcanRegsMessageBuffer { uint32_t data[2]; } FlexcanRegsMessageBuffer; =20 -/* RX FIFO view of message buffer registers */ -typedef struct FlexcanRegsRXFifo { - /* 6 message buffer deep queue, queue back first */ - FlexcanRegsMessageBuffer mb_back; - FlexcanRegsMessageBuffer mbs_queue[FLEXCAN_FIFO_DEPTH - 1]; - - /* number of filter elements active depends on ctrl2 | FLEXCAN_CTRL2_R= FFN */ - uint32_t filter_table_els[128]; -} FlexcanRegsRXFifo; - /* FlexCAN register in hw layout */ typedef struct FlexcanRegs { uint32_t mcr; /* 0x00 */ @@ -78,7 +68,6 @@ typedef struct FlexcanRegs { union { /* 0x80 - not affected by soft reset */ uint32_t mb[sizeof(FlexcanRegsMessageBuffer) * FLEXCAN_MAILBOX_COU= NT]; FlexcanRegsMessageBuffer mbs[FLEXCAN_MAILBOX_COUNT]; - FlexcanRegsRXFifo fifo; }; uint32_t _reserved4[256]; /* 0x480 */ uint32_t rximr[64]; /* 0x880 - not affected by soft reset */ --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785242021; cv=none; d=zohomail.com; s=zohoarc; b=k9Ar2L5shbMzHW0+k1ZDuAsfdPWkx0QNPWEyCZaTIgitiTChRJefRmfPiT5j1tWdcthZJSSUGUlXnK//T0nf7VjTZNfYnejmatuC2iyB3RrB8fWhZ/MvR8qFn5xKnseJJlIIEVF4BHYMfDz+sI9NcZDq2xd9MPCjCPislx/tyhw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785242021; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=lKVj3gACkbHKcSCHyOf7jiUGxcjNCDEqa/wnEa9T7ro=; b=D/wYZxT20Ge8ycbKCLqTynw2h142qrHJifq7+oZqHW65g25KF5rLGktQnv2cBN/fjLclcSpmKjoVMU+TIVFf3c3lw+y1k/iYW7EDSX41NjvrroE6qnTD7DdbB31pnQO06pBo9fkD91ecc/9tbcH27uP+2uD6bJZN8hS8wsUxOso= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785242021732434.0292437920283; Tue, 28 Jul 2026 05:33:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyH-0005Ra-1V; Tue, 28 Jul 2026 08:31:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyC-0005O5-CU for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:40 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyA-00033G-GB for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:39 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-47640541585so2450947f8f.1 for ; Tue, 28 Jul 2026 05:31:37 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241896; x=1785846696; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=lKVj3gACkbHKcSCHyOf7jiUGxcjNCDEqa/wnEa9T7ro=; b=yhXEBXbJEfdBrC9GKyoPFMn31YCqJZcmTxklEEg9jVUMFYxy6dttjwNGi6NTcE6w0t 0hCLihAE+yumaxpac1Tx3XCxy13/J/9aK8Ypeij6TgzMu5NWC8N7Maz35AfoHGi8M57L mGYXPVpRxHaofruvlZJ1uULUP9ZgDfA2izg45lh9iY5nATBGlKEEC3e+NPzTxUWjhV6l JQ8nz1A9Jow6q8KpSgcemX+L6bikuLqGN9LzI1zjlkbQygVbfgz+svCJ+k7/XNaxmqO8 SIKADtsTx4iiEHV37JjtECYhdeyfVynUif5VQRKaUlkgL8mxblvkCqHKVUKa6J8Ft/AB JqcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241896; x=1785846696; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=lKVj3gACkbHKcSCHyOf7jiUGxcjNCDEqa/wnEa9T7ro=; b=o53DxTmoVftHAdFY3do5cPVzmwfPaV9aOdx6RmY272R8hfUbcrrFycxOnArOsU5U+a yEXYyCGgOWaLlBcGvoKsVIwPrsgrUiHx/Q+9tePI5QlknKDejxM2kGIw11ECOAW4qvBn 4thqKbvGAqluwlDaN1n4z6JslqMf1oi7wDRC6PSIJIgIRkTYX/UOmsFOOsM6IPlug3ho jwaE48vRX6hiHqOeR/kO6ANIPi2jFcuF/cIbfH8RfU/EaWEyhSOkjkza2oCfBQgnUWJC 2FBvU6zfMzOF1YTX2k5G8hbI7hHetuAPZokG47UjppDE1EIPg/UTxF0+N58/aQL7r879 Nm9A== X-Gm-Message-State: AOJu0YxAS+nMn40iZYpI8gJNfmXrQNPOV0jpkCWqwZ2m5DoHlSRcgTd+ 63b6vejdEibfh8l6VXLdu7E3oQGR5Dow+jJ8lQ952qdg8P/JtRpezixVRu6gk8Dw07kgZmvh+kL u51+2 X-Gm-Gg: AR+sD11MikV93WUFYUZPXhYQMzc/RHmkq+eU1zTw3HRT3e7jAVPZ5aE40f/7XJ4b1Nn D+BCyBhb7O8hKOqOsjKdoJURziDEUaDfhylpyPbtBk0/rw+Z6DntgMBijlOzNzVCS1/tQQv7Smu MuDzt74iLS2BGU0uWEIC9aRNL9V/QKyfSAxIXyT1iz1rYZlXBntIxAiLXij19/xea6sEAazISpn llLIl9dgef31t+19i7imA4ePjMc5p/gS+oCKCmXYNPV2N7nsO6VRODChoFeQ3ga6XenQgc2I/YC 43Q8mOLNCYrZ5IHahulCoxbeMzU3JgiIwD4HDPAjP/TYFhcgA6uPKbyGVRy5KWJo9eYs8MtC5Jv 0GPw2iuPJv/9ZXjrId7sw4YbGP//PCMh5KPadT0VnbQNs/2g2bZmZ+oMiIM/8sDo44zl5PIdB+/ LACATPKhD799gJaMCj0Ebk/2sgz1RPd0nuk7afQlJEl2uaruTVNt+ndYGrd1KOIwDm3ZvRo4DhG Q41f6HV4iE= X-Received: by 2002:a05:6000:290f:b0:46e:37a6:c762 with SMTP id ffacd0b85a97d-47fb1f10955mr2533978f8f.32.1785241896472; Tue, 28 Jul 2026 05:31:36 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/20] hw/net/can/flexcan: Fix out-of-bounds access in flexcan_mx_rx() Date: Tue, 28 Jul 2026 13:31:14 +0100 Message-ID: <20260728123127.1711653-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785242022314158500 Content-Type: text/plain; charset="utf-8" From: Bernhard Beschow Require `last_not_free_to_receive_mbid >=3D 0` before indexing `mbs[]`. This prevents a possible `-1` array index and fixes Coverity CID 1662790. Reported-by: Peter Maydell Signed-off-by: Bernhard Beschow Tested-by: Pavel Pisa Reviewed-by: Peter Maydell Message-id: 20260723070059.6332-4-shentey@gmail.com Signed-off-by: Peter Maydell --- hw/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/can/flexcan.c b/hw/net/can/flexcan.c index 3a97edf7a4d..dd92a383373 100644 --- a/hw/net/can/flexcan.c +++ b/hw/net/can/flexcan.c @@ -1075,7 +1075,7 @@ static enum FlexcanRx flexcan_mb_rx(FlexcanState *s, = const qemu_can_frame *buf) } } =20 - if (last_not_free_to_receive_mbid >=3D -1) { + if (last_not_free_to_receive_mbid >=3D 0) { if (last_not_free_to_receive_locked) { /* * copy to temporary mailbox (SMB) --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785241963; cv=none; d=zohomail.com; s=zohoarc; b=BaUYxt0K/gROwnBTifsI39fgcOM7WvQs567Y9XaJCvGMdFtW0mtHQuZfmKY2fuRq/aYO1hXpb2tx34xb9497cQ61I/J2gUT2+arTYMN3Qe9MFaeVT2ATkxsqhlhDjgad/Yh0SbCMXVWW68EDa8mhE6ZuStN1rYWM4gWN0jYaxPI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785241963; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=y8eybOLgVekjhh0BhhLyot67p4bQFbwkXFEXrdD0XnE=; b=V+Y4HMzrQDYO3gT/bG+u9UoY/AYUWH/QNgPaREpW4d5p8uL/SDrZPJpR/smQ82yHpwPaSEOQvEtogleT0C/TKyXt0zD3njaGipuvR9hU4GrG9yt+jvf6XubG36474zYl3klcXsMs4SwEuItSDkZCMyQghYYnZw1pNO3IhTDN9JE= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785241963553432.23367663505735; Tue, 28 Jul 2026 05:32:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyF-0005Qw-4E; Tue, 28 Jul 2026 08:31:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyC-0005Oa-V3 for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:40 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyB-00033s-11 for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:40 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-495590dde14so42528305e9.0 for ; Tue, 28 Jul 2026 05:31:38 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241897; x=1785846697; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=y8eybOLgVekjhh0BhhLyot67p4bQFbwkXFEXrdD0XnE=; b=FjPVS467j3nQeZfXhkTldHofLGhtraDE4bMJmLZ3lH7rZrJPDmYIDUVOLHOxMu/Mc3 X0TUzRVutihgffQX+DyS9ta1sitCAFdFoHaCQzPPMsReyZWs0jQRDkbCVmUZU+3K4Pao MfPlxyIc/EXdOkoFSfPDRuykQRSCHLE5DUmQ+mn9nZl0CWU+s4Bzh6d1fRuIpf6VQp1R xtZOgEjeJ0vif8fx1NPcndVN18HCm5aO0B4UVOaI959ykztQ8Jz4s9A2+2rlO1tyPyof XKLp5KpNy7ZQXydOf8PnIq/DtNa3K7S2l/JCwvwSj3shdyRgU1wbtfasCyNC7pD/5J0u ryaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241897; x=1785846697; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=y8eybOLgVekjhh0BhhLyot67p4bQFbwkXFEXrdD0XnE=; b=Jaj1u0afzfnUvWcfE5IoHAHHd7O5RQxsJA12WqFbwlMdSwKDzK4PnxkZYLQ7n6Qc8W z99VZJE3pCICLBzZXCEps8XAnNRz9lCqPCZCvnAGt5CzxYGZGRhy00qv64WB+fDRuhly gTTcjWjeWZlTNOpvUUyXpz7belavon1bAl1wpJJutfMAczN///xCTdRI9etxL+p+eCIh /U9WynkA6E2HO430rsWHo5ibAQB5h/A57FsChQJtSqLhknOI5IaRYL133pXc9bpS0FoZ x6BV8usDgMDGCKO3Ij9AhuHOpI8UiMZRdN0wPeai0bsiCDkzk7bdc208GuLmLv/SByUa qmHw== X-Gm-Message-State: AOJu0YwT2yXhQwsk0sO7qdRe3GLE0O6Wkn+9TTmhi8JQp688x5wPbDem rcJx4YgdQhbs6ByLhGiKtVA7i3sKtxVBo0KVyVHkMWAmNKKRygVK0k4Kl6M3HAlx6DRkY87+q9O WBkjG X-Gm-Gg: AR+sD13CUoqrCm94fsPoFAzwUZXt6uEKxcbVYnyJOfGr8AJex9ADF6wvIaDlBsX/qb8 SaXz0Tjg9IFi5NIns4OD/ZkeRei/YvsQvvWvax1E8JbKdPjFD14WnMhUQut1+vTgcccAxYPh21u Nd+R6cVsywJpX4CP8rdsnJ2LwtdTQ87Lam8MDB1MAlEdHzm3yjAH22a6nJ/poyrSzlFNZFOZ3sr m1nnu1wPs3lJeu6uJZfVjEzf/xfwM0xMgrVTfeywgPf/vl7JBx2sl6uDTjfhZiPntgl6kyPSBGJ D2SQaVgYeKdQo2iXXZYauuu+NE8XaoDK5XyrTkqSewf9JwKoG+bFfbdwAHJLhGxKjzHA03OwbtI 9rjnFTXV5/cytXJK+cfHfesna6SfieTbo4tFEZpb47xSaJ0ztKLTmr5gSVcAV5jGysbM50Sfsbu +DR4/9dgDWKvaFvYIH1GiHwKMsR8uAeXpYkn6H4q+gi0ks+aBXIIj4FDZ722jUV7W8MLeK5xGlY Zvn2DQ3CsM= X-Received: by 2002:a05:600c:8b37:b0:495:5e86:4e59 with SMTP id 5b1f17b1804b1-496c656e67emr24234875e9.22.1785241897485; Tue, 28 Jul 2026 05:31:37 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/20] hw/net/can/flexcan: Fix mailbox index calculation in flexcan_mem_write() Date: Tue, 28 Jul 2026 13:31:15 +0100 Message-ID: <20260728123127.1711653-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785241963934158500 Content-Type: text/plain; charset="utf-8" From: Bernhard Beschow Calculate mailbox indices from the `mbs[]` array layout instead of the oversized raw `mb[]` view. This prevents accessing mailbox entries beyond the valid array range and fixes Coverity CID 1662974. Reported-by: Peter Maydell Signed-off-by: Bernhard Beschow Tested-by: Pavel Pisa Reviewed-by: Peter Maydell Message-id: 20260723070059.6332-5-shentey@gmail.com Signed-off-by: Peter Maydell --- hw/net/can/flexcan.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/net/can/flexcan.c b/hw/net/can/flexcan.c index dd92a383373..651904fa379 100644 --- a/hw/net/can/flexcan.c +++ b/hw/net/can/flexcan.c @@ -1151,6 +1151,8 @@ static void flexcan_mem_write(void *opaque, hwaddr ad= dr, uint64_t val, unsigned size) { FlexcanState *s =3D opaque; + const int mbid =3D (addr - offsetof(FlexcanRegs, mbs)) / + sizeof(s->regs.mbs[0]); uint32_t write_mask =3D ((const uint32_t *) &flexcan_regs_write_mask)[addr / 4]; uint32_t old_value =3D s->regs_raw[addr / 4]; @@ -1208,11 +1210,8 @@ static void flexcan_mem_write(void *opaque, hwaddr a= ddr, uint64_t val, default: s->regs_raw[addr / 4] =3D (val & write_mask) | (old_value & ~write= _mask); =20 - if (addr >=3D offsetof(FlexcanRegs, mb) && - addr < offsetof(FlexcanRegs, _reserved4)) { + if (0 <=3D mbid && mbid < ARRAY_SIZE(s->regs.mbs)) { /* access to mailbox */ - int mbid =3D (addr - offsetof(FlexcanRegs, mb)) / - sizeof(FlexcanRegsMessageBuffer); =20 if (s->locked_mbidx =3D=3D mbid) { flexcan_mb_unlock(s); --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785241978; cv=none; d=zohomail.com; s=zohoarc; b=By0jJvVviqoE+N50KdjM1Egu+XNrSzirwYdfiwy5AE/avQayTeygBtc+wF4ecTbHrlpNsemvnFYfdDDKSdXaHSksYMnHSf2f9qtJ1guOtYmI+SXuToldPklw6R+GANa5kkmxI2v0Nd+cNfcg7qjqYe2o+HBt7OubtuwWu8dtJwk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785241978; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=0uyvWvhf2PkGp8LEN9Yz1w34qwzlXkF8Nfzq654Qzu4=; b=HHue0jYjKh+ZrUQxsWIW6NXYLkm3DAcyn3s35IWIKt9H7izzffivEB6otrP0UvjmhnvusGlKnCfveqFmxi4cZShyk9ayIUn02gYyC3kDwQ/xmjJQdfm6bm0Ltdj+1namRHxQ2EWpMdvezI2R5SX+ilpbF4VoTXC/UujT7T2UzPc= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785241978852177.76448660728852; Tue, 28 Jul 2026 05:32:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyH-0005SP-7s; Tue, 28 Jul 2026 08:31:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyE-0005Pk-0d for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:42 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyC-00034m-By for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:41 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-47f9ab7ee38so2015123f8f.2 for ; Tue, 28 Jul 2026 05:31:39 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241899; x=1785846699; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=0uyvWvhf2PkGp8LEN9Yz1w34qwzlXkF8Nfzq654Qzu4=; b=Xe+8WsSYvcHZnhUY+3/eTn/7KL2rLszOEK1US+PCbof+OYAluytqGjDDV9zX0zGoIU IRi3Ar4PHgptvQhoH3E3i7Pn2JXmIBbz0Kw/4EUT/FJ2gAJVJg1p6LEj4oJ72q7eiyU8 6Bv7pZb2cVHhZdDrt6jZtelllYd9y5JcZeo5eUdyAYLcGYmbNoM0tNZz0RORJSU/2DrM eeZitnhKpipeiqmNSKYi9RyBVTFNWmhM8qZZIw43ZGXFaKJ5T9GAfaOv+2BZNNJgPYcW 4FBr4nI/uxqe06+Leh2WEvH8YzxHV/IS5AYyX/m3Y9psEUBp2p4KYclUpn4a6Z7+aL8j 2uNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241899; x=1785846699; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=0uyvWvhf2PkGp8LEN9Yz1w34qwzlXkF8Nfzq654Qzu4=; b=Oz6XqQMf6jdBsMvgiNFEIWYuxkFJdedWygiiJHryNdOrbgE6arhLcdL9etLjPgJmnS DHFJvvuHbXGocuAhMIpbQeN6by8HZlLfVBZx59qgfWcl7K63/KSR6SOdShOob1iTmnXQ x8BcKCZoeOdzSthd8D5pEQUuNXHqNskQnP44I8r6M84cPOuW7KbuNzZ1oMVDnbqCSQAx MStjXLTNg7o47WFGwWlHfnJqJ0cz0UHggh65WEWAlXPkAZtqCDLdKG2bw6ljn8dq4rLs 5LsSIqMgm8rxCP+RGVYox82eaO9m9vkUD0YVLPvbJJ61ET+PW5nrxn6eWifwQLTSAuGj /6Qw== X-Gm-Message-State: AOJu0Yyjq23yiBCUA9Ja9M8+GLBBvoeq66PdrU9gDxPWuhU5M6eV0RJf NCSo20BszYvdhWL69BI8OAbydmnJetj0br45Elmm/qElacV/z6VS2Cthrbo8wmpYl+VOv/ENWgi LS7Lx X-Gm-Gg: AR+sD13SYqwaqckIgOlDl4KPlrdfv9FmKYWFaF0fVrxQB0al58+Gj18mJPfukt8LA7j qkiCTIRnYdY27fePFT0RwHmSxXpD0RX/9uAfu+2GhYWVpgNiBXH66sXnFDc0rRNIJlGXxPilTXe iGGM9njjtLzUyV2JzQPtRvs+dvDMMThsJ0bB0HLAPuYgBUvgoH3bY8txnQLETxM68/AL/pQyYFx dzzTFCn4giZyzMjY8U0THnzRh7A3QoTMp1TQpkzAhYqROu9b45r9ZfTw/HYVnTDrRbjHF92bBM9 gq31TfuQZX+N6sCWvmF+MIzqsyRHD4K5gPjcvNoqDMMDMSd6h5H6bVP+q01wiaX00A45Bixq1QD 9fWTrjgDyxlUl/ekRr/uhoPBtYKiswU69j1Qt1zgnDFcTJNHBubOkVbwILl3KHaVFFyzU46jL70 QkS+m8eQkysJZQiebKvxEiYlu/ORCJS0oRjnkHHDsIIg4BhhVLhizPcW8NoJ5G2kgr0m9tSrLCm p0/SlXAQgI= X-Received: by 2002:a05:6000:2c02:b0:47f:943a:a7f4 with SMTP id ffacd0b85a97d-47fb1f394f0mr2562067f8f.61.1785241898700; Tue, 28 Jul 2026 05:31:38 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/20] hw/net/can/flexcan: Fix mailbox index calculation in flexcan_mem_read() Date: Tue, 28 Jul 2026 13:31:16 +0100 Message-ID: <20260728123127.1711653-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785241979971158501 Content-Type: text/plain; charset="utf-8" From: Bernhard Beschow Calculate mailbox indices from the `mbs[]` array layout instead of the oversized raw `mb[]` view. This prevents accessing mailbox entries beyond the valid array range and fixes Coverity CID 1662974. Reported-by: Peter Maydell Signed-off-by: Bernhard Beschow Tested-by: Pavel Pisa Reviewed-by: Peter Maydell Message-id: 20260723070059.6332-6-shentey@gmail.com Signed-off-by: Peter Maydell --- hw/net/can/flexcan.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/net/can/flexcan.c b/hw/net/can/flexcan.c index 651904fa379..8d680f1832e 100644 --- a/hw/net/can/flexcan.c +++ b/hw/net/can/flexcan.c @@ -1239,14 +1239,12 @@ static void flexcan_mem_write(void *opaque, hwaddr = addr, uint64_t val, static uint64_t flexcan_mem_read(void *opqaue, hwaddr addr, unsigned size) { FlexcanState *s =3D opqaue; + const int mbid =3D (addr - offsetof(FlexcanRegs, mbs)) / + sizeof(s->regs.mbs[0]); uint32_t rv =3D s->regs_raw[addr >> 2]; =20 - if (addr >=3D offsetof(FlexcanRegs, mb) && - addr < offsetof(FlexcanRegs, _reserved4)) { + if (0 <=3D mbid && mbid < ARRAY_SIZE(s->regs.mbs)) { /* reading from mailbox */ - hwaddr offset =3D addr - offsetof(FlexcanRegs, mb); - int mbid =3D offset / sizeof(FlexcanRegsMessageBuffer); - if (addr % 16 =3D=3D 0 && s->locked_mbidx !=3D mbid) { /* reading control word locks the mailbox */ flexcan_mb_unlock(s); --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785241968; cv=none; d=zohomail.com; s=zohoarc; b=AHo2WQeU5gXZMexkdEHKU6u/ulOFSDElnyrbQJ7Jb9UNYquFYjGdBCYSYNoHnl6EcoqOY6CbJTgBfLIzD1+q9OZ/wydpdc6vvY8yY0xhW6Rku/vgKGYP7K4pajl2Deunf3kPc+sYTwUSsbUgBCUK1INVmmtYJ3CpSn/kFpni0t8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785241968; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=JarEyWDVEMKC5wehPlttkbVwi38ocKf1ZaDitzLyJ5I=; b=hlRp+ud6HTFaC/T/WBx0gPM5oIs6FmGiAC5uAPwOkCSRKp9Vg6afS/GOwlKKZ3or4yY82oVchYPnNuVSM24DsxiG5q/JhvvZUqWMINTG6qtxtWrLVIhh+q0t6VYmAssiQmv17eoAvjp96XGFWgn8muTmwutX9Vt+orrsn6o7lOI= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785241967858185.79689664960006; Tue, 28 Jul 2026 05:32:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyI-0005SY-VM; Tue, 28 Jul 2026 08:31:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyE-0005Qh-ST for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:42 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyD-00035n-AW for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:42 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-47f9ab7ee38so2015129f8f.2 for ; Tue, 28 Jul 2026 05:31:40 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241900; x=1785846700; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=JarEyWDVEMKC5wehPlttkbVwi38ocKf1ZaDitzLyJ5I=; b=zq4V/+ZDDVmm1tWaABG/0kp+eMobMuDNqe5RCWi0Fm7EZOyWhm3tuS5AZEsR3wqaMN NyB+9c+ncts3eZMWeWsPIpr8Sb6CRTyy838hKE9XcYA4DHWOeWtAHjoz4998dF/SyweY p1A/HIHV07h8sLy3R+O7TpiPikUeWW4sv+X0UM9hmS0V3rlU5e7vLkete4Ilg1HHsx6O iK0TlSW1rYHNaF5oNacEhYqqXi4RNr0v+08xCRiZjtl4gj/LcBLuMBbkUrStqa+Q9UFx WYn0EUDuCfAnkjXbKGdAL0zXYhql8tF4eYpS5oGNRWfpU+cBTUO14Kj6Kb6kriiyoGRT P16A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241900; x=1785846700; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=JarEyWDVEMKC5wehPlttkbVwi38ocKf1ZaDitzLyJ5I=; b=Ke48/CkiTd+cCVL9gibVMO2FP5oI6PPTIsS24bqCgVzy8dZC8OrNLO7Wf4C/9BAsqi 2VkRupu0EGnAeQS1Fh64LX8T9KExBwZlWFS1eQWwhAxnonWBUOG4SczjVe6Thvb4cU+4 BkHWXufeEskIxXsxqSkZeTudu0LGw2uL6FWl3xwpOVVERoQKUoDy3j1QyYwFu9DptLrY 5G0x+EFlj/anebR9pa9g7jnSsL7FHDLgmce1pSi02pbgiYcb/7Qp8/kpblS3+vTzAVTb GjkrhIaAAWdew9S+PgoIDRzjCNUx509aot3VH3gp1DVKxxApjvLPAeXtgsmcJ/cLd3IC kO6A== X-Gm-Message-State: AOJu0YwhRN1rFATT6fy4GjaBUBK2Jhbiu114EHAuotGdc/pOp7DLwOKe OdlbKiecKZpdON3L9FNuUyzjqODjFz9vyvsuMv6Lubv06Vva1kY5VUPXknloDmzUd6gAuaBeLyj ZXmUq X-Gm-Gg: AR+sD11VbFInd+yFdeOMIg0KigWqjixEQxbPjmL1G3mQQmwmbAC5mpjo/24I5rEREUh byD0Qy0o3IkahVc5wlJQACY1R7sIDdkdhRdoxR0+EunZOFpFfrmuw1KhZZfGXcp6PV/HsjQZ+wF PfWAAWdbeN5VGnSh0xVZurJ7YZpWhCizRr4FIiweyaQLCCg5hwD33jsxhEAxcsUOrDk8Js46R6U 3fC56Q7cfaQpPfnfPH/rPifucUGUvpzl/ar7hl/g5MZHwgUo4rp94x2ECeLYzABZwMYUc6KdcLI lNL32x6xQ295O3nEf+4oA6D+p/DUz8wQGckDNRtRhxbNKmC9bpXr5KzPnBRi5Ymo0w//RDVAKCL CcGbsvacV5OlcsWwcH8+0kvnYB3OCuHBExG66bUIkEfomtWAkMqm406C9kLUIvec1yb7E9Dj74x TWkUmyEnZSlhBFRy4tB0h8A0v0qr1Ewr+N3lQIhx0wpfvGYWWOujLiYDmULQQgyFUI9uC94R/NK aDqwA+T15Y= X-Received: by 2002:a05:6000:40db:b0:47f:91e3:3cbf with SMTP id ffacd0b85a97d-47fb1ed97e1mr2763950f8f.19.1785241899580; Tue, 28 Jul 2026 05:31:39 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/20] hw/net/can/flexcan: Fix mailbox reset mask initialization Date: Tue, 28 Jul 2026 13:31:17 +0100 Message-ID: <20260728123127.1711653-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785241970026158501 From: Bernhard Beschow The mailbox reset mask initialized only the first word of the raw `mb[]` array. Fix the initialization to cover the whole mailbox, as indicated in the field description in the header. While at it, use the `mbs[]` view instead in order to drop the redundant and oversized `mb[]` view in the next commit. Signed-off-by: Bernhard Beschow Tested-by: Pavel Pisa Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260723070059.6332-7-shentey@gmail.com Signed-off-by: Peter Maydell --- hw/net/can/flexcan.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/net/can/flexcan.c b/hw/net/can/flexcan.c index 8d680f1832e..f84f090a7fd 100644 --- a/hw/net/can/flexcan.c +++ b/hw/net/can/flexcan.c @@ -134,7 +134,11 @@ static const FlexcanRegs flexcan_regs_reset_mask =3D { ._reserved2 =3D 0, .dbg1 =3D 0, .dbg2 =3D 0, - .mb =3D {0xFFFFFFFF}, + .mbs =3D { [0 ... FLEXCAN_MAILBOX_COUNT - 1] =3D { + .can_ctrl =3D 0xFFFFFFFF, + .can_id =3D 0xFFFFFFFF, + .data =3D { 0xFFFFFFFF, 0xFFFFFFFF }, + } }, ._reserved4 =3D {0}, .rximr =3D {0xFFFFFFFF}, ._reserved5 =3D {0}, --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785242158; cv=none; d=zohomail.com; s=zohoarc; b=gokod/EYNUkVnGLL55Uk6gAPk3D5pnf8HOIpzFmW59QqEzJxmGaxK5/FS0JZd5Gz0ARnuRygLHsui0tLXTZol31vUh+iYqkdOor9BZ79q8rAkOWRlqAEsIFp9see/z3coOmD+WJ8N/WW8XZKr2a/yWPszj6Su2Lamiv9oz8kJd8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785242158; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=a4dcbC3gNnlrbmKHPiL3tt+ekuDPbeGi+rxaeJ4+ROU=; b=WAGKR2G2qH3V9k0pthDD1PtHdwh+oblpYlnftBxc2YUsmd0mUUPnDfrJPeUrEWfoBjBKRZ9aI8zOFxbJyCcXmIrijebHFEiFmPhEtVTD+2SvtlsItX4+nIq9GqNHkPCdJz7XdZbN4PlcHbd2eLpp8515Vf1a6CPc2j6TCIPlp2s= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785242158033594.7496586922057; Tue, 28 Jul 2026 05:35:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyL-0005Te-4b; Tue, 28 Jul 2026 08:31:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyG-0005Rc-2L for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:44 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyE-00036f-GV for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:43 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-47ddf7b09e5so3814890f8f.1 for ; Tue, 28 Jul 2026 05:31:42 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241901; x=1785846701; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=a4dcbC3gNnlrbmKHPiL3tt+ekuDPbeGi+rxaeJ4+ROU=; b=pCu87mtY/cnjEJBtX7zfqElKzTmXKJ1n/ORPdLJCLyLWGV/txo6ruDT7irfCPKdG7h dX4U8pc/49bCseqnrpLNDYgkpfOlgKKq4Srj8matG3tDGEKXQUG190dhYPJFBnK58b41 cgznHwN8pMtTrhPeSGdbcP8ODsawwh4+sQg9aOPRbsVOE/cTNztnr3R69p+/N5G4imRf jubkfwC73c7jmIpZ89S/mEMDSKsM3nVxHdY+I9G57tpVD22o8DSX9xqN3nVDzk2tVXIq 8WCtmdyGGafCud8yBwRZJULMHQAkN14IC5NIkwIWSykOR5uocyH3IDXlwaQm4DmlxeZo YKqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241901; x=1785846701; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=a4dcbC3gNnlrbmKHPiL3tt+ekuDPbeGi+rxaeJ4+ROU=; b=QdgmWywA3J9xRj09Bn5s3dtJdEKfA+1gOJGjzE4Vl968MZfgjPqqaxz0ImPLLJo2S1 YV/0RKqlA0VLKFeSsdz0Jk26ozHQtXG6fNsdq1xx4bL/j1oKhlgQat0iyUXEfbyk57om gTiF3mdyTx1kykuElJ0WVcTX0l7dh8d78v4M6UEqS+LdKQ4J696PEmxG0mAfiTCeusl6 mPoFyYriZWO/HCCSWnE2FPIrRAgPxb31j936oDcbBlgkVkFHJCGUG1Xep1ECxFuoRyVJ twVSvvdff3RS7pjAajnwS4tJYk9jFwQMkVuzcpstimE4TYRYccBCUfwQJ5jVINDfsSr2 46kQ== X-Gm-Message-State: AOJu0YxWRSKj17Q8Y4pkcwW/5uIF1NdGzV5o9BgLpKMMjbIpguJ948/l supHQtBFzwJZznXuSrxI7QzSIBlG/qO5Tza5CjJrTEbx3lGhroZxjQIBVEjoMPL9rOHGuecl0Iv 0LPdy X-Gm-Gg: AR+sD121ReY9UOMqpbod4gsD+QbQ7RxZ8H/f5VdL/N702sz2URiVJudQbJZRdzrorJS dbzhrtgRMc4CufY3exZ9OBtw5k7OX3qeghlKVy1i1MiDl16nFZPt9M8JnPDTAIFrQ8t1q0uGnkO zcxRBIl9JVsUP5fz0acCrS4H5s2Ss6wKEUIIAPfbp39r1Od0ycMOauaKOj6a5ivKkW14tHZfHOG i0dT+SsL2B5Md62AdOX0w//xQfv4WA6JeeUyK5ayjEdK4QUwwbAy8qtc3AqsleHNjRVvhxe93v9 k3AvedoARmINgMTaXU0GXFfPUTBHXhQn8X2cWi1TLIv0FGcIqJe3iNs+aTwnrcdTCN+dRzD/nqU ymmg014IDF5NZnFgLt1c5iJa9ccxXo44g8mtHBVQUvmV1zU44RT4BJek3rdgwsFTPxKX9xPlktw JcFobmcMU5T8G3Et9gvDbLuk22QhdO5PRV0FAcUuJNDuj4i7+BRDH6MKRtWJaC9c1kl7cE3hlwK dnRO+MWgnY= X-Received: by 2002:a05:6000:240d:b0:47f:928e:21f7 with SMTP id ffacd0b85a97d-47fb1ef25a6mr2766787f8f.55.1785241900853; Tue, 28 Jul 2026 05:31:40 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/20] hw/net/flexcan: Drop oversized 'mb[]' mailbox view Date: Tue, 28 Jul 2026 13:31:18 +0100 Message-ID: <20260728123127.1711653-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785242159348158500 From: Bernhard Beschow As indicated in the comments, the `mb[]` a.k.a. `mbs []` views should cover 0x400 (1024) bytes. However, the `mb[]` array covers four times the size since `sizeof(FlexcanRegsMessageBuffer)` returns the size in bytes instead of counting the number of uint32_t fields. This shifts the subsequent register offsets by 0xc00 which is not intended. Fix the size and thus the offsets by dropping the now unused `mb[]` view. Note that the different size changes the migration layout. Since the device model is new, no change in the version fields is needed. Signed-off-by: Bernhard Beschow Tested-by: Pavel Pisa Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260723070059.6332-8-shentey@gmail.com Signed-off-by: Peter Maydell --- include/hw/net/flexcan.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/hw/net/flexcan.h b/include/hw/net/flexcan.h index d8159475e04..9affdff8372 100644 --- a/include/hw/net/flexcan.h +++ b/include/hw/net/flexcan.h @@ -65,10 +65,8 @@ typedef struct FlexcanRegs { uint32_t dbg1; /* 0x58, unused */ uint32_t dbg2; /* 0x5C, unused */ uint32_t _reserved3[8]; /* 0x60 */ - union { /* 0x80 - not affected by soft reset */ - uint32_t mb[sizeof(FlexcanRegsMessageBuffer) * FLEXCAN_MAILBOX_COU= NT]; - FlexcanRegsMessageBuffer mbs[FLEXCAN_MAILBOX_COUNT]; - }; + /* 0x80 - not affected by soft reset */ + FlexcanRegsMessageBuffer mbs[FLEXCAN_MAILBOX_COUNT]; uint32_t _reserved4[256]; /* 0x480 */ uint32_t rximr[64]; /* 0x880 - not affected by soft reset */ uint32_t _reserved5[24]; /* 0x980 */ --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785241984; cv=none; d=zohomail.com; s=zohoarc; b=OApm8NMVfXHb1k8RBxyiHcrKOlgYgBp4QdZhW5/JGWBnADvtL33lmXS9pqt+EG+bl20qbaKi/veg2IHHL3pzJNf922crsAf0QCCv9XTpIoYSlftWJr0S08afsZOhDEhn+uVBeNqcCUMRD+VfKtEv6YQFobe/8LWXCs22vBmH2K4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785241984; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=EAtccSSfceesBHQUwRAR85ajuanAtR3J1PhK61JcJYE=; b=VosGzWDxcS49IFU1NOYyKgxnAJ7y+FqZp2m4DvbnmVs4REesUnlBokotqkHTLuI6GWOHcVaymqD5AF1tZOy/E+8bKX+TOFSBKRnk/JVoUUdaetXd+QcdS8XA0UN890UBpE2JaqMCKrtZdYQvmrQOloht92BGN9lj/DZJGYGcySA= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785241984032813.4528373307029; Tue, 28 Jul 2026 05:33:04 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyO-0005Ts-In; Tue, 28 Jul 2026 08:31:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyG-0005SD-RS for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:44 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyF-00037D-E2 for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:44 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-4758bd3731bso846032f8f.0 for ; Tue, 28 Jul 2026 05:31:43 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241902; x=1785846702; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=EAtccSSfceesBHQUwRAR85ajuanAtR3J1PhK61JcJYE=; b=E1D9Q8+P7LCgtoafnL6Jz1hOlGrDMvF/WqYkGwjuB3vshebSLWMXuMjNZsP62Qbkdr MZ73YY9OJDgETIA7Hazhe9v/iUd80/daFm4sW8CUgkYnONAS/vuL4RlkwCW4gf5xH1fA YGf+Tn8hpR+r6citmMftchmY6nVnyEzuABpc/qObjocffMGjlEHo5VkeK082JNFMI723 1oitxTQxIRLXbdsmwhYN5YFWwnIRrwI7W6v1AjllFj7rvv+khYvBwqUYlNaJ54dSGJmp 6bzWtKZZp2vFK0deKvJZWgjEwCxolEpdjY0340qkvU3dl7EM7qu+/D8IHO0UTuDyWeJw Kl+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241902; x=1785846702; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=EAtccSSfceesBHQUwRAR85ajuanAtR3J1PhK61JcJYE=; b=Q2UqmvmthrTihIe2y+OgeiaJ6Gyz9/YB8NY9jKKJg1QDB+dHALbG+QapileCuaXBsd VZ+BBaHwRpSVk0Js2NYcqSccv86FEhApBkfvv9ZHxb9mqE1uXdndCqxThPM2lLkI3v4x NhcQeooTS2gTx7z1QfQ1UsjewBlwLvw9hqZl7+gKgHKaTppFnaLOuhfC3d7pcQqY1763 J4y21f1l2zGmP5bO4I0CS7OkgoZxpH+EWPswATTDrHRuYvHv+XlJhssIj5jTzL3SFPfW BiVBVQRzqqnvQGHBLvZ/ykZBA1k5lMw6iKI/BpSzDfTrQKoTZ0z0lILc1325ZeXRQRev A+sg== X-Gm-Message-State: AOJu0YzGav0PFej2O4DLerP6n9IUvhtA4BLWwbItLST3rzxDUrqHpsjd VLYrxTirSEHgOWva2k2v0ULyhAg/pk85MlzGFfoTDHPnmkPe4ZqXDqfAjkqkrC4JGHA+dXBGkeH Klr2n X-Gm-Gg: AR+sD10XEHpd0nxDQxbJU++VQFTUpTg5udEhhaPQgBfDV3sk6TFg2kYmi8XNNuVkyZx laR8HxmqmGNNZPSESxbVMpaAnhfT1K8MD1kUx0rk0YjtUQ8ra1zeSZ+mOulv3o52MLY1w59JHme xf/eoPakOr9LEZYnjcg2SASdRy8jtCk1fsCIRfBSjEpSTu3XqPRZKA0MldVk1QWz04L0siTx1Ba ojDYqtTUy92KuP11qS5iiE7g7x3lAf7kMIVGdsAkCs/wJ31nnahLU6Lu1t6abK3pb0zpAn51+6K 3ERqaKzhTatvEZ7zTFf49RK9KIT4+fTJUj+9ql2x1ZeICGJmTNMcnbfTN9HG+jDBubvwRxOx1ff T4JtokbzWhyKTgdkeW2Sk31KL/mbTW5G9LIR2SQ1gAgOC14S3I9WhPFWFWSS/ZkiuoUjTg6wlYN PPsx4WmRoPzYMjQebuT7XOL4j8XxHAgYzfhvirpQMdfKfO8OfO9DdIi5kFT8jBnsOABy/g9kA+a dp195OS+a0= X-Received: by 2002:a5d:5f91:0:b0:47f:9159:f1f3 with SMTP id ffacd0b85a97d-47fb1ef0e18mr2521299f8f.29.1785241901880; Tue, 28 Jul 2026 05:31:41 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 12/20] hw/net/can/flexcan: Fix RXIMR reset mask Date: Tue, 28 Jul 2026 13:31:19 +0100 Message-ID: <20260728123127.1711653-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785241986066158500 From: Bernhard Beschow The RXIMR registers are not affected by soft reset, so their reset mask must preserve all entries. Set the mask for the entire array instead of only the first register. Signed-off-by: Bernhard Beschow Tested-by: Pavel Pisa Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260723070059.6332-9-shentey@gmail.com Signed-off-by: Peter Maydell --- hw/net/can/flexcan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/can/flexcan.c b/hw/net/can/flexcan.c index f84f090a7fd..205d0d64134 100644 --- a/hw/net/can/flexcan.c +++ b/hw/net/can/flexcan.c @@ -140,7 +140,7 @@ static const FlexcanRegs flexcan_regs_reset_mask =3D { .data =3D { 0xFFFFFFFF, 0xFFFFFFFF }, } }, ._reserved4 =3D {0}, - .rximr =3D {0xFFFFFFFF}, + .rximr =3D { [0 ... 63] =3D 0xFFFFFFFF }, ._reserved5 =3D {0}, .gfwr_mx6 =3D 0, ._reserved6 =3D {0}, --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785242139; cv=none; d=zohomail.com; s=zohoarc; b=UQaoW4z5pjs72IdWTdz9XxBIYS9+CZreWOqQaHZh44mAwAZeARkQD4M2M12/fFyNTDRn+T83vbehxPn5Y7ok9dNPLC/PVTDSS1jHDh6wBgWGgsemniyVvRo0uzuyJJKwZkn8JjEB7rMMXTynDJIP+PsX95nRb4ncn1caqnki/s0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785242139; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=C7yk9/Cofggcz2azu0Eut4VC7tv1BI0gzSR/Fs/eWuA=; b=HIUE6ylxqwHSRaqdx8YBzTL0OgSlSRANV20Tgkn7f9ZxAOaYoOKk9fLlhhguRq7UrGRjIvnMSGU2hzSvs+KCWBN1rdhRL/129hlHQ4w6jKjyqSWdMmlP9A1boE0yqEUrNh3vXVcltFpWUC4MDWLqUhxey+/2yegvyAMPr89OUbw= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785242139517892.6604880226257; Tue, 28 Jul 2026 05:35:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyQ-0005U7-F4; Tue, 28 Jul 2026 08:31:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyI-0005SZ-6V for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:46 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyG-00037Q-Hy for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:45 -0400 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-47c2b362ee2so3176744f8f.1 for ; Tue, 28 Jul 2026 05:31:44 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241903; x=1785846703; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=C7yk9/Cofggcz2azu0Eut4VC7tv1BI0gzSR/Fs/eWuA=; b=RO2iwCvdQxq7uHW455lbqh2PdhEsqFc/Ofr0fsi9oDdQF5yB2a8a+zWcNp2bUTQf0H eUTy/9lGNI4SYmRpe+c9YnJxmlXt+wpIwF+aGKEUJSV/w9/TzkSJ5UJ6csAITEtzriw9 pifjUfK+tKsmW5JV+n8S8W1FZQUPEhx3sFba1VM64FFx1gAbpp6FtYIFpbTa3PerFsRD zNrvn36nM+5XTbtzqwUhR4pLHsXUehyVDqZ3bJU3HsCuaGuvNRkK8aVx27D9JgxKpEnl Rfhq/O7leVsJq4xjdmhqv4iuwUIG5o8ZigyJOjDo6Hk4ej67jvfpshqFEhEAuNWDtT+M EVDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241903; x=1785846703; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=C7yk9/Cofggcz2azu0Eut4VC7tv1BI0gzSR/Fs/eWuA=; b=AdXWJpRhTrFVR4uXcON8WI6LBg/SGs5JCcJzIzt10unxOUbiD7HvIe1jbrci3EcdCv MPCF705ZRckyNsuUUkV/WBpxMsvm4BjQllyzRUmcvn8Ubyer1Awi95wWX3lejX9E2HNf Bt6TgRlCwAn5Jg9NgKFPqh/hqf10WBbNAtBefCnGXc6ItgxYYsoy34naLfiaKwGzPcWG teUbybR6jltF0zBaYb8ffgEpFIEgPzJKGNowXy6po3cqWTku3Yu7P6yhkjJF1ieWe4Sx ASxx8G56skNqxdjBYDbz1zLZf4C3x8vsN1O/9P3Yeq1nF8MmJSSLoCI7Dhh9Wy7raM9S o7hA== X-Gm-Message-State: AOJu0YwkgZMn0g604Y/Ar4WyYUOsPjUBwEqw76CSQ2c6KP5+aXc9H6GU dNo/eVeGRMWDTFKE7cwLBtF+ALDtdrNfNclsz5i/K/0YpkHbg4w5XiFhtByZM1jPLvYDYXPwCvI HmvUl X-Gm-Gg: AR+sD13PCS+T+2M/IjluThOVPq0BQH3mt6scZOcS6Znek8qhS3LacAIfpqkcyjQl4e+ BO7SMtNODKRsKzWWA9tZQcf6wTuGamHhohRptbd2E/Oz2y9urmkBazPBYXGi2DMwuqHLDgWB1IJ O4SYioiEPtJYoszfZFQL62wLx5Rx9ao3XGZ387zfNjHtZWFwAw20vy9dbCdDckllJ9czL5Pg9qb 34O0yi8+/Vd+WHZLuck2mDb2A9Qxa2h1oB/ApcuLO4o7a3wgPam1CbM7ozpK9bcrhtW2fFBar6b UE/NrBkpK0bgOTxlMfT5YY4TfwR7IKIh6fwsqDQW8ECE+Rc9nf6lm89n8jDO4Ib4UTnUBwaV+pa +ad4rXgQdGO/UzXz3KjvC4MF3QJTdBNJx6810YHVDr2w77HQ9gfHaRG/+MULzXG9r/XwAG74FF4 THJjo41hxeD0Roozk76hPV1X8rcF8sgJDI9Eo6LgBFBsoRwyjqDFC2aE+C2GDLotx5zhc0hQhlu R53TI6fEJ4xhQKaczJL9Q== X-Received: by 2002:a05:6000:2408:b0:47f:80e5:b98c with SMTP id ffacd0b85a97d-47fb1f149c7mr2336344f8f.36.1785241903029; Tue, 28 Jul 2026 05:31:43 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 13/20] hw/net/can/flexcan: Remove RX SMB raw view Date: Tue, 28 Jul 2026 13:31:20 +0100 Message-ID: <20260728123127.1711653-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785242141204158500 From: Bernhard Beschow Use the existing `rx_smb0` message buffer view for register masks instead of the raw register array. Since all accesses now use the structured view, remove the redundant `rx_smb0_raw` union member. Signed-off-by: Bernhard Beschow Tested-by: Pavel Pisa Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260723070059.6332-10-shentey@gmail.com Signed-off-by: Peter Maydell --- hw/net/can/flexcan.c | 12 ++++++++++-- include/hw/net/flexcan.h | 5 +---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/net/can/flexcan.c b/hw/net/can/flexcan.c index 205d0d64134..a8bad83cb87 100644 --- a/hw/net/can/flexcan.c +++ b/hw/net/can/flexcan.c @@ -106,7 +106,11 @@ static const FlexcanRegs flexcan_regs_write_mask =3D { .gfwr_mx6 =3D 0xFFFFFFFF, ._reserved6 =3D {0}, ._reserved8 =3D {0}, - .rx_smb0_raw =3D {0, 0, 0, 0}, + .rx_smb0 =3D { + .can_ctrl =3D 0, + .can_id =3D 0, + .data =3D { 0, 0 }, + }, .rx_smb1 =3D {0, 0, 0, 0}, }; static const FlexcanRegs flexcan_regs_reset_mask =3D { @@ -145,7 +149,11 @@ static const FlexcanRegs flexcan_regs_reset_mask =3D { .gfwr_mx6 =3D 0, ._reserved6 =3D {0}, ._reserved8 =3D {0}, - .rx_smb0_raw =3D {0, 0, 0, 0}, + .rx_smb0 =3D { + .can_ctrl =3D 0, + .can_id =3D 0, + .data =3D { 0, 0 }, + }, .rx_smb1 =3D {0, 0, 0, 0}, }; =20 diff --git a/include/hw/net/flexcan.h b/include/hw/net/flexcan.h index 9affdff8372..eee70bad422 100644 --- a/include/hw/net/flexcan.h +++ b/include/hw/net/flexcan.h @@ -81,10 +81,7 @@ typedef struct FlexcanRegs { uint32_t _rx14mask; /* 0xAA8 */ uint32_t _rx15mask; /* 0xAAC */ uint32_t tx_smb[4]; /* 0xAB0 */ - union { /* 0xAC0, used for SMB emulation */ - uint32_t rx_smb0_raw[4]; - FlexcanRegsMessageBuffer rx_smb0; - }; + FlexcanRegsMessageBuffer rx_smb0; /* 0xAC0, used for SMB emulation */ uint32_t rx_smb1[4]; /* 0xAD0 */ uint32_t mecr; /* 0xAE0 */ uint32_t erriar; /* 0xAE4 */ --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785241985; cv=none; d=zohomail.com; s=zohoarc; b=iM537PvAV2Bb1FzHmYXpuTjwSheeopcbLP/ujLBAMeiaxhLk0K/hQgFcQXLtzFGGemfZWYy5NUT9otpkygPEk1n6wvBzQAifAr2wRe9GLrqVRAnJYpBbVLhTvlHCsNALYx7u6aN5H+hc2C//s3ZOU0wu1sk3Y2ekWXO7gliefdw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785241985; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=HaIHRX8D6+O/vM0awli5v5WdN5nd4X+pGymcCAc0deI=; b=d6NhPDsv+Qmd5OdT9y5E6hpW/r9DQz+o4TzH+xQ3+eMV9J3sW9I7cuASNuUPS0Za972DA9qAhO/Lukh0Twvw3v6BBgTon2056wHtPy1/ZWBmTdS5M35vav+5gQ7zAu/ZponKE4BnPkfC+DcJZk0lYzxUQcqbgy4qAS5AdqoNtOw= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 178524198529570.22909080808222; Tue, 28 Jul 2026 05:33:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyS-0005UW-Mn; Tue, 28 Jul 2026 08:32:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyJ-0005TA-EB for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:48 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyH-00037b-D6 for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:47 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-47640541585so2451012f8f.1 for ; Tue, 28 Jul 2026 05:31:45 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241904; x=1785846704; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=HaIHRX8D6+O/vM0awli5v5WdN5nd4X+pGymcCAc0deI=; b=sE/4RCQV6V0gzc+OUiJFGsxmhr7HTfHCEFQ7OTeirvOdpO52NzweUe962QQKDNMA8s qriHKuszWxUQu0gZOH0y6juiwdJ64+qGY6h8YyZKS06P4JxcK5JjGnK1PqNhu8EyzFbL h+vNQbhzxNFAz27bDSSS6RbA/5c5BsxCDUOtCB9zyq24ueVzG9UP96evtDW7WEb9UgK+ 4NKF3PicUYyXrbCG0Og88OvpPMDDJsCZjQRlp0UCKhUWPj9t7SCsM7KTLfJkAyfJ/Fqu lxUaTGB3lcybCy1SokxtNa0/0scz47DdGwWuynJW50mogbhTGwvGMHl+8FEifdQVs5in YUpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241904; x=1785846704; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=HaIHRX8D6+O/vM0awli5v5WdN5nd4X+pGymcCAc0deI=; b=mLSpf/hRCZFS3cVLlmgfkiy9bBbRdDW0hYJb6v9c9MWk9FKcDEGH+Yvkc1iBx6AxR+ zrO4Y4i8mZ1IXUOsa3qDbFg7XIVvCaQawED2EKjXB0QKGEGbknp++HP0E8biOX8BoGoL adzirYP8ucGH8JY2T7dLmqoERnl1MGotwM91llJk/vKt5ZjGt0LNoaGjft66+Q4QHj65 zh/bWiK+qtWjhGPmYZP6N1As8BavkC1Orjqn/+7XU8itrfd+qiIBjeJNQafRnQIObWuU wlrt6K341B94Uplp5BCEC4ZJdAQ8mzoPeC1kLRUXbIo3mmMeSD4EQd708donF/WkD4uH XNmg== X-Gm-Message-State: AOJu0YxL3GMLlSoPlBsGkXQjsozMgi+7EL7SZCbphn5oWBNu7aX+Frmc QWo3w9NzCg7g2vi5Wx+JgL88ZhJKGhrJ/IQ1QlxubvUHz5Z9wmhF/PCGIVpWi5q0V3Pqk58AHYe zde7K X-Gm-Gg: AR+sD11ecD4Eoo3cJ4p+XG3oemQMuCnAZTUmxVV2fDBLfMYsolbfjTvYLvaZlKdYfnb gx/0QZvEXQYyZPkeSQECXNCq4eKvNl1rlVuaBhDg1nsbYIzqmh/hRwSyj/3HHh1e3Y+NTrFtw/j +rU5fNeTStg9IYwFZK9NSv9tbemFI1KSwKG4XbHvQafT9FI5je4GOPXlCBcX8dl7pUyrpQw/WQ5 2zyTy7T94Ct/wanpkx6wqo0cbfJHwUO1W6fSGHQDBQKKYRchF8Jk6F+2VJBRcDNLZirfNAgyV2+ Lf5LPvR+ZcVa9KedKgCSI0tpIOI7/hvVkg5/YENZtTWiz1JD4l01arPS+af8nSfF7K/DPzgQwgq kdWxvLvRFZC28Vzo3/QQZx8IvOtdm3iGVoXTK3hFw4cA+CiwNtCVsaFwxDGaGdds4HuDT7gGtbu nDTQcfRasUV73TLRzMznYJ8j0vUoqtjyeHanB1oKgviDsJBFFTtkh7mzz626kBEEvKAYyZ4y0r6 dP4Om57EaA= X-Received: by 2002:a5d:5d81:0:b0:47f:854b:5c68 with SMTP id ffacd0b85a97d-47fb1f28197mr2540682f8f.55.1785241903864; Tue, 28 Jul 2026 05:31:43 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/20] docs/system/arm: Update Nuvoton OpenBMC image guidance Date: Tue, 28 Jul 2026 13:31:21 +0100 Message-ID: <20260728123127.1711653-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785241986039158500 Content-Type: text/plain; charset="utf-8" From: Bin Meng Describe the current OpenBMC target naming and release status for Nuvoton machines. The latest 2.18.0 release no longer includes GSJ, so point users at older 2.14.0 sources and explain how to find Jenkins MTD artifacts. Signed-off-by: Bin Meng Message-id: 20260627063208.33642-1-bin.meng@processmission.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- docs/system/arm/nuvoton.rst | 54 +++++++++++++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/docs/system/arm/nuvoton.rst b/docs/system/arm/nuvoton.rst index e4827fb43a1..51d36b2bc0b 100644 --- a/docs/system/arm/nuvoton.rst +++ b/docs/system/arm/nuvoton.rst @@ -94,16 +94,60 @@ Boot options ------------ =20 The Nuvoton machines can boot from an OpenBMC firmware image, or directly = into -a kernel using the ``-kernel`` option. OpenBMC images for ``quanta-gsj`` a= nd -possibly others can be downloaded from the OpenBMC jenkins : +a kernel using the ``-kernel`` option. OpenBMC machine names do not always +match QEMU machine names. Check the OpenBMC supported-machine list and Jen= kins +for currently available source and pre-built images. + +Known OpenBMC (v2.18.0) target names for QEMU Nuvoton machines per: + + https://github.com/openbmc/openbmc/blob/2.18.0/meta-phosphor/docs/suppo= rted-machines.md + +.. list-table:: + :header-rows: 1 + + * - QEMU machine + - OpenBMC machine + * - ``npcm750-evb`` + - ``evb-npcm750`` + * - ``npcm845-evb`` + - ``evb-npcm845`` + * - ``quanta-gbs-bmc`` + - ``gbs`` + * - ``kudo-bmc`` + - ``kudo`` + * - ``mori-bmc`` + - ``mori`` + +As of June 2026, the latest OpenBMC release, ``2.18.0``, no longer lists a +``gsj`` machine. To build an image for QEMU's ``quanta-gsj`` machine, use = an +older OpenBMC release that still contains ``meta-quanta/meta-gsj``. The +``2.14.0`` release contains the ``gsj`` machine: + + https://github.com/openbmc/openbmc/tree/2.14.0/meta-quanta/meta-gsj + +Some pre-built OpenBMC images for QEMU Nuvoton machines may be available on +Jenkins: =20 https://jenkins.openbmc.org/ =20 -The firmware image should be attached as an MTD drive. Example : +To find a pre-built MTD image on Jenkins, start from the Jenkins home page= and +open the ``latest-master`` job. Select the matrix configuration whose +``target`` matches the OpenBMC machine name, for example +``label=3Ddocker-builder,target=3Dgbs``, then open its latest successful b= uild's +artifacts. The MTD image is usually published under +``openbmc/build/tmp/deploy/images//`` as +``obmc-phosphor-image--.static.mtd``. If Jenkins does = not +list a matching target, or the build artifacts do not include an MTD image, +there is no current pre-built MTD image for that machine. + +The firmware image should be attached as an MTD drive. Example: =20 .. code-block:: bash =20 - $ qemu-system-arm -machine quanta-gsj -nographic \ - -drive file=3Dimage-bmc,if=3Dmtd,bus=3D0,unit=3D0,format=3Draw + $ qemu-system-arm -machine quanta-gbs-bmc -nographic \ + -drive file=3Dobmc-phosphor-image-gbs-xxxxxx.static.mtd,if=3Dmtd,bus= =3D0,unit=3D0,format=3Draw =20 The default root password for test images is usually ``0penBmc``. + +For other machines that don't have pre-built images on Jenkins, build an i= mage +from source by following the OpenBMC build documentation. --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785242122; cv=none; d=zohomail.com; s=zohoarc; b=a9AJ9QZQSsRiyUn2WoF+VfCE2rlJcj7k8bW8p5IvM17/CsMwkEWJzpEecQdFaMZx+VE4a/EyACZHuhuQYWgWl0B5pFcjoeFnIqCi+GoPK4w3NjRFwoQOJF0V6xVQ/SLjjhouVx+XhAPij58bLPSgB3uH4gMXmfCtsUlkVqjtxGs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785242122; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=sF5ANGg9CnMLAqUhXEe7W18cwbSEdbMjW/HalmHe198=; b=l0kTei2pgNrnLwE2515nTv+nsPwLHxAwmYe2ePS3LCmOhJsykL7IBjqf28LxcV2aaer7WRgT6/yjBiGCkP6rebKIM1GTME/Ny+y8Jguqcl4DRWKUZ3M25QSyj5NuWPQWnnD0gDyEz3UlNxjgI/C6eC0V2IXM/woo/diorfADZsw= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785242122956141.60630123690794; Tue, 28 Jul 2026 05:35:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyQ-0005UA-FI; Tue, 28 Jul 2026 08:31:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyK-0005TB-6R for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:48 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyI-00037u-Ht for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:47 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-47f9ab7ee38so2015204f8f.2 for ; Tue, 28 Jul 2026 05:31:46 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241905; x=1785846705; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=sF5ANGg9CnMLAqUhXEe7W18cwbSEdbMjW/HalmHe198=; b=Oe+RQO5t1Nnpt63ZedfQQvZW984G2k5WdlptRbDDi4Wd8M2VOM6laP7GQUQWjTxOJL neG7o4d1lf3Qfm/RymeDCHRx+2ZbHSd1TqkZ/G4oYGgEf5+5J/QalhA7Elce566cIgWa GpKD0K1UBsf8a74pp7jBeuFR265DBShMZr+YE9wOk5mTdMSGEx1YdJEEeyzU5FtQaCgp LF5X+9+AbLk4ehGvb4I9XSSmKmUJG3zb5XClk6iZ7AFVVnuwERGnH1qbzFdzMLgo/cRW 7Z869QyuDM0LWE/uAYg3t/YDRMe4xF/VjYtFQQG8wL9+5H0gbLhyFA1AGNCLBYs4G9d/ BunA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241905; x=1785846705; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=sF5ANGg9CnMLAqUhXEe7W18cwbSEdbMjW/HalmHe198=; b=FYfKNxmrH/N2ZvtU/TIrgjcKIQqwNld5gfqr87iO8h3y0zcbcJ6L2au1mtUcnPn5Cw 5mj0rIFnUNB2qC2yMR4ope1VLmMnDqvM0Z5pbR7AoZaqYzyLc0ijX1vFl/q486vNDPTY SZ6d1Ms/vNmNAW3KYvEqnqMSt7m4sUmb6xhRNyaUvOJnf1ly6TsFPowUXx8isSuuiyd6 uQ00Y7jLIiZY2Rt38Ys9pXFOu22Ol6kTgKT78VXF0R57XcLzQY0ikhyUkDKmB71trycM ysAS9C6DsLfK2CosNKNA3cEUY9vYWN4uy0DJrCxRufZp9Z5fWHu8KnZM0atq4mzmme7o NWlg== X-Gm-Message-State: AOJu0Yyyd3yzjzBcWAQl8P0CpwbvsFCOBVUJS9KUFpchVx+r+eObi+a5 3RwA2gpzm+ZJEmniInL8NkQEVXroJxR6VFD1T/KjFBci/+lPCuzgNpVuBaUJz9hppkQpP48ELNO 08iLP X-Gm-Gg: AR+sD11rlLNvfexK/2Xf3E4Ac53SxPFDB8qWpGUrQhsP6VoWmceGTqVkEftjTy5N+gB copNlW7Yp9NuS9VGd/emQG6vvt5CINFpDu5mjVZRUcGf/cUZGZzewU0ESvLC0xWPWuPrZ0l9PgL DNshqf3ZbY3bewfirclkSEcuA0NFEjfJr9NZGyq7hPXxiJ79mnz1vPvqAjNY+8qHhooEqOdgLYi Emi/BKfezBGebwsylaj7iSAr2eyR3dqTeKwWvHwY1q2YuAj9XrSHrKqzZ8q+J8fLB4Vi0+vWp32 hPc0yjR8yIh0jnxaOzNq9CfxcuyJR/IcN2AR44jIEiaHK1qheArVLXH7bAETmI2tw1ZpkqWrp4S PgD+m6TAnISaakZ3P6HGFVbIaU7XgQMeCtBF/1kWZICR3yGnylRzu6H1iusAmUjPlZ7gtfa+PKA fOfiQqdssfBWBkppiNCIslbW9P8rGmVYXd3J1DAiIvbrE3MmS9v+hGx7cHyoW39ctfzqcWUmeaP ezGGo8Pn8M= X-Received: by 2002:a05:6000:288a:b0:47f:810c:8abe with SMTP id ffacd0b85a97d-47fb1f1099fmr2555353f8f.36.1785241905108; Tue, 28 Jul 2026 05:31:45 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 15/20] hw/misc/mps2-scc.c: fix cfg7 write Date: Tue, 28 Jul 2026 13:31:22 +0100 Message-ID: <20260728123127.1711653-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785242125320158501 Content-Type: text/plain; charset="utf-8" From: Simon Xu Change the CFG7 write function to modify the correct variable. This only affects the an536 machine currently as only it uses cfg7 to store the core 1 vector table base address. Signed-off-by: Simon Xu Reviewed-by: Richard Henderson Message-id: 20260724160943.52509-2-simonxhy0404@gmail.com Signed-off-by: Peter Maydell --- hw/misc/mps2-scc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/mps2-scc.c b/hw/misc/mps2-scc.c index 7877b31479c..1ecb2879e32 100644 --- a/hw/misc/mps2-scc.c +++ b/hw/misc/mps2-scc.c @@ -299,7 +299,7 @@ static void mps2_scc_write(void *opaque, hwaddr offset,= uint64_t value, goto bad_offset; } /* AN536: Core 1 vector table base address */ - s->cfg6 =3D value; + s->cfg7 =3D value; break; case A_CFGDATA_OUT: s->cfgdata_out =3D value; --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785242112; cv=none; d=zohomail.com; s=zohoarc; b=kM1x2PjCt0TLasRnlxQcL4o779hx1uEfzatv5hN1oPAC4HsFKjub4jOM9Bn6NJBqM5iBkE4BU34wKBPD//V25fIHoyW9ECMzifku8KdVEd2qw1IGKIyteysiHXk8Icz5UY3og1o6p2sVY8zc9R5/T+DYzRiQLxmiY9E9gO4PgfA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785242112; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=/+btoUFvJnYludKt04BGPGNvyArUqgIEFQfg3KfE53U=; b=hjeNadjNyntfnz81TgHatRQelHEM0wYGDTVmJdumcXyltTF4DHNK6ufSy4Y1JpszQggSTS3Yr0tlBW0u7Hk/RSSmm3dwfRkiJKKnwghjPCPsLdiAqyJ/92MyOfn7JcEE+cVH5g5yNYZu54eKsE6YKrxLxUur6D2FK3e6ghlzQ+E= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785242112750252.53285240763535; Tue, 28 Jul 2026 05:35:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyc-0005YQ-LR; Tue, 28 Jul 2026 08:32:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyK-0005TW-VW for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:48 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyJ-000386-Gs for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:48 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-4798bea72f9so2496549f8f.1 for ; Tue, 28 Jul 2026 05:31:47 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241906; x=1785846706; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=/+btoUFvJnYludKt04BGPGNvyArUqgIEFQfg3KfE53U=; b=aoyqlY5HoqApNCtSQOLuQeQRcTbTFRDq3AcwMVJdJcEwKHYTePgkBBiaHRrjGtsIV2 l13w92awHIh1pdlHDJQMlwTqbOnxT3eHCFQjmQ++Z1qffcglA58uVdvzup+Kmx03P/Oa XTn7W71PLWxWMufqfbgPdYtEXuGBsdK4qLKfWV4lqRgjlnSkInBVpMzSmELMLbvDK36c USl3l6jkk/x1yLvPhqz9KZ05e7GlBtFBL3WS/zarmyeT8+x8j1Qz3dTUCzDG7EeKCGhB 7u1xEob7+bGF77SyoSBzEbq8sSAWKo6wky6QTaSZStJXU2po8Ltx6WODUTYt8p3WUOSD Z6WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241906; x=1785846706; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=/+btoUFvJnYludKt04BGPGNvyArUqgIEFQfg3KfE53U=; b=ZP5EfIpngIriumP/O6pEYuOjBxWdSNYvjCMPERfFmjea1hbphO2nIzYaSLkIrbewuy YMSISAZIvb83auIj5sD/NSTQwVvJbWveJGXRprHToSHzUmwkpBLWmg5TCpRXXvX31+nR 8Ix1FdIBby3UKp5gxufnWJDmkHl9VZKct4oRzRGI48yRt6OILPxohlOWaUfBDF6Mayvb CzDm3x5cQjJPcMHMXe0ayjQ5PEc0IgBqy1Lz3q0+QaUDKvyOJE1u7XoCp3FIzz0EUHnh huWi2vUFB+vYQyKxGWnHC5OCHoSICAFsDBKE2ur8fBiWf+Wt5V0J1dxU3021zUQaSZGk NJ8w== X-Gm-Message-State: AOJu0Yw3LN1w8tn6N1fOJCWR06fk7JTFmqTjRKgCkL98lASaCOhCkDrC sjN4QeY/AkYgvRz0BtVwTPXwRartjvd3ioxnLe+P1cXhSj4Rw08p/baQCouYV6ByJ9rwQ8SCKgh vs2Bi X-Gm-Gg: AR+sD11rMDJ7btrueLLobh39N5iaXC141DszePsmP77KcVyl2D0VMn7qUQehJAEbYJn ZhFO6+wCkv+2PfJcJOkck9uk8xNlBSJ57nVRFGifelML5XRM0QPH+7AEWb1n7HkSbfTE+zf9az6 K/Gx2JQvLr+N+NCvuwTwA1UjY4BeWaLPwmQd7nNmcD+CVUN0a3C/a7a9qjH4SoBLvxvmIi0mYc3 s/PSRVcLPexfFjcUvBxClpACIrJIv/jdDCyqYoVam0WyBBceYIjivu0s6MTFJzBGBMcAsU0qR39 rJ06/mt2+wS7s3jENFfRxaPNhEpF58h1KKvyHmDBLrH2W7Gsu0c3ubwRK8xr9j6eC6rlTxSx41Z nOVIhzoshDptaeIUgrZX4Ci8t8C0tb35Vr4P1OiVA5sbtE+sOrlLX8RZoBpHm+WFLsgDrU+0Yfn o+fWVMNS0inWZ6MqRsqa+RrmRMNu7Zfh0Ew6lcHPXtK9jFRR0OYIrmY7GLI+jOCL6Q41IXr2yMZ 6OgSJCNboS1EdGIjnc0Zg== X-Received: by 2002:a05:6000:430c:b0:47f:85d6:9e7f with SMTP id ffacd0b85a97d-47fb1ec9022mr2377442f8f.3.1785241906106; Tue, 28 Jul 2026 05:31:46 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/20] hw/misc/mps2-scc.c: fix scc_partno field width Date: Tue, 28 Jul 2026 13:31:23 +0100 Message-ID: <20260728123127.1711653-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785242115012158500 Content-Type: text/plain; charset="utf-8" From: Simon Xu Increase the extract32 length from 8 to 12. The Primary part number is defined as bits[15:4] by the "SSE-310 with M85 and U55 FPGA" documentation. For example for the mps3-an547, 0x547 is 12 bits but we only return 8 bits right now. Signed-off-by: Simon Xu Reviewed-by: Richard Henderson Message-id: 20260724160943.52509-3-simonxhy0404@gmail.com Signed-off-by: Peter Maydell --- hw/misc/mps2-scc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/mps2-scc.c b/hw/misc/mps2-scc.c index 1ecb2879e32..554b504c720 100644 --- a/hw/misc/mps2-scc.c +++ b/hw/misc/mps2-scc.c @@ -57,7 +57,7 @@ REG32(ID, 0xFFC) static int scc_partno(MPS2SCC *s) { /* Return the partno field of the SCC_ID (0x524, 0x511, etc) */ - return extract32(s->id, 4, 8); + return extract32(s->id, 4, 12); } =20 /* Is CFG_REG2 present? */ --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785242137; cv=none; d=zohomail.com; s=zohoarc; b=YAhxmaUfyg6oxOvQDwPQs3ngWIKsb1Bm/Bnucilqr69UT66M77WSj5iwmUfir2vqWZo/wIV5Re6f10vrYopOU1h2NjWI/yOkxyW4DTotX+4pCbuOV0YX7ku1l9zEAE81ryH7hu3YUCNWCGGuIdVowRhhYiBMV/zEDiWHxb4/H7A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785242137; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=cXg53sAdYMTmjJCoT+c7TGT3C0eDImHJg6z6/cONmAA=; b=VQ/LVSkdOUvpi6tnM69Pwne0RNu01MLB9rFuJ3ukHbSYEErby/68SWeDZ40j4IKOgy6NXS/xZp53qJZ7bq4+u5lkHWhzmXY5ook9JkhglfSQ6OBdC2/rOaljpvjf6azbSBHTTFemr62vUGfXDGLUlVMxKpxnBdAnLJFBmZrAFJE= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785242137225190.84080120364922; Tue, 28 Jul 2026 05:35:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogys-0005hN-03; Tue, 28 Jul 2026 08:32:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyM-0005Tp-LC for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:50 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyK-00038P-D9 for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:49 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-472326ca506so2590514f8f.2 for ; Tue, 28 Jul 2026 05:31:48 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241907; x=1785846707; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=cXg53sAdYMTmjJCoT+c7TGT3C0eDImHJg6z6/cONmAA=; b=pnjsvkJlWhwKDs/S7vo6IzrW6KaiILC7EhgU4jAP/P7RlxAFr+cTEP7cVVfSE4UxED Ti8il48WGdCOqDecKvt2ipwwJwrws+rwuLbiKSM3L5g6rgjPOvOPLOPJqrbEVUO8cIge hwzJ5IJoVnSSMg3tNCvNCwNUe0htBqRtzplZCKio2B4IiIBNcbeWgZkgiPqkqfzMp1sw TF/XsKKinzwMY6aBpm+sFzScEhKn2lFbSfQDcO7E72SzjILll4wgiMSNomZj8MEcv1ce HB2w2f+dPCuvSP7fu3hGzGPIEjVaax+FMu62ob3WYENRtGKanxzk3yCjXqzxTAkttasW /M0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241907; x=1785846707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=cXg53sAdYMTmjJCoT+c7TGT3C0eDImHJg6z6/cONmAA=; b=QrZqeWhzYywXjeokXYz92PMmRg31lkE511CYSAHJ8kABIrlUHOv85zYV0bcvama240 C81yqH4746SLE0j6sZTnTmmKx4RQM37EWTN8UbZ4V4YMaNuDGNbZz2BGyvtsFAUJF9Te /nOcgbCxeJpkrnl1o8coUX57y91cnZ/BdR5OA2mYQbnCnkWd9IMax6c8ij7TOjn96unf SXVgahj59BY01/ktQo4WsJPWKYC/Cu4qMDIcFTow6E+Y0r4E9A461hgTQyjO911W/VpS eHQn5uR1aNyiNIYBO045TBG6v7XOYHGyIerHvyZZ/1tAzDdhCda8vPt4/VaoKM5Xvh4I o7dA== X-Gm-Message-State: AOJu0YwjeI99DqkxebiEWj8JI9RQ8LFmlgJjGIKtFFFbrEyp5IDnMY7K nQ11Ulkh44SPKgeHZvHXuJVnxCkNevbpWReZZUcnqeBplZk3O68+12fWUkbjfZJFv15ltu4wrhj HU9d4 X-Gm-Gg: AR+sD10faJw7OrzfJx/R9vNgyydgs6Vwc9D76sB/iMCumWrQuDEofB8sA/ZafiuC7Kr t6tm1EJQZjGEEC4+zTbyRKoxD/vpHaH2147XZSaaQZC98QXoG0fVONuQoC5gAmmTnfwvdXbeWi4 j0a2VrDaxn4PIBStrBNZ6czSGpbfYn7jtgzlYvdAz3PkEtVUDQiKnTzCRjUWzhZO2rin0j5AzZe UdCmRM+e3DiRnlXJeI04LHai5Bth3jwKfXlhPoFvaoWrtfwuXfAJJMDE3FKgCW/p3710bZCcxO/ uOSXJGgG+Vv0bPwmB51lYby2wYVqOcLBAHkOKMWgCKmFhWpfYg5P2qjPICaLwL+jl7hRgydRlSj xsSpp5CaqVtUyYvQXYCDDFQsu6ztJiZtud7debtUVfdb9zggLiN4nw8+8VmufwIEbviWffBzCxZ cUxJTM5IMbmqO+UBprBVvpQnkFtR6mLBilyG1yudlRWGrDXesjdtub4XTJ0yB54oZN4UckaFz+1 /uWYUj9iDJjtQBc08QGGoR2aWz4K3We X-Received: by 2002:a5d:5c8a:0:b0:47f:9720:473f with SMTP id ffacd0b85a97d-47fb1f1287fmr2411026f8f.36.1785241906914; Tue, 28 Jul 2026 05:31:46 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/20] hw/i2c/bcm2835_i2c: Correct CLKT register offset Date: Tue, 28 Jul 2026 13:31:24 +0100 Message-ID: <20260728123127.1711653-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785242139223158500 Content-Type: text/plain; charset="utf-8" From: botszhuang The Clock Stretch Timeout (CLKT) register for the BCM2835 I2C controller is actually located at offset 0x1c, not 0x20. Update the BCM2835_I2C_CLKT macro to match the hardware specification. Since QEMU's implementation ignores whatever value the guest writes to this register, and Linux only writes to CLKT and doesn't read it back, the main effect of this fix is to avoid an incorrect GUEST_ERROR log. Cc: qemu-stable@nongnu.org Fixes: 9cf3bc65afdb63 ("hw/i2c: Implement Broadcom Serial Controller (BSC)") Signed-off-by: botszhuang Tested-by: Nick Huang Message-id: 20260724124220.24152-1-22925483+botszhuang@users.noreply.github= .com [PMM: removed commit message paragraph about effects which I think is incorrect, substituted a different one] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- include/hw/i2c/bcm2835_i2c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/i2c/bcm2835_i2c.h b/include/hw/i2c/bcm2835_i2c.h index 45f876df224..519c65f7652 100644 --- a/include/hw/i2c/bcm2835_i2c.h +++ b/include/hw/i2c/bcm2835_i2c.h @@ -38,7 +38,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(BCM2835I2CState, BCM2835_I2C) #define BCM2835_I2C_FIFO 0x10 /* FIFO */ #define BCM2835_I2C_DIV 0x14 /* Clock Divider */ #define BCM2835_I2C_DEL 0x18 /* Data Delay */ -#define BCM2835_I2C_CLKT 0x20 /* Clock Stretch Timeout= */ +#define BCM2835_I2C_CLKT 0x1c /* Clock Stretch Timeout= */ =20 #define BCM2835_I2C_C_I2CEN BIT(15) /* I2C enable */ #define BCM2835_I2C_C_INTR BIT(10) /* Interrupt on RXR */ --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785241978; cv=none; d=zohomail.com; s=zohoarc; b=ExvTHIbJgS2CWnfNTNr8npMSIgPgwhxfrjC/v+owK3hIO++TgB2zpHd5TmnUsBhP1A4+U5q7teIMzaOt+HOXZoG+wXq4JU/t3iVMRJru8cPH4MTQlWchvupnfhB7xH20u76A208q3bBK9sS6HTCVO4TXP+OwVuBrkVDEz8gnzcg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785241978; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=Z+NA8drOMvPbg/W0pIEUVm9ErLpNSN5tCGIppYnQUqw=; b=lME8Q8drDnSMtMAGqU2Oe1VIfzwxAVeWFzbgn9+noIpWawx1VsCgGF1fnPZinsLiHWrAMCbjfu88291OhUz5MGLsAKpB8Mf3cWn7LX+uQmQO8oiFnCAqdckhSaIMwKIxK2yv00hBtZ0ZEleGsjVXIwTxgKVNp1II7LET9JID8wI= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785241977988466.6280661831712; Tue, 28 Jul 2026 05:32:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyl-0005e7-N3; Tue, 28 Jul 2026 08:32:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyO-0005U9-Oh for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:53 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyL-00038a-Hr for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:51 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-4758bd3731bso846134f8f.0 for ; Tue, 28 Jul 2026 05:31:49 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241908; x=1785846708; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Z+NA8drOMvPbg/W0pIEUVm9ErLpNSN5tCGIppYnQUqw=; b=OfaNPHXdnRF9ZJyAxj3GJ0VTbjMBorSYvnuM7Fe8OhcjvRJXGX881IMXZE7tP8g/Tg 0xY2k0O2FJiieZEJGicxnfMJlc3IY2c3F7A9uKWwc760KS1G9x8ZlcQxhDBBrwrMSY2f pq70n+u46qFWTBS5AEwXP1cY4PlU5uEOuoEaKMWMGyusm5wus74E2lOgAQ40SXup751w HY5ZORbExjezfoW5kjuFBMzMqaaARnYp3sEQyOWB6O8P1LK8fOYXdErBvYZxoxfQ6A+6 psAKRePA1Y2Q7efZ7tpZc0o5YdMrcEdUgMUlk8icMv9PYcVcqjT0eoNnjdj/ENAiznCs 42Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241908; x=1785846708; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Z+NA8drOMvPbg/W0pIEUVm9ErLpNSN5tCGIppYnQUqw=; b=WKCVhE6IQEzLm6ZBvEpnenB2lPuGOLVOmJbZ/XIVR9ZcJxd0Xu3DnsV4aZmeaMlgyT CS7zeMRNgaHm0di1TokYPniRc+urSSr0k8xso4N7jYoohHwFva9A4j8hyexoCq8dkHrQ RHnRoXD42N73ly4QdpBTtLYAhUthLaNQoRv19rWCeEn6hL6Nsihmu3lcFdPzO91jXcck ZJTyDnUeqasq+GKdi+U17rG6BmmEj11fO5DxF5z1wBYvh4E2etkZe6XM5FGxA5kGg8AY lOFAmeCQ3g3t9aWptxFBnqykR8ZrcT0rfqgfVaXsXmWKH2tN1SyorNt/MRqiaF4+6JP2 h3mQ== X-Gm-Message-State: AOJu0YxIaO0vkntcC57iBzzRL4PVo+v8GW+sPZibhZZ03jh6N2+/D9N9 jP4M9KkyETgheoS+Mrh//wDs4eR9jwUJ8E/82a+XMzjQ74sMDOLb0Ecg3GOOc2ho6x0c17hqDc1 hDw15 X-Gm-Gg: AR+sD111R9RwXS8iyAi8Dqb8Pyl+0N+SVWSz2LsWvMbxpolR8ai5bIv8xM+9ScLESr8 wpdF9i7MeOIYj0Jjk7D5z30Cp2QWwO4BvY2pfH1UmVZ6Z4gad0PxaBhqSphmLCyVKsxjjnPN+eI E2s5O7HvcU5lDfgzbmilXgvsWZTHY69FinyWAUbmJeniFS98JvjL68vuPkXF6C4NF6kaz1FeRtq o6bsVGXPGKCpZLoa9ddQhstbSug+R7Orv5zgZ9R73VGhGVMx6ijgiSvVK9IaAGSpv8epdFqbe2d 1F75O8b+0T1RQ5f2lEjZLbXqEkwYJU+83wAvKSQW2C7w3+HkYBPm1olDA7ZE8vs/u2p5/F0GX5m VEypw1O8hAAaktFsPcAvYo7OBh6eUf5NKZJfdudgYkE+kpH3bebQpV2VkunNneSa/JtiAOSaK9B FuZYEDIjrc02xVy4X/4W8MQtz3+FrdcvZHbjDsQMVWtPsG+ODiW8fm+iToxhxqB84eJBa4mrbGj PeY8bwAQSw= X-Received: by 2002:a05:6000:310a:b0:47f:6e8b:699c with SMTP id ffacd0b85a97d-47fb1ecab50mr2686444f8f.14.1785241907769; Tue, 28 Jul 2026 05:31:47 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/20] hw/display/exynos4210_fimd: Factor out finding screen width/height Date: Tue, 28 Jul 2026 13:31:25 +0100 Message-ID: <20260728123127.1711653-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785241980014158500 Currently we hard-code the expressions for getting the global screen width and height out of the VIDTCON2 register where we need them. Use functions instead. Make the global_width variable in exynos4210_fimd_update() uint32_t for consistency. (The values are clamped to well below INT_MAX, so there is no overflow risk here.) Stable CC because this is a prerequisite for an upcoming bugfix commit. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Marc-Andr=C3=A9 Lureau Message-id: 20260706173324.804340-2-peter.maydell@linaro.org --- hw/display/exynos4210_fimd.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c index 7507e4fd3ca..43ad5fa0b46 100644 --- a/hw/display/exynos4210_fimd.c +++ b/hw/display/exynos4210_fimd.c @@ -1195,15 +1195,25 @@ static void exynos4210_fimd_update_irq(Exynos4210fi= mdState *s) } } =20 +static uint32_t exynos4210_fimd_global_width(Exynos4210fimdState *s) +{ + return ((s->vidtcon[2] >> FIMD_VIDTCON2_HOR_SHIFT) & + FIMD_VIDTCON2_SIZE_MASK) + 1; +} + +static uint32_t exynos4210_fimd_global_height(Exynos4210fimdState *s) +{ + return ((s->vidtcon[2] >> FIMD_VIDTCON2_VER_SHIFT) & + FIMD_VIDTCON2_SIZE_MASK) + 1; +} + static void exynos4210_update_resolution(Exynos4210fimdState *s) { DisplaySurface *surface =3D qemu_console_surface(s->console); =20 /* LCD resolution is stored in VIDEO TIME CONTROL REGISTER 2 */ - uint32_t width =3D ((s->vidtcon[2] >> FIMD_VIDTCON2_HOR_SHIFT) & - FIMD_VIDTCON2_SIZE_MASK) + 1; - uint32_t height =3D ((s->vidtcon[2] >> FIMD_VIDTCON2_VER_SHIFT) & - FIMD_VIDTCON2_SIZE_MASK) + 1; + uint32_t width =3D exynos4210_fimd_global_width(s); + uint32_t height =3D exynos4210_fimd_global_height(s); =20 if (s->ifb =3D=3D NULL || surface_width(surface) !=3D width || surface_height(surface) !=3D height) { @@ -1229,14 +1239,14 @@ static bool exynos4210_fimd_update(void *opaque) bool blend =3D false; uint8_t *host_fb_addr; bool is_dirty =3D false; - int global_width; + uint32_t global_width; =20 if (!s || !s->console || !s->enabled || surface_bits_per_pixel(qemu_console_surface(s->console)) =3D=3D 0)= { return true; } =20 - global_width =3D (s->vidtcon[2] & FIMD_VIDTCON2_SIZE_MASK) + 1; + global_width =3D exynos4210_fimd_global_width(s); exynos4210_update_resolution(s); surface =3D qemu_console_surface(s->console); =20 --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785241968; cv=none; d=zohomail.com; s=zohoarc; b=MqTzoOVQh96S2CtBRTq94rGGDRSgL0J3hubsEPA39R5Cn/+S4riX9uTjlXNfINmWgRhKt+sGN3DXlQx6Og5A1xVvdfoAAiorB8jgAyzJv+3gKf2MFyF8V0a/b90NVjDtSEM4+rJHkxOOFvL1b8tVPUqAFg5m3RlLNl+jJtI1xlE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785241968; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=LUBtF/3zAsFBxpL4HyG/3C6ZuZFSS7kCbYd9+lA6ZKU=; b=MwoMm/TfyeRrGdkXhs6kcx4jCjC5TNeeY57QGC7nYAfbjebnQ7FQT6i8f8WV1Mr54AmXHVfe0x41JgKAb2s5OFI5hrs0P8olb4EwuhDGjqcyWTqoyhvJJ52EjrlL9CgVW7G9biuC1i4RfvYdAGdQOwOmqdMmnjcpnWbztdZ2MJs= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785241968201573.0409251322072; Tue, 28 Jul 2026 05:32:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyf-0005a8-QW; Tue, 28 Jul 2026 08:32:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyO-0005U8-Oi for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:53 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyM-00038l-Ci for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:51 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-471eeac43bfso3334243f8f.3 for ; Tue, 28 Jul 2026 05:31:50 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241909; x=1785846709; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=LUBtF/3zAsFBxpL4HyG/3C6ZuZFSS7kCbYd9+lA6ZKU=; b=zJU0sfXXlrBcaH22l57Qx0uOzyBKbd77CXgM8dLOhlQ4GeqpYy5uM13wPL9LSLOoZy AJaAes/KCF+y5e+KO7E1HZbMKKVXKJygmI5kyYRqxjIdfPZoc7N40SDKFfoxckv0cinG XKNhp8tDKQlHRTbbZOffR5J1Tz2ajPDTgk3D4vDbJCG6svUo9cURRIQRRtx+/CyFmE6Z iI6j1XN7R9r3dAtFyrBmPehBnpsqv5lGOISweVTRdUsbK6VvSae/wFgvnoX5FVcB9FWX VyZ344NrfSa3NGjtp6HQbaGQp6n8QdbJfesi0eFLfypODO4V528W9jLemD33pqFo8JAC SpDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241909; x=1785846709; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=LUBtF/3zAsFBxpL4HyG/3C6ZuZFSS7kCbYd9+lA6ZKU=; b=CyVa+9NEEpusjljJqaCNMCpikxFu+DAOcfwje3SYs3k+q52sbCRA2K4tPCjXt4dxJK kYL5IwOSdnzuPTpSYTX3hrwJhJ8xipq+G4Sm3GHBpDm0PmNHCfzBikl8dmM8NixDCgjo G18kM3tOU6il7DPQqN0pduA13PpVA/9/ekt3m4Vce+kO3247Ox0Vm9MhJLbjuwWEitwd sdjTjq0YSSDsKU2IOLEturQ/O8Rrholc1YM4LgXQQRhSkawd4YOBcA8RrwoTIeu7LYlv i0VCPcAsP7kP+oWBP6wveGAMYsattuiuAyQSt6n6lhoBnT/Z+ezdTOuSfbADRFakR1T5 IrQw== X-Gm-Message-State: AOJu0YzE+WwwHRqeYps4UkJuKkoloO+LiIoR3uHIoalJE1DF+JXdI2eq SDdUThSCgPrkSarAd6JFQHWOzPwknPxhainQtCdi31Ler2wrvxdAUozATtnwWPIi/5Xh+jfxdTw JfUxc X-Gm-Gg: AR+sD13Sof9pboxUXiNkxhvb67E2CZsFa4/OZZ8kxUs2QsJW9j4DkmkLPEAw37EIYtJ LSTCOJKNRUfarDyu1fRvIz8wwMKYy83vU4MHyaFbFGfg8lM6Y+VQSs4MuIEgrOuYMbqmSlyOR7b CvLiA3+i7J24d0dtFO7xXf9jL3v3CH+vKgob3QyvWyOL9dJtQ5ixe7KkIMFXmHFjNNdV0IQRnoU TrRcOd37BGDTW1tCjC6s5IXSXOJrszYCj2IdHda/wr5PRXtD/MSFMBRpO8seGvVhj+u/DxprV5J 0nbMNi4eMWPa3uFGfgaFm7j73Mq3DoI896bzRYNkjJgKwqWR4gIeLoJUnvGT5n3ijuWcDbKJRMQ Rti/TA1br/g9AB1X/pcFMRTZyRgNZiVj44nPw1qoO0u3R2uCzbC5AHJxbMVL+MqdPmKqHJmPNis AQHnT2gAHKrVmZFnRShwsSbrrm7DMqSzSjnI6uSFnIMQlt+Bl0hfcSjwpM7i2iF7xAiFXpckYIC nco2OwmE+w= X-Received: by 2002:a05:6000:2502:b0:461:e27d:5690 with SMTP id ffacd0b85a97d-47fb1ee0dedmr2779632f8f.26.1785241908696; Tue, 28 Jul 2026 05:31:48 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 19/20] hw/display/exynos4210_fimd: Pass width to draw_line functions Date: Tue, 28 Jul 2026 13:31:26 +0100 Message-ID: <20260728123127.1711653-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785241970069158500 The draw_line functions currently assume the width of the line they need to draw is w->rightbot_x - w->lefttop_x + 1, i.e. the full width of the guest-programmed window. We want to be able to clamp this to the overall screen size, which we can calculate in the calling function. Refactor to do this calculation in the caller and pass the width as an argument to the draw_line functions. Stable CC because this is a prerequisite for an upcoming bugfix commit. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Marc-Andr=C3=A9 Lureau Message-id: 20260706173324.804340-3-peter.maydell@linaro.org --- hw/display/exynos4210_fimd.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c index 43ad5fa0b46..52f2285cf51 100644 --- a/hw/display/exynos4210_fimd.c +++ b/hw/display/exynos4210_fimd.c @@ -282,7 +282,7 @@ struct Exynos4210fimdWindow { =20 pixel_to_rgb_func *pixel_to_rgb; void (*draw_line)(Exynos4210fimdWindow *w, uint8_t *src, uint8_t *dst, - bool blend); + uint32_t width, bool blend); uint32_t (*get_alpha)(Exynos4210fimdWindow *w, uint32_t pix_a); uint16_t lefttop_x, lefttop_y; /* VIDOSD0 register */ uint16_t rightbot_x, rightbot_y; /* VIDOSD1 register */ @@ -784,9 +784,9 @@ exynos4210_fimd_blend_pixel(Exynos4210fimdWindow *w, rg= ba p_bg, rgba *ret) /* Draw line with index in palette table in RAM frame buffer data */ #define DEF_DRAW_LINE_PALETTE(N) \ static void glue(draw_line_palette_, N)(Exynos4210fimdWindow *w, uint8_t *= src, \ - uint8_t *dst, bool blend) \ + uint8_t *dst, uint32_t width, \ + bool blend) \ { \ - int width =3D w->rightbot_x - w->lefttop_x + 1; \ uint8_t *ifb =3D dst; \ uint8_t swap =3D (w->wincon & FIMD_WINCON_SWAP) >> FIMD_WINCON_SWAP_SH= IFT; \ uint64_t data; \ @@ -813,9 +813,8 @@ static void glue(draw_line_palette_, N)(Exynos4210fimdW= indow *w, uint8_t *src, \ /* Draw line with direct color value in RAM frame buffer data */ #define DEF_DRAW_LINE_NOPALETTE(N) \ static void glue(draw_line_, N)(Exynos4210fimdWindow *w, uint8_t *src, \ - uint8_t *dst, bool blend) \ + uint8_t *dst, uint32_t width, bool blend) \ { \ - int width =3D w->rightbot_x - w->lefttop_x + 1; \ uint8_t *ifb =3D dst; \ uint8_t swap =3D (w->wincon & FIMD_WINCON_SWAP) >> FIMD_WINCON_SWAP_SH= IFT; \ uint64_t data; \ @@ -848,11 +847,10 @@ DEF_DRAW_LINE_NOPALETTE(32) =20 /* Special draw line routine for window color map case */ static void draw_line_mapcolor(Exynos4210fimdWindow *w, uint8_t *src, - uint8_t *dst, bool blend) + uint8_t *dst, uint32_t width, bool blend) { rgba p, p_old; uint8_t *ifb =3D dst; - int width =3D w->rightbot_x - w->lefttop_x + 1; uint32_t map_color =3D w->winmap & FIMD_WINMAP_COLOR_MASK; =20 do { @@ -1240,6 +1238,7 @@ static bool exynos4210_fimd_update(void *opaque) uint8_t *host_fb_addr; bool is_dirty =3D false; uint32_t global_width; + uint32_t window_width; =20 if (!s || !s->console || !s->enabled || surface_bits_per_pixel(qemu_console_surface(s->console)) =3D=3D 0)= { @@ -1255,6 +1254,8 @@ static bool exynos4210_fimd_update(void *opaque) if ((w->wincon & FIMD_WINCON_ENWIN) && w->host_fb_addr) { scrn_height =3D w->rightbot_y - w->lefttop_y + 1; scrn_width =3D w->virtpage_width; + /* Number of bytes to actually draw */ + window_width =3D w->rightbot_x - w->lefttop_x + 1; /* Total width of virtual screen page in bytes */ inc_size =3D scrn_width + w->virtpage_offsize; host_fb_addr =3D w->host_fb_addr; @@ -1273,7 +1274,8 @@ static bool exynos4210_fimd_update(void *opaque) last_line =3D line; w->draw_line(w, host_fb_addr, s->ifb + w->lefttop_x * RGBA_SIZE + (w->lefttop_y + line) * - global_width * RGBA_SIZE, blend); + global_width * RGBA_SIZE, + window_width, blend); } host_fb_addr +=3D inc_size; fb_line_addr +=3D inc_size; --=20 2.43.0 From nobody Mon Sep 28 02:09:43 2026 Delivered-To: importer@patchew.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 ARC-Seal: i=1; a=rsa-sha256; t=1785242064; cv=none; d=zohomail.com; s=zohoarc; b=eSxOzuIUhwDJ+mNBYROwVrAbV61SFpKt0BCYA2XT3wR1JTVLvTYOzphaje6a4Tj2DKDuOQiCDgrgbUIkeZJn9V96kXF+d0bQs8j/LdIvw3casWDAxuTbo5fqwcrsoPi/Rx7VqS4LWeLb/23K3x0mOatuuuQGSI+J94K5094sbaI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1785242064; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=EU0Hj2x+C1JG5dyuVzTNdAuVbO3iH0ap19MHXO+1nAE=; b=AqdS0ry2xPipAHp7DcKgpOvt1kHZaPJSiqovfQqjSh5CrjIAurVSXA4Mn7bIe83QtGDtxotT3UoNLNpk5LAqPZPnorZsXO7PmkWKYKUwy2WNFwn/CEb/u4aWAWaxwyXuYlOFcwK2ZDQe8+3hiM1XTEWkm5EVqMislbwr87PLGvo= ARC-Authentication-Results: i=1; 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 header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1785242064098732.4272110445219; Tue, 28 Jul 2026 05:34:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wogyg-0005c0-1R; Tue, 28 Jul 2026 08:32:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wogyQ-0005UU-KU for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:56 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wogyM-00038u-TV for qemu-devel@nongnu.org; Tue, 28 Jul 2026 08:31:53 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-47de008b020so661227f8f.1 for ; Tue, 28 Jul 2026 05:31:50 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f85c6f076sm58499039f8f.34.2026.07.28.05.31.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2026 05:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1785241909; x=1785846709; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=EU0Hj2x+C1JG5dyuVzTNdAuVbO3iH0ap19MHXO+1nAE=; b=gvpN0X9ciJU/CKUuDrQea9W180IlDunQbVDQzkS8h9Z2mu5kaxNmQnVTVepnMJaji4 IV5b6yYx/6oKn0C26Gctpa3dAP5kMZwEZSuYrsiUZmDdF5N1nQSRK1s0daWr2BjL/juu +ha19PhoLt7P3v1QM+TIlh6he+gr9kwLvDw517LO9p27eYx3shXRFC5AJGwgzoE1/bY6 7xjsROG+O09ggcdl4ePSMEz7vrfk4XgjBDyvkv1qfEhQ4LdZjU6sVcAWNAuS07fmXXR8 Kdn5SZUtvgigjcIKOFoajm2UgZiZPSlW4U1Rs8qE8EUI4QqTYI5LfxnsaCJoMVXPTZrZ 6QoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785241909; x=1785846709; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=EU0Hj2x+C1JG5dyuVzTNdAuVbO3iH0ap19MHXO+1nAE=; b=nwaGHKqdZAfbMP0YxPEgKIGH3jL/NbEonN1p/1b1N27ITHQEMjrPewAvj/2bUJvn1O QgTe9psFPiflmtgyQcMBHOi25bQGOD/MZHvs2JMuORF3xRQNgYVtBTAwSVveKNZ4BqYT grzSISD++VMsKcbHzCY+qk2lZOFka41pW/ISe8waMv3KiWZ6hpt2uOgrGo4JSwu5b1tS M7fYCwSotxY6iZ8QqwOuhL6RA4YjsdMtMX9q8zdGfTkhuyDehcLr3fSW1pUXyitGSufe 6gePMADGK624jpNmn9yZzIw1/PJhMN2Qjz06GHMZO5lsiwDM3viyxgyebj7nB/QOeNdJ FYcg== X-Gm-Message-State: AOJu0Yw4MkhuEeK/ftho3zVr3G4zJUFtAJEyil1KZXrVpnisUYPtFz7X WcSU5k5C2m8/TD2rk1oduB+A6/tBvxcsddA+z+RohFdxhP8wjGvKBU+WXuTUo5OuRMr7kFm/hDD t8SUa X-Gm-Gg: AR+sD10q5aEtX8CkC14/9ceT6wFkR96kcGVpx4wbi8EjUpGbNdWyykEgids+scZZA9c Iex7zFj1KYvXLUJO6sko81Fr33KnNpimJzh0No+xgTzMj99YPebSGxdyJnNJq+hoz/N/uUCt7r1 eI1bIYcjZmi2Dq1PQziYAAQQ7+sgFEvsHH+YD0jSbsCCYKMjJVbzyNri4upsQf18v1YXE7QHLyd v+8cWg7KIqCfs/jvUtAAr3SzliobJ7lvDTszlVsYeF9MUXl5a7TMurcWcUMmWHb8xRVZ6dPFWQx dyiU2HofbcAYdZySoUJm5syiKeGInmegH0C9QihlA+a6NOUvrke6FHS7dTCb78BsRSAZ2IkwLm5 mGbfDa/jR4BJCRaoT2V6SQsQppw5sizovlagN30irZKD7VvvpUPTHA4nheujaCMzNMqvO0rxtEC k8qr5tC31OO84c2fnLRu1DUG0e2qFTjt77+YEtqD3HPash15mnUR0NhtzUjBVkr9ZOc56GHiBAg Q9KyxKeXuI= X-Received: by 2002:a5d:5f51:0:b0:45e:dd32:92fa with SMTP id ffacd0b85a97d-47fb1e9992amr2872885f8f.12.1785241909500; Tue, 28 Jul 2026 05:31:49 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/20] hw/display/exynos4210_fimd: Clamp windows to screen size Date: Tue, 28 Jul 2026 13:31:27 +0100 Message-ID: <20260728123127.1711653-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260728123127.1711653-1-peter.maydell@linaro.org> References: <20260728123127.1711653-1-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=lists1p.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1785242064676158500 In exynos4210_fimd_update(), we iterate through the enabled windows, blitting them to the screen. We assume here that the guest has not programmed the window's coordinates to be outside the overall LCD screen resulation, but we never check this. This can result in the guest being able to cause us to access outside our allocated framebuffer backing memory. Since all the coordinates here are unsigned, they can't be off the left/top side of the screen, only the bottom/right. If the top left corner of the window is out of bounds, the whole window is invisible and we can skip it. If the bottom right corner is out of bounds, we clamp it to the screen size so that we only draw the visible part. Cc: qemu-stable@nongnu.org Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3795 Signed-off-by: Peter Maydell Reviewed-by: Marc-Andr=C3=A9 Lureau Message-id: 20260706173324.804340-4-peter.maydell@linaro.org --- hw/display/exynos4210_fimd.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c index 52f2285cf51..6c062a28c02 100644 --- a/hw/display/exynos4210_fimd.c +++ b/hw/display/exynos4210_fimd.c @@ -1237,7 +1237,7 @@ static bool exynos4210_fimd_update(void *opaque) bool blend =3D false; uint8_t *host_fb_addr; bool is_dirty =3D false; - uint32_t global_width; + uint32_t global_width, global_height; uint32_t window_width; =20 if (!s || !s->console || !s->enabled || @@ -1246,16 +1246,28 @@ static bool exynos4210_fimd_update(void *opaque) } =20 global_width =3D exynos4210_fimd_global_width(s); + global_height =3D exynos4210_fimd_global_height(s); exynos4210_update_resolution(s); surface =3D qemu_console_surface(s->console); =20 for (i =3D 0; i < NUM_OF_WINDOWS; i++) { w =3D &s->window[i]; if ((w->wincon & FIMD_WINCON_ENWIN) && w->host_fb_addr) { - scrn_height =3D w->rightbot_y - w->lefttop_y + 1; + uint32_t rightbot_x, rightbot_y; + + if (w->lefttop_x >=3D global_width || + w->lefttop_y >=3D global_height) { + /* Guest has put the window entirely offscreen: ignore */ + continue; + } + + /* Clamp right corner coords to be within the screen */ + rightbot_x =3D MIN(w->rightbot_x, global_width - 1); + rightbot_y =3D MIN(w->rightbot_y, global_height - 1); + scrn_height =3D rightbot_y - w->lefttop_y + 1; scrn_width =3D w->virtpage_width; /* Number of bytes to actually draw */ - window_width =3D w->rightbot_x - w->lefttop_x + 1; + window_width =3D rightbot_x - w->lefttop_x + 1; /* Total width of virtual screen page in bytes */ inc_size =3D scrn_width + w->virtpage_offsize; host_fb_addr =3D w->host_fb_addr; --=20 2.43.0