From nobody Sat Nov 15 12:39:03 2025 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=1751289104; cv=none; d=zohomail.com; s=zohoarc; b=bzV5yzS1BE7wZdO2I4WmTFFNnEyOQ0ASAPU6j9KycuyqLhtzi3LV3xJ2AWKuUNeuCqv99XuaeZ1QCff1AlHc7Emtvn3ZvwT3ms40tZdd/vLFm7PXH+GMyajhd20ivQBOPc6sWEthYZTLpIBKgzfEHCiQ36JpSZqn7wDJb5M6Iog= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1751289104; h=Content-Type:Content-Transfer-Encoding:Cc:Cc: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; bh=JYsduLxNVqPKGIUHLquU8P/wxsfx+yTwXnitP4Bhu9k=; b=I9Qh+Ev7xMeUjEsvITS0pmoJfLivV1YeE/ASwXEQhHbHZYizLTU15PsKRSi2vRPd3tOoc3R8SzfbSw6rcdY7DxlJ33+QduNJAKx0TQbuh63rrpO7BLKZ/XEG3Io831JMOSpbPoqrrvK8aCnruGFVwBRfMJcdjyHBILXSZ2EKPrQ= 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 1751289104179578.7945910987671; Mon, 30 Jun 2025 06:11:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uWEGe-0005ww-Mn; Mon, 30 Jun 2025 09:09:52 -0400 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 1uWEGc-0005wW-O0 for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:09:50 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uWEGZ-0003vy-TM for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:09:50 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3a582e09144so1587966f8f.1 for ; Mon, 30 Jun 2025 06:09:46 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3aba76e40c0sm6177885f8f.59.2025.06.30.06.09.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Jun 2025 06:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751288985; x=1751893785; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JYsduLxNVqPKGIUHLquU8P/wxsfx+yTwXnitP4Bhu9k=; b=zp5SVFZtIUuVzNvduoECWUZbq15smnyO3tACjly80UMZCNm0LrWmyrQWwrERzkhnIs 9Qt7ZRyQDsWOIM4+ZuzCCOw7qxaDFSxkiLSitZ7Y/fUDFdkRrmFSfD0Y2winRCUKUP0D AM+M/S/hwmtRcMQeAG42PRj93jLAaVCEvtcLpKJf4uvsRKqmlTG0JtOyugEmM3vkwO5v 6bHhwexawphII17JczJY3e67U1y37VqlRDYznJ44+q4F0r3dsKc+0RYQbGzQWENW4Dx2 aHcR82FtC699U9dNFXmlgI3GecifqXaRqFpmXtyjkzouV1MhnrVrmC6iAaEK+NGA7izp uVEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751288985; x=1751893785; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JYsduLxNVqPKGIUHLquU8P/wxsfx+yTwXnitP4Bhu9k=; b=PqKvJT/W866HWu+GJjEIGQFcgFLD1vgh3DhTQcTUPkQbue9LpVr2V9T+59MIYOVIG/ TepYTkEtvZH5FYAZbTwENxbthYOFtvQIjhfYuMbAUy0fFzkWFvDSE44YW5s/MDlWqitR nZ0Y8rmS3lWmFXgImXd6mEwaGQ9OR+9Tb2Gb39HM0d4t69yZlnq1yI2KQdXRQ/QPT7PW ABA2purooxSLYIL0ayysYm0tw1TpNkC88T9MzVI22nG5WTjwHyT5Sm8p4nPqTJusV7x+ C5PHxI+F+jTc+ho2OVx/wlij+thDpEhu3Ab1hySnXODf+8itCSJrqiM8Jo7j3bIYi2UW jsyA== X-Gm-Message-State: AOJu0Yxo2qEWrpapn3WKfNVnbi9t93Jr7aObog04cbLh2iWflFAuX/qD E2p3MLSDCQ1poiThEl22YGu1B25Mc1POwLjI3JyX5fG+3ecblrmk99eG6SRN1+3p6IjLrXHJLOY R2EB3 X-Gm-Gg: ASbGncuGi8C1mG32VmMa5YYA1ZgyYml3Nraf9bOtoTUNEyvs/kaRmOfJsU/FqQ8BMZ/ /puaW1FeUTUXfwFzGT3sLJdEfrI+Zaxgls98TGwfLLbypQGeKTVwaLC6Cjg8QoHay3jtqTyNwWL N1x0g7m3jivf6Nja297I0XyLUf82qwgdYTF/8XKOsIF5s6QcBL3Y0Pck8HdkUj/ADCX74ge/8RX HkZMenAR+kU9TppKsy/fCUgELu7XRT3ziH0zUUrDXAkDeuHZorCmJFEL7B5ZcTKqfyws1N20LhF rNvTrQry4cor5z5JM0B8HW0ELIvjrvckSh6HNr+AHJ0xL0KntFFULM/XSMcyLt3S2jM5WWXdmNY j4/U7yG7zZDdve3d2T1+22NtieGg5M5P1093G X-Google-Smtp-Source: AGHT+IGGUzavBAxnZDAudqJ5R9I1M0tcbn771DSJnY6iAVvDoRTWzTNamhzqevp5dtEWdPx1XkvQuw== X-Received: by 2002:a05:6000:1786:b0:3a4:dc93:1e87 with SMTP id ffacd0b85a97d-3a8f577fdf7mr11776774f8f.1.1751288985121; Mon, 30 Jun 2025 06:09:45 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alexander Graf , qemu-arm@nongnu.org, Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH 1/6] target/arm: Only set CPU_INTERRUPT_EXITTB for TCG Date: Mon, 30 Jun 2025 15:09:32 +0200 Message-ID: <20250630130937.3487-2-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250630130937.3487-1-philmd@linaro.org> References: <20250630130937.3487-1-philmd@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=philmd@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1751289107437116600 Commit 34c45d53026 ("target-arm: kvm - re-inject guest debug exceptions") removed CPU_INTERRUPT_EXITTB from KVM, but it also appears on HVF. Better to restrict it to TCG. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 889d3088079..764b1f82dc2 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -10929,7 +10929,7 @@ void arm_cpu_do_interrupt(CPUState *cs) =20 arm_call_el_change_hook(cpu); =20 - if (!kvm_enabled()) { + if (tcg_enabled()) { cs->interrupt_request |=3D CPU_INTERRUPT_EXITTB; } } --=20 2.49.0 From nobody Sat Nov 15 12:39:03 2025 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=1751289104; cv=none; d=zohomail.com; s=zohoarc; b=WAsuQRZD8yFMXSWcC9+LlOyWQ6E0pdDUl6P5QjKciY4HKEDAL1EFcUbODCQCrwDySppt/138lSM3BKT4+68oUZ8M8zcf6xafHmwnwukxPmn2ztXD39OVEtWi3eIO6xinpfUUjfPu8KN2ELyIILWMBXD7ZDorIWqK+GxLNlavpH4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1751289104; h=Content-Type:Content-Transfer-Encoding:Cc:Cc: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; bh=dBFvK7DiFhA2sEsL5eyFByettabJhzHGLaBLOapmzQs=; b=fdIE9D59gD9qjAMoAb5SEqgipkKkElLy/MIPeGCKXhcPO9PZiiCdfiDgB6t+S01kbwrju2hXpN7/HUOVA2nDzvTr10qXpJv1JZn7cqACUG9GNZnxTJx5voJkvSvAd+O02Dotn/IaPINth3fe8w+I4Yg4B95QoIsLLgRXs/z8GCQ= 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 175128910407464.32114232989329; Mon, 30 Jun 2025 06:11:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uWEGi-0005yN-Tn; Mon, 30 Jun 2025 09:09:56 -0400 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 1uWEGh-0005xi-A0 for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:09:55 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uWEGe-0003x8-Ja for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:09:55 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-45310223677so14501155e9.0 for ; Mon, 30 Jun 2025 06:09:52 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a892e5f8e1sm10247814f8f.88.2025.06.30.06.09.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Jun 2025 06:09:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751288990; x=1751893790; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dBFvK7DiFhA2sEsL5eyFByettabJhzHGLaBLOapmzQs=; b=n4cBs5ohpWJzlEzQtMcTHI8k+0hrGuEId0ti/LRLkBxxmelrEORRraV8TaYoNGg2bP KS/4IrdZcCDOoC2N6voC1TTR+HjzBrSLayQkqfBbwrfGOCAUTzXb1prai2LzxsD9+qZb S5eHjrB+hea+Os+ly66GIjfmIcy8c9seM+bWzGUfonG+oSznYLvgbtaInf9wLPjx5ZGx QKKiYbnHUbWNgFA03GcPVxwWsoT6jBcarUPMgBkzWUR2D69ZNsJhIL3zfXV28mQ2e/C5 BVkTiC2OEAhPek/y4sjjVfM91ocl2nO6tGJW2tNdCMWi0e4XjFsGVmKN+H3Z2c9rx7E6 4f5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751288990; x=1751893790; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dBFvK7DiFhA2sEsL5eyFByettabJhzHGLaBLOapmzQs=; b=BPLSSEradgxxId7RxgEKKLeuzyHaOvxtBrEWWldWx/B/LT+qndQ7jk5bFb77gQmWaJ 2Gc1QKU/CKrxUG/egYRiP9cZS8ZgeEkS9c8QryLna38rHT744tWrW36aiFBfV0NFieAv ztJZqsykICTm2KYIYb2CYeEzBJwgFWLr5nok7oJBsXGu2/dTJRAAQIVifEC1h3NEU6Jm tBuKgjGOKIxgEqaUB5U+vN36F5Du7ewDSTzGTx9yY80xGav4VcB83r21UtvnX3J5hj+b ybTBJB+oEUktqMkdatyFNwR4u5Y1wLTgfRFEmleGfXtbSk4x1IILD81KwAozWJtvV2Jd qHsg== X-Gm-Message-State: AOJu0Yx68rbRIuIM9Z8FILlpo7Uf5DGdUDpp0zc4dgmFAZ+iUDPS118s 4ROigfXqitR9aroBom/Au1Yj4g1DNy6cP610qOzR9YyGlo4KNSsgH84BXqSlF1UL6f2uDnn7Q5C rV4JJ X-Gm-Gg: ASbGncvMDCBw0UZJto9374uSCw7+q6u3RSsd+Qd0xDHJGsSgbTopyJXQHSCEtL2ne++ UuSDhHuEDO9b3Ssow9eN6RQ3+ZdcdB/ifoyP9u2QnaNNKzm80/r+epbV1WOANJGRN3mpq60xUz3 c7bZZct3tb0GFF+ajS17h4+sXUNhm9aElUKB08mqoN7FXh6vkF26NAbDrc05SzojCaBwXYvT4/p NdwlC0lAfFQORss4D2YP85KBJ0gnLW23euJpDTMY+LWL8IhQdURR9ujx8ffCKMSTY7y/eauF62C 9SmngOv6VWs9iEPHUirSph1NZ5ikPSChWRPhp4hOX47c96tnW10oWpPPVoC4P588He2XfMemWmm JjHfIQbKtfrQRvRI3vYnIlQxomKBu3MlfTT5GDNo8woJrtTk= X-Google-Smtp-Source: AGHT+IG5Ui0WZJV6aSilq/6/XRjwd5qwQLFqiHm+pw7RRWcHIEBBTfmNOBhvCo2f3RV+CzUCypmSfQ== X-Received: by 2002:a05:600c:1c8b:b0:442:f4d4:522 with SMTP id 5b1f17b1804b1-45391431c04mr119049435e9.5.1751288990446; Mon, 30 Jun 2025 06:09:50 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alexander Graf , qemu-arm@nongnu.org, Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/6] target/arm: Only allow disabling NEON when using TCG Date: Mon, 30 Jun 2025 15:09:33 +0200 Message-ID: <20250630130937.3487-3-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250630130937.3487-1-philmd@linaro.org> References: <20250630130937.3487-1-philmd@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::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1751289105348116600 Only allow disabling NEON when using TCG. This avoids confusing user experience: $ qemu-system-aarch64 -M virt -accel hvf \ -cpu host,neon=3Doff,vfp=3Doff,vfp-d32=3Doff qemu-system-aarch64: AArch64 CPUs must have both VFP and Neon or neither $ qemu-system-aarch64 -M virt -accel hvf \ -cpu host,neon=3Doff,vfp=3Doff,vfp-d32=3Doff qemu-system-aarch64: ARM CPUs must have both VFP-D32 and Neon or neither $ qemu-system-aarch64 -M virt -accel hvf \ -cpu host,neon=3Doff,vfp=3Doff,vfp-d32=3Doff qemu-system-aarch64: can't apply global host-arm-cpu.vfp-d32=3Doff: Prope= rty 'host-arm-cpu.vfp-d32' not found Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- target/arm/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index ab5fbd9b40b..b6a8ba83a46 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1810,7 +1810,7 @@ static void arm_cpu_post_init(Object *obj) =20 if (arm_feature(&cpu->env, ARM_FEATURE_NEON)) { cpu->has_neon =3D true; - if (!kvm_enabled()) { + if (tcg_enabled() || qtest_enabled()) { qdev_property_add_static(DEVICE(obj), &arm_cpu_has_neon_proper= ty); } } --=20 2.49.0 From nobody Sat Nov 15 12:39:03 2025 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=1751289104; cv=none; d=zohomail.com; s=zohoarc; b=DKUR6b0AKc545Jb/x2+MKpviEoY8TGK1aAX6PLb+QuEBwuokSfdI12X/AuOzkQpPgbCoOkaQ6CgNbsM5pAquy8eOnDX5upLlugdWTRT//yOWXtrJrqqUgrv8Sx2NUqVF/Kb2ikwhBonRSYs1tWLYjAY4EszWnPHFW809GmMO4NU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1751289104; h=Content-Type:Content-Transfer-Encoding:Cc:Cc: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; bh=gVu21VQj8moUvN4y9H9klvBu0KFfflfQTQgSaLVpIq4=; b=a82UC/wE6XMkRb4u7kR1N9x592w/KxMlXd+rMRCp46M0IXZJbvsScIFTtDJLXdA0paRy9ljraU/oXHed7tyiXZI2QW5b4pVNvHTqN9fHxQ0B8XZCxs13bhfhUvrNYo9u7uPGIw0Qlc+GICS29wqUArm61NlIN/AWNOOAz6DPWcY= 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 1751289104199868.3005770586425; Mon, 30 Jun 2025 06:11:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uWEGt-00060b-NF; Mon, 30 Jun 2025 09:10:07 -0400 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 1uWEGp-0005zn-Uk for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:10:04 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uWEGl-0003z0-DR for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:10:02 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4535fbe0299so12071485e9.3 for ; Mon, 30 Jun 2025 06:09:58 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4538233c4acsm162585205e9.1.2025.06.30.06.09.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Jun 2025 06:09:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751288997; x=1751893797; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gVu21VQj8moUvN4y9H9klvBu0KFfflfQTQgSaLVpIq4=; b=XP84tkaWxxXXFJyyHWqDVtNxSeSj52PWzi+wgG+lFmPLsJNbvH/x2gbfwBUONaV1nw igoScRKvzUUcCkCTjGORK/V9GNQPeZFM56WFqhoEPnqvxdTDYaFFOc/JRfa9PCbECWKg PafAwdyG+IejA4e0hyYl5YkB03NcZrBXlGb32VQ40gow6di6LraAqSAqmSBZVNJTehbe KhSWKOrd01JFHE7v4aA/4eugPh9W8iD3t2HgAq1ekU86NeQx4gAVG2yFOECXIh2tKfkN 02RVKxkfkelrYsEo5I0E4mh/xlJzDzX2PBi4mv8vIszHknSi8fjreTNeo5bbaQ90KkdU kURQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751288997; x=1751893797; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gVu21VQj8moUvN4y9H9klvBu0KFfflfQTQgSaLVpIq4=; b=UApAYjkIWLn0G9Yjj+PFGG6OYuefChqZdqLKXZqcO9k7hjhu1ihwMGL+DLcoNyeCHy ZWRh5QTURX1HtZP45NbgfHqP6LtYPQenxvduJ8Fj+u8WuYHI20Wv0d9W9VWPn1NIvEoA gNyqgNcUyqfqWUolHvWscdI7ksc2C+HQT1+mgt1nafV16RA6zNh3LIFt5n8xwUVDiOuT Du65/OBmOGM0vj2IwlJw3TSc1fCT5aF/t8lhGBE1h2IjNumLCxZqEjrZ7BKWpUx2RGCj t2QcakI5hOSYbuSlPpC91+nvso56uaBx3umt8xtVaKCQbtyI6xrnJymScdatJVT/dNJq pknQ== X-Gm-Message-State: AOJu0YyD8AQ1ERWO3DCW8pZJ3Sp/eL0H35fEaKrgAqZE+1iwSJbmlYYQ LIYJtupySjq/2DThrcbz5fUoe5D3eqIosChl3T24dfvcdyjXqTdSW91nbXdlxdLlAU8yybcTskx TjKw4 X-Gm-Gg: ASbGncvfZxi94Sf8obcxfOY9QJ4gCxbNU1poIgiPlPschjwpMEgzECwVUjfcKK0xWCM sAAVb6fEcotwIJlFwNatLbJKfWc/jm0WIsHhDWR0NEbA0emo2kb27GZQ+Ws+JSIewj3F60UJzn1 2ol5tFE+0yD5KYW3yNJFAQaZNoW5prPo40bhY/PtGdMXcmz0r88D9+8EaVryAFousV7ZOvxSGyK l9UMDshwidswVz+uYR+y+qIonjw/oGICCB//fDv0ljWq1okU3oRS19VHR6SZlZNksGG5C3DVAAF EfY3XdlHLyP+T5+ZCrlIpu4QPZqsyQN1jmIoyIWwvayfELlOEm00qHcYSVpNOWKG9WSzaSNF/wp eiyZ+mehA84zvMUz6Hxd7u6Hc2vgAyTJoV3u6 X-Google-Smtp-Source: AGHT+IHQZWVRv7COfUKTcPVWGcRltskCqmNyt9doYt3xOLyzJlaw8sjSpsZQE/IQWqL04mhJpyU42Q== X-Received: by 2002:a05:600c:1e12:b0:43b:ce36:7574 with SMTP id 5b1f17b1804b1-4538ee39aabmr120625305e9.11.1751288996757; Mon, 30 Jun 2025 06:09:56 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alexander Graf , qemu-arm@nongnu.org, Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 3/6] target/arm: Better describe PMU depends on TCG or HVF Date: Mon, 30 Jun 2025 15:09:34 +0200 Message-ID: <20250630130937.3487-4-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250630130937.3487-1-philmd@linaro.org> References: <20250630130937.3487-1-philmd@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::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1751289105279116600 Simplify PMU logic by rewriting '!KVM' as 'TCG || HVF' (ignoring QTest, because vCPUs are not available there). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- target/arm/cpu.c | 2 +- target/arm/machine.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index b6a8ba83a46..0311ff315fe 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2352,7 +2352,7 @@ static void arm_cpu_realizefn(DeviceState *dev, Error= **errp) if (arm_feature(env, ARM_FEATURE_PMU)) { pmu_init(cpu); =20 - if (!kvm_enabled()) { + if (tcg_enabled() || hvf_enabled()) { arm_register_pre_el_change_hook(cpu, &pmu_pre_el_change, 0); arm_register_el_change_hook(cpu, &pmu_post_el_change, 0); } diff --git a/target/arm/machine.c b/target/arm/machine.c index e442d485241..baa7ad25ca9 100644 --- a/target/arm/machine.c +++ b/target/arm/machine.c @@ -1,7 +1,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "qemu/error-report.h" -#include "system/kvm.h" +#include "system/hvf.h" #include "system/tcg.h" #include "kvm_arm.h" #include "internals.h" @@ -853,7 +853,7 @@ static int cpu_pre_save(void *opaque) { ARMCPU *cpu =3D opaque; =20 - if (!kvm_enabled()) { + if (tcg_enabled() || hvf_enabled()) { pmu_op_start(&cpu->env); } =20 @@ -888,7 +888,7 @@ static int cpu_post_save(void *opaque) { ARMCPU *cpu =3D opaque; =20 - if (!kvm_enabled()) { + if (tcg_enabled() || hvf_enabled()) { pmu_op_finish(&cpu->env); } =20 @@ -921,7 +921,7 @@ static int cpu_pre_load(void *opaque) */ env->irq_line_state =3D UINT32_MAX; =20 - if (!kvm_enabled()) { + if (tcg_enabled() || hvf_enabled()) { pmu_op_start(env); } =20 @@ -1013,7 +1013,7 @@ static int cpu_post_load(void *opaque, int version_id) } } =20 - if (!kvm_enabled()) { + if (tcg_enabled() || hvf_enabled()) { pmu_op_finish(env); } =20 --=20 2.49.0 From nobody Sat Nov 15 12:39:03 2025 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=1751289107; cv=none; d=zohomail.com; s=zohoarc; b=T2cvPuCN8FmXiq8oH0z73YgPuVn11f38hzto7T+eEr23SsMBVbl36q9toJh6kRMw+fTzc949uJyd++feKNd1sva3Is0R9mgpvND4fcUssxBgCrQ0q526oSc1I30qEkRXHOQT6wHu3EjW4QrAWkMYabgDotGrvmSG7iaUhcOtqhE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1751289107; h=Content-Type:Content-Transfer-Encoding:Cc:Cc: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; bh=xSFZQl2Y1B+z5K8w8pr70pd1f08StcXXxObqPQRr5Ms=; b=VJRraB8ovj/2L5FQlt7ZIqE7Z2uAAa/mLGxbPQ503GWRw3TzDRcRRKD8Mv0wKeUyy3K50GZNqbPKV1XAEdxCSnkh898BUNxE/z70ZzPoXJHtefWtejSejJj2nxhBRUYleBcDprauhUitUrXdeBAOb3irnEydo4OPQwv7mRAULVU= 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 1751289107810383.1897198831846; Mon, 30 Jun 2025 06:11:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uWEGv-00061F-LZ; Mon, 30 Jun 2025 09:10:09 -0400 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 1uWEGt-00060Y-EQ for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:10:07 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uWEGq-00043Z-9k for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:10:05 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3a50fc819f2so3245519f8f.2 for ; Mon, 30 Jun 2025 06:10:03 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a88c7e71dfsm10191580f8f.7.2025.06.30.06.10.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Jun 2025 06:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751289002; x=1751893802; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xSFZQl2Y1B+z5K8w8pr70pd1f08StcXXxObqPQRr5Ms=; b=SfrclrN0pVo2Md7mHNxcid3JjDgNz8Lq+6DU3vyfkMf05siHwQUCXtgmyUE/ruGam+ SAQaBE1HFfEJw+9EBzW9YxskE+hf6up6nNqoTEZijv5dMTIiYDRMnNHzbJe/kUWilpAV S3y/QH6m6WsSwnjH50pHGfrdOZtfm4QyNu2ss30RMB593IoQujDxnFRRnmYOMnfa/9k6 tqGqNss/VwTAR9jJFRMQzwrGxQOIBGv+Ih94u1B1yOwELRTIxGLhi5FPD6jZEUy2mSwf DGYnH9PAUdqi8Y6phiUZqQdy4Ph0W2t5ujcRxpziUPM163sQQjrCfRBFoOjj1D8tpVnZ rqWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751289002; x=1751893802; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xSFZQl2Y1B+z5K8w8pr70pd1f08StcXXxObqPQRr5Ms=; b=F39Z95KGz27LF345bdN3hq7+vd3M6ms3unHz0ghVlB9L1bcG8jt1mVPLnq4o6kZiL2 mdP/52OeV2eBtQINk+MVjyACEij4udVWibYoSpzMxTZM/bFzEDjx8g5jJWKD7UVct3TY mIJMzsI6IcKt0Q3b3fBt60wz2Ihpm07qHQHmFhm5es5sdBtn6Zuc2Mit/uM0i85uOnol IYtNEiTTttEofu40NJ06UE/kCQF3a/XLnirLzpB2rQTCoEaqzwK3lFm5YXzO+CmTByls 7wLB57llpDOcsTGJhSEijg7PFMesuRYjTiwBp6RL/uHn4n8dDaCkBiRkQLpXCvyyI5Nw gBZA== X-Gm-Message-State: AOJu0YwqZqlBdwQAwroAIgmwyFyNMCnIAyI+5Pc8JmLohg+Z56CVq5NX Kln6WPHCv/b5xpdVMjti2vRdaFzCRWoQhpEsGSXtTGbOkgXz+xizYsg0X81BXk//DRmwKBl9sJc ogtIU X-Gm-Gg: ASbGncuvEEOGyyYHlkFRSmKsTb1W2pftKTEtxg4ms1ADTTPYk+0u+rvy/9sjbesydjK B47sUnqSAWxhKsekwjcnFJ/E1nma+6H/9O53ll+qvYHuaj7Iwn0SX5+MxdAJhReqk9mVXBHgFGp 6vWIVzTPr75r9g4mWFxe/s4G+PbYSpO1fudAx+yFRhMdSHj9VuFRsnZDxhB235ISYg8oRL2ozqp J5N1WQAN7Fnz+Fm1OaExOdMI1TesLLfFjRuKNh6ozTPtkoUmrE6PehyBCVMpYE8IcKTT9YDuLF4 tjQVD05e1S9z2OHPkYnpKOXbtHBgkNm3NDAPioA7vuNCPCzfmdyCMfs8DuqBpQNGjwoPzkZCdLL Wq8HDIL3YOK33JaAUKq39u18C30DRDcmHqbsz X-Google-Smtp-Source: AGHT+IFAlJ80xOGBOyFxZo2NZIOHdxKYjm+1CdKBS1lraLFsm3S5uMTDv2XFll7zZDusbC+I3loMVQ== X-Received: by 2002:a05:6000:402a:b0:3a5:300d:5e17 with SMTP id ffacd0b85a97d-3a917603734mr11874570f8f.29.1751289001928; Mon, 30 Jun 2025 06:10:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alexander Graf , qemu-arm@nongnu.org, Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 4/6] target/arm: Re-use arm_is_psci_call() in HVF Date: Mon, 30 Jun 2025 15:09:35 +0200 Message-ID: <20250630130937.3487-5-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250630130937.3487-1-philmd@linaro.org> References: <20250630130937.3487-1-philmd@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::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1751289108760116600 Re-use arm_is_psci_call() instead of open-coding it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson --- target/arm/hvf/hvf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 52199c4ff9d..7a99118c8c2 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2084,7 +2084,7 @@ int hvf_vcpu_exec(CPUState *cpu) break; case EC_AA64_HVC: cpu_synchronize_state(cpu); - if (arm_cpu->psci_conduit =3D=3D QEMU_PSCI_CONDUIT_HVC) { + if (arm_is_psci_call(arm_cpu, EXCP_HVC)) { if (!hvf_handle_psci_call(cpu)) { trace_hvf_unknown_hvc(env->pc, env->xregs[0]); /* SMCCC 1.3 section 5.2 says every unknown SMCCC call ret= urns -1 */ @@ -2097,7 +2097,7 @@ int hvf_vcpu_exec(CPUState *cpu) break; case EC_AA64_SMC: cpu_synchronize_state(cpu); - if (arm_cpu->psci_conduit =3D=3D QEMU_PSCI_CONDUIT_SMC) { + if (arm_is_psci_call(arm_cpu, EXCP_SMC)) { advance_pc =3D true; =20 if (!hvf_handle_psci_call(cpu)) { --=20 2.49.0 From nobody Sat Nov 15 12:39:03 2025 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=1751289108; cv=none; d=zohomail.com; s=zohoarc; b=cUNj8K3VZvSGd2FMHVIQBfZjhcgZ7b+1qgi4f+/GENEdwdVcbiEIi7tFynTXXlw4nAqzNxY2vAl/NtQxcZKRDiuYRK+Hwwm/pr2kYoJzYLG85UdlOS4SPFVbQKdLB8az3aiyIBtcLoC2hI+f70/uouUZMTmyCuhEoDzrYx1cn4E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1751289108; h=Content-Type:Content-Transfer-Encoding:Cc:Cc: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; bh=7RlmNXlhYATHcqGzuUYY9u+iNysqBplPIi1ujnVq9xc=; b=JKonj3sBmAMpp8yBj+LDFjOgDHwJf+KnYzkU40BQ1wvn373k+HznoO3aOtrde6CA5z3sIdM7ryaFw4QIi2vNaniQLqSfsTxShUdcRbHD71MiSEEWS/M4U7gxEkfKTOZtwXvCcgEUIhWbLX/B61/v7Jnd8vsyp7CDtwlnyBRwBnY= 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 1751289108683302.12058362236564; Mon, 30 Jun 2025 06:11:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uWEHN-0006IZ-IN; Mon, 30 Jun 2025 09:10:37 -0400 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 1uWEH4-00065Z-61 for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:10:19 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uWEGx-0004FN-2z for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:10:16 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3a6f2c6715fso2327252f8f.1 for ; Mon, 30 Jun 2025 06:10:08 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a88c7e7518sm10255872f8f.2.2025.06.30.06.10.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Jun 2025 06:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751289007; x=1751893807; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7RlmNXlhYATHcqGzuUYY9u+iNysqBplPIi1ujnVq9xc=; b=rFPAhExG6Lq+jI7pp9/BK7HqI8b39dlaB7HbD+yOi0RyU3SBnPFBzwHNrvO/jH7chX Tkh9QMNRcxDNL/YKQWTIcv81in0Hoyhw3VNYIcohwPPMk1YOpFv+fHZWLyXOWb9ZUshw jBzTMI59hfktlXlmxRzIIkwIaZp9kLf1v8MTHO5BORKZ3n4G8/+hCUjLaNmwFYOz574Z x/8168+S9ibGRyJlKlgM6j65gnfwSjGZP6iORq0Q6q8SJZiXHuDyWgkzbAOWWJJ9+m0j L//kUfVFhH53tL2acO30/3keBDZmvErSwUx2nYPO1WzXemFABiFolf+EVWFEOBJgHqBT UbXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751289007; x=1751893807; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7RlmNXlhYATHcqGzuUYY9u+iNysqBplPIi1ujnVq9xc=; b=Geyk6R8Z18Nl5tzj8uP/7YpsLtnv0EL7VTGCDJ8TT9eXhZ8Qota0E47d7UAmXMT39a J/yPgB42ShWtCKT+nsPPwr0PxG6uiSQQsuP2/TytjP/aucs5OXLPqAgthWyHXlx1KBw8 Bma/8/bn9XQIPOOQnkkIripzL7OcfB+hmervKBSS1A1l4h02xzPKL938jb6YOdCy4Vb1 YPreXckBNnczxxv31NgKXDOvnbWGdZa8u6fsqJolZ+MikDbtOuJcDTmlLGIP5ggGzuSP 2bTq04BG9dsQ7JMveogn2e4oA+rQ23d/fiTbv/cp4qLNWsyQrgJvoybG+NRk7aT5v5tf tX2g== X-Gm-Message-State: AOJu0Yw6zoCTKM+mbK6ntNiBEPCXaASMdu5Tsk9PhcQs+jmP+vwf+v6U 6HVPxjrPBSi1siRx4nLbEwpq1Mkl5agLu3KlaJPUzZUn7jbE9G4N2ziiHF//4llhuPw7VgIteX2 TPFX2 X-Gm-Gg: ASbGncsqoyvKDweGsMbLH+61PWZpPF6mGnBDjMOCneOnsxV0gtkT+ekSiXvINTGyRbp w+3vxR0UJA6nfBsN60PExrL+lgXv9MafRUctkWJULXkZAWP5RRjxLgqOxUpJgenae0NbRwBj9nP PklFpig0oWZ2cFagTKBm796r05WktNMJtF5281qdAZhU5to7GmlQ1VMSt3rSqfAI+ha3oNCmZAZ Sr0xsN0vZv6kWIE+lZoXXNp0kitlbjyd5MkJWBiX6eQVL191jOP+fs8sBQJNwlHv40W8owX+bIN /oIyQVXcGBjN7iabnyIhdflKE1mK7oA8/rgs4guuAMDHr1dTnppKpx3LZtD5ZZ2HYAHNroQTNsh AB9qaJSBMGByoMj/tHNS/OuPRaKySYUdpyu7c X-Google-Smtp-Source: AGHT+IEDl8M5F+MobCB3JAO2gQTMzxkCii5P0pswMIQwCksbt96XXTeibZfmDV/cScD+EFyz1kmVaQ== X-Received: by 2002:a05:6000:4204:b0:3a3:5f36:33ee with SMTP id ffacd0b85a97d-3a8fdeff5a6mr10622405f8f.32.1751289007376; Mon, 30 Jun 2025 06:10:07 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alexander Graf , qemu-arm@nongnu.org, Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 5/6] target/arm: Share ARM_PSCI_CALL trace event between TCG and HVF Date: Mon, 30 Jun 2025 15:09:36 +0200 Message-ID: <20250630130937.3487-6-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250630130937.3487-1-philmd@linaro.org> References: <20250630130937.3487-1-philmd@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=philmd@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1751289110978116600 It is useful to compare PSCI calls of the same guest running under TCG or HVF. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- target/arm/hvf/hvf.c | 3 ++- target/arm/tcg/psci.c | 3 +++ target/arm/trace-events | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 7a99118c8c2..6309c5b872e 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -34,6 +34,7 @@ #include "target/arm/multiprocessing.h" #include "target/arm/gtimer.h" #include "trace.h" +#include "../trace.h" #include "migration/vmstate.h" =20 #include "gdbstub/enums.h" @@ -1149,7 +1150,7 @@ static bool hvf_handle_psci_call(CPUState *cpu) int target_el =3D 1; int32_t ret =3D 0; =20 - trace_hvf_psci_call(param[0], param[1], param[2], param[3], + trace_arm_psci_call(param[0], param[1], param[2], param[3], arm_cpu_mp_affinity(arm_cpu)); =20 switch (param[0]) { diff --git a/target/arm/tcg/psci.c b/target/arm/tcg/psci.c index cabed43e8a8..8df27ca123e 100644 --- a/target/arm/tcg/psci.c +++ b/target/arm/tcg/psci.c @@ -25,6 +25,7 @@ #include "internals.h" #include "arm-powerctl.h" #include "target/arm/multiprocessing.h" +#include "../trace.h" =20 bool arm_is_psci_call(ARMCPU *cpu, int excp_type) { @@ -79,6 +80,8 @@ void arm_handle_psci_call(ARMCPU *cpu) */ param[i] =3D is_a64(env) ? env->xregs[i] : env->regs[i]; } + trace_arm_psci_call(param[0], param[1], param[2], param[3], + arm_cpu_mp_affinity(cpu)); =20 if ((param[0] & QEMU_PSCI_0_2_64BIT) && !is_a64(env)) { ret =3D QEMU_PSCI_RET_NOT_SUPPORTED; diff --git a/target/arm/trace-events b/target/arm/trace-events index 4438dce7bec..a9cb5e0f5c6 100644 --- a/target/arm/trace-events +++ b/target/arm/trace-events @@ -13,3 +13,6 @@ arm_gt_update_irq(int timer, int irqstate) "gt_update_irq= : timer %d irqstate %d" =20 # kvm.c kvm_arm_fixup_msi_route(uint64_t iova, uint64_t gpa) "MSI iova =3D 0x%"PRI= x64" is translated into 0x%"PRIx64 + +# tcg/psci.c and hvf/hvf.c +arm_psci_call(uint64_t x0, uint64_t x1, uint64_t x2, uint64_t x3, uint32_t= cpuid) "PSCI Call x0=3D0x%016"PRIx64" x1=3D0x%016"PRIx64" x2=3D0x%016"PRIx= 64" x3=3D0x%016"PRIx64" cpuid=3D0x%x" --=20 2.49.0 From nobody Sat Nov 15 12:39:03 2025 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=1751289103; cv=none; d=zohomail.com; s=zohoarc; b=IsmLHEbyUp5OpQO3XLhAsuIpTJbmpKQg2QB4g3f78Lzzg/lGs/RlYS96LaDqRzjPRiozNTM35Ipa+qSLPjJthiUV/RTJ4rELkd8/7eSrjev609Lp0wMkY7ohKzw84lQQW5ytiuTzi4QUlL9ALb/4CBXk1GVBVVUrhxhOK/0Czik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1751289103; h=Content-Type:Content-Transfer-Encoding:Cc:Cc: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; bh=H+FJk0a0cgOcCeztwLwPBBSDzF3OpAdthXdeLrgGRTg=; b=B5+wxVn3k4Si7sKiveW7VdhF8+Zku3Z2Zb7SiqG99w2B7rucgr3mMsESuM78P6Yu/cC3Hoh+GCILgzFB095nzvrI4TWC5BDkfnq4crE1vRJjY+Xve1SnHIbBmwuBkRYDJoGcoGIqJh7YqIht6NofVmlecI1G7B7tmTBwLuClXuw= 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 1751289103987730.6257921692562; Mon, 30 Jun 2025 06:11:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uWEHw-0006c7-1m; Mon, 30 Jun 2025 09:11:14 -0400 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 1uWEH4-00065Y-5N for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:10:19 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uWEH1-0004HX-Hh for qemu-devel@nongnu.org; Mon, 30 Jun 2025 09:10:17 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-45377776935so24245125e9.3 for ; Mon, 30 Jun 2025 06:10:14 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a892e52a35sm10549142f8f.57.2025.06.30.06.10.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Jun 2025 06:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1751289013; x=1751893813; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H+FJk0a0cgOcCeztwLwPBBSDzF3OpAdthXdeLrgGRTg=; b=XTpQt4bvJzM3pVhKFj/Mk7MJGqCB079O7nMagqoF1LO2T3LfZ+eUvvys2YKTJ0xH0o AeBGgB3005wKKxRkhJNZbOjB0RpPA9TjtphpC6PYuRmucfNX0D3LimoXLFR80Ziwmmbu d6dLNFZaIKnxamcaftC3hUqlIOh4dp9F04Ut3MMHSjmlgWvXbjbBF4IF1uhoXDjH8f+P /K88FOW+zfV29hpctz9bfmswe5SV33kHiSDaJ8EH0zovkVFBPwmVyT4udkuWGRaGKemQ QyeQ+uS19ugBzRe4nZtlbBYv4dTPRw5Asf/WDG063+imJnbp7pIZv5wpZvH4m+592VcO 1/OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1751289013; x=1751893813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H+FJk0a0cgOcCeztwLwPBBSDzF3OpAdthXdeLrgGRTg=; b=lVrVcrVxPPzhSKYOhrcg+MWuOrez/qoFR4NMdVKjTSb3RPlIAtkyaiI/uz8h8aBx2u ANdZE/bvgiyNZ4YJgwNWWQA0KpdJeMbxInztg9Edw8n2lpkDKYEr+bwiJw8fT7Nbgc/6 aEoZBUAhHo1zBLEHPIJuDrLQsnZt0GNSHuBkjTx3aIpDm3pLSFR+p5JThhr4KQm4siax OOe+28qCbi17HV5jkGTAdAZtK6Sb+pNtK/rTJbKjXZT79mOj1mKz4XfqpzZvQ4j+sTO8 S0V/tYQ+anmLGFDjjlHBUZWJK+o+RKaXwBFvegrOlSYHBEUzWXNDVMD3MGwltFBQ1k9H CGrw== X-Gm-Message-State: AOJu0YxJXQ5EtUBV/1OUAreOd/q33FfraW6nyIY9Ky/FgvKBjjdFTKLD IeEx2kTeUDUlcQtrfvWG1xDKMLZ65tgvkwv0GGmjk8pS8jkbr+GNKruED1PuxjRM+MkD0aqsWvc HErFk X-Gm-Gg: ASbGncv/GWbpE9dE/ciM4jfhxAPKeGXeGW2S+knEwiymhQ7bbrYF4mTRhtqVdQjsD8V YfJITfJa/U28xQrV6Yni1GuIrmMhQXa0+JFbc5PBVP7Qlmuj6o7im9sEfb5yG/cNRH85+EoC1D8 8CLI3HX/gf1LmQGojgFENhTez2uhdCmpCxz6wumSAfJ6oPaYpYrsunvhlUUVWXNp5q3H2cuWSek R3xmI8bCPgVnF06lqivXmhnc5bx8VdP1MJRj+i0YtsgWeWfgylONIE1Ls+l4OAIELYml3/4xh5d ph1A/8gqDiJS/O6OYbH5RyVKks7hZW7XFOkEkfIOfiZykAJQ6J5Pst3G8xHRHzDjvFSRVvKZwTL c9reRMXvcsOIjwmCqyjeXwkiuck0P9oeMkEC+ X-Google-Smtp-Source: AGHT+IEByqu72FkfcvT5uo05D7E1vi0yvvlmhmF3Uteu/Agpq6RjqYSA3xSu6GHZbwfK+UN8hGdH/g== X-Received: by 2002:a05:600c:c0d7:b0:442:ccfa:fa with SMTP id 5b1f17b1804b1-4538f516210mr90896245e9.27.1751289012845; Mon, 30 Jun 2025 06:10:12 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Alexander Graf , qemu-arm@nongnu.org, Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 6/6] target/arm: Allow arm_cpu_tlb_fill_align optionally set CPUTLBEntryFull Date: Mon, 30 Jun 2025 15:09:37 +0200 Message-ID: <20250630130937.3487-7-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250630130937.3487-1-philmd@linaro.org> References: <20250630130937.3487-1-philmd@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=philmd@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1751289105301116600 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/arm/tcg/tlb_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/arm/tcg/tlb_helper.c b/target/arm/tcg/tlb_helper.c index 23c72a99f5c..df04ef351d1 100644 --- a/target/arm/tcg/tlb_helper.c +++ b/target/arm/tcg/tlb_helper.c @@ -349,7 +349,9 @@ bool arm_cpu_tlb_fill_align(CPUState *cs, CPUTLBEntryFu= ll *out, vaddr address, &res, fi)) { res.f.extra.arm.pte_attrs =3D res.cacheattrs.attrs; res.f.extra.arm.shareability =3D res.cacheattrs.shareability; - *out =3D res.f; + if (out) { + *out =3D res.f; + } return true; } if (probe) { --=20 2.49.0