From nobody Thu Apr 3 11:52:27 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=1741542777; cv=none; d=zohomail.com; s=zohoarc; b=AHpdzMv4jPiEa8gc8QR8OPlXSHtfPDZjJvz1c3cBMVG84mXwgK+diK5z/M+bpUvGofJhqIopMPmDQERQNKuIVkUpaRJTA2VZRJ8ytxJHdBoE0SF4jc+bzT/yAH4CKRHaWn5FV/8u8t5yr0KkZxvJnkbX4IUekAVdYq+jNPyZlsI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542777; 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=M4O7vzSf9Kqz7dSwzKnWekJP1fOmdxWNIgHecTPSDb8=; b=AaORvOTSpaFfMwim23gTW40VR2vlnCUYI4ALpM1WytySu65IcDZzAPrabmLlIldwr9w0fCHqGtnXCZNa3ImNA0i9H1Du/DJomvsMxyO2h+wtBry7LMssvEXucgjNXcQyP6oQJM2MKR8sFfW8FjG0oSKFEsEkVCKs71oZDbMVyy4= 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 1741542777252820.6803884422417; Sun, 9 Mar 2025 10:52:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKp1-00059C-BI; Sun, 09 Mar 2025 13:52:19 -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 1trKoz-00058l-O7 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:17 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKoy-0004ni-7q for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:17 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43bd03ed604so29843715e9.2 for ; Sun, 09 Mar 2025 10:52:15 -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-43bdd93c9b6sm120766395e9.29.2025.03.09.10.52.13 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542734; x=1742147534; 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=M4O7vzSf9Kqz7dSwzKnWekJP1fOmdxWNIgHecTPSDb8=; b=TmqscUnW2XiPmBXpZXE+ic1WAq9AnVt/cSlC0fp1WOdYCAZuH175o2xbwJR48FlgEi GjSIlpsaSniq5R5cDw3BLfRmtiMtLIHUytoLotuXkPT0z0OGSC8Jwb/WNJAtuTPCCfSI gIt0s0x3dTfLg9fhwQOujd6ju7qms9Dk4NytNufJBZ2ALM1nzO4DNlZJZWuGv0BF2nbQ b90p04Ga9QYIEwvQcnLnJ7m9PQf+tcfeIOKLidb7czax0kKTiq7p61RDDbpnhgc9Ypkf OQ9gYzg8KVRFxqsP5LSLnqoNuqMgPS+w/E1o+5hWCMTy+QHJllg5pslv+f7pbGdfR8oJ MkKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542734; x=1742147534; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M4O7vzSf9Kqz7dSwzKnWekJP1fOmdxWNIgHecTPSDb8=; b=TGrl6pLfbLqKc8YfzVBQFiNqmYSroME1RI2mf9fwe7GIp3dzqZ4vKs8q/GgadFa8S4 09QRo0EWVWfihrDDvw3qGa39IGrTgI94yqtBZ4SOyCkJAGv4Nw5R5ps2VQV1mEFrxS2C wgUvn+Gz+tU9JZwAZM4Ermpnrb/+Xp0gENdGsMJ7BHCsTzNBtfq1Er91l87uL6oXbr0g bf/DAdgR/3Q5vqHWxEY9FK9K/GXtsyhzBoFSFI7FfM8HBndyO4ENvjz5SbQTsczG8/z6 Fsm6O5kloz8NoL6ChHemkhhuT/fMD3TyAwZPoxed5uotbXvp/sATWFT6kZJ7tUCJMgeo TPFw== X-Gm-Message-State: AOJu0Ywv/gmMgS+BZ6onf9kE7P2JlADBiUX/PUDwzGxPunkEY26PVIR3 46R0zH8vbwLSFtVL+Ffg0c5XTeK2FvT5JJO5eL2FlEoRO0I7Iy6l1GiUy0bH1tEc1FKCopyHjze rhDc= X-Gm-Gg: ASbGncup1I15Bozfk7QpGHc1m9OPrikQqLGhC0E2f7Ihfkv8EQDtfDRxteiIUQC5jkq knk3+Vw1MLUtmFfPR59PQBWqQMjPBHD0Kb+6STve2x/hhA/e6feolypP28gRnFTAH5uTe7wq9bc p8wst5sh5nxvHptx+FVxfQwu6UOLsd0IPBHSrvCeutmkhCI7EUOGSg5I1jbBCrVr4CMG5nEbJTS Z9hdnOOGxBVT15hcQtKRGL2iR/xEaV2GRcypa44NFTPWbPeskzUSeKb7XzUHqIpupaoWBSLdvC0 WXVWNDfW8qH4BoD4n7ORN2ijhTPdIgYeuXliREdQRocUkmiZ8ZPB/mYh7E+EIyR4NyUQP3j52or ohSC2rU1PmftjBccBwmc= X-Google-Smtp-Source: AGHT+IFTlCdl+LWaEswVfeZ3CDBAxjhaVLpaV/I3z41fiJQBbcwKpLGfvC0fcX3KjAtZUw5+W3xGdw== X-Received: by 2002:a05:6000:1862:b0:390:fe4b:70b9 with SMTP id ffacd0b85a97d-39132d6c5demr8880879f8f.21.1741542734240; Sun, 09 Mar 2025 10:52:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 01/38] linux-user: Only include 'exec/tb-flush.h' header when necessary Date: Sun, 9 Mar 2025 18:51:30 +0100 Message-ID: <20250309175207.43828-2-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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: 1741542781951019100 Very few source files require to access "exec/tb-flush.h" declarations, and except a pair, they all include it explicitly. No need to overload the generic "user-internals.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Ilya Leoshkevich Reviewed-by: Pierrick Bouvier Message-Id: <20250102182521.65428-2-philmd@linaro.org> --- linux-user/user-internals.h | 1 - linux-user/mmap.c | 1 + linux-user/syscall.c | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h index b9b05c1d11f..4aa253b5663 100644 --- a/linux-user/user-internals.h +++ b/linux-user/user-internals.h @@ -20,7 +20,6 @@ =20 #include "user/thunk.h" #include "exec/exec-all.h" -#include "exec/tb-flush.h" #include "qemu/log.h" =20 extern char *exec_path; diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 6828b17a63f..d1f36e6f16b 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -21,6 +21,7 @@ #include "trace.h" #include "exec/log.h" #include "exec/page-protection.h" +#include "exec/tb-flush.h" #include "exec/translation-block.h" #include "qemu.h" #include "user/page-protection.h" diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 02ea4221c96..b32de763f7e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -26,6 +26,7 @@ #include "tcg/startup.h" #include "target_mman.h" #include "exec/page-protection.h" +#include "exec/tb-flush.h" #include "exec/translation-block.h" #include #include --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543202; cv=none; d=zohomail.com; s=zohoarc; b=lBf2PbmU52++i66CWAOMNdQjVDHIXaVK9eIm5BhONHgbipAbktAM3oQnt+njnc8XNZ8f/8npQ6ZWQ2anNRW0IK+isLZS3+T9sAuTCryRRmvQrZ39vPanIO/okdajH6f/Gy3f3MAyldGqjWs1RKEvI4T+c6jOxQIkVVBP3Wi3+K0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543202; 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=rGVH3ZQmQ46V7zOspwriiKsX0Emdo3m/I01cSo1IH7Y=; b=asRttd0m1vrbOyZz/odeeFvR2t4DBlwwEE84r3o+6BR4bfUYsuKW5eAYV31XecMS0pNCNYmc+hArOVED1EL9Z2cI7e9Dwd9mCDwUKcA3G8iMM3ZMyhe+6dah3Z1Bn7qoUVtuya+j2Rl1Xen+Wv01ouzX5DLCc6Kh2uTL/jH425U= 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 1741543202173238.07995668481453; Sun, 9 Mar 2025 11:00:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKp6-00059e-IB; Sun, 09 Mar 2025 13:52:24 -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 1trKp5-00059U-Kq for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:23 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKp4-0004o7-35 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:23 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-43bc30adad5so20000015e9.1 for ; Sun, 09 Mar 2025 10:52:21 -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-43cf27f8ef3sm25932595e9.11.2025.03.09.10.52.18 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:52:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542739; x=1742147539; 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=rGVH3ZQmQ46V7zOspwriiKsX0Emdo3m/I01cSo1IH7Y=; b=nyzUPbe+BxoaYJP5thJOBYGwokRFQ2YP86uhLSXqNEmokc7cpqpZk8uuUL24CR7IFf thymKOvp/kt1EOtjvS7t4zKJOaQruXaMVSgyXQj91inADEz/tmLdLy+P4l+Rm4ANU7cj mTWNCJzaT8RCjTv1CvrO/a9r5SnvZI7uJqbaFVpb8ssmAO/2qIZuN0+y0U/dOzSYUTo2 kDt5uHKLeKOCBqL1+JqDFiPvC/xan8VOU6TabLlVK66McByWoDNtbzz3Ymyo1YLi3f6F 4rME4jY4Odqz+tg6rHCqF1LIO9OkT07zrG62/qJhyTBRv7Uv0rN2hocBE6Fr9SgolHst xNXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542739; x=1742147539; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rGVH3ZQmQ46V7zOspwriiKsX0Emdo3m/I01cSo1IH7Y=; b=DuZTg7b+q2zOUYX8noIyVVXObzrlBjUxAkjw6TMWJUg4Pb1NGFYWPLTEjw8j1TNDzF 3WdugMrHSXAQunx/IEWorHXB9MIXLNd7KPJuHcbZJKj/ZmRbefaLCheWk8TRRn+IUglN xY2lPA1UZMmJ+MIyq8AY6JLfCv9gQgAVHoWzIo12G9eOghP6pOMQ51xpHng3vV9h12rK jbt0ONDqBQQZ2uAPE2wrVIL67anB7Ip/m2glYx+8yC7Q9GVCpLCRkVBUaOKptKbDuD9t p6dZr+/Xu+PZsvordkPW+x3a+cu1jVcbwLQ7dK5wFFqSpQ7aLT4Nluj1mNDBJeOYdtXH QFRA== X-Gm-Message-State: AOJu0YzW+ptVqQnYN2a0qOtcMPFwF+YYmAbT3Raf1aGrjVZBwUuLnd9p 08Ge8zct3bgYKwr6LVKGJWdGhwyFfXVzk4TFGsF07jJPjyIy+OYqVZuk4ic6dZkItgktPW8RIwI zPBs= X-Gm-Gg: ASbGncudwCXeoEG0xbsVf0AQ4lk2/umkE3gqnuqcgneni0G2TTR8us/oD2boQEUQsYc DEOvC15TXfc5H4x8px0UQKe5dNeQl+gcDMI4b+k6YtkVUwfZRMctxHyorO7x/vePh8PJEG5vJpj AR/dUe8g5tyaH+2JBxACNSbgIRoZjkH+QWfiPgNMeuq03e69N64+xB1E+m5ikJFc5VpYUCjYkZt loH0/ug0yxPo+rIrd8pr3WtGXJLMBOaZIEXlqsZxzMgF9ZUP3l955v/2jfB8lwYz5HS2PbqUXM6 gFRizOrdGgmiQe9Imyp4Ux+E+23Nl8Z7WZn8P0Clpqj4YoHF3lLYuRLOzmNXX2HuTNEH+qFo/uk DVazsEOXRm/6y15AMAqo= X-Google-Smtp-Source: AGHT+IEhpen0OT/wpjIsedM9olTkpqA0r2zexZbUkn3PQErVXSKJU0+PVrkG3oWBI/ZNw5TO5UZs0g== X-Received: by 2002:a05:600c:358e:b0:43b:cc42:c54f with SMTP id 5b1f17b1804b1-43c5a60eab5mr77702865e9.14.1741542738896; Sun, 09 Mar 2025 10:52:18 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 02/38] bsd-user: Always use mmap_find_vma_aligned() in target_mmap() Date: Sun, 9 Mar 2025 18:51:31 +0100 Message-ID: <20250309175207.43828-3-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741543204012019100 Massage target_mmap(): calculate alignment once, then unconditionally call mmap_find_vma_aligned(). Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Warner Losh Message-Id: <20250308122842.76377-2-philmd@linaro.org> --- bsd-user/mmap.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 346f2cefd32..dfa6e728ab5 100644 --- a/bsd-user/mmap.c +++ b/bsd-user/mmap.c @@ -489,13 +489,12 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, = int prot, * before we truncate the length for mapping files below. */ if (!(flags & MAP_FIXED)) { + abi_ulong alignment; + host_len =3D len + offset - host_offset; host_len =3D HOST_PAGE_ALIGN(host_len); - if ((flags & MAP_ALIGNMENT_MASK) !=3D 0) - start =3D mmap_find_vma_aligned(real_start, host_len, - (flags & MAP_ALIGNMENT_MASK) >> MAP_ALIGNMENT_SHIFT); - else - start =3D mmap_find_vma(real_start, host_len); + alignment =3D (flags & MAP_ALIGNMENT_MASK) >> MAP_ALIGNMENT_SHIFT; + start =3D mmap_find_vma_aligned(real_start, host_len, alignment); if (start =3D=3D (abi_ulong)-1) { errno =3D ENOMEM; goto fail; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542799; cv=none; d=zohomail.com; s=zohoarc; b=bQ3/ow8rM0NFAqIxC+ULGRFl4o7iMTwHdyVj0nUlgJ44q6mSzrLPPDYfxTFYnmzUNqL5E0OcwYmh/gpUFm49hskxAk9yewF8ePag4dJ9zNEXzO2O7MrFtlgA0P17Dp94OWcSPkny5Yn1k237wHwD5+x94Xjg3+yYzBmK6m60MC0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542799; 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=I3NR+5rxXyS1Unu3/N17nFNE/6t0ATq2jAlqmEXa0yw=; b=GYL/4pXnIemsza2jKi59mt3uGhBxySVLGOFqRg/NG5z+89H6e+gYctvDpFeBWZVbJNkLbhcyrzEIFbURlVup0+UvqRNi0r1RSNRJm1XDqnsc1tbS2aeCuzoYo6K3xnQUoTW7zHTmZX7xj5YNxHuWp7yzAlmOOVQ3/sGZuQwCt1o= 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 17415427994941013.1049787721449; Sun, 9 Mar 2025 10:53:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKpB-0005AQ-Ew; Sun, 09 Mar 2025 13:52:29 -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 1trKp9-0005AD-FR for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:27 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKp7-0004oY-Rn for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:27 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43bc48ff815so19917165e9.0 for ; Sun, 09 Mar 2025 10:52:25 -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-43cf1b36d14sm27582095e9.37.2025.03.09.10.52.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:52:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542744; x=1742147544; 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=I3NR+5rxXyS1Unu3/N17nFNE/6t0ATq2jAlqmEXa0yw=; b=PQ465ES6JSXBfszIkQO0eQXhPJ5WlEUy9oClOs3Jrh+sAQlNuX75YQkbGcHULmMThx nCzHiaxQGj9cJVP5IRs1128QMVgic/WpnVEHcuWFtlp5V65WI6ly0eTvc2Rg6hZcJMKe drPoshelWqNluUidD5URnnryrVIn0Sc8govlyiseds41MyXJWvfP2aPNbzPS525CHRvh h1rYwYi/5uzNvOV2bK67ktSh/htsjWfeniUjq6cimA/DfQ6IRoPtInYjQOZWj7Ls94Hy wlGGdwXGeJDYLqicetuBdcw+EcToFA3XjJiFJGg5c661SJnK3zMlput4msGdqgazjKbd EXLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542744; x=1742147544; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I3NR+5rxXyS1Unu3/N17nFNE/6t0ATq2jAlqmEXa0yw=; b=OaJaCfwvfk1jxfmwlt0XQu01bMc8SB53JtXFn7BEOFJE3wLyaJL9dZDmGMo+vaoMdu Lw18SsM0Mvn6la5V60Hlk+sQ9u/pF01//BnKC3Aj6bQzsP9CejS9WkPB1bLhW6k6F/on UVzpq+5xZovCSMYdOx9+WgAlRHDKksEf0GNjPk6doEb763sj9nKPTmOt9Dd9sXqDusTH TCX+easu8nG5Vkm+RLcR7X31eaWO7cNdkys2iSOokJinQ4m0UDFewANq6evJAK0Re2S9 mtvmX2x7pegZxa7fn4jk5BWn+ocOQT2kfTWIjqG6K2OJWThJSwH2Jk80J1P53b4yT9Mn F8CQ== X-Gm-Message-State: AOJu0YyBV3XxWPqyIsHICYeFBHKJ6aC5AAyI6vwUYGE0bjjfXHo+uWe1 m8Bhr2QqvRO+SYBcZw9h1KUCUy2pJoWA1I48DuSYUmIJKDzxRKnS1NBukjojJ2GKCMzy0cKh8He hB10= X-Gm-Gg: ASbGncuO8PihviY2QH5EOwxt1sxEH9/gZPiB/r92Ju3pEHUCKdJBDqcGk5xFreZECTG M2l8FKj1v/4coh/n8DgKT3yJcXmNN00vtJktWN9wZX2iSivtEw/GqNvmgvnRNATMl0AAroRXaRs WR7ENlIOJHiI9ohEnEypaYTfeLDcq3+d4HKt1bDIlabdUHDzE9uH2LOCiVkEdzI8mrKKkV4kzxm EU2XLe9Rqd6tSylxqQZHUUY/SboGXSPSFCEIZAll+FG0ZtSvFz8y5/nD/wYUdKzGVfzEH6YBnin i7ZYfpttOzx2QREEL9DfdStTy7+V6NGU05TPl2J85hzGdJw7JjqP92XDSnzdDOprmSlWRXu23nQ Yv39mLsW1k7QimEVcpdPw2CetEiNgbQ== X-Google-Smtp-Source: AGHT+IFO1/oUuVaYLKaejKW45XLEgrXqtWD100cEYoy2qq3dChUlbidwJXH/D/Ek//Nzd/t5knxe4A== X-Received: by 2002:a05:600c:3054:b0:43b:c270:49ae with SMTP id 5b1f17b1804b1-43ce4a4adf9mr37286325e9.0.1741542743696; Sun, 09 Mar 2025 10:52:23 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 03/38] bsd-user: Propagate alignment argument to mmap_find_vma() Date: Sun, 9 Mar 2025 18:51:32 +0100 Message-ID: <20250309175207.43828-4-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741542801736019000 Propagate the alignment to mmap_find_vma(), effectively embedding mmap_find_vma_aligned() within mmap_find_vma(). Add a comment in do_bsd_shmat() to clarify alignment above page size is not required. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Warner Losh Message-Id: <20250308122842.76377-3-philmd@linaro.org> --- bsd-user/bsd-mem.h | 4 +++- bsd-user/qemu.h | 2 +- bsd-user/mmap.c | 10 ++-------- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/bsd-user/bsd-mem.h b/bsd-user/bsd-mem.h index f5ec0de24ca..90ca0e33775 100644 --- a/bsd-user/bsd-mem.h +++ b/bsd-user/bsd-mem.h @@ -370,9 +370,11 @@ static inline abi_long do_bsd_shmat(int shmid, abi_ulo= ng shmaddr, int shmflg) if (shmaddr) { host_raddr =3D shmat(shmid, (void *)g2h_untagged(shmaddr), shm= flg); } else { + abi_ulong alignment; abi_ulong mmap_start; =20 - mmap_start =3D mmap_find_vma(0, shm_info.shm_segsz); + alignment =3D 0; /* alignment above page size not required */ + mmap_start =3D mmap_find_vma(0, shm_info.shm_segsz, alignment); =20 if (mmap_start =3D=3D -1) { return -TARGET_ENOMEM; diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 4e97c796318..0b3bd65b180 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -242,7 +242,7 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong ol= d_size, abi_ulong new_addr); int target_msync(abi_ulong start, abi_ulong len, int flags); extern abi_ulong mmap_next_start; -abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size); +abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size, abi_ulong alignme= nt); void mmap_reserve(abi_ulong start, abi_ulong size); void TSA_NO_TSA mmap_fork_start(void); void TSA_NO_TSA mmap_fork_end(int child); diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index dfa6e728ab5..3f0df79c375 100644 --- a/bsd-user/mmap.c +++ b/bsd-user/mmap.c @@ -275,8 +275,7 @@ static abi_ulong mmap_find_vma_reserved(abi_ulong start= , abi_ulong size, * It must be called with mmap_lock() held. * Return -1 if error. */ -static abi_ulong mmap_find_vma_aligned(abi_ulong start, abi_ulong size, - abi_ulong alignment) +abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size, abi_ulong alignme= nt) { void *ptr, *prev; abi_ulong addr; @@ -395,11 +394,6 @@ static abi_ulong mmap_find_vma_aligned(abi_ulong start= , abi_ulong size, } } =20 -abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size) -{ - return mmap_find_vma_aligned(start, size, 0); -} - /* NOTE: all the constants are the HOST ones */ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, int flags, int fd, off_t offset) @@ -494,7 +488,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, in= t prot, host_len =3D len + offset - host_offset; host_len =3D HOST_PAGE_ALIGN(host_len); alignment =3D (flags & MAP_ALIGNMENT_MASK) >> MAP_ALIGNMENT_SHIFT; - start =3D mmap_find_vma_aligned(real_start, host_len, alignment); + start =3D mmap_find_vma(real_start, host_len, alignment); if (start =3D=3D (abi_ulong)-1) { errno =3D ENOMEM; goto fail; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543067; cv=none; d=zohomail.com; s=zohoarc; b=hfjInL+MPP3W0MeT1anLZIjT9uZc26sNyATGUxOru2J2yUcjR6efrVo55YM/mLPjCDni2OJ8wWHH4s6p0ftFu11PsO1NCKUaLGmulsIbauTa4BcxWRFOw0sq1foseChUYoU30tWJB8kVYFwaESN779YDf01FniSp9X+FeU/fGBw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543067; 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=OnXnqroPfwg0H1e+w7z6nHC73+VyJlWMGmTrbr9qjl8=; b=EUHEH8/T3jEHgMmRK+SypRfYIsXh1pxtNlBS+H70wJGMlsvrGxJfHmEmD5FK73xRGRSsraD9QoWjCEnfkIxq87bD3sxC7WlQ6PGJIkFFIu8XTQCRV7KcwT4PyLQktMp8Q21Di34s3BKORnAxpD/Mo4EiEdWwHC/LVB+9/Aq0MOM= 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 1741543067904751.8470503170785; Sun, 9 Mar 2025 10:57:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKpE-0005Ay-R6; Sun, 09 Mar 2025 13:52:32 -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 1trKpE-0005Ap-3a for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:32 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKpC-0004pC-7T for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:31 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-39149bccb69so136770f8f.2 for ; Sun, 09 Mar 2025 10:52:29 -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-3912c1027d3sm12270567f8f.83.2025.03.09.10.52.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542748; x=1742147548; 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=OnXnqroPfwg0H1e+w7z6nHC73+VyJlWMGmTrbr9qjl8=; b=heGzQLyN4S5WbnPUuBAff4Z7NXTko2O0UFXMVhvMacuNdLKuEzOCAAJ+YUCVzkZTij NTDQ+uUb8Ue/gF0kUW/n0X4HDllpUPpeqds/fFsWujmknIvnb64jIRoSL6VAnKAshie2 Jh20ARiKI2QeZM2DJsziv9Xekkv7ZHpxHpAlEiq53eO6DBCuqs5c9h8i8Xly5W5KMNrJ aEC0O2TxHJUMH0aIKDQ/fXogh2eq7oZFIBvbq3hi4DmTZO33mQMxwAUEzvr741fNmVZa IaTdMrf+FjYfNKsX6dR49tXgANGreBIOwKVc17nljRAg8TJ33j6STBUK5oGvLM+oiPlN ad5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542748; x=1742147548; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OnXnqroPfwg0H1e+w7z6nHC73+VyJlWMGmTrbr9qjl8=; b=EmyNvpuKr+y1rWkB7Ki22nD5956WEa72Gs7SrKxx9M5A6gx1gwsLSvFXBSR4EyNe2h nLDu/BcpLt4P/lxAUJOS/mguoUCGmhpF+pb+ULtAES+NxRP0MJ7l7IVjwUdl1RAkfiBF umJpEsDVoH3yugRiZ7vcc5N+Qx0JuhbxYoFbb3kNg23oM5T3GAiWzT6heCj11NqAyHnv bz+rMfWTN9H8JJ0wD6jdFtm/VxTowLlv6P0JiM9iZe2sr3x5rboOjSxyR++7nw99OYix aFw/8He0a3JyuWwjfQhiVqN3MOg/Bk0bkuLSriRBo3ffoHznFEzfbwLjZvNhncqoa6g0 gvHw== X-Gm-Message-State: AOJu0YxAtThUED8fLgGwyUxUdaHDdqTvADd0afPdsOkQY9KbM2LT4LGy y7qp37W9USvVgmkFWEZRLamn7S236MUP3a+7iZ2i7ap4aiL+agduloWipG8UMq+755CT+P+rlBw DJMY= X-Gm-Gg: ASbGncsdeu/V/hBMhQ47OBsQ2vzvzFnpoNywiCn6zVxwj4vhchdal5c8FVfMao59jDF gHRf8qN5tYHeqPtF6Rb7/KCa4kkdsMWrr7xyvUzZ5SNc5wve1KVT9VluKUH12T/7a6KqgDK6BG8 FBUM9K9ILqA6MNTE1s/VUQE+E8PDdzC6tmFLnQlGmGondvC9pto1SGHPQK6MwfrSH4gFqWKe1LX HMMdt83qE0w73pb2EDiiNFToYU/ip6j1mLICqFMmQ+q6UQxpoVAFU4vPMsIxFvww72V10g/6+L3 cq09jSYXeUMHcTi/TUxODMd/AYrk2P+7tAQAG0hwJnftSP8LBRkjXUDiADKBOrwrwNoXiKm7XqM gXr9fr6921dYnE5EakjA= X-Google-Smtp-Source: AGHT+IFYKq7P5F+VmIl5UAVb+Evs6wIpgbUZeILZ6hqccKKpg1NDscolukscDvgWBerOk4rlOXbUqQ== X-Received: by 2002:a5d:648f:0:b0:391:2e0f:efce with SMTP id ffacd0b85a97d-39132d06d53mr5694042f8f.1.1741542748339; Sun, 09 Mar 2025 10:52:28 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 04/38] user: Extract common MMAP API to 'user/mmap.h' Date: Sun, 9 Mar 2025 18:51:33 +0100 Message-ID: <20250309175207.43828-5-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::430; envelope-from=philmd@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: 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: 1741543070231019100 Keep common MMAP-related declarations in a single place. Note, this disable ThreadSafetyAnalysis on Linux for: - mmap_fork_start() - mmap_fork_end(). Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Message-Id: <20250308122842.76377-4-philmd@linaro.org> --- bsd-user/qemu.h | 12 +----------- include/user/mmap.h | 32 ++++++++++++++++++++++++++++++++ linux-user/user-mmap.h | 19 ++----------------- 3 files changed, 35 insertions(+), 28 deletions(-) create mode 100644 include/user/mmap.h diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 0b3bd65b180..c1c508281a8 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -32,6 +32,7 @@ extern char **environ; =20 #include "user/thunk.h" +#include "user/mmap.h" #include "target_arch.h" #include "syscall_defs.h" #include "target_syscall.h" @@ -233,19 +234,8 @@ void print_taken_signal(int target_signum, const targe= t_siginfo_t *tinfo); extern int do_strace; =20 /* mmap.c */ -int target_mprotect(abi_ulong start, abi_ulong len, int prot); -abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, - int flags, int fd, off_t offset); -int target_munmap(abi_ulong start, abi_ulong len); -abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, - abi_ulong new_size, unsigned long flags, - abi_ulong new_addr); int target_msync(abi_ulong start, abi_ulong len, int flags); -extern abi_ulong mmap_next_start; -abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size, abi_ulong alignme= nt); void mmap_reserve(abi_ulong start, abi_ulong size); -void TSA_NO_TSA mmap_fork_start(void); -void TSA_NO_TSA mmap_fork_end(int child); =20 /* main.c */ extern char qemu_proc_pathname[]; diff --git a/include/user/mmap.h b/include/user/mmap.h new file mode 100644 index 00000000000..4d5e9aac70a --- /dev/null +++ b/include/user/mmap.h @@ -0,0 +1,32 @@ +/* + * MMAP declarations for QEMU user emulation + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#ifndef USER_MMAP_H +#define USER_MMAP_H + +#include "user/abitypes.h" + +/* + * mmap_next_start: The base address for the next mmap without hint, + * increased after each successful map, starting at task_unmapped_base. + * This is an optimization within QEMU and not part of ADDR_COMPAT_LAYOUT. + */ +extern abi_ulong mmap_next_start; + +int target_mprotect(abi_ulong start, abi_ulong len, int prot); + +abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, + int flags, int fd, off_t offset); +int target_munmap(abi_ulong start, abi_ulong len); +abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, + abi_ulong new_size, unsigned long flags, + abi_ulong new_addr); + +abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size, abi_ulong alignme= nt); + +void TSA_NO_TSA mmap_fork_start(void); +void TSA_NO_TSA mmap_fork_end(int child); + +#endif diff --git a/linux-user/user-mmap.h b/linux-user/user-mmap.h index b94bcdcf83c..dfc4477a720 100644 --- a/linux-user/user-mmap.h +++ b/linux-user/user-mmap.h @@ -18,6 +18,8 @@ #ifndef LINUX_USER_USER_MMAP_H #define LINUX_USER_USER_MMAP_H =20 +#include "user/mmap.h" + /* * Guest parameters for the ADDR_COMPAT_LAYOUT personality * (at present this is the only layout supported by QEMU). @@ -39,24 +41,7 @@ extern abi_ulong task_unmapped_base; extern abi_ulong elf_et_dyn_base; =20 -/* - * mmap_next_start: The base address for the next mmap without hint, - * increased after each successful map, starting at task_unmapped_base. - * This is an optimization within QEMU and not part of ADDR_COMPAT_LAYOUT. - */ -extern abi_ulong mmap_next_start; - -int target_mprotect(abi_ulong start, abi_ulong len, int prot); -abi_long target_mmap(abi_ulong start, abi_ulong len, int prot, - int flags, int fd, off_t offset); -int target_munmap(abi_ulong start, abi_ulong len); -abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size, - abi_ulong new_size, unsigned long flags, - abi_ulong new_addr); abi_long target_madvise(abi_ulong start, abi_ulong len_in, int advice); -abi_ulong mmap_find_vma(abi_ulong, abi_ulong, abi_ulong); -void mmap_fork_start(void); -void mmap_fork_end(int child); =20 abi_ulong target_shmat(CPUArchState *cpu_env, int shmid, abi_ulong shmaddr, int shmflg); --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543293; cv=none; d=zohomail.com; s=zohoarc; b=X3ZLyVzYssVALC+DiW5IM5rBt4gOqEm7/YPIUKFehrv1PsZ2JWlum2YWrD7fcAls9R9vAR0ytpD5sxc6G1OdHn6P8l5w0boI7a9GK9niCyzD1A+aCeJu9NdiMDaMEiC209q8jBpMu7llwzKc2hElnmNtGC4IivBE7P7m9ekKQNQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543293; 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=QQMXAv5xvYvddKVDqqWSooantykqUZCrwTUpETmsqTQ=; b=BDxg9IwTx41nDF1NJxKz0cQROhjJc1fb9xZbGhlaVziKqHfpHAo9/qG0mhE5mM9oNurzkYF9rh0K+UeDi2AaTdt7P6LED9AmqH23koqS089bRoyjrsWKOSTNuifnzioq8uPuolZrls3R79ODi1VGrbj1ecEllxLHAnlvvSavgQg= 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 1741543293528627.3030415807752; Sun, 9 Mar 2025 11:01:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKpL-0005Bv-4y; Sun, 09 Mar 2025 13:52:39 -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 1trKpJ-0005BV-FW for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:37 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKpH-0004pY-B3 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:37 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-43cfa7e7f54so360745e9.1 for ; Sun, 09 Mar 2025 10:52:34 -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-43bd42c588dsm147408655e9.21.2025.03.09.10.52.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:52:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542753; x=1742147553; 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=QQMXAv5xvYvddKVDqqWSooantykqUZCrwTUpETmsqTQ=; b=Ri6BuPzrqyGI/zrtBYx8RGWD7PWZOnbcQTdP27z937dtE+mN6hQjvuF9kpuFLhzdFC 02NyH6CZF3qxdO+XdIHdm1fRie6VgE8VqSykWxs4vWHPgCklo+9ro3haUPkwCD3JQ83Y lfycOBmBrlsl2Kn+E4pJzJ5k5zKT56hAnOnC1wCvB/gPpiGIaXNXvYj+NTMrNmCGYgtI yCmQRaZ5ZrMritCZsDJsY+zTcG7kAeEJaIkdMeT2mH8FAe4VXR9XY6pojZjxyfNh4OYs sL0jsG9G6zGjcZrzgmbrwa/UO8PUBien+tyYxGq53aHzb/iN/Es4S1dzhABzreTTR5df vnmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542753; x=1742147553; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QQMXAv5xvYvddKVDqqWSooantykqUZCrwTUpETmsqTQ=; b=AAYQEQSrROyniYlnyNxfwgQg5prILdf06DAJ5C37COQ1aQE56EpIFPZOjjhI6Z9KFN vBGkpuloqjDaLoPrHGSqQ/a3hKPyneD7ZAFc5vgBOg4wh+ZWh+/A/CpTwd2klWf+Bts7 c1IZ0YOw3irJGe0B8knw5tmGlWmIii/HCGbth/OchfNKj9UshL66Dsvaiq8r89Glv7XP ezBdfJtlcjQo/ZGiKoaD0H4wJPkP5iD4ot/Q4NAB0/rKeQ4ifa304Mh0fWCXXgeTqZIz D2R+aGBcdIkXYPmXi/lmcA7rpQeewsq+gtUF0DU/ftjl2Jt2+41x/0ko0k3bRbMrUrJo 9etA== X-Gm-Message-State: AOJu0YyikHfb6VKQk+zWP9c/HDEhnTAhmeCFXYisyR4783m4IrQd0xaM lZUW8ri25zes5+CsAYNokv0u3VXzUaiq1sbiRwNFdDDg7k0bHBMhxeVpubuDkSbc/bWfWMwABVs XyJ8= X-Gm-Gg: ASbGnctL+T+ic9KUBXfKQzY4OIEW09fZtpy0NeUJMl4Nk1+CkEaz5V19Z7vpV+osmQX n4Ez5CwEIYf5grVq4kyRgEVQQWXcUtYyrzrQ85Yjd5Kpy+8u56SBP5OCp0BKxVd/XFVVltAbkQg OIBYOhD13evb+K4C07IGK3GBGXyNOxFx+cWIwn6N1jvnrR2JBSFBFg1zVu4VRxn6qHu/XH4Q/nZ KQ/GsUxc1ew+ibeXIqqpF7ikeD4MX4zdTBEjty7HJQdEP7n0Kf5lTfYagnfTtu8G+rbgHBINkD4 V5LDl2PJyZf6Tl1GRJZSoBLIzi7nzN5fZnMzKGGNFj84GsmNam+/31QVzPyUjhI1akfVy76Y/FO RJXInBPzlI9v17enu15c= X-Google-Smtp-Source: AGHT+IFBQ2PzvPYM30ir5SMDietqS1NgRZHrfcxQshuaH4Sc4c6Lx+LC+3/Mvs5tYJvqne0Sr1eOfw== X-Received: by 2002:a05:600c:1f92:b0:439:5f04:4f8d with SMTP id 5b1f17b1804b1-43ce4dcf8e4mr32496245e9.12.1741542753119; Sun, 09 Mar 2025 10:52:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 05/38] cpus: Register VMState per user / system emulation Date: Sun, 9 Mar 2025 18:51:34 +0100 Message-ID: <20250309175207.43828-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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: 1741543295300019000 Simplify cpu-target.c by extracting mixed vmstate code into the cpu_vmstate_register() / cpu_vmstate_unregister() helpers, implemented in cpu-user.c and cpu-system.c. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-20-philmd@linaro.org> --- include/hw/core/cpu.h | 2 + cpu-target.c | 121 +----------------------------------------- hw/core/cpu-system.c | 115 +++++++++++++++++++++++++++++++++++++++ hw/core/cpu-user.c | 12 +++++ 4 files changed, 131 insertions(+), 119 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 9dd6ac7c763..bc0c9468344 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1165,6 +1165,8 @@ G_NORETURN void cpu_abort(CPUState *cpu, const char *= fmt, ...) /* $(top_srcdir)/cpu.c */ void cpu_class_init_props(DeviceClass *dc); void cpu_exec_initfn(CPUState *cpu); +void cpu_vmstate_register(CPUState *cpu); +void cpu_vmstate_unregister(CPUState *cpu); bool cpu_exec_realizefn(CPUState *cpu, Error **errp); void cpu_exec_unrealizefn(CPUState *cpu); void cpu_exec_reset_hold(CPUState *cpu); diff --git a/cpu-target.c b/cpu-target.c index b6e66d5ac02..bc9c537c575 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -21,115 +21,17 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/qemu-print.h" -#include "migration/vmstate.h" -#ifndef CONFIG_USER_ONLY -#include "hw/core/sysemu-cpu-ops.h" -#endif #include "system/accel-ops.h" #include "system/cpus.h" -#include "system/tcg.h" #include "exec/tswap.h" #include "exec/replay-core.h" #include "exec/cpu-common.h" -#include "exec/cputlb.h" -#include "exec/exec-all.h" -#include "exec/tb-flush.h" #include "exec/log.h" #include "accel/accel-cpu-target.h" #include "trace/trace-root.h" #include "qemu/accel.h" #include "hw/core/cpu.h" =20 -#ifndef CONFIG_USER_ONLY -static int cpu_common_post_load(void *opaque, int version_id) -{ - if (tcg_enabled()) { - CPUState *cpu =3D opaque; - - /* - * 0x01 was CPU_INTERRUPT_EXIT. This line can be removed when the - * version_id is increased. - */ - cpu->interrupt_request &=3D ~0x01; - - tlb_flush(cpu); - - /* - * loadvm has just updated the content of RAM, bypassing the - * usual mechanisms that ensure we flush TBs for writes to - * memory we've translated code from. So we must flush all TBs, - * which will now be stale. - */ - tb_flush(cpu); - } - - return 0; -} - -static int cpu_common_pre_load(void *opaque) -{ - CPUState *cpu =3D opaque; - - cpu->exception_index =3D -1; - - return 0; -} - -static bool cpu_common_exception_index_needed(void *opaque) -{ - CPUState *cpu =3D opaque; - - return tcg_enabled() && cpu->exception_index !=3D -1; -} - -static const VMStateDescription vmstate_cpu_common_exception_index =3D { - .name =3D "cpu_common/exception_index", - .version_id =3D 1, - .minimum_version_id =3D 1, - .needed =3D cpu_common_exception_index_needed, - .fields =3D (const VMStateField[]) { - VMSTATE_INT32(exception_index, CPUState), - VMSTATE_END_OF_LIST() - } -}; - -static bool cpu_common_crash_occurred_needed(void *opaque) -{ - CPUState *cpu =3D opaque; - - return cpu->crash_occurred; -} - -static const VMStateDescription vmstate_cpu_common_crash_occurred =3D { - .name =3D "cpu_common/crash_occurred", - .version_id =3D 1, - .minimum_version_id =3D 1, - .needed =3D cpu_common_crash_occurred_needed, - .fields =3D (const VMStateField[]) { - VMSTATE_BOOL(crash_occurred, CPUState), - VMSTATE_END_OF_LIST() - } -}; - -const VMStateDescription vmstate_cpu_common =3D { - .name =3D "cpu_common", - .version_id =3D 1, - .minimum_version_id =3D 1, - .pre_load =3D cpu_common_pre_load, - .post_load =3D cpu_common_post_load, - .fields =3D (const VMStateField[]) { - VMSTATE_UINT32(halted, CPUState), - VMSTATE_UINT32(interrupt_request, CPUState), - VMSTATE_END_OF_LIST() - }, - .subsections =3D (const VMStateDescription * const []) { - &vmstate_cpu_common_exception_index, - &vmstate_cpu_common_crash_occurred, - NULL - } -}; -#endif - bool cpu_exec_realizefn(CPUState *cpu, Error **errp) { if (!accel_cpu_common_realize(cpu, errp)) { @@ -139,33 +41,14 @@ bool cpu_exec_realizefn(CPUState *cpu, Error **errp) /* Wait until cpu initialization complete before exposing cpu. */ cpu_list_add(cpu); =20 -#ifdef CONFIG_USER_ONLY - assert(qdev_get_vmsd(DEVICE(cpu)) =3D=3D NULL || - qdev_get_vmsd(DEVICE(cpu))->unmigratable); -#else - if (qdev_get_vmsd(DEVICE(cpu)) =3D=3D NULL) { - vmstate_register(NULL, cpu->cpu_index, &vmstate_cpu_common, cpu); - } - if (cpu->cc->sysemu_ops->legacy_vmsd !=3D NULL) { - vmstate_register(NULL, cpu->cpu_index, cpu->cc->sysemu_ops->legacy= _vmsd, cpu); - } -#endif /* CONFIG_USER_ONLY */ + cpu_vmstate_register(cpu); =20 return true; } =20 void cpu_exec_unrealizefn(CPUState *cpu) { -#ifndef CONFIG_USER_ONLY - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (cc->sysemu_ops->legacy_vmsd !=3D NULL) { - vmstate_unregister(NULL, cc->sysemu_ops->legacy_vmsd, cpu); - } - if (qdev_get_vmsd(DEVICE(cpu)) =3D=3D NULL) { - vmstate_unregister(NULL, &vmstate_cpu_common, cpu); - } -#endif + cpu_vmstate_unregister(cpu); =20 cpu_list_remove(cpu); /* diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index e511507e13b..6c89d76e498 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -21,11 +21,15 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "exec/address-spaces.h" +#include "exec/cputlb.h" #include "exec/memory.h" +#include "exec/tb-flush.h" #include "exec/tswap.h" #include "hw/qdev-core.h" #include "hw/qdev-properties.h" #include "hw/core/sysemu-cpu-ops.h" +#include "migration/vmstate.h" +#include "system/tcg.h" =20 bool cpu_paging_enabled(const CPUState *cpu) { @@ -194,3 +198,114 @@ void cpu_exec_initfn(CPUState *cpu) cpu->memory =3D get_system_memory(); object_ref(OBJECT(cpu->memory)); } + +static int cpu_common_post_load(void *opaque, int version_id) +{ + if (tcg_enabled()) { + CPUState *cpu =3D opaque; + + /* + * 0x01 was CPU_INTERRUPT_EXIT. This line can be removed when the + * version_id is increased. + */ + cpu->interrupt_request &=3D ~0x01; + + tlb_flush(cpu); + + /* + * loadvm has just updated the content of RAM, bypassing the + * usual mechanisms that ensure we flush TBs for writes to + * memory we've translated code from. So we must flush all TBs, + * which will now be stale. + */ + tb_flush(cpu); + } + + return 0; +} + +static int cpu_common_pre_load(void *opaque) +{ + CPUState *cpu =3D opaque; + + cpu->exception_index =3D -1; + + return 0; +} + +static bool cpu_common_exception_index_needed(void *opaque) +{ + CPUState *cpu =3D opaque; + + return tcg_enabled() && cpu->exception_index !=3D -1; +} + +static const VMStateDescription vmstate_cpu_common_exception_index =3D { + .name =3D "cpu_common/exception_index", + .version_id =3D 1, + .minimum_version_id =3D 1, + .needed =3D cpu_common_exception_index_needed, + .fields =3D (const VMStateField[]) { + VMSTATE_INT32(exception_index, CPUState), + VMSTATE_END_OF_LIST() + } +}; + +static bool cpu_common_crash_occurred_needed(void *opaque) +{ + CPUState *cpu =3D opaque; + + return cpu->crash_occurred; +} + +static const VMStateDescription vmstate_cpu_common_crash_occurred =3D { + .name =3D "cpu_common/crash_occurred", + .version_id =3D 1, + .minimum_version_id =3D 1, + .needed =3D cpu_common_crash_occurred_needed, + .fields =3D (const VMStateField[]) { + VMSTATE_BOOL(crash_occurred, CPUState), + VMSTATE_END_OF_LIST() + } +}; + +const VMStateDescription vmstate_cpu_common =3D { + .name =3D "cpu_common", + .version_id =3D 1, + .minimum_version_id =3D 1, + .pre_load =3D cpu_common_pre_load, + .post_load =3D cpu_common_post_load, + .fields =3D (const VMStateField[]) { + VMSTATE_UINT32(halted, CPUState), + VMSTATE_UINT32(interrupt_request, CPUState), + VMSTATE_END_OF_LIST() + }, + .subsections =3D (const VMStateDescription * const []) { + &vmstate_cpu_common_exception_index, + &vmstate_cpu_common_crash_occurred, + NULL + } +}; + +void cpu_vmstate_register(CPUState *cpu) +{ + if (qdev_get_vmsd(DEVICE(cpu)) =3D=3D NULL) { + vmstate_register(NULL, cpu->cpu_index, &vmstate_cpu_common, cpu); + } + if (cpu->cc->sysemu_ops->legacy_vmsd !=3D NULL) { + vmstate_register(NULL, cpu->cpu_index, + cpu->cc->sysemu_ops->legacy_vmsd, cpu); + } +} + +void cpu_vmstate_unregister(CPUState *cpu) +{ + CPUClass *cc =3D CPU_GET_CLASS(cpu); + + if (cc->sysemu_ops->legacy_vmsd !=3D NULL) { + vmstate_unregister(NULL, cc->sysemu_ops->legacy_vmsd, cpu); + } + if (qdev_get_vmsd(DEVICE(cpu)) =3D=3D NULL) { + vmstate_unregister(NULL, &vmstate_cpu_common, cpu); + } +} diff --git a/hw/core/cpu-user.c b/hw/core/cpu-user.c index cdd8de2fefa..1892acdee0f 100644 --- a/hw/core/cpu-user.c +++ b/hw/core/cpu-user.c @@ -10,6 +10,7 @@ #include "hw/qdev-core.h" #include "hw/qdev-properties.h" #include "hw/core/cpu.h" +#include "migration/vmstate.h" =20 static const Property cpu_user_props[] =3D { /* @@ -30,3 +31,14 @@ void cpu_exec_initfn(CPUState *cpu) { /* nothing to do */ } + +void cpu_vmstate_register(CPUState *cpu) +{ + assert(qdev_get_vmsd(DEVICE(cpu)) =3D=3D NULL || + qdev_get_vmsd(DEVICE(cpu))->unmigratable); +} + +void cpu_vmstate_unregister(CPUState *cpu) +{ + /* nothing to do */ +} --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543116; cv=none; d=zohomail.com; s=zohoarc; b=c22TBpPQgXphB0O8JzZy4sJrCg0YEpo10myofeXf5TypD7P4WatH4EbkeybW3UWxsndvRzoPbqqSgDagJpDVbWwwj89jP2FKHGnKbD7EcVKfE3QYcSae28W4Pa1f+1OOhsPgMa24a9ismRQovWna2xbWqiZ/V/OlO8bNJBrRlng= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543116; 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=XCeL7qLhCXyawqpFh374doAuSUcQFtoZ56lrH3Aj2ao=; b=bHrAmBwYMVFMWtaGV1puuqauBkKJtSTyT4ebyBMEChcLJOanT7YLxttlKZ+LW0+SH70KHYz8a1GfTHluoQNnCgkTOdg60Kvap8K8NPqBaeNRnlyYSq3nB9wVa6Ierh+l6Ad7NendGfc+xC9J0LwtGMbv3SWzWXNtgmk5h7S7XMw= 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 1741543116990553.0321740450497; Sun, 9 Mar 2025 10:58:36 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKpT-0005Ca-KK; Sun, 09 Mar 2025 13:52:48 -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 1trKpN-0005C9-Nc for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:41 -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 1trKpL-0004pz-Nd for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:41 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-391342fc148so1343664f8f.2 for ; Sun, 09 Mar 2025 10:52:39 -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-43ce720f93bsm60298215e9.25.2025.03.09.10.52.36 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:52:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542758; x=1742147558; 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=XCeL7qLhCXyawqpFh374doAuSUcQFtoZ56lrH3Aj2ao=; b=NTP4Hy/1nypXSu3QMI7r74VNdq3lAzUOIBisCb4teEDBLpcYXtH3GxVngNewcdzeFV oXaWjCXhBwI3YJd3oNXXnmrOVdmWjsDnhmGCxVUUaol4dRLh0SHCZP8JPnDgd4CM0MkL bVYGIFw3tBtaoyGW+ZrHZCn92/dzYcotJ3NEyD1iuzQ+SKfbPiCd5Fryb4XjI0gEQszd jDP6hcV/t/5hzMpkbQZSy7qa717dVbbKdZA42Fktd3N7YLCD6BHJwRUjuxEy1m09Wbiw vz9eFyJY/7sWvHmmjMjBZr4qZMWPPHq+2qgtLGknZOeSrUA6fNxr/YH5dXKztK9eGTjH v2FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542758; x=1742147558; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XCeL7qLhCXyawqpFh374doAuSUcQFtoZ56lrH3Aj2ao=; b=i/lFQhHChF1P3pECIZR/ep+zlFO7q4sva9xnCBdwEv7cR39sHApHnPKYPyVtdkhEmF /lL0OTainycnXrZi3I5Xd3XFLn/NwRDu2Mquw6j2e8r63J5E5GXsOUVi0x+bY+TZUSB6 GkDjeee0Qzn0+kz536n+gEA6OVj7xOWcdvCeQvSqviMPdMbnl5lwX8Xup+FWZVicF76K JzNlBYUmWBqzm8h8V4Y583hjHmYYbgWzkf1KN06btlL2zBvsCvj55Nk0YML+NvgjlA3M 9vHv2KfWbBh/eAvk9DwN6fU/ry0RZdZlxHwsNMzrIQmG/R/I63ecHvL9RhXXy5vhyNq6 aA+g== X-Gm-Message-State: AOJu0YzZcDWxgFdjSepd0nnnsMkf1O3U2vdToiUIJ+5NIt+kstnjj1VN 5pcE22KCtCQcALPW+X+4AuUwj2b0eqW1UIPXQhFztI8QZJHEvmzjiii9I9e/Y6NVBVhdU0srmTF UvQ8= X-Gm-Gg: ASbGncsXvEMzK3s+M19N2/El352kf2yfsjtDXG/MP7SLbGKySS5aOLLedFYbGUyx9sf 7jUn5Mm7zSWD612AgnKDsLykXJqnfqP0d7JK0/tRgMyDnQKfVr/d4nRPFWf+XGmzhFxzQSIp1t0 YZ7x5oVaCgn0/xTbG4RZUyj9thDykKXsEeuleHGuLL2Y0/pid3M3NkABLl3G/ottVa1qZL3xw8D 3zkIOhyKrUPqVlXGGZwTc2Xca6TXXbg9gbflnssQLcbgly2qoNRKj8CdZxtSA5D+298znFqi7O2 CTwRwAApKF6+iphwl6x2hn2pHuQQ5otKdcXKuE94qObD/wSbnA/6pcBJ1iRncQOxQZd/XBXioSe S2YDsFSgVfwgubt3TId0= X-Google-Smtp-Source: AGHT+IGS6SH0UrFipcFsIlm1EyzudTT+VD7XHBwkuoasmMLi2DQfY7DqLJMDaQ7n8so3Mh9NUJVOMg== X-Received: by 2002:adf:a3cf:0:b0:391:4231:40a with SMTP id ffacd0b85a97d-391423105ccmr1503457f8f.33.1741542757730; Sun, 09 Mar 2025 10:52:37 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 06/38] cpus: Build cpu_exec_[un]realizefn() methods once Date: Sun, 9 Mar 2025 18:51:35 +0100 Message-ID: <20250309175207.43828-7-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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=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: 1741543118344019100 Now that cpu_exec_realizefn() and cpu_exec_unrealizefn() methods don't use any target specific definition anymore, we can move them to cpu-common.c to be able to build them once. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250123234415.59850-21-philmd@linaro.org> --- cpu-target.c | 29 ----------------------------- hw/core/cpu-common.c | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 29 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index bc9c537c575..cae77374b38 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -25,38 +25,9 @@ #include "system/cpus.h" #include "exec/tswap.h" #include "exec/replay-core.h" -#include "exec/cpu-common.h" #include "exec/log.h" #include "accel/accel-cpu-target.h" #include "trace/trace-root.h" -#include "qemu/accel.h" -#include "hw/core/cpu.h" - -bool cpu_exec_realizefn(CPUState *cpu, Error **errp) -{ - if (!accel_cpu_common_realize(cpu, errp)) { - return false; - } - - /* Wait until cpu initialization complete before exposing cpu. */ - cpu_list_add(cpu); - - cpu_vmstate_register(cpu); - - return true; -} - -void cpu_exec_unrealizefn(CPUState *cpu) -{ - cpu_vmstate_unregister(cpu); - - cpu_list_remove(cpu); - /* - * Now that the vCPU has been removed from the RCU list, we can call - * accel_cpu_common_unrealize, which may free fields using call_rcu. - */ - accel_cpu_common_unrealize(cpu); -} =20 char *cpu_model_from_type(const char *typename) { diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index d5cd227fe6d..5671d8d4f54 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -193,6 +193,20 @@ static void cpu_common_parse_features(const char *type= name, char *features, } } =20 +bool cpu_exec_realizefn(CPUState *cpu, Error **errp) +{ + if (!accel_cpu_common_realize(cpu, errp)) { + return false; + } + + /* Wait until cpu initialization complete before exposing cpu. */ + cpu_list_add(cpu); + + cpu_vmstate_register(cpu); + + return true; +} + static void cpu_common_realizefn(DeviceState *dev, Error **errp) { CPUState *cpu =3D CPU(dev); @@ -234,6 +248,18 @@ static void cpu_common_unrealizefn(DeviceState *dev) cpu_exec_unrealizefn(cpu); } =20 +void cpu_exec_unrealizefn(CPUState *cpu) +{ + cpu_vmstate_unregister(cpu); + + cpu_list_remove(cpu); + /* + * Now that the vCPU has been removed from the RCU list, we can call + * accel_cpu_common_unrealize, which may free fields using call_rcu. + */ + accel_cpu_common_unrealize(cpu); +} + static void cpu_common_initfn(Object *obj) { CPUState *cpu =3D CPU(obj); --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543255; cv=none; d=zohomail.com; s=zohoarc; b=GwvzWQv9AUcCDOBsumRw8UfEirsyJLKxFkKdiZDePk0Wakgwj3WQSSUXZUYnKysDNweq2BfNBQFfceT5GhYjB9fZJss7eYzNmidewwbBaVT2AwFZRPUpwid0If6f1ml9etWjHqo+sSRb8cbhsNXXPN108u/HMU87ONd3A7XpQEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543255; 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=8FG/sgyXr9996vZOdOWbBM0OkWgobia8pq1aZDtIQB4=; b=hngzAUfQXS0KFdrsmuWtBMHUMpsj1laxC+8+5bJGTYy14dxvohUOuwv1nqg6AF8lENb0iUB7/yH6x75FElz4IxOLQQR3da2I9l6Cxq6maXqWJZlr9KFe9jjCKeBRPAOGRIi5l9Tdpsy7H1vTk56IjVCY5LVEqaE44hNH0zFbSw4= 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 1741543255241147.55307981967155; Sun, 9 Mar 2025 11:00:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKpa-0005E1-Vc; Sun, 09 Mar 2025 13:52:54 -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 1trKpS-0005CT-3U for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:47 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKpQ-0004qh-8I for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:45 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-43bd5644de8so36427775e9.3 for ; Sun, 09 Mar 2025 10:52:43 -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-43bd42c6203sm150211345e9.24.2025.03.09.10.52.41 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542762; x=1742147562; 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=8FG/sgyXr9996vZOdOWbBM0OkWgobia8pq1aZDtIQB4=; b=cxzIes2qF03NTDaX3jdun1j0zs+Jzr43OKGBk4V+D7wm9rajRDFevtwDCG/wXDxI6f 3h58GGtPEWtXNPWmE9FLuvn8m/S8p7wveSTeuKuTXj/5/kyqUV3i0lpADg7CT+zXgGsr 4fRtyJd85RT011LW/DdhshlaTp0vVVpyvVxn0n+iK7fl6r4Fc8CVqEEw/YaopooGl2dU m08EBvIkTujkT8vjHhOXNylDqRMgHBA6W4F2KCc6Gebh9YUcnA01GHvRflMhnpDXhGOY P08EbEdZBhlBdhTkTcMMGUNJgBSl33y53me+S4jEf7LiNdmkMsJW5ahRE8psOkU/fxxZ xd3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542762; x=1742147562; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8FG/sgyXr9996vZOdOWbBM0OkWgobia8pq1aZDtIQB4=; b=moGG+hqLV4Dl9JRjwGrPRUg/ojoGSX3/Jm+l19rbSB+nSSjXYPxZ5QqsvA8lSiqRzO 8fcPPe2hsuq2LrCd9DvI9z8p6gJS8uU2NThrXTR2BBIbNpi2xIlJCh7E8hPSBCZKrlf8 1N1suwMTF8gF6WkrLZff07tDCgiMyIzzwl3KoT0o3bNn1n0IT3KiKqIISo22M7ianT9e sGbVV5ha5DU2oT8EAaUSaivHoRtC28FMQ2MJpzrre+0t7U9CAHz27cWd8d+3XBnOlVaw bzVPAsxx20udQkKYdQ6SwCIIgmCze0mB8SjIobhqaoXH/d99xSwHmEe9AkT6H7NDL3bU 5n1w== X-Gm-Message-State: AOJu0YwZNBp9j9e+Bdftst0GgSYLmDQKAUA3v520RhDyQL9T3sFgu2Rv 8Fg64VqudUbeJUR1/ZyZw/tUtyBlpW1yA96rSuboxX5iy/0fvk3DDwxdilbpADKmqvVje9K6Jp6 neIg= X-Gm-Gg: ASbGnctSS5gS30c/tc6jUzmBAcqDtN8Xf/13pro3ED9lXVLnN6PDIFIE8GvjoSVYOG4 fuT3yQXpo+F9jWC/QRhQtuan+yOT0PiSBy+nJOHYqdKdOvnXJu44f3/oXW7tdu+BDe5n8rQ/suH EO+1UTEAf3ZyHdG1aHtZ/y9yqzG/LUVL8M6XgXfw39iBBAuQW73/KOX+w8EpsdAG8dXgXj2KC3f Yv32lko9qnkBkPJqf8VMF0C/FmeJqBiOckyEOKuBL9XE1lDgbqb3H4xILnWZA2VZ9y+AgduRZX7 1D0ziRR2ZeGiiPlrmSrA7iy2qhKTILoWcnn+PSzo7hCmB08VHqIn5wC1aQvSw0gP65SAUmirK0D 3CmCM9u6dfScHfPUKc0A= X-Google-Smtp-Source: AGHT+IHRj8sKj47XZF8Gb6wyUqCSukF/uwDYueuewD1xX78sJ7gUZX1QQRYNkX5OuwysquzWf6CZdw== X-Received: by 2002:a05:600c:1d1c:b0:43c:efed:732d with SMTP id 5b1f17b1804b1-43cefed7916mr20900435e9.16.1741542762313; Sun, 09 Mar 2025 10:52:42 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 07/38] cpus: Prefer cached CpuClass over CPU_GET_CLASS() macro Date: Sun, 9 Mar 2025 18:51:36 +0100 Message-ID: <20250309175207.43828-8-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741543256145019100 CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250122093028.52416-5-philmd@linaro.org> --- include/hw/core/cpu.h | 10 +++---- cpu-common.c | 10 +++---- hw/core/cpu-common.c | 13 +++------ hw/core/cpu-system.c | 61 ++++++++++++++++--------------------------- 4 files changed, 33 insertions(+), 61 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index bc0c9468344..c6df426c947 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -826,10 +826,8 @@ const char *parse_cpu_option(const char *cpu_option); */ static inline bool cpu_has_work(CPUState *cpu) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - g_assert(cc->has_work); - return cc->has_work(cpu); + g_assert(cpu->cc->has_work); + return cpu->cc->has_work(cpu); } =20 /** @@ -968,9 +966,7 @@ void cpu_interrupt(CPUState *cpu, int mask); */ static inline void cpu_set_pc(CPUState *cpu, vaddr addr) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - cc->set_pc(cpu, addr); + cpu->cc->set_pc(cpu, addr); } =20 /** diff --git a/cpu-common.c b/cpu-common.c index f5dcc2d136b..ef5757d23bf 100644 --- a/cpu-common.c +++ b/cpu-common.c @@ -388,11 +388,10 @@ void process_queued_cpu_work(CPUState *cpu) int cpu_breakpoint_insert(CPUState *cpu, vaddr pc, int flags, CPUBreakpoint **breakpoint) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); CPUBreakpoint *bp; =20 - if (cc->gdb_adjust_breakpoint) { - pc =3D cc->gdb_adjust_breakpoint(cpu, pc); + if (cpu->cc->gdb_adjust_breakpoint) { + pc =3D cpu->cc->gdb_adjust_breakpoint(cpu, pc); } =20 bp =3D g_malloc(sizeof(*bp)); @@ -418,11 +417,10 @@ int cpu_breakpoint_insert(CPUState *cpu, vaddr pc, in= t flags, /* Remove a specific breakpoint. */ int cpu_breakpoint_remove(CPUState *cpu, vaddr pc, int flags) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); CPUBreakpoint *bp; =20 - if (cc->gdb_adjust_breakpoint) { - pc =3D cc->gdb_adjust_breakpoint(cpu, pc); + if (cpu->cc->gdb_adjust_breakpoint) { + pc =3D cpu->cc->gdb_adjust_breakpoint(cpu, pc); } =20 QTAILQ_FOREACH(bp, &cpu->breakpoints, entry) { diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 5671d8d4f54..ba0f02e49da 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -40,9 +40,7 @@ CPUState *cpu_by_arch_id(int64_t id) CPUState *cpu; =20 CPU_FOREACH(cpu) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (cc->get_arch_id(cpu) =3D=3D id) { + if (cpu->cc->get_arch_id(cpu) =3D=3D id) { return cpu; } } @@ -101,11 +99,9 @@ static int cpu_common_gdb_write_register(CPUState *cpu,= uint8_t *buf, int reg) =20 void cpu_dump_state(CPUState *cpu, FILE *f, int flags) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (cc->dump_state) { + if (cpu->cc->dump_state) { cpu_synchronize_state(cpu); - cc->dump_state(cpu, f, flags); + cpu->cc->dump_state(cpu, f, flags); } } =20 @@ -119,11 +115,10 @@ void cpu_reset(CPUState *cpu) static void cpu_common_reset_hold(Object *obj, ResetType type) { CPUState *cpu =3D CPU(obj); - CPUClass *cc =3D CPU_GET_CLASS(cpu); =20 if (qemu_loglevel_mask(CPU_LOG_RESET)) { qemu_log("CPU Reset (CPU %d)\n", cpu->cpu_index); - log_cpu_state(cpu, cc->reset_dump_flags); + log_cpu_state(cpu, cpu->cc->reset_dump_flags); } =20 cpu->interrupt_request =3D 0; diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index 6c89d76e498..e29664d39bb 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -33,10 +33,8 @@ =20 bool cpu_paging_enabled(const CPUState *cpu) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (cc->sysemu_ops->get_paging_enabled) { - return cc->sysemu_ops->get_paging_enabled(cpu); + if (cpu->cc->sysemu_ops->get_paging_enabled) { + return cpu->cc->sysemu_ops->get_paging_enabled(cpu); } =20 return false; @@ -45,10 +43,8 @@ bool cpu_paging_enabled(const CPUState *cpu) bool cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list, Error **errp) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (cc->sysemu_ops->get_memory_mapping) { - return cc->sysemu_ops->get_memory_mapping(cpu, list, errp); + if (cpu->cc->sysemu_ops->get_memory_mapping) { + return cpu->cc->sysemu_ops->get_memory_mapping(cpu, list, errp); } =20 error_setg(errp, "Obtaining memory mappings is unsupported on this CPU= ."); @@ -58,15 +54,15 @@ bool cpu_get_memory_mapping(CPUState *cpu, MemoryMappin= gList *list, hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr, MemTxAttrs *attrs) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); hwaddr paddr; =20 - if (cc->sysemu_ops->get_phys_page_attrs_debug) { - paddr =3D cc->sysemu_ops->get_phys_page_attrs_debug(cpu, addr, att= rs); + if (cpu->cc->sysemu_ops->get_phys_page_attrs_debug) { + paddr =3D cpu->cc->sysemu_ops->get_phys_page_attrs_debug(cpu, addr, + attrs); } else { /* Fallback for CPUs which don't implement the _attrs_ hook */ *attrs =3D MEMTXATTRS_UNSPECIFIED; - paddr =3D cc->sysemu_ops->get_phys_page_debug(cpu, addr); + paddr =3D cpu->cc->sysemu_ops->get_phys_page_debug(cpu, addr); } /* Indicate that this is a debug access. */ attrs->debug =3D 1; @@ -94,64 +90,53 @@ int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs attr= s) int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu, void *opaque) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (!cc->sysemu_ops->write_elf32_qemunote) { + if (!cpu->cc->sysemu_ops->write_elf32_qemunote) { return 0; } - return (*cc->sysemu_ops->write_elf32_qemunote)(f, cpu, opaque); + return (*cpu->cc->sysemu_ops->write_elf32_qemunote)(f, cpu, opaque); } =20 int cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cpu, int cpuid, void *opaque) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (!cc->sysemu_ops->write_elf32_note) { + if (!cpu->cc->sysemu_ops->write_elf32_note) { return -1; } - return (*cc->sysemu_ops->write_elf32_note)(f, cpu, cpuid, opaque); + return (*cpu->cc->sysemu_ops->write_elf32_note)(f, cpu, cpuid, opaque); } =20 int cpu_write_elf64_qemunote(WriteCoreDumpFunction f, CPUState *cpu, void *opaque) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (!cc->sysemu_ops->write_elf64_qemunote) { + if (!cpu->cc->sysemu_ops->write_elf64_qemunote) { return 0; } - return (*cc->sysemu_ops->write_elf64_qemunote)(f, cpu, opaque); + return (*cpu->cc->sysemu_ops->write_elf64_qemunote)(f, cpu, opaque); } =20 int cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cpu, int cpuid, void *opaque) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (!cc->sysemu_ops->write_elf64_note) { + if (!cpu->cc->sysemu_ops->write_elf64_note) { return -1; } - return (*cc->sysemu_ops->write_elf64_note)(f, cpu, cpuid, opaque); + return (*cpu->cc->sysemu_ops->write_elf64_note)(f, cpu, cpuid, opaque); } =20 bool cpu_virtio_is_big_endian(CPUState *cpu) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (cc->sysemu_ops->virtio_is_big_endian) { - return cc->sysemu_ops->virtio_is_big_endian(cpu); + if (cpu->cc->sysemu_ops->virtio_is_big_endian) { + return cpu->cc->sysemu_ops->virtio_is_big_endian(cpu); } return target_words_bigendian(); } =20 GuestPanicInformation *cpu_get_crash_info(CPUState *cpu) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); GuestPanicInformation *res =3D NULL; =20 - if (cc->sysemu_ops->get_crash_info) { - res =3D cc->sysemu_ops->get_crash_info(cpu); + if (cpu->cc->sysemu_ops->get_crash_info) { + res =3D cpu->cc->sysemu_ops->get_crash_info(cpu); } return res; } @@ -300,10 +285,8 @@ void cpu_vmstate_register(CPUState *cpu) =20 void cpu_vmstate_unregister(CPUState *cpu) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (cc->sysemu_ops->legacy_vmsd !=3D NULL) { - vmstate_unregister(NULL, cc->sysemu_ops->legacy_vmsd, cpu); + if (cpu->cc->sysemu_ops->legacy_vmsd !=3D NULL) { + vmstate_unregister(NULL, cpu->cc->sysemu_ops->legacy_vmsd, cpu); } if (qdev_get_vmsd(DEVICE(cpu)) =3D=3D NULL) { vmstate_unregister(NULL, &vmstate_cpu_common, cpu); --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542851; cv=none; d=zohomail.com; s=zohoarc; b=QKc42eH9Uu3dtQiQEk9y3FPnUWTtoFYnpQAgr7jizW1u5+X7kBxEsfz4GQmc4PrZbBoi9Lb5U5jvRyDI4FGLcnL//+EtWkEveraa3x3tqCDMtPdayXHHnpRfpLN7mN8GgYVLjDOjxbLsxnif4ctatqEKY0MX8+v8nYF/8Ibsy1s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542851; 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=CMUkgiylTgPg6Rg8E626l7jCXafLoryj7tcACx1jVGw=; b=aOFsGkOC0nwrO7cwmulGt25h1oxxYOvHZe6Z1sLLz+/RYX+5qvSSZr3qGnQz0uM0U+EBMGLGe6YlzPeVme5XzwUCEdeXJJvT5o0lRWuvT0Clz1ASCzd8x1pwn+N/C6UVp6x2SL57AiQNvNdEvc+vpLhj/7Yh6EUqmEjIs5P2x68= 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 1741542851350409.47672066304244; Sun, 9 Mar 2025 10:54:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKpb-0005Ec-SG; Sun, 09 Mar 2025 13:52:55 -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 1trKpW-0005DH-GT for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:52 -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 1trKpU-0004r3-RS for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:50 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3912d2c89ecso2906360f8f.2 for ; Sun, 09 Mar 2025 10:52:48 -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-43cf680f4cesm15442585e9.35.2025.03.09.10.52.46 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542767; x=1742147567; 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=CMUkgiylTgPg6Rg8E626l7jCXafLoryj7tcACx1jVGw=; b=UEcxdfsOuvUkXNvls43CL7XUk4Bn9MJofO7q0ICGW6GlqbqsnssjYrJMfHmOmlamW7 YwXIhSGrXZfrUB6ICQKihT7wD+Bv4YqHyByo8DWWI0OyeIV89HV0GznwMuYiV8vaxWB3 Z3SqNi7jd/2+oKCJ+WPeH/y8TQJgyXd0/GyFYa/fIkJonPoanSDPjRkf+IOi16j63CJR /42Gt/f6qVjyfbzuoGEW1AjuDn9KvlAlwvwnBis8T6nFhpsdqTm91darWoXLOrDMn9+q MdkLRGvwNJliDRUrCXRjjJ6J0uSro7yhp3TGMZu3Xni65qk27G3SqRMgcvwdbaGZZ92I LOeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542767; x=1742147567; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CMUkgiylTgPg6Rg8E626l7jCXafLoryj7tcACx1jVGw=; b=TmagvIkaT/lbWPuIh4tQbl1Sc1whmLZ+zciPKijxmXIUxnZFRRdV34TOm8AStNe60+ VpZjnDlO2ufTkcGXB1weKocLbU/XrAqUHxEinq4PoEbWhpwjk1IM+88Vrrla5merg4ye ePlfSTvf6923cCR3zjWUKq/rToea1ESBKU01Atk72n6KaEeD9reJtDI8OGWGJyy5eXe9 XD952VdGVle1bMxPiO9CSihTvdv0RCL2Y3HSKKBIy8Z70YQP7HcH68Vc2vWmDkVgpXoV yByprQ6/gEY4+lQokczlko7KQ8/LE0RmisYV1opEM4qHLZQ/uIUj4ezBcrmclJRXyrBO ovXA== X-Gm-Message-State: AOJu0YyK4FF8Zk7KUvzrBXTj0vBt6UZocdw9lYdgW7BB/ytLf7QqwR7F FTN6LYA+iaVYYz/YdMspBQF4jfjmJdxzDPrHtQ4DjdjKREc/mi47AyKd1du6BO6xoNXX3s+UMP6 Wfe0= X-Gm-Gg: ASbGncte9S9kAyYQstAfQz3Yov+AJoJ0WYiw2iJs18GMpB6iF0o/enhQoo4GevWMTOt RmSOmIEi2iT4FYfrMU0VUrMBwCqq9ErfNuG6gYQAlI/mQTDcGfkHOuC4SpnLBmgFy3Hs9IdHD8c e3V7i6BljA3DvpQZoVyhrxilM29K7Rmg2z1OA2JrvOaX/o/UvlBF8SBI2lLLUX59r1hb76SixzJ wDurzJbkNIZYqAhHNDxwXOI1RSf3dYQxyEN3WtI2LUSxY9X0wCzsXupXDT8VurW0pC1vKXebwL0 /wltSh+agQIH8hVlT2p3EEuLb5TQjfBvcXGI//jyu3H80F7eMkFoPV4HzGYfus1f1XJvCGXpZCs hrVvb2NLlInPc+IjRjck= X-Google-Smtp-Source: AGHT+IFORJZhDGyKX5RaKKRL6jYxap2Szj0hfI8u0GfJVs6u8Jxk9Mq7BuUfNNUVSniW+w25+e9jKQ== X-Received: by 2002:a05:6000:1a86:b0:38f:2a32:abbb with SMTP id ffacd0b85a97d-39132d325c1mr5169237f8f.4.1741542766967; Sun, 09 Mar 2025 10:52:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 08/38] accel: Prefer cached CpuClass over CPU_GET_CLASS() macro Date: Sun, 9 Mar 2025 18:51:37 +0100 Message-ID: <20250309175207.43828-9-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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=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: 1741542851776019000 CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250122093028.52416-6-philmd@linaro.org> --- accel/accel-target.c | 12 +++++------- accel/tcg/tcg-accel-ops.c | 3 +-- accel/tcg/translate-all.c | 2 +- accel/tcg/watchpoint.c | 9 ++++----- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/accel/accel-target.c b/accel/accel-target.c index 83587274626..33a539b4cbb 100644 --- a/accel/accel-target.c +++ b/accel/accel-target.c @@ -113,22 +113,20 @@ void accel_init_interfaces(AccelClass *ac) =20 void accel_cpu_instance_init(CPUState *cpu) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); - - if (cc->accel_cpu && cc->accel_cpu->cpu_instance_init) { - cc->accel_cpu->cpu_instance_init(cpu); + if (cpu->cc->accel_cpu && cpu->cc->accel_cpu->cpu_instance_init) { + cpu->cc->accel_cpu->cpu_instance_init(cpu); } } =20 bool accel_cpu_common_realize(CPUState *cpu, Error **errp) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); AccelState *accel =3D current_accel(); AccelClass *acc =3D ACCEL_GET_CLASS(accel); =20 /* target specific realization */ - if (cc->accel_cpu && cc->accel_cpu->cpu_target_realize - && !cc->accel_cpu->cpu_target_realize(cpu, errp)) { + if (cpu->cc->accel_cpu + && cpu->cc->accel_cpu->cpu_target_realize + && !cpu->cc->accel_cpu->cpu_target_realize(cpu, errp)) { return false; } =20 diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index 53e580d128b..d9b662efe3b 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -121,10 +121,9 @@ static inline int xlat_gdb_type(CPUState *cpu, int gdb= type) [GDB_WATCHPOINT_ACCESS] =3D BP_GDB | BP_MEM_ACCESS, }; =20 - CPUClass *cc =3D CPU_GET_CLASS(cpu); int cputype =3D xlat[gdbtype]; =20 - if (cc->gdb_stop_before_watchpoint) { + if (cpu->cc->gdb_stop_before_watchpoint) { cputype |=3D BP_STOP_BEFORE_ACCESS; } return cputype; diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 0914d6e98b2..82bc16bd535 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -630,7 +630,7 @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr) * to account for the re-execution of the branch. */ n =3D 1; - cc =3D CPU_GET_CLASS(cpu); + cc =3D cpu->cc; if (cc->tcg_ops->io_recompile_replay_branch && cc->tcg_ops->io_recompile_replay_branch(cpu, tb)) { cpu->neg.icount_decr.u16.low++; diff --git a/accel/tcg/watchpoint.c b/accel/tcg/watchpoint.c index ba8c9859cf4..65b21884cec 100644 --- a/accel/tcg/watchpoint.c +++ b/accel/tcg/watchpoint.c @@ -68,7 +68,6 @@ int cpu_watchpoint_address_matches(CPUState *cpu, vaddr a= ddr, vaddr len) void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, MemTxAttrs attrs, int flags, uintptr_t ra) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); CPUWatchpoint *wp; =20 assert(tcg_enabled()); @@ -84,9 +83,9 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vadd= r len, return; } =20 - if (cc->tcg_ops->adjust_watchpoint_address) { + if (cpu->cc->tcg_ops->adjust_watchpoint_address) { /* this is currently used only by ARM BE32 */ - addr =3D cc->tcg_ops->adjust_watchpoint_address(cpu, addr, len); + addr =3D cpu->cc->tcg_ops->adjust_watchpoint_address(cpu, addr, le= n); } =20 assert((flags & ~BP_MEM_ACCESS) =3D=3D 0); @@ -118,8 +117,8 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, va= ddr len, wp->hitattrs =3D attrs; =20 if (wp->flags & BP_CPU - && cc->tcg_ops->debug_check_watchpoint - && !cc->tcg_ops->debug_check_watchpoint(cpu, wp)) { + && cpu->cc->tcg_ops->debug_check_watchpoint + && !cpu->cc->tcg_ops->debug_check_watchpoint(cpu, wp)) { wp->flags &=3D ~BP_WATCHPOINT_HIT; continue; } --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542947; cv=none; d=zohomail.com; s=zohoarc; b=QtfVCYIfOIkmi/na9SUhpfUpr4RM0LNTXxz5At1qbBhbPI0UARTH/rtE/MTp63tc8aKFQx2AndAYVRNuDmCnGXIX3t9kTG+PiYjLyeHw5HDb22fFuIJOo5EUmXEfgDI9crdEARGFFd4QzPgnIJ955wwsDIStpBZQkQC2zZ8vvaE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542947; 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=UZBlo3Xf8l3qExmlz56XofEDvMdC530/ykgDz1o/y/o=; b=EnEgo+DBSj2by+B+TY/Ow1HuylgsuV1AHzHRhuA19OalqYhosxSzdnpR10sOd799ABd/Yf0wKviBim4X3m/Ts3f+g64DfZCDMXwAx5v+Z/C2sBsmB1g1xe6rrkCuAbVjbim7MMgs146IyUY0wGj3QhmdDYL3abxMberitMlpTF0= 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 1741542947340296.3309040921706; Sun, 9 Mar 2025 10:55:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKpf-0005Gx-AN; Sun, 09 Mar 2025 13:52:59 -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 1trKpb-0005EB-4a for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:55 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKpZ-0004rW-IC for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:52:54 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43cef0f03cfso3865375e9.3 for ; Sun, 09 Mar 2025 10:52:53 -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-43bd435cc67sm150369935e9.39.2025.03.09.10.52.50 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:52:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542772; x=1742147572; 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=UZBlo3Xf8l3qExmlz56XofEDvMdC530/ykgDz1o/y/o=; b=atZqFkFLZW4jCJfiY3aAQvd7RxhIrS1IQcyXcvRm+Z0QwTmMOwidGqr6BiRpmbbxec DQydYc9h+HMkcuOpWN1R2ZkMaKIPe0Iy90aiyaWVAxcfLscdeQPt8mZ/L1PGB1shfGL5 bdbrVP52G37b0X7iE7KHPNUAshLlL1GYPhW8Npx4DJaSD2fRW3hwla6aufGgDq68263a 0T4v9WD8ZCpLYpHHAqaRU00UVkKlE8kYAIoLpqvp/HMACQZoTuJgTrCAdoRVLmXxQ1Ad 2cujadoyI2lIyd9f+wI+Utb5C7xBYUuiRS1dMopHyFaNnXnozISDD91W9wvVlAKAMvHv at+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542772; x=1742147572; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UZBlo3Xf8l3qExmlz56XofEDvMdC530/ykgDz1o/y/o=; b=DnzoSZXLKv6IieUkSxu9yol9MF4B9GNmv4cc30hq76SeVgIYwsFkUKl/sdtvvXmHkU Mo8g/HNfubRsCnpkrFLdaVmCVMSzA8+D9Gax2aHue28It8M0NtaoZa0gsCM7fxz3LE0x qjjj7cW8ETsp/bOKGNuQ18M1HolCrV+FDsYsL2eaBKGcYVHcOTpCVrwLJhGYWEnGOOBG 1zOVPLo2Qx46h6q952Ne5WFDXOQYzsdOcNxI+kbN34jlSwuWoXydSD7lswAVkdA8kQ0p PlxmtazysznopSNohP3h7o1xIHazSmG1UudUxeI8VNhM7Mbj4zLnw1LcZcs7kTHBBWY6 XHnw== X-Gm-Message-State: AOJu0Yw8unT+FwRRFw1cKylTguYHk9pDKYyiD9xcs+6tVFW0Zbt/G1rI q68LG5uiSyjB9Ku10WejFra+aihFLHvqjf8b/9cwUEQJ0IR9ABZsSqPf0/TylgwDzfT2vrOQS6B gIiQ= X-Gm-Gg: ASbGncvHQ6tG/CG8lDtbTCNoK4Xz+woa9u94yRNRKHeGg9H/4YNsG51MPFYCuiTQe2E v7lETb2N2kWOUbfZouVoQBVq6hXFNFW3tKRBn/0ljct4PzZ7zFHgpzH+L7RYW4e9VYPUa7lzH4N Zm627mlpxCDpk11nW4yP6Xra+afRw51TESaDKi9ixe/exFpqlTmHKrbEKMemQsQ0og34SKGRXMe iuVijmqZPqhkNCam/O6c2L7VP6cn6o30e4c6uoHr+LL7X7xs6Sx8gvwJOzzzuNTrP1OmTekvtpI 3Q73KxaSl30vLRI3o7hBFNCTQV3ONALFbw3d8v8yiXMhIpzGiwuz8DZsWouH5YiyPilyEXRBRT9 hSBwH3ejZWfJepUOUfeU= X-Google-Smtp-Source: AGHT+IG0WTAmRvzCEnNrgpIT1V51UMFeH7qwL6GibWOBEVWhCmibY+3BL2c00wf5qdq8g0l5FxbQeA== X-Received: by 2002:a05:600c:548e:b0:43c:f70a:2af0 with SMTP id 5b1f17b1804b1-43cf70a2d2bmr9313615e9.16.1741542771674; Sun, 09 Mar 2025 10:52:51 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 09/38] user: Prefer cached CpuClass over CPU_GET_CLASS() macro Date: Sun, 9 Mar 2025 18:51:38 +0100 Message-ID: <20250309175207.43828-10-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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: 1741542948065019000 CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250122093028.52416-7-philmd@linaro.org> --- linux-user/alpha/target_proc.h | 2 +- bsd-user/signal.c | 4 ++-- linux-user/signal.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/linux-user/alpha/target_proc.h b/linux-user/alpha/target_proc.h index dac37dffc9d..da437ee0e56 100644 --- a/linux-user/alpha/target_proc.h +++ b/linux-user/alpha/target_proc.h @@ -15,7 +15,7 @@ static int open_cpuinfo(CPUArchState *cpu_env, int fd) const char *p, *q; int t; =20 - p =3D object_class_get_name(OBJECT_CLASS(CPU_GET_CLASS(env_cpu(cpu_env= )))); + p =3D object_class_get_name(OBJECT_CLASS(env_cpu(cpu_env)->cc)); q =3D strchr(p, '-'); t =3D q - p; assert(t < sizeof(model)); diff --git a/bsd-user/signal.c b/bsd-user/signal.c index ab1d9ddd50f..a8cfcca130e 100644 --- a/bsd-user/signal.c +++ b/bsd-user/signal.c @@ -1034,7 +1034,7 @@ void process_pending_signals(CPUArchState *env) void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr, MMUAccessType access_type, bool maperr, uintptr= _t ra) { - const TCGCPUOps *tcg_ops =3D CPU_GET_CLASS(cpu)->tcg_ops; + const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; =20 if (tcg_ops->record_sigsegv) { tcg_ops->record_sigsegv(cpu, addr, access_type, maperr, ra); @@ -1050,7 +1050,7 @@ void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulon= g addr, void cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr, MMUAccessType access_type, uintptr_t ra) { - const TCGCPUOps *tcg_ops =3D CPU_GET_CLASS(cpu)->tcg_ops; + const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; =20 if (tcg_ops->record_sigbus) { tcg_ops->record_sigbus(cpu, addr, access_type, ra); diff --git a/linux-user/signal.c b/linux-user/signal.c index 4799b79dede..4dafc2c3a29 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -753,7 +753,7 @@ void force_sigsegv(int oldsig) void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong addr, MMUAccessType access_type, bool maperr, uintptr= _t ra) { - const TCGCPUOps *tcg_ops =3D CPU_GET_CLASS(cpu)->tcg_ops; + const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; =20 if (tcg_ops->record_sigsegv) { tcg_ops->record_sigsegv(cpu, addr, access_type, maperr, ra); @@ -769,7 +769,7 @@ void cpu_loop_exit_sigsegv(CPUState *cpu, target_ulong = addr, void cpu_loop_exit_sigbus(CPUState *cpu, target_ulong addr, MMUAccessType access_type, uintptr_t ra) { - const TCGCPUOps *tcg_ops =3D CPU_GET_CLASS(cpu)->tcg_ops; + const TCGCPUOps *tcg_ops =3D cpu->cc->tcg_ops; =20 if (tcg_ops->record_sigbus) { tcg_ops->record_sigbus(cpu, addr, access_type, ra); --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542970; cv=none; d=zohomail.com; s=zohoarc; b=lyVawEEBSI346NTYifWAOhA3FdkfvS4Y+9i/Ips41sPo+JgOs/OPw1fvnjdmg5uwRAswiI6fLdTTl322zBfRBdMOeg7qnSIQFMK+Uiwu4OAwQMnX16XW5daBeTKfCc7QnCmWx2vdV4fp/H/AlGb1TaiLVzVC400LAYU6EtXEfzc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542970; 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=nnG7evLaW4FN2zMyzjZlPjb99X8Ma3vdFtseYLpz0k8=; b=RFLDSxH7fhmnve3oWIiR+i5XR1xcgTshAz9dj8+2xApLeflkUPJjdSFJt+Wh3mPA7VdKleFpBVkmrf7Jbul+HFuCVkWi3w7yEyJ0n+dmkatg/QlKOYDmPUErR3KHAtQgWNlusPuVNyCsIG33F6xta5M/Z9aBufoVJHETu0+Ls0I= 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 1741542970281788.4674660012935; Sun, 9 Mar 2025 10:56:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKpj-0005IW-E3; Sun, 09 Mar 2025 13:53:03 -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 1trKpg-0005I8-Hy for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:01 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKpe-0004sB-IX for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:00 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-38f403edb4eso1847821f8f.3 for ; Sun, 09 Mar 2025 10:52: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 ffacd0b85a97d-3912bfdfcfbsm12152141f8f.28.2025.03.09.10.52.55 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:52:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542776; x=1742147576; 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=nnG7evLaW4FN2zMyzjZlPjb99X8Ma3vdFtseYLpz0k8=; b=JZWCB/uYXMBmkGNheWQ8MzuRERAx6+7kXONLJ0hdzH7brdp7ku8qYiuYZGkU6jkQTU ZYtN+9hqft7osCbiLeUegtEd2IkD73sGhoR7HQzkr3x81Y/1QhvkOMyvCWT805xtIrJj Ng0sNB9WRT4NfX8Ik/x3lLFJnh/WD0luseyMH7FaK5meZDIHhOQg71Ec5OGUEEkZ1KqM Zq+3B3j2LJhRo16/0w2RlLcxp4ZS/ZVn3LTzS8KiBgF8b3wMpLJSjAwq343ikGCCcDb2 b++ZsvK22nA0EX0XExnDPOIflBJF9K34O+M7zobJ5UeXVTJ9jRgEA0NAU9pWX8Jd5nm3 yJLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542776; x=1742147576; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nnG7evLaW4FN2zMyzjZlPjb99X8Ma3vdFtseYLpz0k8=; b=TyRuXfUGF2Zd+LcWzI+ChnvOMOAC2wxVE9grEd4LIlx/hQw1PCy0Bl8ocj9yG9vixO 5bnofZKlWLafBXciUk+BgyrQ9zcfl7NL7RjocHVR1xNr5JgMj0h+zmSc+8p4+LmVNtiD IOkyQkGFtEDCyxLu30SBiV+/glbtKxTaBblx7kuU9wluIY/dp5SU11LCWAo00lXoL/pQ x7eJqzdvc9eMusmSKTUvT5XNii+nOELyxruQ0wgIcTkcLPowSiqLNOpMgmBhIZR0f3Zv Kl70Fzxefbx7rZdzmZdatv8bwDCbyIN/bqPL3YWF2Md17ZERShDR/h4M24jWSeJcfql1 6K2Q== X-Gm-Message-State: AOJu0YyibPnV1JoSRCTRQ57I1GFJ2wB/YwoeyGm0n8W/X2qQSGlBBcFn hvByTBZOMqFqJYT/2oTHYbkKZUH4E4fYhWkXngQSXKqKE6RpfASAzN44kEvGbtmnqyjbyUWDOwe kQiE= X-Gm-Gg: ASbGnctXJI56c4vpjnicYu7hoXYN63qRk+MZZp2rquPOFEhlInLHgu8A3TXycu6XWSf wLtN6JpZNAtfoA8beGGwrw/8s8shFxjYhj2Sr4trRxdXc4s2sjtR4Jt7p3p9bgL4rXTGMVu3A7/ ZJeI/JgS/h2RO6WkI1wBmjDa9sTPY4HDyShngfFU5QJy7ywJ+SrQYUbcrJphanP/Bpuh/DYXsnT i1HXo/5SkaZOQWxtnMwWhw71YdtvNqfminDT8LhW46x5xeY0SszjfMDp1Hnlla8vj9aT+zzxeli NRc/Bt7Iiwo5DXpmwRYL9uvUIpeCrjk47lxNWTK0pjmBtWfT2kerKCA1knPd0AiQpxXeZk1CENK XVKlvTSe5nCv0T0WhnkgA2dBYpoZexg== X-Google-Smtp-Source: AGHT+IEkNP6zSKWwH80S2o/eg3moHlcE3jDng2uX/wDen/7FQFwpxmoYeIp/8HRsqoomcERaJKSs2Q== X-Received: by 2002:a5d:6d0c:0:b0:391:9b2:f48d with SMTP id ffacd0b85a97d-39132d89abdmr8099116f8f.33.1741542776254; Sun, 09 Mar 2025 10:52:56 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 10/38] disas: Prefer cached CpuClass over CPU_GET_CLASS() macro Date: Sun, 9 Mar 2025 18:51:39 +0100 Message-ID: <20250309175207.43828-11-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::42f; envelope-from=philmd@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: 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: 1741542972000019000 CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250122093028.52416-8-philmd@linaro.org> --- disas/disas-common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/disas/disas-common.c b/disas/disas-common.c index ae3f9e46ea1..21c2f03430b 100644 --- a/disas/disas-common.c +++ b/disas/disas-common.c @@ -62,9 +62,8 @@ void disas_initialize_debug_target(CPUDebug *s, CPUState = *cpu) s->info.print_address_func =3D print_address; s->info.endian =3D BFD_ENDIAN_UNKNOWN; =20 - CPUClass *cc =3D CPU_GET_CLASS(cpu); - if (cc->disas_set_info) { - cc->disas_set_info(cpu, &s->info); + if (cpu->cc->disas_set_info) { + cpu->cc->disas_set_info(cpu, &s->info); g_assert(s->info.endian !=3D BFD_ENDIAN_UNKNOWN); } } --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543292; cv=none; d=zohomail.com; s=zohoarc; b=DB5/TjKTH9IH1FkcuVs013fofb/TpfSdmiUYfdrqR03jfHSJMpVhYfv9/lHZIt3PJ++7bkYftqpXhuYifuWfX+lqyFBVDLcGJxyFbM1DBxOoSqmtHTAbKc4m672g6HMJOHDFx/kLwJxNlmigHezYr4sHQ4OB7oTxB2QmDu7IxUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543292; 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=zPyx2ZZAkNbMr4x6s2PTNuf6aA8UZ98dZ1dk69dQsTE=; b=RSLGM2QlpQeL6PsIoFcPgMX0D9NobV6jIlCsKaHx8p23w8RoR5RePFsTNW+IaO4rgfWC+y0EJtMO6LR76EISgki43uVlEo3sbUY24nYBpLCYHZNLte6yPJnnRFl60xBJ5k/ncfjlik7CrM5jgCGbSrDhEC0MTF2rB60mEoaWAlA= 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 17415432925359.170116265707406; Sun, 9 Mar 2025 11:01:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKpn-0005Ja-7q; Sun, 09 Mar 2025 13:53: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 1trKpk-0005Iy-H1 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:04 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKpi-0004sa-NQ for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:04 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-391342fc0b5so2663754f8f.3 for ; Sun, 09 Mar 2025 10:53:02 -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-43ceba8d727sm51272085e9.25.2025.03.09.10.53.00 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542781; x=1742147581; 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=zPyx2ZZAkNbMr4x6s2PTNuf6aA8UZ98dZ1dk69dQsTE=; b=MaiPxAJUwRpirsMtDE4UxIQBrUefQvKv1cFGooDyVXwQinSdxbsGFOlvq//Iw+Gag9 EgRybst2qtfIcUmk5jsVyDsHZf0V/lQx4a4vrpkkeyifKxU+mXv2vfjpssXsbM2wsd+5 vNZl5H5OnErrv75NOiTZ3YW6I6H0IqO3TH6TGV+vxuaxJvm8WE8CcYL1fGi/sha9pclQ h+d2Jk7LYLIukhoYh+Kl3qqRh6x0hJbqjuZGyROOMb7NghBTE0chWfhqji9Jmme4XK+Y D1IQjoAJPoqZDuhQVgK3oCO5a/4QjBPeWZuwCiRxtNRvPrNCalvd4v/vVAiraC69uf8p gbxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542781; x=1742147581; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zPyx2ZZAkNbMr4x6s2PTNuf6aA8UZ98dZ1dk69dQsTE=; b=UNG3stBebNn+jQGnJX/ZAEnt2Vx7ztfK07ssvmIi4nJgBAAYG/k5+ejoapqTHaTZBJ /KhjlUjIrmwmFbKSeM+C3IC1fCKTw0+u04/rm5dUCcPtPlWgCkVxOMZbpzvffP7ZWtwz 1/qUXR4L77Bi4FV4O9ceEoxqgfxiNzlEe5VQNMOdc9gX/pZd52rVFUrdFJlwzllgZCu8 aNrpGirF46hvP6VaGu5Dh/tfiJ9Ag/hJhF0fI7+CpU7ehrLyQTo9N+yI8EnEPK2mYx2D 8RluGAbOVXxoipWF34ubsnR2PadDzcLq61kJPpIpO52O5JS7YSgkijLRv2shu0pvmREJ tJzQ== X-Gm-Message-State: AOJu0YxKnK6XcSiAq9iubm/DcscKfa6pFcmBh3hgOH2gvtP9k+FFp3Ut Bnpq3pzbU9/dbq2ocaSu27LJIQVRoAXOUtDoeNVM4cinLdZrM202SEdsGjtPIB8mL+L4Q1C7hEU UhlY= X-Gm-Gg: ASbGncuaJTsSOkC70J7G7L4JhHKj7wYYZi1Hj7FyG/bDyHGTdvO1JH0twGIqglx+GR/ I10CM9V22kUEFsgM15Wiy5rMG3TmMrdEpg8FYq01VAMwPGeFMYH2obv/04cOe2QiWQeb2Hm8p5t 9muD9kYbiewWedU2vxb5JsTMqe75i+GPKiLgOQWKQygkPGItKAO8PQ5z9OzJ1zoyvHoHiLmnkrj Smriq3hHKo8HFmm9W8H0AgF+39hfKMJ/ijRoT0DDCfdW5wTUIrIFiVNAD/H5j5MhbFP+wistWbq ct9wqrXfo4sWyyFY3d+BoxvEqtfSQ2YdGzWcK+SrbCSHWRsP0g6ARqBasO88/WOla1xddqostIl b48nwTRaT9NqsJzIekno= X-Google-Smtp-Source: AGHT+IHmO+bWJSrOEAyN9lLmq1Vflz0VK5BCLNB1EApRjdXsGsfwc5eYwvUi2DRAxNJE9BOaYpf65g== X-Received: by 2002:a05:6000:1a88:b0:385:d7f9:f157 with SMTP id ffacd0b85a97d-39132da227bmr6965076f8f.36.1741542780765; Sun, 09 Mar 2025 10:53:00 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 11/38] gdbstub: Prefer cached CpuClass over CPU_GET_CLASS() macro Date: Sun, 9 Mar 2025 18:51:40 +0100 Message-ID: <20250309175207.43828-12-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::42e; envelope-from=philmd@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: 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: 1741543293184019000 CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Acked-by: Alex Benn=C3=A9e Message-Id: <20250122093028.52416-9-philmd@linaro.org> --- gdbstub/gdbstub.c | 26 +++++++++----------------- gdbstub/system.c | 7 ++----- gdbstub/user-target.c | 6 ++---- gdbstub/user.c | 7 ++----- 4 files changed, 15 insertions(+), 31 deletions(-) diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index e366df12d4a..282e13e163f 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -354,7 +354,6 @@ static const char *get_feature_xml(const char *p, const= char **newp, GDBProcess *process) { CPUState *cpu =3D gdb_get_first_cpu_in_process(process); - CPUClass *cc =3D CPU_GET_CLASS(cpu); GDBRegisterState *r; size_t len; =20 @@ -377,11 +376,11 @@ static const char *get_feature_xml(const char *p, con= st char **newp, "" "")); =20 - if (cc->gdb_arch_name) { + if (cpu->cc->gdb_arch_name) { g_ptr_array_add( xml, g_markup_printf_escaped("%s", - cc->gdb_arch_name(cpu))); + cpu->cc->gdb_arch_name(cpu))); } for (guint i =3D 0; i < cpu->gdb_regs->len; i++) { r =3D &g_array_index(cpu->gdb_regs, GDBRegisterState, i); @@ -520,11 +519,10 @@ GArray *gdb_get_register_list(CPUState *cpu) =20 int gdb_read_register(CPUState *cpu, GByteArray *buf, int reg) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); GDBRegisterState *r; =20 - if (reg < cc->gdb_num_core_regs) { - return cc->gdb_read_register(cpu, buf, reg); + if (reg < cpu->cc->gdb_num_core_regs) { + return cpu->cc->gdb_read_register(cpu, buf, reg); } =20 for (guint i =3D 0; i < cpu->gdb_regs->len; i++) { @@ -538,11 +536,10 @@ int gdb_read_register(CPUState *cpu, GByteArray *buf,= int reg) =20 static int gdb_write_register(CPUState *cpu, uint8_t *mem_buf, int reg) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); GDBRegisterState *r; =20 - if (reg < cc->gdb_num_core_regs) { - return cc->gdb_write_register(cpu, mem_buf, reg); + if (reg < cpu->cc->gdb_num_core_regs) { + return cpu->cc->gdb_write_register(cpu, mem_buf, reg); } =20 for (guint i =3D 0; i < cpu->gdb_regs->len; i++) { @@ -570,7 +567,7 @@ static void gdb_register_feature(CPUState *cpu, int bas= e_reg, =20 void gdb_init_cpu(CPUState *cpu) { - CPUClass *cc =3D CPU_GET_CLASS(cpu); + CPUClass *cc =3D cpu->cc; const GDBFeature *feature; =20 cpu->gdb_regs =3D g_array_new(false, false, sizeof(GDBRegisterState)); @@ -1646,11 +1643,8 @@ void gdb_extend_qsupported_features(char *qflags) =20 static void handle_query_supported(GArray *params, void *user_ctx) { - CPUClass *cc; - g_string_printf(gdbserver_state.str_buf, "PacketSize=3D%x", MAX_PACKET= _LENGTH); - cc =3D CPU_GET_CLASS(first_cpu); - if (cc->gdb_core_xml_file) { + if (first_cpu->cc->gdb_core_xml_file) { g_string_append(gdbserver_state.str_buf, ";qXfer:features:read+"); } =20 @@ -1697,7 +1691,6 @@ static void handle_query_supported(GArray *params, vo= id *user_ctx) static void handle_query_xfer_features(GArray *params, void *user_ctx) { GDBProcess *process; - CPUClass *cc; unsigned long len, total_len, addr; const char *xml; const char *p; @@ -1708,8 +1701,7 @@ static void handle_query_xfer_features(GArray *params= , void *user_ctx) } =20 process =3D gdb_get_cpu_process(gdbserver_state.g_cpu); - cc =3D CPU_GET_CLASS(gdbserver_state.g_cpu); - if (!cc->gdb_core_xml_file) { + if (!gdbserver_state.g_cpu->cc->gdb_core_xml_file) { gdb_put_packet(""); return; } diff --git a/gdbstub/system.c b/gdbstub/system.c index 416c1dbe1e9..dd22ff0fb3a 100644 --- a/gdbstub/system.c +++ b/gdbstub/system.c @@ -456,8 +456,6 @@ static int phy_memory_mode; int gdb_target_memory_rw_debug(CPUState *cpu, hwaddr addr, uint8_t *buf, int len, bool is_write) { - CPUClass *cc; - if (phy_memory_mode) { if (is_write) { cpu_physical_memory_write(addr, buf, len); @@ -467,9 +465,8 @@ int gdb_target_memory_rw_debug(CPUState *cpu, hwaddr ad= dr, return 0; } =20 - cc =3D CPU_GET_CLASS(cpu); - if (cc->memory_rw_debug) { - return cc->memory_rw_debug(cpu, addr, buf, len, is_write); + if (cpu->cc->memory_rw_debug) { + return cpu->cc->memory_rw_debug(cpu, addr, buf, len, is_write); } =20 return cpu_memory_rw_debug(cpu, addr, buf, len, is_write); diff --git a/gdbstub/user-target.c b/gdbstub/user-target.c index 4bfcf78aaab..43231e695e8 100644 --- a/gdbstub/user-target.c +++ b/gdbstub/user-target.c @@ -233,10 +233,8 @@ void gdb_handle_query_offsets(GArray *params, void *us= er_ctx) static inline int target_memory_rw_debug(CPUState *cpu, target_ulong addr, uint8_t *buf, int len, bool is_wr= ite) { - CPUClass *cc; - cc =3D CPU_GET_CLASS(cpu); - if (cc->memory_rw_debug) { - return cc->memory_rw_debug(cpu, addr, buf, len, is_write); + if (cpu->cc->memory_rw_debug) { + return cpu->cc->memory_rw_debug(cpu, addr, buf, len, is_write); } return cpu_memory_rw_debug(cpu, addr, buf, len, is_write); } diff --git a/gdbstub/user.c b/gdbstub/user.c index 3730f32c415..67403e5a252 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -743,11 +743,8 @@ int gdb_continue_partial(char *newstates) int gdb_target_memory_rw_debug(CPUState *cpu, hwaddr addr, uint8_t *buf, int len, bool is_write) { - CPUClass *cc; - - cc =3D CPU_GET_CLASS(cpu); - if (cc->memory_rw_debug) { - return cc->memory_rw_debug(cpu, addr, buf, len, is_write); + if (cpu->cc->memory_rw_debug) { + return cpu->cc->memory_rw_debug(cpu, addr, buf, len, is_write); } return cpu_memory_rw_debug(cpu, addr, buf, len, is_write); } --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542888; cv=none; d=zohomail.com; s=zohoarc; b=PXGFHSwmKTknGyvmKf15/lo7GeWlzDGsazftTXYSyC5UM4Q9xTTewprlR2ui4wwsPu3QAak/Si1SNnMh9WIwepl1sM3Syf+ktuEMIP61Ypt3ooD7VzftKm0VtSFfwL9DrIQNZtFA1E0CLj+iQcvGL/3LrKNLOFuKOBSpYHTITXU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542888; 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=V4r396+mBV1+T5nOZp09H6dMWvs7dXGZXKliBRuJsUo=; b=fQ/5fzropMVhahG2XewEmCW2MHAtdawSRC9DZy3q/RIlQd+L+9oKQDujI+rtWTFMd9QpgmUaDs/yXdfWSahbXOZJOYX5ITvvXMT9CQlTT95jX4OH0sZuonuKdAxKu8p+kO2LD6XKF8kQJKzLdtO5SN3ijSObY3iybtWG16EyK4o= 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 1741542888954236.68544484173844; Sun, 9 Mar 2025 10:54:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKpr-0005NO-Lc; Sun, 09 Mar 2025 13:53:11 -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 1trKpo-0005K4-SN for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:08 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKpn-0004sz-Cw for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:08 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-38f2f391864so1837001f8f.3 for ; Sun, 09 Mar 2025 10:53:06 -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-3912bfba679sm12286927f8f.8.2025.03.09.10.53.04 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542785; x=1742147585; 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=V4r396+mBV1+T5nOZp09H6dMWvs7dXGZXKliBRuJsUo=; b=ZPIFnL/LnS2xwmz4R5pNKW8brruisqsdv+x1wZhd42zymwqN910HH+EC54JPpIDaZp wZ1f3zELvZsPc8zwpRzdto2eqPvLSrB90Bh2GzivxKno4mwegCeKxAh+o9/+k0Lo5Ssm iUds+tMxXzR7vxvJ6EETXPzVFFr3L/7LjI64Cn6QVYY1JVVIl+7Fsy0SBap5an4jC2S2 pYjvW7rd5TQJpFuNHEB4NDrzkaz7ED3jWmQL6FupPOxICzguVCvYjVG6jIso/hx5Kidr n1VlJ7UoLh+QMMQniFW0fsY8Ysv7naC9lKcR3WffRSvIQ/U08xZQVXiLSolzh9kl7q52 qOEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542785; x=1742147585; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V4r396+mBV1+T5nOZp09H6dMWvs7dXGZXKliBRuJsUo=; b=ivwo6kHjdxAumct22CGUQlR7HSe9pfyZ2DB7GuGWEjO3iR265aLAcn4ybMslhTI0nG mFCzku/HOHtN7O4DgzsSTS8Djl/I0l+dfHUBROuUYBTSufyN1MqU5taKCp1i/j8HgWum J2wlf/3F1ha0p8uTgHj5zVSTLaBcO41gs7soTACdXDEBi9F9uPUsIOEmGJ4wl1sTGazc okKboyFAY7I5SsKQsjU0TLRpKwq3sG9CrUXZdaQYVg7HGpZJRany7fmaMDIxeC9h+IC+ BpXcZgpKQrP4kUkNZjInxMJtHLAlLCjVD9h4DQo2OmKme4F3vyKXu4S4DrsFrtvSflHd U4TA== X-Gm-Message-State: AOJu0YyuUO+e7g6o08zigM0o7Ifz/roOhPnpD4K7B8uvC6uLSJ7kd/71 Q5AT8OKK8/WY1mqEhVvKmpJD6pWh2QzqwIO1Sg3Wr+/FF6Tu7T/K/+Y38Aq+lSH/09CysUeD5HB bya0= X-Gm-Gg: ASbGnctovxVXCybDZfQJa5bIbEKdfWR04SMqq/n1txJ/Q1wjCAdL+xl+f8ju+ewvadU Mbwtad4gBG1HbaXO2Q1RprBGGFF6rB+hTvR0YRIohiKLSixpSoFrfFYhCFSRAL/yEdYULlhKoA/ IZeA5l2n23dzhEv7ENO/SrYYyJhYDL5DUK8HqmkQteehD1LqjzTcbrCuXGWA9hEHbyorNT19ENT ye/7Z9LvbRxJO1zeUMi4+cLzcNPol9jsw/2R58Ao7iRUyzyDCo42KEujFDe4R1EKebxwolGEB6m Ft2D8lfl5oTNqDbzGZgSYd9Pa07XrA2VW+g9Cf/Cb1KlQxIizNbQBsGQCLZ+HmJ/mOVIhgOFCDo LNgCuIug8RMRRGzhryEk= X-Google-Smtp-Source: AGHT+IEWFvjnOk/X3LjFrQMpgZe8Y1B5a5FpXBwK8FmgmwvCNBLbhk/1hO4rxG7ptKqUVwFSEdEbJg== X-Received: by 2002:a5d:5f45:0:b0:390:f832:383f with SMTP id ffacd0b85a97d-39132d05b37mr6792404f8f.2.1741542785344; Sun, 09 Mar 2025 10:53:05 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 12/38] hw/acpi: Prefer cached CpuClass over CPU_GET_CLASS() macro Date: Sun, 9 Mar 2025 18:51:41 +0100 Message-ID: <20250309175207.43828-13-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::432; envelope-from=philmd@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: 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: 1741542889791019000 CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250122093028.52416-10-philmd@linaro.org> --- hw/acpi/cpu.c | 4 ++-- hw/acpi/cpu_hotplug.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index f70a2c045e1..6f1ae79edbf 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -235,8 +235,8 @@ void cpu_hotplug_hw_init(MemoryRegion *as, Object *owne= r, =20 static AcpiCpuStatus *get_cpu_status(CPUHotplugState *cpu_st, DeviceState = *dev) { - CPUClass *k =3D CPU_GET_CLASS(dev); - uint64_t cpu_arch_id =3D k->get_arch_id(CPU(dev)); + CPUState *cpu =3D CPU(dev); + uint64_t cpu_arch_id =3D cpu->cc->get_arch_id(cpu); int i; =20 for (i =3D 0; i < cpu_st->dev_count; i++) { diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c index 83b8bc5deb8..aa0e1e3efa5 100644 --- a/hw/acpi/cpu_hotplug.c +++ b/hw/acpi/cpu_hotplug.c @@ -62,10 +62,9 @@ static const MemoryRegionOps AcpiCpuHotplug_ops =3D { static void acpi_set_cpu_present_bit(AcpiCpuHotplug *g, CPUState *cpu, bool *swtchd_to_modern) { - CPUClass *k =3D CPU_GET_CLASS(cpu); int64_t cpu_id; =20 - cpu_id =3D k->get_arch_id(cpu); + cpu_id =3D cpu->cc->get_arch_id(cpu); if ((cpu_id / 8) >=3D ACPI_GPE_PROC_LEN) { object_property_set_bool(g->device, "cpu-hotplug-legacy", false, &error_abort); --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542992; cv=none; d=zohomail.com; s=zohoarc; b=aw4HC+KO/YZLeqc8kRIzOxMYV9qGYwmDqj6wp6VUdTXZ64GfcT6CSqQNj/wUpy4f1kG1OBY/Y+KY24uZmvmUIhAPbvEN7WoQ7iCuAvcs60e+2+jPTyt3eAeRbjIQjaQuv84fIw/5IMD7BwXhgXj3lhy5dp747AgAenPJPwAHONo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542992; 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=vGcEABqB5MF8s9y7Im+YzfdcGovmNjIepWuE2Ltrdio=; b=B6PD6+9TdZvH8dyVSdMgmrMYCg4n1fZ0PlDG0ReK0sjGuvvQrP6b7zqsVFtf0rm+II07N/XPw5/80yxLcD30c3pMlSBTek5j22hd48SzIcfwF8FrzW0ALvxRdHX7zOQ3y+EKYq2FyCVCs5PJHFsWoh4xoWxbBcqSGOMDCbXDsbE= 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 174154299268141.41838625908895; Sun, 9 Mar 2025 10:56:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKq1-0005jj-D4; Sun, 09 Mar 2025 13:53:21 -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 1trKpu-0005Uq-73 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:14 -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 1trKps-0004tl-Kz for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:13 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43ce71582e9so6368945e9.1 for ; Sun, 09 Mar 2025 10:53:11 -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-43ce5d2808dsm62590335e9.13.2025.03.09.10.53.09 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542790; x=1742147590; 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=vGcEABqB5MF8s9y7Im+YzfdcGovmNjIepWuE2Ltrdio=; b=w1NNDaTRlDz7fS6T345ZxXx1VKYGaVAnRpYC11JVDcmv2zIdriBWlP9vHf7YhokG6+ GI5aJ9vaAf8eu295UpovhpZWXyQEoQvp49YdGh3q5BZLpRvc0qw3Uzqlk9CAyqCm8lZZ Ky6luLMygyv9vz34xsL/2oP4AP9wUyQKV4Mz9Bnw0x4+PAWk8e8oAYXVQ+m+Mzlx4XOv tANs7WxXNUCuNvUUfa/ZUm5WEm8viqofo3eQ6WnyUtTpWfP1cJ3tveNsAF3LvXnaIlFE fDZE9itBU5o+zOZRqiSPbEvU4kIs3AvEPdU2tWNyCuko4bsEhXOCgdXvjFKmoEfMRBxs oBxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542790; x=1742147590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vGcEABqB5MF8s9y7Im+YzfdcGovmNjIepWuE2Ltrdio=; b=QIJ1p4zBigqHUwN9TMUi8dfnWHGzpiQriELTBo1ec5O5na5SzJsiucu2PHQYA8CLPJ exSMQs+6/8r5YjNooZwTMNzKFfg67bOyPdUE/fEG5RlyL4Nc8XCVadRRBgk7ZzkcMEC+ CC2f5Mi4nuhd6MVTh2M6yxr21+BHKQCpuh9HOK6YDWAQcqvLVmVK2WwRzU6SfIxFcASO leISBPsAyb5nB5GwEBsGy6fuCt7m0g8Mo4HrOQHG0xnRdu/kgXiC6U1IhzDPdJ4AS3pn ztlOVcrjhJUkRSLowqIHNkUeVFdeb86Q+UDuQSZe3NKAgLGt830ewRv3a56rD1XMhBEj OWDg== X-Gm-Message-State: AOJu0Yw4WvpCklItFqHGdBcFuDi65oNJoTewgaBa4O1d4Re3XCThSKHu /+jQISz7npC2rbnickt92t2bpnR971AzDX1BiRNVXW3bJsQW6/Eq3wvYhTpFgUd87nODFKKPIp/ 99zA= X-Gm-Gg: ASbGncuXd1EjzPvTvtn7DGb0m6n33e/atAM2NBPryOragD/XSNIT2WlNOMD/4xMAHdN 0EVaDZgyzBDReIwvNJXVUMnOyVX1bo6NP9l8/qRttERVHw/rpNl5ReqsFfSIhzZjhwm7+MCPy2S hck4ep+Q8wQh5uyamNbYs9HMU7+uOIYYsd3JKSJAA3XBuFEeKlAs3VUZi+D+vWO1qGZLn7W/Q0B gk8wnup5x+nhH/t+OlNRSjP2h5R0+I9Uyrwps0jMDlcrdXhDMVw9Zqizdena3tNYv3H7PbAIzZH udtL311GqERwnLvRupLlIBRE+Yox6z6Vv3pYuFeEquum4z7wzdmhNgl8A5jaEkLvOoi/QytV0kM kubcmKCtWmQ5zOjkj2eRWEKfh1w3AMQ== X-Google-Smtp-Source: AGHT+IEjRI2FI8/eX28Q3ARWS4drD3f9uGeRrfyhYOGhPLpiYdmQEIBAS3zO7wOdFx2bZh1GKSLIyw== X-Received: by 2002:a05:600c:4e45:b0:43c:fa3f:8e5d with SMTP id 5b1f17b1804b1-43cfa3f9022mr2504015e9.2.1741542789932; Sun, 09 Mar 2025 10:53:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 13/38] target/arm: Prefer cached CpuClass over CPU_GET_CLASS() macro Date: Sun, 9 Mar 2025 18:51:42 +0100 Message-ID: <20250309175207.43828-14-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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=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: 1741542993993019100 CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250122093028.52416-11-philmd@linaro.org> --- target/arm/cpu.c | 3 +-- target/arm/tcg/cpu-v7m.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index cacbbc615a2..d7e61d08bbb 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -830,7 +830,6 @@ static inline bool arm_excp_unmasked(CPUState *cs, unsi= gned int excp_idx, =20 static bool arm_cpu_exec_interrupt(CPUState *cs, int interrupt_request) { - CPUClass *cc =3D CPU_GET_CLASS(cs); CPUARMState *env =3D cpu_env(cs); uint32_t cur_el =3D arm_current_el(env); bool secure =3D arm_is_secure(env); @@ -930,7 +929,7 @@ static bool arm_cpu_exec_interrupt(CPUState *cs, int in= terrupt_request) found: cs->exception_index =3D excp_idx; env->exception.target_el =3D target_el; - cc->tcg_ops->do_interrupt(cs); + cs->cc->tcg_ops->do_interrupt(cs); return true; } =20 diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c index 29a41fde694..c4dd3092726 100644 --- a/target/arm/tcg/cpu-v7m.c +++ b/target/arm/tcg/cpu-v7m.c @@ -19,7 +19,6 @@ =20 static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request) { - CPUClass *cc =3D CPU_GET_CLASS(cs); ARMCPU *cpu =3D ARM_CPU(cs); CPUARMState *env =3D &cpu->env; bool ret =3D false; @@ -35,7 +34,7 @@ static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int = interrupt_request) if (interrupt_request & CPU_INTERRUPT_HARD && (armv7m_nvic_can_take_pending_exception(env->nvic))) { cs->exception_index =3D EXCP_IRQ; - cc->tcg_ops->do_interrupt(cs); + cs->cc->tcg_ops->do_interrupt(cs); ret =3D true; } return ret; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542895; cv=none; d=zohomail.com; s=zohoarc; b=n7DIqRIitQ1hYbY3CDb0eOAVc+jnQxJHO5fgjXlgMe3OPBNCaY4duCW7dcYlmFXEdbLR2XHPQTTIPpNZXrXHmmOi8ZsBtwvjhQ0gGWvSaurM0sYzl1Oh9UBFZRH6PH+fi9YRxwbO8wePs5Fs847hYQtcO2L/s4VWtIrXsLy/yc0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542895; 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=DCutmRo13MukVGEmkojmLCPMgyHiIA14FLLQ41OISws=; b=GYPng9ZI5hafbp1f4Tg+poFPKW0ijZBTmvjACQPLe7cju91Wlok4M1W8gmoZob8kM5Np1OXaKSeHZmFpbDw2iW00rjVGzMPLyVybq8Sj51UOlWE0H7nH/IYH3cXCkMU83t7UaKcxUc2oJSSxI7O+bq2vWSWhyMhhFn4YgNxwm8A= 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 1741542895177827.3907369312406; Sun, 9 Mar 2025 10:54:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKq4-00063Z-4T; Sun, 09 Mar 2025 13:53:24 -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 1trKpy-0005gU-6U for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:18 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKpw-0004u8-AP for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:17 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-3912d2c89ecso2906597f8f.2 for ; Sun, 09 Mar 2025 10:53:15 -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-3912c0e2f10sm12511218f8f.65.2025.03.09.10.53.13 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542794; x=1742147594; 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=DCutmRo13MukVGEmkojmLCPMgyHiIA14FLLQ41OISws=; b=Ms92iJ66Al/1ZRkWxxn4O56946IRk65T4m+hDaVStrhe7nUY9kZriwl7PaZYV9z5/u 0w9+hA5rIhRxSbEKJb3aU0vhNdj+MmFrnz1Ytqb+FMTW4B5FMMTiIYFGM0pw5Egjpd0v z4BPB18cPzHw7BwnZylxrxv/YotbGv/2gQ4ykiS/Qlg/gTsaackrS6zVm/w1O3HkRpPq 7RRwKkI38duLhhDndVx+ApBNiNy0dTmccnlUPlemup3n5Q6IrfKm6iPZHPPfoA5EQJAJ S8YptQp9+kEQp1OsZq0CwE0X+gkI1IHJn+Tnv9ge7Razh9gLioioC4OXkZSNtmEbW72R Cf5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542794; x=1742147594; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DCutmRo13MukVGEmkojmLCPMgyHiIA14FLLQ41OISws=; b=S+w+waaXDOduIZ/y5kHO5aV2tQRyFynqXc2rO49d028IZI7zX11N1SIMaxDD/bmlzf lmsuddqao2zgea8jMHZnh/jf23OFnmt9WM1nJ+o6NAaOIjYDh0lQ5of0vfqcl/sxvFdA uDMfpi7ZNNCml1EPMS+sDr6GMQHniajMVLuY3z3L8ZicvpFexEhVSdA8T6IjPt0QePID +N6MvlJEqxnd7/L82IJQKUCoAc4a0nSruq3plryjArIF4Cw/KM0CpeE54Ok5BhxT6FOr wVWrl6It3CST6cytS3Jhnlu0FCw5P8Hb0XOhVpOxIUlvpYM6kh4Egco8HOZrMUWl65H3 7MwA== X-Gm-Message-State: AOJu0Yxmv63JiWYmhX25K++4jkNKel667lznvL3EumpGkuaHpVVXMGnY B5fo0n+qu7ZMMENashzVYMqgAheEIl+sx+ErzTkm67nPltsybCrP+1udlSkm35Ydf+hlHqXYK/+ 0GXA= X-Gm-Gg: ASbGncs8gWesUpfzeB9y4zu6XrV4/5Arjc87hO636cOX5teo9JX4eUeg13RxHaZ/LTG E5z0dzGNBwwaMDVH3MjxG04VPoo0bpf9z3mXkmw9bLYTBOboOk8e8IGPHN+VcqUWFHre54bRT/2 SuWeiPdQjk9eCWmnUrFXoUOvB/nNi7kfJk+6uU5zyxXqcdsNFFBi77QCn9FNs1S/Evu735Kb+4G cAMvU14uxrwBca+S30GSIQSgKZjw8ew7oHJwnFNDq/kae8uj9ZZ7PnfylJPs7dPsjFB5ad2cAOv pbIWc6PLyIgiyGn5LVnmXY1Edd45358WjtRMGzxrYvtnLhv6rx+4fgIhxry03+mZRUGt0lh/1Fu 0MeS+qpjcpXr5WI19XpQ= X-Google-Smtp-Source: AGHT+IF41uE3v/xRZa8jkExlY8WbcswHVyTRORFvqFbKLGbqfnGw19QWOTyYIKTBb2ZaZ5QYsHlCIw== X-Received: by 2002:a05:6000:1862:b0:390:fe4b:70b9 with SMTP id ffacd0b85a97d-39132d6c5demr8882301f8f.21.1741542794548; Sun, 09 Mar 2025 10:53:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 14/38] cpus: Restrict cpu_has_work() to system emulation Date: Sun, 9 Mar 2025 18:51:43 +0100 Message-ID: <20250309175207.43828-15-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::42e; envelope-from=philmd@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: 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: 1741542895835019000 This method is not used on user emulation, because there is always work to do there. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-2-philmd@linaro.org> --- include/hw/core/cpu.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index c6df426c947..2d4ebb79905 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -750,6 +750,20 @@ int cpu_asidx_from_attrs(CPUState *cpu, MemTxAttrs att= rs); */ bool cpu_virtio_is_big_endian(CPUState *cpu); =20 +/** + * cpu_has_work: + * @cpu: The vCPU to check. + * + * Checks whether the CPU has work to do. + * + * Returns: %true if the CPU has work, %false otherwise. + */ +static inline bool cpu_has_work(CPUState *cpu) +{ + g_assert(cpu->cc->has_work); + return cpu->cc->has_work(cpu); +} + #endif /* CONFIG_USER_ONLY */ =20 /** @@ -816,20 +830,6 @@ CPUState *cpu_create(const char *typename); */ const char *parse_cpu_option(const char *cpu_option); =20 -/** - * cpu_has_work: - * @cpu: The vCPU to check. - * - * Checks whether the CPU has work to do. - * - * Returns: %true if the CPU has work, %false otherwise. - */ -static inline bool cpu_has_work(CPUState *cpu) -{ - g_assert(cpu->cc->has_work); - return cpu->cc->has_work(cpu); -} - /** * qemu_cpu_is_self: * @cpu: The vCPU to check against. --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543243; cv=none; d=zohomail.com; s=zohoarc; b=hc0LfERCaO4l6W7xaA3DbrSx5AwJ0GcwOGKHgVj21/fohq5TTAdxHq4O4E+18BU0Qq8UXqLZWw2+W5cqTOid1syOYZQiVv/r7rsZ7bzAvn14m8Ir2iifU4NPbDf/fOzLvlFceBzi6n2SNNzM7+nwSDFTQfped2etdbpuxIMOWQ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543243; 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=kJwfrdswVmk/LMsQRUhZo65LUrcnqQS9NNFjSZtvKz8=; b=iV+GFauPMr4XGa56oo2UQHBiKVulZSMKT4t1PfaDj+vIWSmMDq+QhaNEFG/YtxHmFr8kRj4D48oE5e9TL+NrzpRNzgJDciIRNXSzYEi5ufH55idBO0DKDlXDHublHQAyctdmM5U0y8jUa48teO5OLZg+nYqltLUEpSva2Z4rU9s= 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 1741543243539259.27178242375135; Sun, 9 Mar 2025 11:00:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKq6-0006JF-50; Sun, 09 Mar 2025 13:53:26 -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 1trKq2-0005zV-H3 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:22 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKq0-0004uf-St for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:22 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-39104c1cbbdso1652098f8f.3 for ; Sun, 09 Mar 2025 10:53:20 -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-3912c0e308dsm12701851f8f.67.2025.03.09.10.53.18 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542799; x=1742147599; 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=kJwfrdswVmk/LMsQRUhZo65LUrcnqQS9NNFjSZtvKz8=; b=qUiLJmvnxovEZ2DgAwZhUOucwKsgK25n3AQWIahtXVW3EUM7+Tk1EtzCeMVLdrDJw0 9Ynab2cyb2yPR5uLI/o0kLwL4oKWPV+0xP+uaGnk0okgo/8XdAgk5hFHQx33HGfFNpEZ EYWRizH+n3L42xQS+91WHupP2LLPAFEnW4JuvoJtNZvbTaf5M6V2ukKEdgIru64J0UzU ZxP5oiMcTXumiBlOC7h/isA1Gydts+upATOc8Ama9Oi5PAoBaMeOaDz0+6E1kQB1/CXn v9wiEu3AxS2/aw5rbmNzswIjMypnToP4g7Zzqxu8y2d4Jh+dlds1GIi77Xv3LwH1pZID bzag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542799; x=1742147599; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kJwfrdswVmk/LMsQRUhZo65LUrcnqQS9NNFjSZtvKz8=; b=LtRO+Mpc3VLclvhETIdS6eGCed80rrJUJvNodTc8kuMEQ76yo1LwrRWB6AcW3zXbuF /o+dhJdWQzSQwPthz0LSK+Pc5R2juuYtFwRVZASSTNxMzemIO+t8Np8Xoa523fskkrny 7tIMcn/ZJCAtnQfWTtGWKYKs40XfvPtC0TvubvWUon2faK4+E0ZSF3m/gzADjEFJ2AYc H0IW4D+nB2pauX7nB7n3m753Eb2UpIU8MckaKSL5PtL0Vp2BLtkWGAJt+CzwQmPylnBU 6nSL9tId5so8QRZkEv/im29umpumQJodSQ8VVOJ1hi6RBWCG+ePHJnDOtx53n5bHYUJL 9//A== X-Gm-Message-State: AOJu0YxJ9EFbbXvM/t6BlDlkM1Uio69x6zUR3A6OaVt6K1NBTUuLgtEQ 3pGQVwfrMJYYjNOqvkYomr4/9FqdvF/gWILMEfGkRjw5fIJDAVcN6QZWJ9RksuG6SZB2ghrkfr4 agj4= X-Gm-Gg: ASbGnctmKTA23lX2id8VdaNwjDCmXRslVfsPmE4Ar6RpjoxsmnzQu9NxXNJou9eC2iR VDTAj1HfsyM16vkfSLPwVOvz8eIX+jZlWvhuouwCiAIRujViVZ/8578/AvAqCQ55eUGUbuQJfwA HlTz+LAvekUiG2rvAcerMNEeRcwx/jDM3EPCk3Hk3tPUOhGZfSSuKbJ9BMLfK9eV4aspjOGriW3 g44fXWpix6/th3x+LPR5nV1wTiv2W6/f00tTfjPQIQ+RHmu6bIBV1yVHRFhH4YpUU+AxOo8uo/R cOJYlIhUscBdCCxZ1hUYMQJA/Xcr/6ZQc64C1UA+KiJVFbcx0ks9dxwUuFgw3AMOyKTtyQpm9sx mrLvDRYWhWJUsNg+jHXlrJZSrhSbRGw== X-Google-Smtp-Source: AGHT+IFj7MlJ3IXyXNZyZR/J0GOE21ra2mEaKB+08tr5d3uq/PFrRliq9IE3yeOCgZfddOvBxLyUIA== X-Received: by 2002:a05:6000:18a3:b0:391:2d8f:dd56 with SMTP id ffacd0b85a97d-39132d98ea9mr6501853f8f.29.1741542799089; Sun, 09 Mar 2025 10:53:19 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 15/38] cpus: Un-inline cpu_has_work() Date: Sun, 9 Mar 2025 18:51:44 +0100 Message-ID: <20250309175207.43828-16-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::42d; envelope-from=philmd@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: 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: 1741543245130019000 In order to expand cpu_has_work(), un-inline it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-3-philmd@linaro.org> --- include/hw/core/cpu.h | 6 +----- hw/core/cpu-system.c | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 2d4ebb79905..a54dd2cf699 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -758,11 +758,7 @@ bool cpu_virtio_is_big_endian(CPUState *cpu); * * Returns: %true if the CPU has work, %false otherwise. */ -static inline bool cpu_has_work(CPUState *cpu) -{ - g_assert(cpu->cc->has_work); - return cpu->cc->has_work(cpu); -} +bool cpu_has_work(CPUState *cpu); =20 #endif /* CONFIG_USER_ONLY */ =20 diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index e29664d39bb..c10e3c9ba64 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -31,6 +31,12 @@ #include "migration/vmstate.h" #include "system/tcg.h" =20 +bool cpu_has_work(CPUState *cpu) +{ + g_assert(cpu->cc->has_work); + return cpu->cc->has_work(cpu); +} + bool cpu_paging_enabled(const CPUState *cpu) { if (cpu->cc->sysemu_ops->get_paging_enabled) { --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542946; cv=none; d=zohomail.com; s=zohoarc; b=RdMaioX0eDHMTULZeUlLEE3uAsQe+2Amjlyd+2EakxP0/wb2WB/P+5pfdSsLqxVJlw+vgPj1XSobj/xl/jaEsso+JL5FoUEd9dEuLZO1ofJoNyGch1uzobKHkk3knxSJsGMaDwi/jkHm3bqICto7YTDA9d44A8mxPlCYoxS621I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542946; 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=VYqLhM0eCuZK6VK66V4exZsfZkF9DDNQ854u48Rikns=; b=ncfHSoz4dYo6mGgF2BsyP/fWZXZnZlz1yrI4vPoI9Dvw3A9OnSv8n0OavXwi/uzx37HXDy4ECeNK9ayNavezlnOTQ4ToONns91UjgIKXPsYingWtNvpf+qLQV7osKwDwOYewpaoOKOiQZJ1dMwsChfkhCGPDo6gpl+LXvdzuutE= 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 1741542946793945.4037051978036; Sun, 9 Mar 2025 10:55:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKqE-0006hM-DT; Sun, 09 Mar 2025 13:53:34 -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 1trKq7-0006UR-B6 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:27 -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 1trKq5-0004v7-Ks for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:27 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-43cf257158fso2695485e9.2 for ; Sun, 09 Mar 2025 10:53:25 -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-43bdd8b0425sm121283065e9.3.2025.03.09.10.53.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542804; x=1742147604; 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=VYqLhM0eCuZK6VK66V4exZsfZkF9DDNQ854u48Rikns=; b=htnfk65vP2H3E82gPYtJl12zyGPTAvgB9Iec41h+wR0E3DP+PvmoAM7URWlX7UgZ7g UOV+VocbpxuFS7Dt0irUg3UX4I1JeB0YSXns/C6HaUwj5p14BNOGYqbUT87+Z7rr6/BJ IUtzHS7nsaDPE9DM7ViAUXdQ5HOlpP3FV3+tREkjmODH8N4G9F6WymTKpRpF7G7pCKWQ SIKSI8guMmsUW99G5XY9pZCOJyejfHsm9n5BlUxJK4OzHAzFfuVscI8R0W0I5bj7v2mb QyJ7VA+w7ctgOOzomdczrb9QWgJgXv7/AP6lFqHcoIwCbBGbVoHBGgHcJ6EJixFdvBm0 ztUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542804; x=1742147604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VYqLhM0eCuZK6VK66V4exZsfZkF9DDNQ854u48Rikns=; b=XpKUNHS6AKPsK+1NKDCTL8ZY5W5XkcD53DQSov6iZaXaX6JgcMDSm+jo3f9aotW7WJ 7pj2IrfULBnviH2U3XeBY9ChTrygFkJnkgY9AY9N4VXyoNFcAAPtpjqAZtM9YUdHNauy pYM60ElLKa4Pct3sVbRDfnwGvdL4nNAMMEZQgR9YS1T7/JgSo6x4522uZNMjqqojNmLH 1IpJ60UikoALKvusm2KJgCJAuj6vwL2eQ7AI2Eb4X+X8C0PbwT6290w7AFlkqx03+Et3 sbItfS9Hut4TrHdEkQSwAYuy3grckj9OK4gYryCr9x6phZwxHgzNoe6rahKG0Xo/nGji yDzQ== X-Gm-Message-State: AOJu0YwuIhJU17qgM6/Zce923/vNZgVfnekn8EU/y7Bbx576ft2OkirH kx9Yz+MSQW/Y0teY9HwjnlbRnZVIusUjeB5+jo2dpwV3sy4rE365GjcWvamXnAfyfzg+6gORHim CEoE= X-Gm-Gg: ASbGncvIEk04COodk/NQ2TN/NYwPhHWnrWYcm1z1JOdou0u1fzxdOzygPf/RjvcnFPj 8iZqKvEnzosgMEyg8/I8dS6RGUSzS9IQNYYRoTbu7TDwLCW+1xdFC66lRhWqk6tzx9dhfJbB4f0 9BJ2Vo21HGRXJr7xfT7jAknKOeRZ1QAVXsp/6dMfIPVB8oCQ4/Ewvj6V1MHuK4UINvfHbqhoj1a avCX6VM2LpJ9gCRk2p2pE1jLaVy+4zjdJpHdG1qcFaCMGqF1pkiTV7zGSqtB9RJL51S6MYS8bGg nD7vUvLqS/4fmvIxevYmcCYIBLoaHOGaJJzWjEi7hRssLb7Pfv9ptdwOQ8/BHYsWseZQtV2ZVMx 59FHT9lOKVdGr5umFFRiALDHqBiyJ/A== X-Google-Smtp-Source: AGHT+IERzlV2NbuLCX9CaV34k1NURL9HMRXD83XkqgGLh/cMqB1mp3cPtg0LvxSLtDLmFzT6vxdNXA== X-Received: by 2002:a05:600c:1987:b0:439:a6db:1824 with SMTP id 5b1f17b1804b1-43c601e13d4mr75978475e9.16.1741542803658; Sun, 09 Mar 2025 10:53:23 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 16/38] cpus: Introduce SysemuCPUOps::has_work() handler Date: Sun, 9 Mar 2025 18:51:45 +0100 Message-ID: <20250309175207.43828-17-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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=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: 1741542948242019000 SysemuCPUOps::has_work() is similar to CPUClass::has_work(), but only exposed on system emulation. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-4-philmd@linaro.org> --- include/accel/tcg/cpu-ops.h | 2 +- include/hw/core/sysemu-cpu-ops.h | 4 ++++ hw/core/cpu-system.c | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h index 2e3f1690f12..f60e5303f21 100644 --- a/include/accel/tcg/cpu-ops.h +++ b/include/accel/tcg/cpu-ops.h @@ -141,7 +141,7 @@ struct TCGCPUOps { * * This method must be provided. If the target does not need to * do anything special for halt, the same function used for its - * CPUClass::has_work method can be used here, as they have the + * SysemuCPUOps::has_work method can be used here, as they have the * same function signature. */ bool (*cpu_exec_halt)(CPUState *cpu); diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-= ops.h index 0df5b058f50..dee8a62ca98 100644 --- a/include/hw/core/sysemu-cpu-ops.h +++ b/include/hw/core/sysemu-cpu-ops.h @@ -16,6 +16,10 @@ * struct SysemuCPUOps: System operations specific to a CPU class */ typedef struct SysemuCPUOps { + /** + * @has_work: Callback for checking if there is work to do. + */ + bool (*has_work)(CPUState *cpu); /** * @get_memory_mapping: Callback for obtaining the memory mappings. */ diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index c10e3c9ba64..601335fd764 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -33,6 +33,10 @@ =20 bool cpu_has_work(CPUState *cpu) { + if (cpu->cc->sysemu_ops->has_work) { + return cpu->cc->sysemu_ops->has_work(cpu); + } + g_assert(cpu->cc->has_work); return cpu->cc->has_work(cpu); } --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543122; cv=none; d=zohomail.com; s=zohoarc; b=P8cwXpfjU+7BOD4193jxSRpqAophv+tvWqkgVDGQpIQaye+k8LILbhE1dfNp19IDCnkQ+iciTSU8ybKqd37n35rPrDs3nnNbxzG1c6DFrIZVhK4dGC4U8zs0e5e+1x+o+wIWS9EEcaoV/8aLFZC3lFRS8gqUGZFtsxMYXEA3OvE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543122; 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=v+mT1UbCSCra120s07KB+HyE3Ag704KDjhrj8pB4giU=; b=ALHzebfwQDxBE6nLGgJBgZwRaQBqWi1xoHRNZH5wxpC0KOi/8v4f3+E95f90CzvfwiCfpXuOEy2lus4HVB46FOOPbprPusN3mzV0whf0At4xBTkV2gnndAkcpZfZOv7edHNAZjDJgaoYnuZM+N7JEHzKUatdWroNtOVaOqdDJEg= 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 1741543122486164.59876114871247; Sun, 9 Mar 2025 10:58:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKqT-00075A-Jj; Sun, 09 Mar 2025 13:53:50 -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 1trKqC-0006mb-8S for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:34 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKqA-0004vM-G9 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:31 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-43bc48ff815so19919535e9.0 for ; Sun, 09 Mar 2025 10:53:29 -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-43cea8076fcsm54050805e9.15.2025.03.09.10.53.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542808; x=1742147608; 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=v+mT1UbCSCra120s07KB+HyE3Ag704KDjhrj8pB4giU=; b=CQJ0ptqCVD6rF3ggn5fzCBsvckxJOC6aifDNv12+sCDAU7pJWUePFFx9RxNHK2a2Pf 0TZozZgatHADA7/NQeDhq2jGyc61M0wkB0chu0cUkyopGjeKbZjLidfvhW3Ln7/yKTjs UuN2shYb8J+Ehsz6YWpGTTnntnn7Eaifx+aiJqhYUI0Y19M/7ezgwfjMH5Ao/YDbrSUl 8Z8tudTZY9b6mFV6gqDvuEyJfD0ridw/fHin88QwUWf2IceH3l91Dmu4wmoX6Uj/Vs/l pzPsdh7DD9ex5lqoC9/+slwnQAC6XApoRXay9cg1Os1auStJhnBKy1m23KY4rE8dowDW ZRZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542808; x=1742147608; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v+mT1UbCSCra120s07KB+HyE3Ag704KDjhrj8pB4giU=; b=EPOucKQps28jOJC42xuMlukGoHAco9M81wIOm7rh7sXVBwseSavUh1lr1MvPFoVmks VBEM0UhaMStdtk+UcVL89PEof9BNN6fIrU6UHIn8Rkq07qMWA45/L/kIVnZevJSIGKqT wdoycvqaL5Lg1oWQTCTBdG3EV2l096mIN8QthRSOmZovs3sENy0EYIGgsfXAdpBIkFUt oAtJO7BtcOcZa1y8lL3mzSPMS0vOVFrobPm8bcIw4/xwhlp/9X6qcSmQeDLlB0daXYHP Y3yxp4X5AlLS0vxPM+jCUqFGb5H3Fz9SVD3U8k3siiTryYGm8YDQSglBpd08oGzTeA3O WV1g== X-Gm-Message-State: AOJu0YxqP8493huatgVLhlA6ON8/5TetQ5VTdxIByXIbgy1zVYVG8Fb+ StMGjQvWFSRXHW/eMfqe9YpU4aVILOYz9khsYeRvD80WilJGi5//mfIma9BqglaMyfxbJKqruHM NBak= X-Gm-Gg: ASbGnctbR646nSYpdTEspdoZH901oxXjiyROFb9wgDjCfq8ikWZ/kt8dYBTyIwfQIEP 3HXVtxW6FROZinUgnVnjGUXQ5o9O5Eq/x7CCU9VxtKW6DQLbHbBLKKtWmSr9Jbj1ymGa2PmkLYc KhykbZDbnmbzeHyqM80sXIKK3GMPHOtNawpN1SxtAoloLOzZI3BVHMCMMeTyz/K2OcSlWOmacVk 91w22vRoJqFNq4Rq5selfVpkqzkDdL/l5AlmydEmeSGhkc1fPANMfNE6ttpInxQtapob2GIENqW HOuiqLiAajVWtIDtNGJylLID098V8qv9TTGSnTGpqqe48hWolrGhnddaZBag/Hl64vvDK90h6Nv LvIULDSyPFuKE2k/GUvc= X-Google-Smtp-Source: AGHT+IED3lluJls6m2GW63mCbMX1+0lAC72HBxn3+YhUo7Xi5vQZPb/5m59BOkUbA8F4ouMobFaCCw== X-Received: by 2002:a05:600c:3c82:b0:439:4c1e:d810 with SMTP id 5b1f17b1804b1-43ce4ad68b1mr42198135e9.9.1741542808232; Sun, 09 Mar 2025 10:53:28 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 17/38] target/alpha: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:46 +0100 Message-ID: <20250309175207.43828-18-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741543124313019100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-5-philmd@linaro.org> --- target/alpha/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 2eabd7724df..584c2aa76bd 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -63,6 +63,7 @@ static void alpha_restore_state_to_opc(CPUState *cs, } } =20 +#ifndef CONFIG_USER_ONLY static bool alpha_cpu_has_work(CPUState *cs) { /* Here we are checking to see if the CPU should wake up from HALT. @@ -77,6 +78,7 @@ static bool alpha_cpu_has_work(CPUState *cs) | CPU_INTERRUPT_SMP | CPU_INTERRUPT_MCHK); } +#endif /* !CONFIG_USER_ONLY */ =20 static int alpha_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -224,6 +226,7 @@ static void alpha_cpu_initfn(Object *obj) #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps alpha_sysemu_ops =3D { + .has_work =3D alpha_cpu_has_work, .get_phys_page_debug =3D alpha_cpu_get_phys_page_debug, }; #endif @@ -259,7 +262,6 @@ static void alpha_cpu_class_init(ObjectClass *oc, void = *data) &acc->parent_realize); =20 cc->class_by_name =3D alpha_cpu_class_by_name; - cc->has_work =3D alpha_cpu_has_work; cc->mmu_index =3D alpha_cpu_mmu_index; cc->dump_state =3D alpha_cpu_dump_state; cc->set_pc =3D alpha_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542860; cv=none; d=zohomail.com; s=zohoarc; b=Ceu9YkY8tyMG1xyqm/NGcz+ZpXUWxQrcnCFz8lYHXfwbDvtdB4kNmJcmxdBOHzMdq5WbYPsvXTj5WwgVrq7dCX+8fJeRnDzoeUU8R4wRV0fGxp8Sg6azI4ZheUaO18IKkB4rRnl1faAdSwVksrSBMmg5W36QNmuDJGdMGCIfTsk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542860; 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=CR9qHcPdMx1za2MutCx4NKVWEwgwRQ/k65jZmcbEmWI=; b=Q63bYDY1wDm0ESeRwC3QDu1UWMKB/3Y01MAxFKzsr5fNryBLc+j7jx40jTOgdIhmEZDkR9/EMJ7YunV7rD5h6FwPvJU07avhLna+pS/2T5G4Z2q0aKSC4bMglhGzjqp/Tk0mrnXtN1DDA7QtjiQUMGJDkbcanZkaOPnLUpEI6wY= 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 1741542860564838.536812948479; Sun, 9 Mar 2025 10:54:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKqg-0007Pv-A0; Sun, 09 Mar 2025 13:54:04 -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 1trKqH-0006wq-UJ for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:39 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKqG-0004vp-EG for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:37 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-38a25d4b9d4so1810419f8f.0 for ; Sun, 09 Mar 2025 10:53:34 -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-43ceaac390bsm53503015e9.35.2025.03.09.10.53.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542813; x=1742147613; 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=CR9qHcPdMx1za2MutCx4NKVWEwgwRQ/k65jZmcbEmWI=; b=eV8Ae0rlDpAun0EPpM/DJ6KtikB2IfP08Uvf12VmXFmjQuxX+l6+gKScXecqtWK5Cr aV7WyYYJAKIyzu/qeeKg1n1rbUWhB5NldD29014J0XEtZQxeVHW+blbZku40RmP/A6Ud yPQ2dBSk8Ufl2L6bM4tIq3IHlHLCkxqiTxpOzUq5LFpXPa1EFieJy623lR+Trb7/Uzsq Z3jbyk5t/a2Wx1KpyDxQPT+MN3kSTIS30LkiSMTwMAj5UsJ/iZJKuNpf2tR0qTFUS0Uh Fx5lzuotGHKcFBncywR4LRcyb0FaMDs9VbxcBw+PGXIvLKp2MefBJ/LMWepe1cyGPF84 aa1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542813; x=1742147613; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CR9qHcPdMx1za2MutCx4NKVWEwgwRQ/k65jZmcbEmWI=; b=ewqsJPofsZS96dPNY77J4u0cnquEjygXV/qZE5iXChMlhSNc+FxjNz0qst78d94Urg tYbPLQs1cxslEfOZ87rRb+nhsecJif1sr3e+yGDbgGQ00XWRBqvomU211/Tkjic7LH1h vPj5FM9OFwelRmo1bzPKQdvtOp+DBwmwnrcwe45JIxt8AsXKKrbKoMp5GvBdLKW0sMC+ 7RTFbSgMmvvqjd+ZUloxUQ+rw3UMRlOy7xkp7LZzuFtYGKuoyYBAkEjSydL3BqCbJhCw ErUiQJo+5iBelrEoDJX6eLQosqNDMJ2zNYnkE2dtSAsyBAXEypJScTkRzF1vWXDh9JT5 4f7g== X-Gm-Message-State: AOJu0Yy0UtzpVIC7TLSdvxb/F0JFkPap90zUIwPGtZ8AwW4fO4blVKld YZKp2UxIeEbFZ5aPgjAJ6WiGHatwhAYcrP6JnBqBUgEeOQjwf7CwZfaCmMwcIOplClXiAR7WhW1 r+Kw= X-Gm-Gg: ASbGncvh7iXDGo8L9gY+JXGaULsVZvXpVIMRIm9CM7ZSstuhp/X8QHNWbLNLJsil1XV WBxHoCSPUr8AwG+IfiwmNTJeNx8ivM3wC71CQWW3vNJXV3UtWP0d2Fcvm93qIlSLCHirSIX2KJT 30wrZKZ2scLXpxT7yagktPltvAMfwiUbamL/paOYgQql6CIAresYGChAgbA8kE+3W9KxytZUtJ4 gldme+Rg0iwO9eaGbDm+QkzFxBO11h5d2w3aK3xN5hZOCQ1VmaqVSN7KBaQsPjoHLimNHVVkc/Y lOBD+oZ1E3kimNkpEDDDW4O81e26p3XCrXGVk3vsVXN6o4jHYjROu6z/cLonKH8+wDsKBmQ/oqJ p+fr2z0M2DSrhn8Tjfqk= X-Google-Smtp-Source: AGHT+IH2f+EX/rt4pFnmHBWq6sWTKZFfrwVOJ/0JNg6e3IbZpBAm/xM7owoDljZEb3LnPSvIaKy8tQ== X-Received: by 2002:a5d:5987:0:b0:391:2bab:d2fd with SMTP id ffacd0b85a97d-39132da96c9mr6963404f8f.37.1741542812830; Sun, 09 Mar 2025 10:53:32 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 18/38] target/arm: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:47 +0100 Message-ID: <20250309175207.43828-19-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741542861665019100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-6-philmd@linaro.org> --- target/arm/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index d7e61d08bbb..01786ac7879 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -123,6 +123,7 @@ void arm_restore_state_to_opc(CPUState *cs, } #endif /* CONFIG_TCG */ =20 +#ifndef CONFIG_USER_ONLY /* * With SCTLR_ELx.NMI =3D=3D 0, IRQ with Superpriority is masked identical= ly with * IRQ without Superpriority. Moreover, if the GIC is configured so that @@ -141,6 +142,7 @@ static bool arm_cpu_has_work(CPUState *cs) | CPU_INTERRUPT_VFIQ | CPU_INTERRUPT_VIRQ | CPU_INTERRUPT_VSERR | CPU_INTERRUPT_EXITTB); } +#endif /* !CONFIG_USER_ONLY */ =20 static int arm_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -2655,6 +2657,7 @@ static const gchar *arm_gdb_arch_name(CPUState *cs) #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps arm_sysemu_ops =3D { + .has_work =3D arm_cpu_has_work, .get_phys_page_attrs_debug =3D arm_cpu_get_phys_page_attrs_debug, .asidx_from_attrs =3D arm_asidx_from_attrs, .write_elf32_note =3D arm_cpu_write_elf32_note, @@ -2705,7 +2708,6 @@ static void arm_cpu_class_init(ObjectClass *oc, void = *data) &acc->parent_phases); =20 cc->class_by_name =3D arm_cpu_class_by_name; - cc->has_work =3D arm_cpu_has_work; cc->mmu_index =3D arm_cpu_mmu_index; cc->dump_state =3D arm_cpu_dump_state; cc->set_pc =3D arm_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542895; cv=none; d=zohomail.com; s=zohoarc; b=ju3KULqb1rarNSBrlrRlNejSiasap02hj26SgcIAf7BJHnnVsHKFSsSuEVfW6KL4H/zM5SmMOfpdRyP527KPE72A0dcx5gndYdw6RCuQKpRfxiAT0EFVSGXnYxTh/PxsAiNc/d1+N66ArKeg253DQZ9SsLVyziw9iCB+lGeqZrc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542895; 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=dVTT7M29UlhbWD0hltalGhxOvIP53FS/q90YZtgLw04=; b=bVrMOD+CVer0Glijl1M90pgVWfeEIy0VPBuhYBIRMKa2NTVTjVXpmxXifXnAXyyGyVIu68oX2qqEdMs+QATidghcbdQ0bWLLTSm29Vs4GUKJZBu/w73+uULjXY5j4u1c/BqKjTsYI3MXtQOdMARf3IO8WNhlhABaZ4ddleimVgs= 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 1741542895482978.126468801421; Sun, 9 Mar 2025 10:54:55 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKqk-0007pV-RW; Sun, 09 Mar 2025 13:54: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 1trKqL-00072C-Gs for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:42 -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 1trKqJ-0004wF-PF for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:41 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43cef0f03cfso3867225e9.3 for ; Sun, 09 Mar 2025 10:53:39 -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-3912c01957csm12401591f8f.47.2025.03.09.10.53.36 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542818; x=1742147618; 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=dVTT7M29UlhbWD0hltalGhxOvIP53FS/q90YZtgLw04=; b=A5qEXC6ZE61r50xlDOAz1TwJfnzgcy300Oqu+fb/kyS5pRJCr9Bb/d6r6nRu4KreBK kXd+7WD3jJy0598puHNAOX2oDN/y+YPqlJ6As3Ba6XNRE5YUphOvHYEVsTec7QXaX4iL 2+eNiCVopFHdOtYMk3OUomFq0lNVvOR922P0mpLiOZLSpolGCel5/axSeIxKznvGx9rD 2cs6xPgwIb/8JbK5uRBTrN0P5v8+ViwbLG094FMfIi00ff4Cjp5hOvtXs1uk2wvsNOeo 38aGwXhFUl49wvjfVQiv5ZE824jbRKH9ZJKvG9ezhNy5npL76h+WmT0SmtYmX4rk7EqO lJ5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542818; x=1742147618; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dVTT7M29UlhbWD0hltalGhxOvIP53FS/q90YZtgLw04=; b=HM/yGi9c7G8fro4PERHAAJySUxYE2TlgviKUew1GmOOPSNrvPSnzox1hDNspDzDrTP fp4ewnOnd8k0i/VQ+2t8pHEdXyEJ3THYRg+94GjZIdjrONq614PRyc1xTQ9kYTBr/1Ab 1RlOVxTTIE4SOjgrfUHlfxax/ZOaoFIlW3pNLNlZXqJAKeC1HZAo9Yfrl9QJAUxotEoG 5i31uG4d1z0Aw+UUKhQUGEj3Uejj5Lpr2IzN0QvKev0rlFN6lT9i5ASf2FPaBPOowR4e 4p7z7fJwQ5d9M3RRsUr/oumdcv0KjrCGGI5QlggIk4ugrDw7bvT1j0GcDJDcaOsMoDHw RIjA== X-Gm-Message-State: AOJu0Yw6TrYSL0VA99YKbICk2gb2iquuYH42XPMsnf12r9uemSGjxjzI NzhBHoKUdM2p9sIp2Vc/uLsivTt+R1T8wy8rRkqkHh6FkUTsoxyjvsJrAnedGOsrLhRib4tA03B +ISE= X-Gm-Gg: ASbGncv2FWhADiD/sF4sjBueIwludmE7mPefuYkpvpVIyMvwwIHQTilH7lqOIMdkHC0 QmfOxTzDBf+MIX6lSJ+xir6oXmOmP3frOW4lAAtWXq6cZiDkjfkgDEECp9soiLmLBT5+ffj0aCn c8Gikducy9Ic7RRrs+OzKUcexjKApvLLk4ypP2d9ZtJZp6zFgG6LVNpyIgsAJNZXRmLRdPS9ZQ3 pO9cfdmZ6iEWwO8cGl14EWiUzbwtWhDXgJqQRp5UX6Iii9YvOtKt6D2IlrD0c9mgmTLpQsIxRty ip1FjF91ePtUZuQXkAydTMo94xb0grYZ2Q+/z+MmD1haiDceniVYiiWoUDsrbb2CYlirJwtfScK c1qSQ6EBuJImmXfh1WbM= X-Google-Smtp-Source: AGHT+IGxPlVF+MyLqO0d8ETQ7lZfMnH7568/JcXh4jW+GIYRLBnGpvGY8U3GRH8uL28F4dQ91TyoAg== X-Received: by 2002:a5d:59ae:0:b0:390:f5e3:e833 with SMTP id ffacd0b85a97d-39132d379e9mr6153424f8f.23.1741542817979; Sun, 09 Mar 2025 10:53:37 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 19/38] target/avr: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:48 +0100 Message-ID: <20250309175207.43828-20-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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=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: 1741542895827019000 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-7-philmd@linaro.org> --- target/avr/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 2871d30540a..834c7082aa7 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -201,6 +201,7 @@ static void avr_cpu_dump_state(CPUState *cs, FILE *f, i= nt flags) #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps avr_sysemu_ops =3D { + .has_work =3D avr_cpu_has_work, .get_phys_page_debug =3D avr_cpu_get_phys_page_debug, }; =20 @@ -233,7 +234,6 @@ static void avr_cpu_class_init(ObjectClass *oc, void *d= ata) =20 cc->class_by_name =3D avr_cpu_class_by_name; =20 - cc->has_work =3D avr_cpu_has_work; cc->mmu_index =3D avr_cpu_mmu_index; cc->dump_state =3D avr_cpu_dump_state; cc->set_pc =3D avr_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542975; cv=none; d=zohomail.com; s=zohoarc; b=Foqz7DVGczu9K7EHTioKlrSdh2252K/NpxnEI2euGLHevLD6L7SgvHk4T0GdZyVAdOQbOZxbGyeGYZxP/MwNFPupNUzm02it2/VCgmVpOMIvTpOi2zRmhIn4q41xSuCG+ba5iR3hF9HhetXY1xpIo7rRUIBbJju9CLFp2en1psU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542975; 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=v0JL6xKSZRRMov2/FW1YHJ8xf2AEoMD2E5RBViKaSyM=; b=aNRHbGTMJfxJXfD858Rtoukl7v2J/rpfrxeWsV15e2OjOSXB0bWSjMlv3l70qbVGIyENBBrUgOoN39OzxlYEDbwgAziFnp+Pl1Kn5XeeRoTJRp0L+Diyi5/m7gmD2gKBm2wuAsOZhx/PGDqVIgzgGI2sNP4+1CKUIoID9QHVqOY= 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 1741542975499771.1713994742247; Sun, 9 Mar 2025 10:56:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKqf-0007P4-3Q; Sun, 09 Mar 2025 13:54:03 -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 1trKqR-0007A9-He for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:49 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKqP-0004wg-Gs for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:46 -0400 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-39130ee05b0so1998351f8f.3 for ; Sun, 09 Mar 2025 10:53:43 -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-43ceaac390bsm53506465e9.35.2025.03.09.10.53.41 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542822; x=1742147622; 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=v0JL6xKSZRRMov2/FW1YHJ8xf2AEoMD2E5RBViKaSyM=; b=F2D0S441sSzRjeCZmD6mzCvyIGLoU8Uat6KXfQkMAEdNlsoB9mCcz/i1lTjI436MtH MkQN/CyBq9Nx6TAD+HstuMRdTZHjptRTEmdkYtHA0qDkxlJVCNwYDsUANnwGLuG2UY3v yjRcc0IN2Jw0FzwlY5MwHouQ7XFFNVLXR98WZTkYkbfzY/60bzpSBBh38pUNkp0I4IXb bkOgb3Wkz4MSdX3IFp5Wesmwa8mf23e3glZhKz5v3/85cke8koEmXMXaV/D0OMpoczHj u8jHJO0p6VcHk40qxeJvBSiG61CCleoYWl77J9LYYQ9dzM6bkYvH2lVMNfo1C83YZQCI yDjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542822; x=1742147622; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v0JL6xKSZRRMov2/FW1YHJ8xf2AEoMD2E5RBViKaSyM=; b=rqZNIcxkFga9NMJJYijDzP4Y93T9KwEimKoJqOGtEy4ZedGrDDxp38IB+v9JSoqibX ubpjVkG8UdUkT6hnCV10aWp9XvdZ83fD4zMkWgnvWDSkz3MhJjapRPTya6ZE8gajP1EX kK+ZCxo+/z/FfDLgHP3FvRxoHNSBk9CHL+7a3b7G+sVFdE/2j50BDvvQY4C3R907OywZ H4mVqIvboMyj7yPrw5Nf0qVpMdtVem2AnGTbq4cZTARbh31z4D9gjEbTFGJjADe7lKcE gWOrxMY3sBQhjNNph/2Ojddn9NZf6isLZrLM/cEbP/mmtDRrKOYIEJkYxXValZirMueD Mtug== X-Gm-Message-State: AOJu0Yxt29FfRzJbRVOSHIc/H7Biu65uwjSoNpgCZPe6zVBrg4Ty17fG +IMJgWAV3yqY41IzUMEoRnNmvVqhhoCr5vSeUkK/p92dzsdvkkBcsW60MKKz0qbQ0fA6iI/qQs2 fCc8= X-Gm-Gg: ASbGncvHrjR3SueXuBonlCrA82oG6cxuS1gvp7xHFgq1yUN8lg4wo82AGi0CBmhhxGo cTSvltdTt32rnb4XcSFO1ihtY0t9x6ULR3et/Xc+IOhvw1iQy7UMxqQ3FTU19MRkPOyAs00NH0T X2IkkV+9QRaIrDIZ4G8B66H6zXwi65TGcBQmyyUhD41JAqgsv7fttMSwQc8/mfPQ824lC383Jg4 XYvraROeBBJvHcHVuFuK0cGOPMR6RnbDMJnTSRFTexLgVvQijGQHVR+661KH4TmDZAuViPtvL7U KoBR0k2V7dXHYviyU9ujzqroj3VBK5NMVQsswFHVmjswpJerkBUCaYVKnGVgEa9XnOKjB6U1ec6 gDz3l/6gpl+3Yoa4MjvE= X-Google-Smtp-Source: AGHT+IHFY+NGmp5seaou8YLoLmlIrVutDXB9tIvo/ouCy+aR27vJMhUJXUR6gbyNmJoyJK4rCAgqwA== X-Received: by 2002:a05:6000:1f8d:b0:391:4559:876a with SMTP id ffacd0b85a97d-391455989bamr1119073f8f.46.1741542822639; Sun, 09 Mar 2025 10:53:42 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 20/38] target/hexagon: Remove CPUClass:has_work() handler Date: Sun, 9 Mar 2025 18:51:49 +0100 Message-ID: <20250309175207.43828-21-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::42e; envelope-from=philmd@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: 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: 1741542977939019100 Remove as unreachable code. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Reviewed-by: Brian Cain Message-Id: <20250125170125.32855-8-philmd@linaro.org> --- target/hexagon/cpu.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index a9beb9a1757..766b6786511 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -262,11 +262,6 @@ static void hexagon_cpu_synchronize_from_tb(CPUState *= cs, cpu_env(cs)->gpr[HEX_REG_PC] =3D tb->pc; } =20 -static bool hexagon_cpu_has_work(CPUState *cs) -{ - return true; -} - static void hexagon_restore_state_to_opc(CPUState *cs, const TranslationBlock *tb, const uint64_t *data) @@ -346,7 +341,6 @@ static void hexagon_cpu_class_init(ObjectClass *c, void= *data) &mcc->parent_phases); =20 cc->class_by_name =3D hexagon_cpu_class_by_name; - cc->has_work =3D hexagon_cpu_has_work; cc->dump_state =3D hexagon_dump_state; cc->set_pc =3D hexagon_cpu_set_pc; cc->get_pc =3D hexagon_cpu_get_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542971; cv=none; d=zohomail.com; s=zohoarc; b=I2p+JVSf0c29syxZbxVKmARUTSaDL+3L3QmeAN7oYYaBnQXfZdfrQDGEFilbUpODGZYahuJAOWsr7NohEEXb41pn0XWJwbRTCDpsdX+mUBq/g1r5wFr8uB0I1XZFKXc7WmXS/sb6/I6AQHf+Kb7nkQiQ5TyJxJvd3GPYjCdLHZs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542971; 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=md16qNAXLQuQgmlTx8E9wB4d8K0hXUoBNEnxRY6/V4w=; b=Zo0kj2iLrNlzNLJmhujvqUFlUPpzi2VJF8cgxqDBSQqJhOC+jU1nNpI1glwkhwG+oIY2ZYiN4p1r9PjX1ys08UpOZaLBs4tJSfDAJvoAwxwlaZ2bCI1H6pL8U2X+K/JnG99FndAP56rcO1tvKnxvOfEBESHmFqzXeWsjOtXBAfY= 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 1741542971446481.34662435578264; Sun, 9 Mar 2025 10:56:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKqk-0007p3-Rj; Sun, 09 Mar 2025 13:54: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 1trKqV-0007Eb-SM for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:54 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKqU-0004xY-7Z for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:51 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-43cebe06e9eso5230825e9.3 for ; Sun, 09 Mar 2025 10:53:49 -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-3912bfba8b6sm12688775f8f.11.2025.03.09.10.53.46 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542828; x=1742147628; 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=md16qNAXLQuQgmlTx8E9wB4d8K0hXUoBNEnxRY6/V4w=; b=FYT6JGNCr3iwJJViGZXIyVi0ESfoQZVGFPExP+SsuMBANFgwyUznxbBbJVXYkb3rWT FBhhu6s11dW92UJ5HuuhITmTzILEwW2HAy0g/lsN9t46bStTCZimXC3+OC7Ys3/G0oXf 5LYL2aZPzOHUkwwHb4zDj2Q9sFgoyH7uMfKR8Bqh20gIsLzMHyNEmLuM0A9w9m9yHKod 7374bsXLfXeEFdyF+MvbbOGBPrkoOq5cRm3D7VUlZsye4TMnF8jtHm+Lh93MmgP4MCDg NiRyFUPmz8hBW+l4byGhQuGiZMriGMlW6V5KfpoAEHcDI7FxBDPu6M7UPVtvvxuFR9ws affA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542828; x=1742147628; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=md16qNAXLQuQgmlTx8E9wB4d8K0hXUoBNEnxRY6/V4w=; b=t61D8YL1DuArDY5o7q3jZIFchkY/i8Kx2T/WiJHbrfaeiPyaxETwIndx4TbwfWELhN T8j3bswyYodLXdXT20cnrNG3A/rOhsmLsIlcN/jzbdlmyBRJ9sjUlDKejWdgzTHx4VTI /C0S1u0OUSuH1VuM+0H56Cb4a8jiO46g2hCqcvtQwddsxwsQKLGJ8mTOPaI4+fEaulRJ MgvalmAcg/k44nnbRjLgrx4sACFtdNPzFrHB/4P6O6aNdW14CPcq6IK1vAZuKFhx3iS+ aeEZCF8UJWNqOZL9MEnshuxACVc3wdvJVEVL6FmfdEQv2vdpEtAMqCMYIIm51phAbHxd rI4Q== X-Gm-Message-State: AOJu0YzgWJ/bMc7dHBE651goUbQo0p6Ax+4By/CEGL+EXz+E7Y8tHchY TLg6qIzUHb8+cIP15SP0cKITazEgel13h/aG+uisfDtf+YsD21ZsDa9WodihE56LBuKYHp6iX/8 +Lj8= X-Gm-Gg: ASbGncttdITR6/kuifivu8KApEOBeicgvX65ZdudsW7My8qi0kp9eNp5Hkx7mdRV/U8 c1tBZDyh3QuBc8R1V2TnRlVRpwx8XjqChDgUxQcHklLtguA20cXsY83sMC6HePSTQu24J0/xQA2 +FfMUyMgISBa4lrIIK6Poe2wvYUNqEl/nOdBWV1bcoZRPCrZD5rpBdzwpO2HRluMWmap6X7KVfV FUV+gUAGWiHzuFKiHV+5Ma2HSiIdEBZNHr2b3CQ/9STVthTf2tXremo3xPFMdwEAHu87EDkqKA5 2EfAHc4iUrANeY4AU4OHnPE2SvqEQjE3LjAFnbp39JeW9Ac72PaktHJb3nYzzpC6G70kYjp6P5O tk48GSNvPqMzG6TXjeFI= X-Google-Smtp-Source: AGHT+IHgybnX3CVsedotVCSsceZ1WxKQM9Bh8wwAE9vWJlOPA6061/tH6dWEn/hNp6ac4Cclw1xWqw== X-Received: by 2002:a05:600c:3c8c:b0:43b:ce36:7574 with SMTP id 5b1f17b1804b1-43cd169b363mr67510585e9.11.1741542828379; Sun, 09 Mar 2025 10:53:48 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 21/38] target/hppa: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:50 +0100 Message-ID: <20250309175207.43828-22-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741542973948019100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-9-philmd@linaro.org> --- target/hppa/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index d15f8c9c217..2a85495d02f 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -131,10 +131,12 @@ static void hppa_restore_state_to_opc(CPUState *cs, env->psw_n =3D 0; } =20 +#ifndef CONFIG_USER_ONLY static bool hppa_cpu_has_work(CPUState *cs) { return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI= ); } +#endif /* !CONFIG_USER_ONLY */ =20 static int hppa_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -242,6 +244,7 @@ static ObjectClass *hppa_cpu_class_by_name(const char *= cpu_model) #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps hppa_sysemu_ops =3D { + .has_work =3D hppa_cpu_has_work, .get_phys_page_debug =3D hppa_cpu_get_phys_page_debug, }; #endif @@ -278,7 +281,6 @@ static void hppa_cpu_class_init(ObjectClass *oc, void *= data) &acc->parent_phases); =20 cc->class_by_name =3D hppa_cpu_class_by_name; - cc->has_work =3D hppa_cpu_has_work; cc->mmu_index =3D hppa_cpu_mmu_index; cc->dump_state =3D hppa_cpu_dump_state; cc->set_pc =3D hppa_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542976; cv=none; d=zohomail.com; s=zohoarc; b=CtcmGvEONL1V+epQsXPD0BrsZKz30MsGLo7VR8UWLDzqbnTIhWkSjmOKB5xtjVQkjcbc8+FtfUAirWsBbQ9N4mgThSzK6xC5QTwD4T4NGZBW8tBXWuDtcPXpSYcOCXA0wncxgZ4hQXzmLqUWdBTpNkNvHbBZdggMGHF1/gCgmx8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542976; 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=6nHKP2gggF1XOmH1TzGcLN38oL/58EhyiN9pC8iNlcU=; b=oILiDH7RaEXWRqgbyeyJonCYtHR9C4BCpTxQ8obrY++PrWgLzTpsFHziLZo9a9dmauMrA4k0YTmiiaZ2yE70OgSipC7X+8WpkuR5hFvcSjcfU8T5LV3lr+mCfl62Lh0a6DquMbxA1Z1cF3Qx98vYd2OXP9YCgoQm/As8syrgvg4= 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 1741542976461210.79568749531506; Sun, 9 Mar 2025 10:56:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKqn-000865-EO; Sun, 09 Mar 2025 13:54: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 1trKqb-0007Mi-5a for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:58 -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 1trKqZ-0004y6-CE for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:53:56 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-43cf628cb14so1626115e9.1 for ; Sun, 09 Mar 2025 10:53:54 -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-3912c11e9desm12246338f8f.101.2025.03.09.10.53.52 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542833; x=1742147633; 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=6nHKP2gggF1XOmH1TzGcLN38oL/58EhyiN9pC8iNlcU=; b=VQjAqz9qhRSQ/no3eVD/2Zw1hQzF5Br16PHc6dVyEwaPYveEbIo84e/3IUoL6RK6Mj BmiHEncEd7vLRX8OJULjP9Mb2yYSosevTcQhbi7gvRrUKWesuRMluPliagWYmpZVOUVk 0CJsXT5vdwgm8c6dg+zXBwjCh5Aw4WxFhS9DPx0XJSzEzpoRiExiTYZk+yg8aiRC43aQ Z+kpiJ8Dg1BmnuRUeu8oKDs/qPKDkX/WdU5Qq9iqZ8+S33hrXPyAKH9a2nwZ6Vt1tmka d3c1/lCqaTFIAN/cTibyWQ3cTkMH4KbQfptcanIShjL4ZxIVpxQr0OykQJYPmzlNSMWO 3aBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542833; x=1742147633; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6nHKP2gggF1XOmH1TzGcLN38oL/58EhyiN9pC8iNlcU=; b=kMikWp2TCn4epcTU8EaRBkR39BGX/l1TmvisKfpYHB9FQz7BWAAJQx/iNMZq7eopcV tWhan3oQudvRdrh7uA+agtkHkek7jx3CLisZTGde+mSQtcZPA/lPOCnP6aq4Q/ZI1qNb ZSUnPwiNYlGI5Mxnn4B1+a/8NQqgAvYc1UPlXK47cyWxAbTKa4KxcO6qtVzNsa6PNhM8 UUw7wstkRSOO7iCxCs2Dpq2g4JV0j5JwYQTZawBd9oaccTSc4oHkpVT8aFseTXbJeQRo WEQCJ+1KRMd1xHlo7r5M/9+WTuEzWjAwg0IV7ifgjro7RUi1IupvL7wt8KCaS/UXh3XN oGUw== X-Gm-Message-State: AOJu0YwDlKKRaIHtKrb94bt5CuP3pfBNTCucff3n+ZUlaK7+KG9FfKc7 PcMJmT0cN2UstNashpWjTiqGkBOm4u8MLAZO2ckej2nZt6m8GG7SbwnDjtRagJNeMCqZW8Ko47V un8s= X-Gm-Gg: ASbGncsxQhwEkHltRkGkqCHimslfIebKaAd6Iq9i0om+hNlGtulCWTM+4h9IXq02PTG 9zlxke0rtmPYipp5vtCnLxRJk8uMoWNGJ/EyeYDZkJ6kJD76bgzRQG8u8kg8nsYpI/ieV+ME/2f acuocGxdRmIVaoiqup39pbpylJddXCOlpdVrecwhE20d7TGHmHeLW5J71uUO8pnjWb118xa8Eaj 2gYW9J+Ox9XB1U2jDtiwn4YRkzikQPPjuL9fcnkCKVu81eIqzRKk+h9Pylczgm4W1oFPVoOg4ng NPjMINb/pW6E25iS0N6f4fN5xfNZE+plqeCYcN4jQYfenKiKe6qCyEHCFv8nubvA0n1xxCF8eQ1 uzgR5U76nao90exHYWVjMYHgcIrDMFw== X-Google-Smtp-Source: AGHT+IEArUtbYt/SZL4izrD0F6gzS5tbKR2c7c2YPZpTkthP3/kkgJ+Ph8IwGhCQLv4cJInw0K187Q== X-Received: by 2002:a5d:584b:0:b0:38d:ba8e:7327 with SMTP id ffacd0b85a97d-3913aeef970mr4446068f8f.8.1741542832953; Sun, 09 Mar 2025 10:53:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 22/38] target/i386: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:51 +0100 Message-ID: <20250309175207.43828-23-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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=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: 1741542978194019000 Move has_work() from CPUClass to SysemuCPUOps, restrict x86_cpu_pending_interrupt() to system. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-10-philmd@linaro.org> --- target/i386/cpu.h | 4 ++-- target/i386/cpu.c | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 7882b63b9b6..76f24446a55 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2349,8 +2349,6 @@ struct X86CPUClass { extern const VMStateDescription vmstate_x86_cpu; #endif =20 -int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request); - int x86_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cpu, int cpuid, DumpState *s); int x86_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cpu, @@ -2373,6 +2371,8 @@ void x86_cpu_list(void); int cpu_x86_support_mca_broadcast(CPUX86State *env); =20 #ifndef CONFIG_USER_ONLY +int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request); + hwaddr x86_cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr, MemTxAttrs *attrs); int cpu_get_pic_interrupt(CPUX86State *s); diff --git a/target/i386/cpu.c b/target/i386/cpu.c index b3e1c2bca49..1b64ceaaba4 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -8604,16 +8604,15 @@ static vaddr x86_cpu_get_pc(CPUState *cs) return cpu->env.eip + cpu->env.segs[R_CS].base; } =20 +#if !defined(CONFIG_USER_ONLY) int x86_cpu_pending_interrupt(CPUState *cs, int interrupt_request) { X86CPU *cpu =3D X86_CPU(cs); CPUX86State *env =3D &cpu->env; =20 -#if !defined(CONFIG_USER_ONLY) if (interrupt_request & CPU_INTERRUPT_POLL) { return CPU_INTERRUPT_POLL; } -#endif if (interrupt_request & CPU_INTERRUPT_SIPI) { return CPU_INTERRUPT_SIPI; } @@ -8634,14 +8633,12 @@ int x86_cpu_pending_interrupt(CPUState *cs, int int= errupt_request) (env->eflags & IF_MASK && !(env->hflags & HF_INHIBIT_IRQ_MASK))))) { return CPU_INTERRUPT_HARD; -#if !defined(CONFIG_USER_ONLY) } else if (env->hflags2 & HF2_VGIF_MASK) { if((interrupt_request & CPU_INTERRUPT_VIRQ) && (env->eflags & IF_MASK) && !(env->hflags & HF_INHIBIT_IRQ_MASK)) { return CPU_INTERRUPT_VIRQ; } -#endif } } =20 @@ -8652,6 +8649,7 @@ static bool x86_cpu_has_work(CPUState *cs) { return x86_cpu_pending_interrupt(cs, cs->interrupt_request) !=3D 0; } +#endif /* !CONFIG_USER_ONLY */ =20 int x86_mmu_index_pl(CPUX86State *env, unsigned pl) { @@ -8893,6 +8891,7 @@ static const Property x86_cpu_properties[] =3D { #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps i386_sysemu_ops =3D { + .has_work =3D x86_cpu_has_work, .get_memory_mapping =3D x86_cpu_get_memory_mapping, .get_paging_enabled =3D x86_cpu_get_paging_enabled, .get_phys_page_attrs_debug =3D x86_cpu_get_phys_page_attrs_debug, @@ -8926,7 +8925,6 @@ static void x86_cpu_common_class_init(ObjectClass *oc= , void *data) =20 cc->class_by_name =3D x86_cpu_class_by_name; cc->parse_features =3D x86_cpu_parse_featurestr; - cc->has_work =3D x86_cpu_has_work; cc->mmu_index =3D x86_cpu_mmu_index; cc->dump_state =3D x86_cpu_dump_state; cc->set_pc =3D x86_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542866; cv=none; d=zohomail.com; s=zohoarc; b=bdH1JrgrZcd/H6dRL4hR0nTpCIknthW27GfipzO/ctwDo15oR/Yh0EE/0GTSVZU9elsjit67tg6140xtbNtQOGrvjEQM9rk/HIA/MSQaOZecpaSS0kYGCi7jicILwu+NCzinc2fKi8gNUrPBkb//Tx+jP0PzVwRl2iYtoH6qMMI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542866; 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=f4Sc7hhTcdoZP5mVK5+fnzgoyi3IuMpFTmnfFiAgyFE=; b=dtKKiKck37Z+4hnDJteCEkGB7Ib9wc39/nxu7INEx7SCwfcPz/eBjG+jq4SvDbJSxQVAQrjIMh2OhQ4shnuavIqIzPHNfRJiMLsDzvUmBMYX/PI8J1stDmK0HP/FTN/SYO5LD8s+k5S4zRkru+HaTMNErfL4Szw7jqj1mzRUtV0= 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 1741542866021577.2641882299083; Sun, 9 Mar 2025 10:54:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKqp-0008GE-9B; Sun, 09 Mar 2025 13:54:11 -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 1trKqf-0007XK-Fu for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:03 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKqd-0004yZ-NC for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:01 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43cf06eabdaso5176225e9.2 for ; Sun, 09 Mar 2025 10:53:59 -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-43ced9a4b19sm44139075e9.29.2025.03.09.10.53.57 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542838; x=1742147638; 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=f4Sc7hhTcdoZP5mVK5+fnzgoyi3IuMpFTmnfFiAgyFE=; b=UuZuEmcYJ11SNa5z4ItcIRTrp3ra3qDEkNUgpaek7cJsHArIWpws5zqy+oz/J1Lykf lfWZ+7MtyLZgkG16jDtNxhru51EP7oiAyNLAKXWeunyEYaM+bbVZ392jo80p0pFHewPh nxLyPVXz3aLcgi2egKPlYw/C69ILHrwS/EJKLeFUn5MrqfFFdpKFiPoBz8FW2LUTxX8s bYHrQ76/6tH1lDvxAFleN93PUHoiWy9rOgofpJG2Z6tbmSucisSelY/dq9WYsDljCdBJ M3sKNZv3uwVwnSkh7xR9hmqL1F8qXf90EE6F+9ka14AempswrIgnT+UEDKuxk2mLAqS/ MaaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542838; x=1742147638; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f4Sc7hhTcdoZP5mVK5+fnzgoyi3IuMpFTmnfFiAgyFE=; b=eWCk/gpYRLZOU/1oDdq24/TYbbp4aF15Yu2uB6d/QY7mbjZQPrq6p4RJQjILSRsdi9 YDwH1vTjhMdG5YwuBtwwlfeqzzxwUcMU7QUYYrjaLJ/aiiyd8SlKqGUhU9fWcksmDYtr mmNKmNouxFkJyODL4VvV3JsDoDseyfz6qwSaFOdUFqQev/JYXgkKEu4eo3g1iyQdpsD6 kciVlzCrzupgMvLLqFv2MCk1qw9x1dgsPdRzUJIUdaLLfKUylG9zBtxyzqbzXq/sEb8T KZnE9npQfFwR8Uh0SlcVweASRfxwx5ke///lwVBIehrYPaghMQtIZtrZgGIZTb6Fru9h NZmw== X-Gm-Message-State: AOJu0Yyt/Jt+ptiHdTQU8BjQNKMDzAi/NEyjZpRbiE3KzC4jj4qB4s/w 6JCI/23kH1C5Ft39X/+g/GR782hAI3zo3kORbzvcKC9EVV5uIhXEScbfGANXUUpALKtEVp05XdX HYaM= X-Gm-Gg: ASbGncvcUanGDAzE1cR/UiZgDLBUeYm1CVkWfXBkEeDWZHZOE8JGIm7yFiXI9MaQi/F sK7Zye8RFd0aDX4Jkd45KUjAe0/VDSkJfAw9P3c350xfoCHdrhYGtu6e4awtI7VwZ8lVvWpTe32 80xkgDixb/vg3UsiVlQM0VH7QWmiteS+C4/G+YRwBGf4hrTJE1ACOEFG1wRcI4phxaFk3aPVtMD WGQrI08G/3uUeWQoMIR92iQTkYh4Kyjio0rsQkKufnD4qWMEiukgCvkkT3UhzYMgQSs4tD5GwM3 07Q19bqg5dBmCGc8SPP44hPy7+ndLOIQuK4096rpquk+CRwKfEmYpvb3+Zajz9jkqNCjTouQeUo yT7rxfww6TiqyMWqJoJQ= X-Google-Smtp-Source: AGHT+IG8Olbm6viAoPF8ztLNYslyGWlDoIzpn/8K4E8UZ6aI3crlbAzn9i8c3tY0a7Ytv1Nfmn+RWA== X-Received: by 2002:a05:600c:4f09:b0:43c:fa52:7d2d with SMTP id 5b1f17b1804b1-43cfa527f9dmr1992225e9.20.1741542837897; Sun, 09 Mar 2025 10:53:57 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 23/38] target/loongarch: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:52 +0100 Message-ID: <20250309175207.43828-24-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741542867757019000 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-11-philmd@linaro.org> --- target/loongarch/cpu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 49f603149dc..ea1665e2705 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -350,11 +350,9 @@ static void loongarch_restore_state_to_opc(CPUState *c= s, } #endif /* CONFIG_TCG */ =20 +#ifndef CONFIG_USER_ONLY static bool loongarch_cpu_has_work(CPUState *cs) { -#ifdef CONFIG_USER_ONLY - return true; -#else bool has_work =3D false; =20 if ((cs->interrupt_request & CPU_INTERRUPT_HARD) && @@ -363,8 +361,8 @@ static bool loongarch_cpu_has_work(CPUState *cs) } =20 return has_work; -#endif } +#endif /* !CONFIG_USER_ONLY */ =20 static int loongarch_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -885,6 +883,7 @@ static const TCGCPUOps loongarch_tcg_ops =3D { #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps loongarch_sysemu_ops =3D { + .has_work =3D loongarch_cpu_has_work, .write_elf64_note =3D loongarch_cpu_write_elf64_note, .get_phys_page_debug =3D loongarch_cpu_get_phys_page_debug, }; @@ -920,7 +919,6 @@ static void loongarch_cpu_class_init(ObjectClass *c, vo= id *data) &lacc->parent_phases); =20 cc->class_by_name =3D loongarch_cpu_class_by_name; - cc->has_work =3D loongarch_cpu_has_work; cc->mmu_index =3D loongarch_cpu_mmu_index; cc->dump_state =3D loongarch_cpu_dump_state; cc->set_pc =3D loongarch_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543100; cv=none; d=zohomail.com; s=zohoarc; b=GMW8w9XlGrubHxh0YH8Iwyn/hE6CKVvxUPn00zlFx/KCLrhTzoVA6stbFuKQIZObxxFZfivZ1Mh4QPmhlgpK8ZZld9XPORXVT433D0SHfk0c2UV3kIgzxUb5xyj0Ysu5JSc/JpK95Tz+puIndpD94DwzArLd8fr0hPFgig8z29c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543100; 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=EZvFiK30N39QXumXvDCwk1WrhpzfFLfGAKWY9PgROns=; b=T2BlB2PyD82gQfj+e2xgOgrBeWdBN2QpqDL+YLDTzmL/DlJh29TGdH6csKEuInN7/u3F7tFZe8XCSggEoV+QOKX9z9iBVXsg36qrlLr+grXYLk6nYhP1coHaObDvUHzwWWbEFoFkjjKlF0az2fvvU57SIXD9s+3swF2fz/DLo64= 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 1741543100925758.6500344254695; Sun, 9 Mar 2025 10:58:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKr3-0000IT-PN; Sun, 09 Mar 2025 13:54:25 -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 1trKqk-0007pb-H8 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:06 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKqi-0004zO-SW for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:06 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-43bcc04d4fcso20302765e9.2 for ; Sun, 09 Mar 2025 10:54:04 -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-43cf515c580sm19938565e9.15.2025.03.09.10.54.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542842; x=1742147642; 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=EZvFiK30N39QXumXvDCwk1WrhpzfFLfGAKWY9PgROns=; b=BBvMYFHY38x8cejshwllHWmu+H9BcBTW1/xhYX6khlICPpFCMPjvbcdIykVg5RW1wi CbUa5Je70LmM5Z7l3AjwvbrbEvd9QCMu2bn8M1wQZ2pHWfwj8aNVDs75HQ+Hwi05SA89 NPyKECXapiFyi/62IyS2Br7brPccbgCG3nPjoi2v6b4ypdNrcRdADiJ7JM2O8IkycDWq kh+O/kUacK4il/M1cXB9CcfOO0kwPkpOuAIY0j7wyAxlN7CRrKzR1HE4V1BdKmIYKC5L DKTiUeXBTE+oY5srczbQsp1EdjNnKUXFN0hg8gvCHO9FHI89YGNzs8x/cH0PhbAW7xkP c3yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542842; x=1742147642; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EZvFiK30N39QXumXvDCwk1WrhpzfFLfGAKWY9PgROns=; b=uJZ/4VqwxATCmP5uy+aZxrwSodTRzSPwCNZoBtMTV+XYHBZdWmYtRgkME0eZf0/ruh 8antLVFPfQsZ97KiuOS9OsTREUCFF1PIhn9fMwoxu5xQBm1afFDOFSLl/pkODtstNE3i WtJc5ve7vTQGdmCLPNjIkpnoyzU857tD7KSPxc0yTNc4nhr7QjDc10kTkG3Nzbr68iuf zJLCBXPLKUgyZsYzGohjYfSrF0X/F84RFXG//V8p9l8lZ2UXofjanBqD2xiTGTmgzQ94 BFkrJ0vrvdkfdkJ7A642AWAc1HoZEnhItSx8HjzaIbHFEgV9QfWMwjetZyc+/wUSzHaI Mjfw== X-Gm-Message-State: AOJu0YwRDuZIO+rz0NJLtl82umellN2QBDO52edm+NiItIFlf9uG2S3x tawanYlVKePUUqeOY442V4b2zT/LxjxTUueeJbW0SaOUa+sMnuRykXDakfOh70/+eTocykpXmE0 fW3I= X-Gm-Gg: ASbGncvt8ZBNYuKEbFWCtSqBNGW8RYBT7RZlsfDg3sy2ytds5pbLLm/HZMjr2i15aTR EvJdRUQa4TwqxR0w5pQkgsCo6/kO5dRPBTIsYcMMRd0w3ywMR5rzBbIMQmP66WcCOwshNR35HG8 eitFfj4YU57x/4Ei6H81XNMAwVYjceH22Nld2gx7PfngKipYc+kD/Vr6QTA9t8IVeNKT9xsHkYQ pjiLgx+DXEDQBQerncDEm50SyWxKUbMgo4BKNfHwFR2RXsZaaN0+LeC1pbYNbzREROU5xdH68sz OHZQu0+diT5aRWFkZlHXLuZvYc77j6NrsIRNsPc9hm+uKeCCMhC6NpJ0Nlc0Fs6e5Jic4z0RSex 2q4T3v/CooBl7dkreHec= X-Google-Smtp-Source: AGHT+IHl1QBXikP2rhymcW1T/1oessap/+xX3/cRIYRt6i2kpQXj1JgHvvFrVHT8Rdn86kmeiiqMCg== X-Received: by 2002:a05:600c:3ace:b0:43c:efed:732c with SMTP id 5b1f17b1804b1-43cefed7884mr15549825e9.28.1741542842483; Sun, 09 Mar 2025 10:54:02 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 24/38] target/m68k: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:53 +0100 Message-ID: <20250309175207.43828-25-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741543102376019000 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-12-philmd@linaro.org> --- target/m68k/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index df8b9c53fca..0065e1c1ca5 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -51,10 +51,12 @@ static void m68k_restore_state_to_opc(CPUState *cs, } } =20 +#ifndef CONFIG_USER_ONLY static bool m68k_cpu_has_work(CPUState *cs) { return cs->interrupt_request & CPU_INTERRUPT_HARD; } +#endif /* !CONFIG_USER_ONLY */ =20 static int m68k_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -579,6 +581,7 @@ static const VMStateDescription vmstate_m68k_cpu =3D { #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps m68k_sysemu_ops =3D { + .has_work =3D m68k_cpu_has_work, .get_phys_page_debug =3D m68k_cpu_get_phys_page_debug, }; #endif /* !CONFIG_USER_ONLY */ @@ -612,7 +615,6 @@ static void m68k_cpu_class_init(ObjectClass *c, void *d= ata) &mcc->parent_phases); =20 cc->class_by_name =3D m68k_cpu_class_by_name; - cc->has_work =3D m68k_cpu_has_work; cc->mmu_index =3D m68k_cpu_mmu_index; cc->dump_state =3D m68k_cpu_dump_state; cc->set_pc =3D m68k_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542972; cv=none; d=zohomail.com; s=zohoarc; b=M6Os9XYw2Yxo/dO/zajvUdTt4WdVOfAgHxZ8Cio22C2bCiCnG0V3j+qetdE1wRzVX8GObFe0BEcK4hJCZq60asRWv0H2AyM9i7MpAGBZW/Y1Xg+Lncw+ZMTQvZFyAnRC8bJXr+DKGWxTe1SS+aGu896JUH8vFoZgAdhbWL8wgGM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542972; 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=wdD1Qd8KNe+bgctCgH2R6pDa3Tl0+wEQrO60raHjwyg=; b=PqGe5/e5iKG3ad/E9XL6s8a8LukBbskgweZ7isJgzy7HZVVi5g/wPnasbwp+0LuhEYuuHq/+UAQ54h4bifuVbV/3WPFgzPMQUQXupksfaD/iJyIb4CceABN8zxaFY6d6eCDKEgshQoaadZY3ULZ2xGP/1hZXGE9ZnnVCBSVVvH0= 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 1741542972960516.6859428498379; Sun, 9 Mar 2025 10:56:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKqu-0008PJ-8T; Sun, 09 Mar 2025 13:54:18 -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 1trKqo-0008Es-S8 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:10 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKqn-0004zo-1r for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:10 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43bcbdf79cdso19982535e9.2 for ; Sun, 09 Mar 2025 10:54: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 5b1f17b1804b1-43cf279a1ffsm26151285e9.39.2025.03.09.10.54.06 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542847; x=1742147647; 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=wdD1Qd8KNe+bgctCgH2R6pDa3Tl0+wEQrO60raHjwyg=; b=WyHLghVuKtgBinojz6A31ft6oqe6XC+Vnw9NbrAUeErEcoTWKgi3j9fm5FPKPind6i iuWjIcEWiZv903mq45+bt5ai7IrWloi4drAnZPhTYqJUcWjQ6/tj5INVcbdf6MAEbSvn zT2lp6zluvchoMUolfxaGG5BFkmcfJu2I2b2FQEvQyr9cLvgLQzHwhxDEgke5kaBwJo9 bWGdNYHfntxj0Laser6TJy5KvVCNo32QsriRpwZkot0BmDmCz1QHqocgk3Jq0gBL0aYa QkL9mchDZIg19AB+nCdXqpi9Fm5e8A/KvpgRvuSYYDDzspNYWol6ynYFXGYXd/DCSfsh NXXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542847; x=1742147647; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wdD1Qd8KNe+bgctCgH2R6pDa3Tl0+wEQrO60raHjwyg=; b=UlGGJGS5q4PWf+a6Rq9M2XTZ7opWU/nI0cSxDhuSJYW+Y+hV05QKZFG/LVfwBn34bj SQnWp3v8DZ108nALYBqHLs6tKglZdkoosmYJzGr5a55vIoW227dWKGxw3hH/KNfBqqTp lGdt3/orsdUrsQ4ag16NubAxEsmO8fM/ksoIjLjCF1vNi6R/ZTxTyPCJnBKv1kE5qITm XUIKWpG8QhdjmW/2ufoIZ1eJkUnXY0mPLZheF5nZZeram7C72JGnbgVBYq6ObFmndS6H PZEXjjB5HBxBDSAGSwCNCEYlRZKPla3YLhurC6MPgE9YJ9XsbqiB1aUMxc2r7bHLSyec jUiA== X-Gm-Message-State: AOJu0YwLau83kj47X9J+t2ZDocNz6owXCVJBVAn8D6AMrWIc46+9haCe imU0N4qKJI8wXHJl2q+3KtisSiaL9hDqKb9VCyITK2J7yixXD588PYEAXsK++sgq+XkAVBBy1Ie TK5g= X-Gm-Gg: ASbGncveQM2A0MrV06nkiAxYg7WcXB1F2vlsSOAJ+yqxP7/5dspuwzBjenXimdqUj3S 8OQvPA7WRp4ionW3G4SMISEem20Yj7MZ76C4zs7hbGUFbDq+BK7kwqsgQWaT5p3hnJj9E//I7kP DwMh4gbN9O67qhr/3yAHf1CzmpFjFiu58S2uRguSbX3TMXZJwgXnbO9BCa/jExh80zgFx9/hXSD JxlPu5fKgiaPa86xFd+7HeyoYaCyYposXLWhEWV95AjVbEbC5RlgZXCAWmS41oSU7LIuKckkjbl vXxzwaCTk2H328rKqW4S1av24prqb1wOupCYyweCTSS1VsGD5XzQ+lSHfl5tB3jaNAqVQ5AZBzO iY37VPyqG9GbcNYZMgzP9FjgGS4qeIg== X-Google-Smtp-Source: AGHT+IGAFztx6WSE6Da2uAD1PzSy7wRzFymwUmzlctqI86P6x42KHXqYXUuFF6ynKhLC+lFwV2UgUg== X-Received: by 2002:a05:600c:3ba7:b0:43c:f4b3:b094 with SMTP id 5b1f17b1804b1-43cf4b3b345mr12075045e9.6.1741542847222; Sun, 09 Mar 2025 10:54:07 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 25/38] target/microblaze: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:54 +0100 Message-ID: <20250309175207.43828-26-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741542974029019100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-13-philmd@linaro.org> --- target/microblaze/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index d5ee1244cad..f3bebea856e 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -115,10 +115,12 @@ static void mb_restore_state_to_opc(CPUState *cs, cpu->env.iflags =3D data[1]; } =20 +#ifndef CONFIG_USER_ONLY static bool mb_cpu_has_work(CPUState *cs) { return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI= ); } +#endif /* !CONFIG_USER_ONLY */ =20 static int mb_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -417,6 +419,7 @@ static ObjectClass *mb_cpu_class_by_name(const char *cp= u_model) #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps mb_sysemu_ops =3D { + .has_work =3D mb_cpu_has_work, .get_phys_page_attrs_debug =3D mb_cpu_get_phys_page_attrs_debug, }; #endif @@ -452,7 +455,6 @@ static void mb_cpu_class_init(ObjectClass *oc, void *da= ta) &mcc->parent_phases); =20 cc->class_by_name =3D mb_cpu_class_by_name; - cc->has_work =3D mb_cpu_has_work; cc->mmu_index =3D mb_cpu_mmu_index; cc->dump_state =3D mb_cpu_dump_state; cc->set_pc =3D mb_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543118; cv=none; d=zohomail.com; s=zohoarc; b=JNYjnVQSYtN7MSvJbR4/YdeZDwIuRWebLPbVIgD6DtW2E8MI+JNeIaVL4Z+mCv30JaMPw4aN2YRG2ZmeHax+TQEqUW24KoTuNn0hFmVZK+hVV+c8Lmf9GN/97tfSLw+NYMnek11It3yOOPV9CaYKYvJaQGGv1tzDlZt+J9UBsk4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543118; 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=4ROoqZyq+JYACAQOwfrSif1wT020r29BY9+8qi9Qxys=; b=Wvy7ITpvAg2G3PVPKPG+cnG4NGs0zrKs2mdWA39kysf5QPcBluYQCHkE/t01QaUtStr8mDKJcOpXnbfR97/ffewt01DEky1OT/k9ywkG8+QwCVDKVj/l8nux2slnrQiDRNqc6+CvMRWlIz2Ehy9vb9jKJDqNMWRcQA3Tl0x0VHk= 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 1741543118867933.0592193337125; Sun, 9 Mar 2025 10:58:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKr3-0000JL-VS; Sun, 09 Mar 2025 13:54:26 -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 1trKqt-0008RI-Jd for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:16 -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 1trKqr-000508-T1 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:15 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3912d2c89ecso2907020f8f.2 for ; Sun, 09 Mar 2025 10:54:13 -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-3912c01ebddsm12728542f8f.60.2025.03.09.10.54.10 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542852; x=1742147652; 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=4ROoqZyq+JYACAQOwfrSif1wT020r29BY9+8qi9Qxys=; b=XYQ8nfhOq1F/jzwMEgi6cIXo1LjKlD256tSyRhHZH72DGFG3/2gAV8RAnw/kj/QWek eC8qo9pICbM389I/fPPpxNZhclcvJokQ3dl4eNEF41jx90uErUaA+sSWK8F/Wa9t1uj/ WjzmyKif4nkgH1X/1JGPA2b7FYguVXA6qTjdAbK+w/6AgLkgv88gHyKeqah1NNyFtK9K 0WfffFsMYaVCV4C3kHCtoL/DfO8jQyzt1kZmGb7OcI+FjKyvDmbaxd5oWowUQl0hCuLL C0p9QdYNDYbPyy2neGZUfY/8x22vW0JeMUg7Ovg2yZOJs7RQ+aKPZkG3obTQCfRpfmiC ci9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542852; x=1742147652; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4ROoqZyq+JYACAQOwfrSif1wT020r29BY9+8qi9Qxys=; b=dqt8+QmSEbbbGRn+8U5LViJzN019Np7QzSey1uyXNLky+hGmpU2iBNXoyl+XsO+00M 69OH3Ab5XwsLKnz87beLk44pIqWNfM9UFn34ROzx6E8pG6rzxaHH4cXWub/sd8kcPDMT HPjuiKzVCSCONAGA3aeElJLA5v02IUvdqIJzJMt6ggIkqIsXyQQxbQkEEuKSBwJGzg6C dy2YZ+KOkEw8EXf5qjSXMtGD0oWpzsGFlkUBt3cLxMQcWaKQppflC9lCLXj5l0aVx65U Aybc8kS3rOR44Zh87JU4AM/iZgc/n1LPf+TkX69jbinc8ELxPiJFLQ4y8onBRzJQ+YAG PCWA== X-Gm-Message-State: AOJu0YwH3LppezVG3LHNwMkPoUd7PAhUDbO/xZFpIk4viLoRFSP8tinZ SLAkT/rBq7MUTDYq+ydEud6UmoghX+PCYs5Hk+3Kopwj9V4gfoQxfD68Ea+luzvyx5UwJ2tnRWY +P7s= X-Gm-Gg: ASbGncvzqjyReqtUoqsmFpl3hcR8Z5D+PdIjc991skhnMpGQKz2so+HtVltJPJcTf5X HVAIJi68gBe7YOGPpvoo/mWeIDNRfrwB+xKgE32K3Npl1HJyQeHuu4rXqjWPpJoJvslx4cA+ojj Lrgb8VkM/UOVRgWYa+xYUfPiEHUyPJbMxihIN9nFNXKek/rnOvoVwGiE4KS7eP5vncfG/EYqhPA m5eq1twXDCCgYc2d6UGiRBYn6vozVvZZwgf8vV6Fmi9R8Zn8CPdsxP/panU4oiUS7BMOGh3Q6AG byDPzuNYQ8Q07WND+xcZMUuMZTzfk14rTb0DlZXzlMWvF5A/RVw0GaN6eUvu1k0ztiYbGT+wRcq Tq8g8jGAwhsdK2X4rK5U= X-Google-Smtp-Source: AGHT+IGsq15d/WrgN/FzkgoL/Cmsg3TYiS//QTc2+OKBuUUiFb2QBSDnaAGrO1hmyAwIAUm/L4F4qQ== X-Received: by 2002:a5d:6d8c:0:b0:391:2a9a:47a3 with SMTP id ffacd0b85a97d-39132b5b802mr6855978f8f.0.1741542851926; Sun, 09 Mar 2025 10:54:11 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 26/38] target/mips: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:55 +0100 Message-ID: <20250309175207.43828-27-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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=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: 1741543120435019000 Move has_work() from CPUClass to SysemuCPUOps and cpu_mips_hw_interrupts_enabled() to system. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-14-philmd@linaro.org> --- target/mips/internal.h | 4 ++-- target/mips/cpu.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target/mips/internal.h b/target/mips/internal.h index 91c786cff8a..28eb28936ba 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -162,8 +162,6 @@ void cpu_mips_store_cause(CPUMIPSState *env, target_ulo= ng val); =20 extern const VMStateDescription vmstate_mips_cpu; =20 -#endif /* !CONFIG_USER_ONLY */ - static inline bool cpu_mips_hw_interrupts_enabled(CPUMIPSState *env) { return (env->CP0_Status & (1 << CP0St_IE)) && @@ -206,6 +204,8 @@ static inline bool cpu_mips_hw_interrupts_pending(CPUMI= PSState *env) return r; } =20 +#endif /* !CONFIG_USER_ONLY */ + void msa_reset(CPUMIPSState *env); =20 /* cp0_timer.c */ diff --git a/target/mips/cpu.c b/target/mips/cpu.c index e76298699ab..b207106dd79 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -132,6 +132,7 @@ static vaddr mips_cpu_get_pc(CPUState *cs) return cpu->env.active_tc.PC; } =20 +#if !defined(CONFIG_USER_ONLY) static bool mips_cpu_has_work(CPUState *cs) { CPUMIPSState *env =3D cpu_env(cs); @@ -177,6 +178,7 @@ static bool mips_cpu_has_work(CPUState *cs) } return has_work; } +#endif /* !CONFIG_USER_ONLY */ =20 static int mips_cpu_mmu_index(CPUState *cs, bool ifunc) { @@ -534,6 +536,7 @@ static ObjectClass *mips_cpu_class_by_name(const char *= cpu_model) #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps mips_sysemu_ops =3D { + .has_work =3D mips_cpu_has_work, .get_phys_page_debug =3D mips_cpu_get_phys_page_debug, .legacy_vmsd =3D &vmstate_mips_cpu, }; @@ -577,7 +580,6 @@ static void mips_cpu_class_init(ObjectClass *c, void *d= ata) &mcc->parent_phases); =20 cc->class_by_name =3D mips_cpu_class_by_name; - cc->has_work =3D mips_cpu_has_work; cc->mmu_index =3D mips_cpu_mmu_index; cc->dump_state =3D mips_cpu_dump_state; cc->set_pc =3D mips_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543027; cv=none; d=zohomail.com; s=zohoarc; b=iRPMNzeB0xtp/rWHMjg3E0zxQCGCJPyJTSkI0K3Q8fzyOS71H+cQ5nveGjbJvPXNCNJvnSHRxp2w74My5COSg4hJUGYVyPRDAinrgNl4g1SB5Gbl7xAECzZz2U3PsdiudcLaaSO31YUGgEfhlxY2Pxd5K0WOemWVHdwf5TemTOA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543027; 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=5EUWAiewtfRh08yxfu3LWHBkVUDBiRO2vbKbcT61Kuc=; b=DqcLDsW+KTcfsFZGl8L5lN2GTkSF7GESr7fy0Sze3du0oU+0jKOAgoXI13tMdifLU8S8HFF1zHuN8jPeAu6Hmpa0CN18M/gM7uw1kQBh3ujkdwNQFuMr4HiAon8fdc+TLYwgcDsRdyoV1TYscAQ+qITuBKxuq8bA2CFr2n6dBI8= 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 174154302789697.10602284962317; Sun, 9 Mar 2025 10:57:07 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKrA-0000Ou-25; Sun, 09 Mar 2025 13:54:34 -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 1trKqy-0000B2-GW for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:22 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKqw-00050s-JB for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:20 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-43bd03ed604so29851405e9.2 for ; Sun, 09 Mar 2025 10:54:18 -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-3912c103f57sm12480089f8f.91.2025.03.09.10.54.15 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542857; x=1742147657; 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=5EUWAiewtfRh08yxfu3LWHBkVUDBiRO2vbKbcT61Kuc=; b=v/HvF4tVkWRYfjdrS3h3B5Hj349w28V1U1EvZkbL6a0wjyAYszvoKqQ7Fhjtgdmscj G26qF0ssvaItusWTycS4BoxpAAcvHZucP6CHktHLzdepVaKfoORugwZ/3tb2I+32eksH 5hyiFOt6IUHvTQYO4fvhpyd2MhZhKtzHXgvCtXWPVhO9NMaMPlqJ4KuU/pHnPTSyh9m9 kcxX+bopG6Bvawq6uUzreMCtjq15CCBLF9fXJH0Gf9/CYlBrKmvVc0XcEliomZPg7N03 1XMKGiqsIEplN2TRJ5SqCCrlBQJ9PzM+SelW/vDmSkQxYkWUQVvNrjXpWoChYLBZMTt0 GDxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542857; x=1742147657; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5EUWAiewtfRh08yxfu3LWHBkVUDBiRO2vbKbcT61Kuc=; b=MriRF/mE/XbJ53JgCROVlzKG8vPdz7nbAPlvzTJyWoQ5Zshj36BO56gSiV+ke8Fq3a Fjrk2ch5ZWOWowCU/gnGBwJYb3YK8KpFDpDyc1Etd4YyoJVb7NgYd6uVBfp1IIdeX6rY PnLaG+0GWNXt468CjVljAJbwhhV9QG4vTNDN/Nsd/XEGXoNg81kYx1p0V6Ox3QXjZVm7 x3WlJaWnKz7Yr5czQwbqhxsrIzYbOErZGe0dckSVkh4lxmOaYhEbWzwluoAubuNE+c0p MQFC2kLMGC+1CX5JpGMi1cvPOD0Uw0cTT31WlSkwVAd6SSpd+Us0BRvhqvsAr60r/U4n lplg== X-Gm-Message-State: AOJu0Yzfg2NSfOdrTY1OUuJ5mhz6YvYpEwKC0aYR3TLQilo8qV3FjCSa Og9FFJdBMFxUv1UesAXzB8N5A2vuTnSdj5D0I3v3hbX81fJWBh5WdtSe83qv0T2koBA6okay+/5 SKHA= X-Gm-Gg: ASbGncsyv774DoKdkYbcioOjq1a9CTMiHbW5bZcHuk+WLLoypkyS1jVpH3Yo+dbH7kh 3ygU1vHmIcjwshmOHUPv+K1U4lhj8RQrKV3I9UIIW4a5VQUTp4lN4LtUrt+dasX6obhWj3RPKuv /rEzJzSfjekCkDseXbJ5Trj3u3PMWBM0sVUC5vWjBMp3QQW8vCiSETkho03NeN+qjl51naCHl2g HlaMkBtBpNaxD/y7DRdPVwCDFeN15EW4WR4tOo/3VXX44ypRNstHFGopn0liQXKX5GKvV89Lrop altMm0IW1Oq2ArC2SuTOfItOoDgWzEf2nYqWulWKZ2lDnkfoURf9wL3Gv1SCUsKRDNKOYRocaPa HjEo+rFwm9OEKgvKV0ao= X-Google-Smtp-Source: AGHT+IFTdVkTKhqOY1yXfCcaUp98wmE7hgMIyQxQpQh2iq8MoehNQo7nN+2gel2cBk1RY8zpDdokhg== X-Received: by 2002:a05:600c:450d:b0:439:7c0b:13f6 with SMTP id 5b1f17b1804b1-43c6872e1ffmr77332915e9.31.1741542856644; Sun, 09 Mar 2025 10:54:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 27/38] target/openrisc: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:56 +0100 Message-ID: <20250309175207.43828-28-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741543030264019100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-15-philmd@linaro.org> --- target/openrisc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index e8c357ae836..e8abf1f8b5c 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -63,11 +63,13 @@ static void openrisc_restore_state_to_opc(CPUState *cs, } } =20 +#ifndef CONFIG_USER_ONLY static bool openrisc_cpu_has_work(CPUState *cs) { return cs->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_TIMER); } +#endif /* !CONFIG_USER_ONLY */ =20 static int openrisc_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -233,6 +235,7 @@ static void openrisc_any_initfn(Object *obj) #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps openrisc_sysemu_ops =3D { + .has_work =3D openrisc_cpu_has_work, .get_phys_page_debug =3D openrisc_cpu_get_phys_page_debug, }; #endif @@ -266,7 +269,6 @@ static void openrisc_cpu_class_init(ObjectClass *oc, vo= id *data) &occ->parent_phases); =20 cc->class_by_name =3D openrisc_cpu_class_by_name; - cc->has_work =3D openrisc_cpu_has_work; cc->mmu_index =3D openrisc_cpu_mmu_index; cc->dump_state =3D openrisc_cpu_dump_state; cc->set_pc =3D openrisc_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542946; cv=none; d=zohomail.com; s=zohoarc; b=aBQogLnZoq36WySss6pgzC98RSn2O8cSqEiqSzCrRQZCy4PdwFOgPwB1lWWKeT300sYY45sXzMjbqUIvH7BT3XM8lF2o44r9ztC42Vi3lXYEJal3ZPZoO6qOo3x/Aa4zUgPagfwPr62iCnEw8Q2bVfPLWUM09hkWPhop5P6CXPE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542946; 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=lcTIwAjoTMB8eVBQGCbaNsn82UFv7iyVqN5YJu8k8FE=; b=FctVSnqkrbKyimW/KpPrSlltpQ8cI88kMibip8YkIjbn4SBlq6yqp7XatGhIaC76UbYJ+h9R4u2rr/gZMeSX8/m2Gk6ufnY+XywIr8vSiC4RZLM/sMNSI7TA5baR18LQ20J7HWQMMfVUE8ZORg8/Va1Ql7kmBiEnGWq8VI/BK5Q= 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 1741542946198994.283591920683; Sun, 9 Mar 2025 10:55:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKrP-0000jZ-S0; Sun, 09 Mar 2025 13:54:49 -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 1trKr2-0000Gj-Om for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:25 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKr1-00053t-6o for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:24 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-38f403edb4eso1848102f8f.3 for ; Sun, 09 Mar 2025 10:54:22 -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-3912c01567fsm12236402f8f.41.2025.03.09.10.54.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542861; x=1742147661; 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=lcTIwAjoTMB8eVBQGCbaNsn82UFv7iyVqN5YJu8k8FE=; b=xE3hFTP3avrI8pEAVGd7vL+EiYpFKogjGPej+tJHUWpAf/UmxnDgp7E3q2juG7LXGB NC4Tk8HSqc4UkYVu2MtKmuO+NHMDyqWpsx0+1jQSslHRQRNPH6fUi8gB8w6UqNqZpJrp A6Mybc3U7EFeUc4ww3K2fmqWy7OwONSxWFZ33kkdinOnl2ctiTbUCe1AtEsNCK58Layl mfhuxlG9eYxvLmG1HxZmgbo2HNV6dUPpBO0MCx391WOGHlsxl0lScG4sZIdIcSDycYlN JMYfuBugG7QlootbaylGHbcit5ryyvUMpn7vr/ebTdLOSjoNOyZONzqgDtx5P4izXL5w ZaKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542861; x=1742147661; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lcTIwAjoTMB8eVBQGCbaNsn82UFv7iyVqN5YJu8k8FE=; b=VBpuE1XE4LEwnrKXI1xMCHY+IrEXmF+AIZRwBHkTvFB+JW1ImZHG3UyiFqYbEk4L1I zIwlFFCpC3xyvjIc3VrhSqGU0OT86YgzRqYiCwwqnEsr+tCcCN3rRfi5l41QlfKnHe5Z GCeIbquGUJfMAimzsvK3wv8rVUKHL65fqCDaBIb70eoxbcGmB6VLcHqhgjedY5t/QbHv LJfsyARFc/DEPAD0kmfzF0cOv6R62bnI7ifwPZm3oUnkF0d/9s+YTqr/iN5UWq+yiOuF RRXeCYyksOONnGhk9GNbm1VZH42njDRFhhQYZXctGDFp/jrnizgjuJ2TddP68Xvt+lCp 2/rw== X-Gm-Message-State: AOJu0YxhmhTTxgJaqt2PKNRYYAWoIhRjVeZHcWi/YndHzVP+KnvFSB4N iB2IpaWSGJzBLmKCj7wobx3HQ9AutSfGVsZVK1lVzp/qx3+H1Vir7JZFkCel5zAiqEMcM9GY5gO zidY= X-Gm-Gg: ASbGncs5Af8GEpNALDBdBzDaquhA3LW1QmU3oGKWKCyS8gX0Um9p0cwoxpM+3ag5z/V IpGqLec5ul4WkE/O/PWFWa5WTeBaNhJDI9VQQBCh+jCp635IhlZV5LomPJkCcHDiwD7A4PMVmY6 OFQ1uyBv326tppBu38XUL96Nc4gHzKUl6/NIcNLdsC5b+LcFKBso52bUYj0vkKyROqqvJTpZcsw h+MrmqlRQ+XxRPwESwuQEFhV8k/HLAYBS1bkyTHey4Xn29Rk7DIm67Nv04BU96RVzdOo9bf3mFM G5DizjmFtfJAbwKpOcpiYeDTyyOyHV/CPRAtkDQu1Zbchr+xJaQxKZ26w3qcxkyEB0zfCZSPT5c piMltT1PXqGdeo/nLmLg= X-Google-Smtp-Source: AGHT+IHBqqVIuCK8fW3BE0WMwv8XAzfRk00o0pEuIpitktdpYJ5QJ+6dTfNJgYg9MujF52wBbZ2SCg== X-Received: by 2002:a05:6000:18a3:b0:391:2f2f:836 with SMTP id ffacd0b85a97d-39132d334a0mr6220101f8f.17.1741542861367; Sun, 09 Mar 2025 10:54:21 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 28/38] target/ppc: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:57 +0100 Message-ID: <20250309175207.43828-29-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::435; envelope-from=philmd@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: 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: 1741542948026019000 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-16-philmd@linaro.org> --- target/ppc/cpu_init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index b9772c53ecc..1780cabfc6a 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7177,10 +7177,12 @@ static void ppc_restore_state_to_opc(CPUState *cs, } #endif /* CONFIG_TCG */ =20 +#ifndef CONFIG_USER_ONLY static bool ppc_cpu_has_work(CPUState *cs) { return cs->interrupt_request & CPU_INTERRUPT_HARD; } +#endif /* !CONFIG_USER_ONLY */ =20 static int ppc_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -7423,6 +7425,7 @@ static void ppc_disas_set_info(CPUState *cs, disassem= ble_info *info) #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps ppc_sysemu_ops =3D { + .has_work =3D ppc_cpu_has_work, .get_phys_page_debug =3D ppc_cpu_get_phys_page_debug, .write_elf32_note =3D ppc32_cpu_write_elf32_note, .write_elf64_note =3D ppc64_cpu_write_elf64_note, @@ -7474,7 +7477,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, void = *data) &pcc->parent_phases); =20 cc->class_by_name =3D ppc_cpu_class_by_name; - cc->has_work =3D ppc_cpu_has_work; cc->mmu_index =3D ppc_cpu_mmu_index; cc->dump_state =3D ppc_cpu_dump_state; cc->set_pc =3D ppc_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543114; cv=none; d=zohomail.com; s=zohoarc; b=c1nx8jEifXo4KyS2DXRW7xQHwfgeQ45pUyZiw+9p+vwYx69wwLsTEaGhclPmUNo/OZuqSbNSm05R/TvEYFH2mAIac/08d5TcfnH9JOMsSAYAIkiIqiPT93hskn/ZFUuCGcu2jbURaLE3MFXh8HGj02eO6+r3dGThR1WTqLD/vWk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543114; 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=AvjB3P0WeLn6QuXjictfvS8poYJ3HIL+ASsPoBqctfA=; b=cTH1plKqNC5XrT8cPFle1zK/j6pqqg7WNbrdig/9r6bdMK7BKKdwsaI2YytejSLO6dqxjU34koIN03iZzHScd4c0aDkJLrLugM3dY0ptO0H98CzneqRQh952RU5CeEWBavihdQfM8OcrLTOXdeqmkFZgNVo9d11vYmidNslaIig= 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 17415431146615.266812554659396; Sun, 9 Mar 2025 10:58:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKrZ-0001Gq-90; Sun, 09 Mar 2025 13:54:58 -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 1trKrC-0000Zv-1C for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:37 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKr6-00054Q-43 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:32 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3912e96c8e8so1818957f8f.2 for ; Sun, 09 Mar 2025 10:54:27 -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-43cfa97399esm2532275e9.14.2025.03.09.10.54.25 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542866; x=1742147666; 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=AvjB3P0WeLn6QuXjictfvS8poYJ3HIL+ASsPoBqctfA=; b=xwGtDH8R6K+Ud1/OTFlefXwTUZTu0vUJMQURmFBXEoiOJZGSkd+YfXJT7we6LlShyU ekJ5v1Gk3j9P3eDMSnj/4DFZdkoCm+vx6S4cPlMxLa7kMT4J0lrsVXuslkMwb0kG35Ty jIFks8Rlxw2gXp94GRXjQxP1EmcMmGlmDZ1jLHCDL2HHaj1I7XkhvAjc0dqMZ+9BdK3V tSXG/MAkxm5Uooww+CCYkwJVCA6DJT4Kyq2LQRmZATAa1hmslLIy6Tncq0IW4hN1Pz19 gmP1u9dzgzPqkU8rzzAHgVA8qG6PG5CgeZyHWx7wNqNQty+95Xnr5erkLtXacvTXCs1c dyAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542866; x=1742147666; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AvjB3P0WeLn6QuXjictfvS8poYJ3HIL+ASsPoBqctfA=; b=Z0Y7eYHudsL+K5K8fv6JH9LqnuZQCsN4Xg3H75MsN2rFl7K/b/uPJ7JQgOE5AIzT4f C6vGGSObgm540iwtLl9Dz3CyvcbGVbnBVHMht/dlnSdvs7Ns2UJEGncj27bq8uA1MZcC Rx+SOTJWkRTeEL5tob1AgmKQQqUh6BBBN/X5ixbOeM/8491LDR8aHi6ibvnZVcTalkG1 P3RRkPGgdoS8nFdKaHAYe5rFmUMm/mRA75RDeUinKrUGa1GPrIS52tE26+Vm/EHb6Wn3 zocBtSIqRB2aCHitMljjWX4N8AOGpHZ9eb7aOigZ+SDJSUKA/PQac1hbVfzLrqnkaale g/MQ== X-Gm-Message-State: AOJu0YyPz+EYRg85WcdVFyXv+mxWxjyhgu3ka28XUNzXPsqcJhxczj1p cOLFfYzUK+cpQFtu/L1CMsLR/7rE74RwxF7SaCv4V0y0YYIHo6a6TjAjnO7mGcyyuEpeuM459Fm rOn8= X-Gm-Gg: ASbGncuiNVsCNsSRSXOT4lcu2bV6r/TY5Re1MLJYoG+6lvwQ/WBkqiyPUku7CYFrb7I +J1lh/zMNEQsOWdpdu3zZktdi3rJUdU47O5VeDIGNI31fa8nxENNItoW06W55ZqJJbpyj7/QUSh FJWOwHX1AB3DdAmc0FMOETdY2zvKgqQ7+6t1ATgkUci3inv0GGlUHUUcnMhXGGaH+9TGLzPgVYN qTDouQh9QokxGcpckWdMlkU3b/goah9cyxJhdZTJsK6fT/zm1ICh8cou4r8wUW8MmMuRWU8mbr3 4HYuJrVf/rRMlBKA+myTQrgTuuJrl7hNnVO/JvsITlBoX1IMCDm2ounxAoAJ8y4cAvOl1wWN8a8 OmgUUMv3KYqdmoSvPbU0V56Ld40oIOg== X-Google-Smtp-Source: AGHT+IEXYfgyF/IUzLtxLa83K2GGuWIvkzeW1ji8i7bI+4ynxpJGqDt9lnDUfwc0jRe+Z5qD7aofeQ== X-Received: by 2002:a5d:64aa:0:b0:390:e853:85bd with SMTP id ffacd0b85a97d-39132db1108mr7323981f8f.48.1741542866082; Sun, 09 Mar 2025 10:54:26 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 29/38] target/riscv: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:58 +0100 Message-ID: <20250309175207.43828-30-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::42d; envelope-from=philmd@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: 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: 1741543116276019100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-17-philmd@linaro.org> --- target/riscv/internals.h | 4 +++- target/riscv/cpu.c | 8 +++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/riscv/internals.h b/target/riscv/internals.h index 67291933f84..213aff31d85 100644 --- a/target/riscv/internals.h +++ b/target/riscv/internals.h @@ -142,8 +142,10 @@ static inline float16 check_nanbox_h(CPURISCVState *en= v, uint64_t f) } } =20 -/* Our implementation of CPUClass::has_work */ +#ifndef CONFIG_USER_ONLY +/* Our implementation of SysemuCPUOps::has_work */ bool riscv_cpu_has_work(CPUState *cs); +#endif =20 /* Zjpm addr masking routine */ static inline target_ulong adjust_addr_body(CPURISCVState *env, diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 1c000c30f8d..09ded6829a2 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1006,9 +1006,9 @@ static vaddr riscv_cpu_get_pc(CPUState *cs) return env->pc; } =20 +#ifndef CONFIG_USER_ONLY bool riscv_cpu_has_work(CPUState *cs) { -#ifndef CONFIG_USER_ONLY RISCVCPU *cpu =3D RISCV_CPU(cs); CPURISCVState *env =3D &cpu->env; /* @@ -1018,10 +1018,8 @@ bool riscv_cpu_has_work(CPUState *cs) return riscv_cpu_all_pending(env) !=3D 0 || riscv_cpu_sirq_pending(env) !=3D RISCV_EXCP_NONE || riscv_cpu_vsirq_pending(env) !=3D RISCV_EXCP_NONE; -#else - return true; -#endif } +#endif /* !CONFIG_USER_ONLY */ =20 static int riscv_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -3029,6 +3027,7 @@ static int64_t riscv_get_arch_id(CPUState *cs) #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps riscv_sysemu_ops =3D { + .has_work =3D riscv_cpu_has_work, .get_phys_page_debug =3D riscv_cpu_get_phys_page_debug, .write_elf64_note =3D riscv_cpu_write_elf64_note, .write_elf32_note =3D riscv_cpu_write_elf32_note, @@ -3050,7 +3049,6 @@ static void riscv_cpu_common_class_init(ObjectClass *= c, void *data) &mcc->parent_phases); =20 cc->class_by_name =3D riscv_cpu_class_by_name; - cc->has_work =3D riscv_cpu_has_work; cc->mmu_index =3D riscv_cpu_mmu_index; cc->dump_state =3D riscv_cpu_dump_state; cc->set_pc =3D riscv_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543196; cv=none; d=zohomail.com; s=zohoarc; b=Bo1b3re9adJ9GF+0VnuVZdW/XyckG11CYNvm33iVO8WnF1j8xK2aMqMQJMBAWOo6hMc/os+1Pw2er4swujbmjUPUYRPz7tHYK1rXUCwBx8PWVQiM6400Bjwsi85MG5cdUq2NBhwecBiINqdtOIjNrTVOzJC485eTZJdOetu2KwU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543196; 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=XarkUwWJ8X54NbTT76zq/O/RBy2xGUo3tRoDoM3zMg0=; b=D/42oixRzGUR+BJqUUBzxPGMw9sN6ZPf8gMhuMfdESFtlHNUeCNi+nGhRshzo7XRvTi4GQOUBWa+JWEaNN7CVyKp2rRQWhrkrjxna0DvNonUUtIhz+cMfGW6k10HF7WhxMTT7r+3QQTOw6b51s8auOEclUHs0amF4Q9IC2p6PMQ= 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 1741543196636683.8291386136319; Sun, 9 Mar 2025 10:59:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKrh-0001fv-Sp; Sun, 09 Mar 2025 13:55:08 -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 1trKrD-0000as-QA for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:41 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKrB-000554-Lw for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:35 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-38f2f391864so1837395f8f.3 for ; Sun, 09 Mar 2025 10:54:32 -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-3912bfdfad7sm12355080f8f.26.2025.03.09.10.54.29 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542871; x=1742147671; 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=XarkUwWJ8X54NbTT76zq/O/RBy2xGUo3tRoDoM3zMg0=; b=XHlJWjp703uOUs/hfS7ipIOKX2vpns8+UUw/CWvgYxQglPrfF4iqHskN82LtGo8oho KkQk0MBHhEV2mqaKg0k2Lw3jfZNstZO7yAlOGSjncDdruH47jr79376y1wTWz2TvIhfo ASlTPlZnGsirg2Wp7yJaHQLe7xtv9D9vUdmc9aQmPw8KA6RUqfmfi5i3qLEdxSHOHKvN X8UmcliAMyvAVJx68a4Fh6vI9vaHFQeC6DXJUZvrMUwogODZw9WOLiP8pp4NdibIZ8zv ARhcvI/m0ViD4BegMjWvZ0QhWdC9qHfAuQplr/MHDoQdl98QPRIYhugGHw25RTSswzy/ dVrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542871; x=1742147671; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XarkUwWJ8X54NbTT76zq/O/RBy2xGUo3tRoDoM3zMg0=; b=Z9DK4nHbMV5hWN+o0aAN2DHWteXHf8fSWT85vFA+4bZqrxDe19VoiaEYiF/SwPa1WV 0/851ofb10jm7XfUXJtxn7giPXrtWsaWXLNtY2Aj/MdYjNnzizRM/pX83ZYf9r0N16p0 MRD8PA/26/rPRrCeY5alRlR+AzQVN7o+EVaIi+WFcaT/vaqfQUsuFS3b+Ui+XYVCBHMV zFqXA5QEq9tWCJhpGcN/PZhq0hxoC9Idqt3bpZMe4McHc8tPxOLCgazNz6MaWnIEIYFs L5SsA411UvXG/lE2nbbeBxA7EWba+KFLVbSN9MTSkSkS+7J4K7FS+QLe2CaVuT6umJqa FmcA== X-Gm-Message-State: AOJu0YwDuxrxk9o+QGopGlsrkqFu1D3ZcG5Hk35vfcAbNoigon9teDy5 i2aP+uWPQ5Wdua+0DZ2aAh7C2jQxHYepyPRzOV5TxU385RNJ+KLXRCGjkcxq9Oq1oqfsxCNukk5 imT8= X-Gm-Gg: ASbGncv1a8fsQXvd7wREL5cmXsGVwUuW+4M2GeOgJ2/0JFeL/sLzpk4tHjJCPReCZHM UWHYw9pY4YBwsD+o7w/IJc7/K3rzpBQCTGoToxcMAFMhLhWlsk0zQDoX+zVFKy0yibt4Y18wMKH 6JA3JUHpv1A92b4639+r/exXm6GU+9FJwAuzTHIyA1qtHB4yvQ9wa+rX4kI5gJXn6XkK/HlM39P 1+nPikFKe8teOFqyD6g7G0mOguz0Hq4AJngswNgQBQ+LE5ZNeb29dkFTuAJhpsrreoq0gXbzBJ2 AjagO0UEAJ1pTb/t+TEMwAH6uDQCRFV2ef4UQlSf8fNlLHyV6SI3qkqR59TvHRKsO/8f49tV/KU jEZdJ8FjxxCXrCeXO7u7PTjSY4mLVow== X-Google-Smtp-Source: AGHT+IGSzMNkXvmhM7nzgIZgBLj4bTAPytaIMJ8Jf9d2LJEfk3mTh6IvHJHsLcNSXGwj2Nsv8CJD6A== X-Received: by 2002:a5d:6482:0:b0:390:f88c:a6a2 with SMTP id ffacd0b85a97d-39132d986f8mr8683942f8f.39.1741542871296; Sun, 09 Mar 2025 10:54:31 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 30/38] target/rx: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:51:59 +0100 Message-ID: <20250309175207.43828-31-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741543198725019000 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-18-philmd@linaro.org> --- target/rx/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/rx/cpu.c b/target/rx/cpu.c index f01e069a907..0ba0d55ab5b 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -196,6 +196,7 @@ static void rx_cpu_init(Object *obj) #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps rx_sysemu_ops =3D { + .has_work =3D rx_cpu_has_work, .get_phys_page_debug =3D rx_cpu_get_phys_page_debug, }; =20 @@ -226,7 +227,6 @@ static void rx_cpu_class_init(ObjectClass *klass, void = *data) &rcc->parent_phases); =20 cc->class_by_name =3D rx_cpu_class_by_name; - cc->has_work =3D rx_cpu_has_work; cc->mmu_index =3D riscv_cpu_mmu_index; cc->dump_state =3D rx_cpu_dump_state; cc->set_pc =3D rx_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543099; cv=none; d=zohomail.com; s=zohoarc; b=YYAMqS6/AK7TQEwLEqGAQiGIIDnfvcK7CiuGIPtnvvFvaFXugeGAX6GNdZqhdK+UKFUwt0EG5yWh5vx77JnYqV9ZBKR/P/T41SpDUqE+BGGxKYZPOJ9hg7+EJc0hZ693X3flDKfE2i/Y5wfXnHzFTUUyyEt70E+M7moFpFKyMNQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543099; 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=CGXaL8bhbJQMTQdj5Pf8aW1qHhXb7o/C2DGt766w624=; b=dqKoF4crBu5Uq9hv/Y9IqdDznTswVoQGhO5al+zQSlovHqCpPUQNu1BvfampF/lhkC+fuNmqsvQH+HJNk8RJj9b1E8o5G0P/GkSpc/ThPz49NXvcPr3sDmR3HWmmqcYZH8VsQrbd/yp3vM2m9nEju5KqqDRwj7+P6aScyWyraF8= 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 1741543099702803.1056028585414; Sun, 9 Mar 2025 10:58:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKrj-0001i5-DK; Sun, 09 Mar 2025 13:55:08 -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 1trKrI-0000gI-PW for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:43 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKrG-00055t-VL for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:40 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-39104c1cbbdso1652323f8f.3 for ; Sun, 09 Mar 2025 10:54:38 -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-3912bfdfb16sm12347309f8f.29.2025.03.09.10.54.35 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542877; x=1742147677; 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=CGXaL8bhbJQMTQdj5Pf8aW1qHhXb7o/C2DGt766w624=; b=jEp0PQNjcOj9qQ9rdqRZmHYpQJ8FXCOSGxnrNeY/s4D0wdfDlUfIWUzAxHAQLgJjOX 1m1vXVibGFET/XIgGfqcbY+9AnEypc/5Tdbld0lRkaKVXHxAr7Ud4h25vQCAAALD4xZu Bpa1ymKtaLXsSNExN7K5fp+IQU4GPrl7cHNf5CdKhbpar20NOThBPrsRcU2iyIBLpD9J UDv06W9tdnKfSBHyP6LLq2knLXRyUqzw/Qfc2czufWbDh5hb9jz+6PWbanW7u8vmSxNn d5rpJ3X4PI5x3Ijr98lsw9RoVjVNt+xxVRbr9Xt3EHgEU5raQ33v+ZuJVfKWgcJcJZ8f Eteg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542877; x=1742147677; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CGXaL8bhbJQMTQdj5Pf8aW1qHhXb7o/C2DGt766w624=; b=GN1ZvyfhpJfXMZKDoIE5jAvKDSp5W0ABIGG+Gsi6UJZ4T3XM/UbnVZ4ErqUKzWB0BX ck9Ws6T4YW4XOdsSE3uKPJmq19HiZ+5wT92sm4fqv2RiswPhxcxFc7++RnbmaT0JqLrq UHknO2HmlF0qZAXqSqsWzP9Q67cAQfNBDhZB226K4uoVzz0YemqfscxFPqzkUoVte9m1 OSKwMMOnZgwVwq7L5z6AW8QbfhajeupveDoIAoPspDuNLVHiHRAGyr9EPzNnpWlLd4vG NA2f+s4dpSlarVKikSsS9U/7jgu4R+Qk1XWDPnfCk8ucDfvqiYOAB+xR7PALLy8vgxjd mhDQ== X-Gm-Message-State: AOJu0YxwFopyqh7qlZO7YGofqEf5exw95deqyXPiEW6JCtMQSOvcPVZH LRUPiIP8VlogaFTd8b7Z1+EI9WQETz2OOh74i8vN0ZuuYg/Q2Dato20KjQ4oyr2+AaiUzWptHfh gMDU= X-Gm-Gg: ASbGncvoPQBE+JR1xap/ECT5samx6ktGZncTaGdLDuS5eFCgr7rUUEXfnHfNZTqb0p3 UgrqljvBXRlG58nHaMDMIkFxhgPmFG5eA819GBYtKWoAyKC6YIoAPmoG0RL3BFUj7WlDK7IUnhe 2rJDALLBVyACPONf7QfWCCo2o+a7fd5Mc7kGc+7dAaXwuI9nMSukoZWPD7CzrGOdDIZIOFbjxUj 19WGzsy4aL/MRF1GrjDP8KWS4YEl0/Ged/wlcqv8tDcS72efGP12xAO279mJMAPjZtXawher0uD 3hJ+/FZFcf317ek/SUlzHAQlVQNrJrODiOVkt/p6nyLL32zLXxq3STtSGiXZt77xmmLUQujjmZP K91hAmj3RQHzWxdeyq8s1O/mCBYNGHQ== X-Google-Smtp-Source: AGHT+IEM0gvxMdn/qxT/newV+JdwB5XTKf2HdGUgYcc4nahMLhKh+Z0oCsQeuFcNuNRIvCQfbgle+w== X-Received: by 2002:a5d:59af:0:b0:390:de66:cc0c with SMTP id ffacd0b85a97d-39132de1bbcmr7048339f8f.46.1741542876772; Sun, 09 Mar 2025 10:54:36 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 31/38] target/s390x: Restrict I/O handler installers to system emulation Date: Sun, 9 Mar 2025 18:52:00 +0100 Message-ID: <20250309175207.43828-32-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::432; envelope-from=philmd@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: 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: 1741543102229019100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-19-philmd@linaro.org> --- target/s390x/s390x-internal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index a750e7a343a..6e2c98de97a 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -356,6 +356,7 @@ void cpu_inject_stop(S390CPU *cpu); =20 =20 /* ioinst.c */ +#ifndef CONFIG_USER_ONLY void ioinst_handle_xsch(S390CPU *cpu, uint64_t reg1, uintptr_t ra); void ioinst_handle_csch(S390CPU *cpu, uint64_t reg1, uintptr_t ra); void ioinst_handle_hsch(S390CPU *cpu, uint64_t reg1, uintptr_t ra); @@ -373,6 +374,7 @@ void ioinst_handle_schm(S390CPU *cpu, uint64_t reg1, ui= nt64_t reg2, void ioinst_handle_rsch(S390CPU *cpu, uint64_t reg1, uintptr_t ra); void ioinst_handle_rchp(S390CPU *cpu, uint64_t reg1, uintptr_t ra); void ioinst_handle_sal(S390CPU *cpu, uint64_t reg1, uintptr_t ra); +#endif /* CONFIG_USER_ONLY */ =20 =20 /* mem_helper.c */ --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543269; cv=none; d=zohomail.com; s=zohoarc; b=cze1UyBLBEaXSWKJCYQBjkpJTc7aQnIWTWSAQsYWn+GEMVww6tZQQlwIZec0ajpoEf8skdNUMy0XQ5h9LACALEf25pDmHyZsasV/mMFALOFcxK6eBKFFQ/6siNrZZ/AIRa9W9u/5LwKiLNQNUarF+myJva2DFHSz3mgb7wozglc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543269; 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=6DpQiHTDHBmFHiftaaWk+jex1GHY7T8B9mFbWzo90uk=; b=A2pBoj9P0L15iLBq5cnDohYyMWRorZo02h7WdDZU/iZqhtt4IuPQA6h+YAxgbjyJ9TWOgWy/wrIXI7XIsXy4m3lKYOUf6vJJg4KlNY8bX31tDif+4ibMVLXwFzGeBE3nrsV4W1vz78g0oBG7fUsxvGoMfSy/R53+706bg5IZVMg= 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 1741543269733981.2781691104178; Sun, 9 Mar 2025 11:01:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKsa-0003Ji-38; Sun, 09 Mar 2025 13:56:00 -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 1trKrO-0000kF-23 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:47 -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 1trKrL-00056X-8F for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:45 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-39149bccb69so137644f8f.2 for ; Sun, 09 Mar 2025 10:54:42 -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-43ceeb34904sm39220605e9.30.2025.03.09.10.54.40 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542881; x=1742147681; 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=6DpQiHTDHBmFHiftaaWk+jex1GHY7T8B9mFbWzo90uk=; b=iKl/0SV/YiWdVH7FT1NZa7Y2pdovZoR2VryQ7RItC29Xbou3jK2SY3aEn1AaoO9ZvS ZZR+jrWPHPsFU3h9aWTY3a5r49BnTnZBrPJu5dk3qOzDS+XTOtBJfdHTjEyeJEO9yIFm rsDsJR6v9WzwXTGl1EtPzBekoGhMX29O8djZjH7fsr5fVVjdR1BsLM3FYK3nxM7tOtxr Lp5AWEZN99oamM9glXy1ZKDzMJ97wcjM0/LBgDYGOE3Ww+NMEkLKOQbn+bcQtMAllDGK HVgFbOQIjnNVfcp1Rp4w8fNOF2XOyr46pQhd9s2S5SPM5P3jMJLSoseiCd1v3RbuIM6z C8Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542881; x=1742147681; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6DpQiHTDHBmFHiftaaWk+jex1GHY7T8B9mFbWzo90uk=; b=Wt+0kNwIi/3SKlNkT5c+QvjbdgWhTUCezzyDeNSREOtYUYmOKGR90J/SKBZuFtcLp1 maCdfRfeEJ28IJ3sk1j8fFJ+Cv9aFWidsZ8GxI8GcQZrBOgDqU5n9u6wM0Dx79EUgyBj uKX2GgdcsfjMvHavz1akuqsob0atm3OciDbajclyTRtYZHs3GsuqoJJ+3qi/Py39VGKn Ozq/1n5p9wSmeumGdPzo9CcFi3pHxHzDTFRF2x8cfSXZKRBcMxDRXDiJE/eGLuFyGWF+ 0czzQuy4gLDzaffvfTpOssWXJIAC8VrCBMJvTzQj6W61B6mItnbv3dW/CjxWlHtFZhRP 3FBw== X-Gm-Message-State: AOJu0YwTj4QzGX9OA7z4Iibn414gNqeUXDeCwqyUCQK+X6cC1ABpXV3r dVfkp/GZPVLE+aQmtupaY9pReiSpIvmoaieRTABKqmp7/ftpv2en8yq7B7G11wbnbFBuBGdK8bx 2f/c= X-Gm-Gg: ASbGncu/33/U8sOLj0tPn38mNVU1rszPVyZfTzNqK2g68mwuc1U7wL+r+zoE1Lk/S64 O+3qoX6T/LuZYcSH+8/HzBoeBAXhFu0hZ8lZ2TMJ0zrSvc7Dh4+NUDDMV7ubaD2sLvg2j+Tvunh 8pyoCRHK0jfQ0kW7bT+or20HxPbJhNWYKBdWk1PN8ZxRMi43Vp/KVf4gNxrcr8+MY1ULhKzIMiI 0PvzZQEm81TcB9G5s3+K0B40wyM6pZYCamLWklRthEqbjfFh2aj+4fFT42CBGhC/unsqCLV1eSY yXpiddY9mcfqtsdJn1c4SAiNkcNLKD1E28Xr8VGBj4fVFdGk6Ed1+TORPetAOlZM6maYVqSIhJW yLx+tBk6ITAjyZzTEcEY= X-Google-Smtp-Source: AGHT+IEK6yLenSGyCBpdnYcMi7RnHkMN4Sd+aFrpxbqdeoHpPndgasHAwrqHnEwheATg1POqOosZGg== X-Received: by 2002:a05:6000:144d:b0:385:faaa:9d1d with SMTP id ffacd0b85a97d-39132d98bc3mr8314571f8f.35.1741542881349; Sun, 09 Mar 2025 10:54:41 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 32/38] target/s390x: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:52:01 +0100 Message-ID: <20250309175207.43828-33-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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=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: 1741543272160019100 Move has_work() from CPUClass to SysemuCPUOps, move s390_cpu_has_work() to cpu-system.c so it is only build for system emulation binaries, restrict functions not used anymore on user emulation in interrupt.c. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-20-philmd@linaro.org> --- target/s390x/s390x-internal.h | 3 +++ target/s390x/cpu-system.c | 18 ++++++++++++++++++ target/s390x/cpu.c | 18 ------------------ target/s390x/interrupt.c | 8 ++------ 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index 6e2c98de97a..a4ba6227ab4 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -245,6 +245,7 @@ bool s390_cpu_system_realize(DeviceState *dev, Error **= errp); void s390_cpu_finalize(Object *obj); void s390_cpu_system_class_init(CPUClass *cc); void s390_cpu_machine_reset_cb(void *opaque); +bool s390_cpu_has_work(CPUState *cs); =20 #else static inline unsigned int s390_cpu_halt(S390CPU *cpu) @@ -341,6 +342,7 @@ void cpu_unmap_lowcore(LowCore *lowcore); =20 /* interrupt.c */ void trigger_pgm_exception(CPUS390XState *env, uint32_t code); +#ifndef CONFIG_USER_ONLY void cpu_inject_clock_comparator(S390CPU *cpu); void cpu_inject_cpu_timer(S390CPU *cpu); void cpu_inject_emergency_signal(S390CPU *cpu, uint16_t src_cpu_addr); @@ -353,6 +355,7 @@ bool s390_cpu_has_restart_int(S390CPU *cpu); bool s390_cpu_has_stop_int(S390CPU *cpu); void cpu_inject_restart(S390CPU *cpu); void cpu_inject_stop(S390CPU *cpu); +#endif /* CONFIG_USER_ONLY */ =20 =20 /* ioinst.c */ diff --git a/target/s390x/cpu-system.c b/target/s390x/cpu-system.c index e9f8e7cc72f..9b380e343c2 100644 --- a/target/s390x/cpu-system.c +++ b/target/s390x/cpu-system.c @@ -39,6 +39,23 @@ #include "system/tcg.h" #include "hw/core/sysemu-cpu-ops.h" =20 +bool s390_cpu_has_work(CPUState *cs) +{ + S390CPU *cpu =3D S390_CPU(cs); + + /* STOPPED cpus can never wake up */ + if (s390_cpu_get_state(cpu) !=3D S390_CPU_STATE_LOAD && + s390_cpu_get_state(cpu) !=3D S390_CPU_STATE_OPERATING) { + return false; + } + + if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) { + return false; + } + + return s390_cpu_has_int(cpu); +} + /* S390CPUClass::load_normal() */ static void s390_cpu_load_normal(CPUState *s) { @@ -158,6 +175,7 @@ void s390_cpu_finalize(Object *obj) } =20 static const struct SysemuCPUOps s390_sysemu_ops =3D { + .has_work =3D s390_cpu_has_work, .get_phys_page_debug =3D s390_cpu_get_phys_page_debug, .get_crash_info =3D s390_cpu_get_crash_info, .write_elf64_note =3D s390_cpu_write_elf64_note, diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 972d265478d..d73142600bf 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -126,23 +126,6 @@ static vaddr s390_cpu_get_pc(CPUState *cs) return cpu->env.psw.addr; } =20 -static bool s390_cpu_has_work(CPUState *cs) -{ - S390CPU *cpu =3D S390_CPU(cs); - - /* STOPPED cpus can never wake up */ - if (s390_cpu_get_state(cpu) !=3D S390_CPU_STATE_LOAD && - s390_cpu_get_state(cpu) !=3D S390_CPU_STATE_OPERATING) { - return false; - } - - if (!(cs->interrupt_request & CPU_INTERRUPT_HARD)) { - return false; - } - - return s390_cpu_has_int(cpu); -} - static int s390x_cpu_mmu_index(CPUState *cs, bool ifetch) { return s390x_env_mmu_index(cpu_env(cs), ifetch); @@ -395,7 +378,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void *= data) &scc->parent_phases); =20 cc->class_by_name =3D s390_cpu_class_by_name, - cc->has_work =3D s390_cpu_has_work; cc->mmu_index =3D s390x_cpu_mmu_index; cc->dump_state =3D s390_cpu_dump_state; cc->query_cpu_fast =3D s390_query_cpu_fast; diff --git a/target/s390x/interrupt.c b/target/s390x/interrupt.c index d68d8955b1a..4ae6e2ddeaa 100644 --- a/target/s390x/interrupt.c +++ b/target/s390x/interrupt.c @@ -30,6 +30,7 @@ void trigger_pgm_exception(CPUS390XState *env, uint32_t c= ode) /* env->int_pgm_ilen is already set, or will be set during unwinding */ } =20 +#if !defined(CONFIG_USER_ONLY) void s390_program_interrupt(CPUS390XState *env, uint32_t code, uintptr_t r= a) { if (kvm_enabled()) { @@ -41,7 +42,6 @@ void s390_program_interrupt(CPUS390XState *env, uint32_t = code, uintptr_t ra) } } =20 -#if !defined(CONFIG_USER_ONLY) void cpu_inject_clock_comparator(S390CPU *cpu) { CPUS390XState *env =3D &cpu->env; @@ -225,11 +225,9 @@ bool s390_cpu_has_stop_int(S390CPU *cpu) =20 return env->pending_int & INTERRUPT_STOP; } -#endif =20 bool s390_cpu_has_int(S390CPU *cpu) { -#ifndef CONFIG_USER_ONLY if (!tcg_enabled()) { return false; } @@ -238,7 +236,5 @@ bool s390_cpu_has_int(S390CPU *cpu) s390_cpu_has_io_int(cpu) || s390_cpu_has_restart_int(cpu) || s390_cpu_has_stop_int(cpu); -#else - return false; -#endif } +#endif /* !CONFIG_USER_ONLY */ --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543067; cv=none; d=zohomail.com; s=zohoarc; b=ijjq/gKrkHN6tMDSd5iw2IG8zANrDRwRG+Zg3DYb7zTSzx5nvaYbeazqsa8VbXqhOhB0IBePYMqXjtOxvdVcJhUNb16BUyXsXHyXaPBx8utG8qTBXtJxY2lrOeWklo3lypJznL7ILTDnmDKrxabPr7QYCTkOp7sqw/69qh83v38= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543067; 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=+h0WxWe/CR+AYRisebI04Ld1iS9EZlB98JnRUIatSNE=; b=U2HTPOuhuCIb3sgmIarH+GnoaEtRdA90sh65slvZF2R6oPD7BCrbefrhhz+t5928QHXUxdek69c3Rx3UnU3cDSeH93/4sazasLBkh5q4+f3+tIrujKJeiPIcGeTQdu8CF4F8NHtHaGIEJ1NtRbupF1i+gxAyFIKjP2lRLAyOqZI= 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 1741543067913338.03194562577323; Sun, 9 Mar 2025 10:57:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKrZ-0001J0-IO; Sun, 09 Mar 2025 13:54:58 -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 1trKrR-0000sP-Ns for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:49 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKrQ-000571-63 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:49 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-391342fc148so1344290f8f.2 for ; Sun, 09 Mar 2025 10:54:47 -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-3912c015d2bsm12167134f8f.43.2025.03.09.10.54.45 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542886; x=1742147686; 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=+h0WxWe/CR+AYRisebI04Ld1iS9EZlB98JnRUIatSNE=; b=fCP7nFL+iKB7O5bETo7Cq/us3EF81ntFoBhXwZiJ/B+/5+3nT1HT7pH4Wu+d2KUxQc SryQBPwDA8jr8zFIWjDNfyHCOAMgLpWqsJ41i5GvR/um58xNDQH6lErr6hQ0Ht/Ovgt6 Z+TQwCzDO1XoBYE4kfhFBjP/pg1xR26HC2CKE6G5UGrTIdPZECJtRSbnJY8oTeNOY6L2 oQOPeiL8xLxqE0Fz4B6YZ7w4YqPkLnXm3mhQ/xrooqbVKkcasoNWeKPiIiIOQY0V1v8p ldSoteFVw2ppPBI2uJP8sh26Be121USkX1dNir/MAUvQQ3jrEB/0W+xDCWlOGABQ5uGB 5M2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542886; x=1742147686; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+h0WxWe/CR+AYRisebI04Ld1iS9EZlB98JnRUIatSNE=; b=HDKWULIObIzm2mGp1kIbwDYIQcBQ+qitynqlXrWIo0yUVuEY13IGNAQq83f0zAggDu 9px4eeuvBSy3ch4tzAEOZc6aBk4OcPpXs02tTxnX1wjXFNCcgrb0SixyQvl7h8HCBZ6J dKJOrgl1j/GuKHUa59DhqqB1KxxVbiEuuov6MKjI6YueU2wkl5I0zf0JFvPlsVWnOaQ8 uLt/E4rNzmlXdoPcZ7TImr0minbUpFkJjm3MGiW4ZvO0Osau/i9sLrbL11v0gHr3xke/ JChtVHtNas1uCDTpBHjj4PSRPJmFTa9D/7gyIWWfJBDFJMrWf+LH690kXlta+xGGXySg mxJA== X-Gm-Message-State: AOJu0YzsqyntTvmdHbXEzitR21cmh1kFWIKd+pxbB5/wX+UbOdpTt7TG tD1rjOYarN5A9+0YPnFBwEAh8ufOsFizJ/0Lqmkii+Lpb8ZL/D+dpysU++k+knXDpF0kXxTHwrw 1Q44= X-Gm-Gg: ASbGnctqIY06CwDiSchR70//Ifa1ZDEaWJD9zx02y81QNNjD73m4V4wA9qEc7IGcfyQ 24KtSn5/r4eC9zsaZNea+GmBuc4Obv7GQdH2eSqVghoupte0elA9iBAXn7QeAgXdp4EbZ+SYaAy +Xh+Td8D0rJqCCrovstAjzUKiaE5DfFEb/gFfdPw7ffuvZ9UjWwUJOKw/ZnAYjqZKsWQuK4ziz2 J05wQfBkN5WO6izeH8/aVy+dR27i/uzemZfJXlUPt4GH097gYIlVlY+AuwMOoWC/c4ygnBcAt7y BWWyajAhlwkvjR6rP5VHYhW6yTF6HrkYwHGz87R76q+7WJE3/AtBBVHvXgAgUQkuGlZWVjvV4jl KDKQ8cIUGtvWzeemxTGw= X-Google-Smtp-Source: AGHT+IFwvQawKC4jslJQKRpckp4hVOwhEniaqC9R4heKt8LwVBiaWaxRct2WJPyGXUz4uePtq9OJoA== X-Received: by 2002:a5d:5846:0:b0:390:efe7:20fa with SMTP id ffacd0b85a97d-39132de1bd2mr5483565f8f.47.1741542886144; Sun, 09 Mar 2025 10:54:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 33/38] target/sh4: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:52:02 +0100 Message-ID: <20250309175207.43828-34-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::42f; envelope-from=philmd@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: 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: 1741543070176019100 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-21-philmd@linaro.org> --- target/sh4/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index c2aaa40a037..ce84bdf539a 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -82,12 +82,12 @@ static bool superh_io_recompile_replay_branch(CPUState = *cs, } return false; } -#endif =20 static bool superh_cpu_has_work(CPUState *cs) { return cs->interrupt_request & CPU_INTERRUPT_HARD; } +#endif /* !CONFIG_USER_ONLY */ =20 static int sh4_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -254,6 +254,7 @@ static const VMStateDescription vmstate_sh_cpu =3D { #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps sh4_sysemu_ops =3D { + .has_work =3D superh_cpu_has_work, .get_phys_page_debug =3D superh_cpu_get_phys_page_debug, }; #endif @@ -290,7 +291,6 @@ static void superh_cpu_class_init(ObjectClass *oc, void= *data) &scc->parent_phases); =20 cc->class_by_name =3D superh_cpu_class_by_name; - cc->has_work =3D superh_cpu_has_work; cc->mmu_index =3D sh4_cpu_mmu_index; cc->dump_state =3D superh_cpu_dump_state; cc->set_pc =3D superh_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741542949; cv=none; d=zohomail.com; s=zohoarc; b=XRqNpk6mHHq5cRJ5ePNBn6qavP6uAdohCFxogHZQud2oF4RQv6+6lpa7/4SKBtHBNbR98GyaVx7kOSXeSi+giz2oaXs2KNywUSd1EfXHC0aaE89sDobsctnC3Y6unEMJNrbA27lSIo/5earL2X5oXqVznKbsjbKkN9RHuTzmYDs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741542949; 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=fBi504GZPv9DdfQ0J0gmyCUJh0vb9oYQT7R5XfexT5o=; b=aw7/vF0wPZsADLAFQenrjOH/gAY0XFF+32OyyS2SWZdF2wCsoXd1OOpaHL34i2tF6c/iKSolwgU5aNvAXVREKciTKHa5P+SiK7Ao6+L2PtmPrpFvbWpMUYvW8eY+hPKYfEFnFoy5V6q/cU0XVnsvGYfjvTJc6GYaCHtxjgqZqqU= 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 1741542949074328.626833573177; Sun, 9 Mar 2025 10:55:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKsJ-0002eF-4f; Sun, 09 Mar 2025 13:55:43 -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 1trKrY-0001M1-By for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:56 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKrW-00057S-KW for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:54:56 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43cebe06e9eso5233235e9.3 for ; Sun, 09 Mar 2025 10:54:54 -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-3912bfba679sm12290297f8f.8.2025.03.09.10.54.49 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542892; x=1742147692; 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=fBi504GZPv9DdfQ0J0gmyCUJh0vb9oYQT7R5XfexT5o=; b=VVB1N3vSDCcmtHNoEk8uupelDmjzs2Q1yJ1iQENpnB6Rq8ITblU8f0dldX7voOZBVl mEE9JSbXardCKHKWPBYVyYvQX5+DMOIMwDxO6Lv1dx7KGxMexriURpwsOcfmmk+QQUMj XqN18VKwNDeBVIsbrs0xPhCHEgTMTmszUJwj8FChUJbZKXwJyHhMhMHFmkSfOSRid9+P A0g0ePQXBEvJth4pYkgUyGZd0dQfCNA1SGU1bAje5QouT9FX6LbrchGVp+d/SL3QYbF5 VmopFxsptgG5MX5sX2hEM+sfnlzXyE0b2uzWRBgGAv9Lmh0rqrTgQSNj6FkkhOQ2dOCD IxgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542892; x=1742147692; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fBi504GZPv9DdfQ0J0gmyCUJh0vb9oYQT7R5XfexT5o=; b=UlspeCNGWaYhPmCYWF9hHbeQP+MoFfq/3mepRI/duRDX+RRjJbWmjtwKoT2x+4/eBJ 26cppoexFhoFec3X+bZAhv3hdjsS6YjjSlsGJMHscm1/JbgKm1pQUxrA5+roh/YQVhal xbNoa8blvVcRiXBJsd1jg8uHzadCMUOIFm4bIgG8qQDw2khTR+ZZKGUUpT5vwveKbzCV oZSkP829u/jR+pmmAd4VrCEmfCmdk6tKL00HSjjfJLFrZK8U3HTuSfvwp6W/M7Sh0PxT M7gqV8WG4MIc+VC0QjIto2Gbfwp7VE8LHgRyuD+o/6jzo7PmneFLcV+SOP1c4P6nSanX yp5w== X-Gm-Message-State: AOJu0YynOID0JH57LDK/DgW1ryBzSVdv7VJgUNZFvsnnzvrJnFhKEZWb eNInw3iiPxzVLpoH1sY9AThW65TxbD+XhYwWHLkzEWdA45IQEpLm4LU0vpJPGUfWIGpiMzA6fV+ Jdao= X-Gm-Gg: ASbGnctUBezu7lD+teyreG3nJOKzCAjwc0aDpIICLXUJGHDOYnsLFwnbTtPzk2ssIL7 kZSEPy2prbXOrbUnxAVJJYDAzRIou+9qOqmKszYieszA5Ck3awQI2Os3LswekoorWIyG4fVpRxF URjqqqNTVMqnbtOdjoLjfHbumbm4xXtuO22ybcHNjkPuHY7d3XiMnAgfOhAMga/Neax7QUspnVw 9koh8k/iWV6bSgQgjNKlfG+vytIJaewW7aEwRho7Pf22+yHjUV2vzhfGRpQfH32LToeptvGbFlE w68miwvEaCNZ7HhScTAnAauW/TlsA2MsZnIN5ef+iij6hznLRpu/5h6JA9ZDI6ao2sO1zMozMwh ZJBRjf8Rq1/K0p3dYd1Q= X-Google-Smtp-Source: AGHT+IE2wcf1Pq8Sb36MdU+Tfu7F1VJDLg70kCQIm2iPQsPsV/G6SOCpjeu4jCOPhzIPqdT0Trn6dw== X-Received: by 2002:a5d:64c3:0:b0:391:ccf:2d1b with SMTP id ffacd0b85a97d-39132db1454mr7196724f8f.49.1741542892242; Sun, 09 Mar 2025 10:54:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 34/38] target/sparc: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:52:03 +0100 Message-ID: <20250309175207.43828-35-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741542949930019000 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-22-philmd@linaro.org> --- target/sparc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index e27b1fa2949..57161201173 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -777,11 +777,13 @@ static void sparc_restore_state_to_opc(CPUState *cs, } } =20 +#ifndef CONFIG_USER_ONLY static bool sparc_cpu_has_work(CPUState *cs) { return (cs->interrupt_request & CPU_INTERRUPT_HARD) && cpu_interrupts_enabled(cpu_env(cs)); } +#endif /* !CONFIG_USER_ONLY */ =20 static int sparc_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -988,6 +990,7 @@ static const Property sparc_cpu_properties[] =3D { #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps sparc_sysemu_ops =3D { + .has_work =3D sparc_cpu_has_work, .get_phys_page_debug =3D sparc_cpu_get_phys_page_debug, .legacy_vmsd =3D &vmstate_sparc_cpu, }; @@ -1029,7 +1032,6 @@ static void sparc_cpu_class_init(ObjectClass *oc, voi= d *data) =20 cc->class_by_name =3D sparc_cpu_class_by_name; cc->parse_features =3D sparc_cpu_parse_features; - cc->has_work =3D sparc_cpu_has_work; cc->mmu_index =3D sparc_cpu_mmu_index; cc->dump_state =3D sparc_cpu_dump_state; #if !defined(TARGET_SPARC64) && !defined(CONFIG_USER_ONLY) --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543023; cv=none; d=zohomail.com; s=zohoarc; b=bekjteD8PSlUOks0hNtVsseWvlUjV22pO6AXGv8pfm3GVdVhsXo9JVbHe4Pki/lm1/Q5w6uYKE8knOatciI9+54sDwv9eSGKMJMwdGWQINyPRsq12yfGEK4Lsg+r/6Yg7WHlTrhAI1SVIzzTtrfqXhPZ19xS62zsJIxJ7j1Jvl8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543023; 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=sppGnK7gq8hW+5sYH+c2kdETQLMRVDeaVClIKxwTfDI=; b=Tzwlrh2tgsLRaVNXe3ICRcfYSs1IKhBII6DqIValFj0dts01SVlnflaCgE/DVb7oeLsxQ44EL4SXGO4uK+1pxnpbuR1PtiKFE0pKTe5C0TZyzNY5TgEtDA9Ta+Esc4TXBy/N6nKbxizwyAF2jXK0FAqmcA83H+Kn4t+EkqBrX40= 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 1741543023126700.7176968846464; Sun, 9 Mar 2025 10:57:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKsf-0003Xd-Gc; Sun, 09 Mar 2025 13:56:05 -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 1trKrl-0001qc-F0 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:55:09 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKrb-00057q-5S for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:55:00 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4394a0c65fcso36475135e9.1 for ; Sun, 09 Mar 2025 10:54: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 ffacd0b85a97d-3912bfbab43sm12633687f8f.15.2025.03.09.10.54.56 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542897; x=1742147697; 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=sppGnK7gq8hW+5sYH+c2kdETQLMRVDeaVClIKxwTfDI=; b=o/B1LwR8n2EmPV0L3EE3ewrFonn0eBkt4xvojpVkaL1bXc8zvn42DkZZ6fGtx16/ep icoquEsAjNo/vvLRBUsjSnugdt7Z8bnjog7mp6meIiEXqPKWYmxkGFl5TJd5l+blJsb+ 65J/5mALSxJ+hG0fF307RkYcJs0cC5F8hOhFSmatHl6Xw9h4kNsC/74gItqEGE3i6tZ5 5/rmAAhqGG6NnvzHftOMDooO4nv9Un4AWsKWQDe+TWgUHt1fmwHWhmOSJeJsfHcYZnGS D05MtHwTgVQZIya5cS5gC9VARZR+kfPMlMjDKxyToDFcmzTswj58/isgClVP1NahCr8s ntnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542897; x=1742147697; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sppGnK7gq8hW+5sYH+c2kdETQLMRVDeaVClIKxwTfDI=; b=T9RZ3zRLsxQdQxgk8fIKVFYbvERSS4JAxOFXuilP7Uj1/m51H4MkxHngXr89TGBcvl lZpo7wOImymnJF46+C2o9of+IeVIQr/fgpfxBktk4J8QhCDaZ1NTw62e2szRu8vT5GEK W+7V7biT4nBgeUikohap+KO0KTENVBj3ateiP817SCq3BuC19RVsW0J7z2YiNwpN7U6S 7Ub0qVJZE8q/kIF4psUpaINuRpDG2+1vkRToUAW3a/tZCpgWBjWWWiPN1En0KqDssvd5 LSpSa2L8+l7hO0IxamGG2fES5PGYePi7v/zWV/i5eacy1PjBizfRzYU1HxuVuWZ6Sjpc HIfQ== X-Gm-Message-State: AOJu0Yx6cogOXjmv/Y+NgOFfEbxqLeNOr00NpzIFxAU//HGPuUUvNlts mfGZhyUBEbIrCQrc4xeC5oS43IL3jayvbOQUjZLDdzvdZCRKX0x3QE9tW51hCJIW1rV5822C1wf RZQE= X-Gm-Gg: ASbGncto37tawSKjoqUvn3SxysTbHesRTO1PNT2EaGehM8OPQG9L5FDWSfv+nctSr6D lL7yMrNs6EaVMLxE69TB2D+lGPtuiM3Sit1HQ1lduQg/NG+QLT0FGKxrB+eUVejiX/lmoEN4RKj p95bNC5erjou1Yffxgejss4u37K/N1LdgjeMeU4xcLZnJjNhzhWSx6RERKtkjEiiViOSN5FpS+o adtmqBznPJnnehyvnN6K3YKHnThO3EiwVzBRo2YLYm1cbJ8YpT393JltmawYPb38DxaJdAgK5bT NRk15kVkhkQP8Zdo2ejnj2QOw18FeR4gYtZqW1N/CQTvMPZaGkYT+DO7Q18IMamAsK2RafNWXVE 3fRFVfRZVCJSlian7ea+KOOdL+R47Vg== X-Google-Smtp-Source: AGHT+IHHrmjEb1PzTO3ZBcnNZSWa8+jISTfcKZwuSQdT5re9VrPAf1Qc+KD+P6zp0vOLRYJwt1d2zQ== X-Received: by 2002:a05:600c:3b0e:b0:43c:f575:e305 with SMTP id 5b1f17b1804b1-43cf575eac0mr10816255e9.8.1741542896875; Sun, 09 Mar 2025 10:54:56 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 35/38] target/tricore: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:52:04 +0100 Message-ID: <20250309175207.43828-36-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::32d; envelope-from=philmd@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: 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: 1741543024217019000 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-23-philmd@linaro.org> --- target/tricore/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index eb794674c8d..16acc4ecb92 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -165,6 +165,7 @@ static bool tricore_cpu_exec_interrupt(CPUState *cs, in= t interrupt_request) #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps tricore_sysemu_ops =3D { + .has_work =3D tricore_cpu_has_work, .get_phys_page_debug =3D tricore_cpu_get_phys_page_debug, }; =20 @@ -193,7 +194,6 @@ static void tricore_cpu_class_init(ObjectClass *c, void= *data) resettable_class_set_parent_phases(rc, NULL, tricore_cpu_reset_hold, N= ULL, &mcc->parent_phases); cc->class_by_name =3D tricore_cpu_class_by_name; - cc->has_work =3D tricore_cpu_has_work; cc->mmu_index =3D tricore_cpu_mmu_index; =20 cc->gdb_read_register =3D tricore_cpu_gdb_read_register; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543298; cv=none; d=zohomail.com; s=zohoarc; b=hJcdfWUsnSzRz1bu7qQ4ba9AQtkK1ZRpFJEB2Gpp8s7Gaohx4m42mNuttudcjGEvkfxifLE9CcNcKChb3Lkbc9jJmdtL/YktS0STz8FVszK9EgIQh91vlpGG+WDTQs8KihQkcQOr6qxipoeffJ339ypd5VwQMW6hBht6q8iTdvc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543298; 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=IABtyuGuVRM49DjEhoPGLaTRjqWLJwaeBvNPvFeGyOQ=; b=PXeL96wv6D2QHWJfRNZ8tkdvk/P3DuG7pu2zvqwFv38dYrzrOAkImica/khEA7OsKqGMs2CIdHUl4dWWKHLxv//j/bIpsRR+AC1FsSJtX2PCF4NbOBi70Lfc7ZefnFjCmHHiTCE/GCwyRdMtUo1G+IsFvw7jCTKuLoNqN7CnYLo= 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 1741543298671500.4974933570302; Sun, 9 Mar 2025 11:01:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKsL-0002vb-1i; Sun, 09 Mar 2025 13:55:45 -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 1trKrn-0001yu-2m for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:55:11 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKrk-00058S-5M for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:55:10 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-43bbc8b7c65so36524365e9.0 for ; Sun, 09 Mar 2025 10:55: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 5b1f17b1804b1-43cf3bf0e48sm22920265e9.20.2025.03.09.10.55.00 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:55:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542902; x=1742147702; 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=IABtyuGuVRM49DjEhoPGLaTRjqWLJwaeBvNPvFeGyOQ=; b=wKyMfiEtoqItWCVlGhrGiqjcU78Xg9cF6ZaAe1RxW2Qtf5zyQAi5hrQ9392HCaH4ka YRUtWUoaEpmMh9vUWtDVtF5o2IyA175FgPv0T2vcd10LDq6dVWgEbtpc36rY/qrujBEN u7XqaHf4E4enzrF4PlIIec8UT2bF/oN6da0Tixd+ul3fCVkD926oWI6tWB+qKXG9gV7E j6R/SvclmGynwUBgrW/wU/U4ao1vKWTrGzQKJ/WyGXNfedKvHh7DK5gj2pt9xNabVwfh H6x2qAcKV78zuDa0pUeWhXsmlaVC6iYbYDosSstwGHxATekJ+5CbwfpR3uvhkO3xbY1i 8Amg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542902; x=1742147702; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IABtyuGuVRM49DjEhoPGLaTRjqWLJwaeBvNPvFeGyOQ=; b=UfLGA6Mk5yEGMkLkwLBhY8iaefpuZtGHrnjVuYkYovyTm5Ws2Tta3poyi3fzHCgOA2 9ZlSrcq85PlTfw6qM3OyDoqrxfoybeJjTzG++mJZv5zvFZCCc7g+v0zHLiOYfJmbtn+l Gc01VF67SrsyC3oMKZffQDbvBCIoS3HGOGVXK/BeoCkB/J45PRLljcpE0keZFUwVy5n6 c/XBSQTSzpsaKvlgDXloAVFjpX8VPxcUHWmUG/cSv5jiw7PdaeG3aaG7gzfSmZaq1yuc YM68tmY2DDER2GPIsOhyNYrE35ABD2iRvFgRPI6NbeHLbjkFWjDTwQLGsdexL/K0rIUD 1z+w== X-Gm-Message-State: AOJu0Yy1ibNsOGl8RXJL5/98+xul/1b/XgrZTksUIuqAndXMerJjABu/ 6VoNFssZTiZvY+MmRMfrI+T1e0l+dyjHBsYDma6aJzoz2E29szGS5MQoDAojntCt3HYgvT9Rq9A gf/s= X-Gm-Gg: ASbGncuDqLlEubje0II8/A1GzqrSYawSU5jaX/pxEdxPWHemQIqLUE+l84UX8vTz3Mo 9CeUI5Jxie5qRtnG0cNV4MyEHiRohI2lnBLUO/iYjoA5TozgxGV/s/iJHl6YeIsCjk9IOyi5Kax ZgyT0dkKBg+kXUMELXmsTKYaSEH3tf/F+lvn8bh+VSt6R5qWBOBTD8nqR4FIfH9gU8jgS2U34pe a5m0SQyOJzqsrkxkKEGXcIjNwAm+vxIgyvbTSVgRPks/VCU7PJ0iYh1PbaMOH7VRALYaPHiSnAh KWDahlO4JuzGOf6lZqn+zXFoughzUWxQ+8KRUhFe3/irCLYLrMB4ovUn48i4rxlsgd+hrKiCFzl eZhgmyA+75N1HQWWs4TI= X-Google-Smtp-Source: AGHT+IFR4jODhKyF4/JcWo9U0/EnXTBrEh2/sViYytPjBi2QggEIMwrC7W13ZrTXbJkPFYLdJ1SnhA== X-Received: by 2002:a05:600c:1d1c:b0:43c:efed:732d with SMTP id 5b1f17b1804b1-43cefed7916mr20919105e9.16.1741542901519; Sun, 09 Mar 2025 10:55:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 36/38] target/xtensa: Move has_work() from CPUClass to SysemuCPUOps Date: Sun, 9 Mar 2025 18:52:05 +0100 Message-ID: <20250309175207.43828-37-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741543300099019100 Move has_work() from CPUClass to SysemuCPUOps, simplifying xtensa_cpu_has_work() by directly using CPU env. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250125170125.32855-24-philmd@linaro.org> --- target/xtensa/cpu.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index f9e298ace45..7663b62d01e 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -63,16 +63,14 @@ static void xtensa_restore_state_to_opc(CPUState *cs, cpu->env.pc =3D data[0]; } =20 +#ifndef CONFIG_USER_ONLY static bool xtensa_cpu_has_work(CPUState *cs) { -#ifndef CONFIG_USER_ONLY - XtensaCPU *cpu =3D XTENSA_CPU(cs); + CPUXtensaState *env =3D cpu_env(cs); =20 - return !cpu->env.runstall && cpu->env.pending_irq_level; -#else - return true; -#endif + return !env->runstall && env->pending_irq_level; } +#endif /* !CONFIG_USER_ONLY */ =20 static int xtensa_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -226,6 +224,7 @@ static const VMStateDescription vmstate_xtensa_cpu =3D { #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps xtensa_sysemu_ops =3D { + .has_work =3D xtensa_cpu_has_work, .get_phys_page_debug =3D xtensa_cpu_get_phys_page_debug, }; #endif @@ -263,7 +262,6 @@ static void xtensa_cpu_class_init(ObjectClass *oc, void= *data) &xcc->parent_phases); =20 cc->class_by_name =3D xtensa_cpu_class_by_name; - cc->has_work =3D xtensa_cpu_has_work; cc->mmu_index =3D xtensa_cpu_mmu_index; cc->dump_state =3D xtensa_cpu_dump_state; cc->set_pc =3D xtensa_cpu_set_pc; --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543098; cv=none; d=zohomail.com; s=zohoarc; b=FkL49Udk6CoLspW1d/GPFMNWXmTAl7JMZdX2wmunajLrPZu2ehHgaPp1tMQzidfQCN4FBbG7W5K0eH0+Cx1iRRCgmlb5buxwgc9Mn1UZNASkoI1ZLDCl1Uv8+A09c1U9am072Lzc6TGWRn5Fah5n4HXqTZIiZvQZZxjhalsZ0fw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543098; 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=rttxhj1jFn9qxHkwlr9mdzip+R1zeRwNdhCQFUSmpJ8=; b=jh/N3R3wP2V2wMqtLDiywp/QpliQHBCmLpT8++mHz8L5nxa0/7oA2z7MiHwaqzwlh+P7+e5zmb2gLTpGLZcZjgXcjwtvN7qV2MD/Euz2r9qu845BXt9qAlFSBQMugqs9oaurjfGvq2zcHSj4k1X1HxxxXIKyBoYU8qpnn73C2ag= 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 1741543098408888.6251199484717; Sun, 9 Mar 2025 10:58:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKsc-0003Pn-Hu; Sun, 09 Mar 2025 13:56:02 -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 1trKrn-000239-Kt for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:55:12 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKrl-0005Jl-4p for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:55:11 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-39104c1cbbdso1652394f8f.3 for ; Sun, 09 Mar 2025 10:55:07 -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-3912c102b62sm12228799f8f.84.2025.03.09.10.55.05 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542906; x=1742147706; 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=rttxhj1jFn9qxHkwlr9mdzip+R1zeRwNdhCQFUSmpJ8=; b=iNqBexw4CgiodzVQp1cFWfG3uN438Z14OMnhOdFpWV8ZcKAlxLdWxNVFRSSijQqNMl 3y3iPHFT50z+wzTI8PohYmtwwALC0xb370sb6H4kn9H8Qn9Jq83u3hjTtSWvAP34hZ+4 cqYc4LQOsAAVhvWhb90WTjPbsnWhqdxCTyQgV3Q1UxdnajaasiPwSset6whPjO77HquL +SoQI71pM/Q2CJarqzAa05UpR+QsujM0y+MB9YE4wKnoprVWH/Os4b3qEU3MEIwzkFWb cc6vRh/IBokPTJwatVe8Smi44FBf1h/lZNZnOr1L352ijM/6Bl8vlc0ZN3RWYGPG3DgA 1FxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542906; x=1742147706; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rttxhj1jFn9qxHkwlr9mdzip+R1zeRwNdhCQFUSmpJ8=; b=SGzkPC4JyxtSNukHqX5bJwmBoVZ/H7DqPatOzL5nh2taYKVscOBUFU9o6UK8sz3Vrs WPNNa90kIiFF7iBnV2ECdnGG0po5Eab39XcKGtqsc8oe8N4QQytGJas82DPjWMiUUk8p b3eYebdserijqnI7YvZt7fURcW3uZ8qAfr9y/j7uEl/K/5F+VhkKqUdeJyR85QLlllko OlANW5cw8OZG85LuzihwURDUvRFw9H7WYFrzS58nmfhxCEJ0D57Ux0pHT4Gt4VB0e5W1 BybxHGIadwvAyq8e+FFzKucJbkxYMOd11F49k8ohRVXW2MWIsMAAw7of4rXpdasChaVS L8+g== X-Gm-Message-State: AOJu0YyOfmf2qgZgapC/Sn8pqlw2MpDox6zA+WDFpjTXYBNjsfuULF3E EAcTRRp0ZayAueKOzl41x9cU9pWgUumooRelygMADldD3MJxvniG45a/TGR46J6iG+aZI9vEqEn C2ww= X-Gm-Gg: ASbGncusOpw3VycjB4DMclajnqibHeMgXnmet+5zF99huwn4wmPSnv/vBCww4V8KkH0 fYL/K/sllnTBG50dlaXcPUFrTY1Qz4lrwGtT4u81afbOWJU1YWNN8YMEbCIkmM00mCoejrYzGOy G5A199YUPIoPc9S8uLkhP/eqalUm6MR8dWRFAwauuvFViGmF5lylBPk9UH9z77Vzc253peDegdK 9jQeULR89w1oqsXUPi3ImewP8fzkCJwMmPWmcNC19DdJhRiUfMWnIBgVw4OJWTVMTL71S24DkVM NFy9jtpjwJP8qApILW/6dszAqsJlRa7hINkk9lo32AVY5ySryhBY4yxVxQ8hhYW/nEv7f3JzZfF lSFifnYvSxS6iAiTcIdk= X-Google-Smtp-Source: AGHT+IG+g6QZsGSX1LgRHbQr5tSqnSBtfTdKbaJYundzHrqbx33m5rxPIoqCEbNFe8PEKeUACzw35w== X-Received: by 2002:a05:6000:2ac:b0:390:f400:2083 with SMTP id ffacd0b85a97d-39132b5bb58mr7362150f8f.0.1741542906187; Sun, 09 Mar 2025 10:55:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 37/38] cpus: Remove CPUClass::has_work() handler Date: Sun, 9 Mar 2025 18:52:06 +0100 Message-ID: <20250309175207.43828-38-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::430; envelope-from=philmd@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: 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: 1741543100565019100 All handlers have been converted to SysemuCPUOps::has_work(). Remove CPUClass::has_work along with cpu_common_has_work() and simplify cpu_has_work(), making SysemuCPUOps::has_work handler mandatory. Note, since cpu-common.c is in meson's common_ss[] source set, we must define cpu_exec_class_post_init() in cpu-target.c (which is in the specific_ss[] source set) to have CONFIG_USER_ONLY defined. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20250125170125.32855-25-philmd@linaro.org> --- include/hw/core/cpu.h | 3 +-- include/hw/core/sysemu-cpu-ops.h | 2 +- hw/core/cpu-common.c | 8 ++------ hw/core/cpu-system.c | 13 +++++++------ hw/core/cpu-user.c | 5 +++++ 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index a54dd2cf699..5d11d26556a 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -104,7 +104,6 @@ struct SysemuCPUOps; * instantiatable CPU type. * @parse_features: Callback to parse command line arguments. * @reset_dump_flags: #CPUDumpFlags to use for reset logging. - * @has_work: Callback for checking if there is work to do. * @mmu_index: Callback for choosing softmmu mmu index; * may be used internally by memory_rw_debug without TCG. * @memory_rw_debug: Callback for GDB memory access. @@ -153,7 +152,6 @@ struct CPUClass { ObjectClass *(*class_by_name)(const char *cpu_model); void (*parse_features)(const char *typename, char *str, Error **errp); =20 - bool (*has_work)(CPUState *cpu); int (*mmu_index)(CPUState *cpu, bool ifetch); int (*memory_rw_debug)(CPUState *cpu, vaddr addr, uint8_t *buf, int len, bool is_write); @@ -1156,6 +1154,7 @@ G_NORETURN void cpu_abort(CPUState *cpu, const char *= fmt, ...) =20 /* $(top_srcdir)/cpu.c */ void cpu_class_init_props(DeviceClass *dc); +void cpu_exec_class_post_init(CPUClass *cc); void cpu_exec_initfn(CPUState *cpu); void cpu_vmstate_register(CPUState *cpu); void cpu_vmstate_unregister(CPUState *cpu); diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-= ops.h index dee8a62ca98..877892373f9 100644 --- a/include/hw/core/sysemu-cpu-ops.h +++ b/include/hw/core/sysemu-cpu-ops.h @@ -19,7 +19,7 @@ typedef struct SysemuCPUOps { /** * @has_work: Callback for checking if there is work to do. */ - bool (*has_work)(CPUState *cpu); + bool (*has_work)(CPUState *cpu); /* MANDATORY NON-NULL */ /** * @get_memory_mapping: Callback for obtaining the memory mappings. */ diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index ba0f02e49da..9064dd24f82 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -134,11 +134,6 @@ static void cpu_common_reset_hold(Object *obj, ResetTy= pe type) cpu_exec_reset_hold(cpu); } =20 -static bool cpu_common_has_work(CPUState *cs) -{ - return false; -} - ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model) { ObjectClass *oc; @@ -259,6 +254,8 @@ static void cpu_common_initfn(Object *obj) { CPUState *cpu =3D CPU(obj); =20 + cpu_exec_class_post_init(CPU_GET_CLASS(obj)); + /* cache the cpu class for the hotpath */ cpu->cc =3D CPU_GET_CLASS(cpu); =20 @@ -331,7 +328,6 @@ static void cpu_common_class_init(ObjectClass *klass, v= oid *data) =20 k->parse_features =3D cpu_common_parse_features; k->get_arch_id =3D cpu_common_get_arch_id; - k->has_work =3D cpu_common_has_work; k->gdb_read_register =3D cpu_common_gdb_read_register; k->gdb_write_register =3D cpu_common_gdb_write_register; set_bit(DEVICE_CATEGORY_CPU, dc->categories); diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index 601335fd764..aed5076ec78 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -33,12 +33,7 @@ =20 bool cpu_has_work(CPUState *cpu) { - if (cpu->cc->sysemu_ops->has_work) { - return cpu->cc->sysemu_ops->has_work(cpu); - } - - g_assert(cpu->cc->has_work); - return cpu->cc->has_work(cpu); + return cpu->cc->sysemu_ops->has_work(cpu); } =20 bool cpu_paging_enabled(const CPUState *cpu) @@ -188,6 +183,12 @@ void cpu_class_init_props(DeviceClass *dc) device_class_set_props(dc, cpu_system_props); } =20 +void cpu_exec_class_post_init(CPUClass *cc) +{ + /* Check mandatory SysemuCPUOps handlers */ + g_assert(cc->sysemu_ops->has_work); +} + void cpu_exec_initfn(CPUState *cpu) { cpu->memory =3D get_system_memory(); diff --git a/hw/core/cpu-user.c b/hw/core/cpu-user.c index 1892acdee0f..7176791851b 100644 --- a/hw/core/cpu-user.c +++ b/hw/core/cpu-user.c @@ -27,6 +27,11 @@ void cpu_class_init_props(DeviceClass *dc) device_class_set_props(dc, cpu_user_props); } =20 +void cpu_exec_class_post_init(CPUClass *cc) +{ + /* nothing to do */ +} + void cpu_exec_initfn(CPUState *cpu) { /* nothing to do */ --=20 2.47.1 From nobody Thu Apr 3 11:52:27 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=1741543196; cv=none; d=zohomail.com; s=zohoarc; b=cj9kGqPo494f+xNfpOHWUtDdlu4wYwVpqAVYtMUqjWolV45xcTouL+JMXDuoNk5gJJbblEuMdjq5B0fLH55SZuiRLUW8Y6eYoXkhUDrkEC/BApXrNWL7gkxWA1grWg8KgDyNKhhxBpOIfgHtvSTOxXLJmhDw1oitHlzZ0Ff7ciA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741543196; 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=2j5qozhrVzu1N/G2xhrynmmN+iXrSfQjBnt5OGaKis0=; b=i926vg/HSVukG6oyN0aE4mss6/zjntQVgc5eUdc6PwrXhQAqBAwHX3mEPsoFub9lARi0YsUplu6su1+yb1lazQxlK4B4plSrqsKiye8uIjxPZXnRoZUND0unoUu4XNeydSHVm5Nmh17DZshA/5pitjkf1oSefrL9EROSyQmJMdw= 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 1741543196826478.69250284149143; Sun, 9 Mar 2025 10:59:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1trKsj-0004F3-Hd; Sun, 09 Mar 2025 13:56: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 1trKrs-0002I4-75 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:55:19 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1trKrq-0005Ki-56 for qemu-devel@nongnu.org; Sun, 09 Mar 2025 13:55:15 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-39129fc51f8so2908010f8f.0 for ; Sun, 09 Mar 2025 10:55:13 -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-3912c102b62sm12228970f8f.84.2025.03.09.10.55.10 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 09 Mar 2025 10:55:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741542912; x=1742147712; 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=2j5qozhrVzu1N/G2xhrynmmN+iXrSfQjBnt5OGaKis0=; b=GvI0Ujt2npP7/UttoWZnw6RYLEq2giSO23+qdkVPEqbery5fSWGttrgNHAJ8mi+cKu BVxAVa+K2qovef2bFJRGozuxsUomEnQdum92QoSbrTF4IG6Bgl2kRREdbOzVOjiTv77m okXN/O6Rnc5p1psOffiQ+u7rXQBWJvsOanXLLVfogceLCkQFK7hO0D/kefKgT/DhUCVz cmrtnOy2BFnbNVQsow9Aiabmo2hEgE5qFBdrU+TEAfwOj5TdL8UoeCOj6VBtCeQB4orQ nP941icqw8BZC5uTSEGZePiKD+GhrfgP8QmtBynWNI+7X/ZWo+egxtMPjQ6p/we4KUPg 1Flg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741542912; x=1742147712; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2j5qozhrVzu1N/G2xhrynmmN+iXrSfQjBnt5OGaKis0=; b=CjrqrkXSSw0meZrVpcMdpRfMJ4DJwQDyNGxo+0gb6x5VbWo3ky0sLgnmYpDmBhY1M+ 0N5pUQBSzUr73wKzBzc6xE9tSolRQj2bW+gmWdpInPjppX2FlaiLns23iUg7JJb/P7df doVNG2hEJZZPMCsVi/9WoxXvsPtUK/cbKne1u1XuRqugsX0A7rhqa0Eu4mQ9/8ZcceFS qzMVPhRup1blsZEae1rAGMpn6CjsFzVejzxtP9b63pz+gAurbjMmTQCOGw/UGnGouYwy MTXxiEU9z5/acet16mRi09Js9cKAcVlbCDFxPNuVQB51yT6Sh0iHV5jDvkdOhCZFo2T0 S1ZA== X-Gm-Message-State: AOJu0YyauyfOWTvjCIWuU3JjwjiZ1kHOkgGZaBjqUqrTpeMlMiWqKC5L /DSBae3seJwMis39EWjL2LT60rEjSWMuryH9rEALnoWd0ab5VqwEwI581PtO5ExZ4VJ4hgpax1w YjN0= X-Gm-Gg: ASbGnctt9Y+tbVzkxEJ8RUrY07m+ipPraiHl0qLuMJYUljrH+nw/3fvoUcw1kmJib5k k0ZSj4LE+K4b4Ys5Bd9TBI5EKuu1fCUjkhdWhdJ9AHYo2nXsbwsyOuqSkMn6pRaoSOeiwKROvK6 /ivuQxpvZyWjQhEcVgBejVP/SOhtGpUDBcAyyHrDyZb5jC3v+KHDodMW2RXB37P+kpcsPufcvx/ s4G253b6LoOtQthRsblBMVg6Kd37P1Ax4dc4PC0LTWuS03fQOomQC+LPrCpFOAHNLSjE5cM2BUj bJr2FTfqTEdwKGlhB2O+/bKa2lyj8Z5h7a4Apdr6O18jbZaDmzLwg/0oMwQBhX8II2Vv8WXa7vp 10dO36Kv9kCQFxCMMc7Tqa5iQqjS+LA== X-Google-Smtp-Source: AGHT+IHn8ymPcOdNexeqY2AHI6YHdUmx0UOPzoIT4955j6ZHIkadod/sxewDU+pJ5K2Y8PB29cC3/Q== X-Received: by 2002:a5d:588b:0:b0:391:3f64:ecfe with SMTP id ffacd0b85a97d-3913f64f09cmr3227884f8f.10.1741542912024; Sun, 09 Mar 2025 10:55:12 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 38/38] MAINTAINERS: Consolidate core exec/vCPU handling section Date: Sun, 9 Mar 2025 18:52:07 +0100 Message-ID: <20250309175207.43828-39-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250309175207.43828-1-philmd@linaro.org> References: <20250309175207.43828-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::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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: 1741543198762019000 Some common cpu/exec files are listed under the 'TCG CPUs' section. Move them to the generic 'Overall Guest CPU Cores' one where they belong. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20250308134938.77267-1-philmd@linaro.org> --- MAINTAINERS | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7ac04f35201..618d75f087e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -152,10 +152,7 @@ Overall TCG CPUs M: Richard Henderson R: Paolo Bonzini S: Maintained -F: system/cpus.c F: system/watchpoint.c -F: cpu-common.c -F: cpu-target.c F: page-vary-target.c F: page-vary-common.c F: accel/tcg/ @@ -165,15 +162,11 @@ F: util/cacheflush.c F: scripts/decodetree.py F: docs/devel/decodetree.rst F: docs/devel/tcg* -F: include/exec/cpu*.h -F: include/exec/exec-all.h F: include/exec/tb-flush.h -F: include/exec/target_long.h F: include/exec/helper*.h F: include/exec/helper*.h.inc F: include/exec/helper-info.c.inc F: include/exec/page-protection.h -F: include/system/cpus.h F: include/system/tcg.h F: include/accel/tcg/cpu-ops.h F: host/include/*/host/cpuinfo.h @@ -497,12 +490,19 @@ Overall M: Richard Henderson R: Paolo Bonzini S: Maintained +F: include/exec/cpu*.h +F: include/exec/exec-all.h +F: include/exec/target_long.h F: include/qemu/accel.h F: include/system/accel-*.h +F: include/system/cpus.h F: include/accel/accel-cpu-target.h F: accel/accel-*.c F: accel/Makefile.objs F: accel/stubs/Makefile.objs +F: cpu-common.c +F: cpu-target.c +F: system/cpus.c =20 Apple Silicon HVF CPUs M: Alexander Graf --=20 2.47.1