From nobody Sat May 30 18:35:29 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=1778842278; cv=none; d=zohomail.com; s=zohoarc; b=iphulOWrJJe6R8XShhKz631kWN1tFWANI4z66iif5KMNjxfY+sOPg0PK99r9Ks/EMMQsdJcbZHJai5yms5c4cDAbG/R8MXu8Q5fVcCauNHacuo/A/Tv4wJgjtqebBrB7EDzuCdXkfdiTo/iHX3x+C6ZfgF2F3v7V+E8YQ5+VoC4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842278; 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=s4bMqeaqqVIhpwFG12+SoiibGvlQN/iUNnXG7PwJyPw=; b=WgGdmM3neltracMGaYTFWkLj3xOkdz/LNKHOVeDROS6I7EZ5V3JqtEn7WmZUaFjOy8QXUDx0lySeInYjm/v4Izm2zEXxsVBXbnCv08hMywBrSH7pwTyg1Bec2f1g6mXS54hOCqvB/2g5b8iAkMsRLEd/n1CITLleZHN/DNOLmTw= 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 1778842278463714.6199785469504; Fri, 15 May 2026 03:51:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7P-0000iS-4d; Fri, 15 May 2026 06:50:11 -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 1wNq76-0000bi-SA for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:59 -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 1wNq75-00016r-8f for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:52 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-48e8132c6d0so45660535e9.1 for ; Fri, 15 May 2026 03:49:50 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.49.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842188; x=1779446988; 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; bh=s4bMqeaqqVIhpwFG12+SoiibGvlQN/iUNnXG7PwJyPw=; b=nd9qV+UelVcfZMVG5f1i0g5oX2Vq/17m3STrQa28xF54R5fJdOGlub6INXXEUrFF5I IIDMq0q9H989Fw9m6BTbPhDWUr10DnR8A+iF+2kpeTIZJ7j85tHDzRYac21kBMTqKGMJ +3vxPyVlFfFORd0uPqRM4WA2gsurObkRcnPHFzcebZV4Op+SUUTt3JoU2jhv4sz3gBQT S3sr+nwMdF5WIHr3BiYpagjacof8ePj9yObu3T12DpGzqh8CCzR0VD58PPmTGsaWJZxj 06RslDQXIymIge4+j0qLO8Xw5HCxM37fSD3rOUlkf5bXJalgT3xDNh2wgkYWdmRt5RdJ atcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842188; x=1779446988; 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; bh=s4bMqeaqqVIhpwFG12+SoiibGvlQN/iUNnXG7PwJyPw=; b=UUysL9KKU6xMuU38AcfjZ8o14rXTtdPuY8Dsu4fbhBPbcxRnxDYiAb+qFr1HoHwLj3 RkSIct65vww3nu/g8/p0jcRB1vxbQ7Rw1P5+W5bdi4VH+UUKh4xDT35WYw1NteKIQPCQ P/uNZqjsLA692NaSZGJr14SmporBBkN6BzuYHDFG2ZtfcREorplZhcN2PhAIahJmmqYH D1XkfRlYvNVgE9R6rCn0FXgjc6OknuvHdEYXhQT5WBr0mHLqa7oNKVRWgvYxRNFDwnnF vwVpta+9801/7yXHu9JOgWZXgOyrmerDwTFpHKDDYS1w1S28Y5aqGR0KfKVJGiMOjtFm /AyQ== X-Gm-Message-State: AOJu0YxiGEbcI0rlZA9q9Skwc7atBbnx2uSeyQPApX0+Z+6YpG9lIy81 ypHwQ1VnjTQMAllw+gqYJzQRC8fPWkeVWHqKP5NemlnciABfz3QTqyhslxg+WhRcFLVZz6uHKsG cXhMY X-Gm-Gg: Acq92OGLkkjRjCVzzeG78hW+PlQFtooTSIHyNGpa3t6TwWr0qmjYauseBBrmcryi4oq bF8DjmdpFQZXnzmB9NvOOQOPF4PxowZ253IIUYjB9gy4GbTk2ySxCKYQRYOLq57i0863PKVytFQ 5HvGjUKmDtOaCTKIJtZQAk9lhICfoXn2VWz4UEpt/nP1o8IQXH5hKsjFwYweemmGqzK+a+EoNky YDPM51DLmao7q+GuJhqQ+po5ybnarOSKWZZu9gozNXPGpszq7RilyK0kuKFcoa3/jr7z0Z/5MF9 9OzGJJpH8poUZ87xK0EOw1EvbwvDACgmsuVGHn4eYSPgteDjcnvM3m7lwxgZ+d9lwC1brr9OBg6 6wbQQXqi7IAK3hGzD4I3bg8ecWTyc9/Uh1r5ZW26qp1EMxXWLJteQgP1/pYnaP8d49Z/zdB//aY grCaA+tVcU5fE7wEXb3jZaeL0bi1cetNW2i4aSz6faHgdCUuX0vWFDoSCjpC5WzSJWw4YrB+GEk /UdWQWfnGcPPMeBL554g8Fv1zj+/Jc= X-Received: by 2002:a05:600c:8b56:b0:48e:8741:fd4c with SMTP id 5b1f17b1804b1-48fe632536cmr55553595e9.18.1778842188245; Fri, 15 May 2026 03:49:48 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/23] docs: Document TIMEOUT_MULTIPLIER for raising test timeouts Date: Fri, 15 May 2026 11:49:23 +0100 Message-ID: <20260515104945.4145203-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::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: 1778842278777158500 Content-Type: text/plain; charset="utf-8" Our test infrastructure allows you to set the TIMEOUT_MULTIPLIER environment variable to raise the test timeouts if you're building for a slow environment. (scripts/mtest2make.py reads it and sets the meson test -t argument accordingly.) Document this so it's not a secret feature only known to a select few. Signed-off-by: Peter Maydell Reviewed-by: Pierrick Bouvier Message-id: 20260427161132.1463385-1-peter.maydell@linaro.org --- docs/devel/testing/main.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/devel/testing/main.rst b/docs/devel/testing/main.rst index 0662766b5c..b01a374865 100644 --- a/docs/devel/testing/main.rst +++ b/docs/devel/testing/main.rst @@ -52,6 +52,21 @@ Before running tests, it is best to build QEMU programs = first. Some tests expect the executables to exist and will fail with obscure messages if they cannot find them. =20 +The timeouts for QEMU tests are set conservatively so you should not +in general find that tests time out. However, if you are running on a +particularly slow host or with a slow configuration (such as a build +with the clang address-sanitizer enabled) you can globally raise all +the timeouts, by setting the ``TIMEOUT_MULTIPLIER`` environment +variable. For instance: + +.. code:: + + TIMEOUT_MULTIPLIER=3D3 make check + +will run with all the default timeouts multiplied by three. You can +also disable timeouts entirely by setting the environment variable to +``0``. + .. _unit-tests: =20 Unit tests @@ -959,6 +974,9 @@ Python. You can run the functional tests simply by exec= uting: =20 See :ref:`checkfunctional-ref` for more details. =20 +The harness for the functional tests also honours the +``TIMEOUT_MULTIPLIER`` environment variable. + .. _checktcg-ref: =20 Testing with "make check-tcg" --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842282; cv=none; d=zohomail.com; s=zohoarc; b=Gtyjra4dIpRfxbRzO9KRMqEtyhigPBCOTK8N3xwL/+LOI5PXIb7fzI+eipOAMUuLsx0Ms0/fOc3jiNDl46ZYL0vfWMfWurwv/8rTwX7ZZkQwLrT4M/flNXok8ya76vRi2PJH7btS9nKXFrMkkG/7yXyjBefQI6mcAtyl62OGKG0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842282; 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=oGa+BD4k4a/PK6xX/1PHxIPiXBIrIWftYTqw+3gjPGs=; b=YeJiINyz7RrvjX18Fgie3n2F0zBZ8Zka2QYzwUFrJhwAIqQmd9t4DxhjyP3BVsrGRtsMCSJ5eoDJ/dIe8iH9lNP+ibK8merP/lj1UJq6XYW+RofMiJ+SPriAfrLwl5b1u4ISPN7+uHbUpjnxJRzQ3S4n8Of2l/fkIFaCPyWjmJo= 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 17788422829421000.2848410396073; Fri, 15 May 2026 03:51:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7K-0000eB-Ob; Fri, 15 May 2026 06:50: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 1wNq77-0000bj-HG for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:59 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq75-00018W-Kc for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:53 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-488b3f8fa2bso6555185e9.1 for ; Fri, 15 May 2026 03:49:51 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.49.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842190; x=1779446990; 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; bh=oGa+BD4k4a/PK6xX/1PHxIPiXBIrIWftYTqw+3gjPGs=; b=cFrIez8GcEGREwfMGarXH1NvbXGNcGtZLC/fXlaMJkhJFHArQZUOmpHnU9/br177J2 Dz0wf7ZDpXYDPdwJ6zY4CmybHBrIsZ3bdKUY0mRcyDmJO/3AKYixt1YO6rN9VljJsXLC ljzSzrNrgvtmc5GGVa1havDnVOQkfPF/2RqE0/bsHAPy7MgcDAddsR+WNPSuGN9IhpX1 w06R5w5729IMmaL/jXqcG0JmjmpoRWyWU4cJuVSbsCQjD+hvh57SeKc1YhnEtur+5X8/ gTMhOsQ2uj/phntvLRiD5UG1H1VbrCR0Aik/K3eRQyeC+aPA/0WzBykdQKcZ9m/HdWdR p8rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842190; x=1779446990; 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; bh=oGa+BD4k4a/PK6xX/1PHxIPiXBIrIWftYTqw+3gjPGs=; b=c7ngx+xdg9K8vWT/zjRIzhcQ74FCs3gqTIOWpd6/uP3I9TEl4i7J84+taNI3nQdGr2 1NIhQEhqOT0FHrBmYV4xIaQTSZnL+R3O9v+8bCPpLHhGq4irGMxln43i0WJgG/C3nENA Z94X2TkIyaGVHsxYPygh+/sIF8i9OFg1IeBBlWRCa0HwbdAMDHwuYF7tHAerD6JpjWRz oEOUE8h3ZJSLOqeKAbbmSXBPm/HOPS5ItBwHndkrPsQg5I67vUde3lg2BpCvn6l0euko FErM3poWYjW35yf0+uC/CCHDj4bNESveHlHFvuqu24/7ZLWvQuyQxpmaYW0L8FXNt9Tr aaVw== X-Gm-Message-State: AOJu0YygQwLuZ64qEzZx/IyEpuJEtBtlV4SK8SQSTNYJoEJDW/s4qrWl kxP+FtMtcq/dYE05AnxLAYbjNpql9xiYYUwTjXnrV3W54GiJcBTbXWiZYkmfv/PDRDQSRrCS2jR wfgXg X-Gm-Gg: Acq92OFXAieMkStuWVFufp2grsq0I4TTbicA35ol1fz4YyHeEcC9HIjD723hgrXpwKR XNmSQKS9/zuvddSWlsPW4LyBRziPVQYU4MKOWuwlX6B5alPgdcaXNnJRTwq4o7PmLlmg0k7yBHh 45kd1Y650S6WOyhOg9XcgF8hz1UH8d+29Lpy92z6oRus+s7DL+eDrrVv9/crU+4meIkbbbQ0AmU ZbwRi0QN5i24+6iHvK7DQ07sbn6BQRX7iQf/dTfQr16YqCnenpaJQSZTl+LcbyjllwOA5k6EFr2 APm9bdt3fm+prqne8eUz8Gxvo4TttLZtuWOXPnbjEmjXW02SHXGxowqon+0r1LOvDsoKHQuUNC3 /V7FVskVG/OWfPdNvu+GM6XX/N3lYilFXz6oPm65NksUPybRp8TOxJMutyBsLJKXpBb8qVHvwVQ cLxq2EziJ+Z4TXZyZ0Uh+xAFQvjNoqmi4wg4oY59wV9/VEiZ1du2rHG3ao8RwVUcfJ0M0p5Jdq3 ey5ghaiNxXdYZ10zPwFQhVRsRYNow4= X-Received: by 2002:a05:600c:1914:b0:48f:d620:c27f with SMTP id 5b1f17b1804b1-48fe4dac5efmr45044075e9.4.1778842190130; Fri, 15 May 2026 03:49:50 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/23] hw/arm: Build ARM/HVF GICv3 stub once Date: Fri, 15 May 2026 11:49:24 +0100 Message-ID: <20260515104945.4145203-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::334; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x334.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: 1778842284867158501 From: Philippe Mathieu-Daud=C3=A9 Move arm_gicv3_hvf_stub.c, introduced in commit 48396ad6ce9 ("hw/intc: arm_gicv3_hvf: save/restore Apple GIC state"), to the global stub_ss[] source set which holds stub files being built once for all binaries, instead of one time per system binary. This prevents symbol clash when trying to build a single QEMU system binary: clang: error: linker command failed with exit code 1 (use -v to see invoc= ation) duplicate symbol '_vmstate_gicv3_hvf' in: libqemu-aarch64-softmmu.a.p/hw_intc_arm_gicv3_hvf_stub.c.o libqemu-arm-softmmu.a.p/hw_intc_arm_gicv3_hvf_stub.c.o ld: 1 duplicate symbols Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Manos Pitsidianakis Reviewed-by: Mohamed Mediouni Message-id: 20260507135816.71171-1-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/intc/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/meson.build b/hw/intc/meson.build index d7db99ce35..fac2d228f9 100644 --- a/hw/intc/meson.build +++ b/hw/intc/meson.build @@ -47,7 +47,7 @@ arm_common_ss.add(when: 'CONFIG_ARM_GICV3', if_true: file= s('arm_gicv3_cpuif.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_HVF', 'CONFIG_ARM_GICV3'], if_true: files('= arm_gicv3_hvf.c')) -specific_ss.add(when: ['CONFIG_HVF', 'CONFIG_ARM_GICV3'], if_false: files(= 'arm_gicv3_hvf_stub.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')) 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')) --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842323; cv=none; d=zohomail.com; s=zohoarc; b=LUX36SFb2hz/zO83b1kB2EqHdxZxRv7b8EmLnYM1x2zFqwsZRMwXvMf7QSUvEqmCnyspq0MZ0GpQ20NRJWOhiV9qoKqbx0FeVagPu3tbbHYGIH1a03C+PtIJQAzwG2KVbaoYBAE39Rf4Mk5eo5weCusbQumijAwS9ywzZHuStDE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842323; 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=hW5w2LIFgMkpT09kp6RNzcjxwDvmo2jSkWbQBxRR2No=; b=UlSYNW7k6gUghFtniu8I03xZbnC33F42WwCBLcDdLIqdna8oRoDUdNSq01QcxhbHavdfvBMLNW666SRJPmq83bTGVev3SQC9HMPJlwn92g+8MHh3UKZtStak0WpHxRx4tTrHZzAsOngx/e6HT3d3IRpKXPZT+szF4m7WhxI3ekI= 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 1778842323937230.06556166850635; Fri, 15 May 2026 03:52:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7O-0000hm-68; Fri, 15 May 2026 06:50: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 1wNq7A-0000bp-QY for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:59 -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 1wNq77-00019k-EV for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:55 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-44a5174670eso5074062f8f.1 for ; Fri, 15 May 2026 03:49:52 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.49.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842191; x=1779446991; 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; bh=hW5w2LIFgMkpT09kp6RNzcjxwDvmo2jSkWbQBxRR2No=; b=c3enBVCEtNSSONfdARMno5EZ4WXKTACJOcINLvGZ/ggWrwkBVL8jT8zXp3bps1dCsU ijkpWt9h+yBI2qZoWwchxO7rPJxj3O7ovbE3fhizx5vlmyWwn9ig+Cu8ATeIe7Sgf7bV cvIBwXMbWSHOk74oHVCRs6CgUMh6Ov3J+++qZWMkCQnxEpW6lrHYMnyoI6MoKFuvL4mV +8hp01MYjVhFBPRsflRLd8vKyjqklv2Z7L3egO6/H5bsPieyaVcI93GAPiEWuNG9woks 4DXJeh3zFlOQ8bn1lSe3yP2VH/lZItLJOw2s07Gd0+62VwvOB9J3XgkbJCu2tMLEL4n4 cK0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842191; x=1779446991; 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; bh=hW5w2LIFgMkpT09kp6RNzcjxwDvmo2jSkWbQBxRR2No=; b=B7wFapfjRN6rWgfFrg/ISvYJ9PEAxr3H1ED2OMi/M7xwFCAdpGJYczxHd50G73YflQ g3lxFQQGsgM1UYxQae79t71ieEI33ymyxh+F57BN/2UwKBBDXKdArUQcPyyzQOpf43ZU GYkYNAhEIZc3npU8tUuRWIxswIzKGe/5J/OkfL7Ez71XmEo8nlSofxd0ji0F2sFhWuQC gfQw6ngzQdTqTXkHX3REwUoBkuqpMIPeTIDrM04L1yB4YzzUCVzFRb59+PpbRz/lW90C M4x85QZcg7clT7kWsLds9aFt/g8rxmNYV0tbmz5lvsO6XwcR+FrAqFiyDS5JsLfX8wjS lwCA== X-Gm-Message-State: AOJu0Yw/XMVlJy+CprbygB67VrHAp4YRCc3Dt7Bf0jfCHqMUcN/cvYIT tSMddLGNP7L933ogM29jLuwR8DdDXQONYiDWgC98OxC2ZAnyqStlyOA0z7DsQXpW4att9SIWcfy 9pXqw X-Gm-Gg: Acq92OGmXV+cGnIv/8aNB9iiWXVhXrhTxwoO3JLLMOMvi7HikNdlSdRFzCZvB/090sU HnlUawbV8tWhjHhr+1aySH+NzBif1zvXykEqkXNuOjvq7mrlC4C6aEGP/qqitpW+5Sky78mF2AT mshFBAyIHTbBcJqEG7gHoc3VtD2w5hYrzmRtZ+T6+p0p0jxc12lMIBBwzqQrZZ3pJko/42LCv9M FsQJRPawNnYwKSgtQZLsoRTzlE/YhTXac1ShqUxrIrMbiCDVA9R2qM+U7acn2ZwYcx3knh3lbZl GhfO60zrguc9AqnVL29R+zvRkShU4rE+keVLqb23jNuwWp4Z8hea08X+RbDL7v2IuIbKwDz7wdP vv32FWAffcegBI8qCylOeq6VDpZ4MWovUZTdXlvMM+LhiaSEb/Ur9h6bIQrXPf3aSn1rbrLcNbR zLxyf8aSIm7guijU2dzIFRT1v0JZQasuVkR0jL2z9Qw2+gvM9TPr0imgUwscAvm2Yy0ImrjcFU/ ++ySBGOmG3jvHlywBEJMR6nZ+0VYS8= X-Received: by 2002:a05:600c:c173:b0:48f:e230:c3f8 with SMTP id 5b1f17b1804b1-48fe661b50amr47559915e9.30.1778842191274; Fri, 15 May 2026 03:49:51 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/23] hw/arm: fsl-imx8mm: Don't call qdev_get_machine in init Date: Fri, 15 May 2026 11:49:25 +0100 Message-ID: <20260515104945.4145203-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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: 1778842325118158500 Content-Type: text/plain; charset="utf-8" From: Vineet Agarwal Calling qdev_get_machine() from fsl_imx8mm_init() can trigger an assertion failure because the machine may not be created yet. Reproducer: ./qemu-system-aarch64 -S -display none \ -M virt -device fsl-imx8mm,help This hits: ../hw/core/qdev.c:844: Object *qdev_get_machine(void): Assertion `dev' failed. Move the CPU initialization into realize(), where accessing the machine state is safe. (This is the same issue we fixed in the fsl-imx8mp machine in commit b67d0bcdd41c; we apply the same fix here.) Signed-off-by: Vineet Agarwal Message-id: 20260511115918.32765-1-agarwal.vineet2006@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/fsl-imx8mm.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/hw/arm/fsl-imx8mm.c b/hw/arm/fsl-imx8mm.c index 97c3f8542c..875e92bb34 100644 --- a/hw/arm/fsl-imx8mm.c +++ b/hw/arm/fsl-imx8mm.c @@ -157,16 +157,9 @@ static const struct { =20 static void fsl_imx8mm_init(Object *obj) { - MachineState *ms =3D MACHINE(qdev_get_machine()); FslImx8mmState *s =3D FSL_IMX8MM(obj); - const char *cpu_type =3D ms->cpu_type ?: ARM_CPU_TYPE_NAME("cortex-a53= "); int i; =20 - for (i =3D 0; i < MIN(ms->smp.cpus, FSL_IMX8MM_NUM_CPUS); i++) { - g_autofree char *name =3D g_strdup_printf("cpu%d", i); - object_initialize_child(obj, name, &s->cpu[i], cpu_type); - } - object_initialize_child(obj, "gic", &s->gic, gicv3_class_name()); =20 object_initialize_child(obj, "ccm", &s->ccm, TYPE_IMX8MP_CCM); @@ -229,6 +222,8 @@ static void fsl_imx8mm_realize(DeviceState *dev, Error = **errp) MachineState *ms =3D MACHINE(qdev_get_machine()); FslImx8mmState *s =3D FSL_IMX8MM(dev); DeviceState *gicdev =3D DEVICE(&s->gic); + const char *cpu_type =3D + ms->cpu_type ?: ARM_CPU_TYPE_NAME("cortex-a53"); int i; =20 if (ms->smp.cpus > FSL_IMX8MM_NUM_CPUS) { @@ -237,6 +232,12 @@ static void fsl_imx8mm_realize(DeviceState *dev, Error= **errp) return; } =20 + for (i =3D 0; i < ms->smp.cpus; i++) { + g_autofree char *name =3D g_strdup_printf("cpu%d", i); + object_initialize_child(OBJECT(dev), name, + &s->cpu[i], cpu_type); + } + /* CPUs */ for (i =3D 0; i < ms->smp.cpus; i++) { /* On uniprocessor, the CBAR is set to 0 */ --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842328; cv=none; d=zohomail.com; s=zohoarc; b=C5IDu07IEoBEI6iMYOmcxhw6EYTEPBGo6ORuLoddRnQhHqrQh2NAw+q0+MO3FnlHTi8WoaZzPXt3kkfln6TJEMqMj7VC29C/byjM7gMuVD1jk5qc4IvSWkp+zS0RA1lITrm+udJaFCVvnl99JvKxuanEin5W6OaMb3u9ARBnYHs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842328; 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=KtCBYpW0Pq75Lat+aaO7L1tUSDrGR+3jkJTqAQR2/jY=; b=RtWKsMJuyLF2OksV6BQ/a6BeHCpdRAXkgky5QdYk9hVUdbHeNB5z3jp+0AVdgYXd+XiWi66UPuiuSbIFp7P2EvZKupMWPnJrSKNTaw/WzxHTmBJYGjlfFxUiSE/dbxZRAUjK3TaVVOKr2yyLzLn7imBFtBi0iwYTK4twelt58EI= 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 1778842328370725.1745169773219; Fri, 15 May 2026 03:52:08 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7Q-0000jq-Qg; Fri, 15 May 2026 06:50:12 -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 1wNq7A-0000bo-QH for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:59 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq78-0001BA-6G for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:55 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-48a7fe4f40bso103448175e9.0 for ; Fri, 15 May 2026 03:49:53 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.49.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842192; x=1779446992; 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; bh=KtCBYpW0Pq75Lat+aaO7L1tUSDrGR+3jkJTqAQR2/jY=; b=EKYEDqoqMOQVmqBBg+RIztOudf9PFidXmzw3dcjXK+eOP30pZ8Tdh68TNKKmdCY0Vf vOd6at8gwqfGEKhLJ7SgR964PzeSycd6lNNFVsep/9DNRgxyY9zUmYC3VxFyWcEhVQCE hbknciG5qE5C6rUuys0cfiSHy65JHbW8jboTlxgCdGKVGXRAdoee3grOgzyMkHOW6xBl YFCEPu6TmxnKPhgwQs2gsjqcTyCC0WW2iRFITTaM6z8j/8M8IIqbeQJXdWmfFHJyNjm4 /IfAwJWYpBrBma+pSIWzH0/a2W961ZcJp2n6ajLMF8+qI3YWMLdoAXZAC+K0mpCAH1vM T3YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842192; x=1779446992; 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; bh=KtCBYpW0Pq75Lat+aaO7L1tUSDrGR+3jkJTqAQR2/jY=; b=RzSpgPKpsegN4K8Wm/fdAUdwLOGeVftuyTb1ZIbExXiy0Mj20Vg8TFt6Fe64g8aLzz JvM9ANR83KHe8Thho9bOp27wAqO+OySN4sDnsZl8d/TE5s8+16yskY2wuM8M4q1R+8He phniFqW+pY2iu4AJGKKa7Di28yYi+i/MgW0HcPqysjZTwivmT4wd3YzIkZ58KwSN57kB r9M5QOO1k1IKDE4cp2BGo+z1JLtPInGay8v2KyYtY4Pn46yYqPN8bjqcXpN3Z666iPZZ hIYM/QsEcAHf/6e2QkWu/P3nAcbt+X3M4XU2HKz1GHn/M5QJud+xilpc+4bBFXwjhD31 m40g== X-Gm-Message-State: AOJu0Yz6lYgHuBMal72X/l1mR2dRNwvKSJwmVdnAuQJugFZh8aBJ2MrQ v8fFg2aeYByzUWALPzP+jnEh14RXD2E1/5opv6HXibi/ydiTI1elhYQz7+7BziHBpWsylGIhdIj wy3ZN X-Gm-Gg: Acq92OGHG86DXWDsmbAAgQlWwERqlHgiOS52XzWzXbG3lquO2/BV9+SbS9b5uaF0TvT 7zyWR2bBnMXsueylJhifMvn3rceCJIFOeTMla9m8EQIPVEGHq8IMrE3wrNywymlHQ39Oh9+PBL3 SjrGy/zyResUpGGcD9zV19xl36K02SpKQwLiWgqyMj5u8RRq52egEYzHUq9f6YYPlGFxblrTkTN OezBJiypFJN/1x3NKjZs8YUHk8filBnrgWe2/jpVRRnqDZBFH+yIG39nFXGk7y+hCu1bnhzf/o+ n/bV3X/tr0QVyaLWamTwgDV3pa+NJtnb0wcyPwp6Q+lB3tg2YnzD4eFtxYph4K/HR6vkPHp1mQR Sq8R2J6ZF/pkgUfg7OeME76SBeNPXDD7yPsbJ0prKInPP8ceHLWFc/g+YCTItzd++gY4A9cFoek ZhkRhDsKZnerrdetaty4Lbak5KpjCEYrbNlL0dXOaIRezPS3h1nLtgNSZUC2Sp6N79p7YUs6q35 yN3lG1sJmw0OjBFOq/1ejSgvEBlhN8= X-Received: by 2002:a05:600c:4455:b0:48e:8dec:19ad with SMTP id 5b1f17b1804b1-48fe60ea94emr45310935e9.12.1778842192347; Fri, 15 May 2026 03:49:52 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/23] target/arm: Rename Aarch64-specific methods Date: Fri, 15 May 2026 11:49:26 +0100 Message-ID: <20260515104945.4145203-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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: 1778842329109158500 From: Philippe Mathieu-Daud=C3=A9 Various Aarch64 specific methods start with the 'aarch64_' prefix. Rename few more emphasizing Aarch64 specific features. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-id: 20260507134709.70507-2-philmd@linaro.org Signed-off-by: Peter Maydell --- target/arm/cpu.c | 8 ++++---- target/arm/cpu32-stubs.c | 8 ++++---- target/arm/cpu64.c | 12 ++++++------ target/arm/internals.h | 8 ++++---- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 31e0a12a98..1462e1f501 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1707,25 +1707,25 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error *= *errp) Error *local_err =3D NULL; =20 if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { - arm_cpu_sve_finalize(cpu, &local_err); + aarch64_cpu_sve_finalize(cpu, &local_err); if (local_err !=3D NULL) { error_propagate(errp, local_err); return; } =20 - arm_cpu_sme_finalize(cpu, &local_err); + aarch64_cpu_sme_finalize(cpu, &local_err); if (local_err !=3D NULL) { error_propagate(errp, local_err); return; } =20 - arm_cpu_pauth_finalize(cpu, &local_err); + aarch64_cpu_pauth_finalize(cpu, &local_err); if (local_err !=3D NULL) { error_propagate(errp, local_err); return; } =20 - arm_cpu_lpa2_finalize(cpu, &local_err); + aarch64_cpu_lpa2_finalize(cpu, &local_err); if (local_err !=3D NULL) { error_propagate(errp, local_err); return; diff --git a/target/arm/cpu32-stubs.c b/target/arm/cpu32-stubs.c index 9e50bb1b0b..d42b1a5d6a 100644 --- a/target/arm/cpu32-stubs.c +++ b/target/arm/cpu32-stubs.c @@ -4,22 +4,22 @@ #include "target/arm/cpu.h" #include "target/arm/internals.h" =20 -void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp) +void aarch64_cpu_sme_finalize(ARMCPU *cpu, Error **errp) { g_assert_not_reached(); } =20 -void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp) +void aarch64_cpu_sve_finalize(ARMCPU *cpu, Error **errp) { g_assert_not_reached(); } =20 -void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp) +void aarch64_cpu_pauth_finalize(ARMCPU *cpu, Error **errp) { g_assert_not_reached(); } =20 -void arm_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp) +void aarch64_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp) { g_assert_not_reached(); } diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index a93ad2da5a..b38a78aac3 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -60,7 +60,7 @@ int get_sysreg_idx(ARMSysRegs sysreg) =20 #undef DEF =20 -void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp) +void aarch64_cpu_sve_finalize(ARMCPU *cpu, Error **errp) { /* * If any vector lengths are explicitly enabled with sve properties, @@ -121,7 +121,7 @@ void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp) * Disable all SVE extensions as well. Note that some ZFR0 * fields are used also by SME so must not be wiped in * an SME-no-SVE config. We will clear the rest in - * arm_cpu_sme_finalize() if necessary. + * aarch_cpu_sme_finalize() if necessary. */ FIELD_DP64_IDREG(&cpu->isar, ID_AA64ZFR0, F64MM, 0); FIELD_DP64_IDREG(&cpu->isar, ID_AA64ZFR0, F32MM, 0); @@ -336,7 +336,7 @@ static void cpu_arm_set_sve(Object *obj, bool value, Er= ror **errp) FIELD_DP64_IDREG(&cpu->isar, ID_AA64PFR0, SVE, value); } =20 -void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp) +void aarch64_cpu_sme_finalize(ARMCPU *cpu, Error **errp) { uint32_t vq_map =3D cpu->sme_vq.map; uint32_t vq_init =3D cpu->sme_vq.init; @@ -408,7 +408,7 @@ static void cpu_arm_set_sme(Object *obj, bool value, Er= ror **errp) /* * For now, write 0 for "off" and 1 for "on" into the PFR1 field. * We will correct this value to report the right SME - * level (SME vs SME2) in arm_cpu_sme_finalize() later. + * level (SME vs SME2) in aarch_cpu_sme_finalize() later. */ FIELD_DP64_IDREG(&cpu->isar, ID_AA64PFR1, SME, value); } @@ -548,7 +548,7 @@ void aarch64_add_sme_properties(Object *obj) #endif } =20 -void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp) +void aarch64_cpu_pauth_finalize(ARMCPU *cpu, Error **errp) { ARMPauthFeature features =3D cpu_isar_feature(pauth_feature, cpu); ARMISARegisters *isar =3D &cpu->isar; @@ -666,7 +666,7 @@ void aarch64_add_pauth_properties(Object *obj) } } =20 -void arm_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp) +void aarch64_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp) { uint64_t t; =20 diff --git a/target/arm/internals.h b/target/arm/internals.h index 3edc15c7b4..00830b1724 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1750,10 +1750,10 @@ int aarch64_gdb_get_tag_ctl_reg(CPUState *cs, GByte= Array *buf, int reg); int aarch64_gdb_set_tag_ctl_reg(CPUState *cs, uint8_t *buf, int reg); int aarch64_gdb_get_tls_reg(CPUState *cs, GByteArray *buf, int reg); int aarch64_gdb_set_tls_reg(CPUState *cs, uint8_t *buf, int reg); -void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp); -void arm_cpu_sme_finalize(ARMCPU *cpu, Error **errp); -void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp); -void arm_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp); +void aarch64_cpu_sve_finalize(ARMCPU *cpu, Error **errp); +void aarch64_cpu_sme_finalize(ARMCPU *cpu, Error **errp); +void aarch64_cpu_pauth_finalize(ARMCPU *cpu, Error **errp); +void aarch64_cpu_lpa2_finalize(ARMCPU *cpu, Error **errp); void aarch64_max_tcg_initfn(Object *obj); void aarch64_add_pauth_properties(Object *obj); void aarch64_add_sve_properties(Object *obj); --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842294; cv=none; d=zohomail.com; s=zohoarc; b=MwTOqWqpNlU+aCASegWv/rRJGGLbJ96XoVpnBWLdzDDv+DaCneX5xOOcInB6ZgrYL5sYBl8mvcEbcQ3VrrK9WFDQ1sivSAscQIPf9jImI1KBKAcHEoZxQ1gJZ34rHQRbvo/ujxTQ1nq4Gxk6+bSJcBg0U7jtjZYlpM8SOVAXRK8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842294; 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=tARkjxsKkE264H1PKp6MVO3zbSIFjjAhzFnkn3FZYuA=; b=J6Pl5BoSaOdou/rzlBfo9RG/ixZGZ33Rd2GYSwa0/atyYbL+vJothqz6KCNjTLWGoVVaMBRLVQYwzHYYqkxL0LBkmF4SS0Nd9HrqTdLSax8vRJrg7mY7w/woZvQGi1H4qkv2KjKGTP8hCRwLwECSsgweELYyee+KQiU9ASqE31A= 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 1778842294057456.88289562714783; Fri, 15 May 2026 03:51:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7N-0000fy-8q; Fri, 15 May 2026 06:50: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 1wNq7B-0000bz-P1 for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:59 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq79-0001DB-QU for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:57 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-488a14c31eeso60883635e9.0 for ; Fri, 15 May 2026 03:49:54 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.49.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842193; x=1779446993; 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; bh=tARkjxsKkE264H1PKp6MVO3zbSIFjjAhzFnkn3FZYuA=; b=Gn1R3F1SWZ9aBwcTM8RM08YyfAPj+sZYlbG6Ia980oC6SfmJLuGl0ecBQypQ0mMy7/ ylJuJErtskJOMxS71Ts5922RyV1PZEFUezpbmuPNTvXiU8eGOGNuP0ay5K1VdKEJ69Xi Y0db9E0bWN18lPE+WgoGGSN5rrA0xHwigrUwZphW1qWGXOE4sZquYNZWGuQMHBGSTi/u +B6gPwHpEEPBUwjzq/IeI160YQ1d/dQfuP69+nPD6GVZZ2OVdk+teV3PnnezWObZlihE wJZcwvgUjEp+u3sXcsAt98AK3THCfWHUbUhS6ybb+3hLLjWp59OeoHjihCPhqgWdZUQO SlsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842193; x=1779446993; 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; bh=tARkjxsKkE264H1PKp6MVO3zbSIFjjAhzFnkn3FZYuA=; b=Vj03BtBDBXDiL4YDhX+6+//YiKS9s9YouMMmlbozMfqxazL9grtrCyjCFAp2FJW8Mh Vse7GjPuwuvdfzNfrYBTzJCZie7cOrYGtctPFmANzejmdvZJ//iE/P2nQYYY07B2G4z7 kvfkgnl08ni06RrbQv46QbgWYpDgjVX0PrJjII26RXlgpFCQ5Ossu8ELErcI6e+AsMPE /BM7SbjH+tvSpNqfXuOX1sgcw0zYVVTSZ8X/0W+3Gq+sa2FSX1tC1Cwvgogy0tLMy5iH 2Zu+66d/PTiVHHLM5WjvdB6yyBorKHewguKQNKDoCY/0W5gjCMR0gLma14GRgZi1sWf+ 0O+g== X-Gm-Message-State: AOJu0Yy0zL0ot52kYziT9SgWo76IfWHoBdJiTgfEBW+eOI6xORMuX/5w r7kRbUa8DB6MF4Z5VQbXTZzggBMJEnds/XGn1cl45rzB7PrNoaeTOND3lu8hIviWlCFwCKuoAf1 2Yorf X-Gm-Gg: Acq92OEQDPwZMjZ3d5pnGwBwir83w0vEmtl79KXP7K18aBMBDtzVUQkmsaEyeHmoUhF BeSfXCBoUbcS3VPGH7OYuXfZFl8E2bX+P68y+/F+MdHvDHt7EM5N3enEAkUEC3X9La3W3AdM6Sj IY/NTsw0E5z+Sbqy2sqz/rW3mW7raehn+t4mVeAsa36dogfxwTQOunYFajUZhC0RCI+D4moJ6wS ytPQ1ueGJu/G16i+oYzvDL6aQlsjgHVrOVH5Qxn2RKVFCetft//r9af7MFQSpjte0eV0+hqQ52j 2g3bc3/y1+8kJc3tYpgCZxux21VYsZj0vT541KRSl+FjMsUPskJLeigSFp6FOSZcW1oa1j3qL+z BVCiNiulrnBX3VFeqaJn58SpEGwOqf2BrMdWZV9PHED5pabLdgjPiHMxrLbYNtcIv8jhFIWPa/N QAG+rY6A3IEA50SwbK50CrqdRMYjoNf7UKEXFNY4/J6wBcFwbWb+fe1Fc65jVSuXHThP6x2788y m+qYcxSBkS0/gJdN5/64m9IR3l74xI= X-Received: by 2002:a05:600c:4685:b0:48e:5d91:cfe3 with SMTP id 5b1f17b1804b1-48fe5fd494dmr46671105e9.1.1778842193358; Fri, 15 May 2026 03:49:53 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/23] target/arm: Extract IDAU interface to its own unit Date: Fri, 15 May 2026 11:49:27 +0100 Message-ID: <20260515104945.4145203-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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: 1778842294914158500 From: Philippe Mathieu-Daud=C3=A9 Move IDAU TypeInfo structure to its own source file and build it once as common ARM object. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Message-id: 20260507134709.70507-3-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/arm/armv7m.c | 2 +- include/hw/arm/armv7m.h | 2 +- include/hw/misc/tz-msc.h | 2 +- target/arm/cpu.c | 2 +- target/arm/ptw.c | 2 +- target/arm/tcg/cpu32.c | 8 -------- target/arm/tcg/idau.c | 20 ++++++++++++++++++++ target/arm/{ =3D> tcg}/idau.h | 0 target/arm/tcg/meson.build | 1 + 9 files changed, 26 insertions(+), 13 deletions(-) create mode 100644 target/arm/tcg/idau.c rename target/arm/{ =3D> tcg}/idau.h (100%) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index a29eab6c91..68a1cbd631 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -20,7 +20,7 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "qemu/log.h" -#include "target/arm/idau.h" +#include "target/arm/tcg/idau.h" #include "target/arm/cpu.h" #include "target/arm/cpu-features.h" #include "target/arm/cpu-qom.h" diff --git a/include/hw/arm/armv7m.h b/include/hw/arm/armv7m.h index 98ad08db03..70555962bb 100644 --- a/include/hw/arm/armv7m.h +++ b/include/hw/arm/armv7m.h @@ -13,7 +13,7 @@ #include "hw/core/sysbus.h" #include "hw/intc/armv7m_nvic.h" #include "hw/misc/armv7m_ras.h" -#include "target/arm/idau.h" +#include "target/arm/tcg/idau.h" #include "qom/object.h" #include "hw/core/clock.h" =20 diff --git a/include/hw/misc/tz-msc.h b/include/hw/misc/tz-msc.h index 07112d8caa..6cf4c6b09e 100644 --- a/include/hw/misc/tz-msc.h +++ b/include/hw/misc/tz-msc.h @@ -51,7 +51,7 @@ #define TZ_MSC_H =20 #include "hw/core/sysbus.h" -#include "target/arm/idau.h" +#include "target/arm/tcg/idau.h" #include "qom/object.h" =20 #define TYPE_TZ_MSC "tz-msc" diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 1462e1f501..c47b70ac69 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -24,7 +24,7 @@ #include "qemu/log.h" #include "exec/page-vary.h" #include "system/whpx.h" -#include "target/arm/idau.h" +#include "target/arm/tcg/idau.h" #include "qemu/module.h" #include "qapi/error.h" #include "cpu.h" diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 8706dd59dd..a4842a4b62 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -17,7 +17,7 @@ #include "cpu.h" #include "internals.h" #include "cpu-features.h" -#include "idau.h" +#include "target/arm/tcg/idau.h" =20 typedef struct S1Translate { /* diff --git a/target/arm/tcg/cpu32.c b/target/arm/tcg/cpu32.c index 2127d456ad..73d21c6cf7 100644 --- a/target/arm/tcg/cpu32.c +++ b/target/arm/tcg/cpu32.c @@ -12,7 +12,6 @@ #include "cpu.h" #include "accel/tcg/cpu-ops.h" #include "internals.h" -#include "target/arm/idau.h" #if !defined(CONFIG_USER_ONLY) #include "hw/core/boards.h" #endif @@ -899,17 +898,10 @@ static const ARMCPUInfo arm_tcg_cpus[] =3D { #endif }; =20 -static const TypeInfo idau_interface_type_info =3D { - .name =3D TYPE_IDAU_INTERFACE, - .parent =3D TYPE_INTERFACE, - .class_size =3D sizeof(IDAUInterfaceClass), -}; - static void arm_tcg_cpu_register_types(void) { size_t i; =20 - type_register_static(&idau_interface_type_info); for (i =3D 0; i < ARRAY_SIZE(arm_tcg_cpus); ++i) { arm_cpu_register(&arm_tcg_cpus[i]); } diff --git a/target/arm/tcg/idau.c b/target/arm/tcg/idau.c new file mode 100644 index 0000000000..57e5c658e9 --- /dev/null +++ b/target/arm/tcg/idau.c @@ -0,0 +1,20 @@ +/* + * QEMU ARM CPU -- interface for the Arm v8M IDAU + * + * Copyright (c) 2018 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "target/arm/tcg/idau.h" + +static const TypeInfo idau_types[] =3D { + { + .name =3D TYPE_IDAU_INTERFACE, + .parent =3D TYPE_INTERFACE, + .class_size =3D sizeof(IDAUInterfaceClass), + } +}; + +DEFINE_TYPES(idau_types) diff --git a/target/arm/idau.h b/target/arm/tcg/idau.h similarity index 100% rename from target/arm/idau.h rename to target/arm/tcg/idau.h diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build index 4fb2c15f7e..1b751d5918 100644 --- a/target/arm/tcg/meson.build +++ b/target/arm/tcg/meson.build @@ -56,6 +56,7 @@ arm_common_ss.add(zlib) arm_common_ss.add(files( 'arith_helper.c', 'crypto_helper.c', + 'idau.c', )) =20 arm_common_system_ss.add( --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842354; cv=none; d=zohomail.com; s=zohoarc; b=JydmLGrKZkSYLFDG788qiJ7zV9MTZEUa8SOmpKLvG2/lDV8V9uF3/HwBXycg7C1uMsSb1PSsYd3VYVVoyx/sE2k36RM32VQyzBMfFkBS5zM8w2o4XBH3TYpJ1Mcp4GBvuEunPbGpCkKV0mmpW1iRclomYSPcM5e49LKsfIVIogs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842354; 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=ftWIhf0gBPz7p9Ru8niB7vMFl8ECdq16DZmRUgYJWoc=; b=b4kWyrtaeOHodYR9p4VLYsJ/ODrAcuEo/1fj2fCgnxcvXhVAphUyV3xRx6JGVYQD8gpKPPycFWIdgbrKYAaq4BoAraoaQO4y3ls115NWYhKgLZWNfKDcdmjEq0WqowCMLHVPAGbz8DI7uNeYcmVxtFaT8uH82Vq9YeSVgg0WqL4= 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 1778842354220535.8464240238911; Fri, 15 May 2026 03:52:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7P-0000iZ-Dz; Fri, 15 May 2026 06:50:11 -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 1wNq7C-0000c2-5v for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:59 -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 1wNq7A-0001E9-0i for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:57 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-488a9033b2cso78789395e9.2 for ; Fri, 15 May 2026 03:49:55 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.49.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842194; x=1779446994; 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; bh=ftWIhf0gBPz7p9Ru8niB7vMFl8ECdq16DZmRUgYJWoc=; b=r6MyF3YKit/duIojXuqnr0hzjS9RSM4yf4zetBg0TGjjzNAmL89tfSPPzaKTEAMiKs zz9Pa+YQuDLdanHpmCsjgbpiPgT/zEAFUH9aVplY4kPbE0IR9xtKN18c9OAt0XRzkMO6 VU7lOcN1mMQu3K/1oI2kfHiXdZSP6bHdLEdZKNfRYAJooCMB8rSeTUhPctx5nEY7ZXPV 0JpXxCKAjCY6ZSRZi811YAxI5vO73dgB8BLuW9SIdx8Jz1RgwXvfWJnqtsQ9/tpeM0FT 3MHv52KLXZPqrczATV5r1mXtXoANg0Sr5Z2wh1EIGUP4ZIRycJvEwbGbbJDgE5rZp7W9 kWdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842194; x=1779446994; 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; bh=ftWIhf0gBPz7p9Ru8niB7vMFl8ECdq16DZmRUgYJWoc=; b=rG7xpK3aLWdzSB5NojERw+DRGJLc83RZ4e3OTmWLjWEE+dxpqAq3cJlYdrcLuWkgoU NhwJu//YhN0SGotbDUpEQPCKgvMb9pi0/dvNg+jj2JrVx9jOymy2Pwxaevg78I2nuZLA uNRqZptNUv+CeW7HiumXQ3iI/V6WKH9Hjbmqdal4PlJkSohmsSqLtuspqyWVhEUt8rOW cTQewL6U6Q+7+bzEfrXVcquSkiA2wKSUWw2wSRd2L7Z6WHGYwLkfepsat+uahz/6bmko W4pdnEkPM0R+o0JwmCivZ+Gck1oCGQFqbEqTwbBDq1iq2SDeiHWs3fmI+e8OCsfHDG9v p6tQ== X-Gm-Message-State: AOJu0Yw9ybkcXZsNHGC5Yggd6soPydoOCWWv+8AfUO7WmdG0zv01PauX BkWazEr9Id9NBCTEGYwJoqYegrPeZqmbfp7E+phnF4v0HQk8vMjTpsRundMnqMVfjgws6dO8XpT Du9as X-Gm-Gg: Acq92OEMB3LkRI86RriFaznQ66knkm++iD7nv7CxyiGhiuW8T2dhbO3dN9bjNtrj6hK DvqzyALgZoqQTTMRBGRXWZgOQZ1BqibyKG1x0h4RdKLvy9OrJ58L0A9C6aWRiJB+/VjkonPAqIa YJ+SEGQLqYh6ZMY42HZcSr7ss9nTcs2pGJjuztq2p/YMxo2vK7nlLQLbziv5GRYcC3JP0CZNW1Z ZfBMAggZlmIUytGEvOC46IKCQmartNFrQSR/zxR+gbnk6sjzPAOalIP6B9ROQRmhpJoaw97C77t +mOGUYCG11CUc/tY22icSzp9vrlmsfRTBjQh664DHLLtbYT5DZnw/3dUh5P8rPOMS4mLu0fpDCb FXg+qycH3xiyMkyKq50D8q9aGUGlzjs0p4xs/mF/Gc1ZqmGHN0GrJtAOoEO+Em2kNUvECCOd3cW 0D42Q6YPFq9tuMC0iEkLXycejfikQHIYDmGZiULrWar2KBgWQ0WqWaznyI9ndoTHxbjAcpcCslG tOItIeF44hNtLIHjnXYZ0TF0WEHOQGV99ofGIst4A== X-Received: by 2002:a05:600c:4f8a:b0:489:ad:7b5b with SMTP id 5b1f17b1804b1-48fe62f8c6bmr48019035e9.24.1778842194398; Fri, 15 May 2026 03:49:54 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/23] target/arm/hvf: Stop pre-allocating cpreg_vmstate arrays Date: Fri, 15 May 2026 11:49:28 +0100 Message-ID: <20260515104945.4145203-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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: 1778842355185158500 From: "Scott J. Goldman" Commit ab2ddc7b66 ("target/arm/machine: Use VMSTATE_VARRAY_INT32_ALLOC for cpreg arrays") moved cpreg_vmstate_indexes / cpreg_vmstate_values to be allocated by VMSTATE_VARRAY_INT32_ALLOC and added an assertion in cpu_pre_load() that they are NULL on entry. The same commit dropped the redundant g_renew()/array_len assignments from the kvm, whpx and helper.c cpu init paths, but the hvf cpu init path still pre-allocates them. The result is that loading a snapshot or migration stream into an HVF guest immediately aborts: ERROR:target/arm/machine.c:1043:cpu_pre_load: assertion failed: (!cpu->cpreg_vmstate_indexes) Drop the leftover cpreg_vmstate_indexes / cpreg_vmstate_values allocations and the cpreg_vmstate_array_len assignment from hvf_arch_init_vcpu(), matching what was already done for the other arm accelerators. Signed-off-by: Scott J. Goldman Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 5a1718f7f9..9312607001 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1412,12 +1412,6 @@ int hvf_arch_init_vcpu(CPUState *cpu) sregs_match_len); arm_cpu->cpreg_values =3D g_renew(uint64_t, arm_cpu->cpreg_values, sregs_match_len); - arm_cpu->cpreg_vmstate_indexes =3D g_renew(uint64_t, - arm_cpu->cpreg_vmstate_indexe= s, - sregs_match_len); - arm_cpu->cpreg_vmstate_values =3D g_renew(uint64_t, - arm_cpu->cpreg_vmstate_values, - sregs_match_len); =20 memset(arm_cpu->cpreg_values, 0, sregs_match_len * sizeof(uint64_t)); =20 @@ -1462,7 +1456,6 @@ int hvf_arch_init_vcpu(CPUState *cpu) } } arm_cpu->cpreg_array_len =3D sregs_cnt; - arm_cpu->cpreg_vmstate_array_len =3D sregs_cnt; =20 /* cpreg tuples must be in strictly ascending order */ qsort(arm_cpu->cpreg_indexes, sregs_cnt, sizeof(uint64_t), compare_u64= ); --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842294; cv=none; d=zohomail.com; s=zohoarc; b=c/7fde1ssEr5PB3OuZwXJyGFnMtUPkYS2RVj4KhHQHO+pv6JKoPWcI73tkDpWOJDlRFvgvVcjKaMhuO2jpug+Cc+8EdByZIOUIvPTsha2H1SlCzqA5+L2xwhmCjqWSDRuhopV2pTFSt7tHQpICADfuLAxPoX4woPHLA5r53qCDg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842294; 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=Y4CnK/qfjf+jShgaVtl00CoGtL7EKPqfSzGBHgGf5sg=; b=nJjIAEFGLu5YKelOjAfET7C0R9dmKpkBSAoMmTtYSLUBp8H6cYbQJtEeShXYvlLsUMVPtSj1X6PeMzb3kZPAuJan0Bh3w3RkKtoSMWA8a/Pe1AloWsaOliio/BUocNGmsU1RmaIZ1XV2Ogj9i/dlpxwUrZyTsXxHTyxSzWWQCjU= 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 17788422940578.740107671263445; Fri, 15 May 2026 03:51:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7L-0000em-NC; Fri, 15 May 2026 06:50:07 -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 1wNq7C-0000c4-TW for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:59 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7B-0001EN-C9 for qemu-devel@nongnu.org; Fri, 15 May 2026 06:49:58 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4891b0786beso58665475e9.1 for ; Fri, 15 May 2026 03:49:56 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.49.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842195; x=1779446995; 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; bh=Y4CnK/qfjf+jShgaVtl00CoGtL7EKPqfSzGBHgGf5sg=; b=p+GU+96HHNlBxCQSCOdZX0P5GD06Oiu3w1mB7F+hGCZxa7UyAI7qK3gLztmKS/VfKk 86A1LDvoJfMTG7ramyBT8ZMCBePkCecc1zDMLSD+AFw4bDQT3CvbsIWrJgyT+4Vu3sfj 3LkYqFHdUs4tdwSzCfjxDLg+XxW946mEAWELqWpqSUUSsI2W6i8/vNEs/3N5rb+9/MW8 +tgxZVB+wziCzIlz5Y0OpbLUFaKtHghYDYY1GVog50JsteWX5NJwdTTMtP63M2HKmkl7 5Ikhi3gJ2bZqSYpDtMPHGxfAoMmVvr6+1r0Hp/wvYqoP3QcCpv8edgIVon34c74dkgLG LJsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842195; x=1779446995; 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; bh=Y4CnK/qfjf+jShgaVtl00CoGtL7EKPqfSzGBHgGf5sg=; b=jLSrU6AR0tZ2/DUTILKO1IUE57CL85bhn+HjvIAG1IyNJx+uP/9cFjP1LUAuNN+ZpJ hRIDHeCJzi/QjEJHiv/sb+p6xP3VojFTFjdMdxiVdRRKT7P9YQBxBDF7r6HQlFbtrr2d hQ7z4Vo0ZQBY6dO3I0ij7b2fa/I6HYhucmrGUFhUDfj9yx0lvY1CWzkLskWPC0NEFtm6 ddX0md8QBuUtnpx2wIjgC30CRjelVdozmbV+JQg77Hy3FWRTT2Nyvt8OZ3Oi9P6wqQ/x W++v9Y+kZ+kbrtll4FAZ09ayIfGb7Bd7D2ujqDhu/xR6ZZUInk0iiElVWHB+RyADmmXT 3/DA== X-Gm-Message-State: AOJu0YwjCDe/ajjhvLFfUqrYDiGyaZUMSFFwY3y9t3vrucsZ8Eb/yLal Buv43FXtpdpzo7Z8Ib4ntj4ymtSYFspsbpQI6HHavahaysGL+s2vTSgWLUwWC4UNxVr4Kfo166w MXqEN X-Gm-Gg: Acq92OHQYzJ9m110F76HGSLwkeRdkMUv9qcvgvnTri3GMb24HyqL6EvyfY86PVs5n+N fwKuJEN/MlVjpmS4ap3GpaV1K+q72+mf42twvUCmHXT5B+ZHotao8la1tNWLGypfLnRLv1w2sJT UpIHT3Zop3vdQeCy3AYfIXaIjnLYb9R+hM+cLkIj1EJ7M6T04y/E+6B3DQrIOxNVYhCSR3svP6T aJK4WjCOF/r+Wb+aJGvi25b3zYDNlIni7I/Am9cZA2syMn+GjJakum3P/CXsuy2SBQ8Ck6Sfvzv 1u1Q52RxBeqGplTR11vF6CVofVx9VWKVKFiNGAOnDGh71RA7Fb7Dnby/XQexyT5nCipMyoh6bka RaZKcm+YZzw8UWX+nglELJ0miSlLEpek6M46VETQSWr58qfPlJSIgJFn3Z4KJPgDKkAQB0XFg2t TMDCtUBod0H4y8QQT7uP9RkIy49aGg/qJIr6vUyiHfnpoZfPSYcxtH2IX3docyGcRog5XYNv98z 9X+I6HZz20cd1eoa/I/PVIMEkZ5m71TNS0PbFpjqg== X-Received: by 2002:a05:600c:a417:b0:488:a882:c7 with SMTP id 5b1f17b1804b1-48fe65168a7mr40065315e9.25.1778842195620; Fri, 15 May 2026 03:49:55 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/23] target/arm: GICv5 cpuif: Fix overflow in left shift Date: Fri, 15 May 2026 11:49:29 +0100 Message-ID: <20260515104945.4145203-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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: 1778842294843158500 Coverity points out that we forgot the "ULL" suffix when shifting 1 right by a bitcount in various places, so for bit counts above 31 we end up shifting off the end of the word. Fix the three problems Coverity noticed and one more of the same kind that it didn't. CID: 1659588, 1659591, 1659559 Fixes: ce245ac6957 ("target/arm: GICv5 cpuif: Calculate the highest priorit= y PPI") Fixes: 3f79212abae ("target/arm: GICv5 cpuif: Implement GICR CDIA command") Fixes: 49f4c98648c ("target/arm: GICv5 cpuif: Implement GIC CDDI") Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260512093856.3197700-2-peter.maydell@linaro.org --- target/arm/tcg/gicv5-cpuif.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/tcg/gicv5-cpuif.c b/target/arm/tcg/gicv5-cpuif.c index bc44a7fc11..98238ada19 100644 --- a/target/arm/tcg/gicv5-cpuif.c +++ b/target/arm/tcg/gicv5-cpuif.c @@ -275,7 +275,7 @@ static void gic_recalc_ppi_hppi(CPUARMState *env) int ppi; int bit =3D ctz64(en_pend_nact); =20 - en_pend_nact &=3D ~(1 << bit); + en_pend_nact &=3D ~(1ULL << bit); =20 ppi =3D i * 64 + bit; prio =3D extract64(env->gicv5_cpuif.ppi_priority[ppi / 8], @@ -631,7 +631,7 @@ static uint64_t gicr_cdia_read(CPUARMState *env, const = ARMCPRegInfo *ri) * gicv5_activate() cause a re-evaluation of HPPIs they use the * right (new) running priority. */ - env->gicv5_cpuif.icc_apr[domain] |=3D (1 << hppi.prio); + env->gicv5_cpuif.icc_apr[domain] |=3D (1ULL << hppi.prio); switch (type) { case GICV5_PPI: { @@ -639,7 +639,7 @@ static uint64_t gicr_cdia_read(CPUARMState *env, const = ARMCPRegInfo *ri) =20 assert(id < GICV5_NUM_PPIS); ppireg =3D id / 64; - ppibit =3D 1 << (id % 64); + ppibit =3D 1ULL << (id % 64); =20 env->gicv5_cpuif.ppi_active[ppireg] |=3D ppibit; if (!(env->gicv5_cpuif.ppi_hm[ppireg] & ppibit)) { @@ -707,7 +707,7 @@ static void gic_cddi_write(CPUARMState *env, const ARMC= PRegInfo *ri, } =20 ppireg =3D id / 64; - ppibit =3D 1 << (id % 64); + ppibit =3D 1ULL << (id % 64); =20 env->gicv5_cpuif.ppi_active[ppireg] &=3D ~ppibit; gic_recalc_ppi_hppi(env); --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842345; cv=none; d=zohomail.com; s=zohoarc; b=D/yaWr0HG6Snum/GlOGf5b/Q5nvRGW5bXlohZM8FasusafZN2aFSs1LQ2L5yjsMHp2i2jehHpgfz8v+ICP7zUVOgSwTGFQ62djMlOFzGKcHwEpDP8tURXKg32Syj+2FoxejI3g0zA6FNJSHw0PKwKcEtPTnm1uQ3lJSvBiaEoHw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842345; 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=Q7ib+7X+yNqrjRobYNQLodZUbFPa/X4O68Oeil12cXE=; b=dtlKozGVYcdOSv5x7gEBzW1gmmz/LHeFv/T5xwwYBXMpFnUl8gmmivvO8n6+uP9+LMOhmzfK6r2uz2esnbden+bG9jBDYe10WhX4nipXaKp6v5qvNg9jFsyeRcOnzo/OePMUvwDVRwZHHOAplac07RUblZybvpZu3DYNsC11D8A= 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 1778842345831600.7148621052445; Fri, 15 May 2026 03:52:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7R-0000kM-Qx; Fri, 15 May 2026 06:50:13 -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 1wNq7E-0000ci-CP for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:01 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7C-0001GC-Ll for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:00 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-488a88aeec9so99961235e9.2 for ; Fri, 15 May 2026 03:49:58 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.49.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842197; x=1779446997; 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; bh=Q7ib+7X+yNqrjRobYNQLodZUbFPa/X4O68Oeil12cXE=; b=wmZ1Ddh9Nm5njAp5rhdxPBfJjZ8eAMlxBWhTEjTFInPYgVi6PP0QACch9nW6oPErKu eTxI0pg0HrYO6Gu5FgAJHRX9tPX8PbQ4dxB1t1siMqWpq0BVIjzDbmOFvCZ0+9YTA+08 VF+CUCIvE5QVWZK3bpaa+1m7lvthOE9n7Fm+7IZcRK/CKeJ4R0rXLcPpwbMW39Tgbh3c HmArYvcF4HGFMkDn5hvsNYgd1fIcaIcOORCeJ7rR2UWqWxFk/TMX+JEpGHL0Z7cetQut afRdiHKhFdMoebKV1V7DX6B8ns2A7JS8hobBm2GbXfCxgO2/LVJLl93FyjLQQwn5UUsS ziRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842197; x=1779446997; 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; bh=Q7ib+7X+yNqrjRobYNQLodZUbFPa/X4O68Oeil12cXE=; b=PoDNLqTmMpfHRxxk7qlVPY16ZEGiAuahDNQOLmWVOv1S3XX5g+SpsJjY0O7k7H63Ug 5FqZ89MqqnlkSw63tQ+WnCrflM0rJjw40lD6/VhJXpdc8aVhbG2sGq0F/Ns4LdLpgT/+ 3Gpo3+sdhEeqV98GHAqm4xIb+9hFfEq52UrtQ+vVNOQ9U9dh5GnTKS5M0RbV+VtzS6Q7 ZyJAPbPAsyY8DNo/FYhwV+W0fRZSKZGLeTSn44mXduCzk7xa1xTDHceV6Wen3ewjQt4r FusBkVw/CJOjpx5AddK9upkbEmzMTyKyVu5WClrMZJ8ka6gYQNwY15bQGzbUCo5T9eFY 66ZQ== X-Gm-Message-State: AOJu0YzPCuDtNeuKOvZU9K4birGXtuX8CtzjnfTdXN/NSIdayvEZryBe mb/3splzx9jVOruwRlInK4c2q5/ED/rC/vlFOffBeF5avXb+AedK95pqALK9WO6kh05GSXhSF01 KDO4h X-Gm-Gg: Acq92OHpaI8FJolVEiToPyVPwovlCU5+sVSyrq+nNDMj/nWVEqg8PgACxbcve7S8PJP hA8lX+lZjtUo+1zd6ppr7xouSppdJWH8is1fJHPqPGGz5mF7Xkh/W1kIcdpUYuq7ByWpo6XmzAE kXtxYlcAvD1W0vespp+XynNjOudkKdhTezc5IQRE8dG1uPTmEHapxvMixEhycJj7r8Fd0gl0+vQ FOTZ6bgJsO737KQimQmvt+nHUxLGD5ZJSdUqJblJSueuv5n/jW8/9O+Q/WweHe4+7+3Jb3nbV7F IXgoY6NudgQH+ONCIqSmv3LJFlfjaueHtNv2QIQIomDg54vF1p7gJlgMQwfeX45/C0C0TzaKvpP xw0x2dn6hxLmXElEpdGgMz4ZP4Q6zGDWtN1i+eQfCzcZew9jNvtcSvh1vcfAHYUR/1bCBpcjvfc v1mPGd650/V1a5aAEJskfbnOl5ceDYmg0CZmWy4/51agfrHoHh1B7aY1bh8mKnLxKOw7wU8jUjZ VThKaPWHtd8Zox+WN+wCjGLy99/xXGET/qgb0lmmA== X-Received: by 2002:a05:600c:1f89:b0:48e:526e:101a with SMTP id 5b1f17b1804b1-48fe60e7a13mr47075595e9.12.1778842196693; Fri, 15 May 2026 03:49:56 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/23] target/arm: GICv5 cpuif: Don't set HPPIV bit in GICv5PendingIrq::intid Date: Fri, 15 May 2026 11:49:30 +0100 Message-ID: <20260515104945.4145203-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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: 1778842347163158500 In gic_hppi() we return the current highest priority pending interrupt in a GICv5PendingIrq struct. We try to set up the intid field of that struct to be the form that is used by the ICC_HPPIR register, which has a "valid" bit in bit 33. Unfortunately the GICv5PendingIrq defines the intid field as a uint32_t, so Coverity points out that the bit doesn't actually fit. Move the handling of the valid bit to the callsite, and make this function report "no pending interrupt" with GICv5PendingIrq::prio =3D=3D PRIO_IDLE, consistently with how we use this struct in other places. CID: 1659594 Fixes: 9edad4ff3 ("target/arm: GICv5 cpuif: Implement ICC_HPPIR_EL1") Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260512093856.3197700-3-peter.maydell@linaro.org --- include/hw/intc/arm_gicv5_types.h | 2 ++ target/arm/tcg/gicv5-cpuif.c | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/hw/intc/arm_gicv5_types.h b/include/hw/intc/arm_gicv5_= types.h index eaed42f49f..de4f78a149 100644 --- a/include/hw/intc/arm_gicv5_types.h +++ b/include/hw/intc/arm_gicv5_types.h @@ -97,6 +97,8 @@ typedef enum GICv5TriggerMode { * * In this struct the intid includes the interrupt type in bits * [31:29] (i.e. it is in the form defined by R_TJPHS). + * + * "No pending interrupt" is represented by @prio =3D=3D PRIO_IDLE. */ typedef struct GICv5PendingIrq { uint32_t intid; diff --git a/target/arm/tcg/gicv5-cpuif.c b/target/arm/tcg/gicv5-cpuif.c index 98238ada19..dd2f696511 100644 --- a/target/arm/tcg/gicv5-cpuif.c +++ b/target/arm/tcg/gicv5-cpuif.c @@ -129,10 +129,9 @@ static GICv5PendingIrq gic_hppi(CPUARMState *env, GICv= 5Domain domain) { /* * Return the current highest priority pending interrupt for the - * specified domain, if it has sufficient priority to preempt. The - * intid field of the return value will be in the format of the - * ICC_HPPIR register (and will be zero if and only if there is no - * interrupt that can preempt). + * specified domain, if it has sufficient priority to preempt. + * If there is no interrupt that can preempt we signal this by + * returning a struct with prio =3D=3D PRIO_IDLE. */ =20 GICv5Common *gic =3D gicv5_get_gic(env); @@ -166,7 +165,6 @@ static GICv5PendingIrq gic_hppi(CPUARMState *env, GICv5= Domain domain) best.prio >=3D gic_running_prio(env, domain)) { return (GICv5PendingIrq) { .intid =3D 0, .prio =3D PRIO_IDLE }; } - best.intid |=3D R_ICC_HPPIR_EL1_HPPIV_MASK; return best; } =20 @@ -575,7 +573,12 @@ static uint64_t gic_icc_hppir_el1_read(CPUARMState *en= v, const ARMCPRegInfo *ri) { GICv5Domain domain =3D gicv5_logical_domain(env); GICv5PendingIrq hppi =3D gic_hppi(env, domain); - return hppi.intid; + + if (hppi.prio =3D=3D PRIO_IDLE) { + /* No valid interrupt */ + return 0; + } + return hppi.intid | R_ICC_HPPIR_EL1_HPPIV_MASK; } =20 static bool gic_hppi_is_nmi(CPUARMState *env, GICv5PendingIrq hppi, @@ -602,13 +605,12 @@ static uint64_t gicr_cdia_read(CPUARMState *env, cons= t ARMCPRegInfo *ri) =20 bool cdnmia =3D ri->opc2 =3D=3D 1; =20 - if (!hppi.intid) { + if (hppi.prio =3D=3D PRIO_IDLE) { /* No interrupt available to acknowledge */ trace_gicv5_gicr_cdia_fail(domain, "no available interrupt to acknowledge"= ); return 0; } - assert(hppi.prio !=3D PRIO_IDLE); =20 if (gic_hppi_is_nmi(env, hppi, domain) !=3D cdnmia) { /* GICR CDIA only acknowledges non-NMI; GICR CDNMIA only NMI */ --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842248; cv=none; d=zohomail.com; s=zohoarc; b=mKtD7AeGUcYxhw5OmhFITEBQcuPX2YeiilTvlXFSid3rt0Vsp/L57P72fCNSZKmgC+MBG5iOMowxnP0U4p9pU0j5LuNC6GfUTtjr+6eEJGPlk8cvrMH1//XAdxH/68nxoLH/VaABo77lschX4b369fy3P+xIV0FLRechOCIhKFY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842248; 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=HIg4fufyA27oyV+iWJOXXBAtZGXMl6lrHdN7+OMOMDI=; b=T21uKNIqbxdKsahWF1UVDqftAqWfqjERo8RAg3/B733XkDa2I4R30zYVpTR4AGf77AZrHEPRKn6oy7uRUmLrqpm7YrAVAfCdO90En1JIAmntRrBAjfBvZFI4VxF2bW0AYonYcJsHznIBPhU2qmMyUoIGpIrYRF0qaLudPbDAONY= 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 1778842248533155.20076911299577; Fri, 15 May 2026 03:50:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7T-0000le-UP; Fri, 15 May 2026 06:50:16 -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 1wNq7F-0000dE-TD for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:04 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7E-0001IU-9a for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:01 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-488af96f6b2so106123495e9.0 for ; Fri, 15 May 2026 03:49:59 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.49.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842198; x=1779446998; 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; bh=HIg4fufyA27oyV+iWJOXXBAtZGXMl6lrHdN7+OMOMDI=; b=Z/Xm6qGAUaa8P29E4sXBKflpk9ZVYVIXOGKquJ0v9cyrtfy5biPnP31A+js4YKlUv7 CeVIJdGx5HVmSxTSDaKnK1IDQ73qcXI3Hz8kHo+G3FmoTIuew3CBEzZiy2/LQbQu0qNw pzdQxLE7raIvXzkNnOVBjS4BDgUNWmtUvEbG2eCbwN09i+sJkoXu92AvaRAH1Z8S/gk6 Y4+L8eIPJ4L4xNPK90B8OvYOgWuaOSJUqhl/Kk9qZfOM8oxfsMJZTTmwoty6CsGd1ZD5 SgeM4KipF+jUuBJF4y5myhKhc56jMPedCtPpjPVX4KK7NpSrKHAFQ+Am2HQ2CoOO0zdc sg+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842198; x=1779446998; 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; bh=HIg4fufyA27oyV+iWJOXXBAtZGXMl6lrHdN7+OMOMDI=; b=SKEPIVnwovw4GIeUcKAfOIn45jmm3elGPgikd5HKBJtea2SMJMJs1UjyxuxWhtI+GT AXlyoI6Uhg+slTXrOviBylUcHhpRydlhPp1PF4fJM2S0lYVYSmiPoiEdVfEszAV2rDzv MSO9obNh+lH5m2rQ29XaxJrCKyMwvkWBob1+0H8qr2r5YHZx6LPxhYgUOWpFVOddZUnX 0wXouW56TeRbQZpJAoCTY+LrNbyn7LvoetFTtZtryCyHPHZSUM7UM7Rc2pyayYZPMDW0 wR1REbC3xX1jW6EteYHvItQr3bCq0bHOvQTIeOrI7yPTZwW3Acdpww7Ye10e2kqmtaEL y+Ng== X-Gm-Message-State: AOJu0YwEKqFsgMGS2sdqji+z2rclms1ttFGQhsxc1OEOIL+aVWqyWjgW MHxvosYpUCC5tZ4cNgWAaB5coth7DQ3v/+Y6a3AQC1JoO587pCTppjEx4+OZqLgSiFgmD0aJ8wc j4CwR X-Gm-Gg: Acq92OGD32Km1MnHRTzbijxH4mYsD/Jz5FcGilr2VbN+rFiu9Qhr0v8YeB3kRDG3Osu rGY5x27iG3H91g9WBndsWgukR3ecchs5tmiud45DJahJX8uKqxLEs+rbk8tHJTPO/jV1u7xdtr7 L5lI/+3hJqlDBJ/SkiZVTkausTU1nZ/bUR8VwoZhM1arWikTxDOAO5kdcgSue+8PeFw4mBzgpQ+ eskFEu52pUkhUEVYkhhNBbu/lXY/MpDXLtsUpgToDcQg7MkZUj1HDM10uIshMsIVUuSYPLA19j/ MhspMOw6QtT1XubwiPM043Mx1pIH2mGkKQPqDtz27+neZtKDHF7v+ABFbvOR0aJyqzRoTR47HXc DLNTlV9i2hvqxGEIcqKCg6iTbmt1AY9oQgrmHT27UL2j9vL0IsGy87oMFVG6zW3DPlP2BnGNlVC +MYpeXEyjYL86dUVk7xSK9+tbYYpCEpbap216gW3t7U5PLUlLUD7WCNzIIOc/QRUJkYvBD0CHUS Bo5onGLkpZttewvo+uByd6xZ6T+H9c= X-Received: by 2002:a05:600c:3506:b0:485:40db:d40c with SMTP id 5b1f17b1804b1-48fe60e13d1mr47269685e9.3.1778842198441; Fri, 15 May 2026 03:49:58 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/23] hw/intc/arm_gicv5: Avoid NULL dereference in trace line Date: Fri, 15 May 2026 11:49:31 +0100 Message-ID: <20260515104945.4145203-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.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: 1778842251344158500 In the handling of writes to the IRS_SPI_RESAMPLER register, we call a trace function, passing it information about the SPI being resampled. However, spi could be NULL if the guest tried to resample a nonexistent SPI or one configured for a different domain. Move the trace statement inside the "if (spi)" block, as it's only interesting trace if we actually did a resample and potentially changed the state of the SPI. CID: 1959593 Fixes: 33185e1d64e ("hw/intc/arm_gicv5: Update SPI state for CLEAR/SET even= ts") Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260512093856.3197700-4-peter.maydell@linaro.org --- hw/intc/arm_gicv5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/arm_gicv5.c b/hw/intc/arm_gicv5.c index 493d664625..7ad274e369 100644 --- a/hw/intc/arm_gicv5.c +++ b/hw/intc/arm_gicv5.c @@ -1643,8 +1643,8 @@ static bool config_writel(GICv5 *s, GICv5Domain domai= n, hwaddr offset, if (spi) { spi_sample(spi); irs_recalc_hppi(s, spi->domain, spi->iaffid); + trace_gicv5_spi_state(id, spi->level, spi->pending, spi->activ= e); } - trace_gicv5_spi_state(id, spi->level, spi->pending, spi->active); return true; } case A_IRS_CR0: --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842289; cv=none; d=zohomail.com; s=zohoarc; b=IQIWXJKzYguw45VwGpBNqR5KkjcYl3Waisq6sWB0j5DPnqEgFPFVML1A9TOe/oktmMQYsmlH2F8coW22wGCMfPT7HteWfjhMDge9xlPOdCzESSmBhCf1EjsDf4qwlBCS0dHN5l32hA2xVwzUZG7Q3JNPE+Id3mhL8vzRHtyXy8A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842289; 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=pRpRlYgzY5PaMz7MYuHPjzjxRVlI8PpTq6mbSsEg35o=; b=lUt1kuphAB99Hj7d+AQpnmCudnHIFUBlEdQlVMYcH0mFj02HRlIHL5gtdKL/XkRywE7qWug9oynEgKBEG8t7BuVyKaiTD7X/sJ+g4ZDh0Oib5K3qjrwyHmINlHBPYS93UAZ8u1FxGRbddIWFEK9SY9VWGkHM5NiE6RUqdP3eB08= 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 177884228947919.54032444862412; Fri, 15 May 2026 03:51:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7O-0000iM-Pe; Fri, 15 May 2026 06:50: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 1wNq7H-0000dP-Gl for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:04 -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 1wNq7F-0001JR-Ld for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:03 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-48896199cbaso77823275e9.1 for ; Fri, 15 May 2026 03:50:01 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.49.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:49:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842200; x=1779447000; 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; bh=pRpRlYgzY5PaMz7MYuHPjzjxRVlI8PpTq6mbSsEg35o=; b=n2TamNHEAI+G1N8UNLCquU7X/WU6+b3KUM/jwOMeH1YaEwspzvXl5oxY7tL8UtDGOf +VjKioeBR8si2rqlnabucp5+fC0azL0TUaW8VaPDiVxh81OcWsY9lJuNpeaFwFzLKYSx nSOcPDbut2u08l6ZprnsiIg0fKWxrjMmhejkXz4qARY32emWeqYp/lHyieDrtlzFVSGg qnkNA924qsqb5OPRg3mNN7awsFYzG5QazH+1KCotl1GjTxJ8seuHhb1jYae6JtdPRTQw yfJx1pa/KzxyDgudfctppMeopjo4HqoMoMd8N8qaSifIbTnfCPSp7GJ1UWW8AxQB+WPA QBMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842200; x=1779447000; 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; bh=pRpRlYgzY5PaMz7MYuHPjzjxRVlI8PpTq6mbSsEg35o=; b=arh2WlnpQf/QZh9F/1uF0EfAORrimD6L3+knx5z6/DpwRn5qhxA5woEhzFmpTQVUnH 2+olsPYD0n8XRrhMeVe4ZjKyBK8hjEqMfx+z5RyA/ULRMnpx8doJ5T2MAs3+0LpiOn+E aOlsykKuyB8l1vSP9KHGU1qv+iDyAdET67L7DTnpWW1eVkZKnJaSVjtTO/F/sqSVpkT0 Ya5PciUdBPX1Yjm83HZvwTneYQ5sYiBjEgF3CMfayfcCIUH06QBiwuQpparONspkxxxE DE9jCHoVk5p9gyMlU28FbX4RewEpDZYhpKzFDuFMKEMAWPU+Ygund1Vo9PvTM9755z3I 3VRQ== X-Gm-Message-State: AOJu0Yyrcezb4yGaJjDqmlekjcPno7GOKdSjW7rbCgOnsSQuCowQBhqo yqftq4H0tTfQO87nWl9mzYhTERBe64qrrJVBO5C+AzdQCokXRKutpgyT0VGnclq2aSHl8f9QnZ6 EZNwM X-Gm-Gg: Acq92OGzRfVViUmkjsQzkjnQkzhW+LCTvW58I5XTdurJgZ34M8oCQNKZVam3eH0DK5T vqndYTPGHvcSg5J17Pl60eTnXEIdH4z0CLOeEE+rqGttCQnooDKSqxb8WPq3sb3nxTVlDGan9HO S6/soIJalgeX076mEhlhRq1ZgcK1WjZB5tm9ZiXm67jcrShxE0XYxBs9too8oHtw1TYLNillchi n2arj4ASprhCK9NOHSDc4d3yeU7wdCLNFdUOT4ROQZwRcJtwhsVdGnNUkOAQeD0jI96tdK49ExZ BsUYmtTB/ETlCv7pr4YNBUnWUiQwl9DqUyX5YAvTzDJ3Zrs9IUzVzofahMJ6zVh6Fhf2X/v4Y6J na87WuE2j41KgdmdbIAkh3GqJ3KpslI5hA2FA7TRMxF5oI2Ycg+gX4U0mdnvqjXYyo4NhNB28jv ORXzgJMNJ64mSL1SHlY6dHRDxov/YSVQ1WrlfV23hS8D4is6Y8Z/Td2rDrCpdYg7vZ/ctnr3o8Q X4l45UYOcFXRxv69EtzOTmqhktvwsg= X-Received: by 2002:a05:600c:3b07:b0:489:1a3a:9e45 with SMTP id 5b1f17b1804b1-48fe651e127mr47027885e9.26.1778842199987; Fri, 15 May 2026 03:49:59 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/23] hw/intc/arm_gicv5: Add missing early return in gicv5_set_handling() Date: Fri, 15 May 2026 11:49:32 +0100 Message-ID: <20260515104945.4145203-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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: 1778842290838158500 In gicv5_set_handling(), if the guest tried to set the handling mode on a nonexistent SPI then we print a GUEST_ERROR log message. However, we forgot to then return, so execution continues into a NULL pointer dereference. Add the missing "return", bringing the code structure in to line with the equivalent parts in other functions like gicv5_set_pending() and gicv5_set_target(). CID: 1659596 Fixes: 5beb48ab53d ("hw/intc/arm_gicv5: Make gicv5_set_* update SPI state") Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260512093856.3197700-5-peter.maydell@linaro.org --- hw/intc/arm_gicv5.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/intc/arm_gicv5.c b/hw/intc/arm_gicv5.c index 7ad274e369..6b1dd04991 100644 --- a/hw/intc/arm_gicv5.c +++ b/hw/intc/arm_gicv5.c @@ -926,6 +926,7 @@ void gicv5_set_handling(GICv5Common *cs, uint32_t id, if (!spi) { qemu_log_mask(LOG_GUEST_ERROR, "gicv5_set_handling: tried to s= et " "priority of unreachable SPI %d\n", id); + return; } =20 spi->hm =3D handling; --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842334; cv=none; d=zohomail.com; s=zohoarc; b=bj/zmXhFiagkbjSSGdoSGNwgjmMCWPjbHqbmbGMbu4pLLT/ZRrq0SqDZ1YUIdrb7jZfGyEG2djxqeV9zg2ilXCLDn9Pk0OKEeWNCnxY7oM4BEEW2FmnsFxDLj0q6a0iHJYf1zCktVgVBVoSOOfz2FulGWZ28L+jL3RhJRRJ160w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842334; 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=uxh/ZJnTbJ/i9iznqwLY5pYbQutcRELBEauh7GY382E=; b=gnBdRxyrG2KI1CYxj69SrdjhUDEjhgDDhowGYtph8csmyFQOtQvrjYh9gO4BY2FcXth5vofDr+M/h/S6nvpe8ZX8SqAiEUek2pl7ZqRnPI8Swl25/CePGKynu4D9nr3IaY2agY7ODNxkWvRuV/WMiWbyE8Bn/+KoFiJNLH/oTWY= 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 1778842334521948.3501855089879; Fri, 15 May 2026 03:52:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7P-0000in-Ub; Fri, 15 May 2026 06:50:11 -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 1wNq7I-0000dT-Jj for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:05 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7G-0001Mp-NE for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:04 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-488ad135063so74859125e9.0 for ; Fri, 15 May 2026 03:50:02 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842201; x=1779447001; 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; bh=uxh/ZJnTbJ/i9iznqwLY5pYbQutcRELBEauh7GY382E=; b=ufFNGzDBWMRomL/wHOF42/zaF8do/kDAPc9kU84fOwIBPkppDKVMTjKuPSd6bf/M8c 1LLmUkzLwQjYCWkjWGS6XB9OT0r1uIjb9V8tmzMeNKSQxOxCeiGGrk/pLX3aijcAhnTv Pb56la0ekXoOn2ckpx15EN2CYJD7nNUO9FlHaxg2IuUezpwAno2PGzkIBJl/wTVDhYe5 qbnrEiD98TyyMgTI2QFznApq4+zUuZk4FTv39Ywg0pgfWSj6e4HrqoZ0OpWstGnkP7xQ 7wv3EopUTFjcy/xCSvN2R3tIZKHtVBtVXBSSpYzgpIGAJmuvfaK0YfalcSZPRqTf5aBZ WVTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842201; x=1779447001; 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; bh=uxh/ZJnTbJ/i9iznqwLY5pYbQutcRELBEauh7GY382E=; b=J69HV0+8Ep2Y/fCweGcs7qW5falPtBudzYzZ0p7OyygbQvbwOxwM9ivk2gV9cRPxDK d2hIUT741Bz053PFlIw3HdRKe+Yts3UtpqZCAT9Pzft31aa9YGtiKtD/hb43FbP5VqXp 50SCN3nzxpg5sCGHgeslKC3LvzYI/lVbGs7voMWZ+CiA3/PTphxcPvE5iMzoKtrNLGu8 vjaxCGqmXAlf+FzJJnHan79DVcZKY9xZ5A8gTWwjccSeQry/bP4q6tJrkMw3Rxt3dGtk 2qSyzBIu2HPcSzJ8UqLR0KXDxZ1512qqPl6VNsZfw6di3EF2Axkiu+2MP7eg77TEfg0D W1Yw== X-Gm-Message-State: AOJu0YwBbA/SUTlrLjVId7wm9jw/GayR1yBPIcBROybYduutEmujP5z1 Z+53ZW7H98KZb5HBDVoVUcZaJ+Ww4g2x1GoNNnFasNEkjBFnr1DwntZc9V/Y2IdptRZJWkDd4Vc 8GOtH X-Gm-Gg: Acq92OGF4AVZF5IWCuS8XoR0TNPcUbPDpdgw9KqHPkW4zO9YOi3B0Db8BzvuWeP3Tzz BWlWGU3yCViectgx+Kayt+c7id5mAShpMvXU0+8egFchJIrt58MQbAhs3ClRemLkS3/cel5MpfL s1ycJueeFrzOxKDdEaHQeThIUueTQPPSAAo2YeSuZaFPHZZvOpaAV3mJXNx/33Nmmc1JG3Co40u ycM8qv09MgX1xGCxDCMDqHGs6ljfOwMqdzTHgiNiCQeUK98njPz44b9s2KN+tcuEqd57JGqLSRB 2lz2wzWOSKjDsCGSajPTq8SeNHvyhrhjGNwJs1+YYxnUoeFXpgNqzfkGEQEvzNE8vksVWgHZvZH mphBsq6SYAUN0Bnor55faVmYfEYzDBcL50+Bn6fwvmDx8uQ7ra1FXTbtQIqyVMOuXDkRemYKwrP QHzKqlol4gpdfd0uZ17poolHp3uGKarPBDcrezK+PAeLURxQ+QO0jJ6Nv10wi2QuwmHtuyfliST 94WZ1ot9RSH8HOdRqixvRmFApnkl20= X-Received: by 2002:a05:600c:848c:b0:48a:52d4:888c with SMTP id 5b1f17b1804b1-48fe60e5241mr47572305e9.3.1778842201060; Fri, 15 May 2026 03:50:01 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/23] meson.build: Add -fzero-init-padding-bits=all Date: Fri, 15 May 2026 11:49:33 +0100 Message-ID: <20260515104945.4145203-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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: 1778842335276158500 The C standard doesn't always guarantee that struct and union padding bits are zero initialized, even if the code initializes a struct. For QEMU, this is potentially problematic, because we often have structs that match data structures in guest memory, where we initialize them and then bulk copy them into the guest. If the compiler didn't zero init the whole of the memory containing the struct, we could potentially leak random data from the host into the guest via the padding bytes. We already use -ftrivial-auto-var-init=3Dzero, which will zero out padding in many of these cases, but -fzero-init-padding-bits=3Dall closes some gaps, for example cases where we initialize a variable with a struct initializer, and cases involving unions. Follow the Linux kernel in using both options. Compare kernel commit dce4aab8441 ("kbuild: Use -fzero-init-padding-bits=3Dall"). This option exists in gcc-15 and above; it's not supported by clang, but clang documents that it guarantees zero init of these cases always: https://clang.llvm.org/docs/LanguageExtensions.html#union-and-aggregate-ini= tialization-in-c Older gcc which don't have the option behave as if it were set. (These options are passed through the cc.get_supported_arguments() filter, so we don't need to do anything extra to avoid passing it to a compiler that doesn't recognize it.) Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-id: 20260508104723.2144051-1-peter.maydell@linaro.org --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index 90c149b10d..37060c030e 100644 --- a/meson.build +++ b/meson.build @@ -684,6 +684,12 @@ hardening_flags =3D [ # it harder to take advantage of uninitialized stack # data to drive exploits '-ftrivial-auto-var-init=3Dzero', + # Ensure GCC zero-initializes padding bits and trailing fields in + # unions. This avoids potentially leaking host data into the guest + # when we init a struct and copy it into guest memory. GCC prior + # to GCC 15 and clang don't have this, but they zero the padding + # and trailing portions of a union by default. + '-fzero-init-padding-bits=3Dall', ] =20 # Zero out registers used during a function call --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842285; cv=none; d=zohomail.com; s=zohoarc; b=FnOul/PQxbuTgI94ucmg42Vb5BBIvAXdMCVLK4VQLoxRTMSDFEezU+Lkp4Bd4g6tpvmoY8KH9G1D5lB6qxrgO1u/lUY46ibMPGzP+E8478NK4/f4e/YU4cU9djS9sD4uHiKTvpOMb1MGtFOl8Zx6BfGiEm+lSVbx6gCyUMRqKpo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842285; 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=lJdPzsovc1RF2E9JSUPkyz3oR5KshsBgZgAJ5TQAw8I=; b=bg6RfQCScWrvY9ZpcKYiQt39zPFFxCwO/W6TTQOShAAGzslj48Aoctr+IWqjxfWRTcf7oIkxpNKml4RQM4nvSIXYj32onadGAHdY4aPDecZiYMUDSREj8DLv9xSEg7KNuAxjVHK1Nun7E7/T4MJzpBeH0/6p34SK+GltMYhbWPw= 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 1778842285609169.92273400607814; Fri, 15 May 2026 03:51:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7T-0000lB-3D; Fri, 15 May 2026 06:50:15 -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 1wNq7J-0000dc-8p for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:06 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7H-0001Qb-GX for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:04 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4891e5b9c1fso81019875e9.2 for ; Fri, 15 May 2026 03:50:03 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842202; x=1779447002; 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; bh=lJdPzsovc1RF2E9JSUPkyz3oR5KshsBgZgAJ5TQAw8I=; b=QAlRk8Mq5nNxw2kFh8jBHX0/hMWJHVVUHUn25W6grqTqwoJwayA08gTOiCTcsgNUMp d5OKlN3P1uQlClcyCIlr+kZN1lJGNc95tcO3r9a1O4uAU6xsuypQHkANKLt1TdkAewaq zvpxEEC2AJpRRMwuxa2D4H0J+dCxNHv38Vclmjee8qZ2r7Lc4acQIuLbVoFah+fyUkn2 r3+bb3Kf88jtaKBx59OwF87RU1C5XfuQqgRKZr9TWfl4rhYYWHKlw0vic0afTaptV/Sc m6mvRFpfVW8vUXniX/1MjEwpWMY1V0J3UlR0ngzEBCDheLMWLlSEJg/q5gVot704k0SU r43A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842202; x=1779447002; 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; bh=lJdPzsovc1RF2E9JSUPkyz3oR5KshsBgZgAJ5TQAw8I=; b=OMgnSlcXkVmA4kp3UYrJe2UIgZyT9JDe7DeULYBLAJcyZRbhnwM+9dfZn6KkHCzers d1uU0npaSITrd8FsUZgWqfMUpXBQ5S8kfzQSd2PHyJszy8xnotptdUjBQjS1sBF4RbsN v8n3rmsZa43xOqTzcLgDfC6N49TFb3ALal1ft6DFqVX1Mp8WgNrIRITsiGHF77M7yMxL BPyabMVoZT7zcfiNPvg3dDT+Pg+EZJIePq6lXfK8IMWJVgm1tgE4FHge6QNK6vNlT1gQ rfI0mUn+7PAaA3YfaChwmVgAJ+Twg2R5t3Hi8ecPC564srU1H+NofDfMfu9quPwd36Kv jhdQ== X-Gm-Message-State: AOJu0YwiNeHaYuro20MBIoeBjOJL6XtQosM0Od2TTtOlHMO1AywrC8Z6 AnxoCwVUdWLti3R9mO5RsqSrdORrDSW5La9rLWg1Wr2mpIuat4YMQbBeizTq1XrtZaPNjMyT0TX Uc/1r X-Gm-Gg: Acq92OF/tKbb2xjdwBRxKdRH5PQ0Q/cO0c8UUt+/n+gw4TvDOTRoKIeM+V87W8jLonR vICya/ZUbnq/cXChQ/gT8+8srcdhcLZEz6aY/CDbUvNIfrYHy+lVdVMreXhBYiclrVI59JM46Vi RImeXw6z+mUnyxxnKQWfTC+nGU9j2OhkEYSVE1jiWX7NbdIcrNOx+nJiVY6UiMrYNsCERqtgKrA vTQ0KwRjXbPp+2U5/S98jrLdXku6Oj5EkqXNbuC84GvtxpA4+qQYaSAL9HkHh0gY7aKwUdzLyBn Uy17QYQw5t3XYlHkKk+zV8HH0cQ74Jq7U30nFU4FArfXnj6iILWTXx5Azpn8eUHFpxHZaAWVYsb cFPFT9dIs/6yLj+9Hg6Ipi8L9BubVfCzQNScs30STuIyDf6Bkaz+t7ZQmDMSkWbtix7bTAP1Z0G DofQUHVEfzkhZZk/Q58itbedKwzKMVEOhx52UuoHX4iE3MHhXcArs0h7zmrC/5aFRLV6qk9OI7Y ho8jUA5Uk54YNAgaCUnULw/wu3tSG0= X-Received: by 2002:a05:600c:5298:b0:48e:635a:18d2 with SMTP id 5b1f17b1804b1-48fe60e51d1mr46926645e9.2.1778842202057; Fri, 15 May 2026 03:50:02 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 12/23] hw/misc/bcm2835_control.c: Don't assert on local timer zero reload value Date: Fri, 15 May 2026 11:49:34 +0100 Message-ID: <20260515104945.4145203-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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: 1778842286901158500 Content-Type: text/plain; charset="utf-8" The bcm2836 local timer has a basic "counts down, fires at zero, and reloads to programmed value to count down again" functionality, as documented in https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2836/QA7_= rev3.4.pdf The documentation is very sparse and doesn't say what actually happens if the guest programs the reload value to zero. Currently we trip an assert in this case. Instead, log this as a guest error and disable the timer (which seems a reasonable guess -- effectively the timer will stop counting). Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3395 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20260508162013.2751001-2-peter.maydell@linaro.org --- hw/intc/bcm2836_control.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/hw/intc/bcm2836_control.c b/hw/intc/bcm2836_control.c index f1deafaf7a..d6c6057cd2 100644 --- a/hw/intc/bcm2836_control.c +++ b/hw/intc/bcm2836_control.c @@ -197,12 +197,21 @@ static void bcm2836_control_local_timer_set_next(void= *opaque) { BCM2836ControlState *s =3D opaque; uint64_t next_event; + uint64_t reload_value =3D LOCALTIMER_VALUE(s->local_timer_control); =20 - assert(LOCALTIMER_VALUE(s->local_timer_control) > 0); + if (reload_value =3D=3D 0) { + /* + * Spec doesn't say what happens in this case; treat as a + * guest error and stop the timer running. + */ + qemu_log_mask(LOG_GUEST_ERROR, "%s: local timer reload value is 0\= n", + __func__); + timer_del(&s->timer); + return; + } =20 next_event =3D qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + - muldiv64(LOCALTIMER_VALUE(s->local_timer_control), - NANOSECONDS_PER_SECOND, LOCALTIMER_FREQ); + muldiv64(reload_value, NANOSECONDS_PER_SECOND, LOCALTIMER_FREQ); timer_mod(&s->timer, next_event); } =20 --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842291; cv=none; d=zohomail.com; s=zohoarc; b=GU+eUL4SNa3kQaJU9y8eFS6who3NY9ZnvAy9yhqH7DFE+PRppYkmIc+Ax1BOPuVsEfId3E/xzSamsScf/0ArRrvwXtS8AAidPfJ7evvxuF60SiLAsgWVmUUbi6kTkPBMoY1tpJGh6wesCoqvltYWGQP2YHtEtsF8WFmHZ4msxPI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842291; 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=CVNvm1I1sJtyDtBTJOjkPFwhPQX3HHSubyF1ffpDdds=; b=UvUCZps8p0lbOANnEb3ZVIWGWOA0KDGa5VmGuI9JRCGo9WfZpwkSjdndjSQK6MU27cKIbu0iOuZLiUtvMoiijyzNTjflJlpPtYhQzgSQRrm1FGpktzplsXCR1kuy6GE47lpOWZ8dleFtbWqangISZr+bTuhb5byXG9dB+/SV9oI= 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 1778842291578821.9353258109984; Fri, 15 May 2026 03:51:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7S-0000kc-90; Fri, 15 May 2026 06:50:14 -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 1wNq7L-0000fK-TF for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:08 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7I-0001Zk-Sg for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:07 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4891e86fabeso103721935e9.1 for ; Fri, 15 May 2026 03:50:04 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842203; x=1779447003; 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; bh=CVNvm1I1sJtyDtBTJOjkPFwhPQX3HHSubyF1ffpDdds=; b=AUiN1ntLvYAawyZyCraRQ02XGwel66q1K43jcE7rKO40OQ65IqAnYDs0RE/La7dq+A PCMMnXVQyuiJqfJTZbyxoQ9f44f9S4ZHxaTWFAIHfauGH1K1/GPBemEZ9XAEoXpS/j9G 1x2SwvFYQ1vJco/eIrv4Fi56LgPbwLEws7OhQcArT15pDPjD+zjOGmmSgVGzKcALA/M1 A4R1NOjlGeVpC5R7uV127NW81thU1aQLIu6eIJ7P5TXLlMDqOOh4RqdX0sobNVkmasvu e7yLeC+GybalCcdHxKje84pJkos0TNfAj+zVjgUmAXuQViTtw4jAMq1hWwqh0Y8AXUJx nhSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842203; x=1779447003; 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; bh=CVNvm1I1sJtyDtBTJOjkPFwhPQX3HHSubyF1ffpDdds=; b=MAXowtqUo7lRUHKDgkhm2wUSj0ooJbuixdHbVrz1knawOiGOhO4I9h8878taNOpQ4a /vr3uZnZNP6U/ROczxslLX4ihtl2GNUi8oX344jR6BZSjvvj4weygFRHJIVQake/Zsya WCJvH4CLlW9/3d5SLfh7SyHTfGzh3WHXeFbV48ZifMyjvn+Ihp194u34mSJEZP+kaIqJ 5X6CEWa4K30wnTnHv8KX1gz7DxlVqnWO/7ARlFlg5ecxCXIN3803UyKO6aE7ko0x7HAv OqsrXqS4CCIAp2POLlI6lRemk0qIlW+tS2ufyzSGj5KtyCbeLVvBwm0uysl5tP9hUHU9 VyFA== X-Gm-Message-State: AOJu0YyHZxSREFdfB5JL1Ctzc8ZsLJj4iaTcH0SdwgtNiEdIA09QyrdM 6aZqYDmtkwzZ6tq0iUiDP1yhJ9c2StrVwMaox5EbTX2IBS5uVKjsWHquDySftyGTRODk97GPnTy BpR7t X-Gm-Gg: Acq92OHpgq2BBtxa6SwGzDkx7C6vDClJTWvKetBtZttjaTaFniLRDW+/fiTmmuHNGxm zpxFmvtoRy41V61o2zz89u9bi/wa0tC7jlzp1047KkxS1FpBKwOdDJuwl76FyoaAdhOf0vvOPFR tNbbt0Xv67c+9CBJ6JRWYtNlEpX9KPKyzHdnVffYpg89gP/Kl4bXBVKby5OWlqJUEnA7/q6xPA9 LBFKc4YQiukrs1KCEd9gKrnBfR6v0xCKp11eSkoYZd/B1Ic4kjHWqSIwuLlsvGntZREcR5iZTWd BjgLfLJhEyrrpjlGX7GumUB5xqW3CzhPqVi3zL+x660avO71h7604YVeRvcGVgqbNYh5wuBwDTR /NhIukXPZllH/CKyB4EBu3kxao8JjlC54izxxZHI+N4dEp9RgSCzYFXa30DYpqGIy2bQVCX2vaj e/B53Da1kP0beETWComPLCTPhmKgmBgZNtQs14wZamwTJYPSKX3fNRhouzXxz1f2s5hoCrT09Iy omgr1CpNAgw7G/czbgT15S3/YWMQxheSGFHSx9mVTCVFvLobZDs X-Received: by 2002:a05:600c:8b18:b0:48f:de5a:4a6 with SMTP id 5b1f17b1804b1-48fe6515806mr50415185e9.26.1778842203046; Fri, 15 May 2026 03:50:03 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 13/23] hw/arm/integratorcp: Use LOG_UNIMP rather than hw_error() Date: Fri, 15 May 2026 11:49:35 +0100 Message-ID: <20260515104945.4145203-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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: 1778842292834158500 Content-Type: text/plain; charset="utf-8" The integratorcp board has some onboard registers which can be used to raise IRQ and FIQ to the CPU; these outputs are supposed to be ORed together with the main ones from the PIC. We've never implemented this obscure bit of functionality, and instead call hw_error() if the guest does try to raise an interrupt this way. Replace the hw_error() call with the more modern way to note unimplemented QEMU behaviour, a LOG_UNIMP log. Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3406 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20260508162013.2751001-3-peter.maydell@linaro.org --- hw/arm/integratorcp.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index 164af03f7b..c25bbf3c82 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -23,7 +23,6 @@ #include "qemu/log.h" #include "qemu/error-report.h" #include "hw/char/pl011.h" -#include "hw/core/hw-error.h" #include "hw/core/irq.h" #include "hw/sd/sd.h" #include "qom/object.h" @@ -178,10 +177,17 @@ static void integratorcm_set_ctrl(IntegratorCMState *= s, uint32_t value) =20 static void integratorcm_update(IntegratorCMState *s) { - /* ??? The CPU irq/fiq is raised when either the core module or base P= IC - are active. */ - if (s->int_level & (s->irq_enabled | s->fiq_enabled)) - hw_error("Core module interrupt\n"); + /* + * ??? The CPU irq/fiq is raised when either the core module or base P= IC + * are active. To implement this we would need to run these signals + * through an OR gate with the PIC outputs. In practice guests don't + * use this, which is intended for an external debugger. + */ + if (s->int_level & (s->irq_enabled | s->fiq_enabled)) { + qemu_log_mask(LOG_UNIMP, + "%s: raising IRQ/FIQ via core module registers is no= t implemented\n", + __func__); + } } =20 static void integratorcm_write(void *opaque, hwaddr offset, --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842285; cv=none; d=zohomail.com; s=zohoarc; b=gINVYIczXVFUZp4azKP+5xV6HJ30Ui7P5lxg+ndnFuyRwDWtEBUVehk68OENon6ccM28/3b/2th7qIQ5oFrQCLDEcbIs78RaXj2+PaAJmr2xQx4d7j/8eJHlMZVjb9K8bARb2LGIJOXwQ1DaHOUgKzeABz60oXBZ96jANmT7X9Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842285; 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=2eQjTtQcaBQuKg9JnxV2qRTB7mD4XKXUSiOD1gcVDjc=; b=hop3MXn28g5s1j1YgiQMtheUYRswYrnHLU1KBqY6mA7Ffy99xs7D1Itp4ax3A9mkYO6mznZtNujAOwNTjp58hlOSDYcnbEQz6K6fL/Zd/j89as8usWEl9OzICYEgOABOLFQU/caEU6Ba0c6exlNASJFl3fh9OV1+ALhS1tAYwPI= 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 1778842285036324.78284151794935; Fri, 15 May 2026 03:51:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7R-0000kJ-GP; Fri, 15 May 2026 06:50:13 -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 1wNq7L-0000fN-Vb for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:08 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7K-0001ds-5t for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:07 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-488e1a8ac40so85610665e9.2 for ; Fri, 15 May 2026 03:50:05 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842204; x=1779447004; 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; bh=2eQjTtQcaBQuKg9JnxV2qRTB7mD4XKXUSiOD1gcVDjc=; b=TS65p+QH4bbSaIBMYS79QvpLMpSnG7mZWE/iscMvHAq4lNd6KXD55zKUcDBuprsZL8 hHLAC/dWS0mQivNSvov2z+2z90kYXJcAACzAeVwzssJqpjGnkBDJWcFO/IUEpU9SN7dn xX9caIuvplpUyYfiQX+2Awz3LrtQX7w7vF5W6MIqrC6BnjWNQ8+WR2c6+548ABqvb2/d OCc3oXsMffaWQesBxD7ektqr/6nJmU/Ip+R9MqW5nei1iMBkxhC6whplEcfFd15BEDGJ 3MSLvFoq9xrHoH8fIQQGorbFRhIZXAXSE5fwRNUhg4Lfjr/KU7pp3UrecYuXsFVSwWMy Z3Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842204; x=1779447004; 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; bh=2eQjTtQcaBQuKg9JnxV2qRTB7mD4XKXUSiOD1gcVDjc=; b=rQ9jNWyWa7lJsDg8ZH1jSN5jv5eHGEOjebsjVFEx2tuPegv3XHIqeR86isByPtYWc1 J9sSFjofbGZwuRc+RAAkUJbEmRObfHjONTdf6GzWdz9beH3RC4rU8jYv1xJmGyJJrZWU vygGOHfmj2WlmzvoxfMAQBAhF8+bcxFGKkU5sNnwlUINsWbVCu2ImRlENoLhLn0wFsx0 WE6ke1lZXbCD5QNxi4XNEXTUifRHLn2j6F6Uwg66MXMXcZpPFqQ/bFYePk0o6wi9HaiX iNmfjPB61AGrek7g956jL7h0DjDfG46WSLTxO7SY71lFDQmjMnHxH6cmii/ZZdPV66yk NB8A== X-Gm-Message-State: AOJu0YyrBDsJjIHLZ3mGekHtxSUqG3aIYisCHTq4MI5IG/oXPXFlCevC oGrBikMhE/6IwwxmpvSHqCJSxwK9pE+IXYUmW8FrJaWkD4x0sZWd7T0SK12auxYghtJJkhCMUc3 2oKGp X-Gm-Gg: Acq92OF24SC0FQ0qa7TqyxX7WQrYyKDLLzc5bBmLxo7vRZKeuIfGXon2jiKjgmGtZjZ V6An5XLnB+KVAE1qyuQfMcHkJT45mzngtzjaIxg1CBXAUCr62rwQH8PzNX8ChJlu97l0rpT2TIa Dj2mwv6GCgWzLC0+0Xgr6VibHxNN4F2K9xXCPLMHQ18TUWnC9s28VFgODV8Ctdd8Irqdx/px/Yc pSwC1wJTfx9LPbWILI78DXAoE9zsLWMYHEUnPDuNB3Su3QbsqN6XirnThcIAlzsYhkmvcmLINop 1KTmP8J278HE1zjd3sYPMlyX+pXdMqp6foGRJ3p1LmCQN9wzKI65nxrOYwUhJzChsRO57zk6CyR kxEuqhmDMBOXXqh4nMC+r6Y0J9W2E3R9HdqaA2PEXIUWyTDNpTJ53+wF5rgJXloyqrz/MPb74k2 nPTXfMQXYiEC/4NVZq+pFvbYwQn+VXDmSmncwc0W5Y8igWbh4khE54QJSBVp0otYN64OodgSXCQ 9JwuJYdlN3J9WTstR2UfFAOzJ3vXVTceEyH0ehsyg== X-Received: by 2002:a05:600c:848c:b0:488:b749:8482 with SMTP id 5b1f17b1804b1-48fe60e52c1mr49603905e9.4.1778842204247; Fri, 15 May 2026 03:50:04 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/23] hw/display/exynos4210_fimd: Use LOG_GUEST_ERROR instead of hw_error() Date: Fri, 15 May 2026 11:49:36 +0100 Message-ID: <20260515104945.4145203-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::336; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x336.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: 1778842286889158500 Content-Type: text/plain; charset="utf-8" The exynos4210_fimd device model uses hw_error() in several places for "the guest set this register field to something out of range"; update to the more modern LOG_GUEST_ERROR. Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3405 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20260508162013.2751001-4-peter.maydell@linaro.org --- hw/display/exynos4210_fimd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c index 5133623ee2..aa94b29971 100644 --- a/hw/display/exynos4210_fimd.c +++ b/hw/display/exynos4210_fimd.c @@ -533,7 +533,8 @@ exynos4210_fimd_palette_format(Exynos4210fimdState *s, = int window) ((s->wpalcon[1] >> FIMD_WPAL_W4PAL_L_SHT) & FIMD_WPAL_W4PAL_L); break; default: - hw_error("exynos4210.fimd: incorrect window number %d\n", window); + qemu_log_mask(LOG_GUEST_ERROR, + "exynos4210.fimd: incorrect window number %d\n", win= dow); ret =3D 0; break; } @@ -757,7 +758,9 @@ exynos4210_fimd_blend_pixel(Exynos4210fimdWindow *w, rg= ba p_bg, rgba *ret) blend_param[i] =3D FIMD_1_MINUS_COLOR(bg_color); break; default: - hw_error("exynos4210.fimd: blend equation coef illegal value\n= "); + qemu_log_mask(LOG_GUEST_ERROR, + "exynos4210.fimd: blend equation coef illegal va= lue\n"); + blend_param[i] =3D 0; break; } } --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842339; cv=none; d=zohomail.com; s=zohoarc; b=aqXu7Bs8VjXJfawAusWOY9G1sF1rhMaV3UVKCjULbXIaSawB+3fSQFtbNACIFdR7YJhVH1POs+LuOK7qijSUmx7wDLsyKvAz8OTMbK2k59OJA6hXlkZgcHCjbNymlCILJs6+/0720TDtb31I7szvNUIkV/YBNAe1Jyqx+YDpfnk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842339; 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=xJ+yo9Xpc/srgF3m90Tch2SAnTNWoA4B+R95BhJnzTs=; b=UHveDbYGWPWw7bX479CB8/WuREKWdbg2OlwB3GZJ7pQrMyVsTDQUI5m3tn1bU9+fQyfIdUqHhmIneHTGq9DAJCDCFTd3OKoAHiUWToXxE0EkvdQcc6TvhUVt4lnsnK3RRV7cbuM827CqPsdO5B9aIcOh/pebJ+T4ijktN5qLVDE= 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 1778842339401317.6403480164862; Fri, 15 May 2026 03:52:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7O-0000i8-Ea; Fri, 15 May 2026 06:50: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 1wNq7N-0000gs-H2 for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:09 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7L-0001es-4S for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:09 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-48e8132c6d0so45662025e9.1 for ; Fri, 15 May 2026 03:50:06 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842205; x=1779447005; 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; bh=xJ+yo9Xpc/srgF3m90Tch2SAnTNWoA4B+R95BhJnzTs=; b=vWfT3cgbbic2/dK4fRIuUWV6QonZMLsXUn5zxH3OL+ECQiEu8bMrYXZry6kUuDrC8G Cb4m7Obf33DkxgWg7ZG10AhWsWYkz6AAvOIMsOERnL4vWDxSRGzM9NLdkeDJqkff+skp EwH2VqLjrBBdgJIA/AE2yslhzqpqpeFcYdOUhGvNewr11d8TJ32NXCQvD/sRJjQFhjGr uUGbpf8BqgmpLWolQcjtCWJz2QHqCp315MY1kgMAU/RqJDV+Z0E7QrP6Z5KVp5pagbWI hoZByjpLHY2AUCqE2ZXvejJKcWZfIDkGihRWgU6qOixbeDVe+NGLbybJiDwjgEbxIqEZ QfYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842205; x=1779447005; 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; bh=xJ+yo9Xpc/srgF3m90Tch2SAnTNWoA4B+R95BhJnzTs=; b=huXWlDNrsPqXL9SaZh8Qxwr9YPB58zcxHasJLPc4N+H/h8IyaTHlUwKQeWTpMIW099 Ad7J6qs3lY5iq6aqBXcpizkYbY6qnWEhsHMp2S5EMk/WLll0PJKl6M+2nmeKccojC4pv +hK1vtCrvvHdL2Ozys+Vlki+l6lLoabMgIWHnuWTG5sKmVnfxpjwukHdOTHOUVid16ud /EbB/65eWFmvOt8ffwv7uhZZUpoZPc13rd7AMY4zSb8+ivV+rx+/w0yQ3PnEoj7hpcCT 1gRQRxZefJijHZ73HBtONoKTcwu3ve79ZYFIE3dxwmDVAE+2eKu01+0G0QVGsMRYbLqh OflQ== X-Gm-Message-State: AOJu0Yys0CaPl1fm3KFgSQtII70wznhTN84zob0ms5A2Dgk9cHmw6+ZG iul4FVjNziX5ivXwx8m/rT4UEmsIhUicX+lnx5uZssp8xvkKNToRGvDKAWXyftw8c+ZRO5Eh4S8 MohK/ X-Gm-Gg: Acq92OGsrXOVDZTebWGQ+CylOGa04bzhXrCudproz7CeqVqD9ZUJuz9kk8BIX7QZEUC 4pm4KtlmmcvDonV7aAZQw3gkCMOQLmXLhW2YBRFGWe3GSEWpMFRB4ytrnjjrfHJpMUgPyaIYT6X X5QwORH+Uom50xZQPp9n/irxdRE3UYF5H1bn/BJU3ktKR9Ud7dMSN6TrjnpDtGc5EWhbC4oHVpw tk9wpFksoTqXOxRI8QqAbN2lPAPh2gtq6sn4C9c0OZqmjXMOLQq8wDjWkCtWRvL+ZczpN0jdKaU TozH54EhFVKBMOYIrVM1qFHUTOsbcGsLau+nSRSM1eYt53h7gu2laCQBFFSHnH+YgfTCiPZrCj+ RlxCMOg1r5ew9aHQN8/7ibyuqdlaAS6/I37Ue9ks+YcKtc2sc4LXAEN3opMI5m13D1LCm85Ha3n wU8DBAqsSFcR5PzkneVgBx8OTUk1wdx8fXMvtwo/OOgg/eFvp7Lm01QDiBAImti52qQtsXTfDEg 7DapM58yXRF5G9WplHQsJMYDEBnff0= X-Received: by 2002:a05:600d:2:b0:48d:112c:f582 with SMTP id 5b1f17b1804b1-48fe60ecd1amr34676245e9.11.1778842205351; Fri, 15 May 2026 03:50:05 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 15/23] hw/display/exynos4210_fimd: Assume display surface is 32bpp Date: Fri, 15 May 2026 11:49:37 +0100 Message-ID: <20260515104945.4145203-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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: 1778842341048158500 Content-Type: text/plain; charset="utf-8" For a long time QEMU has guaranteed that the console surface is 32bpp and not anything else. This old display device still has code assuming it might be something else. Remove the code that made put_pixel_toqemu a function pointer indirection, and use put_to_qemufb_pixel32() directly. This removes the last hw_error() in this file. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20260508162013.2751001-5-peter.maydell@linaro.org --- hw/display/exynos4210_fimd.c | 62 ++---------------------------------- 1 file changed, 2 insertions(+), 60 deletions(-) diff --git a/hw/display/exynos4210_fimd.c b/hw/display/exynos4210_fimd.c index aa94b29971..e715183ad5 100644 --- a/hw/display/exynos4210_fimd.c +++ b/hw/display/exynos4210_fimd.c @@ -24,7 +24,6 @@ =20 #include "qemu/osdep.h" #include "hw/core/qdev-properties.h" -#include "hw/core/hw-error.h" #include "hw/core/irq.h" #include "hw/core/sysbus.h" #include "exec/cpu-common.h" @@ -867,37 +866,6 @@ static void draw_line_mapcolor(Exynos4210fimdWindow *w= , uint8_t *src, } =20 /* Write RGB to QEMU's GraphicConsole framebuffer */ - -static int put_to_qemufb_pixel8(const rgba p, uint8_t *d) -{ - uint32_t pixel =3D rgb_to_pixel8(p.r, p.g, p.b); - *(uint8_t *)d =3D pixel; - return 1; -} - -static int put_to_qemufb_pixel15(const rgba p, uint8_t *d) -{ - uint32_t pixel =3D rgb_to_pixel15(p.r, p.g, p.b); - *(uint16_t *)d =3D pixel; - return 2; -} - -static int put_to_qemufb_pixel16(const rgba p, uint8_t *d) -{ - uint32_t pixel =3D rgb_to_pixel16(p.r, p.g, p.b); - *(uint16_t *)d =3D pixel; - return 2; -} - -static int put_to_qemufb_pixel24(const rgba p, uint8_t *d) -{ - uint32_t pixel =3D rgb_to_pixel24(p.r, p.g, p.b); - *(uint8_t *)d++ =3D (pixel >> 0) & 0xFF; - *(uint8_t *)d++ =3D (pixel >> 8) & 0xFF; - *(uint8_t *)d++ =3D (pixel >> 16) & 0xFF; - return 3; -} - static int put_to_qemufb_pixel32(const rgba p, uint8_t *d) { uint32_t pixel =3D rgb_to_pixel24(p.r, p.g, p.b); @@ -905,32 +873,6 @@ static int put_to_qemufb_pixel32(const rgba p, uint8_t= *d) return 4; } =20 -/* Routine to copy pixel from internal buffer to QEMU buffer */ -static int (*put_pixel_toqemu)(const rgba p, uint8_t *pixel); -static inline void fimd_update_putpix_qemu(int bpp) -{ - switch (bpp) { - case 8: - put_pixel_toqemu =3D put_to_qemufb_pixel8; - break; - case 15: - put_pixel_toqemu =3D put_to_qemufb_pixel15; - break; - case 16: - put_pixel_toqemu =3D put_to_qemufb_pixel16; - break; - case 24: - put_pixel_toqemu =3D put_to_qemufb_pixel24; - break; - case 32: - put_pixel_toqemu =3D put_to_qemufb_pixel32; - break; - default: - hw_error("exynos4210.fimd: unsupported BPP (%d)", bpp); - break; - } -} - /* Routine to copy a line from internal frame buffer to QEMU display */ static void fimd_copy_line_toqemu(int width, uint8_t *src, uint8_t *dst) { @@ -938,7 +880,7 @@ static void fimd_copy_line_toqemu(int width, uint8_t *s= rc, uint8_t *dst) =20 do { src +=3D get_pixel_ifb(src, &p); - dst +=3D put_pixel_toqemu(p, dst); + dst +=3D put_to_qemufb_pixel32(p, dst); } while (--width); } =20 @@ -1336,7 +1278,7 @@ static bool exynos4210_fimd_update(void *opaque) int bpp; =20 bpp =3D surface_bits_per_pixel(surface); - fimd_update_putpix_qemu(bpp); + assert(bpp =3D=3D 32); bpp =3D (bpp + 1) >> 3; d =3D surface_data(surface); for (line =3D first_line; line <=3D last_line; line++) { --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842283; cv=none; d=zohomail.com; s=zohoarc; b=ND0Dm2SvPflkkdgyWwu/rQVT9IOcqYEOuDjzubaSD/Y3iI1unz3qIDt3ux4b4G6bN+8cMx0IQGTigeGD6Jb8ZGTuas8pUDgs1pO7COn/a7q0McOsuJFxKFjxNSY65p30q9Wb4TjVKXjbeAbvWQzAytx3zHQHooU3fuAZsJa+6dw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842283; 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=YKbmlybhLrxLnmhC1Thmc4r8WHSL4g1H/3NFgasRJQQ=; b=kpi5nnjI3pJkIIauzOWfIurZqOPVtCUJNMNeOfnEBgm1JJBft4T8dB6wMi9XeYc061bTeM8g0Bs0f2e/DCx6jWxFBjnx1DrxoUmE8zXg2mn0NKmZz4vf4gjJT7husRQRxiui/8YzOcl6JJOvJHTbXKVNs+lFKC3UtN9Qxda25pw= 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 1778842283659985.6382224429339; Fri, 15 May 2026 03:51:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7Q-0000jC-63; Fri, 15 May 2026 06:50:12 -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 1wNq7N-0000h6-Mr for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:09 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7L-0001fw-SG for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:09 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-488af96f6b2so106125035e9.0 for ; Fri, 15 May 2026 03:50:07 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842206; x=1779447006; 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; bh=YKbmlybhLrxLnmhC1Thmc4r8WHSL4g1H/3NFgasRJQQ=; b=t3icP+DmfY5abqtMISkHNLvZW9URRrP6tlBdRqtUMoVA9SJtnomEcimLu5Qm/5GXO+ oEydnKGD5RNedhNcTKAPhl4P3AhlUtzrgt2Ez8rYh3VrrGXrzd9cLIYgTgyluKKX6+7r sY+PwnsUGhbQjdYTBuiTsn92Y73Bh8J8+rmaoQHai3zklsqqKawA1zD80Zu6Ifiwv0Wz 2MosoGEoFsP6W8MvCXcpltL6RXqy6T1bF43475WrWvwG+GZx8Q7UtTC6naV/bD4T3T97 AxPjHUOnz7HAWP/XUrKxQFyxh49QMrgKJYUUM4kkqzoH+dIVxQ1oIqbaJ/NHNcLh9cZE VaWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842206; x=1779447006; 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; bh=YKbmlybhLrxLnmhC1Thmc4r8WHSL4g1H/3NFgasRJQQ=; b=ReSOCuyi2IFSvglyVxIJi/Jn1a+QlGO0Q1GgWWt7XSTvDjjLUxlf5h8KAPPbX2NVrQ 5aT12w2EHK7vw1uFIXi1WPwJDzebX7HjTDT8dCLdTuyJsbqLVr9RjuTK+dvgo9p2ZxcJ l3YFeeTU7rszy3M1+DgarXFfUV0tjuBqHB/6rSMcRuPPrnKsoP+6k01iYfHsV5a3lKPu y8Gp1NtujDt40gsnzy4aG47CR9Ec28lHL0D2uqB5DAWo+4W0+15SqhIVfMJqevBNCzVw PsOu5r9Yzx7qct0j8rx4SmEcZkgo1OsioC6XkPn/bxw7L/+ya6W/mil5/EyWL7k/xs13 H7Mw== X-Gm-Message-State: AOJu0YzkkLDMBqwpEGQXr7JYUAe6lx2Uxjm6TJaO7i89D53TsfMlxlgr EncZ8/W2D5Lf7bO+iBIsfYX7xTO/8XSAwkd5LASISXZzac4xwguu/oz2beE50avFPcdbQVlD0gC rK6js X-Gm-Gg: Acq92OE/LeuVu48F5V/r9bO9OYO95sggAInzqPWGTQZGlEw3B2+dBPWaccHT5sZ84Ar AtjhfxljoU/js3kPVWyyI/Cg/vcdkZMGQnr9wpdCDHsO/10DvICh4cx13xm0B8PniG354plNrJo DcfRCktAbMfcA1Ceo37MFuaa+mC5uxe2JxoJNHLTq/rcq4nHndfrzdTEjJ3OjbylXdTVb0ymOnO +Lvx3xu1S8VcBSY5WIkCOlLBOFXZi4LSodDht0kvdFgD9DmZM4N07u58YBorWtIjAJX9JI0jDS/ 8YAPPJnIELEYM6HiQKEe2wosTUQnif9CbT2Iletf87jL9wwryCC/spHi/ssxpw/XBQE7YCTi1FG coUQmKjuJJr0P3T94zFrlOVfTTWFhL3lLBrUvczPTPC/HM+SzoyZJ8V++SEoQCciTGJvRIVBPQA DLwQd7FC+iDpqmT92TtVQlz5zsSVRzeiZDOKYl7iIEEEtFKITC42qqnwalezENdM24JhIBT82PQ bVCmJ6TlNf9tB4fDFm12BC+qkoYFlw= X-Received: by 2002:a05:600c:8184:b0:489:1c1f:35f1 with SMTP id 5b1f17b1804b1-48fe60e1451mr44655695e9.4.1778842206370; Fri, 15 May 2026 03:50:06 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/23] hw/remote/machine.c: Mark x-remote machine as OK for AArch64 and AArch32 Date: Fri, 15 May 2026 11:49:38 +0100 Message-ID: <20260515104945.4145203-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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: 1778842284868158500 When we updated Arm and AArch64 board types to mark them for the target_machine_typename() filter, we forgot about the "x-remote" machine type, which meant that it disappeared from the set of board types exposed on the qemu-system-arm and qemu-system-aarch64 binaries. We didn't notice this, because although we have a functional test for it, it requires the KVM accelerator and we don't run the functional tests on an AArch64 host in CI. Mark the machine as being OK to expose in qemu-system-arm and qemu-system-aarch64, in the same way we do for the "none" machine type. This fixes a check-functional failure on aarch64 host, where it would otherwise fail with: qemu-system-aarch64: unsupported machine type: "x-remote" Cc: qemu-stable@nongnu.org Fixes: eb796c55513d9d39 ("hw/core: Allow ARM/Aarch64 binaries to use the 'n= one' machine") Signed-off-by: Peter Maydell Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260507194728.2034696-2-peter.maydell@linaro.org --- hw/remote/machine.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/remote/machine.c b/hw/remote/machine.c index ced782f6a9..df08f64019 100644 --- a/hw/remote/machine.c +++ b/hw/remote/machine.c @@ -24,6 +24,7 @@ #include "hw/core/qdev.h" #include "hw/remote/vfio-user-obj.h" #include "hw/pci/msi.h" +#include "hw/arm/machines-qom.h" =20 static void remote_machine_init(MachineState *machine) { @@ -148,6 +149,8 @@ static const TypeInfo remote_machine =3D { .class_init =3D remote_machine_class_init, .interfaces =3D (const InterfaceInfo[]) { { TYPE_HOTPLUG_HANDLER }, + { TYPE_TARGET_AARCH64_MACHINE }, + { TYPE_TARGET_ARM_MACHINE }, { } } }; --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842355; cv=none; d=zohomail.com; s=zohoarc; b=bpFK0QnqP2Th/V7m2n6Pc7jhAcoftIbdnBdZ1UfIfIR5JhlSjJTG/HH7dDW8V1VZSpF77qLRmAkgKc/Wlg2sGJk7pCWcr6c4225SVqESB3O2tvMhDjtOYbaP/lhgPR276udRrU8bFtqGc2H6qCYd7sDaUl60fuqv5CIHDfVKXyA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842355; 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=gBwP6y6IIY7F8UfdV6zdl38fTsu5nXVJ8xCaneQe8lo=; b=lk8gzdimTYFOEIPSXFKWUkmFNtvUcehmTUyLx5fYVbci13pl13NDW6ejNIwAAEw4RyPPcf5yH6ZnwrNXzsj9dkKUWFPFZp6Tph280nbdwWERRgKt9w66nC+21H2UrUm20MblO2pb/zyhUSctOBnoXs4XHofnkVmk7SCe+x4EfKA= 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 1778842355781216.8766301653652; Fri, 15 May 2026 03:52:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7V-0000mC-4T; Fri, 15 May 2026 06:50: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 1wNq7O-0000iR-Vt for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:11 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7N-0001ho-1h for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:10 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-488ad135063so74860405e9.0 for ; Fri, 15 May 2026 03:50:08 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842207; x=1779447007; 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; bh=gBwP6y6IIY7F8UfdV6zdl38fTsu5nXVJ8xCaneQe8lo=; b=OyiKin6iN1NpVqJwgLaU4mFuyx6iPN9ua+460ckU1Bxkx+M7ndc2ReL5PqT9bizyzX 8/fG0M2AGdyJLEU1uc5W0DZ7UqN8OW+0gjvRjmVerLB7B+ZTe9tNEod0OCy8wGBcOfK7 1VYKIwNYEps84bfgJibk+c5LzSoCSBZJBpWbOlh+0Z5UBDjXRJEWVMoS9aN5K6NEJ16p XCcpgewgb2vLjGlNIzpciXe4j+jT6brAN7rGmkuIjaPGmb5JKIJVsmnxb9hFlwsp9/Ze Yy2LgOFWn0kLLg3onN0wGl9RNGDTbiHKoheHiloCFameazKnJz2fH22TeOCag7LkzR/+ j3/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842207; x=1779447007; 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; bh=gBwP6y6IIY7F8UfdV6zdl38fTsu5nXVJ8xCaneQe8lo=; b=UWWGE6jBsWuQSSd37yYvARzVEF2hU8nF2EU7yx9Mdmb+Br3L4T9hmnoDUhJT9U132H y7lgW0sNYddgekyXu3G3fwmaomxD+T1kQig5GbHHyPoRFPcsfNy79EWC9zPQS37ZmIDr WPi3PqAcivKqB7iK8em1T+pljlc6s4F5pRv9flw0+IYZBW2d9ePRLx0gCeu5Kv+5erlz h3jA/YUkTgHV2eI4koe+cbNOUETfEzjyyUURpaqIWWLrLqiTiz9bBnKHvSl41Yat4GsJ cqfdI/0zy1e8oOXZLTaoE6wCU6H+uX+EtfE8nLAAWHkbthuxgPd4FwFgauJW7YvARAfc xw4g== X-Gm-Message-State: AOJu0Yw8phwo0iLuSaxjVqgZxtYjDpU4ziWOXKGFibnR4+idBaJXgZ6A C87kR08hoEt8U2L9gzaOJkwbtMeKJPsUVcpMou4QJtnvnp9GW7bua6COms/72I3vgcc1WSJSfds 9sSLk X-Gm-Gg: Acq92OE8BkMP4y4Yfhz0USeSK986kQ0ah0h6fT6gDGH4ioh011TY804UnTmaUReXw9z lPAAU7iG3MIccGnTC28ytrnoP6D6QereVRDqNp1iuB+g6UlNi1URfBqmsIb+vWrVxlBNyLJmRZA 9FWEPdORURpF9UtYohm3oFyl4Dqi81kk0p/xB01NbqNqJ/7r6K9R8HBEdYe1y9brXPu5rU9SLqt lf0OCiB7F5Zs8pLza4ghbVERfG44NsjENPVV1UVvGUhMg8ibH6JxTPFLJJKLJU0irgGSO9UXDHM Ad96th3K1j9pH1nIkQl4j239oJubbS/Rw7ZUrff1g5oPMS4EDhd+WhPF4OBi93NIL4tHWCoxqXy CfsQrQoVnKz+bLs+/3W2msSApIxL6YpgvCJy+vBilVY1EjmiD9kneeiIPVqHsZtNd9MJrWGJIRM O9lO8L+4HmRI2TV2N69eT2IfhFxfBpbGeGHYfNH2PkXi4BHzKG16vjiEYhldqxyMW2fnnpQD19a LydpZFZh+sREoTnBGH8QzdnSeJdVLUI/+2iwUhvNQ== X-Received: by 2002:a05:600c:a309:b0:48e:8741:fd53 with SMTP id 5b1f17b1804b1-48fe61f1e37mr38778705e9.15.1778842207284; Fri, 15 May 2026 03:50:07 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/23] tests/functional/test_virt_vbsa: Skip UEFI test if virtualization not supported Date: Fri, 15 May 2026 11:49:39 +0100 Message-ID: <20260515104945.4145203-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.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: 1778842357277158500 If you try to run the functional tests on an AArch64 host which doesn't support nested virtualization in KVM, the UEFI test fails with: Output: qemu-system-aarch64: mach-virt: host kernel KVM does not support providing Virtualization extensions to the guest CPU Catch the VMLaunchFailure exception and if it matches the error messages the virt board puts out for virtualization not being supported, skip the test. Signed-off-by: Peter Maydell Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-id: 20260507194728.2034696-3-peter.maydell@linaro.org --- tests/functional/aarch64/test_virt_vbsa.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/functional/aarch64/test_virt_vbsa.py b/tests/functional/= aarch64/test_virt_vbsa.py index 57bfe5d7af..04b5ff0f9e 100755 --- a/tests/functional/aarch64/test_virt_vbsa.py +++ b/tests/functional/aarch64/test_virt_vbsa.py @@ -17,6 +17,7 @@ from qemu_test import get_qemu_img, skipIfMissingCommands from qemu_test import wait_for_console_pattern from qemu_test import exec_command_and_wait_for_pattern as ec_and_wait +from qemu.machine.machine import VMLaunchFailure =20 =20 @skipIfMissingCommands("mformat", "mcopy", "mmd") @@ -96,7 +97,14 @@ def test_aarch64_vbsa_uefi_tests(self): f'file=3D{img_path},format=3Draw,if=3Dnone,id=3Dd= rive0') self.vm.add_args('-device', 'virtio-blk-pci,drive=3Ddrive0') =20 - self.vm.launch() + try: + self.vm.launch() + except VMLaunchFailure as excp: + if "does not support providing Virtualization" in excp.output: + self.skipTest("accelerator has no virtualization support") + else: + self.log.info("unhandled launch failure: %s", excp.output) + raise excp =20 # wait for EFI prompt self.wait_for_console_pattern('Shell>') --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842261; cv=none; d=zohomail.com; s=zohoarc; b=ZLQkJFQJYLN+q4/CLDCmhm+yGTGgxCXEzzoTys5XVxYqnYzobvulDVNCwhqeIDItd7mTvo80KSabsYkZ+zjJ9ByadZ9AcbnAXrE3u9C/gASLUsrdYvANXiRE+AucnCa2NBe7ypp/zKyLnKtVKMjsccWEZXxIiB+MxtwjHnu1dd8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842261; 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=Dup29y+MxaZpk97qGhhclnB0cMFe7/wcvev0GZSAPHA=; b=glGSegI1sHJj+RTvdxdlRnyBeK+3pRhKxv79MLBdbSaXDaTUiD4q6kjmxmydhWYMSX/4YOOlAIdqJkATfpHju9AYKdo9wX49dh7zfLNW2yBrtzamwKnl8OeNUs8eA3Vi1xQClZpumM2ZuQOPjLBFRitkQsMpYT4EPV77DEcKcH0= 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 1778842261393441.6826029445276; Fri, 15 May 2026 03:51:01 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7T-0000lD-4p; Fri, 15 May 2026 06:50:15 -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 1wNq7P-0000if-G6 for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:11 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7N-0001ic-NT for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:11 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-48e56c1bf5dso52697415e9.3 for ; Fri, 15 May 2026 03:50:09 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842208; x=1779447008; 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; bh=Dup29y+MxaZpk97qGhhclnB0cMFe7/wcvev0GZSAPHA=; b=GU/y0Yps8XuIFdFQd6alyurrClcxNxGqitWzfVP15MN8tpgFC2dw3RU0I74ummRABC kqflLPuVItseF5ZtO6N4W327TSCjlYWxfCp6jkiO5s3ZUwJAQ+qJryS1uTj7wew1uGbY c9zGGn1B7w4aqS1KN6KfrVZwStTld92QQUDT2glxMRyD+7iFWserXeTPnGPopHJP7giK zWPNz795JgHdQELpC+KBtKAi3Yemv9OA8h0pEJSkge1dFqAbxRfr02fsMD2nLw+HQDGq FN1D9nJAne+au1tbNccnOaP0gw2jJiwKsDlq6AhxQEHYd7XK9uZC36aeDxg5KSYifzeL r/Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842208; x=1779447008; 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; bh=Dup29y+MxaZpk97qGhhclnB0cMFe7/wcvev0GZSAPHA=; b=Qw9eI909EjJU0/dinKW9NTTvn83il2JYe3AxgWAq1JH9D+Ies884VPEf79ql3RpxKO aNF8hW36nU3AsIF+vhTyuFE3TEzE1nVQS/UISrf7pmCRHr2Qtlp8A5VB7XQdNxFH6LQw /xRMH0S5JG98Iz/I1V+kB9XwfULtdI5BlC5tOEuvUC7lhQqfBzAkqdQ1vJNv6bVRtoxr O0G2C7TYaXkreRwWug9lx5zTi4P/A/0CR3bquzQJH16313UxxULMPb2GEZj8wdXjGklE P011BQfIsyBn/5JqWfgxjtAevKYI0nZjw9+U1thaW9IUrmXKZ2Z89hWAdxJkMj89O+Aa MpZg== X-Gm-Message-State: AOJu0YwTSaKIZOJngSDVcgvV6H0NjM7Ey7AktDH3X8o9UpQ0WHiDs7ij gkMOXeEQLB8WOYXOQcUYWfJjYiyILq9r6Dt8n4dCsHpXwduKb8uGkmBBuZTp7PVhyLhDkqHKTK+ kButH X-Gm-Gg: Acq92OGfdSoJLN5fn9emCJ02PlmORzJOkcMLfLZKy51fm9zkBFGKaoM0iQh8/4OZMCJ 4Z3SCFtryt9xpI/JX1Jta+D5SLNbw1GTG/zPyOd96ZD1Z/4JQsx5BvytISe0eHYE7lj69XzTVMH D8NrEemxgaUAkQ5RgT9CWTZ/ahECrlrf5l3V1P2R6v0eaJt0wMIumlFDV8YDXmvRgoDMRNo8fB3 zSuSnC1Lkm1pfa1aTqnNPNgxkPDDzSkiSEIYcdCRraSIqD2sU4E3UzZpCb3jGV+OzC8Enlm/kd3 7V+Ddzk36nCplC2Z7cmtKzQmrm/j+6NU152lxUFj0vpyJwgnjb8N4iRAZ3NB581Clb5W/98kpXr /RWDs776cvEFBMZH7wY3oscFh1l3TeL+oWDKTl+eDugfXKM88m/xrw0Jp5UZNzXFTY1UVo5nfx1 FnEGY/6nFA1U0CvIfb1Nkp95uwbJf9GBmJ8q9dXSenG2himydGyk/rCA3/J3ud/Gd5D3P0AO/Pf ziRwu7neSn8XWlwXD3VES7b6f5/Pdo= X-Received: by 2002:a05:600c:c168:b0:48a:76a3:2b9b with SMTP id 5b1f17b1804b1-48fe61ed360mr53301295e9.17.1778842208215; Fri, 15 May 2026 03:50:08 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/23] tests/functional/test_kvm.py: Use -cpu max, not cortex-a72 Date: Fri, 15 May 2026 11:49:40 +0100 Message-ID: <20260515104945.4145203-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::32e; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32e.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: 1778842262765158500 The test_kvm test claims to run on any accelerator supporting nested virtualization, but it specifies the cortex-a72 CPU. This doesn't exist for KVM-only builds. Use max instead. This fixes a failure like Output: qemu-system-aarch64: unable to find CPU model 'cortex-a72' Signed-off-by: Peter Maydell Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20260507194728.2034696-4-peter.maydell@linaro.org --- tests/functional/aarch64/test_kvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/aarch64/test_kvm.py b/tests/functional/aarch6= 4/test_kvm.py index 7545f5ed55..fed18aba60 100755 --- a/tests/functional/aarch64/test_kvm.py +++ b/tests/functional/aarch64/test_kvm.py @@ -38,7 +38,7 @@ def _launch_guest(self, kvm_mode=3D"nvhe"): kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + f"console=3DttyAMA0 kvm-arm.mode=3D{kvm_mod= e}") =20 - self.vm.add_args("-cpu", "cortex-a72") + self.vm.add_args("-cpu", "max") self.vm.add_args("-machine", "virt,gic-version=3D3,virtualization= =3Don", '-kernel', kernel_path, '-append', kernel_command_line) --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842293; cv=none; d=zohomail.com; s=zohoarc; b=gGeyurzK3jJQ+LeoKFfXSqPp9lO8sAnULFFpHIpIfIuC6miPPVe4mSTzYfh7DvvNIFNfTeNsPBCZO+mkSud9jpCMc+UTmPMqWtueP9YZLOJf2MSwYif3P44VEX0k8fBV1aQyZNTZoBQUo2t8ehde2cnZl1NufsdRSFJce3R7Rv8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842293; 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=t5UyGdhJ5ab4DMMu7acjly7i11P0+6d7XRfGXSmtjA8=; b=lI/+KoWWjcsL0bFPQVTFVmufCR3uyTA3hvQ88MXVTkpMOof0hIgY6Cw33ZliKOUKoQ0cszcjY9L+Ii6oNEOb/lfpTLjwL9pjSVvppNS+YHnVPJYsvQF3fjNkOOWUfe2CVklJBO87Zw1j0YgplZcNTa3ERW/mDLlHxxsqfWK47+o= 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 1778842293328244.55208570867876; Fri, 15 May 2026 03:51:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7T-0000la-TM; Fri, 15 May 2026 06:50:15 -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 1wNq7Q-0000jY-GT for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:12 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7O-0001iv-QZ for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:12 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-48d146705b4so106423255e9.3 for ; Fri, 15 May 2026 03:50:10 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842209; x=1779447009; 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; bh=t5UyGdhJ5ab4DMMu7acjly7i11P0+6d7XRfGXSmtjA8=; b=CMT0pPQ5fjdUN0+I4yISI9HPtr4oSyZAlr8mePJ7wGZ4bIk6ZPcPDeWM3WsvZYO6DD 4WYzfApsYthu1KZvAC4IbOQ4bXaG7yXYdOFU0QbajuIx9JeDWGnVxq1h9po99z+Wol3v e453Ogarw+d/CBggI6UVVP4scUWOQYhbo2GHEwMLfO+HM5r28IoEXMb46FUXZP59es6q FeFecuRUKrf7gBO38u7inIHNaReOSvrXcFKFjNGAeORUJrm7aBvmE3lKFSqCduWFmWVv oNjaw6yVn11CQOubEQQ+4sa4IIPoIGyNEs7qfoboC+nodjhwAD6oSHZhwpFeOWZfvbUT LAXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842209; x=1779447009; 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; bh=t5UyGdhJ5ab4DMMu7acjly7i11P0+6d7XRfGXSmtjA8=; b=fnD0/czoiRoJbkQP9An4qViDILmzlWQXLqH3kwvVmuT/QjWqtxWbasGaqCsP0fPgWQ TGIbK79wDnQVICK2uKVzUFRxT/PGyT6nkESeiRfHQ9FULrSuI0BVCjmImY/bhEznSYIf /0q2Wf2KmK6DxKgjjnEp867tWAjq4/P6WgxOkxwT+ivfmfu/CWCzPRTJYWJuCNbjEE8Z yEKAT3meoZndmaLnNP/YLfp7G4ln3HHpiD3kyIxhMu9ipv9bqM8euZG1VelJktDzsHG4 qp60Rax3cv8bLnZ5k51PDphyDMhoCMUcj6qaYeWDhV/N6mMvtOKVuVXfdpyOAanwkqYR nN6g== X-Gm-Message-State: AOJu0Yy3t1PGDy8EwTaW0/Qs2cAiSBPcCW4DfddIi7ERCktV0eMajBTW AJu0ZFli6URctM2YmXyFs7VNI8b77CEPmroMJQkPmnqC9/WJWlFPEFvjP6BvnJAXefnl6Lh38iH ty7gc X-Gm-Gg: Acq92OEDuLmJPNt4BysNM3DWEijB5olLMyUTDt3lmNx/8r/m+uAbiBHQ51VHkHiH0LE RJCnJ4tWUP1eZThhwbrdW+saYm4NHeoh2hY77Cy8N/Ss/8j32ey+v9yPju1pmpHUtY1QR+C5lHu 21NzQVLse9mHUmIg75/HQRiy0pj5AQEW4F9IeOGlYw1msyOTXZRzHouxufAq+2JGbCCT/3ZHq/J DPQWwOrkhIspWBzBZIzo7TrgWX0Xw0gKA0FbbOaNOc2oaHK7WN8DDRKYc7Ia0vqcddCnQ/LQ+Hz pu4/6XiCHxHCpYSyrdemUPz4sN8qqiHDMVqI9vTEtihH6gDOwaKJG/tCcpDBfwx3wIGSMNI60Po MGTl05Neiwx4f1X9jysCiL2Y9LEOOSvFB+HppVParemoco3+qs4276dI6vxus6ieRhVz7n6QuEV 63bYMz14cJszPqei+GK0rmNWPMZi7LWamsoUfbMBgvgH4Z4oNH2k710vFbqLSrxzeaQhCthRRNm J/uuriQwYTZHarfWX0DNprGHvWwQlc= X-Received: by 2002:a05:600c:848c:b0:488:9ed3:1492 with SMTP id 5b1f17b1804b1-48fe60ecc19mr47082025e9.10.1778842209059; Fri, 15 May 2026 03:50:09 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 19/23] tests/functional/test_kvm.py: Skip if virtualization not supported Date: Fri, 15 May 2026 11:49:41 +0100 Message-ID: <20260515104945.4145203-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.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: 1778842294849158501 The test_kvm test runs the virt board with virtualization=3Don, which will fail if run with an accelerator that doesn't support nested virtualization. Catch the VMLaunchFailure exception and skip the test if startup failed because the accelerator can't support virtualization. Signed-off-by: Peter Maydell Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20260507194728.2034696-5-peter.maydell@linaro.org --- tests/functional/aarch64/test_kvm.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/functional/aarch64/test_kvm.py b/tests/functional/aarch6= 4/test_kvm.py index fed18aba60..c977e8c6d2 100755 --- a/tests/functional/aarch64/test_kvm.py +++ b/tests/functional/aarch64/test_kvm.py @@ -14,6 +14,7 @@ from qemu_test import Asset from qemu_test import exec_command_and_wait_for_pattern as ec_and_wait from qemu_test.linuxkernel import LinuxKernelTest +from qemu.machine.machine import VMLaunchFailure =20 =20 class Aarch64VirtKVMTests(LinuxKernelTest): @@ -44,7 +45,14 @@ def _launch_guest(self, kvm_mode=3D"nvhe"): '-append', kernel_command_line) self.vm.add_args("-smp", "2", "-m", "320") =20 - self.vm.launch() + try: + self.vm.launch() + except VMLaunchFailure as excp: + if "does not support providing Virtualization" in excp.output: + self.skipTest("accelerator has no virtualization support") + else: + self.log.info("unhandled launch failure: %s", excp.output) + raise excp =20 self.wait_for_console_pattern('buildroot login:') ec_and_wait(self, 'root', '#') --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842366; cv=none; d=zohomail.com; s=zohoarc; b=Se+Z9x7AcXef6k++/7oEeAw64/1/WB04R8YHOcRdjQv15S7HJ35D9n6pk6jLPKuOFKI7ZghR1uC2drE7mZeZ9HunCDj6/mKaFZWXdquKFZptZOKlPyckSNONiUjScwXxhP+S8dqeuQPrNS/PzBDscEueu48cxENLtj0RElAZIh0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842366; 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=qfD0No0qdL8q6qww+gYxRhKL5/900H94BXFH4ixM1NY=; b=TZn00h8tOKtsV3YwuWTEEa9DsEpBJLhYUIfdT4GjPKq4Ed63cCoh5rtZbXv0LQ0OaYXWgz5iFUT1IE3tHlhKDt9Kxtr/QiuGp9hzAjrlU+5IhWD5wkVYVyZTRePxyXVLixwadeIwR/4FvKqTN4gCy1fUezHYTmhC/6YbLecQpPE= 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 1778842366649143.71423022357146; Fri, 15 May 2026 03:52:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7U-0000m6-Li; Fri, 15 May 2026 06:50:16 -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 1wNq7R-0000kL-MQ for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:13 -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 1wNq7P-0001jL-Vb for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:13 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-44dd5cb0f81so515450f8f.0 for ; Fri, 15 May 2026 03:50:11 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842210; x=1779447010; 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; bh=qfD0No0qdL8q6qww+gYxRhKL5/900H94BXFH4ixM1NY=; b=roJI2khqMjW0gGvP6H8kWxqb5BLS7Y3m1ZB1ieei0WMA8XiA2EV+zINKPDt+e1qCYI BJG0/bW0JDCwyow+qZAL5SesUGAM29kZo2xOIdr70wphIdh4a+IGIPjPStAU6gK3lcFZ oSN+/19Dn5mjp1hDlwlXyxaqvUzStmrUFGeMFxCljodNwV7VkzZ0fAcWhh6OldgoKyfu 8gZ8MQZgmjnyQy0g6gIL05PXco7LQXD0VvuEoEMKYWoZWZz0gPlUkXo52TqAW71fSLZe hRbh6HsifsROHU8jt1R4beaJ0LHlrGFIgfQgQydhVYjmhwuZie6g2cnk+vn6h5Nvss48 WMWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842210; x=1779447010; 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; bh=qfD0No0qdL8q6qww+gYxRhKL5/900H94BXFH4ixM1NY=; b=EJ0VmdiLxIBa+FbdEJuExR8zCVv/Z+73CXblLKi3JfYaz+YWWCDHmWOvHawuA8f0LW PCIFi4SqRSpUIfgudj/ArewJk4lv1PMxKwnN7lq5IS3NCfh6Nafc0T8ZqOd84Meic7yj d76M82n/zdQK/K+mgr1aOyGqe7/Ps1Dk5ZsrxP+7hGxNU9Vgn7D0RQ3yZr/gmMvityRY COo6lnsOlBFAfsqZRUsRtjejGxa9hKpW9bXAmTGfoRFyY+rvGCzu70clwmfKufWOmvHt O3D8g4MDdBwP05Esy14uvbu6OxBAmAwdIaVwqDO/mK3t85oqAxYHhGxo3cbesilaRFDX wDKA== X-Gm-Message-State: AOJu0YwnWey6FVVUw/pCK4i55agtcfvcjdmuVuukDGsB0VXiQbaffS7s 2Orpaini9UFRwo1uPE7wTIx8niIscVf+CkTzSG2LyAWM7HdZBuAOuVB1psr17U0tLbn6ddccjbx EM8Fj X-Gm-Gg: Acq92OHewknToJdG9CpAxF3lM63kJmvXSoeu34Ne7GP89q7ndnC5K4A10Nk2jYDEU/J djLJO/IE+2gX5A6RoQm6CtAQsui0lgCwjME4fcGuwdQSTQpIW7UmKs69vavtXU/DbVqqlitdeuL /pYN1sWiT3Yi++gU6qbm5e2nop2DSuGANIbAg2v7pocx0O4o75QxZt/LgcmYIPwROnD2huAyUEi yNULoheDgVLmhdJQqgYsNRpvEzAdbgRB+sMbPHuMv81LNwEB1vZthyZvwpIpSCSCaZ8qB9ytN5X QeX4DZ+nDGm5JTt1T0BWJph3xyLP/Jpq0MJ2ulapiP/r6zvCvYc5U+tgPglNzgdSYTrflPNmBCa ctIy1uIQb6h5mlWUICcPMXxYHuOCdIDG3UVifIxUonfkaPOlxB99KxcpKCbe+fJIkdcCEuOQGxY sbqXzhZTVT9P1U69WjpnR2QUoWFBmeiqaLKMkBMd0RX7LIfLYKxIolzeBaHaNyJgG4wmj0trjvr BJgAh/3sISDTOS4Aoc7sIJUben4180= X-Received: by 2002:a05:600c:609b:b0:485:3c2e:60d5 with SMTP id 5b1f17b1804b1-48fe4cadfeemr50892525e9.2.1778842210016; Fri, 15 May 2026 03:50:10 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/23] tests/functional/test_hotplug_pci.py: Require TCG Date: Fri, 15 May 2026 11:49:42 +0100 Message-ID: <20260515104945.4145203-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::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: 1778842367239158500 The hotplug test asks for the cortex-a57 CPU type, so it will fail on an AArch64 system using KVM where TCG is not compiled into QEMU and the default accelerator is KVM: Output: qemu-system-aarch64: kvm_init_vcpu: kvm_arch_init_vcpu failed (0= ): Invalid argument Restrict it to the TCG accelerator. Signed-off-by: Peter Maydell Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20260507194728.2034696-6-peter.maydell@linaro.org --- tests/functional/aarch64/test_hotplug_pci.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/aarch64/test_hotplug_pci.py b/tests/functiona= l/aarch64/test_hotplug_pci.py index bf67720431..9ee1446a83 100755 --- a/tests/functional/aarch64/test_hotplug_pci.py +++ b/tests/functional/aarch64/test_hotplug_pci.py @@ -27,6 +27,7 @@ class HotplugPCI(LinuxKernelTest): def test_hotplug_pci(self): =20 self.set_machine('virt') + self.require_accelerator('tcg') =20 self.vm.add_args('-m', '512M', '-cpu', 'cortex-a57', --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842363; cv=none; d=zohomail.com; s=zohoarc; b=d7ctA4HBjmZHvsA51Of8+kDOQ3IEEp2VCbhFLuJNNaOOon9IFWkcfVtLGGwoN4Pa6RxZp9TCcX0BQYNSb4qzMzO/Eq1/t9zBARX1frkn8j0li8gPAB0GCjyzNGvws3xkrEBoqGxz1NGcR/7Q4fBgMYkjegwWrMA6pF0BV9UDnPU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842363; 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=21OMcW/USRlqcHb+Vjlhk7EQqx1mPVSErf/Qajcja/I=; b=IQEgvSPnjV5H4Piy82PfFB1BwKRQaucpTxvVlRaauthA7cDU0Lh1BoblRXDtnXWlIrsTnXx/nitXOggc3MQwnMEm6dZZYF3yurKILppKkMRs2xALFiKZw0RiO2uz1NSI+p4AQkRKcz8AB/eQQmsbD0kHqpVhKmybyCa9GeR5zjo= 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 1778842363559503.567557881463; Fri, 15 May 2026 03:52:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7U-0000m5-Jt; Fri, 15 May 2026 06:50:16 -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 1wNq7S-0000kr-Ea for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:14 -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 1wNq7Q-0001lB-OG for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:14 -0400 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-449d6c68ed8so7921144f8f.0 for ; Fri, 15 May 2026 03:50:12 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842211; x=1779447011; 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; bh=21OMcW/USRlqcHb+Vjlhk7EQqx1mPVSErf/Qajcja/I=; b=Ih79XqcaWLDBs91HOkkfCHGCEYShlefSfbB2rMpkNZ71/gvoGm8vrKmuvyALJQV07D 5oYAto6V46Mr3wj9Xr8B2zQpurJIuuAkXEKund6OukK1AlsmJlWYy226/4TTgUNfSshD DRrAyCeWoPuh1EqSPpOSHEHcxxSFQOjyyO5zM9WV314X5XY32mMkcS8ripx/XZihe77+ hV5RaSPQBrRO4agC6eh8Ko3Y1TCwiO8eVd6vHSl3PnY/aJid4/Jh6fVTw8C59nzAImyj wo+rIZner//AcL1BJexw6KgugZn/MC83CCX54yx9qX3pZoZKMlJ7TtX80gI6iZK4qsuG J4LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842211; x=1779447011; 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; bh=21OMcW/USRlqcHb+Vjlhk7EQqx1mPVSErf/Qajcja/I=; b=p3Zf8n63rE2TnXnrsb1l78JJ9HK7Km3b+XuRojJrQKulGBndjNP/pYOe00K4DlWLdK EBNimLGAON/viIBdjpvvT0nueo9+W2RGgfKEtfxSoPVQZbd4q6GSDLe4qn/TyBMgbSa+ RMifDati/CdNF8eAaoiJlzlp4pE0U26Dl/R7EeLlaOwqC8F405hZl/GoTxUsU2HhRSua LyrBsjNG/WPWLKqeGIP3E24EX49udi/MSFPJvnqFrXWq7IG/GCOBKTRXCH8k20VDz+9E l+6ApSMPAyWcdQ9S2Bd0d+0dSYjHbejZVs8LxVxa9d/tYPypew5u8kXwCk+wD/oj7XCh OTNw== X-Gm-Message-State: AOJu0Yyj4RcJZD/xIfXJYEvcPFkARWiP1UZBjOC784kCWIdnFTmoTXZA DoI3ciKsiybZmhpkOuZNX/JNJeEQdW0gPPEZDPZTXKPqSZZAOJCgFMZZDqYc9MIfU5dMtDXZwER rCVF4 X-Gm-Gg: Acq92OGB96TZTuJiGesp/ALL3PXBUxfGYhqLPjiko+GMfd1on55l95SlCwqvmv28d09 1Jola1Bt9N34UE90lfVs8MTxsZcOX0vu/jVjtY0p6DLH4HO5BcRvlnZyPhfq+lpdlgNbjl+94q7 PN15QL0vdC+A4dGJ0BzPmqDMaO4KwZQHxGf7cnQc11gfkP0PUHFgiHsgLm0zUDYOV60EtUSmePW SHTULF/INtk3aDBR0ZqzGxl8il18Eq7RWxwGBEFBBQ7Y140bkXE0k3PIxWSLFER8BtxoWKu44AS qP4si73aDIq7UAJDVmNaYG+HrcfVJsaHdoDd3wj/pRMb4Pgwqv52om16zsT//zWVKj8xp2fxvF/ AYC7V5cCyA4UmcfcNY8028Z8Evxxj2yHUkwN6nS9FHZi6R7xAVCgCRjd28xZPDfhf7fPrtT3Nzg FvV4rUGFhgNTY0A9bmezJ3e6dZrHOYRxLGEgtQiCtGSlGIx5LZ1lgnm4iNt82WC0m0c7SVVcRSh 4ZKMP67+FPm8co5Pffe/7o2XhNLFikvshBR8jtUlw== X-Received: by 2002:a05:600c:4504:b0:48f:d1b8:9a9c with SMTP id 5b1f17b1804b1-48fe60e14bamr43793315e9.7.1778842211086; Fri, 15 May 2026 03:50:11 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 21/23] tests/functional/test_tuxrun: Restrict to TCG Date: Fri, 15 May 2026 11:49:43 +0100 Message-ID: <20260515104945.4145203-22-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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: 1778842365246158500 The tuxrun tests specify the cortex-a57 CPU; this doesn't work on a KVM-only QEMU build, where the default accelerator is KVM but KVM doesn't support that CPU type. Restrict the test to TCG, to avoid failures on KVM-only AArch64 builds: Output: qemu-system-aarch64: kvm_init_vcpu: kvm_arch_init_vcpu fail= ed (0): Invalid argument Signed-off-by: Peter Maydell Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20260507194728.2034696-7-peter.maydell@linaro.org --- tests/functional/aarch64/test_tuxrun.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/functional/aarch64/test_tuxrun.py b/tests/functional/aar= ch64/test_tuxrun.py index 75adc8acb8..7dd50c3de1 100755 --- a/tests/functional/aarch64/test_tuxrun.py +++ b/tests/functional/aarch64/test_tuxrun.py @@ -25,6 +25,7 @@ class TuxRunAarch64Test(TuxRunBaselineTest): =20 def test_arm64(self): self.set_machine('virt') + self.require_accelerator('tcg') self.cpu=3D'cortex-a57' self.console=3D'ttyAMA0' self.wait_for_shutdown=3DFalse @@ -40,6 +41,7 @@ def test_arm64(self): =20 def test_arm64be(self): self.set_machine('virt') + self.require_accelerator('tcg') self.cpu=3D'cortex-a57' self.console=3D'ttyAMA0' self.wait_for_shutdown=3DFalse --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842270; cv=none; d=zohomail.com; s=zohoarc; b=UxxigDE9n3mzjOqwQ+cb6favmhl0yzyOKLCJon/CoNEj3I8Ttn92/nPaMRFvF17tqXPFRMkUhssrWxs+pi6Kz/ZwrMnFlxQhf+TETD+1lLmnyPEjbe3JsK1oJQ6fqp5nDGlLHK1DTTGWYMpS6uNrX+UeIWDaaGZUF/IvszEko5w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842270; 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=C30Lsosj0P4uFdNJOQFWFt5BVMseTiXExw/kFxdzvL8=; b=FHVQQF0DJD+LNHfgNcNvdxdACoPvV2MAo01B/6ybw4Ri8xRQm6uxDOC/qvhQGDpwvPmBUF4LJu9MNcYd1pe1q6b8aPJKvFjBlZ07Saj9Rk05dHc0oYZgE0oDcYvCnES/+pVNy7zIjjGSA5121OSFna4+wovw6z/aTe+RLjsdqOI= 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 1778842270131540.4788155500602; Fri, 15 May 2026 03:51:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7W-0000mL-40; Fri, 15 May 2026 06:50:18 -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 1wNq7T-0000ld-RR for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:15 -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 1wNq7R-0001md-VA for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:15 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-488a8ca4aadso79900965e9.3 for ; Fri, 15 May 2026 03:50:13 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842212; x=1779447012; 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; bh=C30Lsosj0P4uFdNJOQFWFt5BVMseTiXExw/kFxdzvL8=; b=kBz5muptu8n1U00xKnxj7onIabngZ9Q5iyHoTWLDUt3RK0wnw3WdtSgUf8Uo8qQgQ6 M3fyciL04OTDvxK0/VNuPwkBtHQCO5HgqoISjsbNIZR6b67WxRlrp5EVT3ARRvWQJr3G W99BLa6pC9UG4hCgrLpldntOjQBhx4LWBzFU+9J152Op1WJgS9bhHlLYstBWHMd/VCyW JYsnfRjPIVM72BJ1L2dnu635I2eFqCCvGmQuDauTdE+QXSNUDYolA8T/f9pehg8OJyxG hOArLF+JbrUTGuMk17xEACiI1KEvQ0j9x924lnz7gbHsN1nNeyd7M+0SUHuDKwMJYsfP w5tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842212; x=1779447012; 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; bh=C30Lsosj0P4uFdNJOQFWFt5BVMseTiXExw/kFxdzvL8=; b=V3G16DhSS1IJUF5rvSCPXL0ku2fZPtnSf1VWogZneKAH7Rrt+xonfB6Q+56FYhtZVW w4gjwCNSSPEznmnQGWTHEQ37bLPIMiLSyG4csk3LzjCxzAfdiLLf2btPc/m44GRL63pz nHeBNJbkk3pCGpc9INR75P3q9gX0Az1RXKz7Ug15TbJYVfN5QxQtgt7wwqcbIQITY5c5 IjhopqNblEt2h5wm9v9JRJRZ1/DBWxLpY32QvbIxkwRwJVVLCzuAUPxTRpbj2NIo5wp9 m6ygDKFQnOMa6IgeLtamgnkX784dfYUE3dAYo4R0boVoT2pZ++dFThDrA7IJJNkPUH/q 7EKw== X-Gm-Message-State: AOJu0YyFy+lxq6b7gtJAAw01ENZzNxRVTDSRyn+l0PWtY360M35HgKoz 7nUqhK+uQQvGu+a8kvPa4/UAGOAA7+n/ylfXeRw8jjCo1k5RSvIYe+dx4bCQ3SUN/M5xPk/FG2Y vZlAI X-Gm-Gg: Acq92OHzMUPFpXa3NNsjWQSORjCxI7SOBs7eQaHtJxImYpUQSYDmVuZuPdOHvJjhQsi iexFk/KsQSNNjCgx3WQvvWJYonuzrNwV1jD/Ogow51fEQeKaVvgFAo3y2TcDE9EpKppeS5Tqpgh iVK0Ayd6UjQLtWw/jiowwyTD5rN5r45SLODcaiMQFQWtcJ326qooR9AZQ25ZaVCKngG3SHuOYft IIJ7GgY92+MJ4GLqNpmSqYgvuXSD9pJxjwHb7biWfMLoJewe8s+CH7FaqN1NfE8tAS6tcKaCAuS PZrbkjGQtHgjYA9iHjzz2snsRLDdcmlPB8lYW6+2EgFc1au+R3GHTBQ1b07sKTWZlOjCtBcnnGA 5NXqj7TTi13Iw7JxRlJJiBLYftGCpLnzOt/9tU5ttgIRrImmGlJDoXQ4kn2Xl3zvfG2UQDS2UPE KxBKQkCrp1Ye1LgNq28mjC/qCDIn4lh8/IC/Qirzr7Dj8S7aUuEV8W5Q11rOZJ1wd9TXG2+2Ctb la6TVF8rMXX+DnhQCNndjLbhsKt/5o= X-Received: by 2002:a05:600c:c10e:b0:48a:65a5:750f with SMTP id 5b1f17b1804b1-48fe63265ddmr38494635e9.21.1778842212154; Fri, 15 May 2026 03:50:12 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/23] tests/functional/qemu_test/asset.py: Don't use setxattr when it doesn't exist Date: Fri, 15 May 2026 11:49:44 +0100 Message-ID: <20260515104945.4145203-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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: 1778842270947158500 The Python os.setxattr() API is Linux-specific, so trying to use it on other OSes triggers a failure: File "/Users/pm215/src/qemu/tests/functional/qemu_test/asset.py", line 227, in fetch os.setxattr(str(tmp_cache_file), "user.qemu-asset-url", ^^^^^^^^^^^ AttributeError: module 'os' has no attribute 'setxattr' Since we only set the attributes here for informational purposes, skip them when os.setxattr() isn't available. Cc: qemu-stable@nongnu.org Fixes: 9903217a4ed013 ("tests/functional: add a module for handling asset d= ownload & caching") Signed-off-by: Peter Maydell Reviewed-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Message-id: 20260501115506.3792110-1-peter.maydell@linaro.org --- tests/functional/qemu_test/asset.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/functional/qemu_test/asset.py b/tests/functional/qemu_te= st/asset.py index 51a434b2b7..0abd89e0a3 100644 --- a/tests/functional/qemu_test/asset.py +++ b/tests/functional/qemu_test/asset.py @@ -223,11 +223,14 @@ def fetch(self): raise AssetError(self, "Download retries exceeded", transient= =3DTrue) =20 try: - # Set these just for informational purposes - os.setxattr(str(tmp_cache_file), "user.qemu-asset-url", - self.url.encode('utf8')) - os.setxattr(str(tmp_cache_file), "user.qemu-asset-hash", - self.hash.encode('utf8')) + # Set these just for informational purposes. Note that + # setxattr is Linux-only; as this is only informational + # we can simply skip it on other platforms. + if hasattr(os, "setxattr"): + os.setxattr(str(tmp_cache_file), "user.qemu-asset-url", + self.url.encode('utf8')) + os.setxattr(str(tmp_cache_file), "user.qemu-asset-hash", + self.hash.encode('utf8')) except OSError as e: self.log.debug("Unable to set xattr on %s: %s", tmp_cache_file= , e) =20 --=20 2.43.0 From nobody Sat May 30 18:35:29 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=1778842263; cv=none; d=zohomail.com; s=zohoarc; b=BXi0yY1xOJJGey65wcgYSEgsKRHxhzqmlDJRxNfsPsIXLe71n0sVwNyvFmxtVuFEMVMkCNWmsp1LKcg4CnkAxZJ8c//JNh3ylK3yhWyknTyEV4OXNX/da+Dn/yMBDVSO5ILRfaVWEzSTXmORjxZEyeGGsCqXjRM+0zTsO9XQf7I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1778842263; 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=WFpFICzXfOiAHDh1V+lFO20/ZRtRiyXKxnbsJAd3MCU=; b=MWuvyzqwJMy/lGchiYt3/a4ub/vMTbrUu+Pl5rgEE8rxolMlGLuxCpngJsy9L5/uOrwHtaugKGeT4V9B5RQ9g4AH/kWJqeRhAS8wE7qcGF8GWSgpZferRdC97isQwIi/pPEVfnJqfinpMXvdOqY69MmBA/f59o6ckw3Bk6fM7mY= 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 1778842263799488.77711311487667; Fri, 15 May 2026 03:51:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wNq7Z-0000pG-PM; Fri, 15 May 2026 06:50:21 -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 1wNq7V-0000mE-RD for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:17 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1wNq7S-0001oD-Us for qemu-devel@nongnu.org; Fri, 15 May 2026 06:50:17 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-44e1860558fso5828631f8f.0 for ; Fri, 15 May 2026 03:50:14 -0700 (PDT) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48feaa2949asm18194355e9.1.2026.05.15.03.50.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 May 2026 03:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1778842213; x=1779447013; 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; bh=WFpFICzXfOiAHDh1V+lFO20/ZRtRiyXKxnbsJAd3MCU=; b=zPSkAZqoDeGR0fFovf9ujJO10BkDC3noFUIP397zzjNqk67ANk58PTo7eE09n5cIBx qzlr1yIK9SU1YfI/KCP9xtuvLFhym5OKiZX19glsCPaqndcg96jQKsX/5qWSH+xIV65h 4NoC0i0xVbxOK/7POzg8dSYD7wpDiO1fX/QI2MXZ9rDaUvuxq0hP94+zVQEaMut7enPu SuNIluv0PdorRc3fozengRKylT08ae+0TKZuTDV5i7Kx2iNwtOGuHJS5KX0q3KI2HNX5 aKjKO3/2nUwiSPXf3dF1CLArMadNCgrCaK/l6LL98P/F6/HS4KDRzW6MMpf6PtK34qw6 yW5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778842213; x=1779447013; 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; bh=WFpFICzXfOiAHDh1V+lFO20/ZRtRiyXKxnbsJAd3MCU=; b=MUJOHyTPzH3R1KSQ2CMPXPPRxMOFyrs77DWK8YYUuJAW4qlOXjRVVzwILa48xDrbp/ XIMZuT78Jt3kCnMttK6DuU/BF23Ks4HaFfamVg2Be1xF4ItijOsn2SZ92Z9q5WvTMxPM e/vsvs8WcGkhHjKOUB4V75vc5WVmTxhMSCqUeqRGyQtpVaCXshrJXJ2B11PPeiwJBCtl CbE870weVdAlTq/4VTuXwC3j+4qUrGFFF6tgTRAsyObQ55PTBWYrGgzH8XB5YnGbV3CH 5/y0dPpC+Mn0SHmgZFpB7ss9DyhjK43SfjnqUz82eYFb17Q9DZClDnR8IoBwqXiRsVTF JeGQ== X-Gm-Message-State: AOJu0YyT6zgqKKaSL1AQB5MMuZ7iL9C0sFszFgjYS8zKZZStrIm8RmOx sN6UGflowHN20FiMAwrJYjOxo0HBTNKTs+mPH3RjvHlcg0q+PV6iprOMHIsIh87RiikafYYzvot sqoPo X-Gm-Gg: Acq92OEsQV/WLL9oWF51OSoE471R+HbOW2h6oL/phs4q9Ck8JKUNpdcuxAsUK+11Acr mFqKPPE5Yc87TvmNj7IeUtIFGwaTRlba9GS89arsQvR72qe6e6q6Z0Bas8Ie0rc/2k+2v8bOioS qnT2J9I1CsuwEhP2l/GlTXAoKZHucafzje23J1nC0NoSPe9nLn/AnKUAmvsh/r3VhlIm5YlKyd8 ZIRS7p7/V/4NJF3PH4jv15TP5h5zGyE4jXNap8pE9EEop3VpcVXEoGFhQm37gI9Y7VFz4OpiX4t TyatsMKDjbTqZIQbjUPZTHsCmaHyRr+q95FahGZmywFxUsQHHGa/F8+17WK5sDTzylyv2606um+ jCVf1AHI4I0SoZWaATNQuYpPYyFXoowDbf1JYHPdomx5hIXlREgXwz3GRVa+L4rCfVzM+vPsZGY 0TBqDinVyB8ZFYJJXuCeFye2hN1o0cK5sbfcfB6jw+oQ65Hj47JZQVj9eCMvMhu8gEswO6U37p4 5EgcfT50u0qxYfos0OtL//aVaqXmo8= X-Received: by 2002:a05:600c:c096:b0:48f:d1b8:9aad with SMTP id 5b1f17b1804b1-48fe5fd5357mr33395375e9.2.1778842213167; Fri, 15 May 2026 03:50:13 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/23] target/arm/hvf: Fix WFI halting to stop idle vCPU spinning Date: Fri, 15 May 2026 11:49:45 +0100 Message-ID: <20260515104945.4145203-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260515104945.4145203-1-peter.maydell@linaro.org> References: <20260515104945.4145203-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::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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: 1778842264798158500 Content-Type: text/plain; charset="utf-8" From: "Scott J. Goldman" Commit b5f8f77271 ("accel/hvf: Implement WFI without using pselect()") changed hvf_wfi() from blocking the vCPU thread with pselect() to returning EXCP_HLT, intending QEMU's main event loop to handle the idle wait. However, cpu->halted was never set, so cpu_thread_is_idle() always returns false and the vCPU thread spins at 100% CPU per core while the guest is idle. Fix this by: 1. Setting cpu->halted =3D 1 in hvf_wfi() so the vCPU thread sleeps on halt_cond in qemu_process_cpu_events(). 2. Arming a per-vCPU QEMU_CLOCK_VIRTUAL timer to fire when the guest's virtual timer (CNTV_CVAL_EL0) would expire. This is necessary because HVF only delivers HV_EXIT_REASON_VTIMER_ACTIVATED during hv_vcpu_run(), which is not called while the CPU is halted. The timer callback mirrors the VTIMER_ACTIVATED handler: it raises the vtimer IRQ through the GIC and marks vtimer_masked, causing the interrupt delivery chain to wake the vCPU via qemu_cpu_kick(). 3. Clearing cpu->halted in hvf_arch_vcpu_exec() when cpu_has_work() indicates a pending interrupt, and cancelling the WFI timer. 4. Re-arming the WFI timer from hvf_vm_state_change() on the resume transition for any halted vCPU, since the QEMUTimer is per-instance state and is not migrated. After cpu_synchronize_all_states() the migrated vtimer state is mirrored in env, so we can read CNTV_CTL and CNTV_CVAL from there. If the vtimer has already expired by the time the destination resumes, hvf_wfi_timer_cb() is invoked directly so the halted vCPU is woken up. All wfi_timer handling (allocation, arming, deletion, and the resume re-arm) is gated on !hvf_irqchip_in_kernel(): with the Apple in-kernel vGIC, HVF owns the vtimer and delivers wake-ups itself. Note for stable backports: this commit won't apply to 11.0 as it has changes to handle the hvf in-kernel irqchip support that landed after the 11.0 release. The v3 version of this commit: https://patchew.org/QEMU/20260427195516.46256-1-scottjgo@gmail.com/ should be suitable for 11.0 backporting (it is essentially identical except that it doesn't make the changes conditional on !hvf_irqchip_in_kernel()). Cc: qemu-stable@nongnu.org Fixes: b5f8f77271 ("accel/hvf: Implement WFI without using pselect()") Signed-off-by: Scott J. Goldman Reviewed-by: Mohamed Mediouni [PMM: added note about stable backports to commit message] Signed-off-by: Peter Maydell --- include/system/hvf_int.h | 1 + target/arm/hvf/hvf.c | 140 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 140 insertions(+), 1 deletion(-) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index ad7d375109..d5eaf26dda 100644 --- a/include/system/hvf_int.h +++ b/include/system/hvf_int.h @@ -48,6 +48,7 @@ struct AccelCPUState { hv_vcpu_exit_t *exit; bool vtimer_masked; bool guest_debug_enabled; + struct QEMUTimer *wfi_timer; #endif }; =20 diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 9312607001..d88cbe7c82 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -29,6 +29,7 @@ #include "hw/core/irq.h" #include "hw/arm/virt.h" #include "qemu/main-loop.h" +#include "qemu/timer.h" #include "system/cpus.h" #include "arm-powerctl.h" #include "target/arm/cpu.h" @@ -308,6 +309,8 @@ void hvf_arm_init_debug(void) #define TMR_CTL_IMASK (1 << 1) #define TMR_CTL_ISTATUS (1 << 2) =20 +static void hvf_wfi_timer_cb(void *opaque); + static uint32_t chosen_ipa_bit_size; =20 typedef struct HVFVTimer { @@ -1296,6 +1299,11 @@ void hvf_arch_vcpu_destroy(CPUState *cpu) { hv_return_t ret; =20 + if (!hvf_irqchip_in_kernel()) { + timer_free(cpu->accel->wfi_timer); + cpu->accel->wfi_timer =3D NULL; + } + ret =3D hv_vcpu_destroy(cpu->accel->fd); assert_hvf_ok(ret); } @@ -1487,6 +1495,11 @@ int hvf_arch_init_vcpu(CPUState *cpu) arm_cpu->isar.idregs[ID_AA64MMFR0_EL1_IDX]); assert_hvf_ok(ret); =20 + if (!hvf_irqchip_in_kernel()) { + cpu->accel->wfi_timer =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, + hvf_wfi_timer_cb, cpu); + } + aarch64_add_sme_properties(OBJECT(cpu)); return 0; } @@ -2194,6 +2207,62 @@ static uint64_t hvf_vtimer_val_raw(void) return mach_absolute_time() - hvf_state->vtimer_offset; } =20 +static void hvf_wfi_timer_cb(void *opaque) +{ + CPUState *cpu =3D opaque; + ARMCPU *arm_cpu =3D ARM_CPU(cpu); + + /* + * vtimer expired while the CPU was halted for WFI. + * Mirror HV_EXIT_REASON_VTIMER_ACTIVATED: raise the vtimer + * interrupt and mark as masked so hvf_sync_vtimer() will + * check and unmask when the guest handles it. + * + * The interrupt delivery chain (GIC -> cpu_interrupt -> + * qemu_cpu_kick) wakes the vCPU thread from halt_cond. + */ + qemu_set_irq(arm_cpu->gt_timer_outputs[GTIMER_VIRT], 1); + cpu->accel->vtimer_masked =3D true; +} + +/* + * Arm a host-side QEMU_CLOCK_VIRTUAL timer to fire when the guest's + * vtimer (CNTV_CVAL_EL0) is scheduled to expire. HVF only delivers + * HV_EXIT_REASON_VTIMER_ACTIVATED during hv_vcpu_run(), which we won't + * call while the vCPU is halted, so we need this to wake the vCPU. + * + * QEMU_CLOCK_VIRTUAL pauses while the VM is stopped, which keeps the + * timer in lockstep with the guest's view of vtime across pause/resume. + * + * Caller must supply the current CNTV_CTL_EL0 and CNTV_CVAL_EL0 values, + * since the appropriate source (HVF vs. env) depends on context. + * + * Returns 0 if the timer was armed (or if the vtimer is disabled/masked + * and the vCPU should still halt waiting on another event), or -1 if + * the vtimer has already expired. + */ +static int hvf_arm_wfi_timer(CPUState *cpu, uint64_t ctl, uint64_t cval) +{ + ARMCPU *arm_cpu =3D ARM_CPU(cpu); + uint64_t now; + int64_t delta_ns; + + if (!(ctl & TMR_CTL_ENABLE) || (ctl & TMR_CTL_IMASK)) { + return 0; + } + + now =3D hvf_vtimer_val_raw(); + if (cval <=3D now) { + return -1; + } + + delta_ns =3D muldiv64(cval - now, NANOSECONDS_PER_SECOND, + arm_cpu->gt_cntfrq_hz); + timer_mod(cpu->accel->wfi_timer, + qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + delta_ns); + return 0; +} + static int hvf_wfi(CPUState *cpu) { if (cpu_has_work(cpu)) { @@ -2204,6 +2273,29 @@ static int hvf_wfi(CPUState *cpu) return 0; } =20 + if (!hvf_irqchip_in_kernel()) { + uint64_t ctl, cval; + hv_return_t r; + + /* + * Read the vtimer state directly from HVF. We're on the vCPU + * thread, just exited from hv_vcpu_run(), so HVF holds the + * authoritative values and env may be stale. + */ + r =3D hv_vcpu_get_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CTL_EL0, + &ctl); + assert_hvf_ok(r); + r =3D hv_vcpu_get_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CVAL_EL0, + &cval); + assert_hvf_ok(r); + + if (hvf_arm_wfi_timer(cpu, ctl, cval) < 0) { + /* vtimer already expired, don't halt */ + return 0; + } + } + + cpu->halted =3D 1; return EXCP_HLT; } =20 @@ -2502,7 +2594,13 @@ int hvf_arch_vcpu_exec(CPUState *cpu) hv_return_t r; =20 if (cpu->halted) { - return EXCP_HLT; + if (!cpu_has_work(cpu)) { + return EXCP_HLT; + } + cpu->halted =3D 0; + if (!hvf_irqchip_in_kernel()) { + timer_del(cpu->accel->wfi_timer); + } } =20 flush_cpu_state(cpu); @@ -2551,6 +2649,46 @@ static void hvf_vm_state_change(void *opaque, bool r= unning, RunState state) /* Update vtimer offset on all CPUs */ hvf_state->vtimer_offset =3D mach_absolute_time() - s->vtimer_val; cpu_synchronize_all_states(); + + /* + * After migration restore (or any resume), the wfi_timer is not + * scheduled on this QEMU instance, so re-arm it for any halted + * vCPU with a pending vtimer. For a non-migration resume the + * QEMU_CLOCK_VIRTUAL timer was already scheduled; recomputing the + * deadline produces the same value and is a harmless no-op. + * + * cpu_synchronize_all_states() above ensures env mirrors the + * authoritative vtimer state (whether that came from HVF or from + * the migration stream), so we can safely read it here from the + * iothread. + * + * Only applies when we own the wfi_timer; with an in-kernel vGIC + * the timer is never allocated and HVF handles vtimer wake-ups. + */ + if (!hvf_irqchip_in_kernel()) { + CPUState *cpu; + + CPU_FOREACH(cpu) { + ARMCPU *arm_cpu; + uint64_t ctl, cval; + + if (!cpu->accel || !cpu->halted) { + continue; + } + + arm_cpu =3D ARM_CPU(cpu); + ctl =3D arm_cpu->env.cp15.c14_timer[GTIMER_VIRT].ctl; + cval =3D arm_cpu->env.cp15.c14_timer[GTIMER_VIRT].cval; + + if (hvf_arm_wfi_timer(cpu, ctl, cval) < 0) { + /* + * vtimer already expired while we were paused; raise + * the IRQ now so the halted vCPU wakes up. + */ + hvf_wfi_timer_cb(cpu); + } + } + } } else { /* Remember vtimer value on every pause */ s->vtimer_val =3D hvf_vtimer_val_raw(); --=20 2.43.0