From nobody Mon Mar 2 08:51:00 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=1772121367; cv=none; d=zohomail.com; s=zohoarc; b=Mq7zzPHVFOChxgBd5svhn94c6J73YKO6Yo/7n9mzjKlJ+UeIwstYMvv+H3jzAco26i703ktJ9Cjyh/W47s3lOQdvAjSh+jrK69gMhC6PqD37eniddcLGtKI3EMhsgwTaAnkaCwPhty6KHgnTMa3ud5BwDQstQxKKTA9qO+J8tVM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121367; 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=VBXg/2TNoBI9VaCBAUsRvO0hRVupsocR+41+B9vIhuc=; b=YPgPcfcmlBVPXIHB0w/7UVTCurruJgos88Ke+e2PVXYvqlYzR/iyo0Qli1TTkUyXkRQpN04gG2ROtxowCMgqMWxjFqC/lw74+7pYa3MCdxAMv+v/gI5rQb+JF+RXQWnRZArzyMces+bWzRRGPDSgj4dTLryN6aKQQ2tBNuTmFgQ= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121367788951.3967756452934; Thu, 26 Feb 2026 07:56:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiJ-0005JB-CL; Thu, 26 Feb 2026 10:55:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiH-0005IS-Ti for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:41 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiF-0003iz-Qj for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:41 -0500 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-43990aa7dbaso807382f8f.1 for ; Thu, 26 Feb 2026 07:55:39 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121338; x=1772726138; 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=VBXg/2TNoBI9VaCBAUsRvO0hRVupsocR+41+B9vIhuc=; b=DjsKnYjohGn+aB0eQK5XXGQI1Cfha7pjOT5HbYojtmXwWCC3Opxz/fD7qhKDOm2h3y uuRw5x0vnsO/ZjudsH4KLCOYr9VVHZmq+pZaMqmX9EPo6ELmNBK8JmNMQjAjG9R+i1Ob jxvPQJUTb2zKV3Dkk1KLHwKqwVzTEIgLwiSjS1OFhzgp0PSHR3WO4LdL5J0lZh1kTQd/ D+b30z6yPrXOeFB0RTgiJV7ctsYbGRJWnUZwvt5prch0IxKHYiE+qFeqyoKUu3lAs4qN go/asEP3bhTH5VChu0Caf7xBMxOv08yHzJ2JLb/H0D3ms9hX0eal7lomfRzSgdSwJV/X D9jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121338; x=1772726138; 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=VBXg/2TNoBI9VaCBAUsRvO0hRVupsocR+41+B9vIhuc=; b=DoBiCMrfQkyUpJ8lbm1kYMW3V99FH5QAxQDI8g4QXCPCctZVGz+yFRLd81K6us4lr/ yj74n0weYqbV0TjRc+NJQU4muymNbNdRwieW3gF91jQKTQjQgBajTLy82boqdfZM5okj FdH4PixHAh5tW+0YDwaVv8NnU70nxg+J8IhQCCwhdr7JYAwWuq70AFCHc2zg2fAIMf4V 4hqlbQQdrgBnri/fGGo2Sk83/p0e85Zipoa2zkWSjC4HSG+70BsOLIJ1PsotmWfrZi9E HuZgj5V0F3vIJYKR4p3e5NVPvuG3RvT3YjzC64pHaukUzsayqiemmYNedf15HKEOaNBB 3LLw== X-Gm-Message-State: AOJu0YzGxUQtLgSB31E1XTcXNnmU3C6l4DtnvxTGpwyAGUKJ/XfM9wEj uNH4XcUDZg9MMDmrMf2KLkr9R3y4Yd78gpc7PKmkEVDl0MFpAgrzcaSm1u1i4DetPw4X8mAoKlG GoaWi X-Gm-Gg: ATEYQzwJfY88ZJh4P7UM7dWQBXPObHjLm8tbw+UnTm8a8x5tM8c/pxcVKWUSwjVKH69 co/SUVgdTlF+ScTHWH/GrcU6LuarlWNhnOA/rb41lsL8z7MX8zIHPolDkLsYWgaWVWqxv17SbMF tIYk7W6PIWLQRMhVbtY1U3+CQtqtaKPLedc37kWEKmaTYaKgvwnNnjtPcJxXtvCdUQEdAob7ZHc hTIyhMuABVowMDqi/JQB+yIDqRZHGF95YfJP0MzNNRYYdts6yuUEbmgqUanWl5woTWancjMPBTg Zn+JFSoPWBByWSp171nk4IKLFQTJGKY4FrW29AJJ6iRZkXKAU7rtuXMmSvn+Cl8D3TBkT287yzD WmbarwuB25WE9NBPQ3XXn2i3OSCqHjyRwvVzfhXOYE7fGw4ACjDb3JuK6Kq0oveDCJbAAqThAHX 9rthKZ2Hv6IB6ZIrL++OJ0buW3HXRFqARBWfpQTPlX1520lhEELOZw1/OL+NiZqI8rbbKTdybkC MjBMUgryWxJNz9cQ9ByRqe7j6/5AJ0= X-Received: by 2002:a05:6000:438a:b0:436:1989:a1ba with SMTP id ffacd0b85a97d-43994294f6dmr9329748f8f.10.1772121337782; Thu, 26 Feb 2026 07:55:37 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/20] hw/ssi/xilinx_spips: Reset TX FIFO in reset Date: Thu, 26 Feb 2026 15:55:16 +0000 Message-ID: <20260226155535.1171290-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.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: 1772121370293158500 Content-Type: text/plain; charset="utf-8" From: Weixie Cui In xilinx_spips_reset() and xlnx_zynqmp_qspips_reset() a cut and paste error meant we reset the RX FIFO twice and the TX FIFO not at all. Correct this to reset both FIFOs. Cc: qemu-stable@nongnu.org Signed-off-by: Weixie Cui Reviewed-by: Thomas Huth Reviewed-by: Alistair Francis Reviewed-by: Richard Henderson Message-id: 20260223095905.67709-1-cuiweixie@gmail.com [Rewrote commit message] Signed-off-by: Peter Maydell --- hw/ssi/xilinx_spips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ssi/xilinx_spips.c b/hw/ssi/xilinx_spips.c index a4718fb72d..f6e717bc01 100644 --- a/hw/ssi/xilinx_spips.c +++ b/hw/ssi/xilinx_spips.c @@ -369,7 +369,7 @@ static void xilinx_spips_reset(DeviceState *d) memset(s->regs, 0, sizeof(s->regs)); =20 fifo8_reset(&s->rx_fifo); - fifo8_reset(&s->rx_fifo); + fifo8_reset(&s->tx_fifo); /* non zero resets */ s->regs[R_CONFIG] |=3D MODEFAIL_GEN_EN; s->regs[R_SLAVE_IDLE_COUNT] =3D 0xFF; @@ -397,7 +397,7 @@ static void xlnx_zynqmp_qspips_reset(DeviceState *d) memset(s->regs, 0, sizeof(s->regs)); =20 fifo8_reset(&s->rx_fifo_g); - fifo8_reset(&s->rx_fifo_g); + fifo8_reset(&s->tx_fifo_g); fifo32_reset(&s->fifo_g); s->regs[R_INTR_STATUS] =3D R_INTR_STATUS_RESET; s->regs[R_GPIO] =3D 1; --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121366; cv=none; d=zohomail.com; s=zohoarc; b=Ob3u0RNhdpVAyzJEiN4cf8dqa91C0Nxbwftu9h9Oh3UNoZv7PJtPoBx64Lj/rEg/kH14KLo2DyIm6QzHjPYukP+5bPetUd0LbY/kveri9Dx4M6hF8IvWG0PeTWf9zTzPQCnPTxXjyIVPTwb9MpbfW5O/Ra/+1OlW/8OxL21G6Ig= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121366; 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=0aW5QS6awRTQP4v+qDxXUEry2KGxlG04nu2nu/gqLQI=; b=dz2esRLD6BU3nCoNi7ceh7X6npZSHJ0x5DuuRmiA5ksnTSciClyAx2Q7q+ivkGygJgoyV9tcF01TJaF7JaInt7UGUzBNw5INkrbMhLYJJ/C17R34ml1ri4VPl6FudEz9xvEx7UpBtqrpqAdTxsytT1q7/BWjYGFvckIo+PmdrHE= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121366931296.4874927298048; Thu, 26 Feb 2026 07:56:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiJ-0005JH-Na; Thu, 26 Feb 2026 10:55:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiI-0005IZ-6k for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:42 -0500 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 1vvdiG-0003jA-FW for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:41 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-43989bd056bso877883f8f.1 for ; Thu, 26 Feb 2026 07:55:40 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121339; x=1772726139; 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=0aW5QS6awRTQP4v+qDxXUEry2KGxlG04nu2nu/gqLQI=; b=J36MTAcgAIhUUawqgeIJokWekE3mmTvTnpPBCYUAY8V7dQZRxJaRW4mzR+zGdmUHbT VqJGz4q74ytQdNOIee/jqGHis2Hhe7NrNIiXEXY/H6VBJMInHh7pUwjDh4pN0JkG5KCI UNGdRSKaO4lyaQesBaswGbh/CGVLAiWa9tCMx49L8lt7E0PX/WIqi95yc+26NwA3qYxU iQqeOGnDwZ69lzZVigGCqv9oYqSC24Y71yoq5iAR+gFxsdwE3xtc2P4mx4rmGNVdBDDA kvu2+gywHUXkLawFSfzQn/+xm3tXAXRY/uxnrKCmuSA11b5Gs551akm20B/57S/yms7b RTpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121339; x=1772726139; 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=0aW5QS6awRTQP4v+qDxXUEry2KGxlG04nu2nu/gqLQI=; b=m+55O4ih+/eDwrCk3Csrjp4bQJj0TW9mUKnlYZqRSzr5kTMIwkQzmiHCKVXxUhemrO 86+n5J9psVhafJi3LsqCS3quto/Ta7XR/oxtjGPDSYBytkY2HpBWHd4QeZxGChBWT+aD pI3ov9NbptTpwKfR7UM/ogke13IqdNAWpKuPzDHTuP/uQmVPIGcv8azWJRNAFirp1dz5 z4JzSfTDabycb759lDS5IWgaTn3veJJ+KOT17vbgIZbbmWnahB0jh6cYe/YfofgeBJHM EmxpYVRfYZcFXzUTspDfSUsq/HzgbM5Af4hA2YwB4huRYJN75GmJ5599V/27uyVsqHX+ y4JQ== X-Gm-Message-State: AOJu0YxSOtAC04uYvu+oWlBBCKj3dKcCTSK/78w8UoqUlW9XqumTYnLe XMhZdabLxYXuB5NJaMO5Cci20z2DzVYviBJuwHbn2sPc8abBKlnO+WauH8C5AkV6UUTbRzCoT+P bCSNv X-Gm-Gg: ATEYQzw5gMhd9AZQh5GCkTQqW1wFl3W31xatxtsVvVRB2bYXYwwS13xHDbwVKTJh3AD BkL0/5Yy/40S+t8kqPg1C+U1Gg/qSGC7O1dtiw7QFrZTNYCPZRdx7M78UqH1sUPPhRYYVw1d1Gu dfpxNet/OmNi6i6F6eJV3zNFwAnj3bIqnyOFs71KNIuSFeR5iklth8Vs0CAUGbd8XcO8emVR9Iu 1ZE6C7xo+evd6hrQzeMMQUN0Mwb9OZBl9yZ5fkoWk/xyyheZVWlXiPbGK0pll4FUZc3P5mzs0QZ lZ2Hu01WqG+UJUfdzSMzGwHuF7atoK/5RIev9bPuor/xBqScvnDsJThgC7dKJh7EwR1d++PtA2z RwMvtBwD+RF3f7xxkWtyUE4RdHIXkVeA47noyxPyMZL00rhe2yPI2hSu0z9UaMJT6HJJCwTv3+g 6UAHIYQiK0t63Zb513fZDNhlPoWxOZCUIuyYixFWdU5WZXKoARSHZp/Cr45iUJa8/xbNZiHIP7U e/sxpVCBn4xBGNz/JTY+8d4gPvUVeE= X-Received: by 2002:a05:6000:144c:b0:439:909f:c594 with SMTP id ffacd0b85a97d-439971ae7f0mr7126093f8f.10.1772121338692; Thu, 26 Feb 2026 07:55:38 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/20] target/arm: set the correct TI bits for WFIT traps Date: Thu, 26 Feb 2026 15:55:17 +0000 Message-ID: <20260226155535.1171290-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.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: 1772121370035158500 From: Alex Benn=C3=A9e The WFIT trap should be reported as 0b10. Cc: qemu-stable@nongnu.org Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Gustavo Romero Message-id: 20260220171945.1065102-1-alex.bennee@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/tcg/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/tcg/op_helper.c b/target/arm/tcg/op_helper.c index 4d70863506..aa14f15eb6 100644 --- a/target/arm/tcg/op_helper.c +++ b/target/arm/tcg/op_helper.c @@ -448,7 +448,7 @@ void HELPER(wfit)(CPUARMState *env, uint64_t timeout) =20 if (target_el) { env->pc -=3D 4; - raise_exception(env, excp, syn_wfx(1, 0xe, 0, false), target_el); + raise_exception(env, excp, syn_wfx(1, 0xe, 2, false), target_el); } =20 if (uadd64_overflow(timeout, offset, &nexttick)) { --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121422; cv=none; d=zohomail.com; s=zohoarc; b=V3rRqIw5vj2IDqKr6dFhgMFffOzD9wlojSxgno1kbk0KSZZPYWGxZODH2BkBR1QvWb2uOpk/qpR9icXggs3ybpbqWNmApyDR+WOu5Df9t44umJzLZXnmYqXc4JUcsmZa/7AT1bORo/OpLBDGCf+rVfofcjaF0efGFA10skyAV/U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121422; 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=+hTymfPw5nmljxwGgSjMdb3hfuVynPpInJ9OQiqTcV8=; b=SyH0IDC0DQniDWly0+xTYAE+z3aVt6NvV2MMiTQlin0ZauLcKoiVO8crwGNwew6LgdBkUOtysz7aF+4aujTuL8w3q6RPGIajbKwsbA6xDjFzP85f5coLDeFYtoIpWYKLTisZ3szDJhP39+nL1vx2urAN8MKaRuUpQ1bH871oIjE= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121422176319.07427668569846; Thu, 26 Feb 2026 07:57:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiL-0005KP-U8; Thu, 26 Feb 2026 10:55:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiJ-0005J9-6E for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:43 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiH-0003jN-8T for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:42 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-43984d7e49bso923876f8f.2 for ; Thu, 26 Feb 2026 07:55:40 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121340; x=1772726140; 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=+hTymfPw5nmljxwGgSjMdb3hfuVynPpInJ9OQiqTcV8=; b=YvQdDFNAd2TwdIkMxqauvxfHvvMi8W552PcL5iuWM+k7PUtX+SdV03bTFA5ENhlDOz XOXWcpYOTv+BL8XHrotd++ZaYCignVt+0nA1wBK8Fk9KZgyIPRYo/vAgt2A+9R1z/0zI lBIKyahR9I4YZXeQ8RCOASjuldH0Poxn1zGKtfv9mhavnMoPVJBbKREIGl7o+lcBUPGH h4pgca5DADOllwgTNs+mqbWZ8xJndA3vGZETA2/wx9GsfasAXKIQj4+GqTZPpKyeBEaO ItRtl9RQAt6GPwxdV7k35GJBuFU72hgTVlku8h+/4dzHGF9zzeBhBV9mZydYbgQV7OJD YjMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121340; x=1772726140; 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=+hTymfPw5nmljxwGgSjMdb3hfuVynPpInJ9OQiqTcV8=; b=hhzuYBu8QZ4SpFlCDxbpUUAa+hLcU8rLfAdCkRzRoxQUwS9MjwWvtXh0uvOE1YqUq0 pSKBtFIricnByYjOQNjaUmPFIJ0NyGowfFxRHGvMQt3l0aLHUcdWCiFK2gvU/IFoEMdp YLFXDVeNTInr5SOaPMT5sW1PGLlnddWjfgUosuTq8z1BV0ztTzAqBeHg69RG4zJPYx7f f65OLoJDI4LtbEunho2Kdrixyvp36z3nIVmvYypOj+bleVkbELTLwjLl70418ERS/M8W CASGcrqxaTBY73+rDOD6UzqsfKaqDHZ+IvKzdJiXxoCR2k8qd4naFwNCANfm4tZXhfJf 2e0g== X-Gm-Message-State: AOJu0Yxy5CYz6+/ASxVuJgiMDF1gKFdZIkeCqlAfp5ivM/tsyzq02xaw h29TypoEdw+2kVujIavnNM/5SPOs6PE+9PNa7UU45RAakKavwbEWaN0v64V3cxYJovrRwKetTjP ZQHaw X-Gm-Gg: ATEYQzwGnhE9w9GZwOzH8TmgmhNPEPOh1iDQUr35NGd1XJ4m1/Z+sxN1/mkLTYoPJ9j M4PfOFTaiMcIFOrQ7xGcdvifE21WYv85n4WQqDxAN8n1IU8HwhTH/yEpRLlyp8CyjtT+BRWyxED d0X2aGMMNlyo/ZjgHP1qxz5l6nMSKAv8/PQenXH60Hv8uPvFRT2Nbd1EAwYIdEEBcI1nB8NdtzU iQQJsUFz4FEuooDgQl/mzG1nf8yBsMW/u7BMrzR3BSEAe98Aboja9SbR/2wW1b0wiKKTqyDe/LH KAEERHjVrlE7VtYFi17h0qBHZtn/R2ff1akCn0CPzjYBvF1GOkgYpNB7vDD8BGFLeOEMibJHsDH VE30RT1tg4KxH+MnZ1ItH5X1JZLObp77xGgJ5WGSC2bKjoMH1yXhjAOO/xKrPQvDvlkDAw8W1Dr rEC3IqUOPklL0C0fR5BznLrDbOZz8lvgULBAatODSSNhhQApkDd4pAZEvpGfO09Z27vKuCEQ4Lk ZpniHBvIbiy90G3ZBRCj4eTqhEdXkHrJADr5XTBSg== X-Received: by 2002:a05:6000:184d:b0:437:6661:fcc9 with SMTP id ffacd0b85a97d-43997f3a499mr5004318f8f.50.1772121339569; Thu, 26 Feb 2026 07:55:39 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/20] hw/arm/virt: Add virtio-mmio-transports property Date: Thu, 26 Feb 2026 15:55:18 +0000 Message-ID: <20260226155535.1171290-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1772121424113158500 Content-Type: text/plain; charset="utf-8" From: Mohammadfaiz Bawa Windows ARM64 guests detect virtio-mmio devices declared in ACPI tables even when no backend is attached. This causes "Unknown devices" (ACPI\LNRO0005) to appear in Device Manager. Until Windows fixes that by supporting, add a new machine property 'virtio-mmio-transports' to control the number of virtio-mmio transports instantiated. The default remains NUM_VIRTIO_TRANSPORTS (32) for backward compatibility. Setting it to 0 allows users to disable virtio-mmio entirely. Usage: -machine virt,virtio-mmio-transports=3D0 Signed-off-by: Mohammadfaiz Bawa Message-id: 20260219173256.152743-1-mbawa@redhat.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- docs/system/arm/virt.rst | 5 +++++ hw/arm/virt-acpi-build.c | 2 +- hw/arm/virt.c | 43 ++++++++++++++++++++++++++++++++++++++-- include/hw/arm/virt.h | 1 + 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/docs/system/arm/virt.rst b/docs/system/arm/virt.rst index f8148b5dcf..fbe3ca9e12 100644 --- a/docs/system/arm/virt.rst +++ b/docs/system/arm/virt.rst @@ -226,6 +226,11 @@ dtb-randomness dtb-kaslr-seed A deprecated synonym for dtb-randomness. =20 +virtio-mmio-transports + Set the number of virtio-mmio transports to create (between 0 and 32; + the default is 32). Unused transports are harmless, but you can + use this property to avoid exposing them to the guest if you wish. + x-oem-id Set string (up to 6 bytes) to override the default value of field OEMID = in ACPI table header. diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 544004615d..719d2f994e 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -1154,7 +1154,7 @@ build_dsdt(GArray *table_data, BIOSLinker *linker, Vi= rtMachineState *vms) fw_cfg_acpi_dsdt_add(scope, &memmap[VIRT_FW_CFG]); virtio_acpi_dsdt_add(scope, memmap[VIRT_MMIO].base, memmap[VIRT_MMIO].= size, (irqmap[VIRT_MMIO] + ARM_SPI_BASE), - 0, NUM_VIRTIO_TRANSPORTS); + 0, vms->virtio_transports); acpi_dsdt_add_pci(scope, memmap, irqmap[VIRT_PCIE] + ARM_SPI_BASE, vms= ); if (vms->acpi_dev) { build_ged_aml(scope, "\\_SB."GED_DEVICE, diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 50865e8115..81e700f516 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1208,7 +1208,7 @@ static void create_virtio_devices(const VirtMachineSt= ate *vms) * between kernel versions). For reliable and stable identification * of disks users must use UUIDs or similar mechanisms. */ - for (i =3D 0; i < NUM_VIRTIO_TRANSPORTS; i++) { + for (i =3D 0; i < vms->virtio_transports; i++) { int irq =3D vms->irqmap[VIRT_MMIO] + i; hwaddr base =3D vms->memmap[VIRT_MMIO].base + i * size; =20 @@ -1223,7 +1223,7 @@ static void create_virtio_devices(const VirtMachineSt= ate *vms) * loop influences virtio device to virtio transport assignment, where= as * this loop controls how virtio transports are laid out in the dtb. */ - for (i =3D NUM_VIRTIO_TRANSPORTS - 1; i >=3D 0; i--) { + for (i =3D vms->virtio_transports - 1; i >=3D 0; i--) { char *nodename; int irq =3D vms->irqmap[VIRT_MMIO] + i; hwaddr base =3D vms->memmap[VIRT_MMIO].base + i * size; @@ -2826,6 +2826,36 @@ static void virt_set_its(Object *obj, bool value, Er= ror **errp) } } =20 +static void virt_get_virtio_transports(Object *obj, Visitor *v, + const char *name, void *opaque, + Error **errp) +{ + VirtMachineState *vms =3D VIRT_MACHINE(obj); + uint8_t transports =3D vms->virtio_transports; + + visit_type_uint8(v, name, &transports, errp); +} + +static void virt_set_virtio_transports(Object *obj, Visitor *v, + const char *name, void *opaque, + Error **errp) +{ + VirtMachineState *vms =3D VIRT_MACHINE(obj); + uint8_t transports; + + if (!visit_type_uint8(v, name, &transports, errp)) { + return; + } + + if (transports > NUM_VIRTIO_TRANSPORTS) { + error_setg(errp, "virtio-mmio-transports must not exceed %d", + NUM_VIRTIO_TRANSPORTS); + return; + } + + vms->virtio_transports =3D transports; +} + static bool virt_get_dtb_randomness(Object *obj, Error **errp) { VirtMachineState *vms =3D VIRT_MACHINE(obj); @@ -3535,6 +3565,13 @@ static void virt_machine_class_init(ObjectClass *oc,= const void *data) "Set the high memory region size= " "for PCI MMIO"); =20 + object_class_property_add(oc, "virtio-mmio-transports", "uint8", + virt_get_virtio_transports, + virt_set_virtio_transports, + NULL, NULL); + object_class_property_set_description(oc, "virtio-mmio-transports", + "Set the number of virtio-mmio t= ransports to instantiate"); + object_class_property_add_str(oc, "gic-version", virt_get_gic_version, virt_set_gic_version); object_class_property_set_description(oc, "gic-version", @@ -3654,6 +3691,8 @@ static void virt_instance_init(Object *obj) =20 vms->irqmap =3D a15irqmap; =20 + vms->virtio_transports =3D NUM_VIRTIO_TRANSPORTS; + virt_flash_create(vms); =20 vms->oem_id =3D g_strndup(ACPI_BUILD_APPNAME6, 6); diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index 8069422769..dba8ac7f2f 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -172,6 +172,7 @@ struct VirtMachineState { uint32_t msi_phandle; uint32_t iommu_phandle; int psci_conduit; + uint8_t virtio_transports; hwaddr highest_gpa; DeviceState *gic; DeviceState *acpi_dev; --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121484; cv=none; d=zohomail.com; s=zohoarc; b=N5NFcEBAhbkKhgWfig2DTnCvE3F3WZGJ3HoddUBIgoAYlxntSodRhT7sgbpRbzkvD13soBYgECdn8Vp6UsP20vD6JAEtVhDjdojAjrtzp7Yk91Cx6xRimEWnRnufFvGpdYQ9efYCdPl6WuwKFpniVn4OUztEp9YEhHf+F50Ffb0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121484; 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=LsYSqkEXXlF+Uy+d5bpFXeCPh+P+Oz2hTTvj2JRd0F8=; b=SQjiZDX5zaMEVVZ6p1Y+3/v86f630/Oul7JBbujFsMsTC5cFW57Rr+1zTxdUvQA9MViGt/vFO/TG69xAfQGGI7GpfdwcUByZONJAQ3BxOTHolhZ/XXi6Bk2v0bk4U6BFbna4+0Rztk4tHrqIcbVLrsTvU/Z5K6dQMx9t7IME00w= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121484280259.0591277891093; Thu, 26 Feb 2026 07:58:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiM-0005KV-MH; Thu, 26 Feb 2026 10:55:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiL-0005K4-CW for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:45 -0500 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 1vvdiJ-0003kG-Ti for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:45 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-482f454be5bso20764275e9.0 for ; Thu, 26 Feb 2026 07:55:43 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121342; x=1772726142; 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=LsYSqkEXXlF+Uy+d5bpFXeCPh+P+Oz2hTTvj2JRd0F8=; b=ZiWZXj3FfDuU/EQkcVRvwMhOdpxfzYyjAkCY0Xj3ekNk6XHP9fzyvfn3XrWzac07BC ZT/tepd6YCeG2c+JMQ62ys8cY6TTVUdU+d8xgr8N3XYZuICIdc6XDiA4IiXQjXRFWkIB WYd4GlMzHo2OQIBIS+b9OHriE3p6GLjeaycZJNNjsSaUjGJi7+hQJ7UPCL9BjGrGtZbl UD8Kgg94tuDGVQv/828FsABGjms3FSvadbGtPeUtyp6Mzlp8PP8kkS2TnXCglaLE6/Bd o5YajccSyNEkM9ycAwY8cC/ngBXRsy1gmVNmGdJqq4a0M98GTw3I1XnWVc8tf73Q8is3 yCZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121342; x=1772726142; 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=LsYSqkEXXlF+Uy+d5bpFXeCPh+P+Oz2hTTvj2JRd0F8=; b=BBq38IIinYtsShn/owgEbnB9mO1bcR4MdgaIRxG1YFBiT3EpgRvv/9Fuw1ajxwRTha J+6MfOD2GBy96PwUuXlNE10Gwbln10unmtO/4Oeit9qsV886eYO03ffIpkLcSl3unSBV 2ag6Fj3Nqv8m2oWomMoVxhl5zp+2vmNGpwLLS6T46MQhqaE5seunnpGzcfmwu3BE2GgD 8UIfjKzO59AgVCVXsKGynlYg49y+NrUoJhLRpOKO2AinLyDhm5/INLxuvQM3ORkNloUC 5hIKK8I0u6Lv5ZB4ATKwKOImJJOFlWmkCvsKk9EfXqyX8tfYSBq3uT7PW+7bTmuZdsXp B5uA== X-Gm-Message-State: AOJu0YzlWlphHuVKNMx/swaHwPRQUH+A3KhrnvumSUEuvQ80iVeBzR0d fM2C+avIxi2XLFrlX9EjA8XI5MTY0cDCrFiFeXiug5DgDdlSL83EYv1bokw5ebuMBqJfImqOOd8 wAL4q X-Gm-Gg: ATEYQzwIS1Ae1qLSpMsmgtUmagH8X9bUlIO/Qg5bIZiWRiZRkjPoHIL9mKolnZlyCVh azVXxnBPikou6bIItfgZ7cfgb/6XR47o3wnXU+TPXSzChI6Z1EvfufcJCSpBuJJK7NbACM9NRpp CbgBpsJ+SOgljZNJ1kuXWq+ipSEyOpS4ovmuVOaENn6NKOv4452I2NX3x8eaugdidkYB1p5QAZE WjPvBwmok/wEtpZUYTDO3BDxlsveQoRyJo7p2jn7zEGHjwexfAgyP0MDxUWZnSLRH7gMNnfZ5UE am3uGBO/py5fkrntlqQA0WL6ybDhtR03TDKxu2uzF50x+fgkyId7GyKmZ3jn+irg1QPGMdsxfEI WlNXreDQ6Uv4OHjgKuwbYIFpVLmEVGP8jNZEfPe9sHLudDm4+8JD0v4VV4KjW0WH3iBm5r0j6Qm miGASnsMcxAe1EornJjQggyl8SRg4a+HaYm2aAQWqy/d+HUhLbBZe9+PZ9NXDlXMm9WxiT2eoqt exUYpb3D+8VITXH2BaSGOpD5mfcryk= X-Received: by 2002:a05:600c:8b71:b0:483:7ea3:3de3 with SMTP id 5b1f17b1804b1-483c33c3606mr59317755e9.2.1772121342376; Thu, 26 Feb 2026 07:55:42 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/20] hw/arm/virt: Update error message for bad gic-version option Date: Thu, 26 Feb 2026 15:55:19 +0000 Message-ID: <20260226155535.1171290-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.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: 1772121486256158500 As we added different valid gic-version option settings, we forgot to update the hint in the error message produced when the user specifies an invalid value: $ qemu-system-aarch64 -M virt,help | grep gic-version gic-version=3D - Set GIC version. Valid values are 2, 3, 4, hos= t and max $ qemu-system-aarch64 -M virt,gic-version=3Dbang qemu-system-aarch64: Invalid gic-version value Valid values are 3, 2, host, max. Update the error string to match the one we use in the help text for the option. Signed-off-by: Peter Maydell Reviewed-by: Mohamed Mediouni Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Message-id: 20260219110228.3804482-1-peter.maydell@linaro.org --- hw/arm/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 81e700f516..cab2e21e8a 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3001,7 +3001,7 @@ static void virt_set_gic_version(Object *obj, const c= har *value, Error **errp) vms->gic_version =3D VIRT_GIC_VERSION_MAX; /* Will probe later */ } else { error_setg(errp, "Invalid gic-version value"); - error_append_hint(errp, "Valid values are 3, 2, host, max.\n"); + error_append_hint(errp, "Valid values are 2, 3, 4, host, and max.\= n"); } } =20 --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121464; cv=none; d=zohomail.com; s=zohoarc; b=muQ0tifd51gBR9xyUDvKMmR6AhC2cnX8CHsDAjaQQJ7KN8Ar+3okfFTvDZLAxBFLr4sX6w5YnTsCfwIJDqaiXnbPCLIcWCf9lXcOAEveKcLzZWrLSxp+XvYnKhlwacRjYof8F4kRQNOhv0QwHglstbXwfpXb2FZA9gWUUTk/kPo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121464; 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=+mciQe/DhwRxuQ2Cs7czBlK9up7Asg6C0YBSv/Jhi1o=; b=PJMpNdKTiCGe81ef57sYh/mrA/iPzFouYUTo+Iu2kg9UoPdkCZbMd7mdR215i9Po0NSjACj7epFzfmkGWRiqFqiXFecAC4SvPenwqs4m+fLJ7qpohq9P+bqCqyUmsHo4G9388EFV4QrSsGkyTQWsL/LB1R/MlmVj+alxYiRYgVs= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121464633855.2487318494157; Thu, 26 Feb 2026 07:57:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiP-0005Lw-Hl; Thu, 26 Feb 2026 10:55:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiM-0005KS-FO for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:46 -0500 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 1vvdiK-0003ka-QW for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:46 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-4398d9a12c6so817026f8f.2 for ; Thu, 26 Feb 2026 07:55:44 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121343; x=1772726143; 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=+mciQe/DhwRxuQ2Cs7czBlK9up7Asg6C0YBSv/Jhi1o=; b=mJchv5gtYustaPH4otI6X77pOn+tmPkYFNUCctRoEj7fovNacU/v0w2IbKOiY4C0bm japM8rwGFeCxQj56ZMN5YyJFPWS7N8Rdgim4p4nVTy9VBCY4qUasbYiEG0dk/Ghethtf OmtltGe4u7fyVM8ZW/miNq5R2mMjP6Dmc31p9MKEguo972AkFLg+adC46VmL9d9aRfg7 487NfDVbwMBiE4hY04VqsdigxI6dnWpYoao30BRBuyFnhQdSDx2XpcRzrErIv0fMUWZh MTZTFdgoMlYwoTCUyJU3EEbT+pmJXtmZZvzYwQ6iISaSVOjXCEnzjzh7d3NLtgn7U1+k fI5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121343; x=1772726143; 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=+mciQe/DhwRxuQ2Cs7czBlK9up7Asg6C0YBSv/Jhi1o=; b=AdPvOteegsCMeWZn+QUGN2uHFy9/ccYZHFi8Hn9YXt5W2q/bXz0+/0MfaorhmocBqM lTM950jUs1KtRo8D6c9aODFUZcMn/neeZuqu7+FRiyja93BPRfJWj9aKkCccM1visPiK /76BrHUm2r0RXXTCpnUMgRSca/ytg0N0LsJXbtu/2etEaO33XQqCS/dUmOXPxPqvtZ3Q AlmLbv4WPElHHK3Tvcjdz29b6nXlqA48vuEDi4FpX891jez2o2I1GyHqzzs8O+2DOXYy 91dpCX2wf9nGck8H7tcaXv/xcvlHLzF7mtjK27Xa59L7lexQdWiNsQHOOkvuqSP69v4f f/3w== X-Gm-Message-State: AOJu0YxYSINVUZEbmB1A4hx7A9OuomBOHb/FbuG6EebOS7uPsQ3ojYOp U0UvW330Zr3JoHvdL5o19a1HkfqHSt9ftdQTni7vUgLgvtFMr1fiIu8iEl2xX43dxBRhlGrpsQD WgvQo X-Gm-Gg: ATEYQzwwjgsIY83GZScON8OKwH/7D2LpaOZ3Lz5QdqVoO1I430gkT9P8BJdkZXRnv4Y jd6oSgnVr8GuFZgJZhPUqr4/VgWNV7HKotK1QtjHek3mENXWx7G2RzxYpOBLzMTG7uE9V7Jb5kU V3ONKIt9UdVc1w7ztP8Fzy++nFVYdTIh/THyiZSx7mhrWKA7wJstBGepaAT3HdhyCajMcTcJe+V 4aLXyNS33hv1ftkuBovSzFJ8LHdQYNKM+fnfAiviEPYyKJFOyKrujtWGw3XhI5Zu1BdE8l/8nws QrW3bxf+jiyEgX8vxVeRum74wzNZ5DgGNbb4rpslupEnrbug4Yfd5iJVQojXejFSx08RPajP6YL m4VR8GlwmlK+hz9dnvDnTDRO0otiA5s/B34eHn3ZjYoUgxKP+qOlgvo2lg6+h+MC91tBt9aFSe4 0KDZ0c0RjkJ6MNb73nEdBkwtpSPBalw/2N6ois62OoYmjbZc8OezNZM9WjKUVanQhW34E7ryUCW C5ARERW6ZZiuwgARj4pVyivkPzzJEo= X-Received: by 2002:a05:6000:2584:b0:439:8d48:544c with SMTP id ffacd0b85a97d-4398d485515mr15202578f8f.19.1772121343295; Thu, 26 Feb 2026 07:55:43 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/20] tests/functional: Make sure test case .py files are executable Date: Thu, 26 Feb 2026 15:55:20 +0000 Message-ID: <20260226155535.1171290-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.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: 1772121466106158500 Content-Type: text/plain; charset="utf-8" The top-level test python scripts in tests/functional are supposed to be marked executable; "make check-functional" doesn't care about this, but it allows them to be run as standalone executables to exercise a single test, as docs/devel/testing/functional.rst describes. A couple of files have got into the tree without the executable bit set: fix them. Signed-off-by: Peter Maydell Reviewed-by: Thomas Huth Message-id: 20260212151258.1750268-1-peter.maydell@linaro.org --- tests/functional/ppc/test_ppe42.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 =3D> 100755 tests/functional/ppc/test_ppe42.py diff --git a/tests/functional/ppc/test_ppe42.py b/tests/functional/ppc/test= _ppe42.py old mode 100644 new mode 100755 --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121386; cv=none; d=zohomail.com; s=zohoarc; b=fvhpgtucgZXEEBwojuK86yxBn6oWoXEilyfTn/fWYgfgOldRSi/QqlqnEHeCqUBJGme/cTclBO+nqXNYkiDFhoT3CnVZ66h7niZgFaipRPO4CeWCz6Z+WzMoHJY5k1uZNnmbwDiCHDdygspr3Er4NTc3poQRoFdbFakSZpLIL/E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121386; 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=lJhJpmRt2N+ostHQqi971o1Mv0Stne1iPkG3Ew0xXN8=; b=fvi9yUWa1uIJQbKdkUMbDKko7kbWSusGXnxnd960DaJObY2dQF01OOPJiD1FqU+QkuJKb3EGKhJ6NYoktmLh9Zrj4E/UpupgiplaXdtxzcoA/29VfeM5xQTHdqND88tephivfN01aRlr3Ea1L6F/gbdrjyU5KWklOrcp/p1rw4s= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177212138650524.89836802231173; Thu, 26 Feb 2026 07:56:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiP-0005Lv-H5; Thu, 26 Feb 2026 10:55:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiN-0005LA-V6 for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:48 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiM-0003ki-1I for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:47 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-43988056dc3so1040677f8f.3 for ; Thu, 26 Feb 2026 07:55:45 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121344; x=1772726144; 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=lJhJpmRt2N+ostHQqi971o1Mv0Stne1iPkG3Ew0xXN8=; b=WcsGH2iT92hnLQkbyw++rPUYKax7lG/ixgGQ6EU521uVolU4579k143nW4GTCahKPs 2QYURcxxe0E9EKMFM9fG4g0U5fd32GOBqGZg5zw/RZ+ckuICVdX6zAXP7RIcTnbdCaAE ESRdcJ5H9sLZCogde6OpFUaE3L9vXTXpWgi6VW/wsrxn3AwaZN4pdZ0rtZFZCLGoJ4Y7 34YJfj/6F+OXaorqcz6DdjnVEzydr0BoGiiyu/Ckqq4wDLEog+opuKwiWjy91O0e6YBb zD7grxvaZghjoKbw9OuyQJJLiEZgGmiWO96J19Xcm3bBvMVsMswpZM3Ozfyc7wDemTtB mjyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121344; x=1772726144; 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=lJhJpmRt2N+ostHQqi971o1Mv0Stne1iPkG3Ew0xXN8=; b=wdCOVz+eoAGeG4mqAt9uKAY5RcqxZumxqMEYoRg1UpCnHuPut/oou5XgAsFdLGaAVE PFJmcvZ3ZDVhLtuUNEWWeCMDjoIO5eMS5obi+NeE/Pvz/TMgce/Axi2EPb34WdTB9Pw4 PiOe9n1k0CBPic2muMtKc6Gags1pJDNIuueoerNId3WUHo11p5V87+OmGuOSZHGfnGa5 e/tN2uDJ9qPY3z92BUlArfDa/rhCYrt2GPo+jFBwcaJ4zKYG7ghGyd53T+VLSEcvbFkF pYviNTx+7BGMEOCWYqD/ZGrxkH6H15L1TFaoUXIjhAEHygDSjWU9Qm9I6S1gD4x4bl0O RsRQ== X-Gm-Message-State: AOJu0YwJ711ukxQ6iWNRzU+5Wm90h+DLiKRCN1j5SpS7EHOCanFIHlsC xa9osBtLjhj+bMSWtwcCBPdqy+3xhun3B2HBSiruTYjv+CYbPSx4k+/qydkMxvQIGaug2GPgTp1 Ly7h5 X-Gm-Gg: ATEYQzy1w2Q6uObs4XPL+jwGWIchXaOC3EGE2elZKP3AA1Fp50vUzjvQEf8vbFcdy4p Y+U82ae6aIBoeyVa3X6hHGfv6My1yGiwEeqY0n8M0J3AdyWA7nAE5tFzS3vxCpSWSC8V297nvCQ tYWNSVDuSZKhzNqBAl90f3IhYId+YnyIMHwyeZDmFewUqQNBTLuwNpdEo9w+lUm7yN2Ll57OgSb 1R79Zw4tdNC9F2ah9izxKkGAr7dWIQa0EI6O0twceCrAMTzh6sc/8YtxrDoj4zWCp99dcjg7tQn FqGzIrxHpu/4bRy78Q4LewhjWHgylBIWhLVmKbVWd3vx1ug6+ufqOmM8YLpnSOTru6++CZGb9+o ItqL4iK+b9yo06C92aooJrcfDVXvQ/QxenLoQzK4ACR1HX+iy22aFLR2XzNOiXjRbphwn+1l9tx KCrEwhFLTp1q41DCAAnCHRQt7Y6cGmuNkzBXl7AIzkFpA4Cy4kkQqmqpg6/7eKsQBsWo+jDZ26K 7yvgXSrWRrwUUkAuaEOKQRKgZPsxMw= X-Received: by 2002:a5d:5f43:0:b0:436:d9b:cd02 with SMTP id ffacd0b85a97d-43997e65811mr5012169f8f.0.1772121344116; Thu, 26 Feb 2026 07:55:44 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/20] target/arm/kvm: add kvm-psci-version vcpu property Date: Thu, 26 Feb 2026 15:55:21 +0000 Message-ID: <20260226155535.1171290-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1772121387876158500 Content-Type: text/plain; charset="utf-8" From: Sebastian Ott Provide a kvm specific vcpu property to override the default (as of kernel v6.13 that would be PSCI v1.3) PSCI version emulated by kvm. Current valid values are: 0.1, 0.2, 1.0, 1.1, 1.2, and 1.3 Note: in order to support PSCI v0.1 we need to drop vcpu initialization with KVM_CAP_ARM_PSCI_0_2 in that case. Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Sebastian Ott Message-id: 20260220115656.4831-2-sebott@redhat.com [PMM: adjust sscanf to not permit negative numbers] Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- docs/system/arm/cpu-features.rst | 11 ++++++++ target/arm/cpu.c | 8 +++++- target/arm/kvm.c | 48 ++++++++++++++++++++++++++++++-- 3 files changed, 64 insertions(+), 3 deletions(-) diff --git a/docs/system/arm/cpu-features.rst b/docs/system/arm/cpu-feature= s.rst index 3db1f19401..ce19ae6a04 100644 --- a/docs/system/arm/cpu-features.rst +++ b/docs/system/arm/cpu-features.rst @@ -204,6 +204,17 @@ the list of KVM VCPU features and their descriptions. the guest scheduler behavior and/or be exposed to the guest userspace. =20 +``kvm-psci-version`` + Set the Power State Coordination Interface (PSCI) firmware ABI version + that KVM provides to the guest. By default KVM will use the newest + version that it knows about (which is PSCI v1.3 in Linux v6.13). + + You only need to set this if you want to be able to migrate this + VM to a host machine running an older kernel that does not + recognize the PSCI version that this host's kernel defaults to. + + Current valid values are: 0.1, 0.2, 1.0, 1.1, 1.2, and 1.3. + TCG VCPU Features =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 10f8280eef..60f391651d 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1144,7 +1144,13 @@ static void arm_cpu_initfn(Object *obj) * picky DTB consumer will also provide a helpful error message. */ cpu->dtb_compatible =3D "qemu,unknown"; - cpu->psci_version =3D QEMU_PSCI_VERSION_0_1; /* By default assume PSCI= v0.1 */ + if (!kvm_enabled()) { + /* By default KVM will use the newest PSCI version that it knows a= bout. + * This can be changed using the kvm-psci-version property. + * For others assume PSCI v0.1 by default. + */ + cpu->psci_version =3D QEMU_PSCI_VERSION_0_1; + } cpu->kvm_target =3D QEMU_KVM_ARM_TARGET_NONE; =20 if (tcg_enabled() || hvf_enabled()) { diff --git a/target/arm/kvm.c b/target/arm/kvm.c index ded582e0da..c46ee9620b 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -485,6 +485,28 @@ static void kvm_steal_time_set(Object *obj, bool value= , Error **errp) ARM_CPU(obj)->kvm_steal_time =3D value ? ON_OFF_AUTO_ON : ON_OFF_AUTO_= OFF; } =20 +static char *kvm_get_psci_version(Object *obj, Error **errp) +{ + ARMCPU *cpu =3D ARM_CPU(obj); + + return g_strdup_printf("%d.%d", + (int) PSCI_VERSION_MAJOR(cpu->psci_version), + (int) PSCI_VERSION_MINOR(cpu->psci_version)); +} + +static void kvm_set_psci_version(Object *obj, const char *value, Error **e= rrp) +{ + ARMCPU *cpu =3D ARM_CPU(obj); + uint16_t maj, min; + + if (sscanf(value, "%hu.%hu", &maj, &min) !=3D 2) { + error_setg(errp, "Invalid PSCI version."); + return; + } + + cpu->psci_version =3D PSCI_VERSION(maj, min); +} + /* KVM VCPU properties should be prefixed with "kvm-". */ void kvm_arm_add_vcpu_properties(ARMCPU *cpu) { @@ -506,6 +528,12 @@ void kvm_arm_add_vcpu_properties(ARMCPU *cpu) kvm_steal_time_set); object_property_set_description(obj, "kvm-steal-time", "Set off to disable KVM steal time."); + + object_property_add_str(obj, "kvm-psci-version", kvm_get_psci_version, + kvm_set_psci_version); + object_property_set_description(obj, "kvm-psci-version", + "Set PSCI version. " + "Valid values are 0.1, 0.2, 1.0, 1.1, = 1.2, 1.3"); } =20 bool kvm_arm_pmu_supported(void) @@ -1976,8 +2004,12 @@ int kvm_arch_init_vcpu(CPUState *cs) if (cs->start_powered_off) { cpu->kvm_init_features[0] |=3D 1 << KVM_ARM_VCPU_POWER_OFF; } - if (kvm_check_extension(cs->kvm_state, KVM_CAP_ARM_PSCI_0_2)) { - cpu->psci_version =3D QEMU_PSCI_VERSION_0_2; + if (cpu->psci_version !=3D QEMU_PSCI_VERSION_0_1 && + kvm_check_extension(cs->kvm_state, KVM_CAP_ARM_PSCI_0_2)) { + /* + * Versions >=3D v0.2 are backward compatible with v0.2 + * omit the feature flag for v0.1 . + */ cpu->kvm_init_features[0] |=3D 1 << KVM_ARM_VCPU_PSCI_0_2; } if (!arm_feature(env, ARM_FEATURE_AARCH64)) { @@ -2015,6 +2047,18 @@ int kvm_arch_init_vcpu(CPUState *cs) } } =20 + if (cpu->psci_version) { + psciver =3D cpu->psci_version; + ret =3D kvm_set_one_reg(cs, KVM_REG_ARM_PSCI_VERSION, &psciver); + if (ret) { + error_report("KVM in this kernel does not support PSCI version= %d.%d", + (int) PSCI_VERSION_MAJOR(psciver), + (int) PSCI_VERSION_MINOR(psciver)); + error_printf("Consider setting the kvm-psci-version property o= n the " + "migration source.\n"); + return ret; + } + } /* * KVM reports the exact PSCI version it is implementing via a * special sysreg. If it is present, use its contents to determine --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121473; cv=none; d=zohomail.com; s=zohoarc; b=IEZ2ruH34PAKEnN9EpzILgOYsj6zg09dtTbUqXNNjhau3n25YkXu7GLXDhyVE1MWjWbcccBjndDH9n3xitpn1z/F9GpUVxAkEp1AF95q/wnICujdEIEZNfzeaffWFksRRQsIss/I9GULh2dcCgskusR6TPl22cza4OimAN+XLNs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121473; 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=9JJmQIaiVFL0Mge03bSjQhlB7hltQcjiAuFGOTxguH4=; b=nL48fACB+lqoHaGdmYNhJlNPDN9N8eZHm2lqShkZXO2sEsepJgJ1konn/wJsjPFyVhtoEr0dHIK4i5yPWDiV0t8sFV59C20B7xlM9cCc7JSr+IIUHD0GKndmBjF8kkyuifYDPZQJCWtYem9gW84vC2LFnNyv7sNPfak+qZp3iDo= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121473722704.865646385893; Thu, 26 Feb 2026 07:57:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiR-0005Na-Nu; Thu, 26 Feb 2026 10:55:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiP-0005Lc-6k for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:49 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiM-0003kr-Lg for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:48 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-4398d1f06caso961964f8f.0 for ; Thu, 26 Feb 2026 07:55:46 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121345; x=1772726145; 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=9JJmQIaiVFL0Mge03bSjQhlB7hltQcjiAuFGOTxguH4=; b=c6NyRxMqRJZQ+fA1Z6G7mo/lZ0GEQb7DdOzxno2hXvp2x9bvMxBSNlYsvz1bSOojY7 MAvZm4reG+JUt71u1PGcFakYrzgP8/qhP0aN54L4EoOxVrM4yRXH4tT+sBrreXtGQiU9 gLdYXYQeu1VvlUd602Uwjf50a7kQ+q/Q3Fj7FgKkIMzomhqNc7UfEkPZKZDFF7Fnxk0q Vuh2Isq2ynGC4xZegWTjN/yKK1KvbylmeRwsNnvDa+bKXtGEb1rk93p8NNwALSlHlMPa BKcpebC6ETbBKUYkHO6KKX9yZr31buXenYclyiHwHFAsm+Bfg7UmcXKPFGKoYmYgnfjO uxfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121345; x=1772726145; 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=9JJmQIaiVFL0Mge03bSjQhlB7hltQcjiAuFGOTxguH4=; b=ba/tkFer9u9ajCLgo7BnSjsIXHUqb2CKOibxqIVUdxUZAMmXUkuo2199CmLBth4WNb Mka29t19xaq2qY3sETb6r3p1mdwOI9MgL6dJV/hIVJb8zQWExbPsMjSgs3htDYl9ONlz lJTBdieciA23hLaCiHCK7vlZgqc2MJyoCfBowJU3S+mslNvDZOHdPPWyUHBPjTwclEUU jReXB9/02lUM2TySgWzuVKUXNHHn9SQ7uuvMpxtKGse13/HaKSV8/c37aaiugDP33tkq 9Y8fF170jj0BEltivHP1Zlp1kmL9c8eO0e0xsfHfpajtNKg0ZWs//nuIjfd22VwGbcFM UXrw== X-Gm-Message-State: AOJu0YzlfMccLwaEkBvDW626q5NotdCxe75NssuNy0V1NJg9gfKw+B6K cB6fjW+EFtBy8mHQwi744It6U4WlJD7/WVE8DybXFATaYZxQIOALu36FKAq12roZ4FejGbd3ZKu OwL8x X-Gm-Gg: ATEYQzxJBviGD3/JQDpCbsDodCiU4AWOYncszJCFhM4pbBIfyhaBhyZBe3CJHAkJE6R 8hK5fU7gsSRPVMpUtcWEKvSTF8alRv5gTRfzE6gZR8BhChpzMgmI+vvzVVLLIj4Onjta52HZtlZ vxilsm82gmuE3BN6Mi17+wXAKIgin7hPDyrgvtwG7rL+YXXlapkFEkxZoKAT1Z1JE2fGnRVsCTt Z3yikFWkVRtYu9Odn+HNlC12f4DYSb6MqKxzOT21VsRQv8655MmFv8OI/YlEWB6WZ/+9+4f5o9S 6s68R2uRQ/NgVKPPZ2P8P8sHseHizy1xVDb5yDHoqmLgsHvD482d9ASGgpF7hQD3jTSIlM2GSBI 6Wgp1El9QFLGWq9Hv7L6uXP1OhTiHfz10j6WeOmId0sShTZvQrSm3tcngKGcPR35QXEiIIeUsFC 0uQuCCWWIulGVTME0Q//mlbD2ulVAqg0TemSRBAbi7c20b3uamPGAeVehJ+zr4qp8r81Gtu2Hmj 9ss+rdl8xAOBbrEIMaGXkJvOha6Y6I= X-Received: by 2002:a5d:64c9:0:b0:436:8058:452 with SMTP id ffacd0b85a97d-439942f2c8fmr9772213f8f.44.1772121345026; Thu, 26 Feb 2026 07:55:45 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/20] Revert "target/arm/hvf: Sync CNTV_CTL_EL0 & CNTV_CVAL_EL0" Date: Thu, 26 Feb 2026 15:55:22 +0000 Message-ID: <20260226155535.1171290-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1772121474127158500 Content-Type: text/plain; charset="utf-8" From: Mohamed Mediouni This reverts commit bfbea371ef2cabc47effac5a286e2644d727a8d6. This commit breaks VM save/restore: Assertion failed: (b), function hvf_arch_get_registers, file hvf.c, line 66= 7. zsh: abort ./qemu-system-aarch64 -m 8192 -M virt,accel=3Dhvf -cdrom -= device virtio-gpu Signed-off-by: Mohamed Mediouni Tested-by: Zenghui Yu Signed-off-by: Peter Maydell --- target/arm/hvf/hvf.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 1b19d9713e..d79469ca27 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -200,9 +200,6 @@ void hvf_arm_init_debug(void) #define SYSREG_PMCEID0_EL0 SYSREG(3, 3, 9, 12, 6) #define SYSREG_PMCEID1_EL0 SYSREG(3, 3, 9, 12, 7) #define SYSREG_PMCCNTR_EL0 SYSREG(3, 3, 9, 13, 0) - -#define SYSREG_CNTV_CTL_EL0 SYSREG(3, 3, 14, 3, 1) -#define SYSREG_CNTV_CVAL_EL0 SYSREG(3, 3, 14, 3, 2) #define SYSREG_PMCCFILTR_EL0 SYSREG(3, 3, 14, 15, 7) =20 #define SYSREG_ICC_AP0R0_EL1 SYSREG(3, 0, 12, 8, 4) @@ -505,7 +502,6 @@ int hvf_arch_get_registers(CPUState *cpu) uint64_t val; hv_simd_fp_uchar16_t fpval; int i, n; - bool b; =20 for (i =3D 0; i < ARRAY_SIZE(hvf_reg_match); i++) { ret =3D hv_vcpu_get_reg(cpu->accel->fd, hvf_reg_match[i].reg, &val= ); @@ -635,16 +631,6 @@ int hvf_arch_get_registers(CPUState *cpu) =20 aarch64_restore_sp(env, arm_current_el(env)); =20 - ret =3D hv_vcpu_get_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CVAL_EL0, = &val); - assert_hvf_ok(ret); - b =3D hvf_sysreg_write_cp(cpu, "VTimer", SYSREG_CNTV_CVAL_EL0, val); - assert(b); - - ret =3D hv_vcpu_get_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CTL_EL0, &= val); - assert_hvf_ok(ret); - b =3D hvf_sysreg_write_cp(cpu, "VTimer", SYSREG_CNTV_CTL_EL0, val); - assert(b); - return 0; } =20 @@ -656,7 +642,6 @@ int hvf_arch_put_registers(CPUState *cpu) uint64_t val; hv_simd_fp_uchar16_t fpval; int i, n; - bool b; =20 for (i =3D 0; i < ARRAY_SIZE(hvf_reg_match); i++) { val =3D *(uint64_t *)((void *)env + hvf_reg_match[i].offset); @@ -771,16 +756,6 @@ int hvf_arch_put_registers(CPUState *cpu) ret =3D hv_vcpu_set_vtimer_offset(cpu->accel->fd, hvf_state->vtimer_of= fset); assert_hvf_ok(ret); =20 - b =3D hvf_sysreg_read_cp(cpu, "VTimer", SYSREG_CNTV_CVAL_EL0, &val); - assert(b); - ret =3D hv_vcpu_set_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CVAL_EL0, = val); - assert_hvf_ok(ret); - - b =3D hvf_sysreg_read_cp(cpu, "VTimer", SYSREG_CNTV_CTL_EL0, &val); - assert(b); - ret =3D hv_vcpu_set_sys_reg(cpu->accel->fd, HV_SYS_REG_CNTV_CTL_EL0, v= al); - assert_hvf_ok(ret); - return 0; } =20 --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121490; cv=none; d=zohomail.com; s=zohoarc; b=m6pXPFuhpedcUHJm24pkRA4AHU3p0/4yAeA8tmvswa2UC2chjtsffFDY8qlYm9NVe2sfJWA2gPx3TDpnGvqnXCx3uTJqiS386CCRpWQwh5QtTMscAQvNOc/AJylkcDpMhZt33gXgzTCN2WJLFOAfJgYxIFV36i4nKjrhmnvXgLc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121490; 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=82Brr0YvOlbheI6QWvURVsHrUoU94tjkyWs7+ZtfLW8=; b=Jnon8ipYff4EBrZimsICrfHVCv36QXY0tnbVh7yZH7fs2gHcBA9565rh/6GlNbRboEZwyLgWcs+8VxPsh5nViBNNbJT2BUNo7M3lHX2YBEYLTTeD3YzAR9MpHBBS7ulpKLhJk5fbVzPQ7nrcXVLf0DC28uKgQDC/ZVS/khBJw5I= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177212149023082.12588972442052; Thu, 26 Feb 2026 07:58:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiT-0005O8-GK; Thu, 26 Feb 2026 10:55:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiP-0005Lk-DL for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:49 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiN-0003l3-Ba for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:49 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-4398ebdf520so1371610f8f.0 for ; Thu, 26 Feb 2026 07:55:46 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121346; x=1772726146; 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=82Brr0YvOlbheI6QWvURVsHrUoU94tjkyWs7+ZtfLW8=; b=pG226ybjs1uVn+BC+QdATAQg6qLgN6MtiE97Fzuj35rdsm2dauNTShgopKKSrYlpL4 48lK4dvRXHb1f7JsDGhqMb6U3KpG29WB0XpFosEQu6A7BkYqqMbS5HktHEXjHPUF4r4m l471V+oiDVQnEjENoH7jHdBoUuZzDfagIWSGZhoe54sd1C54Bef//h6katOlmRSI6E35 JIxXzzKlRs/siwZqbhHp0ehqcy3KeoN5ALJkTPL1zGUHL4RhalDkoi5bRHtagHE1VI2t n26k7zFFonuNNLb0VSc6CqcHowfHbuREOPh/RqFHPaTWIyYYTUx/80R8WX1C6SczdknE byAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121346; x=1772726146; 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=82Brr0YvOlbheI6QWvURVsHrUoU94tjkyWs7+ZtfLW8=; b=GnB+DUsLQTla6pa2clZyN7wGDWWlbfqY7wS6f59dGgoBd7UFSNznq31gkcLfszyGXl AkL3aBwO8I7dKafc9MVoERScGCz49R6nib8xEFF2m2n20dH5nBvLAOT+4+OgzDfTaLuD gNH7ZKrOIoYSEdDe/lf4eVyl3+np08I7EdfyooVTmDbhEzX6tk7zrO5iVO/rdMSozUer mvCaKDeq2YZnv5mPqAfXMh9cRPPWmgGLXDpcUuXcqkGJAuXPNmNiEX7EAG02xNkNIAwj d2nOtJkRwB1qmjyJItFsUYnXy51gn6L+a9iQdhtwfIL48cRAwx+ImHab+p5hF1+jwAas MbHQ== X-Gm-Message-State: AOJu0YzRpAnGeQWpB1+1aQPfMgRL9Vpanc1JUyyhKyg8odbVcoXgEu/G gbefu5yy+3Mcwg1w3qQa8FrkX4jSRK8n+fRmSn8R/DVX6Q667zItxSwyvqwXNg+VsItZW5T8jSP LS6Zy X-Gm-Gg: ATEYQzwpQvpFvG8HNGuGihPK0gbXP5ULpmNGmMoxC4DJe48ENURk4z1iR8Cgnyp5Oqo 8Oa3kgqR+IYUT3xw9qK/TbYVlMGyj0+Q+Njnk2YnfP/f/kwRpKbVqGab3tD9w6XV/fCflghpYaN UMDH6kKxfSv/Dlh+AB5X1DI5hfTZ+PtUuZ2KIX+0ZGyGZgk+8JQoLnVCd0ReG/5ni0ojciboDWF IwRw/Ha0CKn2TQZEEzN0t9lK6JI2eu8cuVDDo7Ex5itJWGkhGT4PgLi2OhZccJRcBsVyGQ+xxUu SwyAG4fMo+EeQ/Wnw7rC8lGfSttZ10H+4y2biTi0HJwlT5d79BVfMKFU5VgrtxKQHPxwCR/G+pC lJLoxiTDF4ZjuPwjgtvUXotw1/ONPEPPKnmkw4tpyRIjCabSGncjtgu/v/bPEoTWv+EWaAeS9NY MCun7QpIgD8nvv9CkCHVUfzOfvne0ItHm7zZ5lohoYuHzNc6kpVXvz02WkMoWORbQ6vXgvCQm+X hIuX6YonPfEN13ZP5hGskK8LMVfgYo= X-Received: by 2002:a05:6000:2f83:b0:439:9572:529c with SMTP id ffacd0b85a97d-439971d2b3cmr5801814f8f.27.1772121345889; Thu, 26 Feb 2026 07:55:45 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/20] hw/cpu: Build a15mpcore.c once as common object Date: Thu, 26 Feb 2026 15:55:23 +0000 Message-ID: <20260226155535.1171290-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1772121492467158500 From: Philippe Mathieu-Daud=C3=A9 a15mpcore.c doesn't need to include the target-specific 'kvm_arm.h' header, it only lacks the qemu_get_cpu() declaration which comes from 'hw/core/cpu.h'. Include the latter and build as common object. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20260225034451.41338-1-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/cpu/a15mpcore.c | 2 +- hw/cpu/meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpcore.c index 28cc4b3a4b..28cda55ccf 100644 --- a/hw/cpu/a15mpcore.c +++ b/hw/cpu/a15mpcore.c @@ -22,10 +22,10 @@ #include "qapi/error.h" #include "qemu/module.h" #include "hw/cpu/a15mpcore.h" +#include "hw/core/cpu.h" #include "hw/core/irq.h" #include "hw/core/qdev-properties.h" #include "system/kvm.h" -#include "kvm_arm.h" #include "target/arm/gtimer.h" =20 static void a15mp_priv_set_irq(void *opaque, int irq, int level) diff --git a/hw/cpu/meson.build b/hw/cpu/meson.build index 9d36bf8ae2..9c1535ca32 100644 --- a/hw/cpu/meson.build +++ b/hw/cpu/meson.build @@ -4,4 +4,4 @@ system_ss.add(when: 'CONFIG_CPU_CLUSTER', if_true: files('c= luster.c')) system_ss.add(when: 'CONFIG_ARM11MPCORE', if_true: files('arm11mpcore.c')) system_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview_mpcore.c')) system_ss.add(when: 'CONFIG_A9MPCORE', if_true: files('a9mpcore.c')) -specific_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c')) +system_ss.add(when: 'CONFIG_A15MPCORE', if_true: files('a15mpcore.c')) --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121518; cv=none; d=zohomail.com; s=zohoarc; b=Rw5M6vqSZegMr7ogUJIUe3JklJbBkFp+1hFPsVlt0e7GS2s6IeLccYfsUWGlvvztqLztK4oc4EpubIdhFLEbT1A/gbq5Y+w/MVZZWG9MKpkPM0AP3iixEHRMEVBw2NcZw1CqyfmPyicrKz9aL2jXeJc7Ethe+BwQ75k8k4P8wss= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121518; 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=72QGaHRSSUmNZ4fPR2Rby3J+3BzAqdEiwb7T+/2jw7g=; b=idsep+n4KF3etoexw3e1NwKVYLeI/Cm81Jzt5wXoNH9ycq2hnQP48DbXWieX1K37yFFXQ0RKFqm0Y6Pp8YHU4nzKjsnP3KKJSxkv6ozRZXNE0ppF7CMagjFgzttE3/g4ZmTXtHGM23tPGnt6lS7Lo7bQcD1crJEl6BBYG8ezRVo= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121518565989.5768293310335; Thu, 26 Feb 2026 07:58:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiV-0005OQ-7N; Thu, 26 Feb 2026 10:55:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiQ-0005MW-2T for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:50 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiO-0003lD-Dv for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:49 -0500 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-439857ec679so900151f8f.2 for ; Thu, 26 Feb 2026 07:55:48 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121347; x=1772726147; 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=72QGaHRSSUmNZ4fPR2Rby3J+3BzAqdEiwb7T+/2jw7g=; b=AAhpa6igk64L/lkF0NLVBYoBABU3dAYuwnLJjBNjXcABovVlAdZwZzQSkpZL+Wbf0/ 7OAuZQ2WyER/ekDk+bcy+WEDOAR4eJbskyv2ITJUPYU+mfThGbtcxs2DRD2oQJYr/tAP b0bnBV5nBxJf3LH80b7yoxFOAHOu7jdD0VV3EHIC5yw70P0qYGAoBmM9Vx2my68kdINn 5mq18XY0NlVi7X3VDdFnhrrLmJfAwmY1Z0sCcPJppQmDK4uzw4OCk9WIr0PWSweNEzI4 jyHy9xK4pjiqa5k39ut/pLEFrT8QRCVBQe+Wk5Ak66b+FC1qDfxGktJ0dxX6MHbVc81u uHRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121347; x=1772726147; 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=72QGaHRSSUmNZ4fPR2Rby3J+3BzAqdEiwb7T+/2jw7g=; b=URmOmru49owkmBKSNZBnbyO3eWnV3QuHeHhOTKJyN2wOCrB/joodcs6J1dfIWz0ebq gtj71vXIxdC1OTmdTTB7wbcUnB4MF7x+d+jkPMdtuCQdPsZVubA2zHYcLLbp5YGYDDji 4QdztVmlYTZa3fq+9Pq0KaHr/0zJcCMZt/SiO+2WsNVTZHPUzvQoIC3tinLaPGfsBZWc T/NFSc+jrRjpOlYIPCD+X1oD0LzuWMuwtu64rvry45qVk65oM9EvF9PHSSIJRNXY+Caz 0MajagWuLiKS3KZDmUZW+BX6mCHlVN9DCbqj31s2r/QN4HiCRvo/h7avcD2cfAK3eMTD O9/w== X-Gm-Message-State: AOJu0YxhDNhrGHfRxul9yQCp45DGKsz2bjZpmK20EQhQFPpWMeuHIbHX BveVWfV/QdVKXspFO0VbITuUmY1eLP3QAUiUQ1WHuObHvDnPh7Su8BwrWjPIjhXAChDsocYspRN Az2Op X-Gm-Gg: ATEYQzxjbYR6aKvVS2hv5VcmkDwZQ7+5njLSJKYJu5pbIjAwRcb7FtWVJywOK8Y0b0W YBvqOGyZ7wL7V5fiWwYkz0gvgYzINCow/3KSkXrZcnZ5o0VIHmsto2edu32xWxuljM/ypmLGcIH 6JkOjRTQ9cR+LweAQConjOPPQN8YuN+YskbITd90xTA6N5QjrX2UP7R1Cqk9nQJKtnf+TAoznHm yxroH45FlBCZd80LaF8fi2ETk3hPBLeskgM+OskLTisLJnTyZOFMjDRaAkyoW1wsSDWxG+FHEBk gKkuU1xBM0hxIiaSeJ+8SJIxi1u9LlIJ6MIbfKQ1kLX2/CaczqzjXFfrbqdu5Kd+5PVYnPiFEpV 2RSEh93AeAE8Zgju53pa7C09MK7IGGeF2HXO9bfia5D6iq6ifBET5dU25Zq/qnXxbxdFDnovYB5 a885pqp0ODIuPkdwQIP7SsJg/lq1d0erGrhnso/AakgfCaA7SVoeZeBW5zFvh6K1H1cbEbAB2Ho e5QwEOTCuIvSFN7BNj/OXWbzsBbcBU= X-Received: by 2002:a05:6000:1866:b0:439:8580:18e with SMTP id ffacd0b85a97d-439943083f6mr9034507f8f.55.1772121346761; Thu, 26 Feb 2026 07:55:46 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/20] hw/misc/allwinner-cpucfg: Remove use of ARM_CPU() cast macro Date: Thu, 26 Feb 2026 15:55:24 +0000 Message-ID: <20260226155535.1171290-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1772121520449158500 From: Philippe Mathieu-Daud=C3=A9 allwinner_cpucfg_cpu_reset() doesn't access ARM CPU internal fields: no need to cast, pass a generic CPU pointer along. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-id: 20260225034720.41495-1-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/misc/allwinner-cpucfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/allwinner-cpucfg.c b/hw/misc/allwinner-cpucfg.c index 3a1526bda0..f8dbfdd120 100644 --- a/hw/misc/allwinner-cpucfg.c +++ b/hw/misc/allwinner-cpucfg.c @@ -84,7 +84,7 @@ static void allwinner_cpucfg_cpu_reset(AwCpuCfgState *s, = uint8_t cpu_id) =20 trace_allwinner_cpucfg_cpu_reset(cpu_id, s->entry_addr); =20 - ARMCPU *target_cpu =3D ARM_CPU(arm_get_cpu_by_id(cpu_id)); + CPUState *target_cpu =3D arm_get_cpu_by_id(cpu_id); if (!target_cpu) { /* * Called with a bogus value for cpu_id. Guest error will @@ -92,7 +92,7 @@ static void allwinner_cpucfg_cpu_reset(AwCpuCfgState *s, = uint8_t cpu_id) */ return; } - bool target_aa64 =3D arm_feature(&target_cpu->env, ARM_FEATURE_AARCH64= ); + bool target_aa64 =3D arm_feature(cpu_env(target_cpu), ARM_FEATURE_AARC= H64); =20 ret =3D arm_set_cpu_on(cpu_id, s->entry_addr, 0, CPU_EXCEPTION_LEVEL_ON_RESET, target_aa64); --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121448; cv=none; d=zohomail.com; s=zohoarc; b=oJGw/D3u9pTj7d0kg/YzQ8EJbEdNIXnmmeZnEwTChommmbHDPff7o7rjfjd+BOsEABAnLzLKv01nIg0v5MyNhpVcworMrWO94MDrTXtbqF/MJkPNmYMmTWk83eGd84zJ3fylNPo76PUu+bFD0RwpIfNzuRRazkwZIxB+NE4wpkU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121448; 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=WSrDqWRIaOtHv55qkOHl6cQ041BeMEi4R6eKWEMbzxg=; b=j+YeSAln2RV3db4/ruCkN5ClRr0QE36IlcAQPzwgKBdesaO1ZMcRd4LBielrNQtUkC0SAYIMZuhmx1WVUt6/RXkiJXMLub7ZoB3t4iwpkdxIVGXgi2l2R5Y72PHEzGy/XJywJSADX2r7pLEM6uD6A0MMJwhlCuXjN/StwXK4mwo= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121448377356.93783808622527; Thu, 26 Feb 2026 07:57:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiW-0005PK-So; Thu, 26 Feb 2026 10:55:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiR-0005NR-Ah for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:51 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiP-0003lT-Di for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:50 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-43767807cf3so724232f8f.1 for ; Thu, 26 Feb 2026 07:55:49 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121348; x=1772726148; 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=WSrDqWRIaOtHv55qkOHl6cQ041BeMEi4R6eKWEMbzxg=; b=azgW3ySR+A7o/YLufLDKdVz6rzul5j7z5fkrHIkIJmiWOyo63ACIq0IrYIsLYbqIsV wYTFosx9EOpJEIO2M7BlgH6ItjED+sAADCt7TYvHA6MAPCwS1u8zTeIwGAPZMeuUOHJt ejPvQcXZen5+8lXvw1TsRb0SWOcLfNKi1KP++aztOadXNjGiiAnDFLKoOSc4OGLfaElZ IaqPpGzyUUPvde0YzZVFDOogF7LJ1XicXl36k5G6h5rQ3sBQdgNwCsnENDBUSpYUalE7 B4vIzafamEdLORM1dKOmUBnsFFiqzjqyZa0k6dxoAapqv8R5D+q9Iw0WrgNMTgUGFDrA GumA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121348; x=1772726148; 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=WSrDqWRIaOtHv55qkOHl6cQ041BeMEi4R6eKWEMbzxg=; b=ccXgevwaXLxDyrsOh0aKHnlqKG3GovnAoXhO8pydrHeUPLNxqtLEDuVBTWUaQmOL0o qftx5SZKk+1WwWVyrx4nTAUCYlMmw9sU9Cl8gJiXjwaIElfweY5WM+p/VlQqC7MzBjX3 TSFzwwHZSalaAkMzryQEw6vU1L7PUft8kw0Agb/TYUvrO5yuopRyClA9aIhVt1MbJswq oq41QDJ8mQFxfVdfOoKGKJEO3ESbVSxRByF5dc0BzssqBVtftUtuNGgSmhUcTEsYyOvC g+YIlgSoBZImcb9UqywdkuRu+R+uZ19ntFUuN8BpwqjaBrscvMB/SRkjVpmGo8rgxDcQ C3GA== X-Gm-Message-State: AOJu0YwjH/5SyyuBSQoYq8/ajcCDGopeOQaVZruAZoubWbb0EGSuTnR5 /kj6YtlPKv72fAWLDHcZVIVU4uGTKRP5QeNThRfI8m132F+H40DvJF4IwNsQOJ8JiX7Tl6N9HwP HbQxl X-Gm-Gg: ATEYQzyBcReSGrrOC5izwOs3Hqd7b41VtuXDBecpTgNjWCtBaDNCFT0QDL9Bl3U6Yyn X172mCZuz56FTIFaHcAllzB8UsgG3dD2dEzCCPgP0IB3l2W27OgS4ox/KNKBss2QeWJyPqEAJcL AxBSX0PYUTffzKEtn5PCuk3dyGyPVH8/N7MpTRzNL0xaLQAyzxVqK2m3WzKfHA3Z8lCLK3Qbyyy XK2Pwncjcz/nbWx2hFIl/aOzxyXG6AOjqQvZ0/ExYq2dgwVfXp3LswcPKk1r7liNCztkvj30Xll 3+6PywVVtcCK2CGHqYk3aVYZrcPdF2GY7DGWLdVWkwRKBeWINpAagJgWLK1AxDna+ZPk9Bdxt/i mWmsxfFrMrfGo4+ZlQpffQlJ9FnY8uMOjjFgM9w2L+W9PDk9SGd4NmE3lm1hF3QA8Q9/A8Yjnow +3AeFgZPDSafzl3JPGRrzis0nqPt4tseP8UUMdjPD9wIdFpNrWaUWct9axqDI0gdXtAKmgxMwyj 5+LJ42sehim7IWLboQTmwZ7hrWMX7c= X-Received: by 2002:a5d:64e5:0:b0:439:8bb9:dad4 with SMTP id ffacd0b85a97d-439942109cfmr8198321f8f.0.1772121347619; Thu, 26 Feb 2026 07:55:47 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/20] target/arm: Remove aarch64 test for kvm Date: Thu, 26 Feb 2026 15:55:25 +0000 Message-ID: <20260226155535.1171290-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1772121450112158500 Content-Type: text/plain; charset="utf-8" From: Richard Henderson We no longer support kvm for aarch32, therefore the aarch64 test is trivially true. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20260216034432.23912-3-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/cpu64.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index dec430c48b..87b8c586c4 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -799,9 +799,7 @@ static void aarch64_host_initfn(Object *obj) ARMCPU *cpu =3D ARM_CPU(obj); #if defined(CONFIG_KVM) kvm_arm_set_cpu_features_from_host(cpu); - if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) { - aarch64_add_sve_properties(obj); - } + aarch64_add_sve_properties(obj); #elif defined(CONFIG_HVF) hvf_arm_set_cpu_features_from_host(cpu); #elif defined(CONFIG_WHPX) --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121537; cv=none; d=zohomail.com; s=zohoarc; b=P/G/RInGx1Be69jYj4rWDK7VLd/YKyZKt8tx2k2YcbTWLV7BcSYDygvcnT70sBj7mBStDIWmggYPqKNm+jrvOWDU3e2UovYMzgAp0vB4BOvb97Rq8vFVmGEGmi95iEIRQ2PYFEFmRKG3z1bIdPMKAm+iWql377Y8bBli++Jhr7E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121537; 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=+W4n7F0RdzIOjtiRGCeQo/5csBStB2/lMq2PpMdFY+o=; b=k5e35Z0F8SCvufd2xrbLmi6vY4xcZW3aVidZZ3dVeXLprMIoPdrAeFbduzxHMQivvB0SNY49gfmAr7ErcD0idYfJrZi0P2amSDG4RYWGkT1qBwyeuOlLBA8IlLlp5Yv2Z/8Te1Hkbd9PyVm9gmgN4qLjMiaQlWZMX3i6tXrzFpU= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121537048580.6524921211178; Thu, 26 Feb 2026 07:58:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiX-0005PR-8n; Thu, 26 Feb 2026 10:55:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiS-0005OA-Qr for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:53 -0500 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 1vvdiR-0003lg-2w for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:52 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-439857ec679so900176f8f.2 for ; Thu, 26 Feb 2026 07:55:49 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121349; x=1772726149; 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=+W4n7F0RdzIOjtiRGCeQo/5csBStB2/lMq2PpMdFY+o=; b=v9dbha9ZYbiD0/GerfdKbdNhhaXBIKL6iPYP09Nezm9nRD9LTMuWpi8uvUaH52yc+9 RFRb+a89WIjUO+MpZOIebquuFaG2dUdjiVTvIAXW8bqJpk41GJBJaRGrOwwxlddYL+3l duciEoqZu57ZDlhVkfbTEnwVP/vReg6nKTl5sxODM/0WzNOGti7uJEceMy2SWAXmsn7K 6t8VYMSKC7msNPlS25WCswyUjRfxEv2pyestipia/f6svxMV5KgRj7wKXqS6GHdqLw34 m1aym04yfyTtmgQW84FHEYpZk0QKj/rzr53oTH+iYOs2++7zT9yvhWaOrq7brLFRBi9C N8iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121349; x=1772726149; 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=+W4n7F0RdzIOjtiRGCeQo/5csBStB2/lMq2PpMdFY+o=; b=f/GR7p7WdMTgCKPS0stORyiUPRWFuGbM4v27Bl2VhBmPOo9/3zlDqYsa8x93wRSQT2 0Fa5YRr+oDuW0fYo7lVvBinagV0/l8mv98kFF9g+YQkQq4TtEhZSHXjlOgM66MUoMnKw c8TWdo17an+7CHCxAjRPerBilZ365JHgNXt8TFeZxW9ZgesyWGyExhKQwRnZqujhXKJv pPQX4YIp8HFrDsvm8/0/ifU7SftN4avXz5oK5iZ6w6oNcf3kCiMT+2OWrFU5Jutih5n2 mG8kFyDaC7mVYNSw+OdM172PoPI1YhDzikJ5SPB5IlefJ3WflJsoGzaffiiyX2v202n/ qMnA== X-Gm-Message-State: AOJu0YxNIfEWVn4iB8lc2Rzps6EknnIEqGKOqQuqWHYyScYUMVbJgISj libpsS/bTRPKH4kec7vUe1F+5ppwzdCSyOaSQ7TjeCf74AxVFZ+iNrD2j83Ju8PG1auyjq2Q4RB GQcz3 X-Gm-Gg: ATEYQzyXjKxev7fBrZn50LgcLVrvB+6XMqIy2pIhGSc4vovCCShIyLomWGhOCAHnUyL 1a8am0O9b07ZO8BTewnuWA+TJpCVYmyl8fnnXAFbYMn6MgDMdVb3S9MKbJgjya2HH6+TiC94AgJ j/teWbxHk9UJePwLx//33HRWyTPX0c5U/DtypjZ1qlSR0jYIZ4J5lvD+4FPquZLLuhvFAFPdtSS V/rPjBtrxSb6jxkD+6ykIpA9WT3/roR7oLpJvE90OaAb4KQMt7mqTfuchDYYfaOuFhetBHkTyCc +uspYozI4V9dqaWbHNHTctigpKCcGLVCqZWOSDpwz64z3wXHm0LPkDeXe/4S2K3oPSvTypjK5Nc ssDsEdg5PlZEcf83HavgnNDANg5Joym1aJrs0vEFTQ3FUZIcU0tSvHht0h76oFSkPReHOIR1bWe EplLu5s5e7qtL0CdM4tASBs/kpOeFyU5VWbn4XM4h838NCYBHSKzjKcZ1R/OJEGmTshMtu83A0Y wlv0OVDi+k8DRZ0sHRgrkWTzYQTqOs= X-Received: by 2002:a5d:5d85:0:b0:430:f742:fbc7 with SMTP id ffacd0b85a97d-439942aa2bcmr8986689f8f.14.1772121348540; Thu, 26 Feb 2026 07:55:48 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/20] target/arm: Move kvm_arm_sve_get_vls within kvm.c Date: Thu, 26 Feb 2026 15:55:26 +0000 Message-ID: <20260226155535.1171290-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.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: 1772121538645158500 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Prepare to adjust the invocation point and visibility. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20260216034432.23912-4-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/kvm.c | 108 +++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index c46ee9620b..2b74901d54 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -243,6 +243,60 @@ static int get_host_cpu_reg(int fd, ARMHostCPUFeatures= *ahcf, return ret; } =20 +uint32_t kvm_arm_sve_get_vls(ARMCPU *cpu) +{ + /* Only call this function if kvm_arm_sve_supported() returns true. */ + static uint64_t vls[KVM_ARM64_SVE_VLS_WORDS]; + static bool probed; + uint32_t vq =3D 0; + int i; + + /* + * KVM ensures all host CPUs support the same set of vector lengths. + * So we only need to create the scratch VCPUs once and then cache + * the results. + */ + if (!probed) { + struct kvm_vcpu_init init =3D { + .target =3D -1, + .features[0] =3D (1 << KVM_ARM_VCPU_SVE), + }; + struct kvm_one_reg reg =3D { + .id =3D KVM_REG_ARM64_SVE_VLS, + .addr =3D (uint64_t)&vls[0], + }; + int fdarray[3], ret; + + probed =3D true; + + if (!kvm_arm_create_scratch_host_vcpu(fdarray, &init)) { + error_report("failed to create scratch VCPU with SVE enabled"); + abort(); + } + ret =3D ioctl(fdarray[2], KVM_GET_ONE_REG, ®); + kvm_arm_destroy_scratch_host_vcpu(fdarray); + if (ret) { + error_report("failed to get KVM_REG_ARM64_SVE_VLS: %s", + strerror(errno)); + abort(); + } + + for (i =3D KVM_ARM64_SVE_VLS_WORDS - 1; i >=3D 0; --i) { + if (vls[i]) { + vq =3D 64 - clz64(vls[i]) + i * 64; + break; + } + } + if (vq > ARM_MAX_VQ) { + warn_report("KVM supports vector lengths larger than " + "QEMU can enable"); + vls[0] &=3D MAKE_64BIT_MASK(0, ARM_MAX_VQ); + } + } + + return vls[0]; +} + static bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) { /* Identify the feature bits corresponding to the host CPU, and @@ -1914,60 +1968,6 @@ bool kvm_arm_mte_supported(void) =20 QEMU_BUILD_BUG_ON(KVM_ARM64_SVE_VQ_MIN !=3D 1); =20 -uint32_t kvm_arm_sve_get_vls(ARMCPU *cpu) -{ - /* Only call this function if kvm_arm_sve_supported() returns true. */ - static uint64_t vls[KVM_ARM64_SVE_VLS_WORDS]; - static bool probed; - uint32_t vq =3D 0; - int i; - - /* - * KVM ensures all host CPUs support the same set of vector lengths. - * So we only need to create the scratch VCPUs once and then cache - * the results. - */ - if (!probed) { - struct kvm_vcpu_init init =3D { - .target =3D -1, - .features[0] =3D (1 << KVM_ARM_VCPU_SVE), - }; - struct kvm_one_reg reg =3D { - .id =3D KVM_REG_ARM64_SVE_VLS, - .addr =3D (uint64_t)&vls[0], - }; - int fdarray[3], ret; - - probed =3D true; - - if (!kvm_arm_create_scratch_host_vcpu(fdarray, &init)) { - error_report("failed to create scratch VCPU with SVE enabled"); - abort(); - } - ret =3D ioctl(fdarray[2], KVM_GET_ONE_REG, ®); - kvm_arm_destroy_scratch_host_vcpu(fdarray); - if (ret) { - error_report("failed to get KVM_REG_ARM64_SVE_VLS: %s", - strerror(errno)); - abort(); - } - - for (i =3D KVM_ARM64_SVE_VLS_WORDS - 1; i >=3D 0; --i) { - if (vls[i]) { - vq =3D 64 - clz64(vls[i]) + i * 64; - break; - } - } - if (vq > ARM_MAX_VQ) { - warn_report("KVM supports vector lengths larger than " - "QEMU can enable"); - vls[0] &=3D MAKE_64BIT_MASK(0, ARM_MAX_VQ); - } - } - - return vls[0]; -} - static int kvm_arm_sve_set_vls(ARMCPU *cpu) { uint64_t vls[KVM_ARM64_SVE_VLS_WORDS] =3D { cpu->sve_vq.map }; --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121462; cv=none; d=zohomail.com; s=zohoarc; b=ErgwkVaPo8/PBY44HDEJludBE76t5ePqImCngNe15zjqvLSEvxZjRTq2PrmkK0b1jYWtCYiCNDYRAPTTcHB/Phg/2GfwQgV/SfzoxPe1/EGtuJihm0+GBTwbZq7gR+NGn1tdzmYftMt9mmVTh++/bk+9r3urnqHoj+ezj9qd0Nw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121462; 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=OV2bwWbH/FypjV7kt9sYi2EC7GB2lhasvy/QfiSyHxs=; b=TE+fOO81E4pssq7RTDcAi0XDLFAU/FQCk/8w5/UzsevDBXjWu3JRbdcHTgUni3yw3KTM/vU0OY7+VwYYHeCRXAfLeVmOepeWXXiXPaMGkjNHHfqcf/z6TbARx5Rpn5PTOCCC2D0+WdJ1rLAtVy6cHxxNuZ7izsvzg0ALCUOawGo= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121462548742.5019090008534; Thu, 26 Feb 2026 07:57:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdiZ-0005Pd-5w; Thu, 26 Feb 2026 10:55:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiT-0005OC-1Q for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:53 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiR-0003m1-3U for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:52 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-4398913af88so940980f8f.2 for ; Thu, 26 Feb 2026 07:55:50 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121350; x=1772726150; 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=OV2bwWbH/FypjV7kt9sYi2EC7GB2lhasvy/QfiSyHxs=; b=EnQWec010UGpd98SS75PJjHBDpRNkZOt/WTssm03y3a3CsLY7YFDSZXicmnnxEa0CV cW/ByKMHfI8jK+tLLo6c62fEmorAdimpu3wJItHfry1roqFK5YSaIHTelTlU52dQjz2f 7djq65PVLmWd38XtWYd9xqfBk/pT6tl4aP2XGoxWEraNu+XoBB/hDiFoqQCAs0RIehNm tGvNMALn6z5+Rg3RDg+8myX6ZSONsYNNJ4F0ftono7q7pfM/P+4E7fVBvHXCbYwTcQGY K5eHL0gtdhP8tFOj/JFz28RHU+QbTwL2WhtjYSNHq7aHo/hAfxCrOtEj6odne1tnZ3nD zLjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121350; x=1772726150; 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=OV2bwWbH/FypjV7kt9sYi2EC7GB2lhasvy/QfiSyHxs=; b=CAeUHBYGQ4tmWOKa7AAU2Mr0R2FmDHu/JOb9s8rxugHnRaIPpmHeWpMSakI6ebz8ml J1A5vd2uhoB299E7Ay33ZaDc1TzQsUyFyrt+UNLaRHpUKAaWE0evj7/5AXUIKEEdrNTT yWRjrt2Ihj2s/Yf2GFmC7XKSOFJTZCf6Tw5oq9YWHEgVc6AH0TIHeaJiYmhrOo+MM2eW YsgIOfzIatpVcp1WqHdPoyBLZAQRazQukwvgogJC4saQ7d0scNUEE44I4+nv+eQVFGac SNuX/dBCw3r5Pwz4bSt27uH8FqTWLn5tZgKsqv0pJoccJ4Mr9LPsupUPafRiLhPJlvOq vM7w== X-Gm-Message-State: AOJu0YwYTs7olNhiUhu1Q51n362zTQDLhLXhjARJ8cE2dvuGOK2DlE44 f/9SzdOQaFQ883Tw0UZoYlz68yOIp/e5rZr+rXwRy2Nb64oY3Q9ipF7z1Ai7bXp7SNrrRfCB7Qn EM5ED X-Gm-Gg: ATEYQzyg5C0V74E+pDtDx84nVclHytHkcEVgWzDXABCNv5NX6Zi+uKYBJbHn7Psktzn Pnw0/YYQuqNXwfigkGpBDlUBb084y2/alvk4Cx46pBfSwYdcMXH50FnmqKsHgCNy49NO33wA2FP cL2z1JOCrar8I8RNOa0EyLrZmudelHPXIZwukhCSemI8jiWTgtMxYRVOkVOhkTaJUDMVQ96aVzQ 0nE2S2umDJw0gNYMJbCk1lim+yAg7nXmVftFo86OY14hhMNfOlQS2dHgJV/Tj7nfVnpNTVzlcwy cEDg4fxtEtviXmfCrlosLYwqqgbyNzOMuACodmrgpUwQH7hUdu9amFMfr3fOpGtdVt93bET7oHK 5uIFK+BuK4hNRNVk4VGKAGdxlKzj34C5wVlhbjeT5woSUPPsRZUhJPRibqO+axL90TaME/zZHiF X89FqvO99MpWWDLgGC70xdJnNwwmXqp2lh4RvbxsE3TFWDKb7p04vUZPFgkSEXUGB61vIYinO71 ZsuNqLibVrj48SX3Wchlu9k39fzMwI= X-Received: by 2002:a05:6000:2f88:b0:437:6c1f:de27 with SMTP id ffacd0b85a97d-439942ed02emr9415290f8f.37.1772121349432; Thu, 26 Feb 2026 07:55:49 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 12/20] target/arm: Init sve_vq in kvm_arm_set_cpu_features_from_host Date: Thu, 26 Feb 2026 15:55:27 +0000 Message-ID: <20260226155535.1171290-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1772121464187158500 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Probe for SVE vector sizes with the same scratch vm that we use for probing other features. Remove a separate initialization path in arm_cpu_sve_finalize. Unexport kvm_arm_sve_get_vls. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20260216034432.23912-5-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/cpu64.c | 20 +----------- target/arm/kvm-stub.c | 5 --- target/arm/kvm.c | 73 ++++++++++++++++--------------------------- target/arm/kvm_arm.h | 10 ------ 4 files changed, 28 insertions(+), 80 deletions(-) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 87b8c586c4..209ab5c344 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -79,28 +79,10 @@ void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp) */ uint32_t vq_map =3D cpu->sve_vq.map; uint32_t vq_init =3D cpu->sve_vq.init; - uint32_t vq_supported; + uint32_t vq_supported =3D cpu->sve_vq.supported; uint32_t vq_mask =3D 0; uint32_t tmp, vq, max_vq =3D 0; =20 - /* - * CPU models specify a set of supported vector lengths which are - * enabled by default. Attempting to enable any vector length not set - * in the supported bitmap results in an error. When KVM is enabled we - * fetch the supported bitmap from the host. - */ - if (kvm_enabled()) { - if (kvm_arm_sve_supported()) { - cpu->sve_vq.supported =3D kvm_arm_sve_get_vls(cpu); - vq_supported =3D cpu->sve_vq.supported; - } else { - assert(!cpu_isar_feature(aa64_sve, cpu)); - vq_supported =3D 0; - } - } else { - vq_supported =3D cpu->sve_vq.supported; - } - /* * Process explicit sve properties. * From the properties, sve_vq_map implies sve_vq_init. diff --git a/target/arm/kvm-stub.c b/target/arm/kvm-stub.c index ea67deea52..f2de36aef3 100644 --- a/target/arm/kvm-stub.c +++ b/target/arm/kvm-stub.c @@ -95,11 +95,6 @@ void kvm_arm_steal_time_finalize(ARMCPU *cpu, Error **er= rp) g_assert_not_reached(); } =20 -uint32_t kvm_arm_sve_get_vls(ARMCPU *cpu) -{ - g_assert_not_reached(); -} - void kvm_arm_enable_mte(Object *cpuobj, Error **errp) { g_assert_not_reached(); diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 2b74901d54..b00172a289 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -60,6 +60,7 @@ typedef struct ARMHostCPUFeatures { ARMISARegisters isar; uint64_t features; uint32_t target; + uint32_t sve_vq_supported; const char *dtb_compatible; } ARMHostCPUFeatures; =20 @@ -243,58 +244,34 @@ static int get_host_cpu_reg(int fd, ARMHostCPUFeature= s *ahcf, return ret; } =20 -uint32_t kvm_arm_sve_get_vls(ARMCPU *cpu) +static uint32_t kvm_arm_sve_get_vls(int fd) { /* Only call this function if kvm_arm_sve_supported() returns true. */ - static uint64_t vls[KVM_ARM64_SVE_VLS_WORDS]; - static bool probed; + uint64_t vls[KVM_ARM64_SVE_VLS_WORDS]; + struct kvm_one_reg reg =3D { + .id =3D KVM_REG_ARM64_SVE_VLS, + .addr =3D (uint64_t)&vls[0], + }; uint32_t vq =3D 0; - int i; + int ret; =20 - /* - * KVM ensures all host CPUs support the same set of vector lengths. - * So we only need to create the scratch VCPUs once and then cache - * the results. - */ - if (!probed) { - struct kvm_vcpu_init init =3D { - .target =3D -1, - .features[0] =3D (1 << KVM_ARM_VCPU_SVE), - }; - struct kvm_one_reg reg =3D { - .id =3D KVM_REG_ARM64_SVE_VLS, - .addr =3D (uint64_t)&vls[0], - }; - int fdarray[3], ret; - - probed =3D true; - - if (!kvm_arm_create_scratch_host_vcpu(fdarray, &init)) { - error_report("failed to create scratch VCPU with SVE enabled"); - abort(); - } - ret =3D ioctl(fdarray[2], KVM_GET_ONE_REG, ®); - kvm_arm_destroy_scratch_host_vcpu(fdarray); - if (ret) { - error_report("failed to get KVM_REG_ARM64_SVE_VLS: %s", - strerror(errno)); - abort(); - } - - for (i =3D KVM_ARM64_SVE_VLS_WORDS - 1; i >=3D 0; --i) { - if (vls[i]) { - vq =3D 64 - clz64(vls[i]) + i * 64; - break; - } - } - if (vq > ARM_MAX_VQ) { - warn_report("KVM supports vector lengths larger than " - "QEMU can enable"); - vls[0] &=3D MAKE_64BIT_MASK(0, ARM_MAX_VQ); - } + ret =3D ioctl(fd, KVM_GET_ONE_REG, ®); + if (ret) { + error_report("failed to get KVM_REG_ARM64_SVE_VLS: %s", + strerror(errno)); + abort(); } =20 - return vls[0]; + for (int i =3D KVM_ARM64_SVE_VLS_WORDS - 1; i >=3D 0; --i) { + if (vls[i]) { + vq =3D 64 - clz64(vls[i]) + i * 64; + break; + } + } + if (vq > ARM_MAX_VQ) { + warn_report("KVM supports vector lengths larger than QEMU can enab= le"); + } + return vls[0] & MAKE_64BIT_MASK(0, ARM_MAX_VQ); } =20 static bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) @@ -469,6 +446,9 @@ static bool kvm_arm_get_host_cpu_features(ARMHostCPUFea= tures *ahcf) * So only read the register if we set KVM_ARM_VCPU_SVE above. */ err |=3D get_host_cpu_reg(fd, ahcf, ID_AA64ZFR0_EL1_IDX); + + /* Read the set of supported vector lengths. */ + arm_host_cpu_features.sve_vq_supported =3D kvm_arm_sve_get_vls= (fd); } } =20 @@ -516,6 +496,7 @@ void kvm_arm_set_cpu_features_from_host(ARMCPU *cpu) cpu->kvm_target =3D arm_host_cpu_features.target; cpu->dtb_compatible =3D arm_host_cpu_features.dtb_compatible; cpu->isar =3D arm_host_cpu_features.isar; + cpu->sve_vq.supported =3D arm_host_cpu_features.sve_vq_supported; env->features =3D arm_host_cpu_features.features; } =20 diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index cc0b374254..97549766ea 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/kvm_arm.h @@ -124,16 +124,6 @@ bool kvm_arm_create_scratch_host_vcpu(int *fdarray, */ void kvm_arm_destroy_scratch_host_vcpu(int *fdarray); =20 -/** - * kvm_arm_sve_get_vls: - * @cpu: ARMCPU - * - * Get all the SVE vector lengths supported by the KVM host, setting - * the bits corresponding to their length in quadwords minus one - * (vq - 1) up to ARM_MAX_VQ. Return the resulting map. - */ -uint32_t kvm_arm_sve_get_vls(ARMCPU *cpu); - /** * kvm_arm_set_cpu_features_from_host: * @cpu: ARMCPU to set the features for --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121536; cv=none; d=zohomail.com; s=zohoarc; b=IZfzyktI3wLaAzwBGLDAekBarCDkR7UvdvRZrFfd/tpotqVX3WYndqKgfgMqOp+bSWZ/g+Rq5ECx+qxz/6oZA7bJbZ0QMVFGinEglx93HypV+ZU47nHvfrTwmY199yDgIa7xC4xZh+7oR5UkOm30TdsqdzMEM2taEYgi6DIEqyo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121536; 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=ZfBUJaYraA8yxuxaiXVVUn603JpjW9lcSMUyJUScvg0=; b=LmZfAvmvnyvcCoaZ053bTmmFO71ABCppfzJmbE1g1vtwNrGz8hccQSEJ8ky+m6bx1JICUOFVZLq/Fbc5jXpJJXllV2KmrT5coHmrIMZjyKJAuplaYesURxnmBUIOOaQwKlo4PqcggS3PwbBXocEZBRiKVNELzwiZfElu7Ua5MkQ= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121536064437.2955316391658; Thu, 26 Feb 2026 07:58:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdid-0005Qi-1G; Thu, 26 Feb 2026 10:56:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiV-0005Ol-74 for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:55 -0500 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 1vvdiS-0003mE-AD for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:54 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-4398913af88so940998f8f.2 for ; Thu, 26 Feb 2026 07:55:51 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121351; x=1772726151; 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=ZfBUJaYraA8yxuxaiXVVUn603JpjW9lcSMUyJUScvg0=; b=H+zAsPKnzipjVL8CmSxqh3n34WT8ctXV0UoyzUyzt9vKsbxUefrP4Drt8PJydxX9MH 9DntlvTK1IJDsgklsxPUKZeGdIf4x0ErSMy8F9cdr4LEEw1ec9MKoq47GKpcM7cOIXja Yh7LjfRpPVpQT1XBtFNBDI7IJYuhPRPjyNjYOTftBKFULOXnh/jqtwbQZB+yDu2mSqMD fCAuBOhqy53gQtWSrW2UOHUiDww/aH/THL0hddaJdtN7c8RIWcMpaeojPo2rt9dAdE8G Mp6UJtDiYlJxZYSdSeLR1DGvhPnsWNDw6BptxjfAUymvt6YPNMEI9+9+L2RGTp3rgkvR 0tvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121351; x=1772726151; 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=ZfBUJaYraA8yxuxaiXVVUn603JpjW9lcSMUyJUScvg0=; b=QeSXUmp4O87sTb9JPmsF954+5JTCgPL89EJNjIzD2sHOXRi3qUpW3jF0bMNeDypfwz Db9twb42zap1qwHu8dn6aoko9Hw0aLUhBBqSaapjEcjPdFf4huKtOAg9M0yxjca2uUhx wygK4dKwDLFeX6oGm74ZHRXUO8OE7j1PlS3viRKu/vdd664JQaOB1UHUnnsYkR/xfczA zkj4HMZ+01p8ssYIZNSVKARDjLGNTdKSYBL7R7n+Prm6sDYrovjhUDuZhMx4F6dS4oyY gRN5fRpaGw5CvxOnwTC9ZtywvqoJBW+Xllcp0hZ7sbmY/+qyqUQECKTq2srsuLZ6xbBK pGtw== X-Gm-Message-State: AOJu0YxFl9BoAG49kSHarfI5TuhGlljrRLJ1RFA+tjh78O4TvAzZ65sY HFWxgVp2vtNmMjCS1beQpyMhxd8poQuGT6Ji8+STqgOdLgiz1F6U7y2hc+RyzVBHVXLRPV8bzi9 kVwwC X-Gm-Gg: ATEYQzz0I2Daj105BycRpPGHQLWYdB191Qi69XFwzd9YiaFD9RnqYEyG6ku4IOvP3+v TChJHw4VzDt2XGiCULbNEi8jvegLJpR9ZJvoY0wHo4JoDi5dkhoiUg379fVRh+aeqAZKBBlwcPp 89KjmcV3zP8ugoTb4swDTeDfKdE9glvj+sujdhQdNnhoNorjl5y0nRN/oKXCNeMtKdHGWxP8gLs id+RGTWrXFUe/VKgDKyqqC2hxK3YTMVVkmj0gb54lIHw+mBPMdKR6zpse92R4Wczz8PNwxqY/zK l4wtfIBozt2G5UFRw3lSkDkut0SVeMgeZQX+KDaFg9YREhtEMFAE8xRPXZTWqj/jeDlO1kcZHqk YPtc3heeDq5owu9eNWLwTrroap4wJtUJ4OBqSSX/l3U0c3Dur45CYvQkZm4t4O5QspvUxWSpipt AdzmTybh4AVUDZJE3gr0ohuB7CcVV5X8FRRsdn4h9/GzRNBwjPgBv++QUdYQjc/FKwg9X/OZaJV cDM4ztCag5Vj7wvM7QHimAhzr2gBrQ= X-Received: by 2002:a05:6000:290b:b0:439:8d77:4dad with SMTP id ffacd0b85a97d-43994305b07mr8859477f8f.55.1772121350521; Thu, 26 Feb 2026 07:55:50 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 13/20] target/arm: Move kvm test out of cpu_arm_set_sve Date: Thu, 26 Feb 2026 15:55:28 +0000 Message-ID: <20260226155535.1171290-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.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: 1772121556101158500 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Introduce a set of stub property callbacks for when we really don't want to be able to enable SVE. Register the real or stub funtions in aarch64_add_sve_properties depending on whether or not SVE is available. Adjust aarch64_a64fx_initfn to initialize the set of supported vector sizes before calling aarch64_add_sve_properties. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20260216034432.23912-6-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/cpu64.c | 48 ++++++++++++++++++++++++++++++++++++------ target/arm/tcg/cpu64.c | 2 +- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 209ab5c344..58215216c5 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -300,6 +300,30 @@ static void cpu_arm_set_vq(Object *obj, Visitor *v, co= nst char *name, vq_map->init |=3D 1 << (vq - 1); } =20 +static void prop_bool_get_false(Object *obj, Visitor *v, const char *name, + void *opaque, Error **errp) +{ + bool value =3D false; + visit_type_bool(v, name, &value, errp); +} + +static void prop_bool_set_false(Object *obj, Visitor *v, const char *name, + void *opaque, Error **errp) +{ + bool value; + + if (visit_type_bool(v, name, &value, errp) && value) { + error_setg(errp, "'%s' feature not supported by %s on this host", + name, current_accel_name()); + } +} + +static void prop_add_stub_bool(Object *obj, const char *name) +{ + object_property_add(obj, name, "bool", prop_bool_get_false, + prop_bool_set_false, NULL, NULL); +} + static bool cpu_arm_get_sve(Object *obj, Error **errp) { ARMCPU *cpu =3D ARM_CPU(obj); @@ -309,12 +333,6 @@ static bool cpu_arm_get_sve(Object *obj, Error **errp) static void cpu_arm_set_sve(Object *obj, bool value, Error **errp) { ARMCPU *cpu =3D ARM_CPU(obj); - - if (value && kvm_enabled() && !kvm_arm_sve_supported()) { - error_setg(errp, "'sve' feature not supported by KVM on this host"= ); - return; - } - FIELD_DP64_IDREG(&cpu->isar, ID_AA64PFR0, SVE, value); } =20 @@ -471,7 +489,23 @@ void aarch64_add_sve_properties(Object *obj) ARMCPU *cpu =3D ARM_CPU(obj); uint32_t vq; =20 - object_property_add_bool(obj, "sve", cpu_arm_get_sve, cpu_arm_set_sve); + /* + * For hw virtualization, we have already probed the set of vector + * lengths supported. If there are none, the host doesn't support + * SVE at all. In which case we register a stub property, to allow + * -cpu max,sve=3Doff + * to always be valid. + * + * For TCG, this function is only called for cpu models which + * support SVE. The error message in the stub is written + * assuming host virtualiation is being used. + */ + if (cpu->sve_vq.supported) { + object_property_add_bool(obj, "sve", cpu_arm_get_sve, cpu_arm_set_= sve); + } else { + assert(!tcg_enabled()); + prop_add_stub_bool(obj, "sve"); + } =20 for (vq =3D 1; vq <=3D ARM_MAX_VQ; ++vq) { char name[8]; diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c index fa80e48d2b..84857fb706 100644 --- a/target/arm/tcg/cpu64.c +++ b/target/arm/tcg/cpu64.c @@ -524,10 +524,10 @@ static void aarch64_a64fx_initfn(Object *obj) cpu->gic_pribits =3D 5; =20 /* The A64FX supports only 128, 256 and 512 bit vector lengths */ - aarch64_add_sve_properties(obj); cpu->sve_vq.supported =3D (1 << 0) /* 128bit */ | (1 << 1) /* 256bit */ | (1 << 3); /* 512bit */ + aarch64_add_sve_properties(obj); =20 cpu->isar.reset_pmcr_el0 =3D 0x46014040; =20 --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121399; cv=none; d=zohomail.com; s=zohoarc; b=WSehtf6ydRyXmXwkWzpfimkTlW6WboWky48G8T08uMh07XGJTrXFNEX2PPJJNmAsQVLpd6Xvr8Hhv0Kusv3pU5kBbhcm/QNvmj0M7rCZsKkPA4AAiZyCMMg0XDl3OvFgaU4q7FemMnTPrxl5ISArnAPUDjB0AUu7n2JjWwhYXzM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121399; 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=Rmltxj0hvxlVzepTANi2L0kwJYbr2zP+eSEap718xM8=; b=U9763HpkqCRXt2k/UUMdZ6uopObkTrrYAledlrM2xyoaj8OS+6VuiF2NaBjrUn0x4ZqtYc1dDw77OMiV29ofpxPEfmYmWbyIhTU7uuAH59yg4AlGt9ylKDfo1wjapJoPhsuN+AyGirp1px20yGGRK/HffaNygLV3O/G1pFXE9mU= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121399148320.30351744022676; Thu, 26 Feb 2026 07:56:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdih-0005X7-O2; Thu, 26 Feb 2026 10:56:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiV-0005Ok-5b for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:55 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiT-0003mM-DU for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:54 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-4398dd671daso1117776f8f.0 for ; Thu, 26 Feb 2026 07:55:52 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121351; x=1772726151; 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=Rmltxj0hvxlVzepTANi2L0kwJYbr2zP+eSEap718xM8=; b=wclB73vU98VRmFID+k+ZNn2tGAl9+mUkuvBdn4K4skS4BiS/jKsX3v4riht+eFl9cQ djoHB3vQ2BBIxU8rvtu/Eo4gHKXMESoJjfjTJCzsGve7t+65zxGBSP+DCSEgq9AqWMwS /SOTa6W0LCB0zUl/x5W+UcgCmhqx2b4IJ/EF9t1iJtHA/wQjl6+0lG4Qr2pXpXMnTylX VOoP06r4x482BMc+ABZ+8wQniBg3JvXCxVd3WGlX6eNf5d+i2LOtIWh3C4oi548zNFHe Pd3l9WWJjSrrVCfALjoRk0bqgkgrv0LkSpqxpy1YThGV1E7y1epOdGn3g6EHjylq/0H2 QIQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121351; x=1772726151; 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=Rmltxj0hvxlVzepTANi2L0kwJYbr2zP+eSEap718xM8=; b=L4TVqQh76lhU9T0P3z4nlGYOqoIjg8TOSavQ/QJHPBWb9fR9Z832WCqsR+miMB/S7o absKsDdDELl+cAa7z3ebeIxqNs1HjCzA5Z2+iuMPS0JDnas+69mulPS8cqvWGDkq8gx7 YKFz32TOvJZKBan1XSCkX22moUNB1JAlqHPu64yJ3lqeuzqngjwmyTIp1Tvxflg4saWQ xDaTuMpDdLezavuA+mYJDLDNO9Qe36SHB6iV6zOMl1prZAuY6x/gqgi6JwVM6jVQXJ1W bjFiqStHHejIcxqu7suzLgp9S7lSLu91gVBSqXzmOc5nSN6AHX/tVWe/oNZ1eb/Mmmk7 Givw== X-Gm-Message-State: AOJu0YxJuoiYBb5AWxmq2KU9mj8sKa4W/QysNxnRYvWk56YjAB3nwmSI S4DGR1p/30OLb2jk7in3TH5QiwAlDq50wsrdTZLnBFeBdlqO3LVuCbEYYyCDqqUlSM4eZgMZbKO 6mPUU X-Gm-Gg: ATEYQzzLpLLAM5ciZOdiMZ4ZqeqDbV3An8cRgx1QrsIeyO9cdOxXLkhlm6ZZXe668uh PMm0AgksZyiAlgvYm5MEqCVDxc2XT2F8NM0Q/i46uuMSEEZY5OXkzcAt9H9F0y4mFFGLIKD7G/l eZiWG+Ip5WtQy+UV4vHi4/h9Vgr8H1H3sZYbS3+hzy7nY/vAqaSo7mL7yZyQtzTAQ1zxiXPLcPE KYB4tfx9PkLZiudr0SCnOy2OTe866hSAKMyN3J+LC18FtLDHeb7P/uNkTvrs6H/KLdzBER+4OsO hqoFGdqVT1+B7UOzyjRsc619aLyXTSrZNwIpPCVB+XzZcQh8+Nnp/8u8THbh6S8sJNMQHkWVug3 UAvhtiEO1Y2x6TolWk/tq8UJ9WVQFiK9H3+DokZQvbZZ2NDiCmVIdlrf9LZw5KQ3MJ6sGSvfrHT gOf7YH7DqxnH9vmCW+Poq0R+RbjAMkGRNjrF9uA9VBWyTVUCtf4WEUd1NkOhcO1gGLwbl6Ax+pT 0nWL0C9NKSbcdsi25DDV8Km8L8zQv4= X-Received: by 2002:a05:6000:2dc6:b0:439:8f6f:1b2a with SMTP id ffacd0b85a97d-43997ed6d0dmr5410071f8f.4.1772121351467; Thu, 26 Feb 2026 07:55:51 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/20] target/arm: Drop kvm_arm_sve_supported Date: Thu, 26 Feb 2026 15:55:29 +0000 Message-ID: <20260226155535.1171290-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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: 1772121400140158500 Content-Type: text/plain; charset="utf-8" From: Richard Henderson This function has only one real use, so inline it and drop the stubs. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20260216034432.23912-7-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/kvm-stub.c | 5 ----- target/arm/kvm.c | 9 +-------- target/arm/kvm_arm.h | 12 ------------ 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/target/arm/kvm-stub.c b/target/arm/kvm-stub.c index f2de36aef3..f1d0ca09e6 100644 --- a/target/arm/kvm-stub.c +++ b/target/arm/kvm-stub.c @@ -37,11 +37,6 @@ bool kvm_arm_pmu_supported(void) return false; } =20 -bool kvm_arm_sve_supported(void) -{ - return false; -} - bool kvm_arm_mte_supported(void) { return false; diff --git a/target/arm/kvm.c b/target/arm/kvm.c index b00172a289..495ac0709a 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -246,7 +246,6 @@ static int get_host_cpu_reg(int fd, ARMHostCPUFeatures = *ahcf, =20 static uint32_t kvm_arm_sve_get_vls(int fd) { - /* Only call this function if kvm_arm_sve_supported() returns true. */ uint64_t vls[KVM_ARM64_SVE_VLS_WORDS]; struct kvm_one_reg reg =3D { .id =3D KVM_REG_ARM64_SVE_VLS, @@ -298,7 +297,7 @@ static bool kvm_arm_get_host_cpu_features(ARMHostCPUFea= tures *ahcf) * Ask for SVE if supported, so that we can query ID_AA64ZFR0, * which is otherwise RAZ. */ - sve_supported =3D kvm_arm_sve_supported(); + sve_supported =3D kvm_check_extension(kvm_state, KVM_CAP_ARM_SVE); if (sve_supported) { init.features[0] |=3D 1 << KVM_ARM_VCPU_SVE; } @@ -1937,11 +1936,6 @@ bool kvm_arm_el2_supported(void) return kvm_check_extension(kvm_state, KVM_CAP_ARM_EL2); } =20 -bool kvm_arm_sve_supported(void) -{ - return kvm_check_extension(kvm_state, KVM_CAP_ARM_SVE); -} - bool kvm_arm_mte_supported(void) { return kvm_check_extension(kvm_state, KVM_CAP_ARM_MTE); @@ -2000,7 +1994,6 @@ int kvm_arch_init_vcpu(CPUState *cs) cpu->kvm_init_features[0] |=3D 1 << KVM_ARM_VCPU_PMU_V3; } if (cpu_isar_feature(aa64_sve, cpu)) { - assert(kvm_arm_sve_supported()); cpu->kvm_init_features[0] |=3D 1 << KVM_ARM_VCPU_SVE; } if (cpu_isar_feature(aa64_pauth, cpu)) { diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index 97549766ea..cee06b5f0b 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/kvm_arm.h @@ -176,13 +176,6 @@ bool kvm_arm_aarch32_supported(void); */ bool kvm_arm_pmu_supported(void); =20 -/** - * kvm_arm_sve_supported: - * - * Returns true if KVM can enable SVE and false otherwise. - */ -bool kvm_arm_sve_supported(void); - /** * kvm_arm_mte_supported: * @@ -208,11 +201,6 @@ static inline bool kvm_arm_pmu_supported(void) return false; } =20 -static inline bool kvm_arm_sve_supported(void) -{ - return false; -} - static inline bool kvm_arm_mte_supported(void) { return false; --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121496; cv=none; d=zohomail.com; s=zohoarc; b=JuB6gnyMxbNxhmfj8CYFNt1uU6HvF+r3C81XjisQ2igBEuxwZGcn1Rcllu8/ebaFYtF5Cd43AWhq6aUwX6ZsAP+9evRFA5c6HbPJ5qLlOW2r5k5Jt+bnxjQ86WbHSsuj6AiNPawmDgQ/pjAkfS0m1X+GYj0eYAT6Udyi+AoleOM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121496; 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=sfrFs8pT9cgR7jMYX6r7NcDgV+dCxES7G4jHs+l6wU8=; b=m6f5MXZleu4qxIKvJTky1niBzZfXcRkLpitCdSqsspGPBZK/1OmfFZ5+l0utvkXoO1CRMTZECM/oImKHncvy1xnFon7XvuPw6bRAnIXJxwRPoWxJLbgPgX4iPdxxzBDISLa1uzq3znqebnzurOiIJtJZxjo28Tyqhi6pIUPKY9U= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121496216292.0077914467968; Thu, 26 Feb 2026 07:58:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdig-0005VD-EY; Thu, 26 Feb 2026 10:56:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiW-0005P2-8d for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:56 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiT-0003ml-VY for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:56 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-43990ea3fbcso709859f8f.0 for ; Thu, 26 Feb 2026 07:55:53 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121352; x=1772726152; 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=sfrFs8pT9cgR7jMYX6r7NcDgV+dCxES7G4jHs+l6wU8=; b=kODA6LvawuTIiLzMw5RK2wQQkuvRF3g6zQnL9XCILQOhqqtt99wBzd0y+gz+YeVD2L uv7jMgbild4QXHvQT2YVwEhzyVL7auvSD6DJ6z4HqysSUhAPvC5giYjdkhjGPK6XJ9GW bemnE1Chf2vbIwD5ZDDPdA8q07po5oZws6vIYaEjia+Q9xrJs6f6XDj4YBE575sS3w4o UscPMCANmjvslAox4Rm3SUeOcatsWKrv9qrmGsKR9wk2UUrmw74Ji+4z3YOTQWKZ1zQf xwA4TtG7hWBz2J85ZjQVphiCjR09mjMYUFSQoiLV2EIL5DcFP0X93vW1otODDxi6WlOD yvNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121352; x=1772726152; 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=sfrFs8pT9cgR7jMYX6r7NcDgV+dCxES7G4jHs+l6wU8=; b=YmxIXA6HtydLoNVQ1zQhVSg4+QsDaw5Ab+bxssWUu43IlqtrCKujy7rhngwchmJKb3 2YBoR5FCHvbcf37PWLvvCRW2I0a835hvNhBmngizQK3i8FzJcpXo/j5Xs90UHchVXLrR 6EhqHklxci/JvPhY0TZudWf49nZvhw1vz8MpdOOmX5E8CiVO7ofcxKwozMTuqRzonqrF wYcZuOHoUxAhvYMgdO7tP61lPsaf+fBww/1nHkp3+LcwUyoliACiB+D9s3XmS3lWzgG7 TP6ujbNy4F57GdTFU9g00CrO/xx5V0HNGf5pA3Xk/RJ9yqcE6L3aQTVEnlbos1I+d2x4 GJcw== X-Gm-Message-State: AOJu0Ywj4alJT52FTUip5vbaV7h96aqfbu2KaCpBlPSQaAZ6r2w962iV STVJvPCwc/Yhz8mkgbqdZJfGeJaKXd11otWqEWux2SaKbPIlkwHDXbhrusGS/lFQWCOkAXSO0zm N81j6 X-Gm-Gg: ATEYQzzoGo4Bbz6EPTneCBR/0XrpkTbEUf7mgG8i0AARKcES4MgklEh3Dp4JgQLWPPX UBm8qZQFhHCMuz0/X7QBwR4rE05OeaJfUf1RS1xVsE+s+pFXuh7QIRzcl27qvajIcsGfrvviphq AGpWV/T1hQ+0phvGEAPE8LSBWGLuQATA15v9bqUCg+ckLHdFEaVRZib1vkQj3v8yZg8GjbupzjD 455hb0fqW2kIZfYkkua9AZISHLsIrmTO7bqFJ/6UUjIPwNsSVS4DQhm2+YDpBrU5JrGLvphrf2P hwwboJw8qd+hguzMNpFfTfHHdB3NFiHtmHm9Wl8LSA6FESMj0jql3rDsGPxb6N9vf5QcjJBmWo4 GjFsdZFf4xr/5J5JD6S7obZPzZHacbxd6aSWVrho/0DzlCXpVeq5IYkvq6UquwySHpd2djBPKxK Zf5iN1f6RagSTTynqfV0Q78dNFnOjxxfQ+ogVIo63ORsz7of8rVSaXe94p+Uc26Ax1/sA8/nWSX ZJ8uKeCWOr1qrcMcIMYmXBLY2kELHg= X-Received: by 2002:a05:6000:2381:b0:439:936b:c006 with SMTP id ffacd0b85a97d-439971fc9f7mr5249725f8f.20.1772121352434; Thu, 26 Feb 2026 07:55:52 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 15/20] target/arm: Remove kvm test in arm_set_pmu Date: Thu, 26 Feb 2026 15:55:30 +0000 Message-ID: <20260226155535.1171290-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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: 1772121498272158500 Content-Type: text/plain; charset="utf-8" From: Richard Henderson In kvm_arm_get_host_cpu_features, we only set ARM_FEATURE_PMU if kvm_arm_pmu_supported. In arm_cpu_post_init we only register the "pmu" property if ARM_FEATURE_PMU. Therefore, if kvm is enabled, we can only arrive in arm_set_pmu if kvm_arm_pmu_supported. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20260216034432.23912-8-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/cpu.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 60f391651d..7e3e84b4bb 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1224,10 +1224,6 @@ static void arm_set_pmu(Object *obj, bool value, Err= or **errp) ARMCPU *cpu =3D ARM_CPU(obj); =20 if (value) { - if (kvm_enabled() && !kvm_arm_pmu_supported()) { - error_setg(errp, "'pmu' feature not supported by KVM on this h= ost"); - return; - } set_feature(&cpu->env, ARM_FEATURE_PMU); } else { unset_feature(&cpu->env, ARM_FEATURE_PMU); --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121417; cv=none; d=zohomail.com; s=zohoarc; b=UgeLZhuMfMoua8GVOTQGUVu6v/tAADRo9cpXXv/5PC2pGkng4Fu7dObqb0zszSC+AGexUbgzQUblrSPGiMhsR16FLxaSRfQhYObkPG1DKvMJBRczqzCSER3FDvS9UdM75615hqmhRImFS7FHk+/wuWojuEY2bXGWlExWMD/oxgQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121417; 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=FI7VceYabQwG5X9MORzw6EbePsfkC196o16V3Go1/SI=; b=AGfegQbgPhSmH1rR61CaMtuLCOIPhkkanmXQ2NbiAIBPMKjHBo2M3SAJezp02bNWNQEm1Z8eyjZv1dGD73X4q8jfXPrlxTgjS9lAONXm3wpSCNZ5+HDjRxm5THvBWY0tRGoAmpayorEDZT/g45spiD28yyMJCdTpTKZTXww3VoA= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121417216270.9277275456857; Thu, 26 Feb 2026 07:56:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdid-0005Qj-1l; Thu, 26 Feb 2026 10:56:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiW-0005P3-Jn for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:56 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiU-0003nT-VB for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:56 -0500 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-4327790c4e9so710905f8f.2 for ; Thu, 26 Feb 2026 07:55:54 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121353; x=1772726153; 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=FI7VceYabQwG5X9MORzw6EbePsfkC196o16V3Go1/SI=; b=r4kmR11xs68kC7K27XFHqCujjiSze9A3fby81ZlY8aVNCGF+cXfOXzRJs01oxEqHTM 7OrSvratjdVEveq1Y8PSpm9ba9hOWdophSUNxoRRO+9p/XzBXTwK+Exc0BDvODvuCYVg 1/ogwl6deK70AsL46uE213KTmf5toYvN27vfsWlchU1FfBOkeXQJB3qRBB6RPy+M/1dB 2LjnwlsGCzf9fan2cJQesJnaD20oCYzBGbmV25eQXzwwbBMeg9vAqmZuypHMTo4nDK7G gFchRHdjovfdu6MUmYLAGeqfUpAV2wsPh3CDWfJOVRjN8xBblRMU/IJVCZ6QT/0sn2nF hNwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121353; x=1772726153; 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=FI7VceYabQwG5X9MORzw6EbePsfkC196o16V3Go1/SI=; b=SZ2wtqhIXHir7QZL49L76vjwpiDQGvUO+oeafZJ40xcefxKu2HaKkDQeoB9cZr2JUV 8CFgcokIsFR+JU67o8A3IzPutQieTp2ufLEB8whHNfAlziBZBWAlK1xIU3/FpuOtuA+F scPoGtPNvnZtOv7f+aCdD0JrdawVKYR3syDvxUf2mEpXqWj21ZDa3/98F6WGxooLC06J k5iEu9zLLTarMODLdizAaBPJTd3IA+v6+4rNTlCb4D+82R54VMd0dRAzcOlBsw0Ff1eM ElWRthLfd8dWLjftM6E8vWtNDmMvpJvZDkO5I6avjQWm632OVdy2/06KQmZoWiUDGEvr /g3w== X-Gm-Message-State: AOJu0YzKY0kEC+VnIXMjplR22e0iFpkfuVOGSYNLMfHhFWQHEyOM7PKf c04Y7E7QAMIWopme5fHkS8Ctb9oWPqH7mnI62H+tMNrvKgEocix/3uTwpbWdidSd5MQI9Ih3De/ hMsjV X-Gm-Gg: ATEYQzzQXTWJDEPAjWV69enJFsONcGuAL21a8WJXR41lkjs9dWpQdpSEVY3e+Fk7Yxw kArZ9Wsqb63wIeWP6Q49lAJhADb2N327//lcD8DKH6/kQPOIzRml5b8IonXJ7DxDAhvsAOeMuWN tBIa+/03Z3m6/ppJOI8IYpLxC37ouarnFl+njTy4x80u+EGMR6L0JNBXiJ+q5TsTCTtUto8af/o 0PlBuEc/bSI1mhXFuoDNul9WoVbGfgJLKJHY4rAyZA2/gS1DZDhAfg6QOgWtct0Hu11V5x6Cwgw 9giWsTkMh1x/prVdjmq0pie8314FCtlDnzDUfyVnehvtX1XEyry3o8EXz3vCiDhcLqxtgSjBrC+ rSfiBv5oxwCIp3N0sV5AVL/TbWC8M2OL9CRfDmk3aMiGbiyzrLiMz7qNLorV8+ISk6SxQ9llgpn 1F45t91iEHU9l2chh1q5PdSNHUEYLzsWvzCVZzL/QWCBogWZNSwFIkuuDoVE+0A/goLB2pxPVMv k88Qm0tbUKvGCGaikry1bXoqjv/Zmc= X-Received: by 2002:a05:6000:e4a:b0:439:852f:c9ce with SMTP id ffacd0b85a97d-439852fcf32mr13794860f8f.57.1772121353349; Thu, 26 Feb 2026 07:55:53 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/20] target/arm: Drop kvm_arm_pmu_supported Date: Thu, 26 Feb 2026 15:55:31 +0000 Message-ID: <20260226155535.1171290-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1772121417890158501 Content-Type: text/plain; charset="utf-8" From: Richard Henderson This function has only one use, so inline it and drop the stubs. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20260216034432.23912-9-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/kvm-stub.c | 5 ----- target/arm/kvm.c | 7 +------ target/arm/kvm_arm.h | 13 ------------- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/target/arm/kvm-stub.c b/target/arm/kvm-stub.c index f1d0ca09e6..169ef5f206 100644 --- a/target/arm/kvm-stub.c +++ b/target/arm/kvm-stub.c @@ -32,11 +32,6 @@ bool kvm_arm_aarch32_supported(void) return false; } =20 -bool kvm_arm_pmu_supported(void) -{ - return false; -} - bool kvm_arm_mte_supported(void) { return false; diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 495ac0709a..b8aba20f02 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -319,7 +319,7 @@ static bool kvm_arm_get_host_cpu_features(ARMHostCPUFea= tures *ahcf) 1 << KVM_ARM_VCPU_PTRAUTH_GENERIC); } =20 - if (kvm_arm_pmu_supported()) { + if (kvm_check_extension(kvm_state, KVM_CAP_ARM_PMU_V3)) { init.features[0] |=3D 1 << KVM_ARM_VCPU_PMU_V3; pmu_supported =3D true; features |=3D 1ULL << ARM_FEATURE_PMU; @@ -570,11 +570,6 @@ void kvm_arm_add_vcpu_properties(ARMCPU *cpu) "Valid values are 0.1, 0.2, 1.0, 1.1, = 1.2, 1.3"); } =20 -bool kvm_arm_pmu_supported(void) -{ - return kvm_check_extension(kvm_state, KVM_CAP_ARM_PMU_V3); -} - int kvm_arm_get_max_vm_ipa_size(MachineState *ms, bool *fixed_ipa) { KVMState *s =3D KVM_STATE(ms->accelerator); diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index cee06b5f0b..82ac2aae46 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/kvm_arm.h @@ -168,14 +168,6 @@ void kvm_arm_steal_time_finalize(ARMCPU *cpu, Error **= errp); */ bool kvm_arm_aarch32_supported(void); =20 -/** - * kvm_arm_pmu_supported: - * - * Returns: true if KVM can enable the PMU - * and false otherwise. - */ -bool kvm_arm_pmu_supported(void); - /** * kvm_arm_mte_supported: * @@ -196,11 +188,6 @@ static inline bool kvm_arm_aarch32_supported(void) return false; } =20 -static inline bool kvm_arm_pmu_supported(void) -{ - return false; -} - static inline bool kvm_arm_mte_supported(void) { return false; --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121495; cv=none; d=zohomail.com; s=zohoarc; b=OPgglbu9tTKg32DwysRuHTaTzhVLHZAEfrGS3rIFCRsdn8yj8wsjVo86QeUcCliQL8buPFCRWn3rxQnA8OseQr5moYzX+ZpzOJXMMalaPlpYLcWVzP1rNTBdKl3cVVJKsQh9513qEq6EPwmWk438zvXcHPzEt2qZpe7YiglsJnA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121495; 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=Hc2CJaf+EvCFfQ6zg/jl611kyl275mtn77dMnXM1joU=; b=JpNrLRsyfYHL4+2leE+Qup1nBn9uJ1PzqSVnjxzUgBTJ3ubJqG1mzP/ptfavQrgMXgMuPyN1yMTYaUXtdSYpSA5WZJgOZO111L0+uveMljuEFDxDDN9RAYPgPBZcw6WITfpFkqyxKrxAIhu7QJpMvrI9icZ8wmbvxUNKFQa1yyM= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121495593878.9213155111514; Thu, 26 Feb 2026 07:58:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdif-0005S9-2y; Thu, 26 Feb 2026 10:56:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiX-0005PW-NX for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:59 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiV-0003ng-LQ for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:57 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-4398d1f06caso962106f8f.0 for ; Thu, 26 Feb 2026 07:55:55 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121354; x=1772726154; 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=Hc2CJaf+EvCFfQ6zg/jl611kyl275mtn77dMnXM1joU=; b=ZmuwAgiIgg2xuyIglzv+2mH2dA0uaH4Om8qmBZTb18pOyfVXxryxMGnn0C1+c/hJAR Mn1Ssk/OG9dfIywuFZnENnt5CwLr+a7ke+qs3yucgu1vffDPnGgiF4Ok7YK7tr+H1Yyo E/U3uDztCNH9FuOWjoGlhzQg+1hMJ1umNqVjRRvRaSAebVUyme+Ls52Su2u7E43mwi5d sEF4IuslJjk4DTfOGywU8pLMtajQrSSDpATqn5Z3BhLTqumgSMUGrN0jU4UxC5fJR/sn HzV7+Gm5o42kYJPkCKtrKfK/m0eElotjNCL6oxlHWtqR0JehjmgSVOD7HThgCoga0iex 82pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121354; x=1772726154; 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=Hc2CJaf+EvCFfQ6zg/jl611kyl275mtn77dMnXM1joU=; b=dM8HNYzTB/BiXOZS2l3vr2LsMDEQsb+V87APp/eUgYq9Tul10A0nj88nXdQyZpcv+J QUW64wUYgrG8uUpADkZsrnocw/iD3C8ccf4oDJxS0jqEI3BLLNTLly5uTUsFGWS/xXUO wyhXqWfYVKX8etMeXd23dWSLu4bbTncCkHjfZzkDGcCW61kKrD1vAOikUmRnijFdWsjh r3cOQmCvuPENJWSri2Rk64VrAifippJhhJTagKKTbdmC7w9PXWXRqZi2RMNriZ6nRXYM bVOaQfQtIuVf13iV7hxYxr5CIoNbpf0mZ+WJ4tC5p0jeTAxwtGBdd3Zp/xY0JKG5LntP ZYKw== X-Gm-Message-State: AOJu0Yw2REdBeqwqQ3fuhFKfsxTYzKv8agMl12blAKVGFaWTJsFqiFxp 3e15eEn+HBCPAGXijhWtnl8/peGVD5m39h3dollMomFkHE/QmoCqAccgnYnD5rDeyl9YN0F+VOI HICiJ X-Gm-Gg: ATEYQzzkcOxTMSv4rxzdI21sF3L11tgZKD4h73zrIp0VYrp0dyQ/AAA4pWVkudKHpFb uBzc+xHStfl8FPc4Mhk2ZwDNWAXiH8cbSBlayeu1w+trZaPx0fyvtp9+6tSaXppp7Nk1XxihU/B PoXKBWf27xppBdqbJGYH04k9OUmqfyc+ZSKZQeQ+9B/EZqIO+UzmLt2vK4niQfC53sqWjysVQim AWDcKtf44XqBHt79aUgw8b6IzZMUgHZdK3/rlNMaYIAotpxENBZ3G9g7e/V7ZmaDwcfWVSA7tbE 8lzMro0WlyHan9QRHQly6DwWfPRloCzV2BrVc8GKxU0p2IT4Hdgz5fuMMucUIfdTagosB+nW3kx UJ2Qy01KYonoGiTPkRPQv48kHIy34G6yOIAkAagGXLXoyCqPtPTf73J8Vfc0OE/Is+BPzSibFrv YvcfcH3SG1QaPdeXEIrMd30o+a6pTjpGLJTuZF7mz/hO3GnjzuakO36ZSa6ZIl3NV4FV88ggvt/ RqmPK7mxit2bCFyCtE5H6sLq7I3/8w= X-Received: by 2002:a05:6000:25c8:b0:437:6e6e:6f95 with SMTP id ffacd0b85a97d-439942e2c68mr7908662f8f.27.1772121354250; Thu, 26 Feb 2026 07:55:54 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/20] target/arm: Add vq argument to kvm_arch_{get, put}_sve Date: Thu, 26 Feb 2026 15:55:32 +0000 Message-ID: <20260226155535.1171290-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x429.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: 1772121496315158500 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20260216034432.23912-11-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/kvm.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index b8aba20f02..ecb732a669 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -2118,16 +2118,15 @@ static int kvm_arch_put_fpsimd(CPUState *cs) * code the slice index to zero for now as it's unlikely we'll need more t= han * one slice for quite some time. */ -static int kvm_arch_put_sve(CPUState *cs) +static int kvm_arch_put_sve(CPUState *cs, uint32_t vq) { - ARMCPU *cpu =3D ARM_CPU(cs); - CPUARMState *env =3D &cpu->env; + CPUARMState *env =3D cpu_env(cs); uint64_t tmp[ARM_MAX_VQ * 2]; uint64_t *r; int n, ret; =20 for (n =3D 0; n < KVM_ARM64_SVE_NUM_ZREGS; ++n) { - r =3D sve_bswap64(tmp, &env->vfp.zregs[n].d[0], cpu->sve_max_vq * = 2); + r =3D sve_bswap64(tmp, &env->vfp.zregs[n].d[0], vq * 2); ret =3D kvm_set_one_reg(cs, KVM_REG_ARM64_SVE_ZREG(n, 0), r); if (ret) { return ret; @@ -2135,8 +2134,7 @@ static int kvm_arch_put_sve(CPUState *cs) } =20 for (n =3D 0; n < KVM_ARM64_SVE_NUM_PREGS; ++n) { - r =3D sve_bswap64(tmp, r =3D &env->vfp.pregs[n].p[0], - DIV_ROUND_UP(cpu->sve_max_vq * 2, 8)); + r =3D sve_bswap64(tmp, &env->vfp.pregs[n].p[0], DIV_ROUND_UP(vq * = 2, 8)); ret =3D kvm_set_one_reg(cs, KVM_REG_ARM64_SVE_PREG(n, 0), r); if (ret) { return ret; @@ -2144,7 +2142,7 @@ static int kvm_arch_put_sve(CPUState *cs) } =20 r =3D sve_bswap64(tmp, &env->vfp.pregs[FFR_PRED_NUM].p[0], - DIV_ROUND_UP(cpu->sve_max_vq * 2, 8)); + DIV_ROUND_UP(vq * 2, 8)); ret =3D kvm_set_one_reg(cs, KVM_REG_ARM64_SVE_FFR(0), r); if (ret) { return ret; @@ -2236,7 +2234,7 @@ int kvm_arch_put_registers(CPUState *cs, KvmPutState = level, Error **errp) } =20 if (cpu_isar_feature(aa64_sve, cpu)) { - ret =3D kvm_arch_put_sve(cs); + ret =3D kvm_arch_put_sve(cs, cpu->sve_max_vq); } else { ret =3D kvm_arch_put_fpsimd(cs); } @@ -2302,10 +2300,9 @@ static int kvm_arch_get_fpsimd(CPUState *cs) * code the slice index to zero for now as it's unlikely we'll need more t= han * one slice for quite some time. */ -static int kvm_arch_get_sve(CPUState *cs) +static int kvm_arch_get_sve(CPUState *cs, uint32_t vq) { - ARMCPU *cpu =3D ARM_CPU(cs); - CPUARMState *env =3D &cpu->env; + CPUARMState *env =3D cpu_env(cs); uint64_t *r; int n, ret; =20 @@ -2315,7 +2312,7 @@ static int kvm_arch_get_sve(CPUState *cs) if (ret) { return ret; } - sve_bswap64(r, r, cpu->sve_max_vq * 2); + sve_bswap64(r, r, vq * 2); } =20 for (n =3D 0; n < KVM_ARM64_SVE_NUM_PREGS; ++n) { @@ -2324,7 +2321,7 @@ static int kvm_arch_get_sve(CPUState *cs) if (ret) { return ret; } - sve_bswap64(r, r, DIV_ROUND_UP(cpu->sve_max_vq * 2, 8)); + sve_bswap64(r, r, DIV_ROUND_UP(vq * 2, 8)); } =20 r =3D &env->vfp.pregs[FFR_PRED_NUM].p[0]; @@ -2332,7 +2329,7 @@ static int kvm_arch_get_sve(CPUState *cs) if (ret) { return ret; } - sve_bswap64(r, r, DIV_ROUND_UP(cpu->sve_max_vq * 2, 8)); + sve_bswap64(r, r, DIV_ROUND_UP(vq * 2, 8)); =20 return 0; } @@ -2420,7 +2417,7 @@ int kvm_arch_get_registers(CPUState *cs, Error **errp) } =20 if (cpu_isar_feature(aa64_sve, cpu)) { - ret =3D kvm_arch_get_sve(cs); + ret =3D kvm_arch_get_sve(cs, cpu->sve_max_vq); } else { ret =3D kvm_arch_get_fpsimd(cs); } --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121482; cv=none; d=zohomail.com; s=zohoarc; b=OVxCJR8gpIF+B5aMzBNchatWnCQG2quX7JnLmILfRD+z8QnGVbDKYs+5wIuQM27MJe6k3hVR/eBpEBK3FpOnz8BswdBhn+du7L9ir8lhFcl8P27s+17TMiizhmcNonjg8k/tvlr5X14LyhPArEi4djQ7NjPDB7bZAOTZuiLQDak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121482; 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=OKoWT2ApVIzhi/7waZCc6MN7OGT/UzfjYDpeVAHn0Cc=; b=Cl8Yr0vfEpbJuBQYLTO/1TVJGJro685DUHcOE2sL7vINvm4M/m+TiJ2MNjhu/hQVjAvJ9KPh5cxcQPM2BKaa8BDk7HzNHyt+S8CGMuwosIW3TdwD3CZjv+BQ10++bG8UeSFdRLqZ3jwpv0+0ee2P1oiu942lL1in7clhYmHskWM= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121482676724.8592447291992; Thu, 26 Feb 2026 07:58:02 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdid-0005R4-N3; Thu, 26 Feb 2026 10:56:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiY-0005PX-BZ for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:59 -0500 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 1vvdiW-0003o0-Lh for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:58 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-480706554beso13256095e9.1 for ; Thu, 26 Feb 2026 07:55:56 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121355; x=1772726155; 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=OKoWT2ApVIzhi/7waZCc6MN7OGT/UzfjYDpeVAHn0Cc=; b=pH8lRnP3HU7QkBUituspQfoo30kiO76IUZF6u96NNywx7hdkMTGlV53JZK0XLjg2uo F0OuE8wuhbnoN8caFLXAPanHJx8wj5wGfR9igcaIWB2eKQikiYo2DAFKtSgapZxm2Mqr wXJooVWe0nSrdAE8oIM62FgOEIjYcOuYf4PbcBhe6EowfA1+QjmBYBTKajkhC/x4JzfM f3k7H/ngHUSrisP7GmU0bvfezQ2jHr2CaL0sTV4avmGemntVo6tCBaIgSS6CSdkTNr/p 5yo1cRIgBZzAjwkTyIdXOsnR7WMArs50j5veb26sgXSGx2PMYQzES0tzXXaXmYq14Ph4 OCVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121355; x=1772726155; 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=OKoWT2ApVIzhi/7waZCc6MN7OGT/UzfjYDpeVAHn0Cc=; b=Gsfz6DFF7hzoobijnjGDJ+y1mdEeQwmXgNEW1Yg/ka+Q7V5UpEYvGWy22aR6iQtFSA L10Olphj2iS8Ez+mAM0Av7B90pj5VG5p/uErNbQlxFldqvFaNy4+yLCfkbhR+3zGbnlP r7sHu5nmR8eZ5ESZtmXBW9y63UPeNQbAxI8aiAbsyddjyL2X0K35VSgnGSHIn5IbNmYF 5I+PfVza7DB/MJYy0QICN9amCiX59EJfTDNvdE7lCqwlbVtxUuPaDkhpXxXrhuLhvhku n8J01XAiQhzn3dvMAExCW29s4VGToqvqKj3ac4L/M0/+u3OkzdtJ5LthNEPb7di0tqeZ wJFw== X-Gm-Message-State: AOJu0YzQ+Iw5TDK6NY88zbArXWHEBxaUad7LQb//CcveWh3ctFlXVO8w ZC3gfDbuIkZvawrHlS6q025+DtRwCjoPAa+mpHtHwGmxgtSCIU7KL3QXMJtBiOdatYlamFXytqp Jdr8Q X-Gm-Gg: ATEYQzyRMgRke6Hkb6N88N9KmBFIB/BmU903kKKDPqgbzC+nnsBXdtV6F+mM+rf3mCD eOsxYmvFRsDYJwJ5+zZ/ylXxCVtMg+LkJiZe5pFR2PkYF9Zc5rBe6wG6e9dz64j45yHGTjZu6B2 lLG0RuC0QbkguOgTksLzPWfTa23HE9bWMKhpdwMkTiVwVflyWfrsQzrjgvp0NczozCx0XMVlwU9 NzXI00Q4zVkp/cvWVZOlasdXyGeOJLRsv+g3xhYa5b54mCz1TEyYSSNX4R5px0CKFVdmiqI6bpn YrGU9mejRkc7UEvWjv1WeV8qNHo1+LfPLrVfUzQH79Zmz0Lbyo9+7ClPuFbDcmtJiYIVJIJ6GIC 9MY5mAUd2JUAtdadTIq1LEM+rneOTM6mrcqh05VBAoD8Dem2SyauLiME3p/8Hkxrm6Vdq2BGqZd 4w05rcVzG61+/9+kRZ8KK0aTWlIoVFIxWNYeZVZNmC9Fy2cvW/Poomxr2PoyFhFceE+S4MPXIY+ H2Zs++pIV/KqZ5e5LhZFTnpE2YgItI= X-Received: by 2002:a05:6000:26d2:b0:439:8f5a:2b8d with SMTP id ffacd0b85a97d-439942fdfb0mr8967158f8f.56.1772121355171; Thu, 26 Feb 2026 07:55:55 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/20] target/arm: Add have_ffr argument to kvm_arch_{get, put}_sve Date: Thu, 26 Feb 2026 15:55:33 +0000 Message-ID: <20260226155535.1171290-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.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: 1772121484344158500 Content-Type: text/plain; charset="utf-8" From: Richard Henderson Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20260216034432.23912-12-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/kvm.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index ecb732a669..4908138764 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -2118,7 +2118,7 @@ static int kvm_arch_put_fpsimd(CPUState *cs) * code the slice index to zero for now as it's unlikely we'll need more t= han * one slice for quite some time. */ -static int kvm_arch_put_sve(CPUState *cs, uint32_t vq) +static int kvm_arch_put_sve(CPUState *cs, uint32_t vq, bool have_ffr) { CPUARMState *env =3D cpu_env(cs); uint64_t tmp[ARM_MAX_VQ * 2]; @@ -2141,11 +2141,13 @@ static int kvm_arch_put_sve(CPUState *cs, uint32_t = vq) } } =20 - r =3D sve_bswap64(tmp, &env->vfp.pregs[FFR_PRED_NUM].p[0], - DIV_ROUND_UP(vq * 2, 8)); - ret =3D kvm_set_one_reg(cs, KVM_REG_ARM64_SVE_FFR(0), r); - if (ret) { - return ret; + if (have_ffr) { + r =3D sve_bswap64(tmp, &env->vfp.pregs[FFR_PRED_NUM].p[0], + DIV_ROUND_UP(vq * 2, 8)); + ret =3D kvm_set_one_reg(cs, KVM_REG_ARM64_SVE_FFR(0), r); + if (ret) { + return ret; + } } =20 return 0; @@ -2234,7 +2236,7 @@ int kvm_arch_put_registers(CPUState *cs, KvmPutState = level, Error **errp) } =20 if (cpu_isar_feature(aa64_sve, cpu)) { - ret =3D kvm_arch_put_sve(cs, cpu->sve_max_vq); + ret =3D kvm_arch_put_sve(cs, cpu->sve_max_vq, true); } else { ret =3D kvm_arch_put_fpsimd(cs); } @@ -2300,7 +2302,7 @@ static int kvm_arch_get_fpsimd(CPUState *cs) * code the slice index to zero for now as it's unlikely we'll need more t= han * one slice for quite some time. */ -static int kvm_arch_get_sve(CPUState *cs, uint32_t vq) +static int kvm_arch_get_sve(CPUState *cs, uint32_t vq, bool have_ffr) { CPUARMState *env =3D cpu_env(cs); uint64_t *r; @@ -2324,12 +2326,14 @@ static int kvm_arch_get_sve(CPUState *cs, uint32_t = vq) sve_bswap64(r, r, DIV_ROUND_UP(vq * 2, 8)); } =20 - r =3D &env->vfp.pregs[FFR_PRED_NUM].p[0]; - ret =3D kvm_get_one_reg(cs, KVM_REG_ARM64_SVE_FFR(0), r); - if (ret) { - return ret; + if (have_ffr) { + r =3D &env->vfp.pregs[FFR_PRED_NUM].p[0]; + ret =3D kvm_get_one_reg(cs, KVM_REG_ARM64_SVE_FFR(0), r); + if (ret) { + return ret; + } + sve_bswap64(r, r, DIV_ROUND_UP(vq * 2, 8)); } - sve_bswap64(r, r, DIV_ROUND_UP(vq * 2, 8)); =20 return 0; } @@ -2417,7 +2421,7 @@ int kvm_arch_get_registers(CPUState *cs, Error **errp) } =20 if (cpu_isar_feature(aa64_sve, cpu)) { - ret =3D kvm_arch_get_sve(cs, cpu->sve_max_vq); + ret =3D kvm_arch_get_sve(cs, cpu->sve_max_vq, true); } else { ret =3D kvm_arch_get_fpsimd(cs); } --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121451; cv=none; d=zohomail.com; s=zohoarc; b=RGhGTwG6tKS7ZqPDS3iI2G5aUeDNv/bv1riXALX8Jx6SZLSunmUkdu5QLmyadHDod91MMbclpt7NFUP5E0OOeuUAPJS5x4nM6xLEK45Krr/8NiWdrkE8M6MCv8UFXaWbGVHs0VcMbqhkKWrIhXhyzhi1LU9YhUKpe2xdk7CwSEw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121451; 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=Jbj1sPJQ+uYTLuU5zSZYzgNaueHVlD9yhTCYeNJfHjI=; b=d3kiet2Nm8YHVt/DZyOzQmV8jeY6Uaoleshw0RuR0qK/IrO+c5Z/4Ft1g/NFJmOEUz+I+AyGDBRbBg5bik6O7UJO6IvrjVjad4p9NXQQgUEInVEl+yDHZn/hizz3HYAgBrSXvaJuGj6MinCuku0FfQ7XtVS71HM7OE9Lr1LPkL8= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1772121451971446.68999567319554; Thu, 26 Feb 2026 07:57:31 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdih-0005XG-U1; Thu, 26 Feb 2026 10:56:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdiZ-0005QH-Ka for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:56:01 -0500 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 1vvdiX-0003oJ-U7 for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:55:59 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-483770e0b25so9659245e9.0 for ; Thu, 26 Feb 2026 07:55:57 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121356; x=1772726156; 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=Jbj1sPJQ+uYTLuU5zSZYzgNaueHVlD9yhTCYeNJfHjI=; b=uLR29qqXGMFc3kNrMPM52w3emy5OfNADSbakFtnuh/0tTk9uK60xW8ter0e/eu8O94 0Uxmp0Vjja6zyeLUob3PVEM2BSo2ebzEAm/YrAPU83DOj1WxbYvCmqe7SeRpMHOA+Tb2 RFSbbo+Ew2jwwvXaZOrmUMNEGf9MBZgPCAdXGBrXYHW+6OwhYNLoUmOML/20Ro0waZ4F 7heC1GbZFxOkYRYnvfzDYQ6ys0+zS9TUnemrFfJADrYJsoYItwVhneX88ladtELP0hYK GoKq0pdmrpE494GhMADRfsgEJfrAM1nC60oVrqTXRojwEPpAtC1A00s9ZiqPwVWX6zCf 6K5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121356; x=1772726156; 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=Jbj1sPJQ+uYTLuU5zSZYzgNaueHVlD9yhTCYeNJfHjI=; b=VZMZ+3ZuqIffu32itC/90lRxCnTm7qAg91uBSjsGwoeLjxRXxAOU9sA5EuuhGGo2Di V1vr6moIZeK1sWzRUeJ9QoodepYrddJpqOnWrVG1mEH77ZAtCFayq4peftLATOzTyI99 Symo+8/CljXjMZVi87/qkpiB/DOytVmErwgfj5/J6ZNXM7ZfP/z/Ld6lpuiE+Vb1lKa+ ymkNAGKBUEH3Sl5I3Vlz/q6/Yz/AQw0jSwbuXM4+tNs1YZUXyD48vb0YYnWwZAa4F7Cz qaehqPIgBuSr7jH/OPWMtdZMZ72snxZJ0XjP8yVxBHb8cspegcx27jy8v+0LnA3DrO65 tMFA== X-Gm-Message-State: AOJu0Yzmaxc3J2XVJI2n3TO1jAJCLCwBJT7zBkuTojF/a0G+3N9AWQ10 o4O73CK8dyW183CgKZxG4mULny5yJjZnDt7xhlqDUvjS9bcyLqFzJMCjCO/0X8N0FyJfDKyc1I6 Q1rvE X-Gm-Gg: ATEYQzxN0xjK/B5h1lfdxw9BGFIPZ9KF1KwBawe1m/cnM7XZOkVybLxSlU6kY9XqGv4 FreAjHsf+OQqleybWM/p/HyvciA6DowigPru5Mi3aUXuw/vZ5dF3Jcxb6DE2zyqSnUh/b7qw/kj tIU/QOSnTBt50iSfqY+NbLii/7190LhjzOQAJHnF4efqneJ8WAybxIMcI31tmQUQVZXFPAWMsll sdGqr33042ag6VSBu8hZBUOpQr6BjPvmVyle6Lk6Ij/VpNSyjdXWbuGHWWSu5tQOP+lqg78l1cp uHtRNd76NjCHQrT2+YnhMV+QfaYTyFJQMo6phXOW1eG7xbaWUCVSdhFFsD+0TEFDniSBCsBTxh0 1lTyvJoS0BXeY/g2XQJRnrXn+zhuZMeYF7I4nU/Cyno9cS0J0vDP5jFk/hEvq3qxxby36eowpBW k0pq+VPUqV8v2/e7aRvjwwRdMh7cE3/GTVY2sVW845tx5TAsWBqX+dHsK6Sp9V+kVhDiuLDEzHn Vpl0KYSz5MmHgx6T3qjVq711ezTrG8= X-Received: by 2002:a05:600c:4057:b0:483:c12b:fe46 with SMTP id 5b1f17b1804b1-483c12bff6cmr67799855e9.10.1772121356030; Thu, 26 Feb 2026 07:55:56 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 19/20] target/arm/kvm: Don't free migration-blocker reason on failure Date: Thu, 26 Feb 2026 15:55:34 +0000 Message-ID: <20260226155535.1171290-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.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: 1772121454022158500 Content-Type: text/plain; charset="utf-8" The migrate_add_blocker() function documents that if it fails it will free the Error it is passed via its reasonp argument and set reasonp to NULL. That means that in kvm_arm_enable_mte() we don't need to call error_free(mte_migration_blocker) in the failure codepath. Doing so is harmless because error_free(NULL) is permitted and does nothing, but we can remove the unnecessary code. Signed-off-by: Peter Maydell Reviewed-by: Pierrick Bouvier Message-id: 20260223173232.453165-1-peter.maydell@linaro.org --- target/arm/kvm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index 4908138764..eaa065d726 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -2554,7 +2554,6 @@ void kvm_arm_enable_mte(Object *cpuobj, Error **errp) error_setg(&mte_migration_blocker, "Live migration disabled due to MTE enabled"); if (migrate_add_blocker(&mte_migration_blocker, errp)) { - error_free(mte_migration_blocker); return; } =20 --=20 2.43.0 From nobody Mon Mar 2 08:51:00 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=1772121514; cv=none; d=zohomail.com; s=zohoarc; b=CbvCW9Jm0nBpnIiutNsD328LXjcpABnmNB0dkssht+koNEvbaI4jWzJYqr1CMZLrbFBaX4d5qHdUu9lPUiyQKrLoRe2YCHXFCHmGrmXhMgCmt/h+bZhBVNYd3o+3hs0TFwUyvIhJXRoOY9m7NtBajNGJIPcwexQND2fUdn9s9PE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1772121514; 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=e6AgZw9f+Htkor4ugRgGRf724/uPDwcMahSVEptulgQ=; b=T8a6JtV92j2m99ezVh/2+zbeukDzheO3x4dWrexRKuJSwYBmryaNUtLXavQnOUcYpFtl+jID2aAdk6+VwHPl5IAUWg2Pkg2ObvD5bhluv7wosVz25QmX607dMEJAxXyQeWAZptkCSrqJQ0ljfWO1/y1ceHgraEscbu9/gN+2uz4= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177212151464396.16054163345007; Thu, 26 Feb 2026 07:58:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vvdid-0005R2-Hi; Thu, 26 Feb 2026 10:56:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vvdia-0005QS-UK for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:56:01 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vvdiY-0003oS-SY for qemu-devel@nongnu.org; Thu, 26 Feb 2026 10:56:00 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-43988056dc3so1040877f8f.3 for ; Thu, 26 Feb 2026 07:55:58 -0800 (PST) Received: from lanath.. (wildly.archaic.org.uk. [81.2.115.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4399c75b8afsm407235f8f.23.2026.02.26.07.55.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 07:55:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1772121357; x=1772726157; 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=e6AgZw9f+Htkor4ugRgGRf724/uPDwcMahSVEptulgQ=; b=ifq6i4F8rU87rrkZVaxlX9oXeasr+Vt8SOVMq6lKGNogyG1eVFuEZYAB7j9V6RrdA1 T7kRrRV7pOBJRu2uJLnNCWq0cYgIdTnxR8YSqNx1+DlrnpYfr0AFNylzQ6OPDEf4eyQd GRxswKIBmkW5yweERcdfmNK4RHI30Bs+jiJ+EZ/a1iSq5TLuHxd7y3iCV+hbiR3F65MT S6sOTOcvcG4YJI6td5eO9M+vgVdKeO8mUGZFSrECo0jQHLh8RBe9tZdhXREQMAv/ZxNj jhlBNYAS7kPyDxXf/m0/eNeuiGI0QtH/4lgrKkmFXG3I1aSE/l00HCyMT9iG7/batPMP Wg4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772121357; x=1772726157; 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=e6AgZw9f+Htkor4ugRgGRf724/uPDwcMahSVEptulgQ=; b=hGOjwOYni5wgLCHABmtY6vhTfnRqMtBktiyoL9TyqVLunuQKuUClMY3X+O7w0XC8fG UktRLRVNkDtv04c2irpEqWKhxFCbcYSP/7hLHSA5L5erR6hxbdPgBU4qopqrLG/iZMOi bykFhKSSUN1mwdMw5ceKIxjHhVLRuzy2qDq/tv6toBQnUrWVZrTaB5WqXXXCjzvehhhw QghOlr5i6BP9bHr6x1dpMdnHvspgrOZvhV0IcnRSNfg/G0eKtMQ1xwIacb/rTDgxTX/N zoag308lv9BjBlp+5lA3zbD1KGWuDXtCLpbinHxPXWBkCjQqLKEImbRBgRTwJPBbaISZ exoA== X-Gm-Message-State: AOJu0YyQrQkn87OYQrD3Wl2WKR/OfqYCWf4Jf8A3nPSZO+6Dc6y5QPja N6enh/wmQXxBXvffvvEm5UwmEKU/EJR+jtMB652Sypea6LEkyduLnF/ezeDiruMOGinr/RRG0D0 mN7Ds X-Gm-Gg: ATEYQzwlLYnIq85mhhyzntNrol4LYaTcZyhmPb59xDSelVPFQBycrVuc44kDLufGYSL fMY1sea1gCxUAuwOAtIcQrOv5NASADu6Z+83Xqz5eefYtTeJyecZhj02eVvOR3a3A5M911dCCbf bL4a/82yPvis3XqRBKmKXlUlK3DIF+EJ5lgf0TyiyPITf+XOPBhKa4LZi3tZc6R+6S3UN61mjG3 /L2a0O01yKk7ySSpeiP/Su0Vak07ytEPNawVoAaye/WmoH+t3eSR81nUdxtHgy0Q1kxHC+RGXZU HHu2T9zP5JLtckmA9otG1f8PWt6QSOf+eOtd1e9x+ykTeOMaFGQ7tocmo/D4f0+DEwraJG9gWls KaoxHruOcNg+zoLjSUAkRMcXY/21Ifdvb2qgTIYAXnL8so3tueHGL/Yhiry/BKBfRmLHLybJ+OT /DcjpmYC6xoyDX0T01Nk3EKR6oADh+ipMjJOXz4lDoUVMLbD+64CbMB6xJQn84hB4ryvPHFEFvb Wr7Uosznr1p7oHYf+bD920PdESb5Tc= X-Received: by 2002:a05:6000:230d:b0:439:6f10:fc19 with SMTP id ffacd0b85a97d-43997f46457mr5406519f8f.55.1772121356918; Thu, 26 Feb 2026 07:55:56 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/20] hw/char/pl011: Only log "data written to disabled UART" once Date: Thu, 26 Feb 2026 15:55:35 +0000 Message-ID: <20260226155535.1171290-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226155535.1171290-1-peter.maydell@linaro.org> References: <20260226155535.1171290-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=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1772121516449158500 Content-Type: text/plain; charset="utf-8" We log a GUEST_ERROR message "PL011 data written to disabled UART" if the guest writes data to the TX FIFO when it has not set the enable bit in the UART. The idea is to note that the guest has done something dubious but let it work anyway. However, since we print this message for every output character, it floods the logs when running a guest that does this. Keep a note of whether we've printed the log message or not, so we only output it once. If the guest actively disables the UART, we re-arm the log message. Notably, the Linux kernel does not bother to enable the UART if it is used for earlycon, relying on the firmware having already done that. Signed-off-by: Peter Maydell Reviewed-by: Mohamed Mediouni Message-id: 20260210101702.3980804-1-peter.maydell@linaro.org --- hw/char/pl011.c | 24 ++++++++++++++++++++++-- include/hw/char/pl011.h | 1 + 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/hw/char/pl011.c b/hw/char/pl011.c index b2ca68e3e8..cb12c3e224 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -227,10 +227,25 @@ static void pl011_loopback_tx(PL011State *s, uint32_t= value) static void pl011_write_txdata(PL011State *s, uint8_t data) { if (!(s->cr & CR_UARTEN)) { - qemu_log_mask(LOG_GUEST_ERROR, - "PL011 data written to disabled UART\n"); + /* + * Only log this message once, not every time the guest outputs: + * otherwise we would flood the logs with this message, making + * harder to debug guests. (Some very popular guests like Linux + * don't actively enable the UART.) + */ + if (!s->logged_disabled_uart) { + qemu_log_mask(LOG_GUEST_ERROR, + "PL011 data written to disabled UART\n"); + s->logged_disabled_uart =3D true; + } } if (!(s->cr & CR_TXE)) { + /* + * We don't bother with the only-log-once machinery for this check + * because TXE is enabled by default from PL011 reset, so there + * isn't likely to be existing in-the-wild guest code that trips + * over this one. + */ qemu_log_mask(LOG_GUEST_ERROR, "PL011 data written to disabled TX UART\n"); } @@ -457,6 +472,10 @@ static void pl011_write(void *opaque, hwaddr offset, break; case 12: /* UARTCR */ /* ??? Need to implement the enable bit. */ + if ((s->cr ^ value) & CR_UARTEN) { + /* Re-arm the log warning when the guest toggles UARTEN */ + s->logged_disabled_uart =3D false; + } s->cr =3D value; pl011_loopback_mdmctrl(s); break; @@ -665,6 +684,7 @@ static void pl011_reset(DeviceState *dev) s->ifl =3D 0x12; s->cr =3D 0x300; s->flags =3D 0; + s->logged_disabled_uart =3D false; pl011_reset_rx_fifo(s); pl011_reset_tx_fifo(s); } diff --git a/include/hw/char/pl011.h b/include/hw/char/pl011.h index ff735b5234..5695787650 100644 --- a/include/hw/char/pl011.h +++ b/include/hw/char/pl011.h @@ -51,6 +51,7 @@ struct PL011State { qemu_irq irq[6]; Clock *clk; bool migrate_clk; + bool logged_disabled_uart; const unsigned char *id; /* * Since some users embed this struct directly, we must --=20 2.43.0