From patchwork Thu Apr 24 00:47:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883765 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3197639wrs; Wed, 23 Apr 2025 17:49:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUOyV6LtwRKU2zauJUvV4CSysBIo7+4buAR6mw5m6BZsDum0Q5qthukIKHy9+ZGT7+c1Qs2hQ==@linaro.org X-Google-Smtp-Source: AGHT+IF9wXTwocioQE92IeXOKeI9gDHa5cA7kK4X9S+vziwVEonyvU44FOyZcIfJadBIUnFozL8B X-Received: by 2002:a05:620a:bc8:b0:7c5:5e9f:eb30 with SMTP id af79cd13be357-7c956ea63bamr152878085a.15.1745455797694; Wed, 23 Apr 2025 17:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745455797; cv=none; d=google.com; s=arc-20240605; b=MFrbeeUjpQf7Hev/iiL3ADAVZJE86ut3uVEl6lYDlL4m2Op0KCyRgipLqy0T5Z3uO1 sO4bkzl7Vcio9sdPbDq7Ma6Q6qgOS5aMNfnE6Nd6Skh7tX7egsTbVifURB1pzvBQIGC8 MtOZjp+MphoOl/9WxxDDMTlASpm3kikByjMirkPlUxVKMum8qgqjjgNdm1ZxiGwxNaH3 T9yJp4R3GASISbRni4pATIsQK0GZnPekbKaF6T9RzoTTvK2efAYKZYo+sFU60dQwAvkQ AYO1IxnZRNR4MHFTD3/uwz7L7n8SGaylyz9XzAPByPzk40XNs1i1s/4ROvCmhL4Zpkmp Tcrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cWNW8eV1ZyPSVnus8GAP7nXIvpDAS5XtdbvHuSNPFs4=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=AepRmOcVDyyuruc1WvmdZ0XcCLtz+wpM34EQrjKAaYQjOU5jCU5cP1NIVnesCPSbz5 rozKQB4VdAa1Co1a8dNQvj7Cbpd4OI9U6bkVpVF8wOwPR43Yd7RNcLz2Bml7Prb859QN ls1Qf3T6Oh5bzOdKl2s9l5piJHckw26mN/BCZCYrVE4UiHfioDvi1/IQBsqgNekDGKhO HaBn9ktdn+wJ+6cr0Jm4l8cBvtbJAHO4d6Z1LDJ3LzOqDjLFl98Y/GxxmOEZuetGQ1SH 29Srs6wWiSq0JyAiP6n9L6ww1ZxWM42P69kZDhIUuFRPhMipaYtEy1+VHG+x23/3NZUJ ldbA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DuywlF9+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958edf5f7si18515185a.617.2025.04.23.17.49.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:49:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DuywlF9+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmd-00058D-OT; Wed, 23 Apr 2025 20:49: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 1u7kmb-00057o-TY for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:41 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7kmZ-0004I6-Us for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:41 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-736bfa487c3so300626b3a.1 for ; Wed, 23 Apr 2025 17:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455776; x=1746060576; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cWNW8eV1ZyPSVnus8GAP7nXIvpDAS5XtdbvHuSNPFs4=; b=DuywlF9+K67nwe5vufjfOZQbfHJ/5TfffewQfZePOoCVWg7qQl1gYirJYWRJzLRPMR EJTQ59Nf6GT8OkCLFey5TS2WLlDNCPToEFDJW5H69JhnlXhDJMCErqdy03fSvWUxgy3C BHdLcHQkfqdX7F3A0LfTznIJFme9thgX/maDzETe9Ba+1/YKBsiYVE/ULmEMh32hoPm7 F6WvN/qeXs6+Yk4aB6uMG0LfMYqFZQHJaqVonRXk2g09uc5wedJB0/E9R5H8fT+oSfMM sVtNubjO+bRaSQgozhTW7E0Xlk8PmAbZ7AUD030JnOGkDrIkhALVGWotetL1rXQfj0aL 4bEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455776; x=1746060576; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cWNW8eV1ZyPSVnus8GAP7nXIvpDAS5XtdbvHuSNPFs4=; b=Mmqdlkk1AE37ID4m6MEKb9Kzha9VbGWm6pqQf76kdcP4fXDthFIqhGvHkih1kLmcM0 RaWFjqb7tWutXzPyE8lg5WLTNpnIG31l0zTx4SnZGmYF1w0DhCs0nHqcwuEhDvbUYb2R dnVSj924sNnOuAMT2WCm9jTdcSNra1k1uf3Rj+JXMnNB4fVCA1mws0+Kd+RYni80J1Ys qDW9TecAFEWmAdwVK4b9YV7yhSjjgwAoHH7e0i5KHZUyOgmtGvn/H7+kR9iC9HDY9x89 7Ms/jUNtxAR86r6KyqEJ89mEGGlqz26EShqmwDMq4yZ6LTUUu3R3l048Z+WvUDiK2NCl s1uA== X-Gm-Message-State: AOJu0Yz+k5g1UH55QfuIM3ZLxXjxhh1L0pMWyP8q6Mz04Wn2UmOpzY7g ReSSnn3SmpNWuZEaLal46J/2SXd9ENT7oXW6p4Vc3rN2a2bbXtnA6dr7Ggle4XZxaSPpQFckMCC Q X-Gm-Gg: ASbGncvT3iyD8eHBA+37Ez5mDmSHSOzZswWkTxGBI6zPyy6FeVH6I3zHD/xfvRKwn5Y Fl/MdwbIGXo5ADmbvNK0oBzu5PqZl2rLt4JN17yy3n0FKXPiwuajSyk4okLqwNoL00BrdOtO6pr kuDOZqW32AR4nDvHOoh3VoITJR4fo+Y5U91xgvg2qZg/zlNGLA9xcnc+Lczwg5anUVXKI+MUZdb iV966CCR4Hr3bvYheXjPYnwOcKl1Cr7GagmjTz95ruXxOht7+FMd4RMCKQisTa7dgZbdbw1q+CA mXAlhJdVDnDt1MNgrNbwPmCxBSHCHTqfqjRXzEOIstDCi41mji3lKh3AkJCDvmEa5E9fYLu2B+W ARqrh8bR7BQ== X-Received: by 2002:a05:6a00:a8a:b0:730:9946:5973 with SMTP id d2e1a72fcca58-73e245bb0bamr898131b3a.5.1745455775941; Wed, 23 Apr 2025 17:49:35 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 001/148] exec/tswap: target code can use TARGET_BIG_ENDIAN instead of target_words_bigendian() Date: Wed, 23 Apr 2025 17:47:06 -0700 Message-ID: <20250424004934.598783-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-2-pierrick.bouvier@linaro.org> --- include/exec/tswap.h | 11 ++++++----- cpu-target.c | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/exec/tswap.h b/include/exec/tswap.h index ecd4faef01..2683da0adb 100644 --- a/include/exec/tswap.h +++ b/include/exec/tswap.h @@ -13,13 +13,14 @@ /** * target_words_bigendian: * Returns true if the (default) endianness of the target is big endian, - * false otherwise. Note that in target-specific code, you can use - * TARGET_BIG_ENDIAN directly instead. On the other hand, common - * code should normally never need to know about the endianness of the - * target, so please do *not* use this function unless you know very well - * what you are doing! + * false otherwise. Common code should normally never need to know about the + * endianness of the target, so please do *not* use this function unless you + * know very well what you are doing! */ bool target_words_bigendian(void); +#ifdef COMPILING_PER_TARGET +#define target_words_bigendian() TARGET_BIG_ENDIAN +#endif /* * If we're in target-specific code, we can hard-code the swapping diff --git a/cpu-target.c b/cpu-target.c index cae77374b3..519b0f8900 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -155,6 +155,7 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...) abort(); } +#undef target_words_bigendian bool target_words_bigendian(void) { return TARGET_BIG_ENDIAN; From patchwork Thu Apr 24 00:47:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883768 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3197783wrs; Wed, 23 Apr 2025 17:50:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWF4N3RV35N94jWfyrS1I82TKZwDQihQcsxy46E0r/COVa8LNSmIJxt9bA9duZWHJjHpZKhnw==@linaro.org X-Google-Smtp-Source: AGHT+IHn1oDjWuqYpQJyzBD0HmSLwARu/Dtdwn6pcehfI49ABYdfa8J/DrrcWAPwl2rgWJXQnejb X-Received: by 2002:a05:620a:29d2:b0:7c5:59a6:bae2 with SMTP id af79cd13be357-7c956e7c5e2mr146976285a.4.1745455826019; Wed, 23 Apr 2025 17:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745455826; cv=none; d=google.com; s=arc-20240605; b=PjN+7JPkKfc4icqLoTaoWAl5rCH3+4Tmau2K/xnqrF98A2T/nl4oTpwaa7U9G2DQNy /HqT2O8+DFUxJYpWXbzcIj825rztikbE7G0h8tiKiWdpYpck81ZHTmUv63+jWp+sUrfR +FjfGqXEZSPI92EOHQqJ0/oyrhrheiavKX1aR2cF0CQ8f5LUm/3wGnVC3pnJRcK4fy/W iEO2OOhqcwlssXkYjzzmwLFX/rM5AFRGk2l/tC/fSX/7vicTHpLCl52sW/+lUtWMcg9h p6DQwknSaVg7TEu3YBBWY2poYT4d4dHJ0y7ju3hq6eWRYVl24d/Bhgs4UQt1VE+kBldC Mgtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7uAMrxInIp+C0jH/wHKgggSAeCetsGjpX7/pWD8kiro=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=CLpMFMOw84o1z6FDAuQq+b8BimLdvDrM3alm91pLNKChlgxbkh2c/Eu/WvA/HKSFDz zFoHUp1lEThENWlwUwLws6l3LsgGMYug872MRD5kULvPoGSkHx/Coqtg7E4kuRhtih57 k+3dCDiV9p29UowTd8GESPAjoZ82m5BKlPCAASZdA+ZRN4vG1bNhMbaiV1o3Eez1MaCg joqPjNTHv1NNpTQ7yCmLDaJcGMbTK89o57A2XySdegjqFxwEB90uzjdvS6nQlJ3sX60U HHMwGpWlcjf0PA7So095ogxDFO7dX9yk8MfBhHDKGokFwpCGXqm2LACThBuv1DzcCAzd xtOA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sl1aHJy2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958eded9dsi17276385a.630.2025.04.23.17.50.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:50:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sl1aHJy2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmf-00059T-NX; Wed, 23 Apr 2025 20:49: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 1u7kmd-00058E-Gq for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:43 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmZ-0004IC-UZ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:43 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-73bb647eb23so342991b3a.0 for ; Wed, 23 Apr 2025 17:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455777; x=1746060577; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7uAMrxInIp+C0jH/wHKgggSAeCetsGjpX7/pWD8kiro=; b=sl1aHJy2iBl/Deyz9KU2wZUTokpRG13cXSIlsowy8nzqqAXwJPz9sLSXQe6S99vrbC o2sXmK2VU3srBjyq21AIOE0bXffBYrC2YqfXDDCH1IOUmvWVww9aGIF0/Dy0yrl1QJYe GEet3kSp0t08I/qjw7UVY2RSva2mSAY6Uy4SeGHaV9fc1XdHEStcBW3BxqS9cWH/hFY6 H9Xd4qDz+RgwYdqTBDWmJXsujUDe+o7ndY0v+2XBKfiJ0dXQx+uZGloyXn36t3enDShB bs4Y7T+csewoBSx9m+kRoeuqgF4Jya4U0hjyhO2LG/W3SUwjt9IondrfPpIaMoOwvPk0 nhTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455777; x=1746060577; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7uAMrxInIp+C0jH/wHKgggSAeCetsGjpX7/pWD8kiro=; b=sFf1msKRJc8UNsa2r4HAdf4qBpJ3nfc1rfWCRtPcLar3WdJRS6XRKRQhGrZT15Ul8G Ma5dfH8Ij/r4clC3zkK6GnJcIBvwdqLmdHyHDY051XiWLlQIQbC93BDlSpw038sPv96r RS9xx4Oe6nHPUp3bKyIOkmKtO5cQXivpcdughO7b0rEDKJPE5CVmUrkgiIiY9psY/eCd fg9s7aqiBgDUSRMdKi8NT4C+IFQ2x2PtY85/VGxQ1kB2UsK+zUQN8QQjAe0NzLLO34al u1fpJX5oWfXVwTmyCJMCuCrbf3TANGPq0GMy73UHHagRZEsVPyrV1E07ucniaPQ4Ww+z AzIg== X-Gm-Message-State: AOJu0Yw9HAmYAizjqfjq1nnbTa0k70PfijF+KvcCymFSPf3fGUF8SkI5 xy089eRtCd0iF4M+tK7TXDv8QayM+mLnl8wwqc/ZJxlYu/S21nJg4lJtq+jcGtD4CoZUURLFvWq t X-Gm-Gg: ASbGncvvxtNewMlZjsF1J8qYhi3i9roKF7j1PcW4QmRX5LtK09p6BCFMT6C8FHbS5WK LoeBVLuOrehTFUN2AJ4he5w2gzH+X0o+zSgQtzwksf+0njk8zq+JN6jLVjNp8BoMSoWp95Y4psA RR2DDosFY1XdI27LUQQo4SyQSsUODbzUms8eRyrBoriicU8gNoM5/CS06fjcRrKP6TQ2EFUEtWo nEB/8jvdceiDXcOyTPa+60iuSQ8lABSJ0dWPd0SnMFUK8vK5Kzgs4tOSQhadS1/9yR7xsh6o5HW JmqdpZtrnqS26jm0DJePI34EpPYyVw1agUsXunfbmlBJ1PdpFead1gTQSrmy5RFxVUMXzLp/acQ = X-Received: by 2002:a05:6a00:acb:b0:72d:3b2e:fef9 with SMTP id d2e1a72fcca58-73e24af4b04mr1089043b3a.20.1745455776765; Wed, 23 Apr 2025 17:49:36 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 002/148] exec/tswap: implement {ld, st}.*_p as functions instead of macros Date: Wed, 23 Apr 2025 17:47:07 -0700 Message-ID: <20250424004934.598783-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Defining functions allows to use them from common code, by not depending on TARGET_BIG_ENDIAN. Remove previous macros from exec/cpu-all.h. By moving them out of cpu-all.h, we'll be able to break dependency on cpu.h for memory related functions coming in next commits. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-3-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 25 --------------- include/exec/tswap.h | 70 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 25 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 47b14446b8..d000fe4871 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -26,31 +26,6 @@ #include "exec/tswap.h" #include "hw/core/cpu.h" -/* Target-endianness CPU memory access functions. These fit into the - * {ld,st}{type}{sign}{size}{endian}_p naming scheme described in bswap.h. - */ -#if TARGET_BIG_ENDIAN -#define lduw_p(p) lduw_be_p(p) -#define ldsw_p(p) ldsw_be_p(p) -#define ldl_p(p) ldl_be_p(p) -#define ldq_p(p) ldq_be_p(p) -#define stw_p(p, v) stw_be_p(p, v) -#define stl_p(p, v) stl_be_p(p, v) -#define stq_p(p, v) stq_be_p(p, v) -#define ldn_p(p, sz) ldn_be_p(p, sz) -#define stn_p(p, sz, v) stn_be_p(p, sz, v) -#else -#define lduw_p(p) lduw_le_p(p) -#define ldsw_p(p) ldsw_le_p(p) -#define ldl_p(p) ldl_le_p(p) -#define ldq_p(p) ldq_le_p(p) -#define stw_p(p, v) stw_le_p(p, v) -#define stl_p(p, v) stl_le_p(p, v) -#define stq_p(p, v) stq_le_p(p, v) -#define ldn_p(p, sz) ldn_le_p(p, sz) -#define stn_p(p, sz, v) stn_le_p(p, sz, v) -#endif - /* MMU memory access macros */ #if !defined(CONFIG_USER_ONLY) diff --git a/include/exec/tswap.h b/include/exec/tswap.h index 2683da0adb..84060a4999 100644 --- a/include/exec/tswap.h +++ b/include/exec/tswap.h @@ -80,4 +80,74 @@ static inline void tswap64s(uint64_t *s) } } +/* Return ld{word}_{le,be}_p following target endianness. */ +#define LOAD_IMPL(word, args...) \ +do { \ + if (target_words_bigendian()) { \ + return glue(glue(ld, word), _be_p)(args); \ + } else { \ + return glue(glue(ld, word), _le_p)(args); \ + } \ +} while (0) + +static inline int lduw_p(const void *ptr) +{ + LOAD_IMPL(uw, ptr); +} + +static inline int ldsw_p(const void *ptr) +{ + LOAD_IMPL(sw, ptr); +} + +static inline int ldl_p(const void *ptr) +{ + LOAD_IMPL(l, ptr); +} + +static inline uint64_t ldq_p(const void *ptr) +{ + LOAD_IMPL(q, ptr); +} + +static inline uint64_t ldn_p(const void *ptr, int sz) +{ + LOAD_IMPL(n, ptr, sz); +} + +#undef LOAD_IMPL + +/* Call st{word}_{le,be}_p following target endianness. */ +#define STORE_IMPL(word, args...) \ +do { \ + if (target_words_bigendian()) { \ + glue(glue(st, word), _be_p)(args); \ + } else { \ + glue(glue(st, word), _le_p)(args); \ + } \ +} while (0) + + +static inline void stw_p(void *ptr, uint16_t v) +{ + STORE_IMPL(w, ptr, v); +} + +static inline void stl_p(void *ptr, uint32_t v) +{ + STORE_IMPL(l, ptr, v); +} + +static inline void stq_p(void *ptr, uint64_t v) +{ + STORE_IMPL(q, ptr, v); +} + +static inline void stn_p(void *ptr, int sz, uint64_t v) +{ + STORE_IMPL(n, ptr, sz, v); +} + +#undef STORE_IMPL + #endif /* TSWAP_H */ From patchwork Thu Apr 24 00:47:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883770 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3197948wrs; Wed, 23 Apr 2025 17:51:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVjhk7iFP75Fh157QwJC1tbteYQacc6+AayvwohygILW4EK+/5Ce3zSqNz9XwFTY+rsxYtXAA==@linaro.org X-Google-Smtp-Source: AGHT+IFwpmb/I8lpKWRhxcKu7aGY2g8WBZDBQ+2ImDMRbIbFAuSZops9dw71MxdeuYgoFbMfku1/ X-Received: by 2002:a05:620a:44cd:b0:7c5:4de8:bf65 with SMTP id af79cd13be357-7c956f3ff8bmr171308785a.36.1745455866782; Wed, 23 Apr 2025 17:51:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745455866; cv=none; d=google.com; s=arc-20240605; b=UA+nF210i75XuZ1BqQlii8ZJqjeUUVFfbsZ/ZFZVuHPuJn7rEI4olSMS/GBXEMIJ2R ZoD2Lk6zXnhX+QVjFDc99ZsmFIgcxAFvGkz5p8XtGXmQjudaAghJ9XcwWPPKI0zk9car XNcaKvzTBASXK22AoTFvVmsm9H526sT3T2F/rVd5pSEF3DuTg/dGNX/Ihjm+Qp/zG+hG FsGtlJZ3/rMlFK4GzO529WVm8/s75kSQQQL+hE2qTL+L1lUtBdSKjjqFE6/yVEhqel1K JnQ3jCc7pR3bc6zDPnhuCd27Ux5zVaaIVQbv1DiB7l1QG1++w/AepLQazO0byi1/7nP2 X/WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=a3Pmx2FLEZ9kjbt+cSL6Q/1nXndHvzQCpATDx6amJMg=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=irF2wiSSjVkZaRq58tvdt0BoQtLBzvtfIn98kCOZmsiMWQmf/nlQ8zexsjxZ0EDYos JvO7kgbgdX6OY9DJmMPAzB0WE+l+MYx+pGMefgzQy82z+8x8o6oeM3iv5C5h0aXQhhtd BlLn4mghK18JjasxQuYsBIfnRq4U06T9jxbxYEEPG3Yiec9chNVbdBEHfXpSdnmZHKy/ EnpdLKrnjHQgQvuFkTNdVv0ZpOKtbKzYXP3JDfz49gieEWAL3UK8+uFMtTz49pNFvLJL 4woQN5Hr8lZ3jrQaXpTU9z3dJE4zeb14ZANcLRgo3B/zRF4nUIWNtMuhHgWntCOsbQFe D2tw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xa+C12CU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958c9b75csi20343785a.106.2025.04.23.17.51.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:51:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xa+C12CU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmg-0005Ap-W6; Wed, 23 Apr 2025 20:49:47 -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 1u7kmd-00058C-E5 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:43 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmZ-0004IE-UX for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:43 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-73bf1cef6ceso385075b3a.0 for ; Wed, 23 Apr 2025 17:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455777; x=1746060577; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=a3Pmx2FLEZ9kjbt+cSL6Q/1nXndHvzQCpATDx6amJMg=; b=Xa+C12CUcKKHh+5ijwXnHNyy5Mkn12/7Gf/9Vn/+AZP68dlQ5Ydj8DH607S8syoSLk 6uEE8U3fnxMEz0ra2nVKNQ9nGMq8K1q7ik0C4uaIlrZmVCRmU2Jq1l60y9HZpgYNTV7N Ocl3wLQtG6+SPkjMTfBQqMF8BAosMa1kZGHn4HxUozyFPaSlnk9CcI7sbtDfm1yjoHf6 qqB6MMK0yKlyOoutbEaPcu7o8PHtoVOvXHaaxCivvhimCZx0ASof9U2hFV6X3WF8R3OW Io5FOUh53ttZZgA0quDO1xlBx/zmKwhN8nFeay8osWiYbM/3mUVeCF1B6OUo0hpyk0VC G+xQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455777; x=1746060577; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a3Pmx2FLEZ9kjbt+cSL6Q/1nXndHvzQCpATDx6amJMg=; b=TURsMg/tIogb5+2qS1U0mDht0vjsKdpdoxlOEurEKjRYyXbj37y021qWQUbAR+H9Tk VCQuOCFqdbPfx9aLbdl4xNwhS41/7s45h40dsvtPHSKIoMAT0wo575i0l0J7pPHezszC /YvNa7JWBuo1balYfIvyQtGS2y1om+Xm/qWl/YkuL/bE+iAbGeGr4bRjhfRuSjTQp5vO dLU7y7igYjYR/JD1rnFeeJD/iVNF1KRKzZNFJ8FNzxjMiFaTb1H9E0DicDNSSmp/hySR 5uiMYMJDjJFJNZ349qfFPMtcR/V/vrkJVQF1cOELY/6hy/wW9dp0flQ1J+3svLHI7dKU 21vQ== X-Gm-Message-State: AOJu0YxT6zJk9r5oCLg0gwkXXVNS2bgx89J4SybxKsjoRER0qpcrTiuy mTGD9YW6R6BiT7UHgDYizTxaDzbdoQRtMMQdelr6lnU50pxyfSeWUdt4urOLcMqdqJPuyGsVFcX 3 X-Gm-Gg: ASbGnctdEPdUyKD/5gew9Ismaa9NoU1pUW8y7755k0MQBbbgVLzvcfyH3vBddN8vZD5 eE69afJMiVeFU81UCfmFhaqENrDe3Y6aa+EXCWiPD+HKrmYysf05x2QF0U+VgPL9IUZQI4Rbnwr +vxFE6Urq44+mxUVlszqZgIGkvl0N2BVlTC5nvE25JyTWiPLJmwVXVslNrAuo9LuNO5XPubwpF8 +Xbsxlo445DcPbVJ+4QRT+cL0FCYTDzB7Y6GdxEZpbAEMQ1imvY0HqlXjcQ7koWagZiwlgWI0oG Y6AEAGbdCmq5ZfTK8OEI7csVH7Pn9kaC31M++oV/B/Ixw/oU6/qeUL6xHjQeoFk8ZObPBHpq/om Pitrbz9EvUA== X-Received: by 2002:a05:6a00:2d21:b0:736:a4ca:62e1 with SMTP id d2e1a72fcca58-73e2460543dmr1098954b3a.6.1745455777349; Wed, 23 Apr 2025 17:49:37 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 003/148] exec/memory_ldst: extract memory_ldst declarations from cpu-all.h Date: Wed, 23 Apr 2025 17:47:08 -0700 Message-ID: <20250424004934.598783-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier They are now accessible through exec/memory.h instead, and we make sure all variants are available for common or target dependent code. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-4-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 12 ------------ include/exec/memory_ldst.h.inc | 4 ---- 2 files changed, 16 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index d000fe4871..7e8d66de31 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -32,18 +32,6 @@ #include "exec/hwaddr.h" -#define SUFFIX -#define ARG1 as -#define ARG1_DECL AddressSpace *as -#define TARGET_ENDIANNESS -#include "exec/memory_ldst.h.inc" - -#define SUFFIX _cached_slow -#define ARG1 cache -#define ARG1_DECL MemoryRegionCache *cache -#define TARGET_ENDIANNESS -#include "exec/memory_ldst.h.inc" - static inline void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val) { address_space_stl_notdirty(as, addr, val, diff --git a/include/exec/memory_ldst.h.inc b/include/exec/memory_ldst.h.inc index 92ad74e956..7270235c60 100644 --- a/include/exec/memory_ldst.h.inc +++ b/include/exec/memory_ldst.h.inc @@ -19,7 +19,6 @@ * License along with this library; if not, see . */ -#ifdef TARGET_ENDIANNESS uint16_t glue(address_space_lduw, SUFFIX)(ARG1_DECL, hwaddr addr, MemTxAttrs attrs, MemTxResult *result); uint32_t glue(address_space_ldl, SUFFIX)(ARG1_DECL, @@ -34,7 +33,6 @@ void glue(address_space_stl, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); void glue(address_space_stq, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); -#else uint8_t glue(address_space_ldub, SUFFIX)(ARG1_DECL, hwaddr addr, MemTxAttrs attrs, MemTxResult *result); uint16_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL, @@ -63,9 +61,7 @@ void glue(address_space_stq_le, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); void glue(address_space_stq_be, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); -#endif #undef ARG1_DECL #undef ARG1 #undef SUFFIX -#undef TARGET_ENDIANNESS From patchwork Thu Apr 24 00:47:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883852 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204522wrs; Wed, 23 Apr 2025 18:12:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWYwjcR203WnLwsTicuQj1nzsvvVNL3DN9MZ4H4bTzdzUceYxMi4yf4jsGkDzE8TOVa7qYexg==@linaro.org X-Google-Smtp-Source: AGHT+IF5h7WzWxfPmXcSCyzXJCXoFR7GN3xiO/6g1c5x8/Uujhwb1ruhlcqltBmDUesZD9VIyDYa X-Received: by 2002:a05:622a:1814:b0:477:6ee2:18ce with SMTP id d75a77b69052e-47eb2893650mr10878091cf.3.1745457141690; Wed, 23 Apr 2025 18:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457141; cv=none; d=google.com; s=arc-20240605; b=dldJu8DCOLX3psCeVvKPtc9qxFDfjzDBGzVr003Hay62WQxY6azIyy1TfBQWPnr9pG Cj1DUCa+An4nEj1VoGM/iltpP5y88b+2f+7yUxRc48IWQWgT/6K2ZXArG5Lp9vrx9MF3 fX8+j9MxxA8GEg+DAlZ0ewFPLQ/7filQvW8BlyG0bWpGkETFvw0bCR74ipNxhjjNm6jL VQFFnjePhPmZJ6elgXlNETVxvo7jRFxu2BNK+/sckT2iCdAp49uujDOO+GAlyH5RCGgq EKK10/W2Ku2rpcIo5Mh63DLyBOLW8reuqDuL/HEnUUNPYdJ3WMvVJ6mfuxMBXPYPNgAv WXtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gWWqDQpkYSHDISmeC6TzU4TbRuBzp7ZNAHRWv+UuIFE=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=iSzhPpLj6Ojx6loMrtDsFrcJ280NLfqTfdjQIy4i6wY4AeOw/gHxehWUAKxElAdXdj l6qEl6rP3jlDkW2f/meTcN7sztO/nQ02jh5nvt1AYrWJrPq2M+WknNobA6T5DFSO6Gt/ rer0C+u/LZqCkFP03RzBzPWGgkXQAEH4RoAFNQ2zrawWROnGzV+8Pk+APmqSvEFhqgTz EfrkqvaCHyoddS5GyXStn/LJuQMDdNLdorV092vvwA5vGg+My2e4spDaHLg2hKGneGoB dLICWwpG7r/Y3robVIKvNuwSI7dvEpM1r8pXP1QFIRTAdRVCL6pBXRF2wzb7Kvb9qWw8 +N+w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vBnMsAj5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1f96cb7si5332001cf.408.2025.04.23.18.12.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:12:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vBnMsAj5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kme-00058N-9q; Wed, 23 Apr 2025 20:49:44 -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 1u7kmc-00057s-3j for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:42 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0: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 1u7kmZ-0004IJ-Ui for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:41 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-736b350a22cso304575b3a.1 for ; Wed, 23 Apr 2025 17:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455778; x=1746060578; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gWWqDQpkYSHDISmeC6TzU4TbRuBzp7ZNAHRWv+UuIFE=; b=vBnMsAj5R4RfYFMFgQEXz8/FROUSUeRRwOFL5JNf/Go2Q/rj9TsJFtxnd0XuqTcRp4 EMZ8bie7Vk6BCedMnnnmlSEDnT7Lj7CJ/Jw8MHfU+4ZGrhGC5dGWur9lwXowhH0dMkdv LDd9tFAyENbyCX0AkEO6kE4UE0iBs11Ozfwes8b2x1WwEr/HwCRc9PI62qznIGwVAFuo tyMahI8IjSOsbl7M0ehCk/LS5bhNJC6IqgL7+IsNX0MHYrAHj8zA6CVQlH6tWS8afASQ DfNQzumTTQOfJSyTYnvoG8keJDfogxN4xbPP61qjj/1J/Y3drrCUDvFaAbIlWvn0oqPK axjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455778; x=1746060578; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gWWqDQpkYSHDISmeC6TzU4TbRuBzp7ZNAHRWv+UuIFE=; b=XxI6EdtPM82qBj82qY+wC2uj/rH5gmxE5f/0tjzBtS3yp5mukRlW0ZKtRVONLt0iZ4 WKDo8cuEfXD8hsXgYmaxZD6/ezyUElnfsI53RvGQcMRMN6yVGh3zcCERPcmhw+ybFLnA 4AbHfunccjsmNF/KxS9N6ndCzoMfDXq4pT1LHHQZU0H7IIdyCfoQR9H8rf5pXQ108JO3 1adlJvzAtyLFj4Z6hZTwYzMWLWSQ7Z+tUPdsAIdQ/kcopnecAGs2lrbX3VtTC7vBvugP ecvf01HTjtraG3QjebcBW0FZ8Mfw4b3u0XmTevf+EJ83HcQFpBFOTqI37/uf7g9wPRPO /Qrw== X-Gm-Message-State: AOJu0YyoKe6xZB/Rzm2DD7kWWc5otKMSX8wusF1pGIOgUovEXZ6Q7nUq ZSi6Z7rzrUzxRlWE47DZFRAww19+17SWSPKx4Ti1f1FptdTpk84okIruD6IcntxfuHs9CCFjWj4 4 X-Gm-Gg: ASbGncujyMPf9L5SL56QgjZwivfYxJR8xEZqKKvzi4120hCP+vlnMcGWk/WSqcR1Itx 271e8kRITY9iz/Vx0wgen2mP89knT+h9bmhbRi70uFtWp+NX2mKUybLZkew1xVTAJKMY+/GYA42 5sT+hkfZxX4MeyPV9aV85zn6+eS/kNk1c8XBB7XDSxcG03PHELV5Ux3v7mPVPkUsz0t2JSgSNOs PuyVqih/e77r0+r4UCbXqgKhxBKAP7YzLS3VZVXSPG8g/nmnB1Ro0tah5P3E4E1IYoFJ1i+I+zx 40cj0yl07FtsZ/2TJ2Fjhj9lZRLWkhzZocfrPOW3WzMmyY0D7NC0wU6Y8plpNqTP/Dmeq//g0JY = X-Received: by 2002:a05:6a20:9f4f:b0:1f3:3690:bf32 with SMTP id adf61e73a8af0-20444e9ca83mr894158637.18.1745455777985; Wed, 23 Apr 2025 17:49:37 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 004/148] exec/memory_ldst_phys: extract memory_ldst_phys declarations from cpu-all.h Date: Wed, 23 Apr 2025 17:47:09 -0700 Message-ID: <20250424004934.598783-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier They are now accessible through exec/memory.h instead, and we make sure all variants are available for common or target dependent code. Move stl_phys_notdirty function as well. Cached endianness agnostic version rely on st/ld*_p, which is available through tswap.h. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-5-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 31 ----------------------------- include/exec/memory.h | 10 ++++++++++ include/exec/memory_ldst_phys.h.inc | 5 +---- 3 files changed, 11 insertions(+), 35 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 7e8d66de31..66a4252269 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -25,37 +25,6 @@ #include "exec/memory.h" #include "exec/tswap.h" #include "hw/core/cpu.h" - -/* MMU memory access macros */ - -#if !defined(CONFIG_USER_ONLY) - -#include "exec/hwaddr.h" - -static inline void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val) -{ - address_space_stl_notdirty(as, addr, val, - MEMTXATTRS_UNSPECIFIED, NULL); -} - -#define SUFFIX -#define ARG1 as -#define ARG1_DECL AddressSpace *as -#define TARGET_ENDIANNESS -#include "exec/memory_ldst_phys.h.inc" - -/* Inline fast path for direct RAM access. */ -#define ENDIANNESS -#include "exec/memory_ldst_cached.h.inc" - -#define SUFFIX _cached -#define ARG1 cache -#define ARG1_DECL MemoryRegionCache *cache -#define TARGET_ENDIANNESS -#include "exec/memory_ldst_phys.h.inc" -#endif - -/* page related stuff */ #include "exec/cpu-defs.h" #include "exec/target_page.h" diff --git a/include/exec/memory.h b/include/exec/memory.h index e1c196a0c2..cc5915033c 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -21,6 +21,7 @@ #include "exec/memattrs.h" #include "exec/memop.h" #include "exec/ramlist.h" +#include "exec/tswap.h" #include "qemu/bswap.h" #include "qemu/queue.h" #include "qemu/int128.h" @@ -2732,6 +2733,12 @@ MemTxResult address_space_write_rom(AddressSpace *as, hwaddr addr, #define ARG1_DECL AddressSpace *as #include "exec/memory_ldst.h.inc" +static inline void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32_t val) +{ + address_space_stl_notdirty(as, addr, val, + MEMTXATTRS_UNSPECIFIED, NULL); +} + #define SUFFIX #define ARG1 as #define ARG1_DECL AddressSpace *as @@ -2798,6 +2805,9 @@ static inline void address_space_stb_cached(MemoryRegionCache *cache, } } +#define ENDIANNESS +#include "exec/memory_ldst_cached.h.inc" + #define ENDIANNESS _le #include "exec/memory_ldst_cached.h.inc" diff --git a/include/exec/memory_ldst_phys.h.inc b/include/exec/memory_ldst_phys.h.inc index ecd678610d..db67de7525 100644 --- a/include/exec/memory_ldst_phys.h.inc +++ b/include/exec/memory_ldst_phys.h.inc @@ -19,7 +19,6 @@ * License along with this library; if not, see . */ -#ifdef TARGET_ENDIANNESS static inline uint16_t glue(lduw_phys, SUFFIX)(ARG1_DECL, hwaddr addr) { return glue(address_space_lduw, SUFFIX)(ARG1, addr, @@ -55,7 +54,7 @@ static inline void glue(stq_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val) glue(address_space_stq, SUFFIX)(ARG1, addr, val, MEMTXATTRS_UNSPECIFIED, NULL); } -#else + static inline uint8_t glue(ldub_phys, SUFFIX)(ARG1_DECL, hwaddr addr) { return glue(address_space_ldub, SUFFIX)(ARG1, addr, @@ -139,9 +138,7 @@ static inline void glue(stq_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t va glue(address_space_stq_be, SUFFIX)(ARG1, addr, val, MEMTXATTRS_UNSPECIFIED, NULL); } -#endif #undef ARG1_DECL #undef ARG1 #undef SUFFIX -#undef TARGET_ENDIANNESS From patchwork Thu Apr 24 00:47:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883773 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198042wrs; Wed, 23 Apr 2025 17:51:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWgyvnz/XtkXtXtkaMrmG87kUmqapXlp8waCHp1fyxSUPoh2ztzPWUcN9+ygBkeHm1DBjEojw==@linaro.org X-Google-Smtp-Source: AGHT+IHUskgbXNNIMFOUxw15S1zYuXVVLUQ2nlEF11E3hogWKapriuD+9xi9A/jc1xwTSdxd1F78 X-Received: by 2002:ac8:5f50:0:b0:476:701b:d7ff with SMTP id d75a77b69052e-47eb43ab63amr9610081cf.41.1745455897709; Wed, 23 Apr 2025 17:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745455897; cv=none; d=google.com; s=arc-20240605; b=YJU1L95nbDpz6c9i1DYc0bciPtnwviPHGBWjvT45NohtpbUIwuma6xVrjVomHc8iRp StImJlJJ1jV7UJGm8RlIzRoL2pBVO1Byzjl72th4RuVRKXlk9UT0x3G2RCLECFTgvlBo QoZgkDOps1rXFdsnocoUqIaV/XMmkCCtHlsVZnYJvdE01E5BxRk8Oczla0OwqwB/PcGW CG2hYRPIdALIM/p3fXkdEzUO9YSaQkWnkvRBDHfvB6ilozFI/rK/pD8d3Sb8P7SuMCkp M18rY9ZRfOwD9ijxEpjDbtaYkJmzfslC1V1pkcv9LIpE4nvJEkS40/EolXsi03ITZQCX zEuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Et4hQDU8RZtHQwmfM7FlJplHHpRKrDTsE1B1A29z6gQ=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=i/N8CIeps/+6/RVcirtAgLqqJitigXVKXUn7XVdGU5lBaFyPSal7rJuIXcEbEevec/ B4HIw+yTcmVM7kaeuWeG58nf0K2H5k6sFW4nPs8mo3c13YbsiLOWlEi1egcCNAapzkvu zgKsG8QrXP2SBzHrug6s2vbYNwTtzffi1cb1rwLBV2j/vl6hqMY1XHRT2X8phhdX08hz acUD29YxmiCjL6GKEGD5ybSIRmmlgOFnjgqa3j+z7LoZPMWGN+YtwijISoFHU3/15CAj kZbKM1z8lJRMg16IsJiCoyono/uMX8KDQhEb3vK4h3Ss0MiHv/llKXXcyWZkLhIR5+iT lp7Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="nkmCO/hj"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f2ca762si5058891cf.48.2025.04.23.17.51.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:51:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="nkmCO/hj"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmh-0005BB-T4; Wed, 23 Apr 2025 20:49:47 -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 1u7kmd-00058F-Gw for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:43 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kma-0004IM-9q for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:43 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-736a7e126c7so335560b3a.3 for ; Wed, 23 Apr 2025 17:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455778; x=1746060578; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Et4hQDU8RZtHQwmfM7FlJplHHpRKrDTsE1B1A29z6gQ=; b=nkmCO/hjwltwx4W4bQxIyNBDzWdn+RYxGpprm6qGsAUvdG/GR5CrZ0CLvwF2Zq3ANX g34ZmI5EAdbsBpBlbc7SvHJtOGcn5MEjaCpFcj/QFxGqim6R/KQDWGaURQtTC/Gfsr7y iiFFcAF/Yy4nnPUK7dQu37Me1hMOOG1ociMJEGJ14UzdIfzhwoyEFu8TbXAYr+OseVcN biffyl7+l2CAPqkw5+g1dNT2K8Nf0s9++iy5BjnVjO1C/97GLzDVRzzdkqdL9GCZBUzV 2y+HG3AoP8WAH91pxxx766zr3P/Tla4NqT2e97hUmkOvQxrf4dLMFX+jRo0uj1ZYD/4t JiTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455778; x=1746060578; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Et4hQDU8RZtHQwmfM7FlJplHHpRKrDTsE1B1A29z6gQ=; b=I1qEh4m4xD9H3PDws/nmDZg7n7Gv1m97BgkO7eaX0sTX02AFp2wSL2+H5shjTedZ/Q 4La8zpkBL1mItxI48lW6QQv0xIDlWRV94K7L2CQM+HfqVJ2OZ9KMD1NbQyJGvL+vHsFg sxKboLPMc1aT94RO9dlUwbhH5QTd4hPMUTfJN6EzX9WNU/Fa8hi0eEkAoWwZjJi6GwdG H9ayxma+JHlF2byTBn8ADV4Q9Jo3EE0E0RxWKSF3fUj7Y7XXBFe/7HqYZkpMF49ivoCG gkRn0synHdUZTrryAnC8r8D/zTIGNfW7UXfnf8ICMvkyIJ0+sKx9Rut2mlQj01+Ef+nP m12w== X-Gm-Message-State: AOJu0YxnrHf1Ezo4OphRZjgup7RwxUorNZhrgKZZ66kHwl3FroJ6zp3E zLPkOOc1CUAVsThF8ix2FU0RIkpgKRPR68MrNHrqoPVmsUJnK0RsFAP7cMPNfK9ksVJO95Ze5+b z X-Gm-Gg: ASbGncvngB6AiIrb3sAGHizYscNI15NChWEQn6TYrbLL6GmEbMRBFZ7Jgwj+Vd05Uc2 upxCGeMuNmAU6g8h+c4PBWOm/aEzzGIYuo9I9iplnCtAtwr1XUECt6k7D8oHFuobb69iv7hwG3Y MbGZjLpvzSAPOkfxq9xiGvrVmOFVkTz0iPsdbC4fMdjys8/wG+ZiaqYqladGe0jlksFwMf1JClD KQdsMyXGbRJdAL/gmAF93SkUA/iSKzym4FtWEdsmR/kM4mRXY0+P19BM5rnrLA1BFkT6NQEu/FZ mk+YV8dHFK1WoWj2JaP0//RPUiFaSHGFPuJQdj0o7xdhvb/xpYls5qBxprOyIk9aa9XgjjsefPY = X-Received: by 2002:a05:6a00:4485:b0:736:ab1e:b1ab with SMTP id d2e1a72fcca58-73e23ca5b8dmr1031887b3a.0.1745455778619; Wed, 23 Apr 2025 17:49:38 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 005/148] exec/memory.h: make devend_memop "target defines" agnostic Date: Wed, 23 Apr 2025 17:47:10 -0700 Message-ID: <20250424004934.598783-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Will allow to make system/memory.c common later. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-6-pierrick.bouvier@linaro.org> --- include/exec/memory.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index cc5915033c..577f473446 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -3138,25 +3138,17 @@ address_space_write_cached(MemoryRegionCache *cache, hwaddr addr, MemTxResult address_space_set(AddressSpace *as, hwaddr addr, uint8_t c, hwaddr len, MemTxAttrs attrs); -#ifdef COMPILING_PER_TARGET /* enum device_endian to MemOp. */ static inline MemOp devend_memop(enum device_endian end) { QEMU_BUILD_BUG_ON(DEVICE_HOST_ENDIAN != DEVICE_LITTLE_ENDIAN && DEVICE_HOST_ENDIAN != DEVICE_BIG_ENDIAN); -#if HOST_BIG_ENDIAN != TARGET_BIG_ENDIAN - /* Swap if non-host endianness or native (target) endianness */ - return (end == DEVICE_HOST_ENDIAN) ? 0 : MO_BSWAP; -#else - const int non_host_endianness = - DEVICE_LITTLE_ENDIAN ^ DEVICE_BIG_ENDIAN ^ DEVICE_HOST_ENDIAN; - - /* In this case, native (target) endianness needs no swap. */ - return (end == non_host_endianness) ? MO_BSWAP : 0; -#endif + bool big_endian = (end == DEVICE_NATIVE_ENDIAN + ? target_words_bigendian() + : end == DEVICE_BIG_ENDIAN); + return big_endian ? MO_BE : MO_LE; } -#endif /* COMPILING_PER_TARGET */ /* * Inhibit technologies that require discarding of pages in RAM blocks, e.g., From patchwork Thu Apr 24 00:47:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883766 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3197722wrs; Wed, 23 Apr 2025 17:50:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXfKQNSV8fH6foV2k3OGDVfwYVzymXSMRvf4Gah3au+xNLE9XZ0vybfb0q4GM2DpZ26KO92+g==@linaro.org X-Google-Smtp-Source: AGHT+IHlF4x4fQzndQPt1hPoTiloME7WIArn2vIQg0pghi3qRt5X3IUHMG+5/cIW6hzYn+YJ74vA X-Received: by 2002:ac8:690f:0:b0:471:f482:bba7 with SMTP id d75a77b69052e-47ec51e091dmr5971021cf.22.1745455815609; Wed, 23 Apr 2025 17:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745455815; cv=none; d=google.com; s=arc-20240605; b=d0GmC3eBwfViUBKeSuD9nx1JNKmqhCTEKB9tlVaSNSO5JBdxlXPf8/HYzm2bXo6uaD kYvDxLQ97fnBCu1qsVGzR7ukIop3F+CDf8rusJ0ULuYZh+5VUNakLVN0UgjuwmEdQsfK Sy6s8VWtoDkVAzrZrgdq9vW1DOK5Q/xQgEu5uZSohqNR9EkPEV23cRWp8FZ0UTNlHbZy 7jRVg+GAbdcPU2gnZZriZvxJvz/ljbnwrCIZCDkiRj9FJuZrje3neSWBHNGaflv8KRBx mE7Z6EB9ht29y5qymnO0ITNu3AAocatYUnc0oFMtyo/6R7IGqNeogPIp5D17QacVM7bY IO6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=e1yx9YkYhatf0BqQ0DpUnwACHStmKGMnjqmqyTQwR00=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=eOGJfcJnGp5DLWO/nCFK5wX7jCS6hGqSW0bDZ9XpXpxpLMBIDa6pmdNUkzoQ5NQb6m E/r3pQl1f/Z7WXoCIkZZCbj7EkiQfDayb0aCG/is9gas2NMKyEpY8WJq/P1fsxRNhEwm aQH5OmptUleVq7pM7VijUxlGGH41BD6RYcJbeWfAPr63XnJ8vNfvIS3CQY2l5DQs9Um3 lDfd3X5hUkspBzaOISZ88HbYdHlrK4RRalEt7WfyKK5adPzfVhg7JIKDyu/il0K5ilBq OaX84vDuzKG4flJ4XtuJ12kXN9qc2vFF1mxWoK29Nqjd98VkHiIqula1lPOi6epyhldC mEsg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z+mYzs7x; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea24aadd9si4949001cf.496.2025.04.23.17.50.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:50:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z+mYzs7x; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmh-0005BF-Vw; Wed, 23 Apr 2025 20:49: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 1u7kmd-00058G-IX for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:43 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0: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 1u7kma-0004IT-OG for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:43 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-7398d65476eso358746b3a.1 for ; Wed, 23 Apr 2025 17:49:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455779; x=1746060579; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=e1yx9YkYhatf0BqQ0DpUnwACHStmKGMnjqmqyTQwR00=; b=Z+mYzs7xyoV/qA0Nd7Sds0Mc7BlxWIIIxccFODiQ3JwdhkVoBRWcITU3TjNbN57o2l V9iS0eEljClHEiftpdJh2G27zANDssXFkJsVIUUe9G5LZTDx5upsdtVSNRMVOB7yQEnX Klg5PkwJ5G4AszAPTyR5rGmPgl7Yty+EqXgoImhN9PSZ98Qkaqupf1PEJj5tQ8oMBNt9 CXV6bCP4DkpYKLbRN6PjKFZebjrmG1mJcnszN4Ze5mdu1em/PLWiSTblxJh6yYBE4ORY D6CswNZHH2T9DDmXroMxO/5XG0iwc0wJzj71Nd1BPD4uXp92OeGXoK9ZwmjlUBlKI29t /mxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455779; x=1746060579; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e1yx9YkYhatf0BqQ0DpUnwACHStmKGMnjqmqyTQwR00=; b=o0qhybhn6ItKrD6xrfUW8/aV55aolLlaqFVJ40FqUQnRBQ8zqWCfk3lDQDpisVOjOU 7CU1VzteXvDCUJlnvk4TD/E4vuwIaO1IeK9Nu8ocenamcE3Vu7hWkWtfuNohqSJWiD59 7wnEo5lyihbNWMJkTuaIoHfFu9e/kCHK0NW15PhhuppXC7UZNM/GNmvnC8ERtYT5vNYM lIbPcmqqK2uctxAgnzrIIA8ljFc8Rfb3q3UHnY9HpsyJNpPlzW0wwq6x40axBeQammDn WwU5MgXCw5H72qFKImgHtif8GzNHYXMXJB4pJbkq6pW89bN+ujqw+dOuuf4N1M1BDJWa bc+A== X-Gm-Message-State: AOJu0YzmfoFtbdIQwiRbkf5wQTr9HSzn9RHEBd7Jl4FvCEGhBXvQ5N6Q lQ76CnUvaR8g5JPwCZR1EA8tEXF3OvU/k6Na39w5Btf/XCb0/W9rR6CkS9bDpgarLd2qNoj9sCW s X-Gm-Gg: ASbGncuxSYGTvgtuqHY5wi1iyAtUmjaaoPIBtW4LLdVps5nycciWQgC/Sz/AGlPJN8W YxqEOPa4YLrxwxoRy+J5C4AQ7CF6Ikgz84ciUIcyL9Yowh8iNNQkYt6ghuyLknj2W4XYdH92SpS bhYq8jWor2YEb+iULXDlvhDmgfD1GAKLrJSUVW2uDaXiuZXc8mVVfIRqbkz0WPbh42muZwAU46K wIFyBfpgCINSe/H2xkAWIdSfnKdETbm1cfO02fBbHU3dpubLuyXWgSzlPh/8ieSmddAZZekZ1wm 3j+zsLJZBRW7xzsWAA9nAQNc2nTGydUza5Z4Dak+bpVlQlGQe1WFb/DWyY6y1g38pjb2EwcayOI = X-Received: by 2002:a05:6a00:1947:b0:736:b400:b58f with SMTP id d2e1a72fcca58-73e2660902fmr738730b3a.0.1745455779398; Wed, 23 Apr 2025 17:49:39 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 006/148] codebase: prepare to remove cpu.h from exec/exec-all.h Date: Wed, 23 Apr 2025 17:47:11 -0700 Message-ID: <20250424004934.598783-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-7-pierrick.bouvier@linaro.org> --- include/tcg/tcg-op.h | 1 + target/ppc/helper_regs.h | 2 ++ hw/ppc/spapr_nested.c | 1 + hw/sh4/sh7750.c | 1 + page-vary-target.c | 2 +- target/ppc/tcg-excp_helper.c | 1 + target/riscv/bitmanip_helper.c | 2 +- 7 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index a02850583b..bc46b5570c 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -9,6 +9,7 @@ #define TCG_TCG_OP_H #include "tcg/tcg-op-common.h" +#include "exec/target_long.h" #ifndef TARGET_LONG_BITS #error must include QEMU headers diff --git a/target/ppc/helper_regs.h b/target/ppc/helper_regs.h index 8196c1346d..b928c2c452 100644 --- a/target/ppc/helper_regs.h +++ b/target/ppc/helper_regs.h @@ -20,6 +20,8 @@ #ifndef HELPER_REGS_H #define HELPER_REGS_H +#include "target/ppc/cpu.h" + void hreg_swap_gpr_tgpr(CPUPPCState *env); void hreg_compute_hflags(CPUPPCState *env); void hreg_update_pmu_hflags(CPUPPCState *env); diff --git a/hw/ppc/spapr_nested.c b/hw/ppc/spapr_nested.c index 201f629203..a79e398c13 100644 --- a/hw/ppc/spapr_nested.c +++ b/hw/ppc/spapr_nested.c @@ -2,6 +2,7 @@ #include "qemu/cutils.h" #include "exec/exec-all.h" #include "exec/cputlb.h" +#include "exec/target_long.h" #include "helper_regs.h" #include "hw/ppc/ppc.h" #include "hw/ppc/spapr.h" diff --git a/hw/sh4/sh7750.c b/hw/sh4/sh7750.c index 6faf0e3ca8..41306fb600 100644 --- a/hw/sh4/sh7750.c +++ b/hw/sh4/sh7750.c @@ -29,6 +29,7 @@ #include "hw/irq.h" #include "hw/sh4/sh.h" #include "system/system.h" +#include "target/sh4/cpu.h" #include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" #include "sh7750_regs.h" diff --git a/page-vary-target.c b/page-vary-target.c index 3f81144cda..84ddeb7c26 100644 --- a/page-vary-target.c +++ b/page-vary-target.c @@ -21,7 +21,7 @@ #include "qemu/osdep.h" #include "exec/page-vary.h" -#include "exec/exec-all.h" +#include "exec/target_page.h" bool set_preferred_target_page_bits(int bits) { diff --git a/target/ppc/tcg-excp_helper.c b/target/ppc/tcg-excp_helper.c index 5a189dc3d7..c422648cfd 100644 --- a/target/ppc/tcg-excp_helper.c +++ b/target/ppc/tcg-excp_helper.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" #include "qemu/log.h" +#include "target/ppc/cpu.h" #include "exec/cpu_ldst.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" diff --git a/target/riscv/bitmanip_helper.c b/target/riscv/bitmanip_helper.c index b99c4a39a1..e9c8d7f778 100644 --- a/target/riscv/bitmanip_helper.c +++ b/target/riscv/bitmanip_helper.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "qemu/host-utils.h" -#include "exec/exec-all.h" +#include "exec/target_long.h" #include "exec/helper-proto.h" #include "tcg/tcg.h" From patchwork Thu Apr 24 00:47:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883776 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198631wrs; Wed, 23 Apr 2025 17:53:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVC+1HtD2ziwbZ64DUg87ur6C+VlZf4LD1LTPQq2mTrtOWJkLt+pVAt19YVnIxwmT6nnn/xPQ==@linaro.org X-Google-Smtp-Source: AGHT+IH2g06DFCiVUmfZvWdwjq0W0hU6D7/NJWasDtq2DrzMvykYO0u0ZJYi/plgd2z4UjG6ZHxR X-Received: by 2002:a05:620a:3946:b0:7c5:5edb:f4d5 with SMTP id af79cd13be357-7c956eb32e8mr149700485a.2.1745456037900; Wed, 23 Apr 2025 17:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456037; cv=none; d=google.com; s=arc-20240605; b=M1UHDCujOHmRP/scsz++lwu7aOP6W0GTxz5rv/i8HgsHPF65bFwYz4IqfoXVb0xjuG 2c1j446wY1m8vf5YkST6ArcQRK61MyOWUcMdUcnyCtYLatj1iyTKfhdw38Ejc/Do718l OJ8cXI9WjZAdX+PJYUemtwgswycREwHx+8uMFA0QpOnJRT1V+pXMorRG8ZSlcbHbpRaH +3eZckAYAoXj1ynP6BfRKemp+lY1ryHvUIO1261Xc8WW96mv9x7sO+4GKSsWm/0KpE9i As7FMtOUL48yfNfcBBB1W8GmZs6vS8oVQGMSkcALi1ji83Qt8h1XUKAAuqOGVtrYz4jp KUBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8Xpt+c4uiLvgJ+aGohvTC4gUHZh3/iFralC/z/ZOSEk=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=OJ9X8YlKAtjxjBh+TfgYzmZl9Al2AmzlEjcExd2uL2OwidoohedPxJzvi5aq1f4/5W DDapRda2Bgedp5cDT0SstFAkW6Coo0PKeGAoivJyU6gSLmpQsrePWBnMRaMZBF39ki9Z r9pjX5jRq46s2GH3PGSuRZfKOXRs+MbvZiraHOpwvwPkhdE5znkCiYl0Lgq9X6JwKjJq +cJp5U1Q03cV+1lDKgWKaTCVAtUz37r8D1sy6rDwK+Ys8L/I1g/1OdhA+kGyGWw1ADgq Ja22fHG6bluT3/lZyuiK1DJzduSHhNVV+uE3HvZMNUjMs3G7A0PMnA0Eh6iMWQvDgzk9 d16Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="tfZQw/Ti"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958d873cesi18654185a.282.2025.04.23.17.53.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:53:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="tfZQw/Ti"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kml-0005DB-5Y; Wed, 23 Apr 2025 20:49:51 -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 1u7kmh-0005BA-G8 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:47 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmb-0004Ic-7u for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:47 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-736b98acaadso365220b3a.1 for ; Wed, 23 Apr 2025 17:49:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455780; x=1746060580; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8Xpt+c4uiLvgJ+aGohvTC4gUHZh3/iFralC/z/ZOSEk=; b=tfZQw/TiyFA+PjtEDairz4yQfTXkWeKEswaodMhcAc6O46OwHIPqVVW4gRxUC2dk7r OO+nJw9oBG5L9aLqp2s9V6EDY10mrShRTcdJYNhttfp4vYsdSHoiej8LTbVnPZ62eyar bArlyUWAp8sS2bpo518/G0kglciEHaJG5hrX9IhrC/SgSldFH+p047YOQ7dpXiu/qhHm 1/FcVFfT3IpgB72FcJkVUVvREE5uAltU2F3C74gP/f/4F23rvqdkQDMTZNQw9qulWCdj IpHGFkfd67JiBkpf/Cf8dlOm8fifhwJBeUfu2BkfX5z1mP4aEXbGoEj1E6fE2pt+Fe8L YdYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455780; x=1746060580; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8Xpt+c4uiLvgJ+aGohvTC4gUHZh3/iFralC/z/ZOSEk=; b=ixJydogkqxZJv26YvGsHyWQkd/duwAe6n7+uc9mMugzdq4BvR1mo23p+oN+R96myyO gZ0Uny5+OxMH4w80zZClMkrPx+uqcQO91DDAwPxIKEX0YyFi8qRWuap4xmpBY+pBx4cT HSchCmxAqWj64aXf/8bV5qBM+y60EBIH1tU178h+6Nyhcppx2wpa7+rg7ghVh3hPxxat g40qyQWoa83eU/h+XELD9L8Fbbe6vzqkK3B/JyZLQ6lNc3Hae7adI6aqoxQ7CNscOTqi BUxoXQY1zX8TtnxsF8yvJUajinED3MXmAC6NaDIyAiBTn+p/738BOVhbndcKRv8RBxKl Ibfg== X-Gm-Message-State: AOJu0YziGYw7UrTIecai6mwS/S6TQ40NhX5VQB/85LFFTBHNTBZZ3UnQ FnCPeeNApuOUhXdPhKKfl4TYrpHWWhJORo2fFWizemY+jrEw0j86/1Aghihyki8UJI6PHa8MhtJ J X-Gm-Gg: ASbGncs8D0zaAPMrK/CEU/pLBkJjIY0yUatj9DGlh4lZcEhU5Mp0xQ22M8S7rIF9qA3 F185nJm/UUY4rqpaX9vhyYrzkAiR8pwzMSfCaKGlxl08/0jCjn1xed8keUjeJqinBK6cJFNY0Ul uHLvLwHjf3eAG4RbHqRIS7nvxsgnBvq6Bc1LV6DXkdL8PUJnF60EcdJhOw2TBcXxODJWlDG2iz5 ToknvoMgIHkMTbrQQLxuQ+TrUzJ+r8ju1DPAT1heDw57vksGyjBAdoFpKRgDhX3iYZ7yDV+TU8k wU3okQXDdRp/9TBPQc+vSOcEzHQs9Qd4+JumCFxSaOHQhEVqT6STGCfsE3HS3vrhzq/qq0KOdHg = X-Received: by 2002:a05:6a21:1706:b0:1f3:345e:4054 with SMTP id adf61e73a8af0-20444e9389fmr838334637.14.1745455780013; Wed, 23 Apr 2025 17:49:40 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 007/148] exec/exec-all: remove dependency on cpu.h Date: Wed, 23 Apr 2025 17:47:12 -0700 Message-ID: <20250424004934.598783-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Previous commit changed files relying transitively on it. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-8-pierrick.bouvier@linaro.org> --- include/exec/exec-all.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index dd5c40f223..19b0eda44a 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -20,7 +20,6 @@ #ifndef EXEC_ALL_H #define EXEC_ALL_H -#include "cpu.h" #if defined(CONFIG_USER_ONLY) #include "exec/cpu_ldst.h" #endif From patchwork Thu Apr 24 00:47:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883835 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202170wrs; Wed, 23 Apr 2025 18:04:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXt1mYVSYZx8P66wN+HxaZTzpVEjI03vAzGODE85yeZ1zT2mkEdvEbhQUukXJPZOwBBrIsvUg==@linaro.org X-Google-Smtp-Source: AGHT+IFOKc8Ly2iA5w7TCzCYt/JGnaow8nMW4nSJtJ3oUndSDzSudsSFEa6A9OYLwD9UrXOjFZTF X-Received: by 2002:a05:6214:27ee:b0:6e6:6252:ad1a with SMTP id 6a1803df08f44-6f4bfc78918mr17463916d6.28.1745456694016; Wed, 23 Apr 2025 18:04:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456694; cv=none; d=google.com; s=arc-20240605; b=gEhSjP4ABlG6YIjIgCWpS47wSLwtVCjzdF8s2O/C44MjtCto/biMZ+IhTlXADghQw3 9ebL7a5e5oIgjbuJh67HX9l2qNM1jACAZ+7omQGJlSPr+HS/C0x9LFTuOZLEXeTkfLSl lQvhrA87JscRcchNrhXp1zas/zrQVokDmVBiXa5hiNelU4gs119kyKCX+Hbsc20lMcY/ gTM1K/wTVRG2eqDc+emwvkjNuDSv9rYs8p7Dje0P0MWG3uStpe++Wi903kVp6rB5lxtf USA3ADJ+OblR2OvQUx3WR4QZuvtfmZUgDApWuobyIWdActMJD6XJTOv9a2AEzCUtFzqz VUBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=C24thF1lHDac0cqqp26h4qdOGOfLrlU2eZE0vToxCKw=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=eLGh7sufXtmZBFodokP8LE7o0wrDLd+NBDbEw1ZLpMFrFihmV+dYDGfKFFZM1JIn5g F6y6hoE0oZadE44fpRJe8jYvb7/7FSiitM646Ol3y0mBlLUcOCDNp5Il/eGMSqMb5Fnu lvz/JlqLJu0q8FRR4rN8qBxPQGIdMuAwR/Awc1+qxLL2ypF5xAPYpeYmVGs1S6wCfQ4Q RC5vWCU+b2dq9T66u+9hhaeCyoiWJerGiJO8bLj6wnY/rOR6ni0N68M6IqksKSvzijFc 4OCCcpAYE6Na1lcaSPffLgIhMbAyA7YsKyntBnMMKBS7dKbdlXsHUET+A2om/6xd+T4t SypA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WJJYQW48; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0aeb3adsi3801206d6.342.2025.04.23.18.04.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WJJYQW48; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmi-0005Bx-NW; Wed, 23 Apr 2025 20:49: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 1u7kme-00058z-Ot for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:44 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0: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 1u7kmb-0004Io-Vu for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:44 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-7369ce5d323so302811b3a.1 for ; Wed, 23 Apr 2025 17:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455780; x=1746060580; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C24thF1lHDac0cqqp26h4qdOGOfLrlU2eZE0vToxCKw=; b=WJJYQW48c7huLeV6vLagRESM0EL7R5d9Pk26QwYSH8SAk3MYO7m3i6gauqWeAAMICY aFjEA4GjyC4XAld9JPHu1O0HEbYINjrXSThwY99Cpd2FoU144sHeuRLNGs1xqfcPtiU/ Zjxegvy7GRPweOFCzrlZIw21tzbs4Yj2wiw7WB4VYttbHFumsOs30hhhodYovsrMJ26G 1FdwTjdVMVN/jdH+3tcL2nU8QkKKsnLl5lrHsjyV3jy0AB1iwHXulm6ylHHU4HiK7uMj ai27GuqE0WsuhW9fUM2VhrhwmkiuH8KZy3FBp6AEsVexcs8MLY6ug64RSie+EtXKxgx8 v7YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455780; x=1746060580; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C24thF1lHDac0cqqp26h4qdOGOfLrlU2eZE0vToxCKw=; b=FogR5Y9gGpgsYbZV6zkdEyiUtdYsM1iccYgOsM1l6dS5e6dJZXwIl2oUrHhbqzNnmo tP4UrQI3pOE2VjcCBf9ercs1HZgVkYe6SYjP5TDkkz2G48Gudun5G+BWGYArtN1JsHaQ UwP86glD/BFJgujE389S7mzyXZWbmSh7m8h/1TJPUGaBf4Ew9RTMz1QPX7onJ1/GYwwE 4f3RR3dLTbWWSe+jWNalg9qFnVKasr7orVAzG3CdwwzGiqC9tu2wb+1TOscMP90CwwNl FnIaY0AWm8mu4xgZ958IFA+iJgDFjjWcI0FRLvgFVW3xA94j7vNUoWveiQTbH5h8yps/ HXLw== X-Gm-Message-State: AOJu0YwyVGaMpwf1T2siPylomuEtfU9lPwoytFjKhEMUe6QzEUrx4RGQ fod7tWu7etaMkiMdVhxSnux1ODv85rUJWiNYflLEe0KDMZqixqyBwHr4kT1jfG2KczoiwfeyunA o X-Gm-Gg: ASbGncsmueMfjVl5rdxloMKdvltkAVtvgSjc1Orj6x8YBk1Pn9FGoTt2t7FNqRRl+Gi yyrXjSR9mUytn4RxdNieNXwrriRWHhB9lSwE0yOV/mW3zCqlBOhCIOrsMEciUkavt7Td73iUWWb JbXCS0dhLKaUwOrEbHWmA4NoxzpFgUhmYziOZyt7a5CymWD2hSDzBMtRuBYRjykVvLM4vkJt7FS az/zRvaMS1+LN9kpMA4K9DacXnG41IxCOpjn6vDVriiJISIhE/1zSCPvBfWDLMJ2eAPCouC+paz zS7FRoLj+LAadjiqRcW8nAWlHBIhLrT9GrPPkHC/vVa4l1q8Nk719Q0NsN6L3xSV5jucA7QQbTQ = X-Received: by 2002:a05:6a20:c89b:b0:1f5:5ed0:4d75 with SMTP id adf61e73a8af0-20444fbb7c8mr859178637.31.1745455780601; Wed, 23 Apr 2025 17:49:40 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 008/148] exec/memory-internal: remove dependency on cpu.h Date: Wed, 23 Apr 2025 17:47:13 -0700 Message-ID: <20250424004934.598783-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Needed so compilation units including it can be common. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-9-pierrick.bouvier@linaro.org> --- include/exec/memory-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 100c1237ac..b729f3b25a 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -20,8 +20,6 @@ #ifndef MEMORY_INTERNAL_H #define MEMORY_INTERNAL_H -#include "cpu.h" - #ifndef CONFIG_USER_ONLY static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv) { From patchwork Thu Apr 24 00:47:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883780 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198766wrs; Wed, 23 Apr 2025 17:54:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVVYAkNIQr4MyZc6c6JsXvus0SL5z7wvLIT8dgc9LIC9qW4Xa6zMMY/qGPuwAjo01zn19L+bw==@linaro.org X-Google-Smtp-Source: AGHT+IHMwYeWSixI/rG5F+WHAkvKW6cVdW30SRNCKVoZFun00UsGP8npJ2ugxkYxxDvtXDt6W4+B X-Received: by 2002:a05:620a:44d3:b0:7c5:5f38:b78f with SMTP id af79cd13be357-7c956ed78ddmr150794285a.29.1745456074307; Wed, 23 Apr 2025 17:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456074; cv=none; d=google.com; s=arc-20240605; b=RodYHjyKqpYy1TNB33gTQCwxqNEdz2UdtOOnGI/MrPqvLQHbODTlg+x+I1/BS5WqnQ gQMFRefWTbPL/v2CkmSivdbhUcOl2JdxfwDvbjO/ONfsWjhYTnv6kJyVUDRu4p0SMltU NxYURfhFccwumBkoh4qFpA5s++31SiTP+rsYquyXrIvRAqvnu+Lb9OI5mfASsbHkmvrT vL+H3UPJqR6pSUWwCvtkLOYGTDyJxqo00SMnuVfMcNn90Q1g/4HZN+HX/F/Vyaq31vsp vLtb+TYCqdAGkN6Of1wKf8imah+Ua8NEAkbFmL35jpxcrr9Vps2kjRNwP59YF+kprNmw hFUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JxyuRypmtO/qMdbERqKxpEE+x505tOJO18IE2EpCobs=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=SuusejcUpe2taGdB0jhcPeHv9Wj5G193SOuNfMHYDeSV5rdydZ0J9nFFAJdvPLUDB+ CSXb21FTF7mHJToPe0YcZskKSKHoJIqLM/KvxxGHel0d+qPRcXqWb18D+LwY2qfXsaiS LJEftJCDgnrrkt0K//FfgY0WXeYrZVV8ypBU1HMKQxO0hcj44Ph2WYTcSDO+IDCB34Zd Jz54i3cJ6jdPpaLN01r0kq1SOSYgAxz86CIpcyPhbmnBm0ykKZqH1km5cySkaLEz8GCg 1f0i/qkITg12mLYmWr4LKI82LbPQ86CRkOF0rgh+v3Cl5T+BIS95BG2QiZ/TL1i7nnGK 74JA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b5j1rgic; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958eded9dsi18021185a.630.2025.04.23.17.54.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:54:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b5j1rgic; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmh-0005B7-BF; Wed, 23 Apr 2025 20:49:47 -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 1u7kmf-000591-0c for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:45 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0: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 1u7kmd-0004J3-A5 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:44 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-736aaeed234so337747b3a.0 for ; Wed, 23 Apr 2025 17:49:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455781; x=1746060581; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JxyuRypmtO/qMdbERqKxpEE+x505tOJO18IE2EpCobs=; b=b5j1rgicJzrtqP2R2WCf4AAMrEyUjzxied2bC+u35zNRa/dC5GrxClrM0PrkA7vSeS ql/Wzu/4eWDmvNZbLg63+jCj2myK1mNEoboUtpMAjZPlTgRP64PfFmlwTUnDsYkNU1i5 BZAyx8Mhq46enYCSBBvsLOyOUJaQV2Q05MTVYs9of1hSiosvfmyDmGcTCvtxcao52/Sw YfXOlgGXrjW5WbEwNiLhnGkgoko3MkvIEIrjGptgPfuOPTf1KTFLmcNj59izrYIVcwFr gwbtrV8RO/ErVnolhT26OvuI/4gkMlTG3+Xj/bnqtwI0yhAyJ/LoRpr4Pu3zzJO79y3Q iWgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455781; x=1746060581; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JxyuRypmtO/qMdbERqKxpEE+x505tOJO18IE2EpCobs=; b=oyCctjPda9r0rH9HDrfzNzJsqwZX0z+dFiPo9p6ANbmVV/eKWFCNsg3mJWvnyy4tJI wLUECKg3Xc+7ZITgkgssIdejSAwjs2ah0nkSS8X72uD8ajV6wqOWbylgQjs4RUMGEWx1 E40+33+6mEPchp2RtMD1wmZfHLejZnsZAjvJtjzfH+CZd/JyoH2CSQ25UpHCORzcDEuO 6VnVMG6cMIJEp+QmkxGP3/HblYFOVCoxNX4zzAmjNlq4y7EY/d+dnZLjyuyE9tNAINFD OxEHFre6OSxZUeX4SVNs8DgaOyHeynTHKZogPYOc5DcumSxEPnvy8deIq4IfxoS45EDd 4d2A== X-Gm-Message-State: AOJu0YxZIXRaa6W1Fvy/cnTUPaHCZFVhccqu+eeXV9YBU+LAQpPa/EmE AoKRDUVLj4K1ICw5ZHX4fDM/pLOLCFIqwAfPkhg/u1IUp+N/379TPD3s34UMO0IoA4u0LijwhDF Q X-Gm-Gg: ASbGncvtjtgjjWyPtBIsCuMLaVeWx04u3+SoT2kxExmwHEyPKfkz/XoP/MvIWY5hjcS acDGGyTRwnTx3kEVGu83OVUoaj5mVmo4ZTA3mpCve6tSaUa8V/QpZwwURHq7Sza+UI319Ye1wGy rhYJPbtkcCJCKOz1f5D4f6E6qjR60WrnUE/kX1Ft6GQxpZePQlrkOxfyql7+K9i30bVxE1U8Coe fs4n9U/JCcXQndnnMIXn8Lyzl/nWacDg1nsKnrB93KXxPOhwcqfGPYs7t8tMcZkcz1vAU1qGG8Q Hn5YpDo5gyzYCecxo99PRRQFs3aSD7nwzDttUvnYWYU4XPSjNvzdJEtoa76StjuaX2uKYKMsOhA = X-Received: by 2002:a05:6a00:2da6:b0:732:5164:3cc with SMTP id d2e1a72fcca58-73e24ae120fmr872724b3a.19.1745455781330; Wed, 23 Apr 2025 17:49:41 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 009/148] exec/ram_addr: remove dependency on cpu.h Date: Wed, 23 Apr 2025 17:47:14 -0700 Message-ID: <20250424004934.598783-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Needed so compilation units including it can be common. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-10-pierrick.bouvier@linaro.org> --- include/exec/ram_addr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index e4c28fbec9..f5d574261a 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -20,13 +20,14 @@ #define RAM_ADDR_H #ifndef CONFIG_USER_ONLY -#include "cpu.h" #include "system/xen.h" #include "system/tcg.h" #include "exec/cputlb.h" #include "exec/ramlist.h" #include "exec/ramblock.h" #include "exec/exec-all.h" +#include "exec/memory.h" +#include "exec/target_page.h" #include "qemu/rcu.h" #include "exec/hwaddr.h" From patchwork Thu Apr 24 00:47:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883767 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3197728wrs; Wed, 23 Apr 2025 17:50:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXcQ+9maMe1qUodPuOqqffMjikt/s4x6lh85ybTncyNU5tnDEQ33CeV6PjQ26o+hFelTEQooQ==@linaro.org X-Google-Smtp-Source: AGHT+IFGnTT+Neuaptmtb1IHis51gIF9SlC3fxcuR2S1mm9vuRjv+ppQmIND7Jjh2hXy0gQuTYTn X-Received: by 2002:ac8:58c3:0:b0:476:fd7f:965 with SMTP id d75a77b69052e-47ec345dcd3mr6601121cf.23.1745455815182; Wed, 23 Apr 2025 17:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745455815; cv=none; d=google.com; s=arc-20240605; b=GoCTwVA31MM88zC9Xf4LSmCEc4G1e4/SC6EmcZs8vNOJdfv3wR7s8xiTRszVYO19Yk P2Qgk3z88CMf2TmbtaxP5HpAd2OsD3+BIX79BaeLXSAek9v56l3PvClHZH+xKa1QpJgs k+ZVaThidxis9O06kYYSpz11UPgIE8Nh1Tg6jVE5wSMo7AFZjdTwFPxFgpt5N4d1wkdP 7lGbvbuisH4ax2g5vocRRYNFZlCoZaNRRcbFbnfhmsHDKkuvBxzBZs9KiMjV79KdASmk aGIfaQL+eJ31Zuk6zfdzpLr4seYbmKokT1/FErBUimb4oBNlawVTSEsnOMCgHHKYTsoA /ynw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lG5GR1LgS5q2ZsGX0HNw3y+WcVPJJCWNVDcD2UvIEdE=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=g1C8Iuzv/HFVPTPOORcENBrCyNpxt+ac7RbDcQQ2+iO6fe+2bXb/n6V0TZBTZ4If2S mPpq+gyEM088oAb9vx1hkpDt8sMlU8nJymHm2VgiBEQBNhbJD3gVSXbuGvzX1ID5nXa8 kMme33lHEV6O1t0iI5ezQk6f9CraPnalPooMQOeINrogBCtWnGke5awclhQnpV20k79r qlvhBoGsTtDEh+81ve9PhpqzGOm1CZZHwpuEPHxg/xwKu4GVE5D+f7oUjVw2twTCA67o K35GWBPiQg7etgyNn9z449HkoxRng+9pRwTY59WDgx1fjCybN0mCj627NOFQyEs/XfSo Jqsw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kFcCHicq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea2ba9422si4666901cf.671.2025.04.23.17.50.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:50:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kFcCHicq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmj-0005Cb-Ux; Wed, 23 Apr 2025 20:49: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 1u7kmf-00059E-GS for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:45 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0: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 1u7kmd-0004JB-NV for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:45 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-7398d65476eso358761b3a.1 for ; Wed, 23 Apr 2025 17:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455782; x=1746060582; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lG5GR1LgS5q2ZsGX0HNw3y+WcVPJJCWNVDcD2UvIEdE=; b=kFcCHicqp+EIxKgTkwIgdBJ/16mmxjlXn3vFYmdpEq72n0YDYFmvN7k0HfCivsIBK8 1J1jddVkJilQ8PmOgDldHOq8yxcLNloJfAtyyF80fLw0yLt48qkOnyzsWVA887plSA7F HntbsXiJv7Fcd0iTmfwH8xg3bi9OeoXPDIAAA44cbHa04hUF6vSO66DP7dHC3V++h0ZB eYpAomXMdscqM47dB9uLUVjPtRzw1ZHyZXNGUGwdPo4GwOqg7Zm4juNdVFrgoG5J/nh2 cZCzZbjHZrFDiD9NjJgG5c0ZZu1quKdiMlC3uZKccM5OXj7eKkGV4aKZRu0Gsj9bWvX7 U6zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455782; x=1746060582; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lG5GR1LgS5q2ZsGX0HNw3y+WcVPJJCWNVDcD2UvIEdE=; b=HP4SxvmRoPrp3WLgDzfPLdJ0sx1eaTfuh14MDgM0RimhuO/f0hWABSEZRi7akgokpu IbJyEch34ccVxT1p9Xwr4USZW5sXRXZi1uSAO6YxnZbFZSMQMuQBlee9Nhr7axXYcA1p JVAYO6tt47jwhQdk9idgkNF7fDjNkpYZUKscCzsM/mq6EKqXapZ6kuiIzZd9+5rqBVsB 8r0IzvjZleMeHKv0ZM7U/40GrZGRX6bFQUymaDS4UTWFzY74bhF7yv5Ebemh/7Jlm/tD anpBR6pZjN5enf7DmQ8MSt6MRvdh3YMvnXv3at8yif8Hl8RS77SchHBa0Z0LmDAq0ZoX L8Ng== X-Gm-Message-State: AOJu0Yw+DsR3GwHcyZ2+lJoebaTzr8M7UOI5tCNjH1X4w29SYySgDGAe nOm8EPVE+npgRc5ZSWL/3XSqeuYBbcIXUoASmHJE67C+QMF7rL3bN+IJw40Q+YoIKOYNjQo+WL8 o X-Gm-Gg: ASbGnctCHEdzj/ochVno4i3xXYOAmmqWcMgP03Kz4Vt3WU0Y2bvJPJthxGRRSeGUMCc M1rU6jo04o0NjXCak30i65yaDX/DMhOYq8EWOqgwtZ1fauRsgv/ncHFlnZkaliE0klqatvwkUuF Fc2UHQYghh3xlZUJi1/MByTmqRGSTdz8b/30oEJna9t/1FDoxoGYay3nQSx2pl4QvK0Ug207JJh AIOn5XI5b/dvAoCjPsSWF00pDoexynQbPcIOFcDejcPANoQjKThHq3GF/V5ICFcDrgHFRC3NgNt o1+uT9kdSAzYIBCyN06UrkO5hc87zfXLDO1T+Hs7NuhSv3gI7Z4O79UTbzuNSIxjVu9/33nbnx0 = X-Received: by 2002:aa7:8a04:0:b0:736:aea8:c9b7 with SMTP id d2e1a72fcca58-73e267b8980mr580394b3a.2.1745455782140; Wed, 23 Apr 2025 17:49:42 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 010/148] system/kvm: make kvm_flush_coalesced_mmio_buffer() accessible for common code Date: Wed, 23 Apr 2025 17:47:15 -0700 Message-ID: <20250424004934.598783-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier This function is used by system/physmem.c will be turn into common code in next commit. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-11-pierrick.bouvier@linaro.org> --- include/system/kvm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h index ab17c09a55..21da3b8b05 100644 --- a/include/system/kvm.h +++ b/include/system/kvm.h @@ -210,11 +210,11 @@ bool kvm_arm_supports_user_irq(void); int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr); int kvm_on_sigbus(int code, void *addr); +void kvm_flush_coalesced_mmio_buffer(void); + #ifdef COMPILING_PER_TARGET #include "cpu.h" -void kvm_flush_coalesced_mmio_buffer(void); - /** * kvm_update_guest_debug(): ensure KVM debug structures updated * @cs: the CPUState for this cpu From patchwork Thu Apr 24 00:47:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883782 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198779wrs; Wed, 23 Apr 2025 17:54:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWfIc+U8jquzUTSC8ezn7R2tIhyDVV8G5eN8AvQg90qP989IY5rYx4cd8h2YeRvvq+/qrh4Xg==@linaro.org X-Google-Smtp-Source: AGHT+IET7n8n/4tVX1gncdNQokPqR8SAKQiC6AD1RXbaZxDxGbiPVRunkJXIlzaWuTQmmuNC20uw X-Received: by 2002:a05:622a:110b:b0:478:f69b:ac9 with SMTP id d75a77b69052e-47ec266ba2fmr7168241cf.11.1745456076452; Wed, 23 Apr 2025 17:54:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456076; cv=none; d=google.com; s=arc-20240605; b=RB65+6cA7Zv2QQ6YkYKydGxiiAzOHAUkSh6fHekae34RpdgTUs6W6f4aw9k9oCWePh MuEtfApq7cQ4PiF+Vck4vcEZ08Umn+X3Kl14MumYB2D/OD8EY9ove5bNMn5v+fKRMjT3 iPzgfQ2rhg1St1avLET9Jc79lo4SQtBBfxlkHL0riuZ3VRbU51BM0W2xb3XFnOpb9rTf TLnWs7nRAKg72VEOXjLdhfF7CkfxYUC6QVnd6xvtReDs/pyd+66GNqVpTs6hoGvhkJwm sanYOawpkk4zRQp+uaGdMEoCvlSGXAsWgSK8E5h3kIkdDVKB4jyxqP1Cdu1bSFwWHZiA 4p8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XogLtFAmQTWKnFni/PyMhKIavN2RURu41I1WKUUy13M=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=RxR1UeAwJV+01GcyOhdCiionIDkbY4lqyBvJoxPt6ymEuSnRDRzf0ePjk+q0/l9Cro XT0nrrM92qQ6LTam500yQ1nR7ULGMZcrTG0pPzESUEj944Jk793ZCl8dUsjMbFjtU1hS uyMH7eTeS5nrA+gXFUtsMcF9NqgVFNtGlSSsFU+0fOmk7ITZbv8bgfg2AJG/pd2RzgvB 0fKf+dh9asMIA9Q9fKG7zyqGy/VTXHNqM4ygY+7mBlpzulzCG63UqLCDFs2hXQx0ltAJ Bp3qPMdd4I65N1c37fyzl35QNVC1eEqnM5waHKZdFEJSqggutsGe0awwQ+OXtLJrsEnf qIhg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wSVg7Ti+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1f95c04si4764871cf.390.2025.04.23.17.54.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:54:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wSVg7Ti+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmk-0005Cc-Bt; Wed, 23 Apr 2025 20:49: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 1u7kmg-0005AE-1w for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:46 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0: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 1u7kme-0004JR-8F for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:45 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-7398d65476eso358765b3a.1 for ; Wed, 23 Apr 2025 17:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455783; x=1746060583; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XogLtFAmQTWKnFni/PyMhKIavN2RURu41I1WKUUy13M=; b=wSVg7Ti+c1Ohe1R9xcVYy8fnczWdVKNY/D49YOwQ2c0ucOO30DcMoCibDbMUsvb1/W NTLBxsXDdmPDw0rIJUADXBitzo3snsvMCRp6bwBCUtP47wht8LFG4qX5UlFNO4KEUbov SgQe2Aehpu7X86OU1pCO3UuCQUawpmdfFIZUTIUwDPLHswlG/3bV4Q5V1a6CMSvMOQDT CDMZjsLLm7xi4RJqlwOO2v20wLmsyWp+F/xBK6LYqklb8V/5stixPhM+vUxldRkNOh4P FKsHLB0OnkSZT8O6cNIrWrqa10VkoRiTKiNVU0ELKJoZ+s/OvjE6rNAMYNr6MAXJKPnB hgmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455783; x=1746060583; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XogLtFAmQTWKnFni/PyMhKIavN2RURu41I1WKUUy13M=; b=MC7P/uP50jdhMv9SNnDB59CjaBoScRQMH+ceJZkUJJOzm2aflrktRaOaQ7s9if5EEV rmcG8qgf3iGk4ofpvsyM096uy2FaXBEE3dCP1vV19g9iD1cWfx4W2KOLcPtgVjUqop5n 5qtE2tvIPKHfsdfvGbCz+sofWOHnlmB8+3RMnC4PNmP9slDsuvwtYrgkvK0it2lsou3O wk8jXiax4FkxtowcBwxh/jW1SjxH7/1BwYMMM1Y95keHIOAln3Bwvcoy7PGCXwPxJ/Ja Ci2nt2swLzkcoPLOql0UtjNOfccZ1dRy3ImUaglcsfujfsBu7YQV2/ITLsnxelvBkRyp y/cQ== X-Gm-Message-State: AOJu0YzFyhWgb/GjYqo9ZwtBJqh5jMHsmWSPzPRC4/lzWQeLTOWbFjHE jiB6dh0BeXG+eCTBeGbuCUHPFJpTsu5Pr7WWKRupAPzZA7jkP2siMUBY+Z/oqDwSLD2/HtL2gyK S X-Gm-Gg: ASbGncuvjFpTdutXXr2jANPXfq1+VAr357IUl5NVMBPqnK8/mcmoMIagIlgS6bSJekK Y05Zndv/n5peL2D+v4ecSjeVo5uJDULEG+rnnN8z0IeAQalqEkp7e5yv0vKzx5Bf8oaOrjl/Eoe DhEbzVH2kfCvHfbQUEpvdRvluvhtRHwy9OdP9hd3EDWS/UF43AQ6gDLCn2r72qMbpCusBMsijJ9 7ycygGc8UBXrix8eQlbfM47446TBl8BcDLzKnC2PgVZAO8SN8lzV0Acp8iBmsjiKoeLalcdCM0Z GJUTZs+hgEca8xHdTVmuIvwZ5PbL5Ezeef3cwvd6lUCQqhd92w2MF5X2PpNA4BWt65ItszP4/T4 = X-Received: by 2002:a05:6a00:6c98:b0:737:cd8:2484 with SMTP id d2e1a72fcca58-73e267e25dfmr659723b3a.6.1745455782748; Wed, 23 Apr 2025 17:49:42 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 011/148] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled Date: Wed, 23 Apr 2025 17:47:16 -0700 Message-ID: <20250424004934.598783-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-12-pierrick.bouvier@linaro.org> --- include/exec/ram_addr.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index f5d574261a..92e8708af7 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -339,7 +339,9 @@ static inline void cpu_physical_memory_set_dirty_range(ram_addr_t start, } } - xen_hvm_modified_memory(start, length); + if (xen_enabled()) { + xen_hvm_modified_memory(start, length); + } } #if !defined(_WIN32) @@ -415,7 +417,9 @@ uint64_t cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap, } } - xen_hvm_modified_memory(start, pages << TARGET_PAGE_BITS); + if (xen_enabled()) { + xen_hvm_modified_memory(start, pages << TARGET_PAGE_BITS); + } } else { uint8_t clients = tcg_enabled() ? DIRTY_CLIENTS_ALL : DIRTY_CLIENTS_NOCODE; From patchwork Thu Apr 24 00:47:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883787 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198967wrs; Wed, 23 Apr 2025 17:55:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU7PFtNX58TQWZ74FYukiZLLY9/SFAGT2PRYgmeR5MMvJRQD+knIXVN3pzWijSjczWqDRAuZw==@linaro.org X-Google-Smtp-Source: AGHT+IHKj60mEfLiBVGsRBjpfq5NfFmHUAv3KLVbxiIxcCW/sjGMdpJkVMucLZa5DV9V6d+6F5Vu X-Received: by 2002:ac8:5908:0:b0:476:a967:b247 with SMTP id d75a77b69052e-47eb4fbd58emr9808671cf.47.1745456127247; Wed, 23 Apr 2025 17:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456127; cv=none; d=google.com; s=arc-20240605; b=K5FTrUI2Tm3WqAnrqsc/bnvUIy22Kp0+qKOyo9ZKjTjAvgfPqU8PXSMN1mQJ1380FH ZsL/3pNylJIdx1NpcLYDgkOU1JO+apyVjP9SyHdeigpFc6A5J3mshWnIOAud/G12qQlA oVgw8CDqerSl9+1l1ieLhYxdZ98UFPTp9dd+xcuRADKYghUDLk8zxc2ReIuuHg3q5YU8 eCZAY5a7vd8qEbVoaxCvx7hS8q37hsKrhBCOPUNnVippQZYjtZnHOkMY0+/95lg2tMYE 8OUmxiZfkamXc268mSJGFwjReI6L499Jp/jLi2ZMgjfbl8dhaEOiuFhhlMIZ7xni+Igh Cyeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uUDSMb2yaWobcfq2T8zvFcLGEMZI8wXQ4enYzV4I/Bs=; fh=rJy1HOIne0e2I55ApsoYJgwPj2V3k4hGoy6oqa7hAuI=; b=BxWeOlk7g1i+1K0N9QWjdGgPHIpa9vQNuraLFH2cuDUAVtbwCSJU7AxBWRBAkm8tKV Z2CUfLRmoUMzn2fcm5E69aCLODf2n70nA3Lsjk8stjvtjxddKnHCyRR/hjkqG5zpdMqD OXeqTPzJXC2Hb184ZocULORUze8Dlt2XzqzIBDq4fYxNchLfr5qYJRxpjZmeeVVY14zT H5wpICrsmFJMVNeqQQUwiOxWDjWX4qA3STjWGkQBPa8LOyeGriXGXJ6qPK8KkMGfzw+U oZHcrOcvZfPHHRcZbSeWcT5Nx34LKuQAjZsnDKGJF+QMc29XNVsK+iZwyCUJ0A334iv0 6dCw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RsW6m8ei; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea2aad13dsi4695381cf.630.2025.04.23.17.55.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:55:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RsW6m8ei; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmj-0005C5-4s; Wed, 23 Apr 2025 20:49: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 1u7kmg-0005Aj-JF for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:46 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kme-0004Ji-Qk for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:46 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-736c1138ae5so361876b3a.3 for ; Wed, 23 Apr 2025 17:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455783; x=1746060583; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uUDSMb2yaWobcfq2T8zvFcLGEMZI8wXQ4enYzV4I/Bs=; b=RsW6m8eiHa9yphOoJpYM5MMgp5JLZInXR9QEJ8awQxdJJy2/elAGd0MFIla3bje7vN HXaeiQsfxgrjYzVsQc5+4u+LMEJgmzQxuBKtczhzZ9CcmiOjcLclfTUwCKRh/uNma0qB dR9v8CH0/jfYSBMFNdCgI2ISeE3UFTkOrvyVK91htC6mOzRIZXd1X3i8zFzDu51ggg3Y iBAt97GRdm1Lk8VZszoP7P+KefQgmWq+QII65ABpF/2z6An53EIbgZNyZn4KvkCljyKK jVl2N1wEOwI20cBojc8/Gp8Za1MrL7wNi/H0229uqft2FBMiUBurkWiXGeGSZMh3l04X JTfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455783; x=1746060583; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uUDSMb2yaWobcfq2T8zvFcLGEMZI8wXQ4enYzV4I/Bs=; b=nOh/QxGjzwPSCgmkQ80ri4ZIS3BooFZmyvzKGRCr6STepWhUwSslmSiDYGM13Vl2ZF OO4Nyk9MD/nR5PcEyBzb3P2yeZTsafy3Z+Z6F1v6rorN2vGV7iEnfCi/xXbc7G4gIgj9 oXLxWQ3mzVamYskY2aQeFjOqvoAfaiPOXN3mPDFXx+3XNYEZEAUPTa31+RwHwk6s9FR2 hzNrid8h5YFWPwd6ZZA+xRAhZLfYRXHqEOynPivPRZUyq3q4M6hye9BOnXIWSXS0Oc33 2eZnYXb0wE7CzCpgF2rswFqeH0BMjk26zU6wTL2FMs/aS5kl1AHq9e5f/eNjJ2J89glJ qXQQ== X-Gm-Message-State: AOJu0YzQbt9MniCwXwNn5aAwm0imVDDqIoQPQ5XX7Yzx8ChLFsqqb8TB QVIAguyBHxnotC9RjfHmBKa8o2u1Zee2sS112qsJJw9yW4a1sgdHeIHXRIIAk7N4fDpWqSXQZl/ h X-Gm-Gg: ASbGncspO1q1kJEs9tsUDqFQE87T3LiM2QdnYuurx8Ii4EHlk3tOlYO4Wd6HDHpPRCH 7YFFJBljgZmYKS3mS5dZfKH73zBYKNqHt2Ip5LoEN2FxMoJbIeJKPKZid2GCoIf6gv10uyIuJSs H+KN6zslAx/EsL+7HwD0m5sD2Fd7oGDYNXeALvnqE44O2yST/GS8jptAHSiMdMuNUtxK+a+uW1V DmL5tKHoXYD8lVWllSIXr+vZntHdbHOAttmYvDkq22OaPhJT+oKwNu2i2IXh+NRgJ0W+kXp4chM Ci0iYrx0hwyJ4uPxi1zuyrMdf9yg7RUmz/F/PY9apZGd6wxgQfzw4XqP9g2hZlyRkJiVgNAK+ta bre8TMOepGA== X-Received: by 2002:a05:6a20:7350:b0:1fe:61a4:71d8 with SMTP id adf61e73a8af0-20444f2b284mr844607637.22.1745455783436; Wed, 23 Apr 2025 17:49:43 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Anthony PERARD Subject: [PULL 012/148] hw/xen: add stubs for various functions Date: Wed, 23 Apr 2025 17:47:17 -0700 Message-ID: <20250424004934.598783-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Those symbols are used by system/physmem.c, and are called only if xen_enabled() (which happens only if CONFIG_XEN is set and xen is available). So we can crash the stubs in case those are called, as they are linked only when CONFIG_XEN is not set. Acked-by: Richard Henderson Reviewed-by: Anthony PERARD Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-13-pierrick.bouvier@linaro.org> --- hw/xen/xen_stubs.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++ hw/xen/meson.build | 3 +++ 2 files changed, 54 insertions(+) create mode 100644 hw/xen/xen_stubs.c diff --git a/hw/xen/xen_stubs.c b/hw/xen/xen_stubs.c new file mode 100644 index 0000000000..5e565df392 --- /dev/null +++ b/hw/xen/xen_stubs.c @@ -0,0 +1,51 @@ +/* + * Various stubs for xen functions + * + * Those functions are used only if xen_enabled(). This file is linked only if + * CONFIG_XEN is not set, so they should never be called. + * + * Copyright (c) 2025 Linaro, Ltd. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "system/xen.h" +#include "system/xen-mapcache.h" + +void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length) +{ + g_assert_not_reached(); +} + +void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, + struct MemoryRegion *mr, Error **errp) +{ + g_assert_not_reached(); +} + +bool xen_mr_is_memory(MemoryRegion *mr) +{ + g_assert_not_reached(); +} + +void xen_invalidate_map_cache_entry(uint8_t *buffer) +{ + g_assert_not_reached(); +} + +ram_addr_t xen_ram_addr_from_mapcache(void *ptr) +{ + g_assert_not_reached(); +} + +uint8_t *xen_map_cache(MemoryRegion *mr, + hwaddr phys_addr, + hwaddr size, + ram_addr_t ram_addr_offset, + uint8_t lock, + bool dma, + bool is_write) +{ + g_assert_not_reached(); +} diff --git a/hw/xen/meson.build b/hw/xen/meson.build index 4a486e3673..a1850e7698 100644 --- a/hw/xen/meson.build +++ b/hw/xen/meson.build @@ -9,6 +9,9 @@ system_ss.add(when: ['CONFIG_XEN_BUS'], if_true: files( system_ss.add(when: ['CONFIG_XEN', xen], if_true: files( 'xen-operations.c', +), +if_false: files( + 'xen_stubs.c', )) xen_specific_ss = ss.source_set() From patchwork Thu Apr 24 00:47:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883778 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198690wrs; Wed, 23 Apr 2025 17:54:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVG9SLzSG88tEctTlT/F0ySR1AYiXRqE4eZI3bvV/gvEx+/nZKPa0Rrn8yo39EG3mhfeZFJwg==@linaro.org X-Google-Smtp-Source: AGHT+IHJGZvJoHtUA6caKc/pX2aEas1ecegjV8PdpQq0K73CeDKBCVwDHcOrQQz4Icp2FiWDjSKq X-Received: by 2002:a05:620a:5d90:b0:7c4:bca3:6372 with SMTP id af79cd13be357-7c95844d1ccmr69523685a.0.1745456051989; Wed, 23 Apr 2025 17:54:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456051; cv=none; d=google.com; s=arc-20240605; b=c5/JdMWa3P23aD0LYkKMo/Ps764BTwwCBmKuxxH1WQuEOm+UpAF7mVFHkow48sNR71 mXAAxWqid5tbeKGKJj8wRWA9Hb5XuNEJHba7HjgitgY9p1fj1YqbjdLXAdcENGa9/Eg3 wT62ddIbLuCFt46G7u46CGlDHbvYpfBheZSf97deXC1kLZqp15ZiWKWjmDz11lskVaxL gQdGFTkevKxKghIeAmaIBxtC/Q2fNvTDFlMohLdArTuWuxpH9kUL2AxgRLKO0LvVRS9W 7ZgjC4HZI/PqcwPk3pFxFbzeiFeKRoZooBNVWswJyP6Mhj5YDTxIINHevgnkgxW3/Pkm Ob3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tJ+EfqFiptMAQIqFH9MrlUuf9tOxdmhxubkBN2YjdQI=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=dCzVjtaj5YFeWfh0qT2CZQ6U+BisOogjb53bHNG5EjYgkNvx0bjyygGmQor4eZHG1S Qj4iBChz8tKUgOQ5Q0TajuTXM7LqBUvx0Y35drrsawzkfB67E1235hcYanM4NjuC3k9H +VwkTCN8Htw0dXTAFD3r7QArJmljBpfUdBM3Oh9bpZt341Qtwv3yfRhqkYbKh2Z623X3 9+bY53lvMZJpjo66aDeK9E4ERtmmizGEMaFDMhVk711sSThq5c9jMO4U3AGF9R9gPEoT lO4AgyPUJxS+cexVM5L3wm1Kqc1sTA3mw8IvG6bMsvMXpwwOqucV9r3EyQA5HUborz5f Ubeg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gw1pNs7i; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958eb8753si18195885a.488.2025.04.23.17.54.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:54:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gw1pNs7i; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmk-0005Cr-R8; Wed, 23 Apr 2025 20:49: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 1u7kmh-0005Ay-1w for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:47 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0: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 1u7kmf-0004Jr-AM for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:46 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-7399838db7fso508909b3a.0 for ; Wed, 23 Apr 2025 17:49:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455784; x=1746060584; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tJ+EfqFiptMAQIqFH9MrlUuf9tOxdmhxubkBN2YjdQI=; b=Gw1pNs7i1lfKSmriOnQ5d848YHWSRj3mSIPhviN1hDkp3CvTZyScxQDTSqf8Dl2wNV B9Jrm6lxtArWoiv4/BIfG/1/nYurkl2t0zxobXMbv7GO3FaBi2aJJX9THUvXz+A6aNjW K2iue060iNNuRL/Ovu5+Kmb2fXISBrQ+TmOOTSw1+K0D3AmZhF2yJ0oK2BFzOpwDOR3O bjduvMrYDYvnnt11l+UTEWUg8cHxWhMTBEzn4QUh7sNKJxusQ+GtnRNah3H54n5oLy09 Ry33rW6YzKDpSZEBY7xwKyVNc85CfrFnoAVX85YmLw9TIt2Su8AAXgXI1jd6XUModvTS gAiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455784; x=1746060584; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tJ+EfqFiptMAQIqFH9MrlUuf9tOxdmhxubkBN2YjdQI=; b=l/A46OpUYSZ7/Qb5cMEDC++7KGJnuPijlR44q0UjB3wjRXfGiaJCdA+znX+kA9UFce /qdn94fWcRuh+9efkZ0FqeGkg2ATH0vrQEhFEJo872DnI+glcVv9MoWLSYWw+pRt2M1c piSlid7JIfLXXmAIdfuofFc/eBFjgeqKVnTfKn5mOGu7qlgBMaR5F1AHI6300PmN9BwD hNABROq7xkwr47QIO8EnS3goie4XgwEYiBmBbPfACdUZChcwDKGOqlNjAaX5JsyxkulW GjFzS309hWH8p8Igtq71z7VGRVdIzB7aM1xK8E3ZRNAICV2OcOA4IdniS0Os7xm5OjKI /4Kg== X-Gm-Message-State: AOJu0YwtQQomND23sGMaVYkd2OS2exz6itrEziaKHbwyh5KT9W6L8abL hPZv9R67yHOICaxmgof1iQKkZzUuVRFqyOuHp2+9NWleYiU4/CEBqJrLsGMais5o5rLKyw1ZKHE Q X-Gm-Gg: ASbGncs2Qa4Jxwun3cnN1TadVr2flo3iBlpyJ70tVufRxRJeunyfz5VWydjNXjBoV8V OejDpMoQNHDUHJe+WglyJdS1YTqwHWbS3OppB48aT6JzkOb4WI3tr6jkoaObx8bAcl//vFFDN0k H9R8Ca9J8JRqdkj5er+EtO+cXi2ovBIUTATOdbV7EO1jn3m7EBhfAgob7icwvmswy08/HwRWKen pqps+mmSVCZlJW2a43I33rWZVE7nbHBzwpqfI2/3Hgmpcyu1Z6qganc02JwosbqMxyAC3vavrP7 8dTHc5fAQWZjQGSjNgwX3dXjd2hfFTM7YVnTA+dSh5A6NfscjKm07oKnmariJZz9GmjRM2BLoic ZCj1dmqjOhw== X-Received: by 2002:a05:6a00:928b:b0:725:4a1b:38ec with SMTP id d2e1a72fcca58-73e267b8cf9mr690382b3a.3.1745455784056; Wed, 23 Apr 2025 17:49:44 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 013/148] system/xen: remove inline stubs Date: Wed, 23 Apr 2025 17:47:18 -0700 Message-ID: <20250424004934.598783-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-14-pierrick.bouvier@linaro.org> --- include/system/xen-mapcache.h | 41 ----------------------------------- include/system/xen.h | 21 +++--------------- 2 files changed, 3 insertions(+), 59 deletions(-) diff --git a/include/system/xen-mapcache.h b/include/system/xen-mapcache.h index b68f196ddd..bb454a7c96 100644 --- a/include/system/xen-mapcache.h +++ b/include/system/xen-mapcache.h @@ -14,8 +14,6 @@ typedef hwaddr (*phys_offset_to_gaddr_t)(hwaddr phys_offset, ram_addr_t size); -#ifdef CONFIG_XEN_IS_POSSIBLE - void xen_map_cache_init(phys_offset_to_gaddr_t f, void *opaque); uint8_t *xen_map_cache(MemoryRegion *mr, hwaddr phys_addr, hwaddr size, @@ -28,44 +26,5 @@ void xen_invalidate_map_cache(void); uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr, hwaddr new_phys_addr, hwaddr size); -#else - -static inline void xen_map_cache_init(phys_offset_to_gaddr_t f, - void *opaque) -{ -} - -static inline uint8_t *xen_map_cache(MemoryRegion *mr, - hwaddr phys_addr, - hwaddr size, - ram_addr_t ram_addr_offset, - uint8_t lock, - bool dma, - bool is_write) -{ - abort(); -} - -static inline ram_addr_t xen_ram_addr_from_mapcache(void *ptr) -{ - abort(); -} - -static inline void xen_invalidate_map_cache_entry(uint8_t *buffer) -{ -} - -static inline void xen_invalidate_map_cache(void) -{ -} - -static inline uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr, - hwaddr new_phys_addr, - hwaddr size) -{ - abort(); -} - -#endif #endif /* XEN_MAPCACHE_H */ diff --git a/include/system/xen.h b/include/system/xen.h index 990c19a8ef..5f41915732 100644 --- a/include/system/xen.h +++ b/include/system/xen.h @@ -25,30 +25,15 @@ #endif /* COMPILING_PER_TARGET */ #ifdef CONFIG_XEN_IS_POSSIBLE - extern bool xen_allowed; - #define xen_enabled() (xen_allowed) +#else /* !CONFIG_XEN_IS_POSSIBLE */ +#define xen_enabled() 0 +#endif /* CONFIG_XEN_IS_POSSIBLE */ void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length); void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, struct MemoryRegion *mr, Error **errp); - -#else /* !CONFIG_XEN_IS_POSSIBLE */ - -#define xen_enabled() 0 -static inline void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length) -{ - /* nothing */ -} -static inline void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, - MemoryRegion *mr, Error **errp) -{ - g_assert_not_reached(); -} - -#endif /* CONFIG_XEN_IS_POSSIBLE */ - bool xen_mr_is_memory(MemoryRegion *mr); bool xen_mr_is_grants(MemoryRegion *mr); #endif From patchwork Thu Apr 24 00:47:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883784 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198875wrs; Wed, 23 Apr 2025 17:54:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVC0yaBA5qovmzA015RRU2pyHskywfaicH2nB1XZoyBzxuFE6oJYp5Kh8ubuVIwOGi7QdzdsQ==@linaro.org X-Google-Smtp-Source: AGHT+IEoXfmmS8gQCS5YvKLaN6EqMsgsPlls/FIyitt7C+xO5F/0KutoUhbnOa3thqY8ZlNncetv X-Received: by 2002:a05:622a:1a01:b0:479:1a3f:f1f0 with SMTP id d75a77b69052e-47eb43ad998mr10902721cf.41.1745456098521; Wed, 23 Apr 2025 17:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456098; cv=none; d=google.com; s=arc-20240605; b=LMMPjLic57dgNdyzAcDrBbjPw+YwK8WWlwfStYDBCf/38hCGfVzvXoIx54HBbcUJpL DzL0NAetHssXGauEfxyaMgKK3M3uKfUUjv/ATNeiQ1prcvlfxX6VcJ6zhpVRPLz1bTvo MjYS+dRhr9gRPVnmjJl4puUUkOOusn9SRjTIEIFhjh5U8L1G2B1mz4RXpmZhAcuzSbf7 vvWEEY9IjK0JZkc7MgM5zUn8NkUA3C872LtutVVPIJ1w8d8CBb1DmXZ9a1uxCOzDjPQC HKGhS/yYAtTTI8QtXZZPeRlK4nZQ0/jIXLLtFLqvbg5oTSIiEtJydYJwDRzmy+JBq1nQ 1I8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2WELs9tSDoOhv8oNl+uvddaNLwloxys1OzwUaiFl4qY=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=Ctkiau9R2hN/jOUmS6GVnoPG7tUHiCAugWZ7U0Yo3hTRo8bKvwEIG0N7i5f+p3aaDf cmemA0VqQJKYv5skmXS6sWW0ihhDWATa1nFmhAZImYT6XYDzadUOLUGCuEAhslcxJi5f juwx2leKIkhGx4+j5Ym35cSCdthst+IuEUOI5IlurXEe3eIVfqybzBNUymU4jnW6bu3D xfQ6KFnpRc9DUFqiuMbmDFSJ7XSV96GsQ+dTQ1TaCJQG4VWBDnNhG905lKYCohVHlqC0 mAMYfAMwhts5YinesVqpNK3bCcxC7LNo76HC7mCdN4vIuAOXGgdi69HVurUWP2kDXD4i kd6g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kShSzXiy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea19874f8si5022471cf.225.2025.04.23.17.54.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:54:58 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kShSzXiy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmk-0005Cd-Cq; Wed, 23 Apr 2025 20:49: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 1u7kmi-0005Bc-FK for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:48 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmg-0004KH-Pz for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:48 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-7370a2d1981so306121b3a.2 for ; Wed, 23 Apr 2025 17:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455785; x=1746060585; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2WELs9tSDoOhv8oNl+uvddaNLwloxys1OzwUaiFl4qY=; b=kShSzXiysginPpDpA4J3l64+KCA2lkwa5SXPam5O9eq64OEkRIIsPAr8T4tyyf0tkF Cp5xHsMnmjBrHN7MjgQtmsAGcMyPkb2ULPJcgtWGfStLIWV04Ef//JgIlq6C5YnY9pk/ GnAvN97cnsg10tHig/LmwCVJ+8dKcjTVM4NFWTB6D9ItUWwQwrw9LY099tM8O7LUqzEJ /ozo8XsmvHROTDs34/8u+ViewwEU4eeU3GR91QJONKTGhJsqAzmnQPaZz8Ei/yxYpFcv clKAqIEqRcXGFIYiSTgEixO40UBFMgNu6qPb1vgT5A1Ig4YgEUwh2T3CedEtCwjqqGtW wSTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455785; x=1746060585; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2WELs9tSDoOhv8oNl+uvddaNLwloxys1OzwUaiFl4qY=; b=FipO6ho+8a6YSf+zn0cY8RlGsDe8vDRbEph2HAqVj3lQO6aWJp38a7r1zAHebskkMu ySDg4HD5raMX4VVsk35W6iiOC/c9tSRVlXJfuDNKuAHYvo6nkejc4PtDG9epoHR4x0Sk 1EvAtZYnDDJNTa7T3IvIi/s+2xhKQZNC6VaB0nmONFupYH8ILnakPmt5eRs31jqf4PWj MJ1rtIm2yiLJlKpEp5t2SCq9YsnL5f/oCKNDx1C+XH0/LX7am9OlD/biEs0Wv9mVks9l gMHb/NxzN9JBfZBNGajGqO+76DBqqZjarx8WM+qf+xgAo45LHf7sQ/iaV3xyiwSfIm5P p8Bg== X-Gm-Message-State: AOJu0Yz2+8MUBdqvSndYtM1NPnAOMAJzcfGMekJZ+STFTFDuxEPfylc+ YH4GW12Km1q/qGkOIUIen79NE0e31vOm92nViuCiGzQOeNwcQ3QcYZC4FKSbV4NKNC0IHtC8O1S X X-Gm-Gg: ASbGncti42CeO7X2tdPXxSJxwgGLIlrP7IkTRN2Gzd0sIdGQcey2WrwP+wd4UKtIEZ/ GrmJZ+KPViV25ityGRX/yi4/zhfbk7fvyhow87pncuQns+ARAF+j3I05/qqqimLwTGiARmwxtH8 BAy0/rt41A/DCqEif3n4KvKdwkE0USDwIj+y+C+D19iyMuHcG9IFCDr7/BSljV92lwtrPxYHAwp kDw0ErtsXhxV/RQxQyEifZwU64Ku6KUPBnwSynQ2HnBUjyXHKojvt/8Tfp/N+0O8IFfOeqUt5Ob 7pi9okVhxwk2Eji5YUnMY036/fvl0zmY6WseUIVuQqpjCMYwPGsav3+prKAv6WJtFd0LOoXYk0l veg4qJhbECA== X-Received: by 2002:a05:6a20:158d:b0:1f5:9016:3594 with SMTP id adf61e73a8af0-20444e9b4femr898600637.18.1745455785146; Wed, 23 Apr 2025 17:49:45 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 014/148] system/physmem: compilation unit is now common to all targets Date: Wed, 23 Apr 2025 17:47:19 -0700 Message-ID: <20250424004934.598783-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-15-pierrick.bouvier@linaro.org> --- system/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/meson.build b/system/meson.build index eec07a9451..bd82ef132e 100644 --- a/system/meson.build +++ b/system/meson.build @@ -3,7 +3,6 @@ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( 'ioport.c', 'globals-target.c', 'memory.c', - 'physmem.c', )]) system_ss.add(files( @@ -16,6 +15,7 @@ system_ss.add(files( 'dma-helpers.c', 'globals.c', 'memory_mapping.c', + 'physmem.c', 'qdev-monitor.c', 'qtest.c', 'rtc.c', From patchwork Thu Apr 24 00:47:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883783 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198854wrs; Wed, 23 Apr 2025 17:54:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUqYRFLQ2Eu3BQKdHvWxjziFMRKSkiHwAyjVR2Aip2EMXIyhu40fi2sNGod7a4ohNp32AHi0w==@linaro.org X-Google-Smtp-Source: AGHT+IGrwIfW9QiJQDlxbCGaTSxjKCKCq+qKzQPBs7Rs6Tuvzeqyr+qWrZaMhrgsXM9MxERS2mut X-Received: by 2002:a05:622a:18a0:b0:477:64b0:6a21 with SMTP id d75a77b69052e-47eb30a32c9mr9415811cf.23.1745456094218; Wed, 23 Apr 2025 17:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456094; cv=none; d=google.com; s=arc-20240605; b=HxCLfYH4b5t7AnrcKkhAFFbwMZStdmtw4gQJFmi/6Or2grvK/5rnKBuSV1zQpTIyoa B8vqyeZv/Sgrjz+KspKB3v2OgoHRiYZqD+EewkLoZTwzkmg5hf0ZJYYTAFVHsE+tAooK nq1mU0JHpVfB6dFPfBQK3kO2vULmg+MQ4pxXLwu+5j5skBVpdmusFUhORGdwXji3WgDL 2Y7fuUcgzhGwhToz7WYgQSf1oTwABfkI6razr6GsRey3dPQd+BYFr15BnbpRtgsnJJsx 4gzD8kvZoCuQbiqnnKYYkzKlT9sum8au1F7khAeYoKrtj0aiHDVt1f2BIWN+P6ssO2Uj OjSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8Sl3ykiXNh537Gb60LwyKbiNxYZ045w+WbZ93YXcawE=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=Ee9sisyw7aRBR7TRuzcUEAL7U64qhndkUSL+qI9aBDJEu2uUCbm3ZRSjf3oOkucZOg LQyNd/wJMvNBoc7HIMumpvb1xJvlwvYUZ+CSOlhY9yXB0iLoGChuf7q6Nzk7S8y92CzM LgqnNmzlz2eLE8Y0wPxIm9R7V0MH0IHW0MomZPJFT/h045egfN/udGE8mJX73ZavHusa zqy8TqZM+EabBgeFXWw3gqjjB/ZNTESQts2wpDvVl4ANBwXH+0VWYoKOLl1lGw51v08o Vc1uxRD/KxyNfrxgy6J572C0hsYjHSl8uS17xPgINvj+uMu6UukUOzyNwtz3PUSlnEyi iCMg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I38CMoRR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea198727bsi4984411cf.213.2025.04.23.17.54.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:54:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I38CMoRR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmo-0005FL-79; Wed, 23 Apr 2025 20:49: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 1u7kmk-0005Cj-KZ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:50 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0: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 1u7kmh-0004Kd-Sv for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:50 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-7370a2d1981so306131b3a.2 for ; Wed, 23 Apr 2025 17:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455786; x=1746060586; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8Sl3ykiXNh537Gb60LwyKbiNxYZ045w+WbZ93YXcawE=; b=I38CMoRRbDQfl2cqpgpiDxDznNibwzViN/yinOOHsca0CqvljPecSP+5iZ4wdCmgLE mYPxju5jcGWJSUIqhEiLithVVA4GUCiQe0Wp+3WdHi8tc2KPi4vXz+dMtz5mxK/gtR3v qF7F0gpmguRwlR1RPXpKP8iMAId574W6aCGwhEmugDAQnG3cpgllgS39CH/59Pe6t6OE /Z8dyYksIrnC3rKo53seJzSNh0lCiWN9Xr0gIX6rUL1T6+8+WQP+TYuUILohvmeEv6HH atw10CxA0BQf+zWDlc64Y7/vUM9C8zIVXbiZFMBW6pX9k381j9Xi3TXwKr5U/YTLoANb xQVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455786; x=1746060586; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8Sl3ykiXNh537Gb60LwyKbiNxYZ045w+WbZ93YXcawE=; b=mpQfRLCRdGs+L4Rx3fSS9ziYBFGcMydVFDGEeb3Ss5/E6DMmiD5YVlQZQM1N8AGNqa mQ9JZ9hmQf9R/rYbiGNI72r8Fqw7rmsZdDun6YSKyptbxkCuT3LPoKWeE7CExE53Mpcu F+Kf6TP4WeY6vffu4CnKcbB7K+PPEWPl0pH5gOLhXB2TvlhGff4Bm/7/uhaYFDrI9Tts kUFy3f45/Rxwl3+79sDbtuLeYma1OqTfdHUMclRSzrIH5Q3GoJHMSq5H6NtZ7VVYLYe1 2SsCHhvJoTM9iz2co8uIIyJhde6RSIiEVrZPgMEEq0E8Yux4wkDvnffUfwuJ1IIikq4P 5/wQ== X-Gm-Message-State: AOJu0YxrnbzYQVkxyIav1pjMSNrUYqcXxipCRUh+cGdFpeTdzyPXXsnN Mh04pwbqT5g62ESXnQtiKK54+Gv66kjUs+63zzYoHOFM1qbPq7quYZ1VeS3mYCAwVWeCh/4pBJr t X-Gm-Gg: ASbGncvmnyZRtaW3XUsZ2KxNh+OeeBmW6Pyhkhnivj/eeuho2IoCaAOcCwBFWMGKADV 2ZDqteQ+e0KeyGvdhRU5dhcKMmEojylEiFZnFq137/lclG/j+tAt12ScBjYeRBqHC73suUQMRxb CM1ja0GHDyrpUEg+Ph8IWijtK8pIJSVg1m/GuEBMNlFlGMQf+2/LYAV89f1PDcjSVzQwvM5RAFu v5Syj3Re8YFCZFSz2AjoqIFJmdh0t1N7ORPC2JsXm9jtv28zy1MvcP0nUR/N4Mgc72VgZSbEcz8 aD91dw3zcfJfGtsGA8gh+Mk6h5ES1UknHE1pWeL2bvnNkxHOcAWxbvHF832YzCl5SY29p60JQwQ = X-Received: by 2002:a05:6a00:2a08:b0:736:7960:981f with SMTP id d2e1a72fcca58-73e24609490mr1276187b3a.8.1745455786528; Wed, 23 Apr 2025 17:49:46 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 015/148] include/exec/memory: extract devend_big_endian from devend_memop Date: Wed, 23 Apr 2025 17:47:20 -0700 Message-ID: <20250424004934.598783-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier we'll use it in system/memory.c. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-16-pierrick.bouvier@linaro.org> --- include/exec/memory.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 577f473446..fc07f69916 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -3138,16 +3138,22 @@ address_space_write_cached(MemoryRegionCache *cache, hwaddr addr, MemTxResult address_space_set(AddressSpace *as, hwaddr addr, uint8_t c, hwaddr len, MemTxAttrs attrs); -/* enum device_endian to MemOp. */ -static inline MemOp devend_memop(enum device_endian end) +/* returns true if end is big endian. */ +static inline bool devend_big_endian(enum device_endian end) { QEMU_BUILD_BUG_ON(DEVICE_HOST_ENDIAN != DEVICE_LITTLE_ENDIAN && DEVICE_HOST_ENDIAN != DEVICE_BIG_ENDIAN); - bool big_endian = (end == DEVICE_NATIVE_ENDIAN - ? target_words_bigendian() - : end == DEVICE_BIG_ENDIAN); - return big_endian ? MO_BE : MO_LE; + if (end == DEVICE_NATIVE_ENDIAN) { + return target_words_bigendian(); + } + return end == DEVICE_BIG_ENDIAN; +} + +/* enum device_endian to MemOp. */ +static inline MemOp devend_memop(enum device_endian end) +{ + return devend_big_endian(end) ? MO_BE : MO_LE; } /* From patchwork Thu Apr 24 00:47:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883779 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198759wrs; Wed, 23 Apr 2025 17:54:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVbQWxW9S1QRA3jxjJVMVzpMrIl3X0Qesnu3deok9HAypW55I2q7k7WeiWpkmNwlxfzbdpEDA==@linaro.org X-Google-Smtp-Source: AGHT+IHLkRF/lgmHMN8+ia0pIe+Mlb66uKdFw5vZj3V2oUQ6Jo6yYwW4hZgplAgSVJyofpneIgWT X-Received: by 2002:ac8:7f13:0:b0:476:9e28:ce47 with SMTP id d75a77b69052e-47eb4ba2e4cmr8646551cf.45.1745456072926; Wed, 23 Apr 2025 17:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456072; cv=none; d=google.com; s=arc-20240605; b=ecoFqmodmQ6+8NwUKy6DXmGwjhGMbtz9GCuurhMQTwvkHgZmo32iThPx6xaZRz/kOF Dx9IBBTIiLX/2enme2hRIc1tldhEHrez4HEZfscmrOTqAGnyJ62CQFR3fyVgR/Obn+7Q oN6iZT3tnc+7aimquCHD1g3ZbPl5WYD17wQyiwKoH/WKbFQ0tqPy/OQLWzZSEU7onGVh ODLS3KFhnfWknx8QFPARBtZ2B5p3vZ7SP+p1Fz/olmjS45uy8sZ5HUA5+WLSh1CBro9h TRq/62lf2GCgQ44G9uwwFDFtFnZzq8nD+8nrjQHPWmRyXdh4mKPzPBOEKpiK09v8b/4D Xdbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I6MDZmD8wHi337leE/VPRqxkP9hRcv8+ycuZ+hH6Uq0=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=U/PFmG2T2y/IU5Vob72V155h/qYRuHe7+PshrrRoaKUD06ByuQcsFNOBqOrLtnxmOP U0aUMKvFwPT+8MxgRATXtQKDd/0AHYJszdtnhZf/IhFvO8F4oOanXDm/C1a1KN/z9BWN HNm7NAyX4d5f8n6jGyKX6EeVvtE4tu4LiiB+mDuy6Hi3c5fxwqedHMKnntuJDP3zhB4K LZyU3deNEP+4o5g3V8blQpjX9ZtHzf8Rg6mvqoblZKKyX6oivbfVs8aBXsLkhdypGRgl hkfqmN2SHG2UWh4N1oI515SNWyM36PaSbtC1yIaJ+GYKx3NtGR8hCgPShj0oLdSHRpXo 2gDQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xe6AiNwi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1f96d34si4975991cf.417.2025.04.23.17.54.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Xe6AiNwi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmn-0005Ew-Gh; Wed, 23 Apr 2025 20:49:53 -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 1u7kml-0005DE-53 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:51 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0: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 1u7kmj-0004Kt-Bq for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:50 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-7376dd56eccso400051b3a.0 for ; Wed, 23 Apr 2025 17:49:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455788; x=1746060588; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I6MDZmD8wHi337leE/VPRqxkP9hRcv8+ycuZ+hH6Uq0=; b=Xe6AiNwiVFEa0lISPAkk3kgYY8Rngyg112PD+5CIbPgDoz2LrlF8wiR7C04t5jQP7I 7Uv4dmZYmKDaGXJPdWwkVXbv/OJ4ba5LHarrj1BYbBbwIn7KqBn5XoVf45jommmi94tl GE9d9oVxVSdHMc2zj1SE+fjGAdTnmmytlHCGP4mLL0lHJHuOPTY23CZH7tb2zMQRd6rq 9T+KB/d2lk5ZPIymRSJV9RucUUwygiuZSWXQL4+t4I3n+o1JfLaAWFYViOGQpCvi4H6/ /bN3N1f1QyNBkCZrozXag3Y+6fG1xcp+CvLlLpQoHm9kiUSIChPnC4bcqTVRdEyE6Ner fcIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455788; x=1746060588; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I6MDZmD8wHi337leE/VPRqxkP9hRcv8+ycuZ+hH6Uq0=; b=mPGxrV1Y/FgECP5S/4Xi5AxLu4SPDdrx72n0sOKxfufuSqpf824Ntj9g+8fvjVm1p9 9t0AMvQtxYAdEqzD36c2ltE8GY+ijJOcTt6lfvuIdhFUhBbQkV00MCw+gcmEjwkqWAHN 5UKIjK1w13vJUZK+2OmyyWDq3+tPr9EKuQX6y+PI7iUMblhcWtGrtC/tNJX9x9rxKnP8 jJ0LZ0kwbUCypYC/676VBc30YZXC7QbXvqkpvVqIwQcQ/0rG0k3lw8+B7H+l5jlXVB7O muqAkHTvtcilBPjQvW7UbwlUJfbiV11tpQaB1VS67gR1ZlfVy1S5ccsQXwAidD29VhuR 8JDA== X-Gm-Message-State: AOJu0YyY24+ef5dEptzNrqbOZrekcOYZ22X+CAbaULxgPwuJue9tRWlz RvFwUssC8yIjBkXBLLRNenrcKa4r1mv+U5yg/lAaFILhyz/qDwGIAi+5Jo9I6Xb+zcCAflWiPUc R X-Gm-Gg: ASbGncuoj9tlY4kQyck08aK3CH4UU+xMYEzaWaHvstc7NT+hBDseCfC60pmZCmk6T5y lDDFRAZsH6QwaY+zeHWv+eiGK3bJb0DgLjIkAJUJfETySEo4i4GuavETysIdh0fn0Qru70mjyti yjo5gg0y+bjTBkg5zya9yoiCxna08sUN78spFRji1Wg0ifebEedKoJsFY83bOwQKIl7qMTypq08 mRj0dTLeMDGF6IYjtOiCSte6Mad2SkemMFY1krhISn/RkqNZ8SAO6xmjNvuEEy211Ms2/f/sEdr 0forO/dJDIdhQ8BeetGP12R9PkuAW/Ad3FQZZk3MzGTaaOIHxkRlj1L9FX2Kv/CnvA8JoDuPmVk = X-Received: by 2002:a05:6a00:1383:b0:730:95a6:3761 with SMTP id d2e1a72fcca58-73e245db378mr1160762b3a.3.1745455787971; Wed, 23 Apr 2025 17:49:47 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 016/148] include/exec/memory: move devend functions to memory-internal.h Date: Wed, 23 Apr 2025 17:47:21 -0700 Message-ID: <20250424004934.598783-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Only system/physmem.c and system/memory.c use those functions, so we can move then to internal header. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-17-pierrick.bouvier@linaro.org> --- include/exec/memory-internal.h | 19 +++++++++++++++++++ include/exec/memory.h | 18 ------------------ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index b729f3b25a..c75178a3d6 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -43,5 +43,24 @@ void address_space_dispatch_free(AddressSpaceDispatch *d); void mtree_print_dispatch(struct AddressSpaceDispatch *d, MemoryRegion *root); + +/* returns true if end is big endian. */ +static inline bool devend_big_endian(enum device_endian end) +{ + QEMU_BUILD_BUG_ON(DEVICE_HOST_ENDIAN != DEVICE_LITTLE_ENDIAN && + DEVICE_HOST_ENDIAN != DEVICE_BIG_ENDIAN); + + if (end == DEVICE_NATIVE_ENDIAN) { + return target_words_bigendian(); + } + return end == DEVICE_BIG_ENDIAN; +} + +/* enum device_endian to MemOp. */ +static inline MemOp devend_memop(enum device_endian end) +{ + return devend_big_endian(end) ? MO_BE : MO_LE; +} + #endif #endif diff --git a/include/exec/memory.h b/include/exec/memory.h index fc07f69916..2f84a7cfed 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -3138,24 +3138,6 @@ address_space_write_cached(MemoryRegionCache *cache, hwaddr addr, MemTxResult address_space_set(AddressSpace *as, hwaddr addr, uint8_t c, hwaddr len, MemTxAttrs attrs); -/* returns true if end is big endian. */ -static inline bool devend_big_endian(enum device_endian end) -{ - QEMU_BUILD_BUG_ON(DEVICE_HOST_ENDIAN != DEVICE_LITTLE_ENDIAN && - DEVICE_HOST_ENDIAN != DEVICE_BIG_ENDIAN); - - if (end == DEVICE_NATIVE_ENDIAN) { - return target_words_bigendian(); - } - return end == DEVICE_BIG_ENDIAN; -} - -/* enum device_endian to MemOp. */ -static inline MemOp devend_memop(enum device_endian end) -{ - return devend_big_endian(end) ? MO_BE : MO_LE; -} - /* * Inhibit technologies that require discarding of pages in RAM blocks, e.g., * to manage the actual amount of memory consumed by the VM (then, the memory From patchwork Thu Apr 24 00:47:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883777 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198630wrs; Wed, 23 Apr 2025 17:53:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCURzkYnvZZu+Rv879ic6EbBB0+EQvE28btnMgBMn3m80IeJ2X1Q37ksDN/nJeeRjdOp7mNTUQ==@linaro.org X-Google-Smtp-Source: AGHT+IEfpWF+MzFs51LdJNrMX0s7SjxrnBL/mdx/59xWzLVE1A9hphSia2XZE6uYg4i33XsclWWb X-Received: by 2002:a05:620a:4543:b0:7c5:4a8e:b6b with SMTP id af79cd13be357-7c956f3ff35mr158209285a.46.1745456037894; Wed, 23 Apr 2025 17:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456037; cv=none; d=google.com; s=arc-20240605; b=BPzy6QohCWLv7qdo5KstmL1CvJfy//dMFEnIkzhb5kNfketUQGe+uSkAj3HoZjswpI 7WV/snIC3X7VxhrEtkOhv2J/acnXQDrtqhJJNqbLOlRbIIEpsujJUq+F6i6E3tP8yMwJ Z8eltyrE4kgBk5b1b4tF7Fvoup6vRjvmY9j3zvY/rwXdMKkZek/Y5CrIOt/ipfB341iU Kk9zZmikPHapvEpzjNjSkAjrQ/SAFZnuJ6tBCrWmYP74yLt7wprWWWMpkeT8mn4b9Hcl 33JOBa55fDF0B0bnba7IPJRF+KUj4RJ/gxRum+3unyj/c+LOp/fkq2ZtuoS2S03GaCqg Sp5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z6Vz4XH9MaqIFBg1Am0iCdgJbwVNs6lvQ+uGdrd8MMM=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=CRyFxy5GapvP+DrY40OnsrHbj7Zq9Q4AkQJ6kiJu+GYWMmCBw1qUj6VmI3YoOeLqVd Ta9us3ei9gL35FTGh4FQ1eM6pWejZa8A+WcltPjhrO/kklGlMWGUdUMeiuiX0besOlTn YNzBTLgu8qeYSn2jzMm9eeEEamnN2GA5zk17jGdTWDmWJC2eH9xz8XV6Wr1GBph8YE/l EZ6JPcj7efhkxaMp4tapB67PXGM2s2GE0gvBiQ3qwc05DdyNd086BT/2mScDybtVYvai LQUm7BiVmTLnIUpmRs25DZ9cyVWVo0JaKiq2w9RyJLFJVnVjiMG299xMqjjaKYuRtD2N ROcg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E+3qSF+Y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ea3049si19231285a.417.2025.04.23.17.53.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:53:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E+3qSF+Y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmn-0005FD-Vo; Wed, 23 Apr 2025 20:49: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 1u7kmm-0005EE-48 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:52 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7kmk-0004Ky-Ad for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:51 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-73bf1cef6ceso385174b3a.0 for ; Wed, 23 Apr 2025 17:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455789; x=1746060589; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Z6Vz4XH9MaqIFBg1Am0iCdgJbwVNs6lvQ+uGdrd8MMM=; b=E+3qSF+YivTJGGQ4mqPRkXcFC90yY2RROdeIZE789EMOtkIFsxssiclRfK3cmK2Zuv 1sekOjkGwW0jzbf6VSnmP28z5gqgjlQ3yHxDPqrrycd1T8eG+FqNaJJF+txzWce8bVNq VijL4PXYtaPze4EJKqWU8h+4rb3qFVqZX7qeFHvhSEzONAXKtLZaOxSNAlVq1JMjFwEE uo6EZ+TM277fTiQAXkkslnpo42oYxYl3kL7SKYxIwEpcGi4Ur32X2lZf4ZAM2qswUWMB lSIgKHe1Knmn1DWdpS7PnWP7JKymg66uofQf7a78iivfiSFYPH5X3s3BdRYSgIU5lIL4 BKgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455789; x=1746060589; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z6Vz4XH9MaqIFBg1Am0iCdgJbwVNs6lvQ+uGdrd8MMM=; b=C/BolflBOuQgvzvJ0IlGmq5K8AMejp7fSKgBy6XAmo5wrGRSXHq6YZWwmY/sDv67Qp mIWhk054OLQYM9iQECpvty9KiX1XL9fWGffrEvW8mOcs/x6TkpOs7iKVmJRVGvZd6P+I V3fNc0d4v4UwaqV6R+PvpSoz48efokRTFp/2XkTrWKbUVCVFd7byswhcGwQUMXxaLsTV rUP6kfR383qnvnAAWpA21XPFnL9AQNQQTufP09yN/HlK+cvPmRudkTsXmbRWcfZ+02uo Rf3km12p1HJ78eUOjaacgfNO9UvFL5Wv1mwXPpzBJ0HNLREhEBnD2o9tWboOEWv5fiRy uy/w== X-Gm-Message-State: AOJu0Yya9n+KpY81Paxb4kw3OMoPOY7LzrQGy8k/vNjpT6hm7NykAOzq GMBgzCiJ6l8jX9v3y+WbRY6wNwIS1NkrLJU+eDj7Yd/iP4xtxh5/Yd0w4zEUp6Me0l617qUqmyW 8 X-Gm-Gg: ASbGnctEfEJ7ZdlpT9HAQQOw0fH5KcdsPhQtF/thPuz7baegYc660D8/x6NomDhWsJZ vAHvYM06yZQPj0Cp354uFMUDzMrug63UPRbLnVPlgr5avddhtQrE3C6lDf6BSzHfxM+BwyxPWk/ 5v0U/y5I4wQeyvTqh2X1U/Obg+rUlY8VRnmc4ONvF1hn22FPBHAJEqt5ioeXHYst3lLV4v7gH4v pyUPqNiNWYEhUo0YEcoE18rw2DO4aL1YasF+eQZX5EkSai/BdlRld0Ze+QD0Hpo2IPScmpyA55I cPFUNhthKl5NAg/VON6R1a+nCjJyDBlupH1feBl7rCrnoszrTJeVL5ArBM9Os3bwgm7dNFxemd4 = X-Received: by 2002:a05:6a00:2d21:b0:736:a4ca:62e1 with SMTP id d2e1a72fcca58-73e2460543dmr1099518b3a.6.1745455788634; Wed, 23 Apr 2025 17:49:48 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 017/148] system/memory: make compilation unit common Date: Wed, 23 Apr 2025 17:47:22 -0700 Message-ID: <20250424004934.598783-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-18-pierrick.bouvier@linaro.org> --- system/memory.c | 17 +++++------------ system/meson.build | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/system/memory.c b/system/memory.c index 4c829793a0..eddd21a6cd 100644 --- a/system/memory.c +++ b/system/memory.c @@ -353,15 +353,6 @@ static void flatview_simplify(FlatView *view) } } -static bool memory_region_big_endian(MemoryRegion *mr) -{ -#if TARGET_BIG_ENDIAN - return mr->ops->endianness != DEVICE_LITTLE_ENDIAN; -#else - return mr->ops->endianness == DEVICE_BIG_ENDIAN; -#endif -} - static void adjust_endianness(MemoryRegion *mr, uint64_t *data, MemOp op) { if ((op & MO_BSWAP) != devend_memop(mr->ops->endianness)) { @@ -563,7 +554,7 @@ static MemTxResult access_with_adjusted_size(hwaddr addr, /* FIXME: support unaligned access? */ access_size = MAX(MIN(size, access_size_max), access_size_min); access_mask = MAKE_64BIT_MASK(0, access_size * 8); - if (memory_region_big_endian(mr)) { + if (devend_big_endian(mr->ops->endianness)) { for (i = 0; i < size; i += access_size) { r |= access_fn(mr, addr + i, value, access_size, (size - access_size - i) * 8, access_mask, attrs); @@ -2584,7 +2575,8 @@ void memory_region_add_eventfd(MemoryRegion *mr, unsigned i; if (size) { - adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE); + MemOp mop = (target_words_bigendian() ? MO_BE : MO_LE) | size_memop(size); + adjust_endianness(mr, &mrfd.data, mop); } memory_region_transaction_begin(); for (i = 0; i < mr->ioeventfd_nb; ++i) { @@ -2619,7 +2611,8 @@ void memory_region_del_eventfd(MemoryRegion *mr, unsigned i; if (size) { - adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE); + MemOp mop = (target_words_bigendian() ? MO_BE : MO_LE) | size_memop(size); + adjust_endianness(mr, &mrfd.data, mop); } memory_region_transaction_begin(); for (i = 0; i < mr->ioeventfd_nb; ++i) { diff --git a/system/meson.build b/system/meson.build index bd82ef132e..4f44b78df3 100644 --- a/system/meson.build +++ b/system/meson.build @@ -2,7 +2,6 @@ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( 'arch_init.c', 'ioport.c', 'globals-target.c', - 'memory.c', )]) system_ss.add(files( @@ -15,6 +14,7 @@ system_ss.add(files( 'dma-helpers.c', 'globals.c', 'memory_mapping.c', + 'memory.c', 'physmem.c', 'qdev-monitor.c', 'qtest.c', From patchwork Thu Apr 24 00:47:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883785 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198924wrs; Wed, 23 Apr 2025 17:55:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWMJ6Q1U2ihOuJccye5oW2BOHRRp505PFeMaZBTMyA2md1g6XvXWQcGD/r5IbTfqYYnSbTJ2A==@linaro.org X-Google-Smtp-Source: AGHT+IHQSm/0TPlECZjLRTx+QNkA7/q8/wHKuy/EKy/rBtd5az4lTW1SlbU6lpno6zaTyyl9LV25 X-Received: by 2002:ac8:7c45:0:b0:476:6f90:395e with SMTP id d75a77b69052e-47eb2aa055amr10885891cf.21.1745456112423; Wed, 23 Apr 2025 17:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456112; cv=none; d=google.com; s=arc-20240605; b=cn43W2OaqZfL3sEmEdSBNBRcfZ83u6NLt+Y8UpY1t6lszQ9oz4aElLn2/H3Iq+7T9W zdCWINPrVJftgK6RU9ld+UhqYjQjxc6NwVQiPoZ/LWXQdB8SpcPr3CO/7nV5R2X9/UuR V7Y8acnRMIgEx5iSPOBmlCVgfb8dPt9nkWifG4ITXP3E8AOuMkP4FowRdSVbzADgygJh sDiFxjyzGK47GbsTOxf2aCXlnIva4jfJooB+1vkZ+AQNtHOMppuWzORr5kQAMahwsn1P JzsEe9VtvV78qUwg0+TfB1Ex3A4ZKfKnYC0GuZX+LEOgRdilEejLds7AHbDGtxQGTvqd BAbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EQDWD7G5b/boKxwucW1CWyw2g1Xfmx+JyPZ32ubzOao=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=AYViN+lAfTv8FcsVIx8ngg85AwcfaleUCbDpR0KMrwaV+9NDYCDGhUqL9svFfQiupy smnpXbKPqfA50XhtO0fI+h74LWgCbszFaEZpcosHzJslTgrX4C12lnvUTgtwJaMDv8NU 30dqEjSQ17GMo/vKuXmy/GTiB9sQDdlEd/5Dh97rK5YZ/f032m9D4MFFO8T29hqUCnvn XNXnLKfVh6U6haS3KSOTnw8iVc+ltCy/rVFdZKGNzZlXwzFec46m/kt16oauIyATqoA/ yJNdC7JjWP6wRZY0RYjbHVuZbdY1wvw62qI+usWIr+6TG0hAaCl3g0ysWSSJKTN8hhYr XMvw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yckCBl+2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f3c03f5si5319421cf.3.2025.04.23.17.55.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:55:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yckCBl+2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmo-0005FK-75; Wed, 23 Apr 2025 20:49: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 1u7kmm-0005Ei-R3 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:52 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0: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 1u7kml-0004L2-5a for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:52 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-73bf1cef6ceso385177b3a.0 for ; Wed, 23 Apr 2025 17:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455789; x=1746060589; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EQDWD7G5b/boKxwucW1CWyw2g1Xfmx+JyPZ32ubzOao=; b=yckCBl+2vACm86P/7yeGTwvO+ROCsfpNpaC0DvlS/u1yY1Yk1X3ZYeK0Y8NAoWHp4Z xh02YrlIIRxrRfOt0Eloq80B7E2o2SpLfUuJ9SE9lBF7AvosqR4eY69u+ROkAbeS/Czt ZwLoQTKBS+/KRq0AZFBb6lgQvmiITWsOgY0trTtkvedcSp3lGga4g+eYOh3EJCnrG2df Gd5McA0jWrhDHs6Rmpo5g4j7HvOnUSUnB0zI2/61tKL84Lp1pXkZvKWpzNCUbk5Oj9AD 4IHPyV0PkCWI777ftepFCkq7qm03NdYQFg1wGeAER43lcc1qiOSrT7wNDZQKE58TWf0n 4EZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455789; x=1746060589; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EQDWD7G5b/boKxwucW1CWyw2g1Xfmx+JyPZ32ubzOao=; b=GZ52bmIDs4D1eJ++A1W5ZQx1+AGy+RVEP/n0Ykv4jiYZnEpxc4iXXVqeCXxs/Nfysl 0fqjLvWXWiAOPVyehtIq84c6fqmTNVaGHPv8KqIa3u93Lv4b8kd0dubYQgiw0Ei/EXGO hZPdnLGA5/I6nd6QaUMRxxted2Hh4NZtanBuO1JMyvjv5Ddgkc4CwJh9oEZNkQABIoSZ YTHQTgsub2DdTo/UD0E7u2/An9Y0Eqs4/Yu6A7iTuMwNKvn10KTK7PisrlvqZ/CbI9sZ FmNwkaRlyGJXaHD9Y4yLy3YAuPMdqPYysVii1RTmAamole3Us+UXeUpHpPW1Dx6LVu3e Bu0g== X-Gm-Message-State: AOJu0YzjwQnYOyaziGGthMGVG+cYgntdhuFIeAbCao7+M90/O8aj/H2a yB2K2G75Km6y0gYluGgPte0c9WE6oNwauXn+h56BXgvvFDckFlaPzPLKqrsM0He/mPAGDMPz+oJ r X-Gm-Gg: ASbGncvjeNuexZmbnQivlJcTHzib0CAD8P/icP93qJowuW9DghONiVOXb4WJ1TYwLrK 0d32/5/WpVumyRbj6pGl/s+8wcPZb+Od2Dx0AwSM0QZcQdp9ZTNZyWlO+GOdUGN59Zba17Cw6uM 39SulB87Gsd2C/Fh8gTiyhkNZdDkUJL4ihveLI12jmTzr7XW+lr+PKo4sDWtMUT6Oebc7qKL4Jo LuhupwE+lklchTPOIMOYi6K5lmGQYCuTgMKdRGUGqQ8msSFdIQKO/xvJ8udICe9g4n9+/8hfSEV zmLkCRJtLoADPNb2u7z8ZatwmCsBgn0c3sDaFxHQSA27IGz0NLFqnEF9QQvqt8NDvcBfniQRsRg kpuvQ0UarRw== X-Received: by 2002:a05:6a00:a909:b0:73e:96f:d4c1 with SMTP id d2e1a72fcca58-73e246400d0mr938242b3a.13.1745455789537; Wed, 23 Apr 2025 17:49:49 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 018/148] system/ioport: make compilation unit common Date: Wed, 23 Apr 2025 17:47:23 -0700 Message-ID: <20250424004934.598783-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250317183417.285700-19-pierrick.bouvier@linaro.org> --- system/ioport.c | 1 - system/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/system/ioport.c b/system/ioport.c index 55c2a75239..89daae9d60 100644 --- a/system/ioport.c +++ b/system/ioport.c @@ -26,7 +26,6 @@ */ #include "qemu/osdep.h" -#include "cpu.h" #include "exec/ioport.h" #include "exec/memory.h" #include "exec/address-spaces.h" diff --git a/system/meson.build b/system/meson.build index 4f44b78df3..063301c3ad 100644 --- a/system/meson.build +++ b/system/meson.build @@ -1,6 +1,5 @@ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( 'arch_init.c', - 'ioport.c', 'globals-target.c', )]) @@ -13,6 +12,7 @@ system_ss.add(files( 'dirtylimit.c', 'dma-helpers.c', 'globals.c', + 'ioport.c', 'memory_mapping.c', 'memory.c', 'physmem.c', From patchwork Thu Apr 24 00:47:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883848 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204286wrs; Wed, 23 Apr 2025 18:11:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWuWsGHAgKrM8MXrJ8PLJZnz9/4xH1AEreSlhoAglVnALYO3QKaZOXR2e6zdTwy/ko62fy8rg==@linaro.org X-Google-Smtp-Source: AGHT+IEoSiO9Gbw6NKUP12Dtgz2dQaCQgG2SPATIfV7MGefUZ0kaLKLSu/EwIKIDh9Kuu8HXYyZ4 X-Received: by 2002:ac8:5893:0:b0:476:add4:d2b8 with SMTP id d75a77b69052e-47eb4ba681dmr8718531cf.32.1745457093449; Wed, 23 Apr 2025 18:11:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457093; cv=none; d=google.com; s=arc-20240605; b=jLXoTTmzsdeZ+43aLco6yyOs/UaIB6zRsNs65i/qQujUxSl82oogZ1123MVO17XAMD BwwsE39hYpd9P1cB5kT/TuZfQYqYoVDBEnE4K91t9hc2K1SAE5eMybsYnd0WKvwzHDpM zM2DVb9gEFjupbRXx5Y4dOnCs4QbprGaIbOwYjpBLKeSnDe2rwwnyM4yia+fw2mBrfjB DgXvz4Sk4Py4s9JLGbyQPWYzK9SyhXF94z5rZTv15PqACFTrobmMDmgN7ulFsgzAloo8 VOTMO/L0KDmocnOkefQCt2eKSgwJokYLlOgeCQ9Sywt471pQeoAt5KYq+Ga5I/8VqR6o yAUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TCoWmgPRVw8+vOgQ2VpvLXdyfprmS+31wGRDcwl1Zz8=; fh=J9bommX8KdcO4xpp/5lFKejB7UU9BuljErxQQcXPlk4=; b=X4HXjSSJQMF237F0OX+oOFJIf/wKO+BqNj0M4HsmQUc2YYsmbs4m3RDbdrFJC9XfxR T+8Kr81BOK17YrDOWkn10umnU+lQ7OnaNmk0LxJR26dFxyu5HdUGazAmJUnNmf9c2ppb /+uwL/n6bDYcaRHz4GnLksK4jve33GYU9NtqboRRdgIs6Jojkj5iq5+NlaIBfxJjHKyz u9R0IMv2/Dtw136IvOh9E0ZR7Mttlm6XQxy7RzPZqiSrArbvBSE6yOz89J3QnQKQLM3r e+mU1BCvg9aXeFQITFEYr9tnjp0PUcZZTAx/K4pLXzaMdzoiN9bCdTONJoGgn5pZI3Uz bEvA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U0xiM3LA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea26a326csi5230561cf.554.2025.04.23.18.11.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:11:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U0xiM3LA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmr-0005HU-UF; Wed, 23 Apr 2025 20:49:57 -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 1u7kmn-0005F9-MU for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:53 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0: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 1u7kml-0004LA-Go for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:52 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-739525d4e12so357004b3a.3 for ; Wed, 23 Apr 2025 17:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455790; x=1746060590; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TCoWmgPRVw8+vOgQ2VpvLXdyfprmS+31wGRDcwl1Zz8=; b=U0xiM3LA5u3nPPM6brVUHz9AgMxHIUxaHd+01cZVRtBqFPp8VBz1Hma+3y53N0ZRCQ pYNniApYTjN2kcP7/Ixe0Sv3I9NQUigFZd6sJHuNfRVXcvSfTy4D1X3QBy4xIUhSt747 cA5al1/Lv5ytONKGT4d0NKsFHF48tOieUwRXlodSR67QLOp6/+WsGHAQpP/2IzmYhLAr esWcwbUcF9uOMzrmHExkVte2WyLKhVjAvSEVnnPm0xxQ4yLKlsIFutFETXnZ4akkyIiG AhgT8GA8bQ9c5RDmMUzPn5zhHiG0gdgoVmsmmzkCTvMomFBfQXmrl9Uio064qfjIzx8I LjAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455790; x=1746060590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TCoWmgPRVw8+vOgQ2VpvLXdyfprmS+31wGRDcwl1Zz8=; b=P1TlDCMFMcuuj5yJ9ksmICULon2d9kjDBr3b17BqBy4DXyWuCRo1xPPQE/01B8AHrB uvgjgljshx6SReUC2eCvvEkqHCAIQZdXL+QrfOQ++87Ql1cM56GwVTHdOPzbdEMNGSQs ZVhsyE3zXQHB4j+ehK5noE3p//rGHqicbiOnDlGQezpq721mr6FKoe5cPqft/1nZTXD/ k//4FT6xuehck9lNAQ7rGoHlEV6NferPUhrwAyjw3H61wKZ1fGg/66XUFrfuTyRofBZ3 iQTFzMQpS+qN9Fmjmvh4xMVjgRKG5M288OVahBUFs4BaCwOcWDKfW+LzSdGRGgy3jeM9 1OcQ== X-Gm-Message-State: AOJu0Yz+99FXYW0SzKvGaSnnTkLpqqX+WT5kcbwnBwHiAtSA6zMqrDA2 Q7RU41ga2HAbZ1zf8/iItlsgoLFiVPD+WJsI2N8HRlVW5neNexJcz87RbF5DQuR7hQsvpMvh3iE H X-Gm-Gg: ASbGnctQ+UeD9GfJLUESetWoKA9DIjMu6+O3xBoz++m2KiwAty3QJLyTdRl8ySom7ze bHD6gyZyZHFA8+ZJcBJbC8m6M6Wgxo5EFzsfPqDf3FGYXAK/fWgakMLaQmvK0PEpDIF0fn2KYVO yxNX54ynOzGVLmQ2BoMM+3Gx8Q9IJ6LM6B5Azfy3RjtBgLaV/NgDo2o7sI4RpUI6cTQRXn/QObo ijlwqv8Hu6J9pJVu0BvuR0552qNy31FE7NEMY3zVc4ilheNe86lE3NeLJyFsrybWQ/SRBNJQGS1 w4yeMuncSTnGxNEwE6QUi3/3qiivHlRimCeE25YzdAlsK53NCpKa+UrL+y8vVOCsn+YpIIoYxhs = X-Received: by 2002:a05:6a00:3a0f:b0:737:9b:582a with SMTP id d2e1a72fcca58-73e24ae8c13mr1201720b3a.24.1745455790292; Wed, 23 Apr 2025 17:49:50 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 019/148] accel/tcg: Build user-exec-stub.c once Date: Wed, 23 Apr 2025 17:47:24 -0700 Message-ID: <20250424004934.598783-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org CONFIG_USER_ONLY == !CONFIG_SYSTEM_ONLY. Therefore it's cleaner to just add to user_ss. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 38ff227eb0..14bf797fda 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -12,7 +12,6 @@ tcg_specific_ss.add(files( 'translator.c', )) tcg_specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c')) -tcg_specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c')) if get_option('plugins') tcg_specific_ss.add(files('plugin-gen.c')) endif @@ -22,6 +21,10 @@ specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( 'cputlb.c', )) +user_ss.add(when: ['CONFIG_TCG'], if_true: files( + 'user-exec-stub.c', +)) + system_ss.add(when: ['CONFIG_TCG'], if_true: files( 'icount-common.c', 'monitor.c', From patchwork Thu Apr 24 00:47:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883854 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204646wrs; Wed, 23 Apr 2025 18:12:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX1GbTy1QZ2iPqjucHUTEXXDQD/dOpO5oQd3vXSP0p13g71hZrBeOat9hJ5w87RxaUdhWDbOA==@linaro.org X-Google-Smtp-Source: AGHT+IFsu8BY+L3n74HsLiV4fbFR0gnVbjHYpJFlb6FnTBPegeNe/DJS7ylR1grYdsmZ25oz759l X-Received: by 2002:a05:620a:3913:b0:7c7:f7ba:270a with SMTP id af79cd13be357-7c956f3e9e6mr180759085a.47.1745457165259; Wed, 23 Apr 2025 18:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457165; cv=none; d=google.com; s=arc-20240605; b=MtZBlA5Rd+C00TahF0eceyi28eYjWy6cIVH5A23gLmFoX6x2DbOnSGOR+rPxt1YIJD L+lc3wl5QYVkqWoJKkilEkRKNVVa5tMwtk4eJiZPMrttVpfCu75LDPgrj90tdPhloVYo J6PhojR4WTwxb3HQh7NakpctdIbj7ae4nOQhXACQ5DDag7IjXKRC3KB2/wovK91+KSb4 8JBRh/kKgB4Nfr83gZQq/n7HxZcLfS/lSHps3BzsTae7t9aOxNHUyNLp9Ody2ywn4JeU RrN7h7yH5XyLjEnoFFm8G7WZc+qHx71wccE0/k84cSL+xKl+QL3QGIxz4ojgmCHqaoY4 bzPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jprqwHHwWojdGfQ1QgUvwGwX1dYcnH5RZgYMJfPxUv8=; fh=Gx9DtyNvQGBGx72Z12no3KggLYwBGD0Je53Cblw8uQs=; b=RGc3+92SbiqbORVaex5HtkcksVFHJDcKN6murANv44uttKlV3Q0K3tmbWp0mPVQld+ ZLYOujbud2LqgDin260hiyPaYFa6cyBTsi1/Tf5u+QreUIenQD2YorYsTzq+xKBmjRer DfxCxPCgwz0jfOjwnFhVNHtds3TfXy7CVcbjybrHjmpa7GyU3OW3iTOoqqgD5P0+k5UV SdBEUds7NnoTRTWq6hGbFGc97GRO09GcJCk1dT5A6Yo/dxd03b3bzyEDogcIB8fhhsKQ 7mlEHXxO/vkHZqQRS5t7SNsiOOqSIx0drxsDIXnzEy/WczVA5UCqJY2B+3DUfRXhlmy4 PMAQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oFk404LK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958c9eed3si24723585a.88.2025.04.23.18.12.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:12:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oFk404LK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmr-0005JA-Ul; Wed, 23 Apr 2025 20:49:57 -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 1u7kmo-0005FI-1n for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:54 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmm-0004LP-89 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:53 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7376dd56f60so274099b3a.3 for ; Wed, 23 Apr 2025 17:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455791; x=1746060591; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jprqwHHwWojdGfQ1QgUvwGwX1dYcnH5RZgYMJfPxUv8=; b=oFk404LKh6YDydM0dVJz7LgeWO6r9gnTgosAvL+EOzFPErijbNqBR9P2wsTp6djq5r 8EC4EJwD1kby6zouICZEBNJ6YLAOJU5Uk5CLt1BVwbHikpzKO6w9oQ99ydfjHp0Z7AKL dX8xJTuUxXjzFbm46anmJlASwd9YtmQUeRN9fL6wPutgm380b93+ZAT0WS70RwN8NP4w r16XkBy10c6bvHzvRMTBdzkXzjBAcVLb1G2UQGvuzEUshiehpC9vWkdJBXfXoXkipbpq RK1iwxlh9IK3ps06bL5LxObJHPpR8ANcDQox1QlQ0xbeHu3Z0Wzs7rg5gfeKsb5mC+MH vcTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455791; x=1746060591; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jprqwHHwWojdGfQ1QgUvwGwX1dYcnH5RZgYMJfPxUv8=; b=WWYDO8Iy5EN8nKT+GF4lEBklFCv407WpAn8eXkK5AH4YO7hQSqDbIqEtSexJU2pzDk aFSJ+NK1a/DpvyU67+wxmyg1pamSwAkHKzEvWldFaktju4eOeS+E/m2nsn3sYuENmc/Q C9z8XWewxOsRjEjWWU4Te/cWwM0PY/zJEucA2QlT2UhJhhoTQ5pYrle4/pT6khAPR22M Iz70rJheOARU054f+LViK7BYi9IQpRHL5rXV+/xFXmF71rZHC+BWtUf5jNi29W4ztnsy 8xDs4Of+PoY3oWZSm68nQxxs1bUVhEoIZgW3JYKhTYebAPuNOFOmWPCB6TNJtQPSuSZU a1mA== X-Gm-Message-State: AOJu0YznV7YFSZoi31S0+8+zJINoyMrI5TbEam6Z+zhDN9Z4ipS/VSsu dB5iF8vTbnOoKJXnDzgY8ByijlWlehLjteqcG8lbuumlOOw992Xb9AY3sbh6rBLkAXg9cl5yrwU t X-Gm-Gg: ASbGncv2D0bKTpQT8S1n6uWA1FWni/mTBvyvPjIcGnDl438BL7y7kgSrJ93wuyemUip SdIf/8RTow9Qm8hd+9WxCsf94MQVyOKxcTEYn4QwbV/iHmYR+rxRN/yGcBJb0B0jQxJpWZhPT3X NOh1mWvPyVUWRdaJ2hCJWenbZcx0i2HCe9OLoXSJvwoGrz8jT7Ew9coZ+lhMtRmwz9YpV3NQ/27 KWVUABA7x1SHKTjzZ7XZTL353MWJH+l3CrDxzzN9ze1GWF7MMkfcgntC5EqVZWjsaiQqqKRmwV5 eoScmvtMTcIM7J/OFkjMhc2TwLdnb82iHKZzGE5FrBvo6bcP31rQxtEYpDkNeAB+s3Jdfa5mlnk = X-Received: by 2002:a05:6a21:338d:b0:1f3:33bf:6640 with SMTP id adf61e73a8af0-20444f0813fmr797340637.18.1745455791008; Wed, 23 Apr 2025 17:49:51 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier Subject: [PULL 020/148] accel/tcg: Build plugin-gen.c once Date: Wed, 23 Apr 2025 17:47:25 -0700 Message-ID: <20250424004934.598783-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We assert that env immediately follows CPUState in cpu-all.h. Change the offsetof expressions to be based on CPUState instead of ArchCPU. Reviewed-by: Alex Bennée Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 13 +++++-------- accel/tcg/meson.build | 7 ++++--- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 7e5f040bf7..c1da753894 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -22,13 +22,12 @@ #include "qemu/osdep.h" #include "qemu/plugin.h" #include "qemu/log.h" -#include "cpu.h" #include "tcg/tcg.h" #include "tcg/tcg-temp-internal.h" -#include "tcg/tcg-op.h" -#include "exec/exec-all.h" +#include "tcg/tcg-op-common.h" #include "exec/plugin-gen.h" #include "exec/translator.h" +#include "exec/translation-block.h" enum plugin_gen_from { PLUGIN_GEN_FROM_TB, @@ -89,15 +88,13 @@ static void gen_enable_mem_helper(struct qemu_plugin_tb *ptb, qemu_plugin_add_dyn_cb_arr(arr); tcg_gen_st_ptr(tcg_constant_ptr((intptr_t)arr), tcg_env, - offsetof(CPUState, neg.plugin_mem_cbs) - - offsetof(ArchCPU, env)); + offsetof(CPUState, neg.plugin_mem_cbs) - sizeof(CPUState)); } static void gen_disable_mem_helper(void) { tcg_gen_st_ptr(tcg_constant_ptr(0), tcg_env, - offsetof(CPUState, neg.plugin_mem_cbs) - - offsetof(ArchCPU, env)); + offsetof(CPUState, neg.plugin_mem_cbs) - sizeof(CPUState)); } static TCGv_i32 gen_cpu_index(void) @@ -113,7 +110,7 @@ static TCGv_i32 gen_cpu_index(void) } TCGv_i32 cpu_index = tcg_temp_ebb_new_i32(); tcg_gen_ld_i32(cpu_index, tcg_env, - -offsetof(ArchCPU, env) + offsetof(CPUState, cpu_index)); + offsetof(CPUState, cpu_index) - sizeof(CPUState)); return cpu_index; } diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 14bf797fda..185830d0f5 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -3,6 +3,10 @@ common_ss.add(when: 'CONFIG_TCG', if_true: files( 'tcg-runtime.c', 'tcg-runtime-gvec.c', )) +if get_option('plugins') + common_ss.add(when: 'CONFIG_TCG', if_true: files('plugin-gen.c')) +endif + tcg_specific_ss = ss.source_set() tcg_specific_ss.add(files( 'tcg-all.c', @@ -12,9 +16,6 @@ tcg_specific_ss.add(files( 'translator.c', )) tcg_specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c')) -if get_option('plugins') - tcg_specific_ss.add(files('plugin-gen.c')) -endif specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_specific_ss) specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( From patchwork Thu Apr 24 00:47:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883793 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199172wrs; Wed, 23 Apr 2025 17:56:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWIBT9p9zDL1ZSgaHUSyde0ULsUfz7f/mC5TrKSQujNCVQkT6L73ss/VYz8d5PpetHbxH7YGw==@linaro.org X-Google-Smtp-Source: AGHT+IHgjtqp15OcrIsecE0pUb+4zgU/5AJ4/jH1vhYG+IIy/KD7MekVeyIE7PTZdgj7oEbn0+HR X-Received: by 2002:ac8:7d56:0:b0:472:1c0c:e4eb with SMTP id d75a77b69052e-47eb54b67e8mr7728881cf.36.1745456182470; Wed, 23 Apr 2025 17:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456182; cv=none; d=google.com; s=arc-20240605; b=bWSrfsXPiCYUy8Bq94iyvvC4T3RATJr3jgJ4aF33ujr24YjfaMEIZiO1g16ITQtluC wMLd7GxLWfGIspgrC9SyDVIYn85z6wz/xH9TcCOn34SGdTk/f70BmL6jdhQ3DnpJSAnA YUa3ttXDGWpDZ19aIh407wAnthKQvVoY1uKgeHUwXUj5Yzz9CgvRUnheyiIowlH1bFvD AsG8+Tyk/TzbJN8psFDv4aR07VGngg9Nekb0XfQoX4lY1kvGjdsDZp4m4Gj+nbSmGyTg sN4/oPMhNq+nQlU3vgHWXuSB1LpDKIcREEsn16thlw+oaR+OJGuCorpjG7qGHpu7g0iu c4UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lVaQ8uivr0ZSIFp6lnsLbuP1aUnA44gVuobbLqVlt/s=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=HF2l0vAE9PB5K/FVQEgOdUYWuVRi8FAIWZvc42WbIS7IDuvB9q2zb+IibV5RRiFufp 7xdQ5gRQqIO+RX053vT+a4kSmU1XjN/YCh+h7lSxc2raVUFsuiROpztH08griYx4YREB qu93amxA4aTb/QUBw3FAtsOU7BnOYU5DUmTpifddZ/Is/E8o6hOXCjB/p/ot8SJFt8vq JgMM+qGWGgdUcRbSgmFL5rlYpQRkpsJVhy9PF6UqC/6vbjglQYUHCvVYV2xAEmoLxJ64 p75dzIy1PRkxIQayqPBBwvfdEcqgzymWYimkM5wRK/gtgICLDmwaymdSEspOJPaIbqwq nzWQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qET8Yayh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea20a015dsi4731741cf.468.2025.04.23.17.56.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:56:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qET8Yayh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kms-0005KW-QF; Wed, 23 Apr 2025 20:49: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 1u7kmp-0005GQ-Dq for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:55 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmn-0004LZ-4z for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:54 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-739be717eddso275527b3a.2 for ; Wed, 23 Apr 2025 17:49:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455792; x=1746060592; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lVaQ8uivr0ZSIFp6lnsLbuP1aUnA44gVuobbLqVlt/s=; b=qET8YayhTklAKL/mz51uKlbI69zXsQ2MkqevqRxus1LgYdEwGTsB2Nmz1t/H1YyRIL aJOUBroFT+vUszWw1snnKxXq6riNfmyIC8O8q1w363KeCnjRJBTugJmtpugy3zuKtqyw zqajk5UrwYkvE6d1sigZ/pyow5gTq/8b/8KchTEuuqASLZTv4eQg0GU7XTao+q6FrzVQ n0Jpaf3dOBfZaSwZNSwYcq2AUxI474eSCKQvwFlX7V49pPmXs85SvZBlf5/b+H7VeQIY qQTUK0wSRgGY5qX6Nldt8UiH5UQbEgBlV44toE3jMbUiWDZjy7SeXMSC5RlwvoLpszci gc+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455792; x=1746060592; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lVaQ8uivr0ZSIFp6lnsLbuP1aUnA44gVuobbLqVlt/s=; b=SdGGTYgoS6sP7kJu0rDUl1UsaJoEvIdghkSGSIG0rWhIgvtHEvoOQRfOQxp0QTKmr9 WXlCXT8c7P5ddxH3DpviW9q/+yZwLVuE9sFf3lQRlH1euiZJZ4jWStrACBNUCim920EM F9xJ13D5jeCyqY3bM6Kx3zpDZ7Ye3jU/XbYx4nWoUAQN/VFQupR3E92uJttXbX1KblVD 7PxShdaFzRuFot4yyWiXLZagWw00TJum4/7273d+Ruw/Am/ZA0/oY8Ot4DJIZrY+lQYJ 80pFOYp9lHieU20Vc8wmBWSOkoqEBKTZjckIdE9H3He/xsiCFXoc2XcmSJt3DD2nowKC totQ== X-Gm-Message-State: AOJu0YyRdt1S77qi0e3pB0IYAC09XPNMOPfNsJyrU0A+Q1Ga+6k//2oc i+qCWXMhjvImPk6YzvFAN8f2uthB+6Q9mk1Izg2FfQOdukpAFGhxMZgvqMPGM+74XN3KK5PB0Dn c X-Gm-Gg: ASbGncuItWAl6TVgU3/mG4y+iwl0Pz2mQ2xI3D1n4TFu1ZTUz7m1QSlV9cjdtsuXw6G k1n6H4Umoe9Y0cNOny6IFw+D5s7p5ARilNPgSF4qpioOcjjbj09TbGUSpP9qrwYvgqa6YWCl6XM 6/tXecE/VlfAUpQxcW6x7zvEqifRhkP/OoO2K2vH8kI+b1vmx3UM9+6UGI+LsrH4K+cy8RY2OGF glO9YX4e1aPpgd+ed77CSZpko1U2xyXa8fqVFnxqDmb+OUScDKLwbe69hIq/ZMTa5+8ppSSZXGC h55bVoOlsa9QQ/76yMYgkrXP1APSvU3iR1kKAygz+TswrQNjA2XhkEj2lc6TDosY88MupIsAiJo = X-Received: by 2002:a05:6a00:1150:b0:730:9801:d3e2 with SMTP id d2e1a72fcca58-73e2460ecd0mr1170956b3a.8.1745455791741; Wed, 23 Apr 2025 17:49:51 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 021/148] accel/tcg: Fix cpu_ld*_code_mmu for user mode Date: Wed, 23 Apr 2025 17:47:26 -0700 Message-ID: <20250424004934.598783-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These routines are buggy in multiple ways: - Use of target-endian loads, then a bswap that depends on the host endiannness. - A non-unwinding code load must set_helper_retaddr 1, which is magic within adjust_signal_pc. - cpu_ldq_code_mmu used MMU_DATA_LOAD The bugs are hidden because all current uses of cpu_ld*_code_mmu are from system mode. Fixes: 2899062614a ("accel/tcg: Add cpu_ld*_code_mmu") Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/user-exec.c | 41 ++++------------------------------------- 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 2322181b15..629a1c9ce6 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -1257,58 +1257,25 @@ uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr ptr) uint8_t cpu_ldb_code_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) { - void *haddr; - uint8_t ret; - - haddr = cpu_mmu_lookup(env_cpu(env), addr, oi, ra, MMU_INST_FETCH); - ret = ldub_p(haddr); - clear_helper_retaddr(); - return ret; + return do_ld1_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } uint16_t cpu_ldw_code_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) { - void *haddr; - uint16_t ret; - - haddr = cpu_mmu_lookup(env_cpu(env), addr, oi, ra, MMU_INST_FETCH); - ret = lduw_p(haddr); - clear_helper_retaddr(); - if (get_memop(oi) & MO_BSWAP) { - ret = bswap16(ret); - } - return ret; + return do_ld2_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } uint32_t cpu_ldl_code_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) { - void *haddr; - uint32_t ret; - - haddr = cpu_mmu_lookup(env_cpu(env), addr, oi, ra, MMU_INST_FETCH); - ret = ldl_p(haddr); - clear_helper_retaddr(); - if (get_memop(oi) & MO_BSWAP) { - ret = bswap32(ret); - } - return ret; + return do_ld4_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } uint64_t cpu_ldq_code_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) { - void *haddr; - uint64_t ret; - - haddr = cpu_mmu_lookup(env_cpu(env), addr, oi, ra, MMU_DATA_LOAD); - ret = ldq_p(haddr); - clear_helper_retaddr(); - if (get_memop(oi) & MO_BSWAP) { - ret = bswap64(ret); - } - return ret; + return do_ld8_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } #include "ldst_common.c.inc" From patchwork Thu Apr 24 00:47:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883774 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198043wrs; Wed, 23 Apr 2025 17:51:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVCOY8gjl2aKwG2cNRvHe8VFc22wq9YO0DRi4SpLYbu/e2LaAx+Di0ecPUuThkY0xBcnkTjmg==@linaro.org X-Google-Smtp-Source: AGHT+IHq3J+Bv1SkyqwRJfhPuHTAJ5/xRkQKX4nrxxjlr1MrBKxlpRwBjfre5fAMAhNXkmuG/0nv X-Received: by 2002:a05:6214:186:b0:6f2:bcbf:101c with SMTP id 6a1803df08f44-6f4bfc7b530mr12111016d6.33.1745455897840; Wed, 23 Apr 2025 17:51:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745455897; cv=none; d=google.com; s=arc-20240605; b=JalGZyLWfKrwFrnXBvUpuA5OXyDyhzJX61tXUEcU4esp9BaSjfQeA/odicB5iq/xEO 3FFVeO/92RD8YXtESkbABTenHigG3elMUssmUvLm95D4Kk1xAYjbESfUHwO31zGIVFCw mmOCVjRnxe/iAbtie3YJGuL4jY1wvqbkT1a/1y1eCY0oZA8f46HibVcnOfRBEzm5dWfZ zywJ4q6ER1S7oH9Y39F1YRoXxE6lpwnhnWNWlB98eGlwquNUX50RExBrKpM+gPCVDVFV b2hUDEeog2KhU/L3sb7S6fm0iQtkpnP6iUpmf4aQr2/MswyO3EdRSTSU+oCyoE0iK9Gh wy2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2/SnGbiJXxdcdsQzFocCM8W+C/HoHgmlhXBwGvsNJIU=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=h6iChJunIE+r17n5yColFRC4HJcUiZY8FQGF0r3dYFBroCADPG1u+n9d2n6yH6KAyu z/fn+28G0f1uiiPTwR9EHdmNayDoayDMyZTAbkGo068fZhOEBGhIp74PDxZlbtTDBfRX ActuRMSmZEe+uU0MdJkkVJAiAfpwqFy65Gj6/nGVtSYnbB9wfji7/5XGoPHwaF40N1to BFU9P6Nab9o6p5a+ZG1uxK9DXgKoIl07ve5qYm8gTh+4/+9qDpEn1r10+e4f4NvdPFiH 9vgqnnwmhHFfQOFturj5rQ9w7fAOZS62lqaavsJa3zAjgi6u4LwcGPHyfzM0dSnOyApw IAhw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sLuKPkHH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0aea430si3424406d6.340.2025.04.23.17.51.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:51:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sLuKPkHH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7knT-0005zO-5x; Wed, 23 Apr 2025 20:50:36 -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 1u7kmq-0005H6-I8 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:56 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmn-0004Ll-Vg for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:56 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-73bf5aa95e7so366885b3a.1 for ; Wed, 23 Apr 2025 17:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455792; x=1746060592; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2/SnGbiJXxdcdsQzFocCM8W+C/HoHgmlhXBwGvsNJIU=; b=sLuKPkHH+hSk+A27h84e0MoxDEc2zWkSSc3HR4TtDt0Lkj9iCdX5B3lzlNzUxIQcTl ks58Hzg+/galOJIOFr39bSuF8lmPz3/ByTO9GMdWNGHbVksUPODhiMSgRDVWgcVhqtXq w47KW/ajq2hZNWUDVLxro7C93EXdKvTfDDYvgiyuV3nGMMl7Lwf5nPrcSj2zaOgnrQK9 6wm/RB71hO9/ghS6R5yKtTO7MnNvvtlMbVxGQ9qdlsgwhdNMQ9jcw5o0lv3qUpbK/5dr 2uvXc2HsL2f4c9pbtFoJ1R/fMeOr3BC8lOdqFss0RX5hlU8GPwDLxDYUdlrGE68Fd+Wo L0JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455792; x=1746060592; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2/SnGbiJXxdcdsQzFocCM8W+C/HoHgmlhXBwGvsNJIU=; b=t+ccpheIHmHZ9L6SF6ZOQLDJSu1D+idsmyYioUkbYBxUt7yo7Sm01az1m4f/t6Z/Y3 zNMtJE0wzrtzAaaDhRMDsG6OTdfFApTeehs9Luyya658sNzLzd84GXp+wPGW3AxAgIIs NQ+qJu1GwfEklh415vzLVR/foAqs+a+IsMXRgrmxDvMv/8YhBmyCadBORUcqvZnF0WKc XW+oS0IoUK/qQpI7PhqiPm/DQfGxXQMw3GHUlecAC7T1q2+OoZV5C2gXgtp/5HCkvBQL fhKI2wLhvJfr/nGValdvz1Q1Ix1kw7ovzCfkJ8vQO9VDJVscBruNYEFeOb/dd1kPENrD gE0g== X-Gm-Message-State: AOJu0YytKBx8JC3ETPTBpTGOrPGZY7q/6uh88ZRBSvAS8RqfYY76kfwJ gckX+WXXrZKCDYRdtIJlIqk9dtsMy0/RcMrYvVUEvw9GDbI3qkwXttGXFBhIf7kkarts4dGz2Ow B X-Gm-Gg: ASbGncsu0P8M596n8SX+N4eAoP9LdAGkuPuLdYhtAa5TpoeBWA+Y/tuI8n3br8ksPwb KlJgoncrMEzIzsgtWTtUbnh1Nzh7U3JEsfqp6TLog9daapJAGNxUBSbVCNOyDGL14kMa/9UtMPv 3KJrbGpsGw/Ej6c6aoEXEhzzMeleojMNPYDZ6u5eUMOOO8wsYZDkI9WA9prnPh7DjkTQ3iGJGb6 tY6smvvJqMMV9/xIiv3XbeOf0xlvPn3Dk6n5X5nRqBVnTBMdfxG/p7Pvn/aVNtnj09hxf6GbWeU QgD+Jcvb0/GwkDJMYPIWnOqCS38gtpHf3kXbr1oalbYcY8JVFtlPoFTbvs6IHuaesxf4wW3rMqG vXWGiz5FQMw== X-Received: by 2002:a05:6a00:2e14:b0:739:56c2:b661 with SMTP id d2e1a72fcca58-73e2463345cmr934936b3a.12.1745455792457; Wed, 23 Apr 2025 17:49:52 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 022/148] include/exec: Use vaddr for *_mmu guest memory access routines Date: Wed, 23 Apr 2025 17:47:27 -0700 Message-ID: <20250424004934.598783-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Use vaddr only for the newest api, because it has the least number of uses and therefore is the easiest to audit. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 16 ++++++------- include/exec/cpu_ldst.h | 48 ++++++++++++++++++------------------- accel/tcg/cputlb.c | 8 +++---- accel/tcg/user-exec.c | 8 +++---- accel/tcg/ldst_common.c.inc | 20 ++++++++-------- 5 files changed, 50 insertions(+), 50 deletions(-) diff --git a/accel/tcg/atomic_template.h b/accel/tcg/atomic_template.h index 89593b2502..08a475c10c 100644 --- a/accel/tcg/atomic_template.h +++ b/accel/tcg/atomic_template.h @@ -77,7 +77,7 @@ # define END _le #endif -ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, abi_ptr addr, +ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, vaddr addr, ABI_TYPE cmpv, ABI_TYPE newv, MemOpIdx oi, uintptr_t retaddr) { @@ -101,7 +101,7 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, abi_ptr addr, } #if DATA_SIZE < 16 -ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, abi_ptr addr, ABI_TYPE val, +ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, vaddr addr, ABI_TYPE val, MemOpIdx oi, uintptr_t retaddr) { DATA_TYPE *haddr = atomic_mmu_lookup(env_cpu(env), addr, oi, @@ -120,7 +120,7 @@ ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, abi_ptr addr, ABI_TYPE val, } #define GEN_ATOMIC_HELPER(X) \ -ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, abi_ptr addr, \ +ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, vaddr addr, \ ABI_TYPE val, MemOpIdx oi, uintptr_t retaddr) \ { \ DATA_TYPE *haddr, ret; \ @@ -156,7 +156,7 @@ GEN_ATOMIC_HELPER(xor_fetch) * of CF_PARALLEL's value, we'll trace just a read and a write. */ #define GEN_ATOMIC_HELPER_FN(X, FN, XDATA_TYPE, RET) \ -ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, abi_ptr addr, \ +ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, vaddr addr, \ ABI_TYPE xval, MemOpIdx oi, uintptr_t retaddr) \ { \ XDATA_TYPE *haddr, cmp, old, new, val = xval; \ @@ -202,7 +202,7 @@ GEN_ATOMIC_HELPER_FN(umax_fetch, MAX, DATA_TYPE, new) # define END _be #endif -ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, abi_ptr addr, +ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, vaddr addr, ABI_TYPE cmpv, ABI_TYPE newv, MemOpIdx oi, uintptr_t retaddr) { @@ -226,7 +226,7 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, abi_ptr addr, } #if DATA_SIZE < 16 -ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, abi_ptr addr, ABI_TYPE val, +ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, vaddr addr, ABI_TYPE val, MemOpIdx oi, uintptr_t retaddr) { DATA_TYPE *haddr = atomic_mmu_lookup(env_cpu(env), addr, oi, @@ -245,7 +245,7 @@ ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, abi_ptr addr, ABI_TYPE val, } #define GEN_ATOMIC_HELPER(X) \ -ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, abi_ptr addr, \ +ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, vaddr addr, \ ABI_TYPE val, MemOpIdx oi, uintptr_t retaddr) \ { \ DATA_TYPE *haddr, ret; \ @@ -278,7 +278,7 @@ GEN_ATOMIC_HELPER(xor_fetch) * of CF_PARALLEL's value, we'll trace just a read and a write. */ #define GEN_ATOMIC_HELPER_FN(X, FN, XDATA_TYPE, RET) \ -ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, abi_ptr addr, \ +ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, vaddr addr, \ ABI_TYPE xval, MemOpIdx oi, uintptr_t retaddr) \ { \ XDATA_TYPE *haddr, ldo, ldn, old, new, val = xval; \ diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 769e9fc440..ddd8e0cf48 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -157,48 +157,48 @@ void cpu_stl_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, void cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint64_t val, int mmu_idx, uintptr_t ra); -uint8_t cpu_ldb_mmu(CPUArchState *env, abi_ptr ptr, MemOpIdx oi, uintptr_t ra); -uint16_t cpu_ldw_mmu(CPUArchState *env, abi_ptr ptr, MemOpIdx oi, uintptr_t ra); -uint32_t cpu_ldl_mmu(CPUArchState *env, abi_ptr ptr, MemOpIdx oi, uintptr_t ra); -uint64_t cpu_ldq_mmu(CPUArchState *env, abi_ptr ptr, MemOpIdx oi, uintptr_t ra); -Int128 cpu_ld16_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra); +uint8_t cpu_ldb_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint16_t cpu_ldw_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint32_t cpu_ldl_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint64_t cpu_ldq_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +Int128 cpu_ld16_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); -void cpu_stb_mmu(CPUArchState *env, abi_ptr ptr, uint8_t val, +void cpu_stb_mmu(CPUArchState *env, vaddr ptr, uint8_t val, MemOpIdx oi, uintptr_t ra); -void cpu_stw_mmu(CPUArchState *env, abi_ptr ptr, uint16_t val, +void cpu_stw_mmu(CPUArchState *env, vaddr ptr, uint16_t val, MemOpIdx oi, uintptr_t ra); -void cpu_stl_mmu(CPUArchState *env, abi_ptr ptr, uint32_t val, +void cpu_stl_mmu(CPUArchState *env, vaddr ptr, uint32_t val, MemOpIdx oi, uintptr_t ra); -void cpu_stq_mmu(CPUArchState *env, abi_ptr ptr, uint64_t val, +void cpu_stq_mmu(CPUArchState *env, vaddr ptr, uint64_t val, MemOpIdx oi, uintptr_t ra); -void cpu_st16_mmu(CPUArchState *env, abi_ptr addr, Int128 val, +void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, MemOpIdx oi, uintptr_t ra); -uint32_t cpu_atomic_cmpxchgb_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_atomic_cmpxchgb_mmu(CPUArchState *env, vaddr addr, uint32_t cmpv, uint32_t newv, MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgw_le_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_atomic_cmpxchgw_le_mmu(CPUArchState *env, vaddr addr, uint32_t cmpv, uint32_t newv, MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgl_le_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_atomic_cmpxchgl_le_mmu(CPUArchState *env, vaddr addr, uint32_t cmpv, uint32_t newv, MemOpIdx oi, uintptr_t retaddr); -uint64_t cpu_atomic_cmpxchgq_le_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_atomic_cmpxchgq_le_mmu(CPUArchState *env, vaddr addr, uint64_t cmpv, uint64_t newv, MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgw_be_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_atomic_cmpxchgw_be_mmu(CPUArchState *env, vaddr addr, uint32_t cmpv, uint32_t newv, MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgl_be_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_atomic_cmpxchgl_be_mmu(CPUArchState *env, vaddr addr, uint32_t cmpv, uint32_t newv, MemOpIdx oi, uintptr_t retaddr); -uint64_t cpu_atomic_cmpxchgq_be_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_atomic_cmpxchgq_be_mmu(CPUArchState *env, vaddr addr, uint64_t cmpv, uint64_t newv, MemOpIdx oi, uintptr_t retaddr); #define GEN_ATOMIC_HELPER(NAME, TYPE, SUFFIX) \ TYPE cpu_atomic_ ## NAME ## SUFFIX ## _mmu \ - (CPUArchState *env, abi_ptr addr, TYPE val, \ + (CPUArchState *env, vaddr addr, TYPE val, \ MemOpIdx oi, uintptr_t retaddr); #ifdef CONFIG_ATOMIC64 @@ -244,10 +244,10 @@ GEN_ATOMIC_HELPER_ALL(xchg) #undef GEN_ATOMIC_HELPER_ALL #undef GEN_ATOMIC_HELPER -Int128 cpu_atomic_cmpxchgo_le_mmu(CPUArchState *env, abi_ptr addr, +Int128 cpu_atomic_cmpxchgo_le_mmu(CPUArchState *env, vaddr addr, Int128 cmpv, Int128 newv, MemOpIdx oi, uintptr_t retaddr); -Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, abi_ptr addr, +Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, vaddr addr, Int128 cmpv, Int128 newv, MemOpIdx oi, uintptr_t retaddr); @@ -297,13 +297,13 @@ Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, abi_ptr addr, # define cpu_stq_mmuidx_ra cpu_stq_le_mmuidx_ra #endif -uint8_t cpu_ldb_code_mmu(CPUArchState *env, abi_ptr addr, +uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); -uint16_t cpu_ldw_code_mmu(CPUArchState *env, abi_ptr addr, +uint16_t cpu_ldw_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); -uint32_t cpu_ldl_code_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_ldl_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); -uint64_t cpu_ldq_code_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr); diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index fb22048876..b03998f926 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -2925,25 +2925,25 @@ uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr) return do_ld8_mmu(cs, addr, oi, 0, MMU_INST_FETCH); } -uint8_t cpu_ldb_code_mmu(CPUArchState *env, abi_ptr addr, +uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t retaddr) { return do_ld1_mmu(env_cpu(env), addr, oi, retaddr, MMU_INST_FETCH); } -uint16_t cpu_ldw_code_mmu(CPUArchState *env, abi_ptr addr, +uint16_t cpu_ldw_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t retaddr) { return do_ld2_mmu(env_cpu(env), addr, oi, retaddr, MMU_INST_FETCH); } -uint32_t cpu_ldl_code_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_ldl_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t retaddr) { return do_ld4_mmu(env_cpu(env), addr, oi, retaddr, MMU_INST_FETCH); } -uint64_t cpu_ldq_code_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t retaddr) { return do_ld8_mmu(env_cpu(env), addr, oi, retaddr, MMU_INST_FETCH); diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 629a1c9ce6..dec17435c5 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -1254,25 +1254,25 @@ uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr ptr) return ret; } -uint8_t cpu_ldb_code_mmu(CPUArchState *env, abi_ptr addr, +uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { return do_ld1_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } -uint16_t cpu_ldw_code_mmu(CPUArchState *env, abi_ptr addr, +uint16_t cpu_ldw_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { return do_ld2_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } -uint32_t cpu_ldl_code_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_ldl_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { return do_ld4_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } -uint64_t cpu_ldq_code_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { return do_ld8_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); diff --git a/accel/tcg/ldst_common.c.inc b/accel/tcg/ldst_common.c.inc index ebbf380d76..0447c0bb92 100644 --- a/accel/tcg/ldst_common.c.inc +++ b/accel/tcg/ldst_common.c.inc @@ -135,7 +135,7 @@ static void plugin_load_cb(CPUArchState *env, abi_ptr addr, } } -uint8_t cpu_ldb_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) +uint8_t cpu_ldb_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { uint8_t ret; @@ -145,7 +145,7 @@ uint8_t cpu_ldb_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) return ret; } -uint16_t cpu_ldw_mmu(CPUArchState *env, abi_ptr addr, +uint16_t cpu_ldw_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { uint16_t ret; @@ -156,7 +156,7 @@ uint16_t cpu_ldw_mmu(CPUArchState *env, abi_ptr addr, return ret; } -uint32_t cpu_ldl_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_ldl_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { uint32_t ret; @@ -167,7 +167,7 @@ uint32_t cpu_ldl_mmu(CPUArchState *env, abi_ptr addr, return ret; } -uint64_t cpu_ldq_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_ldq_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { uint64_t ret; @@ -178,7 +178,7 @@ uint64_t cpu_ldq_mmu(CPUArchState *env, abi_ptr addr, return ret; } -Int128 cpu_ld16_mmu(CPUArchState *env, abi_ptr addr, +Int128 cpu_ld16_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { Int128 ret; @@ -205,14 +205,14 @@ static void plugin_store_cb(CPUArchState *env, abi_ptr addr, } } -void cpu_stb_mmu(CPUArchState *env, abi_ptr addr, uint8_t val, +void cpu_stb_mmu(CPUArchState *env, vaddr addr, uint8_t val, MemOpIdx oi, uintptr_t retaddr) { helper_stb_mmu(env, addr, val, oi, retaddr); plugin_store_cb(env, addr, val, 0, oi); } -void cpu_stw_mmu(CPUArchState *env, abi_ptr addr, uint16_t val, +void cpu_stw_mmu(CPUArchState *env, vaddr addr, uint16_t val, MemOpIdx oi, uintptr_t retaddr) { tcg_debug_assert((get_memop(oi) & MO_SIZE) == MO_16); @@ -220,7 +220,7 @@ void cpu_stw_mmu(CPUArchState *env, abi_ptr addr, uint16_t val, plugin_store_cb(env, addr, val, 0, oi); } -void cpu_stl_mmu(CPUArchState *env, abi_ptr addr, uint32_t val, +void cpu_stl_mmu(CPUArchState *env, vaddr addr, uint32_t val, MemOpIdx oi, uintptr_t retaddr) { tcg_debug_assert((get_memop(oi) & MO_SIZE) == MO_32); @@ -228,7 +228,7 @@ void cpu_stl_mmu(CPUArchState *env, abi_ptr addr, uint32_t val, plugin_store_cb(env, addr, val, 0, oi); } -void cpu_stq_mmu(CPUArchState *env, abi_ptr addr, uint64_t val, +void cpu_stq_mmu(CPUArchState *env, vaddr addr, uint64_t val, MemOpIdx oi, uintptr_t retaddr) { tcg_debug_assert((get_memop(oi) & MO_SIZE) == MO_64); @@ -236,7 +236,7 @@ void cpu_stq_mmu(CPUArchState *env, abi_ptr addr, uint64_t val, plugin_store_cb(env, addr, val, 0, oi); } -void cpu_st16_mmu(CPUArchState *env, abi_ptr addr, Int128 val, +void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, MemOpIdx oi, uintptr_t retaddr) { tcg_debug_assert((get_memop(oi) & MO_SIZE) == MO_128); From patchwork Thu Apr 24 00:47:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883814 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3200173wrs; Wed, 23 Apr 2025 18:00:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXqVjvDH03EBt+q14acbu5ytbYq7W+BVvcrTOkS75K6Dr6qc34+0H/B3WmY7A8sAMoU2vk28A==@linaro.org X-Google-Smtp-Source: AGHT+IG+ygxIFSWDvobv9KVSSk4v57ykRw5YKjNIQ0/G6PHxy17kl8dm4NrXPYSBhdE6WBqfjt2y X-Received: by 2002:a05:6214:e48:b0:6ea:d604:9e4f with SMTP id 6a1803df08f44-6f4c12554d2mr6712116d6.19.1745456423787; Wed, 23 Apr 2025 18:00:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456423; cv=none; d=google.com; s=arc-20240605; b=FC1SMBMWjDvwnawpOmiuhwgU3yI9vEDG4J2Iy5Td/SSx9gFaCrtUufcVKtJ2zy8X3n qA8o9w/RTHizAj9J8sVf6E3BIbhkGmbuBz7KlcwLJplhAPNM8AzMlxoIA7Q7SLAdsdk0 aYBwWDkQYQkWfz6goyGM97B6BwEeznLkDyRIoVqxTQ0vblnW2xHNyaASD80jb5mWInau c/qfgUfq3HmrvVRz7B1D1YQFfTqNAaNujLs2cezF8/c+ZO92lsl3/nC/Zq3NxLT9dmpz IfOqb1hA9/KqUGUQHrscT3WEFE3/K50ZVk139jDc7ZjykNgFI/fQuHPkl+S1FBwXD2x1 k8OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Eyx3jHfuOzS1kFXjXoFUhMf/lfjFavDcf4Lxs2+4npE=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=PNDGDCNGn9JMwM1afQy8C+Hfg9M8InN4uLrmiP+MU/xaGaKQ/uxb7Do/hwxAGJq7tD yWXD7R3Qed1R1ZYyO5LYtK8PsFs3+5SPadAcV7M93mub+E5OtNWyAg+8e1+6DyyST5Sw P0B5mLYuvsld4bB4a73pVVf3Y729hSTMkRDeLPhckPArW6C5a9v2l7MnTqagzeGFVxNn WAtRnGMn46hwOzuye/nTr/Jum1ZqoVsy465EAJbuB7aDwsc6PJZ/Y5xraQ65lcijZxuH Kr8t0rBsfkvFdP/rjn73PiaXS+c2GgApmGJ5U83ug27RaXinZkhJ6SuxXdfGlTiFs0eC QoeQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wu4DiSML; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0aea0b3si3695156d6.277.2025.04.23.18.00.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:00:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wu4DiSML; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmt-0005Ll-RL; Wed, 23 Apr 2025 20:49: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 1u7kmq-0005HR-SC for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:56 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmo-0004Lu-I7 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:56 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7399838db7fso508972b3a.0 for ; Wed, 23 Apr 2025 17:49:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455793; x=1746060593; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Eyx3jHfuOzS1kFXjXoFUhMf/lfjFavDcf4Lxs2+4npE=; b=wu4DiSML04lIJGNqAcbMcL7AiRAui/A7+jMIWhW/GbdfiEof8e3yqjE4tGzDUGonx2 84MueCu9+yuqTCmWLCdUj8THGIdWbXn9o4xoaWAbbwAUggPo2rELSDb2DpX6vrryu7xU GTmtQTqOl23v95kPBBD+mlLNk6DANfgX4/tDeOP14lNleEwVdiljgb2nz3PJAVLevhyM JiLNlQDG2v00tRHKIcTn25R2N/bDgT9gOiS8zdeldKsbZzmdd1CpxswazuQaTi2lGrx0 d1vJPltJenqxoY3i74S5vddMkSUcJk4WUjnl06xIvrwdEDlZgIp0EMfSCHc/lLjH1MOR QAvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455793; x=1746060593; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Eyx3jHfuOzS1kFXjXoFUhMf/lfjFavDcf4Lxs2+4npE=; b=ZQHvA+bWFwTKVYLFtydz2iZKzBhhi7puSX1qbzH41mIVjlUTt5ghCl33mP2Q8r3QBG 3Yvlb6HHp4wPUUman5A7mgFfZ6edXcrvDxe+psT5pxYuv3nmv+BZfM5kCluMRMYWv0i7 ft2OvGotx36j0odj+CdMTKzad20jIJsLOSFT1b18V4TvCY6LXuN9EQ+6hhg6ANmlFV5P EB9ZRPm6AVYcfvMkfurS3R2Qlo5LqsVeYTd5hme/9324sKpDFE/7s8vITsmfyCh8XxbJ kII7zd+FhpZ2IwVFcPKZAqNEZaOodDdECNxGea9pANMkZzCoGCJTaD2IfziokJg+ZAWY j+Ug== X-Gm-Message-State: AOJu0YxvF/dpnSj1i1mf26X4hxORzWDAeOU+JLyyxLygmPjVu5XVh5Qa yLf1wgJSNHb5v0jzteRH9pQ7lusAlLJMPP0JdFKYq4wZ5Tjx9PDA2X1zSO0ACmYEVQS+yJQhVLc Q X-Gm-Gg: ASbGncuM6LVZp3EYnJFX0qUmgB/ABprkk1/57f6/0lSYF82D2nV/2NKiEnfFIvLtlFQ NuGC/UKX/+6Gl5kAo+t4OsoOEgvLrp3H6U+DsxErWLWNd6LH8Cmkul2dmBBoEEYFnogxf24kV7n 0OEKhlXFWVN9ihO01ma2FEvuEnJmvuoLa9C0d7pp3a46g1K3HPd+vbq2YCFPPX0fHfWu4mTIuQr 9++jlyoetGGhVbTbFuco1tkdQpoUz9KK8UNZq2wnPC7iHycKTrv4/ZaDw1zGRFVZJnzQsGmAgQX +pUszrHFy8XQui/MM3pO7oLSoPJg0rMqa0KtM2jzt3Gu3e4Sg6hGPwSLWuNjW0UreVXGoQESs3f W277b5EsJsQ== X-Received: by 2002:a05:6a00:6c98:b0:737:cd8:2484 with SMTP id d2e1a72fcca58-73e267e25dfmr660317b3a.6.1745455793159; Wed, 23 Apr 2025 17:49:53 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 023/148] include/exec: Split out cpu-ldst-common.h Date: Wed, 23 Apr 2025 17:47:28 -0700 Message-ID: <20250424004934.598783-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Split out the *_mmu api, which no longer uses target specific argument types. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu-ldst-common.h | 122 +++++++++++++++++++++++++++++++++ include/exec/cpu_ldst.h | 108 +---------------------------- 2 files changed, 123 insertions(+), 107 deletions(-) create mode 100644 include/exec/cpu-ldst-common.h diff --git a/include/exec/cpu-ldst-common.h b/include/exec/cpu-ldst-common.h new file mode 100644 index 0000000000..c46a6ade5d --- /dev/null +++ b/include/exec/cpu-ldst-common.h @@ -0,0 +1,122 @@ +/* + * Software MMU support + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef CPU_LDST_COMMON_H +#define CPU_LDST_COMMON_H + +#ifndef CONFIG_TCG +#error Can only include this header with TCG +#endif + +#include "exec/memopidx.h" +#include "exec/vaddr.h" +#include "exec/mmu-access-type.h" +#include "qemu/int128.h" + +uint8_t cpu_ldb_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint16_t cpu_ldw_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint32_t cpu_ldl_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint64_t cpu_ldq_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +Int128 cpu_ld16_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); + +void cpu_stb_mmu(CPUArchState *env, vaddr ptr, uint8_t val, + MemOpIdx oi, uintptr_t ra); +void cpu_stw_mmu(CPUArchState *env, vaddr ptr, uint16_t val, + MemOpIdx oi, uintptr_t ra); +void cpu_stl_mmu(CPUArchState *env, vaddr ptr, uint32_t val, + MemOpIdx oi, uintptr_t ra); +void cpu_stq_mmu(CPUArchState *env, vaddr ptr, uint64_t val, + MemOpIdx oi, uintptr_t ra); +void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, + MemOpIdx oi, uintptr_t ra); + +uint32_t cpu_atomic_cmpxchgb_mmu(CPUArchState *env, vaddr addr, + uint32_t cmpv, uint32_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint32_t cpu_atomic_cmpxchgw_le_mmu(CPUArchState *env, vaddr addr, + uint32_t cmpv, uint32_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint32_t cpu_atomic_cmpxchgl_le_mmu(CPUArchState *env, vaddr addr, + uint32_t cmpv, uint32_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint64_t cpu_atomic_cmpxchgq_le_mmu(CPUArchState *env, vaddr addr, + uint64_t cmpv, uint64_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint32_t cpu_atomic_cmpxchgw_be_mmu(CPUArchState *env, vaddr addr, + uint32_t cmpv, uint32_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint32_t cpu_atomic_cmpxchgl_be_mmu(CPUArchState *env, vaddr addr, + uint32_t cmpv, uint32_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint64_t cpu_atomic_cmpxchgq_be_mmu(CPUArchState *env, vaddr addr, + uint64_t cmpv, uint64_t newv, + MemOpIdx oi, uintptr_t retaddr); + +#define GEN_ATOMIC_HELPER(NAME, TYPE, SUFFIX) \ +TYPE cpu_atomic_ ## NAME ## SUFFIX ## _mmu \ + (CPUArchState *env, vaddr addr, TYPE val, \ + MemOpIdx oi, uintptr_t retaddr); + +#ifdef CONFIG_ATOMIC64 +#define GEN_ATOMIC_HELPER_ALL(NAME) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, b) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, w_le) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, w_be) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, l_le) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, l_be) \ + GEN_ATOMIC_HELPER(NAME, uint64_t, q_le) \ + GEN_ATOMIC_HELPER(NAME, uint64_t, q_be) +#else +#define GEN_ATOMIC_HELPER_ALL(NAME) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, b) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, w_le) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, w_be) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, l_le) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, l_be) +#endif + +GEN_ATOMIC_HELPER_ALL(fetch_add) +GEN_ATOMIC_HELPER_ALL(fetch_sub) +GEN_ATOMIC_HELPER_ALL(fetch_and) +GEN_ATOMIC_HELPER_ALL(fetch_or) +GEN_ATOMIC_HELPER_ALL(fetch_xor) +GEN_ATOMIC_HELPER_ALL(fetch_smin) +GEN_ATOMIC_HELPER_ALL(fetch_umin) +GEN_ATOMIC_HELPER_ALL(fetch_smax) +GEN_ATOMIC_HELPER_ALL(fetch_umax) + +GEN_ATOMIC_HELPER_ALL(add_fetch) +GEN_ATOMIC_HELPER_ALL(sub_fetch) +GEN_ATOMIC_HELPER_ALL(and_fetch) +GEN_ATOMIC_HELPER_ALL(or_fetch) +GEN_ATOMIC_HELPER_ALL(xor_fetch) +GEN_ATOMIC_HELPER_ALL(smin_fetch) +GEN_ATOMIC_HELPER_ALL(umin_fetch) +GEN_ATOMIC_HELPER_ALL(smax_fetch) +GEN_ATOMIC_HELPER_ALL(umax_fetch) + +GEN_ATOMIC_HELPER_ALL(xchg) + +#undef GEN_ATOMIC_HELPER_ALL +#undef GEN_ATOMIC_HELPER + +Int128 cpu_atomic_cmpxchgo_le_mmu(CPUArchState *env, vaddr addr, + Int128 cmpv, Int128 newv, + MemOpIdx oi, uintptr_t retaddr); +Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, vaddr addr, + Int128 cmpv, Int128 newv, + MemOpIdx oi, uintptr_t retaddr); + +uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, + MemOpIdx oi, uintptr_t ra); +uint16_t cpu_ldw_code_mmu(CPUArchState *env, vaddr addr, + MemOpIdx oi, uintptr_t ra); +uint32_t cpu_ldl_code_mmu(CPUArchState *env, vaddr addr, + MemOpIdx oi, uintptr_t ra); +uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr, + MemOpIdx oi, uintptr_t ra); + +#endif /* CPU_LDST_COMMON_H */ diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index ddd8e0cf48..1fbdbe59ae 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -66,11 +66,8 @@ #error Can only include this header with TCG #endif -#include "exec/memopidx.h" -#include "exec/vaddr.h" +#include "exec/cpu-ldst-common.h" #include "exec/abi_ptr.h" -#include "exec/mmu-access-type.h" -#include "qemu/int128.h" #if defined(CONFIG_USER_ONLY) #include "user/guest-host.h" @@ -157,100 +154,6 @@ void cpu_stl_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, void cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint64_t val, int mmu_idx, uintptr_t ra); -uint8_t cpu_ldb_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); -uint16_t cpu_ldw_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); -uint32_t cpu_ldl_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); -uint64_t cpu_ldq_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); -Int128 cpu_ld16_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); - -void cpu_stb_mmu(CPUArchState *env, vaddr ptr, uint8_t val, - MemOpIdx oi, uintptr_t ra); -void cpu_stw_mmu(CPUArchState *env, vaddr ptr, uint16_t val, - MemOpIdx oi, uintptr_t ra); -void cpu_stl_mmu(CPUArchState *env, vaddr ptr, uint32_t val, - MemOpIdx oi, uintptr_t ra); -void cpu_stq_mmu(CPUArchState *env, vaddr ptr, uint64_t val, - MemOpIdx oi, uintptr_t ra); -void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, - MemOpIdx oi, uintptr_t ra); - -uint32_t cpu_atomic_cmpxchgb_mmu(CPUArchState *env, vaddr addr, - uint32_t cmpv, uint32_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgw_le_mmu(CPUArchState *env, vaddr addr, - uint32_t cmpv, uint32_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgl_le_mmu(CPUArchState *env, vaddr addr, - uint32_t cmpv, uint32_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint64_t cpu_atomic_cmpxchgq_le_mmu(CPUArchState *env, vaddr addr, - uint64_t cmpv, uint64_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgw_be_mmu(CPUArchState *env, vaddr addr, - uint32_t cmpv, uint32_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgl_be_mmu(CPUArchState *env, vaddr addr, - uint32_t cmpv, uint32_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint64_t cpu_atomic_cmpxchgq_be_mmu(CPUArchState *env, vaddr addr, - uint64_t cmpv, uint64_t newv, - MemOpIdx oi, uintptr_t retaddr); - -#define GEN_ATOMIC_HELPER(NAME, TYPE, SUFFIX) \ -TYPE cpu_atomic_ ## NAME ## SUFFIX ## _mmu \ - (CPUArchState *env, vaddr addr, TYPE val, \ - MemOpIdx oi, uintptr_t retaddr); - -#ifdef CONFIG_ATOMIC64 -#define GEN_ATOMIC_HELPER_ALL(NAME) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, b) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, w_le) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, w_be) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, l_le) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, l_be) \ - GEN_ATOMIC_HELPER(NAME, uint64_t, q_le) \ - GEN_ATOMIC_HELPER(NAME, uint64_t, q_be) -#else -#define GEN_ATOMIC_HELPER_ALL(NAME) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, b) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, w_le) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, w_be) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, l_le) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, l_be) -#endif - -GEN_ATOMIC_HELPER_ALL(fetch_add) -GEN_ATOMIC_HELPER_ALL(fetch_sub) -GEN_ATOMIC_HELPER_ALL(fetch_and) -GEN_ATOMIC_HELPER_ALL(fetch_or) -GEN_ATOMIC_HELPER_ALL(fetch_xor) -GEN_ATOMIC_HELPER_ALL(fetch_smin) -GEN_ATOMIC_HELPER_ALL(fetch_umin) -GEN_ATOMIC_HELPER_ALL(fetch_smax) -GEN_ATOMIC_HELPER_ALL(fetch_umax) - -GEN_ATOMIC_HELPER_ALL(add_fetch) -GEN_ATOMIC_HELPER_ALL(sub_fetch) -GEN_ATOMIC_HELPER_ALL(and_fetch) -GEN_ATOMIC_HELPER_ALL(or_fetch) -GEN_ATOMIC_HELPER_ALL(xor_fetch) -GEN_ATOMIC_HELPER_ALL(smin_fetch) -GEN_ATOMIC_HELPER_ALL(umin_fetch) -GEN_ATOMIC_HELPER_ALL(smax_fetch) -GEN_ATOMIC_HELPER_ALL(umax_fetch) - -GEN_ATOMIC_HELPER_ALL(xchg) - -#undef GEN_ATOMIC_HELPER_ALL -#undef GEN_ATOMIC_HELPER - -Int128 cpu_atomic_cmpxchgo_le_mmu(CPUArchState *env, vaddr addr, - Int128 cmpv, Int128 newv, - MemOpIdx oi, uintptr_t retaddr); -Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, vaddr addr, - Int128 cmpv, Int128 newv, - MemOpIdx oi, uintptr_t retaddr); - #if TARGET_BIG_ENDIAN # define cpu_lduw_data cpu_lduw_be_data # define cpu_ldsw_data cpu_ldsw_be_data @@ -297,15 +200,6 @@ Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, vaddr addr, # define cpu_stq_mmuidx_ra cpu_stq_le_mmuidx_ra #endif -uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, - MemOpIdx oi, uintptr_t ra); -uint16_t cpu_ldw_code_mmu(CPUArchState *env, vaddr addr, - MemOpIdx oi, uintptr_t ra); -uint32_t cpu_ldl_code_mmu(CPUArchState *env, vaddr addr, - MemOpIdx oi, uintptr_t ra); -uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr, - MemOpIdx oi, uintptr_t ra); - uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr); uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr); uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr); From patchwork Thu Apr 24 00:47:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883786 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198925wrs; Wed, 23 Apr 2025 17:55:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVtCppInKPXU9AGb0bVBXY1rGSlP3/J4NWyMZtR5njBw2/bA4MiuurXIoq7ySMOq1S0J/gQoQ==@linaro.org X-Google-Smtp-Source: AGHT+IFH3AVBUSlry2EguiNIuaXO53PWvz2dX5tQvic97/kdjqDn1T+JMNDRd43fv8CneJIcQ8N7 X-Received: by 2002:ac8:7c55:0:b0:471:b8dd:6411 with SMTP id d75a77b69052e-47eb52bed90mr8176101cf.47.1745456112472; Wed, 23 Apr 2025 17:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456112; cv=none; d=google.com; s=arc-20240605; b=Aus2jy1aVRj78e6RZn0g+e2Djzbkbi/oqe7n6CjVywRsbF6zEse7H1UZwyKkXEVlUN 6ZNlgv33HyOMuQPQcW8IxuVTrKvnGr3zJgol6PV0JmvhabePi5DerNgasBRkALacs2eP yWZVxl99IIRnKeBbd6pQoEeeMX9bidfdh0QTIiLTL7HWjjVs6kJ4oY9F7MU2EK3la3WF levn2KW2lwFqnFMXfYHQ1hQwB73AYGNLljOxFG2TLDyh2AX6728crzAInuGxhE3Pntg2 T5/rYGpkrgGiv7+KLHVkhp/zCjukesdoFNpyWwgOUAWVRIQ0wGJ+loZL07lmlcRwLLRb ZhLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7JDsL2T5fLn8J7LULI7fiLOiZlumyxDt8T+y0OhrNdA=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=dncgGmUhxWXLUFwtAJPlU0tPPMCFYEjRfLIiQzseL9kTCwZ6s9voRVnXV7QFwnGHja wdnErMdMYkj4YVhqApwF+Ze0yaZNVj7YA/MnG0kPnJjroupWuUln9eq/ValrolAJcif2 bP8O7LRynox1sMB9eyKXjW7Ezz3nfk9Dqb6qHxiFFXq8gOO6ZC4NRSp+IqxHxfRKby2T yVKqv16w+Goy7UBQ4A6W0BcLTgF5RxapRuFbhhzc1u+aD5tWJoCRGqyVZt9yKfqAxo4K ryd8zeZNH+4n99IQvpUHV+FMActuiX27vMXXSLTmUGliCGqeSGxRsyD1jw6UGwuf/gyH Rdlw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zYT7SZAO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f2ca284si5339921cf.77.2025.04.23.17.55.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:55:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zYT7SZAO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmu-0005ME-8B; Wed, 23 Apr 2025 20:50: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 1u7kms-0005JO-1p for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:58 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0: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 1u7kmp-0004M7-DM for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:57 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-736c062b1f5so349426b3a.0 for ; Wed, 23 Apr 2025 17:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455794; x=1746060594; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7JDsL2T5fLn8J7LULI7fiLOiZlumyxDt8T+y0OhrNdA=; b=zYT7SZAOIP7ToQfmFHMN4KdUYZrQQtRPGIWXbsFc4/cWoQH+aa4OCFnOhn3tPtwACA nmlVdSturp2plTRuGqT9kHnhBnBTrkUM+PI2Uwz7SQMrD5HP6eRyjp3w90J9Y8+Is8PA YLC1ryiCb6R7Oick3+GMJz83lmK4wrLzGMm8hKN2J2tqdFWzE3/MujF1R3djeMimVdW6 feAoHDsBHNryu1FLfnRSeA5mdwM+zyIUta8AOiULZy6UztS82FY5JWlGVcsuwj6CJ1BM mcbRhMq6rz30V5/Xkc/9Sf/IITIe8oXiCK0Fs4mMPjdQ2U7gGIeuY+S1H0afeP3jOC0Q nPpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455794; x=1746060594; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7JDsL2T5fLn8J7LULI7fiLOiZlumyxDt8T+y0OhrNdA=; b=cOTx5IQcvv1EnkJub8AcjZ4sSQVoSRfEUTj1K/ynj9LI92BeDoocCLJsKD87Lvts+X YGuegiXjFhEKkzP8PjZCg0/Io7zpgnXJG5JgZvdzDcirYBztwLVQmMVkNI7uvRuugjmR r35RDspB3LeOmOKb/9jMvWjzVVTwaLDGe1rziLeQh7dsxQlMkBSIngFqHweawoXOxzJb aMh1oIyFPWrg4UgzK0td6BhfBd8uCPKDfAe4hhNM7hKZNY0lfGHHDYnex7vSec5iGplr j2wwWhfPH88bhmgHbRM/8oJ2tU6bts7FjgUA5sndzxTPPOOO+nRJoX286ZqSgixsDyXs nXTw== X-Gm-Message-State: AOJu0YwTa5gJnJ2opjHzmPxz+IBnuVssUaE33koB0jY7XY88LuNFwTnm alM7hbq+ypYyBEdhNS3gvyqQSaqYQsyZqZQjKBAkXmMbsAZzYu5FNZ0NzrsbftIfdQRjv7OqyWN E X-Gm-Gg: ASbGncustQB1jP5+LjOCoXlN1dBY4ed6JvCS86nA+FfAKod7fmePHDsMmyZweLNV97t v0rJHSQ3j+lj1RTdO6Du6IByXrvu+mE7z97L3h8uwgfArrX6hYERKuuYVGXXJqvgu7Pe/rp1o5N MABmfKdL9QISRt5Dg0UWfDKtWApTT+nv5DGTVZPOk9PTlYmLkLfS/eBqIunJulKMdUKY/I2lnhP 2d7+UtDRnvXGpQUcRp13XbqxIBNYqRca5ui1pnl/viKdEXJGqjg/pqZ3HD6eXVOTfnUF7+PokKG 31o+ovDDUrXPtdrhqd0aFMlxWxScu3CZ+vW8IEP/eaQobPzoeYknp7W9dpFKVrxaWUVM37iUPT0 = X-Received: by 2002:aa7:9315:0:b0:739:b288:13e7 with SMTP id d2e1a72fcca58-73e24ae145dmr1024508b3a.15.1745455793952; Wed, 23 Apr 2025 17:49:53 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 024/148] include/exec: Split out accel/tcg/cpu-mmu-index.h Date: Wed, 23 Apr 2025 17:47:29 -0700 Message-ID: <20250424004934.598783-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The implementation of cpu_mmu_index was split between cpu-common.h and cpu-all.h, depending on CONFIG_USER_ONLY. We already have the plumbing common to user and system mode. Using MMU_USER_IDX requires the cpu.h for a specific target, and so is restricted to when we're compiling per-target. Include the new header only where needed. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/accel/tcg/cpu-mmu-index.h | 41 +++++++++++++++++++++++++++++++ include/exec/cpu-all.h | 6 ----- include/exec/cpu-common.h | 20 --------------- include/exec/cpu_ldst.h | 1 + semihosting/uaccess.c | 1 + target/arm/gdbstub64.c | 3 +++ target/hppa/mem_helper.c | 1 + target/i386/tcg/translate.c | 1 + target/loongarch/cpu_helper.c | 1 + target/microblaze/helper.c | 1 + target/microblaze/mmu.c | 1 + target/openrisc/translate.c | 1 + target/sparc/cpu.c | 1 + target/sparc/mmu_helper.c | 1 + target/tricore/helper.c | 1 + target/xtensa/mmu_helper.c | 1 + 16 files changed, 56 insertions(+), 26 deletions(-) create mode 100644 include/accel/tcg/cpu-mmu-index.h diff --git a/include/accel/tcg/cpu-mmu-index.h b/include/accel/tcg/cpu-mmu-index.h new file mode 100644 index 0000000000..8d1cb53bfa --- /dev/null +++ b/include/accel/tcg/cpu-mmu-index.h @@ -0,0 +1,41 @@ +/* + * cpu_mmu_index() + * + * Copyright (c) 2003 Fabrice Bellard + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef ACCEL_TCG_CPU_MMU_INDEX_H +#define ACCEL_TCG_CPU_MMU_INDEX_H + +#include "hw/core/cpu.h" +#include "tcg/debug-assert.h" +#ifdef COMPILING_PER_TARGET +# ifdef CONFIG_USER_ONLY +# include "cpu.h" +# endif +#endif + +/** + * cpu_mmu_index: + * @env: The cpu environment + * @ifetch: True for code access, false for data access. + * + * Return the core mmu index for the current translation regime. + * This function is used by generic TCG code paths. + */ +static inline int cpu_mmu_index(CPUState *cs, bool ifetch) +{ +#ifdef COMPILING_PER_TARGET +# ifdef CONFIG_USER_ONLY + return MMU_USER_IDX; +# endif +#endif + + int ret = cs->cc->mmu_index(cs, ifetch); + tcg_debug_assert(ret >= 0 && ret < NB_MMU_MODES); + return ret; +} + +#endif /* ACCEL_TCG_CPU_MMU_INDEX_H */ diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 66a4252269..33b9dc81eb 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -34,8 +34,6 @@ CPUArchState *cpu_copy(CPUArchState *env); #ifdef CONFIG_USER_ONLY -static inline int cpu_mmu_index(CPUState *cs, bool ifetch); - /* * Allow some level of source compatibility with softmmu. We do not * support any of the more exotic features, so only invalid pages may @@ -45,10 +43,6 @@ static inline int cpu_mmu_index(CPUState *cs, bool ifetch); #define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 2)) #define TLB_WATCHPOINT 0 -static inline int cpu_mmu_index(CPUState *cs, bool ifetch) -{ - return MMU_USER_IDX; -} #else /* diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 3771b2130c..be032e1a49 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -272,24 +272,4 @@ static inline CPUState *env_cpu(CPUArchState *env) return (CPUState *)env_cpu_const(env); } -#ifndef CONFIG_USER_ONLY -/** - * cpu_mmu_index: - * @env: The cpu environment - * @ifetch: True for code access, false for data access. - * - * Return the core mmu index for the current translation regime. - * This function is used by generic TCG code paths. - * - * The user-only version of this function is inline in cpu-all.h, - * where it always returns MMU_USER_IDX. - */ -static inline int cpu_mmu_index(CPUState *cs, bool ifetch) -{ - int ret = cs->cc->mmu_index(cs, ifetch); - tcg_debug_assert(ret >= 0 && ret < NB_MMU_MODES); - return ret; -} -#endif /* !CONFIG_USER_ONLY */ - #endif /* CPU_COMMON_H */ diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 1fbdbe59ae..740f5d937f 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -67,6 +67,7 @@ #endif #include "exec/cpu-ldst-common.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/abi_ptr.h" #if defined(CONFIG_USER_ONLY) diff --git a/semihosting/uaccess.c b/semihosting/uaccess.c index 382a366ce3..2e33596428 100644 --- a/semihosting/uaccess.c +++ b/semihosting/uaccess.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "exec/cpu-all.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/exec-all.h" #include "semihosting/uaccess.h" diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index 1a4dbec567..be38016fc7 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -27,6 +27,9 @@ #include #include "mte_user_helper.h" #endif +#ifdef CONFIG_TCG +#include "accel/tcg/cpu-mmu-index.h" +#endif int aarch64_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index fb1d93ef1f..a1ade9079e 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/cputlb.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" #include "exec/helper-proto.h" #include "hw/core/cpu.h" diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index abe210cc4e..6418d4bb03 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -20,6 +20,7 @@ #include "qemu/host-utils.h" #include "cpu.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/exec-all.h" #include "exec/translation-block.h" #include "tcg/tcg-op.h" diff --git a/target/loongarch/cpu_helper.c b/target/loongarch/cpu_helper.c index 930466ca48..f8965cd155 100644 --- a/target/loongarch/cpu_helper.c +++ b/target/loongarch/cpu_helper.c @@ -8,6 +8,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "accel/tcg/cpu-mmu-index.h" #include "internals.h" #include "cpu-csr.h" diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index 27fc929bee..022c98f0c3 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/cputlb.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" #include "qemu/host-utils.h" #include "exec/log.h" diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c index f8587d5ac4..2d18659b99 100644 --- a/target/microblaze/mmu.c +++ b/target/microblaze/mmu.c @@ -22,6 +22,7 @@ #include "qemu/log.h" #include "cpu.h" #include "exec/cputlb.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" static unsigned int tlb_decode_size(unsigned int f) diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 7a6af183ae..da033bffff 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/exec-all.h" #include "tcg/tcg-op.h" #include "qemu/log.h" diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 5716120117..57fbf16ad2 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "qemu/module.h" #include "qemu/qemu-print.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/exec-all.h" #include "exec/translation-block.h" #include "hw/qdev-properties.h" diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c index 3821cd91ec..78cb24a8e2 100644 --- a/target/sparc/mmu_helper.c +++ b/target/sparc/mmu_helper.c @@ -21,6 +21,7 @@ #include "qemu/log.h" #include "cpu.h" #include "exec/cputlb.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" #include "qemu/qemu-print.h" #include "trace.h" diff --git a/target/tricore/helper.c b/target/tricore/helper.c index a64412e6bd..b1ee126112 100644 --- a/target/tricore/helper.c +++ b/target/tricore/helper.c @@ -20,6 +20,7 @@ #include "hw/registerfields.h" #include "cpu.h" #include "exec/cputlb.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" #include "fpu/softfloat-helpers.h" #include "qemu/qemu-print.h" diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c index 63be741a42..40b02f0a2c 100644 --- a/target/xtensa/mmu_helper.c +++ b/target/xtensa/mmu_helper.c @@ -33,6 +33,7 @@ #include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "exec/cputlb.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/exec-all.h" #include "exec/page-protection.h" From patchwork Thu Apr 24 00:47:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883769 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3197936wrs; Wed, 23 Apr 2025 17:51:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVflT+6Z/pmWkUjJTwb5NbBmvK/oOYefjDSoj8sEu/VplsbQ+hK+bEYnjTqAgIkqdlpa4Bd3Q==@linaro.org X-Google-Smtp-Source: AGHT+IGC9CDoObByTAU+nZhpdnZ8FhrsLg/qBhc6kKBxAEXkNF1mrTXIqTfcNOxW5tFCbTBp/M69 X-Received: by 2002:a05:622a:5190:b0:476:b82b:ac91 with SMTP id d75a77b69052e-47eb49b92d1mr11194621cf.49.1745455864415; Wed, 23 Apr 2025 17:51:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745455864; cv=none; d=google.com; s=arc-20240605; b=flblmpPhwMRb/s/I5Q5q3wuGIUxZFXe13epvAaFbIarEEbyR6sMcWN9pqRhD/zaKJZ 2LfvkwOfPwKF9L9NFcHSztYn7VtvhZznllNYs8lMdd1pdFqQkO4G0SrINpNqAYtzOCYn agx7fTeFDMdOEpsLpXH/jUONgMupgAF3N4uvf7TCgAk4nFQblNZpd9h2qmZfwadUPBKR 4wYHBViasL+tjh9vxP4+GAAYCVwZXWBCIfme8ovTBAJHl+jigX2AKk3qYFdRj4bMDoHD aoNunMxH+8rldgHDk9M+usefZmN1ec+Q1PiUTkuNxwQTy9uluJmxIlosfZaa6dwyDw2F XfCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I5ZBESgZTecJR5yHsh6hj9Vd3EM7w2X/AFWoGjqfiC8=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=ZEWQBXxvyqnHetLBD593s1Ma1VUpQ5WX84m1SYnC+CaEZqoCHYlO2zj2ImAWo07WGq 2zlSYDnVMsjXxGGzSh5Ode3mqA01soxqzgSrbH9xVnx11DpI6mucuy6LAe00mouRiSvc HdcA9AoyokBkk8cnnEiEaj9d4GnfPfazgXVvnzCuKG5lFDR9f5NNXsxcRbVSab/wLz8S QZkUL0yRBB+M10G5/H16rNSenmPESSq1dCJv23WeaXqV8gAPe0j0A3OAzYE7V+xwpdnT va1u1BoUL7kdWnbjBqBck+gGYu2Pmnr932O18mvppADdhi3ou6k+2DoBHc78TjYiwwDo SbEg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dqYqtkVY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea209835bsi4739151cf.431.2025.04.23.17.51.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:51:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dqYqtkVY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kmz-0005Vc-Ee; Wed, 23 Apr 2025 20:50: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 1u7kms-0005KI-Hy for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:58 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7kmq-0004MI-1x for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:58 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-736a7e126c7so335697b3a.3 for ; Wed, 23 Apr 2025 17:49:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455795; x=1746060595; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I5ZBESgZTecJR5yHsh6hj9Vd3EM7w2X/AFWoGjqfiC8=; b=dqYqtkVY/G6W+8LHdnhrf4XHlhjYu/+xys4hnp4IP99ie2dCF0HgbCoh84qvTR3S4L +04W/fJGXK1SmzNZTnTgI52PerOazfWNCUy0kHhpzDvuZU/avSDrIATsVvh522qpDBVY 82JWK9qQYSFY4T4dRTX1xV68ivQVUL+iFkOvwGGXrz3kNXZ635iAQfs3mlORb5QolZuL vkY4MFgQofyMmPiwAO90QJshofWwtF54NAviAuJsW40/nL+pMeAIp3lpsd/KqCefR4d0 rAk+HJy+7qL4wnp2xoEy3DuDH14g0wOWxQn/ZoGA/Bdnie3EhY4Aq4mvRxKl37nVSaBm YiOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455795; x=1746060595; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I5ZBESgZTecJR5yHsh6hj9Vd3EM7w2X/AFWoGjqfiC8=; b=YP+ercboBNWLqGROExirroApTnZCSygF/gMFczjinfZKTDyDHBBYhr2JbHqkECBeKf 3FXsbIU/MxlaE/EGu3Gw9CEZfs4UYgwU0YRIyOgPM8sjM3XNNhUjcV7scZ7dkzwI1EpZ xBJ7iyT6nEreSiOPrx9+kykf6dHJBaff28gEGaduApcqv+RNU81LwSrFIZEDb4xLh+wP 2jEtNLegF++6S1HG5z5gbijy/Bq58NZ0U93j2NSHiD5u9EJvfRFV/C5pyxns8ETF0AQp DLiGZXp2plHEotkIioljg0g+Ys6AKt2fvPf79zsdBjZlKzc39oiKjxKtcUw8W7hZB++B jOVA== X-Gm-Message-State: AOJu0Yyjjaz5bROZfABEFDl3zrapM6dJCMfhqEkaAbDbHYkntGlzxTmr qWDvAalMrXfndgOfMKU2IrSt6WVB1+Xn8TnKkqoVEkQddhTAR3oArb7fWS26+YdvJYZRqGRYjaY j X-Gm-Gg: ASbGncsQRsfONm6y5yBn93jBEufkZvtCSjzo0J1TThw2+/xbjLcDuO0MBTHtxDA+lfR jPXBOJ3Va5hKD/cXn2SDdKVf1JNu2VhuOgBwssmo5cfu/uOj+zZr3ev5940kDxLaiz5NdwMyySI eu8xjl4p88qc8yljQdgEUBDi3EyRrWONz6GIBv1jMlqvJDJTRy2EFy6/NqeAX1wi45XLXhyBSS4 0hDe2gEhKEEuGr16vIbrlVksL9a7gf8Q7B0vOEwrml4zdt0Gee/8umCGawhveRk7ssSd0VQb1rJ dVdfuqqWrWzBJSp45j9Ee3cdXAJZAgsc6PM78ofxwwjSgyhrw+kgxdqIgygPUBfblpAGRwqX9Uw = X-Received: by 2002:a05:6a00:acb:b0:72d:3b2e:fef9 with SMTP id d2e1a72fcca58-73e24af4b04mr1089990b3a.20.1745455794790; Wed, 23 Apr 2025 17:49:54 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 025/148] include/exec: Inline *_mmuidx_ra memory operations Date: Wed, 23 Apr 2025 17:47:30 -0700 Message-ID: <20250424004934.598783-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These need to be per-target for 'abi_ptr'. Expand inline to the *_mmu api with trivial massaging of the arguments. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 163 ++++++++++++++++++++++++++++-------- accel/tcg/ldst_common.c.inc | 118 -------------------------- 2 files changed, 129 insertions(+), 152 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 740f5d937f..8e8b9b53f7 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -119,41 +119,136 @@ void cpu_stl_le_data_ra(CPUArchState *env, abi_ptr ptr, void cpu_stq_le_data_ra(CPUArchState *env, abi_ptr ptr, uint64_t val, uintptr_t ra); -uint32_t cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -int cpu_ldsb_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint32_t cpu_lduw_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -int cpu_ldsw_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint32_t cpu_ldl_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint64_t cpu_ldq_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint32_t cpu_lduw_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -int cpu_ldsw_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint32_t cpu_ldl_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint64_t cpu_ldq_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); +static inline uint32_t +cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx); + return cpu_ldb_mmu(env, addr, oi, ra); +} -void cpu_stb_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, - int mmu_idx, uintptr_t ra); -void cpu_stw_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, - int mmu_idx, uintptr_t ra); -void cpu_stl_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, - int mmu_idx, uintptr_t ra); -void cpu_stq_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint64_t val, - int mmu_idx, uintptr_t ra); -void cpu_stw_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, - int mmu_idx, uintptr_t ra); -void cpu_stl_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, - int mmu_idx, uintptr_t ra); -void cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint64_t val, - int mmu_idx, uintptr_t ra); +static inline int +cpu_ldsb_mmuidx_ra(CPUArchState *env, abi_ptr addr, int mmu_idx, uintptr_t ra) +{ + return (int8_t)cpu_ldub_mmuidx_ra(env, addr, mmu_idx, ra); +} + +static inline uint32_t +cpu_lduw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUW | MO_UNALN, mmu_idx); + return cpu_ldw_mmu(env, addr, oi, ra); +} + +static inline int +cpu_ldsw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return (int16_t)cpu_lduw_be_mmuidx_ra(env, addr, mmu_idx, ra); +} + +static inline uint32_t +cpu_ldl_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUL | MO_UNALN, mmu_idx); + return cpu_ldl_mmu(env, addr, oi, ra); +} + +static inline uint64_t +cpu_ldq_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUQ | MO_UNALN, mmu_idx); + return cpu_ldq_mmu(env, addr, oi, ra); +} + +static inline uint32_t +cpu_lduw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUW | MO_UNALN, mmu_idx); + return cpu_ldw_mmu(env, addr, oi, ra); +} + +static inline int +cpu_ldsw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return (int16_t)cpu_lduw_le_mmuidx_ra(env, addr, mmu_idx, ra); +} + +static inline uint32_t +cpu_ldl_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUL | MO_UNALN, mmu_idx); + return cpu_ldl_mmu(env, addr, oi, ra); +} + +static inline uint64_t +cpu_ldq_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUQ | MO_UNALN, mmu_idx); + return cpu_ldq_mmu(env, addr, oi, ra); +} + +static inline void +cpu_stb_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx); + cpu_stb_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUW | MO_UNALN, mmu_idx); + cpu_stw_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stl_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUL | MO_UNALN, mmu_idx); + cpu_stl_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stq_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUQ | MO_UNALN, mmu_idx); + cpu_stq_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUW | MO_UNALN, mmu_idx); + cpu_stw_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stl_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUL | MO_UNALN, mmu_idx); + cpu_stl_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUQ | MO_UNALN, mmu_idx); + cpu_stq_mmu(env, addr, val, oi, ra); +} #if TARGET_BIG_ENDIAN # define cpu_lduw_data cpu_lduw_be_data diff --git a/accel/tcg/ldst_common.c.inc b/accel/tcg/ldst_common.c.inc index 0447c0bb92..99a56df3fb 100644 --- a/accel/tcg/ldst_common.c.inc +++ b/accel/tcg/ldst_common.c.inc @@ -248,124 +248,6 @@ void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, * Wrappers of the above */ -uint32_t cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx); - return cpu_ldb_mmu(env, addr, oi, ra); -} - -int cpu_ldsb_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - return (int8_t)cpu_ldub_mmuidx_ra(env, addr, mmu_idx, ra); -} - -uint32_t cpu_lduw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUW | MO_UNALN, mmu_idx); - return cpu_ldw_mmu(env, addr, oi, ra); -} - -int cpu_ldsw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - return (int16_t)cpu_lduw_be_mmuidx_ra(env, addr, mmu_idx, ra); -} - -uint32_t cpu_ldl_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUL | MO_UNALN, mmu_idx); - return cpu_ldl_mmu(env, addr, oi, ra); -} - -uint64_t cpu_ldq_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUQ | MO_UNALN, mmu_idx); - return cpu_ldq_mmu(env, addr, oi, ra); -} - -uint32_t cpu_lduw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUW | MO_UNALN, mmu_idx); - return cpu_ldw_mmu(env, addr, oi, ra); -} - -int cpu_ldsw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - return (int16_t)cpu_lduw_le_mmuidx_ra(env, addr, mmu_idx, ra); -} - -uint32_t cpu_ldl_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUL | MO_UNALN, mmu_idx); - return cpu_ldl_mmu(env, addr, oi, ra); -} - -uint64_t cpu_ldq_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUQ | MO_UNALN, mmu_idx); - return cpu_ldq_mmu(env, addr, oi, ra); -} - -void cpu_stb_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx); - cpu_stb_mmu(env, addr, val, oi, ra); -} - -void cpu_stw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUW | MO_UNALN, mmu_idx); - cpu_stw_mmu(env, addr, val, oi, ra); -} - -void cpu_stl_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUL | MO_UNALN, mmu_idx); - cpu_stl_mmu(env, addr, val, oi, ra); -} - -void cpu_stq_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUQ | MO_UNALN, mmu_idx); - cpu_stq_mmu(env, addr, val, oi, ra); -} - -void cpu_stw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUW | MO_UNALN, mmu_idx); - cpu_stw_mmu(env, addr, val, oi, ra); -} - -void cpu_stl_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUL | MO_UNALN, mmu_idx); - cpu_stl_mmu(env, addr, val, oi, ra); -} - -void cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUQ | MO_UNALN, mmu_idx); - cpu_stq_mmu(env, addr, val, oi, ra); -} - -/*--------------------------*/ - uint32_t cpu_ldub_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) { int mmu_index = cpu_mmu_index(env_cpu(env), false); From patchwork Thu Apr 24 00:47:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883836 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202228wrs; Wed, 23 Apr 2025 18:05:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXCJwbg7SWODfZ0tm/5KpHbPe9avlRmnq5Og+LpYggUHQE1eKrc8l+piiOKeK4kD4yfpk3Vxw==@linaro.org X-Google-Smtp-Source: AGHT+IEPGoKSWl33x7f+UmW1nzKSOiGAITHSKrZGZnQO2pGl1MS00rmrtkaI+vocUw51Hiv/Zm8Q X-Received: by 2002:ac8:7f0d:0:b0:476:afa6:3218 with SMTP id d75a77b69052e-47ec2673c80mr7801901cf.14.1745456703732; Wed, 23 Apr 2025 18:05:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456703; cv=none; d=google.com; s=arc-20240605; b=YSeeoahgcjFbp0xK7/Zkp0w9QuQlHHjr8XU6nb+HF4Qqae2g+rNA+/OD+3bKp24Skw bBFxTfqFg8hlui1uQBNeK4mtGMe73okf3GGOWaIkni6enuwSU/R9tUKM9chrdtM7vbL9 88xsjpqmNl3CdN8RfdW8tcp6Z8n+QreVB9hoTgHxpo5XzQL4cFn1pUsGRbsTLxXaECm7 LrZLI7BE9vxyfCrxVbPRcpNA1YZUBD5HR3cS2UlAlnAAIQzFdDI4GC6gM2tGHuiQ/3Z/ 9o/t2yALpxDm/nzM5v5ddqT4c05KbhwuyawbzKzS/bszUzUZPedpX99hsB6cHQ7Zth9Q Ap6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mBJ25CW2meY1UvcVJM9MvkFiNWSNHNlPBGliBqgnkKg=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=Z21qXGbrmqS4TNdFA6u+oGzzDRu4U4I6u5Luw/DDygCcU1WPDLaVbZ2rLhGtLDOJxE 7ZGCdW7kCAD2IRl4E58Uays4KDahBKZvb4LgOUgyNQCt/g9egjcuVNwELbVQSzeJOByw IWrUfH29u99DdBHnYz60JJbpcGHNiIit9hIBTBMsDGgOrvIVf7x+9Epr1qF2hNRbwupO 4WlJKU2kKIPgAqIDQjEKVdJdKbB1+H97Crrrz+HHCMJP1h0naF2kysWd1DexeA4h+Hnr +FTxfPQvwaFip9MQaW3rHI9BOKt4Ux4gsGzRHxK9DO4mT4pr9QcZ6hlNQgzWTnf9CkqP hUSw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="A5hG/Ey0"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f2ca248si5417151cf.82.2025.04.23.18.05.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:05:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="A5hG/Ey0"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7knN-0005t5-Fw; Wed, 23 Apr 2025 20:50: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 1u7kms-0005Ki-VO for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:59 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0: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 1u7kmq-0004MP-PG for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:58 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-736dd9c4b40so1419882b3a.0 for ; Wed, 23 Apr 2025 17:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455795; x=1746060595; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mBJ25CW2meY1UvcVJM9MvkFiNWSNHNlPBGliBqgnkKg=; b=A5hG/Ey0nXpC8POnKSt5goCze04ZGpH6UqxuDe5xe5AsZW+OC6KbMeOLddfoiodFNV KooD9J4gb7G0iaHzL+WWMjID5GQegJsXoK+d/3VGanGGt3YnZHkLRKn0iO1qGifTEl5l Sd654RCleBAjtYnCVaH5OWbq5yIOHHOUA02f9l9e9VmZIiNdIJ/Cp24QftxKAingOIh6 0vTVau9hFTa6NjBgobJWssj+zYJOc0au+RqaqjbomxWqzPXY5NzSfbLT8k50DbTh5o6j y6hITT951kp9tzyqJgCrJsKl5AFZ9citntpIXbtFiBgKbr1U5X4cujst5SlG7D52kMCH jEQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455795; x=1746060595; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mBJ25CW2meY1UvcVJM9MvkFiNWSNHNlPBGliBqgnkKg=; b=Aq8BXlRj2wXbedIfShRNftRRor6KqSHljpcrPV9nrhymCs2ZGVVaHxkSLwAN+saDG/ R5FGvhck6NTwVyxCuiE0qyvVN0Dfelw+PbjdZ58dF462+1OLOVVQ9YSQ9xEOk3XeILcl KnpLgKBzhnxEmfga9jyCGhNpYJWcn/9HBou2+zvYCQ8LaZGDlOm5l1ygmt8g8PYw8mis xY70M/UaGfeeMYv/017wmzUtQtnZVNnorlY6+Dbofa1J6Hr4dr9KrzVN6b9mK06GEV0P O14yIpTIZrwq1Yx1c+cuKPPLdVrOh+SsfscGYCK0+C4xQvDNsdKor9XZ4+Xounxnldbd Aofw== X-Gm-Message-State: AOJu0Yzm8pPEuiImGDXtOq5aNk1jmxlhuyIY1eOWYoMT4FQyDc8yRFgY uLxH1teWgcEad16d9iyJr9r8wmL/yoY071B+5rhI8OhK+si8ipAJYVjSeHuzk7JCoDZzpkSNuVJ A X-Gm-Gg: ASbGncuVjnyMWpXPzpUNgofR9esjvqe1mKrdtQyO8T+GeHk63DFQ/7l0QxqDcHxFPQr FGxJZla1tvRHEmeULg0gojpAn1tl44tZ4OEXfTpTD3MnPqhI2cbu4Y5eWkz276ZLVcMmnLE2eNO YyT0Anhz+5JVCUUkFbDkV7fWpUadQtvWNrEDY5X6a56x0G1/eREwSBQVBdpHNwpRo8aft0byEgl +xiYxJFjrsFY7qfdDnaMydHD6bjKzyvDdJs7fhtJOkDNnY3/ogIy71vywafmH6W56D6exPvh4Mk b0QGljetJ5zTc2CqiKHNm7+nIpdMY6iwuL04n8ncNnUvU5XDs1tlBoeQVgCEcuWStXuHH4acg/E = X-Received: by 2002:a05:6a00:3a93:b0:734:26c6:26d3 with SMTP id d2e1a72fcca58-73e267e0e5dmr620407b3a.5.1745455795413; Wed, 23 Apr 2025 17:49:55 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 026/148] include/exec: Inline *_data_ra memory operations Date: Wed, 23 Apr 2025 17:47:31 -0700 Message-ID: <20250424004934.598783-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These need to be per-target for 'abi_ptr'. Expand inline to the *_mmuidx_ra api with a lookup of the target's cpu_mmu_index(). Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 144 +++++++++++++++++++++++++++++------- accel/tcg/ldst_common.c.inc | 108 --------------------------- 2 files changed, 118 insertions(+), 134 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 8e8b9b53f7..2eda652a38 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -85,17 +85,6 @@ int cpu_ldsw_le_data(CPUArchState *env, abi_ptr ptr); uint32_t cpu_ldl_le_data(CPUArchState *env, abi_ptr ptr); uint64_t cpu_ldq_le_data(CPUArchState *env, abi_ptr ptr); -uint32_t cpu_ldub_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -int cpu_ldsb_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint32_t cpu_lduw_be_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -int cpu_ldsw_be_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint32_t cpu_ldl_be_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint64_t cpu_ldq_be_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint32_t cpu_lduw_le_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -int cpu_ldsw_le_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint32_t cpu_ldl_le_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint64_t cpu_ldq_le_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); - void cpu_stb_data(CPUArchState *env, abi_ptr ptr, uint32_t val); void cpu_stw_be_data(CPUArchState *env, abi_ptr ptr, uint32_t val); void cpu_stl_be_data(CPUArchState *env, abi_ptr ptr, uint32_t val); @@ -104,21 +93,6 @@ void cpu_stw_le_data(CPUArchState *env, abi_ptr ptr, uint32_t val); void cpu_stl_le_data(CPUArchState *env, abi_ptr ptr, uint32_t val); void cpu_stq_le_data(CPUArchState *env, abi_ptr ptr, uint64_t val); -void cpu_stb_data_ra(CPUArchState *env, abi_ptr ptr, - uint32_t val, uintptr_t ra); -void cpu_stw_be_data_ra(CPUArchState *env, abi_ptr ptr, - uint32_t val, uintptr_t ra); -void cpu_stl_be_data_ra(CPUArchState *env, abi_ptr ptr, - uint32_t val, uintptr_t ra); -void cpu_stq_be_data_ra(CPUArchState *env, abi_ptr ptr, - uint64_t val, uintptr_t ra); -void cpu_stw_le_data_ra(CPUArchState *env, abi_ptr ptr, - uint32_t val, uintptr_t ra); -void cpu_stl_le_data_ra(CPUArchState *env, abi_ptr ptr, - uint32_t val, uintptr_t ra); -void cpu_stq_le_data_ra(CPUArchState *env, abi_ptr ptr, - uint64_t val, uintptr_t ra); - static inline uint32_t cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, int mmu_idx, uintptr_t ra) { @@ -250,6 +224,124 @@ cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, cpu_stq_mmu(env, addr, val, oi, ra); } +/*--------------------------*/ + +static inline uint32_t +cpu_ldub_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_ldub_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline int +cpu_ldsb_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + return (int8_t)cpu_ldub_data_ra(env, addr, ra); +} + +static inline uint32_t +cpu_lduw_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_lduw_be_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline int +cpu_ldsw_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + return (int16_t)cpu_lduw_be_data_ra(env, addr, ra); +} + +static inline uint32_t +cpu_ldl_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_ldl_be_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline uint64_t +cpu_ldq_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_ldq_be_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline uint32_t +cpu_lduw_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_lduw_le_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline int +cpu_ldsw_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + return (int16_t)cpu_lduw_le_data_ra(env, addr, ra); +} + +static inline uint32_t +cpu_ldl_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_ldl_le_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline uint64_t +cpu_ldq_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_ldq_le_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline void +cpu_stb_data_ra(CPUArchState *env, abi_ptr addr, uint32_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stb_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stw_be_data_ra(CPUArchState *env, abi_ptr addr, uint32_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stw_be_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stl_be_data_ra(CPUArchState *env, abi_ptr addr, uint32_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stl_be_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stq_be_data_ra(CPUArchState *env, abi_ptr addr, uint64_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stq_be_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stw_le_data_ra(CPUArchState *env, abi_ptr addr, uint32_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stw_le_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stl_le_data_ra(CPUArchState *env, abi_ptr addr, uint32_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stl_le_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stq_le_data_ra(CPUArchState *env, abi_ptr addr, uint64_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stq_le_mmuidx_ra(env, addr, val, mmu_index, ra); +} + #if TARGET_BIG_ENDIAN # define cpu_lduw_data cpu_lduw_be_data # define cpu_ldsw_data cpu_ldsw_be_data diff --git a/accel/tcg/ldst_common.c.inc b/accel/tcg/ldst_common.c.inc index 99a56df3fb..2f203290db 100644 --- a/accel/tcg/ldst_common.c.inc +++ b/accel/tcg/ldst_common.c.inc @@ -248,114 +248,6 @@ void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, * Wrappers of the above */ -uint32_t cpu_ldub_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_ldub_mmuidx_ra(env, addr, mmu_index, ra); -} - -int cpu_ldsb_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - return (int8_t)cpu_ldub_data_ra(env, addr, ra); -} - -uint32_t cpu_lduw_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_lduw_be_mmuidx_ra(env, addr, mmu_index, ra); -} - -int cpu_ldsw_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - return (int16_t)cpu_lduw_be_data_ra(env, addr, ra); -} - -uint32_t cpu_ldl_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_ldl_be_mmuidx_ra(env, addr, mmu_index, ra); -} - -uint64_t cpu_ldq_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_ldq_be_mmuidx_ra(env, addr, mmu_index, ra); -} - -uint32_t cpu_lduw_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_lduw_le_mmuidx_ra(env, addr, mmu_index, ra); -} - -int cpu_ldsw_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - return (int16_t)cpu_lduw_le_data_ra(env, addr, ra); -} - -uint32_t cpu_ldl_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_ldl_le_mmuidx_ra(env, addr, mmu_index, ra); -} - -uint64_t cpu_ldq_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_ldq_le_mmuidx_ra(env, addr, mmu_index, ra); -} - -void cpu_stb_data_ra(CPUArchState *env, abi_ptr addr, - uint32_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stb_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stw_be_data_ra(CPUArchState *env, abi_ptr addr, - uint32_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stw_be_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stl_be_data_ra(CPUArchState *env, abi_ptr addr, - uint32_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stl_be_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stq_be_data_ra(CPUArchState *env, abi_ptr addr, - uint64_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stq_be_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stw_le_data_ra(CPUArchState *env, abi_ptr addr, - uint32_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stw_le_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stl_le_data_ra(CPUArchState *env, abi_ptr addr, - uint32_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stl_le_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stq_le_data_ra(CPUArchState *env, abi_ptr addr, - uint64_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stq_le_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -/*--------------------------*/ - uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr addr) { return cpu_ldub_data_ra(env, addr, 0); From patchwork Thu Apr 24 00:47:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883866 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3206182wrs; Wed, 23 Apr 2025 18:17:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX/LOSFrS12M450X/OL6MiT3kZnxFvSScU/oIyEYOIQp5A/D/Pue4nNyWvECoupAY+rx+yV3g==@linaro.org X-Google-Smtp-Source: AGHT+IEe/5Bh/BrtYgvBANbHX+hv/vdWemmMdKygWzcopcesKIxpTeKWNT4TKu9eyDHBhHXsIeHC X-Received: by 2002:a05:6214:2349:b0:6ed:12b0:f182 with SMTP id 6a1803df08f44-6f4bfbe5ae3mr14036556d6.11.1745457450211; Wed, 23 Apr 2025 18:17:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457450; cv=none; d=google.com; s=arc-20240605; b=LX00S/1duspWmdEe7O1fQNw3FmCCq7aqf84xKqYi+o/XyIkGNbtI3ZSt3tHNRLPhB4 fNXgdJUCmURaQ684aALJ2IMY0xlznU7CB7XxvoLDHh50pqFrK1q6VZA96vqDhPyckhTN LkyHfGeaPrKjyjMyx7eyxDlJfSlgTTlpZR9fpOj20oryP7p2xY4HFG/rGB66n/WR9OyO RQCdp3jVfHZ4AMbJeCukaD36I08h2RPyetT9J0bLY8UVMv8culYl0y3OaK1Qal+bA5N4 KZPZkQ918NqfnqmswwjBL/5jp2DnuyrIN7U8J/agJm2A9FL4Zs110HTRBiYrXSMyhyDW pnrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kj/uYgShChkHdccTvFGCpCr1FhgqEsUyeN3aymTPxRo=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=e4vIQ2eYd+LNgtwHXO4UREZSTxUrlDetlPsXiNvwY6Wr+M1LTr+7QZkN1dXfykYfYn cb/mksVdnpQzMPFb0wUu/VeiRMWk5q92fhSVjvsnbCxSjURuaNK+PvahfXL/0FheIZAm XUXuVhf8gtUwaK4CrgWqYYfdcskAFX7F5ouR5BgqxcCBoy2YevTEbhf626zavs5UakiI 4940sYfZowq5OUNJ8WGAu5BoniBbk7n5+0fdB4qhRojrZtDMk2QwaeHFv2WFf963cRJZ huju/6bDvUrxiLnqaLBmFRgSoqp86WqdbKUWAlatgSgv5Bl1W+XKRx0m4yGfp/0on5fJ E86Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="s23/HOvV"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0aceef2si3640996d6.190.2025.04.23.18.17.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:17:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="s23/HOvV"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kpa-0000Tz-9L; Wed, 23 Apr 2025 20: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 1u7kmt-0005LV-Kv for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:59 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmr-0004Ma-Fo for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:59 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-73972a54919so354074b3a.3 for ; Wed, 23 Apr 2025 17:49:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455796; x=1746060596; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kj/uYgShChkHdccTvFGCpCr1FhgqEsUyeN3aymTPxRo=; b=s23/HOvVu1NX1cpSQ+4s+xkGYBYtkEp4mwTcN1NpiitBEqdz7WeL/R2fnSz2ZH/U1O XtBzNRrU/sxRyT1vKL1X9C3HCxa8yKJ2X6lD4NRQIYnj0pDbu1VKGUSdw6x4khh5i5ou /y1IsftWlIspPhIX9xMIPFfozALDP8VHE0GgjKk2mCKKZJ2nsRMDpw1cOq/0wkEazeLc WALCDj2sfCwX4+xfOZJ1reLb7KiSqemWgqabRL1eyvHAxr8xKyjuDj3U8hAXjWwCgWTL 1E7laWutlmQR7kFsKeY5XRnUN/T2u6MJFhNjBDQK0yzx8xjCLHtg1xI0EWdUc3HQfrME mTmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455796; x=1746060596; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kj/uYgShChkHdccTvFGCpCr1FhgqEsUyeN3aymTPxRo=; b=TMmq8Cbc4oVNXYMTtrGpAl7joU+yMCaCGFKa380oVZ08p9ro3xuChWXZ9vx+1ZId+p x+t65lQxchHIK7ev5Hi/HfKFutRTwRNbiQ9OiL12pIkE0v+2uGqaVbPjU0JF2K3MGlEr vMTxQo5LSTetlpL8yfB3U/QMPAyrrggh7F6Uabetk1ukHGFTUi+f5BHBP2LE1pEV8f+l KMF5tKHoUXnFonkUWrxsPh9eySVzIXh4l1PrOnJP6z1rHESmD3NjNYV8Ve3cGwJVo8BN xQ+2gNRGiTnexwCn6LSTDOdcVJEwX8XeaxsxTxZiFEmaHlx606B1aYhBY81PjnKZlcpY YCQg== X-Gm-Message-State: AOJu0YynswxBLpoHcR1lxw7TNQd69eAyhgf/gUbktrBrkZWZxLkvFE/g ZzNPJaCHDSVrCN155t57aRIT0rFkud6jYTHXIlhA7zpd0LOiVc3RuCcGH6ge4cG2iVEAYEm29q3 7 X-Gm-Gg: ASbGncu0z0g+8E6X56ykfCloE8w1ALBGLCyUw03OlZBdBsEiKCUkJRQKFQ2ltfiEIEJ s8EutdAE38aGypvAa3UlhCHVUTIZL5E7+3lE3sJbkCfWnwdM3gDL6VWSrZITz0IngWPPbpxHFIf jGGIdIyqX8EMK6NxbwO2GBWuT5ePyqf4oW3p/NCyy15EQy+0P+uAAl60e1DryDmIBgq4Bn1Kxgi N6JRYFw2LQybgheOnnPMXgxAB+v+Kz0LOJNVMLnqbjprLiR6Qz4WYmabnokvr2p2JxQkN3Yqu+E MAJBDEaDaLRoznYIhXlGwIFROInfu8SdxDWbMtIPY5tmoAi1c7DOPWBZLlq4Bojl4s+OAKfQ7gg = X-Received: by 2002:a05:6a00:8f0c:b0:730:75b1:7219 with SMTP id d2e1a72fcca58-73e2465c0e9mr1108469b3a.12.1745455796093; Wed, 23 Apr 2025 17:49:56 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 027/148] include/exec: Inline *_data memory operations Date: Wed, 23 Apr 2025 17:47:32 -0700 Message-ID: <20250424004934.598783-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These need to be per-target for 'abi_ptr'. Expand inline to the *_data_ra api with ra == 0. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 123 ++++++++++++++++++++++++++++++------ accel/tcg/ldst_common.c.inc | 89 -------------------------- 2 files changed, 104 insertions(+), 108 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 2eda652a38..0054508eda 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -74,25 +74,6 @@ #include "user/guest-host.h" #endif /* CONFIG_USER_ONLY */ -uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr ptr); -int cpu_ldsb_data(CPUArchState *env, abi_ptr ptr); -uint32_t cpu_lduw_be_data(CPUArchState *env, abi_ptr ptr); -int cpu_ldsw_be_data(CPUArchState *env, abi_ptr ptr); -uint32_t cpu_ldl_be_data(CPUArchState *env, abi_ptr ptr); -uint64_t cpu_ldq_be_data(CPUArchState *env, abi_ptr ptr); -uint32_t cpu_lduw_le_data(CPUArchState *env, abi_ptr ptr); -int cpu_ldsw_le_data(CPUArchState *env, abi_ptr ptr); -uint32_t cpu_ldl_le_data(CPUArchState *env, abi_ptr ptr); -uint64_t cpu_ldq_le_data(CPUArchState *env, abi_ptr ptr); - -void cpu_stb_data(CPUArchState *env, abi_ptr ptr, uint32_t val); -void cpu_stw_be_data(CPUArchState *env, abi_ptr ptr, uint32_t val); -void cpu_stl_be_data(CPUArchState *env, abi_ptr ptr, uint32_t val); -void cpu_stq_be_data(CPUArchState *env, abi_ptr ptr, uint64_t val); -void cpu_stw_le_data(CPUArchState *env, abi_ptr ptr, uint32_t val); -void cpu_stl_le_data(CPUArchState *env, abi_ptr ptr, uint32_t val); -void cpu_stq_le_data(CPUArchState *env, abi_ptr ptr, uint64_t val); - static inline uint32_t cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, int mmu_idx, uintptr_t ra) { @@ -342,6 +323,110 @@ cpu_stq_le_data_ra(CPUArchState *env, abi_ptr addr, uint64_t val, uintptr_t ra) cpu_stq_le_mmuidx_ra(env, addr, val, mmu_index, ra); } +/*--------------------------*/ + +static inline uint32_t +cpu_ldub_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_ldub_data_ra(env, addr, 0); +} + +static inline int +cpu_ldsb_data(CPUArchState *env, abi_ptr addr) +{ + return (int8_t)cpu_ldub_data(env, addr); +} + +static inline uint32_t +cpu_lduw_be_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_lduw_be_data_ra(env, addr, 0); +} + +static inline int +cpu_ldsw_be_data(CPUArchState *env, abi_ptr addr) +{ + return (int16_t)cpu_lduw_be_data(env, addr); +} + +static inline uint32_t +cpu_ldl_be_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_ldl_be_data_ra(env, addr, 0); +} + +static inline uint64_t +cpu_ldq_be_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_ldq_be_data_ra(env, addr, 0); +} + +static inline uint32_t +cpu_lduw_le_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_lduw_le_data_ra(env, addr, 0); +} + +static inline int +cpu_ldsw_le_data(CPUArchState *env, abi_ptr addr) +{ + return (int16_t)cpu_lduw_le_data(env, addr); +} + +static inline uint32_t +cpu_ldl_le_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_ldl_le_data_ra(env, addr, 0); +} + +static inline uint64_t +cpu_ldq_le_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_ldq_le_data_ra(env, addr, 0); +} + +static inline void +cpu_stb_data(CPUArchState *env, abi_ptr addr, uint32_t val) +{ + cpu_stb_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stw_be_data(CPUArchState *env, abi_ptr addr, uint32_t val) +{ + cpu_stw_be_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stl_be_data(CPUArchState *env, abi_ptr addr, uint32_t val) +{ + cpu_stl_be_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stq_be_data(CPUArchState *env, abi_ptr addr, uint64_t val) +{ + cpu_stq_be_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stw_le_data(CPUArchState *env, abi_ptr addr, uint32_t val) +{ + cpu_stw_le_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stl_le_data(CPUArchState *env, abi_ptr addr, uint32_t val) +{ + cpu_stl_le_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stq_le_data(CPUArchState *env, abi_ptr addr, uint64_t val) +{ + cpu_stq_le_data_ra(env, addr, val, 0); +} + #if TARGET_BIG_ENDIAN # define cpu_lduw_data cpu_lduw_be_data # define cpu_ldsw_data cpu_ldsw_be_data diff --git a/accel/tcg/ldst_common.c.inc b/accel/tcg/ldst_common.c.inc index 2f203290db..9791a4e9ef 100644 --- a/accel/tcg/ldst_common.c.inc +++ b/accel/tcg/ldst_common.c.inc @@ -243,92 +243,3 @@ void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, do_st16_mmu(env_cpu(env), addr, val, oi, retaddr); plugin_store_cb(env, addr, int128_getlo(val), int128_gethi(val), oi); } - -/* - * Wrappers of the above - */ - -uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_ldub_data_ra(env, addr, 0); -} - -int cpu_ldsb_data(CPUArchState *env, abi_ptr addr) -{ - return (int8_t)cpu_ldub_data(env, addr); -} - -uint32_t cpu_lduw_be_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_lduw_be_data_ra(env, addr, 0); -} - -int cpu_ldsw_be_data(CPUArchState *env, abi_ptr addr) -{ - return (int16_t)cpu_lduw_be_data(env, addr); -} - -uint32_t cpu_ldl_be_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_ldl_be_data_ra(env, addr, 0); -} - -uint64_t cpu_ldq_be_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_ldq_be_data_ra(env, addr, 0); -} - -uint32_t cpu_lduw_le_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_lduw_le_data_ra(env, addr, 0); -} - -int cpu_ldsw_le_data(CPUArchState *env, abi_ptr addr) -{ - return (int16_t)cpu_lduw_le_data(env, addr); -} - -uint32_t cpu_ldl_le_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_ldl_le_data_ra(env, addr, 0); -} - -uint64_t cpu_ldq_le_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_ldq_le_data_ra(env, addr, 0); -} - -void cpu_stb_data(CPUArchState *env, abi_ptr addr, uint32_t val) -{ - cpu_stb_data_ra(env, addr, val, 0); -} - -void cpu_stw_be_data(CPUArchState *env, abi_ptr addr, uint32_t val) -{ - cpu_stw_be_data_ra(env, addr, val, 0); -} - -void cpu_stl_be_data(CPUArchState *env, abi_ptr addr, uint32_t val) -{ - cpu_stl_be_data_ra(env, addr, val, 0); -} - -void cpu_stq_be_data(CPUArchState *env, abi_ptr addr, uint64_t val) -{ - cpu_stq_be_data_ra(env, addr, val, 0); -} - -void cpu_stw_le_data(CPUArchState *env, abi_ptr addr, uint32_t val) -{ - cpu_stw_le_data_ra(env, addr, val, 0); -} - -void cpu_stl_le_data(CPUArchState *env, abi_ptr addr, uint32_t val) -{ - cpu_stl_le_data_ra(env, addr, val, 0); -} - -void cpu_stq_le_data(CPUArchState *env, abi_ptr addr, uint64_t val) -{ - cpu_stq_le_data_ra(env, addr, val, 0); -} From patchwork Thu Apr 24 00:47:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883772 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198018wrs; Wed, 23 Apr 2025 17:51:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV3Vxr5QZ1rrZspfbkSMtmTMaWRK3E/WKYrW80Y1TWZ5LNMjglng3Xm8VeyOa5moP67ZibKHw==@linaro.org X-Google-Smtp-Source: AGHT+IGzI5LcTcqOOeAJiDA77QV/2ZpwDnwzUsWD6H6s90f03pxTUw+1RQN5Hq6iqltzaqMztJZS X-Received: by 2002:a05:620a:40cc:b0:7c5:658a:e584 with SMTP id af79cd13be357-7c956f5fff3mr141313085a.53.1745455891962; Wed, 23 Apr 2025 17:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745455891; cv=none; d=google.com; s=arc-20240605; b=IBJGx6yitvep72CT61qRMWHRMRd0VBkelR5kv0kGyTuwng6FWadjy/THKx73DT6QL+ t7nYlsWjYsSWb4Q2aGE72CjkeH7Lq9iXvYkTj1ygRyyvPVV1HaO+CyUA5FivYG+oVytp ULLj47JUqof7MKRNXa5EbKe0yGuDZ0DF146RuNISsOenEx82g7UvmKPMnkdoHV3FFV5h LYdJt/Pr5qDVOegIsxFYJO0V/OF5sv7kInrZGSUTsxXady9yWYfVyKR2EvJS9npFAQyk 4M+UeD2droOEZSzH7cZX0MUn/DlKGAgOoujBEoXzH6HDoZUDUFsuP6N5pLZbVe7dz6mT xWxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+VfuDyBOkc/7EHQm2vvPTUefKvEeqjpVe/tI2ANIcRc=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=GfSIbWucsJ00Zgtgl3wDEdEkRKP9RB+q0k7MUhWw5d2qMdWeGx+M7YCwPTOWgDnM13 nF4zJ81Iqpdznq6hE5f17XQoXjny+RgR1yQoqIa0R0N7WSLzRQ6LicA3E0E2NPfsc7wJ pqrISNBwCCbxcZggst2Gk1d8uDYdPcqnkw6btMNwDFwYuJT3quC9P9b0Iz5yME2UEuli 32ZPH1jxE2sWm0U3Dsw4zwBVr9eS+JOeEvRWoKuTRj+DR4sRfBzmljVuz6F2Sbj5HmWr 05iYDCji1LZSwfAACLE5g4VicF268yx/wBslNxaChy0vvlyecPHH/gUfucI2/qPM5Fml vHkw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="N/2zq7aV"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9fa99f48si5015871cf.194.2025.04.23.17.51.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:51:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="N/2zq7aV"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7knn-0006ET-RB; Wed, 23 Apr 2025 20:50:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7kmu-0005Or-Br for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:04 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0: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 1u7kms-0004Ml-C1 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:49:59 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-73bf1cef6ceso385227b3a.0 for ; Wed, 23 Apr 2025 17:49:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455797; x=1746060597; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+VfuDyBOkc/7EHQm2vvPTUefKvEeqjpVe/tI2ANIcRc=; b=N/2zq7aV8tIAFvxXd5X9WwtO+3Nyz4Omu1kDQ/GGcv36AN/TSuP9Zj7jnlSYA6C2d3 2NXI2LgmW0zqYBkqwCb81u4zGiUKLr+ic9YXzA0WHXAYs5IAMQJzyL/pQauTk27vaVUR bpxbDpnt/mhJ4zOOLzzGvLIwmWfHIvwqMUygwSL3siEWQ7vSM7dN7Nz+Pr7SoqXlXoH2 GrAHG0MLe44UKorWd1xxYC6nmraAcqNd2XdEmgGSqlUSHcqbKuXpbitv0GwSAEqr+ogS 7eH/E/1G7sbYU2l2zKZ9ACXc5XtHQjpIETElTm11gas7NyrLA4v3te0KGKlvHucLvGBB Krhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455797; x=1746060597; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+VfuDyBOkc/7EHQm2vvPTUefKvEeqjpVe/tI2ANIcRc=; b=oFo5RqUqNhlx5bVFMIJTq/EJwLttqAXvYStIZetaSi3bgpvoTs5u/sC7EkFCLUigH1 4AMWln4YmphhjzjZwPEqzk+exkn/h7JE7Q9NSErZpSKnlJaeH5/9nY9Knsef2Iuy38AR l4SEj8VC6jPHdJghBvTdB6AaaiYEAFFHmI9HBEG2lbmETL6oMQrdrCc295dUNx6TzPIs MjEXpdVaDGZ9qq6v1kYdU9sVZJPUXwl0697nx85SK9Yabdql3etkLb7sa7zBEvQNJNJ9 zeRWur0+vLFpxzCV8ba1QDYLZFxJ9KYMmdjLd5voxDz9w4/7GJDtRTNUpB+Makc7XFTH HN8Q== X-Gm-Message-State: AOJu0YzWVwswM8BVJhlSeev9TKxPxdQXRDARU2yV4RvJHLI+mDvCQBMR 86PBEpc9tINOYNNZ33HGLX1apzFV6VxGQYlpyafO5zuQ+cpGQhCfZHR2pgxR2txn+OHQdDCzDT7 z X-Gm-Gg: ASbGncty/iHYrWS8RGq3qcTBcdoXlO+B74AcLpsd4anVnxCtU1QYyc4yNlQma+7F0n8 8Il5yh7OjVOyfozWVPZCV4HpWt4IvE6Yxv+flSMlJNNA4bYK5vTO89P8LCHMhHVpkuq0zy8U9DU gTWVfeq81aF4TcdtaeUpdWB/qbR/uRbISXf+3b4rs9S+kClcseWICtacqG4H9qOzf6r/zb5mWor GoUJgp4JZyNLEwPV3Ipd0ho/54fDouFe59cy3D2oZ+87mkwSdBg58jD2SPrzEE0/UMziqU1fsjU 1ywIKZFYeVjeYFxLg+mAmtjvrfNEHkIZ9/lQG4n07XdO8y0zsB+6QtaN24vW9qWPAcy8EJlJpTg = X-Received: by 2002:a05:6a20:394d:b0:1f5:8f65:a6f5 with SMTP id adf61e73a8af0-20444f22e85mr860203637.30.1745455796800; Wed, 23 Apr 2025 17:49:56 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 028/148] include/exec: Inline *_code memory operations Date: Wed, 23 Apr 2025 17:47:33 -0700 Message-ID: <20250424004934.598783-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These need to be per-target for 'abi_ptr' and endianness. These expand inline to the *_mmu api with a lookup of the target's cpu_mmu_index() and ra == 0. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 31 +++++++++++++++++++++++++++---- accel/tcg/cputlb.c | 28 ---------------------------- accel/tcg/user-exec.c | 40 ---------------------------------------- 3 files changed, 27 insertions(+), 72 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 0054508eda..77dc5ac61c 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -473,10 +473,33 @@ cpu_stq_le_data(CPUArchState *env, abi_ptr addr, uint64_t val) # define cpu_stq_mmuidx_ra cpu_stq_le_mmuidx_ra #endif -uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr); -uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr); -uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr); -uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr); +static inline uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr) +{ + CPUState *cs = env_cpu(env); + MemOpIdx oi = make_memop_idx(MO_UB, cpu_mmu_index(cs, true)); + return cpu_ldb_code_mmu(env, addr, oi, 0); +} + +static inline uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr) +{ + CPUState *cs = env_cpu(env); + MemOpIdx oi = make_memop_idx(MO_TEUW, cpu_mmu_index(cs, true)); + return cpu_ldw_code_mmu(env, addr, oi, 0); +} + +static inline uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr) +{ + CPUState *cs = env_cpu(env); + MemOpIdx oi = make_memop_idx(MO_TEUL, cpu_mmu_index(cs, true)); + return cpu_ldl_code_mmu(env, addr, oi, 0); +} + +static inline uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr) +{ + CPUState *cs = env_cpu(env); + MemOpIdx oi = make_memop_idx(MO_TEUQ, cpu_mmu_index(cs, true)); + return cpu_ldq_code_mmu(env, addr, oi, 0); +} /** * tlb_vaddr_to_host: diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index b03998f926..2817c9dbdd 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -2897,34 +2897,6 @@ static void do_st16_mmu(CPUState *cpu, vaddr addr, Int128 val, /* Code access functions. */ -uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr) -{ - CPUState *cs = env_cpu(env); - MemOpIdx oi = make_memop_idx(MO_UB, cpu_mmu_index(cs, true)); - return do_ld1_mmu(cs, addr, oi, 0, MMU_INST_FETCH); -} - -uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr) -{ - CPUState *cs = env_cpu(env); - MemOpIdx oi = make_memop_idx(MO_TEUW, cpu_mmu_index(cs, true)); - return do_ld2_mmu(cs, addr, oi, 0, MMU_INST_FETCH); -} - -uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr) -{ - CPUState *cs = env_cpu(env); - MemOpIdx oi = make_memop_idx(MO_TEUL, cpu_mmu_index(cs, true)); - return do_ld4_mmu(cs, addr, oi, 0, MMU_INST_FETCH); -} - -uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr) -{ - CPUState *cs = env_cpu(env); - MemOpIdx oi = make_memop_idx(MO_TEUQ, cpu_mmu_index(cs, true)); - return do_ld8_mmu(cs, addr, oi, 0, MMU_INST_FETCH); -} - uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t retaddr) { diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index dec17435c5..ebc7c3ecf5 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -1214,46 +1214,6 @@ static void do_st16_mmu(CPUState *cpu, vaddr addr, Int128 val, clear_helper_retaddr(); } -uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr ptr) -{ - uint32_t ret; - - set_helper_retaddr(1); - ret = ldub_p(g2h_untagged(ptr)); - clear_helper_retaddr(); - return ret; -} - -uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr ptr) -{ - uint32_t ret; - - set_helper_retaddr(1); - ret = lduw_p(g2h_untagged(ptr)); - clear_helper_retaddr(); - return ret; -} - -uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr ptr) -{ - uint32_t ret; - - set_helper_retaddr(1); - ret = ldl_p(g2h_untagged(ptr)); - clear_helper_retaddr(); - return ret; -} - -uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr ptr) -{ - uint64_t ret; - - set_helper_retaddr(1); - ret = ldq_p(g2h_untagged(ptr)); - clear_helper_retaddr(); - return ret; -} - uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { From patchwork Thu Apr 24 00:47:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883812 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3200159wrs; Wed, 23 Apr 2025 18:00:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUXgFfd0oBl7hSamqzdhZYKqRCbblzP76TWPihTaILCszREc9wPJpvFOMNo03jCvZ5rGwbbmA==@linaro.org X-Google-Smtp-Source: AGHT+IGNxMU4iOEPUpERjNqSSzk2feyAPdPZl/0qPdbBjpn4FuQp0zT+w5Tvx3rfc8in2N/m18NU X-Received: by 2002:a05:622a:1341:b0:476:add4:d2cf with SMTP id d75a77b69052e-47eb29ab321mr9813511cf.16.1745456421405; Wed, 23 Apr 2025 18:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456421; cv=none; d=google.com; s=arc-20240605; b=HNuu0glge5aFBTMgUA17W77pV/s+xs0mFelFsgzcV4s9axSLgaa5W+bZIQRgvl54/C Kadi+RMh1iLtisOaA5rv0zuE239SnMGOK7mzNVHdeyiEskftNqJPDVe+//exGE+XF4ap MMIFZ9nnRMF2yYzeHsOCfYy//E75pi8hS/uhSUvXn9x/kj2yyGERtX3iMoWYX7Di1TNN xZIVwe8DXS/D0Q1hQuT3mb1nXk7ZTe4SzyINJLgdC7Nyq259oGraNw+IjwaItAXNG7JZ YU6AUfR6clLemp1AhSVZsiqbjqCk5htYFnkwQxV1tDAIaFrT6YZJNU+4m8vgRX23+Pe6 zsPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oR/Buc0tAK+dwpT4/jUuGVtANFEG+DcYq0rCH3hrxCg=; fh=NRbVEM4N+WnQUFmJW8uGobWq0XkOiK4QdifPqAAMoww=; b=ICO4H4kSecmmqFSjcgPSHdEIGIePwAhdxaF4y5oQWRhOAIzGf9meG1T0HXBr8JyV/y 4NxRij3jUtF5TVq6WxJParXntePuOiBblyaA6Qsjrp66uKJltvFOFlQ94l9hXcXhhnAy nQZh3nltT9aimgQOIv1rUiYp3s2YRsmJw+8H7q/BS2eV08r1OxTYPyNNqxI8xHWwOIci rN3NbgEnenxkIgHwhNK90IHotx8wvXLVe7Wx7p38re1DTBrwDK2vGnIyfntmJJ2qfCp0 ftn8L6U7AbXTWcw6l+nmS4qQlEP9qO65MwGH/CQB9TuELG/phgi/mmlBeJ0Gbtno92PA Qwig==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=soCXyifF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea25ae634si4821661cf.532.2025.04.23.18.00.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:00:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=soCXyifF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7knj-00065q-6h; Wed, 23 Apr 2025 20:50:51 -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 1u7kmy-0005TN-LI for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:04 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmt-0004N6-J6 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:01 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7394945d37eso329273b3a.3 for ; Wed, 23 Apr 2025 17:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455798; x=1746060598; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oR/Buc0tAK+dwpT4/jUuGVtANFEG+DcYq0rCH3hrxCg=; b=soCXyifFB+c+muVUxgWTp/MzChF5JEh2+cItVgci4Zb7cj9QaqQrFE7oZrG6fqTWDe mQmG2WddzAGjU6KUmgrAkH3ZwixmIZi16p9GBCs4c7LJbzarJM1xb6ZSYPC1BXWCCW4O 3UQh43cMPGYatSZKPxmVY8ZI9aB1cp1S1zpifkQmGVnGjwI9Wxhw+RlAJKb1i3eISZps x1mjl5SD+0dP1IQqHrLETTb8150dmhKORbDgt8IlXnVz+gQXFp9oBeSoULPqpZ69wMow 73SAwbP+9A5NOUDnD9bQbcH4ojyCvMS2ed8MKWT8Y/uJ4S9YHxY+USWod7gnXHG610tL OU1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455798; x=1746060598; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oR/Buc0tAK+dwpT4/jUuGVtANFEG+DcYq0rCH3hrxCg=; b=HuSQFDDoxmMj8kUvpt9sM3+V+SlLR0PYzxKIZeCE3yikhgSZps5/VRFp9Zlk0N8hHe 6zbQm4mr9j+8uZbUCwP8ivIP3bWIlBsPqmKucqb8/z3fg7Zuxe3NolMyirLY1KFct2YU 9WDXbBD2Ps0pxXVqsdHCkiLUPgIy654uJ325588P9mk6MGfPN9QbvB9LMHB0NiIdoRPu 7eO5i7ajaBaYUcWJn0h4K8kIyWG6WLUvEHTmQMVa/dP6VJvNW6pdYZvhqTpbeHgZff5s yl7qSa/ZHGIrPHnDsxTab7tKswAFupIKPhU120lbEseIaCjd7yEdVcgGyKSv4wKZIQZx dkVg== X-Gm-Message-State: AOJu0YwptVBc56HPTWKm/qGqIZES0TfaQ+u/jPlk9VhCdGHoHuXrAo9a /oyUplGgoNTJnM5MePQsNUCZLFNNQDlPWfroI6ND5siHFcikVOeldQY0u2vpjNaT/r3z/KZ2668 w X-Gm-Gg: ASbGncvhbVyOGAJHDrhio0mBYUnyaBuhOn41EMxHBnkReURd+3PopBAZ6x+lWlpwDvv ghKEFUenh0gDDdFyXD0jjTfJ5IyWS/vG223TGMJTUDOl6ZRbIlOv1eF2csG3ou1thtUYxPRzstz pDzbhSDX8ufA5MIoSmdVP4RU8sdOTeQA39tIIxyOpmZEFgkfo6PebZwaUh/jtRY0b8zcN3a83MS yZ2kKSeuDnkQrCyRdgF3BP8VX0g9OBPQcAM3Ilm5z0CsY55qZmbKCihUh7OyCg3z8Kpqx6dITLn NvNMtS8S282MYsBDI7Q28lSgNb+OiOAozgaoo9VjAF3MyRgA0H++DW0rM6tACQij11tgj4G0AcM = X-Received: by 2002:a05:6a21:3284:b0:201:8a13:f224 with SMTP id adf61e73a8af0-20444ebef3amr857163637.22.1745455797428; Wed, 23 Apr 2025 17:49:57 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Alistair Francis , Pierrick Bouvier Subject: [PULL 029/148] accel/tcg: Perform aligned atomic reads in translator_ld Date: Wed, 23 Apr 2025 17:47:34 -0700 Message-ID: <20250424004934.598783-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Perform aligned atomic reads in translator_ld, if possible. According to https://lore.kernel.org/qemu-devel/20240607101403.1109-1-jim.shu@sifive.com/ this is required for RISC-V Ziccif. Reviewed-by: Alistair Francis Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/translator.c | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index ef1538b4fc..157be33bf6 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -265,12 +265,14 @@ static bool translator_ld(CPUArchState *env, DisasContextBase *db, if (likely(((base ^ last) & TARGET_PAGE_MASK) == 0)) { /* Entire read is from the first page. */ - memcpy(dest, host + (pc - base), len); - return true; + goto do_read; } if (unlikely(((base ^ pc) & TARGET_PAGE_MASK) == 0)) { - /* Read begins on the first page and extends to the second. */ + /* + * Read begins on the first page and extends to the second. + * The unaligned read is never atomic. + */ size_t len0 = -(pc | TARGET_PAGE_MASK); memcpy(dest, host + (pc - base), len0); pc += len0; @@ -329,7 +331,39 @@ static bool translator_ld(CPUArchState *env, DisasContextBase *db, host = db->host_addr[1]; } - memcpy(dest, host + (pc - base), len); + do_read: + /* + * Assume aligned reads should be atomic, if possible. + * We're not in a position to jump out with EXCP_ATOMIC. + */ + host += pc - base; + switch (len) { + case 2: + if (QEMU_IS_ALIGNED(pc, 2)) { + uint16_t t = qatomic_read((uint16_t *)host); + stw_he_p(dest, t); + return true; + } + break; + case 4: + if (QEMU_IS_ALIGNED(pc, 4)) { + uint32_t t = qatomic_read((uint32_t *)host); + stl_he_p(dest, t); + return true; + } + break; +#ifdef CONFIG_ATOMIC64 + case 8: + if (QEMU_IS_ALIGNED(pc, 8)) { + uint64_t t = qatomic_read__nocheck((uint64_t *)host); + stq_he_p(dest, t); + return true; + } + break; +#endif + } + /* Unaligned or partial read from the second page is not atomic. */ + memcpy(dest, host, len); return true; } From patchwork Thu Apr 24 00:47:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883771 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3197974wrs; Wed, 23 Apr 2025 17:51:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWA9LqG2sPb4QeaDBGAy74bYy72TGuOCYTc5RMSbYliP4ydhAr4iUtfbNKINcH4tUJ8XNyfBA==@linaro.org X-Google-Smtp-Source: AGHT+IEUlR7hhW7SzHgzuPaBJ1j13H3qW+kKlJvpTG91AipoazJThJOPqHFF4AWOqerelrr1enUX X-Received: by 2002:ac8:5996:0:b0:477:1e92:f610 with SMTP id d75a77b69052e-47eb4fbb51bmr9872471cf.34.1745455878186; Wed, 23 Apr 2025 17:51:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745455878; cv=none; d=google.com; s=arc-20240605; b=i38At6XysvsgV4tDxe71lt/yTf56r3cT1Fil8MDu98pc6yhK9RgdWuhHE50Y3rs48y Sgh+HYAB4aneG2Aaz5SqwWKeM1p5XT1mmUKtReGBTDdClpBjR34SpxEhdVV4NktP80j5 e22MT0Cf8z09G9DbaFI85HF0xwQdopO4l0noaDVVtvb75xF93VsH/Z3rtX4Iox8tUIUS /QjzLhMn/qzdcy44poNUN5gUc182JcYefcZb9O4UOj25tJEZa0IOD/8tVkk866gVzYQ7 fMCW/cPmt/bQP88OnN9aehbjKYAWSXgzfDafmLoQE353LUogkCxi8m+lfjd01gtj4OFv Uh1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wBYxT4EZlPkn7bKzklLjARHvSiI+QmQyMRdt3yUNx28=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=Nye1j4SdrmGAWAYeKhr761R2C/MgiW2kCn0A59IrJKDnOWZckO9NzkBjJNDhzH4TqO yVdTiM6Vqr4+wgnZBXW1chxhFGz65Bv9nCUQRNxYT9qSqP77dhbBnE2pHrUCgeQtzqho GuUICLjwSYndtTDCwn85+NHWAcFtyG1YloCRbht4iICuE8fdFu0g25Ch3CXFkaier5KL sIckCrz9VZa6jbDEb++CEbZJLwEmCsB0YBe8joRoGy0h3oLk+eWRZxl4RhoAzZd/rJId 5uVYDE4ks6X+4BJ6KluL/5Pn2H5uAEFmglRoiiOvsj19pXtARkGuPQJXVlb7lZFipshl 9pbA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mK7UHdER; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea2ba9491si4769791cf.633.2025.04.23.17.51.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:51:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mK7UHdER; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7knI-0005ns-67; Wed, 23 Apr 2025 20:50: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 1u7kmy-0005TO-LS for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:04 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0: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 1u7kmt-0004N3-Bt for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:00 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-7376dd56f8fso498650b3a.2 for ; Wed, 23 Apr 2025 17:49:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455798; x=1746060598; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wBYxT4EZlPkn7bKzklLjARHvSiI+QmQyMRdt3yUNx28=; b=mK7UHdER1Nil2Ri6hXyOTtC2BkYPUjxFSD/qmzoqhO+hY1upAahWOSoLY9KN5zX2fV GYcnFJhozZeT3pr3Myy0vzXAwRyYwm/rMT4C0Jgt5ZUWk2Q8mzDr2hMRPDQf2LIIcsYB pxBdLIq7fXunL3+n1Yb0ZbeY2/nTMKNBSOcWkoIvVuW0VtTQt3JNChodMGqguliFksrm gTd9I0b4nchBc0msiNgBveuy1gXko5otikndbg4tDDO6xHCcfV7YqbTCchDNNwPzxaNr SCIWVOgzd1jhacq7otxiiirtUvlqHMYhW1PXSUkqux8Ui9waNxv+AcGeYOPNRG55kcC0 iCHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455798; x=1746060598; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wBYxT4EZlPkn7bKzklLjARHvSiI+QmQyMRdt3yUNx28=; b=f5OCPLt/4YgEWseZEMB7KcwrJga9MVeR+iysCtewR2z3oT309xLAu7gRKK6UfUAE8G XyvKVPE08UzZxesydfe7Iehyyx/87R6iUsFf0BfZ57jTyZ7UUoD5B2XUzLf1eZ3aUmFy FmxALCOfqP35vD+BICCNSEKG8EUp4vge5bpVK0a01exA+zW3jhPaZrWCDHRQOe2OhlAh TAnpJ1l4IJMmBxjVnBKfpHxy9vtvAGIdOuD2C/n4YsIFbNH/r6mOoWA1HP6TIA4Pvuw4 l3ndRl1LjQpcVVpbm6eFnj59DKK8ulN4AF+YelFMeyKJhynr2zypDuvp/dQD9bdq1chX J22Q== X-Gm-Message-State: AOJu0YwQAQUQHsgU7/Ljxmp4Y5/YprMvUWCQPECaf6sIftJV5SjYZYs/ x9AA0+2szwpEUFV4us7GIVsAMsW3MEk22Vdg6EaG/oCSWokYSlLbtBMKfUMOteMbI8RRKLlYWM7 + X-Gm-Gg: ASbGnct6Rgc83JnODvR5ggPWBzC5f/GU2JEw/noTGUuXHGRhWnQIUGODv7/CAgnSj52 W0FL3LAJ04FXgp8PGaBASV4Lkaqk1WwWM2aVyb4QjkjkYpiRjdiSVlmi6IQZg3r94+MuMvg7b6l OzSFG9a6/wA25Cl/9NTozaZd5R3m74YAoMSTnjWmxHLeDxCsHzLX9USkswCWKeeRVLvLJsYGuSd luhBoVC0XSk/deb38ADPNsSQgTnxUbAiDI+U3pMegTlkBPZmHgUtH6Twcj17VRvLwqcoP8HOzOr KIq7Ztc/zd2PDiWy3HbNpx8DOj/CC8iTXWmeFSoVWMOhLngdjj5uGLHIVEd0ybZxce1NwNPFURE = X-Received: by 2002:a05:6a21:6da4:b0:203:bb65:995a with SMTP id adf61e73a8af0-20444f25041mr861150637.30.1745455798037; Wed, 23 Apr 2025 17:49:58 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 030/148] accel/tcg: Use cpu_ld*_code_mmu in translator.c Date: Wed, 23 Apr 2025 17:47:35 -0700 Message-ID: <20250424004934.598783-31-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Cache the mmu index in DisasContextBase. Perform the read on host endianness, which lets us share code with the translator_ld fast path. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/translator.h | 1 + accel/tcg/translator.c | 58 ++++++++++++++++++--------------------- 2 files changed, 28 insertions(+), 31 deletions(-) diff --git a/include/exec/translator.h b/include/exec/translator.h index d70942a10f..205dd85bba 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -73,6 +73,7 @@ struct DisasContextBase { int max_insns; bool plugin_enabled; bool fake_insn; + uint8_t code_mmuidx; struct TCGOp *insn_start; void *host_addr[2]; diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 157be33bf6..4c320ab9c3 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -11,10 +11,10 @@ #include "qemu/log.h" #include "qemu/error-report.h" #include "exec/exec-all.h" +#include "exec/cpu-ldst-common.h" +#include "accel/tcg/cpu-mmu-index.h" #include "exec/translator.h" -#include "exec/cpu_ldst.h" #include "exec/plugin-gen.h" -#include "exec/cpu_ldst.h" #include "exec/tswap.h" #include "tcg/tcg-op-common.h" #include "internal-target.h" @@ -142,6 +142,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns, db->host_addr[1] = NULL; db->record_start = 0; db->record_len = 0; + db->code_mmuidx = cpu_mmu_index(cpu, true); ops->init_disas_context(db, cpu); tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */ @@ -457,55 +458,50 @@ bool translator_st(const DisasContextBase *db, void *dest, uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, vaddr pc) { - uint8_t raw; + uint8_t val; - if (!translator_ld(env, db, &raw, pc, sizeof(raw))) { - raw = cpu_ldub_code(env, pc); - record_save(db, pc, &raw, sizeof(raw)); + if (!translator_ld(env, db, &val, pc, sizeof(val))) { + MemOpIdx oi = make_memop_idx(MO_UB, db->code_mmuidx); + val = cpu_ldb_code_mmu(env, pc, oi, 0); + record_save(db, pc, &val, sizeof(val)); } - return raw; + return val; } uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc) { - uint16_t raw, tgt; + uint16_t val; - if (translator_ld(env, db, &raw, pc, sizeof(raw))) { - tgt = tswap16(raw); - } else { - tgt = cpu_lduw_code(env, pc); - raw = tswap16(tgt); - record_save(db, pc, &raw, sizeof(raw)); + if (!translator_ld(env, db, &val, pc, sizeof(val))) { + MemOpIdx oi = make_memop_idx(MO_UW, db->code_mmuidx); + val = cpu_ldw_code_mmu(env, pc, oi, 0); + record_save(db, pc, &val, sizeof(val)); } - return tgt; + return tswap16(val); } uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc) { - uint32_t raw, tgt; + uint32_t val; - if (translator_ld(env, db, &raw, pc, sizeof(raw))) { - tgt = tswap32(raw); - } else { - tgt = cpu_ldl_code(env, pc); - raw = tswap32(tgt); - record_save(db, pc, &raw, sizeof(raw)); + if (!translator_ld(env, db, &val, pc, sizeof(val))) { + MemOpIdx oi = make_memop_idx(MO_UL, db->code_mmuidx); + val = cpu_ldl_code_mmu(env, pc, oi, 0); + record_save(db, pc, &val, sizeof(val)); } - return tgt; + return tswap32(val); } uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc) { - uint64_t raw, tgt; + uint64_t val; - if (translator_ld(env, db, &raw, pc, sizeof(raw))) { - tgt = tswap64(raw); - } else { - tgt = cpu_ldq_code(env, pc); - raw = tswap64(tgt); - record_save(db, pc, &raw, sizeof(raw)); + if (!translator_ld(env, db, &val, pc, sizeof(val))) { + MemOpIdx oi = make_memop_idx(MO_UQ, db->code_mmuidx); + val = cpu_ldq_code_mmu(env, pc, oi, 0); + record_save(db, pc, &val, sizeof(val)); } - return tgt; + return tswap64(val); } void translator_fake_ld(DisasContextBase *db, const void *data, size_t len) From patchwork Thu Apr 24 00:47:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883789 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199096wrs; Wed, 23 Apr 2025 17:56:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWB9gxT0cnRG/Ak3GjVOdd2QwLqiEHS5QhYLL95SOb8yzKvF4pMT481XuYDrDhfDPKZ9V1rIQ==@linaro.org X-Google-Smtp-Source: AGHT+IEqIw35R6EzY+c0qR2kjNQNOcZyEGrVMMsEu0sSZ56Z5R/b2qvagfyHaWbiaxO0nlYz1xYL X-Received: by 2002:a05:620a:270e:b0:7c7:b8bf:35cf with SMTP id af79cd13be357-7c9585c6a5dmr87144985a.7.1745456164279; Wed, 23 Apr 2025 17:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456164; cv=none; d=google.com; s=arc-20240605; b=iCbM1g8nNrA/1gZjPhU73sZEzk0SM0WSpT+loxeSvc8VCLiL8a9hkNQfEXaTiG6rBn yGjkpzO2G2Jqbc3T97DUoTTfJnDS0NmNZxGGSzBp7cI3fqoClaPKnBIxKSXy/mFvzs/U b9DRth5CTwr1es5hwtGgRSNtQLlzjJ/ASoHHPGQbvIdyCPctsWrcBy4DXf8TPUwiUOMR R2bDVJqV9b3f2PoBgA6dWC7I5yIUp9D0BTBu+yOzHAZV/Np6659ik6c6VEy/TZViM0aq TEszEB4PrOcOPT4rCwbCq/JVYRRccmpCkrXwVbepHJTi7Dvux/8YNq/ntHD2rmfQSOoe h2hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6RZv4stV/SvG8IKjkEcJ2d9gwvNpfIIefKf42fhrHvc=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=JOhL53kGjsKRoTtAcUs2Vf67j75v7GveqhLIYNVC99aCeye8IXwxkrx3Cdoi4zArOt GZhC/JTf7pidysAO44DmQIoBcdA6JMlJDZd0+8fCcV6HAJweTl0IdJU6CQt6DAx1tcIl PzTg/2/CQIltN/X8mEMyt4Lzlsfrog8I8gU2TqtmaztNzXt8JSmr/fKLUa5lPQZ9Jpnm JV3aY9PV4rXiCwCm1eICZ8nng9vpVnRtTzOpgkMBAsSIH1Fu4hqPmxWVlzaZkCF55cvu T6zph1dCq3IYKEpnjppkrFLG8ioY3jaotqdokcRCl/COg2tpRgQujPgCq9sSvjyUyxq6 AqOg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dXGFWDD9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958c9fc25si20735485a.24.2025.04.23.17.56.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:56:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dXGFWDD9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kp9-0008CP-CV; Wed, 23 Apr 2025 20: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 1u7kn0-0005b4-GF for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:08 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7kmu-0004NG-8L for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:06 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-7398d65476eso358855b3a.1 for ; Wed, 23 Apr 2025 17:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455799; x=1746060599; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6RZv4stV/SvG8IKjkEcJ2d9gwvNpfIIefKf42fhrHvc=; b=dXGFWDD94EiCU9mtFKhhnFB43DVQHLooSvV/PKWqTd4ZZu3yd/5XkVH3eDi6ZhfC1H vPHNuGgu2yBC1QzNaMtkWZeoLwMYnGzxB2M7gzpex7qhxIlOqeQHV9/4apVbd9nc1sFE TcUOsM3olSx0k4IJ448CBrrcVB/bkRrg138HSgwh/5AgbDf60LTQNFtW0GMUm1bZZEe1 wgy0tiFiRKWgg/3bmPsOHFac91U9Ec1eSiN7XIyHV1SKFoauGIxCfgahgVix4r/QfoWK 0dOujTrKn6GnK8ZW5QPOVYxkk3VzyPVqMgxxnmdPYV/paP/mw1iAztY+NBSi3J39gzuJ erwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455799; x=1746060599; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6RZv4stV/SvG8IKjkEcJ2d9gwvNpfIIefKf42fhrHvc=; b=QICLVipMwpS8xmmViGAfKunU/2bJW8bh0e7tJgDUj6N9u5gUOGUzxP7cp3lq9NunPZ z8EcSNVobSW9bLbw+JSCwqZPpFSfyD6R+nsgm4oUhK/7uys6fJ3giwgz8kz/6WXO1ZSZ /tSOwUMBH1yoDFNxi8G6wclYOP9jjIYiPemTferA13ubc0QDM8nK3dh3sNQYu51l2r9e 4s880fDXR+oFq6Y78EoVrK3OfLebtbBiidHc+foynogDL+SNC0Qh3RZRlA9DfnhaFfi2 jD3vbyjZYc9BN5B57UHj5WMrAAfNJK2yK000FOhZCy01jCd0vMLfTwDLsqJ0ZkH9K9dH ELpw== X-Gm-Message-State: AOJu0YxAiiV58je3AaX9O+tfS8dcQCESGAWWYrkusNnJFg8xyOYJrn1/ YeAhd8lX7cIhI25/ZjPdjcCVoqAtXEHoym01Kb7BuZ1OPi5vw3nsSC+vX9LX/4KLDR5CfoqPZOv Y X-Gm-Gg: ASbGncvFkwxcMkKYNCce2ql45nXIeJTlY+vzDje2rHFieYXLz55io/pNBEVjCETi/D6 UZOblzeTN2ZnzQQo10hOEmxJVF65ia49yoG05SmVWhHgattPGceb8l+5cr/CciVe/rXZMy4misM BoWXK3i0oKvfwkhaF9PlfWdybWG3NMys2bX1+o1UzIHM+q05kh4hL0Au/v87AwqnobgD3OGXvtR WiJ9JgkqwgCZmx4yqxWTJj2oW9wMmEpatP6xT4kUByw3tIORx1w6q4u4etsTm2CgfrUS+/nl7HT LykW8L6x4qNT94Tv6oSUf18FKjFCSiYzechuD8CRk64wODrycmgvpjFKhkwVODlFQxf/6tyPPdU = X-Received: by 2002:a05:6a00:3213:b0:736:4c3d:2cba with SMTP id d2e1a72fcca58-73e2689e0f1mr451239b3a.9.1745455798655; Wed, 23 Apr 2025 17:49:58 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 031/148] accel/tcg: Implement translator_ld*_end Date: Wed, 23 Apr 2025 17:47:36 -0700 Message-ID: <20250424004934.598783-32-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Add a new family of translator load functions which take an absolute endianness value in the form of MO_BE/MO_LE. Expand the other translator_ld* functions on top of this. Remove exec/tswap.h from translator.c. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/translator.h | 49 ++++++++++++++++++++++++--------------- accel/tcg/translator.c | 26 +++++++++++++++------ 2 files changed, 49 insertions(+), 26 deletions(-) diff --git a/include/exec/translator.h b/include/exec/translator.h index 205dd85bba..3c32655569 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -18,7 +18,7 @@ * member in your target-specific DisasContext. */ -#include "qemu/bswap.h" +#include "exec/memop.h" #include "exec/vaddr.h" /** @@ -181,42 +181,53 @@ bool translator_io_start(DisasContextBase *db); */ uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, vaddr pc); -uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc); -uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc); -uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc); +uint16_t translator_lduw_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian); +uint32_t translator_ldl_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian); +uint64_t translator_ldq_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian); + +#ifdef COMPILING_PER_TARGET +static inline uint16_t +translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc) +{ + return translator_lduw_end(env, db, pc, MO_TE); +} + +static inline uint32_t +translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc) +{ + return translator_ldl_end(env, db, pc, MO_TE); +} + +static inline uint64_t +translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc) +{ + return translator_ldq_end(env, db, pc, MO_TE); +} static inline uint16_t translator_lduw_swap(CPUArchState *env, DisasContextBase *db, vaddr pc, bool do_swap) { - uint16_t ret = translator_lduw(env, db, pc); - if (do_swap) { - ret = bswap16(ret); - } - return ret; + return translator_lduw_end(env, db, pc, MO_TE ^ (do_swap * MO_BSWAP)); } static inline uint32_t translator_ldl_swap(CPUArchState *env, DisasContextBase *db, vaddr pc, bool do_swap) { - uint32_t ret = translator_ldl(env, db, pc); - if (do_swap) { - ret = bswap32(ret); - } - return ret; + return translator_ldl_end(env, db, pc, MO_TE ^ (do_swap * MO_BSWAP)); } static inline uint64_t translator_ldq_swap(CPUArchState *env, DisasContextBase *db, vaddr pc, bool do_swap) { - uint64_t ret = translator_ldq(env, db, pc); - if (do_swap) { - ret = bswap64(ret); - } - return ret; + return translator_ldq_end(env, db, pc, MO_TE ^ (do_swap * MO_BSWAP)); } +#endif /* COMPILING_PER_TARGET */ /** * translator_fake_ld - fake instruction load diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 4c320ab9c3..2ab081b95f 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -8,6 +8,7 @@ */ #include "qemu/osdep.h" +#include "qemu/bswap.h" #include "qemu/log.h" #include "qemu/error-report.h" #include "exec/exec-all.h" @@ -15,7 +16,6 @@ #include "accel/tcg/cpu-mmu-index.h" #include "exec/translator.h" #include "exec/plugin-gen.h" -#include "exec/tswap.h" #include "tcg/tcg-op-common.h" #include "internal-target.h" #include "disas/disas.h" @@ -468,7 +468,8 @@ uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, vaddr pc) return val; } -uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc) +uint16_t translator_lduw_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian) { uint16_t val; @@ -477,10 +478,14 @@ uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc) val = cpu_ldw_code_mmu(env, pc, oi, 0); record_save(db, pc, &val, sizeof(val)); } - return tswap16(val); + if (endian & MO_BSWAP) { + val = bswap16(val); + } + return val; } -uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc) +uint32_t translator_ldl_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian) { uint32_t val; @@ -489,10 +494,14 @@ uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc) val = cpu_ldl_code_mmu(env, pc, oi, 0); record_save(db, pc, &val, sizeof(val)); } - return tswap32(val); + if (endian & MO_BSWAP) { + val = bswap32(val); + } + return val; } -uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc) +uint64_t translator_ldq_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian) { uint64_t val; @@ -501,7 +510,10 @@ uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc) val = cpu_ldq_code_mmu(env, pc, oi, 0); record_save(db, pc, &val, sizeof(val)); } - return tswap64(val); + if (endian & MO_BSWAP) { + val = bswap64(val); + } + return val; } void translator_fake_ld(DisasContextBase *db, const void *data, size_t len) From patchwork Thu Apr 24 00:47:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883853 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204647wrs; Wed, 23 Apr 2025 18:12:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX5uIBHkpJvPrn70JRWjXKR81DXrnnWz7k5dNMrOL98yUySQ1Pybt7OZD3s4SbctK2PTq6ACw==@linaro.org X-Google-Smtp-Source: AGHT+IHCeIDi7L1tFMSpRThGg/TG+q13Mu4yhypgYe86fYXKUYagfoklshLMRMUMHbvq9hwKK1X7 X-Received: by 2002:a05:620a:29cc:b0:7c5:4c49:769c with SMTP id af79cd13be357-7c956e89b5bmr189500385a.6.1745457165269; Wed, 23 Apr 2025 18:12:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457165; cv=none; d=google.com; s=arc-20240605; b=OJx+WvWYv7ZVbPAnT92gyLuGbh8EkYmgUufgU58vt+fyBI1GOyUpPr2JTEkEh4cf09 URMK8PAiDmEdU6AgJXSlbHb/2Wxkjc12nMGo+z4G7iJ916WsvyjoSiqs4fQv28R7CuVo 7MCB5O/P8VaRU69ZlYNVB92yszIdyaUIF3MAEnGSLUudXAdkM6KbqNDEk/v6O6Zm+Ysj Bokeb/CmcTYj2Od399JbxI9R4m79lcLkLx8a6mM/lzVBZy5fHWq+1ZfCZjMrcB9ZiyTs j8EfRwdUMBFWBOY7SifxOiTOTqFfkv7EQTd/QQHArrpNSM0ZDjKblpFFDtY3uWyLdrm/ ur6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EXxySmM5H2uZxfcMpHXVVabc3DpRRBx3hmcc7DOhhC4=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=HYrPDPfpTX4UYLryXhX0cf+t8g+nreXln0+mYBYw+wFTbwwkxX/grnn+1SCIc+ae9S kcts5cJQt1Ps8QALYHGZcLp+5DI4AQW2TFUUxzDn2zf4yIbVO+cTW45Vjg5c+Whqfazr wK2ZFIE0iuF9H8rTXW2BWcA7JeyLa7r5oZv+hIR1lHy0EhipDCUQOAQuoKFf055eWKWh X8+g0FMWZtSUYCR+ZWpBRxvU3GChhEpHUUdhbXa4vB/skBBIy3Q/Jhz2PHdOG/Rh2C0g xxOBZeApNICx6Ni+UO46o1GdW0N+3DR/M4W8q7mw9DjtBRy3x7ptvKcvfcNlqtHYjOrj seMg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Xy//jRBk"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958d8765csi21535085a.265.2025.04.23.18.12.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:12:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Xy//jRBk"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7knv-0006TV-72; Wed, 23 Apr 2025 20:51: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 1u7kn0-0005ac-BC for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:08 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0: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 1u7kmy-0004NU-AP for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:05 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-7370a2d1981so306233b3a.2 for ; Wed, 23 Apr 2025 17:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455799; x=1746060599; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EXxySmM5H2uZxfcMpHXVVabc3DpRRBx3hmcc7DOhhC4=; b=Xy//jRBkDyFm+9cHsrYExfELxIjFDqJ6ljkXrA930Jy1EwQ0XK2BJPk7Y6AAayC97/ 5vd4BHHI82h0HaEM2QONZmkVPRIOIn0fuXXvUZxgiYS5C2rNF3b41xhkgwRGzLBqeG+2 uy4WF2vx1v/UBhaPVmxmN95mMFD6UFr43kZ4TzMGvgwcXw6s6R4EfJXhiZoAz4SGkenB eOHlCXudPCt7MlEq3F9aUDHuCJi7xiujSzXCdaNeK7gcT+DAqEaW+LU830O183uhy/7s NbB3oZmHqO9/bv62YZcbW9goc2Ylq9c3osPdjnTzac7kykYBmsomkAjoNtp80mpMkdoa m2Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455799; x=1746060599; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EXxySmM5H2uZxfcMpHXVVabc3DpRRBx3hmcc7DOhhC4=; b=Le6EmpZGGtjoENBJUpuGySbxHXpLS92AZiNKLnywpjvRXa3Kd+9e9UkNmbxP7Xf/gw 0SI7Yuh2lCPXQLVIdpMI2kt27VCQbpGdjk2rR4o+S9OQv6mxX0CuYtOUWhAId8MqUKj3 b7EcEUeAs41oB09ZD7XVetkIKdyEEowyZ7xHRPgULQiZKWt3S2Eq2yRg+6L5pUEVQhOY f12Nk7oRh+oZvouW5DmOzA0vrJCWLCBI+9fIsdr/LJfYuDMc3U7dZrv2uOAreD90RWC2 12zM4lXDIyG0UDnqi7nWLGs7hsVxuOPpe1XekVHsKK2sfe4DWdCOd1InXhE3qcZjzvPJ 6ymg== X-Gm-Message-State: AOJu0YwAl8S9ZLVqswIAFijzfLBokofSm4C0EmWw92xZ8tDfQx0zKjYM Q5Gqr4wzHdL78MNyOrsT7TM+UPKhumGGYf7Efat/fUwzSmagiIb6G9aFKmRrjSsncyAMK964Ndc 9 X-Gm-Gg: ASbGnctCbD+5uN/Z5v5/Ahh/WJUt03vhBT5Xd6AGRpnZqsrZ0zP830xkH8nQRB+kAFI dILvG1qlkMwLyy2JFriYR3g45lYnLSmJCyf7rBmCeBNDOVSzel7ms3gE3qCHzTOMqOWXm219nBF ooVsWIS3mp47zaps5iGsXZcibY483x0a+3+kmTZqdF/yUo84gLC3bynf3rQkd2iAIm28I8ZLB/K SabdzrNmczJXCJynodLSbLxUBJ0/t1/Ytqho+zk2hQHZu7fOmGgbTRnVHF2TyzIQmIC6qf5emHW TFF9u/+rfs6ofUrJ+i5BQqd8GIT9r4Qpl6Y36nJxrlC/wtng6rI9WDBOFI5fPe4xemZUTNWNl5Q = X-Received: by 2002:a05:6a21:7101:b0:1f5:8d8f:27aa with SMTP id adf61e73a8af0-20444e6faccmr925241637.8.1745455799269; Wed, 23 Apr 2025 17:49:59 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 032/148] accel/tcg: Remove mmap_lock/unlock from watchpoint.c Date: Wed, 23 Apr 2025 17:47:37 -0700 Message-ID: <20250424004934.598783-33-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The mmap_lock is user-only, whereas watchpoint.c is only compiled for system mode. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/watchpoint.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/accel/tcg/watchpoint.c b/accel/tcg/watchpoint.c index 65b21884ce..cfb37a49e7 100644 --- a/accel/tcg/watchpoint.c +++ b/accel/tcg/watchpoint.c @@ -124,17 +124,14 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, } cpu->watchpoint_hit = wp; - mmap_lock(); /* This call also restores vCPU state */ tb_check_watchpoint(cpu, ra); if (wp->flags & BP_STOP_BEFORE_ACCESS) { cpu->exception_index = EXCP_DEBUG; - mmap_unlock(); cpu_loop_exit(cpu); } else { /* Force execution of one insn next time. */ cpu->cflags_next_tb = 1 | CF_NOIRQ | curr_cflags(cpu); - mmap_unlock(); cpu_loop_exit_noexc(cpu); } } else { From patchwork Thu Apr 24 00:47:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883781 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198770wrs; Wed, 23 Apr 2025 17:54:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW6b9XZdXajzmQPCAULZciz3TfoufIrLUMtQ/oZBQwsTPuugX40PycX0ruTOrWt6xR14mWOVg==@linaro.org X-Google-Smtp-Source: AGHT+IG3jtknOHvU2DUMugZjH4pZ5jxNMhUkBYQeqVZYNMp10SYH4L3mbqFdQcYVhGViT11Wd9yz X-Received: by 2002:a05:622a:5509:b0:474:f1ef:3a54 with SMTP id d75a77b69052e-47ec335f7cemr5879371cf.9.1745456075125; Wed, 23 Apr 2025 17:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456075; cv=none; d=google.com; s=arc-20240605; b=HL45QGZIjOWwlE5Vso0cL5tpp+yZuKJLdKXB6eK0FzLKH8CWLM1/UB6EaTduB/XrTx CCuYDyZb6y7l1aba5mOUPxtNLBJUYud7cMZDhpVLTBQ3+MKyJJ0tLgkdFAXJUP9jIZ2C qoVkNowIQZNhuUKG0SsxNkinZLZdmzHcLj0BNeKm++tIzYoelJrZBZGTNJ+k0+LxqhLq fp+TKW9l0GZ6skQbWfOlPGHIjPux1vmtqCam6JFlDBKnsJCY8ksyui7f7R8mPZR1I2fJ mWTRbXkbDXgwKG3owEJ3JZ3vR2mudrlbMLvJ/v3YAGesL3QcvMdGX7ujYT7UFZSOJ6vG Z7aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Oon0vpY/g0fMqcKiyF4ogPUXdsQUvseLPptppKyoVRs=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=ZHM5v4aMDbFeZtKTn67VcGJPy68KdbleORVXR+GDxQLvhrjAyrIeYlPIOBr2h6VOvo v4hsKNT+ClZFc7D9hhroulNYkr0DHqQoO/AvOCRp4JatsO9TpLZDQCTuKEk4srZY5+ev WSAgPjWBXPEBHIfNRI2qH2Lmc78j2x0MMCx5Wz1WWf1E0Rgn+MtYjuKwFp44DKXJZOT6 7TmAmTOxkzIfOBCbiMQUdgmqwGkYzafMjo+fUg6yDOeUR7S7YKQj5B8U0I7z1Kakgb0Y PyOo65C0YK1temO2GSjtmr7JlYPT8k9z+0wqWOOTBadacLoVFmX+gvQ9D95prsnxqFrF KwdQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NgQjl5Qg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9fa9ac61si5121971cf.189.2025.04.23.17.54.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:54:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NgQjl5Qg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kp9-00087O-2I; Wed, 23 Apr 2025 20: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 1u7kn7-0005ev-3y for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:20 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0: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 1u7kmy-0004Nl-BH for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:08 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-7399838db7fso509021b3a.0 for ; Wed, 23 Apr 2025 17:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455800; x=1746060600; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Oon0vpY/g0fMqcKiyF4ogPUXdsQUvseLPptppKyoVRs=; b=NgQjl5Qg6Jod6lzDRI9bvH5fpeHBASOLTcRAkhL0HOhA3MPDssRY80ZT/GcYny47HD vwRyT621YeaBuEsLk2WQp2nl1kvl+gBtksnvEbhAgey5ONmraQlzuD3dEwXkqrkXH9wc CsIaYh/ymHxZELM7X/qOqJNh8wrRV0Ho4EecltlzocfL/yTwN6zA7dzEUDJYkhrUPm5Q qhdh4Zn1R8Ziu2rDT+iuGFKk9prnkvgpyLnQcwnbcKkciug9SrGTgd1EhXUJr0SFK3xR PqmDQ2cABHoB0l9MCDFdnpzs1oLCf9og2BPAdibJeGU7w7nIN1MUyu7Nb0GXA9dCyGVg a07w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455800; x=1746060600; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Oon0vpY/g0fMqcKiyF4ogPUXdsQUvseLPptppKyoVRs=; b=XAfnjuBjQ+dE+mwPce8Wezyo9DUxYcIHaqdx2ViApUqijmHGaXTlG4v/bC4d28EXBd OKktj047B5A5ljGWcZ5PTPZovyEtN1WqhbV/66Ju8ezQoRLtLKjysqHjxKft9syAk4MU Kj2Xdf4pfRoZtv4To9xzxhBK6bMODx6LYU6ivL1ntGB0C4P1OKrM5yComojFRlhQ6EpK iV7upp2V8cL/DIPE6djN7ae5l/4bQnoM0whMK0LQrAiCyJM0QQcWBMkCaHCZOrx23XQS 9Tzspsam1f/LR2naG71BSgbOcWDsIFa9khfP6TdnptuIGkwsffMN7UHGdqK0+6vDGL+6 ALfg== X-Gm-Message-State: AOJu0YzZt1emHawPjuiAvUVBGKOG6lf+iQBPzRWAP/3+Y75P0+49NsNO mNsXVSyDzatF/9h36fjUVWb8iBlmxmhN1nE0ms1WlSPyEkNZfCm2B6prsoMllGATwqRg8FcBmfJ G X-Gm-Gg: ASbGncv1DDp4aYrjYC0a6CP4JNbIW+yNapJoEh7UItZ1Xaz0f/kc0xml5rTTa+gJs6k Eo5COM2V03oUhD1x4IW97oZ7mP5z1wkCDzNWtkTFvVEfF0H5SMpKPYuESE0LSJoHYOfzG9+KXVB /9pz0zX+Cf4hRCJTV8514THvaE4xqvuBHDf3V9ZK2AYbJ2Fk69QNd7jt4HaqlMhOqS5ja7GT2Ng rTCYjxskFjHoEKIxla5eTnPLyPfRTuxAo56ld98Tm95oN9MewIpNA6tv4uJWER4PndmIJTAFz0c O3tkRl4DbsIOLQUJrLtmp0jx1UXnalFii4IeOKrmqKiEHzmJIl8cW8sJsPE67iJlPFylxhLIbPw VdsWqxY+DBA== X-Received: by 2002:a05:6a00:8104:b0:732:5875:eb95 with SMTP id d2e1a72fcca58-73e267e0e51mr559653b3a.4.1745455799898; Wed, 23 Apr 2025 17:49:59 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.49.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:49:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 033/148] include/exec: Split out mmap-lock.h Date: Wed, 23 Apr 2025 17:47:38 -0700 Message-ID: <20250424004934.598783-34-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Split out mmap_lock, et al from page-protection.h to a new header. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/internal-target.h | 1 + bsd-user/bsd-mem.h | 1 + include/exec/mmap-lock.h | 33 +++++++++++++++++++++++++++++++++ include/exec/page-protection.h | 22 ---------------------- accel/tcg/cpu-exec.c | 1 + accel/tcg/tb-maint.c | 1 + accel/tcg/translate-all.c | 1 + bsd-user/mmap.c | 1 + linux-user/arm/cpu_loop.c | 1 + linux-user/elfload.c | 1 + linux-user/flatload.c | 1 + linux-user/mmap.c | 1 + linux-user/syscall.c | 1 + target/arm/helper.c | 1 + 14 files changed, 45 insertions(+), 22 deletions(-) create mode 100644 include/exec/mmap-lock.h diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index 2cdf11c905..c88f007ffb 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -13,6 +13,7 @@ #include "exec/translation-block.h" #include "tb-internal.h" #include "tcg-target-mo.h" +#include "exec/mmap-lock.h" /* * Access to the various translations structures need to be serialised diff --git a/bsd-user/bsd-mem.h b/bsd-user/bsd-mem.h index 90ca0e3377..1be906c591 100644 --- a/bsd-user/bsd-mem.h +++ b/bsd-user/bsd-mem.h @@ -56,6 +56,7 @@ #include #include "qemu-bsd.h" +#include "exec/mmap-lock.h" #include "exec/page-protection.h" #include "user/page-protection.h" diff --git a/include/exec/mmap-lock.h b/include/exec/mmap-lock.h new file mode 100644 index 0000000000..50ffdab9c5 --- /dev/null +++ b/include/exec/mmap-lock.h @@ -0,0 +1,33 @@ +/* + * QEMU user-only mmap lock, with stubs for system mode + * + * Copyright (c) 2003 Fabrice Bellard + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ +#ifndef EXEC_MMAP_LOCK_H +#define EXEC_MMAP_LOCK_H + +#ifdef CONFIG_USER_ONLY + +void TSA_NO_TSA mmap_lock(void); +void TSA_NO_TSA mmap_unlock(void); +bool have_mmap_lock(void); + +static inline void mmap_unlock_guard(void *unused) +{ + mmap_unlock(); +} + +#define WITH_MMAP_LOCK_GUARD() \ + for (int _mmap_lock_iter __attribute__((cleanup(mmap_unlock_guard))) \ + = (mmap_lock(), 0); _mmap_lock_iter == 0; _mmap_lock_iter = 1) + +#else + +static inline void mmap_lock(void) {} +static inline void mmap_unlock(void) {} +#define WITH_MMAP_LOCK_GUARD() + +#endif /* CONFIG_USER_ONLY */ +#endif /* EXEC_MMAP_LOCK_H */ diff --git a/include/exec/page-protection.h b/include/exec/page-protection.h index 3e0a8a0333..c43231af8b 100644 --- a/include/exec/page-protection.h +++ b/include/exec/page-protection.h @@ -38,26 +38,4 @@ */ #define PAGE_PASSTHROUGH 0x0800 -#ifdef CONFIG_USER_ONLY - -void TSA_NO_TSA mmap_lock(void); -void TSA_NO_TSA mmap_unlock(void); -bool have_mmap_lock(void); - -static inline void mmap_unlock_guard(void *unused) -{ - mmap_unlock(); -} - -#define WITH_MMAP_LOCK_GUARD() \ - for (int _mmap_lock_iter __attribute__((cleanup(mmap_unlock_guard))) \ - = (mmap_lock(), 0); _mmap_lock_iter == 0; _mmap_lock_iter = 1) -#else - -static inline void mmap_lock(void) {} -static inline void mmap_unlock(void) {} -#define WITH_MMAP_LOCK_GUARD() - -#endif /* !CONFIG_USER_ONLY */ - #endif diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index ef3d967e3a..372b876604 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -27,6 +27,7 @@ #include "disas/disas.h" #include "exec/cpu-common.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "exec/translation-block.h" #include "tcg/tcg.h" #include "qemu/atomic.h" diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 3f1bebf6ab..d5899ad047 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -24,6 +24,7 @@ #include "exec/log.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "exec/tb-flush.h" #include "tb-internal.h" #include "system/tcg.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 82bc16bd53..16e5043597 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -45,6 +45,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "tb-internal.h" #include "exec/translator.h" #include "exec/tb-flush.h" diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c index 3f0df79c37..47e317517c 100644 --- a/bsd-user/mmap.c +++ b/bsd-user/mmap.c @@ -17,6 +17,7 @@ * along with this program; if not, see . */ #include "qemu/osdep.h" +#include "exec/mmap-lock.h" #include "exec/page-protection.h" #include "user/page-protection.h" diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index 7416e3216e..e8417d0406 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -25,6 +25,7 @@ #include "signal-common.h" #include "semihosting/common-semi.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "user/page-protection.h" #include "target/arm/syndrome.h" diff --git a/linux-user/elfload.c b/linux-user/elfload.c index fa83d78667..99811af5e7 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -10,6 +10,7 @@ #include "user/tswap-target.h" #include "user/page-protection.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "exec/translation-block.h" #include "user/guest-base.h" #include "user-internals.h" diff --git a/linux-user/flatload.c b/linux-user/flatload.c index d5cb1830dd..4beb3ed1b9 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -35,6 +35,7 @@ #include "qemu.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "user-internals.h" #include "loader.h" #include "user-mmap.h" diff --git a/linux-user/mmap.c b/linux-user/mmap.c index d1f36e6f16..f88a80c31e 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/mmap-lock.h" #include "exec/tb-flush.h" #include "exec/translation-block.h" #include "qemu.h" diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8bfe4912e1..5826ac3adb 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/mmap-lock.h" #include "exec/tb-flush.h" #include "exec/translation-block.h" #include diff --git a/target/arm/helper.c b/target/arm/helper.c index bb445e30cd..0454b06a6c 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -14,6 +14,7 @@ #include "cpu-features.h" #include "exec/helper-proto.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "qemu/main-loop.h" #include "qemu/timer.h" #include "qemu/bitops.h" From patchwork Thu Apr 24 00:47:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883806 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199782wrs; Wed, 23 Apr 2025 17:59:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVJ3EmsBUD7T6k1YlAmVqjSlDVJUuO5aPcO2ARoBO5toXGQfYUHJac7SEPQJhHbufcUa2ynJQ==@linaro.org X-Google-Smtp-Source: AGHT+IEJCmzVHfdycSPF+1MNqLcvzloZvnuhhGFkTeKXIv9Tr5lbQy9dNkSaGBKfMQT5KvRQ1Ynl X-Received: by 2002:ad4:5c48:0:b0:6e8:f8ef:d659 with SMTP id 6a1803df08f44-6f4bfbf038fmr16192156d6.10.1745456345204; Wed, 23 Apr 2025 17:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456345; cv=none; d=google.com; s=arc-20240605; b=hw/8hhLvAsnGngegCvEn52Yw0qRl1e6rmhvbEHzdQl8huwtTrVxcmiqF1uQacVvFVE 0S/6cuWhDHiIfKUdYIrWsCEDOdK+JN6a2T3U8ZFtziZ3DU3Mc15Dl7MF6OFKHwte1KDe hrivtJiIjU3Fmdqgu9/iZfrHL1qg7lbBQ7hMCumrl17pirbMcpPmjrKvwCHuGqJLXpQk vWtHe5S8HEoVkGOTSPbZqY98UfKO8wIbGYL4bvxNWn6xV4S1/kPVw/cWaCJTgmRC4GL4 bBOrbW2sa63lRLTzhqqYdqAabQPUrxT3yzsotBPdvL9HIdVNx5b8Onl/mISvzOXBrVto MTRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uAfCHniCscGXxzYWNaJ01CHUmiT34IAUqdzapE82HPc=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=FFGOO/SOiuqsjeAu8e6PRTPu+0dQUmRxryu+PEtRi1u80V0Ex1DoIsDQQcLAgsPD4U wMaR/IRKPx75TdEGUgC0MOxCrr7tRfX5sw6WCiuOWluNyw2KyXNlT4aQ+0oDSOKXAHiz /tiV7whkEN8mKXagDCpUrGzncuiQJ70Xy35FjlbhHd1/6gDz9UXWUhDknvG76MK3lC6S reWaQgx05oBaeaf1h4OgpWYLGiaG7Tnp3+L+iaKhVQkSACRxiv68RoEPB7TqqRgBvQLs ZBPwXwF3ddUIapeeCI8XbTo2NYXpmi9jNbGr15BclZyPGmmdGmVhK/OLkIujrjbv09Qm oOqg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y5TO4bvi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0aea29esi3644586d6.288.2025.04.23.17.59.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:59:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Y5TO4bvi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7knj-00068U-VY; Wed, 23 Apr 2025 20:50:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7kn7-0005ew-5g for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:20 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmy-0004Nv-Og for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:12 -0400 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-b0db0b6a677so358292a12.2 for ; Wed, 23 Apr 2025 17:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455801; x=1746060601; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uAfCHniCscGXxzYWNaJ01CHUmiT34IAUqdzapE82HPc=; b=Y5TO4bvi6HDgzVYl76TSFxbiOf54rMqs0toAizMt8ahgZJHMwrxqK76QbQ8Fxl6HBo +lY6j9vaZ+ekTofjCOth//DLEhLtKPy+ESP/SUx8AftI37PYdp1WsHICPeUp6hmF4CQ9 dqZDbD4FsS1kn3plzJAzIfHTjJJEBLyICEyRgBpp3wOZEFjhgyWS09g3BX7dYTb0Wq0r vY94js6snxNhl4h6r+8vffYDBHM0k6+zkO271JnB/m7U6BZW5viXewfFyjyJxbhVWsa3 vAkow0QftzxUpfqnf4k/hVYSDS/Hp4dGkTxGRMcEptAFF7J4DBn5Sh02K9mEK2lQUnIl ru7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455801; x=1746060601; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uAfCHniCscGXxzYWNaJ01CHUmiT34IAUqdzapE82HPc=; b=WQnex9ooHWH9Yj2XBuQD6ZzrlXUIGwUj5OPKyqKFa0M1Of67YZcxFd4nrMNKFpJmc9 ukAmrz5NKzxw+xKo1IW5tn9TJxgAG/9fKlrh7IXPIp1TfTsTRszDtfe99Iv4bzjKedrd UyljqnKpMDq+kbBjXFemAOC+nIvsVg5dLsSfuJqoMLmeuACwGJB9eMfUIDupv8ykQEwK FXtjsfrd4sfP0FviyEhZ9wjD1u8zA4wfp6lH/M6OnKK0zR1S1Mq96xuxeA4YrPOPNslf Ou6qzJO+C1GT6gzkCw6vg8JxibaSPsQ88gv2msOsWlcWmpodT3wFQBZxRnavVps+sFQ5 iBEA== X-Gm-Message-State: AOJu0YzoCpl7T1dDJod/qF9gkvkZPQIf6BIRwNfUTZAkzK1f+X3K4xgH 18CofUOFbhFpL3/mmt01mQQ/3564mEeYykwEVgOg56mda3B8xUL4AQzQ+GpSV1SZ+Fk5qxhngl/ k X-Gm-Gg: ASbGnctj/fXYirXW5d+FeG7k463GRDVpeANxpCqOj+7wE32dybyCYa2vYWuheU85XjC zKNZBe80FkG0XUQItfFlzZ4ejUsJf73gQxnousR1wsPIH4+W3RQVeQlY2jc7keeX+YFsL+uhvxe LkOTQkzFeuCRg6LPTcv5mDIS0rXseovFQ0YbD9Y9CxVE/HTyHKmwgNemOcovaTw9+9wGiMXdSRO VohF7P12iO4HP5wBlUj66c7hgfXCfu+pPDgqTFxXg1vel5hnOoD4lQfiOInXtjLoxYVlunIdExj A5LPzDhggU5pnno9peojdCAaTm0HhOpQYBeu1WGYzlKh5Igic/NyUvUJmyfGp0ZHbuDIPjn2LLE = X-Received: by 2002:a05:6a21:181a:b0:1f5:9cb2:28a2 with SMTP id adf61e73a8af0-20444ebe192mr807994637.19.1745455800652; Wed, 23 Apr 2025 17:50:00 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:50:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 034/148] include/system: Move exec/memory.h to system/memory.h Date: Wed, 23 Apr 2025 17:47:39 -0700 Message-ID: <20250424004934.598783-35-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the existing includes with sed -i ,exec/memory.h,system/memory.h,g Move the include within cpu-all.h into a !CONFIG_USER_ONLY block. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- hw/arm/strongarm.h | 2 +- hw/display/apple-gfx.h | 2 +- hw/display/framebuffer.h | 2 +- hw/display/vga_int.h | 2 +- hw/hyperv/hv-balloon-our_range_memslots.h | 2 +- hw/intc/ioapic_internal.h | 2 +- hw/net/i82596.h | 2 +- hw/net/pcnet.h | 2 +- hw/tpm/tpm_ppi.h | 2 +- hw/usb/hcd-uhci.h | 2 +- hw/vfio/pci.h | 2 +- hw/virtio/vhost-iova-tree.h | 2 +- include/exec/cpu-all.h | 5 ++++- include/exec/ioport.h | 2 +- include/exec/ram_addr.h | 2 +- include/hw/acpi/acpi.h | 2 +- include/hw/acpi/ich9_tco.h | 2 +- include/hw/arm/fsl-imx25.h | 2 +- include/hw/arm/fsl-imx31.h | 2 +- include/hw/arm/fsl-imx6.h | 2 +- include/hw/arm/fsl-imx6ul.h | 2 +- include/hw/arm/omap.h | 2 +- include/hw/arm/stm32l4x5_soc.h | 2 +- include/hw/boards.h | 2 +- include/hw/char/parallel.h | 2 +- include/hw/char/riscv_htif.h | 2 +- include/hw/char/serial-mm.h | 2 +- include/hw/char/serial.h | 2 +- include/hw/display/macfb.h | 2 +- include/hw/fsi/aspeed_apb2opb.h | 2 +- include/hw/fsi/cfam.h | 2 +- include/hw/fsi/fsi-master.h | 2 +- include/hw/fsi/fsi.h | 2 +- include/hw/fsi/lbus.h | 2 +- include/hw/gpio/npcm7xx_gpio.h | 2 +- include/hw/i2c/npcm7xx_smbus.h | 2 +- include/hw/i2c/pm_smbus.h | 2 +- include/hw/i386/apic_internal.h | 2 +- include/hw/i386/x86.h | 2 +- include/hw/ide/ahci.h | 2 +- include/hw/ipmi/ipmi.h | 2 +- include/hw/isa/apm.h | 2 +- include/hw/isa/isa.h | 2 +- include/hw/m68k/q800.h | 2 +- include/hw/mem/npcm7xx_mc.h | 2 +- include/hw/mem/pc-dimm.h | 2 +- include/hw/mips/mips.h | 2 +- include/hw/misc/auxbus.h | 2 +- include/hw/misc/ivshmem-flat.h | 2 +- include/hw/misc/mac_via.h | 2 +- include/hw/misc/npcm7xx_mft.h | 2 +- include/hw/misc/npcm_clk.h | 2 +- include/hw/misc/npcm_gcr.h | 2 +- include/hw/misc/pvpanic.h | 2 +- include/hw/net/dp8393x.h | 2 +- include/hw/net/msf2-emac.h | 2 +- include/hw/nvram/mac_nvram.h | 2 +- include/hw/nvram/npcm7xx_otp.h | 2 +- include/hw/pci-host/fsl_imx8m_phy.h | 2 +- include/hw/pci-host/pam.h | 2 +- include/hw/pci-host/remote.h | 2 +- include/hw/pci/pci.h | 2 +- include/hw/pci/pcie_host.h | 2 +- include/hw/pci/shpc.h | 2 +- include/hw/ppc/mac_dbdma.h | 2 +- include/hw/ppc/pnv_lpc.h | 2 +- include/hw/ppc/pnv_occ.h | 2 +- include/hw/ppc/pnv_sbe.h | 2 +- include/hw/ppc/pnv_xscom.h | 2 +- include/hw/ppc/ppc4xx.h | 2 +- include/hw/ppc/vof.h | 2 +- include/hw/ppc/xics.h | 2 +- include/hw/register.h | 2 +- include/hw/remote/proxy-memory-listener.h | 2 +- include/hw/sh4/sh_intc.h | 2 +- include/hw/southbridge/ich9.h | 2 +- include/hw/sysbus.h | 2 +- include/hw/timer/npcm7xx_timer.h | 2 +- include/hw/tricore/tricore.h | 2 +- include/hw/usb.h | 2 +- include/hw/vfio/vfio-common.h | 2 +- include/hw/vfio/vfio-container-base.h | 2 +- include/hw/virtio/vhost-backend.h | 2 +- include/hw/virtio/vhost.h | 2 +- include/hw/virtio/virtio.h | 2 +- include/hw/xen/xen-pvh-common.h | 2 +- include/hw/xtensa/mx_pic.h | 2 +- include/qemu/iova-tree.h | 2 +- include/qemu/reserved-region.h | 2 +- include/system/dma.h | 2 +- include/system/hostmem.h | 2 +- include/system/kvm_int.h | 2 +- include/{exec => system}/memory.h | 8 ++------ include/system/vhost-user-backend.h | 2 +- migration/rdma.h | 2 +- rust/wrapper.h | 2 +- target/avr/cpu.h | 2 +- target/loongarch/cpu.h | 2 +- target/mips/cpu.h | 2 +- accel/kvm/kvm-all.c | 2 +- accel/tcg/cputlb.c | 2 +- backends/tpm/tpm_util.c | 2 +- block/blkio.c | 4 ++-- disas/disas-mon.c | 2 +- hw/acpi/erst.c | 2 +- hw/avr/atmega.c | 2 +- hw/block/fdc-sysbus.c | 2 +- hw/core/cpu-system.c | 2 +- hw/core/loader-fit.c | 2 +- hw/core/loader.c | 2 +- hw/display/edid-region.c | 2 +- hw/hyperv/hyperv.c | 2 +- hw/i386/acpi-common.c | 2 +- hw/i386/acpi-microvm.c | 2 +- hw/i386/pc_piix.c | 2 +- hw/intc/mips_gic.c | 2 +- hw/intc/ompic.c | 2 +- hw/net/ne2000.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/pci-host/remote.c | 2 +- hw/ppc/pnv_homer.c | 2 +- hw/ppc/sam460ex.c | 2 +- hw/remote/iommu.c | 2 +- hw/remote/machine.c | 2 +- hw/remote/proxy-memory-listener.c | 2 +- hw/remote/vfio-user-obj.c | 2 +- hw/s390x/s390-pci-inst.c | 2 +- hw/timer/sh_timer.c | 2 +- hw/vfio/common.c | 2 +- hw/vfio/container.c | 2 +- hw/vfio/platform.c | 2 +- hw/xtensa/sim.c | 2 +- hw/xtensa/virt.c | 2 +- hw/xtensa/xtensa_memory.c | 2 +- hw/xtensa/xtfpga.c | 2 +- migration/dirtyrate.c | 2 +- migration/rdma.c | 2 +- migration/savevm.c | 2 +- monitor/hmp-cmds-target.c | 2 +- stubs/ram-block.c | 2 +- system/dirtylimit.c | 2 +- system/ioport.c | 2 +- system/memory.c | 2 +- system/memory_mapping.c | 2 +- system/physmem.c | 2 +- system/qtest.c | 2 +- target/xtensa/cpu.c | 2 +- tests/qtest/fuzz/generic_fuzz.c | 2 +- tests/qtest/fuzz/qos_fuzz.c | 2 +- tests/unit/test-resv-mem.c | 2 +- ui/console.c | 2 +- util/vfio-helpers.c | 2 +- MAINTAINERS | 2 +- docs/devel/memory.rst | 2 +- scripts/analyze-inclusions | 2 +- 155 files changed, 160 insertions(+), 161 deletions(-) rename include/{exec => system}/memory.h (99%) diff --git a/hw/arm/strongarm.h b/hw/arm/strongarm.h index 192821f6aa..b11b3a3379 100644 --- a/hw/arm/strongarm.h +++ b/hw/arm/strongarm.h @@ -1,7 +1,7 @@ #ifndef STRONGARM_H #define STRONGARM_H -#include "exec/memory.h" +#include "system/memory.h" #include "target/arm/cpu-qom.h" #define SA_CS0 0x00000000 diff --git a/hw/display/apple-gfx.h b/hw/display/apple-gfx.h index 3900cdbabb..a8b1d1efc0 100644 --- a/hw/display/apple-gfx.h +++ b/hw/display/apple-gfx.h @@ -9,7 +9,7 @@ #define QEMU_APPLE_GFX_H #include "qemu/queue.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-properties.h" #include "ui/surface.h" diff --git a/hw/display/framebuffer.h b/hw/display/framebuffer.h index 38fa0dcec6..29a828ce7a 100644 --- a/hw/display/framebuffer.h +++ b/hw/display/framebuffer.h @@ -1,7 +1,7 @@ #ifndef QEMU_FRAMEBUFFER_H #define QEMU_FRAMEBUFFER_H -#include "exec/memory.h" +#include "system/memory.h" /* Framebuffer device helper routines. */ diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index f77c1c1145..60ad26e03e 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -27,7 +27,7 @@ #include "ui/console.h" #include "exec/ioport.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/display/bochs-vbe.h" #include "hw/acpi/acpi_aml_interface.h" diff --git a/hw/hyperv/hv-balloon-our_range_memslots.h b/hw/hyperv/hv-balloon-our_range_memslots.h index df3b686bc7..b1f19d77da 100644 --- a/hw/hyperv/hv-balloon-our_range_memslots.h +++ b/hw/hyperv/hv-balloon-our_range_memslots.h @@ -11,7 +11,7 @@ #define HW_HYPERV_HV_BALLOON_OUR_RANGE_MEMSLOTS_H -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "hv-balloon-page_range_tree.h" diff --git a/hw/intc/ioapic_internal.h b/hw/intc/ioapic_internal.h index 37b8565539..51205767f4 100644 --- a/hw/intc/ioapic_internal.h +++ b/hw/intc/ioapic_internal.h @@ -22,7 +22,7 @@ #ifndef HW_INTC_IOAPIC_INTERNAL_H #define HW_INTC_IOAPIC_INTERNAL_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/intc/ioapic.h" #include "hw/sysbus.h" #include "qemu/notify.h" diff --git a/hw/net/i82596.h b/hw/net/i82596.h index f0bbe810eb..4bdfcaf856 100644 --- a/hw/net/i82596.h +++ b/hw/net/i82596.h @@ -3,7 +3,7 @@ #define I82596_IOPORT_SIZE 0x20 -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #define PORT_RESET 0x00 /* reset 82596 */ diff --git a/hw/net/pcnet.h b/hw/net/pcnet.h index eb7f46aab3..a94356ec30 100644 --- a/hw/net/pcnet.h +++ b/hw/net/pcnet.h @@ -7,7 +7,7 @@ #define PCNET_LOOPTEST_CRC 1 #define PCNET_LOOPTEST_NOCRC 2 -#include "exec/memory.h" +#include "system/memory.h" #include "hw/irq.h" /* BUS CONFIGURATION REGISTERS */ diff --git a/hw/tpm/tpm_ppi.h b/hw/tpm/tpm_ppi.h index bf5d4a300f..88f316ee95 100644 --- a/hw/tpm/tpm_ppi.h +++ b/hw/tpm/tpm_ppi.h @@ -12,7 +12,7 @@ #ifndef TPM_TPM_PPI_H #define TPM_TPM_PPI_H -#include "exec/memory.h" +#include "system/memory.h" typedef struct TPMPPI { MemoryRegion ram; diff --git a/hw/usb/hcd-uhci.h b/hw/usb/hcd-uhci.h index 6d26b94e92..d4664297cf 100644 --- a/hw/usb/hcd-uhci.h +++ b/hw/usb/hcd-uhci.h @@ -28,7 +28,7 @@ #ifndef HW_USB_HCD_UHCI_H #define HW_USB_HCD_UHCI_H -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/timer.h" #include "hw/pci/pci_device.h" #include "hw/usb.h" diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h index d94ecaba68..6c59300248 100644 --- a/hw/vfio/pci.h +++ b/hw/vfio/pci.h @@ -12,7 +12,7 @@ #ifndef HW_VFIO_VFIO_PCI_H #define HW_VFIO_VFIO_PCI_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/pci/pci_device.h" #include "hw/vfio/vfio-common.h" #include "qemu/event_notifier.h" diff --git a/hw/virtio/vhost-iova-tree.h b/hw/virtio/vhost-iova-tree.h index 0c4ba5abd5..08f63b61cd 100644 --- a/hw/virtio/vhost-iova-tree.h +++ b/hw/virtio/vhost-iova-tree.h @@ -11,7 +11,7 @@ #define HW_VIRTIO_VHOST_IOVA_TREE_H #include "qemu/iova-tree.h" -#include "exec/memory.h" +#include "system/memory.h" typedef struct VhostIOVATree VhostIOVATree; diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 33b9dc81eb..4395fd08af 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -22,11 +22,14 @@ #include "exec/page-protection.h" #include "exec/cpu-common.h" #include "exec/cpu-interrupt.h" -#include "exec/memory.h" #include "exec/tswap.h" #include "hw/core/cpu.h" #include "exec/cpu-defs.h" #include "exec/target_page.h" +#ifndef CONFIG_USER_ONLY +#include "system/memory.h" +#endif + CPUArchState *cpu_copy(CPUArchState *env); diff --git a/include/exec/ioport.h b/include/exec/ioport.h index 4397f12f93..ecea3575bc 100644 --- a/include/exec/ioport.h +++ b/include/exec/ioport.h @@ -24,7 +24,7 @@ #ifndef IOPORT_H #define IOPORT_H -#include "exec/memory.h" +#include "system/memory.h" #define MAX_IOPORTS (64 * 1024) #define IOPORTS_MASK (MAX_IOPORTS - 1) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 92e8708af7..8677761af5 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -26,7 +26,7 @@ #include "exec/ramlist.h" #include "exec/ramblock.h" #include "exec/exec-all.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/target_page.h" #include "qemu/rcu.h" diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h index d1a4fa2af8..4b8ee094c4 100644 --- a/include/hw/acpi/acpi.h +++ b/include/hw/acpi/acpi.h @@ -21,7 +21,7 @@ */ #include "qemu/notify.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/acpi/acpi_dev_interface.h" /* diff --git a/include/hw/acpi/ich9_tco.h b/include/hw/acpi/ich9_tco.h index 2562a7cf39..b3c3f69451 100644 --- a/include/hw/acpi/ich9_tco.h +++ b/include/hw/acpi/ich9_tco.h @@ -10,7 +10,7 @@ #ifndef HW_ACPI_TCO_H #define HW_ACPI_TCO_H -#include "exec/memory.h" +#include "system/memory.h" #include "migration/vmstate.h" /* As per ICH9 spec, the internal timer has an error of ~0.6s on every tick */ diff --git a/include/hw/arm/fsl-imx25.h b/include/hw/arm/fsl-imx25.h index df2f83980f..b68d4334a0 100644 --- a/include/hw/arm/fsl-imx25.h +++ b/include/hw/arm/fsl-imx25.h @@ -29,7 +29,7 @@ #include "hw/sd/sdhci.h" #include "hw/usb/chipidea.h" #include "hw/watchdog/wdt_imx2.h" -#include "exec/memory.h" +#include "system/memory.h" #include "target/arm/cpu.h" #include "qom/object.h" diff --git a/include/hw/arm/fsl-imx31.h b/include/hw/arm/fsl-imx31.h index 40c593a5cf..41232a2237 100644 --- a/include/hw/arm/fsl-imx31.h +++ b/include/hw/arm/fsl-imx31.h @@ -25,7 +25,7 @@ #include "hw/i2c/imx_i2c.h" #include "hw/gpio/imx_gpio.h" #include "hw/watchdog/wdt_imx2.h" -#include "exec/memory.h" +#include "system/memory.h" #include "target/arm/cpu.h" #include "qom/object.h" diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h index 9da32fc189..124bbd478f 100644 --- a/include/hw/arm/fsl-imx6.h +++ b/include/hw/arm/fsl-imx6.h @@ -34,7 +34,7 @@ #include "hw/usb/imx-usb-phy.h" #include "hw/pci-host/designware.h" #include "hw/or-irq.h" -#include "exec/memory.h" +#include "system/memory.h" #include "cpu.h" #include "qom/object.h" diff --git a/include/hw/arm/fsl-imx6ul.h b/include/hw/arm/fsl-imx6ul.h index 8277b0e8b2..4e3209b25b 100644 --- a/include/hw/arm/fsl-imx6ul.h +++ b/include/hw/arm/fsl-imx6ul.h @@ -33,7 +33,7 @@ #include "hw/net/imx_fec.h" #include "hw/usb/chipidea.h" #include "hw/usb/imx-usb-phy.h" -#include "exec/memory.h" +#include "system/memory.h" #include "cpu.h" #include "qom/object.h" #include "qemu/units.h" diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index 7cb87ea89c..6185507373 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -20,7 +20,7 @@ #ifndef HW_ARM_OMAP_H #define HW_ARM_OMAP_H -#include "exec/memory.h" +#include "system/memory.h" #include "target/arm/cpu-qom.h" #include "qemu/log.h" #include "qom/object.h" diff --git a/include/hw/arm/stm32l4x5_soc.h b/include/hw/arm/stm32l4x5_soc.h index c243fb0e7f..c2fae6e23f 100644 --- a/include/hw/arm/stm32l4x5_soc.h +++ b/include/hw/arm/stm32l4x5_soc.h @@ -24,7 +24,7 @@ #ifndef HW_ARM_STM32L4x5_SOC_H #define HW_ARM_STM32L4x5_SOC_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/arm/armv7m.h" #include "hw/or-irq.h" #include "hw/misc/stm32l4x5_syscfg.h" diff --git a/include/hw/boards.h b/include/hw/boards.h index bfe8643a27..8556e01e21 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -3,7 +3,7 @@ #ifndef HW_BOARDS_H #define HW_BOARDS_H -#include "exec/memory.h" +#include "system/memory.h" #include "system/hostmem.h" #include "system/blockdev.h" #include "qapi/qapi-types-machine.h" diff --git a/include/hw/char/parallel.h b/include/hw/char/parallel.h index cfb97cc7cc..7b04478226 100644 --- a/include/hw/char/parallel.h +++ b/include/hw/char/parallel.h @@ -1,7 +1,7 @@ #ifndef HW_PARALLEL_H #define HW_PARALLEL_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/isa/isa.h" #include "hw/irq.h" #include "chardev/char-fe.h" diff --git a/include/hw/char/riscv_htif.h b/include/hw/char/riscv_htif.h index df493fdf6b..ee0ca29902 100644 --- a/include/hw/char/riscv_htif.h +++ b/include/hw/char/riscv_htif.h @@ -22,7 +22,7 @@ #include "chardev/char.h" #include "chardev/char-fe.h" -#include "exec/memory.h" +#include "system/memory.h" #define TYPE_HTIF_UART "riscv.htif.uart" diff --git a/include/hw/char/serial-mm.h b/include/hw/char/serial-mm.h index 62a8489d69..77abd098e0 100644 --- a/include/hw/char/serial-mm.h +++ b/include/hw/char/serial-mm.h @@ -27,7 +27,7 @@ #define HW_SERIAL_MM_H #include "hw/char/serial.h" -#include "exec/memory.h" +#include "system/memory.h" #include "chardev/char.h" #include "hw/sysbus.h" #include "qom/object.h" diff --git a/include/hw/char/serial.h b/include/hw/char/serial.h index 942b372df6..4bf90a46f3 100644 --- a/include/hw/char/serial.h +++ b/include/hw/char/serial.h @@ -27,7 +27,7 @@ #define HW_SERIAL_H #include "chardev/char-fe.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/fifo8.h" #include "qom/object.h" diff --git a/include/hw/display/macfb.h b/include/hw/display/macfb.h index 27cebefc9e..0fae1f33a6 100644 --- a/include/hw/display/macfb.h +++ b/include/hw/display/macfb.h @@ -13,7 +13,7 @@ #ifndef MACFB_H #define MACFB_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/irq.h" #include "hw/nubus/nubus.h" #include "hw/sysbus.h" diff --git a/include/hw/fsi/aspeed_apb2opb.h b/include/hw/fsi/aspeed_apb2opb.h index f6a2387abf..878619eafa 100644 --- a/include/hw/fsi/aspeed_apb2opb.h +++ b/include/hw/fsi/aspeed_apb2opb.h @@ -8,7 +8,7 @@ #ifndef FSI_ASPEED_APB2OPB_H #define FSI_ASPEED_APB2OPB_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/fsi/fsi-master.h" #include "hw/sysbus.h" diff --git a/include/hw/fsi/cfam.h b/include/hw/fsi/cfam.h index 7abc3b287b..cceb4bd6f1 100644 --- a/include/hw/fsi/cfam.h +++ b/include/hw/fsi/cfam.h @@ -7,7 +7,7 @@ #ifndef FSI_CFAM_H #define FSI_CFAM_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/fsi/fsi.h" #include "hw/fsi/lbus.h" diff --git a/include/hw/fsi/fsi-master.h b/include/hw/fsi/fsi-master.h index 68e5f56db2..b634ecd393 100644 --- a/include/hw/fsi/fsi-master.h +++ b/include/hw/fsi/fsi-master.h @@ -7,7 +7,7 @@ #ifndef FSI_FSI_MASTER_H #define FSI_FSI_MASTER_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "hw/fsi/fsi.h" #include "hw/fsi/cfam.h" diff --git a/include/hw/fsi/fsi.h b/include/hw/fsi/fsi.h index e00f6ef078..f34765ed80 100644 --- a/include/hw/fsi/fsi.h +++ b/include/hw/fsi/fsi.h @@ -7,7 +7,7 @@ #ifndef FSI_FSI_H #define FSI_FSI_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "hw/fsi/lbus.h" #include "qemu/bitops.h" diff --git a/include/hw/fsi/lbus.h b/include/hw/fsi/lbus.h index 558268c013..12519073cd 100644 --- a/include/hw/fsi/lbus.h +++ b/include/hw/fsi/lbus.h @@ -9,7 +9,7 @@ #include "hw/qdev-core.h" #include "qemu/units.h" -#include "exec/memory.h" +#include "system/memory.h" #define TYPE_FSI_LBUS_DEVICE "fsi.lbus.device" OBJECT_DECLARE_SIMPLE_TYPE(FSILBusDevice, FSI_LBUS_DEVICE) diff --git a/include/hw/gpio/npcm7xx_gpio.h b/include/hw/gpio/npcm7xx_gpio.h index b1d771bd77..7c0bf61a96 100644 --- a/include/hw/gpio/npcm7xx_gpio.h +++ b/include/hw/gpio/npcm7xx_gpio.h @@ -15,7 +15,7 @@ #ifndef NPCM7XX_GPIO_H #define NPCM7XX_GPIO_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" /* Number of pins managed by each controller. */ diff --git a/include/hw/i2c/npcm7xx_smbus.h b/include/hw/i2c/npcm7xx_smbus.h index dc45963c0e..9c544c561b 100644 --- a/include/hw/i2c/npcm7xx_smbus.h +++ b/include/hw/i2c/npcm7xx_smbus.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_SMBUS_H #define NPCM7XX_SMBUS_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/i2c/i2c.h" #include "hw/irq.h" #include "hw/sysbus.h" diff --git a/include/hw/i2c/pm_smbus.h b/include/hw/i2c/pm_smbus.h index 0d74207efb..dafe0df4f6 100644 --- a/include/hw/i2c/pm_smbus.h +++ b/include/hw/i2c/pm_smbus.h @@ -1,7 +1,7 @@ #ifndef PM_SMBUS_H #define PM_SMBUS_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/i2c/smbus_master.h" #define PM_SMBUS_MAX_MSG_SIZE 32 diff --git a/include/hw/i386/apic_internal.h b/include/hw/i386/apic_internal.h index d6e85833da..429278da61 100644 --- a/include/hw/i386/apic_internal.h +++ b/include/hw/i386/apic_internal.h @@ -22,7 +22,7 @@ #define QEMU_APIC_INTERNAL_H #include "cpu.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/timer.h" #include "target/i386/cpu-qom.h" #include "qom/object.h" diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index d43cb3908e..258b1343a1 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -18,7 +18,7 @@ #define HW_I386_X86_H #include "exec/hwaddr.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/boards.h" #include "hw/i386/topology.h" diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index ac0292c634..cd07b87811 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -24,7 +24,7 @@ #ifndef HW_IDE_AHCI_H #define HW_IDE_AHCI_H -#include "exec/memory.h" +#include "system/memory.h" typedef struct AHCIDevice AHCIDevice; diff --git a/include/hw/ipmi/ipmi.h b/include/hw/ipmi/ipmi.h index 802a2febb0..cd581aa134 100644 --- a/include/hw/ipmi/ipmi.h +++ b/include/hw/ipmi/ipmi.h @@ -25,7 +25,7 @@ #ifndef HW_IPMI_H #define HW_IPMI_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/isa/apm.h b/include/hw/isa/apm.h index b6e070c00e..0834539045 100644 --- a/include/hw/isa/apm.h +++ b/include/hw/isa/apm.h @@ -1,7 +1,7 @@ #ifndef APM_H #define APM_H -#include "exec/memory.h" +#include "system/memory.h" #define APM_CNT_IOPORT 0xb2 #define ACPI_PORT_SMI_CMD APM_CNT_IOPORT diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 40d6224a4e..1d852011b3 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -3,7 +3,7 @@ /* ISA bus */ -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ioport.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/m68k/q800.h b/include/hw/m68k/q800.h index 34365c9860..9caaed9692 100644 --- a/include/hw/m68k/q800.h +++ b/include/hw/m68k/q800.h @@ -26,7 +26,7 @@ #include "hw/boards.h" #include "qom/object.h" #include "target/m68k/cpu-qom.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/m68k/q800-glue.h" #include "hw/misc/mac_via.h" #include "hw/net/dp8393x.h" diff --git a/include/hw/mem/npcm7xx_mc.h b/include/hw/mem/npcm7xx_mc.h index 7ed38be243..568cc35fdd 100644 --- a/include/hw/mem/npcm7xx_mc.h +++ b/include/hw/mem/npcm7xx_mc.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_MC_H #define NPCM7XX_MC_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" /** diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index fe0f3ea963..e0dbdd43dc 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -16,7 +16,7 @@ #ifndef QEMU_PC_DIMM_H #define QEMU_PC_DIMM_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/mips/mips.h b/include/hw/mips/mips.h index 101799f7d3..1f3672ba5f 100644 --- a/include/hw/mips/mips.h +++ b/include/hw/mips/mips.h @@ -7,7 +7,7 @@ /* Kernels can be configured with 64KB pages */ #define INITRD_PAGE_SIZE (64 * KiB) -#include "exec/memory.h" +#include "system/memory.h" /* bonito.c */ PCIBus *bonito_init(qemu_irq *pic); diff --git a/include/hw/misc/auxbus.h b/include/hw/misc/auxbus.h index 03cacdee42..ccd18ce209 100644 --- a/include/hw/misc/auxbus.h +++ b/include/hw/misc/auxbus.h @@ -25,7 +25,7 @@ #ifndef HW_MISC_AUXBUS_H #define HW_MISC_AUXBUS_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/misc/ivshmem-flat.h b/include/hw/misc/ivshmem-flat.h index 0c2b015781..09bc3abcad 100644 --- a/include/hw/misc/ivshmem-flat.h +++ b/include/hw/misc/ivshmem-flat.h @@ -14,7 +14,7 @@ #include "qemu/queue.h" #include "qemu/event_notifier.h" #include "chardev/char-fe.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "hw/sysbus.h" diff --git a/include/hw/misc/mac_via.h b/include/hw/misc/mac_via.h index 63cdcf7c69..6a15228150 100644 --- a/include/hw/misc/mac_via.h +++ b/include/hw/misc/mac_via.h @@ -9,7 +9,7 @@ #ifndef HW_MISC_MAC_VIA_H #define HW_MISC_MAC_VIA_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" #include "hw/misc/mos6522.h" #include "hw/input/adb.h" diff --git a/include/hw/misc/npcm7xx_mft.h b/include/hw/misc/npcm7xx_mft.h index d6384382ce..e4b997a6ad 100644 --- a/include/hw/misc/npcm7xx_mft.h +++ b/include/hw/misc/npcm7xx_mft.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_MFT_H #define NPCM7XX_MFT_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/clock.h" #include "hw/irq.h" #include "hw/sysbus.h" diff --git a/include/hw/misc/npcm_clk.h b/include/hw/misc/npcm_clk.h index 8fa1e14bdd..52e972f460 100644 --- a/include/hw/misc/npcm_clk.h +++ b/include/hw/misc/npcm_clk.h @@ -16,7 +16,7 @@ #ifndef NPCM_CLK_H #define NPCM_CLK_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/clock.h" #include "hw/sysbus.h" diff --git a/include/hw/misc/npcm_gcr.h b/include/hw/misc/npcm_gcr.h index d81bb9afb2..702e7fddb1 100644 --- a/include/hw/misc/npcm_gcr.h +++ b/include/hw/misc/npcm_gcr.h @@ -16,7 +16,7 @@ #ifndef NPCM_GCR_H #define NPCM_GCR_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" #include "qom/object.h" diff --git a/include/hw/misc/pvpanic.h b/include/hw/misc/pvpanic.h index 049a94c112..5098693437 100644 --- a/include/hw/misc/pvpanic.h +++ b/include/hw/misc/pvpanic.h @@ -15,7 +15,7 @@ #ifndef HW_MISC_PVPANIC_H #define HW_MISC_PVPANIC_H -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "standard-headers/misc/pvpanic.h" diff --git a/include/hw/net/dp8393x.h b/include/hw/net/dp8393x.h index 4a3f7478be..24273dc1f4 100644 --- a/include/hw/net/dp8393x.h +++ b/include/hw/net/dp8393x.h @@ -22,7 +22,7 @@ #include "hw/sysbus.h" #include "net/net.h" -#include "exec/memory.h" +#include "system/memory.h" #define SONIC_REG_COUNT 0x40 diff --git a/include/hw/net/msf2-emac.h b/include/hw/net/msf2-emac.h index 846ba6e6dc..b5d9127e46 100644 --- a/include/hw/net/msf2-emac.h +++ b/include/hw/net/msf2-emac.h @@ -23,7 +23,7 @@ */ #include "hw/sysbus.h" -#include "exec/memory.h" +#include "system/memory.h" #include "net/net.h" #include "net/eth.h" #include "qom/object.h" diff --git a/include/hw/nvram/mac_nvram.h b/include/hw/nvram/mac_nvram.h index 0c4dfaeff6..e9d8398f84 100644 --- a/include/hw/nvram/mac_nvram.h +++ b/include/hw/nvram/mac_nvram.h @@ -26,7 +26,7 @@ #ifndef MAC_NVRAM_H #define MAC_NVRAM_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" #define MACIO_NVRAM_SIZE 0x2000 diff --git a/include/hw/nvram/npcm7xx_otp.h b/include/hw/nvram/npcm7xx_otp.h index ea4b5d0731..77b05f8b82 100644 --- a/include/hw/nvram/npcm7xx_otp.h +++ b/include/hw/nvram/npcm7xx_otp.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_OTP_H #define NPCM7XX_OTP_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" /* Each OTP module holds 8192 bits of one-time programmable storage */ diff --git a/include/hw/pci-host/fsl_imx8m_phy.h b/include/hw/pci-host/fsl_imx8m_phy.h index 4f4875b37d..5f1b212fd9 100644 --- a/include/hw/pci-host/fsl_imx8m_phy.h +++ b/include/hw/pci-host/fsl_imx8m_phy.h @@ -11,7 +11,7 @@ #include "hw/sysbus.h" #include "qom/object.h" -#include "exec/memory.h" +#include "system/memory.h" #define TYPE_FSL_IMX8M_PCIE_PHY "fsl-imx8m-pcie-phy" OBJECT_DECLARE_SIMPLE_TYPE(FslImx8mPciePhyState, FSL_IMX8M_PCIE_PHY) diff --git a/include/hw/pci-host/pam.h b/include/hw/pci-host/pam.h index 005916f826..44f3908160 100644 --- a/include/hw/pci-host/pam.h +++ b/include/hw/pci-host/pam.h @@ -50,7 +50,7 @@ * 0xf0000 - 0xfffff System BIOS Area Memory Segments */ -#include "exec/memory.h" +#include "system/memory.h" #define SMRAM_C_BASE 0xa0000 #define SMRAM_C_END 0xc0000 diff --git a/include/hw/pci-host/remote.h b/include/hw/pci-host/remote.h index 690a01f0fe..5264c35936 100644 --- a/include/hw/pci-host/remote.h +++ b/include/hw/pci-host/remote.h @@ -11,7 +11,7 @@ #ifndef PCI_HOST_REMOTE_H #define PCI_HOST_REMOTE_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/pci/pcie_host.h" #define TYPE_REMOTE_PCIHOST "remote-pcihost" diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 822fbacdf0..c2fe6caa2c 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -1,7 +1,7 @@ #ifndef QEMU_PCI_H #define QEMU_PCI_H -#include "exec/memory.h" +#include "system/memory.h" #include "system/dma.h" #include "system/host_iommu_device.h" diff --git a/include/hw/pci/pcie_host.h b/include/hw/pci/pcie_host.h index 82d92177da..f09de76bfe 100644 --- a/include/hw/pci/pcie_host.h +++ b/include/hw/pci/pcie_host.h @@ -22,7 +22,7 @@ #define PCIE_HOST_H #include "hw/pci/pci_host.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #define TYPE_PCIE_HOST_BRIDGE "pcie-host-bridge" diff --git a/include/hw/pci/shpc.h b/include/hw/pci/shpc.h index a0789df153..ad1089567a 100644 --- a/include/hw/pci/shpc.h +++ b/include/hw/pci/shpc.h @@ -1,7 +1,7 @@ #ifndef SHPC_H #define SHPC_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/hotplug.h" #include "hw/pci/pci_device.h" #include "migration/vmstate.h" diff --git a/include/hw/ppc/mac_dbdma.h b/include/hw/ppc/mac_dbdma.h index 672c2be471..896ee4a2b1 100644 --- a/include/hw/ppc/mac_dbdma.h +++ b/include/hw/ppc/mac_dbdma.h @@ -23,7 +23,7 @@ #ifndef HW_MAC_DBDMA_H #define HW_MAC_DBDMA_H -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/iov.h" #include "system/dma.h" #include "hw/sysbus.h" diff --git a/include/hw/ppc/pnv_lpc.h b/include/hw/ppc/pnv_lpc.h index 174add4c53..266d56214f 100644 --- a/include/hw/ppc/pnv_lpc.h +++ b/include/hw/ppc/pnv_lpc.h @@ -20,7 +20,7 @@ #ifndef PPC_PNV_LPC_H #define PPC_PNV_LPC_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/ppc/pnv.h" #include "hw/qdev-core.h" #include "hw/isa/isa.h" /* For ISA_NUM_IRQS */ diff --git a/include/hw/ppc/pnv_occ.h b/include/hw/ppc/pnv_occ.h index 3ec42de0ff..013ea2e53e 100644 --- a/include/hw/ppc/pnv_occ.h +++ b/include/hw/ppc/pnv_occ.h @@ -20,7 +20,7 @@ #ifndef PPC_PNV_OCC_H #define PPC_PNV_OCC_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #define TYPE_PNV_OCC "pnv-occ" diff --git a/include/hw/ppc/pnv_sbe.h b/include/hw/ppc/pnv_sbe.h index b6b378ad14..48a8b86a80 100644 --- a/include/hw/ppc/pnv_sbe.h +++ b/include/hw/ppc/pnv_sbe.h @@ -20,7 +20,7 @@ #ifndef PPC_PNV_SBE_H #define PPC_PNV_SBE_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #define TYPE_PNV_SBE "pnv-sbe" diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h index a927aea1c0..b14549db70 100644 --- a/include/hw/ppc/pnv_xscom.h +++ b/include/hw/ppc/pnv_xscom.h @@ -20,7 +20,7 @@ #ifndef PPC_PNV_XSCOM_H #define PPC_PNV_XSCOM_H -#include "exec/memory.h" +#include "system/memory.h" typedef struct PnvXScomInterface PnvXScomInterface; typedef struct PnvChip PnvChip; diff --git a/include/hw/ppc/ppc4xx.h b/include/hw/ppc/ppc4xx.h index 1bd9b8821b..2e94b00673 100644 --- a/include/hw/ppc/ppc4xx.h +++ b/include/hw/ppc/ppc4xx.h @@ -26,7 +26,7 @@ #define PPC4XX_H #include "hw/ppc/ppc.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" /* diff --git a/include/hw/ppc/vof.h b/include/hw/ppc/vof.h index d3f293da8b..2918aaab12 100644 --- a/include/hw/ppc/vof.h +++ b/include/hw/ppc/vof.h @@ -8,7 +8,7 @@ #include "qom/object.h" #include "exec/address-spaces.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/cpu-defs.h" typedef struct Vof { diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index e94d53405f..097fcdf00f 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -28,7 +28,7 @@ #ifndef XICS_H #define XICS_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/register.h b/include/hw/register.h index 6a076cfcdf..a913c52aee 100644 --- a/include/hw/register.h +++ b/include/hw/register.h @@ -12,7 +12,7 @@ #define REGISTER_H #include "hw/qdev-core.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/registerfields.h" #include "qom/object.h" diff --git a/include/hw/remote/proxy-memory-listener.h b/include/hw/remote/proxy-memory-listener.h index c4f3efb928..ec516d8267 100644 --- a/include/hw/remote/proxy-memory-listener.h +++ b/include/hw/remote/proxy-memory-listener.h @@ -9,7 +9,7 @@ #ifndef PROXY_MEMORY_LISTENER_H #define PROXY_MEMORY_LISTENER_H -#include "exec/memory.h" +#include "system/memory.h" #include "io/channel.h" typedef struct ProxyMemoryListener { diff --git a/include/hw/sh4/sh_intc.h b/include/hw/sh4/sh_intc.h index f62d5c5e13..94f183121e 100644 --- a/include/hw/sh4/sh_intc.h +++ b/include/hw/sh4/sh_intc.h @@ -1,7 +1,7 @@ #ifndef SH_INTC_H #define SH_INTC_H -#include "exec/memory.h" +#include "system/memory.h" typedef unsigned char intc_enum; diff --git a/include/hw/southbridge/ich9.h b/include/hw/southbridge/ich9.h index 6c60017024..1e231e89c9 100644 --- a/include/hw/southbridge/ich9.h +++ b/include/hw/southbridge/ich9.h @@ -7,7 +7,7 @@ #include "hw/pci/pci.h" #include "hw/pci/pci_device.h" #include "hw/rtc/mc146818rtc.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/notify.h" #include "qom/object.h" diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index 81bbda10d3..7dc88aaa27 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -4,7 +4,7 @@ /* Devices attached directly to the main system bus. */ #include "hw/qdev-core.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #define QDEV_MAX_MMIO 32 diff --git a/include/hw/timer/npcm7xx_timer.h b/include/hw/timer/npcm7xx_timer.h index d45c051b56..e287375dce 100644 --- a/include/hw/timer/npcm7xx_timer.h +++ b/include/hw/timer/npcm7xx_timer.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_TIMER_H #define NPCM7XX_TIMER_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" #include "qemu/timer.h" diff --git a/include/hw/tricore/tricore.h b/include/hw/tricore/tricore.h index c19ed3f013..4ffc0fe1d6 100644 --- a/include/hw/tricore/tricore.h +++ b/include/hw/tricore/tricore.h @@ -1,7 +1,7 @@ #ifndef HW_TRICORE_H #define HW_TRICORE_H -#include "exec/memory.h" +#include "system/memory.h" struct tricore_boot_info { uint64_t ram_size; diff --git a/include/hw/usb.h b/include/hw/usb.h index e410693d0c..26a9f3ecde 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -25,7 +25,7 @@ * THE SOFTWARE. */ -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "qemu/iov.h" #include "qemu/queue.h" diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 04b123a6c9..f5b3f45a43 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -21,7 +21,7 @@ #ifndef HW_VFIO_VFIO_COMMON_H #define HW_VFIO_VFIO_COMMON_H -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/queue.h" #include "qemu/notify.h" #include "ui/console.h" diff --git a/include/hw/vfio/vfio-container-base.h b/include/hw/vfio/vfio-container-base.h index 4cff9943ab..6aca02fb3d 100644 --- a/include/hw/vfio/vfio-container-base.h +++ b/include/hw/vfio/vfio-container-base.h @@ -13,7 +13,7 @@ #ifndef HW_VFIO_VFIO_CONTAINER_BASE_H #define HW_VFIO_VFIO_CONTAINER_BASE_H -#include "exec/memory.h" +#include "system/memory.h" typedef struct VFIODevice VFIODevice; typedef struct VFIOIOMMUClass VFIOIOMMUClass; diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h index 70c2e8ffee..d6df209a2f 100644 --- a/include/hw/virtio/vhost-backend.h +++ b/include/hw/virtio/vhost-backend.h @@ -11,7 +11,7 @@ #ifndef VHOST_BACKEND_H #define VHOST_BACKEND_H -#include "exec/memory.h" +#include "system/memory.h" typedef enum VhostBackendType { VHOST_BACKEND_TYPE_NONE = 0, diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index a9469d50bc..bb4b58e115 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -3,7 +3,7 @@ #include "hw/virtio/vhost-backend.h" #include "hw/virtio/virtio.h" -#include "exec/memory.h" +#include "system/memory.h" #define VHOST_F_DEVICE_IOTLB 63 #define VHOST_USER_F_PROTOCOL_FEATURES 30 diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 6386910280..7e0c471ea4 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -14,7 +14,7 @@ #ifndef QEMU_VIRTIO_H #define QEMU_VIRTIO_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "net/net.h" #include "migration/vmstate.h" diff --git a/include/hw/xen/xen-pvh-common.h b/include/hw/xen/xen-pvh-common.h index 17c5a58a5a..5db83d88ec 100644 --- a/include/hw/xen/xen-pvh-common.h +++ b/include/hw/xen/xen-pvh-common.h @@ -9,7 +9,7 @@ #ifndef XEN_PVH_COMMON_H__ #define XEN_PVH_COMMON_H__ -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "hw/boards.h" #include "hw/pci-host/gpex.h" diff --git a/include/hw/xtensa/mx_pic.h b/include/hw/xtensa/mx_pic.h index 500424c8d3..cd316d86eb 100644 --- a/include/hw/xtensa/mx_pic.h +++ b/include/hw/xtensa/mx_pic.h @@ -28,7 +28,7 @@ #ifndef XTENSA_MX_PIC_H #define XTENSA_MX_PIC_H -#include "exec/memory.h" +#include "system/memory.h" struct XtensaMxPic; typedef struct XtensaMxPic XtensaMxPic; diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h index 16d354a814..14e82a22d5 100644 --- a/include/qemu/iova-tree.h +++ b/include/qemu/iova-tree.h @@ -23,7 +23,7 @@ * for the thread safety issue. */ -#include "exec/memory.h" +#include "system/memory.h" #include "exec/hwaddr.h" #define IOVA_OK (0) diff --git a/include/qemu/reserved-region.h b/include/qemu/reserved-region.h index 8e6f0a97e2..9026cf08fd 100644 --- a/include/qemu/reserved-region.h +++ b/include/qemu/reserved-region.h @@ -20,7 +20,7 @@ #ifndef QEMU_RESERVED_REGION_H #define QEMU_RESERVED_REGION_H -#include "exec/memory.h" +#include "system/memory.h" /* * Insert a new region into a sorted list of reserved regions. In case diff --git a/include/system/dma.h b/include/system/dma.h index e142f7efa6..aaa03b9711 100644 --- a/include/system/dma.h +++ b/include/system/dma.h @@ -10,7 +10,7 @@ #ifndef DMA_H #define DMA_H -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "block/block.h" #include "block/accounting.h" diff --git a/include/system/hostmem.h b/include/system/hostmem.h index 62642e602c..88fa791ac7 100644 --- a/include/system/hostmem.h +++ b/include/system/hostmem.h @@ -16,7 +16,7 @@ #include "system/numa.h" #include "qapi/qapi-types-machine.h" #include "qom/object.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/bitmap.h" #include "qemu/thread-context.h" diff --git a/include/system/kvm_int.h b/include/system/kvm_int.h index 4de6106869..756a3c0a25 100644 --- a/include/system/kvm_int.h +++ b/include/system/kvm_int.h @@ -9,7 +9,7 @@ #ifndef QEMU_KVM_INT_H #define QEMU_KVM_INT_H -#include "exec/memory.h" +#include "system/memory.h" #include "qapi/qapi-types-common.h" #include "qemu/accel.h" #include "qemu/queue.h" diff --git a/include/exec/memory.h b/include/system/memory.h similarity index 99% rename from include/exec/memory.h rename to include/system/memory.h index 2f84a7cfed..fbbf4cf911 100644 --- a/include/exec/memory.h +++ b/include/system/memory.h @@ -11,10 +11,8 @@ * */ -#ifndef MEMORY_H -#define MEMORY_H - -#ifndef CONFIG_USER_ONLY +#ifndef SYSTEM_MEMORY_H +#define SYSTEM_MEMORY_H #include "exec/cpu-common.h" #include "exec/hwaddr.h" @@ -3197,5 +3195,3 @@ void ram_block_add_cpr_blocker(RAMBlock *rb, Error **errp); void ram_block_del_cpr_blocker(RAMBlock *rb); #endif - -#endif diff --git a/include/system/vhost-user-backend.h b/include/system/vhost-user-backend.h index 327b0b84f1..5ed953cd53 100644 --- a/include/system/vhost-user-backend.h +++ b/include/system/vhost-user-backend.h @@ -13,7 +13,7 @@ #define QEMU_VHOST_USER_BACKEND_H #include "qom/object.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/option.h" #include "qemu/bitmap.h" #include "hw/virtio/vhost.h" diff --git a/migration/rdma.h b/migration/rdma.h index f55f28bbed..4d3386b84a 100644 --- a/migration/rdma.h +++ b/migration/rdma.h @@ -19,7 +19,7 @@ #ifndef QEMU_MIGRATION_RDMA_H #define QEMU_MIGRATION_RDMA_H -#include "exec/memory.h" +#include "system/memory.h" void rdma_start_outgoing_migration(void *opaque, InetSocketAddress *host_port, Error **errp); diff --git a/rust/wrapper.h b/rust/wrapper.h index d4fec54657..94866b7e32 100644 --- a/rust/wrapper.h +++ b/rust/wrapper.h @@ -52,7 +52,7 @@ typedef enum memory_order { #include "qemu-io.h" #include "system/system.h" #include "hw/sysbus.h" -#include "exec/memory.h" +#include "system/memory.h" #include "chardev/char-fe.h" #include "hw/clock.h" #include "hw/qdev-clock.h" diff --git a/target/avr/cpu.h b/target/avr/cpu.h index 9862705c6a..b0518a1f60 100644 --- a/target/avr/cpu.h +++ b/target/avr/cpu.h @@ -23,7 +23,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" -#include "exec/memory.h" +#include "system/memory.h" #ifdef CONFIG_USER_ONLY #error "AVR 8-bit does not support user mode" diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 254e4fbdcd..02ef6ddecb 100644 --- a/target/loongarch/cpu.h +++ b/target/loongarch/cpu.h @@ -14,7 +14,7 @@ #include "hw/registerfields.h" #include "qemu/timer.h" #ifndef CONFIG_USER_ONLY -#include "exec/memory.h" +#include "system/memory.h" #endif #include "cpu-csr.h" #include "cpu-qom.h" diff --git a/target/mips/cpu.h b/target/mips/cpu.h index f6877ece8b..9ef72a95d7 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -4,7 +4,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" #ifndef CONFIG_USER_ONLY -#include "exec/memory.h" +#include "system/memory.h" #endif #include "fpu/softfloat-types.h" #include "hw/clock.h" diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 951e8214e0..9e06a95f75 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -33,7 +33,7 @@ #include "system/cpus.h" #include "system/accel-blocker.h" #include "qemu/bswap.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ram_addr.h" #include "qemu/event_notifier.h" #include "qemu/main-loop.h" diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 2817c9dbdd..6f0ea9067b 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -22,7 +22,7 @@ #include "accel/tcg/cpu-ops.h" #include "exec/exec-all.h" #include "exec/page-protection.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/cpu_ldst.h" #include "exec/cputlb.h" #include "exec/tb-flush.h" diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c index f07a2656ce..f2d1739e33 100644 --- a/backends/tpm/tpm_util.c +++ b/backends/tpm/tpm_util.c @@ -25,7 +25,7 @@ #include "qapi/error.h" #include "qapi/visitor.h" #include "tpm_int.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-properties.h" #include "system/tpm_backend.h" #include "system/tpm_util.h" diff --git a/block/blkio.c b/block/blkio.c index 5f4fce2b1b..4142673984 100644 --- a/block/blkio.c +++ b/block/blkio.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include #include "block/block_int.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/cpu-common.h" /* for qemu_ram_get_fd() */ #include "qemu/defer-call.h" #include "qapi/error.h" @@ -19,7 +19,7 @@ #include "qobject/qdict.h" #include "qemu/module.h" #include "system/block-backend.h" -#include "exec/memory.h" /* for ram_block_discard_disable() */ +#include "system/memory.h" /* for ram_block_discard_disable() */ #include "block/block-io.h" diff --git a/disas/disas-mon.c b/disas/disas-mon.c index 37bf16ac79..9c693618c2 100644 --- a/disas/disas-mon.c +++ b/disas/disas-mon.c @@ -7,7 +7,7 @@ #include "qemu/osdep.h" #include "disas-internal.h" #include "disas/disas.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/core/cpu.h" #include "monitor/monitor.h" diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c index ec64f92893..5c4c1dc638 100644 --- a/hw/acpi/erst.c +++ b/hw/acpi/erst.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/qdev-core.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "hw/pci/pci_device.h" #include "qom/object_interfaces.h" diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c index 11fab184de..cb721c96b7 100644 --- a/hw/avr/atmega.c +++ b/hw/avr/atmega.c @@ -12,7 +12,7 @@ #include "qemu/module.h" #include "qemu/units.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "system/system.h" #include "hw/qdev-properties.h" diff --git a/hw/block/fdc-sysbus.c b/hw/block/fdc-sysbus.c index 381b492aec..4955e478cd 100644 --- a/hw/block/fdc-sysbus.c +++ b/hw/block/fdc-sysbus.c @@ -26,7 +26,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qom/object.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" #include "hw/block/fdc.h" #include "migration/vmstate.h" diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index aed5076ec7..5ef8c24b5b 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -22,7 +22,7 @@ #include "qapi/error.h" #include "exec/address-spaces.h" #include "exec/cputlb.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/tb-flush.h" #include "exec/tswap.h" #include "hw/qdev-core.h" diff --git a/hw/core/loader-fit.c b/hw/core/loader-fit.c index 6eb66406b0..2dea485ae0 100644 --- a/hw/core/loader-fit.c +++ b/hw/core/loader-fit.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/units.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/loader.h" #include "hw/loader-fit.h" #include "qemu/cutils.h" diff --git a/hw/core/loader.c b/hw/core/loader.c index 2e35f0aa90..a3aa62d132 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -59,7 +59,7 @@ #include "uboot_image.h" #include "hw/loader.h" #include "hw/nvram/fw_cfg.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/boards.h" #include "qemu/cutils.h" #include "system/runstate.h" diff --git a/hw/display/edid-region.c b/hw/display/edid-region.c index 675429dc18..f1596fba9a 100644 --- a/hw/display/edid-region.c +++ b/hw/display/edid-region.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/display/edid.h" static uint64_t edid_region_read(void *ptr, hwaddr addr, unsigned size) diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index 831e04f214..382c62d668 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -12,7 +12,7 @@ #include "qemu/module.h" #include "qapi/error.h" #include "exec/address-spaces.h" -#include "exec/memory.h" +#include "system/memory.h" #include "system/kvm.h" #include "qemu/bitops.h" #include "qemu/error-report.h" diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c index 0cc2919bb8..7bd08067a7 100644 --- a/hw/i386/acpi-common.c +++ b/hw/i386/acpi-common.c @@ -23,7 +23,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/acpi/acpi.h" #include "hw/acpi/aml-build.h" #include "hw/acpi/utils.h" diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c index 279da6b4aa..bc6571778c 100644 --- a/hw/i386/acpi-microvm.c +++ b/hw/i386/acpi-microvm.c @@ -24,7 +24,7 @@ #include "qemu/cutils.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/acpi/acpi.h" #include "hw/acpi/acpi_aml_interface.h" #include "hw/acpi/aml-build.h" diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index dbb59df64f..0dce512f18 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -47,7 +47,7 @@ #include "hw/i386/kvm/clock.h" #include "hw/sysbus.h" #include "hw/i2c/smbus_eeprom.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/acpi/acpi.h" #include "qapi/error.h" #include "qemu/error-report.h" diff --git a/hw/intc/mips_gic.c b/hw/intc/mips_gic.c index 5e3cbeabec..12d3908938 100644 --- a/hw/intc/mips_gic.c +++ b/hw/intc/mips_gic.c @@ -14,7 +14,7 @@ #include "qemu/module.h" #include "qapi/error.h" #include "hw/sysbus.h" -#include "exec/memory.h" +#include "system/memory.h" #include "system/kvm.h" #include "system/reset.h" #include "kvm_mips.h" diff --git a/hw/intc/ompic.c b/hw/intc/ompic.c index 42af4567c6..169baf2ded 100644 --- a/hw/intc/ompic.c +++ b/hw/intc/ompic.c @@ -13,7 +13,7 @@ #include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "migration/vmstate.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #define TYPE_OR1K_OMPIC "or1k-ompic" diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index b482c5f3af..b1923c8c3e 100644 --- a/hw/net/ne2000.c +++ b/hw/net/ne2000.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "net/eth.h" #include "qemu/module.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/irq.h" #include "migration/vmstate.h" #include "ne2000.h" diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index 0a91a8ae6c..4931ea24f6 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -28,7 +28,7 @@ #include "hw/pci/shpc.h" #include "hw/pci/slotid_cap.h" #include "hw/qdev-properties.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/pci/pci_bus.h" #include "hw/hotplug.h" #include "qom/object.h" diff --git a/hw/pci-host/remote.c b/hw/pci-host/remote.c index bfb25ef6af..be077d075e 100644 --- a/hw/pci-host/remote.c +++ b/hw/pci-host/remote.c @@ -28,7 +28,7 @@ #include "hw/pci/pcie_host.h" #include "hw/qdev-properties.h" #include "hw/pci-host/remote.h" -#include "exec/memory.h" +#include "system/memory.h" static const char *remote_pcihost_root_bus_path(PCIHostState *host_bridge, PCIBus *rootbus) diff --git a/hw/ppc/pnv_homer.c b/hw/ppc/pnv_homer.c index 18a53a80c1..0521f9a428 100644 --- a/hw/ppc/pnv_homer.c +++ b/hw/ppc/pnv_homer.c @@ -20,7 +20,7 @@ #include "qemu/log.h" #include "qapi/error.h" #include "exec/hwaddr.h" -#include "exec/memory.h" +#include "system/memory.h" #include "system/cpus.h" #include "hw/qdev-core.h" #include "hw/qdev-properties.h" diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 7dc3b309c8..a070de23cf 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -24,7 +24,7 @@ #include "exec/page-protection.h" #include "hw/loader.h" #include "elf.h" -#include "exec/memory.h" +#include "system/memory.h" #include "ppc440.h" #include "hw/pci-host/ppc4xx.h" #include "hw/block/flash.h" diff --git a/hw/remote/iommu.c b/hw/remote/iommu.c index 7c56aad0fc..ec845d1f58 100644 --- a/hw/remote/iommu.c +++ b/hw/remote/iommu.c @@ -13,7 +13,7 @@ #include "hw/remote/iommu.h" #include "hw/pci/pci_bus.h" #include "hw/pci/pci.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "trace.h" diff --git a/hw/remote/machine.c b/hw/remote/machine.c index fdc6c441bb..d4616025e8 100644 --- a/hw/remote/machine.c +++ b/hw/remote/machine.c @@ -16,7 +16,7 @@ #include "qemu/osdep.h" #include "hw/remote/machine.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qapi/error.h" #include "hw/pci/pci_host.h" #include "hw/remote/iohub.h" diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c index a926f61ebe..ce7f5b9bfb 100644 --- a/hw/remote/proxy-memory-listener.c +++ b/hw/remote/proxy-memory-listener.c @@ -10,7 +10,7 @@ #include "qemu/int128.h" #include "qemu/range.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/cpu-common.h" #include "exec/ram_addr.h" #include "qapi/error.h" diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c index 6e51a92856..9bdd0a465b 100644 --- a/hw/remote/vfio-user-obj.c +++ b/hw/remote/vfio-user-obj.c @@ -57,7 +57,7 @@ #include "hw/qdev-core.h" #include "hw/pci/pci.h" #include "qemu/timer.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/pci/msi.h" #include "hw/pci/msix.h" #include "hw/remote/vfio-user-obj.h" diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 8cdeb6cb7f..b4e003c19c 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "exec/memop.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/error-report.h" #include "system/hw_accel.h" #include "hw/boards.h" diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c index 7788939766..d4fa32c9d6 100644 --- a/hw/timer/sh_timer.c +++ b/hw/timer/sh_timer.c @@ -9,7 +9,7 @@ */ #include "qemu/osdep.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/log.h" #include "hw/irq.h" #include "hw/sh4/sh.h" diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 1a0d9290f8..989c6ee83d 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -28,7 +28,7 @@ #include "hw/vfio/vfio-common.h" #include "hw/vfio/pci.h" #include "exec/address-spaces.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ram_addr.h" #include "exec/target_page.h" #include "hw/hw.h" diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 7c57bdd27b..1d1c5f9a77 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -24,7 +24,7 @@ #include "hw/vfio/vfio-common.h" #include "exec/address-spaces.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ram_addr.h" #include "qemu/error-report.h" #include "qemu/range.h" diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 67bc57409c..96c6bf5654 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -28,7 +28,7 @@ #include "qemu/main-loop.h" #include "qemu/module.h" #include "qemu/range.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "qemu/queue.h" #include "hw/sysbus.h" diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c index 1cea29c66d..49d17e7bb2 100644 --- a/hw/xtensa/sim.c +++ b/hw/xtensa/sim.c @@ -32,7 +32,7 @@ #include "hw/boards.h" #include "hw/loader.h" #include "elf.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/error-report.h" #include "xtensa_memory.h" #include "xtensa_sim.h" diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c index b08404fc17..b10866ccd8 100644 --- a/hw/xtensa/virt.c +++ b/hw/xtensa/virt.c @@ -33,7 +33,7 @@ #include "hw/pci-host/gpex.h" #include "net/net.h" #include "elf.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/error-report.h" #include "xtensa_memory.h" #include "xtensa_sim.h" diff --git a/hw/xtensa/xtensa_memory.c b/hw/xtensa/xtensa_memory.c index 2c1095f017..13a6077d86 100644 --- a/hw/xtensa/xtensa_memory.c +++ b/hw/xtensa/xtensa_memory.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/error-report.h" #include "xtensa_memory.h" diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index 3f3677f1c9..3bd0ef8268 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -34,7 +34,7 @@ #include "hw/loader.h" #include "hw/qdev-properties.h" #include "elf.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/tswap.h" #include "hw/char/serial-mm.h" #include "net/net.h" diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index 4cd14779d6..09caf92f87 100644 --- a/migration/dirtyrate.c +++ b/migration/dirtyrate.c @@ -27,7 +27,7 @@ #include "qobject/qdict.h" #include "system/kvm.h" #include "system/runstate.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/xxhash.h" #include "migration.h" diff --git a/migration/rdma.c b/migration/rdma.c index 76fb034923..d9603ab603 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -30,7 +30,7 @@ #include "qemu/sockets.h" #include "qemu/bitmap.h" #include "qemu/coroutine.h" -#include "exec/memory.h" +#include "system/memory.h" #include #include #include diff --git a/migration/savevm.c b/migration/savevm.c index ce158c3512..c33200a33f 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -48,7 +48,7 @@ #include "qapi/qapi-builtin-visit.h" #include "qemu/error-report.h" #include "system/cpus.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/target_page.h" #include "trace.h" #include "qemu/iov.h" diff --git a/monitor/hmp-cmds-target.c b/monitor/hmp-cmds-target.c index 239c2a61a4..6654d31406 100644 --- a/monitor/hmp-cmds-target.c +++ b/monitor/hmp-cmds-target.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "disas/disas.h" #include "exec/address-spaces.h" -#include "exec/memory.h" +#include "system/memory.h" #include "monitor/hmp-target.h" #include "monitor/monitor-internal.h" #include "qapi/error.h" diff --git a/stubs/ram-block.c b/stubs/ram-block.c index 108197683b..e88fab31a5 100644 --- a/stubs/ram-block.c +++ b/stubs/ram-block.c @@ -1,7 +1,7 @@ #include "qemu/osdep.h" #include "exec/ramlist.h" #include "exec/cpu-common.h" -#include "exec/memory.h" +#include "system/memory.h" void *qemu_ram_get_host_addr(RAMBlock *rb) { diff --git a/system/dirtylimit.c b/system/dirtylimit.c index 7dedef8dd4..30cd09f3d1 100644 --- a/system/dirtylimit.c +++ b/system/dirtylimit.c @@ -19,7 +19,7 @@ #include "system/dirtylimit.h" #include "monitor/hmp.h" #include "monitor/monitor.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/target_page.h" #include "hw/boards.h" #include "system/kvm.h" diff --git a/system/ioport.c b/system/ioport.c index 89daae9d60..2291739039 100644 --- a/system/ioport.c +++ b/system/ioport.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "exec/ioport.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "trace.h" diff --git a/system/memory.c b/system/memory.c index eddd21a6cd..2865d0deb1 100644 --- a/system/memory.c +++ b/system/memory.c @@ -16,7 +16,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qapi/visitor.h" #include "qemu/bitops.h" #include "qemu/error-report.h" diff --git a/system/memory_mapping.c b/system/memory_mapping.c index 37d3325f77..8538a8241e 100644 --- a/system/memory_mapping.c +++ b/system/memory_mapping.c @@ -16,7 +16,7 @@ #include "qapi/error.h" #include "system/memory_mapping.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "hw/core/cpu.h" diff --git a/system/physmem.c b/system/physmem.c index 333a5eb94d..e61fea41b5 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -50,7 +50,7 @@ #include "qemu/log.h" #include "qemu/memalign.h" #include "qemu/memfd.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ioport.h" #include "system/dma.h" #include "system/hostmem.h" diff --git a/system/qtest.c b/system/qtest.c index 12152efbcd..5407289154 100644 --- a/system/qtest.c +++ b/system/qtest.c @@ -17,7 +17,7 @@ #include "system/runstate.h" #include "chardev/char-fe.h" #include "exec/ioport.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/tswap.h" #include "hw/qdev-core.h" #include "hw/irq.h" diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 7663b62d01..ec6a0a8b66 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -36,7 +36,7 @@ #include "migration/vmstate.h" #include "hw/qdev-clock.h" #ifndef CONFIG_USER_ONLY -#include "exec/memory.h" +#include "system/memory.h" #endif diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index d107a496da..239be9372d 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -20,7 +20,7 @@ #include "tests/qtest/libqos/pci-pc.h" #include "fuzz.h" #include "string.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ramblock.h" #include "hw/qdev-core.h" #include "hw/pci/pci.h" diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c index d3839bf999..9afe8bf6d8 100644 --- a/tests/qtest/fuzz/qos_fuzz.c +++ b/tests/qtest/fuzz/qos_fuzz.c @@ -19,7 +19,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/main-loop.h" #include "tests/qtest/libqtest.h" diff --git a/tests/unit/test-resv-mem.c b/tests/unit/test-resv-mem.c index cd8f7318cc..4de2d042d1 100644 --- a/tests/unit/test-resv-mem.c +++ b/tests/unit/test-resv-mem.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "qemu/range.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/reserved-region.h" #define DEBUG 0 diff --git a/ui/console.c b/ui/console.c index 6456e8dd90..6cd122cf40 100644 --- a/ui/console.c +++ b/ui/console.c @@ -35,7 +35,7 @@ #include "qemu/option.h" #include "chardev/char.h" #include "trace.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "qemu/memfd.h" diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c index f8bab46c68..fdff042ab4 100644 --- a/util/vfio-helpers.c +++ b/util/vfio-helpers.c @@ -16,7 +16,7 @@ #include "qapi/error.h" #include "exec/ramlist.h" #include "exec/cpu-common.h" -#include "exec/memory.h" +#include "system/memory.h" #include "trace.h" #include "qemu/error-report.h" #include "standard-headers/linux/pci_regs.h" diff --git a/MAINTAINERS b/MAINTAINERS index 04573e2934..5d391cfaa7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3120,7 +3120,7 @@ R: Philippe Mathieu-Daudé S: Supported F: include/exec/ioport.h F: include/exec/memop.h -F: include/exec/memory.h +F: include/system/memory.h F: include/exec/ram_addr.h F: include/exec/ramblock.h F: include/system/memory_mapping.h diff --git a/docs/devel/memory.rst b/docs/devel/memory.rst index 69c5e3f914..57fb2aec76 100644 --- a/docs/devel/memory.rst +++ b/docs/devel/memory.rst @@ -369,4 +369,4 @@ callbacks are called: API Reference ------------- -.. kernel-doc:: include/exec/memory.h +.. kernel-doc:: include/system/memory.h diff --git a/scripts/analyze-inclusions b/scripts/analyze-inclusions index b6280f25c8..d2c566667d 100644 --- a/scripts/analyze-inclusions +++ b/scripts/analyze-inclusions @@ -53,7 +53,7 @@ echo $(grep_include -F 'trace/generated-tracers.h') files include generated-trac echo $(grep_include -F 'qapi/error.h') files include qapi/error.h echo $(grep_include -F 'qom/object.h') files include qom/object.h echo $(grep_include -F 'block/aio.h') files include block/aio.h -echo $(grep_include -F 'exec/memory.h') files include exec/memory.h +echo $(grep_include -F 'system/memory.h') files include system/memory.h echo $(grep_include -F 'fpu/softfloat.h') files include fpu/softfloat.h echo $(grep_include -F 'qemu/bswap.h') files include qemu/bswap.h echo From patchwork Thu Apr 24 00:47:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883775 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3198564wrs; Wed, 23 Apr 2025 17:53:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXIlbrPx9l4q7+CRFEFp3BOrumAaFGy4fyG4jK1kNoSCTjyaAO2KVmLZLAFr0DjsA9LqYUiHw==@linaro.org X-Google-Smtp-Source: AGHT+IGGvJZZF7Vpf0UHVQ/kqlX8b/dOUivj5aZJplzAHW86p9AaoOrHd8ZZdHNIazxX2VDT2BhJ X-Received: by 2002:a05:620a:2801:b0:7c5:4278:d15e with SMTP id af79cd13be357-7c956ed8709mr128424785a.33.1745456016111; Wed, 23 Apr 2025 17:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456016; cv=none; d=google.com; s=arc-20240605; b=Jr0HZvFQGyVbk0aLiP09v8eywu8dwkBEq/52kZ73Nmg6hhlD3aJ2Tve/MYu5/Z16XT WcrkPCnnEEr7+HMC5804YZOSpqAgbe4jVgL3+HwWLAL8y7V8hmV+ihrO35UXvZu4zUzT 3CRysjnENx75r5FsK2Qqf1mCCmzGhaUAZZ6avYaAmxP1LbNzW1Gm5pRldk6HSTVbJ9Iv etBpIo6dM3pIA+W/s0sIhM7gHS4yW2N/+AvOe4q6HNhofCdF8S4xcNWHatEtgpsg84pL 3SYUOdglHrvGkxPcAm+vULjr8PrMFNYOyqpjz3YreAkg+pp//dXKV/7MR0JLZox2fjc4 jSrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5kZPLSi0I/839SBk5bYVcQc01SiIQSBWNgwmUqYkDS4=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=EL0hVwXizdWYHSKillCBbViTRvKmTxX8yvAxSSJ3SS3rHoS2EXDKij9jX5EUY02rE0 fAhTXUDlRBShZeoRaCsxGYjWXiWRPVcnSJYRhbc2qdM7zSJCerfQebqsqdjHO7GSVyke ZD1gYRswoYUScp4xry5SuaCas1dFm2UE7cHbVdQYc6SURK4Nq2xpYN8c8kItXja6gSye VjgRR3awL2Bs9RDIdLnt7LV+P0B7+zkbQ1Lu9woMHiYogf/ENKX+u++ZNhMPr2W/Gd0C AlyPsepHygW/YyUV1SJ4WVhrQOl4/vLF5C6Ss5KWEmK8g+GdcFt47aW1gNIHRqRVXsut YWyw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ev2jb5ih; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958cd5d81si20744685a.189.2025.04.23.17.53.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:53:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ev2jb5ih; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ko0-0006eE-Is; Wed, 23 Apr 2025 20:51: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 1u7kn7-0005ex-5H for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:20 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmy-0004Ot-EE for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:11 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-73bb647eb23so343205b3a.0 for ; Wed, 23 Apr 2025 17:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455802; x=1746060602; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5kZPLSi0I/839SBk5bYVcQc01SiIQSBWNgwmUqYkDS4=; b=Ev2jb5ihrDQkp5ocejG+VXDCXUJIfRq6ceISVVyC+stjeFR0lGrvE/InEZDJZTkj7w b9rWGxZ3W6WIsiQ0yj1iReHBt/VIbPSn/qE3gSUIW4K3GONviKZcK2VTtk11mfVemfTl ROLFg6aJWcrdD0+VthYwpeTGGzoirlVynKtIseBx2GYcossdiv0hndp7nTjhi4idyCWS kc86WKRkw1eXniJ/ziFdGCnb1iWQURAOkTLWawYZ4LfENDZZp6CpF7mTJ3KyTsEqco9W BYqcztm+05+q7V1Jn/Gu7yDU2JXLqbylDzCdRoE4m+PsgnRZk9+IebQ1eDIdXE5gSUjB 14kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455802; x=1746060602; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5kZPLSi0I/839SBk5bYVcQc01SiIQSBWNgwmUqYkDS4=; b=lEBkgscQdrpC/HbJH3Udzh+w70ZpYl6Fsmtnsm6otxwDlnRkJkt0jMMHnfCMAMoryw xNcvas9ecLgFVlLwzq2xzhzIBUAVeTg7qSN+YKS5Q+Zxvh3uCvSAgtglayJNgG3SbliU +eKdCtxovce+sstBvTyERui8f3W1C3F3AaVRKO7Zka1gxPpbQSyNZ2HEef6QuUBULHsg p+kJcU/XXw1ywA/NZA6XqxE5KytQPuRXeS8QEQ8QrDA7+XjO8YmeavaESEyz/CbwBgde ZY0DLv4xwK7xrW6lKSOJRr7G18QLUZl44iQeKcay/mpxYXyG4DkIBcGfCKHyFt0effPm /sRg== X-Gm-Message-State: AOJu0Yx4kVvpmcl/GsTaudbGBewrsycg4pmW3Ndgkv28pH9Ap98CNpoz 2mj+djcZni4xFku2XoqfbIPZKlUlT3zuN9YrtCbhZ7hv9akiI46NR+h1WepvIrZvrPg23hdF8V6 E X-Gm-Gg: ASbGncvst0GiaP2wubxxLOIRcHmHdnhP67Uj3g4aJWiVmzP/X09VLne3UYKBPLErSQD GdqHVwaYSIMpkWIiEVcisBcz0hhltHh5KUZhnuv5zN/g0CHJ0WomlWIw7X4Uecrm5HWyg5Vfj6K xCw+y42VEv0Ebxtd6uPSbjM4DduMXVYhTu/z/tbrVZaQo8Gn+U3K4fQqtd+UArvYYEhzVCjRMpM nU52lEdQCXb6KNcmqwaK3JTqhIoP+YcZiqDtsYzgPzTxIlGPa1dFlvHdmy2w2oBmjTiUHPUdtER hntwC6ehqtIz9kSjfrHxHwspwLBnLPd85gC6EAiWBRpTIlkQuJx1AOMg6kSqCuQIFK41yaSAjR8 = X-Received: by 2002:a05:6a00:894:b0:736:5dc6:a14b with SMTP id d2e1a72fcca58-73e2463af46mr968786b3a.13.1745455801452; Wed, 23 Apr 2025 17:50:01 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.50.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:50:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 035/148] include/system: Move exec/address-spaces.h to system/address-spaces.h Date: Wed, 23 Apr 2025 17:47:40 -0700 Message-ID: <20250424004934.598783-36-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the existing includes with sed. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- hw/net/i82596.h | 2 +- hw/s390x/ipl.h | 2 +- include/hw/misc/lasi.h | 2 +- include/hw/nubus/nubus.h | 2 +- include/hw/ppc/vof.h | 2 +- include/hw/tricore/triboard.h | 2 +- include/{exec => system}/address-spaces.h | 8 ++------ include/system/dma.h | 2 +- rust/wrapper.h | 2 +- target/i386/hvf/vmx.h | 2 +- accel/hvf/hvf-accel-ops.c | 2 +- hw/acpi/erst.c | 2 +- hw/arm/aspeed_ast10x0.c | 2 +- hw/arm/bananapi_m2u.c | 2 +- hw/arm/collie.c | 2 +- hw/arm/exynos4_boards.c | 2 +- hw/arm/fsl-imx31.c | 2 +- hw/arm/fsl-imx8mp.c | 2 +- hw/arm/imx8mp-evk.c | 2 +- hw/arm/integratorcp.c | 2 +- hw/arm/kzm.c | 2 +- hw/arm/microbit.c | 2 +- hw/arm/mps2-tz.c | 2 +- hw/arm/mps2.c | 2 +- hw/arm/mps3r.c | 2 +- hw/arm/msf2-soc.c | 2 +- hw/arm/msf2-som.c | 2 +- hw/arm/musca.c | 2 +- hw/arm/omap1.c | 2 +- hw/arm/omap_sx1.c | 2 +- hw/arm/orangepi.c | 2 +- hw/arm/stellaris.c | 2 +- hw/arm/stm32f100_soc.c | 2 +- hw/arm/stm32f205_soc.c | 2 +- hw/arm/stm32f405_soc.c | 2 +- hw/arm/stm32l4x5_soc.c | 2 +- hw/avr/atmega.c | 2 +- hw/char/goldfish_tty.c | 2 +- hw/char/omap_uart.c | 2 +- hw/char/riscv_htif.c | 2 +- hw/core/cpu-system.c | 2 +- hw/core/null-machine.c | 2 +- hw/core/sysbus.c | 2 +- hw/dma/rc4030.c | 2 +- hw/hyperv/hv-balloon.c | 2 +- hw/hyperv/hyperv.c | 2 +- hw/i386/kvm/xen_evtchn.c | 2 +- hw/i386/kvm/xen_gnttab.c | 2 +- hw/i386/kvm/xen_overlay.c | 2 +- hw/i386/sgx-epc.c | 2 +- hw/i386/sgx.c | 2 +- hw/i386/vapic.c | 2 +- hw/ide/ahci-sysbus.c | 2 +- hw/input/lasips2.c | 2 +- hw/intc/loongarch_extioi.c | 2 +- hw/intc/riscv_aplic.c | 2 +- hw/intc/riscv_imsic.c | 2 +- hw/loongarch/virt.c | 2 +- hw/mem/memory-device.c | 2 +- hw/microblaze/petalogix_ml605_mmu.c | 2 +- hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +- hw/microblaze/xlnx-zynqmp-pmu.c | 2 +- hw/mips/mipssim.c | 2 +- hw/misc/allwinner-h3-dramc.c | 2 +- hw/misc/allwinner-r40-dramc.c | 2 +- hw/misc/ivshmem-flat.c | 2 +- hw/misc/mac_via.c | 2 +- hw/net/i82596.c | 2 +- hw/nvram/fw_cfg.c | 2 +- hw/openrisc/openrisc_sim.c | 2 +- hw/openrisc/virt.c | 2 +- hw/pci-host/mv64361.c | 2 +- hw/ppc/pegasos2.c | 2 +- hw/ppc/pnv_psi.c | 2 +- hw/ppc/ppc4xx_sdram.c | 2 +- hw/ppc/prep_systemio.c | 2 +- hw/ppc/rs6000_mc.c | 2 +- hw/ppc/spapr_ovec.c | 2 +- hw/ppc/vof.c | 2 +- hw/remote/iommu.c | 2 +- hw/riscv/microblaze-v-generic.c | 2 +- hw/riscv/opentitan.c | 2 +- hw/riscv/shakti_c.c | 2 +- hw/s390x/css.c | 2 +- hw/s390x/s390-skeys.c | 2 +- hw/s390x/virtio-ccw.c | 2 +- hw/sparc/sun4m_iommu.c | 2 +- hw/sparc64/sun4u_iommu.c | 2 +- hw/timer/hpet.c | 2 +- hw/tpm/tpm_crb.c | 2 +- hw/vfio/ap.c | 2 +- hw/vfio/ccw.c | 2 +- hw/vfio/common.c | 2 +- hw/vfio/container.c | 2 +- hw/vfio/platform.c | 2 +- hw/vfio/spapr.c | 2 +- hw/virtio/vhost-vdpa.c | 2 +- hw/virtio/virtio-balloon.c | 2 +- hw/virtio/virtio-bus.c | 2 +- monitor/hmp-cmds-target.c | 2 +- monitor/hmp-cmds.c | 2 +- system/ioport.c | 2 +- system/memory.c | 2 +- system/memory_mapping.c | 2 +- target/arm/hvf/hvf.c | 2 +- target/arm/kvm.c | 2 +- target/avr/cpu.c | 2 +- target/i386/cpu-apic.c | 2 +- target/i386/cpu.c | 2 +- target/i386/kvm/xen-emu.c | 2 +- target/i386/nvmm/nvmm-all.c | 2 +- target/i386/sev.c | 2 +- target/i386/tcg/system/misc_helper.c | 2 +- target/i386/tcg/system/tcg-cpu.c | 2 +- target/i386/whpx/whpx-all.c | 2 +- target/loongarch/kvm/kvm.c | 2 +- target/riscv/kvm/kvm-cpu.c | 2 +- target/s390x/mmu_helper.c | 2 +- target/s390x/sigp.c | 2 +- target/s390x/tcg/excp_helper.c | 2 +- target/xtensa/dbg_helper.c | 2 +- hw/display/apple-gfx.m | 2 +- 122 files changed, 123 insertions(+), 127 deletions(-) rename include/{exec => system}/address-spaces.h (89%) diff --git a/hw/net/i82596.h b/hw/net/i82596.h index 4bdfcaf856..dc1fa1a1dc 100644 --- a/hw/net/i82596.h +++ b/hw/net/i82596.h @@ -4,7 +4,7 @@ #define I82596_IOPORT_SIZE 0x20 #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #define PORT_RESET 0x00 /* reset 82596 */ #define PORT_SELFTEST 0x01 /* selftest */ diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h index 8e3882d506..c6ecb3433c 100644 --- a/hw/s390x/ipl.h +++ b/hw/s390x/ipl.h @@ -14,7 +14,7 @@ #define HW_S390_IPL_H #include "cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-core.h" #include "hw/s390x/ipl/qipl.h" #include "qom/object.h" diff --git a/include/hw/misc/lasi.h b/include/hw/misc/lasi.h index f01c0f680a..0bdfb11b50 100644 --- a/include/hw/misc/lasi.h +++ b/include/hw/misc/lasi.h @@ -12,7 +12,7 @@ #ifndef LASI_H #define LASI_H -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/pci/pci_host.h" #include "hw/boards.h" diff --git a/include/hw/nubus/nubus.h b/include/hw/nubus/nubus.h index fee79b71d1..7825840dca 100644 --- a/include/hw/nubus/nubus.h +++ b/include/hw/nubus/nubus.h @@ -11,7 +11,7 @@ #include "hw/qdev-properties.h" #include "hw/sysbus.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #include "qemu/units.h" diff --git a/include/hw/ppc/vof.h b/include/hw/ppc/vof.h index 2918aaab12..3a0fbffe54 100644 --- a/include/hw/ppc/vof.h +++ b/include/hw/ppc/vof.h @@ -7,7 +7,7 @@ #define HW_VOF_H #include "qom/object.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/memory.h" #include "exec/cpu-defs.h" diff --git a/include/hw/tricore/triboard.h b/include/hw/tricore/triboard.h index 8250470643..ca49a0c752 100644 --- a/include/hw/tricore/triboard.h +++ b/include/hw/tricore/triboard.h @@ -21,7 +21,7 @@ #include "qapi/error.h" #include "hw/boards.h" #include "system/system.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #include "hw/tricore/tc27x_soc.h" diff --git a/include/exec/address-spaces.h b/include/system/address-spaces.h similarity index 89% rename from include/exec/address-spaces.h rename to include/system/address-spaces.h index 0d0aa61d68..72d17afb0f 100644 --- a/include/exec/address-spaces.h +++ b/include/system/address-spaces.h @@ -11,16 +11,14 @@ * */ -#ifndef EXEC_ADDRESS_SPACES_H -#define EXEC_ADDRESS_SPACES_H +#ifndef SYSTEM_ADDRESS_SPACES_H +#define SYSTEM_ADDRESS_SPACES_H /* * Internal interfaces between memory.c/exec.c/vl.c. Do not #include unless * you're one of them. */ -#ifndef CONFIG_USER_ONLY - /* Get the root memory region. This interface should only be used temporarily * until a proper bus interface is available. */ @@ -35,5 +33,3 @@ extern AddressSpace address_space_memory; extern AddressSpace address_space_io; #endif - -#endif diff --git a/include/system/dma.h b/include/system/dma.h index aaa03b9711..82e7ad5437 100644 --- a/include/system/dma.h +++ b/include/system/dma.h @@ -11,7 +11,7 @@ #define DMA_H #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "block/block.h" #include "block/accounting.h" diff --git a/rust/wrapper.h b/rust/wrapper.h index 94866b7e32..beddd9aab2 100644 --- a/rust/wrapper.h +++ b/rust/wrapper.h @@ -64,5 +64,5 @@ typedef enum memory_order { #include "chardev/char-serial.h" #include "exec/memattrs.h" #include "qemu/timer.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/char/pl011.h" diff --git a/target/i386/hvf/vmx.h b/target/i386/hvf/vmx.h index 3c56afc9d3..029516e5c0 100644 --- a/target/i386/hvf/vmx.h +++ b/target/i386/hvf/vmx.h @@ -33,7 +33,7 @@ #include "system/hvf.h" #include "system/hvf_int.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" static inline uint64_t rreg(hv_vcpuid_t vcpu, hv_x86_reg_t reg) { diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 12fc30c276..601c3bc0ac 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -50,7 +50,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/exec-all.h" #include "gdbstub/enums.h" #include "hw/boards.h" diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c index 5c4c1dc638..2e49b551f2 100644 --- a/hw/acpi/erst.c +++ b/hw/acpi/erst.c @@ -23,7 +23,7 @@ #include "hw/acpi/acpi-defs.h" #include "hw/acpi/aml-build.h" #include "hw/acpi/bios-linker-loader.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/hostmem.h" #include "hw/acpi/erst.h" #include "trace.h" diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c index ec329f4991..21ffab10f3 100644 --- a/hw/arm/aspeed_ast10x0.c +++ b/hw/arm/aspeed_ast10x0.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/qdev-clock.h" #include "hw/misc/unimp.h" diff --git a/hw/arm/bananapi_m2u.c b/hw/arm/bananapi_m2u.c index 4d84d10d24..b750a575f7 100644 --- a/hw/arm/bananapi_m2u.c +++ b/hw/arm/bananapi_m2u.c @@ -19,7 +19,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "hw/boards.h" diff --git a/hw/arm/collie.c b/hw/arm/collie.c index eaa5c52d45..e83aee58c6 100644 --- a/hw/arm/collie.c +++ b/hw/arm/collie.c @@ -16,7 +16,7 @@ #include "strongarm.h" #include "hw/arm/boot.h" #include "hw/block/flash.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #include "qemu/error-report.h" diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c index 43dc89d902..2d8f2d7326 100644 --- a/hw/arm/exynos4_boards.c +++ b/hw/arm/exynos4_boards.c @@ -28,7 +28,7 @@ #include "hw/sysbus.h" #include "net/net.h" #include "hw/arm/boot.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/exynos4210.h" #include "hw/net/lan9118.h" #include "hw/qdev-properties.h" diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c index 9de0f2148f..2a8ffb15f7 100644 --- a/hw/arm/fsl-imx31.c +++ b/hw/arm/fsl-imx31.c @@ -23,7 +23,7 @@ #include "qapi/error.h" #include "hw/arm/fsl-imx31.h" #include "system/system.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "chardev/char.h" #include "target/arm/cpu-qom.h" diff --git a/hw/arm/fsl-imx8mp.c b/hw/arm/fsl-imx8mp.c index 82edf61082..af7a7e6745 100644 --- a/hw/arm/fsl-imx8mp.c +++ b/hw/arm/fsl-imx8mp.c @@ -9,7 +9,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/bsa.h" #include "hw/arm/fsl-imx8mp.h" #include "hw/intc/arm_gicv3.h" diff --git a/hw/arm/imx8mp-evk.c b/hw/arm/imx8mp-evk.c index b5aec06ec5..b3082fa60d 100644 --- a/hw/arm/imx8mp-evk.c +++ b/hw/arm/imx8mp-evk.c @@ -7,7 +7,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/boot.h" #include "hw/arm/fsl-imx8mp.h" #include "hw/boards.h" diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index 8aa2e6e98e..ac0c6c6096 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -16,7 +16,7 @@ #include "hw/misc/arm_integrator_debug.h" #include "hw/net/smc91c111.h" #include "net/net.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/runstate.h" #include "system/system.h" #include "qemu/log.h" diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c index 08d2b3025c..362c145409 100644 --- a/hw/arm/kzm.c +++ b/hw/arm/kzm.c @@ -19,7 +19,7 @@ #include "hw/arm/boot.h" #include "hw/boards.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "net/net.h" #include "hw/net/lan9118.h" #include "hw/char/serial-mm.h" diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c index 3f56fb45ce..ade363daaa 100644 --- a/hw/arm/microbit.c +++ b/hw/arm/microbit.c @@ -13,7 +13,7 @@ #include "hw/boards.h" #include "hw/arm/boot.h" #include "system/system.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/nrf51_soc.h" #include "hw/i2c/microbit_i2c.h" diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c index 13ed868b6b..b0633a5a69 100644 --- a/hw/arm/mps2-tz.c +++ b/hw/arm/mps2-tz.c @@ -54,7 +54,7 @@ #include "hw/arm/armv7m.h" #include "hw/or-irq.h" #include "hw/boards.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "system/reset.h" #include "hw/misc/unimp.h" diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 3f8db0cab6..6958485a66 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -33,7 +33,7 @@ #include "hw/arm/armv7m.h" #include "hw/or-irq.h" #include "hw/boards.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/qdev-properties.h" #include "hw/misc/unimp.h" diff --git a/hw/arm/mps3r.c b/hw/arm/mps3r.c index 1bddb5e822..4dd1e8a718 100644 --- a/hw/arm/mps3r.c +++ b/hw/arm/mps3r.c @@ -28,7 +28,7 @@ #include "qemu/units.h" #include "qapi/error.h" #include "qobject/qlist.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "cpu.h" #include "system/system.h" #include "hw/boards.h" diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c index e8a5b231ba..bc9b419e37 100644 --- a/hw/arm/msf2-soc.c +++ b/hw/arm/msf2-soc.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/char/serial-mm.h" #include "hw/arm/msf2-soc.h" #include "hw/misc/unimp.h" diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c index 9b20f1e2c9..29c76c6860 100644 --- a/hw/arm/msf2-som.c +++ b/hw/arm/msf2-som.c @@ -33,7 +33,7 @@ #include "hw/qdev-properties.h" #include "hw/arm/boot.h" #include "hw/qdev-clock.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/msf2-soc.h" #define DDR_BASE_ADDRESS 0xA0000000 diff --git a/hw/arm/musca.c b/hw/arm/musca.c index e9c092abc3..a4f43f1992 100644 --- a/hw/arm/musca.c +++ b/hw/arm/musca.c @@ -22,7 +22,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/arm/boot.h" #include "hw/arm/armsse.h" diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c index 3ee10b4777..91d7e3f04b 100644 --- a/hw/arm/omap1.c +++ b/hw/arm/omap1.c @@ -23,7 +23,7 @@ #include "qemu/main-loop.h" #include "qapi/error.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/qdev-properties.h" diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c index 24b4043183..aa1e96b3ad 100644 --- a/hw/arm/omap_sx1.c +++ b/hw/arm/omap_sx1.c @@ -34,7 +34,7 @@ #include "hw/arm/boot.h" #include "hw/block/flash.h" #include "system/qtest.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/cutils.h" #include "qemu/error-report.h" diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c index 634af9b0a1..e0956880d1 100644 --- a/hw/arm/orangepi.c +++ b/hw/arm/orangepi.c @@ -19,7 +19,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "hw/boards.h" diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 3361111360..cbe914c93e 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -20,7 +20,7 @@ #include "net/net.h" #include "hw/boards.h" #include "qemu/log.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/arm/armv7m.h" #include "hw/char/pl011.h" diff --git a/hw/arm/stm32f100_soc.c b/hw/arm/stm32f100_soc.c index 53b5636452..0eabaf8d9b 100644 --- a/hw/arm/stm32f100_soc.c +++ b/hw/arm/stm32f100_soc.c @@ -27,7 +27,7 @@ #include "qapi/error.h" #include "qemu/module.h" #include "hw/arm/boot.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/stm32f100_soc.h" #include "hw/qdev-properties.h" #include "hw/qdev-clock.h" diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c index 47a54e592b..32e96912f0 100644 --- a/hw/arm/stm32f205_soc.c +++ b/hw/arm/stm32f205_soc.c @@ -26,7 +26,7 @@ #include "qapi/error.h" #include "qemu/module.h" #include "hw/arm/boot.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/stm32f205_soc.h" #include "hw/qdev-properties.h" #include "hw/qdev-clock.h" diff --git a/hw/arm/stm32f405_soc.c b/hw/arm/stm32f405_soc.c index 18d8824f29..bba9060daf 100644 --- a/hw/arm/stm32f405_soc.c +++ b/hw/arm/stm32f405_soc.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/arm/stm32f405_soc.h" #include "hw/qdev-clock.h" diff --git a/hw/arm/stm32l4x5_soc.c b/hw/arm/stm32l4x5_soc.c index dbf75329f7..6278d354c8 100644 --- a/hw/arm/stm32l4x5_soc.c +++ b/hw/arm/stm32l4x5_soc.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/or-irq.h" #include "hw/arm/stm32l4x5_soc.h" diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c index cb721c96b7..2e8b8e8c67 100644 --- a/hw/avr/atmega.c +++ b/hw/avr/atmega.c @@ -13,7 +13,7 @@ #include "qemu/units.h" #include "qapi/error.h" #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/qdev-properties.h" #include "hw/sysbus.h" diff --git a/hw/char/goldfish_tty.c b/hw/char/goldfish_tty.c index 7374561141..f0891ffa4d 100644 --- a/hw/char/goldfish_tty.c +++ b/hw/char/goldfish_tty.c @@ -15,7 +15,7 @@ #include "chardev/char-fe.h" #include "qemu/log.h" #include "trace.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/dma.h" #include "hw/char/goldfish_tty.h" diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c index 07fb868965..8cbf6ce803 100644 --- a/hw/char/omap_uart.c +++ b/hw/char/omap_uart.c @@ -21,7 +21,7 @@ #include "chardev/char.h" #include "hw/arm/omap.h" #include "hw/char/serial-mm.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" /* UARTs */ struct omap_uart_s { diff --git a/hw/char/riscv_htif.c b/hw/char/riscv_htif.c index ec5db5a597..c884be5d75 100644 --- a/hw/char/riscv_htif.c +++ b/hw/char/riscv_htif.c @@ -28,7 +28,7 @@ #include "chardev/char-fe.h" #include "qemu/timer.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/tswap.h" #include "system/dma.h" #include "system/runstate.h" diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index 5ef8c24b5b..82b68b8927 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/cputlb.h" #include "system/memory.h" #include "exec/tb-flush.h" diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c index 7f1fb562be..a6e477a2d8 100644 --- a/hw/core/null-machine.c +++ b/hw/core/null-machine.c @@ -14,7 +14,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "hw/boards.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/core/cpu.h" static void machine_none_init(MachineState *mch) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 98819d5dc6..6eb4c0f15a 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -21,7 +21,7 @@ #include "qapi/error.h" #include "hw/sysbus.h" #include "monitor/monitor.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" static void sysbus_dev_print(Monitor *mon, DeviceState *dev, int indent); static char *sysbus_get_fw_dev_path(DeviceState *dev); diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c index 5bf54347ed..6842e7d491 100644 --- a/hw/dma/rc4030.c +++ b/hw/dma/rc4030.c @@ -32,7 +32,7 @@ #include "qemu/timer.h" #include "qemu/log.h" #include "qemu/module.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" #include "qom/object.h" diff --git a/hw/hyperv/hv-balloon.c b/hw/hyperv/hv-balloon.c index 6f33c3e741..0b1da723c8 100644 --- a/hw/hyperv/hv-balloon.c +++ b/hw/hyperv/hv-balloon.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "hv-balloon-internal.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/cpu-common.h" #include "exec/ramblock.h" #include "hw/boards.h" diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index 382c62d668..d21e428eae 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -11,7 +11,7 @@ #include "qemu/main-loop.h" #include "qemu/module.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/memory.h" #include "system/kvm.h" #include "qemu/bitops.h" diff --git a/hw/i386/kvm/xen_evtchn.c b/hw/i386/kvm/xen_evtchn.c index 9b8b092bc2..f9223ef1a1 100644 --- a/hw/i386/kvm/xen_evtchn.c +++ b/hw/i386/kvm/xen_evtchn.c @@ -23,7 +23,7 @@ #include "qobject/qdict.h" #include "qom/object.h" #include "exec/target_page.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/vmstate.h" #include "trace.h" diff --git a/hw/i386/kvm/xen_gnttab.c b/hw/i386/kvm/xen_gnttab.c index 7b843a72b1..430ba62896 100644 --- a/hw/i386/kvm/xen_gnttab.c +++ b/hw/i386/kvm/xen_gnttab.c @@ -17,7 +17,7 @@ #include "qapi/error.h" #include "qom/object.h" #include "exec/target_page.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/vmstate.h" #include "hw/sysbus.h" diff --git a/hw/i386/kvm/xen_overlay.c b/hw/i386/kvm/xen_overlay.c index db9aa7942d..a2b26e9906 100644 --- a/hw/i386/kvm/xen_overlay.c +++ b/hw/i386/kvm/xen_overlay.c @@ -16,7 +16,7 @@ #include "qapi/error.h" #include "qom/object.h" #include "exec/target_page.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/vmstate.h" #include "hw/sysbus.h" diff --git a/hw/i386/sgx-epc.c b/hw/i386/sgx-epc.c index 875e1c5c33..00b220d4d6 100644 --- a/hw/i386/sgx-epc.c +++ b/hw/i386/sgx-epc.c @@ -17,7 +17,7 @@ #include "qapi/error.h" #include "qapi/visitor.h" #include "target/i386/cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" static const Property sgx_epc_properties[] = { DEFINE_PROP_UINT64(SGX_EPC_ADDR_PROP, SGXEPCDevice, addr, 0), diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c index e665e2111c..5685c4fb80 100644 --- a/hw/i386/sgx.c +++ b/hw/i386/sgx.c @@ -20,7 +20,7 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "qapi/qapi-commands-misc-target.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/hw_accel.h" #include "system/reset.h" #include diff --git a/hw/i386/vapic.c b/hw/i386/vapic.c index 14de9b7a82..26aae64e5d 100644 --- a/hw/i386/vapic.c +++ b/hw/i386/vapic.c @@ -16,7 +16,7 @@ #include "system/hw_accel.h" #include "system/kvm.h" #include "system/runstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/i386/apic_internal.h" #include "hw/sysbus.h" #include "hw/boards.h" diff --git a/hw/ide/ahci-sysbus.c b/hw/ide/ahci-sysbus.c index 03a5bd42d0..3c1935d81c 100644 --- a/hw/ide/ahci-sysbus.c +++ b/hw/ide/ahci-sysbus.c @@ -22,7 +22,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index d9f8c36778..987034efd3 100644 --- a/hw/input/lasips2.c +++ b/hw/input/lasips2.c @@ -29,7 +29,7 @@ #include "hw/input/lasips2.h" #include "exec/hwaddr.h" #include "trace.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/vmstate.h" #include "hw/irq.h" #include "qapi/error.h" diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c index a51a215e6e..a558c50185 100644 --- a/hw/intc/loongarch_extioi.c +++ b/hw/intc/loongarch_extioi.c @@ -11,7 +11,7 @@ #include "qapi/error.h" #include "hw/irq.h" #include "hw/loongarch/virt.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/intc/loongarch_extioi.h" #include "trace.h" diff --git a/hw/intc/riscv_aplic.c b/hw/intc/riscv_aplic.c index 5964cde7e0..789c4a4d6e 100644 --- a/hw/intc/riscv_aplic.c +++ b/hw/intc/riscv_aplic.c @@ -22,7 +22,7 @@ #include "qemu/module.h" #include "qemu/error-report.h" #include "qemu/bswap.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/sysbus.h" #include "hw/pci/msi.h" #include "hw/boards.h" diff --git a/hw/intc/riscv_imsic.c b/hw/intc/riscv_imsic.c index 241b12fef0..852f413e5a 100644 --- a/hw/intc/riscv_imsic.c +++ b/hw/intc/riscv_imsic.c @@ -22,7 +22,7 @@ #include "qemu/module.h" #include "qemu/error-report.h" #include "qemu/bswap.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/sysbus.h" #include "hw/pci/msi.h" #include "hw/boards.h" diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 65c9027feb..f1eb42c2c1 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -18,7 +18,7 @@ #include "system/reset.h" #include "system/rtc.h" #include "hw/loongarch/virt.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/irq.h" #include "net/net.h" #include "hw/loader.h" diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index 1de8dfec7d..1a432e9bd2 100644 --- a/hw/mem/memory-device.c +++ b/hw/mem/memory-device.c @@ -17,7 +17,7 @@ #include "qemu/range.h" #include "hw/virtio/vhost.h" #include "system/kvm.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" static bool memory_device_is_empty(const MemoryDeviceState *md) diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c index 21ad215e44..c887c7a99e 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -36,7 +36,7 @@ #include "hw/boards.h" #include "hw/char/serial-mm.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/ssi/ssi.h" #include "boot.h" diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c index bdba2006b7..f976c90bd2 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -33,7 +33,7 @@ #include "system/system.h" #include "hw/boards.h" #include "hw/misc/unimp.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/char/xilinx_uartlite.h" #include "boot.h" diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c index bdbf7328bf..0922c65295 100644 --- a/hw/microblaze/xlnx-zynqmp-pmu.c +++ b/hw/microblaze/xlnx-zynqmp-pmu.c @@ -17,7 +17,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "cpu.h" #include "boot.h" diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c index c530688e76..b6dabf2893 100644 --- a/hw/mips/mipssim.c +++ b/hw/mips/mipssim.c @@ -28,7 +28,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/datadir.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/clock.h" #include "hw/mips/mips.h" #include "hw/char/serial-mm.h" diff --git a/hw/misc/allwinner-h3-dramc.c b/hw/misc/allwinner-h3-dramc.c index c4f3eb9274..74ff71b753 100644 --- a/hw/misc/allwinner-h3-dramc.c +++ b/hw/misc/allwinner-h3-dramc.c @@ -24,7 +24,7 @@ #include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/module.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "qapi/error.h" #include "hw/misc/allwinner-h3-dramc.h" diff --git a/hw/misc/allwinner-r40-dramc.c b/hw/misc/allwinner-r40-dramc.c index 96e1848c21..5908a059e8 100644 --- a/hw/misc/allwinner-r40-dramc.c +++ b/hw/misc/allwinner-r40-dramc.c @@ -24,7 +24,7 @@ #include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/module.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "qapi/error.h" #include "qemu/bitops.h" diff --git a/hw/misc/ivshmem-flat.c b/hw/misc/ivshmem-flat.c index 40309a8ff3..076c4b42de 100644 --- a/hw/misc/ivshmem-flat.c +++ b/hw/misc/ivshmem-flat.c @@ -17,7 +17,7 @@ #include "hw/qdev-properties-system.h" #include "hw/sysbus.h" #include "chardev/char-fe.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" #include "hw/misc/ivshmem-flat.h" diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c index 03b1feda50..3c0819c58a 100644 --- a/hw/misc/mac_via.c +++ b/hw/misc/mac_via.c @@ -16,7 +16,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/vmstate.h" #include "hw/sysbus.h" #include "hw/irq.h" diff --git a/hw/net/i82596.c b/hw/net/i82596.c index ee919dab3c..64ed3c8390 100644 --- a/hw/net/i82596.c +++ b/hw/net/i82596.c @@ -15,7 +15,7 @@ #include "hw/irq.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/module.h" #include "trace.h" #include "i82596.h" diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index a757939cfb..cbfb2b5303 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -27,7 +27,7 @@ #include "system/system.h" #include "system/dma.h" #include "system/reset.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "hw/nvram/fw_cfg.h" #include "hw/qdev-properties.h" diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index 83d7c2a8af..c2284a7d41 100644 --- a/hw/openrisc/openrisc_sim.c +++ b/hw/openrisc/openrisc_sim.c @@ -28,7 +28,7 @@ #include "net/net.h" #include "hw/openrisc/boot.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/device_tree.h" #include "system/system.h" #include "hw/sysbus.h" diff --git a/hw/openrisc/virt.c b/hw/openrisc/virt.c index 3055306783..0d1c1f103c 100644 --- a/hw/openrisc/virt.c +++ b/hw/openrisc/virt.c @@ -11,7 +11,7 @@ #include "qemu/guest-random.h" #include "qapi/error.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/irq.h" #include "hw/boards.h" #include "hw/char/serial-mm.h" diff --git a/hw/pci-host/mv64361.c b/hw/pci-host/mv64361.c index 9c41c155fb..a297318c6e 100644 --- a/hw/pci-host/mv64361.c +++ b/hw/pci-host/mv64361.c @@ -17,7 +17,7 @@ #include "hw/irq.h" #include "hw/intc/i8259.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/log.h" #include "qemu/error-report.h" #include "trace.h" diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index 246d6d633b..7b2dc6985c 100644 --- a/hw/ppc/pegasos2.c +++ b/hw/ppc/pegasos2.c @@ -31,7 +31,7 @@ #include "qemu/error-report.h" #include "system/kvm.h" #include "kvm_ppc.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/qom-qobject.h" #include "qobject/qdict.h" #include "trace.h" diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index 1fe11dde50..f832ee61e8 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -18,7 +18,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/irq.h" #include "target/ppc/cpu.h" #include "qemu/log.h" diff --git a/hw/ppc/ppc4xx_sdram.c b/hw/ppc/ppc4xx_sdram.c index 562bff8d53..bf0faad9e7 100644 --- a/hw/ppc/ppc4xx_sdram.c +++ b/hw/ppc/ppc4xx_sdram.c @@ -34,7 +34,7 @@ #include "qapi/error.h" #include "qemu/log.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" /* get_system_memory() */ +#include "system/address-spaces.h" /* get_system_memory() */ #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/ppc/ppc4xx.h" diff --git a/hw/ppc/prep_systemio.c b/hw/ppc/prep_systemio.c index b1f2e130f0..08f29e72e4 100644 --- a/hw/ppc/prep_systemio.c +++ b/hw/ppc/prep_systemio.c @@ -28,7 +28,7 @@ #include "hw/isa/isa.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #include "qemu/error-report.h" /* for error_report() */ #include "qemu/module.h" diff --git a/hw/ppc/rs6000_mc.c b/hw/ppc/rs6000_mc.c index 0e5d53b8b6..27f1c90f06 100644 --- a/hw/ppc/rs6000_mc.c +++ b/hw/ppc/rs6000_mc.c @@ -24,7 +24,7 @@ #include "hw/isa/isa.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qapi/error.h" #include "trace.h" #include "qom/object.h" diff --git a/hw/ppc/spapr_ovec.c b/hw/ppc/spapr_ovec.c index 88e29536aa..6d6eaf67cb 100644 --- a/hw/ppc/spapr_ovec.c +++ b/hw/ppc/spapr_ovec.c @@ -15,7 +15,7 @@ #include "hw/ppc/spapr_ovec.h" #include "migration/vmstate.h" #include "qemu/bitmap.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/error-report.h" #include "trace.h" #include diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c index 09cb77de93..f14efa3a7c 100644 --- a/hw/ppc/vof.c +++ b/hw/ppc/vof.c @@ -15,7 +15,7 @@ #include "qemu/units.h" #include "qemu/log.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/ppc/vof.h" #include "hw/ppc/fdt.h" #include "system/runstate.h" diff --git a/hw/remote/iommu.c b/hw/remote/iommu.c index ec845d1f58..3e0758a21e 100644 --- a/hw/remote/iommu.c +++ b/hw/remote/iommu.c @@ -14,7 +14,7 @@ #include "hw/pci/pci_bus.h" #include "hw/pci/pci.h" #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" /** diff --git a/hw/riscv/microblaze-v-generic.c b/hw/riscv/microblaze-v-generic.c index d8e67906d2..e863c50cbc 100644 --- a/hw/riscv/microblaze-v-generic.c +++ b/hw/riscv/microblaze-v-generic.c @@ -22,7 +22,7 @@ #include "net/net.h" #include "hw/boards.h" #include "hw/char/serial-mm.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/char/xilinx_uartlite.h" #include "hw/misc/unimp.h" diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c index 98a67fe52a..019d6b3986 100644 --- a/hw/riscv/opentitan.c +++ b/hw/riscv/opentitan.c @@ -28,7 +28,7 @@ #include "hw/riscv/boot.h" #include "qemu/units.h" #include "system/system.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" /* * This version of the OpenTitan machine currently supports diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c index e2242b97d0..17c5c72102 100644 --- a/hw/riscv/shakti_c.c +++ b/hw/riscv/shakti_c.c @@ -25,7 +25,7 @@ #include "hw/intc/riscv_aclint.h" #include "system/system.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/riscv/boot.h" static const struct MemmapEntry { diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 17afcbb2cd..53444f6828 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -14,7 +14,7 @@ #include "qapi/visitor.h" #include "qemu/bitops.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/s390x/ioinst.h" #include "hw/qdev-properties.h" #include "hw/s390x/css.h" diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 067ea03726..0bb90fed04 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -20,7 +20,7 @@ #include "qobject/qdict.h" #include "qemu/error-report.h" #include "system/memory_mapping.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/kvm.h" #include "migration/qemu-file-types.h" #include "migration/register.h" diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 43f3b162c8..e8ecb90826 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/kvm.h" #include "net/net.h" #include "hw/virtio/virtio.h" diff --git a/hw/sparc/sun4m_iommu.c b/hw/sparc/sun4m_iommu.c index 5a4c1f5e3b..4a542b18d2 100644 --- a/hw/sparc/sun4m_iommu.c +++ b/hw/sparc/sun4m_iommu.c @@ -29,7 +29,7 @@ #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qemu/module.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" /* diff --git a/hw/sparc64/sun4u_iommu.c b/hw/sparc64/sun4u_iommu.c index eba811af0c..533fcae1fb 100644 --- a/hw/sparc64/sun4u_iommu.c +++ b/hw/sparc64/sun4u_iommu.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "hw/sparc/sun4u_iommu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/log.h" #include "qemu/module.h" #include "trace.h" diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index ccb97b6806..ea82472105 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -36,7 +36,7 @@ #include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" #include "hw/timer/i8254.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #include "trace.h" diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index 6cdeb72df0..b668aee97a 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -18,7 +18,7 @@ #include "qemu/module.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "hw/pci/pci_ids.h" #include "hw/acpi/tpm.h" diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index c7ab4ff57a..d6575d7c44 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -28,7 +28,7 @@ #include "migration/vmstate.h" #include "hw/qdev-properties.h" #include "hw/s390x/ap-bridge.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #define TYPE_VFIO_AP_DEVICE "vfio-ap" diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index e5e0d9e3e7..29e804e122 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -27,7 +27,7 @@ #include "hw/s390x/vfio-ccw.h" #include "hw/qdev-properties.h" #include "hw/s390x/ccw-device.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" #include "qemu/module.h" diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 989c6ee83d..98832af88d 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -27,7 +27,7 @@ #include "hw/vfio/vfio-common.h" #include "hw/vfio/pci.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/memory.h" #include "exec/ram_addr.h" #include "exec/target_page.h" diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 1d1c5f9a77..2e993c7e73 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -23,7 +23,7 @@ #include #include "hw/vfio/vfio-common.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/memory.h" #include "exec/ram_addr.h" #include "qemu/error-report.h" diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 96c6bf5654..c6edbdd4ae 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -29,7 +29,7 @@ #include "qemu/module.h" #include "qemu/range.h" #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/queue.h" #include "hw/sysbus.h" #include "trace.h" diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index 1a5d1611f2..c9a7dd8d68 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -13,7 +13,7 @@ #include #include "system/kvm.h" #include "system/hostmem.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/vfio/vfio-common.h" #include "hw/hw.h" diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 7efbde3d4c..1e0336df1d 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -20,7 +20,7 @@ #include "hw/virtio/virtio-net.h" #include "hw/virtio/vhost-shadow-virtqueue.h" #include "hw/virtio/vhost-vdpa.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/blocker.h" #include "qemu/cutils.h" #include "qemu/main-loop.h" diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 2eb5a14fa2..0d0603c674 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -24,7 +24,7 @@ #include "hw/boards.h" #include "system/balloon.h" #include "hw/virtio/virtio-balloon.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qapi/error.h" #include "qapi/qapi-events-machine.h" #include "qapi/visitor.h" diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c index 896feb37a1..d1c79c567b 100644 --- a/hw/virtio/virtio-bus.c +++ b/hw/virtio/virtio-bus.c @@ -28,7 +28,7 @@ #include "qapi/error.h" #include "hw/virtio/virtio-bus.h" #include "hw/virtio/virtio.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" /* #define DEBUG_VIRTIO_BUS */ diff --git a/monitor/hmp-cmds-target.c b/monitor/hmp-cmds-target.c index 6654d31406..011a367357 100644 --- a/monitor/hmp-cmds-target.c +++ b/monitor/hmp-cmds-target.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "disas/disas.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/memory.h" #include "monitor/hmp-target.h" #include "monitor/monitor-internal.h" diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 7ded3378cf..8ddcdd76c1 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -14,7 +14,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/ioport.h" #include "exec/gdbstub.h" #include "gdbstub/enums.h" diff --git a/system/ioport.c b/system/ioport.c index 2291739039..5300716464 100644 --- a/system/ioport.c +++ b/system/ioport.c @@ -28,7 +28,7 @@ #include "qemu/osdep.h" #include "exec/ioport.h" #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" struct MemoryRegionPortioList { diff --git a/system/memory.c b/system/memory.c index 2865d0deb1..a4185ea353 100644 --- a/system/memory.c +++ b/system/memory.c @@ -33,7 +33,7 @@ #include "qemu/accel.h" #include "hw/boards.h" #include "migration/vmstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" //#define DEBUG_UNASSIGNED diff --git a/system/memory_mapping.c b/system/memory_mapping.c index 8538a8241e..da708a08ab 100644 --- a/system/memory_mapping.c +++ b/system/memory_mapping.c @@ -17,7 +17,7 @@ #include "system/memory_mapping.h" #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/core/cpu.h" //#define DEBUG_GUEST_PHYS_REGION_ADD diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 2439af63a0..93a3f9b53d 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -22,7 +22,7 @@ #include -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "hw/irq.h" #include "qemu/main-loop.h" diff --git a/target/arm/kvm.c b/target/arm/kvm.c index da30bdbb23..97de8c7e93 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -30,7 +30,7 @@ #include "internals.h" #include "hw/pci/pci.h" #include "exec/memattrs.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "gdbstub/enums.h" #include "hw/boards.h" #include "hw/irq.h" diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 0b14b36c17..1121822470 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -23,7 +23,7 @@ #include "qemu/qemu-print.h" #include "exec/exec-all.h" #include "exec/translation-block.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "cpu.h" #include "disas/dis-asm.h" #include "tcg/debug-assert.h" diff --git a/target/i386/cpu-apic.c b/target/i386/cpu-apic.c index c1708b04bb..242a05fdbe 100644 --- a/target/i386/cpu-apic.c +++ b/target/i386/cpu-apic.c @@ -14,7 +14,7 @@ #include "system/hw_accel.h" #include "system/kvm.h" #include "system/xen.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "hw/i386/apic_internal.h" #include "cpu-internal.h" diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 3fb1ec62da..5c9f80b4cc 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -38,7 +38,7 @@ #ifndef CONFIG_USER_ONLY #include "system/reset.h" #include "qapi/qapi-commands-machine-target.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "hw/i386/sgx-epc.h" #endif diff --git a/target/i386/kvm/xen-emu.c b/target/i386/kvm/xen-emu.c index e81a245881..b23010374f 100644 --- a/target/i386/kvm/xen-emu.c +++ b/target/i386/kvm/xen-emu.c @@ -17,7 +17,7 @@ #include "system/kvm_int.h" #include "system/kvm_xen.h" #include "kvm/kvm_i386.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "xen-emu.h" #include "trace.h" #include "system/runstate.h" diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index 04e5f7e637..91f0e32366 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -9,7 +9,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/ioport.h" #include "qemu/accel.h" #include "system/nvmm.h" diff --git a/target/i386/sev.c b/target/i386/sev.c index 0e1dbb6959..ba88976e9f 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -39,7 +39,7 @@ #include "qapi/qapi-commands-misc-target.h" #include "confidential-guest.h" #include "hw/i386/pc.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/queue.h" OBJECT_DECLARE_TYPE(SevCommonState, SevCommonStateClass, SEV_COMMON) diff --git a/target/i386/tcg/system/misc_helper.c b/target/i386/tcg/system/misc_helper.c index ce18c75b9f..0555cf2604 100644 --- a/target/i386/tcg/system/misc_helper.c +++ b/target/i386/tcg/system/misc_helper.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/cpu_ldst.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/cputlb.h" #include "tcg/helper-tcg.h" #include "hw/i386/apic.h" diff --git a/target/i386/tcg/system/tcg-cpu.c b/target/i386/tcg/system/tcg-cpu.c index 13a3507863..ab1f3c7c59 100644 --- a/target/i386/tcg/system/tcg-cpu.c +++ b/target/i386/tcg/system/tcg-cpu.c @@ -23,7 +23,7 @@ #include "system/system.h" #include "qemu/units.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "tcg/tcg-cpu.h" diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 41fb8c5a4e..d58cb11cee 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/ioport.h" #include "gdbstub/helpers.h" #include "qemu/accel.h" diff --git a/target/loongarch/kvm/kvm.c b/target/loongarch/kvm/kvm.c index f0e3cfef03..1bda570482 100644 --- a/target/loongarch/kvm/kvm.c +++ b/target/loongarch/kvm/kvm.c @@ -18,7 +18,7 @@ #include "system/kvm_int.h" #include "hw/pci/pci.h" #include "exec/memattrs.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "hw/irq.h" #include "hw/loongarch/virt.h" diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 0f4997a918..5315134e08 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -35,7 +35,7 @@ #include "accel/accel-cpu-target.h" #include "hw/pci/pci.h" #include "exec/memattrs.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "hw/irq.h" #include "hw/intc/riscv_imsic.h" diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index d8f483898d..b079d120db 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -17,7 +17,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "cpu.h" #include "s390x-internal.h" #include "kvm/kvm_s390x.h" diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c index 6a4d9c5081..a3347f1236 100644 --- a/target/s390x/sigp.c +++ b/target/s390x/sigp.c @@ -14,7 +14,7 @@ #include "hw/boards.h" #include "system/hw_accel.h" #include "system/runstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/cputlb.h" #include "exec/exec-all.h" #include "system/tcg.h" diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index f969850f87..ac733f407f 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -28,7 +28,7 @@ #include "tcg_s390x.h" #ifndef CONFIG_USER_ONLY #include "qemu/timer.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/s390x/ioinst.h" #include "hw/s390x/s390_flic.h" #include "hw/boards.h" diff --git a/target/xtensa/dbg_helper.c b/target/xtensa/dbg_helper.c index 5546c82ecd..163a1ffc7b 100644 --- a/target/xtensa/dbg_helper.c +++ b/target/xtensa/dbg_helper.c @@ -31,7 +31,7 @@ #include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "exec/exec-all.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" void HELPER(wsr_ibreakenable)(CPUXtensaState *env, uint32_t v) { diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index c4323574e1..2ff1c90df7 100644 --- a/hw/display/apple-gfx.m +++ b/hw/display/apple-gfx.m @@ -18,7 +18,7 @@ #include "qapi/visitor.h" #include "qapi/error.h" #include "block/aio-wait.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/dma.h" #include "migration/blocker.h" #include "ui/console.h" From patchwork Thu Apr 24 00:47:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883870 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3206305wrs; Wed, 23 Apr 2025 18:17:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWVxpbW0yI8YBq7EKkRsbK4sInwLK4KxpyCFnLgvYt5e0JZDjlrV7UDxSQyLel0RjwMb3ED9w==@linaro.org X-Google-Smtp-Source: AGHT+IFuDU/RpyE1l1itxzk17yTAHhIMDzgGDviMCwCHR9iPk+vbjZMgWJegItRaq7dp56wBMWBs X-Received: by 2002:ad4:5ec6:0:b0:6df:99f7:a616 with SMTP id 6a1803df08f44-6f4bfbc6904mr15522366d6.2.1745457475357; Wed, 23 Apr 2025 18:17:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457475; cv=none; d=google.com; s=arc-20240605; b=aJAipQd9xplNmNzi5Sa2jRjzgDcgnEqyElgVgAxlMTHRtmCv+oWdipm4GY/Oz2qq6n Tl3RK8PciamNrJIG3B6r0lDgo60OGhQhLcDq+H+lgJaq5/eJe78bfm6fz7CTppbU5oL1 l76SNH/DhpR5H7mM018srmjV7M+SW8srMf+Mnw/hvJfgB66NqaRF7f8jb8QIp5ymrA5s m69S82Dlb3nmhgzSn4tdOCyhoLRdcs9RuEzH0XsK8lHdgS0m0WuY6myWAvqKBGFwW5Pk tq9L4sxP0sV011G7YgxIy66wUrldOPlv/MLC6mRAIo6KNQXxv/e7dZ8BGkdBR6GWhi32 46Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lLjtkdVg3jxGT84stBTwdpl7UMQktBniBef0Jy8HlE4=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=aq1WMDq3vOhML8gP2YOEVsNEVO1QPoCw4k1qSor2Tjz0OVWMWvy2/6kOPf57PK6sln CfBY4LyAJwJKzGXABP5MbdZVNR3g/DhLvyLK0rm6zwSy/4jrUC0lbGF+fo/iZF3d28AN bVFTgmq9rL+w8/P+7n4Juthnrz9xpGrIR4FcGEbtjyItMf/G0Up6w0CobwDEBwGMZvn8 wP9xTLiErWD+Krks0+fsDRLPqR2Yb+jlC+oFfjlC8xEqcvrniQkkYMLvZDH8nLKzYVxq ikfmw27rq0rjlqqAFbcOYjPAYWB5f86WkSNVALviJRVEO2ESr3D7eZsXB9DqSBf29HIs RRug==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CHnVEVBZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c092b027si4013196d6.149.2025.04.23.18.17.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:17:55 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CHnVEVBZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kp5-0007q3-JP; Wed, 23 Apr 2025 20:52:16 -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 1u7kn7-0005eu-2b for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:20 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7kmy-0004Oy-MY for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:08 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-73bf1cef6ceso385272b3a.0 for ; Wed, 23 Apr 2025 17:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455802; x=1746060602; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lLjtkdVg3jxGT84stBTwdpl7UMQktBniBef0Jy8HlE4=; b=CHnVEVBZObq5Wy+O3h/zlmtOoov+ScVcCGh/1yLvKpipiRHW8a7j+PwHH6i2PODhzR g3nzroKqYRXh4tFEfAYMm1AsGsPVSWanidfIwiz8h9H7Z1FRZW1CKtGKp24zeaU7cD4T /9+xWx5xbu78YLHnC3BRj7SQfKa+TH08rVKcePMMhzCs7WHdRiqPsum+Yqca/7XQF98i uv350TSS358qf/GmJk+kADJvLXDGTV5cCdT8SawQo7iA6WOkAgrMVmdjsEux+wgWq8mM vqnrrYsJvyaNJNp6ilJNGFCZlaA0vthSKbCmMeI5Jd0yFBMHBfQ557+wQEGIOappb5Oi iiJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455802; x=1746060602; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lLjtkdVg3jxGT84stBTwdpl7UMQktBniBef0Jy8HlE4=; b=JTuyf/TcBwk9UK1blsqrCVPWIOT7TsxwFcPrTRCplxFzjqFnAxF4sYelND2PMoxV9Z gaw6PINq8h6IX745g62M0VBULTxiC7DxBwbCWk3TEAMHSfnGlvVlptF4XEt97m/d53wD W7LlYCR1tEBmxo9fhPcnqvONLYIeInad83IF0jw4gl0+l8Pp7zk2uH/gxs1wL9rq69bp JSysRtwzSaz4aa33wkBMLgCCwF1QGNWoUkRjn6PzZnJByWpUAJDYD8atXE0WmfD+EO9W 7xDSBm60ZZE4oxLC8CkOzX2iL6H7B0G5ggQwOqiBlYXBahBcRkQWWqVdWerZLQgK+4pJ 2/Yw== X-Gm-Message-State: AOJu0Yx/55TckfOt37txhdry/Fbb8cKkPCMMEetXskhhN4IwXqYclOnb mtjNclErC84aVbMR2TWt7Qj6mzEFGH6/C/SrikqWf2b8OXe3T1nTDl4QDPGmwJwv/VcswLMNKwm 5 X-Gm-Gg: ASbGncsdGGmsEfhPVg/iRuw42f+p/EYU8Cry35dPVPp4cIEyIdOr2abJ90XZ/C0mrqi uNjuqfgH00lLtb8603e3FRD46aMXtpAvNmqOGi9zsmeXVmhSbrJ24k2V+CXi+XUKlSYC2HWACeX XXQAe8r8uvQSsNPXLq61Z/TWLgbqf6Qvp8kGvv3VOtfcFw00dc7lhRyj0JlyzU1eszNi5C4FC66 1XnWf/Dww6KcIul7ax8pGuLXhzFeHOKB7h1frtXmsHqhTEAP+9MV3II64RJHcaPQviZQ9J2kDZ7 r8/cVk4Dwpew/4HJFtjvNWC+HK5xikviNAIPnOWjTSM3fkMCDDCnaeoEfJT5Tx2Ln3k30DiJW0M = X-Received: by 2002:a05:6a20:e18a:b0:201:4061:bd94 with SMTP id adf61e73a8af0-20444ebdf33mr828001637.19.1745455802142; Wed, 23 Apr 2025 17:50:02 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.50.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:50:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 036/148] include/system: Move exec/ioport.h to system/ioport.h Date: Wed, 23 Apr 2025 17:47:41 -0700 Message-ID: <20250424004934.598783-37-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the existing includes with sed. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- hw/display/vga_int.h | 2 +- include/hw/char/parallel-isa.h | 2 +- include/hw/dma/i8257.h | 2 +- include/hw/ide/ide-bus.h | 2 +- include/hw/isa/isa.h | 2 +- include/{exec => system}/ioport.h | 6 ++---- hw/block/fdc-isa.c | 2 +- monitor/hmp-cmds.c | 2 +- system/ioport.c | 2 +- system/physmem.c | 2 +- system/qtest.c | 2 +- target/i386/nvmm/nvmm-all.c | 2 +- target/i386/whpx/whpx-all.c | 2 +- tests/qtest/fuzz/qtest_wrappers.c | 2 +- MAINTAINERS | 2 +- 15 files changed, 16 insertions(+), 18 deletions(-) rename include/{exec => system}/ioport.h (97%) diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index 60ad26e03e..747b5cc6cf 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -26,7 +26,7 @@ #define HW_VGA_INT_H #include "ui/console.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "system/memory.h" #include "hw/display/bochs-vbe.h" diff --git a/include/hw/char/parallel-isa.h b/include/hw/char/parallel-isa.h index 5284b2ffec..3edaf9dbe4 100644 --- a/include/hw/char/parallel-isa.h +++ b/include/hw/char/parallel-isa.h @@ -12,7 +12,7 @@ #include "parallel.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "hw/isa/isa.h" #include "qom/object.h" diff --git a/include/hw/dma/i8257.h b/include/hw/dma/i8257.h index 4342e4a91e..33b6286d5a 100644 --- a/include/hw/dma/i8257.h +++ b/include/hw/dma/i8257.h @@ -2,7 +2,7 @@ #define HW_I8257_H #include "hw/isa/isa.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "qom/object.h" #define TYPE_I8257 "i8257" diff --git a/include/hw/ide/ide-bus.h b/include/hw/ide/ide-bus.h index 4841a7dcd6..121b455fcd 100644 --- a/include/hw/ide/ide-bus.h +++ b/include/hw/ide/ide-bus.h @@ -1,7 +1,7 @@ #ifndef HW_IDE_BUS_H #define HW_IDE_BUS_H -#include "exec/ioport.h" +#include "system/ioport.h" #include "hw/ide/ide-dev.h" #include "hw/ide/ide-dma.h" diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 1d852011b3..a82c5f1004 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -4,7 +4,7 @@ /* ISA bus */ #include "system/memory.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/exec/ioport.h b/include/system/ioport.h similarity index 97% rename from include/exec/ioport.h rename to include/system/ioport.h index ecea3575bc..780ea5a676 100644 --- a/include/exec/ioport.h +++ b/include/system/ioport.h @@ -21,8 +21,8 @@ * IO ports API */ -#ifndef IOPORT_H -#define IOPORT_H +#ifndef SYSTEM_IOPORT_H +#define SYSTEM_IOPORT_H #include "system/memory.h" @@ -39,9 +39,7 @@ typedef struct MemoryRegionPortio { #define PORTIO_END_OF_LIST() { } -#ifndef CONFIG_USER_ONLY extern const MemoryRegionOps unassigned_io_ops; -#endif void cpu_outb(uint32_t addr, uint8_t val); void cpu_outw(uint32_t addr, uint16_t val); diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c index a10c24aab1..561cfa47c1 100644 --- a/hw/block/fdc-isa.c +++ b/hw/block/fdc-isa.c @@ -42,7 +42,7 @@ #include "system/block-backend.h" #include "system/blockdev.h" #include "system/system.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "qemu/log.h" #include "qemu/main-loop.h" #include "qemu/module.h" diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 8ddcdd76c1..74a0f56566 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -15,7 +15,7 @@ #include "qemu/osdep.h" #include "system/address-spaces.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "exec/gdbstub.h" #include "gdbstub/enums.h" #include "monitor/hmp.h" diff --git a/system/ioport.c b/system/ioport.c index 5300716464..4f96e9119f 100644 --- a/system/ioport.c +++ b/system/ioport.c @@ -26,7 +26,7 @@ */ #include "qemu/osdep.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "system/memory.h" #include "system/address-spaces.h" #include "trace.h" diff --git a/system/physmem.c b/system/physmem.c index e61fea41b5..234e489199 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -51,7 +51,7 @@ #include "qemu/memalign.h" #include "qemu/memfd.h" #include "system/memory.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "system/dma.h" #include "system/hostmem.h" #include "system/hw_accel.h" diff --git a/system/qtest.c b/system/qtest.c index 5407289154..523a047995 100644 --- a/system/qtest.c +++ b/system/qtest.c @@ -16,7 +16,7 @@ #include "system/qtest.h" #include "system/runstate.h" #include "chardev/char-fe.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "system/memory.h" #include "exec/tswap.h" #include "hw/qdev-core.h" diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index 91f0e32366..17394d073d 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "system/address-spaces.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "qemu/accel.h" #include "system/nvmm.h" #include "system/cpus.h" diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index d58cb11cee..b64852e13e 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "system/address-spaces.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "gdbstub/helpers.h" #include "qemu/accel.h" #include "system/whpx.h" diff --git a/tests/qtest/fuzz/qtest_wrappers.c b/tests/qtest/fuzz/qtest_wrappers.c index 0580f8df86..d7adcbe3fd 100644 --- a/tests/qtest/fuzz/qtest_wrappers.c +++ b/tests/qtest/fuzz/qtest_wrappers.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "hw/core/cpu.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "fuzz.h" diff --git a/MAINTAINERS b/MAINTAINERS index 5d391cfaa7..9a96cc1b5e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3118,7 +3118,7 @@ M: Peter Xu M: David Hildenbrand R: Philippe Mathieu-Daudé S: Supported -F: include/exec/ioport.h +F: include/system/ioport.h F: include/exec/memop.h F: include/system/memory.h F: include/exec/ram_addr.h From patchwork Thu Apr 24 00:47:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883819 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3200891wrs; Wed, 23 Apr 2025 18:01:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVfOcZ5dxcpsAiwHpt63+Cb0HDEgfHm+3Z8Ogf8BR49tyfCLYbnkINTjDcTPKiqUXrJZOKYCQ==@linaro.org X-Google-Smtp-Source: AGHT+IGntHpf/4px8SNWv8Gts09+O4BVKpPq1or2H18MskXNoKhdmryJ/kkQSEQXnk7fOt9GRXFp X-Received: by 2002:a05:620a:bc2:b0:7c5:5339:48cf with SMTP id af79cd13be357-7c956ede191mr141537285a.30.1745456504497; Wed, 23 Apr 2025 18:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456504; cv=none; d=google.com; s=arc-20240605; b=Jy3Ra+kET7eUNhLPsy/0U5M19fAB+qMCXuizVFFGXh3o8iAlNygFI06xFjOsB6Rclf /YJyBlzMT9RZ7OXmGZSG5Y+ehVzYucAJPq5LiUYcGWUCbCvVp/6tHLw86VVeqNzDsp7V jY+AN5idcE8q1kCUPiifgjQKOC1CCWN1VnssDs8r4FYWucyegSwnVWfSAFJQNOKJBstH ssNJ0ell9v4uraZ1lngJTHJ7WoB5a380ZhDT6oWXl5WkdGUTpPGg4na0VFJgpejbk/Gt hrp3QNeT+0VvfSI1E3hlTM3tDrwoVYkLhnFdujG5je8Bzou/YnY2ShOxGTdq8uygFB+t ZT9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SfzDetC/vdIssYfiVbn8MXEeWiVxndT5CmpHo57J/CM=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=XCfw65qqRPChwqG9uez3f9nzIyBrymUMJaQemal18ctL6+VGIGjF+ia96f5gZt/Z0s 1YtRdTq8+MGJ7CDKSVwXkvL9/Y7n4cp6BAyC4/BCPx9i+KxFAbWLa+gp8dngsWrOUKRF M6rO5wsDUZXCsns8yHXvSN2SJFSxfrQUgbQl7zT9R21LXaulQSVkY1v+MwtCGMVZugLJ rtSyztumz9AcFEDjqOwWq2dHle+7wXnFIo4gUHgn0xWS9RJbgO7Ssk+zmCgsXeH3EBn4 M1Sl6oQf0v8VE6Wou1VTD6+thg+5armVQ8n0VvIQQ9ip3/TIeIDl8HeRh33fBUnAOK5f bKOA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J0PIQhEJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958d87463si21525885a.313.2025.04.23.18.01.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:01:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J0PIQhEJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kod-0007HQ-8R; Wed, 23 Apr 2025 20:51: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 1u7kn7-0005et-2K for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:20 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0: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 1u7kmy-0004Qa-Md for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:09 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-7370a2d1981so306274b3a.2 for ; Wed, 23 Apr 2025 17:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455803; x=1746060603; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SfzDetC/vdIssYfiVbn8MXEeWiVxndT5CmpHo57J/CM=; b=J0PIQhEJoMAa1ewQ7kF8O4SweQc7fidcGYUazGNgw0qtvb/ZVvkYQUG7SbdGKn8tPx xWt8Lu0JH7li/qlGWFk2uzdPjq+Psm/ODmHX/tyfbMNivFGXPbvNWZJuLMp8JhjvKDTD 9BvhetvUiUf29XHvs8z/SfTMJAmlym8Ptfy2No8o59l6FgUul00o6IotZPNOnyORomTV 0WcTVBWmR6a1fjIOAMrMoFI5iHIlxgwV8Ws0hO6tC559r2MaIjMxN3Lb7h5WV3udqFSo m3CMldRcEtbvfVQXpSeTgVvyp0JUKcUrJy4/VGC+UZrmhWs/by/C2DjGJ5xlFRM5Nc6l v9zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455803; x=1746060603; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SfzDetC/vdIssYfiVbn8MXEeWiVxndT5CmpHo57J/CM=; b=CqXFHNKx63huEBD3einRfjpQPwhCe65zluAoTtBEmRDDPoH6ogJ6PJOfNJeFrmAo8O 20hNrYY1E/y47sJMX3tA0VmL7RWZer0maTlUjVgst0YN5SCWDxblbr3gGywXnFmLzdNe /m552XBOZPE+g7gVPuwuuFAflPYMmwE5YjBZ3XyUDEC/3QxrcnDP2pTIY3KNipkdysd3 iBYm0Kbc3ZQr8OMnuPl+W6chkP+l5k4BgRrLGaiOtyGI6Do34l93QTNvHquOLPqJxzY4 zJD/NiZMxKU+k/2uGY5IuxP4yHQSjkNXa0Tz2YTQP7mWAdmb7kmNcSSR1Xl5pOYSrHMA f18w== X-Gm-Message-State: AOJu0YxjW5UmZ7zAfmUkbgCb9nJTSeuq/UQi3HxIQi2blYNOK4HiNI6o GXB/P6ZSVaS+zreLGtbrdJUpPCFy9rzmhc4WEtW08vG8CspLiwloyFAnWdgpRmwyyATIt647cw9 9 X-Gm-Gg: ASbGncuCLsL9MayD97cVvVCQ8jKn3+Y8Z82fy9u1MG4cy0ocntLGP5tKSBF0IIfX6fX BwvAYMVC0dOwViD+k6VoXBzodKy3dhccI4pgCXwM59KpX/4LPtHgbjZ7e6jyQWkBQmtgZ8KWupE ziCUz7RejPPGVv2GLS/8NwqHttuuShk5Y+cFdrbMXjZkPAi93X1XvLC6Fr3wegOxWYRJcqx0X5b JJgRxX3Wb/FKVJ8s8QwDbpT/uHNI7DME+Vn5Z98Zlf9DqDnJhRAeJULRM+VxGLL4SFba39AUf8T PmqMzvL7RsQENUVWOWvXSuVd6vi/5NRDE7XAN5BRf1oxCUUxyr/Z/doPHda86MDoXe3hCvFxQkE = X-Received: by 2002:a05:6a21:9ccb:b0:1f5:55b7:1bb2 with SMTP id adf61e73a8af0-20444e6e860mr926483637.6.1745455802788; Wed, 23 Apr 2025 17:50:02 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:50:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 037/148] include/system: Move exec/ram_addr.h to system/ram_addr.h Date: Wed, 23 Apr 2025 17:47:42 -0700 Message-ID: <20250424004934.598783-38-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the existing includes with sed. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/{exec => system}/ram_addr.h | 7 +++---- accel/kvm/kvm-all.c | 2 +- accel/tcg/cputlb.c | 2 +- accel/tcg/translate-all.c | 2 +- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_caps.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/remote/memory.c | 2 +- hw/remote/proxy-memory-listener.c | 2 +- hw/s390x/s390-stattrib-kvm.c | 2 +- hw/s390x/s390-stattrib.c | 2 +- hw/s390x/s390-virtio-ccw.c | 2 +- hw/vfio/common.c | 3 +-- hw/vfio/container.c | 2 +- hw/vfio/spapr.c | 2 +- hw/virtio/virtio-mem.c | 2 +- migration/ram.c | 2 +- system/memory.c | 2 +- system/physmem.c | 2 +- target/arm/tcg/mte_helper.c | 2 +- target/ppc/kvm.c | 2 +- target/s390x/kvm/kvm.c | 2 +- MAINTAINERS | 2 +- 23 files changed, 25 insertions(+), 27 deletions(-) rename include/{exec => system}/ram_addr.h (99%) diff --git a/include/exec/ram_addr.h b/include/system/ram_addr.h similarity index 99% rename from include/exec/ram_addr.h rename to include/system/ram_addr.h index 8677761af5..3b81c3091f 100644 --- a/include/exec/ram_addr.h +++ b/include/system/ram_addr.h @@ -16,10 +16,9 @@ * The functions declared here will be removed soon. */ -#ifndef RAM_ADDR_H -#define RAM_ADDR_H +#ifndef SYSTEM_RAM_ADDR_H +#define SYSTEM_RAM_ADDR_H -#ifndef CONFIG_USER_ONLY #include "system/xen.h" #include "system/tcg.h" #include "exec/cputlb.h" @@ -559,5 +558,5 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(RAMBlock *rb, return num_dirty; } -#endif + #endif diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 9e06a95f75..a30b19f455 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -34,7 +34,7 @@ #include "system/accel-blocker.h" #include "qemu/bswap.h" #include "system/memory.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qemu/event_notifier.h" #include "qemu/main-loop.h" #include "trace.h" diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 6f0ea9067b..134e523cab 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -27,7 +27,7 @@ #include "exec/cputlb.h" #include "exec/tb-flush.h" #include "exec/memory-internal.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "exec/mmu-access-type.h" #include "exec/tlb-common.h" #include "exec/vaddr.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 16e5043597..167535bcb1 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -40,7 +40,7 @@ #endif #endif #else -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #endif #include "exec/cputlb.h" diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6fef1d167a..c1a7ac3536 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -77,7 +77,7 @@ #include "hw/virtio/virtio-scsi.h" #include "hw/virtio/vhost-scsi-common.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "system/confidential-guest-support.h" #include "hw/usb.h" #include "qemu/config-file.h" diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c index 815c94ed2f..f2f5722d8a 100644 --- a/hw/ppc/spapr_caps.c +++ b/hw/ppc/spapr_caps.c @@ -27,7 +27,7 @@ #include "qapi/error.h" #include "qapi/visitor.h" #include "system/hw_accel.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "target/ppc/cpu.h" #include "target/ppc/mmu-hash64.h" #include "cpu-models.h" diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index e0a9d50edc..384269b831 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -34,7 +34,7 @@ #include "hw/pci/pci_host.h" #include "hw/ppc/spapr.h" #include "hw/pci-host/spapr.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include #include "trace.h" #include "qemu/error-report.h" diff --git a/hw/remote/memory.c b/hw/remote/memory.c index 6d60da91e0..00193a552f 100644 --- a/hw/remote/memory.c +++ b/hw/remote/memory.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "hw/remote/memory.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qapi/error.h" static void remote_sysmem_reset(void) diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c index ce7f5b9bfb..30ac74961d 100644 --- a/hw/remote/proxy-memory-listener.c +++ b/hw/remote/proxy-memory-listener.c @@ -12,7 +12,7 @@ #include "qemu/range.h" #include "system/memory.h" #include "exec/cpu-common.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "hw/remote/mpqemu-link.h" diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c index d0ff04364d..ebcd56368f 100644 --- a/hw/s390x/s390-stattrib-kvm.c +++ b/hw/s390x/s390-stattrib-kvm.c @@ -16,7 +16,7 @@ #include "qemu/error-report.h" #include "system/kvm.h" #include "system/memory_mapping.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "kvm/kvm_s390x.h" #include "qapi/error.h" diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c index 35bf697ef0..a86002be6a 100644 --- a/hw/s390x/s390-stattrib.c +++ b/hw/s390x/s390-stattrib.c @@ -16,7 +16,7 @@ #include "hw/qdev-properties.h" #include "hw/s390x/storage-attributes.h" #include "qemu/error-report.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qapi/error.h" #include "qobject/qdict.h" #include "cpu.h" diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 5af3c4f547..52c273b3de 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "system/confidential-guest-support.h" #include "hw/boards.h" #include "hw/s390x/sclp.h" diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 98832af88d..bae0633c3d 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -29,8 +29,7 @@ #include "hw/vfio/pci.h" #include "system/address-spaces.h" #include "system/memory.h" -#include "exec/ram_addr.h" -#include "exec/target_page.h" +#include "system/ram_addr.h" #include "hw/hw.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 2e993c7e73..812d5edbcf 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -25,7 +25,7 @@ #include "hw/vfio/vfio-common.h" #include "system/address-spaces.h" #include "system/memory.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qemu/error-report.h" #include "qemu/range.h" #include "system/reset.h" diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index c9a7dd8d68..66a2d2bb0d 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -17,7 +17,7 @@ #include "hw/vfio/vfio-common.h" #include "hw/hw.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qemu/error-report.h" #include "qapi/error.h" #include "trace.h" diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index 5f57eccbb6..c7968ee0c6 100644 --- a/hw/virtio/virtio-mem.c +++ b/hw/virtio/virtio-mem.c @@ -24,7 +24,7 @@ #include "hw/virtio/virtio-mem.h" #include "qapi/error.h" #include "qapi/visitor.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "migration/misc.h" #include "hw/boards.h" #include "hw/qdev-properties.h" diff --git a/migration/ram.c b/migration/ram.c index 424df6d9f1..6295f675df 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -48,7 +48,7 @@ #include "qapi/qapi-commands-migration.h" #include "qapi/qmp/qerror.h" #include "trace.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "exec/target_page.h" #include "qemu/rcu_queue.h" #include "migration/colo.h" diff --git a/system/memory.c b/system/memory.c index a4185ea353..6a5d853071 100644 --- a/system/memory.c +++ b/system/memory.c @@ -26,7 +26,7 @@ #include "trace.h" #include "exec/memory-internal.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "system/kvm.h" #include "system/runstate.h" #include "system/tcg.h" diff --git a/system/physmem.c b/system/physmem.c index 234e489199..307d0764b6 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -67,7 +67,7 @@ #include "system/replay.h" #include "exec/memory-internal.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qemu/pmem.h" diff --git a/target/arm/tcg/mte_helper.c b/target/arm/tcg/mte_helper.c index 5d6d8a17ae..80164a8050 100644 --- a/target/arm/tcg/mte_helper.c +++ b/target/arm/tcg/mte_helper.c @@ -27,7 +27,7 @@ #include "user/cpu_loop.h" #include "user/page-protection.h" #else -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #endif #include "exec/cpu_ldst.h" #include "exec/helper-proto.h" diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 992356cb75..8b12b8e7d2 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -41,7 +41,7 @@ #include "trace.h" #include "gdbstub/enums.h" #include "exec/memattrs.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "system/hostmem.h" #include "qemu/cutils.h" #include "qemu/main-loop.h" diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c index 4d56e653dd..b9f1422197 100644 --- a/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -41,7 +41,7 @@ #include "system/runstate.h" #include "system/device_tree.h" #include "gdbstub/enums.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "trace.h" #include "hw/s390x/s390-pci-inst.h" #include "hw/s390x/s390-pci-bus.h" diff --git a/MAINTAINERS b/MAINTAINERS index 9a96cc1b5e..b1ac3ff7d2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3121,7 +3121,7 @@ S: Supported F: include/system/ioport.h F: include/exec/memop.h F: include/system/memory.h -F: include/exec/ram_addr.h +F: include/system/ram_addr.h F: include/exec/ramblock.h F: include/system/memory_mapping.h F: system/dma-helpers.c From patchwork Thu Apr 24 00:47:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883799 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199524wrs; Wed, 23 Apr 2025 17:57:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVZQVvCP8CSDHo0Vrdfv9zo6C6qkwXYoFBS4+YgHdkLpzWmasxz5l8QE5VbnQAIFVfBigT8qw==@linaro.org X-Google-Smtp-Source: AGHT+IHJWABvfyJSEOj74/lIA8oMZdoWO2O3jPfi2Z6RexzkpDqGvyMweZ0ld9ayMl3Flq2/TmF5 X-Received: by 2002:ad4:5ae9:0:b0:6e8:9526:5788 with SMTP id 6a1803df08f44-6f4bfa6111bmr15590946d6.0.1745456276137; Wed, 23 Apr 2025 17:57:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456276; cv=none; d=google.com; s=arc-20240605; b=WClcVgFGcc9/54ya1H6ME3KAlJ4hVIrpxxJFZdwf5Cq3g5WmRxOJVCSqIlyXyT97Rz 4P21YM/XXZ4/gGDA/GQPkRhYk6X45PM9M/s7wEHevKgQuzXwHHr3I2TnTqdayD7hsLi/ MS1gANMjrUfjL/kb315kynCysCYRCSmWCpnpdp1JZwVFAkxEN7BWNDuaYiDGQmLX7s6Z DzdQXQ29MwMAhRV6VJKtJpso2epAaqG0FTe9cQFg3fCQYPNQHYs8OKHZvZwqKCmwQODj 63XLp9aJYPuaIss9eSwXQ1VVS48hfcdZU2ahgWj2YJHYgjBJxUZpeIxzCTKmOOLgSYpp ce+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6NBZn3i6oWCdtplZB4PrRd/eK1p4Gk3cW81nmsPJsCg=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=Wc5Rjq3BDQrrvK5EhrfxfDA99qc80PuOhcxA8Rh3fllRzcSxHSRo8yx545LZ4TyX5q N9xCjNrCNTFhjsmML3dMkNFr/RPjs8hnsgpR8yplaKLZl+qAH1LMlP8BaFmNY5hw9sm2 v1+KxOKnmLPwjZBQtjrr6AuQ+Bo3z+mQYmcEsEDDljLnWV5asjinkwVnlKMg9dZfk4Xu iHolxfbsynmnNaa7diSr7RBptgw73rleDrvTXZtO//152IEsyAIEUy8iqG/OCjDQKOrn HRnt98eQ4auyAhtrI/2SSNOSfuY7fYpkPsG9bE2a9yqB6WaUoq71r/DEzEmcpunU0UQS W/kA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dr3wX1gV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c08d26d4si3638316d6.90.2025.04.23.17.57.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:57:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dr3wX1gV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7koV-000737-7s; Wed, 23 Apr 2025 20:51:41 -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 1u7kn7-0005es-1T for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:20 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kmz-0004Wg-3z for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:09 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-736b98acaadso365419b3a.1 for ; Wed, 23 Apr 2025 17:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455803; x=1746060603; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6NBZn3i6oWCdtplZB4PrRd/eK1p4Gk3cW81nmsPJsCg=; b=dr3wX1gVocwd5ee9764p7TBdLZfjNd8QHL+3Otdyc0kwzcWyJamLVVofuBdBdHBy7Q 8VA6QKzrLni8Pf3fyyzK3kPKHTkqNyvIDM6lYc1WTeXqTdvWVdKsqn5u7pCuZYckErkg reHxC8ZLPPWvQuHpdw1bM0g19tsTAv7uKDvQJSEdHz89W7mUvno/UHqByM5aetPsuKkX aJQ+qCV39VKuHvpQuYdosVHi4hOBX51GMTSRX7sOyEU+2MYBOEJCAcE9/h1/aOFiCQIa FCbuBmAylypr1uuOlS+pOam0SFIcXesSK0RyCoRoHlo6LkcOkNYe+IBgRZdok1C66H76 bo0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455803; x=1746060603; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6NBZn3i6oWCdtplZB4PrRd/eK1p4Gk3cW81nmsPJsCg=; b=hE7yNNYifOTtUE2s4VQ3MbFqdsL/DrhQ6/d5t/eRtOO/SwZl596bkHQAtz3pnEjXUD fsDzByDTh2ylk1R65Uv94GaRu83/QmWZEvp3HcByRO36dLMmReHzAPpWHN/o1gSjWVI8 A2qgYeIMB+Wj5XJk5rK+aZN/5wQz4GWIdNwbDCVyMHs+DNL2TlSizqw6VeDzY7ojD/7e bN9Nujle17lSKzX0z4maHIMZSesdIuuVlcpLsBeVc0t/7sdTBZlCTLVtKRxLn4Sc/vg9 zLvjFRGZC6af6U8UGhIVLcLccGCy354IyI9ZXgVNBX27Dwdm4PzeJs8LhivJAHfx3hbE N/cw== X-Gm-Message-State: AOJu0YwP8VmioSaUpRpR6UYPb9cNhubrhtWzCr/3ucbQ38B9QfGCcl9z 1BJCPO1NHM/2bVJF7H/tC38+co5iBsn1TmnnB66hdxk3zCsm2iYMPdLyjPCj/49XGmYdHcHshdq c X-Gm-Gg: ASbGncuAkPsT21eM5c9FzuOGucPqMvG74nEzZblqq5bJVaL/MHmSpW73c0ZW/Qr6X3w EkDGH8GVALDNL5y7qABfxd5+hRAPKM8G4V1goG0o/+H09rGbWnT9lF7nP4TtihmsVcqkUSta35J fvLns9ZuThiss+F6wDJfR+6uO5/yPdFisDK3lnHiiMx6tPrexBwEKtYeh8j5BP4Ne9VD/i3zfC4 6TopZQZ6fGB+RqHeiB3OnKZVEx5D3VGU+muVB/Wcu1G8RPJcUxVO6F42oXnxEgL+9RR3rreXjkl BcXwUtr/DA9AbShtR5gAPkXBH3jUknVMxw11oquhfvGy8GeaM4T5kqG8DYEhWmI6J8zAST8i2X0 = X-Received: by 2002:a05:6a00:80d:b0:736:34ff:be7 with SMTP id d2e1a72fcca58-73e24acafe4mr923782b3a.15.1745455803502; Wed, 23 Apr 2025 17:50:03 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.50.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:50:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 038/148] include/system: Move exec/ramblock.h to system/ramblock.h Date: Wed, 23 Apr 2025 17:47:43 -0700 Message-ID: <20250424004934.598783-39-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the existing includes with sed. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/system/ram_addr.h | 2 +- include/{exec => system}/ramblock.h | 9 ++++----- hw/display/virtio-gpu-udmabuf.c | 2 +- hw/hyperv/hv-balloon.c | 2 +- hw/virtio/vhost-user.c | 2 +- migration/dirtyrate.c | 2 +- migration/file.c | 2 +- migration/multifd-nocomp.c | 2 +- migration/multifd-qatzip.c | 2 +- migration/multifd-qpl.c | 2 +- migration/multifd-uadk.c | 2 +- migration/multifd-zero-page.c | 2 +- migration/multifd-zlib.c | 2 +- migration/multifd-zstd.c | 2 +- migration/multifd.c | 2 +- migration/postcopy-ram.c | 2 +- tests/qtest/fuzz/generic_fuzz.c | 2 +- MAINTAINERS | 2 +- 18 files changed, 21 insertions(+), 22 deletions(-) rename include/{exec => system}/ramblock.h (96%) diff --git a/include/system/ram_addr.h b/include/system/ram_addr.h index 3b81c3091f..b4e4425acb 100644 --- a/include/system/ram_addr.h +++ b/include/system/ram_addr.h @@ -23,7 +23,7 @@ #include "system/tcg.h" #include "exec/cputlb.h" #include "exec/ramlist.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "exec/exec-all.h" #include "system/memory.h" #include "exec/target_page.h" diff --git a/include/exec/ramblock.h b/include/system/ramblock.h similarity index 96% rename from include/exec/ramblock.h rename to include/system/ramblock.h index 64484cd821..d8a116ba99 100644 --- a/include/exec/ramblock.h +++ b/include/system/ramblock.h @@ -16,11 +16,10 @@ * The functions declared here will be removed soon. */ -#ifndef QEMU_EXEC_RAMBLOCK_H -#define QEMU_EXEC_RAMBLOCK_H +#ifndef SYSTEM_RAMBLOCK_H +#define SYSTEM_RAMBLOCK_H -#ifndef CONFIG_USER_ONLY -#include "cpu-common.h" +#include "exec/cpu-common.h" #include "qemu/rcu.h" #include "exec/ramlist.h" @@ -91,5 +90,5 @@ struct RAMBlock { */ ram_addr_t postcopy_length; }; -#endif + #endif diff --git a/hw/display/virtio-gpu-udmabuf.c b/hw/display/virtio-gpu-udmabuf.c index 85ca23cb32..0510577475 100644 --- a/hw/display/virtio-gpu-udmabuf.c +++ b/hw/display/virtio-gpu-udmabuf.c @@ -19,7 +19,7 @@ #include "hw/virtio/virtio-gpu.h" #include "hw/virtio/virtio-gpu-pixman.h" #include "trace.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "system/hostmem.h" #include #include diff --git a/hw/hyperv/hv-balloon.c b/hw/hyperv/hv-balloon.c index 0b1da723c8..acabff2c4a 100644 --- a/hw/hyperv/hv-balloon.c +++ b/hw/hyperv/hv-balloon.c @@ -12,7 +12,7 @@ #include "system/address-spaces.h" #include "exec/cpu-common.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "hw/boards.h" #include "hw/hyperv/dynmem-proto.h" #include "hw/hyperv/hv-balloon.h" diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 267b612587..48561d3c74 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -28,7 +28,7 @@ #include "system/cryptodev.h" #include "migration/postcopy-ram.h" #include "trace.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include #include diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index 09caf92f87..986624c79a 100644 --- a/migration/dirtyrate.c +++ b/migration/dirtyrate.c @@ -14,7 +14,7 @@ #include "qemu/error-report.h" #include "hw/core/cpu.h" #include "qapi/error.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "exec/target_page.h" #include "qemu/rcu_queue.h" #include "qemu/main-loop.h" diff --git a/migration/file.c b/migration/file.c index 7f11e26f5c..bb8031e3c7 100644 --- a/migration/file.c +++ b/migration/file.c @@ -6,7 +6,7 @@ */ #include "qemu/osdep.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "qemu/cutils.h" #include "qemu/error-report.h" #include "qapi/error.h" diff --git a/migration/multifd-nocomp.c b/migration/multifd-nocomp.c index ffe75256c9..94f248e8a2 100644 --- a/migration/multifd-nocomp.c +++ b/migration/multifd-nocomp.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "exec/target_page.h" #include "file.h" #include "migration-stats.h" diff --git a/migration/multifd-qatzip.c b/migration/multifd-qatzip.c index 6a0e989fae..7419e5dc0d 100644 --- a/migration/multifd-qatzip.c +++ b/migration/multifd-qatzip.c @@ -13,7 +13,7 @@ */ #include "qemu/osdep.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "qapi/qapi-types-migration.h" diff --git a/migration/multifd-qpl.c b/migration/multifd-qpl.c index 88e2344af2..52902eb00c 100644 --- a/migration/multifd-qpl.c +++ b/migration/multifd-qpl.c @@ -14,7 +14,7 @@ #include "qemu/module.h" #include "qapi/error.h" #include "qapi/qapi-types-migration.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "multifd.h" #include "qpl/qpl.h" diff --git a/migration/multifd-uadk.c b/migration/multifd-uadk.c index 6895c1f65a..fd7cd9b5e8 100644 --- a/migration/multifd-uadk.c +++ b/migration/multifd-uadk.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "qapi/error.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "migration.h" #include "multifd.h" #include "options.h" diff --git a/migration/multifd-zero-page.c b/migration/multifd-zero-page.c index f1e988a959..dbc1184921 100644 --- a/migration/multifd-zero-page.c +++ b/migration/multifd-zero-page.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "qemu/cutils.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "migration.h" #include "migration-stats.h" #include "multifd.h" diff --git a/migration/multifd-zlib.c b/migration/multifd-zlib.c index 8cf8a26bb4..8820b2a787 100644 --- a/migration/multifd-zlib.c +++ b/migration/multifd-zlib.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include #include "qemu/rcu.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "exec/target_page.h" #include "qapi/error.h" #include "migration.h" diff --git a/migration/multifd-zstd.c b/migration/multifd-zstd.c index abed140855..3c2dcf76b0 100644 --- a/migration/multifd-zstd.c +++ b/migration/multifd-zstd.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include #include "qemu/rcu.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "exec/target_page.h" #include "qapi/error.h" #include "migration.h" diff --git a/migration/multifd.c b/migration/multifd.c index dfb5189f0e..86c83e43c0 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -16,7 +16,7 @@ #include "qemu/rcu.h" #include "exec/target_page.h" #include "system/system.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "qemu/error-report.h" #include "qapi/error.h" #include "file.h" diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 5d3edfcfec..995614b38c 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -31,7 +31,7 @@ #include "qemu/error-report.h" #include "trace.h" #include "hw/boards.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "socket.h" #include "yank_functions.h" #include "tls.h" diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index 239be9372d..507de74806 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -21,7 +21,7 @@ #include "fuzz.h" #include "string.h" #include "system/memory.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "hw/qdev-core.h" #include "hw/pci/pci.h" #include "hw/pci/pci_device.h" diff --git a/MAINTAINERS b/MAINTAINERS index b1ac3ff7d2..ba885010c5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3122,7 +3122,7 @@ F: include/system/ioport.h F: include/exec/memop.h F: include/system/memory.h F: include/system/ram_addr.h -F: include/exec/ramblock.h +F: include/system/ramblock.h F: include/system/memory_mapping.h F: system/dma-helpers.c F: system/ioport.c From patchwork Thu Apr 24 00:47:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883868 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3206228wrs; Wed, 23 Apr 2025 18:17:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUkikYjFS4HjlAyCG10cfQqcctmDzQzpTHO/7SewpGJFuIjmrRdy7i1GiLZVtCL2oriPDrXIw==@linaro.org X-Google-Smtp-Source: AGHT+IHqa1SmT8atXS3b9sCiHbvfdYQJ/8RqRKs+skXpdRihtU4q4SK76ljnVHqJMWzY51ujBRtQ X-Received: by 2002:ac8:5f92:0:b0:47a:e616:cab2 with SMTP id d75a77b69052e-47eb2e9eeb4mr9437911cf.15.1745457457903; Wed, 23 Apr 2025 18:17:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457457; cv=none; d=google.com; s=arc-20240605; b=gYxEImPtZK3seNKxuetVLUBAhfQe6sByOf5NUZYDw9f6st1FMTKIMEv1a6yxDsSyMD RfSCQjYsqve3crqsi748EW4o+7QitYxt920/RVJafUftlFnxXtYUWUhUapOYOL8zIxgP jr9WLeOaNaB42XBh96FfkC9JAQYH03tj6tcP9udu2sMRFU5rW/ZFliWqsF7AmfJOM6BV niWP8IyZbVyS2s/8K88KGNTbppkXCbqV3BVQOCidAzKdDF8i2OdLv0zySqrNJR+dhp6n qmulSA4lcL6eT5iu5PBklh/0WHcz6uwtZtvjLd59nWPjIQLkovhbCduiWEepjr+40Ylp XYbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hSTxcdVupVH5RULwmr3LUReRVWUe6351QoWFFPPNbok=; fh=kNdEGbF/ybK5Sy0gyJx4f/674cQQwVDdsnJaVjZu1Yg=; b=jEKT8UyF49/CR3gkZuH0NHdTBZOOZhEl+UnH9rQ/ps//Hd0lnq2gMm5/9mSWmzcukS ZKDH9UdhiBLmoR6xFHhbYmrj0kvGpVXS237z5/K7Vno4p76wKXvMh5RvG9l0XjGIzfaL 2Ah3+p+ueWJ1pHb78itJXgalghLjmw9+6HeczvCH4DuZsLzP5lcuhpfdm1aWW8Zolbzq QXDbrRsYQRu5/FKwhjxnQAJQ9QEApuUVWVv63VN6Bqy1KSoGUJPtO64+DYNxNQmGOVE9 ERrWU8mACigCKtLhfHOIhjrs/QEKman6NOM8v4fxsn3DYEQXCsC7fQkc5Pc46M+BYSva tf6A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EEHIFO2a; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f2ca76dsi5560051cf.121.2025.04.23.18.17.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:17:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EEHIFO2a; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7koi-0007RZ-IF; Wed, 23 Apr 2025 20:51: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 1u7kn7-0005ey-7r for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:20 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7kmz-0004a2-EG for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:50:10 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-736ab1c43c4so360658b3a.1 for ; Wed, 23 Apr 2025 17:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455804; x=1746060604; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hSTxcdVupVH5RULwmr3LUReRVWUe6351QoWFFPPNbok=; b=EEHIFO2a6QsjsyVRMlCWR+B/R+KnLfNEpuD8Ypq6EvpQa29job+DWMxctZUaUf9B8Q HHlB9KJ0oSjIsZAYJmwrvmHDXrrPGZjyulDoYnQt9f2zijCrte56UG4L1Kltjzv+eWTY SxFJs4QQDB1iGxowFkmRuleOqsHcNgqWpfsKWwbD72DlKvgmSPzNANabL7dmHr9tR87c 70chVVV0mMWoqRhoR13YVJB18mz1nE5H+YnpocJM4IZuD/vPAZFPjPgIYnJVrBdPOFbN 4XFMq0H+TBxsnFZ2jYg9KmuWHGZ0JeTRR/OZzCel0+SQxJFiIHuvYoYFdlDNH/SWyn8Z w5fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455804; x=1746060604; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hSTxcdVupVH5RULwmr3LUReRVWUe6351QoWFFPPNbok=; b=GPU+MHyXZ9Vduxt3bSVRmSsKH44D/GZ/LWDPw3FfQ2+wZnBGImDVAhi0cnxJT22oli C8G0o9omYpjsIaipgvJHGZ6p9rI4qQ+mYRp+fscoG8wh+mNU4mR1Sbow8EukdvkoLDuC sGuq4BG6UgSoB0E6X8inmnVAkzaad3guiZkuHlf7zX0QjKRTPz0H2a2Dc3eutYqblA3C co4xwhfB7NW15TpvCnTX5ElCErnYh8kILi4k9zMl37uyqYLm25PyakKPVxFHiBtB+Ydu ETR3w/vs42APH8tOj11z934NjWSQscUba8GgEyFEGDm/hlGncZ8AT3E4ex0qzeYlYZXl JUzQ== X-Gm-Message-State: AOJu0YwdCcvuHAGSiznt8dF5OFR7sUpYoeHcUyb0Lfk2gef53GeW27bQ ngWq1NYF+AnX1mfuxzEbgXUVYZ1DOKsSR7C5hzLXFaL2Iae8/chyg+/C0OV0Q6cmEETtE5PgoqS 2 X-Gm-Gg: ASbGncsZqI21wAtaUZiKP3zPY5thVhMOqT0RbLOsceuts/qF8q+Da1oQZKwcmjvJ15X Y/B7NY0pJW5ufBxuOSW2b8P95qWK9gAt1+zPubuvwvGyPgxBBzyxsJT29xbTTwplCgtTMtnt1tp 6O4urrLzYuQkfllVJBa3Z8cNB4CS+K7B28iu7omXVX1t0Zg6MIF/caaWNBEt08aNC2HQRDturYs VoN76OH1FahdPkB2Qn+WkDovoZM5h31P2Xsg2OTYALuuXPlrDqk2x3ug6mdvUwUK2kNhDS6CL2k ZJFLjFWZeKEL5BdlUTlkuJE0qMtg0nMApgWOsWu11JIfcUJZkxHNOv7D36eauQCn8INN/gsoSNY = X-Received: by 2002:a05:6a20:9f90:b0:1f5:a3e8:64c8 with SMTP id adf61e73a8af0-20444fd1e3bmr1065319637.36.1745455804108; Wed, 23 Apr 2025 17:50:04 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a9a0f1sm207344b3a.137.2025.04.23.17.50.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:50:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier , David Hildenbrand Subject: [PULL 039/148] accel/tcg: Remove unnecesary inclusion of memory-internal.h in cputlb.c Date: Wed, 23 Apr 2025 17:47:44 -0700 Message-ID: <20250424004934.598783-40-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé At some point cputlb.c stopped depending on the "exec/memory-internal.h" header. Clean that now. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson Message-ID: <20250317161329.40300-2-philmd@linaro.org> --- accel/tcg/cputlb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 134e523cab..613f919fff 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -26,7 +26,6 @@ #include "exec/cpu_ldst.h" #include "exec/cputlb.h" #include "exec/tb-flush.h" -#include "exec/memory-internal.h" #include "system/ram_addr.h" #include "exec/mmu-access-type.h" #include "exec/tlb-common.h" From patchwork Thu Apr 24 00:47:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883807 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199795wrs; Wed, 23 Apr 2025 17:59:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXsr8lBXlAY9Yscm65yDDST8ztEVmPfuaqao/4Bd27rK81ye3WuZ8xdlSKCMrEMS471IQodXA==@linaro.org X-Google-Smtp-Source: AGHT+IH/m4RHHNogYbqEI5J/y4TS9MoennN9RQ0Kfobqrye7HobIUnjPSTRw6ubCyOkn3GMicQUO X-Received: by 2002:ac8:7fcc:0:b0:476:afd2:5b46 with SMTP id d75a77b69052e-47eb34ac02bmr8412391cf.25.1745456347945; Wed, 23 Apr 2025 17:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456347; cv=none; d=google.com; s=arc-20240605; b=C9HWtZXyqTzPlRBUVlSVPyWZOmuIF1QFDaAJaRDocxysIoAUUsyQ2EYULoBy6AF0V9 VGmlXrGRuZQLoBzVz4ARMWIasdWHk6sqDGzFeF4WADrnaTtaCYjKJYhiRNtSwzP2+ziT WAecJtZ3iFeUlzZpVulAsVELfDRVPuo9EepUh8QqwAlX8gyTrvSjvdZPtehOLraiwY3b P9zxMC0yqCeamv74OfonAwXCb0YTA0zdhu4kANaNDrsne0P10Ry/tBjJuQj0qm2O35zM A4L1pFd+xQFHdmaf/7a01GgWgsjcr12Lh7zxXu3CC6q60BgOqxowbau/rFDgly817X+o RBNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1b+/2Cx7hhPD9NBA8Adtti5AvmLRjcSTlsgUHFgyOs4=; fh=ljlOltVClI2k/ziL5MACehxHAB65D8zkVtFqp2lkzok=; b=RO4g4EKBMBeeQTa3YnCPDLdWEMIjNG2tAnG4+Pw6j4crY1sVycgBoXr6UT2Pge8H6j jru8bbNxSDLeRqXKBTTtBnQ/drjt/GBhHn1XatxQmzxW0ZgBw/eWTRKOXaML1xNbI1NK POI6l4vrpe5/ssI5ToZpi66wdcEiYES5Ed98VMTHw4e8rLU1+r8dteT5BdLt2kdEwcGR O7YI//KgecH8c4nF1Bs1mc0GYfwARmY4P4S7pO3C+bP+I6hA5VGjatGnGS3nDQ0WxrOu rYr5dY4SAAF2MBfYlDLGlk9CrAIdP3O0aEetg20l8M1i9uBGq6vmDYA6cqJM1w+SmqjN 3MBg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ix2gjNOd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea27a3e10si5128461cf.503.2025.04.23.17.59.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:59:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ix2gjNOd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krT-0004KD-RK; Wed, 23 Apr 2025 20:54: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 1u7kqB-0000y7-Ne for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:25 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kpu-0004g6-Ke for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:08 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7399a2dc13fso534844b3a.2 for ; Wed, 23 Apr 2025 17:53:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455985; x=1746060785; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1b+/2Cx7hhPD9NBA8Adtti5AvmLRjcSTlsgUHFgyOs4=; b=Ix2gjNOdWkuh01aPKTvOS2Z0zcMkdSzXc+lfqkfdbvdKHQXV8FmGMAe1E1oILY0VnI z8WhJYy/lWgpVups8VEnI9FMGaZzi4fH0AZDZOIJwUqma/7RY5YMht4MGj7XQlryDu8b bgtCSHb8fL+8AXEYSjJelOLgQmS3B5uzruQNSa00mkULMX8zIIPYEw1CVUPYdHRLCXcA 7fHQhcXGwxwpX+ots3kmKluKMvD2ecz8qZAQEJUr5ZTdHoR2TE9y2rEoNfrC/HsqNSEM mAv9f+Kph6ySnllqy/+uXUHgDWrl/HNx1VxHbomatJwaN+eMycxfL6pSTKaIyPe/RS0y +6VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455985; x=1746060785; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1b+/2Cx7hhPD9NBA8Adtti5AvmLRjcSTlsgUHFgyOs4=; b=Wx8fZQ2hs06caG7uY7WIYen9/X/3zObEkQRpQnAI480fgiFqyZ47PiO3BHqlM1N2Rk n74v6QIeLbs5W9Xi6EhQoU7JZr/AbrzldEZtNgTJZ8SuiOqo1B6tejUUP7nitO6+6TBf nPbJ3dh9LYgntg1VS1mz+uiHe6sE614qXtGkbN9Iq4hSkJnGhBzhmQuLfOXA3DjCpp+x 7cziDFuYK4lVPkGJAqrbwhNj6gQuPpqREAf2KHOB8kgZUOvA6yH//84xkjP7wAULyQGL vU8CYfZji9GiPVjBfjZpbDS73vLjf7T1/hyyyKaqjpC80vDkRVukGvEdUDKsvajkG0u3 jf5g== X-Gm-Message-State: AOJu0YzQ1lf86EzTHbUBun8yvCbMd2yAjYtOoByWTKPl1Nd9OFbnzOcm ul3veXHmhS/NNyQECUXZLKIDfwfpI/sptpGE68XETwZAL2cf3PRi18w7hiJtRvnP5MrOCDd8k5O G X-Gm-Gg: ASbGncu7gRrGyWHZky8IbwpGiLHUVP3qsdWyoUpgfFit6RjLXZy7Dt2lmfan9oT9CvK TRdmk3mf0KbeuHbyr7Ql7EplrwJQmCbIg6OWWIcQg10oPIFbt3PlKY6d8YNXlMXl5aeNkGJy5jj gO5/Zeh+1JwgbXOihBCDjyja2kz+55ddlIlLpICRNZLkIJGu7FeJ9FhstDlhLVFw4NEfhjhHmoq TbVa2uWJNvn+OLHh539bxXDwieg94wayRltGw894/ZQ0M2KRcQ0360/T7zSpGBcH7lyVPs8k80r hXO3XB3P4AS9dlod74HaiaD8BUvn6OIK3skBD8ltysAiwgKRHQKlGFObweBqHgkHmpaNOFw2RXY = X-Received: by 2002:a05:6a20:9d8e:b0:1f5:58b9:6d9b with SMTP id adf61e73a8af0-20444f003bbmr835763637.12.1745455985162; Wed, 23 Apr 2025 17:53:05 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Hildenbrand Subject: [PULL 040/148] exec: Restrict memory-internal.h to system/ Date: Wed, 23 Apr 2025 17:47:45 -0700 Message-ID: <20250424004934.598783-41-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Only file units within the system/ directory need access to "memory-internal.h". Restrict its scope by moving it there. The comment from commit 9d70618c684 ("memory-internal.h: Remove obsolete claim that header is obsolete") is now obsolete, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson Message-ID: <20250317161329.40300-3-philmd@linaro.org> --- {include/exec => system}/memory-internal.h | 6 ------ system/memory.c | 4 ++-- system/physmem.c | 3 ++- MAINTAINERS | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) rename {include/exec => system}/memory-internal.h (88%) diff --git a/include/exec/memory-internal.h b/system/memory-internal.h similarity index 88% rename from include/exec/memory-internal.h rename to system/memory-internal.h index c75178a3d6..085e81a9fe 100644 --- a/include/exec/memory-internal.h +++ b/system/memory-internal.h @@ -11,12 +11,6 @@ * */ -/* - * This header is for use by exec.c, memory.c and accel/tcg/cputlb.c ONLY, - * for declarations which are shared between the memory subsystem's - * internals and the TCG TLB code. Do not include it from elsewhere. - */ - #ifndef MEMORY_INTERNAL_H #define MEMORY_INTERNAL_H diff --git a/system/memory.c b/system/memory.c index 6a5d853071..7e2f16f4e9 100644 --- a/system/memory.c +++ b/system/memory.c @@ -24,8 +24,6 @@ #include "qemu/qemu-print.h" #include "qom/object.h" #include "trace.h" - -#include "exec/memory-internal.h" #include "system/ram_addr.h" #include "system/kvm.h" #include "system/runstate.h" @@ -35,6 +33,8 @@ #include "migration/vmstate.h" #include "system/address-spaces.h" +#include "memory-internal.h" + //#define DEBUG_UNASSIGNED static unsigned memory_region_transaction_depth; diff --git a/system/physmem.c b/system/physmem.c index 307d0764b6..16cf557d1a 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -66,7 +66,6 @@ #include "qemu/main-loop.h" #include "system/replay.h" -#include "exec/memory-internal.h" #include "system/ram_addr.h" #include "qemu/pmem.h" @@ -88,6 +87,8 @@ #include #endif +#include "memory-internal.h" + //#define DEBUG_SUBPAGE /* ram_list is read under rcu_read_lock()/rcu_read_unlock(). Writes diff --git a/MAINTAINERS b/MAINTAINERS index ba885010c5..661a47db5a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3129,7 +3129,7 @@ F: system/ioport.c F: system/memory.c F: system/memory_mapping.c F: system/physmem.c -F: include/exec/memory-internal.h +F: system/memory-internal.h F: scripts/coccinelle/memory-region-housekeeping.cocci Memory devices From patchwork Thu Apr 24 00:47:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883818 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3200270wrs; Wed, 23 Apr 2025 18:00:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXLKmSLk9wX9EwV13Us00hpeU7H02qiztW6w/vkYcPaFl12eF6fXCGNaRFVEHjDwwbCO2MT9A==@linaro.org X-Google-Smtp-Source: AGHT+IEga8O5hruF/9WJetnrqKDzxDftvYwoznujKB1aWex67lLsRAij1NJFw75DJWPQNzsH2ybL X-Received: by 2002:a05:620a:4252:b0:7c5:3c0a:ab7e with SMTP id af79cd13be357-7c956e9b14dmr143568685a.5.1745456434377; Wed, 23 Apr 2025 18:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456434; cv=none; d=google.com; s=arc-20240605; b=FEfdvoEWefmy6vAj8oGrka8uG2MJfx0oQ3kXsqGcOQccq18zCQ+7X04xOXckgesJto j3HgNkk0x/d5yWXUm3gCSOUiH6qtSBcqSZeaaOdfqynA+DUDSP5oS1LgE83m410oOuhT q7aKaGZK2Sw7uGpyefa0ZqZvCqUxrgdEQ41SERXmwsS7c8x0CnfBGj/cpnX1FIbDHNAR No4f3yUeGBgT0fcj9xjSqpW8JSJUuqjYNJG/YIBFIpfb4ELJhzQJtvrRe7NvCsspOI/f UDM+hrbozoIEuJzdTJMiQCulNXRUVndBqVc32RDBuPY6rNGvAMoOOPq6Y2CF4hKErzv+ j9cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=RK0p9wQfVgEVzHTMYQneP9tRo6BI56q+RabGlzQyjiM=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=HdBhJ5THO0x24AM21/8ftxED78/pMC9kTYR9sXdaqRVPz4YxHh7hODiYjH439s3k6J y5Ymi/nCcIDa0VPxGb+ADpyI8PtaOYo7cN7ChhhmrVJglmPuqJId9XyF6MgWYvmwzur8 G9hwf+W73uROKFs6qntu6q9F9k3l8BqRaZBTfKPmDWYifAcf2eoCjNWOCo4ekiSNHtcq nasZ0TyDeBvAUPG6oZ/NNPzvpsSYiLCVb1D19pc+LssjRCExYFIlcjI9Bgaq9zcGsh5C QkWRIuQS2LVh0+t6POhEPnPZvk3L241r78PpO/s9GLsa7CcTsr1UfzXAIlszqLCa+gPI recw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VP9gIAIn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0aea45csi3593576d6.300.2025.04.23.18.00.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:00:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VP9gIAIn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kqe-0001Bf-Af; Wed, 23 Apr 2025 20:53:53 -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 1u7kqB-0000yC-Ta for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:24 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7kpv-0004gA-9Z for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:09 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-739525d4e12so358263b3a.3 for ; Wed, 23 Apr 2025 17:53:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455986; x=1746060786; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RK0p9wQfVgEVzHTMYQneP9tRo6BI56q+RabGlzQyjiM=; b=VP9gIAInymD4mqV5FYDtAwGFswjMeVsVg/e9bznvazBV1SHikZHHQ6aGQxuIizaM+T sWFx43UkhLCTZFW/3qW5QP0/zWiKEazIuOTzyd1xUg7vNpfxbHIvcxghloBgNjNGwMLG 0rJMl4fq4Hnjjw6Lkts1Bnewv37M3kT3arfNd7TbBEo7xb3LqxPcivYO9iHHWLgDGpWf gkjTtxmeHZoHUk7mC3cUty4HrZGH5eKU5xPsCK/lXSyGbNzYLuj8l6BCOmI9CbX33GeD x92HyIRQcMd6Gsfm0KvshF+9cJ6Q0S5q5g2Bq/X0Jcr/SU9eWjl8OfQs9o86Dn2suvrW WUeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455986; x=1746060786; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RK0p9wQfVgEVzHTMYQneP9tRo6BI56q+RabGlzQyjiM=; b=W+0uLKx/OH1ZsZ+gRpfWzVAVPog4ZbE3jf/kKcBHS6GZwC+BmtY8L+jWZJcFHycrkw aM4K4Nv3kTnK7jAYV4UyiDgvs7TvZeeyEweZBcZXzB1JGZoblYlWtkacGm4n/Gecr1Fa f2/H71rIT3AdLrjEm5Oq+ipqqtfhZCrWpOYT+cQqAKxfLTYeTzxDZOn6im3Mq0mF6LWz rLXJgeAZVG8yTCUi/2G0SyEXNqb8Mob9PlC/A2FFesIp22rf9HrZqcUlLt6tdJBnCfYx ScEvwqcsFtqWDZYECnV0xHtxdYMPax4zabnamkW8Ep0LOLk7n4Lg9INaRiH84/T6uLGd I0mw== X-Gm-Message-State: AOJu0YxP4mfUj/FRjpV5qgY2BzOEB6OKDUe+OeuBVL+PV+mPEV7w5cS1 +485rLO5VHdydn6m/8xeCOG0YDgwuaPPgZUKzUOanEUWfxzL6dP4uK7EAnNyAl731DUXY4t2uk5 H X-Gm-Gg: ASbGnctN/+v/1cv1GnuK+eklLr4XKxpNB9iUHFjCazW4q1Aul9g49jN9rtVYxx3rYVu 2UEjJVVyjR4uDR0XyVdruWw5riPpn8Vfx61euLxuc1xRNkE6EuiHXiG55IQVj7RVMFzZUU1bX89 JMs9F0qPQ2/rojGK8915PZNjkUcR1uVYuTDLC8PAWd/DTmjNKYPoV0ZaNNUMRRjjTGsNS4eJWJW jjUHvk3L7IJ8pnJfMoRmSftNdlh8ICXNRSVqL4QJuqoqylR54A66bvHGOt9sOddSltHEox5SwR+ u8yEcfRcK/AESf+pUqN9AoKBmLH6n2Mzlp+YCwqpqgcLO1PFzE/STREDMR6aIlkqj4Ib5LcJqZc = X-Received: by 2002:a05:6a21:4a41:b0:1f3:26e5:55bc with SMTP id adf61e73a8af0-20444f4254cmr744523637.42.1745455985831; Wed, 23 Apr 2025 17:53:05 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 041/148] meson: Introduce top-level libuser_ss and libsystem_ss Date: Wed, 23 Apr 2025 17:47:46 -0700 Message-ID: <20250424004934.598783-42-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We already have two subdirectories for which we need to build files twice, for user vs system modes. Move this handling to the top level. This cannot be combined with user_ss or system_ss, because the formulation has not been extended to support configuration symbols. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- gdbstub/meson.build | 32 ++++++++------------------------ meson.build | 22 ++++++++++++++++++++++ tcg/meson.build | 23 ++--------------------- 3 files changed, 32 insertions(+), 45 deletions(-) diff --git a/gdbstub/meson.build b/gdbstub/meson.build index dff741ddd4..0e8099ae9c 100644 --- a/gdbstub/meson.build +++ b/gdbstub/meson.build @@ -4,32 +4,16 @@ # types such as hwaddr. # -# We need to build the core gdb code via a library to be able to tweak -# cflags so: - -gdb_user_ss = ss.source_set() -gdb_system_ss = ss.source_set() - # We build two versions of gdbstub, one for each mode -gdb_user_ss.add(files('gdbstub.c', 'user.c')) -gdb_system_ss.add(files('gdbstub.c', 'system.c')) +libuser_ss.add(files( + 'gdbstub.c', + 'user.c' +)) -gdb_user_ss = gdb_user_ss.apply({}) -gdb_system_ss = gdb_system_ss.apply({}) - -libgdb_user = static_library('gdb_user', - gdb_user_ss.sources() + genh, - c_args: '-DCONFIG_USER_ONLY', - build_by_default: false) - -libgdb_system = static_library('gdb_system', - gdb_system_ss.sources() + genh, - build_by_default: false) - -gdb_user = declare_dependency(objects: libgdb_user.extract_all_objects(recursive: false)) -user_ss.add(gdb_user) -gdb_system = declare_dependency(objects: libgdb_system.extract_all_objects(recursive: false)) -system_ss.add(gdb_system) +libsystem_ss.add(files( + 'gdbstub.c', + 'system.c' +)) common_ss.add(files('syscalls.c')) diff --git a/meson.build b/meson.build index 41f68d3806..7e22afe135 100644 --- a/meson.build +++ b/meson.build @@ -3662,12 +3662,14 @@ io_ss = ss.source_set() qmp_ss = ss.source_set() qom_ss = ss.source_set() system_ss = ss.source_set() +libsystem_ss = ss.source_set() specific_fuzz_ss = ss.source_set() specific_ss = ss.source_set() rust_devices_ss = ss.source_set() stub_ss = ss.source_set() trace_ss = ss.source_set() user_ss = ss.source_set() +libuser_ss = ss.source_set() util_ss = ss.source_set() # accel modules @@ -4045,6 +4047,26 @@ common_ss.add(qom, qemuutil) common_ss.add_all(when: 'CONFIG_SYSTEM_ONLY', if_true: [system_ss]) common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss) +libuser_ss = libuser_ss.apply({}) +libuser = static_library('user', + libuser_ss.sources() + genh, + c_args: '-DCONFIG_USER_ONLY', + dependencies: libuser_ss.dependencies(), + build_by_default: false) +libuser = declare_dependency(objects: libuser.extract_all_objects(recursive: false), + dependencies: libuser_ss.dependencies()) +common_ss.add(when: 'CONFIG_USER_ONLY', if_true: libuser) + +libsystem_ss = libsystem_ss.apply({}) +libsystem = static_library('system', + libsystem_ss.sources() + genh, + c_args: '-DCONFIG_SOFTMMU', + dependencies: libsystem_ss.dependencies(), + build_by_default: false) +libsystem = declare_dependency(objects: libsystem.extract_all_objects(recursive: false), + dependencies: libsystem_ss.dependencies()) +common_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: libsystem) + # Note that this library is never used directly (only through extract_objects) # and is not built by default; therefore, source files not used by the build # configuration will be in build.ninja, but are never built by default. diff --git a/tcg/meson.build b/tcg/meson.build index 69ebb4908a..7df378d773 100644 --- a/tcg/meson.build +++ b/tcg/meson.build @@ -27,24 +27,5 @@ if host_os == 'linux' tcg_ss.add(files('perf.c')) endif -tcg_ss = tcg_ss.apply({}) - -libtcg_user = static_library('tcg_user', - tcg_ss.sources() + genh, - dependencies: tcg_ss.dependencies(), - c_args: '-DCONFIG_USER_ONLY', - build_by_default: false) - -tcg_user = declare_dependency(objects: libtcg_user.extract_all_objects(recursive: false), - dependencies: tcg_ss.dependencies()) -user_ss.add(tcg_user) - -libtcg_system = static_library('tcg_system', - tcg_ss.sources() + genh, - dependencies: tcg_ss.dependencies(), - c_args: '-DCONFIG_SOFTMMU', - build_by_default: false) - -tcg_system = declare_dependency(objects: libtcg_system.extract_all_objects(recursive: false), - dependencies: tcg_ss.dependencies()) -system_ss.add(tcg_system) +libuser_ss.add_all(tcg_ss) +libsystem_ss.add_all(tcg_ss) From patchwork Thu Apr 24 00:47:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883794 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199211wrs; Wed, 23 Apr 2025 17:56:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVnFF6nHxy55apitWoIHiWs2ZiBCX+mjNRPNHP/nR0oRNnj3r9cbTV0azB1kXDd/mURndPCUQ==@linaro.org X-Google-Smtp-Source: AGHT+IEjiOslXs8dX0kGHjwodUxuPBYcuEHjt0hf98gqTjHqurtjBTyn5mmIwXV5lT948lnlhLzR X-Received: by 2002:a05:620a:44cd:b0:7c5:4de8:bf65 with SMTP id af79cd13be357-7c956f3ff8bmr173516385a.36.1745456189759; Wed, 23 Apr 2025 17:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456189; cv=none; d=google.com; s=arc-20240605; b=ePI4FSMNCaotygnyGkfjvQxWX5fLFwuJUlo8ett5UXLHPOVMGYJOgMY/toTz/cY7ak VrA0gGWRX0zfBiU1/F0YDh9JNr/b0dHUuox4U7U7oyFo6pXnXpWyO0cQA0KW1cvWvFGg uvyVPlDPlNp4eTfeUxQg6Ypl1BEtXK+fgGpJSRh9l+6pj5wOaaO06k4SXb4dQVUPNmPl jFLLE8ua9NbfMBDd174qUsUm8P+Uxw/ZD2UBLQ0hUOi5u3+7xsSzJtA14YyydhX5G33X Inb5glXLiGYIamf+cyoFUnNFnWPj0n+zcnZl8gU6XjwlTvebHyEZAwA2ILtePwaNY9EJ s9YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ijlmz6/bRJsdkPdqsV+cz0ErI9CNddyOzeS8owSZGCU=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=gloGn3DFSklNUxFxiMAoqj42gwyZCYJ/ZmiEeWMYU85CFChr18AD8kVMKFRQdrPaQz /ODgbZCXACDP6ImAN5ZNCy2zFK/uyFHD9VXvpFIPT8i2dJ/hEh5wgc9qC2U9UmKY+rFD CdH0FIJlqBpGx6Zu4wG8Cw4vjJtCNrX1JXG+WgCVIHsn7J6M02FEe29JzEB3Yu1oNQIb cR+LIgSM+L4wqNotOn2rFycWstJ0cSYxlGuoko+8BPRl220IbqdBiv/PIad4xyrv2t7m 12LnpKlFzyuBKXCOY1VP88vOPtxxKyTyEd/e1DqdF1eZ7jJ4DwmL5pw5rLMMVSX7UDXi mEUg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wJsMhpmk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958d85fa8si19682185a.294.2025.04.23.17.56.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:56:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wJsMhpmk; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krD-0002j3-Sy; Wed, 23 Apr 2025 20:54:28 -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 1u7kqN-0000yH-DQ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:36 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0: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 1u7kpw-0004gG-ER for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:10 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-73712952e1cso394768b3a.1 for ; Wed, 23 Apr 2025 17:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455986; x=1746060786; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ijlmz6/bRJsdkPdqsV+cz0ErI9CNddyOzeS8owSZGCU=; b=wJsMhpmkKCil5gR73qxokjttlzfiM17AcutQEgcQiLJLAE3nhEK1f6Yzqj+kVEzON2 B9wLeqHnWmO4mJdj7Ibw7gZPsRWQ+2QFjt3AA+NIma8Ac7j8DdMHYvqVgUC2Wzy5LNtp pWkmLbfTEOImZyzxJ1guaRxinZDVxjgeSR9PnKsDF/A4KyR+QKX+7EOzu+FtEDywGTY8 L5M3fGK96ME7L2Eu4VnXa5SMTTu66YNZoHWSBS4Chy3Dcrh7ZcabPhO82bNLKib9OEAk F8Y7x2E3V00Qp3ojSw4NTyy8tJrHxoDlXgviFVYqGHt53huT1sfzq9zTfpoX6xW/WPpJ pQWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455986; x=1746060786; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ijlmz6/bRJsdkPdqsV+cz0ErI9CNddyOzeS8owSZGCU=; b=re/6DsYJ438qyZNfzEEuzXaCBNKBPpX+Nj+q8T3pQRmwafqBwi3ymCvAXuPOAg0mOW 8CsfIBIJANeXYZcV72kkizrRsaFfOY3oUwKCckX/l8KcecAFzzrMzoYHh/QnxPVGZV5Z fEP4FfoQECgA0olxBhia4Yx/Uaw0S+o4f84GbLxO1nQ+gUDt0FrSYVP+/+cWdyFoR0Ks p7xKb/KLgsgIg+IgWXSx2SA+tPr5QCAsmWhowejnquFBCARPne9nUQvKyrk5x6QWY7s0 PMAFC8dIFdcEdTkfntc+WdbmgCE4HkyjFin5lbSIiJBOSDUaoFMpuThdYcmsZ0J9Vadc 5LDQ== X-Gm-Message-State: AOJu0YylUGGrchfxylZq4Fi3d8urBPImGKLMIgCaU+YVOAwI2NgdEi6g pgDpEtZb5ipXhRvBZLF5GocoSziAZIrszN5RabmtmZnUh7tKPMA0a5ExXWiJH5fT9qE5/xYhxaa i X-Gm-Gg: ASbGncun/RU/iDQuqX9pN3ss3qtnJDKdYETmjs8A9oJelmdN4PFLTJB69xmyZ+8oFy5 rBdzofx+FXaenWdWnEGyBxR7qQzQGRc/bHBLX7smNwT0YQvqfkOr3WvspoDrmrpx8WEU1e+GIVA 6A+wZTU5V8tp4r73qOBI71A9NtJytLttkIqFZdUJZXarbFbDLZMc6XxTVH3SvYzWFeGj6nJnXdv +zK3xtQjUU80MQDi9vsCSY9lKRzJuIw4YIaJmSplrxskaJV0zYKGVswGbYXOqoHEH/E7BKZw/HF Yz3lmmgN868a+A6cL3MPYc3dWMJ4xZymVA99uO6dks7xiZc37Wn5sdmiIBGv0y5nYAguj/7UBr0 = X-Received: by 2002:a05:6a00:98e:b0:725:96f2:9e63 with SMTP id d2e1a72fcca58-73e24e156e1mr1216994b3a.24.1745455986462; Wed, 23 Apr 2025 17:53:06 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 042/148] gdbstub: Move syscalls.c out of common_ss Date: Wed, 23 Apr 2025 17:47:47 -0700 Message-ID: <20250424004934.598783-43-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Copy to libuser_ss and libsystem_ss. This file uses semihosting/semihost.h, which has separate implementations with and without CONFIG_USER_ONLY. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- gdbstub/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdbstub/meson.build b/gdbstub/meson.build index 0e8099ae9c..b25db86767 100644 --- a/gdbstub/meson.build +++ b/gdbstub/meson.build @@ -7,15 +7,15 @@ # We build two versions of gdbstub, one for each mode libuser_ss.add(files( 'gdbstub.c', + 'syscalls.c', 'user.c' )) libsystem_ss.add(files( 'gdbstub.c', + 'syscalls.c', 'system.c' )) -common_ss.add(files('syscalls.c')) - # The user-target is specialised by the guest specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-target.c')) From patchwork Thu Apr 24 00:47:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883879 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207123wrs; Wed, 23 Apr 2025 18:21:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUP2nmsVv6dDi+5FluJVazz+rYdoqEKSEuSheVIChX4Nm7Fjtiwmky2oifMxppOQdiNp7l6sQ==@linaro.org X-Google-Smtp-Source: AGHT+IHr6lxO7cTwlrki7fD14Gpt0GP9h++3jsvzPrzt7GDL71sNP1piYY1418e2yxDE4FTBye1p X-Received: by 2002:a05:620a:4493:b0:7c5:5670:bd76 with SMTP id af79cd13be357-7c956f46173mr160721285a.46.1745457670944; Wed, 23 Apr 2025 18:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457670; cv=none; d=google.com; s=arc-20240605; b=PVB+KeM1gVhpqpbFH6ZBzffCK7mc/USL1cyvc6EDsi87XS26KlDqw/STuJaftZkRC6 ucq6GhUOqr0E3bHUdy5vbJ6+NzOWAkaoCuhPF3FfTloBhpzfE5Ve1l+YRI2Dwe0J7E7T lFVg0waFfsuN6fX43gEA6/uj+8TeZB1lwcHBUA+gpHmxUwUoOTXAYQvFS0X5mXkyRitl e/D8foWG7wbK4UJgK52fIPE3Hk54MA/VBcOq+7WLLrYf8JsLDVfraNPaEovm0hziCKHI 6ow7CYBBYHbQ9bCVxXkV6U3InkZWXhC1XvIKpQQPPOiVtY/9rLgtclDMr+hDPFsDd4OA yyvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5QmVx49VUNvE0VebpWYF9vpR8W6QUfLccSgTbYDwMAs=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=AoefhKUajJ/p4ZFiOu7ihFDjGVnOg8VI4VV7CdGNBj1bonEREaIBZ+85ta3kddXaOj jFcY1LRzxN/hC3yxqLlYRPW6b2XUbyoMSzzPeuO21I23G0RCt97atJg5pXNRib6LQdu8 gO1/dhn+/svBC3ar/ckWfbbuGxfSb+xe9zAt0/XDJxnYU4rXI3smaF8dGrHBIubQsKqY 5bfJSY9lf6FV1R0uNWYy31eKbD/Rzf6l0zgGv4wOToarIr9NqYtqFKvPN5NsbXRElHmF VQX+Y4jmf2B3GQzX13KcL46GbNDIeb/lFpOIt/xpil/BTTZcyOYxoA1qP2YAqGCIPLpe f0qQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OO6un2jp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958cd8324si25318485a.193.2025.04.23.18.21.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:21:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OO6un2jp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krX-0004aO-OE; Wed, 23 Apr 2025 20:54: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 1u7kqL-0000yV-79 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:34 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kpw-0004gI-Mn for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:10 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-7376dd56f8fso501724b3a.2 for ; Wed, 23 Apr 2025 17:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455987; x=1746060787; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5QmVx49VUNvE0VebpWYF9vpR8W6QUfLccSgTbYDwMAs=; b=OO6un2jpPtenSOAQ4VE3iyz75FjqT7bH5XFkcxSFwUylszwz4rY7V+VcdP88NNzpz1 hr7dIca0w6CAbosxbN4kHDRZga31Vyk1qp26heUHlqTA79J22eBU3AJstkEKmk68jpdT 26BqE9/R32826+8eKT4gmjfElFtCnHSsMJkrF/GhTTB9gwpChQERSJikYvcWhtTDviu/ ADsT+FsOjVGFF/56uYJEv+LBosVjbLZyV2vr+0AWJ7C1wuS2TW2IGhJ1+41L6ivhsdyN h7zhNup6yNZ3qOFjGpu/ViXmK1kEJUT3ThpKtGOdxkEvcuw6bDZMPo7npWXSdlt6AAIt FbcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455987; x=1746060787; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5QmVx49VUNvE0VebpWYF9vpR8W6QUfLccSgTbYDwMAs=; b=Q2kUL/5KgiDyTwMDIF/7j+7g8LdokODak5a8zy+tAfhUg52etNkubUVLCVLPtUJOoR 6a+qut3voCfEUftBQMsjTWHzmkMy8x8TwO07Dohv5zHwGe7YEMcrI9LBleActrQSKO41 x6dQDfAl+/1SbngAnsNfIzs5y1rEW/HrMY0KeoKEPsM1MsL6ZHcSuYHhZiG8mJeekTKk q6+F0p1alQK+ylYcFU/hVlTbtVXAu+YT/qEqTANxljNMkCf2EHSF2UeqPKFqHin9OqxK cLd6FXGAtxoxRjR2C4cY12Qob1xkBuU9ia3556FQtquM/8TJBz29VFyaVgniK8BlEmKD 1DAg== X-Gm-Message-State: AOJu0YxqUaf1MvbNFYGIE0b15worRdPRLy7Xa0IbrxPDEMDv+Q09DqXO cS+2aPUEGdCwnLkBjiTwVepIyYDuT+r+yDSZmaWK8gRIKR1r9FLvACi8MrwNMpX7doGxxlV3mvg S X-Gm-Gg: ASbGncvRRUgqC37wWRx1ELpCRiLswMIgygPWMSPwWORjLvpVHZf2w+bHxatU4wLqUEO aAg61hbsaiB4NKwaHvGCp3wSsncfwrEjdI9flK/vuj3s8veJMxBuPg7qeS5ysQl2VPArf1F7DoS YW0SArOd/klqNMxw4xISKGzffclJI86S2Qwf6eUSBhvh27QojpDn0YiFTXXcmK45cAj6zumRJ9i Hr2/ezVuOFMbg4F3rOM1QYUyMVvhRK6QhJQOFs0G4Em6xlTy95fR9Ng9WuT3azn8AviGkndc5Oo WGOKyO+QB0WW70CcCO7wSVbxlbAj3i3hU0+f5ZZcH8kwpRbkcRakS28/paKA6nh3G7X7y8VtYEM = X-Received: by 2002:a05:6a00:2d8e:b0:736:5822:74b4 with SMTP id d2e1a72fcca58-73e24ae60c2mr1020405b3a.21.1745455987044; Wed, 23 Apr 2025 17:53:07 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 043/148] accel/tcg: Use libuser_ss and libsystem_ss Date: Wed, 23 Apr 2025 17:47:48 -0700 Message-ID: <20250424004934.598783-44-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While some of these files are built exactly once, due to being in only libuser_ss or libsystem_ss, some of the includes that they depend on require CONFIG_USER_ONLY. So make use of the common infrastructure to allow that. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/meson.build | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 185830d0f5..72d4acfe5e 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -1,12 +1,21 @@ -common_ss.add(when: 'CONFIG_TCG', if_true: files( +if not get_option('tcg').allowed() + subdir_done() +endif + +tcg_ss = ss.source_set() + +tcg_ss.add(files( 'cpu-exec-common.c', 'tcg-runtime.c', 'tcg-runtime-gvec.c', )) if get_option('plugins') - common_ss.add(when: 'CONFIG_TCG', if_true: files('plugin-gen.c')) + tcg_ss.add(files('plugin-gen.c')) endif +libuser_ss.add_all(tcg_ss) +libsystem_ss.add_all(tcg_ss) + tcg_specific_ss = ss.source_set() tcg_specific_ss.add(files( 'tcg-all.c', @@ -22,11 +31,11 @@ specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( 'cputlb.c', )) -user_ss.add(when: ['CONFIG_TCG'], if_true: files( +libuser_ss.add(files( 'user-exec-stub.c', )) -system_ss.add(when: ['CONFIG_TCG'], if_true: files( +libsystem_ss.add(files( 'icount-common.c', 'monitor.c', 'tcg-accel-ops.c', From patchwork Thu Apr 24 00:47:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883791 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199126wrs; Wed, 23 Apr 2025 17:56:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXE9KzfXeOr2PBzcpqkOU7HMj0PW7fAocaTOdtAgQGaoElq+b3VEY510yxN3AbDbg4px7NkKQ==@linaro.org X-Google-Smtp-Source: AGHT+IEXlwoXwvWhwsnvoQ12c99BJMarOpp9fVCU9tV8HTkqjRJVbnQ4lMkiVsxww+ewM+5Cgl1r X-Received: by 2002:a05:6214:5009:b0:6e4:7307:51c6 with SMTP id 6a1803df08f44-6f4bfc7dd11mr16142436d6.34.1745456171731; Wed, 23 Apr 2025 17:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456171; cv=none; d=google.com; s=arc-20240605; b=feJ+N0ophXHx1fXfOrlosoINPBHUG55DVKNVpjsKEeVQJAJXba9HgxapzCJCjX5lEG +1txxirTqKCQB5ilkRpRVi9oc5Kp6a3stCYXplWojPLdigpeyGNFmnpwXeIbfognkKl5 lxCOBCEnr9X8sfQkJclzWVwLP+MQDmU5Nxh9Bylm08EotvtKy6Ey3v5Zw8F0HltTXCf0 lG3EoomoSTOrgfYlJW1I1qh/90UAcqIs7bfmzzJ3Tz36DanvmMvzSNgq3TxjnF/FKaZ5 8MR+YjtYawsBwj15YY3pDDvfp5LP3VFNXa4WcrZ7u/D6FBL1yBwfgtzoYQRWuEY2TVg5 l9yA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=N6nKQxahRgvoQ25bOMs68Tp8XymmfstjwW7LOMn9si4=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=C/oKqa21MjM0TD+d7deRZuXu79DqDXK1NWIOuAJYzi3K53BqNm8lWa5lVvrbRWV/Cj fpWlW1XdgIOHgk5ljrpcdu+P3B6m/njWgHdpjmVnUkfLkIW5JX3Aevz6mVQU1jOXyBQ7 0stxGlUPzNJwvDN469cNLNtuTAtaTJRRHXQz8Qs0UpbjhVT7Jgv4G68Q1tA9MKVN43PS yzLvs909aF1G+Pvkm1Ev118KjzyO0yuSVWVT99YVapywm1+vKff+C2rqyIWDE0f4jJyR LfohQrcY1yNLJWIoIZxoSBaMOYF605jG0ZuOyXIrcyjmV/9RFN0H/xl5muKm085r4vnY HNgQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q4LTzMpt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0b0db0esi3513956d6.453.2025.04.23.17.56.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:56:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q4LTzMpt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krI-0003BM-SX; Wed, 23 Apr 2025 20:54:33 -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 1u7kqM-0000zH-CP for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:35 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kpx-0004gO-4o for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:10 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-736a72220edso415134b3a.3 for ; Wed, 23 Apr 2025 17:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455988; x=1746060788; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=N6nKQxahRgvoQ25bOMs68Tp8XymmfstjwW7LOMn9si4=; b=Q4LTzMptcTMC8eChhS3SzBqdJ2WnGLOy1Ht7Ipc/1PdXbcnUxzt1f/WBdxUyCEv4WU nMF5HsGu+xOh98PPG5VUeNrFB7omAROPtcgVq8dxiBB+iB2PgBimXwyY9jpHopUz9ub0 fUMtRGuoblAfkAKQKy42ElVJ0ZL/VpaL5njqwEeba1j8qFjbjQWLRLco1Zhs2pgg8051 Leb2/m9Y6Od78Is/L70ary4ev3gJYXtx4QzgPLUPM/kl4HB7DtaZGt8d3XX0Br/ilUus jWWirqGI+b0A/CRcmmPGXJtiOXa60de33zhTkPbYYz0X7LyGTLDy+PlhhHZtlIMGD4G7 BryQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455988; x=1746060788; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N6nKQxahRgvoQ25bOMs68Tp8XymmfstjwW7LOMn9si4=; b=lPaq933OO47Nf3wuNPtA9Cd5pVgbiRiVXDQ56mIIzFCyffaG9AvHklu0tEMKjwS3/4 g41Mkn0j4GrYLk5Q19DVCulplO0z0j3pi/UnMzburevhYPUG+3uL+74SJxrJ4vM9LMuV IAtd2lhyVnyNGku3OmmkHZLOvNyPtgqyzPa8EUfGLZldB5aio3LtuuNrG4cXHG0Xr1lj UvaqYDxlzSWWU1KkW3JrhETRYSWgzqgUS3WWirT+8DKjHw2UguW0moLcZgME9gkLsxQA Z224+nRFNtsBB8+9ilfYP54BFl2s1V9wld7CdUA5miyQtkX0l2h3yecyzOUkQcRRXHCL NT3g== X-Gm-Message-State: AOJu0Yz6CMO9Dz/bBLUUgsNMteE92mOqya/266nNQz14ZiZo6XkzkuqQ Sl2zAkLDxfaVu+hPHU3nGXtLqLsg8IyShSvr2UE6LsSnXQ6KWzd0K73gXZUqsD4ZXItKzAZ7npy D X-Gm-Gg: ASbGncuVE2ItmpIYByE+dZaEQappNFUARGj6rT8vVDZv8gToP8VWqB/dc+arQOnAET7 BiePyEa50Lyc5XJs9XNYdavGxGY9Sl9lAG3BEGxTbEmtKsr1AdhcJIwDrnhovddgiFOXwyhBjxa r3NPnvkXGEYt4ZZqf6mSVMXr+hcHRHEQil5q8GvjPuOHtpIc4KxPHjbQtdA2+N+StwZw+H1p4ne e3HNpcx1fq2RPtpr23oaV+PkOeSZPt3LKe/QqcXGfRdsPQ2lzpHeiP8yxpNjPe6AFuU+pCDwIHR Ei1xeW7Ri+JXgQP9eZrHahiLqTvUOiZa5SlGG6JtgesCUOyMHBzUvLxeRbUrSrWrFArIREMkRf0 = X-Received: by 2002:a05:6a00:843:b0:736:4644:86ee with SMTP id d2e1a72fcca58-73e2463558cmr955239b3a.14.1745455987824; Wed, 23 Apr 2025 17:53:07 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 044/148] target/mips: Restrict semihosting tests to system mode Date: Wed, 23 Apr 2025 17:47:49 -0700 Message-ID: <20250424004934.598783-45-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We do not set CONFIG_SEMIHOSTING in configs/targets/mips*-linux-user.mak. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/mips/cpu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index b207106dd7..47df563e12 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -32,8 +32,10 @@ #include "exec/exec-all.h" #include "hw/qdev-properties.h" #include "hw/qdev-clock.h" -#include "semihosting/semihost.h" #include "fpu_helper.h" +#ifndef CONFIG_USER_ONLY +#include "semihosting/semihost.h" +#endif const char regnames[32][3] = { "r0", "at", "v0", "v1", "a0", "a1", "a2", "a3", @@ -415,12 +417,11 @@ static void mips_cpu_reset_hold(Object *obj, ResetType type) restore_pamask(env); cs->exception_index = EXCP_NONE; +#ifndef CONFIG_USER_ONLY if (semihosting_get_argc()) { /* UHI interface can be used to obtain argc and argv */ env->active_tc.gpr[4] = -1; } - -#ifndef CONFIG_USER_ONLY if (kvm_enabled()) { kvm_mips_reset_vcpu(cpu); } From patchwork Thu Apr 24 00:47:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883788 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199091wrs; Wed, 23 Apr 2025 17:56:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUvbLt2vTNd2B+gMgVBj/P1Gr6QBuf9/vfwqk8n4UiMC74cM39MHMRlrjiGvpus7U14mS49WA==@linaro.org X-Google-Smtp-Source: AGHT+IE6cAAs2CnTRDAJIg9pPTepgRz4Z4SiAZ+rMXU+D8m1Bd8FV/M7jDqCvd3mA0fTQdqH36oC X-Received: by 2002:a05:620a:c4f:b0:7c5:96b4:f5e5 with SMTP id af79cd13be357-7c956ed828emr155682885a.13.1745456163098; Wed, 23 Apr 2025 17:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456163; cv=none; d=google.com; s=arc-20240605; b=MgEyRTTrG7wpPE0mnIA9wr90iSUb0fRwzFRe3lj/SHt3EEpa6A3LN8PWW9rHsvpK/I vnChmTUl1OgAac48w/m0S77MMkbn34+mBp+a2s6f659TZYMLHuJwDuXcOiAsyO/+vR7u yYdKbtMoJm3lryCOLuP5Vx03/2xEvKiRpj3gKxp39dl5ABKx5nn7/xoowlse5gjo5W9m i5TZJuBmH3Cmy992lGm1YBIwQsDLT97pP6EyO2shVr3cO16CRp+nXF4nJyes9jzOo6EW 5e8HGlS4xSlxQExT8bbwg/tZP2iGvNq2OOhuODyOEuT+A+hjkiLiTKPelkhxZeugtTK7 7cBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qcw0j/NlWHHUFrSWrBThXyu3TLmFkd4CNoNN4KpSa40=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=McxcQgWhZiy4E2cDYt8FlU/LfFERpPkcWvI52gFVLl3jJlq2nH3h28/qDWmxdyHXMP MGl8jdFZM2OXGxSjWK8s8XvDIeDKrRRKN6vWjmYspFgJG5OQs22sjEhqQUTTT0HLuWvH Qm7qzocQYzZOvcVmRvWrIVd77HqDm6nJVQ83KxB6X6XFM6FzJnbDwEqHpTO0bfMfk/k1 ULkwZng3bPidmtjN8WEWSmduTZSm9ay197NDncJhwbU1AAP3d+AiGURZeRBCnlh5sV4d b4S6xl0L/+HNGRzP/KWVC9DwK5u8ekGlNHI4EOCTqPHgSPkBw5ZJqb9ySISuHmrdrb6a S3AA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bXRpGazW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958e9fad4si19430485a.330.2025.04.23.17.56.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:56:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bXRpGazW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krB-0002Uu-8S; Wed, 23 Apr 2025 20: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 1u7kqN-0000zW-BP for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:36 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kpx-0004gc-Qj for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:11 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-736a72220edso415140b3a.3 for ; Wed, 23 Apr 2025 17:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455988; x=1746060788; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qcw0j/NlWHHUFrSWrBThXyu3TLmFkd4CNoNN4KpSa40=; b=bXRpGazWzl+hiQ2cGiqy9SqCNqD4hWUW7dz4blAmbCC9KvqxiFSu/OwphRMyEXXe5v 9urXwQPI28webQZ/Si9W3Gprt8Rsyb7FfxwiwdujIe/ZO3e+i3jsTQGMnuWmCdWEgNt7 mQbjL6Uv1lVNeR/BbeTOca+lptjpoawGc3rgJYEBSKhX3AHOvf36PKnGAnEPjHWFicXt hysTDVueDhQ6nub5tjX92GgyMvp7rjQASMyHfcwWvmRTQCvoEeY/xjv2GKAAuRQ3dh/+ pFaTSqE7p/anLwl54AgU96xusETGlrXvkMPkQmwrxrx9O8ks7Ozfv6X1TZeZX5UsVnaT Q4CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455988; x=1746060788; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qcw0j/NlWHHUFrSWrBThXyu3TLmFkd4CNoNN4KpSa40=; b=lAznUyTvbLxDtrMwisTzQpfYg2g40JIUoTsptgH5cZ1/iV5z/XKxxCrbQpTt/ltAQC nQuCxMdZ0JwIOgIBK7GpLvMHorBz71OTYaOJvVuM4GtxziaXzZBCyvX3TEDwzaR35TJp 7t1l2NCv5AwYkhrDMnliXx3nUUa3pkOzBc9VE+dLluDhZgdmgk8v2NchPa6VRX99V6Wm hfvVE1Kv8tHjMdROnpXPa72Jr27tZCwZJVBYoe8paCWrkJvZZMM+0Tw/cJAljZ4wZ9IC Ykji96oAwKpGTKNSbHwGJ9pfWr2ZOoxaMaCQ7C/MUMaQV1WfzAwRzqixwWsb1Q+OGlZv l6Eg== X-Gm-Message-State: AOJu0YxJthiOv2+xOynWUwy9dslsdlzGl+FkRgEfMJY/2Z+i27tTa4kg znkwr0Afj7faOAMdWESJvYkr7ufu8W/spxn2B9PiVdD6+6uSTCMrIZClBg1mFtDJS0otTjRL3c5 A X-Gm-Gg: ASbGncuDsmGfKdF5Gp9QIwE4vHNLlQoh5GRgb7OK5QUAlNOVFs3O0sAT+n1B3dokTpu 8LNJJDMe4LfXrFGapK4cjkRRfN+R8OvUwVChwDxT1w+h3+LwmX7DErgpSQf9cBKu3u37cAkAE+1 Ph/f3eVpaQzR0kXHO6Ff3iEu08EwFesAOLOaRkT6oBnkn8SuD/AIVI60CdWV8BcKgH7sVTEPWEl FdkFnE+8EeUIrnLaiT2NDEA3bx55gus3xCTlTKDNLPtl+74UCDBSML8zHTa8nukt1HtoLDmHeBY YbNYk67KSiaQiBO4hb9nMt347QuOtvmH8pCmZjPoN0HqDxwm81fB1nU0sKiS9LxCRVrtAeya5x4 = X-Received: by 2002:a05:6a00:1411:b0:73c:c11:b42e with SMTP id d2e1a72fcca58-73e24ae5398mr1079684b3a.20.1745455988407; Wed, 23 Apr 2025 17:53:08 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 045/148] target/xtensa: Restrict semihosting tests to system mode Date: Wed, 23 Apr 2025 17:47:50 -0700 Message-ID: <20250424004934.598783-46-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We do not set CONFIG_SEMIHOSTING in configs/targets/xtensa*-linux-user.mak. Do not raise SIGILL for user-only unconditionally. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 4f02cefde3..cb817b3119 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -35,14 +35,14 @@ #include "tcg/tcg-op.h" #include "qemu/log.h" #include "qemu/qemu-print.h" -#include "semihosting/semihost.h" #include "exec/translator.h" #include "exec/translation-block.h" - #include "exec/helper-proto.h" #include "exec/helper-gen.h" - #include "exec/log.h" +#ifndef CONFIG_USER_ONLY +#include "semihosting/semihost.h" +#endif #define HELPER_H "helper.h" #include "exec/helper-info.c.inc" @@ -2241,17 +2241,15 @@ static uint32_t test_exceptions_simcall(DisasContext *dc, const OpcodeArg arg[], const uint32_t par[]) { - bool is_semi = semihosting_enabled(dc->cring != 0); -#ifdef CONFIG_USER_ONLY - bool ill = true; -#else - /* Between RE.2 and RE.3 simcall opcode's become nop for the hardware. */ - bool ill = dc->config->hw_version <= 250002 && !is_semi; -#endif - if (ill || !is_semi) { - qemu_log_mask(LOG_GUEST_ERROR, "SIMCALL but semihosting is disabled\n"); +#ifndef CONFIG_USER_ONLY + if (semihosting_enabled(dc->cring != 0)) { + return 0; } - return ill ? XTENSA_OP_ILL : 0; +#endif + qemu_log_mask(LOG_GUEST_ERROR, "SIMCALL but semihosting is disabled\n"); + + /* Between RE.2 and RE.3 simcall opcode's become nop for the hardware. */ + return dc->config->hw_version <= 250002 ? XTENSA_OP_ILL : 0; } static void translate_simcall(DisasContext *dc, const OpcodeArg arg[], From patchwork Thu Apr 24 00:47:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883803 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199572wrs; Wed, 23 Apr 2025 17:58:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUL27JoYLGchi1xgbJ2EnJLkkZvgG/XEpuqpGA/kOA26CGYCABlbaEsxGyE138DybcPoK2Buw==@linaro.org X-Google-Smtp-Source: AGHT+IEK5/A3NFsQWq6B0qpiFapEoD968qwQlcP72VpugAoJsNiQHZoXw9zF8OpLumXS3+5oOAkU X-Received: by 2002:a05:622a:199a:b0:477:ea0:1b27 with SMTP id d75a77b69052e-47eb33a68afmr7597721cf.26.1745456287194; Wed, 23 Apr 2025 17:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456287; cv=none; d=google.com; s=arc-20240605; b=QIxr/OPSolTACnvFvgBfzrNh7d28KcZv1SnJ4UNxaLqsFmuOE7PL0aDtNAXRmjHrr8 9SE3uKoaZ8IKelWOp5XcrTLRkIHu+rYChtFe3uRorhhTGT1n8sW4Eefin230hITV+uA5 o2hz+nKKaCe+qP5tMFpp7KR4SKcvLMLb4Yk3yftRbBZcx21A6+wdXx7ynENK1aNRi27e HOL72bse01Q3SCazwyYQOJ6bsOCVPTcTbIv4g6du8rmDjJ1CSDNnl621mDOG1myRrUNu FQDTihOAWL7KpvNvC0pbgdvB76t7MeYJN7/TvIqdyB+xWSW49UnQ2lVntRLLgDzYB/zu aB/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qwbKvRdGoMiUrRuxJx+msL79vGWbZKojWAn1/Wo2xRE=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=luF7b145L6TREeo4VQ42k+mp0bymLvgL001zhlQ9DbNkjGD8BASpW9a4WhAjxp192f /1EXdF4WBUP25e48BPQ7gFSpWGNVFWUDl9OU+fprxJ2wJazivNnIvuL8V+qQKRZoUoBD 77YeA0ZNbxKpcqg1jgTZcf3zGcuPkPquLHQ0Um+hmY5LUkDAXpHbxqHNcN+nbr0CCAAi aXZuH6xdpR6F0rFJ/fdd00sjdN3kZT26n9tjkGMGwxcpnojBKBn58hyeH7NMwrE117D4 Sm1qPAwl/DkDh+92vrVovFFyAlyh2T+pktG78Fgh6WzGOueYWMMzzYgYLv6nGr3O9W90 NosQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xF1Dbn4W; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9fa9a8a2si5450171cf.156.2025.04.23.17.58.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:58:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xF1Dbn4W; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ksp-0001za-Ms; Wed, 23 Apr 2025 20:56: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 1u7kqO-0000zm-9b for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:37 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kpy-0004gn-Po for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:12 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-7369ce5d323so304453b3a.1 for ; Wed, 23 Apr 2025 17:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455989; x=1746060789; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qwbKvRdGoMiUrRuxJx+msL79vGWbZKojWAn1/Wo2xRE=; b=xF1Dbn4WWFDALgf/Lc5PTDGWPmXnjLig77rJgjL8iU6Uo4xqq/sNZ4fU6WYn7on8tl LBgNNB/7PAI1uH776QKtFxdek+L643GRLc97Hbj3OhjuNOGyD+ElCMAOp7GwjQXj3J9F e1HgmNmpwqWdFs+cndz6N9rEIEvdpCarA6PFWRqFlT/4+dkW0xpF/aBFDBBme7U4CVF+ 7itvq+Zg4GqBrmUP5hnT7EsxHojirnfw5POjZWidINIFgMTIMt37DGkMdGtdwSNerFV7 Kz7g0PF0PCsxQny8gwk/JsEv+w3L1cK1TM56MF7MzArJdj/j+Vyt4XVH2fgBLYfC8I2o 1kAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455989; x=1746060789; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qwbKvRdGoMiUrRuxJx+msL79vGWbZKojWAn1/Wo2xRE=; b=cOfxqCrLYE3n94bmk7nt+pi91yJHgCFRWNPZqvP4C84KdvBanq7TAbyp6YnLsXn2n9 Tr3OjNR1caXNThiEvp/pYv760jSz2cqN9B80W8q2iSBztrKx58iNKuIXcFz75xC8ZrUJ quyX+lo2Qg0yUgfWgT5pLmj36c7QvfHBrNdEDF7EwS58MjJZjt1GmC0Gml20bUaHs0lZ YpMqwHgFcrte8t0lMwOS9LTKs+5M4Pz7wY2MlhlU26OpKLiQkhCALkYzX1LoLj7rB7BX 6H72MUsUNXKXSc8G/Ce8nwSGwKPdQi4bjL7twrfXKO22fvxQy26doJppQ66JmYZlLhnX +jTw== X-Gm-Message-State: AOJu0YysDMKFJ/ps/vklw4/54Pl6kku1cbeCGsEM4Ogx3tzQYMwNFvuE GNH4Z09QBgCUyuScytN1EdwM1e5dCBo/ClpMQagLgOO69U9EN8EloL2evgDehBKNY+kiNiOFJLq i X-Gm-Gg: ASbGncujucHTBo9YnpCxT6qnLV9jAbtuB2gJjcuJu+Fr2ngABDCPYRhQuWqjiPlKjJo 9bWp356LdQ6Z5WUcd7JXvMArUCCh0zFAax6MTUFnzq0EJHs0Nrop/BsmSltynwYz+TENjxVGyXl K5ckmeQ1GHF4ui3D/XM+FaVzsGv/N7byQDZixapxjtn7DQ8u4LaF/h7o2m1BX0sKT+WIVK1wbAp oVsR5eqgtvv5WxaIJstEqKMVTHdbCJ/gMd1qJNwf2ohOk3OBMbepQUK0aCf598oL32QNBe8DRd+ lUSa1kSINgYYGYjpFYDDsJZwoAo/MsNxv4ZMSW7IjQ1J3khUFdEKRsS7RCnrujnagfZ2TMhOBLU = X-Received: by 2002:a05:6a20:d817:b0:1f5:7f56:a649 with SMTP id adf61e73a8af0-20444eebf54mr848872637.13.1745455989145; Wed, 23 Apr 2025 17:53:09 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 046/148] semihosting: Move user-only implementation out-of-line Date: Wed, 23 Apr 2025 17:47:51 -0700 Message-ID: <20250424004934.598783-47-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DIET_1=0.001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Avoid testing CONFIG_USER_ONLY in semihost.h. The only function that's required is semihosting_enabled. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/semihosting/semihost.h | 29 ++--------------------------- semihosting/stubs-all.c | 6 ++++++ semihosting/stubs-system.c | 6 ------ semihosting/user.c | 20 ++++++++++++++++++++ semihosting/meson.build | 5 +++-- 5 files changed, 31 insertions(+), 35 deletions(-) create mode 100644 semihosting/user.c diff --git a/include/semihosting/semihost.h b/include/semihosting/semihost.h index 97d2a2ba99..b03e637578 100644 --- a/include/semihosting/semihost.h +++ b/include/semihosting/semihost.h @@ -26,32 +26,6 @@ typedef enum SemihostingTarget { SEMIHOSTING_TARGET_GDB } SemihostingTarget; -#ifdef CONFIG_USER_ONLY -static inline bool semihosting_enabled(bool is_user) -{ - return true; -} - -static inline SemihostingTarget semihosting_get_target(void) -{ - return SEMIHOSTING_TARGET_AUTO; -} - -static inline const char *semihosting_get_arg(int i) -{ - return NULL; -} - -static inline int semihosting_get_argc(void) -{ - return 0; -} - -static inline const char *semihosting_get_cmdline(void) -{ - return NULL; -} -#else /* !CONFIG_USER_ONLY */ /** * semihosting_enabled: * @is_user: true if guest code is in usermode (i.e. not privileged) @@ -59,17 +33,18 @@ static inline const char *semihosting_get_cmdline(void) * Return true if guest code is allowed to make semihosting calls. */ bool semihosting_enabled(bool is_user); + SemihostingTarget semihosting_get_target(void); const char *semihosting_get_arg(int i); int semihosting_get_argc(void); const char *semihosting_get_cmdline(void); void semihosting_arg_fallback(const char *file, const char *cmd); + /* for vl.c hooks */ void qemu_semihosting_enable(void); int qemu_semihosting_config_options(const char *optstr); void qemu_semihosting_chardev_init(void); void qemu_semihosting_console_init(Chardev *); -#endif /* CONFIG_USER_ONLY */ void qemu_semihosting_guestfd_init(void); #endif /* SEMIHOST_H */ diff --git a/semihosting/stubs-all.c b/semihosting/stubs-all.c index a2a1fc9c6f..c001c84574 100644 --- a/semihosting/stubs-all.c +++ b/semihosting/stubs-all.c @@ -11,6 +11,12 @@ #include "qemu/osdep.h" #include "semihosting/semihost.h" +/* Queries to config status default to off */ +bool semihosting_enabled(bool is_user) +{ + return false; +} + SemihostingTarget semihosting_get_target(void) { return SEMIHOSTING_TARGET_AUTO; diff --git a/semihosting/stubs-system.c b/semihosting/stubs-system.c index f26cbb7c25..989789f373 100644 --- a/semihosting/stubs-system.c +++ b/semihosting/stubs-system.c @@ -22,12 +22,6 @@ QemuOptsList qemu_semihosting_config_opts = { }, }; -/* Queries to config status default to off */ -bool semihosting_enabled(bool is_user) -{ - return false; -} - /* * All the rest are empty subs. We could g_assert_not_reached() but * that adds extra weight to the final binary. Waste not want not. diff --git a/semihosting/user.c b/semihosting/user.c new file mode 100644 index 0000000000..515de3d2c0 --- /dev/null +++ b/semihosting/user.c @@ -0,0 +1,20 @@ +/* + * Semihosting for user emulation + * + * Copyright (c) 2019 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "semihosting/semihost.h" + +bool semihosting_enabled(bool is_user) +{ + return true; +} + +SemihostingTarget semihosting_get_target(void) +{ + return SEMIHOSTING_TARGET_AUTO; +} diff --git a/semihosting/meson.build b/semihosting/meson.build index 86f5004bed..f3d38dda91 100644 --- a/semihosting/meson.build +++ b/semihosting/meson.build @@ -7,8 +7,9 @@ specific_ss.add(when: ['CONFIG_SEMIHOSTING', 'CONFIG_SYSTEM_ONLY'], if_true: fil 'uaccess.c', )) -common_ss.add(when: ['CONFIG_SEMIHOSTING', 'CONFIG_SYSTEM_ONLY'], if_false: files('stubs-all.c')) -system_ss.add(when: ['CONFIG_SEMIHOSTING'], if_true: files( +common_ss.add(when: 'CONFIG_SEMIHOSTING', if_false: files('stubs-all.c')) +user_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files('user.c')) +system_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files( 'config.c', 'console.c', ), if_false: files( From patchwork Thu Apr 24 00:47:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883811 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3200163wrs; Wed, 23 Apr 2025 18:00:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU2SfY6TZm357DB8Z7XAbvClmrmdu3Lo6jeyAJdA8mfCyP5ZDM/0rh+sgMz/8qQ7lUwlFbv5A==@linaro.org X-Google-Smtp-Source: AGHT+IEeekLPXX5pi6tt6MhHmMhAATuby5VSxOOdD5XqaZpEKu4XXkVG2WPwvl+OGmDUfnqY4gys X-Received: by 2002:a05:622a:1ba3:b0:476:a949:ceb6 with SMTP id d75a77b69052e-47eb4ba2d99mr9863431cf.44.1745456421446; Wed, 23 Apr 2025 18:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456421; cv=none; d=google.com; s=arc-20240605; b=RGCnrMH0n9sGaYnwi3czC+otudKUjxKQYh5xyEI/vTQXOryX9rVNp10vaPFaQuccMv JKTI0K8Q3KJnjcYBaZmhcWDiM02VPL500FDlsYASBcitLHiQ34wzqztYcW/GzPr2CleS XfZ1d621OL+nwfBb4kiqrAcL6Fe+GPIayj2cBXVOZnhdnVd7E25NuBNgpdCX/M8B7FNK YCdukJebGpszVTARMcMiI3n6nwAhtqcjMO8IgFvOPBCtD4M/9nU1e8xNZ1L58vQRB3lt fxmcn/AWvButPSPOEjpxjaiOGPx/pBCm8gZFn/v29C5/xDRsQHer+TpOlbd8hTU4Jyqj NQ1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=G9WIPyymM2ElF4UPWEqRA70/pK5WAg/CnC/iZWyOuxk=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=TzoYNhPwiQTvdRzVK56fG20BdaJF6Jm87esgpzU4Y0Do1giBuc5x7ou2oNont6ISia 0RpZoCjSztwTaCOT8/D5d0A8TA0kh4U0s1YLT/6yqQvTzzU5t78JGYFIKE30qys8TN+K avwg33hPT9iYAYEDyww68ip59iNAg1LK1Q4FGw0dgqpuouUwVYF7/rt7WsxbiH+YCJdg 2IzX8UDzjKogTA6eo9RzmS+9Y8p51kfD3218k3NDaaYW0aN3z4zY+PZ+JiB6GcDHJbNV 83UVsKP6HInJQ1xms4S84wiK5TPL4VhckD6cTCQM2CKypkukHfc5jKjwg1fWK/R07+MN BDvw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tDyFJEEM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea27a3e87si4972231cf.587.2025.04.23.18.00.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:00:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tDyFJEEM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kql-0001gE-BV; Wed, 23 Apr 2025 20: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 1u7kqO-0000zx-Pn for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:37 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kpz-0004gs-5T for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:13 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-73c17c770a7so477718b3a.2 for ; Wed, 23 Apr 2025 17:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455990; x=1746060790; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G9WIPyymM2ElF4UPWEqRA70/pK5WAg/CnC/iZWyOuxk=; b=tDyFJEEM67562oa4ypuQWdZdgG5zjowSdHqxR/QibStnNy6BZ6TZ0DHyzGB9e3O+aW kfByvevPdKPKRW8yoJGmPkV8w5rYdZUniZ9oKC599VOb77ZqGtl4Av1ogOBMjNGrnCOh 8KR22rNoyB40hJxnF+PRgb13+R6tlhGNKs+1EYzhOUMtIS8ghWPhFu0eHGzsUfkPg524 7RmKr6VeMi2rW/6yKExYldcHbwWzEWiUXGo82J8XN5sm0gZTlvzU/O4Tclo2s/8Dhvfs zO1lfQSRqblpA8gd2JpQJF6SqAO0eRVrGZThkVhTS5KXwkTIubEGua7/vp4ujTA8scDL i1/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455990; x=1746060790; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G9WIPyymM2ElF4UPWEqRA70/pK5WAg/CnC/iZWyOuxk=; b=mDuuonxpV/3aKQGEwF2YaRmneS+Nj/mA0O+qGhtTMbCpoAzP6Ync91sFgjzhidlGM7 kLtLgCEGiFr/c1bFzmiZmyRUF2S4Skl3viq54BrfEAL5Yyp1HdxW8UPzNCb3EYJh7vEt qB560i/t69U1kqoiU/4HEbJRr1tL3R5Zx3FuMxFsY6CHmVYP22P3P7X7oxz9L7RYeHK9 xvApKworLltBP/TiYA7cc/r04AQt6Wex7q15oqZDuqu9q0KLeqb/ShfhxO44l14R6Ufp tQtWZ8/KYEvGY5Ie4gYNVEsmjXVp+fqI5RN9Pk6X9zLLaKl8NYJZjj/s0bjU5/BtKawb Q5rg== X-Gm-Message-State: AOJu0Yzxt7nz+qZWWtUv2759f1+mTldyS3CTxzVhZWgDLCkvJzO38aey TbzC8VZClPy9MDQdOTj4Z8pNbOREnFh+/fgrpqyHRZC8+a7x8gFtLRNRtypq7CHPp1NcGN3dA9W w X-Gm-Gg: ASbGncujOd5H8aB8kKZe9ZbmUvNyw5UPu7uvL9lPZOx6T90J6f1NOVlKN2l+sh/VLtR aA24s/j72+Cn7wyUujDzw2gQbjyvGsXgIQ2GvoTzQbkmDcckUDD8TZTAtHMv3HwCdQmJ6pA3vvH FMfYP649gr2oVH82BnhQiJREIHx40jpVsYDPg/oXnP1rwJSfKgUif1Na7gc3+p2JSxIPYh2X8A1 PXdXZIApf4G92lEzyWurUGhe5SMWf/1whHrxv8H9OhjCAhWfAl+uM/GNXBjOO3x2RLUZf/ObSmJ xHIuOaw5hZHYysVLDw/BYhscQyTLx+4Wu1q3xM3UmQNp5pKI/+xJ5ZDJ7xt3XAXpDT4DK0sDAwo = X-Received: by 2002:a05:6a00:35c7:b0:736:326a:bb3e with SMTP id d2e1a72fcca58-73e24aed44amr1028469b3a.15.1745455989817; Wed, 23 Apr 2025 17:53:09 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 047/148] semihosting: Assert is_user in user-only semihosting_enabled Date: Wed, 23 Apr 2025 17:47:52 -0700 Message-ID: <20250424004934.598783-48-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- semihosting/user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/semihosting/user.c b/semihosting/user.c index 515de3d2c0..98c144cb45 100644 --- a/semihosting/user.c +++ b/semihosting/user.c @@ -11,6 +11,7 @@ bool semihosting_enabled(bool is_user) { + assert(is_user); return true; } From patchwork Thu Apr 24 00:47:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883900 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3208163wrs; Wed, 23 Apr 2025 18:25:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXkPFmQ/74WU3hnVA8xSBHN15CzgHmxrQSSBmZJ9QXrxVlVzksL4ozH3LbAKVPIJOviuG0/Qg==@linaro.org X-Google-Smtp-Source: AGHT+IGEXrXTuttEh56ZZMePMkeQEz/qHRbJE52jsQKcZ+9jSdYir2hyoatCa1sQKEoOw5stI2vV X-Received: by 2002:a05:620a:248d:b0:7c5:4738:8a0f with SMTP id af79cd13be357-7c956ea65e1mr124302285a.15.1745457916786; Wed, 23 Apr 2025 18:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457916; cv=none; d=google.com; s=arc-20240605; b=UNxzZZU69HtF5aBzbsSjdOaBl13/jPOX427x5Sh1DcVNV+LVnpRZV+udk/ftBCvRhr 2Ex5ajMMpjuIgO8kJouJoDtmMVIjHCRPOOhCPMVTxkZEo8SBch9xoIKVkHLS3n2Z2BP/ 9821FLqU84fHviKCrugRyQ+ibhtK0flmQoEoBTSqfh5dfyf1IETgQodQlAteUbmpHQI4 bpjTfKsxz+wO0BOQ/ZfVdHs6Bt75mXGpeOL9nRs6dcsg6vqTC6bJW1ListZ775P6B3Di iXuEdVACjqh5IJ8+pasQ+fdzHzmHRDj/JXCFoGuj5c1zTkb44BtQEdF7pzBVC3wDij/1 BPBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tycB/Ucpd1VV/Am2B/wQ8+fOjRJD7I+YEhW19LaJbw8=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=eRU0/g0BEPB1/Y3onVvNkIB8Y+Hu79XrDMpnMh5v+KyNojU2qA7nBNVNxT2J2sPl4b 1RcCeTHf67HjsnF9j0Vv4lzaRMqWfFhpZYlPGRVhi7FqBrQ180/ATGAw+V9cfEQQK2xe 2G2ihyDImyF8TbB3R6kh7Xp1rmaVB8On+wxncZyHh9C1A6LEUsctK95jMb7xXmnu462o ODulfiXXS5tHj4frXBsPuUohR4HKJ2NPjWCLibiI4WIgAYK6Cxj3U9xyeYuSXNu9R6H1 zdzJ6MgeIxjNr8WrR6A76SdjRr/dbTwJRvTRqdQDUqCWkSj1zlXhajQcb/PZeTi6kFgm rsOw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TFYcdRhf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958d8725esi25760785a.274.2025.04.23.18.25.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:25:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TFYcdRhf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kr8-0002GE-FU; Wed, 23 Apr 2025 20:54:23 -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 1u7kqR-00010q-6S for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:41 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kq3-0004hQ-0R for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:17 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-7369ce5d323so304483b3a.1 for ; Wed, 23 Apr 2025 17:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455994; x=1746060794; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tycB/Ucpd1VV/Am2B/wQ8+fOjRJD7I+YEhW19LaJbw8=; b=TFYcdRhfmmuK+Vuje27eZeFaQciDhmAwSdUQGP8s3cKg/vGZAOiimYCVeyrXLprlW3 nI3Lvu0j/dQJl7kBvETJbGEVzoLhHRQoEWzBXB0C5UKAMn8SXA7WmSV4ldu8J11vwnDS uRNQz7m1Zbd6JseGoTlBrprMufMTeQFceCWMHDKWzHUVGf0cpux5Y2kR39wfXAd5Unb3 nHLhbK0WMQPhpR4F0Ovk8y+P+K1NWEdboNDBh3qlHqPsPizJkmbcMV47ytDisOHFKGTe ebR9ViZaGZ5xjAuR0HynJ1WHSBdAztfK9NDapHutx+THz7TfChFD2A4vucm+mFJ/pHJZ xATg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455994; x=1746060794; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tycB/Ucpd1VV/Am2B/wQ8+fOjRJD7I+YEhW19LaJbw8=; b=kUE3FytEVwwaspf338t3ifsAbXa+6dtGzFXiiHcsiEmirUUiK2bEEAKqUBjNvkTlFS zX4xwX3EDW9LIt0PyhmfsvgTQSHzzZLt4Z9sh2UJbdvMJCcYBpvgd17ph+RIiuyw5h8F FiuaCB+LnZv2Ufy5fHnaMS82qzvles/6TRhoIWfpglxqHlJAlzUwr16CVyIFMAwUufxv IkhwudlE9B5hn1xN8yMHngIeRVU5TcHmpv1aUFIdIe74LRrZJP+VY1ybhSdWerrqGBTG M2anHEp1hhbxPF1nNbLsnEBZS5vZlC/ynEq+GIUY45Jxo7M6yUFtYRICvJgYwtvNrD+C gtvQ== X-Gm-Message-State: AOJu0Ywtbf9aG5RzQTaBIuq7cwShmxW+YcCcAcYmpa3qkfTDRRWXUc/A OXOp5eqIKCYJTeWcyioS0gTY3l3J1tsMgnmXMKy38dr1LIXmNA1oQlB1PmPyQWOwTdYkiQD0iPs P X-Gm-Gg: ASbGnctBLB28cphYBFl14Jz3pnsjoU6GHtvaE0vPXTe6v4tRg+0B4oQID9i7j7p/HfM FXiQ7x3ovbtlwp4vQ5TrfpraB4hb6GP0R2E5SqwKRAdxUtaAP38BTnpAiHV+jPtBDNn+1X0IGtH pJSLPBKYX3kSdNSMUZnm5juKK/LTByGM5kZeN0/8QzV5SGCG8LZ8+PgRhmYxXewkeose/dxU1Or ZTBAqzNmHe7ldWYq7G1rlH+Z62SwVFqbJ5OXsS0cDYiy2VFnNCFzDckNGeFCJqkkJd7k+fd/YsS 4ZZap9ZMzH8om1t+H1a6yguCNjY/+u7HAYMily+yOI3GJGqwMzjZTOs/b4MtrUADskjcI1VxytY = X-Received: by 2002:a05:6a21:1304:b0:1f5:9024:3246 with SMTP id adf61e73a8af0-20444f053a4mr759198637.17.1745455990459; Wed, 23 Apr 2025 17:53:10 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 048/148] include/exec: Split out watchpoint.h Date: Wed, 23 Apr 2025 17:47:53 -0700 Message-ID: <20250424004934.598783-49-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Relatively few objects in qemu care about watchpoints, so split out to a new header. Removes an instance of CONFIG_USER_ONLY from hw/core/cpu.h. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/watchpoint.h | 41 +++++++++++++++++++++++++++++ include/hw/core/cpu.h | 30 --------------------- accel/tcg/tcg-accel-ops.c | 1 + system/watchpoint.c | 1 + target/arm/debug_helper.c | 1 + target/i386/cpu.c | 1 + target/i386/machine.c | 2 +- target/i386/tcg/system/bpt_helper.c | 1 + target/ppc/cpu.c | 1 + target/ppc/cpu_init.c | 2 +- target/riscv/debug.c | 1 + target/s390x/helper.c | 1 + target/s390x/tcg/excp_helper.c | 1 + target/xtensa/dbg_helper.c | 1 + 14 files changed, 53 insertions(+), 32 deletions(-) create mode 100644 include/exec/watchpoint.h diff --git a/include/exec/watchpoint.h b/include/exec/watchpoint.h new file mode 100644 index 0000000000..4b6668826c --- /dev/null +++ b/include/exec/watchpoint.h @@ -0,0 +1,41 @@ +/* + * CPU watchpoints + * + * Copyright (c) 2012 SUSE LINUX Products GmbH + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef EXEC_WATCHPOINT_H +#define EXEC_WATCHPOINT_H + +#if defined(CONFIG_USER_ONLY) +static inline int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, + int flags, CPUWatchpoint **watchpoint) +{ + return -ENOSYS; +} + +static inline int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, + vaddr len, int flags) +{ + return -ENOSYS; +} + +static inline void cpu_watchpoint_remove_by_ref(CPUState *cpu, + CPUWatchpoint *wp) +{ +} + +static inline void cpu_watchpoint_remove_all(CPUState *cpu, int mask) +{ +} +#else +int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, + int flags, CPUWatchpoint **watchpoint); +int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, + vaddr len, int flags); +void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint); +void cpu_watchpoint_remove_all(CPUState *cpu, int mask); +#endif + +#endif /* EXEC_WATCHPOINT_H */ diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index abd8764e83..37cb7d1531 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1109,36 +1109,6 @@ static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask) return false; } -#if defined(CONFIG_USER_ONLY) -static inline int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, - int flags, CPUWatchpoint **watchpoint) -{ - return -ENOSYS; -} - -static inline int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, - vaddr len, int flags) -{ - return -ENOSYS; -} - -static inline void cpu_watchpoint_remove_by_ref(CPUState *cpu, - CPUWatchpoint *wp) -{ -} - -static inline void cpu_watchpoint_remove_all(CPUState *cpu, int mask) -{ -} -#else -int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, - int flags, CPUWatchpoint **watchpoint); -int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, - vaddr len, int flags); -void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint); -void cpu_watchpoint_remove_all(CPUState *cpu, int mask); -#endif - /** * cpu_get_address_space: * @cpu: CPU to get address space from diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index d9b662efe3..5c88056157 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -37,6 +37,7 @@ #include "exec/hwaddr.h" #include "exec/tb-flush.h" #include "exec/translation-block.h" +#include "exec/watchpoint.h" #include "gdbstub/enums.h" #include "hw/core/cpu.h" diff --git a/system/watchpoint.c b/system/watchpoint.c index 08dbd8483d..21d0bb36ca 100644 --- a/system/watchpoint.c +++ b/system/watchpoint.c @@ -21,6 +21,7 @@ #include "qemu/error-report.h" #include "exec/cputlb.h" #include "exec/target_page.h" +#include "exec/watchpoint.h" #include "hw/core/cpu.h" /* Add a watchpoint. */ diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index a9a619ba6b..473ee2af38 100644 --- a/target/arm/debug_helper.c +++ b/target/arm/debug_helper.c @@ -13,6 +13,7 @@ #include "cpregs.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" +#include "exec/watchpoint.h" #include "system/tcg.h" #ifdef CONFIG_TCG diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 5c9f80b4cc..c596e2174d 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -35,6 +35,7 @@ #include "standard-headers/asm-x86/kvm_para.h" #include "hw/qdev-properties.h" #include "hw/i386/topology.h" +#include "exec/watchpoint.h" #ifndef CONFIG_USER_ONLY #include "system/reset.h" #include "qapi/qapi-commands-machine-target.h" diff --git a/target/i386/machine.c b/target/i386/machine.c index 70f632a36f..6cb561c632 100644 --- a/target/i386/machine.c +++ b/target/i386/machine.c @@ -7,7 +7,7 @@ #include "hw/i386/x86.h" #include "kvm/kvm_i386.h" #include "hw/xen/xen.h" - +#include "exec/watchpoint.h" #include "system/kvm.h" #include "system/kvm_xen.h" #include "system/tcg.h" diff --git a/target/i386/tcg/system/bpt_helper.c b/target/i386/tcg/system/bpt_helper.c index be232c1ca9..08ccd3f5e6 100644 --- a/target/i386/tcg/system/bpt_helper.c +++ b/target/i386/tcg/system/bpt_helper.c @@ -21,6 +21,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" +#include "exec/watchpoint.h" #include "tcg/helper-tcg.h" diff --git a/target/ppc/cpu.c b/target/ppc/cpu.c index bfcc695de7..4d8faaddee 100644 --- a/target/ppc/cpu.c +++ b/target/ppc/cpu.c @@ -22,6 +22,7 @@ #include "cpu-models.h" #include "cpu-qom.h" #include "exec/log.h" +#include "exec/watchpoint.h" #include "fpu/softfloat-helpers.h" #include "mmu-hash64.h" #include "helper_regs.h" diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index f81cb680fc..17f0f3d3ff 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -40,7 +40,7 @@ #include "qemu/cutils.h" #include "disas/capstone.h" #include "fpu/softfloat.h" - +#include "exec/watchpoint.h" #include "helper_regs.h" #include "internal.h" #include "spr_common.h" diff --git a/target/riscv/debug.c b/target/riscv/debug.c index 9db4048523..fea989afe9 100644 --- a/target/riscv/debug.c +++ b/target/riscv/debug.c @@ -30,6 +30,7 @@ #include "trace.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" +#include "exec/watchpoint.h" #include "system/cpu-timers.h" /* diff --git a/target/s390x/helper.c b/target/s390x/helper.c index c689e11b46..e660c69f60 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -27,6 +27,7 @@ #include "target/s390x/kvm/pv.h" #include "system/hw_accel.h" #include "system/runstate.h" +#include "exec/watchpoint.h" void s390x_tod_timer(void *opaque) { diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index ac733f407f..1d51043e88 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -24,6 +24,7 @@ #include "exec/helper-proto.h" #include "exec/cputlb.h" #include "exec/exec-all.h" +#include "exec/watchpoint.h" #include "s390x-internal.h" #include "tcg_s390x.h" #ifndef CONFIG_USER_ONLY diff --git a/target/xtensa/dbg_helper.c b/target/xtensa/dbg_helper.c index 163a1ffc7b..c4f4298a50 100644 --- a/target/xtensa/dbg_helper.c +++ b/target/xtensa/dbg_helper.c @@ -31,6 +31,7 @@ #include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "exec/exec-all.h" +#include "exec/watchpoint.h" #include "system/address-spaces.h" void HELPER(wsr_ibreakenable)(CPUXtensaState *env, uint32_t v) From patchwork Thu Apr 24 00:47:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883909 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3208910wrs; Wed, 23 Apr 2025 18:28:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVFMycEQT/DBrClrPNlV83sI8gopWmJ8kFP1yqxBCLilxUJkbJY9iouU02iAVJJ8sps2TFE2g==@linaro.org X-Google-Smtp-Source: AGHT+IGh7bzYLG7B9I/DeI2mforSbOB3DfPMcGWRjmLK5fk4lwWT4nr7EKJvOEEJ43TtHybMeSqj X-Received: by 2002:a05:6214:acf:b0:6e8:f2ec:4932 with SMTP id 6a1803df08f44-6f4bfcbd62emr18037396d6.28.1745458085478; Wed, 23 Apr 2025 18:28:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458085; cv=none; d=google.com; s=arc-20240605; b=VhnJ5Qby4Q3tO40Z6hRjTDVqdkMqO/FXsXnXZtUcyYh9KC/BfW5rrHpXIrZ+hkyPYM hJK5WnhBIehvHGT9+d1jGbcSXcti0NeRgR26bsCuMzO2Ek5Ki77cS27WXlFAGatuiSV7 KZHJwdYI09Zdoy+vV/mZg1eGasq45HS/FI9MD4fi+KaEuon+pu13iI/dRmuoaWRwJZVa wmRnPMHtPfbxlNIkBsZoV6aVAD4nKOsCvLNUrcirYprRGKBXuOUKqNX+7resVKLzlZKP mzPT7I5OmZgxOCDrDX0Ok6pDn31Q21/Idao+iQU1mpf+DSmG/aJa9OzmnCRK7NN78iqH lGzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fRqDXJHX2zGNybTG6x2KjIY6H1Iy34YPBBK1EJX6qfI=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=ag7TnPCGJ+mBq+xo2RGJuSJW2oF5ubrUtKk4wrcIyDMwBHFXUDMWEbvw8d3F+ZiY6V T4lwMX4J3GGimL6dmo2921oKdqNQAOmmuSCKpsGpswdVVPd4PwQg/V75iQXM3no4V9fT /BbWuN2QnEdb4A2FZAtXV6aKE7zKYnVnCOXneB9gYZCq5RiGQXTaDiMqFwMLm8u42foR qowZajAhF2iDCxI+sWxhgiESkeXciTz63qfcGl48XK0obp+AHqoxkYHvugG6iPYGup31 WYaaCtQqYNLIMYqCwFj/Djf9LkILROVqBnB0ZL0u0hTNnpSX6b/rKcdd5k5WnVX6HI4n 0ynQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q+owHrbK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0b23f25si3818516d6.506.2025.04.23.18.28.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:28:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q+owHrbK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ksu-0002SN-4Y; Wed, 23 Apr 2025 20:56:12 -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 1u7kqT-00011h-C9 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:42 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kq3-0004hU-QT for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:18 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-736e52948ebso453992b3a.1 for ; Wed, 23 Apr 2025 17:53:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455994; x=1746060794; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fRqDXJHX2zGNybTG6x2KjIY6H1Iy34YPBBK1EJX6qfI=; b=Q+owHrbKGIyzISFHkoSxG8+bumjiE+ClEH0UvfKYBjIYaKqeB/vNp1/WLu16ifG+UH tbgg+zNEXsYvnFMy3ParRrKK9nIyVmAk+InwkjNrTfB9DnO5LeOM6qK8L+U/vIjyW4gI 55kMVBstMMsHAsx5ZX5kNaz2gCyVDdq7U+a48QX4jDUXuKGMHBasvCofHrKC2TLL4FMU gzhbhJ1+7Epn7e+/4ilOwvzT6tii3xsjHI8k31t64KyuW/W3VAo5vX2OvGxfi4oIWWik xrXKSM7NBbdi5fNRG8U0bp7zzE/dQ42Yocj5acMxNOa2Duob+WNNgmuGVeOMiVAjGBGv nc1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455994; x=1746060794; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fRqDXJHX2zGNybTG6x2KjIY6H1Iy34YPBBK1EJX6qfI=; b=PLSDJxd0YhyC9nXtehrEC7XPnJ76U3NBXrH8gBGqSUvhmRdlzkMeYNgQtU55qsupgD hZkzQy/DLr5eK2vD0FW2k76b72flwVXe0seF4crkP5BCNCRkV4A1c9JiL4m38abwrZXh vZ7KSgnEMd0vEq8lZC6d7hWZas/9N3bOdXUkG0EOBopEpQ42gd5qyTcv9sAzvouMx2RX z/yEtvFpE3vmgIND7XlWcR0S077Aro+PBnObZbiuV4ZL+nstEu4dme3zEJ5795fTYuq6 UetFBIUWpXdUBz2CIBAEzpCSJs7hmSBhy5qDbm+lH6SVxh+KcrnQ4Pdb0CAynRdSSG1V cg6g== X-Gm-Message-State: AOJu0YwWZ0gcPn4OppuvKZPf2k36mbtTBnDMVE0ZPltspsDuAaseYEum tPLuX+iVqGLAJXPgwCFXy/5RK017SIpuWeaBD9HxLNAapUx9+sFx8mCcWNtJK0D7RLYNS22qDu5 B X-Gm-Gg: ASbGncvE7Wh8cvFqle7mKtYov8nqDfmdt2IPuDkdxkAx9+5Pn1IeCFL3ILsAb3z6FWY Z9oAzmilbUfa2a6+du5RlQK+uEr+MVA9jlpZrgpD19RTsv1tIYXMpNIrbHJh8bg7K72OKrndQGd 3Tk8Rfw45uAPec0cFI3KQQ1XJ0ba6yjB/3DrOwgQznX+iMQ18jbvlZGy4tOPet97HSodV/1UX/P gJ9emfN13kvHeQDCiXlWWxl1nBsUxtLEyfFQ5O95R4S4sZ1m08mdIec6xnDPrXQFqXko4JzXGNA yw2g/N8zYEjWk9aWMFYxdJhdnpr+91Qp7UXWVhLI0XgM3P7WKGNMhbKhPqX3s4Gn/xPHt2DjAqI = X-Received: by 2002:a05:6a00:3cc2:b0:73e:23bd:fb9c with SMTP id d2e1a72fcca58-73e24e0dc67mr1030916b3a.23.1745455994432; Wed, 23 Apr 2025 17:53:14 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 049/148] hw/core: Move unconditional files to libsystem_ss, libuser_ss Date: Wed, 23 Apr 2025 17:47:54 -0700 Message-ID: <20250424004934.598783-50-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Many of the headers used by these require CONFIG_USER_ONLY. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- hw/core/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/meson.build b/hw/core/meson.build index b5a545a0ed..547de6527c 100644 --- a/hw/core/meson.build +++ b/hw/core/meson.build @@ -26,7 +26,7 @@ system_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('stream.c')) system_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('sysbus-fdt.c')) system_ss.add(when: 'CONFIG_EIF', if_true: [files('eif.c'), zlib, libcbor, gnutls]) -system_ss.add(files( +libsystem_ss.add(files( 'cpu-system.c', 'fw-path-provider.c', 'gpio.c', @@ -46,7 +46,7 @@ system_ss.add(files( 'vm-change-state-handler.c', 'clock-vmstate.c', )) -user_ss.add(files( +libuser_ss.add(files( 'cpu-user.c', 'qdev-user.c', )) From patchwork Thu Apr 24 00:47:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883797 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199425wrs; Wed, 23 Apr 2025 17:57:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVr8N6H2e8+4tPxwSw68Z0s2Yz92oMHA51erGOd4TiEvvwzhl1CmsXNkfC1EPZg9fodxspBYA==@linaro.org X-Google-Smtp-Source: AGHT+IHBsRvTLI769C22insHnHzjrxSP4AuUT2ZiG3e9bGlFHD8R71zq59RNiM8y6Aq6CFxxBCS7 X-Received: by 2002:a05:620a:25c9:b0:7c5:407e:1ff8 with SMTP id af79cd13be357-7c956e8bb10mr133925285a.2.1745456249648; Wed, 23 Apr 2025 17:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456249; cv=none; d=google.com; s=arc-20240605; b=J9AaV/NTyjF4bnFGmdJBJzJUYp/b9oM05zi0q7yhOUImdLOE46gESvGM2s/HsQg+cW k2s7OZU3Y4cvmGM2jtc2yBDdy3EspwxYOHRiqkY58HkGgYoOFcHu0wvf88ytLl11OwWs lC3q8wT4fJk901lcYUoemVBcuOk1hL4SZb5OvlmdGeW8FlZt6NC3hv2acutb3XWnT7VJ 7y3eU+0T6ad6rucPQMjIIR3neS4e35yrh9ax0pozXbeiHwCqX6Vzz2qVLNztDURgMMqo faB/QXBeCY16xLtyn5hOu1SvXDyqkCpWHaom2Yh1m5uWRu1zxhf2Ya2Lql4K5bVWNEda rJBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Xdo84E1iLP/XqDwQy8oaphr3JsZ2BPpRKXEovDmduLc=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=dwQdOeY+M/QhEzFFzkNOoqhXM7wLNyeQ+/Gf/bW2LgxlNAjBUCK5OTYdKyDlhIZmqD L1YUfzXnoCA9ZBPN0pw2/twCG7g/s1PX9lQSBRNQlCkCF1PJ2GCn+sECihK9VCmgrUqq dEyvH4QdyYNiwtPZwBaoo4BmlIYKWhBrLJ2Z67RoHcuR+FELzAayKuX4VWm2f7oi1INM 5xov4Mq5uPXY49A3fq1w1ySaFgp8RSMN8zBtj+COQNMg+N7kr4SNekBTyKK28YJmNyQA YRXr0fmbO54u4pv5f7lLo3m/40sVpVTHeHjvWSLc6/c+BZvFwQ0jYoQO35vkg4Hzw1IE Rvrw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AztDn4zX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ee2df7si19156985a.633.2025.04.23.17.57.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:57:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AztDn4zX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krU-0004N6-LQ; Wed, 23 Apr 2025 20:54: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 1u7kqU-00011y-W6 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:43 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0: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 1u7kq4-0004hY-GB for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:18 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-736b34a71a1so462575b3a.0 for ; Wed, 23 Apr 2025 17:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455995; x=1746060795; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xdo84E1iLP/XqDwQy8oaphr3JsZ2BPpRKXEovDmduLc=; b=AztDn4zXSQ8i/ZeYfirkWfuuMTT9JbcXRegxZo8F+yVIyLj2hVPia4S61SFiXejiMk rIaWkcOOmuCn1wLEcBZOJB5xKdQZgfL4vFDwBo1/QkO3FjWQp63WzJDBXKlfLaFcc+Qq 0PpVQvHpQUm2nipWF58qsrb3HsXSFTcTKMf4mLtM+ooXGOEEFGUn9SfmQkfUcOZC/NXB IDJkLf2sTw9iUSe3uXkZWdV5OiB8ALOXzHmmrNSRg/ooUJOV/320a1kq8z03mRhuNveQ u6BnjntuOuXez8ATMmHmNWkKkbqRmnjcdMcHXV/NxfKR1E8aaxcqKg4Nu7AUbhO5/Tj7 Hpxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455995; x=1746060795; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xdo84E1iLP/XqDwQy8oaphr3JsZ2BPpRKXEovDmduLc=; b=YfHpwPwmsfyoWTNbG8s3Re41qTU4rrU5irM1gMFGmjhBLmzUjvcxG+zD7bWqPuxYYG uD1ZeEJVII+9oTg0jKVzr27fYQLYSUOZvBdFDbqd0gOji5Vo90Vdfd7EAilfMfbmFECM aYz8a6e8TBMD+C1RQzWS6y0w42whk14vfJhfl/JjTA/JyutWp7ZgD3u3vKCvBz1T72et kp3vdGHjmUfJdqJIGxBa4JgZ2xdLhpDHeMDDcvCAyH+14qKu5XIdRy6Pq7huFbBUXABV WSostB16IzIFnfEOlNvSNDk01M05oO3iJ5UaixofKZtg41Rr/8/Hi5YLICKyHccKUtOR Lo1A== X-Gm-Message-State: AOJu0YwPqVeT1Oj3UxTjn5CLufign+2GlrpHJwYfbHS3G2LUTxrBuZzW YTOb324KioeuG4VJFG5nFzRUxin9yTd/B7IMBS9/c980o7LSVSoeqfBrUt2nr1+2BNKN5N/pt2Y a X-Gm-Gg: ASbGncuxyM913qEVsBeWC4HHRNvpzK5SIjAWGl5UJnviwaZmcNuECf6CnqMfSdYKOna /l6Tsx5aB5mzG4WvVT3vYA83qH+Z/WtLzWgXsHDklgDIoqDzcBVAI6TvKPR21o6InrkEBzSXRAm kRCJsJxcJy33Pmz9y1Jo6/0yQtEuVUMwsiwsgxDycvSy7T+49+ja2TOkgLvuo8/ac58tSR124rx ow3sUuNPyLnqlegW9N98XLuzfIHfpan3F83IKkp/l1eJxcocH6Shd698If4s7f7RDxpulzoqgDL tFv1rkuX02rmlEVjeUBCQnX8r8XBc87cmZEwrHMWqnbacIECLH0l8Yk+txfZWizFwcIvbiRgKMI = X-Received: by 2002:a05:6a00:278f:b0:736:31cf:2590 with SMTP id d2e1a72fcca58-73e247d82e6mr985967b3a.16.1745455995047; Wed, 23 Apr 2025 17:53:15 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 050/148] system: Move most files to libsystem_ss Date: Wed, 23 Apr 2025 17:47:55 -0700 Message-ID: <20250424004934.598783-51-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Some of the headers used require CONFIG_USER_ONLY. Do not move vl.c, because it has other include dependencies that are present in system_ss. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- system/meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/meson.build b/system/meson.build index 063301c3ad..c2f0082766 100644 --- a/system/meson.build +++ b/system/meson.build @@ -4,6 +4,10 @@ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( )]) system_ss.add(files( + 'vl.c', +), sdl, libpmem, libdaxctl) + +libsystem_ss.add(files( 'balloon.c', 'bootdevice.c', 'cpus.c', @@ -23,9 +27,8 @@ system_ss.add(files( 'runstate-hmp-cmds.c', 'runstate.c', 'tpm-hmp-cmds.c', - 'vl.c', 'watchpoint.c', -), sdl, libpmem, libdaxctl) +)) if have_tpm system_ss.add(files('tpm.c')) From patchwork Thu Apr 24 00:47:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883825 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3201833wrs; Wed, 23 Apr 2025 18:04:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXa3Qe/BC50gGvXy1/aFVgo1qnDV029T0gnShfWbqjlP5sPyd/6PZRo/ZfecPLTAM8gXT5nGA==@linaro.org X-Google-Smtp-Source: AGHT+IGtjvkZ0XLb+sdx62SrJGwlo11mJO54Hz3R0tqwUwj7GW4SGoqw1IPqMiaMXbIhLQa7QZDL X-Received: by 2002:a05:620a:3184:b0:7c7:a602:66ee with SMTP id af79cd13be357-7c956ea9944mr136068285a.10.1745456641992; Wed, 23 Apr 2025 18:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456641; cv=none; d=google.com; s=arc-20240605; b=CGoIKdEvhnxWTdn3eqczZoL2kyM+0Az0Bzgf4WXcxKCBBh2h+l6czTBpAPcDKLWyEW ISQx4LHFFiKdKJkajPjornime3Rl+0qtdDFOcPL+ne1xmTFfHytikJzD8NP/4RZS6AU9 TpUUnz+8r1F+7kAKyekjhuAVfcH4iMmvHpB2rdH0+sUq3HHtyLDUMCIAk5CfiP31ZJfO 97O45z5y39bX3UfxCZzSDeyojlb0TzLa12GPucl7Y+3a27BU2OQscahak7AEIEwDUYo5 tlWsFbBMz0ep4I89PiIBdWeg290KeRoV8//4N3zJVnPmDGR3HLzDReX5Xu/OKw+OFipH zWlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VhN0H72crR7ocnAMdx8d6CUFaK0puwv/7eMWfuXv8/4=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=FgCfhiezhPJE7wyVY4Hl2XpSzfmmfHokzsWXEjIUjo0Jn1CAePm3QD7kPDfhwzBUBQ ltHFNfPHqwahFVCTMuDvAVvS6NlsQRWANwYSoqRk2XdEOQVcBvR/CSjTvc+TRzTUdC/y +qDVBdUutkEHYchfYeeI50wDzkIj1UM7o0IQG/u/8q+ZH5RLaEpNX/3EvYQ4771Hr/oS 7rnC1X2NCnUxdwAuN7HIlm/WRhr04VN/ULcb4ckqaRGY9YvMIj4UaX9HYZ5uZTbFVSWR sxrIna7J5NSVo+c2cYH7TfMUkhSAyg67IgwaYcv3hNkf8WoKa5dyccj90haVDTKAQAGM cAng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x2uMZTaQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958d82c01si20893385a.264.2025.04.23.18.04.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=x2uMZTaQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krM-0003bm-Li; Wed, 23 Apr 2025 20:54:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7kqU-00012J-W5 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:43 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7kq4-0004ha-V6 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:18 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-7376dd56f8fso501829b3a.2 for ; Wed, 23 Apr 2025 17:53:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455995; x=1746060795; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VhN0H72crR7ocnAMdx8d6CUFaK0puwv/7eMWfuXv8/4=; b=x2uMZTaQxBoeJT61Z+HtZeci5nfU2KAv5qU4uGZXsmtZfib8zy2b4EZvpZGP1UYdv7 BRUBdugw8HE4Ie9z7zlUCsbuSM0Z2KwjGgGOIfAOs6jYs8+0gYxyl2UxayEsYZDBwRd7 WzzfJFEhTVNzZ3Yr0ncizhLrVftW/lztKCfI3unEPS2+Mkpnaj2Dm1+Rqjz4/XgcPJL9 KYIsp+yv7nszc7vw+K5g1INLbYAGUNeUAcUDdbgwRTyPGXIlWuJ3FtkfpcD9/fOM8zzB pAmovEXOZ7XJr8vnYDOLeu0VgLiFuN7UHYSFV2WpZJkWFssYhQ03dtA8BisehyGyG3hr VQ1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455995; x=1746060795; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VhN0H72crR7ocnAMdx8d6CUFaK0puwv/7eMWfuXv8/4=; b=n/eM1GxRYdBTOdI6SJoXJ59eGeVWXu9xMDLDR9DtcA7+rRKPzZAGhxs4zSHXZa9uRc GBhnCHtNFC9iTScqFs2BSX3fTqqeZQitG4+tLYVlDfo9+uUTJfQ0K81BISJBIzKveR6o swbaMhXm4mOlxNrcIRwcmNTD+MS53RZpiFySXmiPgk0VhlFc1wq3WHLDFyutIT8TXF1v xtgbXXmuyQEkJR76Muf7TTWPQzRoQMRymkOx1ipltbfm4qUewt+OveuvxHExCsM/ueiL t8uRc5zuyA8KAgIl03d05Q8Lg7A6ufmCvQKYbOBQLCylQQmQfV3+MDnk0xsHHnRJxs4I e00A== X-Gm-Message-State: AOJu0YyyPZg3LPv5HbUntwpdftCMzbeo5kVeTZoi+ZlDG1twf7ZaO9HM rOfw31BnopmjI9U/cOiRs3sty/ytJtdqF8oqVXoWRt029CuQ3CLOfu6pEWFW9dNsVbVlTOghvnx J X-Gm-Gg: ASbGncvyGEkMUuPCV5y8NqZldmH9mq9f4OwwSlZSEtHIULqFVEizCh0lvR1MKzfwgw5 iRBEzgvd6FNpNrAZGDbs9C0UTqmZWFleou8rCfUafiBsDClU97DfJ3lHDLT1Nl2wSNnoZuJL34v ZkOrUZW+OzxHF/+LnfFw5ynyZuj8KExqu6chWKgSrG4JEabpyBNzPT0yyohfet/cQoQXrUO/8cv 2xu19/vhE04lY3xnJEPm0vZE0oD1WdnzfGvA1jZ2pXKWe+TyHNm1uw0M1GxaF7lMugb7KU+Gc7b GTiux+co2jV0NcoLP9/L9YMU/bTPI0ufebGYzWnJ4+yOgKBp3o6D831qwtqlN3xKdeim+qVBWBI = X-Received: by 2002:a05:6a00:3018:b0:736:4e02:c543 with SMTP id d2e1a72fcca58-73e245e3bc0mr1045774b3a.9.1745455995646; Wed, 23 Apr 2025 17:53:15 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 051/148] plugins: Move api.c, core.c to libuser_ss, libsystem_ss Date: Wed, 23 Apr 2025 17:47:56 -0700 Message-ID: <20250424004934.598783-52-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Headers used by these files require CONFIG_USER_ONLY. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- plugins/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/meson.build b/plugins/meson.build index 3be8245a69..5383c7b88b 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -61,5 +61,8 @@ endif user_ss.add(files('user.c', 'api-user.c')) system_ss.add(files('system.c', 'api-system.c')) -common_ss.add(files('loader.c', 'api.c', 'core.c')) +libuser_ss.add(files('api.c', 'core.c')) +libsystem_ss.add(files('api.c', 'core.c')) + +common_ss.add(files('loader.c')) From patchwork Thu Apr 24 00:47:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883929 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3210123wrs; Wed, 23 Apr 2025 18:32:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW4kmAko0mH1sKlk0TIHQOrzMpOu5JqEDs9FIJF1Y9LR388pV5CtgW6LuxptnILYT5gbpXqyw==@linaro.org X-Google-Smtp-Source: AGHT+IHYhhOJnNLe0CTx1VKifUNZz7e5xYuwEglqdfPwLro8hr7ZqSwE091gwqA1NBi62j2nufzC X-Received: by 2002:a05:620a:4607:b0:7c7:827b:46bf with SMTP id af79cd13be357-7c956f27ebcmr128760185a.39.1745458357003; Wed, 23 Apr 2025 18:32:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458356; cv=none; d=google.com; s=arc-20240605; b=akPLR8n0z04Hk/+Xf8JnTVBILJ/YjBDXs/+XH7hLusvNBdULpUgxOconPAgYU3Dccx U8Qqa9JFY4UXaIqxY8BQIHwp2F+sZL14ixVeWZs5PfbCNT1QzdSAV0yK13zX6vUVVHpK is7kjcYphcZK8f8HVKAIbCz8V5TfKlC2Ta4xHE0H5oQvzXKZV0YXJnAYb6B7KVtx1obz 4U3f8KcnZn3pxIEM99kg9Mn5q1KNaKPV03Bb00+6O5x1tUgjpcCaO4c5O6WOQ7iX/PpP qvNZY8Xen6zOkykK/FeQXfn0GX/1ilPCx1WZrfi1/w86OurDRNcUWOllZsZXWc0Iw162 aHrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=irulUe5yhLpB5KcHQZP5AkpEiKTl4QGB2IoJogi1FPE=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=QuNdMuJBG4h5eGUsExXglT5rdjYC9yCYM70zeQ+TP1i06Bvfnx+vLplYaNYULLlRnQ K+Eu1Y+1koDC2tx4oT2If8rj/nxETolsyXE+AmpOmHHBfq2Dc5tTdZIci4EchroOKTA+ aKdmEeuqYuGf6sO5QOdMZ/sKeTGtxsZjkMUV0OqlbMEsYHXuiswrh/3gGRIdz+qftcFe 44oXhwvMUYQkmF/ghGI2ZJ4lFANK+NC1qO9pQ5ru6IvsQtDcLMC8xmnZy7GNEwwWQ8iX M4yW/+P6hTgbeMk3svYVIXy365CVmDv4IxYjrdF+Il+UIbozz5vsVHaon03xRtkUlAH1 iIbA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ilx/+zak"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ede8ffsi24554985a.604.2025.04.23.18.32.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:32:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ilx/+zak"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ksx-0002qu-Ha; Wed, 23 Apr 2025 20:56:15 -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 1u7kqV-00012p-Tw for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:44 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kq5-0004hi-Pv for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:19 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-7399a2dc13fso534986b3a.2 for ; Wed, 23 Apr 2025 17:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455996; x=1746060796; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=irulUe5yhLpB5KcHQZP5AkpEiKTl4QGB2IoJogi1FPE=; b=ilx/+zakCpZJ8o7t2mseXRnx0GNzCmwe0TRyA09K24MScAyt3zL3ijHgHbPQ6K39yv 0inBhOpgc4IqVuwtJjtkq6XkREh6JSh8sUBZLVKQDpVuJq0DP4/bL+4JWdvH8qq5uC8r wMYFUZrdiSX0N8vTnOkU0qO1K+cwIyDvHODm7Crb/K4gC38TJsW0PRpC20rselkyTM1O uOY3Ff9chlOF0H5zuCC869nBLk4mtTjymY8HjwoC+EpVQxtaH6l5gNGuL7iMeOi+ehZ5 /1iBjDVRtfQQ8pP2Gpw+bwkrsJ8ivAAt11uYGVpXDPMULa1E/PzPPBoRv89//gR+JYWO fGGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455996; x=1746060796; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=irulUe5yhLpB5KcHQZP5AkpEiKTl4QGB2IoJogi1FPE=; b=QTf/xe1+RRnBOaZL1OqWaEUA6Sct8nsYZao51BN5p0+aHFsO1TrAChFW2Ut/ruKJ8U AjCeSFEez/Hx15sFQLkfb3t1XsD8KmQEq8Xzap78xKqj8EM+4SJObxYw00CBsTKCAUlT Z3lcSPZ166/mSgouq6KoPOeQ81HhBorWXa96C/tHgPBlEAOd2wfa5L4KFQD/G5BJA0EW kR5vM7jjfmec3hzEX5LBpt6h7jT4xBEAYXv0HzxxU11pOzIYfENlwOu+vawjVNjhzjWR 0skj5hm1VgWPUAc8MW0irvcjD6+9GlxDQNscB4rX2KfmP6Hjaeeph7hK+1M4Am+D7l7C ohOA== X-Gm-Message-State: AOJu0Yyz9FRZBdbOFK9EP9aqId1KSmkqQPW2pIi80g/Lw/yS0hzxffUQ 4Mrsg7x5H41oSZzVSs4ezGLyanrhroQ93AxKs7m7qfnkDYx7rFwKnxWjkJZlDsTi76SSi2ejIf/ u X-Gm-Gg: ASbGncuY9+TlLQ5p5XHGxGPMhGHkdf9ET2OPC/wXkxjb+x+vP/DQDgJDxQN/RUAUius 0Yda+CIY/QBTjQOEHNzZMHfPFZsNjL8upwPt6teIAgveWKnO/QakcYxrFkUrvFz3fa9PC87epes jv/mBgDH6ec866D4+l5v2+zAAmuu5Y22WjmHzXqWRgQ6L02yrnIcaNjrKLmSJJ33/4kkuqwpSA+ IrhCGbj12hNqEIfEfhfdjY6WcuXycltJxQZc8UGlWW9RsP8CNJfjF2iwsS6hmteRukqaUQ4i0uH W9r6612dAaovqoOaYBqdlhdlXTGbuEX2daur2odB+TvEl5jSvKkgDwGdvr32TokuKvdPJFWvo6c = X-Received: by 2002:a05:6a00:2448:b0:736:53f2:87bc with SMTP id d2e1a72fcca58-73e24633529mr1040160b3a.13.1745455996276; Wed, 23 Apr 2025 17:53:16 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 052/148] include/exec: Drop ifndef CONFIG_USER_ONLY from cpu-common.h Date: Wed, 23 Apr 2025 17:47:57 -0700 Message-ID: <20250424004934.598783-53-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We were hiding a number of declarations from user-only, although it hurts nothing to allow them. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu-common.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index be032e1a49..9b83fd7ac8 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -9,9 +9,7 @@ #define CPU_COMMON_H #include "exec/vaddr.h" -#ifndef CONFIG_USER_ONLY #include "exec/hwaddr.h" -#endif #include "hw/core/cpu.h" #include "tcg/debug-assert.h" #include "exec/page-protection.h" @@ -40,8 +38,6 @@ int cpu_get_free_index(void); void tcg_iommu_init_notifier_list(CPUState *cpu); void tcg_iommu_free_notifier_list(CPUState *cpu); -#if !defined(CONFIG_USER_ONLY) - enum device_endian { DEVICE_NATIVE_ENDIAN, DEVICE_BIG_ENDIAN, @@ -176,8 +172,6 @@ int ram_block_discard_range(RAMBlock *rb, uint64_t start, size_t length); int ram_block_discard_guest_memfd_range(RAMBlock *rb, uint64_t start, size_t length); -#endif - /* Returns: 0 on success, -1 on error */ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, void *ptr, size_t len, bool is_write); From patchwork Thu Apr 24 00:47:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883816 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3200255wrs; Wed, 23 Apr 2025 18:00:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV8TE850Vs/tyMcvJ287YUI3HRv667QYxG4fYVfq1pEr1H32W4eL2/ygUO9j3qAa8ZyoAhmKg==@linaro.org X-Google-Smtp-Source: AGHT+IF/yuz6KsNTdtpTKm26EjpC1k4urmbl6CKc/YjQeFalV4DWenBBiM4G6+d2dueKyIh6iSnw X-Received: by 2002:a05:620a:2992:b0:7ac:bc66:5efb with SMTP id af79cd13be357-7c958659f98mr63810985a.27.1745456432117; Wed, 23 Apr 2025 18:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456432; cv=none; d=google.com; s=arc-20240605; b=ZhILnOk0VGsk3YQ8ndm3VdCmZAMkxGqaFg7Lw/CZDdGUZPoDIqTm7unT9rFrbdinzv AdscunOglIclO75zZ3bk3MQPRcPTVMptpEBcqLiLDEL/kFCirmmod09QNaB5gfZp5fw3 Bkj2T6B+yyF/14QsqWWfvWWgHwhnvPeH1X0trk4pKz11Y9+JQzncIGngyr+E1ohv7eX+ j7ri/5z6Ov0uKyffetbGuwcaAobKJkIlx2yBppKVKlcTXB3t4AYiG6zRUFHMPg0jONE0 0WBezuVdI3P4+nJ6gYh9qEdPVJ75bGMRWJDA1lOVCOTy90UQdRbNAn0orgW9WT95H8oY guGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mEj8DRwl0sBMiNx3GlTORUB7tXRrga1o2uCtdvfn7gU=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=USiF3h2rfnHwju1WG4HzH7R3rMxCmFM/cNKSYs0AmRQ4jbJHoNJf5zJYnLEaVUD8nj E5rrKRne7q9LiOkqGmdmhElSN1EvsZ4L2qIgo6QkFHll8pno3tppYfvB7eA7Pn8MWjYZ kR4UXjRNtMMAfnUB1zzVmPkWtQxAY0KQoLGoiqELO4AUNXAzVYwWt6dIKQa83z6epijM VxzgDKJxV7RH3aUWu7a2Aqo5BCkzoShjBATi/JuwvFttr7o60wug8KtisMXl3rtuEvCQ VCbFOqaGseJaXiRG52yvljcqzjJRrmV6UiHrbRizRZzCYutjE287mz9I89u4AVm3NQle d1uw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lGK5yn4B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ea114dsi19613585a.402.2025.04.23.18.00.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:00:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lGK5yn4B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krG-0002xl-EP; Wed, 23 Apr 2025 20:54:30 -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 1u7kqW-00013G-4G for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:45 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kq6-0004hr-KV for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:20 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-736dd9c4b40so1421447b3a.0 for ; Wed, 23 Apr 2025 17:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455997; x=1746060797; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mEj8DRwl0sBMiNx3GlTORUB7tXRrga1o2uCtdvfn7gU=; b=lGK5yn4BNnDPULebW/lHfzqbpycMjKm0wvJjkjEsaxsJOE/uKyM6fut/5ckXTJPpTe QMnHu7khFeSjwwR8ahSkpN762OuUboPM8FPBK4AORyODM8Tw4Ln7qUyUKYuIQwXGDmB+ 7enE5SRbGP1qxEY8FNFfnaDLlVw3zbgcA5zTktPafhNdG0YrWiE0ayXHuyAwbCcBrAPp tyWVexiznkYCbPwhrxOEBp6o9spfl1LzIT0hvUrM55pXQ1nhPSeQoUa/YOXpqd9rVp9U JLjZYeM+nNslXbJj5QzISy52bQKfyferm8fSJyUPKKzVrSoCG8i4QhMcD54wQlPDHpUj ANgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455997; x=1746060797; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mEj8DRwl0sBMiNx3GlTORUB7tXRrga1o2uCtdvfn7gU=; b=d33k5974ScUJAS6sa8oLykdTdj4tmAQKTm6gtm+sYcrueXVE/Hkr83PBCtplTOv1B/ BsUT5eNBi3gtsWoj8xWX09B7f76yYdrvBafkegWIXNcMXeHVuaqoVPmg6kgs0lvvL8A7 S2gABMbL/OnOUlan4ekfrghuIMl2O89DU483HpseGfGvfqbOGiP8zTdipxT5/Vw7ACcY VZfSpn+WgdNIqz+G5Wd1MZzHR0/6uN4agkyAQFkjSGk2o+RrWlpzIEiS0VhspuI0lWj5 nxBr9PcQmjrGSUe3Pa/0+Oaa5YGsg13rJdilA02dyCMqOF0F2kkeez3JnOB0DjZjxyGG wyfA== X-Gm-Message-State: AOJu0YzSP39G/VmYyDN1THa8Cuyn6H1opYwwHEjjW2jY9mNYpVcn50ia xsP9sUNv0uWWZjEE5vNs5zdvCFeB9/oR/wI02aT4Y6W440n/OTTRtAv1AJQQU9Nce9vXK4dRJDC C X-Gm-Gg: ASbGnctLOD1PyWNx/8b2iznAcCbFT98+pU3XSVrcI+qMtcmkTbE+Y/n4Gtr3wCIj3ft r5jFXdRnz9lUbRBcPE/Mz+ly9aO0MSvoJqbXEp+02XdJiQUnrzRXfJ3Vno5CqxEGCXTN6r5umn+ CtE6yt02l8glo6jOJrqw8TlAi6J2pI+DM3TVLRjmW+wd+FV66UBKOId9Pwrewx+QN2kekB7tZNa X5jz5eM4XajNmsr7flFm2DyPU8S6DBW+wV7sRPurHm7+2av/Jts9JxFE+Eec9iRCXW1OFE3KnhI qQhMLwuRj3fus7yO44OD7OoAEnMcPId6OZmorpuaX/qI/CVGCEJaKCKf2fVM6el195C8UjFSyyE = X-Received: by 2002:a05:6a00:8104:b0:732:5875:eb95 with SMTP id d2e1a72fcca58-73e267e0e51mr570715b3a.4.1745455996901; Wed, 23 Apr 2025 17:53:16 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 053/148] include/hw/core: Drop ifndef CONFIG_USER_ONLY from cpu.h Date: Wed, 23 Apr 2025 17:47:58 -0700 Message-ID: <20250424004934.598783-54-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We were hiding a number of declarations from user-only, although it hurts nothing to allow them. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 37cb7d1531..6dcee5d0ba 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -614,8 +614,6 @@ extern bool mttcg_enabled; */ bool cpu_paging_enabled(const CPUState *cpu); -#if !defined(CONFIG_USER_ONLY) - /** * cpu_get_memory_mapping: * @cpu: The CPU whose memory mappings are to be obtained. @@ -676,8 +674,6 @@ int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu, */ GuestPanicInformation *cpu_get_crash_info(CPUState *cpu); -#endif /* !CONFIG_USER_ONLY */ - /** * CPUDumpFlags: * @CPU_DUMP_CODE: @@ -701,7 +697,6 @@ enum CPUDumpFlags { */ void cpu_dump_state(CPUState *cpu, FILE *f, int flags); -#ifndef CONFIG_USER_ONLY /** * cpu_get_phys_page_attrs_debug: * @cpu: The CPU to obtain the physical page address for. @@ -758,8 +753,6 @@ bool cpu_virtio_is_big_endian(CPUState *cpu); */ bool cpu_has_work(CPUState *cpu); -#endif /* CONFIG_USER_ONLY */ - /** * cpu_list_add: * @cpu: The CPU to be added to the list of CPUs. @@ -1136,8 +1129,6 @@ const char *target_name(void); #ifdef COMPILING_PER_TARGET -#ifndef CONFIG_USER_ONLY - extern const VMStateDescription vmstate_cpu_common; #define VMSTATE_CPU() { \ @@ -1147,7 +1138,6 @@ extern const VMStateDescription vmstate_cpu_common; .flags = VMS_STRUCT, \ .offset = 0, \ } -#endif /* !CONFIG_USER_ONLY */ #endif /* COMPILING_PER_TARGET */ From patchwork Thu Apr 24 00:47:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883898 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3208162wrs; Wed, 23 Apr 2025 18:25:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXWdkxceI51KDLcpYOWhL8qSwJIotdc8rHzqfqPV/i/rLx+wq6Few47UDQ/Kpmhdw2B5ghI2w==@linaro.org X-Google-Smtp-Source: AGHT+IFSr70ES0IBotWO2TWCAE7Ha7CO7dtm97WJasc5NfUKz+UrwnAd83ZkyiBCPerB9MsdpKv6 X-Received: by 2002:a05:622a:20c:b0:476:a969:90c5 with SMTP id d75a77b69052e-47eb30a1344mr9502501cf.24.1745457916790; Wed, 23 Apr 2025 18:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457916; cv=none; d=google.com; s=arc-20240605; b=QeOwoGQXsKAxXQrD1kiKmfpIytArIPS7EF9GjMYZoZadYPN+fK1U5ET8qYL3qXWus6 OWALV3fXJd8YjjzM1HJdpwOcNF0OnXp3wS0b2qgOf1QKGtb/S7slDU4TQ+QILewJqQaX 2LhTmn2aeDLvtSMWO0/5ym4uVpDMuuQbuA1ZgU3hDz2iZP4zRswkihUjloO2bBWIjJcJ Kt5cIf6RO8fbHRzcMOp+ntuMfN49tOi8KrI/UBqx4UmBWdPkm9TxTPLF4PT+RFp48M/n 9/DkUOUOi4VjvKdBYBfFmHEToYLrItOOym/tLKsrO/kQl8OeHAktXeDpeoQY0byeqolr zocg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dCrJRVmkbpqEup9kvYUmZ9cHZpBXmxcMhYIM1xbP21g=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=ZH215PtL4v41KRXrJ5jhsY6x83O1CNL/miwq7vjtXwauoWnBILH68hndo0ghVvnyOU qq0RydS/eeTeZsHk+ng3KUbvhne+7Et0yy7XbBkNIfjgE9THTNKgwO3HIeZmlgP6c1J8 JjYq/r4BaoDXbR6Um6jR2Bt7lJm8Wdhd+Cc0AnSYEcQpHtPkOOXia3HhCEhBI3rhynZt Ca8gXud/Ab723k4YTv0MA0HqaPL53y4J1DR7tPYYvKl6UbxXuiHjcqbJFM+hefcK0Pmw ETUJJb0WASAjhs0ZSFHAMe+LnoaF7LlIvgcTzGJPuSp3nTtK74Gx0Thq1neJ/fuzRuYO iPBw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iAkEsFdR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1f9a89fsi5413831cf.439.2025.04.23.18.25.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:25:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iAkEsFdR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krL-0003SF-7C; Wed, 23 Apr 2025 20:54:35 -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 1u7kqW-00013Z-9u for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:45 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0: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 1u7kq7-0004hw-2C for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:20 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-736a7e126c7so337692b3a.3 for ; Wed, 23 Apr 2025 17:53:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455997; x=1746060797; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dCrJRVmkbpqEup9kvYUmZ9cHZpBXmxcMhYIM1xbP21g=; b=iAkEsFdREI3xvFydTnJ2/ACHG9KsEm892KPH/W2H2zqXlx5N/pHvVDj5pZmLxa5w9U AMawk44JMYg2Dt3n+3G+cJ7HeGdgXmsJZTrssbPYh5REEMm0GTf/z7A7F0iLDRk5n023 gVMRYrli3d4Thb4p6k9EQmhdYkITvtALOQPGkb0nXFhkCVI8oH51SCb02HGIqZYZcpzz FoVzMIRetIhC3e2uw1Imdmg+HLNmQPM+0lfNaPxZTyI+BX4Df3L+sMX+d+2Zuv6umAYU OrC/sAUfz65SHXJULeJOMXhlWB2IBcu1E9QY2Ab8PS1sSlS2xx5VbPlSx7oxr2SgebYb /K0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455997; x=1746060797; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dCrJRVmkbpqEup9kvYUmZ9cHZpBXmxcMhYIM1xbP21g=; b=bCzdROS5tHVVplMhNIG/pAbuzNKjTuJbyAr0qUKJeG4BV0CRd0zPB5hENOmdsf2xqc Skyko8C9/uNPDPO7wgKm4kzLK+g/VFuEcfosrMcl972IisTQ++aUqgfZGxpOVisW3yut jnTpqnMi7YTagAP6Lqbmhp/KRU6s0wuw2Yb5+y8vgbkLrjZTRj0+JqE0TCddeh7WHFpX s3cjwv/ttqI0bZ64tsb7hp+M9U1zuQMcTw+2bgsX//OuFoUtzlVAejr4BgZLae05t+hP il3TvAR4KAiHv3qgD10UAj7pKx7D/y21AW9+na1KlnN1bTri2N+r7RXNb33MjZEdvAT5 iYHg== X-Gm-Message-State: AOJu0YyAfIGQd9h+7ACmwKK4snPPGKmyw5EgUtxn6LIcyeKPiYWY54Dv KXw/+vaiLZNgWUt0mYoXdPTvlVorzA84TX3KJRMlEnVi6hTO6AKaKT4nmLyRMRGw5rmmThjkcQE 6 X-Gm-Gg: ASbGncuj+kVf+UL0p2xgY09FH83OK7PwZaNKZXv5uBkaXmNFlv+c6fL6qClGDgkInWf 7InWwaHmNTeNxet1N31FDJV7ML70Cia/FxnwFU+iGjnUZqYeVBViKn9oL6gCaXaqG7m5iTThkRi MBDYgpCns6Mh4cXZkVujuD+LYmkTaMREDaR93TirBikWDR+0EUvfFH185kreiu5uBQg/DMvmA7y kXjk3oQjU/jid2H/P29h+pINECV/P8mEA25eXzpphj4b5LLAQpzd+GcFoRHBeD6bQPT7Y/EGOss MwBAd9jNdiDe8sjI1aKn0fMKqxmj2+YswrfrL75NBSGNZWn7V6N5fU7qTtlEdGFY8DnCVUm7Tvk = X-Received: by 2002:a05:6a00:1d88:b0:736:b402:533a with SMTP id d2e1a72fcca58-73e245bd3c1mr1007869b3a.1.1745455997489; Wed, 23 Apr 2025 17:53:17 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 054/148] include/hw/intc: Remove ifndef CONFIG_USER_ONLY from armv7m_nvic.h Date: Wed, 23 Apr 2025 17:47:59 -0700 Message-ID: <20250424004934.598783-55-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We were hiding a number of declarations from user-only, although it hurts nothing to allow them. The inlines for user-only are unused. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/hw/intc/armv7m_nvic.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/include/hw/intc/armv7m_nvic.h b/include/hw/intc/armv7m_nvic.h index 89fe8aedaa..7b9964fe7e 100644 --- a/include/hw/intc/armv7m_nvic.h +++ b/include/hw/intc/armv7m_nvic.h @@ -189,21 +189,7 @@ int armv7m_nvic_raw_execution_priority(NVICState *s); * @secure: the security state to test * This corresponds to the pseudocode IsReqExecPriNeg(). */ -#ifndef CONFIG_USER_ONLY bool armv7m_nvic_neg_prio_requested(NVICState *s, bool secure); -#else -static inline bool armv7m_nvic_neg_prio_requested(NVICState *s, bool secure) -{ - return false; -} -#endif -#ifndef CONFIG_USER_ONLY bool armv7m_nvic_can_take_pending_exception(NVICState *s); -#else -static inline bool armv7m_nvic_can_take_pending_exception(NVICState *s) -{ - return true; -} -#endif #endif From patchwork Thu Apr 24 00:48:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883792 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199161wrs; Wed, 23 Apr 2025 17:56:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXF3LtB2CVX/vMmqO3TtpRLGoyvjFDXqU7K30aSZMIjwGGNecHNmWEjtBBBbtO/HM6Iz0zU8Q==@linaro.org X-Google-Smtp-Source: AGHT+IETDAcVqhsnqOt/WbaFhoD/+broivarneLoG0Fww7XZzEvkcHK7gQlgJ+NwqkQQcnt8zcHg X-Received: by 2002:a05:622a:1907:b0:476:b2d2:ece7 with SMTP id d75a77b69052e-47eb4ba3c06mr9449121cf.34.1745456179854; Wed, 23 Apr 2025 17:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456179; cv=none; d=google.com; s=arc-20240605; b=jezScjdyU66Jb3juuCBHDuJJ7puo8FmxZCd1G+GqgID482B2WU4YgJAHENH9dyPsob eqhLBoUKCWS4PZ9t+TJpg+m21+tOnIMdtU7GNJVQwDviTL8WnDbbwCAqI6nF9si0L14i +mDkusd26i6tIc8AUJdwbju/Pay9iY34kQB4/VJDIcAXfK40e28x9GSkc2b87JYrnvgV Zy2NIjv0IAQbPIfiwCNIWBILicFRwywTeC7m19GV6ju12fMS8HuETAgsz6dHYJ2Ti6F3 cf5aqLW1RAMtlK7eUMFq1uAc4rmkthZTZlE+vlI1G4fYxl0GiG+NBcDxkESCbUTgTR47 XoLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AJ2cS34T9TygiGdt7kSeE7/VKgkXyAOO0ltlqEGVaUs=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=JMsA2HYUsjMlPBP7j2QXFRgV5xdpqNFpApdK6DVk6RQTlwEhpvOSql/wt12HnjqPXk oQEKkr9n1ZVd3e36Z+5oZMaVqbCvBeTe6KL22xKJg0QHRoVKiBjyGY5FOS7uhuP2R1Tc Bd1a0wWl3k77vAK/aPWZthLjcQoaa3cp22kIHuJ7Kj7IBayA943QmadhaPYGmOw2Sf/y Iq4Qa056PeNvXkDQy5cRJ6pBvNOabymObGBizi7fDyS99NcV6OmkoLQHX0Q4NFgR+BYh AviRMKwZBG/CEEyXX/8fXM0FXGJgFSdtXqxLzFvAHFeXmwEJatbHIyS+VvGAB3zpH9ii e3tg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ev8jWi8B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea2a9d4a2si4835541cf.604.2025.04.23.17.56.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:56:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ev8jWi8B; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ks2-0007eF-R6; Wed, 23 Apr 2025 20:55: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 1u7kqX-00014h-2Z for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kq7-0004i7-Sr for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:21 -0400 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-ae727e87c26so226500a12.0 for ; Wed, 23 Apr 2025 17:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455998; x=1746060798; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AJ2cS34T9TygiGdt7kSeE7/VKgkXyAOO0ltlqEGVaUs=; b=Ev8jWi8BxL9FDPKwhJqZQKemBKUwl078+877o7P3B8Wl4vgB4zVGAu2qReAeFZwh59 uMZz3uXRCimCvJgnA7YbHEp2/zFyIhRew+T7Ufpk1kKGMtni7NVDJdDUS7RhK4xQvYDE ZiROG5roEIgJuoMjw+S2kSCQh+7mtiaHfC07SmpxrCx5nsL+1rdhhbaiPmsGNlBPuehR Hl3yNubqWHmNUDWk7aqGp2LTzM0qcVgwzZG+SEhylA3R5gQ/mT8ZyPEDMXl5z+mHOT4P 7J+ZyQbZThM3iof9rh/MwC6gOYbWSSGJSnj+YZQXJOB4z1dnyGs0aw4oEd3EKv7lxILY C5+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455998; x=1746060798; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AJ2cS34T9TygiGdt7kSeE7/VKgkXyAOO0ltlqEGVaUs=; b=ZGFtb6BOwei/p94QE6cUiu+a1FT5DsjpXBNXI9hNH6LAebBi4ydidhC7RL/d80Cum/ NugMm2+noj1TzDe7HSeto7MMUUTErdbadnbJWY9fZe875hVmhKeYlUAw7/OIh0qiUJ7z IpKcufaenrxZHdiYsyH2CzA/INlMEgah6G9fcUnepHR0v/Hesr70dq/aUcwbtcyvlQxu WgQ4+tCRwpYfLST0s8y0rLD7nBRffp76u+RcKncV7eO1kfXQPJavzDtWEszyL5rAKbfz jNqaIokEwzU+tAGoO7GNnl5EsM6qQHmsaZ1p6i9g71HHKjOmdg72saD4ZIRA1fgNGQjW mvkw== X-Gm-Message-State: AOJu0Yz4OLnzLZlzuAbdGU1Y1VLbVb9H0Lmey3vkBflzFJ+lpLepi1Y7 0vb9FB7eM39kRXyR0G0Mry4wXauENCRqK7iIhMVImsVgsYI2ji3uHMHSeEgHUTh/jF+zDokmDOd i X-Gm-Gg: ASbGncufqES+fNavNAMsF7XeL3bY7l3Re/6BTaqyFxgkV+LF/MDEkflnGsADgQgHEEt H6LJKti/GW/tzLT9d/D2IQqRG3f5tmaauq7PAjfelctPGHB4J58qZxu8L9+zKdCMZOwJBO5PZ/j q/r725L5ZW5n/KBeTLE9ZMzkPJrQ4PV9Ja7dvVxwqj/L3g+NqnbosJSPeGdOboqOr8kJABmikjC Bt7KGT8QTYMNTegi1Q2w8Qvkgeb39E+F7RtaywuNN/AYtUkLfFLC3HwWQ08dPxzOtmnfy6b+scx klXCc4Dt+Yx6+cwaPqekZWXDZU7xV6wEth8/305oKWry4jWhK73kDPXonQfm0shOBknsQZ6i4Tw = X-Received: by 2002:a05:6a21:78a5:b0:1f5:7c6f:6c8a with SMTP id adf61e73a8af0-20444f4142dmr784541637.35.1745455998096; Wed, 23 Apr 2025 17:53:18 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 055/148] include/hw/s390x: Remove ifndef CONFIG_USER_ONLY in css.h Date: Wed, 23 Apr 2025 17:48:00 -0700 Message-ID: <20250424004934.598783-56-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::532; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x532.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We were hiding a number of declarations from user-only, although it hurts nothing to allow them. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/hw/s390x/css.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h index dbf919bdd2..0b0400a9d4 100644 --- a/include/hw/s390x/css.h +++ b/include/hw/s390x/css.h @@ -238,7 +238,6 @@ uint32_t css_get_adapter_id(CssIoAdapterType type, uint8_t isc); void css_register_io_adapters(CssIoAdapterType type, bool swap, bool maskable, uint8_t flags, Error **errp); -#ifndef CONFIG_USER_ONLY SubchDev *css_find_subch(uint8_t m, uint8_t cssid, uint8_t ssid, uint16_t schid); bool css_subch_visible(SubchDev *sch); @@ -262,7 +261,6 @@ int css_enable_mss(void); IOInstEnding css_do_rsch(SubchDev *sch); int css_do_rchp(uint8_t cssid, uint8_t chpid); bool css_present(uint8_t cssid); -#endif extern const PropertyInfo css_devid_ro_propinfo; From patchwork Thu Apr 24 00:48:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883795 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199213wrs; Wed, 23 Apr 2025 17:56:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWGdHu7ULzTg6YjkWOQQa9V/pg0x98VOrVSZGhMzUZ3jNIOzQjSMOfUD9mca1Lsu3eUqeJcPQ==@linaro.org X-Google-Smtp-Source: AGHT+IH2MxE8QyYK/1twQt7PB0NA0LmgaMQN52BdGpJMIXTPUy67YL2Vr4x3rjGXIv/1m7OEs0pe X-Received: by 2002:a05:620a:2801:b0:7c5:50cc:51b3 with SMTP id af79cd13be357-7c956eda6d5mr138814385a.33.1745456189852; Wed, 23 Apr 2025 17:56:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456189; cv=none; d=google.com; s=arc-20240605; b=Y/2YZnv6hkYWoKCnddUyiNgZlmjqaB/fniwCwjeHj7NN7yFiPFXfIAdCYcE81WLgr9 a6vT36+ynkqzmQVHNJyn/IghqOwHwggr9TwvoMh5V8IdR554f0+L3L6urnMcFAKQ7yXt 6PupbsDNf7vLEu6wO0aolZiUte5hW4u3BtEw0SoZnrUMO0cdX+w90/quP0Czl2Hl88RK 93yfVPdxBlAdlCeh0jdATnjQaJ/CKRpwC5klIJgemyFlN2v8Wcgq41GbH4BsVNub22kt vmNG9fUutajHEDsmCZl1Y44Zxtf5FJ2Hd6QYMD9+dD/ykXmyG6blaEbZZF1az6X2zAwE IlaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tZ2uAEQVxje5/kiLSW050T/aRtTVB8F0yJpvuIXNmbQ=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=hjw9NOroLY3qhQ7GPmlNcduDTUu1S0b10H8Mu0D3UOEH1DieWcQfZKWXrW2p3X6fVp NSLy2wue0UE87hLaMpETSkzhVaWtf5J6a1vwqxb7iLuYeJYTWXh9xmGc08JY0iysC6Ck esrykUVMnIVg98KysAHZCYLgfx9C6Ushcqa/+qzMvIYXbK8y6Z0lVTinl8QFefqTJZqn 7l8qABY9KS3ZfbQxXN+wBYKa0d9UA9gg+nbjEIc3AToPd2/t1uGjUqlIx+hnd1HM+8by bQRrNzeLNrlX+qA/ajlC1Rd18J1N5MRwvnfhg7raLc6WWamZ4h1+2LJnta59IaiLgwSh SGrw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zMXcDCWy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ccc59esi21297985a.132.2025.04.23.17.56.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:56:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zMXcDCWy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kru-0006rE-Sj; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015L-PP for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kq8-0004iJ-B6 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:23 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-736c3e7b390so369378b3a.2 for ; Wed, 23 Apr 2025 17:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455999; x=1746060799; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tZ2uAEQVxje5/kiLSW050T/aRtTVB8F0yJpvuIXNmbQ=; b=zMXcDCWyPJUpwidv207hE77+cpXq4EI7jDnNJbDSwvwaX2MUVEpsqsf0CciqLq8e3f xrrtTX1GpMs7pvcf01p6J/p+InybXs5toyE4cP0sMFEJeomqasJwnz4ZZFrD1cnI9WfP 5no3GlxBTzhAI1bx/a6zyG9sqifKeV7+iYMlD70qEyXiPlRaUVutXLrMrz3Us2AsiuCb dFDNYK3BT9QC251oJusVw2fSqdkFxmXxLE2+nxSoCI3J3yAp6wyVG8ZEAzqiQ/49aqO8 kyF1uJlMoz/bBH8ZDvGBFm7C5vWuBmrVUqkkvF2l7nWCT5PAoesUvd/YTu7J3n8Z63fd PqzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455999; x=1746060799; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tZ2uAEQVxje5/kiLSW050T/aRtTVB8F0yJpvuIXNmbQ=; b=wWUSGBL5cYbhZJnaFTlJzcR0+/ij/+pcF1g77EHG9k/lUBv2+ykVXsyGQa+5DfOceA ThxDvCKpjBhPbe3lHyXZajVKMouxJBzrcrbxrUs0sWNbVsT/CRP5QFrFhdoM0ms2R7/B FKg/lCZcSiXLncjjTXvsDILnyjFXCWPQB7VEzkif4OEz1gUInEuCPFpDHIKRmJ7w0u/B iDkcO2Yf57+KaJP4whaeQLJk6fUWQjYFiRhLDDR0ZuTVTnXMPN8sNAaKWU61iIuHJWcm TG/Z5QAnOveRDHNnpdQ5EwJbfuZMrKOsHpBFJ8ODyHDIbleUhKhdwrbbynbE893mlwj1 oU6w== X-Gm-Message-State: AOJu0Yywgm0X2HvA2opNAoQyoAUoQn7kLfpO3//5WNuqrD50lDyQpgTK 9OS2tow+LeIcfJmHl7Hs4qP31eLZ5Mq5/YnkJ7EbJ8ytMncy64ea7GSYh3pqZU7uQo5nGXndv3j Y X-Gm-Gg: ASbGncseg5PTVK3fYA/IsN1oB/YrcrKqnalHBBTtcX60ogdjIbj5/qduwmYw1cbkuB9 Md3RkkONyg2KBUfxOxIFAxDHbk4fatmjbXFHNsHhkRlzHHhZGwhYRSRRm12W76ipy/J8V2GYOSR OX+MSIgQqhSmgqiDto4IJIqIHl3ufDls0HL0P9bj7xj5M4Oqnd9bsALCAOWsgLRbFN9CFM0qRKr qkCFIYOXSwarzDURg6vSDGgAIN+bxtexNmkh7rS6UtdHInCIYn1r/JtN3bw91S9ANqiIS4eBRaq AGSiIAQ2ri5K8cPGEE3IPkadRN7501i50T0D+T4127AnyfgORzhSxKKYQ6S6Za8dUxQdex/FIOc = X-Received: by 2002:a05:6a00:e1b:b0:73d:fa34:50c8 with SMTP id d2e1a72fcca58-73e23cbb5ddmr1073499b3a.0.1745455998747; Wed, 23 Apr 2025 17:53:18 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 056/148] include/exec: Split out icount.h Date: Wed, 23 Apr 2025 17:48:01 -0700 Message-ID: <20250424004934.598783-57-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Split icount stuff from system/cpu-timers.h. There are 17 files which only require icount.h, 7 that only require cpu-timers.h, and 7 that require both. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/icount.h | 68 ++++++++++++++++++++++++++++++++ include/system/cpu-timers.h | 58 --------------------------- accel/tcg/cpu-exec.c | 2 +- accel/tcg/icount-common.c | 2 +- accel/tcg/monitor.c | 1 + accel/tcg/tcg-accel-ops-icount.c | 2 +- accel/tcg/tcg-accel-ops-mttcg.c | 2 +- accel/tcg/tcg-accel-ops-rr.c | 2 +- accel/tcg/tcg-accel-ops.c | 2 +- accel/tcg/tcg-all.c | 2 +- accel/tcg/translate-all.c | 2 +- hw/core/ptimer.c | 2 +- replay/replay.c | 2 +- stubs/icount.c | 2 +- system/cpu-timers.c | 1 + system/dma-helpers.c | 2 +- system/vl.c | 1 + target/arm/helper.c | 1 + target/riscv/cpu_helper.c | 2 +- target/riscv/csr.c | 2 +- target/riscv/debug.c | 1 + target/riscv/machine.c | 2 +- target/riscv/pmu.c | 2 +- util/async.c | 2 +- util/main-loop.c | 1 + util/qemu-timer.c | 1 + 26 files changed, 92 insertions(+), 75 deletions(-) create mode 100644 include/exec/icount.h diff --git a/include/exec/icount.h b/include/exec/icount.h new file mode 100644 index 0000000000..4964987ae4 --- /dev/null +++ b/include/exec/icount.h @@ -0,0 +1,68 @@ +/* + * icount - Instruction Counter API + * CPU timers state API + * + * Copyright 2020 SUSE LLC + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef EXEC_ICOUNT_H +#define EXEC_ICOUNT_H + +/** + * ICountMode: icount enablement state: + * + * @ICOUNT_DISABLED: Disabled - Do not count executed instructions. + * @ICOUNT_PRECISE: Enabled - Fixed conversion of insn to ns via "shift" option + * @ICOUNT_ADAPTATIVE: Enabled - Runtime adaptive algorithm to compute shift + */ +typedef enum { + ICOUNT_DISABLED = 0, + ICOUNT_PRECISE, + ICOUNT_ADAPTATIVE, +} ICountMode; + +#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) +extern ICountMode use_icount; +#define icount_enabled() (use_icount) +#else +#define icount_enabled() ICOUNT_DISABLED +#endif + +/* + * Update the icount with the executed instructions. Called by + * cpus-tcg vCPU thread so the main-loop can see time has moved forward. + */ +void icount_update(CPUState *cpu); + +/* get raw icount value */ +int64_t icount_get_raw(void); + +/* return the virtual CPU time in ns, based on the instruction counter. */ +int64_t icount_get(void); +/* + * convert an instruction counter value to ns, based on the icount shift. + * This shift is set as a fixed value with the icount "shift" option + * (precise mode), or it is constantly approximated and corrected at + * runtime in adaptive mode. + */ +int64_t icount_to_ns(int64_t icount); + +/** + * icount_configure: configure the icount options, including "shift" + * @opts: Options to parse + * @errp: pointer to a NULL-initialized error object + * + * Return: true on success, else false setting @errp with error + */ +bool icount_configure(QemuOpts *opts, Error **errp); + +/* used by tcg vcpu thread to calc icount budget */ +int64_t icount_round(int64_t count); + +/* if the CPUs are idle, start accounting real time to virtual clock. */ +void icount_start_warp_timer(void); +void icount_account_warp_timer(void); +void icount_notify_exit(void); + +#endif /* EXEC_ICOUNT_H */ diff --git a/include/system/cpu-timers.h b/include/system/cpu-timers.h index 64ae54f6d6..a1abed0d7a 100644 --- a/include/system/cpu-timers.h +++ b/include/system/cpu-timers.h @@ -15,64 +15,6 @@ /* init the whole cpu timers API, including icount, ticks, and cpu_throttle */ void cpu_timers_init(void); -/* icount - Instruction Counter API */ - -/** - * ICountMode: icount enablement state: - * - * @ICOUNT_DISABLED: Disabled - Do not count executed instructions. - * @ICOUNT_PRECISE: Enabled - Fixed conversion of insn to ns via "shift" option - * @ICOUNT_ADAPTATIVE: Enabled - Runtime adaptive algorithm to compute shift - */ -typedef enum { - ICOUNT_DISABLED = 0, - ICOUNT_PRECISE, - ICOUNT_ADAPTATIVE, -} ICountMode; - -#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) -extern ICountMode use_icount; -#define icount_enabled() (use_icount) -#else -#define icount_enabled() ICOUNT_DISABLED -#endif - -/* - * Update the icount with the executed instructions. Called by - * cpus-tcg vCPU thread so the main-loop can see time has moved forward. - */ -void icount_update(CPUState *cpu); - -/* get raw icount value */ -int64_t icount_get_raw(void); - -/* return the virtual CPU time in ns, based on the instruction counter. */ -int64_t icount_get(void); -/* - * convert an instruction counter value to ns, based on the icount shift. - * This shift is set as a fixed value with the icount "shift" option - * (precise mode), or it is constantly approximated and corrected at - * runtime in adaptive mode. - */ -int64_t icount_to_ns(int64_t icount); - -/** - * icount_configure: configure the icount options, including "shift" - * @opts: Options to parse - * @errp: pointer to a NULL-initialized error object - * - * Return: true on success, else false setting @errp with error - */ -bool icount_configure(QemuOpts *opts, Error **errp); - -/* used by tcg vcpu thread to calc icount budget */ -int64_t icount_round(int64_t count); - -/* if the CPUs are idle, start accounting real time to virtual clock. */ -void icount_start_warp_timer(void); -void icount_account_warp_timer(void); -void icount_notify_exit(void); - /* * CPU Ticks and Clock */ diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 372b876604..034c2ded6b 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -35,7 +35,7 @@ #include "exec/log.h" #include "qemu/main-loop.h" #include "exec/cpu-all.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "exec/replay-core.h" #include "system/tcg.h" #include "exec/helper-proto-common.h" diff --git a/accel/tcg/icount-common.c b/accel/tcg/icount-common.c index 402d3e3f4e..d6471174a3 100644 --- a/accel/tcg/icount-common.c +++ b/accel/tcg/icount-common.c @@ -35,7 +35,7 @@ #include "system/replay.h" #include "system/runstate.h" #include "hw/core/cpu.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/cpu-timers-internal.h" /* diff --git a/accel/tcg/monitor.c b/accel/tcg/monitor.c index eeb38a4d9c..1c182b6bfb 100644 --- a/accel/tcg/monitor.c +++ b/accel/tcg/monitor.c @@ -14,6 +14,7 @@ #include "qapi/qapi-commands-machine.h" #include "monitor/monitor.h" #include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/tcg.h" #include "tcg/tcg.h" #include "internal-common.h" diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/tcg-accel-ops-icount.c index 27cf1044c7..d0f7b410fa 100644 --- a/accel/tcg/tcg-accel-ops-icount.c +++ b/accel/tcg/tcg-accel-ops-icount.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "system/replay.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/main-loop.h" #include "qemu/guest-random.h" #include "hw/core/cpu.h" diff --git a/accel/tcg/tcg-accel-ops-mttcg.c b/accel/tcg/tcg-accel-ops-mttcg.c index bdcc385ae9..dfcee30947 100644 --- a/accel/tcg/tcg-accel-ops-mttcg.c +++ b/accel/tcg/tcg-accel-ops-mttcg.c @@ -26,7 +26,7 @@ #include "qemu/osdep.h" #include "system/tcg.h" #include "system/replay.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/main-loop.h" #include "qemu/notify.h" #include "qemu/guest-random.h" diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index f62cf24e1d..6eec5c9eee 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++ b/accel/tcg/tcg-accel-ops-rr.c @@ -27,7 +27,7 @@ #include "qemu/lockable.h" #include "system/tcg.h" #include "system/replay.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/main-loop.h" #include "qemu/notify.h" #include "qemu/guest-random.h" diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index 5c88056157..ccdb781eef 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -29,7 +29,7 @@ #include "system/accel-ops.h" #include "system/tcg.h" #include "system/replay.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/main-loop.h" #include "qemu/guest-random.h" #include "qemu/timer.h" diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index c1a30b0121..7a5b810b88 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -26,7 +26,7 @@ #include "qemu/osdep.h" #include "system/tcg.h" #include "exec/replay-core.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "tcg/startup.h" #include "qapi/error.h" #include "qemu/error-report.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 167535bcb1..bb161ae61a 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -55,7 +55,7 @@ #include "qemu/cacheinfo.h" #include "qemu/timer.h" #include "exec/log.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/tcg.h" #include "qapi/error.h" #include "accel/tcg/cpu-ops.h" diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index 7f63d17ca1..0aeb10fb53 100644 --- a/hw/core/ptimer.c +++ b/hw/core/ptimer.c @@ -11,7 +11,7 @@ #include "migration/vmstate.h" #include "qemu/host-utils.h" #include "exec/replay-core.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/qtest.h" #include "block/aio.h" #include "hw/clock.h" diff --git a/replay/replay.c b/replay/replay.c index 3adc387b3d..a3e24c967a 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/replay.h" #include "system/runstate.h" #include "replay-internal.h" diff --git a/stubs/icount.c b/stubs/icount.c index edbf60cbfa..ceb73b4fc2 100644 --- a/stubs/icount.c +++ b/stubs/icount.c @@ -1,6 +1,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" /* icount - Instruction Counter API */ diff --git a/system/cpu-timers.c b/system/cpu-timers.c index 23dd82b465..cb35fa62b8 100644 --- a/system/cpu-timers.c +++ b/system/cpu-timers.c @@ -36,6 +36,7 @@ #include "hw/core/cpu.h" #include "system/cpu-timers.h" #include "system/cpu-timers-internal.h" +#include "exec/icount.h" /* clock and ticks */ diff --git a/system/dma-helpers.c b/system/dma-helpers.c index 6bad75876f..0d592f6468 100644 --- a/system/dma-helpers.c +++ b/system/dma-helpers.c @@ -13,7 +13,7 @@ #include "trace.h" #include "qemu/thread.h" #include "qemu/main-loop.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/range.h" /* #define DEBUG_IOMMU */ diff --git a/system/vl.c b/system/vl.c index ec93988a03..c17945c493 100644 --- a/system/vl.c +++ b/system/vl.c @@ -89,6 +89,7 @@ #include "audio/audio.h" #include "system/cpus.h" #include "system/cpu-timers.h" +#include "exec/icount.h" #include "migration/colo.h" #include "migration/postcopy-ram.h" #include "system/kvm.h" diff --git a/target/arm/helper.c b/target/arm/helper.c index 0454b06a6c..becbbbd0d8 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -24,6 +24,7 @@ #include "exec/translation-block.h" #include "hw/irq.h" #include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/kvm.h" #include "system/tcg.h" #include "qapi/error.h" diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 6c4391d96b..0dd8645994 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -31,7 +31,7 @@ #include "accel/tcg/cpu-ops.h" #include "trace.h" #include "semihosting/common-semi.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "cpu_bits.h" #include "debug.h" #include "pmp.h" diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 7948188356..c52c87faae 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -27,7 +27,7 @@ #include "exec/exec-all.h" #include "exec/cputlb.h" #include "exec/tb-flush.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/guest-random.h" #include "qapi/error.h" #include diff --git a/target/riscv/debug.c b/target/riscv/debug.c index fea989afe9..7fc9e121e1 100644 --- a/target/riscv/debug.c +++ b/target/riscv/debug.c @@ -32,6 +32,7 @@ #include "exec/helper-proto.h" #include "exec/watchpoint.h" #include "system/cpu-timers.h" +#include "exec/icount.h" /* * The following M-mode trigger CSRs are implemented: diff --git a/target/riscv/machine.c b/target/riscv/machine.c index 889e2b6570..a1f70cc955 100644 --- a/target/riscv/machine.c +++ b/target/riscv/machine.c @@ -21,7 +21,7 @@ #include "qemu/error-report.h" #include "system/kvm.h" #include "migration/cpu.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "debug.h" static bool pmp_needed(void *opaque) diff --git a/target/riscv/pmu.c b/target/riscv/pmu.c index 0408f96e6a..a68809eef3 100644 --- a/target/riscv/pmu.c +++ b/target/riscv/pmu.c @@ -22,7 +22,7 @@ #include "qemu/timer.h" #include "cpu.h" #include "pmu.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/device_tree.h" #define RISCV_TIMEBASE_FREQ 1000000000 /* 1Ghz */ diff --git a/util/async.c b/util/async.c index 863416dee9..2719c629ae 100644 --- a/util/async.c +++ b/util/async.c @@ -35,7 +35,7 @@ #include "block/raw-aio.h" #include "qemu/coroutine_int.h" #include "qemu/coroutine-tls.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "trace.h" /***********************************************************/ diff --git a/util/main-loop.c b/util/main-loop.c index acad8c2e6c..42bd75c193 100644 --- a/util/main-loop.c +++ b/util/main-loop.c @@ -27,6 +27,7 @@ #include "qemu/cutils.h" #include "qemu/timer.h" #include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/replay.h" #include "qemu/main-loop.h" #include "block/aio.h" diff --git a/util/qemu-timer.c b/util/qemu-timer.c index 788466fe22..1fb48be281 100644 --- a/util/qemu-timer.c +++ b/util/qemu-timer.c @@ -27,6 +27,7 @@ #include "qemu/timer.h" #include "qemu/lockable.h" #include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/replay.h" #include "system/cpus.h" From patchwork Thu Apr 24 00:48:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883826 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3201834wrs; Wed, 23 Apr 2025 18:04:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX6t3IHiyZJ4WiCqvlVS51t4DyTQc2UF+u6u1SjC1U29aMz7QUfW+8JLYl/nHOqHRRffoEJaw==@linaro.org X-Google-Smtp-Source: AGHT+IExeviKnXCqA/we0Lp6nhKNvHeBN7LyqNugi4lfa+i9/KlSdbiP6n1uwU+1Q0RdYKAzdcF6 X-Received: by 2002:a05:6214:2a4f:b0:6f2:d25e:8f60 with SMTP id 6a1803df08f44-6f4bfc22694mr13413486d6.22.1745456642146; Wed, 23 Apr 2025 18:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456642; cv=none; d=google.com; s=arc-20240605; b=lqwch4oEDcFeIfYgxaWYAK5CxFGRgOIxbouxc/K3ncUEdPZB9z4FbA0kZeXsa2rPO6 Sv9ZrwtCpnB7yqnmwPYSF3mdgifUFd0VtdXmBaCGir9vM2F16dBvUTQ+E1t5TVVy5det N0/jdyHrW8+DUuFPcQyb2d6PvPR5yf2y9AAByYkUHu/D8wO2kfJKMoztxNMyWP89Dfdm MRqlPZc88pZAc3h8bhDFpvfXBnYevW+cY3o7W6BmLEPDtaHqanDg1BUiKgBaCL87Ld9j UZGECFhYtNBSfAUlpH8hBdoEpGxkS5a23di0zragjEA4dbWhV1Ur2/9kKvGwXTlhpYx/ gHfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kEc/3fiG4iISK/71vr3crINCUz3P6fX9ye3zEIs07n0=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=CmkIZZjYXNFVGXRmo6LfkpBjcGswjqdhBS6BO7SKasCObqpkWTnJRFevIrEkqh2zmC SgNsh8nu2NMAaPpHvOQyCpKNiiF9Iy6z0HiGmwg5DsWktURBzS7nua8o8OKkPXGtHyXH QHbR3GooYQ+H16YHVtB+C6aD9bvJoINyfdTr/1i9qcdjvihJkOpV7pMtUMt4SejiBJ2v 09nsp1PNu65+KOiSQLc/B9De2xxN+U+kLuLe/gIv/iwdP4h2cH6SNYjfk9r1mvVB0WLo nC5Xz9H+b37WJ+9k7jdIwVE7TxuyvnP+sTA41lXPT731bdBKTctpgrxF67JRqWmVO4HU rMBA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P/ZyKyj4"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0921919si3970796d6.161.2025.04.23.18.04.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="P/ZyKyj4"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ksU-0000QI-Sv; Wed, 23 Apr 2025 20:55: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 1u7kqX-000159-KP for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0: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 1u7kq8-0004iQ-Vp for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:22 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-73bf1cef6ceso387139b3a.0 for ; Wed, 23 Apr 2025 17:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745455999; x=1746060799; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kEc/3fiG4iISK/71vr3crINCUz3P6fX9ye3zEIs07n0=; b=P/ZyKyj4lM40oaQW1jiMLaKOPr38Z2xLR2tL5RvmBO6W1gbNCoy2JJ0dm+/3LnsM8N SKwMCRfHjnwBUwI9czbhCM6fekAv5OVtrpc5YZChxLrUQE+gGacwh1i5IZ+FPQFhdXtB JI0ge8cZWqbgaTvVKAT987Pi/m43QyJge6ZYLK1RR/2EFKBlnyNX8XIkz941FcUuuksM AXPDDru0GaWo9VTN05QilhkLRzMa08+yu3/3MHd0MLNpvYqWj5DQ1ZzavfR4SUh1XqnZ dj0Q7GRQJcPh9SqfBvWKIHLKFDmfseOYCMOI/zVzWnnl+5TkowMn5wUwvZqIbjl/kpVP MUVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745455999; x=1746060799; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kEc/3fiG4iISK/71vr3crINCUz3P6fX9ye3zEIs07n0=; b=BUmz3y1wDpJxk9yeVMm9Qot2zh4oFwwbt8t1KRsRzA7aWZxe8Lp3DvdbGUADc942xS UaZgvWespiA8CmpizMlmDn7hnqpUkvBuxAqoF+NFfotm4vUny+ccGyXBpdWt96xsEvPZ yLiWrF5JtCfWg5dr2OqG8thnxhbH39KPB0OviLcR/rll2CimGHwb9nejB0fFkIicki5S TzPLKbgZlOQFr3ekv2RrR8KdUQOPzqciBsqehQmssmRLI92ai8WryNbgvvQB4py9UJ78 0HidtGSFOuJKQy765NWY7EIDX1a8Deh2gKAtXdxxqnxpst4SkY587I2bn6ADGm5fccz6 +Ptg== X-Gm-Message-State: AOJu0Yz3Uij8GCyNU7YQis5cPQ8z+2+yQaSp4WjMSk63NojOw/qkYJx/ /eBnXS0z9vWmoGOtdziUflkRUuWaUsTSYafvxBfVwyETcZbwu3ayjgU31hi3mUI8eBNLgYqjgKP Q X-Gm-Gg: ASbGncuAv4Gj93H4kUPZS9mK273QIKvMzZ7jByAiylxFGVWqCwV0TLTDuR8ySDWU276 /gBAqJSQdvXfzOoQWF18VimFkrffL2knaE2DYZmIZy2LCcvrGdASAmLH5zizuLmhLcTkTxFP1t4 km9xGJf0uB0nViQ1FQRjY1R/0vQUf/nQQXJOL/D4VBPMxi7mCAgYw30XIwYUdEXIgbgY7wjkWD5 MOUzEEOKVAh5DwP6tV5aAzMUIxsrnO8QTgKD08AbfPw3HVrRJy9PqcGe8etSdOytUp8o/tdcZ+B pV/9jiepaDQqXQPRmDKq8OBfjXNw9wfEQqzk+uYE+eQnkF10yR2APGol0ra22W4wrXiZTWyDhCk = X-Received: by 2002:a05:6a20:e18a:b0:201:4061:bd94 with SMTP id adf61e73a8af0-20444ebdf33mr839092637.19.1745455999327; Wed, 23 Apr 2025 17:53:19 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 057/148] include/exec: Protect icount_enabled from poisoned symbols Date: Wed, 23 Apr 2025 17:48:02 -0700 Message-ID: <20250424004934.598783-58-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/icount.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/exec/icount.h b/include/exec/icount.h index 4964987ae4..7a26b40084 100644 --- a/include/exec/icount.h +++ b/include/exec/icount.h @@ -22,13 +22,21 @@ typedef enum { ICOUNT_ADAPTATIVE, } ICountMode; -#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) +#ifdef CONFIG_TCG extern ICountMode use_icount; #define icount_enabled() (use_icount) #else #define icount_enabled() ICOUNT_DISABLED #endif +/* Protect the CONFIG_USER_ONLY test vs poisoning. */ +#if defined(COMPILING_PER_TARGET) || defined(COMPILING_SYSTEM_VS_USER) +# ifdef CONFIG_USER_ONLY +# undef icount_enabled +# define icount_enabled() ICOUNT_DISABLED +# endif +#endif + /* * Update the icount with the executed instructions. Called by * cpus-tcg vCPU thread so the main-loop can see time has moved forward. From patchwork Thu Apr 24 00:48:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883824 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3201832wrs; Wed, 23 Apr 2025 18:04:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWj9fLeqNhT3Y9Ri4QhU4a6LAZqj8dqSWUZEW9oe5NiGv/6xdKe2sk4swJmug/BerelwL1aBg==@linaro.org X-Google-Smtp-Source: AGHT+IERxT/+ISMZvpycVZ6j6yPTGWpIC29aDFB8T9Jw3kGZGMveL+5Ck+img2unGYUVGI9TLtad X-Received: by 2002:a05:6214:2349:b0:6f2:b14e:46e6 with SMTP id 6a1803df08f44-6f4bfbe07d3mr13213196d6.17.1745456642003; Wed, 23 Apr 2025 18:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456641; cv=none; d=google.com; s=arc-20240605; b=QaWMAUuBQbgicW2Rh9hsa1UlQT5CM4zP8u2Sv6Xra01N+nZGuk99fKCf/0oUN0+tyM 2eXL+0psTUwFqtGTNv2hCYnszH7gIJtWcuzFHe3tq1KeuPirNhu9PJlzEjH6DgJBW3bY 4qwCNfVPus8e3NZjNMoxhgqFKuFP3jFmbCMJz9pGxH76sPEoxhNKnwaXP45SGIWf6jDX yCwayfHHiR+TPkbZWSBwgJm3OXFz6hL0m61Jl/bdaakZesL2b2W/UfiWmv7cG6LaYRqs 04C4KSQH1m5BJSpsJj6DK6xUt5d4RoNQj2e9jQ3flasGpvUgurJ88BF2sz0gKQE88bwI Nflg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nr7dQ2xZvL2F3PC/UuWtMxSETtioG4RgNm5kcrKHZNI=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=eZjJTJJhODz/uikxyIRyJ+FRX9Hngqzl9TAF8NC6EbpxZUC2kAXQ5EIW+v3umwZc7I iPiBmBMsFmVgWgVadq0UaMtPAtZSgxhTlRObi1G/Qd9KU2jloUlGz0HdCvFhQ4eU6gGu ZVOuGlX/Hoyy6zSorM8SkcaOOUHJywv2jSXO7lS4fjIsMyvk+widYvs7dE3LDOGJ3q42 Nk8llimVfbuYJ1IG31LMHQjksYay+tqrv14WjWabY3DyBNCYdftcWkJdUJL9YDlAwRl1 WiFqPc9sSDzjKPGSD8l9FE7ns9uxtGuKFyxLEmv3pZDMITmWV2k0B+MRT+bwf4LMFWa5 0CEQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s1CKhxNx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0932617si3883436d6.117.2025.04.23.18.04.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s1CKhxNx; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kro-0006LN-Nf; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015O-Mx for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0: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 1u7kq9-0004iY-V2 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:23 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-739b3fe7ce8so396922b3a.0 for ; Wed, 23 Apr 2025 17:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456000; x=1746060800; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nr7dQ2xZvL2F3PC/UuWtMxSETtioG4RgNm5kcrKHZNI=; b=s1CKhxNxoPpLUyOiCcY4S2ZwP0lD5VJGHpaGnkKC3dlNM/LYaDjTnqqLxWfBrMXoyU e1TjXoWwaYpC8STmiJQ1wFjFhlO9hQ6nbM/c0v5z3/adwRGA0kx1eGyP358YBZXmRuDc TWqG8TYirNi128MWT8OXY00WQZwWWvHkT68e2eFpX8/IwQIOIswlhmG3+Kx0cZmzwD4j ADxUD37jiBJ4YxW5DH6fnUqvTzCuBUg0QpeI29s/L0lxz/6OXKWs+WVfy3vdfuOA5OiM YLQqsxL7A4o5wn+jwb+HLMKmCBNdQGceNWZYMT2d9WJ8OMlS6Xav2GZFm3l980s/4FsM 2Dew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456000; x=1746060800; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nr7dQ2xZvL2F3PC/UuWtMxSETtioG4RgNm5kcrKHZNI=; b=o0u7mOM98e2RjTAJ9pZXjIjdZ1PtI2jgT9mSsjkbxZx97vlu+tPxVhhcZ+DuloMOuX PTRE+x0qkTWnhAh3mkxbUjunk3dDkcnFJaNjlIDARmVjrjSDKV0TJ62kWXzde2Xx1yNp J51IKofWccHACXsJZURQ1t9d36pHxfLSdel1/V2b54ojK8ZLZ7bxwk0MYasLbNvPQKIQ kvFYLkDnOlb/SNRj3iIjpA2NewhVGlKd9YvrCf6F9cp7zD9XJgRASFDdVpvr6w8Gxw4M jWWF9x92UUJS32kRNtsMxTXRAuslutttlqcsufua0Q+07TKHrQOMZde/0HIBmbbQXU05 3kUA== X-Gm-Message-State: AOJu0YzrqbluyYKyr+8ugg0NeLo37zO2l5LkyspDS1oOo8nSe3TyTYQg 1hv41MNC4DfzJ0F7eK4LOhmM5qFROVjCg9GJnGEGF4VJblV6RZHoIzOoSYcLnYODswgD2ehwvDu 1 X-Gm-Gg: ASbGncsrWA5cZGOrBdlsb43b28HObiguevoV2WqALOfGWdcsvVKWE+RZqiJ4VNOmMXr BWOMQCJXyHulpbSflGbPfNVwk+uScntnKV2FkAO7VYauJg7lHKfbKSeUvaSu7xL29OAevfj9UaM nycjVGxtYsSUdYdxHBWktqXcbAo4EHFMwrLMW5TTa7DmJ6rGsDw91KcwjKQjGNBM9TB9z0TAEZl lSYmjkgLNgKnNaPK7mU52uLKCBq3Ph+gj8kvEkc+YdGY4EQxXf6ExyvpAGT41xA6ZH2D6ADRaSV yWdnIj2boxxUcCOQ+xBPNg5kTfG53l9Y78tuc1DXNyIdL1dHpE+mMdE5x2i7RvnsIITBJuO59AI = X-Received: by 2002:a05:6a00:4b08:b0:736:476b:fcd3 with SMTP id d2e1a72fcca58-73e24b0c0a3mr1161545b3a.24.1745455999991; Wed, 23 Apr 2025 17:53:19 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 058/148] include/system: Remove ifndef CONFIG_USER_ONLY in qtest.h Date: Wed, 23 Apr 2025 17:48:03 -0700 Message-ID: <20250424004934.598783-59-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This is include/system, so CONFIG_USER_ONLY will never be true. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/system/qtest.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/system/qtest.h b/include/system/qtest.h index 6ddddc501b..84b1f8c6ee 100644 --- a/include/system/qtest.h +++ b/include/system/qtest.h @@ -23,7 +23,6 @@ static inline bool qtest_enabled(void) return qtest_allowed; } -#ifndef CONFIG_USER_ONLY void G_GNUC_PRINTF(2, 3) qtest_sendf(CharBackend *chr, const char *fmt, ...); void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words)); bool qtest_driver(void); @@ -33,6 +32,5 @@ void qtest_server_init(const char *qtest_chrdev, const char *qtest_log, Error ** void qtest_server_set_send_handler(void (*send)(void *, const char *), void *opaque); void qtest_server_inproc_recv(void *opaque, const char *buf); -#endif #endif From patchwork Thu Apr 24 00:48:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883815 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3200212wrs; Wed, 23 Apr 2025 18:00:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUADHolMSaF1kDToSUGU7qSn6s1B0cdsf+zE1QIUAYLYIv+s0vpkYWHPFK9DK7qYPsVtx5w+w==@linaro.org X-Google-Smtp-Source: AGHT+IHJ9mY7RJXsO3yLBr6s4i8baGpbOv6gPhJSOeJu302fWpjuix3N2C7YsRSpdGeOJL9JTh82 X-Received: by 2002:a05:620a:2802:b0:7c5:9a6c:b7d3 with SMTP id af79cd13be357-7c956f212dfmr152891185a.37.1745456427704; Wed, 23 Apr 2025 18:00:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456427; cv=none; d=google.com; s=arc-20240605; b=c4zjcz44yuQ9SeuQ4NDQvhzLCCfdjdgtbiJriEWBGTTlBeyfqYgzqzwFKFiCIwbP/m ijUD08X4s7Nf9QJPdtDfAhzzpuP70pnvCWwiSUpbujvQzCHqJYVF9wkk4nZTFpmoEqTg YpIhHKkprxt2nlLoRKc63pgNvAd66gyZbjIHDDb+BqI4WZewi+yg4gRboxv1ljG9fEXB yJPQnmhbUvbdhr1k6hnGAUynPGVCX/B/UbBPy3+qVvGefezHyRuiEodopYW7MhrFndWF CQkZgQnAXAP+6WUZlJCQHBuBNE6bxjjzfCPRI7ClBSi1/VXk/ymEbuuwrc9VKq8/YANx eI5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z/d4Opsx2QmpRYGlTe7zbsmEBVXLmlU0lp+CJtYfxNc=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=l1PoVeegIV2h2Tz9UPo3em3UhZeu5HueW5khk00bADg4m6LABg0gUUotTFY/jXtF9Q Ccuppf6+allrSWy+D5DAL4oqQHlpaEb4usUNJcYAjR0CJsCUqCRrw18Mup0RWYgNeL7t cQ+iyAqctIrUHz+qYh1NX5BXxuvyu+tyifhSnKcNV/W8wSj87UvdkFVpw0NEdm2R4ZWG BqhN7oLsHG+wJDWmut4hQH16/EXEyS0UzfLxIKC4VvF7n46XXqCn3OG6JJWXCckrgm6O 5ILc8cIWTQAqOUBR268MY7iD6Fnpv/7Wz3vJh8LxB2/tojl9pDHpzjXlR8FOSfPEvPsB 84ig==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E9HVqo8k; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958d85fc9si19289285a.244.2025.04.23.18.00.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:00:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E9HVqo8k; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ks1-0007Py-Lw; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015Q-Sa for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0: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 1u7kqA-0004ij-Fc for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:24 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-736c1cf75e4so320543b3a.2 for ; Wed, 23 Apr 2025 17:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456000; x=1746060800; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Z/d4Opsx2QmpRYGlTe7zbsmEBVXLmlU0lp+CJtYfxNc=; b=E9HVqo8ksu5mNsYCNI7lpHesxBnQO42dkyDQM1CJuU7keaGolWKZYyv5XINiOC3qez oUMAc+ec4r3hgrkRYpXII5PcnlPfbLaPjE0J8clzUYf4qQwHGELtYma237KzRsWk6/LA wi1n/tHSpujQZSenoJYE4LU/D1WJtPoAMuT2FTCKw1dBoqQeiMMojG7YWDq7c2C7E40p p5pV7aS1ULkRJyF/SAvk0AH4a07Z+np6R7yXtH0bm6R0C2XUTvll9VpM26GUmEW0BXFY J74dluTauhREbd1K3UQjlinFNXUStyZuyj3VxJTTmo5PwK8a5sovC010Zz906wg2pZo8 WmvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456000; x=1746060800; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z/d4Opsx2QmpRYGlTe7zbsmEBVXLmlU0lp+CJtYfxNc=; b=T5DseCPvz10C4ienPMQwdMT03nJPzFPrGZFnbjxody542CGNSa6dQ+xxBY3VmlE1Ow reyD+yscodALroVue7wRXk9+HStUFjgSGnDZmnU1X2d0t4W7khBeTHwbPMMEZI63vSwl bZPXTlZOcO4j6J2Qjono+sfvII3+qWmEdVXfjxa0kkg2t4Qq+IC5IHx1S1pTHN7ZoUA0 +oJeW9uFjbN5Q+EjV8RRJvRFBchdvj4ZKtwgs07l1khU8dvYjl3tUVAvfO3iUM6O8712 gBZiAtzNdtynl5I+Cm19Lo2u8niKhTZRf4iaL+ZFPe5SuaHLFXiYz/BJo9pg44ViOuIz KBUQ== X-Gm-Message-State: AOJu0YwcqIiqC0ddbFNWq5eCBd1jYE0RCcMs3rgw3hsKfo8QZygpi1kT IamOUp5QJ3F/nXklehznvR4DevvHl8XOnwTosIGBsG+q88VoX6u6nC6YutMtbx7iHgucE9YnN1f k X-Gm-Gg: ASbGncsmenZO0QYq7AH7NUwtCdQakR8lRxhS6l950WPX0VAHNF+nexIOu3UnysVeIYy 12AchCVP0wpf8QGSYqclafnLGzdyhgR/K82rZMjUzpC3rxZaWElJaTb+kfJtJFqgjZy6rbvQVMS tWI7S5oTrNHt41xpD4HX1d/MzrUJhDVkW19mAM5lh00KSTf7o8CQP6vr5Paum/mhWvAyI0lBn3m K86mNezYAHyN3DNsh/s7/jd2mpME8m8JP2q7ae6exKNLHHXq4KIhU8b8iOOluSPIKf16ebsd5mB LvIH7aKf4T2IsMnh3YzZSle+Z8n8mBynlVlvB1hcF3Pev3qf++Wjyyf4qXa2RiKqfI0w5bLJz30 = X-Received: by 2002:a05:6a21:e92:b0:1f5:7353:c303 with SMTP id adf61e73a8af0-20444ee3960mr922711637.11.1745456000574; Wed, 23 Apr 2025 17:53:20 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 059/148] include/qemu: Remove ifndef CONFIG_USER_ONLY from accel.h Date: Wed, 23 Apr 2025 17:48:04 -0700 Message-ID: <20250424004934.598783-60-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While setup_post and has_memory will not be used for CONFIG_USER_ONLY, let the struct have constant layout. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/qemu/accel.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/qemu/accel.h b/include/qemu/accel.h index 972a849a2b..fbd3d897fe 100644 --- a/include/qemu/accel.h +++ b/include/qemu/accel.h @@ -38,13 +38,13 @@ typedef struct AccelClass { const char *name; int (*init_machine)(MachineState *ms); -#ifndef CONFIG_USER_ONLY + bool (*cpu_common_realize)(CPUState *cpu, Error **errp); + void (*cpu_common_unrealize)(CPUState *cpu); + + /* system related hooks */ void (*setup_post)(MachineState *ms, AccelState *accel); bool (*has_memory)(MachineState *ms, AddressSpace *as, hwaddr start_addr, hwaddr size); -#endif - bool (*cpu_common_realize)(CPUState *cpu, Error **errp); - void (*cpu_common_unrealize)(CPUState *cpu); /* gdbstub related hooks */ int (*gdbstub_supported_sstep_flags)(void); @@ -78,12 +78,10 @@ const char *current_accel_name(void); void accel_init_interfaces(AccelClass *ac); -#ifndef CONFIG_USER_ONLY int accel_init_machine(AccelState *accel, MachineState *ms); /* Called just before os_setup_post (ie just before drop OS privs) */ void accel_setup_post(MachineState *ms); -#endif /* !CONFIG_USER_ONLY */ /** * accel_cpu_instance_init: From patchwork Thu Apr 24 00:48:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883804 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199783wrs; Wed, 23 Apr 2025 17:59:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV+jhBWwC1SHRUV4+0yuYCW7Rr4S7qhf71M0HEMd8dZZeOaJmOj9C6XKYXRakUzZUUS/SnvWg==@linaro.org X-Google-Smtp-Source: AGHT+IE3Gkr2JIqotJAZWHPwJQoqwR1988Kk6bs+LZjwdRNu+nWyLwD2u3tDEf9fhX+3vYBphLsI X-Received: by 2002:a05:622a:130b:b0:477:1134:3ee with SMTP id d75a77b69052e-47eb249378fmr9834431cf.4.1745456345085; Wed, 23 Apr 2025 17:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456345; cv=none; d=google.com; s=arc-20240605; b=isfBYpB4osU1ZqACZQgbIE9G1vldEwFKfBdHTF3sEzHLkh/Hld208LcIpzyl8eowqG APAV83+yTBHFmnUxLV5Lc6Hv37l9kWDWDR4SRcaU06Oihr8iodRerchz11YuxDUbImPH U5WU7ima9wTjMP4zdjjonYXsAuvVZWEF+NcCOu3lTimg+hmHjSx5p+1yEqM3ZSwFrxzN eI4eOoxoHG6TjU7aBpUggqRnA9wwJmMVXkGxfLedA0oEKZDkrIK/lN0grWPnZqcjCqNU gU41SF09YL46BeV5o9awsRP4eI4xsM59LhQM5estp1gy/v8NYJwWh7nvzGPZyuFwexG6 MPJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=N/LWI/F8VdrNv0zLmIvQDUtowepeiN+2e5bv51DEBF8=; fh=NRbVEM4N+WnQUFmJW8uGobWq0XkOiK4QdifPqAAMoww=; b=ci8KwvxxXFuxdUyYvjQK7Gj6elUSpcS7iEeLnZyBRJX0AJ8ShdCc4hCFl2XcdOX/e6 sPOgPb2ARQyVTZofTT/hwk7dm6Qq6GCAYVGjW8aPDh9BG0gPZPeI0nqTP8coFlMZ+gJC YuZMw8l2uxhxwOAazaJHCcOBfkXQnXJSloZFWrvanTiCs222CSX0RDrK+BKy/dNZnLLI Zvb0AMCVR7bFNrB8HbQHI/YSK7vvjTH3QvNKXVVlL4l5DDqdRCuYWYaOwkh60pFR7PRG fy0dTwA3ltZxWt07tK2a/6YSbUWJXq1QwR95cNKnhROhTBVKXZKW00C3lyZr99oVOCtn PC4A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vPTGnB2b; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f2ca78esi5392971cf.15.2025.04.23.17.59.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:59:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vPTGnB2b; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krN-0003iV-TO; Wed, 23 Apr 2025 20:54:38 -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 1u7kqX-00015R-Pm for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kqA-0004ip-QD for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:24 -0400 Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-b0b2ce7cc81so375035a12.3 for ; Wed, 23 Apr 2025 17:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456001; x=1746060801; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=N/LWI/F8VdrNv0zLmIvQDUtowepeiN+2e5bv51DEBF8=; b=vPTGnB2bhpozCVRyRfwMQXR8xnX8gHfiz1JYz6HUtFEcbRsHzO1OC5fZ610ctYHEHQ 3oG0jPogUIswU9wAWtGemTEpfS04XWjmpFoO29m3GNqT71EwK+GRUvSr4/VKjOoJ7UvA TCe5UqOg5ZzTLjveEBNpr94AtNMnjixmPHxYEPBJSG4LInZpANx+rSzOQ3rDCph8nA20 Dxe4EhoCXoqoRa54BnGRPAcH7pkvEN4jS6eo5nNe/eWQlCcIpwqBG7BtGZskcHCKtCyn kdx1boOBeF3G3lzI/ikEBi9IG9ZV3uMTKyl1Q+xK0htykvvE1m5Hu6wckJEMW+5HK2rR QQJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456001; x=1746060801; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N/LWI/F8VdrNv0zLmIvQDUtowepeiN+2e5bv51DEBF8=; b=mINLlJ98MNTnkMA2R8L/osj8qfGg5HYdD8aBFJsUDX0CXwEbwAaTfAu2pGx+lHtuLO +83a5cfqlKhU8WL8cr0UzHvQuA/h0spX5SNA8gMiKUmEDNvrCiBjMcF2jmyNeNbKIW4x ncygF1EyKft8FndZhgPMrxCTZDiHp33HfTWumpV8p3euIE546Eu23yvRksqxspLUSbKL QcGuNrxzyrs54JKA4w1ptpHDPJsa5tD697h8U82CfMT6FfD15hOX20iVJvU9FJ9N1KEm /W0QdecQjOG1ahPowxRg+Bl1yc/xw7dLcvh0KOO1Rx6YOhhW6hsG6LHC495orJi1k4BI 3/0A== X-Gm-Message-State: AOJu0YxMdLh1kcHV/rANfXqBcRe+ZfL9L25cTnQKietkGH2TWWRjcO4Y hQSRuBUEsK59Ih1Ja3mgYi8zfHFPNPIPPc/hp1mkTs1SRBv0TVoQ2uixagyIEuSWicHzn6FXrLf a X-Gm-Gg: ASbGncufVJDNxSNwjhIcAEHWoW4KMo6Git7NfFdhXGh6fm5aQTSpReyOmAWokKOg4Vw ugBE+z7wv57UK2ov5UtHFBT489WJie8gawmzNNVG+LVKcGtpZLIZ3urBhy5KpV9LEs+veKsBQLO JdVfVfpcSncObti+RIiZVcsnXyluImXPA7a4Bu0i3qzas3/ookA78Hbzzo16MELulQN2Pk/tQdO Pl2wtPpv3MVwRHbLMRlJABiXzjJp3/nWNMkdeR3cLuLExXmzGRPIF38kAzFlo8LRW0rjy4UFDXz tZ/s7xs2tefw19neQ0ODkLcZKds9WQLq6rvSSqHrAKman6DrAy44S/uKyzEZGdJgTWA7gz47CTE = X-Received: by 2002:a05:6a21:1509:b0:1f5:6e00:14c9 with SMTP id adf61e73a8af0-20444ee3970mr881665637.15.1745456001173; Wed, 23 Apr 2025 17:53:21 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Alistair Francis , Pierrick Bouvier Subject: [PULL 060/148] target/riscv: Remove ifndef CONFIG_USER_ONLY from cpu_cfg.h Date: Wed, 23 Apr 2025 17:48:05 -0700 Message-ID: <20250424004934.598783-61-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52e.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While RISCVCPUConfig.satp_mode is unused for user-only, this header is used from disas/riscv.h, whose users are only built once. The savings of 4 bytes isn't worth it. Reviewed-by: Alistair Francis Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/riscv/cpu_cfg.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/riscv/cpu_cfg.h b/target/riscv/cpu_cfg.h index 8a843482cc..cfe371b829 100644 --- a/target/riscv/cpu_cfg.h +++ b/target/riscv/cpu_cfg.h @@ -196,9 +196,7 @@ struct RISCVCPUConfig { bool short_isa_string; -#ifndef CONFIG_USER_ONLY RISCVSATPMap satp_mode; -#endif }; typedef struct RISCVCPUConfig RISCVCPUConfig; From patchwork Thu Apr 24 00:48:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883833 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202146wrs; Wed, 23 Apr 2025 18:04:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUIRPdMAre6GpSUAoFu5KEQBRjd0IdjnJFePdCJFtrVDOgCgzDSO8WitRcS7PM/W0KHAayODw==@linaro.org X-Google-Smtp-Source: AGHT+IE+579uB6p7I5Zw26DHoqR6RosDKFioddmZ7WyS96Ccgu9sa3Ear5F/xj/Ioq0O+mFQiAUP X-Received: by 2002:ac8:58c6:0:b0:477:4224:9607 with SMTP id d75a77b69052e-47eb2c9ef4fmr10368621cf.12.1745456690395; Wed, 23 Apr 2025 18:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456690; cv=none; d=google.com; s=arc-20240605; b=H8KwUQ3XGRVfPIvMJiAQ7L/Q4z6W1ND3o4a/xKtGSQ4KnVHMRJjhI09NeiZUsc4C0H N1VurlPrSPupVboBeMQcXCz+fvUFJEbQrKOmNmaYMbws2KAcHJK7O78K570A1YabPNPC 8GKeaVt7Ap4J6WwxJpI1GXqA9HKZGgX9YtCLOerAS0W0zmp6jR/tCvgJIA6P0qahfbB4 5s9XhbkaJXvHX7gUx4g+ChaOOyumwvuXeQpnWB5UZwgvp1P8pcLJZLJZDGlHA0bhoTwo FdJIpJG6q7SuQXfPF40PQaYPvQd2snLrjA7Y1cuWcsy3qs3eBSlJZBKtnqJK5ppVUD15 1TFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=43YpcfeoVoWWDUGo+tAp4Ol8hUTU+r+JKYk8jD3UJRA=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=FE8DXw53zXPydTvWogxG70n8/HSVHZ4NIykaQeKM7Vdr6UCHVhyfCILPffBMMmRcuu 7Z/3dcEmvbJMAnc2QOpNW8OIG/1OMBhOcxZmMdyxBTBrCElygWdoLjHSgm/uhZKQQN18 FNQgr8qfESGz+MM4gkx/DuY/UWOREuwbGhHIG55ZaK4TEUp6J5BDsXWwUsl70NKwWcbj A6j6mG+/O5V5ogQgMCS8Mdk26hH/GXx6ofUsKigw8BBJ7iyVWqQN6baIC28FuGn5R8C1 3TyrR9D2et72URF2p9JNow2uqe/wpYCWyF0xbjO3WTQ/uv4Ev4DD38mBV4V5XIYN6Kr2 qPiQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ucfo4Mvs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea2baa006si4946691cf.657.2025.04.23.18.04.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ucfo4Mvs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kro-0006Ku-Lp; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015S-MH for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7kqB-0004iw-B3 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:25 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-739b3fe7ce8so396929b3a.0 for ; Wed, 23 Apr 2025 17:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456002; x=1746060802; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=43YpcfeoVoWWDUGo+tAp4Ol8hUTU+r+JKYk8jD3UJRA=; b=ucfo4MvsS0/lkZnqDH3dSWPSHQV0tn1rOkK7HCvTEMJmzg3Xa1UjYStNTc7rKGlfea o3dRDbdhaM21/b79y7D8Wwn5xIPvatrSMkMvjRVhlyhx/CbKzVGLk7rKgP3OmcGlSu1m GbjIolOwcrDmboThjjFr+HgF+bwSRIp8Zose8YbuICL2qw387chrIjgnv+Qf4iUXGdzx +sojyHXkUEGUKwB+uZLpguzMHFUim8fjCFArGsBGlv3AucKgMynCDYo3SMBHk3zlvHAW qr272q/LP7WcZsVVp/6q3bwKdgSKGUeeHSX6DQ/6KIhFDzg1Rt91shfunJy+UF3kJFKf dMyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456002; x=1746060802; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=43YpcfeoVoWWDUGo+tAp4Ol8hUTU+r+JKYk8jD3UJRA=; b=QhDtoe+GWnOmYRz5FsPoK2MdzBTTFCOO42EijwKjIvHFSGBLqWKeGlqICh1QQLsIm1 YlYa80DJrVTGJCnWB9fKSvsLl9NeYdF9nA8gkY60m5NWVomouQxzGMYxD8ekB/0VeWtH dtx91jRLcSJFFlRU5lVuKyjsW9fadsxbS0dB1KDY00c6m3imavUwxhNekgKWGMGtu9m/ LbcVPHpcz3J8BRAQDgDbhCZwxJWFF/5lVhy9Tf+rhslxRFqp+s7bmmRgsoKraMcSuBCs Ce5DD1MgWSTjAjA0mZRB/uEgX3lzCs+0doanhR3qaEeR+6XC+yy5y5ZaM8Ewt3/LvJ6z dTWw== X-Gm-Message-State: AOJu0YxlnHynjTxT+a1LGtIgcX6/Jkzd9OkOzZ4zTofZfVuDtEiqwPdM ptFKn5w/oh/o5Y6vl+sVN75U8o/yxieuiDMzNW9+11Izjx0apo/yAECNTIpn7IynOZ4QOgzJkka z X-Gm-Gg: ASbGncuHdpkZGIutJHFy7QSp8iRk0fY0B6e3sfLl6FehlCKRFnBew9xQdmORpTyBqoQ amh35itoGT0EJNzANaZwNxDXKS70tpBwbA5wEgk/aTyzs1nGwax73SDkldMBpv5gdYZXoWct1oZ xhqbPB+HUDYHH6CcZ/0vrDOv34NhOtxge4q0YirQJNo18seCSr9u2VlIQrjXWv6z4IFe9JJP+hi BqMQITxhSKW49UEjBUf3AO+PNbQt38AM2RZiO4+iB1sCkt1U9d/Ac2WkWm/2g9q+wKXNdW58AjR vjQQUzLIxQOvsiKct4aZu4P0y3Dvuo89QWh/bXOcnMBApclKwOjTDK+OZDzB5ATianhCO2KmpJY = X-Received: by 2002:a05:6a00:1150:b0:730:9801:d3e2 with SMTP id d2e1a72fcca58-73e2460ecd0mr1183724b3a.8.1745456001799; Wed, 23 Apr 2025 17:53:21 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 061/148] meson: Only allow CONFIG_USER_ONLY from certain source sets Date: Wed, 23 Apr 2025 17:48:06 -0700 Message-ID: <20250424004934.598783-62-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Poison CONFIG_USER_ONLY and CONFIG_SOFTMMU unless the compilation unit is in specific_ss, libuser_ss, or libsystem_ss. This is intended to prevent files being incorrectly added to common_ss. Remove #ifndef CONFIG_USER_ONLY / #error / #endif blocks. All they do is trigger the poison error. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/poison.h | 5 +++++ include/hw/hw.h | 4 ---- include/system/confidential-guest-support.h | 4 ---- include/system/replay.h | 4 ---- include/system/xen.h | 4 ---- meson.build | 6 ++++-- 6 files changed, 9 insertions(+), 18 deletions(-) diff --git a/include/exec/poison.h b/include/exec/poison.h index 2c151fd1e0..4180a5a489 100644 --- a/include/exec/poison.h +++ b/include/exec/poison.h @@ -66,4 +66,9 @@ #pragma GCC poison CONFIG_WHPX #pragma GCC poison CONFIG_XEN +#ifndef COMPILING_SYSTEM_VS_USER +#pragma GCC poison CONFIG_USER_ONLY +#pragma GCC poison CONFIG_SOFTMMU +#endif + #endif diff --git a/include/hw/hw.h b/include/hw/hw.h index 045c1c8b09..1b33d12b7f 100644 --- a/include/hw/hw.h +++ b/include/hw/hw.h @@ -1,10 +1,6 @@ #ifndef QEMU_HW_H #define QEMU_HW_H -#ifdef CONFIG_USER_ONLY -#error Cannot include hw/hw.h from user emulation -#endif - G_NORETURN void hw_error(const char *fmt, ...) G_GNUC_PRINTF(1, 2); #endif diff --git a/include/system/confidential-guest-support.h b/include/system/confidential-guest-support.h index b68c4bebbc..ea46b50c56 100644 --- a/include/system/confidential-guest-support.h +++ b/include/system/confidential-guest-support.h @@ -18,10 +18,6 @@ #ifndef QEMU_CONFIDENTIAL_GUEST_SUPPORT_H #define QEMU_CONFIDENTIAL_GUEST_SUPPORT_H -#ifdef CONFIG_USER_ONLY -#error Cannot include system/confidential-guest-support.h from user emulation -#endif - #include "qom/object.h" #define TYPE_CONFIDENTIAL_GUEST_SUPPORT "confidential-guest-support" diff --git a/include/system/replay.h b/include/system/replay.h index 8926d8cf4b..1c87c97fdd 100644 --- a/include/system/replay.h +++ b/include/system/replay.h @@ -11,10 +11,6 @@ #ifndef SYSTEM_REPLAY_H #define SYSTEM_REPLAY_H -#ifdef CONFIG_USER_ONLY -#error Cannot include this header from user emulation -#endif - #include "exec/replay-core.h" #include "qapi/qapi-types-misc.h" #include "qapi/qapi-types-run-state.h" diff --git a/include/system/xen.h b/include/system/xen.h index 5f41915732..c2f283d1c2 100644 --- a/include/system/xen.h +++ b/include/system/xen.h @@ -10,10 +10,6 @@ #ifndef SYSTEM_XEN_H #define SYSTEM_XEN_H -#ifdef CONFIG_USER_ONLY -#error Cannot include system/xen.h from user emulation -#endif - #include "exec/cpu-common.h" #ifdef COMPILING_PER_TARGET diff --git a/meson.build b/meson.build index 7e22afe135..657949326b 100644 --- a/meson.build +++ b/meson.build @@ -4050,7 +4050,8 @@ common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss) libuser_ss = libuser_ss.apply({}) libuser = static_library('user', libuser_ss.sources() + genh, - c_args: '-DCONFIG_USER_ONLY', + c_args: ['-DCONFIG_USER_ONLY', + '-DCOMPILING_SYSTEM_VS_USER'], dependencies: libuser_ss.dependencies(), build_by_default: false) libuser = declare_dependency(objects: libuser.extract_all_objects(recursive: false), @@ -4060,7 +4061,8 @@ common_ss.add(when: 'CONFIG_USER_ONLY', if_true: libuser) libsystem_ss = libsystem_ss.apply({}) libsystem = static_library('system', libsystem_ss.sources() + genh, - c_args: '-DCONFIG_SOFTMMU', + c_args: ['-DCONFIG_SOFTMMU', + '-DCOMPILING_SYSTEM_VS_USER'], dependencies: libsystem_ss.dependencies(), build_by_default: false) libsystem = declare_dependency(objects: libsystem.extract_all_objects(recursive: false), From patchwork Thu Apr 24 00:48:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883829 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202023wrs; Wed, 23 Apr 2025 18:04:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXDCsHthKGMf0dZzbUzdIQMtl6UfMomeIT11wHktYfRjEvC73hD8Gv/p0vEo5EjpVY7RwkmWg==@linaro.org X-Google-Smtp-Source: AGHT+IHPHO7/syNJz2Scs9WLCchkc2VgaktB+hjHvW+4iwElF+k8VopJImR9Ln4KYZmfB9huVu0U X-Received: by 2002:a05:620a:254a:b0:7c3:dd2d:c0e2 with SMTP id af79cd13be357-7c9585e1f7fmr72484085a.13.1745456671910; Wed, 23 Apr 2025 18:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456671; cv=none; d=google.com; s=arc-20240605; b=jIF3urQWq77X8JFGhpuwyRpnpADGfH9hf7RAv6zTlWKZr0wyrTo02oFNTXH11stUeO DziCqqdc6tgk+nRZ53Fi3KNbDWrWf3iybv9irT0LP6j387dgw7QqO2DEpuBYnlZpuaTP wzyJcR6ur1k/AYn+0OH/bA5jsrdUU1JqnFlKaik7VmhPBFGFftnUBr7MaPpdpZ1EctLT K9Cx+/6OUB/KCQhEVMjuLqdwfAZ/4jBPiH+96vwuy8r0LV4wzWwRWcZIuqOKJFIzINmV LFSRqBYXqaCMuoP7OgzeRlUvsmxqp3AS1YN984NJ+q3xyepXvUsEw62qFU3CcA9jNqRb PTEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ov1D5DRp2B1Vosai0+UfYupVFAv3Pz5JSReUzKCYE4s=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=BfInnx0BHaOGboualZJlfIkabwJUIXj6NErYpsPavryGSpNTm2+bK3hU+ASDcBecfv NChlo5CfZcmSzNDfj8+Yq1+gIditomNCtWc1DsvoXbkOTkokMgbfOkonGZcwakTCltXE R8l94Ipj3D8fUe2mOT50dLga4i3vcdohzoGbuR3rCCMffX8p7YrJy79m4t1oRR9Yse+D wi3ng+4u99/hdPwM+JKpJ59dlEQm/dW3RwmQh9Y8tEG0i0NsoVKbvKanVrIbzaxtkbp5 +vkwxDjY/QOh+9QBgNSR03/JqrtwtWTeRIbgQLszIbrc7QmrWllRaL5mkCXNAX3kjNDk 9Ihg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uKLQrOjG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ebf2cfsi20553185a.571.2025.04.23.18.04.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uKLQrOjG; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kro-0006El-1M; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015X-TO for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7kqC-0004j7-0b for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:26 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-7399838db7fso510857b3a.0 for ; Wed, 23 Apr 2025 17:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456002; x=1746060802; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ov1D5DRp2B1Vosai0+UfYupVFAv3Pz5JSReUzKCYE4s=; b=uKLQrOjG5yxJWNQfeCaFvtVzTWD/h+eUiyRuNS8N2cKV8vNi43LN5UuuspSX3T2OO+ LOw3y7Zb7r57SYlUnCt5DgDqkomtjEz9+v8wKYUSpva2RrLkQ2rwHnQdsYknp8gygZr4 TbUejk6pfP6Y5eRtCcN9Tvn/6JeWm5CLAdZTmeYjAp7h4dta36GahjKvkL7cjeXUmxYq 8kG6pspWnIPuXZ3oZHKsi6OErMLr8OQ+glpMrDFJpVT5A7nIqsADraL5yRNxXjv8PQeV SrhOPfpsy8D9GZw0/uLW7iIHfba49wBoJcDPW3GftUub3vR6ismirWRytHm/Gh9FtCIc aHkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456002; x=1746060802; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ov1D5DRp2B1Vosai0+UfYupVFAv3Pz5JSReUzKCYE4s=; b=lJPXcChSISz4oiWFL+DxTYrIG/0L2fogYpZiXeAYFz//xkxFW6IAR8x2u77kZntYLJ A1pCfZI1vbFQU9IOxF1EkRz7xX6JkvZllXd52JDkTNIziY4UFHTcovIecZYGdR2qfifk wtVuhCH2G04FM3k5II4pUS5SnE1tWCKRt0drxd4eGYYYLeSMHklLjNOWKr4rUmLTA4dB vvJjEbYnLOSnl3+tnTYArJAJmVp2MlxH9ndkH4Xi40OvQysjAtEtQLXYTGefWawEZCjY YjWHmIi2EbaDjtaZJQ6SKIPhAmTz84aESQpmAwStDwEULmHuY22UqxSczKaeA0j5Pls2 zLJw== X-Gm-Message-State: AOJu0YyJJgQzsTT1fbLdllhES9A6Riyk77sfvRwjRz/GU3753rKnGLuu G7UHS8mDFS5JK2ox15DUOVfCin/veOpuO5Rf5o6qWlzmsbXhDRQB0W5LB1jfWoFdpF0rQ/YmVLt R X-Gm-Gg: ASbGncsV0QCw24PYFSUq9/NQ0U0M1sLylyVuXj0/iJjdZxadKBuea5vzTMIbbmDUKGQ 3XcWU4rDnSNpupYJ1g7CMc9WWYLiwCuFVuLFim02mMDKfa2SCIFocbbzZ4TZ+5fZJYnly8+HSG2 TAIWzSfgbTVB4F9wWYtBC4lluhM2sDx0nFoH7EHxnea159dy59VYTl7AyvwekyKhi9lpjPPfdFA igT7q21fihmtfj/8almFlYwyUmrS0rUVkRvZtBeB9y7/qXGr6IoVxk3k0RmpFw22saKd/s51WRr 5HcGsOg/eBnsMZzl7nyqavkSpmQqRA7mKS+jUU9eG2t8mNqDpFkIt3ulczKkg9qSIxpKNHn5GNo = X-Received: by 2002:a05:6a00:1412:b0:736:4e14:8ec5 with SMTP id d2e1a72fcca58-73e268414d9mr535708b3a.11.1745456002434; Wed, 23 Apr 2025 17:53:22 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 062/148] exec/cpu-all: extract tlb flags defines to exec/tlb-flags.h Date: Wed, 23 Apr 2025 17:48:07 -0700 Message-ID: <20250424004934.598783-63-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250320223002.2915728-3-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 63 -------------------- include/exec/tlb-flags.h | 89 ++++++++++++++++++++++++++++ accel/tcg/cputlb.c | 1 + accel/tcg/user-exec.c | 1 + semihosting/uaccess.c | 1 + target/arm/ptw.c | 1 + target/arm/tcg/helper-a64.c | 1 + target/arm/tcg/mte_helper.c | 1 + target/arm/tcg/sve_helper.c | 1 + target/i386/tcg/system/excp_helper.c | 1 + target/riscv/op_helper.c | 1 + target/riscv/vector_helper.c | 1 + target/s390x/tcg/mem_helper.c | 1 + target/sparc/mmu_helper.c | 1 + 14 files changed, 101 insertions(+), 63 deletions(-) create mode 100644 include/exec/tlb-flags.h diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 4395fd08af..5c4379f0d0 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -35,69 +35,6 @@ CPUArchState *cpu_copy(CPUArchState *env); #include "cpu.h" -#ifdef CONFIG_USER_ONLY - -/* - * Allow some level of source compatibility with softmmu. We do not - * support any of the more exotic features, so only invalid pages may - * be signaled by probe_access_flags(). - */ -#define TLB_INVALID_MASK (1 << (TARGET_PAGE_BITS_MIN - 1)) -#define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 2)) -#define TLB_WATCHPOINT 0 - -#else - -/* - * Flags stored in the low bits of the TLB virtual address. - * These are defined so that fast path ram access is all zeros. - * The flags all must be between TARGET_PAGE_BITS and - * maximum address alignment bit. - * - * Use TARGET_PAGE_BITS_MIN so that these bits are constant - * when TARGET_PAGE_BITS_VARY is in effect. - * - * The count, if not the placement of these bits is known - * to tcg/tcg-op-ldst.c, check_max_alignment(). - */ -/* Zero if TLB entry is valid. */ -#define TLB_INVALID_MASK (1 << (TARGET_PAGE_BITS_MIN - 1)) -/* Set if TLB entry references a clean RAM page. The iotlb entry will - contain the page physical address. */ -#define TLB_NOTDIRTY (1 << (TARGET_PAGE_BITS_MIN - 2)) -/* Set if TLB entry is an IO callback. */ -#define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 3)) -/* Set if TLB entry writes ignored. */ -#define TLB_DISCARD_WRITE (1 << (TARGET_PAGE_BITS_MIN - 4)) -/* Set if the slow path must be used; more flags in CPUTLBEntryFull. */ -#define TLB_FORCE_SLOW (1 << (TARGET_PAGE_BITS_MIN - 5)) - -/* - * Use this mask to check interception with an alignment mask - * in a TCG backend. - */ -#define TLB_FLAGS_MASK \ - (TLB_INVALID_MASK | TLB_NOTDIRTY | TLB_MMIO \ - | TLB_FORCE_SLOW | TLB_DISCARD_WRITE) - -/* - * Flags stored in CPUTLBEntryFull.slow_flags[x]. - * TLB_FORCE_SLOW must be set in CPUTLBEntry.addr_idx[x]. - */ -/* Set if TLB entry requires byte swap. */ -#define TLB_BSWAP (1 << 0) -/* Set if TLB entry contains a watchpoint. */ -#define TLB_WATCHPOINT (1 << 1) -/* Set if TLB entry requires aligned accesses. */ -#define TLB_CHECK_ALIGNED (1 << 2) - -#define TLB_SLOW_FLAGS_MASK (TLB_BSWAP | TLB_WATCHPOINT | TLB_CHECK_ALIGNED) - -/* The two sets of flags must not overlap. */ -QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & TLB_SLOW_FLAGS_MASK); - -#endif /* !CONFIG_USER_ONLY */ - /* Validate correct placement of CPUArchState. */ QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0); QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState)); diff --git a/include/exec/tlb-flags.h b/include/exec/tlb-flags.h new file mode 100644 index 0000000000..a0e51a4b37 --- /dev/null +++ b/include/exec/tlb-flags.h @@ -0,0 +1,89 @@ +/* + * TLB flags definition + * + * Copyright (c) 2003 Fabrice Bellard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ +#ifndef TLB_FLAGS_H +#define TLB_FLAGS_H + +#include "exec/cpu-defs.h" + +#ifdef CONFIG_USER_ONLY + +/* + * Allow some level of source compatibility with softmmu. We do not + * support any of the more exotic features, so only invalid pages may + * be signaled by probe_access_flags(). + */ +#define TLB_INVALID_MASK (1 << (TARGET_PAGE_BITS_MIN - 1)) +#define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 2)) +#define TLB_WATCHPOINT 0 + +#else + +/* + * Flags stored in the low bits of the TLB virtual address. + * These are defined so that fast path ram access is all zeros. + * The flags all must be between TARGET_PAGE_BITS and + * maximum address alignment bit. + * + * Use TARGET_PAGE_BITS_MIN so that these bits are constant + * when TARGET_PAGE_BITS_VARY is in effect. + * + * The count, if not the placement of these bits is known + * to tcg/tcg-op-ldst.c, check_max_alignment(). + */ +/* Zero if TLB entry is valid. */ +#define TLB_INVALID_MASK (1 << (TARGET_PAGE_BITS_MIN - 1)) +/* + * Set if TLB entry references a clean RAM page. The iotlb entry will + * contain the page physical address. + */ +#define TLB_NOTDIRTY (1 << (TARGET_PAGE_BITS_MIN - 2)) +/* Set if TLB entry is an IO callback. */ +#define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 3)) +/* Set if TLB entry writes ignored. */ +#define TLB_DISCARD_WRITE (1 << (TARGET_PAGE_BITS_MIN - 4)) +/* Set if the slow path must be used; more flags in CPUTLBEntryFull. */ +#define TLB_FORCE_SLOW (1 << (TARGET_PAGE_BITS_MIN - 5)) + +/* + * Use this mask to check interception with an alignment mask + * in a TCG backend. + */ +#define TLB_FLAGS_MASK \ + (TLB_INVALID_MASK | TLB_NOTDIRTY | TLB_MMIO \ + | TLB_FORCE_SLOW | TLB_DISCARD_WRITE) + +/* + * Flags stored in CPUTLBEntryFull.slow_flags[x]. + * TLB_FORCE_SLOW must be set in CPUTLBEntry.addr_idx[x]. + */ +/* Set if TLB entry requires byte swap. */ +#define TLB_BSWAP (1 << 0) +/* Set if TLB entry contains a watchpoint. */ +#define TLB_WATCHPOINT (1 << 1) +/* Set if TLB entry requires aligned accesses. */ +#define TLB_CHECK_ALIGNED (1 << 2) + +#define TLB_SLOW_FLAGS_MASK (TLB_BSWAP | TLB_WATCHPOINT | TLB_CHECK_ALIGNED) + +/* The two sets of flags must not overlap. */ +QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & TLB_SLOW_FLAGS_MASK); + +#endif /* !CONFIG_USER_ONLY */ + +#endif /* TLB_FLAGS_H */ diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 613f919fff..b2db49e305 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -34,6 +34,7 @@ #include "qemu/error-report.h" #include "exec/log.h" #include "exec/helper-proto-common.h" +#include "exec/tlb-flags.h" #include "qemu/atomic.h" #include "qemu/atomic128.h" #include "tb-internal.h" diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index ebc7c3ecf5..667c5e0354 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -21,6 +21,7 @@ #include "disas/disas.h" #include "exec/vaddr.h" #include "exec/exec-all.h" +#include "exec/tlb-flags.h" #include "tcg/tcg.h" #include "qemu/bitops.h" #include "qemu/rcu.h" diff --git a/semihosting/uaccess.c b/semihosting/uaccess.c index 2e33596428..ccb0c96070 100644 --- a/semihosting/uaccess.c +++ b/semihosting/uaccess.c @@ -11,6 +11,7 @@ #include "exec/cpu-all.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/exec-all.h" +#include "exec/tlb-flags.h" #include "semihosting/uaccess.h" void *uaccess_lock_user(CPUArchState *env, target_ulong addr, diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 4330900348..8d4e9e07a9 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -12,6 +12,7 @@ #include "qemu/main-loop.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/tlb-flags.h" #include "cpu.h" #include "internals.h" #include "cpu-features.h" diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c index 9244848efe..fa79d19425 100644 --- a/target/arm/tcg/helper-a64.c +++ b/target/arm/tcg/helper-a64.c @@ -31,6 +31,7 @@ #include "exec/cpu-common.h" #include "exec/exec-all.h" #include "exec/cpu_ldst.h" +#include "exec/tlb-flags.h" #include "qemu/int128.h" #include "qemu/atomic128.h" #include "fpu/softfloat.h" diff --git a/target/arm/tcg/mte_helper.c b/target/arm/tcg/mte_helper.c index 80164a8050..888c670754 100644 --- a/target/arm/tcg/mte_helper.c +++ b/target/arm/tcg/mte_helper.c @@ -31,6 +31,7 @@ #endif #include "exec/cpu_ldst.h" #include "exec/helper-proto.h" +#include "exec/tlb-flags.h" #include "accel/tcg/cpu-ops.h" #include "qapi/error.h" #include "qemu/guest-random.h" diff --git a/target/arm/tcg/sve_helper.c b/target/arm/tcg/sve_helper.c index d786b4b111..e3bed77b48 100644 --- a/target/arm/tcg/sve_helper.c +++ b/target/arm/tcg/sve_helper.c @@ -23,6 +23,7 @@ #include "exec/exec-all.h" #include "exec/page-protection.h" #include "exec/helper-proto.h" +#include "exec/tlb-flags.h" #include "tcg/tcg-gvec-desc.h" #include "fpu/softfloat.h" #include "tcg/tcg.h" diff --git a/target/i386/tcg/system/excp_helper.c b/target/i386/tcg/system/excp_helper.c index 6876329de2..b0b74df72f 100644 --- a/target/i386/tcg/system/excp_helper.c +++ b/target/i386/tcg/system/excp_helper.c @@ -22,6 +22,7 @@ #include "exec/cpu_ldst.h" #include "exec/cputlb.h" #include "exec/page-protection.h" +#include "exec/tlb-flags.h" #include "tcg/helper-tcg.h" typedef struct TranslateParams { diff --git a/target/riscv/op_helper.c b/target/riscv/op_helper.c index 72dc48e58d..f3d26b6b95 100644 --- a/target/riscv/op_helper.c +++ b/target/riscv/op_helper.c @@ -25,6 +25,7 @@ #include "exec/cputlb.h" #include "exec/cpu_ldst.h" #include "exec/helper-proto.h" +#include "exec/tlb-flags.h" #include "trace.h" /* Exceptions processing helpers */ diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index 67b3bafebb..83978be060 100644 --- a/target/riscv/vector_helper.c +++ b/target/riscv/vector_helper.c @@ -25,6 +25,7 @@ #include "exec/cpu_ldst.h" #include "exec/page-protection.h" #include "exec/helper-proto.h" +#include "exec/tlb-flags.h" #include "fpu/softfloat.h" #include "tcg/tcg-gvec-desc.h" #include "internals.h" diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 8187b917ba..0ff2e10d81 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -29,6 +29,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/cpu_ldst.h" +#include "exec/tlb-flags.h" #include "accel/tcg/cpu-ops.h" #include "qemu/int128.h" #include "qemu/atomic128.h" diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c index 78cb24a8e2..249b1f6c4c 100644 --- a/target/sparc/mmu_helper.c +++ b/target/sparc/mmu_helper.c @@ -23,6 +23,7 @@ #include "exec/cputlb.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" +#include "exec/tlb-flags.h" #include "qemu/qemu-print.h" #include "trace.h" From patchwork Thu Apr 24 00:48:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883830 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202045wrs; Wed, 23 Apr 2025 18:04:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX2eR8g3WNf1bT5X8MlUcL0DlfJmXhs5LqATj6rlXKTdEehpO8qUTlxONa0x2NXrWiGR80YsQ==@linaro.org X-Google-Smtp-Source: AGHT+IE3YwqtBLcHh/fJaGNUQNnLv7haFMvnGxX/1cuK9gs58Lq5ZJXZ7GC6EM8KGivi+JSjeZMI X-Received: by 2002:a05:622a:44e:b0:476:923a:ca79 with SMTP id d75a77b69052e-47eb248ce55mr8816491cf.7.1745456675968; Wed, 23 Apr 2025 18:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456675; cv=none; d=google.com; s=arc-20240605; b=Vwa64ORgOjslCk5GT+S8nItzjSIPhUw/uTeXHfk2ACi2wegqSOumF3lzwPdLEyCXzj He9XwyriDISvJS85NafHDb/UPxcijW1zSuPf2gyQMRHKZd3CdVsSg64YCPa41HlraslC GpZvJdjLg0em3c1U+pfrO3znVACSScNmIcuo43H66E4H4rV1W+ETdL2uXn3sqfE1Qgvf md4tO5iA5tmuI9qNGVDEg5DYBBavmXNScW9sT8kdVP8lhJuKmX2b8ZSyhMw/NLsZjnvo VvmQlcNG8mTUQ1H0SXN9VP8/VyBeYrrHQM/5iFViucfBioV9g2ExhYLSOW/qEQS1BCQ9 i0kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QynRPoXJau8Yr/yoj90YDXHGDidiVD7zboFZXeEbo0c=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=lYJnRTWdBroZN2N6e2ErOsj0HY7TKZyhTx9gqY9KtxAUSBCBQYGelcBdnChwBPs5HX hR0z40YtBNvpq5IT0gEq0VPr5bh0OgmESkluIcXMMh9+iK3uJ1sLAEmCALgLqiw8Uhje z8zXkpULkuUfBRxqNgQ9Sa997jZvrPbS1sPfQczPwf/DSUxUbZVN8m4lE2xtSn1kgI05 EqiX1b0IWjaSzarTY0E5IvvvYcOk6K9j7z3J43tn8UBN84AZ8W9DKAROlzL8ScwRwpcX fEpJW6f7JQtg2s+tuBYKCVLxnMLnbGhwxlhDoMVjLNMxRLGI9W/BrMiW0kMVQGnq1NtX l0fg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WYBO7YrD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f9a254asi5160801cf.201.2025.04.23.18.04.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WYBO7YrD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krA-0002Q9-Mq; Wed, 23 Apr 2025 20:54: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 1u7kqX-00015T-S4 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kqC-0004jH-T2 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:26 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-736bfa487c3so302142b3a.1 for ; Wed, 23 Apr 2025 17:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456003; x=1746060803; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QynRPoXJau8Yr/yoj90YDXHGDidiVD7zboFZXeEbo0c=; b=WYBO7YrDiI3GhId9p0hdUT7a6+uwjYnoSJ3X2qxuYigxsOKJE5N8M8+FtOhGcUdoDL qz/meNqiRMLixAzme3Z1ilTffVUYEe6xiLjmvvs6qJV7wSPLJBO1BKeTOeqw/bJzM4xn g9t9kj8t6oo1Y+Gy0EJ5tIehNuJKlkN1wTsRyTI9ji5aE3JQqx4fxMUCTaqE7sY/AC9M pExNL68tZYMfWV11Po0hs1ZcDAJF9rAspq6CE49sRRgNYqY5Rjh+nkp7Wv941Lluvut8 nTtOhFRLOBhJUcYMTpLAVHnjObOfkbA/9RS465oEzZE5gY3INdfO5rIB01B4OmsdK7pR bxlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456003; x=1746060803; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QynRPoXJau8Yr/yoj90YDXHGDidiVD7zboFZXeEbo0c=; b=vccbxO9krC40d8JSjtqxJU+SjLpA6rAJ84/0+4VNh9g1W767V6tb0UbZxPExh7LiBi y2aAnDhm1qC1HihYg+aQECxs36nsgMUzVv4P9rINRwTSlLX/+NEZ421803CFngpLdzPP 9cShXeUbpjnZTquLWb+xcxK47LtQ6CLzJARmSyimmvxslmNzUlvJBmSq4fHPKKIhEQ70 1NVVo45k0MBBM1JE/E3sVBrM1FjIZJb52TV8q4FtHrNRvARcSSP4JUh9S7WCZWCS9S77 H+LtWtqybA7XNPhYN6mtim3KWO+UZNlmqWWkhYtSYtbrKPXkX3Uxixi9Bn1MiGi61/+E 67KA== X-Gm-Message-State: AOJu0YxvcuqMq3VcEN1hJSNjXVL2QWb7I5SK3GkYTgI2cS6rr8rrytZO MvLVq+4GhFIKTlNl8AHNGl/kTNg4hDhjY1t/S1bHIlnkBEQc2SFqEVJizfG/p7xxjiYlGAiBcOy T X-Gm-Gg: ASbGncvAWBuHgSkZdoaHmjaEw3AA4xx17srDZzubvc5hQAJMsvyejEwz0dwB5KtD93w IBYdwfJWlBj6A+n+Zp3i/jzt1WlkQwJV0MhSAWrE1mudnXdNQstcAhV4V5mWetRLxMOrW9Pj0kz Q2yjQj2T5+4OuEI1js+UbX8+bdYRDrg+48OitpP+/AWd9kn/iB52xg2+d0kBgWfJzmnaj69qwiG LId6984Qg4FaHoFI/SLlXYkeO7iI1+A6UgqWoov162mOvCD20FUUKDz4RUOHxksyU+hz7NgsNOs pOB5pfo+k5B0kJR/+tPJ35UI3n0p0EtWooy+al6eY81du9p7QHTpS7fTS87gJ1CfoBmbUny2jM4 = X-Received: by 2002:a05:6a00:3a26:b0:736:34a2:8a20 with SMTP id d2e1a72fcca58-73e24af550emr1028670b3a.21.1745456003243; Wed, 23 Apr 2025 17:53:23 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 063/148] accel/tcg: Fix argument types of tlb_reset_dirty Date: Wed, 23 Apr 2025 17:48:08 -0700 Message-ID: <20250424004934.598783-64-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The arguments to tlb_reset_dirty are host pointers. The conversion from ram_addr_t was done in the sole caller, tlb_reset_dirty_range_all. Fixes: e554861766d ("exec: prepare for splitting") Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cputlb.h | 2 +- accel/tcg/cputlb.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h index 8125f6809c..03ed7e2165 100644 --- a/include/exec/cputlb.h +++ b/include/exec/cputlb.h @@ -31,7 +31,7 @@ void tlb_unprotect_code(ram_addr_t ram_addr); #endif #ifndef CONFIG_USER_ONLY -void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length); +void tlb_reset_dirty(CPUState *cpu, uintptr_t start, uintptr_t length); void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length); #endif diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index b2db49e305..10090067f7 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -912,7 +912,7 @@ static inline void copy_tlb_helper_locked(CPUTLBEntry *d, const CPUTLBEntry *s) * We must take tlb_c.lock to avoid racing with another vCPU update. The only * thing actually updated is the target TLB entry ->addr_write flags. */ -void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length) +void tlb_reset_dirty(CPUState *cpu, uintptr_t start, uintptr_t length) { int mmu_idx; @@ -923,12 +923,12 @@ void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length) for (i = 0; i < n; i++) { tlb_reset_dirty_range_locked(&cpu->neg.tlb.f[mmu_idx].table[i], - start1, length); + start, length); } for (i = 0; i < CPU_VTLB_SIZE; i++) { tlb_reset_dirty_range_locked(&cpu->neg.tlb.d[mmu_idx].vtable[i], - start1, length); + start, length); } } qemu_spin_unlock(&cpu->neg.tlb.c.lock); From patchwork Thu Apr 24 00:48:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883790 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199123wrs; Wed, 23 Apr 2025 17:56:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXLEOYiOyVPVIXZ57hfc5w8ZL0v8qGLT/F4QFGS0X6iPmaRQJ5HlPxccggl+WSsCF/ABtKJvg==@linaro.org X-Google-Smtp-Source: AGHT+IHnzCp4vOKWFqT9/BfR0mP7IeU3ZxwaBiJUnSpbrqZ0vbjoezUnJiMkiBwD26/lH18SyMmx X-Received: by 2002:a05:620a:43a6:b0:7c5:3cf6:7838 with SMTP id af79cd13be357-7c956f4d035mr161856885a.49.1745456171309; Wed, 23 Apr 2025 17:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456171; cv=none; d=google.com; s=arc-20240605; b=BLHob+GxcAM/mbxJgaN9vzlRGvCOAudw2zi3pBACUumjknxlX8g5uHAqb8dB1B/DnE 2zrbAlZu8HG8tEd2A7gY2/mo8DACIItceOCK+6gRsLIuxjeteE83jrz3N2WsCrWkmBc+ Wqq3JEoiGOQmBV92FXhGKsU30dQFCgozqwvfyL+DF9HkMhfDJDS8ItF5xatzlBiaropO Ry2DqMFOxYtaQVIKCesDHvUZW/JthSLHTZd4eOUjjE8L2ZeN5hHQHpbMsR2b04E/IT1y VUJVpw4nsrvbXh/wbS+NAJ/r2kXIPd6ZvCfg7OvX2gAen01ijptPzNWApgZqspBeY8EH QMsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DaiqXvx8en6VCToTimGXoyGSBAmucTN+awgeSbs/f3M=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=hAuzIQqWdEIn77T1raXvvvx8BTfTMoxNRBVsIERM5EsYYs1n0kyIxtbvfBWQd6Trtv buNosaafLiIa3YvxrF2yHWTqTTSOpKU73SP46FdgeQYS0DkTigkg+DuyCH0qX4ZDeCmy NzOw0M+BxHeh5wqtusty/I1/M669QC1BQmVj9DQPbs+zgB435qI0aHYbQG+ZpdWqcJ3I DD/3b2e8pPKk2PdODpaHqL4WrjtTzeJzZe43VycV5alxAmt85UpugwvfDkB4SKndI5Xc t3DS5TbuNAhs52Wcrs2lJKHHxY0Dk95q979W9cIBmjZA2rpTP0ADpA2whqGLK7aVq96G AMHw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S6l6K39Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958edecb0si19151785a.607.2025.04.23.17.56.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:56:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S6l6K39Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kru-0006vA-RS; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015Y-QK for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0: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 1u7kqD-0004jQ-B8 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:26 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-739525d4e12so358367b3a.3 for ; Wed, 23 Apr 2025 17:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456004; x=1746060804; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DaiqXvx8en6VCToTimGXoyGSBAmucTN+awgeSbs/f3M=; b=S6l6K39Z0q4Y89w4InfOGK/o2uKD6gH5ezX23jC5KFUsXZd+j/kZifShOr53jWRHh3 T/epGCixYgqq4mCHtQWuvPaxr45yXoel419k573V8g/BLupcZvAOiAE2fAqayFNAHuLB uHI3SmmN+4fwboxLPw4466ybLjTdTvM/AzjjA7XLkI49/gqo2v1RScSmTXE25CFZEbT2 UZNxZSKIQHR01k4fnafHzrbajvn10Or8K4mKcodwI3k6dI9ZNWOHV5wey4e68DbCGZl7 3Qaa/LY3UH2QcRvORsehbIJW581zBEren4vdFiB7BkH/zvUHy81nVKWHUY/dzwDEJQlh bgoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456004; x=1746060804; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DaiqXvx8en6VCToTimGXoyGSBAmucTN+awgeSbs/f3M=; b=saYJD0O34tqKTE0F+gKYvxFK4rQa3E7/HRtPUzDn5ztGsff3iI8qhrqRKdHBGvRW9C T6r+kYoVL5RSpxt9ANDhj3LkE8ey39utPPBYL45s0Daa5ULUuGePrksV1UJ7VSNA4kKL dPiJ+3FpxGlkvHGpM77aInHgPVAwpMTwXyfy3YkAhiyDQLxEcwv+2jwyJX9TwCR8lPMT idZHrpvQRzP19gz8wqlLgrY+NS+cVy1yr30JjjINmivBObS7xXdaEsBooOi1/GT1xLO7 t2YLEl+d4L3PiV9utzvHiS8bRE5P8gukrXY4lXN2j4Wxf1Mv2ZbdGxBTgNppQp7vfZlY tUJQ== X-Gm-Message-State: AOJu0YwW1UoLQkheHmoSvtKtQWI2xKVOypkP/WG+4p8VBHOTmfNeN47T ui2Iv0K3UDWbXVldXMPJqjGga2yg9EfPZGFIgEThJGEYI8XpCyzjiVDsRIYRc3oGn0Wc7HVpxP8 G X-Gm-Gg: ASbGncsRj/Xkt0iHWVIpG+IAatJT2NweJTKTlWSIaqLgY9Hdn42jOiNhXbDMaqaCnXE J+IdhEf0rtJ5pwwAxA6x9uDuPoDjDJnXRGnW5OJ4HFkfeGFWz68qfYWSilhNNKY4seKEoGlkQml fbezmd+vXhiDqe5t1+VjWUiOpaWUSUvEPYShA7JKC3SZf1JcTi2Yfy7UXz4dLXmxYVSCpGxdgap UjermOd0DWkvealMOJgwlnR53mmNa0MHMeo/TJRL472UrBU59zWondSAbZMZSQaVrTdxMGMYQNy /8ncGvc9Ox/SIfFruRRVdCnYDoSfTPoQBr64CDKdoDLk2oAEDYrhuSGuBvNRyuxIo+i/pMT1yp4 = X-Received: by 2002:a05:6a21:69c:b0:1ee:c8e7:203c with SMTP id adf61e73a8af0-20444ebefb6mr916079637.24.1745456003870; Wed, 23 Apr 2025 17:53:23 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 064/148] accel/tcg: Pass CPUTLBEntryFull to tlb_reset_dirty_range_locked Date: Wed, 23 Apr 2025 17:48:09 -0700 Message-ID: <20250424004934.598783-65-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While we're renaming things, don't modify addr; save it for reuse in the qatomic_set. Compute the host address into a new local variable. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 10090067f7..5df98d93d0 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -882,18 +882,16 @@ void tlb_unprotect_code(ram_addr_t ram_addr) * * Called with tlb_c.lock held. */ -static void tlb_reset_dirty_range_locked(CPUTLBEntry *tlb_entry, +static void tlb_reset_dirty_range_locked(CPUTLBEntryFull *full, CPUTLBEntry *ent, uintptr_t start, uintptr_t length) { - uintptr_t addr = tlb_entry->addr_write; + const uintptr_t addr = ent->addr_write; if ((addr & (TLB_INVALID_MASK | TLB_MMIO | TLB_DISCARD_WRITE | TLB_NOTDIRTY)) == 0) { - addr &= TARGET_PAGE_MASK; - addr += tlb_entry->addend; - if ((addr - start) < length) { - qatomic_set(&tlb_entry->addr_write, - tlb_entry->addr_write | TLB_NOTDIRTY); + uintptr_t host = (addr & TARGET_PAGE_MASK) + ent->addend; + if ((host - start) < length) { + qatomic_set(&ent->addr_write, addr | TLB_NOTDIRTY); } } } @@ -918,16 +916,18 @@ void tlb_reset_dirty(CPUState *cpu, uintptr_t start, uintptr_t length) qemu_spin_lock(&cpu->neg.tlb.c.lock); for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) { + CPUTLBDesc *desc = &cpu->neg.tlb.d[mmu_idx]; + CPUTLBDescFast *fast = &cpu->neg.tlb.f[mmu_idx]; + unsigned int n = tlb_n_entries(fast); unsigned int i; - unsigned int n = tlb_n_entries(&cpu->neg.tlb.f[mmu_idx]); for (i = 0; i < n; i++) { - tlb_reset_dirty_range_locked(&cpu->neg.tlb.f[mmu_idx].table[i], + tlb_reset_dirty_range_locked(&desc->fulltlb[i], &fast->table[i], start, length); } for (i = 0; i < CPU_VTLB_SIZE; i++) { - tlb_reset_dirty_range_locked(&cpu->neg.tlb.d[mmu_idx].vtable[i], + tlb_reset_dirty_range_locked(&desc->vfulltlb[i], &desc->vtable[i], start, length); } } From patchwork Thu Apr 24 00:48:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883823 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3201697wrs; Wed, 23 Apr 2025 18:03:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWqRszMedRR9zr6kZRc0KGpKugP9WL2n7jG9lJPZHKV7FLsLFVXSSbjLZ743iK6Q+4hG9J99w==@linaro.org X-Google-Smtp-Source: AGHT+IFxgHCy3RD0/BPH4xITL4CZE0cmtRU9Tn3woMTtHODoDmcOvGLkH9Chgd/ut/DWxtJWXfww X-Received: by 2002:ac8:5a54:0:b0:478:de14:135a with SMTP id d75a77b69052e-47eb2d99720mr10697541cf.20.1745456610093; Wed, 23 Apr 2025 18:03:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456610; cv=none; d=google.com; s=arc-20240605; b=bv0SNLATsboYA+XsKwZc9ulRihb3mF6H4KzW6KOOrhXwPTWk6IuErhNju9KSOqzpir 3E7i0SRv/plV2R/2M93vi46+qChkAIYnrumEGRxbHV674QlrkOQK8llwxYq3TT5ewseh +6DdXpR12FirKUYmFCkStKXrG6FilPwXetsdJkvMaXewgg1c1nORAfcjygbbazQF4VWd V/jF3RuvYTcMp7Pym+Bxd0UexWNi+i216sEbtd/c0xMWoHIp9iXKR93w+P5dej5ey+jn ZB5cz3v5zGsXakh38zhWIm/ipWob3vnqVdggzUJcnRE5G1apMxfYojU/PVBavxZC2oFX VjxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xJajZrSf8/i/8ZotN5EXGfyCyGYwpY5Ucs7xI6zZ2dk=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=F2Q+hLSPiqaC03cVdBZEvIzth9w5eU0zQE4jSwwZvgDYASREizpGqNg9lFTi8N653a S3QkJRK6YmCfhi5vwv5/iXd6yCWoPN1SphKGkdGBMY6+aMJ1otQP42Da0Kh6bwh9/Qna 3YKR7bIjxN2iRfPEL4ur6izxU8y0heSLS01W8I/NqrhdH+tvt7kHHCvzMbMfnNPntqpv kBF+f+x2Syqwhl7aDpeJ0+nmXwLbfOqlfI0y8yTGsEFlvgF6gmy3ramKxA7IOKusJmA1 LXct1jLGed1O/09PuNpJ8J/aK9bZrE3tHj6vQOhtWA+xAUBJ1A6UxljgJ6n++MZY0NFF BLYw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rkumZSy7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea19931a8si5058091cf.279.2025.04.23.18.03.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:03:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rkumZSy7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kri-0005o8-CL; Wed, 23 Apr 2025 20: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 1u7kqX-00015Z-TZ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0: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 1u7kqE-0004jd-Pi for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:28 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-7369ce5d323so304564b3a.1 for ; Wed, 23 Apr 2025 17:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456004; x=1746060804; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xJajZrSf8/i/8ZotN5EXGfyCyGYwpY5Ucs7xI6zZ2dk=; b=rkumZSy7tMX3PUlp6NZy9RYDVsAwvfbJhcoJ6AzeyD+LqyGL3Sg4Re6GDcjaMJB5cA l6QXLAfBtmgeHOZ0PqEDwdzpjMg+xKi3GLwQ3HiQNFlNigqy9iOnkaz4KtLq6jsEUww+ jOiDtPB9eFX+U8OJxbLy0tHp3IxaKZ82kdFid2dscoYZO72tOXQQ3oZWNPF587cx1Ohc MxCvIY5CUeKZCkh35i7lyCoucRoksOHKCdoxpgyuOGdLelQ80oCHTCZQ4OQ+ddQcOx64 apXsP6kjbWk4LWoLIoTjrhDHLqU8xiZTZaHjeF+okORO2ajsgDrjj/5ZOOSVW809XWOD A2rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456004; x=1746060804; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xJajZrSf8/i/8ZotN5EXGfyCyGYwpY5Ucs7xI6zZ2dk=; b=DZh3Hp7aWGakOaPkS4YUMx9EcpcEUPNBhQXxYaK1lScEGeh/Bdq7OauUw1iTwHfKRH BqQ0LS3s68v60VroD5gS6LQJRkXJgJBdr/EHqD1ir3l3AkQ0lP4IoQyqstQjgPVwPH/m nAnu/j8I7glNwvLC6mcZimwjnSaNEgU70KYKAWBgLPINg8cqq5fkoCAbVEcnaHWIarBT 2fuMvbQ1X/H2pdBL5s79NCdQHbZ1b1ti7qAiVOTmhIkNewKGJfHByAAa6HQ0ov2Dbc+j 8Bak4g7e9UtICj1/xdLoFCQIhkuWaBqOTKHMkQnFOAdrGBXq58tehmGjoL5fXImVuHZI ofTA== X-Gm-Message-State: AOJu0Yzbfzud/H01skRvF+Q3K/RtP3oNPIo56ATJELjpeTBsYYgeHiPR O5q10LFzx7RH7YBYOvOtLOLW6Gsc4BEht3G8iycBH4XTpStwaWqVawbHdvzCfnh5mZ+YBrWuP4f n X-Gm-Gg: ASbGncuBAaDfWRhggaH6FPwDQiGoVyPJ+dHQGOqNnpbMjzuxcJU7X59ySuzNCqGZe7Z sfC2Mz4LhCoFqfgtvKiGvw9It27qYGPPET0/8sm0JqMO6fudJKdFCALctKTCqB9f3irc+IE9aMc cKkn+ZtG1WsnmZfKlg75E/AFS/0VW7C3L7nDGlMFB/grdibawUrR1gQOESZjoouJocZvtQYoMso 0v1EwMGbtEtO/kJcwh8HoPcmrnbXKarXcRc1CxI8utkxCFf1pArB2NEhiQiQmu8wXBpMFP/QWYg GbS6weJqpMgwDKjTHzwSMGU2EQRorSVPcWzIdcw9sPcTmp+U0tXw3odL9kh/Bivi5JoZBM435X4 = X-Received: by 2002:a05:6a00:3cc4:b0:739:50c0:b3fe with SMTP id d2e1a72fcca58-73e2461c8a7mr1224827b3a.8.1745456004476; Wed, 23 Apr 2025 17:53:24 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 065/148] accel/tcg: Rebuild full flags in tlb_reset_dirty_range_locked Date: Wed, 23 Apr 2025 17:48:10 -0700 Message-ID: <20250424004934.598783-66-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Undo the split between inline and slow flags before masking. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 5df98d93d0..28c47d4872 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -886,9 +886,10 @@ static void tlb_reset_dirty_range_locked(CPUTLBEntryFull *full, CPUTLBEntry *ent uintptr_t start, uintptr_t length) { const uintptr_t addr = ent->addr_write; + int flags = addr | full->slow_flags[MMU_DATA_STORE]; - if ((addr & (TLB_INVALID_MASK | TLB_MMIO | - TLB_DISCARD_WRITE | TLB_NOTDIRTY)) == 0) { + flags &= TLB_INVALID_MASK | TLB_MMIO | TLB_DISCARD_WRITE | TLB_NOTDIRTY; + if (flags == 0) { uintptr_t host = (addr & TARGET_PAGE_MASK) + ent->addend; if ((host - start) < length) { qatomic_set(&ent->addr_write, addr | TLB_NOTDIRTY); From patchwork Thu Apr 24 00:48:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883842 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202740wrs; Wed, 23 Apr 2025 18:06:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUP+q2jML+m80XM4puSminwyJbIzADLzY3Gp80OAcpm7qXL7FCuXcxZxGs+fVh5JsaOXEb25Q==@linaro.org X-Google-Smtp-Source: AGHT+IEXj+cBBlwlYnDE41jU0nfV/Xt+N6ZXBUBAovaEoqvG0L9jrG1+91Cwx0gf2sBqkK6CM4/7 X-Received: by 2002:a05:620a:270f:b0:7c9:2612:32d6 with SMTP id af79cd13be357-7c956f45b0dmr158848985a.48.1745456798884; Wed, 23 Apr 2025 18:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456798; cv=none; d=google.com; s=arc-20240605; b=StH5Oe32J2MvES9ovTW8RdI3EjaumLkb9IaKlgtkguiV6ZP3D3aGsqAKwnF7526gkk 7cYQfecYw7FYWZo6SNUVyZ+XN2Tao2G56oNrsDU/Sm+tgJJJ22RAM28JwuF9Gx5jGdRK NIO5mkpEFlRW72qLOYvSS6pxX0eChP/AMuSY1EEtZpKaToz7uH4QA7ZePix2hxweNEdr byjZ+SRFgngZlTeJQ+zndVP5RUillc6XfEs63jfefH+iymHgRz5oRz31eFddOfcaRP/j eU5LHp3PymQfkA9OSz8eOMj1LjnN/nhyK+R5kcHYde8wYMYaK3zCefeEIurw9owayHMb UN5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uOOwFzTm67uo3oPX6s2weGo0GWckaSTCY9AaRBdOnWQ=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=gNn6V3UtHrOwbNqI1Gfney77QTktcfj5qd0Vtt2EQfoJ95bxoNjKmqqUGjny44jK8I yw9T0N/OLw3MaLhszlqtx23NeUHqkVyRmK6PPSem7KsiXGJJ3QB65gGnMLbxwFMCCw+m ommPjhOLRfDj8LpSxAMIl7mHJH9A5SK6hBK8v9VchfqqTc9vq8J3/l1F1WRbk1GYis0g D/ZTB4zIxSYg5Xjb7bm7txO0L9LmH45sZmpijfNndqACZ87+tohMA4SZn5mlONvnCTjE FzQMXjqrCAUCZ9eaKqXoPcmkYbHVfKfLalddpgKEIMbu7+I3Mwn5BnFam/xAuj3h45sU ObwA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DevLiO5i; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958c9d425si24283985a.16.2025.04.23.18.06.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:06:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DevLiO5i; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ksf-0000cI-5M; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015a-So for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7kqE-0004jn-QG for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:28 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-736c3e7b390so369429b3a.2 for ; Wed, 23 Apr 2025 17:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456005; x=1746060805; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uOOwFzTm67uo3oPX6s2weGo0GWckaSTCY9AaRBdOnWQ=; b=DevLiO5iHiCoj/BkCmBtDp16WufjkcAYFDUZVxEvjxP1De1dal6FcGoUHa/UH8oB1r yEhrjac/pctmX7HfgQY0GfstXwAwmblr/YShOGC3R7AJjCtJcbbA5rNjT7IbN59A8Oa7 OrqjcRAXMEI/Xc+XdCh9tt3HtgjijeT3dsl6BTPOs+2c9Aiwrhx3tlwJY2+fLlaXqSfm f7KM6aKAZumryMSo2NvLzaHCbkjJZhN0z+2zXTpeG8oOFRZvduQFEGG1SDz+BOIoDy6q WwoWEl4Vl6tYdektAwxFv2OCk3PlpuCqN2NkGT1X0N36O7vQ8G49FpUN3g4NHS1AwWQ/ 18Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456005; x=1746060805; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uOOwFzTm67uo3oPX6s2weGo0GWckaSTCY9AaRBdOnWQ=; b=R13b4yMsQj4Kz0iwKjWeKecr+m2IG67BQ/qx63AaPn3SoOa+NJoDM8Z581yRq/oNC3 kFg+xsaDl3G7ekLhZXzRaBi6aG5tCHLDd/rm6UJUg7pOjT3/BtmRGJuBVZshu+QjAKwP jX3oWe1tZ4bpFXjMAZNbtWCpH6AHOPC+5NzeyGzlKvHRzjv7SWtxL6NAM4OIXWzfm+1f k9+eYk36/qGpxsSQnphprOg+n/Rm6UZoottuyJ/GFB+FzX5NLR2Jg7N7z4I459HgxgqX z9kjW0mFUfD7mFOGKSwt4SKgYPEdWLVYmgMAZyXHxdE29slgVJaXu/5++Kgot2XA76gT 7iiQ== X-Gm-Message-State: AOJu0Ywv/YCGSbbiHWSvrIGnyq8LXefrXhy/HCzanhWhOl+lxdn7d8sy 6JM86gefTjyr/yZe6sTt2aUAM5N/Ds/P0beX3Oq8rvQSOi7W5WxgGAW3cQeeoZHwth9mjxGSrsB 1 X-Gm-Gg: ASbGnct7fct0962435YXQZCbUVbDoZskSlo9TcZU+aCVDZLGT2/yzrO7MTjGazAjyrU 48C5TK7gbItorpALosR7y7LoW5TYArxHy7fMOXZ+5a/O1m4tHBr6jYo6IQk4WezCiKhv6awhzpt oxPMUFmolUdr1+Go1szy11+boudZPEfwuhjkZQJzjMjpzSxYeaBZUpUU6QUi5ewjYtXTtPk1dgD IAF46k50Tpa/rgOGOha6uMzhZc0BAuJX9da+cYU1qUKJYQnK65Le9eFzQwE7bdowMYf6s9VfnnD Gys49fkQ1KZw8pAhXJF+agBDXBw5uXQ5Nd0op0P2Hjj2UBYxIE4Mphgr+49K2pdqV68OgK/oNvQ = X-Received: by 2002:a05:6a20:439f:b0:1f5:8655:3282 with SMTP id adf61e73a8af0-20444fde923mr691177637.42.1745456005299; Wed, 23 Apr 2025 17:53:25 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 066/148] include/exec: Move TLB_MMIO, TLB_DISCARD_WRITE to slow flags Date: Wed, 23 Apr 2025 17:48:11 -0700 Message-ID: <20250424004934.598783-67-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Recover two bits from the inline flags. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/tlb-flags.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/include/exec/tlb-flags.h b/include/exec/tlb-flags.h index a0e51a4b37..54a6bae768 100644 --- a/include/exec/tlb-flags.h +++ b/include/exec/tlb-flags.h @@ -53,20 +53,15 @@ * contain the page physical address. */ #define TLB_NOTDIRTY (1 << (TARGET_PAGE_BITS_MIN - 2)) -/* Set if TLB entry is an IO callback. */ -#define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 3)) -/* Set if TLB entry writes ignored. */ -#define TLB_DISCARD_WRITE (1 << (TARGET_PAGE_BITS_MIN - 4)) /* Set if the slow path must be used; more flags in CPUTLBEntryFull. */ -#define TLB_FORCE_SLOW (1 << (TARGET_PAGE_BITS_MIN - 5)) +#define TLB_FORCE_SLOW (1 << (TARGET_PAGE_BITS_MIN - 3)) /* * Use this mask to check interception with an alignment mask * in a TCG backend. */ #define TLB_FLAGS_MASK \ - (TLB_INVALID_MASK | TLB_NOTDIRTY | TLB_MMIO \ - | TLB_FORCE_SLOW | TLB_DISCARD_WRITE) + (TLB_INVALID_MASK | TLB_NOTDIRTY | TLB_FORCE_SLOW) /* * Flags stored in CPUTLBEntryFull.slow_flags[x]. @@ -78,8 +73,14 @@ #define TLB_WATCHPOINT (1 << 1) /* Set if TLB entry requires aligned accesses. */ #define TLB_CHECK_ALIGNED (1 << 2) +/* Set if TLB entry writes ignored. */ +#define TLB_DISCARD_WRITE (1 << 3) +/* Set if TLB entry is an IO callback. */ +#define TLB_MMIO (1 << 4) -#define TLB_SLOW_FLAGS_MASK (TLB_BSWAP | TLB_WATCHPOINT | TLB_CHECK_ALIGNED) +#define TLB_SLOW_FLAGS_MASK \ + (TLB_BSWAP | TLB_WATCHPOINT | TLB_CHECK_ALIGNED | \ + TLB_DISCARD_WRITE | TLB_MMIO) /* The two sets of flags must not overlap. */ QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & TLB_SLOW_FLAGS_MASK); From patchwork Thu Apr 24 00:48:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883796 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199237wrs; Wed, 23 Apr 2025 17:56:38 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWTtCAdGiivhIY/AdLKnJfVUJXoxRlPb8yWyjqyKO4vZM6ecY86+nwYurKuoMAwb93XSjb55A==@linaro.org X-Google-Smtp-Source: AGHT+IFDy30MCYCne5sgvltc3VCYGPdhJhNZ/jMZPd+0zMy6uBDcBDsDUCHY/pJj26HITYQo6L/A X-Received: by 2002:a05:620a:1b92:b0:7c5:5e5b:2ff2 with SMTP id af79cd13be357-7c956f20bfemr140274685a.39.1745456197765; Wed, 23 Apr 2025 17:56:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456197; cv=none; d=google.com; s=arc-20240605; b=diaTPnEGgse+yykBVDZYWkLIVpSyf5D80WKGhk98LO1s3lScEbOqoIaMkYgnhNJ5+o CsU48PXbbh+tFxLGW2Rvj/JsTKnUcpiixtggOicKSt+PO0t0VRKvyNnaWlqKUyzug1HP HBXF10KZZ6gQdi27lDxEJOFlwNEdgyibxLYdZT60r+72w6BEUi0quWCW8H/STvttKH0B vc0WRXdhFGO3hCGsQQxjD74/DsGmqxtBzTrXoXP3mOn922BD2XAnpTrBgBb7V6W0LNFO koqxz5G43F/eTVASuJmhvV6RDLIjsxEm4JyijC6EnGoEFRjYew7Di9kiMh2dhGc2XbNP Y5eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tlaPgaqu+RlzrqR3gxsyz4cZtfxx2Xq8XD/b6ALmxlQ=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=Esrcjvg4Hjwa6My9qUKBu1+BB/7n2wnmyw0Fw/euhRJDmbGYeZQY8SdJ/DUdEyYntt O/t9O2eboQYFCIp9fMrA6owx50300h0km5+iTIInn4Sjm4Gx7UWzqqTBHyArdNBPGc3j DJ2/nMAz3SFzZhBRXPLew/SnYexd9aNwCrA0e1uN1miiOqYj81soKheTIedEuGP7FqnM ShDwNshxPEqI2YuQhB/81J/Srjl9sZPd5cRn0kZ4VOESTPNLAHQutcHPkvN3asvG44jS Eizxz2CdJ7DHeCXRwKFX19TqVYqv4oLL9RisF8A3q1P1c6k3HGjnpteE8GaN6iEq/aV7 addA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ioD6t+8o; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ee2482si19007285a.641.2025.04.23.17.56.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:56:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ioD6t+8o; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=fail header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ks2-0007Wp-4d; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015b-TU for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kqF-0004js-Cg for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:29 -0400 Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-af5139ad9a2so252104a12.1 for ; Wed, 23 Apr 2025 17:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456006; x=1746060806; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tlaPgaqu+RlzrqR3gxsyz4cZtfxx2Xq8XD/b6ALmxlQ=; b=ioD6t+8oNLjmL/6xIxjXBN+YYBI8qE4O+EqS/CAN1NN0U0Mqn0ZHkdut70Re5dp2d8 9CTdNY4WS93LFEad+JrHpNj5CJcOsioHEm98sQ4YkTT/P+b00mhiX6Tlep7y832ZTYRm p0k9mjubImw6jIdFU+Q2OBYM3WI3fEhQ2xI21fqr88uG9wp2rk+1Loe5oTI7JWM76x5a 3yXopKFD/r/RPIQGvyDtmS3W3QFPuYlg7wRsa0HnzjyUSOOgAmdoKTWmgQP3hTwPTJQT xvN91UnX6kEAjrWoZlXlnZ1SOtJqTkNfGPOqVXBibnWGa1wf5vVGapRWWW81v8QhoGLO s7tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456006; x=1746060806; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tlaPgaqu+RlzrqR3gxsyz4cZtfxx2Xq8XD/b6ALmxlQ=; b=I7G5yTaRM2O/q5/S+uPfXCXQz2oZDaf/0jLZrj37BYzHylrXlzOlEKlHM1Gs9lEP2J MiGiOxS9y83BjamHK4ZIs/p7Fme2cSmeJQ9AdmgpCkDnGVuE12eYLmL0rpG8bLcVYVcL DXYsN8HTscXJtHKPAI5IAmpSZOVcMQAa9MQogOWuwGmUl0h8ZXZc3MGv6SuAukek42yH EX3p0nqXaRkmbhznYOmvPlYTtgmu4NmgdbmpLw3QgMQeBUCSMWUCVV6wtwVIxcO4cqa0 5xg6PwHg11wCZJQIhxyeEviVbZY1vop+GuJB+X98MS2YcJQ4smp0c7eiPfBWHxrlHT/C eb7A== X-Gm-Message-State: AOJu0YwarnA/Jve5A4ZKFW6aDFHawTi0UFxvxPxMC6600NPhKpkSCiPd zDweS/SooNMbn1mwSbpQlEddD6e79K8Kg5T8zqxsRdjr8wUftdJXNj6obwAN27+WeaJa00gcNES J X-Gm-Gg: ASbGncu1Z1IWl601Au6+XjENA5AdUyif159FC0Cdw8/V9RsibEj4nlD1/ZJizwf2KLj 0hZF+c6U+QBJPKzTiSFSXKm3uiZ7xH5kyFEQHjMv5Hm8vZWBGZ6l3zN+tKpGoyol9+AL9CsQdW1 O7KC4Jsj8U6tw7Jy1V1AqB8c2BHy6pHr4oTrI/bdbJ4SS8Wv/dww/4Hcr5HbxcZrmHGdKCcrGQd BvICP7UqAZ+bJMRkiKgKktXKFxZLOGr0RfeEmZh3C5O8BFsjlm2zQ16+i9RZ7FmNrxyPAuNmp3g cxxGAtr7v8f/Ys6LaPVuxhFY3aBnDgI906de0eQkPbksa9GwcHGDz/oPnAri0q2O31phYP+nerF SFkRtONtfmQ== X-Received: by 2002:a05:6a21:3e0a:b0:204:4573:d855 with SMTP id adf61e73a8af0-2044573d9d4mr546203637.9.1745456005880; Wed, 23 Apr 2025 17:53:25 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 067/148] include/exec: Move tb_{, set_}page_addr[01] to translation-block.h Date: Wed, 23 Apr 2025 17:48:12 -0700 Message-ID: <20250424004934.598783-68-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Move the accessor functions for TranslationBlock into the header related to the structure. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 49 ------------------------------- include/exec/translation-block.h | 50 ++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 49 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 19b0eda44a..fcad3446fe 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -123,55 +123,6 @@ int probe_access_full_mmu(CPUArchState *env, vaddr addr, int size, #endif /* !CONFIG_USER_ONLY */ #endif /* CONFIG_TCG */ -static inline tb_page_addr_t tb_page_addr0(const TranslationBlock *tb) -{ -#ifdef CONFIG_USER_ONLY - return tb->itree.start; -#else - return tb->page_addr[0]; -#endif -} - -static inline tb_page_addr_t tb_page_addr1(const TranslationBlock *tb) -{ -#ifdef CONFIG_USER_ONLY - tb_page_addr_t next = tb->itree.last & TARGET_PAGE_MASK; - return next == (tb->itree.start & TARGET_PAGE_MASK) ? -1 : next; -#else - return tb->page_addr[1]; -#endif -} - -static inline void tb_set_page_addr0(TranslationBlock *tb, - tb_page_addr_t addr) -{ -#ifdef CONFIG_USER_ONLY - tb->itree.start = addr; - /* - * To begin, we record an interval of one byte. When the translation - * loop encounters a second page, the interval will be extended to - * include the first byte of the second page, which is sufficient to - * allow tb_page_addr1() above to work properly. The final corrected - * interval will be set by tb_page_add() from tb->size before the - * node is added to the interval tree. - */ - tb->itree.last = addr; -#else - tb->page_addr[0] = addr; -#endif -} - -static inline void tb_set_page_addr1(TranslationBlock *tb, - tb_page_addr_t addr) -{ -#ifdef CONFIG_USER_ONLY - /* Extend the interval to the first byte of the second page. See above. */ - tb->itree.last = addr; -#else - tb->page_addr[1] = addr; -#endif -} - /* TranslationBlock invalidate API */ void tb_phys_invalidate(TranslationBlock *tb, tb_page_addr_t page_addr); void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t last); diff --git a/include/exec/translation-block.h b/include/exec/translation-block.h index 3c69bc71a9..8b8e730561 100644 --- a/include/exec/translation-block.h +++ b/include/exec/translation-block.h @@ -13,6 +13,7 @@ #include "exec/vaddr.h" #ifdef CONFIG_USER_ONLY #include "qemu/interval-tree.h" +#include "exec/target_page.h" #endif /* @@ -157,4 +158,53 @@ static inline uint32_t tb_cflags(const TranslationBlock *tb) bool tcg_cflags_has(CPUState *cpu, uint32_t flags); void tcg_cflags_set(CPUState *cpu, uint32_t flags); +static inline tb_page_addr_t tb_page_addr0(const TranslationBlock *tb) +{ +#ifdef CONFIG_USER_ONLY + return tb->itree.start; +#else + return tb->page_addr[0]; +#endif +} + +static inline tb_page_addr_t tb_page_addr1(const TranslationBlock *tb) +{ +#ifdef CONFIG_USER_ONLY + tb_page_addr_t next = tb->itree.last & TARGET_PAGE_MASK; + return next == (tb->itree.start & TARGET_PAGE_MASK) ? -1 : next; +#else + return tb->page_addr[1]; +#endif +} + +static inline void tb_set_page_addr0(TranslationBlock *tb, + tb_page_addr_t addr) +{ +#ifdef CONFIG_USER_ONLY + tb->itree.start = addr; + /* + * To begin, we record an interval of one byte. When the translation + * loop encounters a second page, the interval will be extended to + * include the first byte of the second page, which is sufficient to + * allow tb_page_addr1() above to work properly. The final corrected + * interval will be set by tb_page_add() from tb->size before the + * node is added to the interval tree. + */ + tb->itree.last = addr; +#else + tb->page_addr[0] = addr; +#endif +} + +static inline void tb_set_page_addr1(TranslationBlock *tb, + tb_page_addr_t addr) +{ +#ifdef CONFIG_USER_ONLY + /* Extend the interval to the first byte of the second page. See above. */ + tb->itree.last = addr; +#else + tb->page_addr[1] = addr; +#endif +} + #endif /* EXEC_TRANSLATION_BLOCK_H */ From patchwork Thu Apr 24 00:48:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883857 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3205068wrs; Wed, 23 Apr 2025 18:14:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW5h9/oYr6kyBMpaJFMJt2KsuxxtQ0ha/wehdNFnDCs92k2oNE70NbbbNoDZs2XQwKU0kaEZQ==@linaro.org X-Google-Smtp-Source: AGHT+IH8rL1qfcCAtk/ymqVT8P+qGXrcHoZlVFTtuOENfXA4cHVv7ay5ZfwSQe2QTCvHji5p4LwV X-Received: by 2002:a05:622a:120e:b0:476:90ea:8ee4 with SMTP id d75a77b69052e-47eb44ad617mr10510201cf.32.1745457248545; Wed, 23 Apr 2025 18:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457248; cv=none; d=google.com; s=arc-20240605; b=T8oD9Tfwy3wKejBnBGlJNtbI0RPpn+qLcpAJrM0hxWELG5D1Q0xqkIVFuBATlx822z NVLXr9hYy+1GtsbhGSMyuCbcZTghBE7GNy/rIN0qHseJOfoTJTDh4hyUXI3ZeLiOmKrY VzwEpTKETVl2Jdk87LY5wyqVRFzEet0PVYewyC2gu5Mj0timPWh13FYAToDQ7fbMJ+8j HPQ9HYnVgBWlZe5Y0x53LybSdA3R+sVF7ppgw+l18OLJdcIkAp4OcAvldEijRE1DpYxX fB7ltKGpPTWxvnJ2EGKUXr7otyxXmKzSyXJ5taPnWAtZLRZ0cGwG4eljn1qEC+jBazNv QuFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kmSekyJdLD+byQ4wK17YzPBAZbfCl98xaVqmrAmqTEQ=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=QNArDBk36l0eZaVXII4wBTvcRaBSMwBgYRBDwCOnJytYOnR8iz9XTzpcZq03DqMqJ5 Q/Qr4z2qkJx2UHF38pJya8QYENoTl5OzmwuzWSqcF/GIpWU0/eKWcB/QFz8GIXIkVf4g yquI3/UFFnBOq9iB4YHCv263FYR53xNEKiRKpDq0KluL+be0WI49lqqMm9yIhIGpfvS7 KLiA7ujFAEja/BZ0Iqld7Xjlq3+Rx2Tbkoss3J1gZvAfIkF+y5Rr41in8y/DJoH1HNtl vBftYiYaCfjrr0D26ixbcpVp33kXPWdaLVWdLqxpnKafxNOu3NFfQj+RigYdOR1Llj6i sHJw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kYmeMnuM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1993753si5583431cf.331.2025.04.23.18.14.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:14:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kYmeMnuM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ksa-0000W9-1f; Wed, 23 Apr 2025 20:55:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7kqX-00015c-TQ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0: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 1u7kqG-0004k7-1D for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:30 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-73c17c770a7so477926b3a.2 for ; Wed, 23 Apr 2025 17:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456006; x=1746060806; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kmSekyJdLD+byQ4wK17YzPBAZbfCl98xaVqmrAmqTEQ=; b=kYmeMnuMuHWVt0X5D93In7IbP4dcUuRRlCqVuNY61iMlfysxZxbySpe+U/RdJ3B8A2 6t+D8uB+fqO41pazOsBo4UaPKU7B1dXoWJ2X/Mar5LGxePHnDCki9X2f11vyet/0MSkq zNTHjmbfcReMLPURAwaSDtISVsfotB/oBRYCdQ2QqKUG8JsuAK9WDCWyOzpgn4A7QNFK SebVZfegynE90oNXTVw9TrfI4o235obZ10hKnpzOf/aqMRYz8/UXWEEhnsUJNaTcawQc A2dB8uUxmL+/WgtjA9vxy13NZmlSSG3bgUhYkQ6Ohgq4UbsEgh1cLtgTjuERaB0ANM33 Qs0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456006; x=1746060806; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kmSekyJdLD+byQ4wK17YzPBAZbfCl98xaVqmrAmqTEQ=; b=jIaUjWQb3KYca8C6YhdzorMwOyrxdspM0tZvcfgbthvLl9fymVrjOBxD7JQDRja65U BAr7lm2TVmVAdn0Bs7cQbuM5RxDbtsQBiFaP98kXci9u+K0wOUpZjOmf9GnuJC1GzD3/ NVsrW9Cu9jMIHqsng5ISZgUdp237MhrYoiik5L7U0nXJLl+MVdTktj+rF+3w7fm4MSJv UzJ0Ox/78viWoRNK3cwWywjDTCuZprhvOHQWzJZ3RcGu9s+JIPOl/pWWGOdU1JdLMd6h VPIVKqUWj3ak4i9iYtKrf9hOG+VWKuXqdaUsr5WqJ+55yWbIQc8l2CKJSU2adJ41Wxxp g1Qg== X-Gm-Message-State: AOJu0Ywa9Xwhmf+q8fAsDW+5ZLC8HmjO0qEyMQzJE2AmfFlz7fsE+U7A AdRgy3YZM8QxmnfFCnQPd+WFGf6kUIZ2nwHj0+hLK0FsyAje+9rLNw/AkAbHH9epYnnjduvL77v w X-Gm-Gg: ASbGncv2LSFs1rlkhqywGIAKOR4mxQ6DceWOKxTCEn5X/N/JWZPSH+Qdl1X4DaFft3V gMbR+daWBDbIZX2s2cLdEr7Q3e7uPqXIvsFVDQq3ZKNmERG462o+Rwgep1ZW2FNUoUleT5sOcqk ScDVRVsO6NMLcmWcwJGHfSUTLEYt8hmzHlDgZFTmjjX8jBMdQiEvnj9kd/T5tEupMWyuqrtvmQL IgnChvjBqNfvWbKyiImvBVsPKigfqyxjaIctxHlY/GtgZp+SLupJFJScr3NbWKiKz1no8+dH5fO M+YBdYxIfbDjNHg6p6WzDT2YwRwwO5xZzPByoREPPIOFUdOfw44mnD4JR7YZIgM+bfnfQpOp/Xw = X-Received: by 2002:a05:6a20:d48b:b0:1f5:7d57:830f with SMTP id adf61e73a8af0-20444f8a679mr824547637.33.1745456006463; Wed, 23 Apr 2025 17:53:26 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 068/148] accel/tcg: Move get_page_addr_code* declarations Date: Wed, 23 Apr 2025 17:48:13 -0700 Message-ID: <20250424004934.598783-69-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Move the declarations from exec/exec-all.h to the private accel/tcg/internal-common.h. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/internal-common.h | 34 ++++++++++++++++++++++++++++++++++ include/exec/exec-all.h | 34 ---------------------------------- accel/tcg/translator.c | 1 + 3 files changed, 35 insertions(+), 34 deletions(-) diff --git a/accel/tcg/internal-common.h b/accel/tcg/internal-common.h index 9b6ab3a8cc..2f00560d10 100644 --- a/accel/tcg/internal-common.h +++ b/accel/tcg/internal-common.h @@ -74,4 +74,38 @@ uint32_t curr_cflags(CPUState *cpu); void tb_check_watchpoint(CPUState *cpu, uintptr_t retaddr); +/** + * get_page_addr_code_hostp() + * @env: CPUArchState + * @addr: guest virtual address of guest code + * + * See get_page_addr_code() (full-system version) for documentation on the + * return value. + * + * Sets *@hostp (when @hostp is non-NULL) as follows. + * If the return value is -1, sets *@hostp to NULL. Otherwise, sets *@hostp + * to the host address where @addr's content is kept. + * + * Note: this function can trigger an exception. + */ +tb_page_addr_t get_page_addr_code_hostp(CPUArchState *env, vaddr addr, + void **hostp); + +/** + * get_page_addr_code() + * @env: CPUArchState + * @addr: guest virtual address of guest code + * + * If we cannot translate and execute from the entire RAM page, or if + * the region is not backed by RAM, returns -1. Otherwise, returns the + * ram_addr_t corresponding to the guest code at @addr. + * + * Note: this function can trigger an exception. + */ +static inline tb_page_addr_t get_page_addr_code(CPUArchState *env, + vaddr addr) +{ + return get_page_addr_code_hostp(env, addr, NULL); +} + #endif diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index fcad3446fe..f52a680f42 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -143,40 +143,6 @@ struct MemoryRegionSection *iotlb_to_section(CPUState *cpu, hwaddr index, MemTxAttrs attrs); #endif -/** - * get_page_addr_code_hostp() - * @env: CPUArchState - * @addr: guest virtual address of guest code - * - * See get_page_addr_code() (full-system version) for documentation on the - * return value. - * - * Sets *@hostp (when @hostp is non-NULL) as follows. - * If the return value is -1, sets *@hostp to NULL. Otherwise, sets *@hostp - * to the host address where @addr's content is kept. - * - * Note: this function can trigger an exception. - */ -tb_page_addr_t get_page_addr_code_hostp(CPUArchState *env, vaddr addr, - void **hostp); - -/** - * get_page_addr_code() - * @env: CPUArchState - * @addr: guest virtual address of guest code - * - * If we cannot translate and execute from the entire RAM page, or if - * the region is not backed by RAM, returns -1. Otherwise, returns the - * ram_addr_t corresponding to the guest code at @addr. - * - * Note: this function can trigger an exception. - */ -static inline tb_page_addr_t get_page_addr_code(CPUArchState *env, - vaddr addr) -{ - return get_page_addr_code_hostp(env, addr, NULL); -} - #if !defined(CONFIG_USER_ONLY) MemoryRegionSection * diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 2ab081b95f..5f0aa9d56a 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -17,6 +17,7 @@ #include "exec/translator.h" #include "exec/plugin-gen.h" #include "tcg/tcg-op-common.h" +#include "internal-common.h" #include "internal-target.h" #include "disas/disas.h" #include "tb-internal.h" From patchwork Thu Apr 24 00:48:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883858 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3205241wrs; Wed, 23 Apr 2025 18:14:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVaHh1NpXSRyrILhPJhbm4ZNmnTtlCDfcXCP4DYOajmc7oUnkArMy2vjk96A56146ThcJSVuA==@linaro.org X-Google-Smtp-Source: AGHT+IEf1Z5hWqzqScE6STqPHLvQDq05rkH8vmQCXTsS2iob89zgJCxGNO47TkcrzTPRuGNS6ftA X-Received: by 2002:a05:622a:1495:b0:477:6bf4:4f5d with SMTP id d75a77b69052e-47eb2791c61mr7697821cf.7.1745457283231; Wed, 23 Apr 2025 18:14:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457283; cv=none; d=google.com; s=arc-20240605; b=Lq5XdDxv+nRd8MdRGQbKtqKrIfs7m1w8UEpA1P1LWiKY9GTwhWDkFpTgdZVhCKamTA mTmezBOwp0ag7cNr9XzE99u7usPJxV2raa3I453J2lTmxrD7axvqrAVmjHb/H0OEzfEc 7tytgP+pIw2PqqKutr2+PAZU9ibbMj2sPvRPobjX+cdi/gE9H3hbijIuvM0TA59XUn03 pTn+u+I2xznwUAjrMK204uLzxhhhYhnPUTj1qrarfUy0DlN8ELCP0CO4ppHG440mA805 TqDVUErC/AbGA7qg4cPXitBxkQzj5u5Bq662UjptS04xraPmvYVG9S316HS5v3mpLvch 0zpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FNsYq0CLsO6lFu+oOVVyImJDoiCdKLFU/pHo4cHTdc0=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=VnvLPbvx59RlKesKMj1UTMMM2IRIxHAxP0oVBXT1ZfQ3n0ESNnaMS26zs+fvHvwjNW Eqq6G+w5L2VcaMScTbpIZpMAPd1u8gjXfMclNURb4J4SZ7RvcTD+d2SiNGU3UoyHDRpX HXxSRsPMMVAaWFQcelUtaEkzJ75yuzcMiMZbbk0izSi9dvE7Hw+uuouYSnP8KiJxCiP2 b/C2lHWVy2JPi4iZVAA2v7FPy1DNJo5eAufuHm+py4lcri/hE6U7/dcDZ4Ipy9XKUmPv JUM3IxaZrO2lqRJdRgC9U4ZSYme/Lk8w1zThwvQwIdcGwDie9pVbKbgjuSwo9bXjFmru fc+A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="s/haL0KP"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea198757asi5131871cf.253.2025.04.23.18.14.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:14:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="s/haL0KP"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kra-00053q-Qy; Wed, 23 Apr 2025 20:54: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 1u7kqX-00015f-Mx for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7kqG-0004kE-M7 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:30 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-736aaeed234so340041b3a.0 for ; Wed, 23 Apr 2025 17:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456007; x=1746060807; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FNsYq0CLsO6lFu+oOVVyImJDoiCdKLFU/pHo4cHTdc0=; b=s/haL0KPcA6LsOe6TjsLJ9UKkGXCC6kTHIiGigpk5E8/1r3KfZJQawYmoxC0+edGvt o4B98tqGhauEGbRsAI75QXb02xcWiCasotJRGHbgxHFLOBMksJbKwTjEBluc0E5wfIWN AtjpYu7s+a6W12bVwbmJ84J9b02fXRBF2S7lCgRrRlxE9sxv1QHCaeBO/nCt8dKv3+2g tFwLtlzgtnqANrGcsM5/e2JhrKGJJwz1DmMigYXlGBP6D+6o4p8J1Ll7eWG7d7ryaA+N b1fdsFFp5TZigPE4SSGYTza3m4+PfyFYNUzEEBlvb3oJ2t65gaXRnTXbXSRP3o4irDpk yfnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456007; x=1746060807; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FNsYq0CLsO6lFu+oOVVyImJDoiCdKLFU/pHo4cHTdc0=; b=tYpuZEKlQvxluDSAlOCuL44XezL1b+2kP+bwWf9QL5rSjH1Xv2fDsO/ceS+KYZBcMP IEplPnkGQEnROgBagjq9V3FLvJpWuM5MgEGLVJoy2wJPdHmcRKtGEXAR3XD23V/TMCkg d7rNWstb3fsvuUNiVO8v/uZtUT3mRiQ3DaTUshyPkfhkP2zzDHg/0snC2jQfVZ0kwtFo 0aw+0jsg4/7vCEvuKfc18ssHAi4dZeSpbySj+e2Hjcmiihotn5SQUYTDMf6t+udHLQj7 SE/hg95G50D1rFeHvd4Y9IGMbXAFdh/14vgFXv4DfEX+06pD5HhwokMGJwtNVeI1a/mk yfTw== X-Gm-Message-State: AOJu0YypgxYtSrF3AsbYoh3rLNrnxBAIoAfhS5htj4hKz9qmFo1YrNer t2F7KaQ2SGMiPKoUcidjl8jIWdvuAra96OBOFMq1PWPzQSsYW38ddHs9Vtq1TukB+y+vs4hLC5M S X-Gm-Gg: ASbGnctuG1LaucNgtGCFrPWaFP74wlgsC2aRTGaBuxw79w/+QTQ5vigDIIut8O3MgTx EgGQ9ZJTDNfgTtOCpWEhD4xJjV29H8NAXRsSAcKGelM1jHLa52n07o9rjv6gwI0VhuXF85CIRZa hgVmVm3AIoiqT+9f1jBpkb+B8ddkSbpL5f+7Cvta8mNroYHNxRtMV49ppCzZg9ejEOdkCHbWH4h 0xjLO19qpDU0dqre0PyJ9N2ZaYGu7dwT5ikaa/Aql7HKHZYrOkIf3Zn+NQh9EcG/xjMvZhbK9/g WoLd5jlpbCCNbMf+mI/4LpPxkIHLSgZTKqFxh8o1XAzaCY6y39uDQEnAtU8Ex3o6R6r4zFQsvHs = X-Received: by 2002:a05:6a20:6f89:b0:1f5:86ce:126a with SMTP id adf61e73a8af0-20444fdbf4dmr926372637.40.1745456007089; Wed, 23 Apr 2025 17:53:27 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 069/148] accel/tcg: Remove page_protect Date: Wed, 23 Apr 2025 17:48:14 -0700 Message-ID: <20250424004934.598783-70-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Merge the user-only page_protect function with the user-only implementation of tb_lock_page0. This avoids pulling page-protection.h into tb-internal.h. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tb-internal.h | 11 +++-------- include/user/page-protection.h | 1 - accel/tcg/user-exec.c | 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/accel/tcg/tb-internal.h b/accel/tcg/tb-internal.h index 68aa8d17f4..f7c2073e29 100644 --- a/accel/tcg/tb-internal.h +++ b/accel/tcg/tb-internal.h @@ -51,28 +51,23 @@ #endif /* CONFIG_SOFTMMU */ +void tb_lock_page0(tb_page_addr_t); + #ifdef CONFIG_USER_ONLY -#include "user/page-protection.h" /* * For user-only, page_protect sets the page read-only. * Since most execution is already on read-only pages, and we'd need to * account for other TBs on the same page, defer undoing any page protection * until we receive the write fault. */ -static inline void tb_lock_page0(tb_page_addr_t p0) -{ - page_protect(p0); -} - static inline void tb_lock_page1(tb_page_addr_t p0, tb_page_addr_t p1) { - page_protect(p1); + tb_lock_page0(p1); } static inline void tb_unlock_page1(tb_page_addr_t p0, tb_page_addr_t p1) { } static inline void tb_unlock_pages(TranslationBlock *tb) { } #else -void tb_lock_page0(tb_page_addr_t); void tb_lock_page1(tb_page_addr_t, tb_page_addr_t); void tb_unlock_page1(tb_page_addr_t, tb_page_addr_t); void tb_unlock_pages(TranslationBlock *); diff --git a/include/user/page-protection.h b/include/user/page-protection.h index 51daa18648..d5c8748d49 100644 --- a/include/user/page-protection.h +++ b/include/user/page-protection.h @@ -16,7 +16,6 @@ #include "exec/target_long.h" #include "exec/translation-block.h" -void page_protect(tb_page_addr_t page_addr); int page_unprotect(tb_page_addr_t address, uintptr_t pc); int page_get_flags(target_ulong address); diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 667c5e0354..72a9809c2d 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -657,7 +657,7 @@ target_ulong page_find_range_empty(target_ulong min, target_ulong max, } } -void page_protect(tb_page_addr_t address) +void tb_lock_page0(tb_page_addr_t address) { PageFlagsNode *p; target_ulong start, last; From patchwork Thu Apr 24 00:48:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883871 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3206390wrs; Wed, 23 Apr 2025 18:18:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXGK/tIB+1uo09MozZCwAfo0EgVUjWsMfPH3E6DkmcX5nzu51nfoW/PpxzG8S7IBP+G3TdvBQ==@linaro.org X-Google-Smtp-Source: AGHT+IFWI6UzAj307LWMfnFlV/4Tvsau+WmPC2oKP6ZIvBu8cWNNBoT85PhldsoCQSBbVWGiMIek X-Received: by 2002:a05:6214:5016:b0:6d9:ac3:e730 with SMTP id 6a1803df08f44-6f4c0f4a8c6mr8274066d6.5.1745457494917; Wed, 23 Apr 2025 18:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457494; cv=none; d=google.com; s=arc-20240605; b=RFaqoF8W5BiiDB1mK4IS/Mbp1ezIG4Z3gDNduQaq8FghDuxZEhKoY2+6wAxvkVYTXq YUC3KHisjVUiuD6BPwyLq41aCBwjvv0Ya7yrIrQJWxLO3OiKkm0sbYiZnrtwK2MjhcXA bPKFWIKNA3ufz8ziu8oTYcMZJvUboJWsFys5N0QvoDse5x6+SDDfrr608i/kY5Yqkrpq DkiY8qw7OvKUpVi/2zec6YV6eui2nY7T8rY8LIj3Y+oWtUkaIF/aA/c5Dop6/OSOkqDJ u8+verfyiFYbyvmqipNUJYul2e3FX/dIoI/F2JvkSLKw071POKOBWUqIXa3fSOtwJG/K PnoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7co6UPbFs3UMGwvej1q9xVe8Zff5+JIEQHNAwr6+7ws=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=j6KlgakluG9nubpdpWKSW2dSvIrAqsaYw/siZCWL5NbzFgsR29U1R/x4h9vEYhvv8Q LbT11lp36e9JUbZWhUD6i57QVuecyfK3vLvEJ8jNtq6sWKgu4SWiWNSW0sjCvKq3LkZZ 4L9A7eTYbQSPOp5kg3K+VgXCyc6SrZrS6n56RYWoL4iHWKJT4sG4YByw/Zs2MY8W/Ckq apStxR5JWVlbwKOXFe+0XXqkSDdAROPxIHDaPywhkr2kcEMt1RuQYSkxlnt344c6duxf ei4eHByydmkjwaQZ+MOVqQvdrkTMWYotA/1LTTYfnssvuSmHxOss44Kdk4NqwfuJ3DyS ijwA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IPsD7zvs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0920896si3960116d6.153.2025.04.23.18.18.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:18:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IPsD7zvs; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ksh-0000nK-6i; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015g-Rx for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0: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 1u7kqH-0004kL-7n for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:30 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-7399838db7fso510879b3a.0 for ; Wed, 23 Apr 2025 17:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456008; x=1746060808; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7co6UPbFs3UMGwvej1q9xVe8Zff5+JIEQHNAwr6+7ws=; b=IPsD7zvsGnhgzz28sqU83Ag9hXqbcEQh90qEHRbqL5CFF8ZZL+IhyF+ASHcWQVo/qO xgFPNRpHFUDLCVPmj5omEftdYA+ZZwW6hDPn1a13UT01OJlD96Z8Cib/19/YJkgGL4JB 1zageu+l0Fp61l+Z/MuiHPeIsQAqwZtMZVr7sqGyb7oooc4ev6JxMpwClZX0Xzn0snE4 G63xpaB3W8JTdUYYNxqBPb9WS18+AYeZwag/zScwJl1eQmB5dGQVjxyQorp4GfweRZMj SUwrkeKHVaS4wPaXwlh3wjNwcSrkA/1Ke/lc33dFxTQGwaWEUYEuGyzWHmeIOcIaQrwb 1S8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456008; x=1746060808; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7co6UPbFs3UMGwvej1q9xVe8Zff5+JIEQHNAwr6+7ws=; b=t7mTKlJuCeTKPpqxihoks923Due8FXNSq0nscP7nycsySOrfjStGptG7aDVNIHc56w WuLuTE0UKnJvqaJ3QlZwfVB0Rz6sSxf2lIOiJoGKZTWkNHqTtC16VqC4R5ybNcqSDdNr UZMWdqO4wPfvd3rCpH3e/Wj5DQxFBDL64jxY5F5wMrnFy3JPkR8aLieyZbsapTTQxdgF oXIL6owSAdx9ZCUVTxGV5CzGDNIwKCbQ6sC9/IBXCoTqDZjuEfhVGu39Wv1CIWvp+ctx 9DHWJYpZdnYXo/vMg3uUAw6x9SSqwTpX6wmwhQvr4ZTVCUvMXWEYDva7Ta0D7wvkKldD udPw== X-Gm-Message-State: AOJu0YxecYUdx9mCe+TbtANEUPUy2Uw0WQI9ifhL/VnY3VinzEl69MHW PUftsVeawPbzY48LM1ZHjocZQjhH1QV1IDQ4RIalZRY409Rlcao7PkbgPXNVIs9EmWPMZN2O19f u X-Gm-Gg: ASbGnctaL24Umw7Z+D7kdNIV9fITaLRYlmXvUPV8NpxFCHWUQ4sOtI8Rjcryiew8lpK gaWe1RLfrqrEpw8BK2RitVUd5KghDttmcmd6GuRbDcPthqkYzkdyhXRLy5HB5gmb27UpL6bBFO4 pv866SVls1PgYYOZkEh6bvz4XddqpIggMo3f3SLxFcXgUgd0t6v5/R+2vMx1q5d8VpfP71SfotE oddcWmJeFYfElqY+Hpf1LYUuyTyhV1XlAbfpPEreRZkMQxnTZJO4ika5UJn5J1PG+KYPrjZYGQX FrEYTDBKxDRuY/nPuqSH53dY1AXsUaUFj5C6Jx2jOUmcwjd780ujkgxB5Hxncwcj3VP8dTM8aLY = X-Received: by 2002:a05:6a00:acd:b0:73b:ac3d:9d6b with SMTP id d2e1a72fcca58-73e267e7d8amr619471b3a.4.1745456007743; Wed, 23 Apr 2025 17:53:27 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 070/148] accel/tcg: Remove cpu-all.h, exec-all.h from tb-internal.h Date: Wed, 23 Apr 2025 17:48:15 -0700 Message-ID: <20250424004934.598783-71-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Not used by tb-internal.h, but add an include for target_page.h in tb-maint.c. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tb-internal.h | 2 -- accel/tcg/tb-maint.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/accel/tcg/tb-internal.h b/accel/tcg/tb-internal.h index f7c2073e29..f9a06bcbab 100644 --- a/accel/tcg/tb-internal.h +++ b/accel/tcg/tb-internal.h @@ -9,8 +9,6 @@ #ifndef ACCEL_TCG_TB_INTERNAL_TARGET_H #define ACCEL_TCG_TB_INTERNAL_TARGET_H -#include "exec/cpu-all.h" -#include "exec/exec-all.h" #include "exec/translation-block.h" /* diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index d5899ad047..df3438e190 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -26,6 +26,7 @@ #include "exec/page-protection.h" #include "exec/mmap-lock.h" #include "exec/tb-flush.h" +#include "exec/target_page.h" #include "tb-internal.h" #include "system/tcg.h" #include "tcg/tcg.h" From patchwork Thu Apr 24 00:48:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883837 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202255wrs; Wed, 23 Apr 2025 18:05:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXRHFbQyvKGhLKtVKeCwhC5EMMHKq1OrzTU8eaL6LKc0o7apUhWnZcL1sQmAiP16sORIX46KA==@linaro.org X-Google-Smtp-Source: AGHT+IGbjnPL/5B8jO7JhQwMEK0JkQbJdGdDLSI/HCLgtEu3C1Csvtqjx80jBBWafwwQju5pmxjx X-Received: by 2002:a05:6214:410f:b0:6f2:c94f:b12f with SMTP id 6a1803df08f44-6f4c0f4aacamr7594826d6.3.1745456708648; Wed, 23 Apr 2025 18:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456708; cv=none; d=google.com; s=arc-20240605; b=ByMdhM/Tu5kOrmXOx+PYjMoKMg7e6r6B4zxFw0Mk6D4OpvpXOusjQUYito6VfZJznd nBbZRt6majwwwla2JMQL78oWMLjVPDTkyRrnKPRYFojlS1ZkTVkW3Tq4yilOX97q2x8d lZrlN3bI2xaanjiw5K1iJh0zJ940zC6/1dHzfEdrWN4UJSpN/IelKL7a3V7xyVolNSQw C6BJIuJ4jSFK1HqzDRXlg6YXFp5dJ7USoLuKpQvfwCdBnILjTNVSbrASR+NpnR+p45az ZWwJMKOyMqRwWdzCPFcnD133ZvKHlZ8MYcE6H6bsqv+U/P/dEiBvAo/SYI9PtQn8zM23 G8+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BPrUJL2Wwt5H6m+qbEougiZhbCqsapatk+AvGECCLZ0=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=BMqapFY2KI8IsXoBcVLG4iToTBqpcsT9aATKJNuM9gXHFVXL+2M2R5c+Q4za3DfOLj x5VuOHAcLLemF20301wGVcn5evKBXaoapvT+ihatjHJv50/DnXZIW+3UPnSDVnbhvSLY Rnbzh+XFbnKrlgpmMUSF1pbzPkR7klWRgoL1obPRKP82p9PK01QEMNYqbxzBE3ksNw4J 6UYxkTK6+5+otLe4/1iyGwgIilodGFBu3Lsac7ndWZEOXUjHaJFjYGt+xQ00lkvQ7O2Y b47Lw6wqOqO09ERAn8ploOe7HJSQq1QIK1J8C132Q1P5dc2NI7ypVVxqQpiZvocnAxUK vnUw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ks3eqvYU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c08d26e0si3866956d6.97.2025.04.23.18.05.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:05:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ks3eqvYU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ksb-0000XF-PK; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015h-TO for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0: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 1u7kqI-0004kZ-0x for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:31 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-7399838db7fso510884b3a.0 for ; Wed, 23 Apr 2025 17:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456008; x=1746060808; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BPrUJL2Wwt5H6m+qbEougiZhbCqsapatk+AvGECCLZ0=; b=ks3eqvYUZMzCcUt3RbE4Q3zsn4ikueg8qpG71AE0O1is3ObmsxzzyP8MaBOZhq1iJV qUegXNSS4U+/6kjpxvbx0EVBbiRy87Rd4ygcChGKiMw+8SDpRhbdUBojDQp9p/tH56jt i4a/CjWr57gGvJNefke7XrNPZ1d3JXiyQthsBuF8Uf0r/iWfZb0SDaqBMDHmwBXENlgZ FLb9Fhjpcy1UOpNRV6M/zAQUxPyyUozaY6vtxDT/5fB3Kx9lzuIarx9uPti0XFLMyaA0 jhSE+k6kd3V42cJwmndLmbW6GNBFIpOVQUFOpUj6k/fhGhKwbsip4P39bOhfP3olQyG9 Shvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456008; x=1746060808; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BPrUJL2Wwt5H6m+qbEougiZhbCqsapatk+AvGECCLZ0=; b=RCiDSDWrCCs77QZkOG6iZi1l5NNFvgUYfaqDYsqG28jDiZs6wWWduj34tsqHEpGOOM O4MqukATRQObh5bPFaNpwgEL9/KuB9z+f1SjfT2iUnOpXM0YZV9uFFBjVUrZ/Qwwwte5 uofSopH7/Sh7bI13eCLSUFrWiJdfkkqeWg/zMN8VBrugnUyeKz9Ihbc4lniwlmhSbH21 xIaEqZlc4l0PtMbYVJUbtDit6wDroTY6+dCmWiP5UJFXzc10/jyKBRgv2kRRGEoSF6di tlbbo2MHhzPTcUssIez6ti1iKvdpR/fhlQenGODOiHYaLJaT0CAl33M4HNj3uOmooert zdYg== X-Gm-Message-State: AOJu0Yz3is8Rmra8txGiuJSJCsHOZmVYt6vjry+/ka6HatkCZbXhWvrO FtamSiMzS9KUhB7swKgXadQ1EGWOh1Dt2CdsewPO4o0BmkUyIfmwPnpgu8K0FhgajcDpyL9pi8t v X-Gm-Gg: ASbGncv4NRLr43p17/D4KiskSCizCv4jzUceNjWwPSFOWNl47tHDXdOaSO2kEBRojqV afU3NfQ41UKNnL2v7yR12FiiEnRIyt0vd2HuO6rJAae/g9WAg8TeosGP/ZMBisl2/M1YDo5zE8T koUiehq0tA+9cNOnfHTLqjwlTEipVURny5CNFTq+ToIoQLx8P8q55DBb2I6gkM35KmMmy5jRQvM AAjXvt4P00O7t1eFVQ6E2JfxRbkuC6OEcmCd2sD/lLqpntm2iAFIoh2mofKJWgSRvu7/QWSWztC UAmyP/bTqSEAXgsY/VldnPQZJ9jwpTLdVVQE88M+Lec555NRUpOMpIBnpHH8JbE3nqZ2dxuvGbA = X-Received: by 2002:a05:6a00:23d5:b0:736:4d05:2e35 with SMTP id d2e1a72fcca58-73e267c393amr618511b3a.3.1745456008322; Wed, 23 Apr 2025 17:53:28 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 071/148] target/rx: Fix copy/paste typo (riscv -> rx) Date: Wed, 23 Apr 2025 17:48:16 -0700 Message-ID: <20250424004934.598783-72-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Rename riscv_cpu_mmu_index() -> rx_cpu_mmu_index(). Fixes: ef5cc166da1 ("target/rx: Populate CPUClass.mmu_index") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401072052.25892-1-philmd@linaro.org> --- target/rx/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 0ba0d55ab5..a240b3b3ce 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -66,7 +66,7 @@ static bool rx_cpu_has_work(CPUState *cs) (CPU_INTERRUPT_HARD | CPU_INTERRUPT_FIR); } -static int riscv_cpu_mmu_index(CPUState *cs, bool ifunc) +static int rx_cpu_mmu_index(CPUState *cs, bool ifunc) { return 0; } @@ -227,7 +227,7 @@ static void rx_cpu_class_init(ObjectClass *klass, void *data) &rcc->parent_phases); cc->class_by_name = rx_cpu_class_by_name; - cc->mmu_index = riscv_cpu_mmu_index; + cc->mmu_index = rx_cpu_mmu_index; cc->dump_state = rx_cpu_dump_state; cc->set_pc = rx_cpu_set_pc; cc->get_pc = rx_cpu_get_pc; From patchwork Thu Apr 24 00:48:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883831 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202057wrs; Wed, 23 Apr 2025 18:04:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX7flH2LM3crnsIj2QSMshfZx7BAy03s/e6/2ezYKa2p2ifC41LelfLWfiJgkjIBuIl2ZtSNg==@linaro.org X-Google-Smtp-Source: AGHT+IE1zmxmE8qHLYOw/hdyLKGzt27ets45aDJ1BkqN7VwBAUTJJmaNkRJ0O8Xl+cXF3/t+OkpG X-Received: by 2002:a05:620a:d8b:b0:7c5:3cf6:782b with SMTP id af79cd13be357-7c956f3e86amr181825485a.54.1745456677643; Wed, 23 Apr 2025 18:04:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456677; cv=none; d=google.com; s=arc-20240605; b=kTUg7nEsZvON+K6TZZYb9Dq+NCxLQuQE01G568F87E6GpqIR/27etsrQWzF8fB8glR M3vzub1mUdBzdH1GkbUG3KjsC/wppwiaLIgRdjLHiAmTUNMhYdopw5CjzfJcQhrACTKB XjDK5SYw2Va9VRdMfPweyrSfoeTbYA4poDY0T1vZJrp2CU3ekNPMbBXtaUaN1Ild5Wbb 0kKWlQMlXInsY3VOlovmaYfWca98ot8p+luBx83AFQqaDmUfbykg3dSCncYGwrqkxHYJ kvsWTytWHUcXltJArTutz6qt/wLDDSKtEI4dkqE8hTnnsmZClNNN8M7JkK2e4HaMhVg5 2/pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KE33KBayr4dnRr7Xrs3VkN2rsoJvmDMI/IpM1PhpEq8=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=UJwQOQK84HnRic0SvnHLeEdW8lQDF5RcFfm/WF7gcvsfSVN9EeMxgpFHWY4yGau542 tuk9Fi4r95C99JSnouXJ/0mTup9IXXl43WTSASI32hir6oVh7y6x6O8rWfZp2po8iszc 60ncIBvVrwPiQNgB7eF8y9K4Kp2zkwIBGU/IVfKekxvAq/wJDMJrUfbVKrja/heSZoEM BZhGeVC8bxSWQI80Rjt1ZmG3dgcaK//f/KtXTqsEgB1NUnqUOTBYrLcLj0xe+mK76d9b 5UfWsfg39WjJL/DVzgVS/QkvMYJ/Q3BFKRWFJHTXh6wgX8QzOp0jwYqPXt23e5s/krz6 f3Vg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xN2OSvEV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958d8741fsi21833185a.223.2025.04.23.18.04.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xN2OSvEV; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krf-0005Wk-G5; Wed, 23 Apr 2025 20:54: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 1u7kqX-00015i-Sq for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0: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 1u7kqI-0004kd-EL for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:32 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-7376dd56f60so275547b3a.3 for ; Wed, 23 Apr 2025 17:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456009; x=1746060809; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KE33KBayr4dnRr7Xrs3VkN2rsoJvmDMI/IpM1PhpEq8=; b=xN2OSvEVAV/z7xu9BY3nBawjjwEHjsmq04rNCInWlClAa9mSmJxZS3m6N63Al8q3HA LKtINAnp83M7f2kbIGdJFYiIXAesw0DAfkZeh+Gy1icIDVUV7gyACdxXPuj4j47/PdMF /ANWNGK6X//j+6XE4yI94gP/vyRPDlJgUlB5qzaoIu4oXNUzKccYG9q0yWS5CnTO6zbr phLqp3Ef7XbGDQ96lO9K38NG7LdKjKMX8z3trQlj+MLhgmxGKYYj5RDpNJOWSGquJDAa SLYKTVSWzXpXxwO2qXbBeLk4lOM59nr/uI9hVTQ+L4BEGB3Ym74domg1YSNNta6QS+Kl L37Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456009; x=1746060809; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KE33KBayr4dnRr7Xrs3VkN2rsoJvmDMI/IpM1PhpEq8=; b=L0/Zewm6L8rWUhoeaBZ/JPUkfOa+ATRwF2aqh2J7S2yl+/5BCDuSSXKtsbVyx2Oqd7 vYmVenIVsivRO0+ISgrJ3UpNrtyMK2/8iUmjEqsvKUnOl9ECOjG/pf8VL+NNd+iexpt2 y6GTA3LSzzhB5zodtvlzzyqg32H12b2tukPn1J9MudB2PClD0xGC2Zbwn6RLwSssPDlm vOCB+jVfUr8JKrVYrCgPNJrVhrIctJ6FGBlhdHCYoy3d3zuHWO68JXbpqpxUwZpZpfyr 7i9yTwZUG/B7wQMrpQMBfTmUnF6MX7DHxyuBD34cLgYyO/wzhX1ndWC5yQZMhO7k0uR3 DvOw== X-Gm-Message-State: AOJu0YzOweSqHKNU4RbHXP0D+WUtO2GbI7LYWbXYwhYNi8+WySCxROJi PpNZX/c9OGo/oN930kCxGs21+w8/YLmK2fx00Trpb41gb38CZ1mZNqpA93LyBcPtrIq3furiHQx E X-Gm-Gg: ASbGncul6lgvKJ1yPYOUeDSqZj3/o7r5u8KK5oFK5fl1ZgqEqM6qOuG8XLo2Rg164zT LnmGw+uoHpaY449XNgUekhWfsZdqYrJhKPkQ6v/gvyF8OtmdKxRZvFvWg24or2fdVRF5aS5eiW/ Mp1QxkNjPPyvZ8jWMb4KwNt8/g/beUo00qR/whUiarCK5hh8HjvARGldVbl2JMPoK37uNPJC18m 7xVh03uN2iFeayYFKTe6SQKQXLZI/kH56/nOI15uY1v6pQ/IowIjuOKy090sR5RAdawWL80HD3A SxOA7x3X93sNFcK+n7Qi8XZGSmjEp+jI6sxoSsVv0/z1UE4o/Tio8ImfsA7w981p8C6XYhNwFIz EQdLoBiHcgw== X-Received: by 2002:a05:6300:6681:b0:1f5:8126:8a5d with SMTP id adf61e73a8af0-20444f08482mr784006637.17.1745456008949; Wed, 23 Apr 2025 17:53:28 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 072/148] hw/core/cpu: Update CPUClass::mmu_index docstring Date: Wed, 23 Apr 2025 17:48:17 -0700 Message-ID: <20250424004934.598783-73-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Since commits 32a8ea12fab..90b7022e698 (target: "Split out TARGET_env_mmu_index"), target's memory_rw_debug() callbacks use the target's TARGET_env_mmu_index(), not the generic CPUClass::mmu_index() callback. Update the documentation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-2-philmd@linaro.org> --- include/hw/core/cpu.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 6dcee5d0ba..29f6419050 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -104,8 +104,7 @@ struct SysemuCPUOps; * instantiatable CPU type. * @parse_features: Callback to parse command line arguments. * @reset_dump_flags: #CPUDumpFlags to use for reset logging. - * @mmu_index: Callback for choosing softmmu mmu index; - * may be used internally by memory_rw_debug without TCG. + * @mmu_index: Callback for choosing softmmu mmu index. * @memory_rw_debug: Callback for GDB memory access. * @dump_state: Callback for dumping state. * @query_cpu_fast: From patchwork Thu Apr 24 00:48:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883801 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199558wrs; Wed, 23 Apr 2025 17:58:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWrF7DlJfd+yIUOHL9HIbBUUGLrbeYds/fNYOu09567Q0ZFD8qgr6tMu+6smHz6WvFpi7+JcQ==@linaro.org X-Google-Smtp-Source: AGHT+IEaGxmhDBB+3qKshN/DYDP5Fw+VtZN219j34aXWabiAeklmgXrJAf00oTBo23iniLgISLcS X-Received: by 2002:a0c:c485:0:b0:6eb:1c42:a14b with SMTP id 6a1803df08f44-6f4c0f4aa7amr5712466d6.1.1745456282782; Wed, 23 Apr 2025 17:58:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456282; cv=none; d=google.com; s=arc-20240605; b=LgZ7k+qQKaJz1edNiQSGToEIkgXXlBn+4vvLaAcAq3XGXWOLHhthTsTuQJDxUpRSC5 E5F+PWLtz2gd/8XPvW509B2N/fh2VHX7qZI7fZwsSkXGn0cS+fdsiO8bMeAi0KMcPiAn xpWm3pR1CHmpxsTRw1WEanc3t1F412aT1V1IilCnyA7cBHFOQwKCpWJ2Ph9ifh38DpmH Qms8STNTeGI7xSBBSXO16c/89XwH6hmKJp0e7FFzmxedsphW22s1kRVY/geydbZvHNSu NuAgv7ipnLr4CAXZCi0v7bxFqQ3rC4B0Zss6DdcvV8+UUtnkLU82C4FK6jCGkUUMvHLO l/YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eY3tVR1Ho6nb9UcI2ivFSVueJvDpQEAHEetuLect7PU=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=XzDG8UIadTkhpavTq/gWpnGQZMfaBifHY+I/EbZ2cp67MfG+s3SzaQSYr/u8Ih3tYk WcUjvGaT+COztHXCK55eAdE9b25Viwd5o8IpSXEhLj2TPDsdyKwdYeWsfpFCcckdpJtM CVaRPh0Y8HCymdusUCgJ/+1+1RwPUUr3JVnwV2+tikhORAVi9kjaYeaQngbXsFkCvez3 fEAxDlpPiImBGGNLZybnE/yI04teSr4kpFHlkDrOI018GoliCfhqHhOWn9WVr/nZUIf3 IGKFoVAwqWu6h2Shb94scPYCRqhYfycYN6KYVdEDLCxbI4Uuxql/tn+7MuQLLlYFTrCJ r6Rg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cDr+VzZD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0aea61asi3607596d6.338.2025.04.23.17.58.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:58:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cDr+VzZD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ksF-00087p-7o; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015j-SW for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kqJ-0004ko-0U for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:32 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7399838db7fso510892b3a.0 for ; Wed, 23 Apr 2025 17:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456009; x=1746060809; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eY3tVR1Ho6nb9UcI2ivFSVueJvDpQEAHEetuLect7PU=; b=cDr+VzZDlhwt8T6a4wZJu2fRk8GXnZ6h5dQg3P+eIhIvQdfs0/sP8xuzRDNHkVaUKf GGZNZMNxCRgnd3PA/BB8YbwbncX8vwJsJLVHlD/QJKfLoT7MoKiyV0DZlUGImWrONISO kCXmv1A9yVE11USOaUC8rxX5mJ8snETpH6Z952kZ4es/9p6h7gSfTq/lOuHpyf6i15T5 11BsAfA1IN0oBGv0xm39BFMSEFLtidEtGKI16y9ebBU+jXimjVxFO8dOJrzx4SWxmFaR mgpHhB9PSLeN7bqr5ajFgvPGTd+FgDwnLp8ksfyFqoQkTno+oFW3yvB4rsEUudK6fX2x ObzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456009; x=1746060809; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eY3tVR1Ho6nb9UcI2ivFSVueJvDpQEAHEetuLect7PU=; b=uB5se2A8WvRX8cQ2B1h7TGjmYb72Eewj0cjqHHcDUH8d/XngF7jCfG0sNU8XLvPEcb YYL1932JvSNTxbh8Yyrlh7V7El1OvAfyEQE5rwlxkggeJ/5K06yB+Eo0PHffUA74X21q eK4+Sds47o5QqpWIQayTps/htZovJpOtPADqpiune5Oi4pje4Gw/ck0q5yPwtIYs4Fnj 2s9sDJhj5M4COt039klThUVTkEFpZMpoBZDzaCxu2mDfamIUcfcigIEe4uUEvkhSA9iG HzeUvuwniAj8RwzfcGDkDDREXBrVnFRQggKhr1hnkSQh8lNLgzqPVzLfS1H+kAN5h9uv matw== X-Gm-Message-State: AOJu0YzHIGAiLiULkgqnjlu1BV+cct2yScGJ73rPW7dpJzr87PrS0Ebm tTtYh3XgR8XmWWJYbowItxe9uo9zLDnpK4M2PFk0md/ZEp0XLZ0S6Gcn0Ls2uKVl/w0JJ57jMCf S X-Gm-Gg: ASbGncvlf7nm7lNDvys9/Hdk6quEJcQrPOAB2+xqYNKJIFX06lva0es4oJsMrIouNtS rHUUimRhxvixWVC6R2gltFWC816/EBfG30eZI3wLuOwytXnAC7ap2dklmA5pIgU6Jx2Q2bWsYUs Q+Kwk4Yr/iWBAgxZULx8vvpyAjbkKkK/LfNMo/2gu0GJ7Fh5UCJlSXZkAeUJf2VZfK/VC9VMcpx TVQ+38a5cfRPnhKr6hjlL7oJSGL2N9auQr1QiMcZSBrznMX6FrC5XM6Nao2ZbyNt8b3AjI5DbgH WL2jpN38Y59di/3xtOBn+RKW6SYcGMuCv8Gv6TPCkDhHFHbDHKMLjJmTRjqVuQeqQAqTx6zXAAH mhiPcSp5Uiw== X-Received: by 2002:a05:6a00:3be1:b0:732:56a7:a935 with SMTP id d2e1a72fcca58-73e268ef408mr482246b3a.12.1745456009574; Wed, 23 Apr 2025 17:53:29 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 073/148] accel/tcg: Introduce TCGCPUOps::mmu_index() callback Date: Wed, 23 Apr 2025 17:48:18 -0700 Message-ID: <20250424004934.598783-74-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé We'll move CPUClass::mmu_index() to TCGCPUOps::mmu_index(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-3-philmd@linaro.org> --- include/accel/tcg/cpu-mmu-index.h | 5 ++++- include/accel/tcg/cpu-ops.h | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/accel/tcg/cpu-mmu-index.h b/include/accel/tcg/cpu-mmu-index.h index 8d1cb53bfa..f1ca385d3c 100644 --- a/include/accel/tcg/cpu-mmu-index.h +++ b/include/accel/tcg/cpu-mmu-index.h @@ -10,6 +10,7 @@ #define ACCEL_TCG_CPU_MMU_INDEX_H #include "hw/core/cpu.h" +#include "accel/tcg/cpu-ops.h" #include "tcg/debug-assert.h" #ifdef COMPILING_PER_TARGET # ifdef CONFIG_USER_ONLY @@ -33,7 +34,9 @@ static inline int cpu_mmu_index(CPUState *cs, bool ifetch) # endif #endif - int ret = cs->cc->mmu_index(cs, ifetch); + const TCGCPUOps *tcg_ops = cs->cc->tcg_ops; + int ret = tcg_ops->mmu_index ? tcg_ops->mmu_index(cs, ifetch) + : cs->cc->mmu_index(cs, ifetch); tcg_debug_assert(ret >= 0 && ret < NB_MMU_MODES); return ret; } diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h index f60e5303f2..106a0688da 100644 --- a/include/accel/tcg/cpu-ops.h +++ b/include/accel/tcg/cpu-ops.h @@ -67,6 +67,9 @@ struct TCGCPUOps { /** @debug_excp_handler: Callback for handling debug exceptions */ void (*debug_excp_handler)(CPUState *cpu); + /** @mmu_index: Callback for choosing softmmu mmu index */ + int (*mmu_index)(CPUState *cpu, bool ifetch); + #ifdef CONFIG_USER_ONLY /** * @fake_user_interrupt: Callback for 'fake exception' handling. From patchwork Thu Apr 24 00:48:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883822 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3201119wrs; Wed, 23 Apr 2025 18:02:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX0XG2uLHHHU5eotFcOP1SjZQ1VkCN9oDPe3Kvi1vXugBsixBqwKkc6MTv0P2Fd1Mclr67ZAA==@linaro.org X-Google-Smtp-Source: AGHT+IF99AA9gsymnpekGLSmMJZnGHqfFL7inNXo2m7UUeyOuuSNxRZzRbmd9Waf2M0aYxi+6FkX X-Received: by 2002:a05:622a:146:b0:476:8288:9563 with SMTP id d75a77b69052e-47eb248cecdmr8323081cf.10.1745456534932; Wed, 23 Apr 2025 18:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456534; cv=none; d=google.com; s=arc-20240605; b=aN3ZQT5e0rcaPLChq6xXrfBF+x5wh5oW+3szOAkf5ECbSuStaaTiG6C94XuGMM3rKD vwIMd0lKxR4+iUaoqXrRuYFGhiGs5K8TyDfxagXtUfl60DwbUgKsrlouefHCXM98GaZ6 xYvGxYN+r6M2wAL/a5Gi4lYjt+4bZNO7Emvvljh6vQ0F3tK+6SRlQIDagx1JmAsrU4pZ muhhvmKidU4kiUI1QLSBjc/OXMwAx21v4lTmg04kFvn9klDabUk1DNOOyfOaNfAysut/ iA1CcxhztpWBnLa1fLNzQzkQxTF+nVUKIeSNGRa8XfbK0DhQNrTYltd0tiEWIw+qcMNf EJTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oVGDH0zXbPh1XWGLwpF7fHPSsEZ5O5FckAiSLdeKleA=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=Bi2wZFuwMRxnmgI/8CFIsyYC3dtIKiu/kNGkZaySWMNqx48Ols0vHv4aMl1tEpne1A BZ7/SL/wa3mf6EW0jFCRmfnND1OKR/l3TH9Pu+cabw+CexBJJqb6Xx6KvDBOB6AvHrRN qqk6m/vSCaj/tFWnHup6HC818P6TBdu/7lxWx17FtrP/oB/M4KWcjkp7S5Dnt4Y9qjeg hoHZV3U2+CkkQqAAojveoYL1gaJfv1gPdOVnjsR26+XHDro4XMtMKYFryLPLEHruj543 /u/pQBvaGcysYzOu3knOE6IzGJo6sJyP/FYVSy7BEzeUTSwoCikJAfmhH8Fd5BKF5LcC nnlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K2RIYbuM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea279d848si4974641cf.596.2025.04.23.18.02.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:02:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K2RIYbuM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kri-0005ov-Jt; Wed, 23 Apr 2025 20:54: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 1u7kqX-00015k-TP for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0: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 1u7kqK-0004l3-6P for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:33 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-73bb647eb23so345145b3a.0 for ; Wed, 23 Apr 2025 17:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456010; x=1746060810; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oVGDH0zXbPh1XWGLwpF7fHPSsEZ5O5FckAiSLdeKleA=; b=K2RIYbuMnu91NGDuNV1a39SXLBmveAsOhQgEHEvB+GRnrymGI+z1l9fiaT52S0NIHz QlMMO8wGh1797TpusMzq+tE1fBry3Z3LFCbGrI0TV13zi4t1u8uGvOwSywDeNKTG05mg NRWH3WXQJocbAAKFehNYyVXhYOEGO9Gzy5NpAQCNngHq+uNAEOCIW64YY/yUocKd1xx2 UIl8axd4lF0O+6rC9zUS7bs6i+W3kze6kYbgKby+xVYp6NnbxIRE0zDvEHmQL7TCNYjL DEAo7C9zmZAQ6bgO2ximbjTiRr0JhltKdTGz8VDZQpbrA33vHRHg/Y48XSE6llTh/qMf /tjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456010; x=1746060810; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oVGDH0zXbPh1XWGLwpF7fHPSsEZ5O5FckAiSLdeKleA=; b=DdT08D2/yRdQRfmeIZZnWe8zBXJkw8EfVkZhZZ+7ovCnakKsHiEszRuSkxaXZ7+P/q 3+EYGwyRkKBsNvf6n/piE6zOJbUIE+NEwerR9GH6aMaeYzBOhZgIJhrQkZhtmoLxPbnl 7Tw4jwp68r1cZWo9/3rLMhBcU4Nf8b7M0JvINz4kBGEex6AWIu63A1M1HPZuoDztEM4+ zDVZnDYrbgkwa5hXc9fU8C4UmcGAFEsLsUqmVxMy7X6X0miMi372vGlw9zTzLztkJNQs 2qWwx0g93VAiHCeFP3ZOAtib4uCw2C5v5PvznivscqAN8pfUyK2V398QAdZouNbE2ACk PgeA== X-Gm-Message-State: AOJu0YzObD0pZ0UaJvAHVD4Cx584whmH594S1XT1Cutr6+Z0m0YZU1h2 LRayj+iEFxiUfKoSbA6z30C/dx6tLqqzthyagt9k2KjVSpr/QS2782iOclEIw8lZoTHJTLp1PMm p X-Gm-Gg: ASbGncvMC79vUC7Tz9aB9wwNpu20oWSAlHMqIYrTP0ID1UKs5wuEZIGJiNGgj5OWpHD 3LEoDgAqWouw7EFLeFFe05gWCtHGjJzNCsP6+YMD1d3ELBQnbD3bhFJEEu5jfpRchgagPuHUoIZ iis5ErMBVu3yQ3fEuOFGU7L2ZBwRrj1BELZG5jMXb+XdqHhBT/Cuulz2DaYMO516JOALeXLDnsK /stCTQjkeuOxmt11Xgk7CQ6RI45+HB9pQ82HnYbS6uWphaC6zm7GQ1gL4YGvfhc7P7o5slSGaHn o4mr1jIRcXnOVsQRREVcxtXhVa1T1m/BoQ3iJME7nkTg9CrPxl1WQlp2H6vTSFraJjHwuf/eeeo = X-Received: by 2002:a05:6a00:aa89:b0:736:5438:ccc with SMTP id d2e1a72fcca58-73e245f91ffmr1030456b3a.9.1745456010197; Wed, 23 Apr 2025 17:53:30 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 074/148] target/alpha: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:19 -0700 Message-ID: <20250424004934.598783-75-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-4-philmd@linaro.org> --- target/alpha/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 584c2aa76b..56c96b1c4d 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -238,6 +238,7 @@ static const TCGCPUOps alpha_tcg_ops = { .translate_code = alpha_translate_code, .synchronize_from_tb = alpha_cpu_synchronize_from_tb, .restore_state_to_opc = alpha_restore_state_to_opc, + .mmu_index = alpha_cpu_mmu_index, #ifdef CONFIG_USER_ONLY .record_sigsegv = alpha_cpu_record_sigsegv, @@ -262,7 +263,6 @@ static void alpha_cpu_class_init(ObjectClass *oc, void *data) &acc->parent_realize); cc->class_by_name = alpha_cpu_class_by_name; - cc->mmu_index = alpha_cpu_mmu_index; cc->dump_state = alpha_cpu_dump_state; cc->set_pc = alpha_cpu_set_pc; cc->get_pc = alpha_cpu_get_pc; From patchwork Thu Apr 24 00:48:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883851 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204511wrs; Wed, 23 Apr 2025 18:12:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWv+5A9ufPg9N1ZDV8LwW78f+EsKVjcuSnqTymn38ppNrFZKAIaPmEJMIKgc2AGGo2Zu9oH2Q==@linaro.org X-Google-Smtp-Source: AGHT+IFWSk/RZiNyqzUyrZa0763B5JbVdVCT9fLmVGfNl2VKXdlEXwtsVOXDYTP5O0FJYW8DcT+E X-Received: by 2002:a05:620a:248e:b0:7c7:b5f7:31a5 with SMTP id af79cd13be357-7c956f4b072mr147647185a.53.1745457140401; Wed, 23 Apr 2025 18:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457140; cv=none; d=google.com; s=arc-20240605; b=f+IS034UiWPzi7D5GrVY/6tEnq3/mFZh7yfg3AoWzTFbdM+gtW2CAWY2Am4u2KYp9d mejCBGDaYg3exG29ucK/7yl45/uttqTXpbLhFoxSE0TnlVsOLoHrDpO1Q0ICVuRKSDyR WqcZYN9tx/cLzE555Ei1RzETEA5xzxg2Ou3vqgFoTHf3+ifTQjnfIH1ui7Vt/1IST03W MUfFIZ4sDaYbT5xZcH6txYZQJBloH2mFnjiJX07nMCAWDOqf4EVzw+j+KxIlZnHIywDo wFAwvDWkRmeZKvVbBx2HbBQzVbdRSGbALhBn9QNr4LogJof6vXUQhzN9YXNeC2+jPb3H FnbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=z4XK59Un/F/cXTQA+raQ2QBk7p5qcqGVyAJ27nWp3Cg=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=VHk0o6sWoFKl7IxMZFF+inobj1lS3vpWFxAiztDF0MwDE103GMO5AOhaHEnSBWe0lE PPxJADtRew13KN0b66SOV5uELroJip5O/qO+9O7d3xoZ3RqUPCI5XjaG2eWvoZqcACct 4MFWkOaNdQca+NAN0qpHbOuiIhwh29TLhzF1d8rEZEP/VbKZHbNIXQJPBvEzn/s7dwNf Cai/xaGa9YaZFxW7P2AtFVB3OM6YfnFPYlkMvnjmR1VK3S0rrh2k8KH+7wA82HoHRW9p SmQpHq2PAGbzJ1ZkJXP7RcE5Jo1oL1yhE4v+p7ubPGs12y85ZHmYecxjRnpMgZ018470 g3ag==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZovYEuyZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ed9f6fsi22254885a.588.2025.04.23.18.12.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:12:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZovYEuyZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krv-0006wQ-5h; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015l-QI for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0: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 1u7kqK-0004lA-My for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:34 -0400 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-7376e311086so491029b3a.3 for ; Wed, 23 Apr 2025 17:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456011; x=1746060811; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=z4XK59Un/F/cXTQA+raQ2QBk7p5qcqGVyAJ27nWp3Cg=; b=ZovYEuyZJj15duiSN6wZ5JElSE7KqVi9sZVS0G8E8oucx/Ru9zncz6rbrtY2cHk66s BVgPuQEhxnHVCJnT6K9tLHUBU35ePbb/VyGtpvkwJLnmCNC/eaC9iNFWNxPwd9Q6mm8i 0dRMVBZ8xg/ML+tHZfuLUm4w7To+VEDHrW5jOKAwi3PeY0cqZbxfd27wzXD357H8xxIO Z0RrdiWwAbv2Kd+tmjLTj0YLUZ4wGeDnOlloC/W0dkQfqlR5zBWXlqX711VvzUxyR+1d +usuKL3d3V5h5FRoZurU36fWGKfn/DPxzcuQ0Cmy3pMoIibRRmwxevZvhv2olL8mrPLk HJEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456011; x=1746060811; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z4XK59Un/F/cXTQA+raQ2QBk7p5qcqGVyAJ27nWp3Cg=; b=Omtm5r/xIOS3LA2tBJXt61Aq3lBaIvxNqBRSljtvE1yE7u3UD4cyvcneEzF898I+bU 6z2WUJKVOsm6WIwQZcLWtxpeXyotSYolQZsH10VU9FMNPPWZIKmdcpci9yeOhSPV2jQr 3CtDEjIA969EZHeGed2SefTyOymP+pBxeqvyH3hhAsJGYlm39kaY2mx5tAaWxXbXqBmy 5Ekysor5Ow9r+qGnKiuUk1LyquPhILRMRRZQm6s6fM3XoHvq1OHIOzKSAHENdVzp5Hvy p16phjiyAcsgiMxlX+RJKUznh/On33XSVd+J6rkocQ5iWEuS98N/E98DzVUFo6T1nskG sVFA== X-Gm-Message-State: AOJu0YxAwz68kzybdBNmrtyNky9cYcyffQP8kppFv+L4sE4kE6Ki0ssv yrO2Xzi7ViGDjR3S7sdAvWDOjQgE5A4ZqBzNo1Miq4T3GAy/SoVdAPQ2h7esV4/zw6/xKEAT9A9 u X-Gm-Gg: ASbGncto6o/yS3b6m5iIYFMPowcmVa1TVA4G5SXKpsxmYBKrxofeYQ1ddemPG8TiD0Q lWDPw2WLuG3oyOX0dCLaP9JiFcD7zyKea/UGH55M0IXB6YIW5eQsx+zQvfUeCEpU8b5ISDjEyN3 qsKR2mxZSHMsmrGZnbtELOc06aPO6MuvpRE4MMfwjf9pniLlZ28vViXkE65ygAQBgiW1Qtu9WGv HvCUqdtCQZycVLXFuwDzQmZo/C6nbPNBhrf/1+MIQqcACy076Yq1YGmsV49gMO7QSCdY+AYs2sF EMOtaVLnTA7lTfKVlB4HT7V7948WnhM+/qVUcMyfINottI9weFtSRJHr3Z6cALcmzW8g+PE4mY4 kCRxz6N93IA== X-Received: by 2002:a05:6a21:3389:b0:1f5:a3e8:64d3 with SMTP id adf61e73a8af0-20444f0024bmr855357637.21.1745456010831; Wed, 23 Apr 2025 17:53:30 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 075/148] target/arm: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:20 -0700 Message-ID: <20250424004934.598783-76-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Move arm_cpu_mmu_index() within CONFIG_TCG #ifdef'ry, convert CPUClass::mmu_index() to TCGCPUOps::mmu_index(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-5-philmd@linaro.org> --- target/arm/internals.h | 1 + target/arm/cpu.c | 13 +++++++------ target/arm/tcg/cpu-v7m.c | 1 + 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index 28585c0755..8756c24c08 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -373,6 +373,7 @@ void arm_cpu_synchronize_from_tb(CPUState *cs, const TranslationBlock *tb); /* Our implementation of TCGCPUOps::cpu_exec_halt */ bool arm_cpu_exec_halt(CPUState *cs); +int arm_cpu_mmu_index(CPUState *cs, bool ifetch); #endif /* CONFIG_TCG */ typedef enum ARMFPRounding { diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 01786ac787..21e8cf1400 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -121,6 +121,12 @@ void arm_restore_state_to_opc(CPUState *cs, env->exception.syndrome = data[2] << ARM_INSN_START_WORD2_SHIFT; } } + +int arm_cpu_mmu_index(CPUState *cs, bool ifetch) +{ + return arm_env_mmu_index(cpu_env(cs)); +} + #endif /* CONFIG_TCG */ #ifndef CONFIG_USER_ONLY @@ -144,11 +150,6 @@ static bool arm_cpu_has_work(CPUState *cs) } #endif /* !CONFIG_USER_ONLY */ -static int arm_cpu_mmu_index(CPUState *cs, bool ifetch) -{ - return arm_env_mmu_index(cpu_env(cs)); -} - void arm_register_pre_el_change_hook(ARMCPU *cpu, ARMELChangeHookFn *hook, void *opaque) { @@ -2674,6 +2675,7 @@ static const TCGCPUOps arm_tcg_ops = { .synchronize_from_tb = arm_cpu_synchronize_from_tb, .debug_excp_handler = arm_debug_excp_handler, .restore_state_to_opc = arm_restore_state_to_opc, + .mmu_index = arm_cpu_mmu_index, #ifdef CONFIG_USER_ONLY .record_sigsegv = arm_cpu_record_sigsegv, @@ -2708,7 +2710,6 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data) &acc->parent_phases); cc->class_by_name = arm_cpu_class_by_name; - cc->mmu_index = arm_cpu_mmu_index; cc->dump_state = arm_cpu_dump_state; cc->set_pc = arm_cpu_set_pc; cc->get_pc = arm_cpu_get_pc; diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c index c4dd309272..1a913faa50 100644 --- a/target/arm/tcg/cpu-v7m.c +++ b/target/arm/tcg/cpu-v7m.c @@ -237,6 +237,7 @@ static const TCGCPUOps arm_v7m_tcg_ops = { .synchronize_from_tb = arm_cpu_synchronize_from_tb, .debug_excp_handler = arm_debug_excp_handler, .restore_state_to_opc = arm_restore_state_to_opc, + .mmu_index = arm_cpu_mmu_index, #ifdef CONFIG_USER_ONLY .record_sigsegv = arm_cpu_record_sigsegv, From patchwork Thu Apr 24 00:48:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883798 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199516wrs; Wed, 23 Apr 2025 17:57:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXy8iYzVfGYWtsI9Y43c0c7Y1P2Cq2RLKS26LCjmFmm1OQjR4V4eP+npxdstNjCxicFlPsBIg==@linaro.org X-Google-Smtp-Source: AGHT+IFJc7fnHy6Yrf5mAAawKHm3oyVVnJjlKsBspi2qQxeqsoApBgHLXozRPfC2Qy95IYMrdimq X-Received: by 2002:ac8:7c53:0:b0:476:fd6e:df89 with SMTP id d75a77b69052e-47ec2c537acmr7582401cf.17.1745456274522; Wed, 23 Apr 2025 17:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456274; cv=none; d=google.com; s=arc-20240605; b=QtsAPCmOVosSc3uT7Fo47d5XNbDXkoTQ8X1X9BNkR3HDwHje3Bz1Fy/prkNRp+0mBc mosWJ4Y8nokAtHos2RWVfzSMHUTamC8/yIPrj71b0f2mBWlsL2z4+qDmIahSgpbAL9wj iAvAAaSdwlm2kG5GZdqepA95VC8V1Iv4qb6ZznPYyofoVQU/mrG8aGEMzjGxHTP3D8Wn yc1wH8KVq6/Ax2e6Yr/+UUd2PnCXNC9LUWfaDjYKzyy5mnEXzhw0BA9ydUp+GbC9aRRN iH68+lQ7+uO/VR3xAUiTfe+fn3TImb0tDKNm3lI4YyNZ6+tmodhHHhU9Or8oQeb2Pj/+ IRKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WONVWesSZ8uE3+nlVXH925QeCM8w4OWegE2KeFmY578=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=OJ8vd+JvnxmEckTNzMmB5FA/viZsoxskX625fWtuTzSTJiJTobxC3njNPKhjupc59+ Gon4PhoP8WJwDH695XcbLTX45lFS6u/XG09NshxUwCm0Dy9F/MpTYFvfpIT98HM9KZOa R3uDqVyud/Ci7jqOIYxwzVk5JKVbaTqSDSDn3toWVrREZVkn2fA3wxI6XI4gWFgpXSXV HJRU5qpa+0V/kq3AXoRuxLyAtIYSiVNdfQ8U/IAj/Z2+mceivnRPHMHBYCloPonrzQC/ /QgT2S0rgzHTxuvThjZ8eiuW6hLpmcXg4rxIsgabT8Y+7Xr8ORsPFc33LP4OP18mvgmJ 7zdQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rrLVx+AL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9fa9a075si5175271cf.184.2025.04.23.17.57.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rrLVx+AL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krc-0005H9-M8; Wed, 23 Apr 2025 20:54:53 -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 1u7kqX-00015m-Nb for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7kqL-0004lL-4Y for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:34 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-7398d65476eso360412b3a.1 for ; Wed, 23 Apr 2025 17:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456011; x=1746060811; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WONVWesSZ8uE3+nlVXH925QeCM8w4OWegE2KeFmY578=; b=rrLVx+ALS8OfemRipVPsvlXnKEKbAiabqW+OOd3RZWfR4ReT5AACuFMxWgzFviEAqK cowY/gDLNJJNpXkmFvXgvDTAcGEfcl64Jm/rhIM4N/DdGGDp2zEo99CU4A87Tk3sJncF 4fkFajMe2zMyUCVE7XQMn/PwL8eZi+jFvx7BPdhiVxEGC9iwJlyFqQU/Dm5+JmRQAxc2 qK9RkrY7J9IKbCS9BdDZ/J+TJy/ju2g8A4X9v9gdnbjhx7hZzR0jNiboyGsWg/nzrPTW x5ydinFcKQuQAK+iSVSIwvufUSNyG7URvRVbaKCjbrGOForT1SJXODSTScPkBqIOWZAg +B+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456011; x=1746060811; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WONVWesSZ8uE3+nlVXH925QeCM8w4OWegE2KeFmY578=; b=CA/DN0JfxT5JukmbSMNxBM8DYYBjanQFzDFdxiquyMHEeTiBFV8KsbHdDhZy5YV7qb 38O5G39yJnhqxTJYeQiRta1LIAd1qAzZy+sfKK16EHOKcsENw77J6cfB0JCquX0+tw+Y xapeCVE9qWcLFsBIuFPN3i9qxhW1xVBJf8zAqUv+e7n9Q3SK/LHXxyiceg3O+UL8UKv6 xuL25Pk45YNV27d585uZISO/f9JYo8dfTqK2jS6YHVuHvh9uKbRnuxkID7zSw32x/8xH o8/pqxCZwvGn3AAjpFyzlBA8apYkvxLDXM2ANBr111nYRRnYt8W79yRWxyaJT7eh4Cvo gBNA== X-Gm-Message-State: AOJu0Yz5mLpBPOX+Ef1ts6oqCwOwqh9JyKnDzZyZAtYl3Qr2MrGWt7oy XmlNbUzxR7JzzU24CzxihtsnfgflW305glQezDC5w1ZI/J5j5lSmujavZoJmMI9R311EwMEX6AL x X-Gm-Gg: ASbGncuwKiMNQBC5iBd4EQFgaouCwp+syV+A3jqYboK97p64j9j8pfZ1lO7V30GAIo5 y7PRnYLl2TG0oI+VJ8wBrY2n94GWfbBFvf5Vgbwes+NPM7JNF5USUSW+1j5vi9xwB86tceUvku7 PcHt+jyo+A6xpW+wL+w35qbMgKPE1foP/L8zcH0pBr0FIFW+6uRar+wDEj3n4pPuByHuvwdZuSr 5P47vBguFh8fGGs36oRMHaAuO2lccD857zGzcujxIU/OZ85p0ftlE6dvxhN5t0/bexA44v4Hd8p +apjLN6GBPNpnUHaXW8qPQb9QB4qnOLW0ce7CK7WYCNCkWI1ldCkFMXb2BhVXqYo3OWYjIm36/A = X-Received: by 2002:a05:6a00:acd:b0:73b:ac3d:9d6b with SMTP id d2e1a72fcca58-73e267e7d8amr619708b3a.4.1745456011417; Wed, 23 Apr 2025 17:53:31 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 076/148] target/avr: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:21 -0700 Message-ID: <20250424004934.598783-77-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-6-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 1121822470..feb73e722b 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -228,6 +228,7 @@ static const TCGCPUOps avr_tcg_ops = { .translate_code = avr_cpu_translate_code, .synchronize_from_tb = avr_cpu_synchronize_from_tb, .restore_state_to_opc = avr_restore_state_to_opc, + .mmu_index = avr_cpu_mmu_index, .cpu_exec_interrupt = avr_cpu_exec_interrupt, .cpu_exec_halt = avr_cpu_has_work, .tlb_fill = avr_cpu_tlb_fill, @@ -250,7 +251,6 @@ static void avr_cpu_class_init(ObjectClass *oc, void *data) cc->class_by_name = avr_cpu_class_by_name; - cc->mmu_index = avr_cpu_mmu_index; cc->dump_state = avr_cpu_dump_state; cc->set_pc = avr_cpu_set_pc; cc->get_pc = avr_cpu_get_pc; From patchwork Thu Apr 24 00:48:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883809 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199940wrs; Wed, 23 Apr 2025 17:59:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWo6aSJ8eLMchDBPIOerKv+IVUWh7cvoa6feGX7qHAtcpwBM8BEv2Y4KNdayXA1jQtWE/AvGQ==@linaro.org X-Google-Smtp-Source: AGHT+IH1ztoIsNtWQ1OyfSECAJLIzB3hH9EnEHRwkE37Kij16Eh3lHVrCzDl0hdQacPGa+M8XY+2 X-Received: by 2002:a05:622a:1302:b0:476:9180:6c27 with SMTP id d75a77b69052e-47eb2d97cebmr11963841cf.13.1745456384564; Wed, 23 Apr 2025 17:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456384; cv=none; d=google.com; s=arc-20240605; b=ceuqsHD92KR8RCcpryQyYWdeyiU9hJeoiDljBEhCgh8JQPv01wlb0GaZcwEBunsZKV g9ukUqtQHCqOn4MmDmE5b/W39laPA0ZSBYjaHvweKSt8+/9keZHeJYvb8dBbRfseCGxT k0tIngkEr5GsIQlri9ooD/LO8VU00hzCEC/dRTrAwjR9KHZGAZAg96ui380HaCI0vgWc 8TZ7a37kfANU6H/yfIs+NBdEedI05V80abn+tUVOmDsLP2jVPPeSY3vIKpYWe5/itOi1 DEgkBK9C0QcV+7hldokocWBfyeoaoRriusR8NxBysN/cvugx8iD1P0OvXrd4Rvlsvlst Qpiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7RZ/Hau3mC5xnOAVQuPQInWzHanN+gAbUrq5Du1Mv5w=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=QWIyy7xLRl24emzFQrlUiTeTRyglLrBaEpiqA+0txTKxKqJeulwVn04oolvLvmJsW3 5sLAkBV85zESoUwinEPAAjNP6fC+w6n0sUsrcoczBx5HSsum9+6S8A3muzpRr+3Io1IW kkzA4s2/qAfu+agtb46D/LyVbDrh8D2l7VK9mTrgjGqy56pkeXsQuF/abyvpoJ3tCbnV DYz8pvf8GqCqCg2bSKBJgNGJLhgseK2H3GGFG7vxW0jv4vdDK01xHPIr7QGpkCMVs7Vl 881sy69uobS8fK+1K/3TdlXKFoRDdHVQloImEsdh6vKmoZzi76Cs2dlFHksZ5sCG3Em7 P7CA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qnjKFN0h; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1f974b7si4654661cf.442.2025.04.23.17.59.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:59:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qnjKFN0h; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ks7-00080O-IG; Wed, 23 Apr 2025 20:55: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 1u7kqX-00015n-Tj for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7kqL-0004lU-RB for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:35 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-736c1cf75e4so320582b3a.2 for ; Wed, 23 Apr 2025 17:53:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456012; x=1746060812; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7RZ/Hau3mC5xnOAVQuPQInWzHanN+gAbUrq5Du1Mv5w=; b=qnjKFN0hWhyVWymNTQqFYCiRUhEAvDMaBYHUk0AjDHZTnEDy/PMLVfPv+kvwnxy1DE C8kGhX9cfJFY3RaVkokp+4eqtQoD+e4HApu9hKRMM0h/CeR/9dHKBjhNaWog3JTYJoKN bi0EG3RUIH3cQHG1x5ToE35ZGY4c4tFnBOfggPlsHaoakVLSyBzHLxY3BQhID3ni4CC4 9liQrbvKM8gKiyl8+mqNtb/SQgOIm9js4CU6lSE9X/tZLj18BAWQJBQ5ot8LjKQ7KtH0 2KqcEtxSTg0klAZcBgRA3M/mjppdXBhsmLxu1WE7fwnf8TJ8/XDZ0D4napfY+EjX11gf QSgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456012; x=1746060812; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7RZ/Hau3mC5xnOAVQuPQInWzHanN+gAbUrq5Du1Mv5w=; b=tqCm4v1nffzxdWkmCotIrAcvmvowWaZ4LpadBJ+Kg4UlhSnDnpEl0/wrMtcYV5PQlo 1AgvLWXVMrvnS3R5eNYyIZbP1Ho3wdeAIoMpdKGKU8wXJbw5UDfxtz/T9H1jNI21M0T1 PxxeYVaghamYt2cHw6nCEbEoWfVBvoBZf/AmbAHGCrcAh9R3G6bDkcPknSYEnQ3QPSNr nkuUjUvkh7fvM0NZ/K+JS17fTF4DUAv4uMutQJv2uAHeXKNja+xnPnmSU/nXUlRS2rhC jqp40zqxUib4fvrW+w393EzLXOfhqTpVGOKhlhGkL5LJz7cSX4KjTH8L8ZLfJz0DoUU9 0HJg== X-Gm-Message-State: AOJu0Yy74BMmyiliWLGpO+HxXlfOJqxLeTeHlPVVoqKfDZYVRLXjlsD9 Cjk3byKC+emmeC0pENOjcPl3l3HmxUCOqoXtJgNKc4G0ktDilaFshSy8L7VxB+uOUzQEAUFcLFX J X-Gm-Gg: ASbGnct70+ESZg/k+ES5nU+7FoMN92qU9uZmk8/JpUv5TEEGUlNgEM32uwbJvwWVwuP 7tL2nak3xZWOCI782PmcsdKJ7ok6DBwNpjH8DiMhWA3jilyJbYQ3g+IENHdUcskivgFlWfdlyQI a/X6ELWpLq3baX4md+1UB3LXcwktKwMxKnI6EnJkCkmq6oNj9Az4fhpVzdpYQQGQX5mKHHNbwIo m9orUCAuIE6CO6bYya4KlaGzqZrYYgFDZuP/24BflSqk18Q3urPNH1lmWWxGp/cBlcruZKSzpKo aU1/Po7ztdHx17/ZoLKRm6z0hEXv0UyQsAluIeIpejMwuIPxR6+JVzm9w/7GBG/r8PsdVuZ0PhU = X-Received: by 2002:a05:6a00:2e14:b0:739:56c2:b661 with SMTP id d2e1a72fcca58-73e2463345cmr944867b3a.12.1745456012118; Wed, 23 Apr 2025 17:53:32 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 077/148] target/hppa: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:22 -0700 Message-ID: <20250424004934.598783-78-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-7-philmd@linaro.org> --- target/hppa/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 2a85495d02..09a6aaa3dd 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -256,6 +256,7 @@ static const TCGCPUOps hppa_tcg_ops = { .translate_code = hppa_translate_code, .synchronize_from_tb = hppa_cpu_synchronize_from_tb, .restore_state_to_opc = hppa_restore_state_to_opc, + .mmu_index = hppa_cpu_mmu_index, #ifndef CONFIG_USER_ONLY .tlb_fill_align = hppa_cpu_tlb_fill_align, @@ -281,7 +282,6 @@ static void hppa_cpu_class_init(ObjectClass *oc, void *data) &acc->parent_phases); cc->class_by_name = hppa_cpu_class_by_name; - cc->mmu_index = hppa_cpu_mmu_index; cc->dump_state = hppa_cpu_dump_state; cc->set_pc = hppa_cpu_set_pc; cc->get_pc = hppa_cpu_get_pc; From patchwork Thu Apr 24 00:48:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883896 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3208107wrs; Wed, 23 Apr 2025 18:25:03 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWDew6N59uJt5lskYEcOx4iJ7SOFm7i0Uj/iejaCe7uoxj45qhk3iBeTWCE5jf4K484mTFBYw==@linaro.org X-Google-Smtp-Source: AGHT+IEmKPe0WxXAg+cSR8DjJsYsqIxg+rGF5nVBXSIHA0feXmOUNoWiS/g95wMRSuqgLfNNUE6H X-Received: by 2002:ac8:5710:0:b0:476:7018:9ae4 with SMTP id d75a77b69052e-47eb2d98d67mr10713191cf.16.1745457902827; Wed, 23 Apr 2025 18:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457902; cv=none; d=google.com; s=arc-20240605; b=OnkQadmyi+VybVer91BaFKMW2foopbh4smHbUJ8JS/4VwukO/Sg6Fjl9gA0uWPnq62 vNDKoOc2R/5/TXZH/yJlKBMhiLhVA2ttz9ySUy+QkhhB9RiqpEfrMIBpU7uKb9SUT1gP f5zjjEni6svMRbdvE6jQPEoQyQUgNbJLQ1z95YQO5MdAYS4z+aX8OtynHhsxAoqmqOAk yyZIl+GdHASKeUyGf7pwKTPuruw8GSx64xe3o6sFxLLlvN0wlzXsEMP7FizG3BiNrJ+I l8P2+w+oo2bt/0EWDy7iFccgm3Z5v0O9fsPhU2/pzzVhWjdXpBtdndXxfqheEGRk6z/b I3OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YwX79sAas1p4NfMgvATwyqCc393tpLGILDciw+NSDio=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=B60ke3DQys33ScAmX8ZElWEjPrmRnIzR1Qe/2dwqAjker+U3em3sBpg9MFF/yCBNBA 4282mq4n05/AVan5JXwOODtNClStbFDyXp0ltJmjq7c4MDUkUxwphiXwejqoJvjb5eyN svslLsKpx6Ca8yaqRzi/ZNVDGq4uyFxbc4dTdfW3jN2OBrhWKgEcy8o0oKGZQyU7NHv4 qFnpqGpkb7XLncQNgwDiktLs2hoZLooxkbD+wbB8WPqWVZ9FVPpeAI5qpFdC247JcXbw I+5JOn8Vkbm5V7r6hdVX6x56l7+TQlysyd82E/lSpAwM7bGboVqd0/mPm/2IuS4/DreC 2j5A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=miLwNKlW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea2bb7614si5072031cf.664.2025.04.23.18.25.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:25:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=miLwNKlW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krP-0003x0-Mi; Wed, 23 Apr 2025 20:54:40 -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 1u7kqX-00015o-Sr for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7kqM-0004ld-67 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:35 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-736a72220edso415372b3a.3 for ; Wed, 23 Apr 2025 17:53:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456013; x=1746060813; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YwX79sAas1p4NfMgvATwyqCc393tpLGILDciw+NSDio=; b=miLwNKlWWOuDEL0BROqS3lyfJ4f2Ib1MDOJzyMAubg1/uo71DiyDD5agdR0frrXq+n ZJLvye67FPekm/QYt9tiMCtEY72yVU4ggY5/6p1UkKD7TqrEoZHf25R7mXAmE0Wkqynf o56+Guv4+oh4zcGjggVegi6Yd02Sd8kW0LTYvqhSIPB52VAFzt4PNKHzrR1oKkoRSCO8 qZuZI/ieurnfkae/BKdR42PRrdPlO1hddUqNUsoxL7yOM2UlhFc6zSk3BjOs9K6QQR4E zeg4rkgNXcSbsMk3slrPGAcq4g9aiS6QOZLUqwj9Kjt2RUV93qzP/cEoN0tGs15JNT5W INqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456013; x=1746060813; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YwX79sAas1p4NfMgvATwyqCc393tpLGILDciw+NSDio=; b=EweoOQeNuNAYmLi83UJUgDzbZvW7ATnfFYxy2XpGIyDbZfsH6NDu72zpbjBz8xzH5K pNm6kbyMjX7jLvb0rtlaa8g5CA2IBA/qKKxLaYwTKSw66LE+hgJuVTm4W9hNK8eC6Gl6 S7XI6Jc+zhKux5ml6RsCV2g1sJbqxQ7f3Pgrhbv4JyD107KnFI3Kuu2sQ65wRe94Fkqu /S93gTrjKe+S6986ErQ9atkyXrbAL1NWHk1nx/fbqavu8GizCOHJZ4QpBQuISwtzacvn L9gZ+NTrazI0O3q3jfdfQ+mRYXIsoMrbccRfStPL8G4AgR7AffP3ehGcO85BSdkrCkon kAgA== X-Gm-Message-State: AOJu0YxVBwcnFSAoRyR1oVL18n6rt5yt7i6jQThkIDimySHDpVFJXESi WanSixnFuX/GmBq/1uM49O8Q9W4kg2kXQ9rYAK7EYB1p+oMzpfmF76y3VuQMvJYLP3+mYPBsfO6 l X-Gm-Gg: ASbGncu+ghWbJKjRy7+iU0iaHQXqenJYH1V7SXZuSG7CarcoNzh5oSzr+DJb/Et/UL9 zqL8AI54+j1VgoBDsDvfi7umjslLsi4emkutFiGO46nvxu0MfaZ86+JAZYOduZ1XG//glO1laSc 1s7xQ7gzHDtA8V7LZxMKc2yKPWDOx6Pzz3Er5OyjhW3prLNJ3VVdBlGzd4G5yUzWzThzFykVMOq tDYuYia/0aY9l9k60XLgMUY0Xms5TbME4T3N9jwA7QniYemRJfmjm0Hj+PtaX2ZP9/TUo9xmPSy r78rbHasCv9492Vm2hnPxgFPIbbwE40tls7EA6369E6vbGPzhu5Te2vZkTlf+ETM3+GZ7FdRspk = X-Received: by 2002:a05:6a00:2e84:b0:736:a8db:93b8 with SMTP id d2e1a72fcca58-73e243c63cbmr1119046b3a.3.1745456012854; Wed, 23 Apr 2025 17:53:32 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 078/148] target/i386: Remove unused cpu_(ldub, stb)_kernel macros Date: Wed, 23 Apr 2025 17:48:23 -0700 Message-ID: <20250424004934.598783-79-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-8-philmd@linaro.org> --- target/i386/tcg/seg_helper.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/target/i386/tcg/seg_helper.h b/target/i386/tcg/seg_helper.h index ebf1035277..6b8606cd6d 100644 --- a/target/i386/tcg/seg_helper.h +++ b/target/i386/tcg/seg_helper.h @@ -35,8 +35,6 @@ * TODO: Convert callers to compute cpu_mmu_index_kernel once * and use *_mmuidx_ra directly. */ -#define cpu_ldub_kernel_ra(e, p, r) \ - cpu_ldub_mmuidx_ra(e, p, cpu_mmu_index_kernel(e), r) #define cpu_lduw_kernel_ra(e, p, r) \ cpu_lduw_mmuidx_ra(e, p, cpu_mmu_index_kernel(e), r) #define cpu_ldl_kernel_ra(e, p, r) \ @@ -44,8 +42,6 @@ #define cpu_ldq_kernel_ra(e, p, r) \ cpu_ldq_mmuidx_ra(e, p, cpu_mmu_index_kernel(e), r) -#define cpu_stb_kernel_ra(e, p, v, r) \ - cpu_stb_mmuidx_ra(e, p, v, cpu_mmu_index_kernel(e), r) #define cpu_stw_kernel_ra(e, p, v, r) \ cpu_stw_mmuidx_ra(e, p, v, cpu_mmu_index_kernel(e), r) #define cpu_stl_kernel_ra(e, p, v, r) \ @@ -53,12 +49,10 @@ #define cpu_stq_kernel_ra(e, p, v, r) \ cpu_stq_mmuidx_ra(e, p, v, cpu_mmu_index_kernel(e), r) -#define cpu_ldub_kernel(e, p) cpu_ldub_kernel_ra(e, p, 0) #define cpu_lduw_kernel(e, p) cpu_lduw_kernel_ra(e, p, 0) #define cpu_ldl_kernel(e, p) cpu_ldl_kernel_ra(e, p, 0) #define cpu_ldq_kernel(e, p) cpu_ldq_kernel_ra(e, p, 0) -#define cpu_stb_kernel(e, p, v) cpu_stb_kernel_ra(e, p, v, 0) #define cpu_stw_kernel(e, p, v) cpu_stw_kernel_ra(e, p, v, 0) #define cpu_stl_kernel(e, p, v) cpu_stl_kernel_ra(e, p, v, 0) #define cpu_stq_kernel(e, p, v) cpu_stq_kernel_ra(e, p, v, 0) From patchwork Thu Apr 24 00:48:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883800 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199548wrs; Wed, 23 Apr 2025 17:58:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW13wSY9tIqTPD1cbVB6HFFlBEQrmEyRORir9rmJQXyyrCc4t/KkBgmp5oIr9nRXtLyrf0OuA==@linaro.org X-Google-Smtp-Source: AGHT+IEFfr8CPIloK6S9VgEfx9iSzgGEVulLeGWelPxBjD9zjk+o23Y5vbqhHP68IV6xwPpwVaQ6 X-Received: by 2002:a05:6214:f23:b0:6e8:98a1:3694 with SMTP id 6a1803df08f44-6f4bfbaf44bmr16159646d6.8.1745456280952; Wed, 23 Apr 2025 17:58:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456280; cv=none; d=google.com; s=arc-20240605; b=MnVnF6lRS2Flf0/HmbridroFx8ebsc5UNn5R7Qc5QXW58tRX4EGDRjYs85fpbmBCUx YDeiGB47Wtf0B8LbL7qxIyvUTAbHZQrG286G59eNXUldK1p0shHLrs2+ue962uEjW35J +IECKbTs/W9UNholiS8exk7fGtQETW7PXBn+F1XVgD/fjNKZitu3kvhedB8xYhXgEbmc mL4TpM8QdRHIsgo6cgQdo9A5MRjs95YUANGR4MlNtXjlaKcw89YhXfEhJWBNFvcEKXDH n21r4W5cJTBmXSLFLvWH3UqgwInnNXmcJIJ9tRjWD9NtW6ONr5GPMn8digfaov1SfQ3T A0EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HFv25Ex4Z7rH8n6+d4m5k/9OCPtpQ36hSXK/gOJIqjc=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=QBf+UiMzxgKPdZBF0drZpSQdNzMcvWjGK0lnoDNZcUcD0NHSddS6529V+74KEjKaNO 0Fv28EMvl+0sZNhZK2aLwDcCbz3cWVYn61kCMZmCnRicdygqwNAFK+IE0Ir5jR8naijk sjrpi0peWh3jk4mkeQIH2mQopEpuj0dTJ/K4r/FG59D7jMn95aW3OzWqlhk78IhUFBR8 qqUKyNR6NEkLF7+UCQaQiWqH82INgKJbSF4kBsZhmXCk5SXyX7B7m4uCJxW8ldsFfxsa 30Rm+QMSxtocR7IA0tQqetbMuVwVChH3dXZ3WAYrhqpbefehB4LY22PEryJqlJVl79M5 mLwA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FwDIVFuc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c08d27c0si3733306d6.54.2025.04.23.17.58.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:58:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FwDIVFuc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7krc-0005GR-LT; Wed, 23 Apr 2025 20:54:53 -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 1u7kqX-00015p-Sg for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:46 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7kqN-0004lp-1W for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:53:36 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-7399a2dc13fso535207b3a.2 for ; Wed, 23 Apr 2025 17:53:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456014; x=1746060814; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HFv25Ex4Z7rH8n6+d4m5k/9OCPtpQ36hSXK/gOJIqjc=; b=FwDIVFucvmK8vUOrACvsAgoKHCo3VQWiMktmOEVyWBZyzFjqytvZk8ZY32UKisTZ+n B3N4ljho39RKsdM1Q0xAOMcXAnTrYIWgJ+GRIAD3zNhyPPwNnnpyLKIRqWUjDI/BJ1dl NQ19BnYK7nKXK6KdVa4soZphjyN5e7NdyFku5VaAntu1UXI2xiF0/BT5DpV109Z57wgq 4KQZcxXcclyEWyVRjMrLtNNODTUfbM5yz5W18gewdN8HSMUcmoPvc+hg/ebvVOXW2iVw iD8ulK+o9WURqaw0cIR4bB5ziqTjGBgwvQRJxu+tfeaAmhSacp3DN2l3iSf0XGYQPgeY rYpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456014; x=1746060814; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HFv25Ex4Z7rH8n6+d4m5k/9OCPtpQ36hSXK/gOJIqjc=; b=JlNk5fT2SyOiVQLYtVBNw9sJNdM7g66D4g71KkTwE7hhk7TYhOdgHXnCrtjtUFQ6OP 98zuao0YJVfO1M0WMRWlW/z0kf5ox49ojVuD/A9crmnazzna714dU2bMZvp/jfIerOOl Fg4aHdDEj6slzNBjlS6mGdKcuPGgXt6lj23pWhMiGJemyKlSA3iD7a0TMB5Nfjeg0hlg L2OPz/7CnIr8ibfKlDibTJ/zAJOZwXLyvgCz/yLVTTJWcxkymfk1+sabPk5C90HthATm LQBlgMgnRA1wVEGO7ayjKJ5ZN21Fuw3bHu0EDXEejBord3H1kK32x6tc2lIwx3hd9LvR aUig== X-Gm-Message-State: AOJu0Ywrolu0GYJQYJPu4DRZuCk/gfYdecnZjuHkirw8ZSm7a86Ssdh6 mqqTpaNSPzimEz3Vmn5pJ0m5o8vQzUwOBgawlXPkSrMguCPHJEphNGSJR4qdZn5jgt167hrja/U 2 X-Gm-Gg: ASbGncuqvqwA2pAH5GoXTMmQwxkwwidloDyJbia5yWGgP0+b178fON7iZmUhRdYbAU7 MnrvdQwmabJT2PS2+a94T59m7Q1XdNN8+pQSl7XXlroHJ1vClkqjGGy5CtQcGEv2iW2I8tyvcex 5GzJTZH2XA87++szRbhX3igvqgb6BaU490X8nwggGPygKo+eKH1/78JWsdQph/MBaVVfja2HUG+ 4nY0b+iunCo5m5argzMYOQHfiv9Hl2Apge3re5suK5JqLTmDr4Rff0+d1IgXZ2vV0yj55lAY3Gx Ju2j4KPH3Yi/qm6O8/Ubbn7d4IlcYGdmJNeuV7GzAOD8Ix14iFDGFHnbU7i1PV0CksKspsVGBV6 lHyqycSEW5g== X-Received: by 2002:a05:6a00:9287:b0:736:546c:eb69 with SMTP id d2e1a72fcca58-73e245e3df6mr932620b3a.9.1745456013530; Wed, 23 Apr 2025 17:53:33 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73e25a6a971sm209353b3a.103.2025.04.23.17.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:53:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 079/148] target/i386: Restrict cpu_mmu_index_kernel() to TCG Date: Wed, 23 Apr 2025 17:48:24 -0700 Message-ID: <20250424004934.598783-80-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Move cpu_mmu_index_kernel() to seg_helper.c. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-9-philmd@linaro.org> --- target/i386/cpu.h | 1 - target/i386/tcg/seg_helper.h | 4 ++++ target/i386/cpu.c | 16 ---------------- target/i386/tcg/seg_helper.c | 16 ++++++++++++++++ 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 119efc6c60..c9f39e99d3 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2598,7 +2598,6 @@ static inline bool is_mmu_index_32(int mmu_index) } int x86_mmu_index_pl(CPUX86State *env, unsigned pl); -int cpu_mmu_index_kernel(CPUX86State *env); #define CC_DST (env->cc_dst) #define CC_SRC (env->cc_src) diff --git a/target/i386/tcg/seg_helper.h b/target/i386/tcg/seg_helper.h index 6b8606cd6d..ea98e1a98e 100644 --- a/target/i386/tcg/seg_helper.h +++ b/target/i386/tcg/seg_helper.h @@ -20,6 +20,8 @@ #ifndef SEG_HELPER_H #define SEG_HELPER_H +#include "cpu.h" + //#define DEBUG_PCALL #ifdef DEBUG_PCALL @@ -31,6 +33,8 @@ # define LOG_PCALL_STATE(cpu) do { } while (0) #endif +int cpu_mmu_index_kernel(CPUX86State *env); + /* * TODO: Convert callers to compute cpu_mmu_index_kernel once * and use *_mmuidx_ra directly. diff --git a/target/i386/cpu.c b/target/i386/cpu.c index c596e2174d..fd85663833 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -8681,22 +8681,6 @@ static int x86_cpu_mmu_index(CPUState *cs, bool ifetch) return x86_mmu_index_pl(env, env->hflags & HF_CPL_MASK); } -static int x86_mmu_index_kernel_pl(CPUX86State *env, unsigned pl) -{ - int mmu_index_32 = (env->hflags & HF_LMA_MASK) ? 0 : 1; - int mmu_index_base = - !(env->hflags & HF_SMAP_MASK) ? MMU_KNOSMAP64_IDX : - (pl < 3 && (env->eflags & AC_MASK) - ? MMU_KNOSMAP64_IDX : MMU_KSMAP64_IDX); - - return mmu_index_base + mmu_index_32; -} - -int cpu_mmu_index_kernel(CPUX86State *env) -{ - return x86_mmu_index_kernel_pl(env, env->hflags & HF_CPL_MASK); -} - static void x86_disas_set_info(CPUState *cs, disassemble_info *info) { X86CPU *cpu = X86_CPU(cs); diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_helper.c index 71962113fb..f4370202fe 100644 --- a/target/i386/tcg/seg_helper.c +++ b/target/i386/tcg/seg_helper.c @@ -128,6 +128,22 @@ int get_pg_mode(CPUX86State *env) return pg_mode; } +static int x86_mmu_index_kernel_pl(CPUX86State *env, unsigned pl) +{ + int mmu_index_32 = (env->hflags & HF_LMA_MASK) ? 0 : 1; + int mmu_index_base = + !(env->hflags & HF_SMAP_MASK) ? MMU_KNOSMAP64_IDX : + (pl < 3 && (env->eflags & AC_MASK) + ? MMU_KNOSMAP64_IDX : MMU_KSMAP64_IDX); + + return mmu_index_base + mmu_index_32; +} + +int cpu_mmu_index_kernel(CPUX86State *env) +{ + return x86_mmu_index_kernel_pl(env, env->hflags & HF_CPL_MASK); +} + /* return non zero if error */ static inline int load_segment_ra(CPUX86State *env, uint32_t *e1_ptr, uint32_t *e2_ptr, int selector, From patchwork Thu Apr 24 00:48:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883861 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3205736wrs; Wed, 23 Apr 2025 18:16:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVxOPBjvgTvW4LwwtWRQaB7cak7Fp3s1ubIeH1D7EKy+5q0QVFhcNDP7c9tg54qGCnarkDzOw==@linaro.org X-Google-Smtp-Source: AGHT+IF91mniQSC0RK42jBiYyz9MlKbp6kKTzagoZx/UiZ9vtV8wy1ynUiJBEvYGOibYBAawkTg1 X-Received: by 2002:a05:620a:8192:b0:7c5:95b6:b40a with SMTP id af79cd13be357-7c95862c737mr66977585a.27.1745457364385; Wed, 23 Apr 2025 18:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457364; cv=none; d=google.com; s=arc-20240605; b=R+jEJlQ3eK3EuP++iYVxsgaqOPVQ6tFgDJeyapNWvqp+NQ3pGqW2wqGoT83B+VX/RJ RNbZaZ7ICun5AL0vy2MX11wiNVSo3OuOYFyYcDn2yeNIA2i1wRjcWSVV+ZqsyfXFeFXR 9MzPh2g88Y2Gm88QLvIwpQ4DlG1eTrdRxZUexyIStwB7rb/xE4/QmDUcEnDeKj0cRy/B yJiJKAfInpJy4MXITeHjbPBmk31duamLVHqRuFFFn1W/FTTDWIHLMuDmknphkNbBIBuU RA0f25/IHfE6eSicqwstkYQTeuQnwELVStZi2Gkjnmy0Bz7M+BFv44pn9bcrS9gDUbll k75w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LNFmdxDxWM3CJyEBqzg4trONxoTdvHt+45glS8i3gj0=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=MOcQlfEAgp2NKeF8ksTp+4zOUVBfzl0slvtMkV8no6D37NJNHQBoW+a0mT5fOuF+0Y 88O1Som3UqNkE/rB4EQUmZnrC6TaZb9gqMyzRIeKUef0C5iHwgnvZmSRRJBol+mx/sYi P4n0HljlhkhnPuOSNgD0a5CtOG5Iuboder6jdTjtuRLoCVHS0RriDttgdacgVEKKX6AG fCr03sTCFjO/ro/sSnMA6Ur6K30PJVQ2tPHC5Bqdc5r5DLb8TWI60kMT8pRR0r1zat1A S88Emic4zvFMutnRQOdA1rD8oWkQ3rgis3OduOBqmiJ+0kQmUI3a3bdbduUWALHhAbEl z1ag==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=diHCX95s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958c9ee9esi24299285a.1.2025.04.23.18.16.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:16:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=diHCX95s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kua-0007ei-Fi; Wed, 23 Apr 2025 20:57:57 -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 1u7ktL-0005Zj-PA for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:39 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktI-00053r-Tm for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:39 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-7399838db7fso512401b3a.0 for ; Wed, 23 Apr 2025 17:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456195; x=1746060995; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LNFmdxDxWM3CJyEBqzg4trONxoTdvHt+45glS8i3gj0=; b=diHCX95sE8T1ce9NAW8FSJOUzskMja6JVrbwgwgtnFhYxc+uvzkTQra2N4YowSrteh Jk04MY0YuEAUH86GVZZK8w8RQx7Q/vOUQ0MfAG9mMwT81dXyycngS/A3ZPmx4T9P65RJ 2/rrHM+B0tseRI4HA2gD23gciniDlt+MWZEBs4cWLIEh8+xvn25GsqHQQsR/7XHXUsRC /FM3xZl5TIIpxby3pL42HgGApkUdXE3yekLw8tlpsPSXJPzPR7jz4kUhH/AWxIAtyzfV XWCL4tbN67hTFORhsIBFSXY8f+L9c+va7d0vUXG8p9dBu3pB9l+POpm+HZUzUFul3q8E XO9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456195; x=1746060995; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LNFmdxDxWM3CJyEBqzg4trONxoTdvHt+45glS8i3gj0=; b=JlnI6YIp916H/24nWSbvxndII9G5Tr+J9ziDGhF91LCcdc3ADQEKsjZDkdDBujzwQk irZ3k1Ia5nIzUFpl1m79gIoqNdtJUSiaL+bzqFmXTc7bBxUj3tD0xvyWfJZIjrsMXPOI Tcw4kXbVG0adhf1FDRRH7EogbHmwduehybFh0F+sKWCLOMBsBHmLhn9QwT6ieV5oJaZg I5NHTHc+Izto/xl/BiMT8AsvTtTUpUl7WGh2GgWpwvHdyLE1ebPqo1UHb5O12CZD/3jZ lx2bXEVxoVUv4/AHmPweecFNKo/LwlReS1wE6q45t8sdypDwBr3WzR+50zQFK5Fi3JU6 wk2A== X-Gm-Message-State: AOJu0YzvoSI/fcFJaIlZiVtLHrAekRClBT1Lh7T5DaDArY68DOSLzzvk DIgegyGq7za++yQKtTmA83oYQVCMECSE1efQNdntyaioAzxk6AhI94HHbldOaLtU4ciy/Tg04JF D X-Gm-Gg: ASbGnctUxv51AeiYzBGBoFANcajK5pdRwPVkgFrF0nkydnFolZ65amMXcBEFqxbFFch XpbPZjGQtj+jiOPCylXcmf/QbIJ2mXu5L8AFUBb+2+CizlQom6riGLCqlTkMNSBIVjR4u/nWw37 OmfNugpMn11mTglB77o6qXY5IuSCrYZeppcPe3lLjpS7jq/LvAjvtNHJSJvDgp0KRidPoDXS8ff kv5MuitbzAKM0Aosucg3lv2Ubo6gZVwvOog/IYi5kK4EVxdLJbjg68wXUYQiA12uC+Bz3IVLg9J jEEpm7D3mEbtfbegTEVX6Wo+oQJd5a6Qd1GJO0554+mJr0OBCPb7hMO+ECKKxvElY+4vTGd+pBI = X-Received: by 2002:a05:6a21:204:b0:1f3:1ba1:266a with SMTP id adf61e73a8af0-20445af2509mr477405637.0.1745456194685; Wed, 23 Apr 2025 17:56:34 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 080/148] target/i386: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:25 -0700 Message-ID: <20250424004934.598783-81-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Move x86_cpu_mmu_index() to tcg-cpu.c, convert CPUClass::mmu_index() to TCGCPUOps::mmu_index(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-10-philmd@linaro.org> --- target/i386/cpu.h | 2 -- target/i386/tcg/tcg-cpu.h | 2 ++ target/i386/cpu.c | 18 ------------------ target/i386/tcg/seg_helper.c | 1 + target/i386/tcg/tcg-cpu.c | 18 ++++++++++++++++++ 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index c9f39e99d3..0ad67fe0fd 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2597,8 +2597,6 @@ static inline bool is_mmu_index_32(int mmu_index) return mmu_index & 1; } -int x86_mmu_index_pl(CPUX86State *env, unsigned pl); - #define CC_DST (env->cc_dst) #define CC_SRC (env->cc_src) #define CC_SRC2 (env->cc_src2) diff --git a/target/i386/tcg/tcg-cpu.h b/target/i386/tcg/tcg-cpu.h index 53a8494455..7580f8afb4 100644 --- a/target/i386/tcg/tcg-cpu.h +++ b/target/i386/tcg/tcg-cpu.h @@ -78,4 +78,6 @@ QEMU_BUILD_BUG_ON(offsetof(X86XSaveArea, pkru_state) != XSAVE_PKRU_OFFSET); bool tcg_cpu_realizefn(CPUState *cs, Error **errp); +int x86_mmu_index_pl(CPUX86State *env, unsigned pl); + #endif /* TCG_CPU_H */ diff --git a/target/i386/cpu.c b/target/i386/cpu.c index fd85663833..57f62cc869 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -8664,23 +8664,6 @@ static bool x86_cpu_has_work(CPUState *cs) } #endif /* !CONFIG_USER_ONLY */ -int x86_mmu_index_pl(CPUX86State *env, unsigned pl) -{ - int mmu_index_32 = (env->hflags & HF_CS64_MASK) ? 0 : 1; - int mmu_index_base = - pl == 3 ? MMU_USER64_IDX : - !(env->hflags & HF_SMAP_MASK) ? MMU_KNOSMAP64_IDX : - (env->eflags & AC_MASK) ? MMU_KNOSMAP64_IDX : MMU_KSMAP64_IDX; - - return mmu_index_base + mmu_index_32; -} - -static int x86_cpu_mmu_index(CPUState *cs, bool ifetch) -{ - CPUX86State *env = cpu_env(cs); - return x86_mmu_index_pl(env, env->hflags & HF_CPL_MASK); -} - static void x86_disas_set_info(CPUState *cs, disassemble_info *info) { X86CPU *cpu = X86_CPU(cs); @@ -8922,7 +8905,6 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data) cc->class_by_name = x86_cpu_class_by_name; cc->parse_features = x86_cpu_parse_featurestr; - cc->mmu_index = x86_cpu_mmu_index; cc->dump_state = x86_cpu_dump_state; cc->set_pc = x86_cpu_set_pc; cc->get_pc = x86_cpu_get_pc; diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_helper.c index f4370202fe..9dfbc4208c 100644 --- a/target/i386/tcg/seg_helper.c +++ b/target/i386/tcg/seg_helper.c @@ -28,6 +28,7 @@ #include "helper-tcg.h" #include "seg_helper.h" #include "access.h" +#include "tcg-cpu.h" #ifdef TARGET_X86_64 #define SET_ESP(val, sp_mask) \ diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index b8aff825ee..818653ee6d 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -94,6 +94,23 @@ static void x86_restore_state_to_opc(CPUState *cs, } } +int x86_mmu_index_pl(CPUX86State *env, unsigned pl) +{ + int mmu_index_32 = (env->hflags & HF_CS64_MASK) ? 0 : 1; + int mmu_index_base = + pl == 3 ? MMU_USER64_IDX : + !(env->hflags & HF_SMAP_MASK) ? MMU_KNOSMAP64_IDX : + (env->eflags & AC_MASK) ? MMU_KNOSMAP64_IDX : MMU_KSMAP64_IDX; + + return mmu_index_base + mmu_index_32; +} + +static int x86_cpu_mmu_index(CPUState *cs, bool ifetch) +{ + CPUX86State *env = cpu_env(cs); + return x86_mmu_index_pl(env, env->hflags & HF_CPL_MASK); +} + #ifndef CONFIG_USER_ONLY static bool x86_debug_check_breakpoint(CPUState *cs) { @@ -112,6 +129,7 @@ static const TCGCPUOps x86_tcg_ops = { .translate_code = x86_translate_code, .synchronize_from_tb = x86_cpu_synchronize_from_tb, .restore_state_to_opc = x86_restore_state_to_opc, + .mmu_index = x86_cpu_mmu_index, .cpu_exec_enter = x86_cpu_exec_enter, .cpu_exec_exit = x86_cpu_exec_exit, #ifdef CONFIG_USER_ONLY From patchwork Thu Apr 24 00:48:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883889 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207699wrs; Wed, 23 Apr 2025 18:23:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWTXcqY7a49ttZ1QH/HaK9oJbQretCBBgbFuArltrKyzhFA8er/B2OjiOr+LUhYI/5ZCrDShw==@linaro.org X-Google-Smtp-Source: AGHT+IEuzXbXwTgd7T6TfFblHfY1DjaKOVhgCBXHr2wnA57N+K9HF82pR9sVvyDj63ahKghBh00t X-Received: by 2002:a05:620a:2a0d:b0:7c5:5768:409f with SMTP id af79cd13be357-7c956f4ed7amr143572585a.57.1745457810915; Wed, 23 Apr 2025 18:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457810; cv=none; d=google.com; s=arc-20240605; b=NWHsgUBM2nISgGThIPBtdO3gKPnECYsZyZ2Wb3gZ3rXYNZc4niz9ili4v+S6xbn9bg JDH9l/GAOFemKpbGnFBVt1Ho5W95kED7UdHJ/arDeMwBgIMaiI7yKi9GSqI1iBz1QglM JoQo1h3vqid8/1AxRZqSfTq1WbYedFwcktzyD37oMj5Tar7E/t8J5QwQljKnwU62cQCv mLLhW9kJge/P34MMazSDUGtScS2eh5e1lfQkH14Jr5a1hOAwZ0N631WBGmZDauIMk4wa U7V7LVVC1pHgD+rxjCKUcZNOpf7UGxt4xaem8WdXzUzmXS0jWEjxa1YUeSlM/UkbFI2Z uM2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s+vJSXjRAVXeTwmKub0ZXgQhIZDI7tyX9VxiyklcrIY=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=LCMlQ3NjDe2wdlWIPc3mliQHRNybJccRGyITbNrGCzEuSjYeIRP7bHxtJgtwqgjlsR 6woeld7p32iLaYa0X7Pb0WDF9pdHEWprX97L6EqYUXv2D3tEgwtSyZP7GJuUQH3WUDcB Qd81SsYqHnTAHniF908XYA1hIgKcEsxLBLFj8VLmfm6yDhig3kWCoQa7xmc97OKuQFIZ EvzGxYbyUm6KReMd8zmkka329AV7TIqGRpyKvLCMoRz9RWuuHRQjd7PDKOLisOCWXq0E Wr3mqJ85gM00AW1xGmnzgLztKS59Jelotlck6BeObTMkbmivQvWC7p3C/xOX3JJy9jFc pPFA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fULYQO/p"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ea0a89si24357585a.333.2025.04.23.18.23.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:23:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fULYQO/p"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ktg-0005v8-5p; Wed, 23 Apr 2025 20:57: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 1u7ktM-0005du-Q6 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:41 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7ktJ-00053u-B8 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:40 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-736b0c68092so333572b3a.0 for ; Wed, 23 Apr 2025 17:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456195; x=1746060995; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=s+vJSXjRAVXeTwmKub0ZXgQhIZDI7tyX9VxiyklcrIY=; b=fULYQO/pU+Tg4jDS/zih4ACm+yLtWO5zut5qJlD/k02oA4pCxtLoaYMkLwxly124zC Jw7eRaox1ewXljDdaKi0l8EJs1IkLo18xuR6Qf3Gf/o17udXOmhlvawU3u961vt+mukZ hOS8uHnlQICQaiXPvY4yBB+k7HiKptjfdopapM8TT+g4SYzzgmQ/IWXNIn+zUtWMtDnw /6k62f1knDJdVfLlqIC1QxQdEuJMhDvihEn+TaCKDYzXNWsqaP8oCagqgTiyC52NCJP7 cChozm4tGUBjGF2fFpfs9YDPI+RQFeu3As2oOOtaYDxiwi5FKdiu5VRzQYk5EFgA+Qhp Q/jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456195; x=1746060995; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s+vJSXjRAVXeTwmKub0ZXgQhIZDI7tyX9VxiyklcrIY=; b=TUOdckQ9shXWucqDyGKoZpDRr2mAtnutGntGDy5l7Uc/GHUYOchIpwDVayxMFQavVd ahubUfe/kSvIQzCIsi2KxEel/eu5JUoHbztiWzp4o/kqyeOZGsfXFA062bQbeq7pwv8U KBLMmstHjMLl/uMZR+JXYs/iGH6jc3FnkXkvG5UGCNY6lebGaKKMatBimV3OxcnEy2tU Rj9ISyct3a3m2z5l7ZVt5g+mQk0wtLAuQQPCt5nTELQFAznYde5I45vzr9zeGom4mLE4 aDv/ruReo/MeeiJA3LLBkT9h8WQ/nFAl4VGNrtuYf5jDwlvw1TZIuNaQ74bh8iSUzgPw +Jqg== X-Gm-Message-State: AOJu0Yw0lXiIEOlPuM5DWZJbWUV4XWp3KTHbjuprxWaeDYmfrmXLTHsr 0BN8fJsVsZdeFfhyGpEUszMhhxrlHfiTKmqicMlD2gBgdyGv9wQIu9bd/63w1NGRzqLjPQ4Ifvz 2 X-Gm-Gg: ASbGnct6AXLtyEKqRnFNWYTLafndxMzCGIgBFgpcS/RdEqrG6TVQIQoQS6j7THxb9YC lXC7uJ5yws5/zzQlgR9wTDDAdzU/C/xOyU2bNzzb9c/q82qeBsl3LW8qX06vRpFZqjTu3LShtv8 eiCtElOfmmIBxmrW4LvjTn0EdIuiAmRONSI4aUFz4Ut3ZchIEuNgnf/mQciON5xWIgtPk3/nSZZ MbgfWD9plW+H/F1Q8XuFLY6+LYgo4/n8WN8Ardeif3XMtZsUKPKRZGRHC/GcmW/7xTwf8APnTRr OjANp92hQQHXSSFhLdLN9Q8JXJEOBNh9D5H7aFkZd4v82rd3yQP0ThJLcaebq9PajV9Gw59lUUg = X-Received: by 2002:a05:6a20:7493:b0:1fe:9537:84a0 with SMTP id adf61e73a8af0-20444e9b3f1mr931958637.15.1745456195354; Wed, 23 Apr 2025 17:56:35 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 081/148] target/loongarch: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:26 -0700 Message-ID: <20250424004934.598783-82-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-11-philmd@linaro.org> --- target/loongarch/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index ea1665e270..cb96b17911 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -868,6 +868,7 @@ static const TCGCPUOps loongarch_tcg_ops = { .translate_code = loongarch_translate_code, .synchronize_from_tb = loongarch_cpu_synchronize_from_tb, .restore_state_to_opc = loongarch_restore_state_to_opc, + .mmu_index = loongarch_cpu_mmu_index, #ifndef CONFIG_USER_ONLY .tlb_fill = loongarch_cpu_tlb_fill, @@ -919,7 +920,6 @@ static void loongarch_cpu_class_init(ObjectClass *c, void *data) &lacc->parent_phases); cc->class_by_name = loongarch_cpu_class_by_name; - cc->mmu_index = loongarch_cpu_mmu_index; cc->dump_state = loongarch_cpu_dump_state; cc->set_pc = loongarch_cpu_set_pc; cc->get_pc = loongarch_cpu_get_pc; From patchwork Thu Apr 24 00:48:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883808 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199798wrs; Wed, 23 Apr 2025 17:59:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVAKXfIsjP52JJFps9FScPoEGP9G/Cu320IjrEfYzHJwPovd4UnBQmA2sgKoqqSOsXkAkVMbA==@linaro.org X-Google-Smtp-Source: AGHT+IHlD2op5J3vQzDbQE+Uve375Tp5XBcRlGUegpVVZk8nxAovGvTtXJKyrsAdgqffq/fwWFt6 X-Received: by 2002:a05:622a:15d2:b0:477:e17:6b01 with SMTP id d75a77b69052e-47eb49b92c6mr11090301cf.43.1745456348572; Wed, 23 Apr 2025 17:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456348; cv=none; d=google.com; s=arc-20240605; b=eomMeUZtdq4lQxwEHnC67ZpXRP11GSRBwTdjuf+EpmoKkbzaDMWKSNJt2gXO/Mu4ai ecAMP6Ppd0AAUOc/WMdkPxVGo6l+B/XC+6/clOJ5PAMEYxSyehG+383dGrXQl1jXMtQU 1NGiwiLJvHRDCc8g4r1ew/JinwoQY/Vx4yM5cTBJuO/AgW1nv6UQfF13qQxidSrMA15N m5SGNqEaHsxGltEy+11Hd9st4t0C5M93GbhLUEhdl4fg0q3L3jJQuDrtu6neea7rw0m0 /0/vpBTYDWpXvl/dhu8HpP6jziHTJBVbPMjv1i0Yk0flToK0tGLfTvB0wpGl1Pm7kQ3+ lyxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I0+phgtXpTHu4kCbYiaq4DT5v48KX8xhY8CEe+xz2e0=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=i3o2sCZ9csK5YzI2Hz0yOyviwyXqcHwcbgcUoS5GE5ir9i96LawF3Hf9Fj37g0J5I7 acX0+GcHmyb4QqetgtmGHrFWN47idj5dsBWa7fG+pNFRnx11vPcTrK6WEP7y7Vy0Q2zL o0zm42gQ8VxMdNN6Ms8y3SYBXUfretfS6N1drtoGJNGVgNOceeSoLWNjz02K3V0RrS/h K/MrxE8K1xg7RVqpU2Rh898Y24mygpOMVklNnNFmVuHbPgMcSdGG0jRz/juvoHMkyvTb Ez2QnNobWPhEqONRzsqrOxLX9oX/gCunoCQWB1B+k7MhbVKoSI27gSZ86rj/WsKc4u8d a5HA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hxUZikZ8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea25ae363si5038251cf.502.2025.04.23.17.59.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:59:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hxUZikZ8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ktd-0005oM-Cs; Wed, 23 Apr 2025 20:56: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 1u7ktM-0005bh-29 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:40 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0: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 1u7ktJ-000542-QH for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:39 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-73712952e1cso396431b3a.1 for ; Wed, 23 Apr 2025 17:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456196; x=1746060996; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I0+phgtXpTHu4kCbYiaq4DT5v48KX8xhY8CEe+xz2e0=; b=hxUZikZ8YAUWDnqCvH5c4nOdOqrvRevkrycP34nOmtsPMGZQcNYNVYUdnOC32HgKWB IAq9IjRox1u7pIpqsowfk4o3GEwoaSx75l/ckAgRSJnZ15ZvfABiLNub9XitTX1AvF+d wY1yrnesaROoDZ6FVQOclNvqYFbG6fx6V4byBJ1GaX47L4EaZmgr79AmVNmhKQIGg621 ud8vcfgT1p0L2fAMkXiGEJZfsuOAuCXiMWWGy6s3bl8yr81ZphxAG/YcRg46glaLaQ78 Zk+PwPdzzIM5Pl1ppI8cR2U/pYttDaF7MRfIA/Z9wDHt1rEAkQNkRXxOgog3f7ywZZSN 65UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456196; x=1746060996; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I0+phgtXpTHu4kCbYiaq4DT5v48KX8xhY8CEe+xz2e0=; b=Zai8prwz7WubjaHZJQCN4sQgve3PTXK2RXZHwos7jOvFTtOWSpUyaGCfxRaiIgP+c2 nzJNc411Or7227zKMvSZAaDOhIs6uq3zsGWtwLspM/7QqMvUKAMn/U94f/oYcvNeYgsy bQqT9tk//9xhTtKHmhLo6rGE3CIn861WxGuX8nyh1DQ5HSyN3tTT7LuO1IhV22JxPi4H LeBD8VS3EtgIsTQ39PBo1ETYDfegEWvRyGJkjHKLQuqI3uTDJTkAyvvXjZ4311qtXjG9 71HPF57BjkxYUxQa2GrNwiy4kn+hRcwC0msuHZ9I/L7VAbOthH7Lskbp/SMj0hxaZxu6 7knw== X-Gm-Message-State: AOJu0Yw4J2ImvbGzrJ7BpC2Mmau7RkpKeJ7vdcFhpzoCgoJpUYLDOhph mzl5xzrJD97e6L8TpYouHXWIdl9TV68ACT5pNc62S1WB4aM7qDJQn+6Hm0pJBEQN87VJJgQqEhL F X-Gm-Gg: ASbGncuDcBcOeoyQYVWUV+4zKqxTpnoiJT0+vqNGuzpc3VhcN8y3NGZC6pADzRh7DeF hS3vn7uMJU0lR1gj5GyH80Icy1CCQEInuxar3gYoMyHfaIzjNmMcFnqkjUNt2nKKMYyIHUjdzG7 xzb52r/R6cEM688Ko2l0RZJUGWSLycPQEoAkP1RGXFhGLdMm2Eo5wGnSYhVQw8UFJX+KghJN8ra epcqioLtyKTChb3zRELLuzYjKyRZgG6hiDD9htSklrz9UbW9E29ISXDi/0KHgYqgK0/nZlAjEwf TDWnE+fxLnQ5AQe3KNKnQ0QAAWkMxg1ubAuyAJKDxL9M3DiTml5r1Cie0Z0HMdMdgS5OomZxWy8 = X-Received: by 2002:a05:6a21:33a3:b0:1f5:59e5:8adb with SMTP id adf61e73a8af0-20444d1f250mr899488637.0.1745456195960; Wed, 23 Apr 2025 17:56:35 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 082/148] target/m68k: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:27 -0700 Message-ID: <20250424004934.598783-83-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-12-philmd@linaro.org> --- target/m68k/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 0065e1c1ca..4409d8941c 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -592,6 +592,7 @@ static const TCGCPUOps m68k_tcg_ops = { .initialize = m68k_tcg_init, .translate_code = m68k_translate_code, .restore_state_to_opc = m68k_restore_state_to_opc, + .mmu_index = m68k_cpu_mmu_index, #ifndef CONFIG_USER_ONLY .tlb_fill = m68k_cpu_tlb_fill, @@ -615,7 +616,6 @@ static void m68k_cpu_class_init(ObjectClass *c, void *data) &mcc->parent_phases); cc->class_by_name = m68k_cpu_class_by_name; - cc->mmu_index = m68k_cpu_mmu_index; cc->dump_state = m68k_cpu_dump_state; cc->set_pc = m68k_cpu_set_pc; cc->get_pc = m68k_cpu_get_pc; From patchwork Thu Apr 24 00:48:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883885 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207381wrs; Wed, 23 Apr 2025 18:22:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUcAPi5jnoK4ZTlIurQc04jjj+SK7f9ua+BhJxMEO8gf9m1JXRZ6irAWcIz/kCCj5oLPMukeQ==@linaro.org X-Google-Smtp-Source: AGHT+IFA3GTWEIfJ9B5zfqCXGA7xKxq4qEw4z15s3FCSSWUWT2y9umsHyB0sL0UOpAJynBteqIIv X-Received: by 2002:a05:6214:4005:b0:6e8:ede1:237 with SMTP id 6a1803df08f44-6f4bfca0c19mr11195526d6.43.1745457731640; Wed, 23 Apr 2025 18:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457731; cv=none; d=google.com; s=arc-20240605; b=ewKfj6ROsM5AbJia6SmTU1fNyXqhVw530H+sw0flRx+oNRixj4fcwRVK2MXpzqZJu5 clMciOOLVQH201mhlLrr98Cpz9fGbwhex1wbGy5X2+iMm4Rg/XeREVFmC3LcgWXiQpn5 7U5sFuhpZuyMZRq/Gi7sr6vAGtBFeGGTwp27/xmT+olZ77feKnBunhgKK91Jc7Jr88p1 cLjOOJl1qJq7OIrDvAEHAZCBaIlADyBlH7jJZNzdt1lyqHDvxPaVjAkAY0ejo5W/Ctj3 SqNJirdNrgbkXUm/krFZ9h2r2PsFIgZTxPmFJza8IFy1OIX6G/77hYFHR1IcSFguL8w/ u7wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=V36uY+E2YpMl5Y6J3G48zQLEZwrQ3yY8b7UF9x5stjE=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=eekPBeUCb4FQYjMYXCr+25P8sScwFIeSz3Ydzi2kXn2bo5rlLTXg51mQtax+Q3Qpad XwWF3rTbvHyEHd+gaMfyWbFhpC1/aaFrmLeLMoHdCT8lZ+dHACVhdLWzGAZSYdZw4Y5j RXJ4gVoYJi1EdVy21yfj3SBgDlJKuPSHBkkpA5LtvnaRIoa/yn9ucamQ7EBfvhkR27XG N09nGvoIU9b1PE+3YGWdTBxKw6SlF91k4240NlGz8Gd5MzIge0rPsZZopwpr87Ryj1uy MHhT83+AhHuTTfeYqRK+D2sSiLqTXktyqM2VOeaaiB4FWvDs6qcql1VeGmNVCt9I6AAE h72Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JLXhnD8O; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c08d1e51si3888886d6.101.2025.04.23.18.22.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:22:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JLXhnD8O; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ku5-0006Tz-LG; Wed, 23 Apr 2025 20:57: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 1u7ktM-0005dM-If for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:41 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktK-00054B-Ap for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:40 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-736c3e7b390so371053b3a.2 for ; Wed, 23 Apr 2025 17:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456196; x=1746060996; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=V36uY+E2YpMl5Y6J3G48zQLEZwrQ3yY8b7UF9x5stjE=; b=JLXhnD8Os5V9Puh3SsCig2FBdA02ShwrTSbOtOwydvYiOQj3kA8p6uekPKQbAMLG/U phJHq6I3+dRQAvZpdmtC8iPs51EJXU3mWxU7cQ3o5FLVkUAKRPCDfwpZZJWhIjNu374+ jYG1v9xyH08g4Bg5gs/ycJV0v7BL/3SwvPgRZelUQoJCzXGUy/ubpEafmbLwU26dBmld UYCEnzLxlqaiud3BHXFkjSNzC8bdStBP54d7Y1FDawfTHlWevymg3Zy/t4vUBkXkzl1h 9C+6+0ekK5w0PZuE1pfF/MVcXaNwPEe3LyP6bKp1lWCIV1CwHLyoJS7t6RGHMtJNZQWC k78w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456196; x=1746060996; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V36uY+E2YpMl5Y6J3G48zQLEZwrQ3yY8b7UF9x5stjE=; b=DYkPx9oTdb2gevsxxnkkAApOB1943VfUTfcliU6P8i5Xa8mfVet0QQ+LfhafB7IAGa 8reAvyuYAJgoFjSN2isggtH4uuqTMOQbayLXfzpimMCKAz66/ZBwQFxTQN4v+HSQlWIh iMLUTr6bZsyF3RuiwVWwbCP+DfnOymhIiH1YNJuDgzS7GgR+psA/JMybJkzp9xc8rA/W fqfvtAbotLnKgJGDEHdz3RG+d0Esi4As/H6yRhCc3m9lVU3accixyXLPMcpjUlQhE/lO YN4h0DtMmAcYwqW/jH9YlOxCnyztvSn+Qj9nezUZAFCnt1TSe5V0HAFd8v3ewGrLwB9+ uc5A== X-Gm-Message-State: AOJu0Yyg/0pr1qazTBH8/+nY7tz35a6KoZ+OHPIudyLrBEAMXmcwo7qP 6JxRXs8l51wEhBsC62LIOwvsEhYQdDUvMb6mMlRYs8JWIqsY1ObzXSDS/WaUDJaqNOdRouVNWPY N X-Gm-Gg: ASbGnctdZFeeE6SVhnwE1XXFQjVGGL7BjaLEXCRCCnvpx06PIShbrBr0P55NkawccoS +kvoCGPeDXwBqmFJh0MohJxI+ZLUTVmVXatuqMaq2l2VT+N3VI8FRDrCTLWSDVYMQ8f8AYRjoKw FtFXYNb9aJ1w9To7bYlxV1hV9cunv4XXujdilx8MsqM24zeJHDCL4GiM/lsTvV7TtcfE8RWdJ1C Og7TaPn6rXXcQWSFazdLJ1or4nyh9SSZauj4l7qz6U83OjPui4fjGPtQp92kqRlvOO5FTQ55iVK QSV3Y4ctlqFk3R2whj4sdpwMjVPvyqasWaS5Wl4fPTitvhzH8lvtZDCrvGyGxyW1xU5x+9un9lI = X-Received: by 2002:a05:6a20:9f8b:b0:1f5:51d5:9ef3 with SMTP id adf61e73a8af0-20444f09a27mr915259637.20.1745456196579; Wed, 23 Apr 2025 17:56:36 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 083/148] target/microblaze: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:28 -0700 Message-ID: <20250424004934.598783-84-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-13-philmd@linaro.org> --- target/microblaze/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index f3bebea856..88baeb6807 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -431,6 +431,7 @@ static const TCGCPUOps mb_tcg_ops = { .translate_code = mb_translate_code, .synchronize_from_tb = mb_cpu_synchronize_from_tb, .restore_state_to_opc = mb_restore_state_to_opc, + .mmu_index = mb_cpu_mmu_index, #ifndef CONFIG_USER_ONLY .tlb_fill = mb_cpu_tlb_fill, @@ -455,7 +456,6 @@ static void mb_cpu_class_init(ObjectClass *oc, void *data) &mcc->parent_phases); cc->class_by_name = mb_cpu_class_by_name; - cc->mmu_index = mb_cpu_mmu_index; cc->dump_state = mb_cpu_dump_state; cc->set_pc = mb_cpu_set_pc; cc->get_pc = mb_cpu_get_pc; From patchwork Thu Apr 24 00:48:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883845 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204002wrs; Wed, 23 Apr 2025 18:10:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX5KLiHOmTIvLBHSp4gj27AT+rzyBmmdXqmlytp5uipN2SppO6qx7JvBl5Bo98dZAHheKPZOQ==@linaro.org X-Google-Smtp-Source: AGHT+IGnk1Tdkd4KPe8uGzkBwtItNuCPerRNFiLp9gPeuCSdX4+bmDnZ0F8su3wL7Yu68q036AMe X-Received: by 2002:a05:622a:1a29:b0:477:1e66:7442 with SMTP id d75a77b69052e-47eb289336bmr10393141cf.5.1745457034058; Wed, 23 Apr 2025 18:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457034; cv=none; d=google.com; s=arc-20240605; b=Juuc5olLiTzo2A6SP618Txy4IWW+4fIprifZ77Q0Sn6FWEqYE+HC2v/Fn5CHCz4UHJ IZIKPPZO7GIBH+MBaSoK913vvDuDPLS/s5odeAbsdAt/ag882BlqTJVcKqSdbrjo940u 0PVLoGrXmkajngotd2arq/Wu7ttvH98YbOxC+pjqOjp4emXvX0g2S7kjypDnGBZ7WGTu j/xE/05tGSMbjJf3cHE3HMvfPd4JTnDBQJNk/yyeOLF/6YJNq3HNvoB2p/3dmkAegDFh z6tpGfz+TzxXS2l+YkrIDNtn97NWafGNTiieuqXsxSpVxwGSD5gx4JhVET+laSNv6tzT n77g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JzXShXwzyB8CledzBeBuUJAwXnIfvn4Gim3OOlxSSgw=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=eHxj12VKZ5vvXzI7HG/bmmCRXltcxHsk9GPmzj5SVGeOi0QlaSYtxDLTbz758FRgTW XYmiXi4idy2DmKAR4P+zGw3xI2rt4hF4L+nFdDqtwgr1z8n0qDkHQoPwZrUQiG3YJ6Ws rvb/g+1S0XeV1oaJ3XewAaFB7YRJiq9XTGyUg0T9Me3CQmuM8FoBeLvvRFzeH2zV3zdA 4DR3lW223Za6AGV/gu220g4V7Wi2uWUjY3LZqJMd1kXEisf9//OcuxyYahpgxJ0y/eym vZU6BpmsCSgT3RQ35WB2SOSRkRM0apZTsOr33CrxwFtm0aVAbLcPNAya6v+Qzk784x08 OpGA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pnypngI6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f2cab9esi5948811cf.116.2025.04.23.18.10.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:10:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pnypngI6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ktv-0006Lf-CV; Wed, 23 Apr 2025 20:57: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 1u7ktN-0005fb-7a for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:41 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7ktL-00054G-4E for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:40 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-739525d4e12so359765b3a.3 for ; Wed, 23 Apr 2025 17:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456197; x=1746060997; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JzXShXwzyB8CledzBeBuUJAwXnIfvn4Gim3OOlxSSgw=; b=pnypngI6uF2OGpN7yQpQ8xvmGc53t+vJe+rCjlOzXSNVkiBBf+3n+1glAB8kOXqpim arjjD37lAQipysU2zmd4CzfAIZ25/3hE4bCxP9SwqAPvdEPNHO76of3IvP08t2PG8jVB KSEyUCLBaA7tBtQHSR6Nr40XUSMsSmCytE+xV7y303qCQFktBkJMEhJimmsP7YV09pyV it1E5YldEDYBMHebNrsBEQnCo3L/OgEFHRBZPTdDRoadG+ocbRZQ5n5AB4Fz6Z+fZQpy 4PB/USaQKoTY907SNbZa5UYCR5xE7/Ok46pojUVNCuIr7rEvwh1yPCyK+ChJT2qZ+TRF Ln6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456197; x=1746060997; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JzXShXwzyB8CledzBeBuUJAwXnIfvn4Gim3OOlxSSgw=; b=L3qnINzSkNN0V4aqw1pu73T1LJkC1moQ0o94jfG9QoIhkp6/JjXq4a7R9z3hrpTzaR yTa7Oh+yZpVM6WYUkctLShZ//CjL1X1gcYOQS6PPU8vl+m0k1R26j0SLlIS3ACQYSsMi TpEfXs/GtY28EzrAK9hgef6tpLxkJMTaX57EyGEEBFFiCtZ4bg/YmofvVQZuHSAB2T/o OzJK78eO6c1zoWyo/35xZ8FWY1wuUm4+X31HeUcUiphHJT2Te9cd9Od21ppRQg0lMRDb 3DD5YflCFW3/5C5Yt8wrt5Zy/4ADa38ev5XrOnupiGG3hKnwU4Ru4SJ7YQwvMjLSp3Wa yc2A== X-Gm-Message-State: AOJu0YzZnuPesa7A5xfDgq1cb3PfuwyMheYEsJj5VW7MXNU/RJfCQsdY yDpBDSu+QbAyGBpQp77DywyoIl9zq116kGlkKpEW5hm4lueyU8iLFNoeWSd0mOEq/LSEXWOZxek i X-Gm-Gg: ASbGnctS+usiukZdP9gAGnhyiV+1LUU17gGmnK3P6inK9/uFF9rSKMUvtNUS3fRnD3+ XSC0qFNLljBAAsPV1RnXKlKp+XoUaQrWkrCQw4x3Mxf/AbAejbk/Wl9T84lg0SrX2vM44Sm6sEm tIn3GjVHpmquZGc/At+H1NP2LpWEq5H9iI6nfLxV44myQlmUZ9D/JKzn5umvNC+rqEkXohiKHNH P4UDynxq+jxLMQ6yqhkNATrAkF0niWl/4NzTXKgLoD6RFgnji6TbfYLAVWzLxSQk5t7Y8VRLESa oYW1KVSebNl77rRBrMsNQBY+z2Q2uFgftMtoIuQ90O/vZsZ2e69xfAv/ysn+XvWoWhsRfAy8dP4 = X-Received: by 2002:a05:6a20:7493:b0:1f5:8678:1820 with SMTP id adf61e73a8af0-20444e9a69cmr879139637.12.1745456197199; Wed, 23 Apr 2025 17:56:37 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 084/148] target/mips: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:29 -0700 Message-ID: <20250424004934.598783-85-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-14-philmd@linaro.org> --- target/mips/cpu.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 47df563e12..cb0d6dde0e 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -182,11 +182,6 @@ static bool mips_cpu_has_work(CPUState *cs) } #endif /* !CONFIG_USER_ONLY */ -static int mips_cpu_mmu_index(CPUState *cs, bool ifunc) -{ - return mips_env_mmu_index(cpu_env(cs)); -} - #include "cpu-defs.c.inc" static void mips_cpu_reset_hold(Object *obj, ResetType type) @@ -549,11 +544,18 @@ static const Property mips_cpu_properties[] = { #ifdef CONFIG_TCG #include "accel/tcg/cpu-ops.h" + +static int mips_cpu_mmu_index(CPUState *cs, bool ifunc) +{ + return mips_env_mmu_index(cpu_env(cs)); +} + static const TCGCPUOps mips_tcg_ops = { .initialize = mips_tcg_init, .translate_code = mips_translate_code, .synchronize_from_tb = mips_cpu_synchronize_from_tb, .restore_state_to_opc = mips_restore_state_to_opc, + .mmu_index = mips_cpu_mmu_index, #if !defined(CONFIG_USER_ONLY) .tlb_fill = mips_cpu_tlb_fill, @@ -581,7 +583,6 @@ static void mips_cpu_class_init(ObjectClass *c, void *data) &mcc->parent_phases); cc->class_by_name = mips_cpu_class_by_name; - cc->mmu_index = mips_cpu_mmu_index; cc->dump_state = mips_cpu_dump_state; cc->set_pc = mips_cpu_set_pc; cc->get_pc = mips_cpu_get_pc; From patchwork Thu Apr 24 00:48:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883888 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207698wrs; Wed, 23 Apr 2025 18:23:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVDaxISNbsiXpycqd/fVtd6KCFs5ZmoUMlhlwzGlaavhquDOPiwEEmfNCSkUWyXGtEbcJIv4g==@linaro.org X-Google-Smtp-Source: AGHT+IGAwMGKMfdEJeMFQ9cDpLsUIsZRHqV9WQgjGwLu3B/q7uzXn+LlGHYmBQ5dmMqgKtLffqwN X-Received: by 2002:a05:622a:15ce:b0:477:6e8d:6081 with SMTP id d75a77b69052e-47eb2792206mr12416381cf.3.1745457810831; Wed, 23 Apr 2025 18:23:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457810; cv=none; d=google.com; s=arc-20240605; b=Iko3xlhVNp/J9SpLHFj8boNxm0M47W9aClatKjG9VQh3fTh+tZ3WuoUv0pFuFRf1FP L9j6Byps/Ul8wSa3asyvMtCNARIGYfa0CQpwDmeaaMJmU41jTSltm4gZDRo3r8VNkPka CfBvZX+71gNaRrUFJMVGwtAOyvl3RXiaPqCEuEi4pXQm0rVxob4fat6WLOGEbjJ1a4pq VUsqCQHT2a3BBs35nHAoi5WplPoKFk4lBUo858jtejGcdeAV59WQIHs69SBIUA+LQQit bh/xVch1kpDTslzCpNXtLJVVBh53lRZimzuG7Vlwl7hloZqzsV0T0edGpSZHa3ywRSAt 3hbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LfrM+ZFsKrY5Zrl+zb7ZsXPhOM4tj+2Yc0NhZX/EHbY=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=lRLJV1lkYQqZz3hlUvJa2IEX5bP19Z25Yc8yjdnupVyBht1mSJe2pjUmK0NL5vnKNY Ddq+Xl2MSziO3Yf1PUZR7oD06ZPA5O0KDbV/qjtop+6xkweUy4penV4we8OUHXV4+oKQ II7C0ih0MDmOYFR014URQgVaQGZaS4cCHb4dnTnB9iE8xxa+DraMclhFw112Nqf/mECq 5eFu0X4g63IDpMX6wl/0mE2ZDKRvvc36JqRSgI2+NLZPui/ra9FzvTcCbb5AqYBBh5Rr 0FnEJedpWyA6x4ys2gi6QCJv7YshZk2MS4n+x1zceL5BF7NFaZm6sNfHnZ7W4Fj8fEyz GW5A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Kw/NiHkG"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1f974d9si5666001cf.411.2025.04.23.18.23.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:23:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Kw/NiHkG"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kug-00005b-7c; Wed, 23 Apr 2025 20:58: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 1u7ktN-0005ft-F9 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:42 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0: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 1u7ktL-00054Q-GA for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:41 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-736aa9d0f2aso524380b3a.0 for ; Wed, 23 Apr 2025 17:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456198; x=1746060998; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LfrM+ZFsKrY5Zrl+zb7ZsXPhOM4tj+2Yc0NhZX/EHbY=; b=Kw/NiHkGYBpsX4ErSi+a05xQO8gUB5TajRYIAJLHXGdlCAEbK5VGcw9CjXIZI8LA9+ ENSR8MMIS9OeOdHeMWTu5wc+Y0Y/U6q8dbwXzC4oQT9MixLrPfqa8n3Cuy0stBVGKyZ4 3PnA6j8du7vSevZ5QqLUERWfPJMEw2LBMFh2yt9JwRojKfIaRHr3fTf7JSfezSA/A5/r uCcV4sCGrm3KGloWunEJojkdoiX/xiPNBH0LhZeMMCea04mD5zU/qEasfJu1LFh3z7yu jXWyHFU6CXRLIHuNC7LJwZ/bkD6Psy9wNLEJTDocXar6E+3O7z7Ia+Ok0G5pxDypHFXB 0SVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456198; x=1746060998; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LfrM+ZFsKrY5Zrl+zb7ZsXPhOM4tj+2Yc0NhZX/EHbY=; b=IvP8wrtEgjHNj62o5UXN9ekQ367frusBGtNGKWeqtwMJZI2JJUEZ9AMNSZxq45L8dC FqcLl8bEPCekgkA1KLFTADAlxMC1PB9vIN0lKay68Sgtv3+hrlyASgFx+bmMHo+/06Vi Z9Tdo6CC0ee4KpL2AFfXx/zbLCsZtqjSykR5zwowI5iKRhemzYufwQHNwjKIioWBADGM QSuNnm86XnbWTXwN+lLYNIrKb06aO44ZkzS5PzQuOqOqcnjKyJz4u0/zNWf0w1AFwof8 ZnwaJjYkCd1hDeerA7YpX7KkZpvyeM9kkgp8kOUUTjd9ldLQeMxXD+UcEsmvMDdaKuPv 08LA== X-Gm-Message-State: AOJu0YyrXF3ZLCZY7cFThVRmLUrCFCCKh+aXWZP2mnsOT7y+Q5MHVA3H eoF8qLOrfQHV6Zjt2ly4nqmphjOrdeEg+BSxYkIAmBmr2abx4BUJlF2gRe1ua1L9gD134feRlld 2 X-Gm-Gg: ASbGncuHKgwMx05fx35kVIXmkEpjmQlbF4t68C2Ii5S8ToPvclk3tFUIWei1XDY612A aZz/+Q0B/W+lEvYpgy+mIvnoqL9/DJtaQzy0oiFIUixM4Kwng08UIHb099nD7+LmNPU7BWZzbqZ YplxK00yabzSUtD2xj0a09CvMXUlk4UZ7CD+mn6uLdPjas5gKf+5Z8uOJAd+PVxPpoYfk6zFZzd F698c2wOjnd0C8yZyYWsv3gxxkxZ3E3OIOo1pCLc+fMlAZW85Wa7E0JgpqsDtITH/7G4+t1B6OZ LLAsNUnhVQtudgrQlbDcU8hK8Mut2UaQilpr6jSx5O9lQSxPajJsCabWkX8DJZVBAi22OWDcyNs = X-Received: by 2002:a05:6a20:6f88:b0:1f5:59e5:8ada with SMTP id adf61e73a8af0-20444e71afamr897908637.4.1745456197805; Wed, 23 Apr 2025 17:56:37 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 085/148] target/openrisc: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:30 -0700 Message-ID: <20250424004934.598783-86-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-15-philmd@linaro.org> --- target/openrisc/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index e8abf1f8b5..dc55594a7d 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -247,6 +247,7 @@ static const TCGCPUOps openrisc_tcg_ops = { .translate_code = openrisc_translate_code, .synchronize_from_tb = openrisc_cpu_synchronize_from_tb, .restore_state_to_opc = openrisc_restore_state_to_opc, + .mmu_index = openrisc_cpu_mmu_index, #ifndef CONFIG_USER_ONLY .tlb_fill = openrisc_cpu_tlb_fill, @@ -269,7 +270,6 @@ static void openrisc_cpu_class_init(ObjectClass *oc, void *data) &occ->parent_phases); cc->class_by_name = openrisc_cpu_class_by_name; - cc->mmu_index = openrisc_cpu_mmu_index; cc->dump_state = openrisc_cpu_dump_state; cc->set_pc = openrisc_cpu_set_pc; cc->get_pc = openrisc_cpu_get_pc; From patchwork Thu Apr 24 00:48:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883892 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207860wrs; Wed, 23 Apr 2025 18:24:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWPYE2Qjd2Fi7gMXriX2MtlJGBzbzGXaZ+trzf6kFuUGifc5qT7peLX/4c77EZxVJ5373KZ5Q==@linaro.org X-Google-Smtp-Source: AGHT+IF6EP2BzSLFFSHUXJ4KEcX+0Fts6uYOEuuk3bJTP5OYZNL+PSKuTlzmQVaQoK0h0Zxn0ZZ+ X-Received: by 2002:a05:6214:27c5:b0:6e8:c713:31fa with SMTP id 6a1803df08f44-6f4bfbb8fbemr15169616d6.9.1745457851545; Wed, 23 Apr 2025 18:24:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457851; cv=none; d=google.com; s=arc-20240605; b=fSJN82WOeGz6W952GuwvqWDsgPeIK4e6HmLjnaM/D7mLKcmtvpqvM1AQoQ8OmB5ebM jrYgTQ/lk41uBF5hBsbT//8lUuwyTq49+OCNsWbJsOVqLlfj2j52LALhAMiigEKRqauD GzPsP2i8RMtCjRU/cTBDOzPcL5Lxas+7mYPL6SoCrga8UsB6ydGBQKPWWTt2COdInHWL +AlcAT3qpsDu8XT3Kc962giYqMKW19Uy+hdAO/ZjAr7fnBXNJ2QKvfiskwC2zfYcv9fF m3kfo59sWTpc/xeYJ1/XjbNgYb/9LTqmrtGq6Np5H0M0LKuy9FOv7J3wHB6SsAWP6HKZ s25g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wTTbJUYSutthRAHWERBfaY61+pWxicGlAYRiaD9+MBo=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=B+62B8S5I8G5423TDkveHK0OHGhAMzk3LZ3vdz5oqNWJTQQF2VwrLTgUvxSzklaW3A fP6PMllODusj813T2k2hmtXSBLrqo4aYlcvbs1ra9p+UYLSR95a3H1rmEu3w6BUy5g+k w6+STIgVLp/gMRt6Ao6RNM1OCccMbZCKb2DYj+NRTVU4IN+Qz4rPQLiSS26EtRUD0k3t dZQKPugPb6/W63sxEB0QjGsmF2ewdlg/sNFHpjXuKcTK5zKBo5DVCxs79fxRe9xy4RXc kqTaC/9JU9k6DxNVFP7Hf/geC1h2xnJSqBMVZqAuz+VaiE7gkUe97p4gtGkMcz+sGyjt s8Cw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qp2Y9nqy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1986e93si5575911cf.296.2025.04.23.18.24.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:24:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qp2Y9nqy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ku5-0006U7-M5; Wed, 23 Apr 2025 20:57: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 1u7ktO-0005j6-Df for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:45 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7ktM-00054Z-GZ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:42 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-736b0c68092so333592b3a.0 for ; Wed, 23 Apr 2025 17:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456198; x=1746060998; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wTTbJUYSutthRAHWERBfaY61+pWxicGlAYRiaD9+MBo=; b=Qp2Y9nqybqJqiicuKpqxwj3PVd6fWOtoymXUhxwg6mHS+QIUTqPms/1cfyY3NBtxLi pmqUebGCA5hv9wK+zZZomqjSqY6Chw/XAtIDrAEtPuvzVapL/MUlnR7wLRvVvOurjDGn qEiW+2JLgrs0ew/X8WD9ZTJ/MYZf72We6qKMLunPWqMIjSeCs4VKVeobKZ3jSFbTo9SB Xy8P71GA1ASelezUzfXja0NVuY2qSGsBl3Mrb5L2VfqT0tTeqYSpy24qWcF02tjaWRfq +lGd0tLnrKBH5jHG66KbTn+pu2FoMp53Lflqsn1J1NwbgcTH2CrSIQYJSPFs/OiokSrZ tkig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456198; x=1746060998; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wTTbJUYSutthRAHWERBfaY61+pWxicGlAYRiaD9+MBo=; b=bxwp8x2bwtNMzPRvDekMTxpmK3jfpsCsKEUNKtYOGuk7oOjqHCM4xqivfzkol4fk8D OW0HuP+MoGZdZ7H2eyxzn3fr9QvzioPbTXZMSsEdARbgXmWX911R08gWlStxieFUCEw7 LmuFNqcScOWHdD7DbPBADnqnUFwjrBR1Zrbl0Bc3ISB+HbIigK/604Uh65ZbPdEr/dtw y2xbTATAQAQE9F3AooR106DBfstTrE7rX5qm0g/QdmZ1D5k7ESadA4g/9BDwXIjjKTN7 O0LIDXvnlhdWQQB6nj4Ex0wGmfvhv6aLRaxqKi/tbcVRBsfgGjD8FAj0gkktqual+PdU EFIw== X-Gm-Message-State: AOJu0YxNPeU1kIg9MDHguOuKa0qS6Juc6HigPTkoUBu/N42hcsv5SWzB CVfNhH5DuxaVm0Qh3VNt5TouybtbGuxisNYfJ5j2Hp/xtCIGir50V7bJtJSkntrDUYfqgfJou+o 9 X-Gm-Gg: ASbGnctZC2HnWp32CHJChzfNH3F2P6RIL8rJ9bIiK0TAU+DvDXTiPApbSE10gMmIE3Q wR+mJbtggfiaUR3LVjvlWiEhxNEUkslHqpeAPI6zq5OWPOQ4S4BiLtez6pOKXXgey13CQLMPItY zCRVxYuiJk+0jq6tCDtmanW2JpjSn23luGp+glzjXQaKhbvHqEnMWLHJmgrjYrTVHBFA6xnD0Yp dfKjaeGqVIPkjNkXw4Wenkf5fmIaVpzmWWzpOCTqr38uzOj+89TVJLJD9FKhyn0oWxpv4C18pN7 gi2HMBd+QqVApAmS003btRX1oa/ZMKXremlPCR9B4hDdXSuAG+tBX1CYt2+g9+FT3zB5jY2eigM = X-Received: by 2002:a05:6a20:1587:b0:1fe:8ffe:9801 with SMTP id adf61e73a8af0-20444ebe04dmr839253637.22.1745456198415; Wed, 23 Apr 2025 17:56:38 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 086/148] target/ppc: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:31 -0700 Message-ID: <20250424004934.598783-87-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Convert CPUClass::mmu_index() to TCGCPUOps::mmu_index(), restricting ppc_cpu_mmu_index() to TCG #ifdef. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-16-philmd@linaro.org> --- target/ppc/cpu_init.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 17f0f3d3ff..fd8c42069e 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7216,6 +7216,11 @@ static void ppc_restore_state_to_opc(CPUState *cs, cpu->env.nip = data[0]; } + +static int ppc_cpu_mmu_index(CPUState *cs, bool ifetch) +{ + return ppc_env_mmu_index(cpu_env(cs), ifetch); +} #endif /* CONFIG_TCG */ #ifndef CONFIG_USER_ONLY @@ -7225,11 +7230,6 @@ static bool ppc_cpu_has_work(CPUState *cs) } #endif /* !CONFIG_USER_ONLY */ -static int ppc_cpu_mmu_index(CPUState *cs, bool ifetch) -{ - return ppc_env_mmu_index(cpu_env(cs), ifetch); -} - static void ppc_cpu_reset_hold(Object *obj, ResetType type) { CPUState *cs = CPU(obj); @@ -7482,6 +7482,7 @@ static const TCGCPUOps ppc_tcg_ops = { .initialize = ppc_translate_init, .translate_code = ppc_translate_code, .restore_state_to_opc = ppc_restore_state_to_opc, + .mmu_index = ppc_cpu_mmu_index, #ifdef CONFIG_USER_ONLY .record_sigsegv = ppc_cpu_record_sigsegv, @@ -7518,7 +7519,6 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data) &pcc->parent_phases); cc->class_by_name = ppc_cpu_class_by_name; - cc->mmu_index = ppc_cpu_mmu_index; cc->dump_state = ppc_cpu_dump_state; cc->set_pc = ppc_cpu_set_pc; cc->get_pc = ppc_cpu_get_pc; From patchwork Thu Apr 24 00:48:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883838 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202301wrs; Wed, 23 Apr 2025 18:05:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVU+/x0plDFW0R7lga2MXmMzUpQeG2FIKiRLIB8wBEkyuCnTZr6zvH3x9jzgiMKmuSrahQChA==@linaro.org X-Google-Smtp-Source: AGHT+IFFkcsZxvwO8h8NCffHgQ2zHtBiSi1PuFjxrxFjAvl8vqgbX92OYc4wHJwAs9KLzROJpWzu X-Received: by 2002:ad4:5746:0:b0:6f2:be2b:c95b with SMTP id 6a1803df08f44-6f4c12106b1mr7248486d6.15.1745456716456; Wed, 23 Apr 2025 18:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456716; cv=none; d=google.com; s=arc-20240605; b=Go28AXEyXdwNE/v4ib56T7nD4VkpLogOSYBy8RDhe/zvvL7doJ20Eml9sxSHd7yhSu +qXtdSgjng7Zx4yuLIlNMBNILIXMzHZwHYBNBHAslhTDn5Hd1KnxVVGlJ7JNL39V2cgb 1cfV3dihZYkuUnrBGfS4j5G42QyZDP9XDF9I93+eYYHf6DWExGRnhWUV8kxJDv9zCuuv Bp0jP/m3f5Pv6rIAsXM2l2tWuYAKa0MVv1OaM4c3EHqhnsDMSXtjLuSwAa5KgZHAmK4M Ffqvz2WXsEJ2Px+VM1b1PpX/Krim3hPhotchrjQ5TfOFG1q6ilhae+Ovwig+79/F9Hnc nofQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CTmftL2su6jwrf+15dG9AUJcmzSAFqQvTSHtk/3sj+U=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=MHT2YL/S62wQBy+NYHX81awl6OFVMFUtZq4xYVJ4cUxsIuQIHkgGJ11RXmJuAi9OOA Ck88LXdgcmf2Uk4vbaSHhO5hlkj++t3oHcr+yqxIsv/010O5r09RnZkOVR3ukG7KFMd+ +vYGayuwIMQCM1xiD8/iEtOX4/G9N9CgZh7whsXaPAuJZha/DzhQiBuIZBp3akYof0Ym WVVEnwdkob+vfnjMGptvQwjyHGtgLncnWW/0sEVvGFGAgh/uKXROehzsCOVaCY2t5ZDD zOI1lBxBIVOcpQ5Fms+XeJCSn6a0nXqaVEPo1QhxQswDb8mWvMmmVHniRjjetNDtReP/ axPA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aOxC22Dd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0acd671si3520386d6.255.2025.04.23.18.05.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:05:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aOxC22Dd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kuG-000729-AI; Wed, 23 Apr 2025 20:57:40 -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 1u7ktO-0005j7-Ew for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:45 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0: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 1u7ktM-00054f-JR for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:42 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-7399838db7fso512430b3a.0 for ; Wed, 23 Apr 2025 17:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456199; x=1746060999; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CTmftL2su6jwrf+15dG9AUJcmzSAFqQvTSHtk/3sj+U=; b=aOxC22Dd8SelhKyI65+o2hdZ7EQd8YhSoc61NQwndmV/+GVHR1kkpf8DnNAEd2P6pp 8kjxPCtCRsoHVVhR/OiwfSUSTl5H6ll8R1aKSg5gRKN+zg/JvWN7Xd5ETZmo0taGDEL3 tIullLoQMJMHeMbBX4SlWfsZuNtG9ObLA93x/3SDat0z1fOy+IlxFeQhL7xkE27O78nC iZV8OnfPCk4vKc4+td8wHHJIKOGYpIMbCDbem8Coh9f+GA8Y+IHtoeI/smVnNbuqWqpl 0gk/LXTxVbhjdj51LC5k4h+OYJhVkacH6mHSQKCDJpxz+HvfIRvYSC/BWBzifQmmlpOz z14A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456199; x=1746060999; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CTmftL2su6jwrf+15dG9AUJcmzSAFqQvTSHtk/3sj+U=; b=WjSwI9Hx8yUAbTTtAa8CebQf2eKRTgkBROOdmULHrugf7t/uWrzYljt7tD0KHUbyjg J2IkpuFRhibN5ZKnwt5991svCnpwI47/WhK4Q0v4yAnzq3w0w3jXbLDbvhe7CuYvJ4Y7 D0dPqie4hpSm0ijxOFcEMT5mDy9bFf8VBUNebOLtdfpm9K2K/t2cBJkVixHT6BtVBNyR kiVUt+FugMe5xrufK1jtDfbza/KicZO0G3qq21dtrEugcNNTIRw5p/O3P/avX9Xk+1nc nhdY3lm7CaxMvtktWoorVpCESGcSbOmtBiI9l5jF2GIju0wfUlADWOMwtwlQCsROJ5r/ wm5g== X-Gm-Message-State: AOJu0YxaY454lzfgD437Xw8cJhJZR50ElgRE/VGRIlml9bY+kA2Nq4bM WdCisgwgXd44pa+ugbDKY5Y+h+ZLruzW7VbZmAZ+CVxkw9v5PgpF9PC+S62ZwZ2/qHoYZsxGXT2 M X-Gm-Gg: ASbGncuHQM5bQLoIWv0+J2HLODcpD/2OtvMZrwN6nFFTUR+mnnrYUDg68hNxjc5yvel zp/H/X8kQagkfJEBkieIObJHbJW9Uttlx/0mB1bVP4saJBeZLCgMa5hz2alzXOtBiKEXQe3psa2 KfKmQSYVX1ZqwIKhVJ5P/nBykqLsDQRXgOlp1kqDfiy94JERD0lfJYH4gch4i1Gy5HS/dTg6UZw rRTvDChOe9L508vIxKB1bBe6D+Brv+9hy7gbRFqNHEJ7YVN4MQvIfaDlN6tzsnWukDjZ64gWecZ n+qdykUsWv1gABitVkQpCBm45dzZEboplj/XeitGKv/W2FETxI0/1W8+J6Kc3N85pVtJeTJ9SXk = X-Received: by 2002:a05:6a00:3be1:b0:732:56a7:a935 with SMTP id d2e1a72fcca58-73e268ef408mr490742b3a.12.1745456199028; Wed, 23 Apr 2025 17:56:39 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 087/148] target/riscv: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:32 -0700 Message-ID: <20250424004934.598783-88-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Move riscv_cpu_mmu_index() to the TCG-specific file, convert CPUClass::mmu_index() to TCGCPUOps::mmu_index(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-17-philmd@linaro.org> --- target/riscv/cpu.c | 6 ------ target/riscv/tcg/tcg-cpu.c | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 09ded6829a..430b02d2a5 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1021,11 +1021,6 @@ bool riscv_cpu_has_work(CPUState *cs) } #endif /* !CONFIG_USER_ONLY */ -static int riscv_cpu_mmu_index(CPUState *cs, bool ifetch) -{ - return riscv_env_mmu_index(cpu_env(cs), ifetch); -} - static void riscv_cpu_reset_hold(Object *obj, ResetType type) { #ifndef CONFIG_USER_ONLY @@ -3049,7 +3044,6 @@ static void riscv_cpu_common_class_init(ObjectClass *c, void *data) &mcc->parent_phases); cc->class_by_name = riscv_cpu_class_by_name; - cc->mmu_index = riscv_cpu_mmu_index; cc->dump_state = riscv_cpu_dump_state; cc->set_pc = riscv_cpu_set_pc; cc->get_pc = riscv_cpu_get_pc; diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 5aef9eef36..bee7dfd803 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -91,6 +91,11 @@ static const char *cpu_priv_ver_to_str(int priv_ver) return priv_spec_str; } +static int riscv_cpu_mmu_index(CPUState *cs, bool ifetch) +{ + return riscv_env_mmu_index(cpu_env(cs), ifetch); +} + static void riscv_cpu_synchronize_from_tb(CPUState *cs, const TranslationBlock *tb) { @@ -138,6 +143,7 @@ static const TCGCPUOps riscv_tcg_ops = { .translate_code = riscv_translate_code, .synchronize_from_tb = riscv_cpu_synchronize_from_tb, .restore_state_to_opc = riscv_restore_state_to_opc, + .mmu_index = riscv_cpu_mmu_index, #ifndef CONFIG_USER_ONLY .tlb_fill = riscv_cpu_tlb_fill, From patchwork Thu Apr 24 00:48:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883891 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207809wrs; Wed, 23 Apr 2025 18:23:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV7wzZzOOtlmrdMMv50lJYhbhj4gsX7TCLBO60R6DsM6CfqHP4WqbGSERtNsiwiBH4fGaYcFA==@linaro.org X-Google-Smtp-Source: AGHT+IGBV9DJbDkbqBerR72oUvvfEiGWgskjcKMY+9QOPqERNGT5Aya7NWJ276irlIClmXPt9HvU X-Received: by 2002:a05:6214:2aa8:b0:6ed:1637:442d with SMTP id 6a1803df08f44-6f4bfc2cea9mr18109416d6.10.1745457836431; Wed, 23 Apr 2025 18:23:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457836; cv=none; d=google.com; s=arc-20240605; b=I8ot4HJl+aXCVQXBHNDR9Zzf2x39ETJSzlVg1PeBOtmFUvuIG88AA0uvomS6QaS+Dz 518E6MzFY4Us0yRciGPG7mNo+G9h6DnolbFWon1QRXXIYNNc4bnjsATiXOaAZNbaJw8l IIlrueR0zDVMqtvlXI7xDsN2GXaaIjIfq+1NBDF5P/Nyil9LtyC9XwCVKw4+qcu/DqIn 5Q+/ezaFwGND0R7iE2C9E+LgV/kEUpJa5iCXGbnSzj7h7JgyynHVrutpQKg6+KbQ39/f Y8iFSJHc0cR21ZT8PbRfaOYoAplAqlI84ggiiUZQrm7Ga3os/k88LuV0DADLfgHNTz03 0yOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NMqpwELVZjRand5YykheI0qauU6tLGMgrXCPuO0m4X0=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=X30SmsB/foNuncm6m8hzOLXuhM3dlUFNGqEVA1nDalsN8DA4yUTKyJBy625l9waFa5 pFLJApWi2Hx71vfG3+ahJ4B6dDW3SuT3QMEpXa/TgOwAS+nkQXG1Vw9oEbu3fOTX6yRz Y63wlRYFOhZGRMjHHUrYFbEKxUFxvOD6HkwW6lyM+KCFlWJKaBtt5zmq64nJvASPM0kQ g1UDd/dXf54lv+U2fiMiB6B89TRuK6Ag8kMPnUBKgNB1gsNUWcR7de1L3ycvV6Ohn17f HVDUlK6XlZBidCgpGtWqhysN/FomW1B8i5zCQZ+ETccQ2yvhtx5sBb/eJAPikGAUrAO0 oX8w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VDAqTs1X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0aea2f1si4052696d6.315.2025.04.23.18.23.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:23:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VDAqTs1X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kug-00005V-1M; Wed, 23 Apr 2025 20:58: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 1u7ktQ-0005lI-AU for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:48 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktN-00054w-RQ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:43 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2264aefc45dso6732175ad.0 for ; Wed, 23 Apr 2025 17:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456200; x=1746061000; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NMqpwELVZjRand5YykheI0qauU6tLGMgrXCPuO0m4X0=; b=VDAqTs1XFhRi2AyLPVdLTig/JkWk7rkD9cro2VvkmHyW6gAm5zR+Y+qMCIVIpZdM95 miz6KZyu5uLQ4B7ttjH4g+/St525N0a5d0sIJSKn0RMq8e8OwH87B+ZDXLJUHZFQAlb+ P2/5xEeovLky0yNlPEfCWAuNLs+csF3sezf7fkgrUqHuioawzdVAiVvt9WTwoS8u4qVj vHvcrXr9GifO10SVBIJwp+HFgo7qAGPoCm3sa/U1zu88t2P71bxmOD+iH3iGM48UuDzt iG2CUQv1zejAZO5RgC47uRKJqezLBxfaKcY2X96VDTqACvo45FnRHYZNsIwxw1Dn7udg M+0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456200; x=1746061000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NMqpwELVZjRand5YykheI0qauU6tLGMgrXCPuO0m4X0=; b=tjFJLbfcCWj7Hlna5loph2ffwwamgryp0hWyS/YCdhos8nyvbWho/1DACAipceDI/4 n1lpXFC8FjNQ2SEo91nJR3Vz1sj/CtasGsAaqN25P/JvileCRX+9oWIB11o4QXmTHc+x my0t3IWYub7ORKXQ5bQ0ftZRl8tY8Cvw99gLgYN/mJKc3KDLbGC/wYB8GZB5xg3sWwDz jI8DF8q5MT4mxSnP3Zywd/RsSg6jp2pIkyQL4YPPaXjejfE1GkX+QwLfOOdhylOD55w6 70VYQDueeS7I8AMQQlTHIPeoXS6oWZNUnG9B3k7dEcYYdmwG6vfvtRZHzEBqq/CavsvM w0qg== X-Gm-Message-State: AOJu0YzF5EBvktUJc09eLCngv2kHqDSL39N9zEbPnkrWbReQ/aOMCPBv V8OitYP7Mtpr2rn/KyKQqJndlopKaUI9Fs2RwR9cMIzai6Jf5nKhvOKJnvWx2OWz61NeS7ZBo2B L X-Gm-Gg: ASbGncuAvWydpE65SB82qeTKvYDkohrTYLKAUJ1pX6qlFrgyT8nWUjAJRJJyX9wa7NV Q1V8npC6OUfzRWOI2WE07obFlZJm0a+RUdgoXJWpwG3XOM7HZYX2KVIp8fZqpCgviDbzotcBKtL 0L3n+NuAXvP5CkB7TRfMfhz5553KC37BqnAFPG30ympSOLX/NxWI0l30xwR8OHyG30qQ7Hdg7O6 r/8/lMYTK9JZd6S28MaqUeuk/tef8QWI4sVh85SpkWLLEW792vNvJkcSyI2eSv/YLkZZw+GchjF NYndF2caG8I3NdgHWSoUoAXUc3YyhoQ08uARSF/aUPRABRv3b+z+a37sJ9azQBZMBalNZoclGpQ = X-Received: by 2002:a17:903:22d1:b0:223:536d:f67b with SMTP id d9443c01a7336-22db3db1585mr8602945ad.38.1745456199760; Wed, 23 Apr 2025 17:56:39 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 088/148] target/rx: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:33 -0700 Message-ID: <20250424004934.598783-89-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-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 a240b3b3ce..51743020d4 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -207,6 +207,7 @@ static const TCGCPUOps rx_tcg_ops = { .translate_code = rx_translate_code, .synchronize_from_tb = rx_cpu_synchronize_from_tb, .restore_state_to_opc = rx_restore_state_to_opc, + .mmu_index = rx_cpu_mmu_index, .tlb_fill = rx_cpu_tlb_fill, .cpu_exec_interrupt = rx_cpu_exec_interrupt, @@ -227,7 +228,6 @@ static void rx_cpu_class_init(ObjectClass *klass, void *data) &rcc->parent_phases); cc->class_by_name = rx_cpu_class_by_name; - cc->mmu_index = rx_cpu_mmu_index; cc->dump_state = rx_cpu_dump_state; cc->set_pc = rx_cpu_set_pc; cc->get_pc = rx_cpu_get_pc; From patchwork Thu Apr 24 00:48:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883820 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3200912wrs; Wed, 23 Apr 2025 18:01:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXShqAwYjqXoO+gNH8xwgcZJ1Z32Gd457skXAV8EAwSVPUpJ+NZN/zgZrBV5aXCpuLPj4y83w==@linaro.org X-Google-Smtp-Source: AGHT+IERRVAcfK/3pa2YjGmioqa8FpquKwNfWjUReusVX/WSvoTWEptAHzAoMxE14i1thQt4uSDj X-Received: by 2002:a05:6214:1c88:b0:6f2:b7d9:689b with SMTP id 6a1803df08f44-6f4bfc7b74emr14928056d6.35.1745456507630; Wed, 23 Apr 2025 18:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456507; cv=none; d=google.com; s=arc-20240605; b=j0IQuq4RFVeJiPpECVfjlGPcK642tIuKOSouce+xAy4gVozWhipaie/TeuKC+jjXrV e2ZztJYjqDXubnkYp2X+MUVq6HjXnbHPaVJj/Sk6zisiYrxuC5j6wnZ9dnWv51yEvVx2 EfdJ08Ab+bxylrsuWNwFONa8cAmo8P9srHCnm6sD8XHidIBezUt5zDz8wRUhSMI9auXr Ppd5u38+IvWVV6VRQdrTRAqJp9Kd842Z7WdlfF6bGo2kI4Y5xTypXQ9+FXBEDzYhVrOr KSW+skss+6UxKrNHqSAEDY4B8NS7B32PJ99DrFsoH7DmpgYjNuk4oOBCmUdzFhIj8uJ1 h0tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XEXzmO/KCSQQZKkw02RCDXKV53yZWyTGZY0ovHpDmRg=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=YZQK6D5HddDwLOf5K6gOElre7W8t6lrUmlo655grD1QV/7BesucVcpZzdY4lYeDbVI pg5VN0bZfmxRsSw8UXkHkMFj1AL8DxFA54qJ6NJ0fvhbMvGp2/D/vITm00kYYti25dn+ t2zvgOVTAFgHpdWb3ySowAitJj4XETbxhmaBEpAMbf+/5eZZzDK7Ia3eQMjggsdJsfzl YpGhXOfm4zfRG6ELXMMDN9evem4yQL54qxltj0gBhFB9wiaxAi0JmGoyy6DnoYQod3bE WzmdRE/jiu2dK0x3LomP5aNKjGSoLX8lVKOHKPGcfu3BHnImkOnUf4S/w/pRQxZh9X6i RGlA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J3u1w79Y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0acb55fsi3380546d6.216.2025.04.23.18.01.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:01:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=J3u1w79Y; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kuU-0007ID-BU; Wed, 23 Apr 2025 20:57: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 1u7ktQ-0005lL-Ku for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:48 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktO-00055C-9m for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:43 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-736c062b1f5so352478b3a.0 for ; Wed, 23 Apr 2025 17:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456200; x=1746061000; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XEXzmO/KCSQQZKkw02RCDXKV53yZWyTGZY0ovHpDmRg=; b=J3u1w79YpeokMsP10Lk23NtOiTG/QV6vJ1KgZGZ8ZglYY7YbpXYkZCgSfWj/AuZbaK hEC4njoBEc1exfIkR4buyGLZ0NijIgo8l/9mlS0c1iq4DpMcT34aQYOU33AupSlOLu1H SHZjj9Djn+Hfq16Roe1m+smtzxoZzlzPAr5FUfDjhxXVWAu5NmY3bQzridWKRlUAVpFv 5OpO/8J41yBNIYwxqMG5AvmtqAywDiKGbLSkBLteC3o1b2jjH1zT4Uxo6eLUmV1lspQw YugDLgWuEExat3ghHPjwc4bvsimT2WxbZOl7t64iinizA7yFwK6BCk69pqQqsMRcM5mc 1ztg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456200; x=1746061000; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XEXzmO/KCSQQZKkw02RCDXKV53yZWyTGZY0ovHpDmRg=; b=X2lP6X1swBgm3wtNt20gAHzE5LQumwbbzW8W1KMR2NfLWeh9WmYUCVHGzFhbFGCV+e s5ljcFfgvKoxP/y++oFDfHz6TGk8to2zzcUWqmQ+3IgheRW973Dz/JhCs8H/Mt9fUv0o d1UrNR8ZvESq8eUn5lFrCcGLJfFYchOzNl3cxxVy/cRNfc4IHwo1q9GHfMMHc/ow90wu Z2HMFKGWuLp8T7cRCGH4XLJ0vvM2v5HaFNF2Y4DDV1kjCYCR5JS2jK4PxDiq1yJ3pY7T Dit9CenkKA7ifBuIu+M++FD4JI/tli+zrhc0hBMO2uD6JyUYrJhkZcqgXCbhcj+e7yT/ mmYQ== X-Gm-Message-State: AOJu0YxklER5xf3xSMrz4DaNCacM/38mbfVh4E5wbnAZCO3Hn84vY4cd 89UU+7esjEvjeifsdYzRwmOu/wis7tojGgWUeO1yBCx1+45ji94M1zNMqfoROo4euyRToNGojRu c X-Gm-Gg: ASbGncuIiOzZLgwriyDfw/e+aaihGDtseokfRmwzd3GiFvDDLwJuvVL6aCsK/3VepHT Gg5No2ojHUf4qw9lDRLOSbzg8DN1BX0ZYbZyiCt/bOBTDWQI2vo36h9PCQdped2i9KDZzLL/ovS 8gZXQw4bnf6UT8h6VfHqF8wNByPxVIC8ALixovWXay5Cv6K9PzkdOz717hJJYe1bVqvlg5FCR/J /oTENLsFZrhxxiOOAA3V/8rSjwvM7hbj+b5pom+r3aXjvWQ7OFW0O2eO0G+I2wqV1HtQvyBRJl3 i5hku/QQ+T61R4GGoGqSgfd/e2nxF+e0BMpsdxTUFWDvv+tP46cLL+h5gGFfwMs/cZcg64sMPN7 +i3zT3u6cpA== X-Received: by 2002:a05:6a00:448a:b0:736:ab49:d56 with SMTP id d2e1a72fcca58-73e244bab2amr1088797b3a.1.1745456200475; Wed, 23 Apr 2025 17:56:40 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 089/148] target/s390x: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:34 -0700 Message-ID: <20250424004934.598783-90-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Convert CPUClass::mmu_index() to TCGCPUOps::mmu_index(), restricting s390x_cpu_mmu_index() to TCG #ifdef. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-19-philmd@linaro.org> --- target/s390x/cpu.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 1f75629ddc..d15b1943e0 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -126,11 +126,6 @@ static vaddr s390_cpu_get_pc(CPUState *cs) return cpu->env.psw.addr; } -static int s390x_cpu_mmu_index(CPUState *cs, bool ifetch) -{ - return s390x_env_mmu_index(cpu_env(cs), ifetch); -} - static void s390_query_cpu_fast(CPUState *cpu, CpuInfoFast *value) { S390CPU *s390_cpu = S390_CPU(cpu); @@ -308,6 +303,11 @@ static const Property s390x_cpu_properties[] = { #ifdef CONFIG_TCG #include "accel/tcg/cpu-ops.h" +static int s390x_cpu_mmu_index(CPUState *cs, bool ifetch) +{ + return s390x_env_mmu_index(cpu_env(cs), ifetch); +} + void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc, uint64_t *cs_base, uint32_t *pflags) { @@ -348,6 +348,7 @@ static const TCGCPUOps s390_tcg_ops = { .initialize = s390x_translate_init, .translate_code = s390x_translate_code, .restore_state_to_opc = s390x_restore_state_to_opc, + .mmu_index = s390x_cpu_mmu_index, #ifdef CONFIG_USER_ONLY .record_sigsegv = s390_cpu_record_sigsegv, @@ -378,7 +379,6 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) &scc->parent_phases); cc->class_by_name = s390_cpu_class_by_name; - cc->mmu_index = s390x_cpu_mmu_index; cc->dump_state = s390_cpu_dump_state; cc->query_cpu_fast = s390_query_cpu_fast; cc->set_pc = s390_cpu_set_pc; From patchwork Thu Apr 24 00:48:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883802 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199567wrs; Wed, 23 Apr 2025 17:58:07 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWIYzToCNDfXEWleaMIauomm4mOuqkoXMz2yRTlQbR6KDgcO8GScddn0fgrilPrmAAKiutIAg==@linaro.org X-Google-Smtp-Source: AGHT+IGrkrTUffTyD+EeoW4HahiG34Dd6DboA7zN5H6pSHqnjAxabTMsvDWgnHmyru7f4QY8oRj9 X-Received: by 2002:ac8:5a03:0:b0:476:8d14:6e7 with SMTP id d75a77b69052e-47eb4facfecmr8757171cf.33.1745456286772; Wed, 23 Apr 2025 17:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456286; cv=none; d=google.com; s=arc-20240605; b=Y/G6ASOknJAgzWvP7kxq1w/4WuqxqYTrNhjf4uEgLURfc8ObTJhZtcquZcEO0mxTLk 7UhytBYoiA5OagkH8TGuOty+y7JjBfWD6ZmH5Q0qxEh14LRGY0W4Jny8vS7dzIK+4+zo 0aTgrid1qov8lXk1oyrYEWKGuPxcTy+X5Jlp0DlsCj+KVZfvuqySpmKq7WJkEXJ8fWVW ZOlnzNL9ca4juUGxF3HeNLwi04hPx43hNZTdjhfWqLhjQZlyDQQlUoXp3ZE/NRKyHYo9 5z2YdDag1cuTaugRMbWzvhfN3lN4blnaiIRwqPmyO2Eeka9l0DBqc68h2kRrzeWqmu47 2VCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZMFyoxMcqEJbFer+UYr/caW6q12pnT/2IbFSElSLN88=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=afE7+JbDwf/HguAbrV0/xot6wIdhJ0udiZD1VBjSccCMyqKDe2l5EaVAY8rHnFh578 25pBE9m/4WCK6alfqe7BZVc66AucuvISCUjwvZtp1Eay+6NTFhXIaoX+uKHpYYQ/y9hk ch5gY1YeptAvP9wVkN2sm18WImS7dF7a9nbwxZRMKz5zehPeofjP0F0a8UHmgGr6yv3N mvV5NeFZHqYSHgqodWhknf2/0Pz19g2uYn3Mwljb53mT3j2MnZw1B5HYS3Uf9LmpeBHb nwfzBYnT2O8uEkeYM0WpTRXXFUp2OLlg01xq63EqPJEATVGQRGQdNMgYnilAr5kZFbJ6 mwRg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="I/CjQchS"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea24b1939si4909491cf.499.2025.04.23.17.58.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:58:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="I/CjQchS"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kuT-0007I8-UO; Wed, 23 Apr 2025 20:57: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 1u7ktU-0005pM-3j for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:52 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktQ-00055N-2K for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:47 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-22d95f0dda4so6680375ad.2 for ; Wed, 23 Apr 2025 17:56:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456201; x=1746061001; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZMFyoxMcqEJbFer+UYr/caW6q12pnT/2IbFSElSLN88=; b=I/CjQchSeBPEi7NiO8slyH9sTHhEvPn0iWqJ04XmN5RKf9T4bsHClSxwbskNGlzVS7 yRy0/DSrsvvFOezye4GlFZj5Sz5P+kiu0XTKeJK7501MGXHGCQEHxWT33ShXMB3BBOqK eMXwftERAKn5bmQIdqDWJwh1p70Gb9/pTbz/QTv/z7vXVPh5/C0GT7U+VxvQn5EojYcK v+5oB37aM4EXV6C2NAwY15z8hW9yQHST+MO0TogzZd/GsmhdMMxxCHoHC7mgc2sp2UDV hV6IcMDCPivhIrB6fmidGOFZdz1vyLouH9k29i0gtIRMpfiw96tdSrtnbCrBg/Fpd0+p C6JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456201; x=1746061001; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZMFyoxMcqEJbFer+UYr/caW6q12pnT/2IbFSElSLN88=; b=CEHiDGzEESxr4SMQ/iRLZYggMn3VodYo0DwYzApaOlx/Kr2lA5nFMAqr9iHdlrCYds iiSDl+D4xR3jVkHnsJPlZA6SW7VXWE6MOgF7I8SvH+betJySfMfbYFon0nUFqyzYHfHq gFGDeg9VHQO/WiW91/31SFM1Ftx4JTtUI5RrMNI6DdLbt6f0jkjyiFM35PLd9r7PpbZW TKaoZ02064wA+DMfMruQuwiA8KfdO7O5cO2ynyABE3nklP5nS9DTcp485LQnKqdRDwyi zZeWPddZDlUnQLcCIM5NlavFIkOieqFmoTLJILouGdLR9y4GQgs2P7yvrvTfRAM73NfY NhYA== X-Gm-Message-State: AOJu0YwhKTtkYu0nLqjfhTG4Kta7whkqbQGR7CXUMw8qtVAYAtVfyGFD XVDisuMyr3M4UZ7JGPhLp69py/8R+gLlG/hAnCkegPfAN5zqayP5+fYwKHE+Tg2aNNJhXf9iw/X s X-Gm-Gg: ASbGncs9q/ieOFIv/jPRPW1Z2jb1t+RWPkVJzEQLBSSmadmNkF+7okAQgUABEbYNz85 Q0ZxZbPVdKu7S2p6C2HARdBykzhaE1sjvOKAyFramzIMnLBM9DyCHJmbvz+6vyFTAjf2PjTycEy E+MtCdI7COYBf8Sj3+8PyyLfne9gp90/R6Fn4qVBMQxtYxD6jxWM0met8pXdwPMaSt5z5d72vIU pzl3Czb4dJVgGstllMYF2rogXytyEvN3BCkeXJY0xCl3BhFLFI8NjJzaYKVCroV+PYAX6gIxZRp R7vTppTqm/6nXDygwPLeWnlq86/sv069uFWjOuZa+Q6nR05L8RCkKUeAHK1UZ2HcVFiS09Tj7EI = X-Received: by 2002:a17:902:cccf:b0:223:90ec:80f0 with SMTP id d9443c01a7336-22db3c0e0b3mr9065535ad.22.1745456201098; Wed, 23 Apr 2025 17:56:41 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 090/148] target/sh4: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:35 -0700 Message-ID: <20250424004934.598783-91-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-20-philmd@linaro.org> --- target/sh4/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index ce84bdf539..df093988cb 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -266,6 +266,7 @@ static const TCGCPUOps superh_tcg_ops = { .translate_code = sh4_translate_code, .synchronize_from_tb = superh_cpu_synchronize_from_tb, .restore_state_to_opc = superh_restore_state_to_opc, + .mmu_index = sh4_cpu_mmu_index, #ifndef CONFIG_USER_ONLY .tlb_fill = superh_cpu_tlb_fill, @@ -291,7 +292,6 @@ static void superh_cpu_class_init(ObjectClass *oc, void *data) &scc->parent_phases); cc->class_by_name = superh_cpu_class_by_name; - cc->mmu_index = sh4_cpu_mmu_index; cc->dump_state = superh_cpu_dump_state; cc->set_pc = superh_cpu_set_pc; cc->get_pc = superh_cpu_get_pc; From patchwork Thu Apr 24 00:48:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883855 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204664wrs; Wed, 23 Apr 2025 18:12:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVJzZuXdpYSf+A+Wm6QpJjesB+71Kv65n1QSQarV0DoKRgDQcijwgOgGaisBagnc3YKk93xxQ==@linaro.org X-Google-Smtp-Source: AGHT+IGAXDVfnRIvLOO7AjlxdFuKwkOWygkibUCWJ0j3mi+Z8LJ1Km+6ImWSag+jnB707Nv0lpFq X-Received: by 2002:a05:6214:202c:b0:6ea:d69c:a247 with SMTP id 6a1803df08f44-6f4bfbc6641mr14714116d6.4.1745457167981; Wed, 23 Apr 2025 18:12:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457167; cv=none; d=google.com; s=arc-20240605; b=k9pPr6THtZFNTI9S+pQuso1+1Ckoj83ttP72+3mxEksdnDQ5hTVEhoYyFzK7XoiAKV Pxym/gASEaHVbnMxAAHFXfdZaoWFsAHsgdx+gnAYcBfW8rOivMzmIk8uWqSdT1qGbiE/ h73zLD6lTO10cde5C9g1VNxoTAvT1jQLn+VAOq3nDYMqcahjLphhI7cclv5oeVy+Mc+e /bPSx2+bxFXAePYkkLFmkp3EUntkjQtRAjgtCQyPGCg64PgTb9QnwWltkp8uNfqfxjGQ 9jqqCD5sndLSUwd4VcxDxxogihygXbEv3HDZBrJ06fZqFKpcoEIWy81Ezfu8TIzDcq+T uQ9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yL9Lx/EDFze6tE4WbhZDruyf3oGDShcQ9b5DcTeuWRg=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=TuPQZ+ooRsSgAfVI83MMs16riLvQY/1Uwv5zbDLzhIBbjHKl7r/HH1HrSJ/sPUsHem YYVcOGztsm9xsy/dlzo5Z+fPn8GH0nEnSB7QeJ/3iuDZa6QnSzzBflwrKUoUdRhfo+gS KakeORsZV3C7LI/tUr3tS7XK0sKcts6n6dKCXaig8CPtlMD2N/SGZsSPkbyESgAJX+93 EMWJNdFQH/qznd60NUHR0f98gvRB2CntpBko3rrXxfzM+d6+PEDzH9MfCvdX+Sy19CAW z84XBLeCOtbcLA7MHATmBif4DB6u+OcbYSs3rwdnXI6uTT0Y2rgqloOI7al7kdjcAny6 OIaA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qCJacPgw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c08d27aasi4095326d6.73.2025.04.23.18.12.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:12:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qCJacPgw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kve-0002AD-QM; Wed, 23 Apr 2025 20:59: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 1u7ktU-0005pN-4C for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:52 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0: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 1u7ktQ-00055W-2M for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:47 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-7370a2d1981so309781b3a.2 for ; Wed, 23 Apr 2025 17:56:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456202; x=1746061002; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yL9Lx/EDFze6tE4WbhZDruyf3oGDShcQ9b5DcTeuWRg=; b=qCJacPgwpJRTjZg5vLwQqLZt/WC9bnkb/gTiPTeObVTIto0H2+u/Ahqh1/ZaM0b5cw Y+qtBoCvokgMJIg3yn2Lx7bsf4blYap9FpCWF8YU9aYXt2tBoYn3wt7XASSJOCz2l5OL t63fbZqWrNelqL9E6BnRvhn3Cp2fvq2EDvFNf0v8TQnKNdehFJrMyZLo3XxOzeIZ9mx2 W1ZfY+7XKZs0NX04xZfRGUkqO1CL8c7oGzUVvvik76KBk8drtPqNJBtsacbpCuGzF401 OkxLTffLX7coYWt5iqM2eL3nSio7DP+gDOPsssBAW2ve1l+0/DNrMy/+PxrOAcFuegOA Iobg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456202; x=1746061002; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yL9Lx/EDFze6tE4WbhZDruyf3oGDShcQ9b5DcTeuWRg=; b=QZxPRE5nJvP5YiqoXb027UKBhopnsWczYqDIlaIATi4VpI1X3V5SWgEWuhf9zRdVhw iz8GOLwaYs3royxxPc9TfiY2kaalJ2kSfH1gzBzdjv9jEk2RoCFFpV98/CD9y0t/8UTq 6T/eP1OOxBLNgZDCxMG+MGsrO3UtoZsIbJ1DgSMy1HBcvTReat6MCaSP+zobL1PVf5Fc 7s+MLvmaEDzLm6cDdNAq1l06K69i2hR7Zt9gpOCldz/z6YmxeGyZymErELzGQYzgDhkU cpiTO0X4ICJKVmHgHoixPNy59uPZfZR6zMLFGGYwvePTAXYa2b3vdj6g2jCiqUafTC7x YUZQ== X-Gm-Message-State: AOJu0Yy0OPZn2E6TIEOO5qzN+VGyPr2Ir/mVMHwSf/Yud38cn8O/yJun oGuWMd/pb1hMKmE3S4yTFv2PeAvmMTQ1GbcQPJFJUiVxVD1EBwU+tea3VinxSYrXh1obAW8VTBz N X-Gm-Gg: ASbGnct2KHMk6EV/332q4uHWWXwGwNu1XPpvFDS0a1qeNnlWDr2RNPX7LKJcFUjQPT4 wdi+7IU2fsouiR3WvfnukG4+/3wDlXqZMYFDFEQWeiVRki5nVqn3aSAMMiE7sYeaHNNg2UjNmSD cJhgwFG4acQirSyU0pRDqZTZkO2/bP1OV4yzPmeBILdPVsyjvqASdiTONm0pm4oAyMgtvCL5n1p drQVQzk8I/mBq+tQamNEA5xfmUslgQSBMgWRZul6C93Y00pJGtueFPsIZaEQ5ou64mV/ke/fUSt sJ+UbpqgOj82rLingGkedxudj8F72xNlzzpXLG9tTZDhfSdABcqUIfLYUVmGfY1NtMy90VHSoh5 OnVputgCazg== X-Received: by 2002:a05:6a21:4006:b0:203:bb3b:5f1e with SMTP id adf61e73a8af0-20444e6fab4mr856239637.1.1745456201670; Wed, 23 Apr 2025 17:56:41 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 091/148] target/sparc: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:36 -0700 Message-ID: <20250424004934.598783-92-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-21-philmd@linaro.org> --- target/sparc/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 57fbf16ad2..af3cec43e7 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -1005,6 +1005,7 @@ static const TCGCPUOps sparc_tcg_ops = { .translate_code = sparc_translate_code, .synchronize_from_tb = sparc_cpu_synchronize_from_tb, .restore_state_to_opc = sparc_restore_state_to_opc, + .mmu_index = sparc_cpu_mmu_index, #ifndef CONFIG_USER_ONLY .tlb_fill = sparc_cpu_tlb_fill, @@ -1033,7 +1034,6 @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data) cc->class_by_name = sparc_cpu_class_by_name; cc->parse_features = sparc_cpu_parse_features; - cc->mmu_index = sparc_cpu_mmu_index; cc->dump_state = sparc_cpu_dump_state; #if !defined(TARGET_SPARC64) && !defined(CONFIG_USER_ONLY) cc->memory_rw_debug = sparc_cpu_memory_rw_debug; From patchwork Thu Apr 24 00:48:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883902 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3208367wrs; Wed, 23 Apr 2025 18:25:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVCP/lt5v2ez0aA23rdGPL8C2RkmFlPwqoh3ru9IuLr+dPTyqt/U1YaywB90ww1wxEg+aG1Mg==@linaro.org X-Google-Smtp-Source: AGHT+IFcqvHqUjazfDf7ZjVz1gzFRMQ3bTpVU2obp8zMVIQPXEg4sVobJnKUIkl2S/1pMbwhHUKW X-Received: by 2002:ac8:5f53:0:b0:477:7007:7055 with SMTP id d75a77b69052e-47eb2aa0346mr10291281cf.12.1745457959356; Wed, 23 Apr 2025 18:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457959; cv=none; d=google.com; s=arc-20240605; b=iQrdhwFT2kO5rK6E2bYdOWY4MoeyYqpCCaH1aWxbg0SUwmJxjpJZuo/gYwUBQCxQKM LhLfFpT6+9h2AKy60j1yEAnQHUPGmNFscNk8yC4TPMy5YKg0Jn0fgCmOCBLQSIqmTLyb EoadCGJQw33X1R00IG2O/pHHTyD/Lq+UGLI3xtsD5aNByWAfpTicDBJyq+zZ6e5eiJcM NUuVGBAQ9euSFVPbsF4JV4g/F5Arc5uPDlN1PthmoShCa7V8t9e01LFKsD2Ynm5kZN78 IIE0O+d7sv78zfOrBSFbaPwt8ncFhVlWFV6qZnz990rE9flSztCELPKp+HgTU+rqIX/1 slQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MyO3H/jvct9185BjfASAXhlbdjAHZIvWqk2wIAaPbys=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=fLk6Cx0yC4GZnBg9zu5vuQoeWgyT7ow1yMZ3aD99QWlG0le5XMSRmJbN0c+jVqMPiV /F8kIr2A0XoVBYODow8MEz4Zczs+c98VoWQ10mc0iboLznwCETZnEpTqOvIcmtfN7iWT TukIFZCP7Uwt2K7VGot+nf+ng7Qv5/+9OVGQO5ozAUV/mdCesKqi7N7G4wyxPsuINn48 jgVcwnCXqk2AQHcfMfHBwMBXE4gW9aRZ+C0TvjKbGBecmDFCxTFMLomAFKLVyINkgHfZ X8PzUYJ896SqAooQLrXdYiSA31ceSnhT1Gj3DAzWcNQzGMQVv9eQNzV9maEEVtmMAgZz fl8A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qHqm1/1j"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f3bfff6si5862831cf.47.2025.04.23.18.25.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:25:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="qHqm1/1j"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kv8-0000lN-Iq; Wed, 23 Apr 2025 20:58:30 -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 1u7ktV-0005pe-UW for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:52 -0400 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktQ-00055j-85 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:48 -0400 Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-b0b2ce7cc81so377099a12.3 for ; Wed, 23 Apr 2025 17:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456202; x=1746061002; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MyO3H/jvct9185BjfASAXhlbdjAHZIvWqk2wIAaPbys=; b=qHqm1/1j4cm4oTN48PHw/RBSa0nHXrebP3bt9mqPYaj9dxj7TmRK2Eck3slJyPPZFK INcMtre2G9RCVrV6EXfV0SPSoBXvOzaWBZh1Rgp9eGIgQRtnKZ9kISAUNK45iZrlNr2d y8eIlmP5L0xdZKLGXABx9cCYvFoZ6wXHURShdZNT0bmTD0DDQnr7fz06sJ446De/tfuR 5BsHgI9IBZ/GX1gosioyZLxqqpX1mGPnDx3HH64WpWJJZp9ydoZistHafpBgxA6ea1NU NXtdNaj1ot4XUgU7c4YFAsJeu5aTq6BYKCBV0z+cIja9Y3jfaRXsYGaapJroAhmAIKr9 WjaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456202; x=1746061002; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MyO3H/jvct9185BjfASAXhlbdjAHZIvWqk2wIAaPbys=; b=P8hx7Cdrzq5njdVVrALpG7KcftXNbHzqh7J2LmHTh+7CeI6peXyjLAsPJXxO8sGiAy oAzKJfs7Eojyiz3uPkGg0Cwwtl4DVLI+MnDzhlgOxWfmKuZdz6cDlpxDrcnwL8XBvojs Xw14MUz+bvgtJ0Wx1ihNDHzwiL5y9AoxEjA9T5mfYFbwV+YFr5ZWEczBLMOzINsuy92o iI8Mu/1nnTxQ8Oetgmo2LYZ4Qa28tVHLurcsazKxCm9k6lfWPcYeBRyXx7rBUd8QARNF cNwFoKcFbFQjZYUbNr/c3EWslf3TBMss8/HjyUWSzuWOFSZQuog/lm8CaOCMamWo79gz aGTQ== X-Gm-Message-State: AOJu0YzVP3RdijdApqG7VGuYBbyy+wTaWTRrz5qkAcVp8DfW6zKaNFyF 82Y8ni5Ly1QY86X/8IGaGuzXUeKZzRkTy/IPPNe/MmSvXcdP4tSe3o/BhkGulQe1gDtq9l1h7rj 2 X-Gm-Gg: ASbGncvTPMDJwBBcybm/QowTot5QcENRvhLNXOzQSc+/7nrc7QeSlo3QoCEZD4ciIqW QoX9PxYZ1TKbONK2doAnp+zXF6YuNcbjsqXJg5BreRSJSSvsBIA8v0xjXBOV78Z/pxn48AnQpz1 4QUPk0EzPkJR6pbXrFgBHC0tj+nq64DJKrL9a+l0S1Y625pGYLZA/mU1A3rVIbkjoLBOCw4YgKC QM5ay5jG0IpVLwDMmUtSpX7DwRo5WPPNc7H0Ss6EYePgpLponkJGdpy8tPsUM/OZ9+fihwy6Nl1 wcdSMHxNJQg+0VPYveQ4FR7CcqEotrkbBvG/QEPzOxc0fDe4Uok8xfhBLPHjIoKTBSQ5uCmeqDI = X-Received: by 2002:a05:6a20:1587:b0:1f5:931d:ca6d with SMTP id adf61e73a8af0-20444e7ad3bmr767468637.1.1745456202450; Wed, 23 Apr 2025 17:56:42 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 092/148] target/tricore: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:37 -0700 Message-ID: <20250424004934.598783-93-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52f; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52f.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-22-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 16acc4ecb9..833a93d37a 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -176,6 +176,7 @@ static const TCGCPUOps tricore_tcg_ops = { .translate_code = tricore_translate_code, .synchronize_from_tb = tricore_cpu_synchronize_from_tb, .restore_state_to_opc = tricore_restore_state_to_opc, + .mmu_index = tricore_cpu_mmu_index, .tlb_fill = tricore_cpu_tlb_fill, .cpu_exec_interrupt = tricore_cpu_exec_interrupt, .cpu_exec_halt = tricore_cpu_has_work, @@ -194,7 +195,6 @@ static void tricore_cpu_class_init(ObjectClass *c, void *data) resettable_class_set_parent_phases(rc, NULL, tricore_cpu_reset_hold, NULL, &mcc->parent_phases); cc->class_by_name = tricore_cpu_class_by_name; - cc->mmu_index = tricore_cpu_mmu_index; cc->gdb_read_register = tricore_cpu_gdb_read_register; cc->gdb_write_register = tricore_cpu_gdb_write_register; From patchwork Thu Apr 24 00:48:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883839 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202561wrs; Wed, 23 Apr 2025 18:06:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUzEx3sKCJqOLK/tTiu5CD+19P73Ygz05Uu0i3pj5oqFjXShDzNPW0LbDn6K6KyCCD5AOVTJg==@linaro.org X-Google-Smtp-Source: AGHT+IGQUg3FwSA/yIFSOddixxJltYTm/W9jFjzGlbefnl9NprA3Vnajee7aB0J+HMxFAQn32039 X-Received: by 2002:ac8:5a48:0:b0:477:da1:8027 with SMTP id d75a77b69052e-47eb27863efmr10522371cf.8.1745456768138; Wed, 23 Apr 2025 18:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456768; cv=none; d=google.com; s=arc-20240605; b=dyAY4QdretLXrbsBLYfle081GCsjjVrPA9GJ76Vgw2eNCdP5q2vWMJfUPCn7nZdZU6 fMlpSebt9iLxneN5qbQV5bQIpM1ALgpo5bwG3m4jO0z3kE7eBDC2cTu379uyFffB7dyT xsZzFFvh5EP1glJjU0+WYrOMo/URexvR94F+D+ReJ1i6F9rhbTYq7FkFj4beM1vj+x2Z USfZv3H4Bs7ZX8aW58BlDuLSLG0oEdSwQ65srN+DdeqOKEE/ZTCSlpK2Wm2+9+kQ+ZAs DFlgEEeJJ/pNEqthCzW7tBbyn/QreWpA9KJwzhLEEmzsWUMuUWmjpupL8hAsCxpFBdXJ W1ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XOzE7rPFSES9/s5906mqBQxSMctIAbl+hzNfrPQ2HWo=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=ZJA0SbC05w7OSZkMYl0u9BM77wTThk7L7nF/Wt8uX6v5QDGouJIS0ImutZ1nBYVE/D Gc4FL41Dvk5mtQcSNHiv06kRyLwWHvSlP+cZqknIq2wGfj/sQfS4ZIxBWQBigXpuc0ca paQlmJjZG0ykxlzF0xhFDJrAmVQD869QAbiWhWh1vwAcgjvAO1aCUAC0js8ylF9RRGsy YC0QYPVnDD8ld/qxFdvm9cwZGPe2v/+cRUpm/i0FeC5VNBXh0MKAuhGFmzVr1alp+t+/ hicqXBcbcEnq6UMwLy10gqzQ9sadbiQQZy5V04uIVxaKzSypj7RuTLCcKJyFI1O4+WOg kvZg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qszmxAMD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9fa9a93bsi5461691cf.150.2025.04.23.18.06.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:06:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qszmxAMD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kv6-0000h3-Gz; Wed, 23 Apr 2025 20:58:30 -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 1u7ktV-0005pS-2m for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:52 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktR-00055o-Vv for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:48 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-736ad42dfd6so333888b3a.3 for ; Wed, 23 Apr 2025 17:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456203; x=1746061003; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XOzE7rPFSES9/s5906mqBQxSMctIAbl+hzNfrPQ2HWo=; b=qszmxAMDMNlS/K9Vpci50wFnFrQEizjAa2KrkDe3Lvgm0NKhs/ltmo7WpG9F82IDUC 6MmmBYSl7nE3s6q9V4StrtWaT//GjsSr+uVr9IJ5/LfyDgvuKBZU0AEK9nQJn39R7kNg 49Nx6zQxxppqsJv9gC83n9iXY/FDANgkFqCM5Gn/jBea5YOxEHLHV9yYeqgRzDiUZLig +oAya7+pXzuYNUgUgabScuZ33JRVB3s0rwqgpHPKRbatPCP4hT15iX930UTE4Zr2XD1I B0NMMblvO2f0wxLZDK9c1c9GePjLYsOn2l8OfXrtfWdrckTAZzHDWQ3sBDFRPMg6pbRK ppWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456203; x=1746061003; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XOzE7rPFSES9/s5906mqBQxSMctIAbl+hzNfrPQ2HWo=; b=lX3m0M1gfGxUzfYAi/AcKdwQG/wWE16NmSNMtEzt5muC9FYEY91OAI2Q/EXwNTYMGE RhRI/kPpC7FcW5BB5P1dbzpMjDV3OiODO+odpQoKdyMNtNA+DMsVNolqoQn7ptDloT8H CeBWLX1cVSf/APIuxlGx7lNOUqNtAslcXaoNw94tkdubEhh0pEvEpM09ikykB9nxcI5v Z7IdIaJTNJKspsZ66mo/Up11bmhMUTLB1jK8IxlzYAL+082lkvPA08tJ98gtZTtDNtX8 AzNW79GEG3dvM5pPzL+92+F8pEKlgiIua7S/gzorLCjXv74/dce2elWLwtMeUhdaabrv Uo8g== X-Gm-Message-State: AOJu0YzRYKagSUs9tF85csEYmJlrpsfIAKYHt0aJ4nC9AK4WbCaUDhVI bfjBj6UmMMyuE4TIYsYYEeeMrZAqC8rgCH9NMTktENSB8PYdLe1d9mj4cuJ2C6ixd/Pihd/0ctm + X-Gm-Gg: ASbGncvu+os0fa/18+hjHJxktnckmVjvg504HRvSJpEIRgd5f/rrgK01sj6e29WFf+9 pMKzxrgDsyUJ6xHx6Ixe4hcmiwzx7vKmRwtyiY2HW098iaQjTdlO9LOzLxOS4Qdihtg/OfGwoav SYHTho4ekcl5Gt/S2fhorx9UtVUUAhvo2ZhPiNdmtQ5pBkOBo3GBOnj31/25Xo0xRWaDyR3O/EA BXn+H9xQ5YN/fo+4JSYuO8P7ARXrrL7bDjPB7MnBTUpxrq9u1OFs3AZ9T0NAxwuansJxWVwah23 G8nz9YhqsrYlDc3TyG8bUqMJo5h+b4pIPP7+5cZ8NiO4Rup3Oo5HWCe/weuuHJFlsgmNOiqeUAw = X-Received: by 2002:a05:6a21:a4c4:b0:1f5:83bd:6cc1 with SMTP id adf61e73a8af0-20444d0defdmr1076413637.0.1745456203048; Wed, 23 Apr 2025 17:56:43 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 093/148] target/xtensa: Restrict SoftMMU mmu_index() to TCG Date: Wed, 23 Apr 2025 17:48:38 -0700 Message-ID: <20250424004934.598783-94-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-23-philmd@linaro.org> --- target/xtensa/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index ec6a0a8b66..51f9ee9e89 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -236,6 +236,7 @@ static const TCGCPUOps xtensa_tcg_ops = { .translate_code = xtensa_translate_code, .debug_excp_handler = xtensa_breakpoint_handler, .restore_state_to_opc = xtensa_restore_state_to_opc, + .mmu_index = xtensa_cpu_mmu_index, #ifndef CONFIG_USER_ONLY .tlb_fill = xtensa_cpu_tlb_fill, @@ -262,7 +263,6 @@ static void xtensa_cpu_class_init(ObjectClass *oc, void *data) &xcc->parent_phases); cc->class_by_name = xtensa_cpu_class_by_name; - cc->mmu_index = xtensa_cpu_mmu_index; cc->dump_state = xtensa_cpu_dump_state; cc->set_pc = xtensa_cpu_set_pc; cc->get_pc = xtensa_cpu_get_pc; From patchwork Thu Apr 24 00:48:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883821 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3200934wrs; Wed, 23 Apr 2025 18:01:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUfbNfsBwduW1Hw2yBSZGXga+FtFXEcgxmZDyn2Wzwy/Y2ikXeKl80qW4ZJqO8/uiuj+tm2fQ==@linaro.org X-Google-Smtp-Source: AGHT+IHC1pV2VGtw908wXZfgPisWd1Noi2NR6VjDIvpxQnBzdhxHF8y4Jvdr8eoyEuH8HSILxhHf X-Received: by 2002:a05:6122:8c7:b0:520:997d:d0b4 with SMTP id 71dfb90a1353d-52a7826a1e6mr729527e0c.4.1745456503591; Wed, 23 Apr 2025 18:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456503; cv=none; d=google.com; s=arc-20240605; b=G+adWNtWq79spBieCATeL6u7lZYSqYKPkP3K3sjZt5sCLoyt7MoyNa4CYexuHw8l43 P92Y4YA75nfzzo298S3gUFc7O0BKxQvao+z1iyQY0pCPj84m2eJJllcQ3rXPtMpe/hwN 4Qk7HjVjRjI2BJLXEas+jn0fwbm8LKK0Itb2BOqipy6H2apN44yNSw8t94lrkxOEoI+z MfTKWBwY7GsPLaB+UA/AgK63GSBxYGaQPnbppDyRwmjalxitXE2femys5HhM7wBd2gpt HZ55gJzAqat7f4s7MH0WjzhRLIcHK8s9zbc9AZm+8NmYcoafldttXO4tFnV9H9d5aqu7 OSRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=N1UQyMwl8FkxNsbxCkJPrCVn5egihsCexcKX6axRuSQ=; fh=MVbavKmDGD2iHVIjfDy2o0EqfqRfxvxCs9rvsjeqC2s=; b=QNzZmmAMJ8WDFYAiPZMqtRRiaDJwn5YMZ/2hVyHiWeMVhvZVjYtPPZ8RPPYdtUceuZ 0QrsR9axgu7L4AT9i7QRoBrvRWEGY0vnROCXRzZDXF40G8U2UMpDvNv6cm0cGlxdTJfP lVxDDQB1D66kLbhpZVMqvHLWwtkozkCTyPB7QhCORbiuBwuSB8i6mI14UnhSBMb+miNp FLGBxopeQfz7SLV8tr3ICM7GcrxDtF/RsqGfEcY5RVC7ZoY0kg7jlkYY2W6ijGebgPJb mQShSA5l+uiOrRMBab+WNjWUWbmu16xGYgwPueM+hANkn1rA73nix9fiL4+KytIS7Z5f SLpQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WS1C1c+u; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 71dfb90a1353d-52a7a13df45si46479e0c.250.2025.04.23.18.01.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:01:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WS1C1c+u; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kw0-000358-FP; Wed, 23 Apr 2025 20:59: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 1u7ktU-0005pQ-V4 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:52 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktR-00055x-Vw for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:48 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-73712952e1cso396493b3a.1 for ; Wed, 23 Apr 2025 17:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456204; x=1746061004; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=N1UQyMwl8FkxNsbxCkJPrCVn5egihsCexcKX6axRuSQ=; b=WS1C1c+ugBjrYIdqnineW9M7Z3D7knUAFxMWIoRtsZammahAZvhLvHxdXYUY1IMfkW eVtKMdFB3nt2frsU4GbMHQiT/klZCG4m3QVlN/0ER9lcFHJSBmTat+34bH7n0Msij6sE poQ+gCQ8DYczPaI4QreIYL/eKRarG1k8ffPPv4f+L2KIjPj+oxnHfpsGFwSe8q9rCfPP NsCTMLdk75W/VfB1ggI72xR8IU7/Veg/K/csJGQaHQpCFP2+B5mFhE/JPuWqXJGdlnIG AU/CJpyhZ50rtYOABco3Yd4wzAd09CBwW4z8RZnaMPGvOZmu/HS+Ar0oi5sixOIHjKOr vFcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456204; x=1746061004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=N1UQyMwl8FkxNsbxCkJPrCVn5egihsCexcKX6axRuSQ=; b=TdXA87wuy40D3LezwCwwJydF/JSVJh+YNHm8rN+xuHYJfq9Qio1huBqVupSSB7MxcW h2FYAfRjEKZ1o074rtcQ3/yWlOunFIeC2HtA9mbaB5KVnjeEDiP+UKKG5jifdI2e6yUw 36K0YY0NJZEtqLhVAmZB4zLBhxsy5yq+UBJJp1VYYyVoEiTlBsIB7YUkwcYn8LVdDooT condG/LK3ZI/4Ktuf+L4lI14jg5IXglemtbLlTgB2fKHrOpDlYYEcPCmBmg358cCSqXC BTbZLUKkTyFfHO2boWhOzkhSyoaCXP3ohx6rnaw3vOHpu4G5os0DMZJfMpB+K63GqghH hECQ== X-Gm-Message-State: AOJu0YzGvd+ylPRi3GbtwQqOHhpskL3/9JNY2yWD6JTNWZHk7ojkLBQU k6LO7DxwiOFr/KzODR6O7qvpsy7Yl1Hh8+K4uyeedz6vEItYJVyDGsEcsAFevJ7jvpYoxj25KDx m X-Gm-Gg: ASbGncsk3HbVDmcLkVmOxhNo68n+8xJtH9hlurmHSB9PZFhCweqz+2mgYbg//FqaMZz tg793WUOjLbNcqHQsIE42pQASJ+VjtaH4vYnrelQ/90H668GRxxTT0B80DW1sTZvpjmNGez6+Wg tIDKHQHuzg8lf3fFF4Py+c2CWPd2S80xOCihp3kXOcCzCItln0fR63j/v1Vx4gYEXXgt+vO2Ozw hjSoxh168QyCvYvkVKL5/pJERE3L0k0lJFOmlFLe2m+UBDbXpqF7A4QrXEr18lsS1EUMnPgEYQH sIrnTQ1SC3bVsp1qDURJKr0+fKeSDof554NdiAYfG2APzbXdmpKHjEHKK4CEW6ZQf3mS9zLUR6o = X-Received: by 2002:a05:6a20:6f88:b0:1f0:e3df:fe1 with SMTP id adf61e73a8af0-20444e6e4d2mr893118637.4.1745456203776; Wed, 23 Apr 2025 17:56:43 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Brian Cain Subject: [PULL 094/148] target/hexagon: Implement TCGCPUOps.mmu_index Date: Wed, 23 Apr 2025 17:48:39 -0700 Message-ID: <20250424004934.598783-95-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This hook is about to become mandatory. Since hexagon is still user-only, the implementation is trivial. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Brian Cain Signed-off-by: Richard Henderson --- target/hexagon/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 766b678651..ad1f303fbc 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -313,6 +313,11 @@ static void hexagon_cpu_realize(DeviceState *dev, Error **errp) mcc->parent_realize(dev, errp); } +static int hexagon_cpu_mmu_index(CPUState *cs, bool ifetch) +{ + return MMU_USER_IDX; +} + static void hexagon_cpu_init(Object *obj) { } @@ -324,6 +329,7 @@ static const TCGCPUOps hexagon_tcg_ops = { .translate_code = hexagon_translate_code, .synchronize_from_tb = hexagon_cpu_synchronize_from_tb, .restore_state_to_opc = hexagon_restore_state_to_opc, + .mmu_index = hexagon_cpu_mmu_index, }; static void hexagon_cpu_class_init(ObjectClass *c, void *data) From patchwork Thu Apr 24 00:48:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883906 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3208409wrs; Wed, 23 Apr 2025 18:26:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXzhNGGeNBOsSyImgNurWiDl16x4ncBj1OO8j/J+j/Xk2FaGQS8gzW5BJZ7TLBOgirsLPJ87g==@linaro.org X-Google-Smtp-Source: AGHT+IErzfqOhN0aQekhgufFeBJEJQlFoZIMH395+PpX4lfl16kyQoyf84168T1pGw8ycXh9a9FX X-Received: by 2002:a05:6214:d64:b0:6f4:b8eb:4815 with SMTP id 6a1803df08f44-6f4bfa6b16amr17767996d6.0.1745457968709; Wed, 23 Apr 2025 18:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457968; cv=none; d=google.com; s=arc-20240605; b=A+y3lZ2j4cmCv2ntMOHlzvGGwDdf9hDkLri0J9BfGcNYn9C79NC8XzYxmO/m18yH61 F8JOIIwNuGzFhzUm9Qg8G6L9oVAiaOePyf1iT+P6OHPQKG9ipUF3zsq4EByQZJKuSV5Z cCj8wD8pJujIkYwoBddSDkQnxJFJEEuPyIvprhHRPITaAA1sMEij7YEKc4bixfHvTdJT HzQdbgQsE5ykaoHzIZ8CdKo4VhGVAuQMvHBRzIasW/LiJvCxUlnGYlgMwrczHP6ShPTL v4pczdcMA3pREEWrfmtsu58nG7C6HjAnwKGZptqMyrRyuG0Hm1SCPM8hXM6GsBLlR0u1 5g1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sWIZdxiQwNCWQMc8BJaWdVB87by5vfdybCIjbCIrMGM=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=d6yL3kfmRMDCWDOtNyKJdow5g8xUgM/lOqAa0dhG4VV4lEMyPUh7pO5zTsW7qwrk+n v6yxpdx3ronpp8t3pfGKL79sp4icl0hPsCIcYOA6PqM9QRoesdsplmfanai455tBQ+0l JiNsHcszG7WeuwRRBtsc5oQW37Y++eutdJbx3yJBrFzj95WcqtO6mlyR8CRqWP4sAaa9 fr2xtRS8Mn+YJQr8GcNw0mxFPdns77OqudMBWPSSyuX5MxE558Zya0x8m+SIIMvk0JoB eIGcgZIcmRH8uSroBmjtckSU25x02BstiNXr5tCibH+m8JsMvVqiuorfN4Fw47fBMnPa 6C4w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="bwt/inqL"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0acd9dfsi4097066d6.167.2025.04.23.18.26.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:26:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="bwt/inqL"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kuI-00072b-D9; Wed, 23 Apr 2025 20:57:41 -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 1u7ktV-0005pc-TA for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:52 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktS-000567-HJ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:49 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-22928d629faso4316585ad.3 for ; Wed, 23 Apr 2025 17:56:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456205; x=1746061005; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sWIZdxiQwNCWQMc8BJaWdVB87by5vfdybCIjbCIrMGM=; b=bwt/inqLk23cNdHk7CBS4p+U9AMmmcHhyQu+Uq8dzxUcTBeRUXKTmS2EDSZRhSGxQ2 tx6m+UiJCMGdbQrN8wAvZdFYrXFsVVbpyNK9K3FF4iP9FTuvoF9qitNOoIGBA8T0imIL yTs6ly48oaKmh9qaUHTgISi98x8ZMTXh+3NL8InrYUkCMlDAon6zw7mpFN1x5YNE/fCb jJDAXIw3PuMqDzUxST0llGIn5SYkVysZp4z2vM9Jtd95Wh9eMEM3FYD9TbkDDKbXNlme soTw6csEMsGagn5DTOz2tZz1UrZ40L/cIfYWHsgikQDqU96NqPNb7SzBlKDoLMehyxy4 WBHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456205; x=1746061005; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sWIZdxiQwNCWQMc8BJaWdVB87by5vfdybCIjbCIrMGM=; b=pp06mnhAJAFpxy1r1h25Vhkuyu7eIBDZy4YcYi1MYHAJZ4zqZz8Z2j3t19/5dJtIlO iOfTV6kTq2gBtMpIUWJTfd9FDlvkvTkE7Y3a5F0uHnh3DIZrCaA0axL57W4xM4/QHNS9 my27s4+4SszYn+aIDvYImHH/E++T679HuQdI4EKOGHFurG978QsYBUpqBjpUfSZlbTlR KE7TGFXheVU8Zs6zAC+KU+7vUW9NNX4EzccsQMtXATvxDmzfEqpMtrUjlzEeljjNUjxF SWUM8WklGX4aUkpsAT6WubXgmPJLF5uCKTFNTQJyUitHY7LQWjOdxrSFjnUkaVQmhWEE OsIw== X-Gm-Message-State: AOJu0Yz4PQskAJzXDPK3o2el2dUM5ndb1jJYhQ18wucCzebrtX+74LYb qcolphAVsm3vDAxft58wYz4B6YexslCszlUYIm2FPjj1Que//dV9VhLN96rq2uPvzUimc2RxA+n z X-Gm-Gg: ASbGncv6A7JkzWw3mHzCltlbJxHWgktW2uJswDRyV+XI4ezDWpCIraAOFVhP+JHHGkc M0sCdgjS5ulUb0EhL+pfU0xQ1xrxmiTNz7PjdAp6XMNy2V+uDMSR7OAVc4jvY0PO9ddgzWahGxI 8A2u30jRn4UmcOmMJG5GfBudma5+OoC6pGKm6In2fH8jfa1MHa8lOEkWxSJU5sZ1uVo043jjCN/ OX6X6bmjKqQrBdxh65kuxMc28N6TBi1jyLjwmbQtJRbaSnqmthdGCmq6feOW5Yo2/KnUFnB5XTv xYMznKvMjGVGP4MfxPZH8/2Iw5kyFajANtPNK9uh8PSmh5vxvzscful94Zj2gggfkN74l+GeDN8 = X-Received: by 2002:a17:903:19e3:b0:223:fabd:4f99 with SMTP id d9443c01a7336-22db3bbb17emr9192145ad.5.1745456204606; Wed, 23 Apr 2025 17:56:44 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 095/148] hw/core/cpu: Remove CPUClass::mmu_index() Date: Wed, 23 Apr 2025 17:48:40 -0700 Message-ID: <20250424004934.598783-96-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé All targets have been converted to TCGCPUOps::mmu_index(), remove the now unused CPUClass::mmu_index(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson Message-ID: <20250401080938.32278-24-philmd@linaro.org> --- include/accel/tcg/cpu-mmu-index.h | 4 +--- include/hw/core/cpu.h | 2 -- accel/tcg/cpu-exec.c | 1 + 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/accel/tcg/cpu-mmu-index.h b/include/accel/tcg/cpu-mmu-index.h index f1ca385d3c..e681a90844 100644 --- a/include/accel/tcg/cpu-mmu-index.h +++ b/include/accel/tcg/cpu-mmu-index.h @@ -34,9 +34,7 @@ static inline int cpu_mmu_index(CPUState *cs, bool ifetch) # endif #endif - const TCGCPUOps *tcg_ops = cs->cc->tcg_ops; - int ret = tcg_ops->mmu_index ? tcg_ops->mmu_index(cs, ifetch) - : cs->cc->mmu_index(cs, ifetch); + int ret = cs->cc->tcg_ops->mmu_index(cs, ifetch); tcg_debug_assert(ret >= 0 && ret < NB_MMU_MODES); return ret; } diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 29f6419050..28bd27b8ed 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. - * @mmu_index: Callback for choosing softmmu mmu index. * @memory_rw_debug: Callback for GDB memory access. * @dump_state: Callback for dumping state. * @query_cpu_fast: @@ -151,7 +150,6 @@ struct CPUClass { ObjectClass *(*class_by_name)(const char *cpu_model); void (*parse_features)(const char *typename, char *str, Error **errp); - int (*mmu_index)(CPUState *cpu, bool ifetch); int (*memory_rw_debug)(CPUState *cpu, vaddr addr, uint8_t *buf, size_t len, bool is_write); void (*dump_state)(CPUState *cpu, FILE *, int flags); diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 034c2ded6b..9e15105533 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -1075,6 +1075,7 @@ bool tcg_exec_realizefn(CPUState *cpu, Error **errp) assert(tcg_ops->cpu_exec_interrupt); #endif /* !CONFIG_USER_ONLY */ assert(tcg_ops->translate_code); + assert(tcg_ops->mmu_index); tcg_ops->initialize(); tcg_target_initialized = true; } From patchwork Thu Apr 24 00:48:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883827 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3201930wrs; Wed, 23 Apr 2025 18:04:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU+Qsw8s2rgNY3srFF+Sue23y7zSL5tcSPThOTvQFnwul+QXBJ9+c/bsmXW87e1FoNBMAtxJA==@linaro.org X-Google-Smtp-Source: AGHT+IEB9EcBHvAn4xJO5EbWZOBl0QjkX6/ZzIYr00lCPtTzfwBIIjnU6BU4WLwUIf5p2ORmKxKE X-Received: by 2002:a05:622a:5143:b0:471:fc73:b656 with SMTP id d75a77b69052e-47ec38689c1mr7298411cf.12.1745456655458; Wed, 23 Apr 2025 18:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456655; cv=none; d=google.com; s=arc-20240605; b=fT30O+M9IjnczwG4A1HE5BsXSLC3SmwFtMun79cOdvBUXzT3TxqPViTb6k+oUokavY 7PjuVA8VsD5Qyfbm8fplDDJgh2PU2t5zt8uRWftPEpvZ7SLYyxmB6opbTk5E1iPa/q0b +w809BH1pE7QEW30Xe/dELCZLshAu7uK1SL+/1866fRO0yUHhqxc/NfEoD85+lhPLWMT kcSm3uIf3wJUUZIKb0G1HPFpB5XYFp4vchXBNK3rEeQ9H39k/8McCb6UapHJX2ikdtTj mMljelpEoHxdTeNP/Arj8E8q3ZpQ7NaWkpwbUe2aiFTBNIueP0Dv+hhgHo5kcFk2KkQB 2QWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=B2dng6uyh/TVtKzBLSnew6/1cI3Pxi8Kdl7ghuagDjo=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=il68H9cm+NBlZdSiwOJwC9/g+nj/0s+WF2P5DJGBzg5Eoq6cqDjC/sOSkZF1iiSA1/ 6+pRmiG9wk7pwmR9XbAA1gCF1B0b26dyCp2BeDb4r60IysNITlNaw7twNdaONZgaA/Yt /UU5kPSgUHDFuGB8rGlTI1cPuMVxfYSa2S8zIjKfbEkCj7XpG20IADtsnU2Py4jQuam4 ZOteOxK7OK8NjmZkcOat4vzjpDU4iP7wdlMZRK1V34dWbBiPmjNRp54mpODfo7YmlkMi /Lw9UfhJb3Mk6Em0h/4n+hBLrst4s0DRPN8/8XucuBhZCMX/70JspJkw3KplHyAfNGMN +0bQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eMxCHhPp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f2ca78esi5498891cf.15.2025.04.23.18.04.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eMxCHhPp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kuf-00005S-Oi; Wed, 23 Apr 2025 20:58: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 1u7ktW-0005uF-Jp for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:52 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktT-000569-Cu for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:50 -0400 Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-aee773df955so1393948a12.1 for ; Wed, 23 Apr 2025 17:56:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456205; x=1746061005; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=B2dng6uyh/TVtKzBLSnew6/1cI3Pxi8Kdl7ghuagDjo=; b=eMxCHhPpTlM7vH1+DS0xauR28qAHhBexSeVBxNVsxoqgOFwkwfVb+4+iGUkuUz+Fqo MXX7Gvy4LIV4vBoRmAMwXeK+ezOIRmzgl9AUmecSpzn8mZyRHIeXMBQcE3PMvaDlqGo6 sIByk5ey0n9Gd16z+AUXHqd94/zw9UMd8nVo+wmh28sklhq+5bu+WWW2i0onhuij+eiQ MjooeLK1Nw1TahE5VnY7392V0GWhLd1BwdlAP7N8lL+J8So57Vz86G7I7g9YTEz425d2 A3g85BMvsXc8D8D2KS4K57EEI2nGjWQQ4bmMFX/vuP28EA8Tt6BND4Kx6xcIs211jv0P jQ/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456205; x=1746061005; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B2dng6uyh/TVtKzBLSnew6/1cI3Pxi8Kdl7ghuagDjo=; b=gyFOOc2TlaTuXSwLzN52quCbOFWBbWQrvYET72PGmSa7azvLuHGNc9CAw70K1zT5A7 PG6AW5Dq6/ZC/4qwpD/ZPrU4dxkq2fyFrt4zViDefjWtyyJQ8hgl5WuXyX05jn9r8P0n GkjBYd1O9VhjqrWiurGpUnTZfKw2N51YX646Ejs0DcXda2k/nQT3q35Zk1jgNP7uUm50 1WARMfM+dm4iPOUsW0B0QOBvUiSE3NTYz9lpGwvHiwJOdUQleMbsd1BhP6PR0DUJwTPv /j7YIIwCHNoifGXg6rqUApoeK7lavgU8SwkkmbS+KLb5URAGvYBsvKdjMhZpCpxrj7yp xLjw== X-Gm-Message-State: AOJu0YwJoSepiVKheQDN+YeYYVb+mp+yXsBGBInXx7kJyuT8BpMw2NfL RIb5d2MvdrEp/KFeVmS/1bElDESXHmUGqzB9DMYX84yZR8N0bS1cXo16v1jnzkVlP/o9WCMKa0U G X-Gm-Gg: ASbGncvGshVCPeumoExocV1Q3+JvnmX6fpqDOidzMQBBVnVEMe1gblpAIbLhFk8IC0T Zg5+9mKtke5mHBe2udJvGFoI4QOTHfy19uAQQZyb6SzBdsdYE8sA+qWbc7sBwXw722gDGwLb9Vv ZI+fP4N4MW2cx4axZs3eEAC2UUvGhc82kxo13drdbozOLW9b04PHk8uoL7bJvKiXe5J1OI2lUif GgXzILRPy/7ujBBAXoHVDnBqmfxbONm9jLIY6BQx17fbeoY5bNPhPwzmY2F0xrts0XYmVcffKnI +Bw26oXYSFHLpnziZbWmMk1Cd4r5DY5VNNqp3oGH0N566JM1zH11S1Mqh79iY8s2o98wQ5JDKRY = X-Received: by 2002:a17:903:2acc:b0:223:3eed:f680 with SMTP id d9443c01a7336-22db4982ecemr5846855ad.18.1745456205398; Wed, 23 Apr 2025 17:56:45 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 096/148] accel/tcg: Build translator.c twice Date: Wed, 23 Apr 2025 17:48:41 -0700 Message-ID: <20250424004934.598783-97-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x535.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Drop some unnecessary includes. Change the offsetof expressions to be based on CPUState instead of ArchCPU. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/translator.c | 14 ++++++-------- accel/tcg/meson.build | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 5f0aa9d56a..c53bbdef99 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -11,14 +11,13 @@ #include "qemu/bswap.h" #include "qemu/log.h" #include "qemu/error-report.h" -#include "exec/exec-all.h" #include "exec/cpu-ldst-common.h" #include "accel/tcg/cpu-mmu-index.h" +#include "exec/target_page.h" #include "exec/translator.h" #include "exec/plugin-gen.h" #include "tcg/tcg-op-common.h" #include "internal-common.h" -#include "internal-target.h" #include "disas/disas.h" #include "tb-internal.h" @@ -26,8 +25,7 @@ static void set_can_do_io(DisasContextBase *db, bool val) { QEMU_BUILD_BUG_ON(sizeof_field(CPUState, neg.can_do_io) != 1); tcg_gen_st8_i32(tcg_constant_i32(val), tcg_env, - offsetof(ArchCPU, parent_obj.neg.can_do_io) - - offsetof(ArchCPU, env)); + offsetof(CPUState, neg.can_do_io) - sizeof(CPUState)); } bool translator_io_start(DisasContextBase *db) @@ -50,8 +48,8 @@ static TCGOp *gen_tb_start(DisasContextBase *db, uint32_t cflags) if ((cflags & CF_USE_ICOUNT) || !(cflags & CF_NOIRQ)) { count = tcg_temp_new_i32(); tcg_gen_ld_i32(count, tcg_env, - offsetof(ArchCPU, parent_obj.neg.icount_decr.u32) - - offsetof(ArchCPU, env)); + offsetof(CPUState, neg.icount_decr.u32) - + sizeof(CPUState)); } if (cflags & CF_USE_ICOUNT) { @@ -80,8 +78,8 @@ static TCGOp *gen_tb_start(DisasContextBase *db, uint32_t cflags) if (cflags & CF_USE_ICOUNT) { tcg_gen_st16_i32(count, tcg_env, - offsetof(ArchCPU, parent_obj.neg.icount_decr.u16.low) - - offsetof(ArchCPU, env)); + offsetof(CPUState, neg.icount_decr.u16.low) - + sizeof(CPUState)); } return icount_start_insn; diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 72d4acfe5e..047afa49a2 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -8,6 +8,7 @@ tcg_ss.add(files( 'cpu-exec-common.c', 'tcg-runtime.c', 'tcg-runtime-gvec.c', + 'translator.c', )) if get_option('plugins') tcg_ss.add(files('plugin-gen.c')) @@ -22,7 +23,6 @@ tcg_specific_ss.add(files( 'cpu-exec.c', 'tb-maint.c', 'translate-all.c', - 'translator.c', )) tcg_specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c')) specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_specific_ss) From patchwork Thu Apr 24 00:48:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883864 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3205812wrs; Wed, 23 Apr 2025 18:16:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVIVfG5MQvtTq/FHidWQRmK7cXPTsyX/ZreW3+m17Q8y8YcueEZHqeSWG4AoRcmAT14SQs0bA==@linaro.org X-Google-Smtp-Source: AGHT+IH4U6UP63r3IIWKG7PsjfHgKsHyRtSFNujHGXtB/KJXj3EQTDsPydN44PEErHJpKQepvjze X-Received: by 2002:a05:620a:280e:b0:7c7:a5e1:f204 with SMTP id af79cd13be357-7c956f4f3bdmr168892285a.56.1745457375703; Wed, 23 Apr 2025 18:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457375; cv=none; d=google.com; s=arc-20240605; b=cRcNSAvqVZP5Ca/Ntl7dqPgxF2AWVWTB8E76fPNaZ9STToWb55TNzpOWsLXj9JpYQ6 7rv8ViOkLa5UvtJLFbiYKpL2Amb4r+VQFLg5lEStdX4yVg9nogRqiFMuA5gnygIx759S ugw5uUhAXcMj1jr7e8QUEWH2A8pLAropNHWndV3hvcvtwxHSEGYMwMD2V7Zt5Nf0msLy 5pPt4q0jMeTLq6NLGkDdWZr/Gh4VDdFgHhYF4hhMB486jWPv/ubcoQVQLTPZR6f/GL6z gmhn/NP9VeIq30+7wkQ1w4tCSeiiGv6A3R4x8WzE/PpJH+zkF4mZ2+ugVETVlDkbGf13 Z2Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ggbOR76BAcyXgvavB4mZvfqZnt/5CtPguoo3NLh6PJU=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=LISytZZuuDS/Z+/cVk5Iio3HtfUawvt2kf9e+7Iddd8IkHpJZTZYXtPWUj/KMfhyJ3 7l5UCfV1LLrFJMjhN2/mjzIw1ErWayZd4Adj//bJBPRN/8e4TMzhprHzE5zkmqjjzqKO lN8vCYDa2LOPBzaO4vuS6I0NdbzkY5rVD/3necAXyDO0ADUNmgQQ+yBKLoEiKRiAl5Vm gaF5OXRx55j9k25kDr5E6lJWq7EllbyS3O2JapfVsREkadaLQpmJXONi9ORIYnP0kb0l nftuiqUhy0b2S8BB4LTh2hAhullDQwJRPKW8lTlRxOySy8g3JPMrujZjtUhWAylXvACk /V8A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="PV/XGtWi"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ea293asi22706285a.413.2025.04.23.18.16.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:16:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="PV/XGtWi"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kua-0007g4-Fr; Wed, 23 Apr 2025 20:57:57 -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 1u7ktW-0005uI-SQ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:52 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktT-00056E-TY for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:50 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-736b0c68092so333645b3a.0 for ; Wed, 23 Apr 2025 17:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456206; x=1746061006; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ggbOR76BAcyXgvavB4mZvfqZnt/5CtPguoo3NLh6PJU=; b=PV/XGtWiyd2WMWIm5EhWOQ5CHeKgMCNh3l27Bz+V2UucRYL7OAvUJtVqC+IR8XaXXC 5qc8UF34qSc4757c/5FvI+y0/uTXZ1J1RWAZfbMs7MTZYjc2DdqxGULca6rGXfGr/6h0 /vM4bTZPyyameQa+4Y/LD7zsoXnUKZnqr6V7ULFgcyRnP51ptpJEdsWhVXaaRTJciVGH 7pkNw3X099UMjnDq+8S3bI/Y4FgtyMqf8XUeriAqM6UH1Krki46Yhbhbtnh+4Vt2iWyt RjhbrYkmKPn4I7GjHsCmEQUqTNYOkGYkcMjWGBSxC1bqeT8+A2RkouLAIIkeEOw4vccQ r6TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456206; x=1746061006; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ggbOR76BAcyXgvavB4mZvfqZnt/5CtPguoo3NLh6PJU=; b=L5kXpdxmCJNViMWOLdhALbMVuQ3DuDOhaTek1p/1YmGthFxDsIia/VLC0XRqot8pMP 4SW5mMs1qNChD7AQraXe4/T3F1+K/9f52ps83FsTB72nuocGl2PuompZtPW+LEzxwxKD 1yUBeS79OQqM3WPBJlXJgXZ5JqUkBS+NU8YVRk2mswXu8A+7GPF97U0k7CuanVpdSjiB r81yO6jfZzNNkOZlszpQjj+0cEEK9grfGcEG2Qq5Lcr9Q8WsXsrDxtMC0Gnz998Gj2lL X2xWCq6guz1CDqzB7InD5DmfGE6cYu2EmGbWHg1VpKDYEvcq+bQuSOiL0Cg6ui/O6VLI ll/g== X-Gm-Message-State: AOJu0Yx1gxd54PsUsqqVIpcmLUpZwa4BJyyOSXywm+csOz0apKsW2+7G ZqTMX+IR08RBgeWAhtxRECmb6o7Yqegr7lRWroaWOX0I5zfu6eH/JCDTZySccaYIXuPRBuwQ4a0 X X-Gm-Gg: ASbGnctuHbVCzc0Rqh5C+CH9eO/2KgusR8DiDEXi4kPNtzveYx32i+UBC6bFG7YQ4OR qrcIH+FBN4UryaqAsgwD1WvIVSJ3+Uu4q6Zr3WJTWR7a27tyQEsiYVC0YzL2Hx9EkuQvt4lbxAM fTpylGiA9NaEHU0pDXd6retmhgQIUBZJnA8MHPKlOfE0bL/jV7vMU+cnvgD+aJbrzL6MMicnPOB yeoB/+T7wBH+WDAR+WMkaX6I8zckXdnPNFQRkY7t0ApH5KNcVS0tqEYVqnTZmgw1C938uPzeiEx 9pm72cnO1/X2K1QUhRkjo6HaPvJWC3jWh5tj3ZX7cSHZ8LhhEDVQjt5kwJfN5+7+aBDjj6WXiAM = X-Received: by 2002:a05:6a20:d706:b0:1f5:77bd:ecbc with SMTP id adf61e73a8af0-20444e9b3a8mr825739637.16.1745456206231; Wed, 23 Apr 2025 17:56:46 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:45 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 097/148] accel/tcg: Split out tlb-bounds.h Date: Wed, 23 Apr 2025 17:48:42 -0700 Message-ID: <20250424004934.598783-98-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The CPU_TLB_DYN_{MIN,MAX}_BITS definitions are not required outside of cputlb.c and translate-all.c. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tb-internal.h | 27 --------------------------- accel/tcg/tlb-bounds.h | 32 ++++++++++++++++++++++++++++++++ accel/tcg/cputlb.c | 1 + accel/tcg/translate-all.c | 1 + 4 files changed, 34 insertions(+), 27 deletions(-) create mode 100644 accel/tcg/tlb-bounds.h diff --git a/accel/tcg/tb-internal.h b/accel/tcg/tb-internal.h index f9a06bcbab..08538e2896 100644 --- a/accel/tcg/tb-internal.h +++ b/accel/tcg/tb-internal.h @@ -22,33 +22,6 @@ */ #define GETPC_ADJ 2 -#ifdef CONFIG_SOFTMMU - -#define CPU_TLB_DYN_MIN_BITS 6 -#define CPU_TLB_DYN_DEFAULT_BITS 8 - -# if HOST_LONG_BITS == 32 -/* Make sure we do not require a double-word shift for the TLB load */ -# define CPU_TLB_DYN_MAX_BITS (32 - TARGET_PAGE_BITS) -# else /* HOST_LONG_BITS == 64 */ -/* - * Assuming TARGET_PAGE_BITS==12, with 2**22 entries we can cover 2**(22+12) == - * 2**34 == 16G of address space. This is roughly what one would expect a - * TLB to cover in a modern (as of 2018) x86_64 CPU. For instance, Intel - * Skylake's Level-2 STLB has 16 1G entries. - * Also, make sure we do not size the TLB past the guest's address space. - */ -# ifdef TARGET_PAGE_BITS_VARY -# define CPU_TLB_DYN_MAX_BITS \ - MIN(22, TARGET_VIRT_ADDR_SPACE_BITS - TARGET_PAGE_BITS) -# else -# define CPU_TLB_DYN_MAX_BITS \ - MIN_CONST(22, TARGET_VIRT_ADDR_SPACE_BITS - TARGET_PAGE_BITS) -# endif -# endif - -#endif /* CONFIG_SOFTMMU */ - void tb_lock_page0(tb_page_addr_t); #ifdef CONFIG_USER_ONLY diff --git a/accel/tcg/tlb-bounds.h b/accel/tcg/tlb-bounds.h new file mode 100644 index 0000000000..efd34d4793 --- /dev/null +++ b/accel/tcg/tlb-bounds.h @@ -0,0 +1,32 @@ +/* + * softmmu size bounds + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef ACCEL_TCG_TLB_BOUNDS_H +#define ACCEL_TCG_TLB_BOUNDS_H + +#define CPU_TLB_DYN_MIN_BITS 6 +#define CPU_TLB_DYN_DEFAULT_BITS 8 + +# if HOST_LONG_BITS == 32 +/* Make sure we do not require a double-word shift for the TLB load */ +# define CPU_TLB_DYN_MAX_BITS (32 - TARGET_PAGE_BITS) +# else /* HOST_LONG_BITS == 64 */ +/* + * Assuming TARGET_PAGE_BITS==12, with 2**22 entries we can cover 2**(22+12) == + * 2**34 == 16G of address space. This is roughly what one would expect a + * TLB to cover in a modern (as of 2018) x86_64 CPU. For instance, Intel + * Skylake's Level-2 STLB has 16 1G entries. + * Also, make sure we do not size the TLB past the guest's address space. + */ +# ifdef TARGET_PAGE_BITS_VARY +# define CPU_TLB_DYN_MAX_BITS \ + MIN(22, TARGET_VIRT_ADDR_SPACE_BITS - TARGET_PAGE_BITS) +# else +# define CPU_TLB_DYN_MAX_BITS \ + MIN_CONST(22, TARGET_VIRT_ADDR_SPACE_BITS - TARGET_PAGE_BITS) +# endif +# endif + +#endif /* ACCEL_TCG_TLB_BOUNDS_H */ diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 28c47d4872..a717f357d5 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -41,6 +41,7 @@ #include "trace.h" #include "tb-hash.h" #include "tb-internal.h" +#include "tlb-bounds.h" #include "internal-common.h" #include "internal-target.h" #ifdef CONFIG_PLUGIN diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index bb161ae61a..87fb6c51d3 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -47,6 +47,7 @@ #include "exec/page-protection.h" #include "exec/mmap-lock.h" #include "tb-internal.h" +#include "tlb-bounds.h" #include "exec/translator.h" #include "exec/tb-flush.h" #include "qemu/bitmap.h" From patchwork Thu Apr 24 00:48:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883881 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207145wrs; Wed, 23 Apr 2025 18:21:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWUmAeHiljXQ6oHy+G4/7gXf2/RmSfwi4BDqkkaOJoa2ZR+8vs8QA5LNCPG248t3U8VC857Hw==@linaro.org X-Google-Smtp-Source: AGHT+IHU8RhiTLpCgnv4ppDcCMJrNjdobIlCypVYfp2NdaXjKPOarXru+Q8mAjyjns8wd+Yl83C6 X-Received: by 2002:a05:620a:1995:b0:7c5:a2f8:e6e4 with SMTP id af79cd13be357-7c956ede5dcmr137931885a.29.1745457676626; Wed, 23 Apr 2025 18:21:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457676; cv=none; d=google.com; s=arc-20240605; b=bA+iUm43ewVLu4gkisLzs6KjAiYuYzpjf0NsMMXYR2K19DJttsoSNnaTlYpm+QhT0g vbX5kkFnJxmrwD9IP7RLwi3CJcWno9yPPh1Q/72Zh/GkTHu0Wb4DSdFxQi3TOsMMPVnp KMNp2gBb46S2sO6LPdWet6voFkDh0Eeg9Agn7tWZgxKS5HG5aBz3nnOQHBG+k425SnfP QUpnEFzk5diUE7aG//DUZs/XtHKrTpGhqyamPayHWBX4CpFQpRWoXM/MmE16S0vwsxRM Jnpa6vQHOx0PaydhndWqAxmRT7+oD2oCiWIy6fsKv1Rb40Iburt8T4U70USJo4lnalOY F+EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=K/MtxezZDzd5ayKGwSKtUCDFVjLPy/nFfpXlQklcK64=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=AfWpHWOvinQZBcREW1oAnN5kPNyI+OL7o2Q+WOkUaAd7+C9ed/vMAvpo+VLxPisGMI Im9BkE7heNZBhjeHzeFx2zVyVhd2Jdy4jKTqFGhYBTs1IyUVC08c16UIh/bU7AG6VQOe UJKGDYAQaQgBx36YZz0YNVzCBxPwLmI3iW4g0eEXIxBJQQtTgGA6s6wpo4e4/CG3CTzG D17sYPpwrXscL5at+MvcWmEzv5Bur2AzJK5xjWOpN8soFcbobIWTaWc61p2t7aYLQSrL iHPdtLstID9EnD19wBgKRbhbdmRdzSWnhS3izgkmVA5vulaehGWIYauntA7wFKhaQAiH kUFg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="TSc/Floa"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958eb8861si24411685a.476.2025.04.23.18.21.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:21:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="TSc/Floa"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kvs-0002tq-2P; Wed, 23 Apr 2025 20:59:16 -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 1u7ktW-0005uH-SQ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:52 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktU-00056M-KQ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:50 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2295d78b45cso6761825ad.0 for ; Wed, 23 Apr 2025 17:56:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456207; x=1746061007; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K/MtxezZDzd5ayKGwSKtUCDFVjLPy/nFfpXlQklcK64=; b=TSc/FloaBoaepsFrI2RKCj+PBQdIB1WFOGWkdnHbO5PcA/3TEz5aXsf/HYBgFhYbzt uAvegi9k6xkXT7maELmhLrIcuHVd/ioWFVs/e0gPc5J7fBor4oLackb+i3J4Yd96TaeU NwuH/ZZbnHeryvfJwPt7fxkbVk5TtZKp+FvsWQKluY7HOB2+amtWzFXjNDDkD3gfJAO3 MukuSrFBQ3qZcrrprMhefAEbu05X/93n6Gz5nMjXD+Gd5IFF12MNLye6EKEAWifFQNOq 7RqsmYf83bUNIGA0Vjrd9Ef1tfkBJZLRSenQpHxjvbAQLlQJ6jfapk0NsM3KCxiTAvf1 xYDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456207; x=1746061007; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K/MtxezZDzd5ayKGwSKtUCDFVjLPy/nFfpXlQklcK64=; b=p6JKLFzXxIXskqdWD8kzicFXeyNoe9jL7/QhZT+1Fe3/0MPN0514Qj1l6L5ER9/Dc3 ciVbjsjGcOUV6zczO3XTpx5iznarcBunPrQMuUEKsST79xl94FjTzpkAYDXYS6qEe3YD etcJAHm/SWmRROOGo/38MYWtIVXKo4+0xlWO7rvCKXWG9QzwKMbWBSRvGjFKUYvJjSMl kMG0yoXydVdp2pD1mlXSSy0IN1Mk0JhSn0lrMKczZ/uhGBuVET50zxZk11h/7XnZENpc SiCYYwSE3OwECgMy3ufCDbWbXF/joxmdYmd+HklceqoE3Bi86eA+pzNjimceQoeJ2uSo Em5g== X-Gm-Message-State: AOJu0YwnsPVJcsBBv26hdBAhE7OYF6UFZlZaV8ZN8fr8oQvpZFW3AaE3 ETx2N1AMB8FS8FK57B+M0e/7PVBRLOPxXvPkX+OH682GR8Aki7fkLef2rD0th3TYNlF79rL/GIo o X-Gm-Gg: ASbGncuxB2TcvXHAG6xRICansOBV964Wf8rHt1EYsGiZa9vfJYC4T8zDNoGZoi4kiVI BsFPDSsh0rhRPHJvUaTbN304qgYuQcmCzU/0aPDCu8rFYwKGPABFbkAWUacyPel0GW9dyFGQMLQ 8UbD18AQ57a7x7ebYJ0QBhqvDKY5zm7jFhdbx+gl+K1Oi4dkV1nTPH4d8ZOluIqtasrb1IwA5n4 2DDZDPywOxhv7nX9lqMY7YcCRGwFGY+0HfQt+pRI8/BNfQvdt1lg/nDvLfPlm0qtA5HQAx8MXAF kp9FV/FKi7OpP+uTJZmqCQgI4qYwYerNvodwSyCp+sPORQHD9SJs0lrMEzxBWl03N3F+wj2/lUQ = X-Received: by 2002:a17:903:3c50:b0:21f:85ee:f2df with SMTP id d9443c01a7336-22db3bd0f26mr9474845ad.15.1745456206833; Wed, 23 Apr 2025 17:56:46 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 098/148] include/exec: Redefine tlb-flags with absolute values Date: Wed, 23 Apr 2025 17:48:43 -0700 Message-ID: <20250424004934.598783-99-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Don't base the values on TARGET_PAGE_BITS_MIN, but do verify that TLB_FLAGS_MASK does not overlap minimum page size. All targets now have the same placement for these flags, simplifying mmu management when we enable heterogeneous systems. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/tlb-flags.h | 68 +++++++++++++++++++--------------------- accel/tcg/cputlb.c | 2 ++ 2 files changed, 34 insertions(+), 36 deletions(-) diff --git a/include/exec/tlb-flags.h b/include/exec/tlb-flags.h index 54a6bae768..357e79095c 100644 --- a/include/exec/tlb-flags.h +++ b/include/exec/tlb-flags.h @@ -19,54 +19,29 @@ #ifndef TLB_FLAGS_H #define TLB_FLAGS_H -#include "exec/cpu-defs.h" +/* + * Flags returned for lookup of a TLB virtual address. + */ #ifdef CONFIG_USER_ONLY /* - * Allow some level of source compatibility with softmmu. We do not - * support any of the more exotic features, so only invalid pages may - * be signaled by probe_access_flags(). + * Allow some level of source compatibility with softmmu. + * Invalid is set when the page does not have requested permissions. + * MMIO is set when we want the target helper to use the functional + * interface for load/store so that plugins see the access. */ -#define TLB_INVALID_MASK (1 << (TARGET_PAGE_BITS_MIN - 1)) -#define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 2)) -#define TLB_WATCHPOINT 0 +#define TLB_INVALID_MASK (1 << 0) +#define TLB_MMIO (1 << 1) +#define TLB_WATCHPOINT 0 #else -/* - * Flags stored in the low bits of the TLB virtual address. - * These are defined so that fast path ram access is all zeros. - * The flags all must be between TARGET_PAGE_BITS and - * maximum address alignment bit. - * - * Use TARGET_PAGE_BITS_MIN so that these bits are constant - * when TARGET_PAGE_BITS_VARY is in effect. - * - * The count, if not the placement of these bits is known - * to tcg/tcg-op-ldst.c, check_max_alignment(). - */ -/* Zero if TLB entry is valid. */ -#define TLB_INVALID_MASK (1 << (TARGET_PAGE_BITS_MIN - 1)) -/* - * Set if TLB entry references a clean RAM page. The iotlb entry will - * contain the page physical address. - */ -#define TLB_NOTDIRTY (1 << (TARGET_PAGE_BITS_MIN - 2)) -/* Set if the slow path must be used; more flags in CPUTLBEntryFull. */ -#define TLB_FORCE_SLOW (1 << (TARGET_PAGE_BITS_MIN - 3)) - -/* - * Use this mask to check interception with an alignment mask - * in a TCG backend. - */ -#define TLB_FLAGS_MASK \ - (TLB_INVALID_MASK | TLB_NOTDIRTY | TLB_FORCE_SLOW) - /* * Flags stored in CPUTLBEntryFull.slow_flags[x]. * TLB_FORCE_SLOW must be set in CPUTLBEntry.addr_idx[x]. */ + /* Set if TLB entry requires byte swap. */ #define TLB_BSWAP (1 << 0) /* Set if TLB entry contains a watchpoint. */ @@ -82,6 +57,27 @@ (TLB_BSWAP | TLB_WATCHPOINT | TLB_CHECK_ALIGNED | \ TLB_DISCARD_WRITE | TLB_MMIO) +/* + * Flags stored in CPUTLBEntry.addr_idx[x]. + * These must be above the largest alignment (64 bytes), + * and below the smallest page size (1024 bytes). + * This leaves bits [9:6] available for use. + */ + +/* Zero if TLB entry is valid. */ +#define TLB_INVALID_MASK (1 << 6) +/* Set if TLB entry references a clean RAM page. */ +#define TLB_NOTDIRTY (1 << 7) +/* Set if the slow path must be used; more flags in CPUTLBEntryFull. */ +#define TLB_FORCE_SLOW (1 << 8) + +/* + * Use this mask to check interception with an alignment mask + * in a TCG backend. + */ +#define TLB_FLAGS_MASK \ + (TLB_INVALID_MASK | TLB_NOTDIRTY | TLB_FORCE_SLOW) + /* The two sets of flags must not overlap. */ QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & TLB_SLOW_FLAGS_MASK); diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index a717f357d5..39314e86f3 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -49,6 +49,8 @@ #endif #include "tcg/tcg-ldst.h" +QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & ((1u < TARGET_PAGE_BITS_MIN) - 1)); + /* DEBUG defines, enable DEBUG_TLB_LOG to log to the CPU_LOG_MMU target */ /* #define DEBUG_TLB */ /* #define DEBUG_TLB_LOG */ From patchwork Thu Apr 24 00:48:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883877 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207067wrs; Wed, 23 Apr 2025 18:21:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUsV9Fw0vXSwKB4sYfFF9gN6UfJOXRVNCLEOf6lykHuay9HsaSykdjDozMpToX9XurjrccQYQ==@linaro.org X-Google-Smtp-Source: AGHT+IEheDHRfUFvq7Zwh/8wuIUpyHKEgShr6jc7fR0iznMQ7jqhlB1KLvzyfE4rrf8r5xCdXsS3 X-Received: by 2002:a05:622a:180b:b0:476:b7cf:4d42 with SMTP id d75a77b69052e-47eb34b922emr10745781cf.27.1745457660148; Wed, 23 Apr 2025 18:21:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457660; cv=none; d=google.com; s=arc-20240605; b=D2TuPUThQWh44WekcFjgwz1RQ4zmmFwkVNCbM0AIy+7/2mzzt1Ex4Wbd7ZDHyjKkKw ZQHQZWLo0SPx8eRwhxyNRMKGCIY3IawCa02v4q4CmePxloul8nlSgWYug6qRj7JtJwbW Z823hvep961LQMfQhkIgBhaRa8dWajbXaVRNRRP4mvfaIP9Pp971J2oy+3L1TbCBjN0L WMYpbMjKxPAyf0AB7GlTNjNvARLncRxfr6eYNC6bDpZYmJl37mWlf1Z5I8P61TftnAka t6DoyLkJCHPtSkiUcN7C/QhO7iOQkUil+9SVujp592WnC/mcjHapzhokAyJmQesJiWMt CYbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2WoakTEoTh5W+Edqv/m7cqa7TN4j7HTie5YrJRYbIMU=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=Dzwev4Mp1sc6NEu+mp6yXY8f6dZtrOf1lXFYz4VLpOq2KZQkq8YB/gTwb6AT/Q9VbY gl93t8p5xWu3QZMQoV8gnXMDVFQ27i0G19A7P4jcIg6XBqJtz6O0pjd7s1fKY0lBXMtf Zj1UJfuz0MgmS2CGsN21E0k3/9nQfqBK0isZL05oPgK7mlHwbuDqthfRHrzwOIR5M6GZ Y7bcxOvOPCgMAvs2ew58naLxCwshzg/UusnSsAF4E3bEi5GhcuBN12LZR2/vvxoDBzKX pUD5l9BTGALYkl+5FB+qYDuuwbTI7ufGyjKB8nrjzNUoJLo2cU6exVbCRJFS0ce8/XIg AqXw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=seyH1gVK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f3c039bsi5444461cf.85.2025.04.23.18.20.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:21:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=seyH1gVK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kw6-0003GO-I1; Wed, 23 Apr 2025 20:59:33 -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 1u7ktX-0005uL-Fi for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:53 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0: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 1u7ktV-00056Y-JF for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:51 -0400 Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-736b34a71a1so465128b3a.0 for ; Wed, 23 Apr 2025 17:56:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456208; x=1746061008; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2WoakTEoTh5W+Edqv/m7cqa7TN4j7HTie5YrJRYbIMU=; b=seyH1gVKy5vzE/OlWmJxQ8KRoUIVeDACDqtjeD5YeekRsaAi3mnNAiSXkB4i6rVbU6 jo8m7cdAB/iX44ZFIjKmmjWPmoz451tVHHs9b8CTAvSDYUMTJpE/G8akULl6uFemOhc+ nFsugiV9/T8rPTKY9OJRzkb9UptavdolwYvMMTfOHW89980ohmGYRcOSZ+3L09AOCfy9 mMqnQFKk98fEMgepAWIIlwhHOFv27llkOwp62it2YorpTVfxhXFg0gzggDsoHbldohig 07e1BzqKHiW7FmXfTOYQleMHKuT44gE1UwJJaZefxR8/zyYS5r0ZQoOxLlwUjvvbbdVW JCag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456208; x=1746061008; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2WoakTEoTh5W+Edqv/m7cqa7TN4j7HTie5YrJRYbIMU=; b=I7TTekuts1kttTzI0oMDZADL95y8D2kEQl5EOTMpECulrd4SJz7I08+NZuhBA4dOLk lKx0auLQNHgH4XhB3Wjkm9+C98F6szICc+b7E+lIJGS4bKabuQ8MlXbuaLP+kXCD7NrM KNTeMU1fuDpod2ZMFP5+96t1B1i8I99kKh4U4iSx9EOcP+RT7YgIvkNeWHWo9Bm68SEP 6EbiFYcfiTAsG3gxQ8soW9DzP3IUR5NiJh4DZRq5qM/1vuQgmQt6WY1KkHG0msvwXyr9 H8r3nZr+uByYyoY4dfBLkxHN5O4+GQbTM0qoVZ6vTMEegnFAvYiw1zoN7BRg5QhglqB1 JgJQ== X-Gm-Message-State: AOJu0YwptTCkdC0t44qfl1+5xpZ8HFTlQNqHX+tb4xDWvuZ+x9TuAKKP eumlf59+xcFiXyw3eFLNP/OOlsW71kfEhEoOlRaggkaBQLAB4ZwYFLJV0SNHZ8fPeL7AqPdfXfy + X-Gm-Gg: ASbGncvBSnQsRbU4pmLOlfQO4EpefmzGrTMSwgt+qaozc5LHgk+JopyGMfedr6gqEiW 7+HLJTlqkCXCiZ41nytJd+s3iHkHaI4+oU0DgPH3rCY1KRPEawpgAl6YWn4DH4VmEF7173Xm7Hh z6szdkPsfOVqywnjB53x1vdjxe/DEv/YtIC5K+Nb/elCfQpm2V7Ho2VW+8JVfj+bdDf1HBN/yjW PTU8XyuLSOAa8ed+ivKJOqRA5M14QkPYgNLw542PBeyCLp/+4HMrjud1XX+6cBwYq+P+F90PV0L 0uNZjOLkZpRZ5NCwylh6BsDprr9xp7s7FgWxNytdvU3kiwhht3TtBZ4UgaZfqLkQ4qo2qjIjOdU 0MR2guazHbg== X-Received: by 2002:a05:6a21:6d8d:b0:1f3:47d6:aa05 with SMTP id adf61e73a8af0-20444d275ccmr1038104637.0.1745456207751; Wed, 23 Apr 2025 17:56:47 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 099/148] page-vary: Move and rename qemu_target_page_bits_min Date: Wed, 23 Apr 2025 17:48:44 -0700 Message-ID: <20250424004934.598783-100-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Rename to migration_legacy_page_bits, to make it clear that we cannot change the value without causing a migration break. Move to page-vary.h and page-vary-target.c. Define via TARGET_PAGE_BITS if not TARGET_PAGE_BITS_VARY. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/page-vary.h | 9 +++++++++ include/exec/target_page.h | 1 - migration/savevm.c | 6 +++--- page-target.c | 5 ----- page-vary-target.c | 9 +++++++++ 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/include/exec/page-vary.h b/include/exec/page-vary.h index 54ddde308a..101c25911c 100644 --- a/include/exec/page-vary.h +++ b/include/exec/page-vary.h @@ -49,4 +49,13 @@ bool set_preferred_target_page_bits(int bits); */ void finalize_target_page_bits(void); +/** + * migration_legacy_page_bits + * + * For migration compatibility with qemu v2.9, prior to the introduction + * of the configuration/target-page-bits section, return the value of + * TARGET_PAGE_BITS that the target had then. + */ +int migration_legacy_page_bits(void); + #endif /* EXEC_PAGE_VARY_H */ diff --git a/include/exec/target_page.h b/include/exec/target_page.h index 8e89e5cbe6..e4bd7f7767 100644 --- a/include/exec/target_page.h +++ b/include/exec/target_page.h @@ -63,7 +63,6 @@ static inline int qemu_target_page_bits(void) return TARGET_PAGE_BITS; } -int qemu_target_page_bits_min(void); size_t qemu_target_pages_to_MiB(size_t pages); #endif diff --git a/migration/savevm.c b/migration/savevm.c index c33200a33f..0c12e373b4 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -50,6 +50,7 @@ #include "system/cpus.h" #include "system/memory.h" #include "exec/target_page.h" +#include "exec/page-vary.h" #include "trace.h" #include "qemu/iov.h" #include "qemu/job.h" @@ -339,7 +340,7 @@ static int configuration_pre_load(void *opaque) * predates the variable-target-page-bits support and is using the * minimum possible value for this CPU. */ - state->target_page_bits = qemu_target_page_bits_min(); + state->target_page_bits = migration_legacy_page_bits(); return 0; } @@ -462,8 +463,7 @@ static const VMStateInfo vmstate_info_capability = { */ static bool vmstate_target_page_bits_needed(void *opaque) { - return qemu_target_page_bits() - > qemu_target_page_bits_min(); + return qemu_target_page_bits() > migration_legacy_page_bits(); } static const VMStateDescription vmstate_target_page_bits = { diff --git a/page-target.c b/page-target.c index 321e43d06f..8fcd5443b5 100644 --- a/page-target.c +++ b/page-target.c @@ -9,11 +9,6 @@ #include "qemu/osdep.h" #include "exec/target_page.h" -int qemu_target_page_bits_min(void) -{ - return TARGET_PAGE_BITS_MIN; -} - /* Convert target pages to MiB (2**20). */ size_t qemu_target_pages_to_MiB(size_t pages) { diff --git a/page-vary-target.c b/page-vary-target.c index 84ddeb7c26..6251d948cf 100644 --- a/page-vary-target.c +++ b/page-vary-target.c @@ -23,6 +23,15 @@ #include "exec/page-vary.h" #include "exec/target_page.h" +int migration_legacy_page_bits(void) +{ +#ifdef TARGET_PAGE_BITS_VARY + return TARGET_PAGE_BITS_MIN; +#else + return TARGET_PAGE_BITS; +#endif +} + bool set_preferred_target_page_bits(int bits) { #ifdef TARGET_PAGE_BITS_VARY From patchwork Thu Apr 24 00:48:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883911 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3208982wrs; Wed, 23 Apr 2025 18:28:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUc70Jx2U+Jrm27cj69/f6bEczu5/VM5I30OIECu+ajjqX8qSx8d0r2N0MlcbTNdjparU7ZOA==@linaro.org X-Google-Smtp-Source: AGHT+IHrnrwHFJaMr/OjYXJ4dBnry8LuBF0QO371JMQZvN1t/JF+U8hqINMtGmbBHFh81/oD+X9i X-Received: by 2002:a05:620a:44cc:b0:7c3:d711:6ffb with SMTP id af79cd13be357-7c956f280c6mr178487285a.41.1745458101441; Wed, 23 Apr 2025 18:28:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458101; cv=none; d=google.com; s=arc-20240605; b=KsoLNtu6ZJnVTG0WhSU3BTTJyDqK2fnPEvE722ecRZkYxZgtjW+nEEia6UGedIzy8v 5+FN1dcGQhYHisSMDfvD9QIdG0q1BmDKxRFJ+vJ2YKZFZCZuDjr1l0wxtv4CgHvvTJMi m5rxiVjorXeO4e5eIO1L7Fuv6Y+vXNAbrHrZ8KzVml+oew5UPGpHPu4Mwe4aZ1+pae77 LMcSp/v/w4G7ojDU8fmcBefixC32aN7OHB7mWuBpQiFpVTKZ3rIr7pjczTZ/vigz+7Dc XcMDHt0GlD3sU1Uv6JuWI8lD8l+uWFI2diTonmsJ41ibKs0ez4Z68awFC6+LHhMM/nzm NdMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=XyKtevNAmC2eZUOXDG2VlAgB8+znbswT4cFJTBgj39o=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=eXRuasqswEW05zogmRXNgSXuURFgE/hMkTDGCSnT03vjUAFFuqeg8OKSGCw3Qa+J2m DloYrXhHYk+59tSLz3t/2ahlPxzlv+l4vLHlie9nKqnBaZ9tprpFkSoUwhFwmUPxwnJV akgvzrutvbh3gPmcJRfnj0CUQsGa5+8lgRk8m537GoVMljxBsUpatG0JLWdkiKoIx/NX woPtJzkGY+LrFQCMVq0JpX+5EInq5WMP/lpDYyKM2FtjOZJPmg1wC0WKlGDwWS0iffqS h/sO05A6mUsTnBn9xFJDgKLBh4wXwtIL9+go2Y1ordAnNH53FqU7wBcMDx67Dz1FOPZn Wgaw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sxURF97R; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958eb6ec2si25230185a.460.2025.04.23.18.28.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:28:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sxURF97R; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kw5-0003F3-NG; Wed, 23 Apr 2025 20:59: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 1u7ktY-0005uk-Iw for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:56 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0: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 1u7ktV-00056o-MJ for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:51 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-736ab1c43c4so364618b3a.1 for ; Wed, 23 Apr 2025 17:56:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456208; x=1746061008; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XyKtevNAmC2eZUOXDG2VlAgB8+znbswT4cFJTBgj39o=; b=sxURF97R7u7y6a/NKrFbcgoheEz3GuczlEuMdKAZto62dDpZdL6I2i7tLAxv/TB5DO 0LWqq0L5dicBdzeBHavSRA44HahNKsRoCgasWTN871vdNCcJjwPsS569nKE/eE3uXY9j rbhthvPVzf54o6yJFLMAz+jFIqaLlY5xCOm1a1Pe9wJUVHVbldZLETrvRF50j6Z4Qrky TiM4k76XJ2JiTuh0nHWgMuV5FwYuydW/KeI3LYJXhxwPHjvqR26omWNATpyyis+FfVOD 0PuD0KYvqt4zhLbL95Qb+B713SI/DRz3CBszL7xlnDvK8Y2KoiNOL0HQlVjSHwAU1ukb Ep0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456208; x=1746061008; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XyKtevNAmC2eZUOXDG2VlAgB8+znbswT4cFJTBgj39o=; b=dbA6fmbI3Mkuxv8ffbT7eNrasiru1hkd3jYApehFOkuFfJ7Wygwt8pv/u1D0RUBOUv 6X+Lhf4YvwF17IuhNxXnpJ2xURsnYPBQ52G3gTNBxgO8JeybS02qP1MyyPynPdyAvkbl /VtBrdcG6FfSWO3z0PZpvyNLX/xSwYXLbr7HAek8KLG4FANnmj0pXihRlIBQMvxWmtOo p+ntTyuP3ii9ukkqRdDIEDQtvgeFrwd4O31vSxBGeXuAqvh53+72TMZp4MSkZlPx7UgY 5DDHR1CRCWwBuqjZiQw4m+rWID/cDt9OhTIkMDPpzjGDuneiEF3FcoezdbR3oLzWHe4O hNNA== X-Gm-Message-State: AOJu0Yyrlu0+Nb5V2rhFr14qeFgBRQMmk1J59CQKXK0Z7nFB5GuU6xsD xo/g5FF9CUlBYC929a7b6JGrM9EVL57TaS4UkJghc9ctOPIQDsWeOb+/Olomi44yJ+rWHEKf8zd W X-Gm-Gg: ASbGncuB3ZyXoB8qSIi4D0A9YNUAtRSkNOsdrCxFT6fYzN9SgAH4qu+Z6kYyIXNwGaA 4MIAvcPAHueWNd0otRXgfezPtobPNR1O4FuM9m5z+lz8O2xz45uh5xnBC+PD2cRI094Y6i7p2X/ h6/x+r4xrtNE9uW/c9HOuQcZrsFUzkBeNkPFFqUaOHIHMqzlaxivbFRot8NdcOopFruXUKYdkkI d7NlxnSiT/YpVN7/tL4xPQWEpQXrzHxZ+5oYezU9zdhoKM5hcrb8tltTO5VqyhSOUNRv2ghQ3JL fqNCn6WCCfaS1cEOMu8Auajas6v6omwOGvta6JGSe4I2QkPMaQbT1CrPKYGqbqQGoHGN6A9fWbU = X-Received: by 2002:a05:6a20:c6cb:b0:1f5:63f9:9eb4 with SMTP id adf61e73a8af0-20444fd40c9mr955156637.35.1745456208393; Wed, 23 Apr 2025 17:56:48 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 100/148] page-vary: Restrict scope of TARGET_PAGE_BITS_MIN Date: Wed, 23 Apr 2025 17:48:45 -0700 Message-ID: <20250424004934.598783-101-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The only place we really need to know the minimum is within page-vary-target.c. Rename the target/arm TARGET_PAGE_BITS_MIN to TARGET_PAGE_BITS_LEGACY to emphasize what it really means. Move the assertions related to minimum page size as well. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 10 ++-------- include/exec/target_page.h | 1 - target/alpha/cpu-param.h | 1 - target/arm/cpu-param.h | 3 +-- target/ppc/cpu-param.h | 1 - accel/tcg/cputlb.c | 1 - page-vary-target.c | 39 +++++++++++++++++++++++++++++++++++--- 7 files changed, 39 insertions(+), 17 deletions(-) diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index 9f955f53fd..e01acb7c90 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -34,14 +34,8 @@ #ifndef TARGET_VIRT_ADDR_SPACE_BITS # error TARGET_VIRT_ADDR_SPACE_BITS must be defined in cpu-param.h #endif -#ifndef TARGET_PAGE_BITS -# ifdef TARGET_PAGE_BITS_VARY -# ifndef TARGET_PAGE_BITS_MIN -# error TARGET_PAGE_BITS_MIN must be defined in cpu-param.h -# endif -# else -# error TARGET_PAGE_BITS must be defined in cpu-param.h -# endif +#if !defined(TARGET_PAGE_BITS) && !defined(TARGET_PAGE_BITS_VARY) +# error TARGET_PAGE_BITS must be defined in cpu-param.h #endif #include "exec/target_long.h" diff --git a/include/exec/target_page.h b/include/exec/target_page.h index e4bd7f7767..ca0ebbc8bb 100644 --- a/include/exec/target_page.h +++ b/include/exec/target_page.h @@ -41,7 +41,6 @@ extern const TargetPageBits target_page; # endif # define TARGET_PAGE_SIZE (-(int)TARGET_PAGE_MASK) #else -# define TARGET_PAGE_BITS_MIN TARGET_PAGE_BITS # define TARGET_PAGE_SIZE (1 << TARGET_PAGE_BITS) # define TARGET_PAGE_MASK ((TARGET_PAGE_TYPE)-1 << TARGET_PAGE_BITS) #endif diff --git a/target/alpha/cpu-param.h b/target/alpha/cpu-param.h index ff06e41497..63989e71c0 100644 --- a/target/alpha/cpu-param.h +++ b/target/alpha/cpu-param.h @@ -18,7 +18,6 @@ * a 4k minimum to match x86 host, which can minimize emulation issues. */ # define TARGET_PAGE_BITS_VARY -# define TARGET_PAGE_BITS_MIN 12 # define TARGET_VIRT_ADDR_SPACE_BITS 63 #else # define TARGET_PAGE_BITS 13 diff --git a/target/arm/cpu-param.h b/target/arm/cpu-param.h index 896b35bd6d..a7ae42d17d 100644 --- a/target/arm/cpu-param.h +++ b/target/arm/cpu-param.h @@ -24,7 +24,6 @@ # else /* Allow user-only to vary page size from 4k */ # define TARGET_PAGE_BITS_VARY -# define TARGET_PAGE_BITS_MIN 12 # endif # else # define TARGET_PAGE_BITS 12 @@ -35,7 +34,7 @@ * have to support 1K tiny pages. */ # define TARGET_PAGE_BITS_VARY -# define TARGET_PAGE_BITS_MIN 10 +# define TARGET_PAGE_BITS_LEGACY 10 #endif /* !CONFIG_USER_ONLY */ /* ARM processors have a weak memory model */ diff --git a/target/ppc/cpu-param.h b/target/ppc/cpu-param.h index 6c4525fdf3..553ad2f4c6 100644 --- a/target/ppc/cpu-param.h +++ b/target/ppc/cpu-param.h @@ -33,7 +33,6 @@ #ifdef CONFIG_USER_ONLY /* Allow user-only to vary page size from 4k */ # define TARGET_PAGE_BITS_VARY -# define TARGET_PAGE_BITS_MIN 12 #else # define TARGET_PAGE_BITS 12 #endif diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 39314e86f3..0de46903dd 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -49,7 +49,6 @@ #endif #include "tcg/tcg-ldst.h" -QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & ((1u < TARGET_PAGE_BITS_MIN) - 1)); /* DEBUG defines, enable DEBUG_TLB_LOG to log to the CPU_LOG_MMU target */ /* #define DEBUG_TLB */ diff --git a/page-vary-target.c b/page-vary-target.c index 6251d948cf..49a32b4fe5 100644 --- a/page-vary-target.c +++ b/page-vary-target.c @@ -23,19 +23,45 @@ #include "exec/page-vary.h" #include "exec/target_page.h" + +/* + * For system mode, the minimum comes from the number of bits + * required for maximum alignment (6) and the number of bits + * required for TLB_FLAGS_MASK (3). + * + * For user mode, TARGET_PAGE_BITS_VARY is a hack to allow the target + * page size to match the host page size. Mostly, this reduces the + * ordinary target page size to run on a host with 4KiB pages (i.e. x86). + * There is no true minimum required by the implementation, but keep the + * same minimum as for system mode for sanity. + * See linux-user/mmap.c, mmap_h_lt_g and mmap_h_gt_g. + */ +#define TARGET_PAGE_BITS_MIN 9 + +#ifndef TARGET_PAGE_BITS_VARY +QEMU_BUILD_BUG_ON(TARGET_PAGE_BITS < TARGET_PAGE_BITS_MIN); +#endif + +#ifndef CONFIG_USER_ONLY +#include "exec/tlb-flags.h" + +QEMU_BUILD_BUG_ON(TLB_FLAGS_MASK & ((1u < TARGET_PAGE_BITS_MIN) - 1)); + int migration_legacy_page_bits(void) { #ifdef TARGET_PAGE_BITS_VARY - return TARGET_PAGE_BITS_MIN; + QEMU_BUILD_BUG_ON(TARGET_PAGE_BITS_LEGACY < TARGET_PAGE_BITS_MIN); + return TARGET_PAGE_BITS_LEGACY; #else return TARGET_PAGE_BITS; #endif } +#endif bool set_preferred_target_page_bits(int bits) { -#ifdef TARGET_PAGE_BITS_VARY assert(bits >= TARGET_PAGE_BITS_MIN); +#ifdef TARGET_PAGE_BITS_VARY return set_preferred_target_page_bits_common(bits); #else return true; @@ -44,5 +70,12 @@ bool set_preferred_target_page_bits(int bits) void finalize_target_page_bits(void) { - finalize_target_page_bits_common(TARGET_PAGE_BITS_MIN); +#ifndef TARGET_PAGE_BITS_VARY + finalize_target_page_bits_common(TARGET_PAGE_BITS); +#elif defined(CONFIG_USER_ONLY) + assert(target_page.bits != 0); + finalize_target_page_bits_common(target_page.bits); +#else + finalize_target_page_bits_common(TARGET_PAGE_BITS_LEGACY); +#endif } From patchwork Thu Apr 24 00:48:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883817 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3200256wrs; Wed, 23 Apr 2025 18:00:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVEcIfvNmkfvOdPkxnDPMG58jj5nXWQ4aHiOmPwDDaVD192yuTo+6NoOnNlXTzbp6poTixHRQ==@linaro.org X-Google-Smtp-Source: AGHT+IET/hDgr+pRXN3I1GsWMDjwN6amll7VBrPVBJPj418YhcGnFNTyheqdVYNlVdRKmdl5s8qY X-Received: by 2002:a05:620a:240c:b0:7c8:b141:29a with SMTP id af79cd13be357-7c956f434e9mr143111485a.53.1745456432447; Wed, 23 Apr 2025 18:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456432; cv=none; d=google.com; s=arc-20240605; b=iFMPssfGUM1IkS+2s1xUi0tbG6fxIkAiSNF7ATgnVjeqx8oZ7Ela8GTz5HGfZIsUPv vgoTwY0FuwflteY+7ARtHQKQ+tuQWjsRaIprtIZDV652n+IC/23mDMVqk1efoUv+tZI7 p6NjGxi8i7XoZaAbA3vSKnS3VXbElmy6UCEED+O0kYXS2Swc6dKa1YwkfDiUItbxcH1m 5ceJx8vo7UR5cDNjPZJxXM6peEx1TV1OJPO8seuqS0khu8UzUgYygyw/rbzE2uYDnnYu JMk+Bgoe+3M9KrKExc1I2VG1JVGhsmOnqsveZvsir6D1crdGfAiJ3IxI2c5+otDiVaIa Y1sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Uk2ZrawXZYiOMoISYC3G3yGzQ++x7vjYflwSfXkzRVo=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=aQs9j2nrmEMLQIWGvQjs24fZ1vO+IjLNfiY/wUsl9K4/X802QhnFVm3lbskcsPNNQY de8z8GklEoz1vG8xF3jhsgHVaCuuIdjHYubU9Oxa5ZqW0R9KKhJ/Z+kyN1M7RcyExF1o k5Jj+Ja4Izh3CDiIczGiM6c333hJQniDiMQbnrmpwhKlXcvjOYbnWJwXx7tibQqPdpLT MID0N3Ux5lVT4wU7LjyGB9H9sw+oxpM6xbB2cUTtKApuZ4KJWGDMrnq55yzuN033CMQz Du/JOcY8W0OrRDykYfobNH30EcfR1eSibnqKzjFVdN15UTl1WZKOBTZzrqKUOyxt2/Bi ZmQA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wKoynpgv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ee1ae7si19800985a.640.2025.04.23.18.00.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:00:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wKoynpgv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kwM-0003kY-SN; Wed, 23 Apr 2025 20:59:47 -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 1u7ktY-0005uj-JE for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:56 -0400 Received: from mail-pg1-x52e.google.com ([2607:f8b0:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktW-00056x-M8 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:52 -0400 Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-af579e46b5dso231357a12.3 for ; Wed, 23 Apr 2025 17:56:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456209; x=1746061009; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Uk2ZrawXZYiOMoISYC3G3yGzQ++x7vjYflwSfXkzRVo=; b=wKoynpgvcpGEf32CLHu+wdD19/MNDk75eTJyzoNPjo2bGeieoioqH9/t47UKxDVDO4 Oy9/Gopq5VrCEP+HhbnPncylTDS49FtfcIVWcBukhMtalESX2e0KvkSf+dczIuPhepoL iOTCxj/daLl5Sj44UbD2oJw0SekJPuOSrTQaArfolQO3YdlTQQ7HwxQx23fYjrPlA1Pt ZVpVMH1uuaCeNfJUQnwujyhfFn6ih1Lgf+VhGSPYCbyMPR4xF6um9bK+RLw2edKo4ETU dPYOrJmtn2RDpBjMIof0QyOSeRBPdj6vO8XMD7rXNm15CL/Im2Wb+CWFK1Goqu6tcaZM o4ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456209; x=1746061009; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Uk2ZrawXZYiOMoISYC3G3yGzQ++x7vjYflwSfXkzRVo=; b=iQzEY+lThnduzYKiJTpCipgqXL7B+jHldlIRotjIMOcFNrWoZS9ocFRsCi7NLXPSig SAw1Grr9AzMvNeEuNu/TpEpBWKWi+Yud80TTF5NScD8sUNW/E+pNGLzGVT90RA5VauY5 jv/jRgMoZeaeI7aElARs6wWazLiqnFsfb6nzUJKckBao24NlZZUdKaSQkkF4MORTxphA qRPdjIEGSOewp2QlMjHyQfsTffYOHiQFSHnUX5A0H2tmNeGzyfb5FxNiPcdploN158ha bLNCMtHs57MDIpgN2H8DIHjTkH2vSiZ8U19AQUYqgsyG93W85Bys/F6aQlYT2836TY4P gptA== X-Gm-Message-State: AOJu0YzrBWexP9a8F+5Esi6NSY52HLqM2wzs2QIatHQX5u+ufi+18JJT IoSPOyIb66vMVHjbt0Y8DqiHxhOzNsiqLVzN5HggoTmDQoMFj8R259nds4RZzN4OxUEIpEMJQQD Y X-Gm-Gg: ASbGncvzg7AO3hEvFvRSnbzqteYR0rrhiGSCHlyPMnu81j5Mcr68sK5dVLdhKxamm3n 8h7MsE3gKOkZF747OKhvqbKhnIWSwtOvDiAqr29qJ5vbOjrVDHOABSAQDLyMrlVc4fgMiDShYaC lWboOjCziPhJ4pHngnPtw0x3vPQEpqy0Di9I3ZfNg4WKYATFD8WBH2JqvYIKswG7DzrjIo1E7ja ijOTfTr+aY5vfpxtgK0Shl0GQRNCr9Xs/BrFkOvvkjlbVTiUlaNKvQ6btkGlxv+8Kbg9iJ+c+C3 7O9+sLyTVvR/G+J/TojZKbq/DubHeaDLFAiGrj9UaITfBETHEMnNup/XsWL4Ny3rFa71nRcxbK8 yM65yeiYR1A== X-Received: by 2002:a17:902:ce0c:b0:224:1ec0:8a16 with SMTP id d9443c01a7336-22db3bf21e5mr9483785ad.21.1745456209053; Wed, 23 Apr 2025 17:56:49 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 101/148] exec/cpu-all: move cpu_copy to linux-user/qemu.h Date: Wed, 23 Apr 2025 17:48:46 -0700 Message-ID: <20250424004934.598783-102-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52e; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52e.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-3-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 2 -- linux-user/qemu.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 5c4379f0d0..2aaaf0548d 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -31,8 +31,6 @@ #endif -CPUArchState *cpu_copy(CPUArchState *env); - #include "cpu.h" /* Validate correct placement of CPUArchState. */ diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 5f00750151..948de8431a 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -362,4 +362,7 @@ void *lock_user_string(abi_ulong guest_addr); #define unlock_user_struct(host_ptr, guest_addr, copy) \ unlock_user(host_ptr, guest_addr, (copy) ? sizeof(*host_ptr) : 0) +/* Clone cpu state */ +CPUArchState *cpu_copy(CPUArchState *env); + #endif /* QEMU_H */ From patchwork Thu Apr 24 00:48:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883872 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3206651wrs; Wed, 23 Apr 2025 18:19:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXiUkpWoG8sbborgGkWUBCrY4vdZa48f88Yr5lyfmADeUg+AbX0rut8w1nCDDBVhbDDsw76NA==@linaro.org X-Google-Smtp-Source: AGHT+IGTtxrlQ3t7NxXOCLIC5y6nvXPeJx+4AJe5n1zHeBjPiH8cUQ+Il0l8lekowRdqjL93NKyJ X-Received: by 2002:a05:620a:4316:b0:7c5:cd0f:5c09 with SMTP id af79cd13be357-7c956eb320amr149472185a.7.1745457545622; Wed, 23 Apr 2025 18:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457527; cv=none; d=google.com; s=arc-20240605; b=Lq6i10ftgYb+Vyg3edDwxd9G/vd92E7+rEY6Eav9O7K0yTC49TgFsInzcWlHgZXjgl sDjmHMF81MpmuGdOBx6l0DImVRBuIiicBcUCC5arK8YrqT5ROFs5wAuqYBcApNxI+rep RjvQBu2bySUQbKZ8PYXpcUe5eeYg+pgiCS3dMo8fAD9/t2gGAHuiiaUctQC8+XCKbFhQ N8cAyufqis8E/BfOw6+YSgHqsrHgeOOaxCHexGTvJLTYTpfL41zP5wcWG0satddZoDJJ OsbzmrLOIKuKWZMqs1QkFQ/a+p+Tju7A0PzP3S+cNbfAfTSIp+5QwOqwGSINM6VDRJKx fXUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BgalV7HruJEO8qZACAhRIvHXd09mMPeIqD7Z/pvVOVM=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=fPjGTb4TrUwEozqy1UUJnLbmwDycu9q7fJUfbBvqJutkpTTOqjmv6vWl2SAiVH5a/w ZkwSKqJUyjHyAO3yfG3ikbYbz55hllvhxRF9Ds9QVpfkjLDKGoX7lPZsetE+BZpS4CsW n5nfYSxVnzjCgaoL6u14bmitzVce4uUMQ3GRnJF3N9qtaavnvvjgKNWPAbF60ejwhSbs CjcAginQOdH86LPK/XslWJ06G03LgF35hGGCJyrfQ9MU3rDtvlg3VHhj5Oduauq5B2g/ Ew4JN7YWQyivgh30HmfTpsN9Ut1rtjGhs7hy4lzZ8QfspmdHGekiKGJbZxga/6qewjqc OeTQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=miipDs6R; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958cd5b5dsi25119885a.172.2025.04.23.18.18.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:18:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=miipDs6R; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kva-0001oG-4D; Wed, 23 Apr 2025 20:58: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 1u7ktY-0005ul-M4 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:57 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktX-00057A-2N for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:52 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-736ad42dfd6so333941b3a.3 for ; Wed, 23 Apr 2025 17:56:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456209; x=1746061009; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BgalV7HruJEO8qZACAhRIvHXd09mMPeIqD7Z/pvVOVM=; b=miipDs6Rjee+dibWnnTd/dmElbmRIPLfsOgZCQQxLEq0YnJoynYEq0WAP+zAuXeaYI P83dhlxPgSqcniC7ewVvcQlfE1D+4daABF9hqMvBqMPZhNqGTlZEmbpzgNwTBBEBiy/j cflQq+PuY51HdUtq161UKLG9CHsyWER7c1Ef6Vb0ZdRcxUQFvoUatNpIKLQnP/N5fU+g B6zrBVJVCMYz6dyc/0LYJOM3Rynf/cuGxWsirORhra9XTWzCp6qAXjL6Uxn9tya4IkY+ nutP52w8seIqjA/mPQGuAqnt5YGf3JjiEQEAkMX/fWeosBuNxl73s++UIhIFLt2Cdudn 8uWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456209; x=1746061009; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BgalV7HruJEO8qZACAhRIvHXd09mMPeIqD7Z/pvVOVM=; b=U7Kn1amEYHPJphogolF5S5R7hO63XGS7MXAydrzgiu5M7SfD6QETWKOs9rILADrodA d1Q631IEdAxKpBJeI82AFYV91XTfIEO1nb9NOueiNW4QcayplGVoO8iZsqwF32KcQM0t YfKfLzhfrB6WfUHsaunaKfwQa18s0Y6L1grgr/9l3IRI3IjdMzUYhxMJDI6p1zQjzdZ0 7rdnmFCZ91ZzN/i2sC0lDoGMyKDPxckKb03H+zU7q1pTXi34D+Yuzewbd4N3XIymKQ1D jsWPuSeXWv9xxezK7UMlUFAHT8z8Ca5OwfFVCTFYyKHV2EDkhx+D5lUD0XnwXJ//DXY7 7TGw== X-Gm-Message-State: AOJu0Yz8N25oGClzlxM8eazVyxyPq6w//dRWIZExsoIV32HkXvXBbYJv WcVYvswhehBIA7Uday6AznY+8Zq4KqgE+K/7fYjQqLuI44p1SChmOmT/qGHpvC3ms/us0ip9W4r o X-Gm-Gg: ASbGncsszC0ld6uFwfeU/ch9QokgSxHw7vn3bKcNQSKSjq6BJp9voECTe3T8CdVLpx4 Es7jpsMyjz0Hbd3nHoflSS8PHlR53tU/AFvwD1KorwFLA5IgFLiGy7i1Is1V4bIpxUU4URR88JO lWNLWTUKW3P05/y6hKoST1INoK0njKVn9Tk/ne7ApzIARMzLdL+jhPktuovTSoMKNbsWWfJuNxy 3S25pvH79qKMm5ikbBdJjXYJixZkzSkSj4zhNeL+qskQsbjcOH0EBeyG7pQT0mBkFEyeCmcu2+2 5+NcmkTzfkXNOtnTPK7DWlidx70bor9UbzMcm0es0XMziMzcfKuSbeeb4J4teK5rKsacGNgmRn9 UUb4bD9mu4A== X-Received: by 2002:a05:6a21:1510:b0:1fd:ecfa:b6d7 with SMTP id adf61e73a8af0-20444f2e8cdmr925517637.28.1745456209674; Wed, 23 Apr 2025 17:56:49 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 102/148] include/exec/cpu-all: move compile time check for CPUArchState to cpu-target.c Date: Wed, 23 Apr 2025 17:48:47 -0700 Message-ID: <20250424004934.598783-103-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-4-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 4 ---- cpu-target.c | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 2aaaf0548d..be462c4410 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -33,8 +33,4 @@ #include "cpu.h" -/* Validate correct placement of CPUArchState. */ -QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0); -QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState)); - #endif /* CPU_ALL_H */ diff --git a/cpu-target.c b/cpu-target.c index 519b0f8900..7f3b244ed1 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "cpu.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/qemu-print.h" @@ -29,6 +30,10 @@ #include "accel/accel-cpu-target.h" #include "trace/trace-root.h" +/* Validate correct placement of CPUArchState. */ +QEMU_BUILD_BUG_ON(offsetof(ArchCPU, parent_obj) != 0); +QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState)); + char *cpu_model_from_type(const char *typename) { const char *suffix = "-" CPU_RESOLVING_TYPE; From patchwork Thu Apr 24 00:48:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883922 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3209802wrs; Wed, 23 Apr 2025 18:31:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVu+GB79+Zvqa5K1gA7eqSDUFyLyUzH9h/ilTwPI5aFSUbtD9me0W1RXuqwAcctApd+4KoW7Q==@linaro.org X-Google-Smtp-Source: AGHT+IFcC+1sdQhEy92lpYSjbABgrlveeItw0RqijwNo05vCuV8BoUUoqYy1W5UpoIRls4oQfP+G X-Received: by 2002:a05:6214:501b:b0:6e8:f387:e0d2 with SMTP id 6a1803df08f44-6f4c11aefd5mr6589636d6.11.1745458277959; Wed, 23 Apr 2025 18:31:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458277; cv=none; d=google.com; s=arc-20240605; b=Nhrtr69We9oP/oKa5Ymuahtwe8WJeC4QwZjHNUvKKgkhCTlKz8LwIT0ij9p1U5w346 KbEFU73yncpUfx0JT0CcnQa2WqvRk5NHRtr3opm8PZQ4dM7xWzU4d4vZLnC+Sk4DFolK bnUVFEUMIY8FbjIoGhXI/W23RfcqQP0raQ1XlOoX/3Yv7m49r+gzUpauL8JahotTsu0T QtlkrvZcplzMcWAh1oVeMPHeGaZ9iNwsTblfnpzslh419MIjcXDwGwXLgF4fFv30xpQc WSp2G6oR3ebo3PUMXc3c/1jXzGPbyPeytW8dU3trSBsICqYVzcJ0sBXSrvT/RpclfMcE nkXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=j9HHGABI/+QZ6I/uzvzo64WoBmQeTxV0UDzCb6CtbrY=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=O/DRooAgsmrRsrC6KOH5KxucwfHepChwL0euOlWxJ1z2DtWD8dr3xWglGRwI9An+Vo Vk1oYdPLfrMRfqaTbNC6P2gDk7DrebMfjUFigtsFdmIobacjE+erLBoqf5SSec6V1evp 4EBlfdkuECooiz+a4bIy7824QxClTIXxxK6PMCUPXnKUD1xRWV/HUdvui/e/uUtxi8xY L9FHLZEwsQjqfKb2r9qN+HA82bAnjTpWjC01Aeqz1DW3ifUljcVIVeHITl7rNDnFIFEj kQLrEPTJDvomwidEToz3X1E/H9ws/X6zleXcRsICpTD5BY9h35GIqW9QQuuGz3MZj6o+ +lGw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JVZYPVzX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0acafdcsi4149976d6.211.2025.04.23.18.31.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:31:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JVZYPVzX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kwO-0003pI-Gn; Wed, 23 Apr 2025 20:59: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 1u7ktc-0005vc-3d for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:58 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktY-00057S-CG for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:54 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-223f4c06e9fso4320575ad.1 for ; Wed, 23 Apr 2025 17:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456210; x=1746061010; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=j9HHGABI/+QZ6I/uzvzo64WoBmQeTxV0UDzCb6CtbrY=; b=JVZYPVzXqfHZttb/UHRuuajvrYnkHdC/wFZ+U33JQupBCxuZQPJPPUP5RmmFtaFsrf /WXACLpsp7SYvrN4Sz3vemm+oUs1kcRiSTLwpQ63yFA8TBhlnsV2axXVLMs66S4Z12oD JMNNZM9FlmXc36DWsvjng70emtjNDmjODAOETNA0402sDsEsBl+VzD31Jy4CkbXOcIY6 KF3pEN9eu3Lvpf0NYSelyxj6BnLw/tekTqdsQVLplwIJaFO3CN/LyK7ckHrj7bhGb/1i p9FWHgNSvrqCaeygnhbRBxDvsrEoocqDqRavUEAF9bPfY9Kc30s8nxqsaMdb9IZ3yB9x Ytcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456210; x=1746061010; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j9HHGABI/+QZ6I/uzvzo64WoBmQeTxV0UDzCb6CtbrY=; b=JXXVemGRrH09XDYRCaxRthEfAxEKnzx3W/rYzd0PNu+9yDVGhJ/pqNveUMgihAfbLh uNMi0ERI/C835QtZIZZCaQ16Oi2VcMRg1twVqANAbThT8/Dn5/1YFfZTz9wvhXgBKXTo 1TnUcn1WLzj3FAmrJXb/aeFvawSoqbL20PST4AEbhp8tRIj2XxzpbE0FzUjfONnPykh4 iOMCUnbqiPEyEaBBY/oXslpde82BaMVmB7R9Zy1MluwucAuPUPW4X0iOt005Xx/Z3Kao KIU3SZirg+/MNMXoiwAyYWPSESiHzUhhfDS6/phGDxOUzievheJmb8iVdmTd9TmjShg1 e4kQ== X-Gm-Message-State: AOJu0YzZtOQ1r256uhes+OwGmzyqXrHsRAUOZaq9Sk2HG5X4OySCHNLg CVQxWEAMOvbPm976sfiPe2HL9fZqtGnLh4kiD5G1dGiYei/x50wBhveN1HtLBjaEoUk24uV2uk/ q X-Gm-Gg: ASbGncs5vTJW2OeO2Gdjnq3U9U4OyHUnsWca0I7Mw6+HZTrQ4ysc9mMYBFZyjn0Cw+J Vq5CEApTt/rLcHuAA8DYF8YwXVuCydoiO1Ux/N1cIJHHrqyJoFgAZH9QhfGTstg63LlrN72Hkr+ Y/jt/C+/mcvXUjWAaaPsDorByj0B66jU/kWSVc3HsYY5xfcdZcQcL9314rTqeBbzRqKozyVKQBR l3/vzLQavgJh1vkW77zHZqXE4oNXofLsM2IbW26uYLUg8xEHoblWRJXIIM4OzrsU6qzOWuZ7EZ6 9cpI0Dvw8S82RvpZaNXrqMO5VNLA3XmtnL/0kQdlZNGKdPrNuSDfelUsman6G3PyD15PTsIzzW8 = X-Received: by 2002:a17:903:184:b0:21f:6dcf:fd2b with SMTP id d9443c01a7336-22db47939aamr5882265ad.1.1745456210255; Wed, 23 Apr 2025 17:56:50 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 103/148] exec/cpu-all: remove system/memory include Date: Wed, 23 Apr 2025 17:48:48 -0700 Message-ID: <20250424004934.598783-104-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier We include this header where needed. When includes set already have ifdef CONFIG_USER_ONLY, we add it here, else, we don't condition the include. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-5-pierrick.bouvier@linaro.org> --- hw/s390x/ipl.h | 1 + include/exec/cpu-all.h | 5 ----- target/arm/internals.h | 1 + target/hppa/cpu.h | 1 + target/i386/hvf/vmx.h | 1 + target/ppc/mmu-hash32.h | 2 ++ hw/ppc/spapr_ovec.c | 1 + target/alpha/helper.c | 1 + target/arm/hvf/hvf.c | 1 + target/i386/arch_memory_mapping.c | 1 + target/i386/helper.c | 1 + target/i386/tcg/system/misc_helper.c | 1 + target/i386/tcg/system/tcg-cpu.c | 1 + target/m68k/helper.c | 1 + target/ppc/excp_helper.c | 1 + target/ppc/mmu-book3s-v3.c | 1 + target/ppc/mmu-hash64.c | 1 + target/ppc/mmu-radix64.c | 1 + target/riscv/cpu_helper.c | 1 + target/sparc/ldst_helper.c | 1 + target/sparc/mmu_helper.c | 1 + target/xtensa/mmu_helper.c | 1 + target/xtensa/op_helper.c | 1 + 23 files changed, 23 insertions(+), 5 deletions(-) diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h index c6ecb3433c..6557ac3be5 100644 --- a/hw/s390x/ipl.h +++ b/hw/s390x/ipl.h @@ -15,6 +15,7 @@ #include "cpu.h" #include "system/address-spaces.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "hw/s390x/ipl/qipl.h" #include "qom/object.h" diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index be462c4410..399fcbb9d1 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -26,11 +26,6 @@ #include "hw/core/cpu.h" #include "exec/cpu-defs.h" #include "exec/target_page.h" -#ifndef CONFIG_USER_ONLY -#include "system/memory.h" -#endif - - #include "cpu.h" #endif /* CPU_ALL_H */ diff --git a/target/arm/internals.h b/target/arm/internals.h index 8756c24c08..01408e40a3 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -28,6 +28,7 @@ #include "exec/breakpoint.h" #include "hw/registerfields.h" #include "tcg/tcg-gvec-desc.h" +#include "system/memory.h" #include "syndrome.h" #include "cpu-features.h" diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 8b36642b59..f6bf068776 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -22,6 +22,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" +#include "system/memory.h" #include "qemu/cpu-float.h" #include "qemu/interval-tree.h" #include "hw/registerfields.h" diff --git a/target/i386/hvf/vmx.h b/target/i386/hvf/vmx.h index 029516e5c0..26d6029fa5 100644 --- a/target/i386/hvf/vmx.h +++ b/target/i386/hvf/vmx.h @@ -34,6 +34,7 @@ #include "system/hvf_int.h" #include "system/address-spaces.h" +#include "system/memory.h" static inline uint64_t rreg(hv_vcpuid_t vcpu, hv_x86_reg_t reg) { diff --git a/target/ppc/mmu-hash32.h b/target/ppc/mmu-hash32.h index 2838de031c..04c23ea75e 100644 --- a/target/ppc/mmu-hash32.h +++ b/target/ppc/mmu-hash32.h @@ -3,6 +3,8 @@ #ifndef CONFIG_USER_ONLY +#include "system/memory.h" + bool ppc_hash32_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type, hwaddr *raddrp, int *psizep, int *protp, int mmu_idx, bool guest_visible); diff --git a/hw/ppc/spapr_ovec.c b/hw/ppc/spapr_ovec.c index 6d6eaf67cb..75ab4fe262 100644 --- a/hw/ppc/spapr_ovec.c +++ b/hw/ppc/spapr_ovec.c @@ -16,6 +16,7 @@ #include "migration/vmstate.h" #include "qemu/bitmap.h" #include "system/address-spaces.h" +#include "system/memory.h" #include "qemu/error-report.h" #include "trace.h" #include diff --git a/target/alpha/helper.c b/target/alpha/helper.c index 57cefcba14..f6261a3a53 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -25,6 +25,7 @@ #include "fpu/softfloat-types.h" #include "exec/helper-proto.h" #include "qemu/qemu-print.h" +#include "system/memory.h" #define CONVERT_BIT(X, SRC, DST) \ diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 93a3f9b53d..34ca36fab5 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -23,6 +23,7 @@ #include #include "system/address-spaces.h" +#include "system/memory.h" #include "hw/boards.h" #include "hw/irq.h" #include "qemu/main-loop.h" diff --git a/target/i386/arch_memory_mapping.c b/target/i386/arch_memory_mapping.c index ced199862d..a2398c2173 100644 --- a/target/i386/arch_memory_mapping.c +++ b/target/i386/arch_memory_mapping.c @@ -14,6 +14,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "system/memory_mapping.h" +#include "system/memory.h" /* PAE Paging or IA-32e Paging */ static void walk_pte(MemoryMappingList *list, AddressSpace *as, diff --git a/target/i386/helper.c b/target/i386/helper.c index c07b1b16ea..64d9e8ab9c 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -25,6 +25,7 @@ #include "system/runstate.h" #ifndef CONFIG_USER_ONLY #include "system/hw_accel.h" +#include "system/memory.h" #include "monitor/monitor.h" #include "kvm/kvm_i386.h" #endif diff --git a/target/i386/tcg/system/misc_helper.c b/target/i386/tcg/system/misc_helper.c index 0555cf2604..67896c8c87 100644 --- a/target/i386/tcg/system/misc_helper.c +++ b/target/i386/tcg/system/misc_helper.c @@ -23,6 +23,7 @@ #include "exec/helper-proto.h" #include "exec/cpu_ldst.h" #include "system/address-spaces.h" +#include "system/memory.h" #include "exec/cputlb.h" #include "tcg/helper-tcg.h" #include "hw/i386/apic.h" diff --git a/target/i386/tcg/system/tcg-cpu.c b/target/i386/tcg/system/tcg-cpu.c index ab1f3c7c59..0538a4fd51 100644 --- a/target/i386/tcg/system/tcg-cpu.c +++ b/target/i386/tcg/system/tcg-cpu.c @@ -24,6 +24,7 @@ #include "system/system.h" #include "qemu/units.h" #include "system/address-spaces.h" +#include "system/memory.h" #include "tcg/tcg-cpu.h" diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 0bf574830f..8251272219 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -25,6 +25,7 @@ #include "exec/page-protection.h" #include "exec/gdbstub.h" #include "exec/helper-proto.h" +#include "system/memory.h" #include "gdbstub/helpers.h" #include "fpu/softfloat.h" #include "qemu/qemu-print.h" diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index c941c89806..da8b525a41 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" #include "qemu/log.h" +#include "system/memory.h" #include "system/tcg.h" #include "system/system.h" #include "system/runstate.h" diff --git a/target/ppc/mmu-book3s-v3.c b/target/ppc/mmu-book3s-v3.c index a812cb5113..3865556310 100644 --- a/target/ppc/mmu-book3s-v3.c +++ b/target/ppc/mmu-book3s-v3.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "system/memory.h" #include "cpu.h" #include "mmu-hash64.h" #include "mmu-book3s-v3.h" diff --git a/target/ppc/mmu-hash64.c b/target/ppc/mmu-hash64.c index 5ca4faee2a..3ba4810497 100644 --- a/target/ppc/mmu-hash64.c +++ b/target/ppc/mmu-hash64.c @@ -25,6 +25,7 @@ #include "qemu/error-report.h" #include "qemu/qemu-print.h" #include "system/hw_accel.h" +#include "system/memory.h" #include "kvm_ppc.h" #include "mmu-hash64.h" #include "exec/log.h" diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c index 461eda4a3d..4ab5f3bb92 100644 --- a/target/ppc/mmu-radix64.c +++ b/target/ppc/mmu-radix64.c @@ -23,6 +23,7 @@ #include "exec/page-protection.h" #include "qemu/error-report.h" #include "system/kvm.h" +#include "system/memory.h" #include "kvm_ppc.h" #include "exec/log.h" #include "internal.h" diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 0dd8645994..ca58094fb5 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -26,6 +26,7 @@ #include "exec/cputlb.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "system/memory.h" #include "instmap.h" #include "tcg/tcg-op.h" #include "accel/tcg/cpu-ops.h" diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 45882e25db..8890d2b119 100644 --- a/target/sparc/ldst_helper.c +++ b/target/sparc/ldst_helper.c @@ -27,6 +27,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/cpu_ldst.h" +#include "system/memory.h" #ifdef CONFIG_USER_ONLY #include "user/page-protection.h" #endif diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c index 249b1f6c4c..c5d82a0854 100644 --- a/target/sparc/mmu_helper.c +++ b/target/sparc/mmu_helper.c @@ -24,6 +24,7 @@ #include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" #include "exec/tlb-flags.h" +#include "system/memory.h" #include "qemu/qemu-print.h" #include "trace.h" diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c index 40b02f0a2c..1ce125794d 100644 --- a/target/xtensa/mmu_helper.c +++ b/target/xtensa/mmu_helper.c @@ -36,6 +36,7 @@ #include "accel/tcg/cpu-mmu-index.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "system/memory.h" #define XTENSA_MPU_SEGMENT_MASK 0x0000001f #define XTENSA_MPU_ACC_RIGHTS_MASK 0x00000f00 diff --git a/target/xtensa/op_helper.c b/target/xtensa/op_helper.c index 028d4e0a1c..c125fa4946 100644 --- a/target/xtensa/op_helper.c +++ b/target/xtensa/op_helper.c @@ -31,6 +31,7 @@ #include "exec/page-protection.h" #include "qemu/host-utils.h" #include "exec/exec-all.h" +#include "system/memory.h" #include "qemu/atomic.h" #include "qemu/timer.h" From patchwork Thu Apr 24 00:48:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883810 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199972wrs; Wed, 23 Apr 2025 17:59:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUOnur1EqnxJjqVE1vZSm6o95p9oDXplmkBVdtuYW6vFkXn1GebooFeTQz//L+ney1ZkRGGNw==@linaro.org X-Google-Smtp-Source: AGHT+IHZvv4ua/wLllOzFEDpUpIDivFVlcaKGidhXW0wU63jk4gw+HmDOd/ecFNBGSc9UpcobVtg X-Received: by 2002:ac8:7d55:0:b0:476:80ce:a614 with SMTP id d75a77b69052e-47eb2da4efemr9546401cf.19.1745456398014; Wed, 23 Apr 2025 17:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456397; cv=none; d=google.com; s=arc-20240605; b=MWQMLl+oXVYK4adU2+ueSBdwxi/nNJxFtlrv54pY1FIC10M60OiX3ShbrlLvlAHgLX ZTbiypDYN7iIMfJ3x7OOIf30kE0Kc7s1ntVhLeawnxg4NEpSfnOG+VWBYu5TrC6ckAYj hrbU02Lxwm0He3TsuNRwEH1s7TzXFa11LjpgcKGnHy7SYzcmTx1vjzTQIbEep5G6AQPG maj+gSFYFiCeRYfKLce3nnf0S2XbyU3hQ4U3e/dkeIXDzx8B2fSzNaRXiDapmk1CtHbt ws9INDJXeh+PwDVIMwRZyZvpC1a0les3LzPaOU+lox0Gs5nrc7i//sC2FHYzAOpnqulI ZNsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Mc2cOAtXM3sBslJrk/AmmYQiAoPWaBHBs7smPxcUAZA=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=DGYJLPq96mDgT7ElLNfttnRX1Y40jXQlBQPt32g8vXInJSin1fQlO01likT2pu/Txb tLorSZzeggAS122+WBSH5EmqIhqccuWkDL2p1T0fhWRaAF8Cz5mILpdFbPOihtePbHiM lsVG3Ue29qIldopMdPr/P0wkIYjWFX5kwi0z6WE28/wEBCO5INsF1ScHbAtoClNEwrWz ryqO51UkpMOVa+2fqQaNlveOa34dzxIs4x85BwzpwT7/Muz8pibAULZz+OQGmaq4ojDP AONARTqABX5MsFgAosO8npUdhfMNP1ecowiVrdqfRQ2FDKx220gmfM6WhsnP70J/Ajgb IjAA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z3HXA7Ng; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f3bffa6si5005001cf.67.2025.04.23.17.59.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:59:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z3HXA7Ng; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kvF-000157-3o; Wed, 23 Apr 2025 20:58:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7ktc-0005vb-2h for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:58 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7ktY-00057Y-CM for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:53 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-736b350a22cso307965b3a.1 for ; Wed, 23 Apr 2025 17:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456211; x=1746061011; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Mc2cOAtXM3sBslJrk/AmmYQiAoPWaBHBs7smPxcUAZA=; b=Z3HXA7NguRe8BpXKALZ5se9yyCAmB2yPDqZpKt2Ie7HLg12JuLC4/vAZRqgHndZn/S tQEd+J6fEAEyvvCFNkBDfr7CnCV09uteyvLwAnjRostiYHPkURwaHT+kcbNsRFZ6kmTT kdvfhkjjKPOx1jrNks9uTyy+hrpQjW6f6T6KoscRiVlF1d0vtIaZEVyC2oAAcmgI43UX DCuhy8Hq+yL4cLxcozaGpvYhx3RIjpNdV+boqI9X9ff/C7iugBCNMfHbKqggqkTu1ui+ o9Wfb6edJIgpVctq+yGTtAjs4EEravee61/MaNKb1QzdLdHqrrARqQpPk0w8tUxOlLjV ohHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456211; x=1746061011; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mc2cOAtXM3sBslJrk/AmmYQiAoPWaBHBs7smPxcUAZA=; b=jZcUuv7OYVPSg9+izMc3FjNZ5lPMQVWwMteKm+E3e2PX5aApz1TGacRGBOakYGe4af Sx19b9YAT+a0QwsWhej0uVANlQDwpdvWt+Wmw46YCEDsp+40p1aTMRw6jqy6kmSqYMgn Ream7gk7Kuv5svwf9py3RUgP3bmGpBP+txnVg6wu/kd1FJH7gGAO4U7ddJ+YjWkDvmpn ks7XkQo8bkg/W+v5b/7SPum6823oVKlbtVM6TCF8Y/Z2MCYkZRKpj3ytV6L1maL5rbZZ czCSbqcNNgyERgDt2FOx0gjHmRyEZMS52hp41nvCV7eeJHru76k0VzxWrIh95KJspjNA zRjw== X-Gm-Message-State: AOJu0Yx2ApnVOE80ellaNOfNY4lx4S6a4dIx32BehM5cvjieVBdoTfdf TLFbQPh+b/fzBSwc7WFnk0UdmJWVlpUNgRNqwXul7QjI3Q5YUNDB6lsdFxSsUEh5P7/QKE/YLZh X X-Gm-Gg: ASbGncu3cVAq8usCSeQUBkwLhY2QxqOq2cwpaIzerdM22dkezQBPcTkTyZvsLtAaAJQ ZvPOTh1ouMe4a+jF5FflyG3gBdNkhVoZYn38ecIYpr8NSU4Mv0dWDAKlh8VuPFIcLs4/Oye3vvH mkuS9QHAhWGSFcnIFvi4x+1L9s1RlV5ymluziNf2j151nt2BeiNO8EszYA/NIduv4Jop8OayWoP pnjMPfXfOLBUovcg5GWBBlJO0wNkyUlfFhoieETWa8m71jmpd89ghxuCDYwwNfK4GPMoQAor4j7 +p5jFCtuQVf24BnP4ttUYza7WdtyvI3m7f0w5qeHOFFVDCcyEgEZrX0paOnRhW761B6qgKuIp3j R3Fq6ajxCFQ== X-Received: by 2002:a05:6a21:181a:b0:1f5:80a3:b006 with SMTP id adf61e73a8af0-20444ebe0aamr878480637.21.1745456210867; Wed, 23 Apr 2025 17:56:50 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 104/148] exec/cpu-all: remove exec/page-protection include Date: Wed, 23 Apr 2025 17:48:49 -0700 Message-ID: <20250424004934.598783-105-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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, TVD_SPACE_RATIO=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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-6-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 399fcbb9d1..957c86886e 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -19,7 +19,6 @@ #ifndef CPU_ALL_H #define CPU_ALL_H -#include "exec/page-protection.h" #include "exec/cpu-common.h" #include "exec/cpu-interrupt.h" #include "exec/tswap.h" From patchwork Thu Apr 24 00:48:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883890 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207747wrs; Wed, 23 Apr 2025 18:23:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVJ6LZ+KJcT810Da8uaWA5li1MHlEyK/3cmdzMTsgA/Ga0F1dTg9NENiZRXOXMBPdCoUYHcrA==@linaro.org X-Google-Smtp-Source: AGHT+IHzN13KVjJgb4QvqPK2CczjN0u1+cevAYVQ6geUZTQ4zhWrNTfYvZC6CsszTxmnNIJH+Ceo X-Received: by 2002:a05:620a:d8b:b0:7c5:94e0:cafb with SMTP id af79cd13be357-7c956f4e3e3mr163315785a.48.1745457822857; Wed, 23 Apr 2025 18:23:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457822; cv=none; d=google.com; s=arc-20240605; b=YbfA0s+3Y2FKVIMxYa/ycZ+XPMhFZkm0MwxRjY8PnTDLuPtBCMotFG5NXR52fwbiyJ nnR2WzsU/+Nek+lyx9f7l88yOYxkFFkUapYGUIQeghuLSCM5fbUAUXptPft9fmbTFPXH 84wnaBogS3ykFI0mmtkDQUhYXjHm+aInrXc37Ia+g+B3gLVPXt5OvTISCs+ZoxI+cT8g 9dADE/gxG5UbV/8hHWSOMaxCvHc8ETjPPHVcmfPl0mNkJenNFk751GJVvOHEfx4MS6KP XJyXPAF/O6EhYw7HrJLDIWMFRNrvXyJnon25wOeeItLuam4pojGKI/Xz60ZXZHIuAlki NqTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SKvAZCgDROGGpDeqhjLEmq+O8T9Clsaq0QgwgecdQyM=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=fzrTNlhUXgQvxhqvDwiVFIwRE6qlB98VsVYez1bT339PU0eJBwrzzZVbWUfGIjMl09 yWyFO2Q0zdgCVVYkeu3KN2WtQVhouxpwVIREabJm5ixM0uNa4QNeuFeUxH3DlmYvlj26 MlIGL9nsl3SY7phYwWMpr9nwvFQXwf/y53mNGwVz0/rYM5EvjhvDIDsxyundTIX2kmZ5 ikmSDnLj6FvezsIr2Gm8jM8Jj4L0szTZYkbvStFp6DJ4tvTf0+z8kIkZhKwAK8EfA0fL NIYL42YF71XzWf4fn/cxLC62cPHXBgr+uxZz+gRYWrZ/ipJKw7vMKRQN3b1CEXpXyi0z uL5A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TEiy2qc2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958d8749csi23539085a.323.2025.04.23.18.23.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:23:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TEiy2qc2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kwN-0003n0-Sy; Wed, 23 Apr 2025 20:59: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 1u7ktc-0005va-2o for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:58 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0: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 1u7ktY-00057m-Ux for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:55 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-7390d21bb1cso354466b3a.2 for ; Wed, 23 Apr 2025 17:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456211; x=1746061011; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SKvAZCgDROGGpDeqhjLEmq+O8T9Clsaq0QgwgecdQyM=; b=TEiy2qc2Az5cbo2+7porNcxEy/LsSQd2DRQ7/5FWRdxvXUBEIW8lOc8jpHWdhL7TfZ 9OpbRZvd9K/LPnEFq9M77uoIyPYAVNi/2KqN5uw8O4wWSvmq+h06aOqffUdAIcF+OVen IP3IJFGxRFQ0o0dref79xKzjscTVAiC1K6/diR+PZ2vysElD45I6mZiBsqslb4h91dmk jmnjakuO1uGxCsulJksoTpuprdpJi96tur38ysWJeUNzBKzF00NsVZPhHCCHa+rjP837 Giw/Ifgc/uW967fplZfVeDyPXp/3h9M/wDjBKhxB9WbgIqV3jSrILuVN2ohDbFsOwKYu SDNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456211; x=1746061011; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SKvAZCgDROGGpDeqhjLEmq+O8T9Clsaq0QgwgecdQyM=; b=quD5XWej69qiykPbCaQj2r9KsI6w1gs4CRU02eR7m2LioHfsdN1mlBVojjcB0MO3q6 j9/VNs7DXLRZ8k5krh+a4hJTIwk3PV8vmhUYBuZAXgB0ZbOEiJh8vdVND1Ck8zdUM08Z H3UuiQYmuaOuBI7SRmLMR6Yl4dehdGW2p2v9Fmwg6ykchXiLEnta1PrWFW13BKjrCYmC wgzre76oLNlQmSyNeEgn4gcWCPeAyqNsqw+g85Ft/1eUv3m9VCRoBXqW2KmAmddjwTV9 eBTR1fU84QcSX89zwWhUbdbLSwYB0/f9OCwDw5zAp771Zf23hTHOiITskJIhh8HroNxU j9Fg== X-Gm-Message-State: AOJu0Yy/uKDNrawRYCr29pfsPMxBgbyH0zzAR2tplC3oUKL8Yl95tglj DJ9toM3+RWLMF6yk91nLEIyN1RXOnB03Atec/+8fwtOD4u0lgjgNkpdL8goVHhDosS+vnXgMugD U X-Gm-Gg: ASbGncsjZwWUE4eFh6JjokIwP422F/9tP0/nhkme18yg3PUFCW7tv5dTZIt3WhF5Czk TcLibJhw7ZEYqTN+k1iFgIM7t2xvXtoXk0bcg2Y1WprN8bD8BmNCpWRdM992hWgkzRl7+8sHOer 1t6YF6QvXNDUEgjssypdCFZ1JJROsJKah3zC1q6CtS6QJFXFHKIVLxS8OhX7EWeu6k//R/2nkfC Rd412h4dRR+FdvCen21l+xk9A8OLmMATQ/DGIK5SNxMGm20GsWfxAlLBhLNKQAxN30e1+9jkVvU TgvgmVR/SfM6qDnXcg9Qq+zMG0W9au3GUrfwr/zKxZl9LWCvbvfK/11Tbw0ECXpVP3fVbbtB66Q = X-Received: by 2002:a05:6a21:398c:b0:1f5:64fd:68eb with SMTP id adf61e73a8af0-20444e71abfmr938486637.7.1745456211559; Wed, 23 Apr 2025 17:56:51 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 105/148] exec/cpu-all: remove tswap include Date: Wed, 23 Apr 2025 17:48:50 -0700 Message-ID: <20250424004934.598783-106-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-7-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 1 - target/ppc/mmu-hash64.h | 2 ++ target/i386/tcg/system/excp_helper.c | 1 + target/i386/xsave_helper.c | 1 + target/riscv/vector_helper.c | 1 + 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 957c86886e..bfa039ab76 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -21,7 +21,6 @@ #include "exec/cpu-common.h" #include "exec/cpu-interrupt.h" -#include "exec/tswap.h" #include "hw/core/cpu.h" #include "exec/cpu-defs.h" #include "exec/target_page.h" diff --git a/target/ppc/mmu-hash64.h b/target/ppc/mmu-hash64.h index ae8d4b37ae..b8fb12a970 100644 --- a/target/ppc/mmu-hash64.h +++ b/target/ppc/mmu-hash64.h @@ -1,6 +1,8 @@ #ifndef MMU_HASH64_H #define MMU_HASH64_H +#include "exec/tswap.h" + #ifndef CONFIG_USER_ONLY #ifdef TARGET_PPC64 diff --git a/target/i386/tcg/system/excp_helper.c b/target/i386/tcg/system/excp_helper.c index b0b74df72f..4badd73943 100644 --- a/target/i386/tcg/system/excp_helper.c +++ b/target/i386/tcg/system/excp_helper.c @@ -23,6 +23,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/tlb-flags.h" +#include "exec/tswap.h" #include "tcg/helper-tcg.h" typedef struct TranslateParams { diff --git a/target/i386/xsave_helper.c b/target/i386/xsave_helper.c index 996e9f3bfe..24ab7be8e9 100644 --- a/target/i386/xsave_helper.c +++ b/target/i386/xsave_helper.c @@ -5,6 +5,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/tswap.h" void x86_cpu_xsave_all_areas(X86CPU *cpu, void *buf, uint32_t buflen) { diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index 83978be060..7fffa23bc8 100644 --- a/target/riscv/vector_helper.c +++ b/target/riscv/vector_helper.c @@ -26,6 +26,7 @@ #include "exec/page-protection.h" #include "exec/helper-proto.h" #include "exec/tlb-flags.h" +#include "exec/tswap.h" #include "fpu/softfloat.h" #include "tcg/tcg-gvec-desc.h" #include "internals.h" From patchwork Thu Apr 24 00:48:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883880 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207141wrs; Wed, 23 Apr 2025 18:21:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVCvmXl3FdPMd+cPxsg/dgvzpzWNNCZyIfu7Y5GGtT6Cy8GCJ0JZBkU0AhXiUqCEHw0dmW52g==@linaro.org X-Google-Smtp-Source: AGHT+IFxI2d9g8R84+0Ba6KmxjACSY2dF8CGOYdPuZIK8547+YWifAotO8nAbutrDfqd7KkxaNVo X-Received: by 2002:a05:6214:c41:b0:6ea:d393:962a with SMTP id 6a1803df08f44-6f4bfbc791fmr14283996d6.1.1745457675590; Wed, 23 Apr 2025 18:21:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457675; cv=none; d=google.com; s=arc-20240605; b=IXkDqQPAo3riUlA8Es2d34ITWaOXI7jsWXY0a32tg3ySH6RyroxbsHWP1iFmbqrSM3 WrfzVCa76YzgLr5H9FYyeXfQGupiYPt8RCg9D7yYTZfySrNXLlaZIULrGPpNN7K4PGzH ON6ixVhODaGAR0ToxCuJ5z1Shs4+9LPtlGeEGRJ1lMg7TRmQMz3EuKaUwA38Od6jB66E cMTK9QdXPtBORXifZKAnsjRj+VszVGiu+rkxqNLQ1yUxbfaTFu7Rbu1JHsJa75mr/3Jf F3nwdbXXpUL1LTpM43Sk8z/wJnf3cMWVjJX0C5wQ0Qngfl1u6i7xpeuzBsoNE/cCNLnM lBJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ctPLdPbKJodvzci70U5RMX+fjzazJ3JedYJC3jZ4iCg=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=ACOCdbXznVOhy0dfQ1E8Wg/ab7xcedDiax6fDIRj2Suruf0/dLVUmCqe1tBakcEocU NFi2iNv1mZ6UoJb9Sidxin6nsqYCyE19+Ur40GF7u2pQGB+ySkh6ou/4vtcBXqu8L80B tT2R+1dYORbRkEuthQR2PQO1bfObGEi2HbDiukGdSesy1xMx9gl8eYMnOlM0+4jBKZqA OmXi/Qv+AxhBGd0KeBJl+ByXa8KU6WBVPwz4Kjk+IKMGh/8WJGPssQMAl38cQJIaZwvZ VJcqlTcHoSUKrq+kW66QxIsvxf4veR59oRJn+6u8/IfBPKw1sO9Hu7GhIX0anzRbUEkL JKwg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gRSzTXFL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c092062fsi4074736d6.121.2025.04.23.18.21.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:21:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gRSzTXFL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kve-00029D-4S; Wed, 23 Apr 2025 20:59: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 1u7ktf-0005zU-Ok for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:01 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7ktZ-000583-KD for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:57 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-7376dd56f60so276837b3a.3 for ; Wed, 23 Apr 2025 17:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456212; x=1746061012; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ctPLdPbKJodvzci70U5RMX+fjzazJ3JedYJC3jZ4iCg=; b=gRSzTXFL8X2FAB9lQECOLQrpBjDPbIWG+5I0bsYKNpCTPtZ/DCYM7p3gyZT5T1io0G e1yatVNs8MMxhCsehDD4XiRpuyfGJQZ0ACNqSgyhDIzrf+rsllDjsudEarUeKGlEJcWQ DQZGT1vMMm5HNggABR+/zHttXJtNEKYGUFRMG0DBBr/a/fgcZ8Gan9jejjRTXaNqT6mv 7GvPfS2T+O3fCyhVR0xEDU2JaefUzP213iQvyfFuAkXg28Fi5VskS6ZFjcFnxn/EyoiL in7TmVnDDg4mWdcmYdeM5t2NXrclUb6gqpNg/Jq/WHq56wxvJ7k9m2gBvgD7G4lv7GlN Q4vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456212; x=1746061012; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ctPLdPbKJodvzci70U5RMX+fjzazJ3JedYJC3jZ4iCg=; b=E+Uja3JZkmEMXTuwyaayLtGEfE4kF6ruJtx3U8RNbUtSYmIemkCsTmT6eevOIrwjHm jJDS/hao7KgsiUS41ajCiJGQBzBAsYplzUrpIFqpTCMwiHuVBmDdghziqAN7LmcZBH8+ 1PMWgHGDqKsre8hfYBSc+MF/gCRhA+oyEhV5fbBFSQTr9QTOojeBRZw1ardzEgRM2GID Oga86u662qUGI0m3cVj++V/y2VttwQ6lXtX6kalRQD4q2LWqOyO0Fa5NHQbHzvBGrAbr gtgoFJDqPapX7HwL6MUnnzoJpx2Kr3mGupji771/6AGcnFhlUb0PJxn34HRcfqwxYBVA cA6Q== X-Gm-Message-State: AOJu0YxWRNRjfhn6nCfBjSjr/DxomS3HumburyIFgYUTnlkeXAtHXEwY mEx0tsFnVoAC4TtdfT58Fr1+BLMRJfIsWp1nBhvaQPrk3zPgDIWA563AHHOjffblC8howz+MWJa D X-Gm-Gg: ASbGncvmFaWrT9Y3FlQg7+IHC86fafJxbq5LYJi5SZcv5+Jes8PXUdzMk5z8i5JRRUD gI+crNRaWUGZsnGHBEJDjFJWxZZ2G0XfG1WtkxIdjcmo4/wf/JMzaT7fVW862xx/J/f5AAywx5x ew7h6K8TutFPJr9Q63n2rqN1gLPM3f+GSk9rG66x311WW8AugQNNuB/AtXGdx12vSESLOAGWuFg y5ffAolgCLhKguEeNtRqsscfOjWjQLR9uxagmpl1/g6fXLf6TqfonGAIqZYAAq1OWTG2rwu1NE4 6x9XSko3Y5VRYsPkTYj0EIGGyBdP2snNTt6+e+v850o/Iwm05wwSyoozrRaKYme4mlmGR38E46M = X-Received: by 2002:a05:6a20:2588:b0:1f5:93b1:6a58 with SMTP id adf61e73a8af0-20444e806c2mr1004829637.8.1745456212266; Wed, 23 Apr 2025 17:56:52 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 106/148] exec/cpu-all: remove exec/cpu-interrupt include Date: Wed, 23 Apr 2025 17:48:51 -0700 Message-ID: <20250424004934.598783-107-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-8-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 1 - target/alpha/cpu.h | 1 + target/arm/cpu.h | 1 + target/avr/cpu.h | 1 + target/hppa/cpu.h | 1 + target/i386/cpu.h | 1 + target/loongarch/cpu.h | 1 + target/m68k/cpu.h | 1 + target/microblaze/cpu.h | 1 + target/mips/cpu.h | 1 + target/openrisc/cpu.h | 1 + target/ppc/cpu.h | 1 + target/riscv/cpu.h | 1 + target/rx/cpu.h | 1 + target/s390x/cpu.h | 1 + target/sh4/cpu.h | 1 + target/sparc/cpu.h | 1 + target/xtensa/cpu.h | 1 + accel/tcg/cpu-exec.c | 1 + hw/alpha/typhoon.c | 1 + hw/m68k/next-cube.c | 1 + hw/ppc/ppc.c | 1 + hw/xtensa/pic_cpu.c | 1 + 23 files changed, 22 insertions(+), 1 deletion(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index bfa039ab76..7b712b2556 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -20,7 +20,6 @@ #define CPU_ALL_H #include "exec/cpu-common.h" -#include "exec/cpu-interrupt.h" #include "hw/core/cpu.h" #include "exec/cpu-defs.h" #include "exec/target_page.h" diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index 80562adfb5..42788a6a0b 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -22,6 +22,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" #define ICACHE_LINE_SIZE 32 diff --git a/target/arm/cpu.h b/target/arm/cpu.h index a8177c6c2e..958a921490 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -25,6 +25,7 @@ #include "hw/registerfields.h" #include "cpu-qom.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "exec/gdbstub.h" #include "exec/page-protection.h" #include "qapi/qapi-types-common.h" diff --git a/target/avr/cpu.h b/target/avr/cpu.h index b0518a1f60..c2cc2daa66 100644 --- a/target/avr/cpu.h +++ b/target/avr/cpu.h @@ -23,6 +23,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "system/memory.h" #ifdef CONFIG_USER_ONLY diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index f6bf068776..dab58c227f 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -22,6 +22,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "system/memory.h" #include "qemu/cpu-float.h" #include "qemu/interval-tree.h" diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 0ad67fe0fd..778dfd9637 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -24,6 +24,7 @@ #include "cpu-qom.h" #include "kvm/hyperv-proto.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "exec/memop.h" #include "hw/i386/topology.h" #include "qapi/qapi-types-common.h" diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 02ef6ddecb..a924aa01d7 100644 --- a/target/loongarch/cpu.h +++ b/target/loongarch/cpu.h @@ -10,6 +10,7 @@ #include "qemu/int128.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "fpu/softfloat-types.h" #include "hw/registerfields.h" #include "qemu/timer.h" diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index ddb0f29f4a..451644a05a 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -22,6 +22,7 @@ #define M68K_CPU_H #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" #include "cpu-qom.h" diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index e44ddd5307..d29681abed 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -23,6 +23,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" #include "qemu/cpu-float.h" +#include "exec/cpu-interrupt.h" typedef struct CPUArchState CPUMBState; #if !defined(CONFIG_USER_ONLY) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 9ef72a95d7..29362498ec 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -3,6 +3,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #ifndef CONFIG_USER_ONLY #include "system/memory.h" #endif diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index b97d2ffdd2..c153823b62 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -22,6 +22,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "fpu/softfloat-types.h" /** diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 3ee83517dc..7489ba9564 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -23,6 +23,7 @@ #include "qemu/int128.h" #include "qemu/cpu-float.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "cpu-qom.h" #include "qom/object.h" #include "hw/registerfields.h" diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 51e49e03de..556eda57e9 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -24,6 +24,7 @@ #include "hw/registerfields.h" #include "hw/qdev-properties.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "exec/gdbstub.h" #include "qemu/cpu-float.h" #include "qom/object.h" diff --git a/target/rx/cpu.h b/target/rx/cpu.h index 349d61c4e4..5f2fcb6656 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -24,6 +24,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" #ifdef CONFIG_USER_ONLY diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 5b7992deda..0a32ad4c61 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -28,6 +28,7 @@ #include "cpu-qom.h" #include "cpu_models.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" #include "qapi/qapi-types-machine-common.h" diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index d536d5d715..18557d8c38 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -22,6 +22,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" /* CPU Subtypes */ diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 68f8c21e7c..c0aab69b61 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -4,6 +4,7 @@ #include "qemu/bswap.h" #include "cpu-qom.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" #if !defined(TARGET_SPARC64) diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index 8d70bfc0cd..6684631478 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -31,6 +31,7 @@ #include "cpu-qom.h" #include "qemu/cpu-float.h" #include "exec/cpu-defs.h" +#include "exec/cpu-interrupt.h" #include "hw/clock.h" #include "xtensa-isa.h" diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 9e15105533..d388be83d0 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -26,6 +26,7 @@ #include "trace.h" #include "disas/disas.h" #include "exec/cpu-common.h" +#include "exec/cpu-interrupt.h" #include "exec/page-protection.h" #include "exec/mmap-lock.h" #include "exec/translation-block.h" diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index e8711ae16a..9718e1a579 100644 --- a/hw/alpha/typhoon.c +++ b/hw/alpha/typhoon.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "qemu/units.h" +#include "exec/cpu-interrupt.h" #include "qapi/error.h" #include "hw/pci/pci_host.h" #include "cpu.h" diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index 0570e4a76f..4ae5668331 100644 --- a/hw/m68k/next-cube.c +++ b/hw/m68k/next-cube.c @@ -12,6 +12,7 @@ #include "qemu/osdep.h" #include "exec/hwaddr.h" +#include "exec/cpu-interrupt.h" #include "system/system.h" #include "system/qtest.h" #include "hw/irq.h" diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index 3a80931538..43d0d0e755 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -27,6 +27,7 @@ #include "hw/ppc/ppc.h" #include "hw/ppc/ppc_e500.h" #include "qemu/timer.h" +#include "exec/cpu-interrupt.h" #include "system/cpus.h" #include "qemu/log.h" #include "qemu/main-loop.h" diff --git a/hw/xtensa/pic_cpu.c b/hw/xtensa/pic_cpu.c index 8cef88c61b..e388531610 100644 --- a/hw/xtensa/pic_cpu.c +++ b/hw/xtensa/pic_cpu.c @@ -27,6 +27,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/cpu-interrupt.h" #include "hw/irq.h" #include "qemu/log.h" #include "qemu/timer.h" From patchwork Thu Apr 24 00:48:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883863 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3205804wrs; Wed, 23 Apr 2025 18:16:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjOHA73SIN08vDgxzNOltIAkMyuAurMpKOQJB5OQvcAnJo/XS0iFtxPZFsAjYfDBFGUk57ZQ==@linaro.org X-Google-Smtp-Source: AGHT+IHsC6xnSELurH8ooBkpIOvoyWGOPUicevmBLWwV2S/vro7DnaCTnK71c1Aoy8sWlaZIOTVB X-Received: by 2002:a05:6214:226c:b0:6e6:6103:f708 with SMTP id 6a1803df08f44-6f4bfc826b9mr17308126d6.38.1745457375156; Wed, 23 Apr 2025 18:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457375; cv=none; d=google.com; s=arc-20240605; b=aQG5tGyEqbWQKcCdP5Mynyz43NnnUW31md4B2N+c1gFmv/CtjbiEueY7DpIQjjLJXT Ba3aTzvqzCzgMwYLENP5Zzr8KgZbjFC4vJC6OxF0U64iauDgXD3/a8i/OhWndq0V9XYC 6tTPOtntYWF2RJLPWnE0TemQM+LSyLS8zw7vDHf76AND3bYPreRgr4o/H1MQ8PPVWmJk jub/pm+NTWLxPq+K4tP1dVM0zykVW5UiUMKqRLvPqHRgiz1m6EYoD6RiVwYpouNUQehm /MGjkic0cRFAmiU6MHRxXxAzWjU4bn3DgKT07N/HaBHsTb5doMz0tGuYmmGbZIwbwcJk FvHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+gsVC4o8Cb7EzlC8YjKgR6GZM8zAAxzQ3ALZayRZdrA=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=JEbb7Lr+3iKKLp6xbMWA9ImtyunLytp1gxifOFVYUVMKjfE3f+Gw1OTtYgEARWO6MR 98QcNYqtcUh0CftWTKsz2Gtk2qWRHvoFcYNggHu8POWbzwpurb7qXdKGg9/rPLE33QgF Q90EtEob2+YnVmWJMS8F4v//AgnsO9G51VTrHFZ7CBVDxRF6uj2i98W26aHRQJt/gHJC 7rC3Zsp25NeR7k9lXWJ4h+Js+fsUp/MudACgyS3z6f/XmcMdo0VvqHhfLQwiYYkbJtIl mdUmNTVqWCGQPhsRclr00YJP/08R9LNQbFWJPy/nG7J4jWkjFWCkWFEBkVRUFZplpWux ROMA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DWGUIM6M; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0aea4cesi3763466d6.313.2025.04.23.18.16.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:16:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DWGUIM6M; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kvh-0002FW-JM; Wed, 23 Apr 2025 20:59: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 1u7ktf-0005zS-NL for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:01 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7ktb-00058A-T4 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:58 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-73bb647eb23so346750b3a.0 for ; Wed, 23 Apr 2025 17:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456213; x=1746061013; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+gsVC4o8Cb7EzlC8YjKgR6GZM8zAAxzQ3ALZayRZdrA=; b=DWGUIM6MIoRH+nMGa9iwqGUu9AKSk5SQt9/X7bCpauuq5b5Ze6fDj2yOEPx8Cc74R0 6GNIQeKtVSDQE1/AOBVO0Yq7IBldYByg4YPJ+y3qnvmsi9Qfakm2t5qsKo9OB0KNvmW6 IdqDlNk/o/Kw03xt60I9bsX+2x2Wk36AdGJup7+ci1CQJiLvEduvxN2XdI+3b7KLfjHD mOhpNbSWEPQKdIfU1+QRbjYW0bbx4r0ORLyKma8VDpAjc6hRJPh4k33jQQRU7SPEzFd7 42iweieyLoKv+tCPAD32lxqwMjQ1Gyi9KOKEUb8LrM1zEbT6Ky+F+wPQHuTqkETzBfVZ R9vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456213; x=1746061013; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+gsVC4o8Cb7EzlC8YjKgR6GZM8zAAxzQ3ALZayRZdrA=; b=Eh906UzTHcg9WzcA7Vm6DU9dfKxGI1Lt6AXvWgMZ4KgZithnTAFiyeZZ7HRpg/+P3H RMkKrJag/Tc3qNQh1OUBpuXF2L4Um4PAG1v/Wzj9N+BafwEuNAL6C+EbCiEyzkzOL9vL r3ERKS0blVlgiS51QAUFSQybYpbx6pIO1riJB7qABmWXDzuatpIV+c9KdjTp0NKR7YGa zIyXHZcocCcJIQWkX8pVUzi+VnmvuKHVsWCLaL+Ra2vKufZ62RvVSIdIqEFg5M7FyuJ5 ybnvL1x8+9SVn+771uafbYRXCK1eitdtyOe1mcGN3zZyOLDeSTUORTjPM7mImCxb1ukg J1ug== X-Gm-Message-State: AOJu0YypxRFMK+q5kL70Vlntg6VzNmTGvPKAZW81IzkNCzvTVTdNTZ7e LlniYghqcggZl/4pQWTsIUCi7XLmMYt9FUwrGFH5NLVeCXo/B+g7XypNnKA2M4Xpy/NtXBoYAwy 7 X-Gm-Gg: ASbGncvgvESYb5TIivPErfIx+yhurhbnDGpSHeOczDf23J6Y4KAdbU/mSh8FwQhQjfD r0i0TJPPwKCGnTTm+wXdFJXthaa9mO39SX78aKa7pQ7GEybJi+Lsri1E+P6PB+AGiTaC4rYfgJj 41X9L2ptz0868cXbEaIRmxHv1VjKjJ7cWj5g76icSKFgqOEw7Cxp27pWFg4VfNxLGpEK7ApOrAC 17SY9Pz9nVfPLgBvdPzIy0672T/eKzzLIkmbUqQESHJQEU3Pm1PSsmTvvEI6fs267/2ft1uNOaa Yr/dKGjz0bd713tCU2NtyFa2JUutRGX3SHzyg9bqH1jel3GyUfQa0wfdAqamBXQw4p3aqucIhwY = X-Received: by 2002:a05:6a21:174d:b0:1f5:915b:3e30 with SMTP id adf61e73a8af0-20444f0ddb2mr978744637.22.1745456212969; Wed, 23 Apr 2025 17:56:52 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 107/148] accel/tcg: fix missing includes for TCG_GUEST_DEFAULT_MO Date: Wed, 23 Apr 2025 17:48:52 -0700 Message-ID: <20250424004934.598783-108-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier We prepare to remove cpu.h from cpu-all.h, which will transitively remove it from accel/tcg/tb-internal.h, and thus from most of tcg compilation units. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-12-pierrick.bouvier@linaro.org> --- accel/tcg/internal-target.h | 1 + include/exec/poison.h | 1 + accel/tcg/translate-all.c | 1 + 3 files changed, 3 insertions(+) diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index c88f007ffb..05abaeb8e0 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -9,6 +9,7 @@ #ifndef ACCEL_TCG_INTERNAL_TARGET_H #define ACCEL_TCG_INTERNAL_TARGET_H +#include "cpu-param.h" #include "exec/exec-all.h" #include "exec/translation-block.h" #include "tb-internal.h" diff --git a/include/exec/poison.h b/include/exec/poison.h index 4180a5a489..8ec02b40e8 100644 --- a/include/exec/poison.h +++ b/include/exec/poison.h @@ -37,6 +37,7 @@ #pragma GCC poison TARGET_NAME #pragma GCC poison TARGET_SUPPORTS_MTTCG #pragma GCC poison TARGET_BIG_ENDIAN +#pragma GCC poison TCG_GUEST_DEFAULT_MO #pragma GCC poison TARGET_LONG_BITS #pragma GCC poison TARGET_FMT_lx diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 87fb6c51d3..ed41fc5d0c 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -43,6 +43,7 @@ #include "system/ram_addr.h" #endif +#include "cpu-param.h" #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/mmap-lock.h" From patchwork Thu Apr 24 00:48:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883875 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207021wrs; Wed, 23 Apr 2025 18:20:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWsjK1K7lV2s9gEKx8wew8yYmL/RAVJObfoe8F0Yd59GN5y0UAT8UYt+IVMld8rPrBw4QxgJA==@linaro.org X-Google-Smtp-Source: AGHT+IFGB+FAzoz8xpXcajQg9QDg9cF1YVT+oTq3Hn2+NaF3VwpigfO9OfbMNhNb0IBDlKEucuyJ X-Received: by 2002:a05:620a:2415:b0:7c5:4750:9302 with SMTP id af79cd13be357-7c956ef6f85mr175041785a.34.1745457649384; Wed, 23 Apr 2025 18:20:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457649; cv=none; d=google.com; s=arc-20240605; b=QfVUgXwGLZgCe0YdxTSbXsu/sCrYvtc6UseqFcbnZYflcg1d/YaxOy2Skj+FVKb8ew IY0a6sLz19GCli5LDfMZln1GgpP7bc3h56RABrR613WQ7NcaS4b48/6EuBIxc8SHtokz OfBZHzUO0DaPEHnrFZYeq4dzyUhtd17LumncFUBz47n8K54G8Jz7Om5Izi4gT1KGynbL GQcZmxM/HsNdAmAxhysTZLg33JqGXp/otbgvpE+wp2SOd0XMMitBIHf7jajTZjxmaPeX xslzmLE8Zd3vghiTdQHxU5irwOhTUaPgNFqYUA6YOJzCKUpwNJgyh5sC87GvbEhlmJx/ lndQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dQfBujJU7UIXTPefdL2D/GAfXKoyN3ifbh/HgiWO374=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=Z58SRooMVg7YEOQHQ55Qsqt3mqYi4gQMIT9qRObtUx1ix9MeJXUH9YcAVxFsEU0JAh G4Skr3qepVDJv+ct+/iXe4A1hgAPPlijD+BHsJxSt0GfmqJGX66YeOggTjdyWfuNABpH Gnn55z3mCC78BB98bD2hHcIVr8FYxg5lF05lDt2Eon1KrDMeR3BtmQijN6q/xX0yuzkk 23sk48ylCic6QEPqRAVUaMqi44pY/4YcgjRVjjsOxzIdNIJyRBAyVgTsjdXzRuJgHfxD P3Ez/SRwnGwvIgRKiySGTsVa8n7V+kYLGVVtkMht6TY8+i/TsLIIEtl80lIXcnV4kO48 oiWg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lVpJD0vw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958edf37bsi23539285a.610.2025.04.23.18.20.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:20:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lVpJD0vw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kvs-0002uY-Kj; Wed, 23 Apr 2025 20:59:17 -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 1u7ktf-0005zT-O8 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:01 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0: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 1u7ktb-00058E-T4 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:58 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-7396f13b750so433099b3a.1 for ; Wed, 23 Apr 2025 17:56:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456213; x=1746061013; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dQfBujJU7UIXTPefdL2D/GAfXKoyN3ifbh/HgiWO374=; b=lVpJD0vwRiHviZsyUZI7ZKhFQ6bzjYKxD00WtDUFgz0oFxUQ0Yqc31fQdtAMfnrGrD 6EweIhvWnmVg2h2WrOUf9cAlCBvcci0OCxvMN6mLlgS3hXu/ocQQiwZhOBuUrbT2WL2R YqUHvvl9/Gugj8FH7mzAKRaC/nJp5SpRcb+fykBsJ4Z/zmr9kXvEgGiQVZofyby4lHON blKO1+OsUJehtZ0ls+GqHG1rTK4qyXotAepwbrsOB7MFMJw9p1sAaf65kmyQMfb8DH86 1GtWroSVObrxSraJZbhgCFPg0AyVVudoFc0FslLTPyUjM8d+Xq/hvsH1YmYB7bxWDNd2 E5sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456213; x=1746061013; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dQfBujJU7UIXTPefdL2D/GAfXKoyN3ifbh/HgiWO374=; b=mHK00UBLMGS8+Smm8m311XeQkdG6yhvViPipdLOAWHQa2sRAWlOMHJi0JKwrJ2W2Xp 3hFrOlVyuqE28LY3e1OGNeFuIffP2u/sdgThR40ujwIl3pvKMGDbyWuiAok0Uu2vfZC+ rx6LIlewWVfkK6qw+A0brrGpHRukeYmNusEsP8kvJZnDm6sFoIDzo4x0pe0TEx89YZpJ plVb1vrqkm3niovtRqmNSM0J0NY6KN5DKrDGi4uiNvRE1eo/8SrATIFQ22N74g6U/T1S reLX6dx9b0R/z13CYKlJ1vcYOCNMVirHGfsTm1t7bRmpveLNMYPLGHIo/oO92wT1yCYh Gsww== X-Gm-Message-State: AOJu0YzFUbPtn6J+KFlrrb6AHdYrSrTQqBrHiQUYt8F01e45N6+zdT4P jhQ0+I1nQjv1dlsYYLCg/v4BN5zMH3p9UCabKFKT08yswowerkSL2r3+4BTeM56NKEVK4mda9EA T X-Gm-Gg: ASbGncugo82rcrMMjFzT8EqtzU+nNFEeFbEPU258ZolHDksLeaoyBV48w8pa+ENR7q+ QoVn0TYDA97VRU1Zgrn+Bl4gTbcALrAwAiN5gGdBjTfwuq0rJiymLoDT5IbIFdK0ElC5kytcbVi TmLadDx1x8gK5IIDOn4uEy/0Gt/sn72WIKB3qE9J62gDpxbGe25/H9C6C30KjcmvkAILFJsgswX gmPf8JM9Gdd+BDyIrvB3TX+0hcBJwXHiUalp0OjJI3WH79Jl9iLKinZ9Q6s2OfjbbbFinD0+P2z Kfk61mwUK4kHwPg7M7IN4rsMLlFLKQhDx1+3XCw/unBmyCc1OPKmCu1vWs++2iPaeuXR63i6scg = X-Received: by 2002:a05:6a21:78aa:b0:1f5:87dc:a315 with SMTP id adf61e73a8af0-20444e9b55cmr838786637.12.1745456213574; Wed, 23 Apr 2025 17:56:53 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 108/148] accel/tcg: fix missing includes for TARGET_HAS_PRECISE_SMC Date: Wed, 23 Apr 2025 17:48:53 -0700 Message-ID: <20250424004934.598783-109-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier We prepare to remove cpu.h from cpu-all.h, which will transitively remove it from accel/tcg/tb-internal.h, and thus from most of tcg compilation units. Note: this was caught by a test regression for s390x-softmmu. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-13-pierrick.bouvier@linaro.org> --- include/exec/poison.h | 1 + accel/tcg/tb-maint.c | 1 + accel/tcg/user-exec.c | 1 + 3 files changed, 3 insertions(+) diff --git a/include/exec/poison.h b/include/exec/poison.h index 8ec02b40e8..f267da6083 100644 --- a/include/exec/poison.h +++ b/include/exec/poison.h @@ -38,6 +38,7 @@ #pragma GCC poison TARGET_SUPPORTS_MTTCG #pragma GCC poison TARGET_BIG_ENDIAN #pragma GCC poison TCG_GUEST_DEFAULT_MO +#pragma GCC poison TARGET_HAS_PRECISE_SMC #pragma GCC poison TARGET_LONG_BITS #pragma GCC poison TARGET_FMT_lx diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index df3438e190..d479f53ae0 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu/interval-tree.h" #include "qemu/qtree.h" +#include "cpu.h" #include "exec/cputlb.h" #include "exec/log.h" #include "exec/exec-all.h" diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 72a9809c2d..7f57d8f1af 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "accel/tcg/cpu-ops.h" #include "disas/disas.h" +#include "cpu.h" #include "exec/vaddr.h" #include "exec/exec-all.h" #include "exec/tlb-flags.h" From patchwork Thu Apr 24 00:48:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883813 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3200160wrs; Wed, 23 Apr 2025 18:00:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUwNLG+qMibYU4sM4+J7qQ+jGYfL9LRMvQEmbM6433uzgVwmT7QVDU9Am+8xqQbst2fZYpwMw==@linaro.org X-Google-Smtp-Source: AGHT+IH9Bm2mzg/rB7Eqzexc8uYZkCNo/Mp13OUgz1JDyvnHW1lCKK+c7Ai5E9NnCb4yxY6bsuJG X-Received: by 2002:a05:620a:1923:b0:7c5:5f58:9158 with SMTP id af79cd13be357-7c956e8bae0mr159500285a.9.1745456421383; Wed, 23 Apr 2025 18:00:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456421; cv=none; d=google.com; s=arc-20240605; b=PpVL+njw0ldFRjNZncqd5kwzcZAucjJWS2O1TaX/VRJeFqz/m4xLKDqQPXL5AqF2cB MoqKyMOYmePLGuz3/IqL+i/QoEFAkD5DGF4lRPLksup1mikCcU+6wqnCkzlcxmwZjYx8 kYzEL23V8FbF7Ou4bYWgtXYP+/fz6HjGFU9iJf9bf1J4j6yxuWpx8ofBf4PQQ9UHWmfa K9JRLMleqYIaeoE4DlPbdswJTnu3oQ3wyvETPwEhF2kdTlpw/nwMGj7tk80ZkCD2v9GH e0vQ687WQNu+uiWecDK38Vj1ChGpaIWOKOmahZu4mYrcSkKT+IiQiB7L6xSfnr9dO3cn RFzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kHsAIp23EWRdufSrcLbCASuKqIf9fO9vwVBtAt7EmVA=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=LY2tqk0huwbQoqopWHNrljDvZmaVdsNYnuXphhJF9fwZt8NcC1/50QM/GFcgB9YIOr 0D3Q1bjhHW3dtLfhnau93kcUrOjicFPFfT039S1MSIWmvU6OGipOijzGhhoqxF1MbBih nsD4U3Mk+44CKy0vYjFUYKf9oTMzL/4wG+qX3/kUkwXZ/F/ZvI2QhzKWMp0aOy1OxTfS s2euPlHU5qMrL3+lLcW5cRmvyr2xEaSLIEzf5RqTxFfTT2GMbbmix0mpp5blZ2VRDinV H8YG72FIkdQUD/rZ37O11oeZijd+uiKamRHabSggZJDq4JuJaKuzwt0mSpa+Yfh5Ru7J QUuw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vXYeDg3+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958c9ee79si21749685a.10.2025.04.23.18.00.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:00:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vXYeDg3+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kwU-00043U-N3; Wed, 23 Apr 2025 20:59: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 1u7ktf-0005zR-LW for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:01 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktb-00058O-T3 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:56:58 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2260c91576aso3451395ad.3 for ; Wed, 23 Apr 2025 17:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456214; x=1746061014; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kHsAIp23EWRdufSrcLbCASuKqIf9fO9vwVBtAt7EmVA=; b=vXYeDg3+Pmwh9oRfxkP8RD7Cq4POHW5EIDpLgCHqYBPxqtY52LhvzXYFDqn68mPf2H 8dVPRkVv09feYng4XmnK2RxwSpWAxutJD3hIASsodE7tu3g042uR9CCDZlCRpdQ8nKBb ZA718zNBgNtfIXMGZow+KujRpPbjjizjmge3HMa6aFdE/f43UJ3eaDKBaYAyez26N7aT NUs1GkkWvV3zgssQdyqHBxZqInpmzG43NA3sGuBuL9mxg/9gAzZnK+DSNDzsHg2J5ExW lxRHqVUuNKlNk3QxkAgrRflR67PQAIEmq+LxDGQWRN0gXGYTHDVTQ2SH6J2aSkLvXsfb I2MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456214; x=1746061014; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kHsAIp23EWRdufSrcLbCASuKqIf9fO9vwVBtAt7EmVA=; b=oGCPk0+K+v/BofOQ6ItTi6anObsfV4VJI3TsIovlPoK/gM/yJqZ79chbwpr0W8gfRQ ZTgqdHWI8I2AMjMCgxyHBAX2euMjIwA6bHz78gK9MwkqFNOYj+wLyWX0DZnK1V72ddov HZgL9stZ6rD0/qZSZFO+0t5IRqS92YkRrsW+VftHIhiDb7JqezSFBGX6Bh0IrIodugrK GD06dD2pPi07KoQxZ9d4st/73BJzgqpwlzaBFmWQGSogZn6Ec+EmK98kn9chL6/Xvi2G SmetTt/d0IzOIP/vI0yoZnFXrm96mj9er66oQkgMvj0yxlMbvthMurw4+8qnne6NvHbb 5tiA== X-Gm-Message-State: AOJu0YzJqaI3nB8KpvMhmmK3dKY7IfdRqiAcXlk0zBKSugyvJ9tTOp/j LjQAQ2mHyXgr+5zHcW3Wab6YVt82IY+rx8NX/6yTD8QSdUvAK73nmHZ2F9X0vfqCldJHlqaVxPm A X-Gm-Gg: ASbGncuYm+pfaT/71Dii//OZNCjjV3/1sXGV2XRX7Qb6D5+i/6EeCrWDWwB3KyGzhv2 4ZMWxVMJsP7KIvuEgjwyQt33vpZayfLcWrmclt5rZ524vlHHSmqGITwgk8Cev/Jc7rIjd+8rZlz +OoEWt65o4W/YMuzS6GHzep7EiohPeBC49NvGhEdsXeNKMYrWOHvVb/aFkbEJ+pa9DGxS9Hs9js Bp8lGnWuk9VgjR16Lm8sqVwX95U2gq9Hi9tCLEZ21swg5lP+mduIV7lXpctG7ZyVLCytT8Vzz0S X3jU/HlfnxVyhlzIJFRWLkCM7GKRJUIxKjXTG+IiuPrrcHLiANL3AdRRNd+K5cOC2dx8w5fQ8FY = X-Received: by 2002:a17:903:8c6:b0:223:619e:71e9 with SMTP id d9443c01a7336-22db3bb6f8cmr8148005ad.11.1745456214172; Wed, 23 Apr 2025 17:56:54 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 109/148] exec/cpu-all: remove cpu include Date: Wed, 23 Apr 2025 17:48:54 -0700 Message-ID: <20250424004934.598783-110-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Now we made sure important defines are included using their direct path, we can remove cpu.h from cpu-all.h. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-14-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 1 - accel/tcg/cpu-exec.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 7b712b2556..dae4fbcea8 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -23,6 +23,5 @@ #include "hw/core/cpu.h" #include "exec/cpu-defs.h" #include "exec/target_page.h" -#include "cpu.h" #endif /* CPU_ALL_H */ diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index d388be83d0..8d2b957a3b 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -36,6 +36,7 @@ #include "exec/log.h" #include "qemu/main-loop.h" #include "exec/cpu-all.h" +#include "cpu.h" #include "exec/icount.h" #include "exec/replay-core.h" #include "system/tcg.h" From patchwork Thu Apr 24 00:48:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883895 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207987wrs; Wed, 23 Apr 2025 18:24:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUZd7sRDjeBNJZQJjcrraChHlk4P6Hgp4bsKivIK80F1xjc12IfhSF1bc9p+Cmm7HKVe9rvFg==@linaro.org X-Google-Smtp-Source: AGHT+IFQHQBd0Z/mVbqw61A2yeS3r0DwYGg3CalG94hb5HQBWw83k7td3+cMdEy9Zc2mq+izonBE X-Received: by 2002:a05:622a:1350:b0:477:6f6d:10fc with SMTP id d75a77b69052e-47eb248cac3mr11552451cf.5.1745457879826; Wed, 23 Apr 2025 18:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457879; cv=none; d=google.com; s=arc-20240605; b=SM3csO2i3DG7SrZz8dhHj/4ZJSIgkqqDN7reIMXChGiQXHtvHq4GfFVbdnT4LEeBtn X5QrDDnrw3Kv4pIWPymdTexm3ZgNTeIhGk5Oznqei+Sdq/6dcE8F+VbUJYpNm4nTq1c1 lwX/bZPMjNqkd6X+HLLpZPW7PehDXNkRFwFcixq48I9KOl/Mhn/w6MxtyJXHDxKKyvz2 PIsOsrOfZ80aCovjQSIVii0eI8D2Enz3GNkvmusfCibQhN2olPoitF4gIav9glNusnFW Jce/srJ86UySmegP4LiFoLtx1JfcJdTZwMQo5fDZmVHhIoLxFppMTfV58NvOmsu7y59j 342Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5SkVIVJhYhjnAUQzC6lgapFUmJ317qZlaiCgQmtHCvg=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=YBH3t7YLHaPMLB78JCcMfC33LYCFFE8crqoI6vWpA5rY0apBsWmiD77e06naqupOIW k1k6DHtmno2QIPnXeSpTe2HOurQcJXubQG20Qq++SZGdzOJ6kNu4sds5t0K9v1MXPGHj 6uz6zCCr9ef+xhUoMpHz1eHAuLIKueqIfES8QPUcwDzIfzErmJv6CwDCxuk2PeprJY7W he+bwJcUCIWYHNB2ca8yhv6wKlXwHyyJEdfoyKsl4oLEuPMcedWS0DppYpHBWj9/k45T 8+SE4qhdM0wgBUasj4RYvPI2v9YKVANbI9yBcieWMEDjFca5ufndAIci3VfimKpE4pPc eO7Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="x/rLx0bW"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1d9e267si5454511cf.405.2025.04.23.18.24.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:24:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="x/rLx0bW"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kv8-0000h4-Et; Wed, 23 Apr 2025 20:58:30 -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 1u7kti-000667-73 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:04 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktc-00058T-FB for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:01 -0400 Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-73bb647eb23so346792b3a.0 for ; Wed, 23 Apr 2025 17:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456215; x=1746061015; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5SkVIVJhYhjnAUQzC6lgapFUmJ317qZlaiCgQmtHCvg=; b=x/rLx0bWqQD4qlJ0aT5cSvQMTEAwwXMbcSjA7JchhWrdaz4jQNM5SxiOa+SVK7v9gG OJubKE9+31RG+xSiYpDPJdS5+0jyhQkm2g9NV3/GFcU5QlTFYZrfdG6P7qmExS7Foeb/ OkfsXf+84EwtgZ+ybY7ZVinXabsgq+z8BDT74IDueQ1TE/GyBlbB27U9O2cFynl++j5j EaC+zuhCbTsFoAlAcpFMAZOu7ETtWJ3BBts590z8IHR2vA8UxuK6XkBnf8lqMidYhkwZ OcmQtHYHRR2InuII1cOynk4PPt162hc3GD1jw4H6Ou2g74xkzhUaDEROtXsT3Km9sXAq Ly7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456215; x=1746061015; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5SkVIVJhYhjnAUQzC6lgapFUmJ317qZlaiCgQmtHCvg=; b=YK7DYooo3bWMBKwvZOxvXoeRyyn4QWu33A5YcKubexinxo4JhdSpzb1f0Sq+4YYIge RrY/Aj5svHQ/i7iIDzef9XToWgdTq7wjcHd3KAJxS2IvSe5yj3LiXSBI3RhZ7hWgUnzP oszaSLjO2mo0FJ3dGIfj+MG/i8EroUZWpvOonLm5l4ZyalnC6Uz+hJ2Sa5A5Va8zuUyo ehJzH3wvW0UloC9+Z2uy1Y8qOeFKGg2xN6EcISIn43ktdJ9rEQs/CFxJ00DiwhQ1GcdS dJBQilrNKMoQPiWm8gf9vYlof0ewXelyheZRiRPMoHm72QGIWBd36Qhy3SnRzkKuASU0 LAbQ== X-Gm-Message-State: AOJu0YyCJ+hvqZDTc/wtese3rIDyPYI6pyk3J8a7w630zrf3QL5WHsbU 8hH5J1Wl/s88f6ita+Up565kB4qLodZzHe6xhLG22NX2Z6NQQu5S+JV82mD8FmiAEyS5GHK7//i o X-Gm-Gg: ASbGncuWMULV6lXTbRNeoaanDTuvXfHNdK7cjfEqz49czj7pcyCQQS+2cXhvR96WA2c fQwaBPZ1mXeXfdUPw23wKDxa1Mf4ONZnD8u8yS6c7+azy5DLGz9DhlxUV3fnAZv0r8DaX+t+WLL O4p/UBhQ/gzjxM+7Yycj8Cnrh7z145XnL4xmUdH3L3vl8lICaaRIXlAGTv6z02hHtXl0fCkpgVF t+QuSOsUB0Vpn5fAOfK+atjhGJBG/pK/imjAWoOXwy+KSqywasCtp5wacGwVoIW5unuApcUx3Au fpttS6g1lqqyfMiBg+p9UQo9pGR3XlpUeXjDVfP+jsGq6ApWF8ex+UPDKTVcFLvDRt/qJYzWe1A = X-Received: by 2002:a05:6a20:c707:b0:1f5:8d3b:e272 with SMTP id adf61e73a8af0-20444e81be4mr833803637.1.1745456214920; Wed, 23 Apr 2025 17:56:54 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:54 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 110/148] exec/cpu-all: remove exec/target_page include Date: Wed, 23 Apr 2025 17:48:55 -0700 Message-ID: <20250424004934.598783-111-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::436; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tb-hash.h | 1 + hw/s390x/ipl.h | 1 + include/exec/cpu-all.h | 1 - hw/alpha/dp264.c | 1 + hw/arm/boot.c | 1 + hw/arm/smmuv3.c | 1 + hw/avr/atmega.c | 1 + hw/hppa/machine.c | 1 + hw/hyperv/hyperv.c | 1 + hw/hyperv/syndbg.c | 1 + hw/hyperv/vmbus.c | 1 + hw/i386/multiboot.c | 1 + hw/i386/pc.c | 1 + hw/i386/pc_sysfw_ovmf.c | 1 + hw/i386/vapic.c | 1 + hw/loongarch/virt.c | 1 + hw/m68k/q800.c | 1 + hw/m68k/virt.c | 1 + hw/openrisc/boot.c | 1 + hw/pci-host/astro.c | 1 + hw/ppc/e500.c | 1 + hw/ppc/mac_newworld.c | 1 + hw/ppc/mac_oldworld.c | 1 + hw/ppc/ppc_booke.c | 1 + hw/ppc/prep.c | 1 + hw/ppc/spapr_hcall.c | 1 + hw/riscv/riscv-iommu-pci.c | 1 + hw/riscv/riscv-iommu.c | 1 + hw/s390x/s390-pci-bus.c | 1 + hw/s390x/s390-pci-inst.c | 1 + hw/s390x/s390-skeys.c | 1 + hw/sparc/sun4m.c | 1 + hw/sparc64/sun4u.c | 1 + monitor/hmp-cmds-target.c | 1 + semihosting/uaccess.c | 1 + target/alpha/cpu.c | 1 + target/alpha/helper.c | 1 + target/alpha/translate.c | 1 + target/arm/cpu.c | 1 + target/arm/gdbstub64.c | 1 + target/arm/ptw.c | 1 + target/arm/tcg/helper-a64.c | 1 + target/arm/tcg/op_helper.c | 1 + target/arm/tcg/sve_helper.c | 1 + target/arm/tcg/tlb-insns.c | 1 + target/arm/tcg/translate-a64.c | 2 +- target/arm/tcg/translate.c | 1 + target/avr/helper.c | 1 + target/avr/translate.c | 1 + target/hppa/cpu.c | 1 + target/hppa/mem_helper.c | 1 + target/hppa/translate.c | 1 + target/i386/helper.c | 1 + target/i386/kvm/hyperv.c | 1 + target/i386/kvm/kvm.c | 1 + target/i386/kvm/xen-emu.c | 1 + target/i386/sev.c | 1 + target/i386/tcg/access.c | 1 + target/i386/tcg/mpx_helper.c | 1 + target/i386/tcg/system/excp_helper.c | 1 + target/i386/tcg/tcg-cpu.c | 2 +- target/i386/tcg/translate.c | 1 + target/loongarch/cpu_helper.c | 1 + target/loongarch/tcg/tlb_helper.c | 1 + target/loongarch/tcg/translate.c | 1 + target/m68k/helper.c | 1 + target/m68k/translate.c | 1 + target/microblaze/helper.c | 1 + target/microblaze/mmu.c | 1 + target/microblaze/translate.c | 1 + target/mips/tcg/msa_helper.c | 1 + target/mips/tcg/system/cp0_helper.c | 1 + target/mips/tcg/system/tlb_helper.c | 1 + target/mips/tcg/translate.c | 1 + target/openrisc/mmu.c | 1 + target/openrisc/sys_helper.c | 1 + target/openrisc/translate.c | 2 +- target/ppc/mem_helper.c | 1 + target/ppc/mmu-hash32.c | 1 + target/ppc/mmu_common.c | 1 + target/ppc/mmu_helper.c | 1 + target/ppc/translate.c | 1 + target/riscv/cpu_helper.c | 1 + target/riscv/pmp.c | 1 + target/riscv/tcg/tcg-cpu.c | 1 + target/riscv/translate.c | 2 +- target/riscv/vector_helper.c | 1 + target/rx/cpu.c | 1 + target/s390x/helper.c | 1 + target/s390x/ioinst.c | 1 + target/s390x/mmu_helper.c | 1 + target/s390x/tcg/excp_helper.c | 1 + target/s390x/tcg/mem_helper.c | 1 + target/s390x/tcg/misc_helper.c | 1 + target/sh4/helper.c | 1 + target/sh4/translate.c | 1 + target/sparc/ldst_helper.c | 1 + target/sparc/mmu_helper.c | 1 + target/sparc/translate.c | 1 + target/tricore/helper.c | 1 + target/tricore/translate.c | 1 + target/xtensa/helper.c | 1 + target/xtensa/mmu_helper.c | 1 + target/xtensa/translate.c | 1 + target/xtensa/xtensa-semi.c | 1 + 105 files changed, 104 insertions(+), 5 deletions(-) diff --git a/accel/tcg/tb-hash.h b/accel/tcg/tb-hash.h index a5382f460d..3bc5042d9d 100644 --- a/accel/tcg/tb-hash.h +++ b/accel/tcg/tb-hash.h @@ -22,6 +22,7 @@ #include "exec/cpu-defs.h" #include "exec/exec-all.h" +#include "exec/target_page.h" #include "exec/translation-block.h" #include "qemu/xxhash.h" #include "tb-jmp-cache.h" diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h index 6557ac3be5..cb55101f06 100644 --- a/hw/s390x/ipl.h +++ b/hw/s390x/ipl.h @@ -14,6 +14,7 @@ #define HW_S390_IPL_H #include "cpu.h" +#include "exec/target_page.h" #include "system/address-spaces.h" #include "system/memory.h" #include "hw/qdev-core.h" diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index dae4fbcea8..e7c8b8672f 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -22,6 +22,5 @@ #include "exec/cpu-common.h" #include "hw/core/cpu.h" #include "exec/cpu-defs.h" -#include "exec/target_page.h" #endif /* CPU_ALL_H */ diff --git a/hw/alpha/dp264.c b/hw/alpha/dp264.c index 570ea9edf2..19562b5967 100644 --- a/hw/alpha/dp264.c +++ b/hw/alpha/dp264.c @@ -8,6 +8,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/target_page.h" #include "elf.h" #include "hw/loader.h" #include "alpha_sys.h" diff --git a/hw/arm/boot.c b/hw/arm/boot.c index e296b62fa1..d3811b896f 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -14,6 +14,7 @@ #include #include "hw/arm/boot.h" #include "hw/arm/linux-boot-if.h" +#include "exec/target_page.h" #include "system/kvm.h" #include "system/tcg.h" #include "system/system.h" diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 1a96287ba9..4362ae6aa1 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -25,6 +25,7 @@ #include "hw/qdev-core.h" #include "hw/pci/pci.h" #include "cpu.h" +#include "exec/target_page.h" #include "trace.h" #include "qemu/log.h" #include "qemu/error-report.h" diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c index 2e8b8e8c67..c105d2a97c 100644 --- a/hw/avr/atmega.c +++ b/hw/avr/atmega.c @@ -12,6 +12,7 @@ #include "qemu/module.h" #include "qemu/units.h" #include "qapi/error.h" +#include "exec/target_page.h" #include "system/memory.h" #include "system/address-spaces.h" #include "system/system.h" diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index c5f247633e..c430bf28dd 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -11,6 +11,7 @@ #include "elf.h" #include "hw/loader.h" #include "qemu/error-report.h" +#include "exec/target_page.h" #include "system/reset.h" #include "system/system.h" #include "system/qtest.h" diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index d21e428eae..c487f13e2f 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -25,6 +25,7 @@ #include "target/i386/kvm/hyperv-proto.h" #include "target/i386/cpu.h" #include "exec/cpu-all.h" +#include "exec/target_page.h" struct SynICState { DeviceState parent_obj; diff --git a/hw/hyperv/syndbg.c b/hw/hyperv/syndbg.c index d3e3917077..a410b55b9a 100644 --- a/hw/hyperv/syndbg.c +++ b/hw/hyperv/syndbg.c @@ -15,6 +15,7 @@ #include "hw/qdev-properties.h" #include "hw/loader.h" #include "cpu.h" +#include "exec/target_page.h" #include "hw/hyperv/hyperv.h" #include "hw/hyperv/vmbus-bridge.h" #include "hw/hyperv/hyperv-proto.h" diff --git a/hw/hyperv/vmbus.c b/hw/hyperv/vmbus.c index 12a7dc4312..06649b2a2e 100644 --- a/hw/hyperv/vmbus.c +++ b/hw/hyperv/vmbus.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" +#include "exec/target_page.h" #include "qapi/error.h" #include "migration/vmstate.h" #include "hw/qdev-properties.h" diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c index cd07a05861..6e6b96bc34 100644 --- a/hw/i386/multiboot.c +++ b/hw/i386/multiboot.c @@ -29,6 +29,7 @@ #include "multiboot.h" #include "hw/loader.h" #include "elf.h" +#include "exec/target_page.h" #include "system/system.h" #include "qemu/error-report.h" diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 1b5d55e96d..5481fe40be 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" +#include "exec/target_page.h" #include "hw/i386/pc.h" #include "hw/char/serial-isa.h" #include "hw/char/parallel.h" diff --git a/hw/i386/pc_sysfw_ovmf.c b/hw/i386/pc_sysfw_ovmf.c index 07a4c267fa..da947c3ca4 100644 --- a/hw/i386/pc_sysfw_ovmf.c +++ b/hw/i386/pc_sysfw_ovmf.c @@ -26,6 +26,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "hw/i386/pc.h" +#include "exec/target_page.h" #include "cpu.h" #define OVMF_TABLE_FOOTER_GUID "96b582de-1fb2-45f7-baea-a366c55a082d" diff --git a/hw/i386/vapic.c b/hw/i386/vapic.c index 26aae64e5d..347431eeef 100644 --- a/hw/i386/vapic.c +++ b/hw/i386/vapic.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "qemu/module.h" +#include "exec/target_page.h" #include "system/system.h" #include "system/cpus.h" #include "system/hw_accel.h" diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index f1eb42c2c1..39ea5cadd6 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -8,6 +8,7 @@ #include "qemu/units.h" #include "qemu/datadir.h" #include "qapi/error.h" +#include "exec/target_page.h" #include "hw/boards.h" #include "hw/char/serial-mm.h" #include "system/kvm.h" diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index aeed4c8ddb..c2e365a820 100644 --- a/hw/m68k/q800.c +++ b/hw/m68k/q800.c @@ -24,6 +24,7 @@ #include "qemu/units.h" #include "qemu/datadir.h" #include "qemu/guest-random.h" +#include "exec/target_page.h" #include "system/system.h" #include "cpu.h" #include "hw/boards.h" diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index 295a614e16..e74d709a18 100644 --- a/hw/m68k/virt.c +++ b/hw/m68k/virt.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qemu/guest-random.h" +#include "exec/target_page.h" #include "system/system.h" #include "cpu.h" #include "hw/boards.h" diff --git a/hw/openrisc/boot.c b/hw/openrisc/boot.c index 0a5881be31..c81efe8138 100644 --- a/hw/openrisc/boot.c +++ b/hw/openrisc/boot.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/cpu-defs.h" +#include "exec/target_page.h" #include "elf.h" #include "hw/loader.h" #include "hw/openrisc/boot.h" diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c index 039cc3ad01..c6f2d4f494 100644 --- a/hw/pci-host/astro.c +++ b/hw/pci-host/astro.c @@ -35,6 +35,7 @@ #include "target/hppa/cpu.h" #include "trace.h" #include "qom/object.h" +#include "exec/target_page.h" /* * Helper functions diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 69269aa24c..809078a2c3 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -18,6 +18,7 @@ #include "qemu/datadir.h" #include "qemu/units.h" #include "qemu/guest-random.h" +#include "exec/target_page.h" #include "qapi/error.h" #include "e500.h" #include "e500-ccsr.h" diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 2d5309d6f5..21b2fc569a 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -50,6 +50,7 @@ #include "qemu/datadir.h" #include "qemu/units.h" #include "qapi/error.h" +#include "exec/target_page.h" #include "hw/ppc/ppc.h" #include "hw/qdev-properties.h" #include "hw/nvram/mac_nvram.h" diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index b5814690f5..0d34e6bfda 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -28,6 +28,7 @@ #include "qemu/datadir.h" #include "qemu/units.h" #include "qapi/error.h" +#include "exec/target_page.h" #include "hw/ppc/ppc.h" #include "hw/qdev-properties.h" #include "hw/boards.h" diff --git a/hw/ppc/ppc_booke.c b/hw/ppc/ppc_booke.c index 925e670ba0..3872ae2822 100644 --- a/hw/ppc/ppc_booke.c +++ b/hw/ppc/ppc_booke.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/target_page.h" #include "hw/ppc/ppc.h" #include "qemu/timer.h" #include "system/reset.h" diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 3e68d8e6e2..739526335c 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -39,6 +39,7 @@ #include "hw/rtc/mc146818rtc.h" #include "hw/isa/pc87312.h" #include "hw/qdev-properties.h" +#include "exec/target_page.h" #include "system/kvm.h" #include "system/reset.h" #include "trace.h" diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 406aea4ecb..a4f399c4ff 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -9,6 +9,7 @@ #include "qemu/module.h" #include "qemu/error-report.h" #include "exec/tb-flush.h" +#include "exec/target_page.h" #include "helper_regs.h" #include "hw/ppc/ppc.h" #include "hw/ppc/spapr.h" diff --git a/hw/riscv/riscv-iommu-pci.c b/hw/riscv/riscv-iommu-pci.c index 12451869e4..a795464803 100644 --- a/hw/riscv/riscv-iommu-pci.c +++ b/hw/riscv/riscv-iommu-pci.c @@ -17,6 +17,7 @@ */ #include "qemu/osdep.h" +#include "exec/target_page.h" #include "hw/pci/msi.h" #include "hw/pci/msix.h" #include "hw/pci/pci_bus.h" diff --git a/hw/riscv/riscv-iommu.c b/hw/riscv/riscv-iommu.c index 76e0fcd873..65411b3e4c 100644 --- a/hw/riscv/riscv-iommu.c +++ b/hw/riscv/riscv-iommu.c @@ -18,6 +18,7 @@ #include "qemu/osdep.h" #include "qom/object.h" +#include "exec/target_page.h" #include "hw/pci/pci_bus.h" #include "hw/pci/pci_device.h" #include "hw/qdev-properties.h" diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c index 2591ee49c1..4365f8ed1e 100644 --- a/hw/s390x/s390-pci-bus.c +++ b/hw/s390x/s390-pci-bus.c @@ -14,6 +14,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qapi/visitor.h" +#include "exec/target_page.h" #include "hw/s390x/s390-pci-bus.h" #include "hw/s390x/s390-pci-inst.h" #include "hw/s390x/s390-pci-kvm.h" diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index b4e003c19c..b5dddb22b8 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "exec/memop.h" +#include "exec/target_page.h" #include "system/memory.h" #include "qemu/error-report.h" #include "system/hw_accel.h" diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 0bb90fed04..d437fe070d 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" +#include "exec/target_page.h" #include "hw/s390x/s390-virtio-ccw.h" #include "hw/qdev-properties.h" #include "hw/s390x/storage-keys.h" diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c index 5aaafb40da..edbf19d958 100644 --- a/hw/sparc/sun4m.c +++ b/hw/sparc/sun4m.c @@ -27,6 +27,7 @@ #include "qapi/error.h" #include "qemu/datadir.h" #include "cpu.h" +#include "exec/target_page.h" #include "hw/sysbus.h" #include "qemu/error-report.h" #include "qemu/timer.h" diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index d3cb7270ff..becdf3ea98 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -28,6 +28,7 @@ #include "qapi/error.h" #include "qemu/datadir.h" #include "cpu.h" +#include "exec/target_page.h" #include "hw/irq.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bridge.h" diff --git a/monitor/hmp-cmds-target.c b/monitor/hmp-cmds-target.c index 011a367357..8eaf70d9c9 100644 --- a/monitor/hmp-cmds-target.c +++ b/monitor/hmp-cmds-target.c @@ -31,6 +31,7 @@ #include "qapi/error.h" #include "qobject/qdict.h" #include "system/hw_accel.h" +#include "exec/target_page.h" /* Set the current CPU defined by the user. Callers must hold BQL. */ int monitor_set_cpu(Monitor *mon, int cpu_index) diff --git a/semihosting/uaccess.c b/semihosting/uaccess.c index ccb0c96070..f51a253626 100644 --- a/semihosting/uaccess.c +++ b/semihosting/uaccess.c @@ -11,6 +11,7 @@ #include "exec/cpu-all.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/exec-all.h" +#include "exec/target_page.h" #include "exec/tlb-flags.h" #include "semihosting/uaccess.h" diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 56c96b1c4d..99d839a279 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -25,6 +25,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/translation-block.h" +#include "exec/target_page.h" #include "fpu/softfloat.h" diff --git a/target/alpha/helper.c b/target/alpha/helper.c index f6261a3a53..096eac3445 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "exec/cputlb.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "fpu/softfloat-types.h" #include "exec/helper-proto.h" #include "qemu/qemu-print.h" diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 2156c02214..7f3195a5dc 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -27,6 +27,7 @@ #include "exec/helper-gen.h" #include "exec/translator.h" #include "exec/translation-block.h" +#include "exec/target_page.h" #include "exec/log.h" #define HELPER_H "helper.h" diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 21e8cf1400..c9e043bc9b 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -34,6 +34,7 @@ #include "internals.h" #include "cpu-features.h" #include "exec/exec-all.h" +#include "exec/target_page.h" #include "hw/qdev-properties.h" #if !defined(CONFIG_USER_ONLY) #include "hw/loader.h" diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index be38016fc7..64ee9b3b56 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -29,6 +29,7 @@ #endif #ifdef CONFIG_TCG #include "accel/tcg/cpu-mmu-index.h" +#include "exec/target_page.h" #endif int aarch64_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 8d4e9e07a9..e0e82ae507 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -12,6 +12,7 @@ #include "qemu/main-loop.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/tlb-flags.h" #include "cpu.h" #include "internals.h" diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c index fa79d19425..507dbc1a44 100644 --- a/target/arm/tcg/helper-a64.c +++ b/target/arm/tcg/helper-a64.c @@ -31,6 +31,7 @@ #include "exec/cpu-common.h" #include "exec/exec-all.h" #include "exec/cpu_ldst.h" +#include "exec/target_page.h" #include "exec/tlb-flags.h" #include "qemu/int128.h" #include "qemu/atomic128.h" diff --git a/target/arm/tcg/op_helper.c b/target/arm/tcg/op_helper.c index 30786fd1ff..71ba406782 100644 --- a/target/arm/tcg/op_helper.c +++ b/target/arm/tcg/op_helper.c @@ -20,6 +20,7 @@ #include "qemu/main-loop.h" #include "cpu.h" #include "exec/helper-proto.h" +#include "exec/target_page.h" #include "internals.h" #include "cpu-features.h" #include "exec/exec-all.h" diff --git a/target/arm/tcg/sve_helper.c b/target/arm/tcg/sve_helper.c index e3bed77b48..9b0d40c9e1 100644 --- a/target/arm/tcg/sve_helper.c +++ b/target/arm/tcg/sve_helper.c @@ -23,6 +23,7 @@ #include "exec/exec-all.h" #include "exec/page-protection.h" #include "exec/helper-proto.h" +#include "exec/target_page.h" #include "exec/tlb-flags.h" #include "tcg/tcg-gvec-desc.h" #include "fpu/softfloat.h" diff --git a/target/arm/tcg/tlb-insns.c b/target/arm/tcg/tlb-insns.c index 630a481f0f..0407ad5542 100644 --- a/target/arm/tcg/tlb-insns.c +++ b/target/arm/tcg/tlb-insns.c @@ -8,6 +8,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "exec/cputlb.h" +#include "exec/target_page.h" #include "cpu.h" #include "internals.h" #include "cpu-features.h" diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 39014325df..43408c71bb 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -17,8 +17,8 @@ * License along with this library; if not, see . */ #include "qemu/osdep.h" - #include "exec/exec-all.h" +#include "exec/target_page.h" #include "translate.h" #include "translate-a64.h" #include "qemu/log.h" diff --git a/target/arm/tcg/translate.c b/target/arm/tcg/translate.c index d280018138..273b860d57 100644 --- a/target/arm/tcg/translate.c +++ b/target/arm/tcg/translate.c @@ -27,6 +27,7 @@ #include "semihosting/semihost.h" #include "cpregs.h" #include "exec/helper-proto.h" +#include "exec/target_page.h" #define HELPER_H "helper.h" #include "exec/helper-info.c.inc" diff --git a/target/avr/helper.c b/target/avr/helper.c index f23fa3e8ba..32cbf17919 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -26,6 +26,7 @@ #include "accel/tcg/getpc.h" #include "exec/cputlb.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/cpu_ldst.h" #include "exec/helper-proto.h" diff --git a/target/avr/translate.c b/target/avr/translate.c index 0490936cd5..b9c592c899 100644 --- a/target/avr/translate.c +++ b/target/avr/translate.c @@ -29,6 +29,7 @@ #include "exec/helper-gen.h" #include "exec/log.h" #include "exec/translator.h" +#include "exec/target_page.h" #define HELPER_H "helper.h" #include "exec/helper-info.c.inc" diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 09a6aaa3dd..51bff0c5d6 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -26,6 +26,7 @@ #include "qemu/module.h" #include "exec/exec-all.h" #include "exec/translation-block.h" +#include "exec/target_page.h" #include "fpu/softfloat.h" #include "tcg/tcg.h" #include "hw/hppa/hppa_hardware.h" diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index a1ade9079e..554d7bf4d1 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -24,6 +24,7 @@ #include "exec/cputlb.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/helper-proto.h" #include "hw/core/cpu.h" #include "trace.h" diff --git a/target/hppa/translate.c b/target/hppa/translate.c index 0d0d1bc99b..14f3833322 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -28,6 +28,7 @@ #include "exec/helper-gen.h" #include "exec/translator.h" #include "exec/translation-block.h" +#include "exec/target_page.h" #include "exec/log.h" #define HELPER_H "helper.h" diff --git a/target/i386/helper.c b/target/i386/helper.c index 64d9e8ab9c..197fdac7dd 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "exec/cputlb.h" #include "exec/translation-block.h" +#include "exec/target_page.h" #include "system/runstate.h" #ifndef CONFIG_USER_ONLY #include "system/hw_accel.h" diff --git a/target/i386/kvm/hyperv.c b/target/i386/kvm/hyperv.c index 70b89cacf9..9865120cc4 100644 --- a/target/i386/kvm/hyperv.c +++ b/target/i386/kvm/hyperv.c @@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" +#include "exec/target_page.h" #include "hyperv.h" #include "hw/hyperv/hyperv.h" #include "hyperv-proto.h" diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 6c749d4ee8..c9a3c02e3e 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -67,6 +67,7 @@ #include "hw/pci/msix.h" #include "migration/blocker.h" #include "exec/memattrs.h" +#include "exec/target_page.h" #include "trace.h" #include CONFIG_DEVICES diff --git a/target/i386/kvm/xen-emu.c b/target/i386/kvm/xen-emu.c index b23010374f..284c5ef6f6 100644 --- a/target/i386/kvm/xen-emu.c +++ b/target/i386/kvm/xen-emu.c @@ -13,6 +13,7 @@ #include "qemu/log.h" #include "qemu/main-loop.h" #include "qemu/error-report.h" +#include "exec/target_page.h" #include "hw/xen/xen.h" #include "system/kvm_int.h" #include "system/kvm_xen.h" diff --git a/target/i386/sev.c b/target/i386/sev.c index ba88976e9f..878dd20f2c 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -26,6 +26,7 @@ #include "qemu/uuid.h" #include "qemu/error-report.h" #include "crypto/hash.h" +#include "exec/target_page.h" #include "system/kvm.h" #include "kvm/kvm_i386.h" #include "sev.h" diff --git a/target/i386/tcg/access.c b/target/i386/tcg/access.c index e68b73a24b..5a4721dcee 100644 --- a/target/i386/tcg/access.c +++ b/target/i386/tcg/access.c @@ -5,6 +5,7 @@ #include "cpu.h" #include "exec/cpu_ldst.h" #include "exec/exec-all.h" +#include "exec/target_page.h" #include "access.h" diff --git a/target/i386/tcg/mpx_helper.c b/target/i386/tcg/mpx_helper.c index 22423eedcd..b942665adc 100644 --- a/target/i386/tcg/mpx_helper.c +++ b/target/i386/tcg/mpx_helper.c @@ -22,6 +22,7 @@ #include "exec/helper-proto.h" #include "exec/cpu_ldst.h" #include "exec/exec-all.h" +#include "exec/target_page.h" #include "helper-tcg.h" diff --git a/target/i386/tcg/system/excp_helper.c b/target/i386/tcg/system/excp_helper.c index 4badd73943..a563c9b35e 100644 --- a/target/i386/tcg/system/excp_helper.c +++ b/target/i386/tcg/system/excp_helper.c @@ -22,6 +22,7 @@ #include "exec/cpu_ldst.h" #include "exec/cputlb.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/tlb-flags.h" #include "exec/tswap.h" #include "tcg/helper-tcg.h" diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 818653ee6d..35b17f2b18 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -23,7 +23,7 @@ #include "qemu/accel.h" #include "accel/accel-cpu-target.h" #include "exec/translation-block.h" - +#include "exec/target_page.h" #include "tcg-cpu.h" /* Frob eflags into and out of the CPU temporary format. */ diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 6418d4bb03..1dcc35f5df 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -26,6 +26,7 @@ #include "tcg/tcg-op.h" #include "tcg/tcg-op-gvec.h" #include "exec/translator.h" +#include "exec/target_page.h" #include "fpu/softfloat.h" #include "exec/helper-proto.h" diff --git a/target/loongarch/cpu_helper.c b/target/loongarch/cpu_helper.c index f8965cd155..bb343078bf 100644 --- a/target/loongarch/cpu_helper.c +++ b/target/loongarch/cpu_helper.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "accel/tcg/cpu-mmu-index.h" +#include "exec/target_page.h" #include "internals.h" #include "cpu-csr.h" diff --git a/target/loongarch/tcg/tlb_helper.c b/target/loongarch/tcg/tlb_helper.c index 70d1b5cf99..0d6c9844a6 100644 --- a/target/loongarch/tcg/tlb_helper.c +++ b/target/loongarch/tcg/tlb_helper.c @@ -15,6 +15,7 @@ #include "exec/cputlb.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/cpu_ldst.h" #include "exec/log.h" #include "cpu-csr.h" diff --git a/target/loongarch/tcg/translate.c b/target/loongarch/tcg/translate.c index e59e4ed25b..53a0b4c3ce 100644 --- a/target/loongarch/tcg/translate.c +++ b/target/loongarch/tcg/translate.c @@ -11,6 +11,7 @@ #include "tcg/tcg-op-gvec.h" #include "exec/translation-block.h" #include "exec/translator.h" +#include "exec/target_page.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h" #include "exec/log.h" diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 8251272219..f73e0def23 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -23,6 +23,7 @@ #include "exec/cputlb.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/gdbstub.h" #include "exec/helper-proto.h" #include "system/memory.h" diff --git a/target/m68k/translate.c b/target/m68k/translate.c index dec2967fce..b1266a7875 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/translation-block.h" +#include "exec/target_page.h" #include "tcg/tcg-op.h" #include "qemu/log.h" #include "qemu/qemu-print.h" diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index 022c98f0c3..9203192483 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c @@ -23,6 +23,7 @@ #include "exec/cputlb.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "qemu/host-utils.h" #include "exec/log.h" diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c index 2d18659b99..95a12e16f8 100644 --- a/target/microblaze/mmu.c +++ b/target/microblaze/mmu.c @@ -24,6 +24,7 @@ #include "exec/cputlb.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" +#include "exec/target_page.h" static unsigned int tlb_decode_size(unsigned int f) { diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index b54e5ac4b2..4bb867c969 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -27,6 +27,7 @@ #include "exec/helper-gen.h" #include "exec/translator.h" #include "exec/translation-block.h" +#include "exec/target_page.h" #include "qemu/qemu-print.h" #include "exec/log.h" diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index 74fb80cc25..969dd34b3e 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -25,6 +25,7 @@ #include "exec/cpu_ldst.h" #include "exec/helper-proto.h" #include "exec/memop.h" +#include "exec/target_page.h" #include "fpu/softfloat.h" #include "fpu_helper.h" diff --git a/target/mips/tcg/system/cp0_helper.c b/target/mips/tcg/system/cp0_helper.c index 78e422b0ca..101b1e65fd 100644 --- a/target/mips/tcg/system/cp0_helper.c +++ b/target/mips/tcg/system/cp0_helper.c @@ -28,6 +28,7 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "exec/cputlb.h" +#include "exec/target_page.h" /* SMP helpers. */ diff --git a/target/mips/tcg/system/tlb_helper.c b/target/mips/tcg/system/tlb_helper.c index df80301a41..d239fa9353 100644 --- a/target/mips/tcg/system/tlb_helper.c +++ b/target/mips/tcg/system/tlb_helper.c @@ -24,6 +24,7 @@ #include "exec/cputlb.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/cpu_ldst.h" #include "exec/log.h" #include "exec/helper-proto.h" diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 78b848a6d9..8658315f93 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -27,6 +27,7 @@ #include "internal.h" #include "exec/helper-proto.h" #include "exec/translation-block.h" +#include "exec/target_page.h" #include "semihosting/semihost.h" #include "trace.h" #include "fpu_helper.h" diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c index 47ac783c52..acea50c41e 100644 --- a/target/openrisc/mmu.c +++ b/target/openrisc/mmu.c @@ -23,6 +23,7 @@ #include "cpu.h" #include "exec/cputlb.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "gdbstub/helpers.h" #include "qemu/host-utils.h" #include "hw/loader.h" diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index 21bc137ccc..92badf017f 100644 --- a/target/openrisc/sys_helper.c +++ b/target/openrisc/sys_helper.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/cputlb.h" +#include "exec/target_page.h" #include "exec/helper-proto.h" #include "exception.h" #ifndef CONFIG_USER_ONLY diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index da033bffff..d4ce60188b 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -28,7 +28,7 @@ #include "qemu/qemu-print.h" #include "exec/translator.h" #include "exec/translation-block.h" - +#include "exec/target_page.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h" diff --git a/target/ppc/mem_helper.c b/target/ppc/mem_helper.c index 51b137febd..0967624afe 100644 --- a/target/ppc/mem_helper.c +++ b/target/ppc/mem_helper.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/exec-all.h" +#include "exec/target_page.h" #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "helper_regs.h" diff --git a/target/ppc/mmu-hash32.c b/target/ppc/mmu-hash32.c index 1f791a7f2f..5bd3efe70e 100644 --- a/target/ppc/mmu-hash32.c +++ b/target/ppc/mmu-hash32.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "system/kvm.h" #include "kvm_ppc.h" #include "internal.h" diff --git a/target/ppc/mmu_common.c b/target/ppc/mmu_common.c index fb62b947f1..394a0c9bb6 100644 --- a/target/ppc/mmu_common.c +++ b/target/ppc/mmu_common.c @@ -26,6 +26,7 @@ #include "mmu-hash32.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/log.h" #include "helper_regs.h" #include "qemu/error-report.h" diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c index ad9ba8294c..c90ceb7d60 100644 --- a/target/ppc/mmu_helper.c +++ b/target/ppc/mmu_helper.c @@ -27,6 +27,7 @@ #include "exec/cputlb.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/log.h" #include "helper_regs.h" #include "qemu/error-report.h" diff --git a/target/ppc/translate.c b/target/ppc/translate.c index a52cbc869a..399107d319 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "internal.h" #include "exec/exec-all.h" +#include "exec/target_page.h" #include "tcg/tcg-op.h" #include "tcg/tcg-op-gvec.h" #include "qemu/host-utils.h" diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index ca58094fb5..619c76cc00 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -26,6 +26,7 @@ #include "exec/cputlb.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "system/memory.h" #include "instmap.h" #include "tcg/tcg-op.h" diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index b0841d44f4..c13a117e3f 100644 --- a/target/riscv/pmp.c +++ b/target/riscv/pmp.c @@ -26,6 +26,7 @@ #include "trace.h" #include "exec/cputlb.h" #include "exec/page-protection.h" +#include "exec/target_page.h" static bool pmp_write_cfg(CPURISCVState *env, uint32_t addr_index, uint8_t val); diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index bee7dfd803..710449d17e 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -22,6 +22,7 @@ #include "exec/translation-block.h" #include "tcg-cpu.h" #include "cpu.h" +#include "exec/target_page.h" #include "internals.h" #include "pmu.h" #include "time_helper.h" diff --git a/target/riscv/translate.c b/target/riscv/translate.c index d6651f244f..cef61b5b29 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -23,7 +23,7 @@ #include "exec/exec-all.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h" - +#include "exec/target_page.h" #include "exec/translator.h" #include "exec/translation-block.h" #include "exec/log.h" diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index 7fffa23bc8..7de6cbae5c 100644 --- a/target/riscv/vector_helper.c +++ b/target/riscv/vector_helper.c @@ -26,6 +26,7 @@ #include "exec/page-protection.h" #include "exec/helper-proto.h" #include "exec/tlb-flags.h" +#include "exec/target_page.h" #include "exec/tswap.h" #include "fpu/softfloat.h" #include "tcg/tcg-gvec-desc.h" diff --git a/target/rx/cpu.c b/target/rx/cpu.c index 51743020d4..e14d9cbef9 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -24,6 +24,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/translation-block.h" +#include "exec/target_page.h" #include "hw/loader.h" #include "fpu/softfloat.h" #include "tcg/debug-assert.h" diff --git a/target/s390x/helper.c b/target/s390x/helper.c index e660c69f60..3c57c32e47 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -27,6 +27,7 @@ #include "target/s390x/kvm/pv.h" #include "system/hw_accel.h" #include "system/runstate.h" +#include "exec/target_page.h" #include "exec/watchpoint.h" void s390x_tod_timer(void *opaque) diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c index a944f16c25..fe62ba5b06 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -12,6 +12,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/target_page.h" #include "s390x-internal.h" #include "hw/s390x/ioinst.h" #include "trace.h" diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index b079d120db..0e133cb9a5 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -25,6 +25,7 @@ #include "system/tcg.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "hw/hw.h" #include "hw/s390x/storage-keys.h" #include "hw/boards.h" diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index 1d51043e88..6cd813e1ab 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -24,6 +24,7 @@ #include "exec/helper-proto.h" #include "exec/cputlb.h" #include "exec/exec-all.h" +#include "exec/target_page.h" #include "exec/watchpoint.h" #include "s390x-internal.h" #include "tcg_s390x.h" diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 0ff2e10d81..d5eece4384 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -29,6 +29,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/cpu_ldst.h" +#include "exec/target_page.h" #include "exec/tlb-flags.h" #include "accel/tcg/cpu-ops.h" #include "qemu/int128.h" diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c index 31266aeda4..e02f443850 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -29,6 +29,7 @@ #include "exec/exec-all.h" #include "exec/cputlb.h" #include "exec/cpu_ldst.h" +#include "exec/target_page.h" #include "qapi/error.h" #include "tcg_s390x.h" #include "s390-tod.h" diff --git a/target/sh4/helper.c b/target/sh4/helper.c index 7567e6c8b6..b41d14d5d7 100644 --- a/target/sh4/helper.c +++ b/target/sh4/helper.c @@ -23,6 +23,7 @@ #include "exec/cputlb.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/log.h" #if !defined(CONFIG_USER_ONLY) diff --git a/target/sh4/translate.c b/target/sh4/translate.c index bcdd558818..5ce477d0ad 100644 --- a/target/sh4/translate.c +++ b/target/sh4/translate.c @@ -25,6 +25,7 @@ #include "exec/helper-gen.h" #include "exec/translation-block.h" #include "exec/translator.h" +#include "exec/target_page.h" #include "exec/log.h" #include "qemu/qemu-print.h" diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 8890d2b119..3fa5e78816 100644 --- a/target/sparc/ldst_helper.c +++ b/target/sparc/ldst_helper.c @@ -26,6 +26,7 @@ #include "exec/exec-all.h" #include "exec/cputlb.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/cpu_ldst.h" #include "system/memory.h" #ifdef CONFIG_USER_ONLY diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c index c5d82a0854..217580a4d8 100644 --- a/target/sparc/mmu_helper.c +++ b/target/sparc/mmu_helper.c @@ -23,6 +23,7 @@ #include "exec/cputlb.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "exec/tlb-flags.h" #include "system/memory.h" #include "qemu/qemu-print.h" diff --git a/target/sparc/translate.c b/target/sparc/translate.c index bfe63649db..adebddf27b 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -23,6 +23,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" +#include "exec/target_page.h" #include "tcg/tcg-op.h" #include "tcg/tcg-op-gvec.h" #include "exec/helper-gen.h" diff --git a/target/tricore/helper.c b/target/tricore/helper.c index b1ee126112..e4c53d453d 100644 --- a/target/tricore/helper.c +++ b/target/tricore/helper.c @@ -22,6 +22,7 @@ #include "exec/cputlb.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "fpu/softfloat-helpers.h" #include "qemu/qemu-print.h" diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 6819b77668..5c7ed395ca 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -31,6 +31,7 @@ #include "tricore-opcodes.h" #include "exec/translator.h" #include "exec/translation-block.h" +#include "exec/target_page.h" #include "exec/log.h" #define HELPER_H "helper.h" diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c index 4824b97e37..d02d16f9ec 100644 --- a/target/xtensa/helper.c +++ b/target/xtensa/helper.c @@ -29,6 +29,7 @@ #include "qemu/log.h" #include "cpu.h" #include "exec/cputlb.h" +#include "exec/target_page.h" #include "gdbstub/helpers.h" #include "exec/helper-proto.h" #include "qemu/error-report.h" diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c index 1ce125794d..a7dd810055 100644 --- a/target/xtensa/mmu_helper.c +++ b/target/xtensa/mmu_helper.c @@ -36,6 +36,7 @@ #include "accel/tcg/cpu-mmu-index.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/target_page.h" #include "system/memory.h" #define XTENSA_MPU_SEGMENT_MASK 0x0000001f diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index cb817b3119..5ebd4a512c 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -37,6 +37,7 @@ #include "qemu/qemu-print.h" #include "exec/translator.h" #include "exec/translation-block.h" +#include "exec/target_page.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h" #include "exec/log.h" diff --git a/target/xtensa/xtensa-semi.c b/target/xtensa/xtensa-semi.c index 2ded8e5634..636f421da2 100644 --- a/target/xtensa/xtensa-semi.c +++ b/target/xtensa/xtensa-semi.c @@ -29,6 +29,7 @@ #include "cpu.h" #include "chardev/char-fe.h" #include "exec/helper-proto.h" +#include "exec/target_page.h" #include "semihosting/semihost.h" #include "semihosting/uaccess.h" #include "qapi/error.h" From patchwork Thu Apr 24 00:48:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883903 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3208366wrs; Wed, 23 Apr 2025 18:25:59 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUq94gn7vTYR1/x0GE4V/BYBJ7XxeONOaOY2mbZzkAyaDy6HmdCNaUlDxezg/BLm64U5+/MwQ==@linaro.org X-Google-Smtp-Source: AGHT+IFeNYaK514ZFOPmSfhl52sXZb/EGELTjwAFw0pZ5ADN/qqwTiUwR3cYc49k3YAhb57P/xQP X-Received: by 2002:a05:6214:5185:b0:6e4:4484:f354 with SMTP id 6a1803df08f44-6f4bfc88889mr16932566d6.38.1745457959288; Wed, 23 Apr 2025 18:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457959; cv=none; d=google.com; s=arc-20240605; b=ZKDHGhjt7KC3zmD0m50VqhqDcRQG/7smoq395OldhO2kUlWFh9fDDM4/GLoQdxhuK8 PHgmrDIaVY4KzzCuUz6U4Fzfa7Fpb0YTFeVcoTYFImyVz9YgfzxoJIuLF2LIZxZf/ZJY FDSGP3x8378xJ+hphHzIXnJKsSH4T+opsY2ytfresc0ixza8D6CgBHEMAS9Wqb9IKya6 Ibvo3fR/h+Oti+QwBehoolp1Xa9MklQbj2hznICMN+0zR6JGTHtS8UH7JChtKuEZ0U1q n9RM4wp5X1PDZVpAnwgFzLYeHugsQIdJNRIJXgWfNN54vrHCzn8ZaM9laxGaQ+lui8Ab Mt3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pt+LZtoU87+6j1M/e/OdowMEVlWGi1rJeK+HxXV2Kqg=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=GbIyIy6NKeeURPr1LMIyUvD/JicjJAiKqhrWQpnq9NGKq7NTO/hWnAmnPCHAsIoxm/ MyiErlw4ckLw6X/TaC5hB/Y/BRYtzffmQh9ztX/jexPl6RsnP2/VulCMIzyhG4gQuref adZDOdAALH6aRH4/edOyHM3fXDbEfbQSjE7SU/aD0tyb1ajB70bGphXRNeANUfiN2EVS afEHZJ2zHKsI4piYq60FSh/3lBp9WdD4XenfYguWZf+WxicR+ywebV8iKUadqOHSo0iY cIC/7F1iD1OWVvtY2oE5huifMhXRss8Z6SG478HNe79NYO4I7p4NFQom3a9AZVmC7wxM p+pg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ktgCGyQu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c08d2885si4170916d6.33.2025.04.23.18.25.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:25:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ktgCGyQu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kwZ-0004HX-PK; Wed, 23 Apr 2025 20:59: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 1u7ktk-00067M-4F for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:05 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0: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 1u7ktf-00058j-CD for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:01 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-7390d21bb1cso354500b3a.2 for ; Wed, 23 Apr 2025 17:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456215; x=1746061015; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pt+LZtoU87+6j1M/e/OdowMEVlWGi1rJeK+HxXV2Kqg=; b=ktgCGyQumR6vm0AxNGWcQ22kzh7DiXHnnxw9a/dfNwIscxenOJhp9dfMwNKSwZkFFv Y39Z4siBcSwIbRrNQ+ra0DrcCLliaMbxQXHUb2hrdD2x5oGvao2sj1PBmxLXfdvEmmTi xJ9ey5XmnlDZlw3XF3BT0Hu8H9Yc6iBZWDwXiKWFJgLOTqQedbGvJ1VEBmcD5OnY7gN+ 7bOG/kQKiASudXolV+2xBlfkFC83g0ndY535bkqRlZzIiYEBmGfK/JOfGRn6NzE0VA11 4H+CpnhJ26Mc7OhOwFpCJwKuZYj8BW3sq3LjBCS+U+oxKxm7dbGdbwDxGzJdXIzlGT/T fdHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456215; x=1746061015; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pt+LZtoU87+6j1M/e/OdowMEVlWGi1rJeK+HxXV2Kqg=; b=b+JTiZ2XgynhH63E+TNR6IjTOZD+U4dcUWBpOqHqNcylWXJTryQPKXL5OSrhXUWM25 u6F03bnSx46t8UwlYq/z1nGRsi+AehBaWv4ED3p78nt546FEMEKszntaphGUBlMctvee HRVP6ZykP09pwIlJFGn2FqYE/vAPDMALYJP37OgePH3rrGVS+fCkkUXezE+fVlV1n44o QpDzhVkeua4NleTr9HX6h7aRbZnbDJqd+M0d1nGxcM6prXwtB5pnd5bCELpNS9g6VDGh dny3ApBAVcKtYgKAqZJQ+qOcRIG1DwxGSiakvo6StCXRQPZc7R7qTbb4Ag7B0tak6XO/ gp6g== X-Gm-Message-State: AOJu0Ywded0PVL1ieqcsSW6/O1MKIWQVAeEHSDWS9nOMP+9jb4cYCJpe AriH88+nrjfHQRupJ3js/xdV9IaB+F2QWUdPa41ko0vtb2j51C6UkOWLZGzoYfebjZwOVPPb2J0 v X-Gm-Gg: ASbGncva7W0eVB2fK2oD1h8xQNS98a+ND52H2NsNjMUnWVhEg/Zp3eeE9n8Llt44Awd lyjwBpOnRcwfWTOtKb/UV1turI8HD+0JVi/3WpadY0dOtqnbjutGSYZ4TSdjXnQVOQOrjYcMH3S vWcgvoxoZS5NICcJAVW4sOpdit/ZyBejhrji/D9pH5UIe3tvitwquaYYe/cBHF4mf7mItgVsjoJ w9lP4AgrucWUW6vb0+4UA6QORpt5yMQmflEzY4ilQ98IDVfAUanrJnpCoPq9N4vxZE4ku4qp7Nf RbguRGy8R6Xy0CwHFHtOU8mZZEoeSop6qPZRkmcgVWUKQ+1UAn3FfuhCbgJzhEHqsWCL20lUZx3 reXcmtCfxFA== X-Received: by 2002:a05:6a20:d493:b0:1f5:87ea:2a10 with SMTP id adf61e73a8af0-20444e7008bmr789020637.9.1745456215547; Wed, 23 Apr 2025 17:56:55 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 111/148] exec/cpu-all: transfer exec/cpu-common include to cpu.h headers Date: Wed, 23 Apr 2025 17:48:56 -0700 Message-ID: <20250424004934.598783-112-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::434; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-15-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 1 - include/exec/cpu_ldst.h | 1 + target/alpha/cpu.h | 1 + target/arm/cpu.h | 1 + target/avr/cpu.h | 1 + target/hexagon/cpu.h | 1 + target/hppa/cpu.h | 1 + target/i386/cpu.h | 1 + target/loongarch/cpu.h | 1 + target/m68k/cpu.h | 1 + target/microblaze/cpu.h | 1 + target/mips/cpu.h | 1 + target/openrisc/cpu.h | 1 + target/ppc/cpu.h | 1 + target/riscv/cpu.h | 1 + target/rx/cpu.h | 1 + target/s390x/cpu.h | 1 + target/sh4/cpu.h | 1 + target/sparc/cpu.h | 1 + target/tricore/cpu.h | 1 + target/xtensa/cpu.h | 1 + cpu-target.c | 1 + 22 files changed, 21 insertions(+), 1 deletion(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index e7c8b8672f..5122fdbee3 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -19,7 +19,6 @@ #ifndef CPU_ALL_H #define CPU_ALL_H -#include "exec/cpu-common.h" #include "hw/core/cpu.h" #include "exec/cpu-defs.h" diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 77dc5ac61c..63847f6e61 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -66,6 +66,7 @@ #error Can only include this header with TCG #endif +#include "exec/cpu-common.h" #include "exec/cpu-ldst-common.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/abi_ptr.h" diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index 42788a6a0b..fb1d63527e 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -21,6 +21,7 @@ #define ALPHA_CPU_H #include "cpu-qom.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 958a921490..ee92476814 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -24,6 +24,7 @@ #include "qemu/cpu-float.h" #include "hw/registerfields.h" #include "cpu-qom.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "exec/gdbstub.h" diff --git a/target/avr/cpu.h b/target/avr/cpu.h index c2cc2daa66..a0fb40141a 100644 --- a/target/avr/cpu.h +++ b/target/avr/cpu.h @@ -22,6 +22,7 @@ #define QEMU_AVR_CPU_H #include "cpu-qom.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "system/memory.h" diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index f78c8f9c2a..e4fc35b112 100644 --- a/target/hexagon/cpu.h +++ b/target/hexagon/cpu.h @@ -21,6 +21,7 @@ #include "fpu/softfloat-types.h" #include "cpu-qom.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "hex_regs.h" #include "mmvec/mmvec.h" diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index dab58c227f..4e72ab025b 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -21,6 +21,7 @@ #define HPPA_CPU_H #include "cpu-qom.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "system/memory.h" diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 778dfd9637..02ea87347a 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -23,6 +23,7 @@ #include "system/tcg.h" #include "cpu-qom.h" #include "kvm/hyperv-proto.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "exec/memop.h" diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index a924aa01d7..69117c602a 100644 --- a/target/loongarch/cpu.h +++ b/target/loongarch/cpu.h @@ -9,6 +9,7 @@ #define LOONGARCH_CPU_H #include "qemu/int128.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "fpu/softfloat-types.h" diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 451644a05a..5347fbe397 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -21,6 +21,7 @@ #ifndef M68K_CPU_H #define M68K_CPU_H +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index d29681abed..90d820b90c 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -21,6 +21,7 @@ #define MICROBLAZE_CPU_H #include "cpu-qom.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "qemu/cpu-float.h" #include "exec/cpu-interrupt.h" diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 29362498ec..79f8041ced 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -2,6 +2,7 @@ #define MIPS_CPU_H #include "cpu-qom.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #ifndef CONFIG_USER_ONLY diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index c153823b62..f16a070ef6 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -21,6 +21,7 @@ #define OPENRISC_CPU_H #include "cpu-qom.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "fpu/softfloat-types.h" diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 7489ba9564..aa5df47bda 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -22,6 +22,7 @@ #include "qemu/int128.h" #include "qemu/cpu-float.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "cpu-qom.h" diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 556eda57e9..14a6779b4c 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -23,6 +23,7 @@ #include "hw/core/cpu.h" #include "hw/registerfields.h" #include "hw/qdev-properties.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "exec/gdbstub.h" diff --git a/target/rx/cpu.h b/target/rx/cpu.h index 5f2fcb6656..e2ec78835e 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -23,6 +23,7 @@ #include "hw/registerfields.h" #include "cpu-qom.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 0a32ad4c61..83d01d5c4e 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -27,6 +27,7 @@ #include "cpu-qom.h" #include "cpu_models.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 18557d8c38..7581f5eecb 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -21,6 +21,7 @@ #define SH4_CPU_H #include "cpu-qom.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index c0aab69b61..b87351a666 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -3,6 +3,7 @@ #include "qemu/bswap.h" #include "cpu-qom.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "qemu/cpu-float.h" diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index cf9dbc6df8..abb9cba136 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -22,6 +22,7 @@ #include "cpu-qom.h" #include "hw/registerfields.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "qemu/cpu-float.h" #include "tricore-defs.h" diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index 6684631478..c5d2042de1 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -30,6 +30,7 @@ #include "cpu-qom.h" #include "qemu/cpu-float.h" +#include "exec/cpu-common.h" #include "exec/cpu-defs.h" #include "exec/cpu-interrupt.h" #include "hw/clock.h" diff --git a/cpu-target.c b/cpu-target.c index 7f3b244ed1..14cd623bff 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -24,6 +24,7 @@ #include "qemu/qemu-print.h" #include "system/accel-ops.h" #include "system/cpus.h" +#include "exec/cpu-common.h" #include "exec/tswap.h" #include "exec/replay-core.h" #include "exec/log.h" From patchwork Thu Apr 24 00:48:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883901 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3208183wrs; Wed, 23 Apr 2025 18:25:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU1wgKx2oE6S+dxxaocT3JLx1DGQByN0O/EFE/44MwBFLRZsrFVnZ55GyUMSrezORpBgC1Nlw==@linaro.org X-Google-Smtp-Source: AGHT+IHwwvg8qqeLKArW+CpzX2wslciq3waXgCfelgD1dEvXZJQslkahnZnCj5yCwGCCWY9NbuXb X-Received: by 2002:a05:620a:191b:b0:7c5:46e4:47f5 with SMTP id af79cd13be357-7c956eb83cdmr144535585a.20.1745457919137; Wed, 23 Apr 2025 18:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457919; cv=none; d=google.com; s=arc-20240605; b=IVUJK6VKZi6Nlxt+gDJeQXyYbmjhOuXhHDNdXg6yCe4FyWPwCO9K3lwezCG8YjcSbY rjLA+5l8jJrfNFzW2sUTXbAAobcxM3zsknsxrQqEm3KJWkR3tRCPa+sjj/YaYbQ63vu8 +7tQ2V+kDz2avdM6wS37GULXs6ZZdXR/jx+XcroAKdEbYfIOKlIuW+7pKWoR1I3B8rWx fNVgLdRkYPO2kL6jvLBtw5YMrExUw1vu7Yl18OCZwi7JCxdymHPMgXJnYYTA3/dnFZQS PDuIkeFdhCSppIqeQGf6+mE7K481ulFgQWTpXy1gjK2mVA3/WHkz5fSG0p3AoVQyFKWP vIzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nLKAapNLG9xTM8dZg8UBqNbOJbvM1sJqYp/piKiKees=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=fDTzemnKmNlYu5Bd7pznawfm1necQ2xhykb+qG7tAKqxvF2gQbfve3o4vjMe/yOfZL 1iCqho55JCqsnN/fVUU3hZEQVAZBKCoMqjqfcMwvUiTHcYk6Q3Ix4xQARBljoM4qC7ul lYLgluFCpHbhw5fmaHgmlyidS66aeVKGeDl90QLoBch1FoW0YKZoPWlV95X06DIXGtbE M0RmHDBQvzDW1amFbF3Vx0+zlUZEjnfofWCyOeLJVMxndpZokSerPiAqmXk31ASYNtZS olKjGG/twGrS8YKUkQgQdaqraoG04wmOKkSyRtrNmPfXZHScF+M4wrZz/utu6dsXBINO 0oUQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gliZJugn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ea1053si24690285a.420.2025.04.23.18.25.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:25:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gliZJugn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kwu-00058T-3p; Wed, 23 Apr 2025 21:00:20 -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 1u7ktk-00066z-3J for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:05 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktf-00058q-CC for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:02 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-736b0c68092so333717b3a.0 for ; Wed, 23 Apr 2025 17:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456216; x=1746061016; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nLKAapNLG9xTM8dZg8UBqNbOJbvM1sJqYp/piKiKees=; b=gliZJugnyZFJ7Ru0Xo+ofCaCn6O3hltaHg0I/WdgMq7ZBWG31OQUiDCyYK6VkNFvVt g47wGUy/KDp9rvGCxsCIvgzdtgIT5QaV6pLulE7IpBNzUt8CZm8WHQmhlXCjHT1nH98S dmNmZMyP22Zba7AJcDYgZ4sTEWtgEOsxY7dBgmGm8vFAczuJYTD6ernEco58axL6DCoH /GPSkTcTgfGe86Iqku0C4LhP2wBFdVnb/YjGS3z6eZ6c8XaaQcyP1+ev3lfxBMT9Ldfd ZXVzndehZv6/oqSJG3KaTjo58Ymgy0u5VInFjoQToSFgK1p0ivzQHljZla+DzkVbVKVV G7SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456216; x=1746061016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nLKAapNLG9xTM8dZg8UBqNbOJbvM1sJqYp/piKiKees=; b=xS5gGEf+MHeKXgUqe4GZa5YNO9taczN0b0sWiAnmKbC41K3Eyge6zjLO88GV87PE4x 8CwshlJCg/AtMUx1PCpJX493+daugxPkI4B4QfKacxr6is1nRkgSUmpeJg72EPibMvLD CnBgO6bciG2o2vm6hx47hluPpc8AWSwgbMjijfUzrmx5yB5YSfPWS+4GBDDGg5SLrwJx x855IfMaVKJr4WCwQvKwJ1VZMbDnASgJ7G27h0x9hvZEWuLz7ehWQ1oQthkVLvSKSp/E VZHHSfaLU/t9yiUEbirakS0TaUDRwDzyndvbvPseggWRLqub+QCMyprG0iYqUk7BvKVB Ypuw== X-Gm-Message-State: AOJu0Yw5B8EFYvwtbOyw+s2xF8kTRMI73kgIVauys9ken9NXrPj4K9dL TMSaKU/SccpVs1gBa67KiHnbwIq/yfYPk8QAg0E247x1Rx6K/PgL7KhlOYRr5X6iW0noTOtXksj F X-Gm-Gg: ASbGnct4MnWyza040CybY2+vbrM3PwAlLFGjPw5N0hU/4fOmGbYMlKVNfD8m+CVTZvs WIF9kh9wNtwXSvnPF2EKiow4HmLayOwkYYxrxWTG6ju/vkbUk6hbwJCSdgBMxtewIkRh60JllXE 5uQjTQC8TE0dmrVuPpHSC0dlAdbXAW9lDDRByvSQgSreQ5fQ6eu+YIZI0uOje1USeJGk8QNx/AT UsOosx4NdYZIjZ/qqenAK02iITgRRw5S4WdG85DShNIZ4zRrn84ubYsW+6XOyjyVUQ+uxjq2am8 fsxRemx7r1FO8bEccLP6ORmM3SCeWfFI70LpbAUDUhz7x1EXGd50Wk+j0GlPh3+VxUg00EmRrGx m9jDAoA8xMA== X-Received: by 2002:a05:6a21:32a9:b0:203:c461:dd36 with SMTP id adf61e73a8af0-20444e713c3mr793196637.6.1745456216282; Wed, 23 Apr 2025 17:56:56 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:55 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 112/148] exec/cpu-all: remove this header Date: Wed, 23 Apr 2025 17:48:57 -0700 Message-ID: <20250424004934.598783-113-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-16-pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 25 ------------------------- include/hw/core/cpu.h | 2 +- include/qemu/bswap.h | 3 --- target/alpha/cpu.h | 2 -- target/arm/cpu.h | 2 -- target/avr/cpu.h | 2 -- target/hexagon/cpu.h | 2 -- target/hppa/cpu.h | 2 -- target/i386/cpu.h | 1 - target/loongarch/cpu.h | 2 -- target/m68k/cpu.h | 2 -- target/microblaze/cpu.h | 2 -- target/mips/cpu.h | 2 -- target/openrisc/cpu.h | 2 -- target/ppc/cpu.h | 2 -- target/riscv/cpu.h | 2 -- target/rx/cpu.h | 2 -- target/s390x/cpu.h | 2 -- target/sh4/cpu.h | 2 -- target/sparc/cpu.h | 2 -- target/tricore/cpu.h | 2 -- target/xtensa/cpu.h | 2 -- accel/tcg/cpu-exec.c | 1 - hw/hyperv/hyperv.c | 1 - semihosting/uaccess.c | 1 - tcg/tcg-op-ldst.c | 2 +- 26 files changed, 2 insertions(+), 70 deletions(-) delete mode 100644 include/exec/cpu-all.h diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h deleted file mode 100644 index 5122fdbee3..0000000000 --- a/include/exec/cpu-all.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * defines common to all virtual CPUs - * - * Copyright (c) 2003 Fabrice Bellard - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see . - */ -#ifndef CPU_ALL_H -#define CPU_ALL_H - -#include "hw/core/cpu.h" -#include "exec/cpu-defs.h" - -#endif /* CPU_ALL_H */ diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 28bd27b8ed..10b6b25b34 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -579,7 +579,7 @@ QEMU_BUILD_BUG_ON(offsetof(CPUState, neg) != static inline CPUArchState *cpu_env(CPUState *cpu) { - /* We validate that CPUArchState follows CPUState in cpu-all.h. */ + /* We validate that CPUArchState follows CPUState in cpu-target.c */ return (CPUArchState *)(cpu + 1); } diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index b915835bea..9a11764536 100644 --- a/include/qemu/bswap.h +++ b/include/qemu/bswap.h @@ -205,9 +205,6 @@ CPU_CONVERT(le, 64, uint64_t) * te : target endian * (except for byte accesses, which have no endian infix). * - * The target endian accessors are obviously only available to source - * files which are built per-target; they are defined in cpu-all.h. - * * In all cases these functions take a host pointer. * For accessors that take a guest address rather than a * host address, see the cpu_{ld,st}_* accessors defined in diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index fb1d63527e..849f673489 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -289,8 +289,6 @@ void alpha_cpu_dump_state(CPUState *cs, FILE *f, int flags); int alpha_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int alpha_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); -#include "exec/cpu-all.h" - enum { FEATURE_ASN = 0x00000001, FEATURE_SPS = 0x00000002, diff --git a/target/arm/cpu.h b/target/arm/cpu.h index ee92476814..ea9956395c 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -2968,8 +2968,6 @@ static inline bool arm_sctlr_b(CPUARMState *env) uint64_t arm_sctlr(CPUARMState *env, int el); -#include "exec/cpu-all.h" - /* * We have more than 32-bits worth of state per TB, so we split the data * between tb->flags and tb->cs_base, which is otherwise unused for ARM. diff --git a/target/avr/cpu.h b/target/avr/cpu.h index a0fb40141a..d6666175a9 100644 --- a/target/avr/cpu.h +++ b/target/avr/cpu.h @@ -259,6 +259,4 @@ bool avr_cpu_tlb_fill(CPUState *cs, vaddr address, int size, extern const MemoryRegionOps avr_cpu_reg1; extern const MemoryRegionOps avr_cpu_reg2; -#include "exec/cpu-all.h" - #endif /* QEMU_AVR_CPU_H */ diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index e4fc35b112..c065fa8ddc 100644 --- a/target/hexagon/cpu.h +++ b/target/hexagon/cpu.h @@ -158,6 +158,4 @@ void hexagon_translate_init(void); void hexagon_translate_code(CPUState *cs, TranslationBlock *tb, int *max_insns, vaddr pc, void *host_pc); -#include "exec/cpu-all.h" - #endif /* HEXAGON_CPU_H */ diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 4e72ab025b..da5f8adcd5 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -306,8 +306,6 @@ struct HPPACPUClass { ResettablePhases parent_phases; }; -#include "exec/cpu-all.h" - static inline bool hppa_is_pa20(const CPUHPPAState *env) { return env->is_pa20; diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 02ea87347a..bd63036334 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -2604,7 +2604,6 @@ static inline bool is_mmu_index_32(int mmu_index) #define CC_SRC2 (env->cc_src2) #define CC_OP (env->cc_op) -#include "exec/cpu-all.h" #include "svm.h" #if !defined(CONFIG_USER_ONLY) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 69117c602a..ad8b0ed235 100644 --- a/target/loongarch/cpu.h +++ b/target/loongarch/cpu.h @@ -504,8 +504,6 @@ static inline void cpu_get_tb_cpu_state(CPULoongArchState *env, vaddr *pc, *flags |= is_va32(env) * HW_FLAGS_VA32; } -#include "exec/cpu-all.h" - #define CPU_RESOLVING_TYPE TYPE_LOONGARCH_CPU void loongarch_cpu_post_init(Object *obj); diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 5347fbe397..0b70e8c6ab 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -596,8 +596,6 @@ void m68k_cpu_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr, MemTxResult response, uintptr_t retaddr); #endif -#include "exec/cpu-all.h" - /* TB flags */ #define TB_FLAGS_MACSR 0x0f #define TB_FLAGS_MSR_S_BIT 13 diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 90d820b90c..2bfa396c96 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -411,8 +411,6 @@ void mb_translate_code(CPUState *cs, TranslationBlock *tb, #define MMU_USER_IDX 2 /* See NB_MMU_MODES in cpu-defs.h. */ -#include "exec/cpu-all.h" - /* Ensure there is no overlap between the two masks. */ QEMU_BUILD_BUG_ON(MSR_TB_MASK & IFLAGS_TB_MASK); diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 79f8041ced..20f31370bc 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -1258,8 +1258,6 @@ static inline int mips_env_mmu_index(CPUMIPSState *env) return hflags_mmu_index(env->hflags); } -#include "exec/cpu-all.h" - /* Exceptions */ enum { EXCP_NONE = -1, diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index f16a070ef6..19ee85ff5a 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -334,8 +334,6 @@ void cpu_openrisc_count_stop(OpenRISCCPU *cpu); #define CPU_RESOLVING_TYPE TYPE_OPENRISC_CPU -#include "exec/cpu-all.h" - #define TB_FLAGS_SM SR_SM #define TB_FLAGS_DME SR_DME #define TB_FLAGS_IME SR_IME diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index aa5df47bda..3c02f7f7d4 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1704,8 +1704,6 @@ void ppc_compat_add_property(Object *obj, const char *name, uint32_t *compat_pvr, const char *basedesc); #endif /* defined(TARGET_PPC64) */ -#include "exec/cpu-all.h" - /*****************************************************************************/ /* CRF definitions */ #define CRF_LT_BIT 3 diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 14a6779b4c..867e539b53 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -634,8 +634,6 @@ G_NORETURN void riscv_raise_exception(CPURISCVState *env, target_ulong riscv_cpu_get_fflags(CPURISCVState *env); void riscv_cpu_set_fflags(CPURISCVState *env, target_ulong); -#include "exec/cpu-all.h" - FIELD(TB_FLAGS, MEM_IDX, 0, 3) FIELD(TB_FLAGS, FS, 3, 2) /* Vector flags */ diff --git a/target/rx/cpu.h b/target/rx/cpu.h index e2ec78835e..5c19c83219 100644 --- a/target/rx/cpu.h +++ b/target/rx/cpu.h @@ -147,8 +147,6 @@ void rx_translate_code(CPUState *cs, TranslationBlock *tb, int *max_insns, vaddr pc, void *host_pc); void rx_cpu_unpack_psw(CPURXState *env, uint32_t psw, int rte); -#include "exec/cpu-all.h" - #define CPU_INTERRUPT_SOFT CPU_INTERRUPT_TGT_INT_0 #define CPU_INTERRUPT_FIR CPU_INTERRUPT_TGT_INT_1 diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 83d01d5c4e..940eda8dd1 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -948,6 +948,4 @@ uint64_t s390_cpu_get_psw_mask(CPUS390XState *env); /* outside of target/s390x/ */ S390CPU *s390_cpu_addr2state(uint16_t cpu_addr); -#include "exec/cpu-all.h" - #endif diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 7581f5eecb..7752a0c2e1 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -288,8 +288,6 @@ void cpu_load_tlb(CPUSH4State * env); /* MMU modes definitions */ #define MMU_USER_IDX 1 -#include "exec/cpu-all.h" - /* MMU control register */ #define MMUCR 0x1F000010 #define MMUCR_AT (1<<0) diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index b87351a666..734dfdb1d3 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -729,8 +729,6 @@ static inline int cpu_pil_allowed(CPUSPARCState *env1, int pil) #endif } -#include "exec/cpu-all.h" - #ifdef TARGET_SPARC64 /* sun4u.c */ void cpu_tick_set_count(CPUTimer *timer, uint64_t count); diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index abb9cba136..c76e65f818 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -251,8 +251,6 @@ void fpu_set_state(CPUTriCoreState *env); #define MMU_USER_IDX 2 -#include "exec/cpu-all.h" - FIELD(TB_FLAGS, PRIV, 0, 2) void cpu_state_reset(CPUTriCoreState *s); diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index c5d2042de1..c03ed71c94 100644 --- a/target/xtensa/cpu.h +++ b/target/xtensa/cpu.h @@ -733,8 +733,6 @@ static inline uint32_t xtensa_replicate_windowstart(CPUXtensaState *env) #define XTENSA_CSBASE_LBEG_OFF_MASK 0x00ff0000 #define XTENSA_CSBASE_LBEG_OFF_SHIFT 16 -#include "exec/cpu-all.h" - static inline void cpu_get_tb_cpu_state(CPUXtensaState *env, vaddr *pc, uint64_t *cs_base, uint32_t *flags) { diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 8d2b957a3b..5ced3879ac 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -35,7 +35,6 @@ #include "qemu/rcu.h" #include "exec/log.h" #include "qemu/main-loop.h" -#include "exec/cpu-all.h" #include "cpu.h" #include "exec/icount.h" #include "exec/replay-core.h" diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index c487f13e2f..8f193fd0bd 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -24,7 +24,6 @@ #include "qom/object.h" #include "target/i386/kvm/hyperv-proto.h" #include "target/i386/cpu.h" -#include "exec/cpu-all.h" #include "exec/target_page.h" struct SynICState { diff --git a/semihosting/uaccess.c b/semihosting/uaccess.c index f51a253626..81ffecaaba 100644 --- a/semihosting/uaccess.c +++ b/semihosting/uaccess.c @@ -8,7 +8,6 @@ */ #include "qemu/osdep.h" -#include "exec/cpu-all.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/exec-all.h" #include "exec/target_page.h" diff --git a/tcg/tcg-op-ldst.c b/tcg/tcg-op-ldst.c index 73838e2701..3b073b4ce0 100644 --- a/tcg/tcg-op-ldst.c +++ b/tcg/tcg-op-ldst.c @@ -37,7 +37,7 @@ static void check_max_alignment(unsigned a_bits) { /* * The requested alignment cannot overlap the TLB flags. - * FIXME: Must keep the count up-to-date with "exec/cpu-all.h". + * FIXME: Must keep the count up-to-date with "exec/tlb-flags.h". */ if (tcg_use_softmmu) { tcg_debug_assert(a_bits + 5 <= tcg_ctx->page_bits); From patchwork Thu Apr 24 00:48:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883874 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3206727wrs; Wed, 23 Apr 2025 18:19:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX+NGybp/gwgMNXJJ6qA49nxx+ZtsJWak85AZVfpKgEqSCC0PYI6BN+EfyWpMIFhSykOPSYGw==@linaro.org X-Google-Smtp-Source: AGHT+IFK8L1V8bbthgZ9ANIpSskMrtdcWcLM9j9SfDWbf8CL8P2oO9KH+swKujud42+6xcJ1BIEl X-Received: by 2002:a05:6214:5182:b0:6e8:9394:cbbe with SMTP id 6a1803df08f44-6f4bfbef8bdmr14642776d6.20.1745457561494; Wed, 23 Apr 2025 18:19:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457561; cv=none; d=google.com; s=arc-20240605; b=JNeXjpnyik7NXM1sp5idCOJ4ukHfMmB63xrpQEdwmJfex/66rAW0kc7364dNjwShQq Gc7kawyVJWaniRnJW980zebw1/UO/yK7j5ZWdbBOsHGnq1oSj7mnXa/pn3SxclTRaWpv o8lmlE7cQr7UqexkcSnxzcQqXZygG+DXFjm6uZHAfQEzEJ6kbRKZ6XexbRfjJ4eQhEd7 sYfso42OuT7+6usGA3hDxzwCYOYnV3dQesq1fqsws98HeWPzAZ4qbEf9aR2juOSX+Z3n h0PgKPP1wDr8DnWWcd5Lsd4bhUnVXB1q+tiSXUX1MDJJFS6sdO38o9b86j+CAXegUYs+ yWxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gLKTjM2ffAVeFrE6Gc5tW8Q4Xi7NyJ25WnTbWz90B6E=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=ZnjSl+quKOJmusRu0+BHYymxFP0XHIs9dJ0/veSSezGcs5LJXFfcauiPKTeA4Qi3w2 SgXRpSDwt8l+GyAck/pyzQ3/+B2urHmfHkk4lenDF21Ym72CXUcmGdpPnR8KWHoJDdrC LtUDEXNXgV1Bi1hgRXKeqc/LnoLXfqPj9hFoTdofH0IIx12PxRhCs+dwRVeEffhDVogQ XTo77XIXauHXqqj8RnpTyTfheDckHotF7gf8D4SEfP7AVgnAXc80//FeLXl3YktO0eol P17Ins1Bg0k/qGx2YONxsyDcj8wYlKl8KZK69cCvCgVC5QJcJGFbDbOLNpULn6qBhJsJ UTbA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uxb7xpwt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c092b0casi3965206d6.137.2025.04.23.18.19.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:19:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uxb7xpwt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kw6-0003GL-Qh; Wed, 23 Apr 2025 20:59:33 -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 1u7ktk-00067L-44 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:05 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktf-00058x-CR for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:03 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-2295d78b45cso6762885ad.0 for ; Wed, 23 Apr 2025 17:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456217; x=1746061017; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gLKTjM2ffAVeFrE6Gc5tW8Q4Xi7NyJ25WnTbWz90B6E=; b=uxb7xpwtsktl82kGM7qy65HoEudoBkV6dfbxwXeg5nWVQKn3DY3zDBi3I30W+RZxD0 RvdIHPFOLCmgyFWPjG51jR9CIBUw4gKUKpPnmqFlOf0ykgh3JzexWtfpHdgrUVDLv+Bq OEHyxKx2R7lRYGoEULi8QbS5l0fgxmYNtv/JV422gmxLe4xeRDpASiUs5vuqjUV5cyb5 UqPeV2KT/YP7Ex/MLxRwGSkmopDtk/No/SooY2B4TmGG1MD6F27p64vRqiBR7tJyrZVV LRPCD0ArQuFbQ4cl3HwwaUX/xK2uPKPDN7RMwGa+WucFyb/CWZEC3ADnQASLNgF/CgUw VI8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456217; x=1746061017; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gLKTjM2ffAVeFrE6Gc5tW8Q4Xi7NyJ25WnTbWz90B6E=; b=UnzhPmwL/R/ARoEMOCcebieRgQhRU2HSZjXN+cQvvur9Rt941u8z8m9MOK+tf2OITB KPq6JZbcrWQ+nAcqcE+rfsUykVYBz28DwP7iXKSGNqZzJZbApSts5I5SqdAfPqkoawvA Ud2KRYk7SvWyYIvCzaNuBJtw4KuuYVWDKVmRzADW35q50RrCjrbelUE2Qy4YBWj0p1hz S/f3STgZwU2Y0d8FEttqi6hzdA7ez3rwh6KLVnDpOaeHCdSO4u+V2+ukPcdNPl6l92jg 3y0wJzckat8bbqTCZGS0yCv+I5uGg2IDPpNTUWvQJGOqtm7Bbc1LN5AKXt/eMUBs7xvL 8qig== X-Gm-Message-State: AOJu0YxZ1p7suOPlyQpvqnddD6fKAHLt2j0F7H8NdTVbDdE2hP7MF4cY GZRJJzEd321SZ/Qao0DShAGGSUFoRohHXJOp/yteGN6kIjwy1NfbEyjC1aKInzpxFJmOD8Kx0Du / X-Gm-Gg: ASbGncu0uZgbI0pb/6Z1458m64uYqKIkj/cmarvQSVHMmXBe4o5A7PAvHP3/YGgWwn0 aLvZGo+CzZyCp/RsKyRyyOLIMwNJPTtdEfxrzmDVgik6e9otLAoxSCQZ+2UL+AkKqQgKKBBtcnH JxhLDvpYmdkEKRs33m2Rkc7ysjz+ynI+dapC2qmlElqT8MjxBcpiwBKhOz6qE+ysckL7SKtZ62C /RLQuoXRPH7WQrAqwSQ6e3whJSnoWZQjinwws9dkIxknqdpTxZUNLeoEuh+PAvIybPig2ysWDpT YohA51EzlHT5P0ps0x3qNLNKr+OZGNEQt8tFpQmwBt6fH8mKUz4qY74YbCnPlcJ1hPGmCx2R7D4 = X-Received: by 2002:a17:903:190d:b0:223:37ec:63d5 with SMTP id d9443c01a7336-22db3c0d32fmr9575935ad.28.1745456216895; Wed, 23 Apr 2025 17:56:56 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 113/148] accel/kvm: move KVM_HAVE_MCE_INJECTION define to kvm-all.c Date: Wed, 23 Apr 2025 17:48:58 -0700 Message-ID: <20250424004934.598783-114-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier This define is used only in accel/kvm/kvm-all.c, so we push directly the definition there. Add more visibility to kvm_arch_on_sigbus_vcpu() to allow removing this define from any header. The architectures defining KVM_HAVE_MCE_INJECTION are i386, x86_64 and aarch64. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-18-pierrick.bouvier@linaro.org> --- include/system/kvm.h | 2 -- target/arm/cpu.h | 4 ---- target/i386/cpu.h | 2 -- accel/kvm/kvm-all.c | 5 +++++ 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h index 21da3b8b05..18811cad6f 100644 --- a/include/system/kvm.h +++ b/include/system/kvm.h @@ -390,9 +390,7 @@ bool kvm_vcpu_id_is_valid(int vcpu_id); /* Returns VCPU ID to be used on KVM_CREATE_VCPU ioctl() */ unsigned long kvm_arch_vcpu_id(CPUState *cpu); -#ifdef KVM_HAVE_MCE_INJECTION void kvm_arch_on_sigbus_vcpu(CPUState *cpu, int code, void *addr); -#endif void kvm_arch_init_irq_routing(KVMState *s); diff --git a/target/arm/cpu.h b/target/arm/cpu.h index ea9956395c..a8a1a8faf6 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -33,10 +33,6 @@ #include "target/arm/multiprocessing.h" #include "target/arm/gtimer.h" -#ifdef TARGET_AARCH64 -#define KVM_HAVE_MCE_INJECTION 1 -#endif - #define EXCP_UDEF 1 /* undefined instruction */ #define EXCP_SWI 2 /* software interrupt */ #define EXCP_PREFETCH_ABORT 3 diff --git a/target/i386/cpu.h b/target/i386/cpu.h index bd63036334..17ad0b644b 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -35,8 +35,6 @@ #define XEN_NR_VIRQS 24 -#define KVM_HAVE_MCE_INJECTION 1 - /* support for self modifying code even if the modified instruction is close to the modifying instruction */ #define TARGET_HAS_PRECISE_SMC diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index a30b19f455..cba9c78d2f 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -57,6 +57,11 @@ #include #endif +#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) +# define KVM_HAVE_MCE_INJECTION 1 +#endif + + /* KVM uses PAGE_SIZE in its definition of KVM_COALESCED_MMIO_MAX. We * need to use the real host PAGE_SIZE, as that's what KVM will use. */ From patchwork Thu Apr 24 00:48:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883828 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202019wrs; Wed, 23 Apr 2025 18:04:31 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXOiG7V2B1v4T7fNIXh+hyrMsx71Agy63JbzSFG/7LGl9FjyNZIax7ZEr2MdcZx0Ce3+DPMyw==@linaro.org X-Google-Smtp-Source: AGHT+IEYl8Gwhns+jBf1XCXH5SD9hchmT1zeLO9LXSuyuiLpNN1aeH3xxuKKmjPnTXCEno2Bv0DP X-Received: by 2002:a05:622a:1a0c:b0:476:8eb5:1669 with SMTP id d75a77b69052e-47eb43ac26emr9207351cf.32.1745456671565; Wed, 23 Apr 2025 18:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456671; cv=none; d=google.com; s=arc-20240605; b=jHq1NE3QUFAlfUDJgIElS20JSLR/EfamSeS8VqybVry+dyET69QJJO7PnMpwzgxioe p2HfrzVY3sQ5rAvX1poff16A5vTieLwGU7qBmIhcR+QKPiWfEW8LIBeeD8CYdEfXT09H KzHVel2lsnPK2bJ+cEz6JifavmpbMn4ZEDhXMO8AOLNQf8OFUbCbYYyj00n0D2+7Qt76 7Y11HglkGRNnyTNJjA1BT0WMOtcGg9Ic9XE0w+84nWIKu0c/MLwQugPhdIlrMxDJyShZ /JP4VTT/U1AzkoRnNzfdfA56kRgB/oBhFKytJo3wxJnDgjGaILE+zEHjB0Kz8d+a0Yar vLYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=e/M+JJq6ZWP2W3rE9cY5JRLQzGEcLqDNY6NmbDaK7f0=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=CeBG/tAqoerzFumem6d4w1uXisZui3T31kAgEfafhg9eFRUUHkN150Kuob0GcLXssg 4Aul7DfXLj4s4S3l6pteNnSxfGvLZiw3AH7suT7IZYBBViawwKtQGb7m53GfdKmUU4Ia 2R+XGvzrUpo/9Uuh7EqkpzJF9fCWIvgmdUGqa0Z/fI3CMHQV1C5P/PmfuL38WFzG0/Z4 Oos0sg4+UFLYT2FT60Xv5Hjops0z7IaFsae+d/0X+aQXw23c6Yrx8z1PX5m/TedYAJyp 6QaUEDtLCK8+S9EO4aNn5fnFWA1mUFPImLQi/EoR5LHL4YO1VPCwzQurB9iRP5gfYYfc 1hxA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wsvhTIaq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9fa9a02csi5428941cf.166.2025.04.23.18.04.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:31 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wsvhTIaq; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kw0-00033k-4S; Wed, 23 Apr 2025 20:59: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 1u7ktk-00067K-3l for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:05 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0: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 1u7ktf-000590-CI for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:03 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-736bfa487c3so303339b3a.1 for ; Wed, 23 Apr 2025 17:56:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456217; x=1746061017; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=e/M+JJq6ZWP2W3rE9cY5JRLQzGEcLqDNY6NmbDaK7f0=; b=wsvhTIaqdtMKotslZX9bcWzqi/M+pUfjQbOfXH0ZnBuiewNNIb3lZdUjmc/HTyPFhB SC2gcujNNCAT6Kb9c9W4GYoxw4WESXmrNBoM+2X+wjwI/4VvyCd+HvBtzAqFekJnVAcf bvqzrpggi79Q9aeACJLutmN+Dv4ZlEZpbAU/Zw2a6pFERfrhgNEyqBh3FMaRQSAuDR3l rYp9RuP3s3PdGd+Ajrcvnbu1vHN6gBw91EkTQP5TreWgxUx4gfwqObGzqcWqwnXdmNDX WcfHNg9NOE9w4v18BgIaBnBJq4KpDyHCHvRwAGZRPpPeLIRxkMe36UO38RbLqFzE7UvE k0Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456217; x=1746061017; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e/M+JJq6ZWP2W3rE9cY5JRLQzGEcLqDNY6NmbDaK7f0=; b=szFwwkxNLy7WGDj35TS0zHfVAMse5YOJx5FL5vNkvjYs1Au2dnixlYmTzO57U+DIB+ nSMMn9FjUk3INXXRGclPfkEu2DdWHI2Us5SNEpDJlxxEslij2wTAuok0kKt+mUMMeiMe 0aK1qS3iDvOf8tbS9/MWq+9wv0QEweMo/R4S9K92O1emuwzuuncXdNPmYLZynJPN7Vbb Sbwpij72nE4igZHicmRXU3NXwi1y3GTPrKm8KK5zZJGqJMEjiLlQGVIP7VEeyrfh5Qgd 7uctwD4R69ST8/fqkrPXHDlD+KtN12g8WRFN810gcSzElP1AI6/yDP/772BOcs1321Gd lIog== X-Gm-Message-State: AOJu0YwdfGsh4NrdtxMc8ZNSsRNCcdbiMaG6ZKgoM7jo7qc3ZCaE9jr8 i0kZHcHZNwUsBiZ+jQ44bMuaLDKHAC9KlRHsQQi5Ug63Pchbpcdt4yr7I/2ICbqedGfHW/p9Zbr N X-Gm-Gg: ASbGnctEzLGfEqna5+wV/HYZEIrpY5H5Q5k1ILLkTEr9iY/mo++buf1Z1nLwFx4G6RX KPc4i7zlyS1QDk8094/xde1jluBig7BECk24+HQXb8sfytI7eMR+fHtl63Sfk2Cz/05cQDfP3/U 0td6t5ZN1I39kDVcOpcyN0+ZG+JNV8TAImUOs2eULCYPVb3R3w6eievyLR57qC9c7HvRya4IUOX 3wavrfQDcqJAb49yp6YY3FTNnFDJEL6ns1MPMNGXssPglaaImspwMAs4sHMWCKDpUZ8yDj1qmdh hgOcTVX8ylTHeQpW1HbdpPMv+2xlgy/QyUvY04RNhc9RwyY9gE09ryRlFmych+9mfdXNTDLQq9U = X-Received: by 2002:a05:6a21:6d8d:b0:1f5:a3e8:64dd with SMTP id adf61e73a8af0-20444d2754emr1026778637.0.1745456217456; Wed, 23 Apr 2025 17:56:57 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 114/148] exec/poison: KVM_HAVE_MCE_INJECTION can now be poisoned Date: Wed, 23 Apr 2025 17:48:59 -0700 Message-ID: <20250424004934.598783-115-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier We prevent common code to use this define by mistake. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-19-pierrick.bouvier@linaro.org> --- include/exec/poison.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/exec/poison.h b/include/exec/poison.h index f267da6083..a09e0c1263 100644 --- a/include/exec/poison.h +++ b/include/exec/poison.h @@ -73,4 +73,6 @@ #pragma GCC poison CONFIG_SOFTMMU #endif +#pragma GCC poison KVM_HAVE_MCE_INJECTION + #endif From patchwork Thu Apr 24 00:49:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883867 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3206212wrs; Wed, 23 Apr 2025 18:17:35 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVfWSOLMVqjOSoIy2d97LnuaL4AIP2+pxewBfZmXdSApkhqakhCI5WfqtWW0C7swCogq3cDjQ==@linaro.org X-Google-Smtp-Source: AGHT+IG9b7MsiS+w7Z4rxAaHNe18EU5Hrp44Aj3REm04Khmy52nKvAhjuN5Wc2PVMFbk5B1Jy0mx X-Received: by 2002:a05:622a:48d:b0:476:fd53:287 with SMTP id d75a77b69052e-47eb55c7684mr9589571cf.44.1745457455176; Wed, 23 Apr 2025 18:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457455; cv=none; d=google.com; s=arc-20240605; b=NJplZwZPIt0HhR/1tl/4iks9up/CMlwBmilaY4ewcYIG7Tr1pWX3bQS36sjp3SfjQn ZP1KxUQcLioXLFZ6T3Im5wQ+I1rIxKGzdaaBZoudRGpIBGdb/fhKJu/YkWja5XlnwWbO sBwEyYTtaZruFQoPEw3GjGL3oIndpy8Ja9ruJbK1ywfKVbvw5JM92x8BnASVcZZFyrBN 3GtamzMleFJS0Z5iZYOyQ7tg4WFBCVPIFrB6qSMXBfd/UTSrxxx82qXS4E+GVZ4C8L3K 8HczFNvZmKX/OYpR+8HifBmj3kRkMVnVglV6XKSUKZI2cHYgVqB3RAhBXcpP6mcpWkwU L4Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fw918qmxQalPO99dinob5iJyGANUib3+dTX4jzZTubw=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=gNE4z1R0h7P8o9YQbsIknD3mrAaf9xj7i49W0EnkeGr5SzPK8AK6913npsZCjBkdTh Nz/HOZR8TmrKgWdJtcNk4582dBeccLgese/yeoG0YNoaEnKO+YdQL/3GJLi3HmSkVG0B voz2pkJUJEDkV1FHwtPj6lZrwCWcN3yBIc+UFFgtkLeV4LXgLGt/2UFSHCkEJD0lmqoF tS0BI+oqNxAvyPsrPU1W57VCXQodHIEvICyNoknbmakwRYXaxz3gN+fS+B5Y0U1jvM4X hFZ28kOgJCw4kw/jqcBF0dnR+NNuPE/uNuaSw+DsRlFAJSjoZlJSh9TXAX4vxeVziObl /WiQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GXDGiJZM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9fa9a6bcsi5685971cf.187.2025.04.23.18.17.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:17:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GXDGiJZM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kua-0007eh-Gj; Wed, 23 Apr 2025 20:57:57 -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 1u7ktk-000671-4B for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:05 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktg-000599-2n for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:03 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-2243803b776so7566585ad.0 for ; Wed, 23 Apr 2025 17:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456218; x=1746061018; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fw918qmxQalPO99dinob5iJyGANUib3+dTX4jzZTubw=; b=GXDGiJZMthY7Q8O8FIjSL337DKfkq+iCVHLiRVkAl9MNsMsFVaduObFo4v+t7SdxEe Q7MZ/uAtBZ9W9w/uNb3XO+8WfQjsm0E5kpAev3g9fJ/xpLehmYKt3sz67GuamISAoGbn XngyG6ZIhMBo2alJALiW2XXqcQO8e10YJy/nLoq+3F4m45APln7LNLFFfn9a40qWIbE1 5M54W3xpMP3DncnMZJ1hOmkiqG6OYKxgzXvn22iVLv/qRTBW7MiPLBAamJG/bRQ3dyWV dQ9n/Z1ZctOiF+QQ1YOonu9synbqBrbTm4J8zGoR6kls+f4LT2g2SwFzjZLGuXbuFYgD dAXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456218; x=1746061018; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fw918qmxQalPO99dinob5iJyGANUib3+dTX4jzZTubw=; b=C1LtXZLSkdlNzYIH4NRbE2sHHOeEqafVomMfKMpbn5LbB8Eikb25evXl9xFKmjpX3T QcG+C1xBWVVQfDEajfDS8b4KmlQbeRbsOs106zl1A4Co/eg52ZaAOZn7USDdACfSkSd4 cHgzP0fa5RYnE2vIe9CWuGYm19JJVx6muXWuKnt17UZDxivrTMg1sxHm9zyk8bVYFtem BKJom72Q9z2z7KmJNhv3D0i+rs7VOhqoGidDn62OwGgVAnjoC/B/AFnQOtVJZEhFmIM6 nu0DJJIVBZ1gwMtTqN0DbzABui/qUxBv+CragwGK8gdgvBRkuMsKStdA3X0S9/sNyQnu HqLg== X-Gm-Message-State: AOJu0Yz3lUh+2HD3SfU3O2aM5DZuhv663emYNRujCd5dfeS+82aYFsrA Pv4owgpYR6iG0mECLzFm/PAQ8DJJokO0RRieRB35q+hH+HiJ5MHKNmEzcn8xGq+u1+p5Fm7auvn H X-Gm-Gg: ASbGncta7G13NaCOd2PXj6GQf167lcc12VnYn+tJ3+eVsuu9bBmkq4TRnaA1IJVA7b0 nFdhD6ZIg87ItA1B+7ek5bImArCHYDN8fZl+yrsoNsX1zoQ7g1N3hKazX8LDbIrh0pUJDbfKt3I XaJ3kQG4hXxdPCzgo2+GTiET5N2/Fg9m00gULmfK3l0hneBwb7EwiGr5mVukRd7NWHkhBZeTbZz QTWKh3VZiP+EppjpyVvd9iyBHGVR0HHYSr9asPORN/KfIc+xi6cVueBRcE56olDkwFFMgzCOr6O ZzMA/KKKsHWdfZiDsxXbr1oyxxOuxoyQbuxvf0h5fxaMfEZB42SX7LY7hLWWiSO8EI+ZNFLlLVQ = X-Received: by 2002:a17:902:e846:b0:223:517a:d2a3 with SMTP id d9443c01a7336-22db3bdf635mr7970325ad.17.1745456218118; Wed, 23 Apr 2025 17:56:58 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 115/148] target/arm/cpu: always define kvm related registers Date: Wed, 23 Apr 2025 17:49:00 -0700 Message-ID: <20250424004934.598783-116-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier This does not hurt, even if they are not used. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-20-pierrick.bouvier@linaro.org> --- target/arm/cpu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index a8a1a8faf6..ab7412772b 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -971,7 +971,6 @@ struct ArchCPU { */ uint32_t kvm_target; -#ifdef CONFIG_KVM /* KVM init features for this CPU */ uint32_t kvm_init_features[7]; @@ -984,7 +983,6 @@ struct ArchCPU { /* KVM steal time */ OnOffAuto kvm_steal_time; -#endif /* CONFIG_KVM */ /* Uniprocessor system with MP extensions */ bool mp_is_up; From patchwork Thu Apr 24 00:49:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883805 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3199784wrs; Wed, 23 Apr 2025 17:59:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU4m4wc5QxRoDBTiGJwbGJg2cryUMHkVHbscchJukHZoWFDEiDHuFQAFSxN9ahc70Ul1xpFfw==@linaro.org X-Google-Smtp-Source: AGHT+IFRGDQfLhLKRM2EbhkNRX/vZdMUinHBDu3OryRyuxzJ3gMnmtq42FIC3+zVG6vFGrA79N95 X-Received: by 2002:a05:622a:148a:b0:477:cb1:ab2a with SMTP id d75a77b69052e-47eb2d99c60mr12774731cf.13.1745456345160; Wed, 23 Apr 2025 17:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456345; cv=none; d=google.com; s=arc-20240605; b=LoEUnJVoWw8Lj4IJlj6LwCpAMsxiPU1H3fs9HJ0UDh4LLrOdBsgw67U5YddBfs/+dz Q3MFkYQJG1rrOFlZlrotjwCF8ulkOraNjCy3wLqPp8nFKAZ4jCdWl0YFRrSLr86YE4Ds aKxjEh546Yw76qBk69PE2/RM9DOaC42njX443YjwODqnCRnkrpp+PtcK/8pPcQHhAkFL Lz7se2LJKnHDaFNkUTgBgqaF3XLZilEhOHLm5uIDO3gmHByKW6VPwLHAWHqG04XFZB8U VfzWj+DLbgwLELrZIOybla8eeqiehBYrx6GE5C2/GBN3qLc3SrVebIY+WItEYL32SVFx dxIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7arlHBpWQbE2q1hDh2KHA5LRT+R2b7K0miN1vyMnVZs=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=NwvOSpu2DrdM6ZODmA2hVWxgMlMSICAWT9lEKKZhM/xBABri0/F9oatovgMmEX39w0 dWuzuk/uvYh0JzGyRWjXYL5/OOjuVScrKtlIK/5vhmYeExoWRsOyU5KeE2KvJSIwMrcK n7goVa9Ls8F8B8oK4bMkPpFgP2Nrad3lz/I6L1wzV7QZhJwDYcHtjnOHjwNTIe0bfZ4T AwRaEyx/FWEs6FyRF8ZU7104dB+QR07xds3zpuhH/xlgeVqyl3K7xnLaQNLWmkxpLm7n I81wG6xXPEt1EPqSDDnFlKka88gzO9i+QwQiw3tk+PX5fUdPKFf/69ydvJIYcQ5Wwzrr 0Trg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=InUymLG5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f9a254asi5057831cf.201.2025.04.23.17.59.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 17:59:05 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=InUymLG5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kvF-00015F-3M; Wed, 23 Apr 2025 20:58:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7ktk-00067N-5C for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:05 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktg-00059W-Iz for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:03 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-7390d21bb1cso354521b3a.2 for ; Wed, 23 Apr 2025 17:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456219; x=1746061019; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7arlHBpWQbE2q1hDh2KHA5LRT+R2b7K0miN1vyMnVZs=; b=InUymLG5wTNXv8vG/b3acKZY/6t716y/oPkGDI+ZuuesJxZJmE9X5ukJFpvtxCjdK6 67904IUNRnUgGpwjBtBUoQU6IDTzdp+hxypiZbyq0Umk6uWLPP49EH9Z3Jr9aQSh10Xf EyOiOgKGsl2hDRCxeKoxYakzRNYfGnRmRrLP2PwYfqKFWF7oTf9M4mcDx5TDjxvmKbG4 rAhDzm1YVgsAaGzwHj8qmc7j8UCCfUtMbEFF2tjSrFY4SBrFr7/Jq0c4sq98sz6AJOLa fuKZhzHjJTN7HaZ1iMsM6JPvsej5hvMDBl4z1HlEkcSFmMhQHYqummNaWXT7uDmbwcEB u3ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456219; x=1746061019; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7arlHBpWQbE2q1hDh2KHA5LRT+R2b7K0miN1vyMnVZs=; b=CFAuoekWhoVNJ+XMixHMb9Ab3iF9fzOnPX0ScXjQjtWitOGL7ZpkOX+sreYy1BTQ5H L3EYluoBmOIzEVew7iJlhWKYJqLpe+noQagCvegirKkI886mh1kKAwyZdFTrKyx0lJgp +LqfialQGgPzYhBVWCjA+pZRp/Bd9PoHZ56Zdv5R60x6J/F49ZaMRJ0JnVrLbJ8AkqSP 2gdIDsDtCXk0Jtdq0QzhqfHLtjLPvbL/rIdEeLt4i4iWlwIRkuCxxrL/W0Lzj6mnH2ro 0Q4qD0bZSwZzzF1LHLN/P9vqPg7GDTIeGpc3BbGUspqowABYeORuKWadPVC1U3dALKpZ ZgyQ== X-Gm-Message-State: AOJu0YwCYYF0RVmle3NtHdFv9YaMeXZKRah6WiZJ7XdQWYnRoz10ZbWC H4g2kjRuA/Zm4iolNaCmOGQMd+kXhEVpyj9W91CGPmIxprOqjnoQm36whaxYUHA31z7ZZRcHF9A x X-Gm-Gg: ASbGncv8o0CbizzSBhkWl35C+I5yXJAsTONGi7uJbEqrl1wWmNAicpP7/vF9w4bVth0 07BB4bApGBSZrjmuZjiPr3DDG6mjw9IBlpTaT0ZkZRGGfktW9Yq9qY9LvBr1DVIwYif3kWTSXUN jdGHSC1rvub2XzlkpMRZELl+PYfxM+cpEaQLR4kDMys8wBFhmx7TdBvV+1CN8vRJwFtF/+NER4I Q3Y/ZHWj2VNt45job52dKHr5nT3Kh9puW2wm/vQUqr3TjVJA3Hm59/n0ZxzP5pLzdMqjP0BUIcT AoS+u3xa7ReWvWgvGgrDBVlVJmD7dYsL0iqQA5JDKhHHB4kBXdCTxwYXRw4M4Q3tH6/blWYdYdv bW/r/WNdX9Q== X-Received: by 2002:a05:6a20:2d28:b0:1f5:6e71:e45 with SMTP id adf61e73a8af0-20444f276d6mr971621637.27.1745456218906; Wed, 23 Apr 2025 17:56:58 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:58 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 116/148] target/arm/cpu: flags2 is always uint64_t Date: Wed, 23 Apr 2025 17:49:01 -0700 Message-ID: <20250424004934.598783-117-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Do not rely on target dependent type, but use a fixed type instead. Since the original type is unsigned, it is safe to extend its size without any side effect. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-21-pierrick.bouvier@linaro.org> --- target/arm/cpu.h | 10 ++++------ target/arm/tcg/hflags.c | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index ab7412772b..cc975175c6 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -194,7 +194,7 @@ typedef struct ARMPACKey { /* See the commentary above the TBFLAG field definitions. */ typedef struct CPUARMTBFlags { uint32_t flags; - target_ulong flags2; + uint64_t flags2; } CPUARMTBFlags; typedef struct ARMMMUFaultInfo ARMMMUFaultInfo; @@ -2968,11 +2968,9 @@ uint64_t arm_sctlr(CPUARMState *env, int el); * We collect these two parts in CPUARMTBFlags where they are named * flags and flags2 respectively. * - * The flags that are shared between all execution modes, TBFLAG_ANY, - * are stored in flags. The flags that are specific to a given mode - * are stores in flags2. Since cs_base is sized on the configured - * address size, flags2 always has 64-bits for A64, and a minimum of - * 32-bits for A32 and M32. + * The flags that are shared between all execution modes, TBFLAG_ANY, are stored + * in flags. The flags that are specific to a given mode are stored in flags2. + * flags2 always has 64-bits, even though only 32-bits are used for A32 and M32. * * The bits for 32-bit A-profile and M-profile partially overlap: * diff --git a/target/arm/tcg/hflags.c b/target/arm/tcg/hflags.c index 8d79b8b7ae..e51d9f7b15 100644 --- a/target/arm/tcg/hflags.c +++ b/target/arm/tcg/hflags.c @@ -506,8 +506,8 @@ void assert_hflags_rebuild_correctly(CPUARMState *env) if (unlikely(c.flags != r.flags || c.flags2 != r.flags2)) { fprintf(stderr, "TCG hflags mismatch " - "(current:(0x%08x,0x" TARGET_FMT_lx ")" - " rebuilt:(0x%08x,0x" TARGET_FMT_lx ")\n", + "(current:(0x%08x,0x%016" PRIx64 ")" + " rebuilt:(0x%08x,0x%016" PRIx64 ")\n", c.flags, c.flags2, r.flags, r.flags2); abort(); } From patchwork Thu Apr 24 00:49:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883925 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3209869wrs; Wed, 23 Apr 2025 18:31:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU9fY29jXnVrlMhq8a9SF9ICVbSjjEHggznSU+GB6dGuAjvh+SCf5docktTauCLeOsuFU6kVg==@linaro.org X-Google-Smtp-Source: AGHT+IGBNtR1M/Pxob+bwpqoZb8dH97/XxJl/lkgrFOSCGjaLNInAlACR9IMrmZ0RXJFvPkxOcXL X-Received: by 2002:a05:620a:258c:b0:7c5:9c38:ef6b with SMTP id af79cd13be357-7c956f27886mr128244885a.45.1745458297668; Wed, 23 Apr 2025 18:31:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458297; cv=none; d=google.com; s=arc-20240605; b=cGqXH93O2AfIIcMRdXdSrrZjLOWh0IwW0U3zkbVOMuUkk2DJUaQNypktl/+5dSVFSK rs5xIdbeaQ5g75VfhK+9DDz8T5StX6IApYd7ntAiPwWdD24OrmJqiQE0z3hdKbYrLa1E xyJp92dmxOqPaDcGIxAyEIpMoVk5s3exBdvO84GpUhOD8tBNJk8p/WcgYL4BAGQgsEMG DJJTELJ48BFehz17jPQPxDbVmUzagQxf/niIeNO3vp+j3n2p5A4p2KJd3nU+HcXBGtIA x8JC6qshoFm7DhZ4zVKm2BHvMEeGbsAF2UGf0Q3XW6xGjO/u79jKox/WVG588lYCF48P BtxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=msXtfBhGOXcEDb7wOAfBlBKK4V40wttZa0c5PZCnz/Y=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=SGOv8hqz5QHlZ/oOJ/mX4/MfuXUcaopMaI2ueEOJsRF5Y98o5Z/SEpUQoxYxtnPu9F E8s3ohHFaFRINYWawQVHdyP4FAicsO+udWHoXkSSL9HDSRQPaq005Mb99TFwHlwsOW4t fNqW1UoEK6BbSlYIVVY4TPq6gJvEDhVKqhaZt+Se8gnFhzPDgsoC1ukBYjPYBVivy1IQ l0stiJ2CYhG/RMGsRcUSj9wHCP2Vrg+B13CxV6HCR0GSkPC7AbiZDogI4dG7/9/CviXu hdLtwfKgc3FLsS2qYeh8GlMNUmpWBklLcyzpc1UdGT3lV54f6lPC943+vu5dx5EEt6KC ZKKA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=neQBW9yz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ea4566si26150985a.366.2025.04.23.18.31.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:31:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=neQBW9yz; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kx7-00068b-MD; Wed, 23 Apr 2025 21:00: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 1u7ktk-00067e-JC for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:06 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktg-00059l-RB for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:04 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-736e52948ebso456568b3a.1 for ; Wed, 23 Apr 2025 17:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456219; x=1746061019; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=msXtfBhGOXcEDb7wOAfBlBKK4V40wttZa0c5PZCnz/Y=; b=neQBW9yzPDtRLzErS1TK80tqsdCRbh9zBrlpHY6837gPrmXBuXRS4uI8zgqkChtFS7 m087RLxHcCF5Y3bmJG2jnkN04znGN2OK9YXItC2e2cHrdi3b0QsYaoKKbSnFVToLCbAD g5BDZqrMPnjjNVT+LUgwpgK0dQswdnaJkRiTJabtvxVhYlOSt+s5ONQB4nPA9qRTruVt hg8LzhBkG/OsyQeeDFuMA9a8hLMRpJNw4tgBF/ijpYBeUnwPJuBkSLq9wxenHZy0tR95 xz2l8UHXwLNaqVsnrBzIQIfyYSJUYM9uLYsf4P1l867jvodmqYC7sNNjY3hKU1hMXqar Bpew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456219; x=1746061019; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=msXtfBhGOXcEDb7wOAfBlBKK4V40wttZa0c5PZCnz/Y=; b=Jtyw0ybixYEo6jPSppTLDi2P9ZMLNX4PhQ4TnlJgaZIVXJxPNMCmUZiv1OYuq0hm1Z VRund1NlP4E1XrgSp+z6KfW9k+VP7pXcd2fTbXganB5vuizneHs3Qr7GVuJ+i+1DjtbL E5WtzVHcOUFGy4jgcis8woGI5+bVoX4yyVKSiXWNQ+ZRYvS0Cq+TTVUg4tqxSV+Ir/iV /zge/E93I16Onpkz7z/NgCTXNCb02PUiz0jdyX5CTix03CdREfgWZHXWiTH+Q6xkVmON bx1umTnOf318dhywJoQwC1Srnmn0rVCg54zAVHqG5LJaX7uFpTF0YLYgyTRSFoJH44OT eepw== X-Gm-Message-State: AOJu0Yx2d/QHgt95YR//58bqK/g8ZS9w7owCTjo737qMEFtz7bII+Dah bLDr5lFo+6jvjz3tYaEn5EoUFcswVCgF6RxxS12K7SS8In7AhPjOSFwAGttYH3/m8gcBS2d3zl8 Z X-Gm-Gg: ASbGncsAkmbfTJkwgaS0GPkVvpwNC08HShR5JJXD7vUlhENgqtB/9eEztSH2L+E9bPs 1maf6PsnUr+ofd4nBh3CW3EnjTRDnqKLBy54YpkjBSJ0SwKo8BqNClKyio6fhMB3YsyT04/H2Do KOqPH5KuFalCYHPxYJ9cfu9G0EdpejRtS8seQRm76R52u/Y01wv5W62vAF1mETl6nD3x20IE7kG 9db7S3ghV71M7Coze8RU4c7XgzCqyKMNvySw41xlJES1QusJWrNinOrfJFGW568OiiRkokCRYay ls5T9N/ooSTHt0CSqBweUWba2IXBPfph6UUCf9eA6AzS06xNg3mBavEbqsIDvd7G3lLqpXX5rpA = X-Received: by 2002:a05:6a20:7fa6:b0:1f5:7280:1cf7 with SMTP id adf61e73a8af0-20444ee5eb7mr917627637.16.1745456219502; Wed, 23 Apr 2025 17:56:59 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 117/148] target/arm/cpu: define same set of registers for aarch32 and aarch64 Date: Wed, 23 Apr 2025 17:49:02 -0700 Message-ID: <20250424004934.598783-118-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier To eliminate TARGET_AARCH64, we need to make various definitions common between 32 and 64 bit Arm targets. Added registers are used only by aarch64 code, and the only impact is on the size of CPUARMState, and added zarray (ARMVectorReg zarray[ARM_MAX_VQ * 16]) member (+64KB) It could be eventually possible to allocate this array only for aarch64 emulation, but I'm not sure it's worth the hassle to save a few KB per vcpu. Running qemu-system takes already several hundreds of MB of (resident) memory, and qemu-user takes dozens of MB of (resident) memory anyway. As part of this, we define ARM_MAX_VQ once for aarch32 and aarch64, which will affect zregs field for aarch32. This field is used for MVE and SVE implementations. MVE implementation is clipping index value to 0 or 1 for zregs[*].d[], so we should not touch the rest of data in this case anyway. This change is safe regarding migration, because aarch64 registers still have the same size, and for aarch32, only zregs is modified. Migration code explicitly specify a size of 2 for env.vfp.zregs[0].d, VMSTATE_UINT64_SUB_ARRAY(env.vfp.zregs[0].d, ARMCPU, 0, 2). So extending the storage size has no impact. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-22-pierrick.bouvier@linaro.org> --- target/arm/cpu.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index cc975175c6..b1c3e46326 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -169,17 +169,12 @@ typedef struct ARMGenericTimer { * Align the data for use with TCG host vector operations. */ -#ifdef TARGET_AARCH64 -# define ARM_MAX_VQ 16 -#else -# define ARM_MAX_VQ 1 -#endif +#define ARM_MAX_VQ 16 typedef struct ARMVectorReg { uint64_t d[2 * ARM_MAX_VQ] QEMU_ALIGNED(16); } ARMVectorReg; -#ifdef TARGET_AARCH64 /* In AArch32 mode, predicate registers do not exist at all. */ typedef struct ARMPredicateReg { uint64_t p[DIV_ROUND_UP(2 * ARM_MAX_VQ, 8)] QEMU_ALIGNED(16); @@ -189,7 +184,6 @@ typedef struct ARMPredicateReg { typedef struct ARMPACKey { uint64_t lo, hi; } ARMPACKey; -#endif /* See the commentary above the TBFLAG field definitions. */ typedef struct CPUARMTBFlags { @@ -660,13 +654,11 @@ typedef struct CPUArchState { struct { ARMVectorReg zregs[32]; -#ifdef TARGET_AARCH64 /* Store FFR as pregs[16] to make it easier to treat as any other. */ #define FFR_PRED_NUM 16 ARMPredicateReg pregs[17]; /* Scratch space for aa64 sve predicate temporary. */ ARMPredicateReg preg_tmp; -#endif /* We store these fpcsr fields separately for convenience. */ uint32_t qc[4] QEMU_ALIGNED(16); @@ -711,7 +703,6 @@ typedef struct CPUArchState { uint32_t cregs[16]; } iwmmxt; -#ifdef TARGET_AARCH64 struct { ARMPACKey apia; ARMPACKey apib; @@ -743,7 +734,6 @@ typedef struct CPUArchState { * to keep the offsets into the rest of the structure smaller. */ ARMVectorReg zarray[ARM_MAX_VQ * 16]; -#endif struct CPUBreakpoint *cpu_breakpoint[16]; struct CPUWatchpoint *cpu_watchpoint[16]; From patchwork Thu Apr 24 00:49:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883862 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3205801wrs; Wed, 23 Apr 2025 18:16:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXfO8+/AKaiP8kmIKfSHBWt/8opKKCx0/lWX0tLIQHb5tyqHa4COxgXFMEsOFekd4uYeeVPgw==@linaro.org X-Google-Smtp-Source: AGHT+IEjr92+sJ3IdnaIwsqM9aW18tn9aleFbVk+N6jhoOgyvB+cdz4iPJev1hAPBNVbLn7RyAMg X-Received: by 2002:a05:6214:d06:b0:6e8:fb7e:d33b with SMTP id 6a1803df08f44-6f4bfc78932mr15840986d6.33.1745457375134; Wed, 23 Apr 2025 18:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457375; cv=none; d=google.com; s=arc-20240605; b=PbTZSHrNTt/w45juvx92RWxSxBVU3XIWtVEmUUG1RPnVLXqG6F+3dHBEtxqDd5B44e qzWq6TqzITqda+XsOdSeKEvyBqc48GxvgpEVBmXHMeSwAxv4WCtFMgBNvPMN7RswYuWc lMRvbMjNRU3hPRke2hrfsi7NoSlYJDgxZVxn1WfYwvzoDVgkPh5KqUfzcI9MmWzq7Ry3 rNmgptFG56pN5+GvLmZs9sjW7GTNyf2a2u2Bb8EX5dBEeAp4BQRzYQUZ/oG9hLm1lMHq GfeLVq5ZmUO3fs6KsaKF7slSMd6ese6QQ++ABsN1/iaBFVDEA2Xj8amaxnrbQWV7cJZB 1uug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hyzHc3eX2pZAMrT5P/TXvsGD8d5rYU2E84wns2dz+CQ=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=KmS3d9NJuygG59mGaXfsbO/67/vKquU7s8nvAwerAZzPahuyw/eEC8mwamzaPxUX+Y ks27chIyAI9d/ppe7GLKdFw2ZClslJ9w2l0kMGLgPZT+UJYGPngJaDk+27ZjhBNNHrj7 g/wU/3MIDfhxLSaH54Vxm+Af6XNE5+uD2nySXZhLGB0mWIZiL0GhH5P9oV2DGsCmcerH Yag9RAIybtlc6Uk5QbeXeY9MQx7JdC59Jz/ExOaaaksWnuLDZLEpAz1UtFumzc3mX1Zu jABdntLiDY79wtbtvx0qfZgaG8InckSm1p6sXMt9NCB4bXE0bBBwVopjaLBZ/kZKmCJL yB9A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="cngk6n/J"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0b20ee5si3965616d6.476.2025.04.23.18.16.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:16:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="cngk6n/J"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kvy-000330-9b; Wed, 23 Apr 2025 20:59:22 -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 1u7ktl-00068r-5r for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:08 -0400 Received: from mail-pf1-x42e.google.com ([2607:f8b0: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 1u7kth-00059y-Dw for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:04 -0400 Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-736c3e7b390so371207b3a.2 for ; Wed, 23 Apr 2025 17:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456220; x=1746061020; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hyzHc3eX2pZAMrT5P/TXvsGD8d5rYU2E84wns2dz+CQ=; b=cngk6n/JfaZLLyKI1zHqugNGu6mtJdocYayHtMyrsyzvrCWaHdBhX3mpE7X3zvjhf1 RsXJq2i0HxFRnB+gZ3cjnIRLwvmtfTCv6uJN0V/OCrCAcLzzlvvX2QKq44k94zwraADw j3+IRaCsvINQ9PGhumMCcaIwN511VRggr01fmPDDkqsEkZ9QvqTqcPKIC6ecMkzuYi8n 9VNcSx5m++ZqLx2auEW3SCSFFg/l73w6ZxJvCni7sKgCIb7aH0ImAQpVlKwa5qktJby7 u8V1O+mhvKwEkgGH5gPq61Bsujm9g92rPlZx+Qu/eSVtNZjCbPS7kQ9OkbTX0B+sJfMr 9saQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456220; x=1746061020; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hyzHc3eX2pZAMrT5P/TXvsGD8d5rYU2E84wns2dz+CQ=; b=p9uIb5zs2fkY1SzUVDUfU51vDnaCfJaBBUUh001SUeBY5mgLo0LJoxpvSM6cyaSc6N rU85xqlyMDpKmgrZvUAm9DGOcImGc2T+IFfGn61e0Y4bTXpznx7U842t9TzGTTw1LTOW VpoVQYA6m/ZvM3zVijL/jMUVMp8+gPaDmLu2PF+FzcY5v/5YGYZIseTGRj8H9tRuHkJz ng9yEoCiIhueX6gzzEL+ZNaUaOjQ+QtvaGNTnKBd/H6YTbfU5jvbEelHuH+HUiirv7iw KPc3q7PHZwdlMSIhUTA/4kZIM86L6yfltsOtzuh0mAp+N79XAS2hHRlk9wLTw7RockPH e3Vw== X-Gm-Message-State: AOJu0YyyprlYF/jswBjsJ3o3zzOgMII3VxReMaQ8CSPqY4qTS9yxn/vn Gkxko+d25gs75cXfYKXEnA3AGRwVhKr+M+nR9nQzZgctxi9FQXkoyPThwUy4ZZTHDTBmDc8UYaI N X-Gm-Gg: ASbGncuMZE+hJ1YAokha+aPCMlWaERWiyev2pWCehufB8MfLs6iaqv+I8xC7NEqlqTu J9+/vcMYM9SPlWxBE+aIoWhx3Rkhhar1arDZJyamj3fDprueBQPXcQtSQdBsjtS9WRH8nBUJq2v HjRUfv4TZu9AzVLiUvRDQILgh8x4T7mKu/5pSVe/P0ionCOq879LeCH+DfhD1oOHJgLqjtGatvY dp/zJieO3IVj8eBVnllb0iiW8Llmt8qQTtETlUTwUzAYX1FSa+kOA+/Gu9Jecxme+8guhcezYIp GaiCmFcuD0Q0kGjUHgXrKVhhj7UtnfmmTrW9BqkBtbWI5ozAwhUg2q8xuV1gyl0FlDYmY3+CnJM fzPrDiFVy4A== X-Received: by 2002:a05:6a20:c906:b0:1fb:e271:82e2 with SMTP id adf61e73a8af0-20444ee7ff5mr793375637.11.1745456220111; Wed, 23 Apr 2025 17:57:00 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.56.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:56:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 118/148] target/arm/cpu: remove inline stubs for aarch32 emulation Date: Wed, 23 Apr 2025 17:49:03 -0700 Message-ID: <20250424004934.598783-119-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42e; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Directly condition associated calls in target/arm/helper.c for now. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-23-pierrick.bouvier@linaro.org> --- target/arm/cpu.h | 8 -------- target/arm/helper.c | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index b1c3e46326..c1a0faed3a 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1222,7 +1222,6 @@ int arm_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs, */ void arm_emulate_firmware_reset(CPUState *cpustate, int target_el); -#ifdef TARGET_AARCH64 int aarch64_cpu_gdb_read_register(CPUState *cpu, GByteArray *buf, int reg); int aarch64_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg); void aarch64_sve_narrow_vq(CPUARMState *env, unsigned vq); @@ -1254,13 +1253,6 @@ static inline uint64_t *sve_bswap64(uint64_t *dst, uint64_t *src, int nr) #endif } -#else -static inline void aarch64_sve_narrow_vq(CPUARMState *env, unsigned vq) { } -static inline void aarch64_sve_change_el(CPUARMState *env, int o, - int n, bool a) -{ } -#endif - void aarch64_sync_32_to_64(CPUARMState *env); void aarch64_sync_64_to_32(CPUARMState *env); diff --git a/target/arm/helper.c b/target/arm/helper.c index becbbbd0d8..7fb6e88630 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6563,7 +6563,9 @@ static void zcr_write(CPUARMState *env, const ARMCPRegInfo *ri, */ new_len = sve_vqm1_for_el(env, cur_el); if (new_len < old_len) { +#ifdef TARGET_AARCH64 aarch64_sve_narrow_vq(env, new_len + 1); +#endif } } @@ -10628,7 +10630,9 @@ static void arm_cpu_do_interrupt_aarch64(CPUState *cs) * Note that new_el can never be 0. If cur_el is 0, then * el0_a64 is is_a64(), else el0_a64 is ignored. */ +#ifdef TARGET_AARCH64 aarch64_sve_change_el(env, cur_el, new_el, is_a64(env)); +#endif } if (cur_el < new_el) { @@ -11640,7 +11644,9 @@ void aarch64_sve_change_el(CPUARMState *env, int old_el, /* When changing vector length, clear inaccessible state. */ if (new_len < old_len) { +#ifdef TARGET_AARCH64 aarch64_sve_narrow_vq(env, new_len + 1); +#endif } } #endif From patchwork Thu Apr 24 00:49:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883856 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204989wrs; Wed, 23 Apr 2025 18:13:51 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVW4nJe7mUtcS3CL7hEJzItTPfQV2W8zqIWrSz7K3u5GeMCvE1IQETonhjfcZ5ONwki/KpChA==@linaro.org X-Google-Smtp-Source: AGHT+IGaGREwzJGEnZ4m0OVzaARbElGiOkuoKjXhE9siPC6LPR6arg33b0/fWaPlFqI4j+0MrEIb X-Received: by 2002:a05:620a:2588:b0:7c5:562d:cd01 with SMTP id af79cd13be357-7c956eda7f9mr163025885a.16.1745457231676; Wed, 23 Apr 2025 18:13:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457231; cv=none; d=google.com; s=arc-20240605; b=MhXUn5CqCCAPV82IMlgIk5kCq0+5hBdE3HfUHXTbt1h1SfAS7kM66BxLP45SkHwS4X 3GLFd0Y5OTgVl1D1Os1X0+6PZFdtpsU03cjS2wzWpd8m5a+v04s+mCRwVHnTJ0OY+G7I ZT3ueAKfSAH0tUUBrs8Ane9Xhw47tnT2AwB0H9t5Ly28GO3BKHQWfAfdTzuF9r6OH0Ub 3iNqreINRxdqyHNF/NvqiVmw41bSjcSCCMZv+E5oqTh35qHVmp9Qlbu7BY4NlPKQN0kw 9AoqXQZB0UzCuBAErFtCqqUqq9mCOkvCDxf9v7qMZc8488UKwA55GKInULeUxkZAvxa/ MRlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Swy+toUntFPIZLsZyS/sq5veF2DhYECVz3JKVwtsdjA=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=TgX7acxepiaeHqXLFpKQxSpBlbofSu9971sGcnFFxvsVAW0iaqT+QOscP+jZNY06ba NmP7k1um+6j1e9SSL6LFs3NuRCl1lkDKzOTnYD79NkI1LqbsFdwjFKJF6QARD6b0WZeH 1A26ofXh20VOEp46ZudFm3madu72iApCNmg7B+cf2pb4xod7+DWUAJwnEPHhDqo9EdOL 0R2+jXngNSE+xacJquPoThCIF9rF8Y0f8bdTCrwZelTriBywN+7lXfo1CcVJfmU32okA oH2oAs4JR8RsIYAX9IAC3ecGgzbfiHbsSrl62E8zUkvqw+kKaZqdEb0eHh7TFQGvHh4I F5qQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tSePn71A; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958eb8b39si22074985a.478.2025.04.23.18.13.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:13:51 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tSePn71A; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kva-0001o1-3i; Wed, 23 Apr 2025 20:58: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 1u7ktl-00068s-Hl for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:09 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7ktj-0005A4-Pc for qemu-devel@nongnu.org; Wed, 23 Apr 2025 20:57:05 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-7396f13b750so433188b3a.1 for ; Wed, 23 Apr 2025 17:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456221; x=1746061021; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Swy+toUntFPIZLsZyS/sq5veF2DhYECVz3JKVwtsdjA=; b=tSePn71AqO0CTVR/BkJ7U/9s1x3IV+3l4A5E110FtIFIk5I8Vnz86rF32cnhWu5Q+W edl9UxPz8R8xcx3jLraaGcpgMDvsYiVmHJ3xzgAeVJ8lQAMLoXyuaPZkDqBcYp+Uf/fu opoL/ijX+q7uz/qRp5OA6VfK7+Zyr1zHR1ZB7BKl3VBYcHl+w9nickm4/le1eWB3wZSt PqHTB6zqijyYbIJo2EVUwuvNJ26S3AV1pf6ntTeF+12+SFVoypMZ+4Rfx7RTvODeu2lw 5XeqIpt0q+nol022CLf8rHhZOqOgjLeSejGXXNNQ7izaT09cgwcvrOxGkd0TuOPFg9jv idew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456221; x=1746061021; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Swy+toUntFPIZLsZyS/sq5veF2DhYECVz3JKVwtsdjA=; b=GJbJDefnyQ14YoP7g0mnlPyQfBTHPlFm3eBnJBMx1nrdXtmeHWUqRcewoEiQ2ss6EO mk27v18vmW/c0V6aBzPS8NFXn6z4D6SOwHOXJhM8x6+fqnXikVhb0CR83T4Fr82TQGic /ZJEV09ZRnbwqWg24gtVa3joZJAGSWnkNiLM3BGiOmv36e4huwe4pvMBpJKYQtfUAeNM 2CRPN5yeLBd7ElSjbHQaxXwL9KHoNkMTGV5Wk3b2zVdGwfP6Lx/7wdcFDojQI036g94F BMxkeDsQfJUzPdaVhG7uc2jIOaXcxtYSljuLqJMOU/DUXFWj0bdTL0AI1f+SPmvnx9m0 f4Eg== X-Gm-Message-State: AOJu0YwtdIEBut6sRz7Zr68mdvRtrweKdRoxe+/rG9GpkfgbZJdlo39b bj6aZIHVZdaU+7oKIt0pWB54/Mq/KDCb2zmFazXpcqhJwFlHpDodl6xwa0DsCIMVMcvDQrvhuJM U X-Gm-Gg: ASbGncsih23ajOznmCt/2sINxhhD09aRpg9DWBtys51QgKy8Axt+7Xe2wGamdq0kz42 0X/8xyCiZf7LSaFbqBZSqq6EU2C7uuUZMWsxe0bfegb4HXQKaoTIKBpn5GcLM5Xkokr4L0Femyr I9rwLXXm/1enMf/D/sLkZF16+TMudnAb+9NORnsfo6RMq3UhaVHwu7yRQ0JTvVzmSMAwt3C5Ocw MDaLj3ir7FIfAgZYeQwVT77DAKBkzETC1UB6m8WvTiihPKJLSyzlrv79dHt5Bc1q/fljzwxXGtF dfLhw2oyN3ZNrNXLM2avv3SJo+69IqYBkd4fKnZVGYw2biTDB5/MqXgAalW8l16JDN859D1Ve14 = X-Received: by 2002:a05:6a20:9f89:b0:1f5:70d8:6a98 with SMTP id adf61e73a8af0-20444d21018mr968697637.0.1745456220712; Wed, 23 Apr 2025 17:57:00 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15fa907fcdsm119775a12.54.2025.04.23.17.57.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 17:57:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 119/148] target/arm: Expose Aarch64 helpers unconditionally Date: Wed, 23 Apr 2025 17:49:04 -0700 Message-ID: <20250424004934.598783-120-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé At worst, for 32-bit arm binary, using these methods will now produce a link time error, instead of a compile time one. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20250403235821.9909-37-philmd@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- target/arm/internals.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index 01408e40a3..d24acdd672 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1808,7 +1808,6 @@ static inline uint64_t pmu_counter_mask(CPUARMState *env) return (1ULL << 31) | ((1ULL << pmu_num_counters(env)) - 1); } -#ifdef TARGET_AARCH64 GDBFeature *arm_gen_dynamic_svereg_feature(CPUState *cpu, int base_reg); int aarch64_gdb_get_sve_reg(CPUState *cs, GByteArray *buf, int reg); int aarch64_gdb_set_sve_reg(CPUState *cs, uint8_t *buf, int reg); @@ -1826,7 +1825,6 @@ void aarch64_max_tcg_initfn(Object *obj); void aarch64_add_pauth_properties(Object *obj); void aarch64_add_sve_properties(Object *obj); void aarch64_add_sme_properties(Object *obj); -#endif /* Read the CONTROL register as the MRS instruction would. */ uint32_t arm_v7m_mrs_control(CPUARMState *env, uint32_t secure); From patchwork Thu Apr 24 00:49:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883918 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3209425wrs; Wed, 23 Apr 2025 18:30:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW+5ZncThDcoBgz/nzpPByMa92aTVtDviBJrd3vuYCf3KaLfY1bqXyQb3HG0h07Wqa6B8SXHQ==@linaro.org X-Google-Smtp-Source: AGHT+IG4Pt9ah6umMqAzgCFqRCnFPMGHit1SJ5cRY9BRakV61eDPD+QUOTZWhE0fKB6l7hlVMrvH X-Received: by 2002:a05:6214:301e:b0:6e4:269f:60fe with SMTP id 6a1803df08f44-6f4bfbcfd4dmr17698846d6.10.1745458204042; Wed, 23 Apr 2025 18:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458204; cv=none; d=google.com; s=arc-20240605; b=V6UdBomA0UG88ImUQbjyGYgRUkY1hePjiZXMXNVcM67Mnx2yp/1LmD37YRhmM6V9XD B1eutKg3N8nIPdgV9naNQLPRyW0px4FGy7N9yrjO11eeMaCs2qnICWMVmZo+/2njbYEV c5sE34D6eOl2BcxtroEv8Bnf5qxbMLvDj3OPx8/aZF0HG9rX7kVp/VOpxOulNJ99Y6ds 1SJ7ZlJl0Baf78f3/Y/4z4I9plKQfCmHfXQdv7S3u2zMNIu0Jn5eqnsipC+R9oxZEzYE wBqb3OmDbW2/mvFxKLCkXKrid+kzzzMmqMLHgm482+02zcPvVmqR+RFO2TBQqFITpEmF wmtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=34NdhhU3f0ctFhHISwM+Va89Ek8XPnoY2t73ZYMcmeo=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=NuJs/iMbJZdjaYiV6raL8vDSEwQVYMAxiRkprV/helYKAwq7UPpzwl5Nt0hqfwo+cj Q19oDxnnN4JJ4Bi8VwTYxjhe28H8dVdPO70hzyG2H6MNwkNLwUA5fWf4xDWY8PVR059f R4WfzvbM90zb+T9n/OEwGo9DeajmiTaBp+PsctdqI9SDjy2aMC82RQwP0qF+PyEd+bST f8/Pujiw31bXFjYryOkzjM96nVatjqehttuETr13e2IOujGy+L+7LNGm7twG8Rq18lxL oxU4tENHtUrM9QGIGg2k41wsppSV2+RZgyo4RXLEmhbNZT0fHY8FZrZozmQSQcwvckFR NpRQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="HqV/aSIX"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f1d56cdsi5775911cf.18.2025.04.23.18.30.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:30:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="HqV/aSIX"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kxV-0006T8-2I; Wed, 23 Apr 2025 21:01: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 1u7kwg-0004Z6-Te for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:10 -0400 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwe-0005Hh-1R for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:06 -0400 Received: by mail-pg1-x535.google.com with SMTP id 41be03b00d2f7-af5085f7861so266867a12.3 for ; Wed, 23 Apr 2025 18:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456402; x=1746061202; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=34NdhhU3f0ctFhHISwM+Va89Ek8XPnoY2t73ZYMcmeo=; b=HqV/aSIXIZsvT5XMscle6kjuWfCJyEit/9LOL+aKZq2/l2r9s3VnXqDyVcc9Hm8Sxf k04yGlPdBuKoGVgo7rEvKrjPKp3E7oLlL6Q4eHzlIN6wprtCtu8N9mStq7h6dJjmg4a5 QDj9u8/tRKHLxXr0sKzxiiwozVP8OFDXYNhhZV5h1EKtuGTqrSTmcfQOoH5E47ilgJt5 KraPxZ3ox/hAG3pdPG2pB0WTJL5dPFIFlxO12zrit9yCTqOT3eQJhg71fuFGBIbIR7sk TtpZt/2ye39ak+iecLWeXXgV/tlzqHQYLEewxlndu6YUqs8osjw4YdintDuAHZjz9udJ DFpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456402; x=1746061202; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=34NdhhU3f0ctFhHISwM+Va89Ek8XPnoY2t73ZYMcmeo=; b=kHuO7rN4Oyn8MyMIKSDai/JSKO0tEUDiTI2VsGs8NmE7+7hfrwtM7oxqViUZWNvfor eK86coSe+RgEIZZ3hVTX8iWQiPweMAB3QubCgHEnOmAbbJ5oQUjJc8vtUHLCpzj8kITY ifu2Jfiz7dHEPlX6YqgMIDSbI3/LlOFwCs1lHUq5wiKaHsJjD2oS2s3HrCMsTnpreRp8 ty24eTeqv4RfU89Smqe7LckrBgnywPiiOTupDaPFsrnLtThLaTRFyzxYaCIzmu6xrL9W 1DUnkdhG9kPUPvqxpbg48BTtakxIrNYzOeDrVZUEAl0taVYrdsK+6nuO9oxND2UGY9RA 3I6Q== X-Gm-Message-State: AOJu0YxpQDlfRUzs9v+jphsZLFuCUGOhZFJ8Id0ap+jQIvdGkJjEyFRG wdv3QG8KoyfpEKrnrE6H8cSYsUg4+fGz2w8xkZDUuVmrIOHgU3KSrVS3NTcElDB7fGTzm+u0iNO p X-Gm-Gg: ASbGncswJawoLxeHOD9wR2lM8HrKCJBGX6ZOVbgyA+VklfFT9XGQPv2d3SvqyXgCR8R a4+mnveMMYgzaNX4qtx3qMOAn7ZysZJjR4Sxls+hsB16JG1rimm3nNOLkgsnBwCj83lKQB/E6uv 1cyV5lrwuR5tcBFJOLbXG5WmNhANVAWTOQAQjUplMV1AeKbV3bLxI/YG0uCyqAdeFdmdXNHRmMa ph2ooxk4+aqw2Ku7VBoTcOP6WMRShrBS7RbPViDlP7+Ktr69aFpWvoXQi74oe/vBqXdtXhjTXsZ 5IhAivtx2uMUSqjQQa3z6GJCTVEk9xmB36vxlC6Tnb+PS13wtVvgCHlTWnGhdTfA2agt8FwhhJe wPyjwQ12bDw== X-Received: by 2002:a05:6a20:9f4e:b0:1fd:f4df:9a89 with SMTP id adf61e73a8af0-20444f0e60emr1002446637.25.1745456401851; Wed, 23 Apr 2025 18:00:01 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 120/148] meson: add common hw files Date: Wed, 23 Apr 2025 17:49:05 -0700 Message-ID: <20250424004934.598783-121-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::535; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x535.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Those files will be compiled once per base architecture ("arm" in this case), instead of being compiled for every variant/bitness of architecture. We make sure to not include target cpu definitions (exec/cpu-defs.h) by defining header guard directly. This way, a given compilation unit can access a specific cpu definition, but not access to compile time defines associated. Previous commits took care to clean up some headers to not rely on cpu-defs.h content. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-24-pierrick.bouvier@linaro.org> --- meson.build | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 657949326b..bcb9d39a38 100644 --- a/meson.build +++ b/meson.build @@ -3682,6 +3682,7 @@ hw_arch = {} target_arch = {} target_system_arch = {} target_user_arch = {} +hw_common_arch = {} # NOTE: the trace/ subdirectory needs the qapi_trace_events variable # that is filled in by qapi/. @@ -4079,6 +4080,34 @@ common_all = static_library('common', implicit_include_directories: false, dependencies: common_ss.all_dependencies()) +# construct common libraries per base architecture +hw_common_arch_libs = {} +foreach target : target_dirs + config_target = config_target_mak[target] + target_base_arch = config_target['TARGET_BASE_ARCH'] + + # check if already generated + if target_base_arch in hw_common_arch_libs + continue + endif + + if target_base_arch in hw_common_arch + target_inc = [include_directories('target' / target_base_arch)] + src = hw_common_arch[target_base_arch] + lib = static_library( + 'hw_' + target_base_arch, + build_by_default: false, + sources: src.all_sources() + genh, + include_directories: common_user_inc + target_inc, + implicit_include_directories: false, + # prevent common code to access cpu compile time + # definition, but still allow access to cpu.h + c_args: ['-DCPU_DEFS_H', '-DCOMPILING_SYSTEM_VS_USER', '-DCONFIG_SOFTMMU'], + dependencies: src.all_dependencies()) + hw_common_arch_libs += {target_base_arch: lib} + endif +endforeach + if have_rust # We would like to use --generate-cstr, but it is only available # starting with bindgen 0.66.0. The oldest supported versions @@ -4244,8 +4273,14 @@ foreach target : target_dirs arch_deps += t.dependencies() target_common = common_ss.apply(config_target, strict: false) - objects = common_all.extract_objects(target_common.sources()) + objects = [common_all.extract_objects(target_common.sources())] arch_deps += target_common.dependencies() + if target_type == 'system' and target_base_arch in hw_common_arch_libs + src = hw_common_arch[target_base_arch].apply(config_target, strict: false) + lib = hw_common_arch_libs[target_base_arch] + objects += lib.extract_objects(src.sources()) + arch_deps += src.dependencies() + endif target_specific = specific_ss.apply(config_target, strict: false) arch_srcs += target_specific.sources() From patchwork Thu Apr 24 00:49:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883913 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3209263wrs; Wed, 23 Apr 2025 18:29:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWhD9wUXL6O7AdmCHmMEITzaT5WZV5Y9YUFYZGIlM9tMMj02g5QUP01oKsqVwKBvMBs3GO7fQ==@linaro.org X-Google-Smtp-Source: AGHT+IHpv41uav7dkfaBAiaxra9uv6i3XRjC0Tp0QQ4WvO5EBg1mUa9yVMUTxTF5u/APXJ0HCSbX X-Received: by 2002:ac8:5810:0:b0:474:fee1:7915 with SMTP id d75a77b69052e-47eb30b294bmr10957121cf.31.1745458164618; Wed, 23 Apr 2025 18:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458164; cv=none; d=google.com; s=arc-20240605; b=KlbZCCj5e1IPBnoorccDzyRKpc1wnIFySPAdNrA3BfXysE7SN9uEIvUZbk45pMVIol pplQUWyFWubBOayohw7wQSXoWLaxAg3qSOnjuNpXO8Y+S4k/01pJFi+ZaGFivF56Uv9+ I4GWwHUFVS2R5LsyrVTIV9v1PhqnV/ejvWAs+Dle31gb6AyTTYtNvlTCJzrzDJoR9UUE SjfryD1TpHIlFiGotoAQuFy0yLD065Q+WK4eEGzs6yf5kfjIItuhNEFCtO7t3RgzHG9V PW6NdFHdaTUV00i0kYZaA2aDw9F9curzAnGfyWAx/+rjIpO2YrtsU3kyIcl1mPCI+Jri vPCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tMTFwuyzTM5DV5D1Qj0NNV6OmW0mRELjIvfKoj8LUWY=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=KfLPP6WbttGqtSPaFaGSgpz7Tj1GRlpbM7iRdguIJNyPsWzUagV+X426aYlYSj3cV3 yIK2uk8ltLo0w79G0x4G+zB5I1yEdJnI4VcYA5ieO8Xno4C3rmJWcWGYSGrV8vVQ/7y8 Wr6v0eKcJjLA1S+CF//lTEv19b2cJBoe3qBJ0S2HltYlN+OCVxFy5B8GVWO00ACUN23g /38I1aOSJv2I1hz8Mes7KEW13hDvX0rHoGKSSGfCDAsZQAilWBSn+//YkVPMATNcgcJX moA4fX3Fb9k67SfQ4hU20LwrKmIi3Yf7vXoKEhOzJOOLr0p6qdzX74jwdy51cP1YWkBj TdOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LaE7ApI5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f8ad0b7si5836601cf.141.2025.04.23.18.29.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:29:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LaE7ApI5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kwt-000586-Rh; Wed, 23 Apr 2025 21:00:20 -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 1u7kwi-0004d0-KI for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:10 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwe-0005IK-MF for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:07 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-2279915e06eso4597945ad.1 for ; Wed, 23 Apr 2025 18:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456403; x=1746061203; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tMTFwuyzTM5DV5D1Qj0NNV6OmW0mRELjIvfKoj8LUWY=; b=LaE7ApI532dyxl0UvnysQXJyIY8MUWUcqFvFINVxxcQXdGixu69LylKgAFsiFiKHT4 ggML9CL/biKRH3GUA3Hzb7lB5uKMXhmxnr/3XQlmWjNO/brhOXkMr2hUTj7Dw5m++RMB gSRjh4gt0VOpXmUrI3hg11/GpEjyeR9sPkv+SnEVco1EEFPIW1BvcRiGS+F+15Cf4ti4 4dDdK4cpCdeQgRzNjAjSkLJK2ZLUpg+B6BT78T1iygFE/tXoUSOgjNLx/4BN0oNpFa3s zfPRmCKpFb5+JHWqOTpxddLWfUZ+GGP/OMQmMuSIkm2lUtDqMCzU4O8hneL/2e0OBpoi iUog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456403; x=1746061203; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tMTFwuyzTM5DV5D1Qj0NNV6OmW0mRELjIvfKoj8LUWY=; b=QIGEEbR+KmrJmJDOXUznD3NW8lVyww1PHZ2Z7EMsL9pckpYliBWNhwkiS8+GHDi1nN 9nHOGJohFPaUxpavX1GNdJSG/3OLgmsSM4JPXOH2Wg2WkBonleggXHanZrZB8bbMJ5Wf Fef1VpidJYdDX63Qn7Sq8gr94W06IfdnA0FqozMeIJkk5ugMuUiZWYukCHSUmWm3UBRk MrLK367VtiMCzrEoOehUwJ9C1zmR9q31oQkz2rgDL3kpwN3qyGZPYKoEwbchuQKrq3zy HXt5kJnjpiERKSsk/ekSoJ7yBm0VDACItZ9WxQ01XX4DOQS9vibK8/bjwTdQIW2R3APW gPjw== X-Gm-Message-State: AOJu0YxYxDqTssU76rLcc1F5ezvZg0aBnYbxqM9b+Ock4kve03hNGV4C y1FwTp02QzJZY3b3/QB1PwsP5AG39C5EF25NpOpMS0NMzRlAK1Xdwaxk0ZqjnGcmX605n0PLgWT 4 X-Gm-Gg: ASbGnct2ot3wlWtFjzFv+LH31sSFVXlatE0IhS2qOspsc/eiw3GnSafxHYnhk0p/43N 2Tea7iqx/xOdNcd2O2yWwnVPV/ChOxHxQnFBtz/5C8jX6yekFhPBY8K6AUxAUJjOy5Vbv1OtUNM IOLRfAAdwpftviQk3UPotSFqiTf+2CX6+6s3Fw2RkKAvo8wKRKkZlUQJFluxPL2sRa/ticVz9cm 1maSSRNwkH1sYV3oo2G/rx9YcTJlOF0CZzl86Q4XE5a0dUqGiKCQ+4dnUBGBeRSEqwy4kW71LCz I1eUKC9pMSkREgaYy++qRRfr6jYWSlfVsaCNSocI10GVP4MUkX1sKdAMsZ15dPIfmF825EMSLlg = X-Received: by 2002:a17:902:f652:b0:224:e33:889b with SMTP id d9443c01a7336-22db3be43abmr10597835ad.12.1745456402642; Wed, 23 Apr 2025 18:00:02 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 121/148] hw/arm/boot: make compilation unit hw common Date: Wed, 23 Apr 2025 17:49:06 -0700 Message-ID: <20250424004934.598783-122-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Now we eliminated poisoned identifiers from headers, this file can now be compiled once for all arm targets. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-25-pierrick.bouvier@linaro.org> --- hw/arm/boot.c | 1 + hw/arm/meson.build | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index d3811b896f..f94b940bc3 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -14,6 +14,7 @@ #include #include "hw/arm/boot.h" #include "hw/arm/linux-boot-if.h" +#include "cpu.h" #include "exec/target_page.h" #include "system/kvm.h" #include "system/tcg.h" diff --git a/hw/arm/meson.build b/hw/arm/meson.build index ac473ce7cd..9e8c96059e 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -1,5 +1,5 @@ arm_ss = ss.source_set() -arm_ss.add(files('boot.c')) +arm_common_ss = ss.source_set() arm_ss.add(when: 'CONFIG_ARM_VIRT', if_true: files('virt.c')) arm_ss.add(when: 'CONFIG_ACPI', if_true: files('virt-acpi-build.c')) arm_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic_boards.c')) @@ -75,4 +75,7 @@ system_ss.add(when: 'CONFIG_SX1', if_true: files('omap_sx1.c')) system_ss.add(when: 'CONFIG_VERSATILE', if_true: files('versatilepb.c')) system_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c')) +arm_common_ss.add(fdt, files('boot.c')) + hw_arch += {'arm': arm_ss} +hw_common_arch += {'arm': arm_common_ss} From patchwork Thu Apr 24 00:49:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883873 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3206694wrs; Wed, 23 Apr 2025 18:19:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX4yhhsKOgeJHlpwY39F4yKd76F16zvHnPmuARzP8SzIcv8y7asqKfSFXyWDOgwdJUkSbmOjg==@linaro.org X-Google-Smtp-Source: AGHT+IHry3JQm12glV0I1NRAAj33sJTDRPROpFmNk86iGPCd5KO9QcejTwHGMF5daA56Izk/tLQu X-Received: by 2002:ac8:5d10:0:b0:476:95dd:521c with SMTP id d75a77b69052e-47eb4fbbc2fmr8277521cf.45.1745457555371; Wed, 23 Apr 2025 18:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457555; cv=none; d=google.com; s=arc-20240605; b=DbPCinvK38kX6/QP85iVXMZNJAKiNp9g4lwn5i9H47B6GJk8gTl8rUvxNQnhmqMXxZ hjOtZWoKhOANIBl6aqigqjIiOLzrOJd7bnfqzNdMpSY2PEvl8MfLnSWMcOQrQfjsvCjM 6/Vi8xMvRpmVUlNlXreTU+WorzDeJlfoCJ/7gguwLyWCir0nnW/rg/oXz8K9BM1nnYD3 wKTJj+a+E6SQNz20aX4sB+0jvQt0FRDiaqj2xkL0t29X75dV0dTYJMrBpy6UkHJkO3Lb /BvxqDtwX+zO+RCeYo6McV+yReqcv09j1neHjmrRR5LsLe3GH2MvdQY000akgLM8URH6 oi8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z6H/GoAoFwszVT4TvnJT7Vzq/vNV9Nxqb0K+QM0Htps=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=jds9h4QMNeYgxZXH3/f4Ho9mjHVkiPPeJFFvRd9tMrYjKa2zg6rU0u95m7WwbIrVWk G0BNihxX4iJsEntZAIi0HXPi2gR9MB3HV2cUsHUIJ0UMGyOAFyPXnbH86fJJU+QSCbsi 7hivJf5QcilL2goTqLpnEcTo44NSpi7lky9PobKS/NuYdYC8mJiF61bHzr4q/hb2lHsN /NSD5uVgbXjX172VNOSfeRKgsnZpFsDil4F1/Zf2hkLohyh6gEMKTpbSlkxB1ohop8Bv ID7z8CrBMd2/Rah8cQuOOpcEHAClmJkjDnYiPuKixYjpbcI2xAL0lWSLRQZjFrretU3B QABQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SryFA+KZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea25ae833si5085411cf.549.2025.04.23.18.19.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:19:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SryFA+KZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kxY-0006VH-SE; Wed, 23 Apr 2025 21:01: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 1u7kwi-0004da-QA for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:10 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwg-0005Kq-7a for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:08 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-224171d6826so6272405ad.3 for ; Wed, 23 Apr 2025 18:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456404; x=1746061204; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Z6H/GoAoFwszVT4TvnJT7Vzq/vNV9Nxqb0K+QM0Htps=; b=SryFA+KZ8Bnz2IkFafX1A1SE3EogIQGy0hr5JZ+HIOkk+VPASsffdGNufsiOmgsKH+ IcB6hproCBABxRzGhomM3rJwhQ7TLH1Re61pnTzBct8W1NghyIRx/Vx53JDEzEYNHfQX wuyGcRRE7vPD1WS4xMbXRrXRPHfcj8pRC2aEjD5QdhNUabTvgR9FAcBzdY2Z9UT5DGVU fXWBduuQ03af2I3Ws09JwZNxAxdTS+7oFetkFoyYN2+56nPugsuEvvdg1dIM8IPTMNmt rCyhiBtJcUDU6suTFtNtCRWL7lDXeMZwZEjd3fJfUoqVETu5xWfxfDKDWRLfTHSJS8yg BPPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456404; x=1746061204; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z6H/GoAoFwszVT4TvnJT7Vzq/vNV9Nxqb0K+QM0Htps=; b=o6JYzqQgfbg+gGwdnblgWJF7zy1wLoUNsRLGGzhtcv/fNJA3p3J+OgB+paf0xUaZ6l Ms7wCbgMSfyX1WpxTnpE/NUQyiJPKciHhshw4xKfu+to7ovWVgc+2RqOUjKGpkM7PLwO QIVOfQCjPKh+M790IuZHEboLTBIYWex1UhAVdx4OEhH5N5rDI03On7u4TJrL2OSIxP5/ b8E/0cmN/uFfkydj2NUXvAgOTIWjWG+EUCS5dqG9J+6QbDUecPw14lNjWB6RZ6xaKQY6 n40dKWeHAGVNlhuRmOuFqMcC5iDxH5mpiddPVSbmeY49oxHh9DdtIZ6IAo5prWyIqzWN YiQg== X-Gm-Message-State: AOJu0Yy1l23bpju8tIfZXvbQ41s/Kr3NA9cBbv+LSUM8e3fZHlUHCLTg 6iDyMBow6uhKvUFtMbthq8Y1m9UW0XXJon/08tK/u5q9/tK2bEwhN0liebrM8CFbHEFi/q9I6fz 6 X-Gm-Gg: ASbGncuNu2pq9KNq7tBABzg4gJq8aMJe2OtypkN1QIO5VhbuUT8LLQqFySgu1ZLIRO+ wPwiwtLQNQMdwOWbhiKnDyYRsemqP4HTdUmIyUAsZc5hNTnBhFMuGMOniJfwl5zsI/3QraZidnc Ec9zA6gdCQLlN5IsMSd81yXVkisWg9Oyy1f53cO3e0sS55PEj9TXggj1BxN5C0Tufgtm3Kwv/2g lVOISL1ckQZyb1WyYNyCidvBMSKl1CUUjrS1L76hQRwIB5ZlBRtfyV2iio5DaqugoD810i9sAOB I/fg2cSYVlNq/WDDbi7nW5X579ZXhQG2frrIbY/qPZvSf0EP4/t4+w/nPuO642t7vyxX5ev6slo = X-Received: by 2002:a17:903:3d07:b0:220:e023:8fa6 with SMTP id d9443c01a7336-22db3db9284mr7710685ad.50.1745456403682; Wed, 23 Apr 2025 18:00:03 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 122/148] hw/arm/digic_boards: prepare compilation unit to be common Date: Wed, 23 Apr 2025 17:49:07 -0700 Message-ID: <20250424004934.598783-123-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-27-pierrick.bouvier@linaro.org> --- hw/arm/digic_boards.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c index 2492fafeb8..466b8b84c0 100644 --- a/hw/arm/digic_boards.c +++ b/hw/arm/digic_boards.c @@ -80,7 +80,7 @@ static void digic4_board_init(MachineState *machine, DigicBoard *board) static void digic_load_rom(DigicState *s, hwaddr addr, hwaddr max_size, const char *filename) { - target_long rom_size; + ssize_t rom_size; if (qtest_enabled()) { /* qtest runs no code so don't attempt a ROM load which From patchwork Thu Apr 24 00:49:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883843 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3203192wrs; Wed, 23 Apr 2025 18:08:00 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWSig4p8Omr0MUq32TofmO55n6zVtN5Xpktrsuy0/5Py4pYlAo+4PFd9TUxyRRZiqfqG+Vxqg==@linaro.org X-Google-Smtp-Source: AGHT+IERkG9UTS5jN2/NxQWuz0q4U8qIYNeAXHkvhslzRTxQjzPKvCZYrD7MvXhMq9pG62IggEuO X-Received: by 2002:ac8:5a8a:0:b0:476:91f1:9de with SMTP id d75a77b69052e-47eb4aae45fmr8829821cf.47.1745456880360; Wed, 23 Apr 2025 18:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456880; cv=none; d=google.com; s=arc-20240605; b=Uo5LZH5LPqEFi78RVYV9IoOc1yx1VhFwhlp9lzGIcxYknzw7ku49DtQLfmKHeiixJs aF9Evul2/isEDUQdwWW1owfqtMTZ3dmsIGEV3WWtD+bnCTjlMzsOvGVQ4beb5LqAfggT uMXynob46DYKuzg98Xg3Cw7MmyY52KcvBIW/+sadSFB1I1bwrCSCEPNotjv+pQs6FwSH ++FWSZ1s95vpOE3R9pPf+vCeiDxt7dkHD457xiMSwiD4UE5WsxRIBmm+ixUR/efLAU75 1Qi8cEke+nPyTn1+5T1isiGhpvNHZmnraZpniaRSWIQ/ZRlzsUAR/Tp3KjbQxmcKnVuQ 4zsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8/mORInhxTSzgm/0P0f5jfysAlwA8buqx+1z5KmEz7g=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=JSdJLyRbfown7k+FQ5ywSM14cGoRm1WOt2LmG7xx6o6hBUOClC+Jqn58TxkqSth0K8 ++5M6x/oZMoaIB+awobxdt+tjSlFdILrYUmyEh0fHtfw1zV8nfUbH8lnKbJP3htP1rCf 2SEw8U2G6LxmwQII4raKsBgcDmWotSbtGz4Tuj5Ospte+ibUeTXTHPNLe2jXStgHMqzX 4nc3QoGv9TN+wKQ2JftzuPlLJSqp9Vu5s67O10EkL6St0RmGEpd2JTBmIoxA+7c7hRpV VJ+J48zIhAsxljlokbFr5Y41cxQwCJ6Ud9fW/ISrUQAwTcpTIWe0ta8rHITJpVg7BTO3 lRdg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z5omVdI8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea199042asi5148441cf.293.2025.04.23.18.08.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:08:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z5omVdI8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kyv-0008O7-PV; Wed, 23 Apr 2025 21:02:27 -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 1u7kwk-0004iE-61 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:12 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwg-0005Nr-D2 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:08 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-22c33e5013aso5504045ad.0 for ; Wed, 23 Apr 2025 18:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456404; x=1746061204; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8/mORInhxTSzgm/0P0f5jfysAlwA8buqx+1z5KmEz7g=; b=Z5omVdI86pcsUQvUNKAeLHl6EYZJzJAhQ6tPaYIUltNICZMCgPRhj5OoSmsA+eW6Wx yXoOOovPcocAuk0kckl24rUsY1qXw6QcZ15aIiqYFjl8c2F8L6PTRAlgSHiFX98e0K58 Sig3n6Nj69TfsDjKTOfVpfwSMT6Q0F8O1MyjgduOkQmJkxaAIIjwcq96ZT9Qm266vrKT R13K24EaNHMlUc3vnEHIr7AJvy0O9x0GXfyyskohRzfHS44Zop3JTPXK1FQPacN/wPff 4VCi3VqbA+ZaGq5Ui+/KEESgnF8fZyPotGi/RngOEaPsPMpQK9XUbbjxkQvP1ruhg+VK 8BCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456404; x=1746061204; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8/mORInhxTSzgm/0P0f5jfysAlwA8buqx+1z5KmEz7g=; b=KXMmgVViKxCTgTTRnJUOryD6vloVMncqZyI8Oq/mgaRJWkXELBGivxG4Y/29RX0xAX TSRhsea/FOyvTaxws4YtvJVoZ3J+LtjJ3QDUqvxYAfT+ZFGDyJn9AIEI98XhSt2pnkYy qkQbqKuYB1gn8Zn+JCDjmkMo01SMC00tcyC5H0S1BhyD2Bx8TA/6zQvW2NvIsPZgtpWa djzP8qqLxmCU5AA70PnDz/pBzGhjTZXqZcbZB0On5+zUrmh7r+Qv1DOnkYQFNV7Gcz1m 0DqtU/vVNCqekX4RlnPniC1IP3+hTIHrKgcXM4NJhDclH9UgOUNb0tNKKJvAWDr2hs5R S6bQ== X-Gm-Message-State: AOJu0YxPSvaCPhguVAJBVIXUN0KXyN7zjLzAuv8jdV8QfL/IAZZBaif/ TxK+pPUCtrZp/MxmCb5TLMgWmnl9lbtjE9UC00RPfWPL5eMz9W4oBfP0BWdy7sf9gzM6PZL/Vwf p X-Gm-Gg: ASbGncuokjGvFLfXxT51cnT47c3V3dSTRynpC8z1fl8dPzb6KApZFtFmXba9lz/xbpH DgIDrIyt92uPIIRc4vnSWlTkeJLAqQRXw8ttPe03UW8noFLeNKnny/c7hthTOQqgAjAOpnK4vym SwAyxHYKofTEOZ+QO2sRy167yq6TFX4pXBmInFwiSEzq1zpj9rHweC2nI76ObbjYzZ2hH3doCt7 1rWCF7S3MW3vAOcJ9e4HZw5/MK91N3LrOv8DGT/yFTLLrUo++G5GB82LIaTbzo/Nzcvg3ZNajyR VGSICiSClPj/zVwJSxkA8/lZu18RtoyMjdiuGJfNvddlbirFJAX0JiOOG0//S39vhtgG09ZWrMQ = X-Received: by 2002:a17:903:1b23:b0:223:53fb:e1dd with SMTP id d9443c01a7336-22db3bb2ce3mr8562235ad.9.1745456404501; Wed, 23 Apr 2025 18:00:04 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 123/148] hw/arm/xlnx-zynqmp: prepare compilation unit to be common Date: Wed, 23 Apr 2025 17:49:08 -0700 Message-ID: <20250424004934.598783-124-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Remove kvm unused headers. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-28-pierrick.bouvier@linaro.org> --- hw/arm/xlnx-zynqmp.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index d6022ff2d3..ec2b3a41ed 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -22,9 +22,7 @@ #include "hw/intc/arm_gic_common.h" #include "hw/misc/unimp.h" #include "hw/boards.h" -#include "system/kvm.h" #include "system/system.h" -#include "kvm_arm.h" #include "target/arm/cpu-qom.h" #include "target/arm/gtimer.h" From patchwork Thu Apr 24 00:49:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883915 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3209355wrs; Wed, 23 Apr 2025 18:29:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUaQyK9DJttzwiLeD22FHyMfjaStZyiUDh/wpkAOlyk+oBVhA62/RoMZXbNz8iXWYe45zDx2Q==@linaro.org X-Google-Smtp-Source: AGHT+IG7HpL+2eDbcmfr3oV12beEuvgJigkZA+r5bZ7KK2pJp7pomAw0bQLxvUo6/UI1/AhdhY7A X-Received: by 2002:a05:622a:3ca:b0:476:add4:d2c6 with SMTP id d75a77b69052e-47eb57c8565mr11877591cf.50.1745458186102; Wed, 23 Apr 2025 18:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458186; cv=none; d=google.com; s=arc-20240605; b=NVe+7jYihKmLkeTLKZFePMczSoNDQxhv9hHcgrsPcWg/fGuxTOAu7J+h6opGWwmWIn WHhinjGA4QQ2pnk62NbIgwri+58YjL3iHLUn/qPHinxiG0XY1fabNe1Uhaj3/QVWrV+Q 3+PL9QSsEG98NWjpMq5zsU42hoRKtOwYxIRpsT/js9+5geRmTTDY7pQTtF90TrblfUSm DYfKr0+/1QM55ZJ9UYw4YrmKin/427lVddCVmrwxiLONizXtwGByGv83jD2kWQxBdh/t SHNRoeEdB8EQDdzlWhQGR0Y8DR7/ANlesG9lhNjQcRypzpjQct7ylplpzNfiIJ03EvBB 6kLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8bSiUWMeDx637+k7z1EFvgbFx6ukAHC68XCTi+/msrI=; fh=6Iy23zC9AdgEjl8BT287tms7OsCTNhvcMTX6iUEgWw0=; b=DHKLUOxdt36ZCIwAoEAAIYs2YHVWL+PTc1p7Uv6+/j6lmadoGW63y+4RiYBq1XVim6 m58zbGTmyfvNql4XB+ZaV1xM5ZosBn9DzKdVmGAQZZWhBk8qgzrOvd45wi29c4tX8dP0 RpTK/pqINgp3EsmObuvL7dBTv/FsEsJ6HBvi3qHPUI0rjaOMtabVwOH4o1Y6yYP+aQmO 3mLOtA4OhiEKFrcIDj4yYWX310h+vQrnfdZYaY9h8poCCNZzByXBjRGxW7DTqR0smU1d bx9lK7o8fYU1zh1DKU8iB5B3T3L6kGqHrty5DvxnqsDwzc8HnStcOE67Pqb2toKqU2bW o8PQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kECSFTCL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1e95dc3si5344341cf.371.2025.04.23.18.29.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:29:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kECSFTCL; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kxP-0006Sy-P2; Wed, 23 Apr 2025 21:00: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 1u7kwk-0004je-Bj for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:12 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0: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 1u7kwh-0005Qg-2V for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:09 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-736c3e7b390so373050b3a.2 for ; Wed, 23 Apr 2025 18:00:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456405; x=1746061205; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8bSiUWMeDx637+k7z1EFvgbFx6ukAHC68XCTi+/msrI=; b=kECSFTCLSrH6r9Whxv7Akj/COfd7ECJs7F1jIJuOrDbnDpu1KhXtpJYlNy2WZxm36K TgSWiO+4ALEqMmLPPGQ+jOffY8ouCO5uZ5kASi8jqOgeAZLlPaTW+z/aCsCiyFHUFtn7 qjyJ9MNt/B4Y1zx/S08qgfZsTW1xVWBcgfND7uSLmhPX6e6PKu2Nnjjr/qhMip+nnBr6 ilURLSU8BvCh6YrOaZG18DQtfcPHvifNiWaL5TwKXnmnPTIbRXQ53maDMfx9Pnrcy5Vj zvOuzkRlW1/QULsF69nirGSvJgC6lN58CgjrllekRazJdCCXNVEDo+E87LMZa2t2uFdB SRRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456405; x=1746061205; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8bSiUWMeDx637+k7z1EFvgbFx6ukAHC68XCTi+/msrI=; b=KgqQLTQzWiOW64mCkNI8vnPCuS/Zvqy5+Pxy7qaZXI+3R22smAzk0sS0E6Fg00dx6F Pf9UlBLGszpdV9kX+U1OmL/7TYlEKA9hlL0EJaE/b6tym8n106s49dW5MSmUzc9FmxaM zBSRXsOYBSUikO0SvEG4vK6v+vywGCvQdcMTnCcHwZSMRBOjX2xH4Rzq3p+hqfm5zICP 7aZQG1cKEi38+OCkJ9aDV0QVUKtOvLe/XRgfIV6GJVO1xOGwzKp4+GenjYgZGGjN51pg I+xNKUXY9tSrylMymH4WL/wQva3DNFC/87TzFGXQ6/HEAXbRbYcRw5ip1wuhRNTJC69b gTYA== X-Gm-Message-State: AOJu0YzZamt8sZb3lIs3KiA3NpJe0xbDmwnWHhyxR5Ts5KsG/tAGoYLb lyfvxCdz5/zp5aerNWJaUK3S8voUI7Jv6nPl055pQKYk/QEjtS9GFBBSffPOywxoFePUVEVNyWl Y X-Gm-Gg: ASbGncsmjbm+EWxgL1CFrJds1bpR0xabT7FOL38GYEyd7b9r6Td6z/tR1VjWhN8ysY1 /VLAI9HRA7Y6sysh3qmGSi+0caND94pw+08CzxYtwkUO4OzQwPhU5GgFviuwXLMf8DRvGoT7HvT nxkM7Rt7sNEDWwdRQ8QqQj2XtKXcCmOIO22QLY9GEURTh7aORHWHcGXIt4ArxyYAiS3RLYyt69L /LTEBm0+E6u1gF+eVusIZ0OxFzRX/dE8nzuK1DlhnN25yATYTVLJEG+8NijSloWCL5TWFzVylu/ vaPuseL8VaaIJOenWr/G+5aSzBlG7aryIsFN93a++Z4NRwyoGQjrE+NkUu8hQkBl8sX19Dulaz4 hWk9I7iUf6Q== X-Received: by 2002:a05:6a21:6da5:b0:1f5:7007:9eb8 with SMTP id adf61e73a8af0-20444f0503dmr861611637.16.1745456405358; Wed, 23 Apr 2025 18:00:05 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= Subject: [PULL 124/148] hw/arm/xlnx-versal: prepare compilation unit to be common Date: Wed, 23 Apr 2025 17:49:09 -0700 Message-ID: <20250424004934.598783-125-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Remove kvm unused headers. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-29-pierrick.bouvier@linaro.org> --- hw/arm/xlnx-versal.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c index 278545a3f7..f0b383b29e 100644 --- a/hw/arm/xlnx-versal.c +++ b/hw/arm/xlnx-versal.c @@ -17,9 +17,7 @@ #include "hw/sysbus.h" #include "net/net.h" #include "system/system.h" -#include "system/kvm.h" #include "hw/arm/boot.h" -#include "kvm_arm.h" #include "hw/misc/unimp.h" #include "hw/arm/xlnx-versal.h" #include "qemu/log.h" From patchwork Thu Apr 24 00:49:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883840 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202683wrs; Wed, 23 Apr 2025 18:06:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV9SOLyc3bZ8gsaS4JQRW9c3bLr4KOHVciUUAqzAzZiiWRIOMfaHM2AkZZ1pzA7iEanpwP6iA==@linaro.org X-Google-Smtp-Source: AGHT+IEYNlcquoUJmOSAcEH9wBYnixGIbUVhALalAYwWXfXnibu5a149/OxS0imr4K/Efx9S6qIU X-Received: by 2002:a05:620a:4093:b0:7c5:5fa0:45f6 with SMTP id af79cd13be357-7c956f40c6cmr158076585a.50.1745456790060; Wed, 23 Apr 2025 18:06:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456790; cv=none; d=google.com; s=arc-20240605; b=FJpTvIl749r02JV2EqBCMyjkscb8v2o/iTm6BhNYVche+FegTGRAmDJhc10bVQknzX ROdh1Dpmn8GXrt/ApXxcl+gwWUXQk0ZhQ0LCa8GMen9Ac2EfSRPJ3KrkS7+OPSat1i58 m2ljKYAr+p4qZbBM2jm20Gc1X1pe0Wx92UxWhO9Iuv4kDBXiEKr020Fu8yRbrvTe9dS/ IqbtPtKoZJOGAYZZG0xc8mR2L53bvB9/8Abgy/SuC78jF1q06k5uGb1jYJ6nTZTBHhPJ ypRx33LH2t465Ta0nyUpWxhARIGL58jZpbE5J4NPn0qqivuAmMip8jEXkp4TsfCXUTYY 9L0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=k6epK1kHVGM7DWadqrW/21XmOu9df43IQ+8cLDy78ic=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=CGknPzQqPOlVhMFpxuzugpzGoAujptr72o9KoYFHyAc63Tyn5I9l1ESJnkgecYOh4d fDHlUE8qQisiTstJ7YiOoNAZLpRdikRmWqCH+K0GhNdb9o4uorL+FqdMqESf4llGEVfL KnciFgLfO94XHwrAP7kzbgjoCpTqlaqC4x54QdYGaAz0Ryte2i5BOfLWah+IJirgFqL1 ib6whQys8Amf5zd/TUXv6IStTAEqtY/vuz/6IJLUu5FQSW+R+R8HtCv3PdQN4ZJFb4Wu GvqOZJVmbXUL8PB2WXxxh8UcC210CJyIJY/UKV9iiEoszkMqj4kf55TBMXrDBelJvz6+ i9DQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wT/A5J1Z"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ea2633si20515685a.329.2025.04.23.18.06.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:06:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="wT/A5J1Z"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kyv-0008OV-Qk; Wed, 23 Apr 2025 21:02:27 -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 1u7kwl-0004nA-9I for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:13 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwi-0005T5-BL for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:10 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-736c1cf75e4so323827b3a.2 for ; Wed, 23 Apr 2025 18:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456406; x=1746061206; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k6epK1kHVGM7DWadqrW/21XmOu9df43IQ+8cLDy78ic=; b=wT/A5J1Z741CEq96kOqgXTLLhrj0VFvTdt328jx7/OAc6VFAPkZcL68EPQzsSkqVqi OvI0GoRHtNSNyp6wrqDNhg6O2yrKyqYFesAYEKSvx+fsmCElCePCdWjD7kMsi5f+9xtG gBAmmwXNIioZTXhBdxUGFg9gqTZzqDOMN5ktE6Nm7t/paVhao0p6GajpMOcdUvo4nWCU w0NouK6uYyVdVZ7C0o0jW1iTTTZvu08NgEEEdyeADU7Uvla+fphWXFB3pem8SY9o0izl fdold+in18zQ1FCooFZIK1LwmQkmIrwk68SfLpaYbacXh1gZJUZx31TaVHk/0X7yqtKE pX3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456406; x=1746061206; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k6epK1kHVGM7DWadqrW/21XmOu9df43IQ+8cLDy78ic=; b=OF8GQ+i26tXH22Oe1IajxGrJuJmJiWE1pXF79vnzk1tOfcBBNqc1FYMGPLAYgUVLfM YyMwg5yKqjs+PSoPksn7xm+PMXQl1v62LC+86gxt4+lgBlFK9Y/2hm5f2ksFbXPSQRs6 /jyoBlefNJQK5Qwa7deSK488Vsal7WS8odApMuk3IkCKGF1Z2E1vZ6WX2rJxCVM/uc1n QY03oZHolKFKiWSZZlkx66/RFO19/lFFMQKGK068Duz95Zk7QH9hWWRfQaWwNUdTUA+4 8WI23iIoblDo7jG59FxT3SQ1fwbLUrgJA92S2kzrgE3ONQ0Sy9QH4o/VwjPlvbUXHdv+ vIhw== X-Gm-Message-State: AOJu0YwIsvNcrRQvN0Yx7o4f5+Y84nQYhGpX6+FWShmmd8rsE72OWXLe isZn0WgfXRsygkPbuWkyl1DMOWIVOdEBZ0pWqeVg5mSxwYJafRcpRg6jSCN5BYIoHH5S8sPHd9t l X-Gm-Gg: ASbGncsg0ND9rWDzKnr1ZN/iNqqSn11eRVe4Yd3AL+zCfUtLGMCJDOfW4GLiWG/nUcq YuS21kHd2cAck88VFB3oqMEOMrBu5buqm+0VimYIcOCs5d8wcU7OgQ0YdJEEle/7okTzpAZzMzp VMerW6+yLo/wUrNDe3nR5g5/MwYyYXtE18LstVN9AnCG//Tcqc73/d/kec4XzHi6tWuKfWqRC/y wPAOHIJOnxW2UCXiFsvzNb6F0EaCkMwd0KnIwkMNCvJIaFhB4laWflKlRZdP2j9wdp/W6jancmh wrpoxFHkl6tO9FCuLpPzAEYz6vb1QcVh3QrjCO5/CNY+4z7X1lBYFKY64udr0i8rXXobp8SH5oE = X-Received: by 2002:a05:6a20:6f07:b0:1f5:706b:5410 with SMTP id adf61e73a8af0-20444fe0b39mr781453637.38.1745456406242; Wed, 23 Apr 2025 18:00:06 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 125/148] hw/arm: make most of the compilation units common Date: Wed, 23 Apr 2025 17:49:10 -0700 Message-ID: <20250424004934.598783-126-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Signed-off-by: Richard Henderson Message-ID: <20250325045915.994760-30-pierrick.bouvier@linaro.org> --- hw/arm/meson.build | 112 ++++++++++++++++++++++----------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 9e8c96059e..09b1cfe5b5 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -2,43 +2,43 @@ arm_ss = ss.source_set() arm_common_ss = ss.source_set() arm_ss.add(when: 'CONFIG_ARM_VIRT', if_true: files('virt.c')) arm_ss.add(when: 'CONFIG_ACPI', if_true: files('virt-acpi-build.c')) -arm_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic_boards.c')) -arm_ss.add(when: 'CONFIG_EMCRAFT_SF2', if_true: files('msf2-som.c')) -arm_ss.add(when: 'CONFIG_HIGHBANK', if_true: files('highbank.c')) -arm_ss.add(when: 'CONFIG_INTEGRATOR', if_true: files('integratorcp.c')) -arm_ss.add(when: 'CONFIG_MICROBIT', if_true: files('microbit.c')) -arm_ss.add(when: 'CONFIG_MPS3R', if_true: files('mps3r.c')) -arm_ss.add(when: 'CONFIG_MUSICPAL', if_true: files('musicpal.c')) -arm_ss.add(when: 'CONFIG_NETDUINOPLUS2', if_true: files('netduinoplus2.c')) -arm_ss.add(when: 'CONFIG_OLIMEX_STM32_H405', if_true: files('olimex-stm32-h405.c')) -arm_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx.c', 'npcm7xx_boards.c')) -arm_ss.add(when: 'CONFIG_NPCM8XX', if_true: files('npcm8xx.c', 'npcm8xx_boards.c')) -arm_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview.c')) +arm_common_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic_boards.c')) +arm_common_ss.add(when: 'CONFIG_EMCRAFT_SF2', if_true: files('msf2-som.c')) +arm_common_ss.add(when: 'CONFIG_HIGHBANK', if_true: files('highbank.c')) +arm_common_ss.add(when: 'CONFIG_INTEGRATOR', if_true: files('integratorcp.c')) +arm_common_ss.add(when: 'CONFIG_MICROBIT', if_true: files('microbit.c')) +arm_common_ss.add(when: 'CONFIG_MPS3R', if_true: files('mps3r.c')) +arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [pixman, files('musicpal.c')]) +arm_common_ss.add(when: 'CONFIG_NETDUINOPLUS2', if_true: files('netduinoplus2.c')) +arm_common_ss.add(when: 'CONFIG_OLIMEX_STM32_H405', if_true: files('olimex-stm32-h405.c')) +arm_common_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx.c', 'npcm7xx_boards.c')) +arm_common_ss.add(when: 'CONFIG_NPCM8XX', if_true: files('npcm8xx.c', 'npcm8xx_boards.c')) +arm_common_ss.add(when: 'CONFIG_REALVIEW', if_true: files('realview.c')) arm_ss.add(when: 'CONFIG_SBSA_REF', if_true: files('sbsa-ref.c')) -arm_ss.add(when: 'CONFIG_STELLARIS', if_true: files('stellaris.c')) -arm_ss.add(when: 'CONFIG_STM32VLDISCOVERY', if_true: files('stm32vldiscovery.c')) -arm_ss.add(when: 'CONFIG_ZYNQ', if_true: files('xilinx_zynq.c')) -arm_ss.add(when: 'CONFIG_SABRELITE', if_true: files('sabrelite.c')) +arm_common_ss.add(when: 'CONFIG_STELLARIS', if_true: files('stellaris.c')) +arm_common_ss.add(when: 'CONFIG_STM32VLDISCOVERY', if_true: files('stm32vldiscovery.c')) +arm_common_ss.add(when: 'CONFIG_ZYNQ', if_true: files('xilinx_zynq.c')) +arm_common_ss.add(when: 'CONFIG_SABRELITE', if_true: files('sabrelite.c')) -arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m.c')) -arm_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210.c')) -arm_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic.c')) -arm_ss.add(when: 'CONFIG_OMAP', if_true: files('omap1.c')) -arm_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('allwinner-a10.c', 'cubieboard.c')) -arm_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3.c', 'orangepi.c')) -arm_ss.add(when: 'CONFIG_ALLWINNER_R40', if_true: files('allwinner-r40.c', 'bananapi_m2u.c')) +arm_common_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m.c')) +arm_common_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210.c')) +arm_common_ss.add(when: 'CONFIG_DIGIC', if_true: files('digic.c')) +arm_common_ss.add(when: 'CONFIG_OMAP', if_true: files('omap1.c')) +arm_common_ss.add(when: 'CONFIG_ALLWINNER_A10', if_true: files('allwinner-a10.c', 'cubieboard.c')) +arm_common_ss.add(when: 'CONFIG_ALLWINNER_H3', if_true: files('allwinner-h3.c', 'orangepi.c')) +arm_common_ss.add(when: 'CONFIG_ALLWINNER_R40', if_true: files('allwinner-r40.c', 'bananapi_m2u.c')) arm_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2836.c', 'raspi.c')) -arm_ss.add(when: ['CONFIG_RASPI', 'TARGET_AARCH64'], if_true: files('bcm2838.c', 'raspi4b.c')) -arm_ss.add(when: 'CONFIG_STM32F100_SOC', if_true: files('stm32f100_soc.c')) -arm_ss.add(when: 'CONFIG_STM32F205_SOC', if_true: files('stm32f205_soc.c')) -arm_ss.add(when: 'CONFIG_STM32F405_SOC', if_true: files('stm32f405_soc.c')) -arm_ss.add(when: 'CONFIG_B_L475E_IOT01A', if_true: files('b-l475e-iot01a.c')) -arm_ss.add(when: 'CONFIG_STM32L4X5_SOC', if_true: files('stm32l4x5_soc.c')) -arm_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zynqmp.c', 'xlnx-zcu102.c')) -arm_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal.c', 'xlnx-versal-virt.c')) -arm_ss.add(when: 'CONFIG_FSL_IMX25', if_true: files('fsl-imx25.c', 'imx25_pdk.c')) -arm_ss.add(when: 'CONFIG_FSL_IMX31', if_true: files('fsl-imx31.c', 'kzm.c')) -arm_ss.add(when: 'CONFIG_FSL_IMX6', if_true: files('fsl-imx6.c')) +arm_common_ss.add(when: ['CONFIG_RASPI', 'TARGET_AARCH64'], if_true: files('bcm2838.c', 'raspi4b.c')) +arm_common_ss.add(when: 'CONFIG_STM32F100_SOC', if_true: files('stm32f100_soc.c')) +arm_common_ss.add(when: 'CONFIG_STM32F205_SOC', if_true: files('stm32f205_soc.c')) +arm_common_ss.add(when: 'CONFIG_STM32F405_SOC', if_true: files('stm32f405_soc.c')) +arm_common_ss.add(when: 'CONFIG_B_L475E_IOT01A', if_true: files('b-l475e-iot01a.c')) +arm_common_ss.add(when: 'CONFIG_STM32L4X5_SOC', if_true: files('stm32l4x5_soc.c')) +arm_common_ss.add(when: 'CONFIG_XLNX_ZYNQMP_ARM', if_true: files('xlnx-zynqmp.c', 'xlnx-zcu102.c')) +arm_common_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal.c', 'xlnx-versal-virt.c')) +arm_common_ss.add(when: 'CONFIG_FSL_IMX25', if_true: files('fsl-imx25.c', 'imx25_pdk.c')) +arm_common_ss.add(when: 'CONFIG_FSL_IMX31', if_true: files('fsl-imx31.c', 'kzm.c')) +arm_common_ss.add(when: 'CONFIG_FSL_IMX6', if_true: files('fsl-imx6.c')) arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files( 'aspeed.c', 'aspeed_soc_common.c', @@ -47,33 +47,33 @@ arm_ss.add(when: 'CONFIG_ASPEED_SOC', if_true: files( 'aspeed_ast10x0.c', 'aspeed_eeprom.c', 'fby35.c')) -arm_ss.add(when: ['CONFIG_ASPEED_SOC', 'TARGET_AARCH64'], if_true: files('aspeed_ast27x0.c')) -arm_ss.add(when: 'CONFIG_MPS2', if_true: files('mps2.c')) -arm_ss.add(when: 'CONFIG_MPS2', if_true: files('mps2-tz.c')) -arm_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-soc.c')) -arm_ss.add(when: 'CONFIG_MUSCA', if_true: files('musca.c')) -arm_ss.add(when: 'CONFIG_ARMSSE', if_true: files('armsse.c')) -arm_ss.add(when: 'CONFIG_FSL_IMX7', if_true: files('fsl-imx7.c', 'mcimx7d-sabre.c')) -arm_ss.add(when: 'CONFIG_FSL_IMX8MP', if_true: files('fsl-imx8mp.c')) -arm_ss.add(when: 'CONFIG_FSL_IMX8MP_EVK', if_true: files('imx8mp-evk.c')) -arm_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmuv3.c')) -arm_ss.add(when: 'CONFIG_FSL_IMX6UL', if_true: files('fsl-imx6ul.c', 'mcimx6ul-evk.c')) -arm_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_soc.c')) +arm_common_ss.add(when: ['CONFIG_ASPEED_SOC', 'TARGET_AARCH64'], if_true: files('aspeed_ast27x0.c')) +arm_common_ss.add(when: 'CONFIG_MPS2', if_true: files('mps2.c')) +arm_common_ss.add(when: 'CONFIG_MPS2', if_true: files('mps2-tz.c')) +arm_common_ss.add(when: 'CONFIG_MSF2', if_true: files('msf2-soc.c')) +arm_common_ss.add(when: 'CONFIG_MUSCA', if_true: files('musca.c')) +arm_common_ss.add(when: 'CONFIG_ARMSSE', if_true: files('armsse.c')) +arm_common_ss.add(when: 'CONFIG_FSL_IMX7', if_true: files('fsl-imx7.c', 'mcimx7d-sabre.c')) +arm_common_ss.add(when: 'CONFIG_FSL_IMX8MP', if_true: files('fsl-imx8mp.c')) +arm_common_ss.add(when: 'CONFIG_FSL_IMX8MP_EVK', if_true: files('imx8mp-evk.c')) +arm_common_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmuv3.c')) +arm_common_ss.add(when: 'CONFIG_FSL_IMX6UL', if_true: files('fsl-imx6ul.c', 'mcimx6ul-evk.c')) +arm_common_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('nrf51_soc.c')) arm_ss.add(when: 'CONFIG_XEN', if_true: files( 'xen-stubs.c', 'xen-pvh.c', )) -system_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmu-common.c')) -system_ss.add(when: 'CONFIG_COLLIE', if_true: files('collie.c')) -system_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4_boards.c')) -system_ss.add(when: 'CONFIG_NETDUINO2', if_true: files('netduino2.c')) -system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_peripherals.c')) -system_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2838_peripherals.c')) -system_ss.add(when: 'CONFIG_STRONGARM', if_true: files('strongarm.c')) -system_ss.add(when: 'CONFIG_SX1', if_true: files('omap_sx1.c')) -system_ss.add(when: 'CONFIG_VERSATILE', if_true: files('versatilepb.c')) -system_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c')) +arm_common_ss.add(when: 'CONFIG_ARM_SMMUV3', if_true: files('smmu-common.c')) +arm_common_ss.add(when: 'CONFIG_COLLIE', if_true: files('collie.c')) +arm_common_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4_boards.c')) +arm_common_ss.add(when: 'CONFIG_NETDUINO2', if_true: files('netduino2.c')) +arm_common_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2835_peripherals.c')) +arm_common_ss.add(when: 'CONFIG_RASPI', if_true: files('bcm2838_peripherals.c')) +arm_common_ss.add(when: 'CONFIG_STRONGARM', if_true: files('strongarm.c')) +arm_common_ss.add(when: 'CONFIG_SX1', if_true: files('omap_sx1.c')) +arm_common_ss.add(when: 'CONFIG_VERSATILE', if_true: files('versatilepb.c')) +arm_common_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c')) arm_common_ss.add(fdt, files('boot.c')) From patchwork Thu Apr 24 00:49:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883847 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204187wrs; Wed, 23 Apr 2025 18:11:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV80DCHcfB2IJ1fhLmbEubW8yqwu7XfdO8wmvTEXO0+tg+eqrdRKQWdPm88hkRPmWc9RPbRRA==@linaro.org X-Google-Smtp-Source: AGHT+IGGAjg1ClDdQsOdVmcoG4fFIV0RrfhleMlxMbwqSkJkGS5ev9Av8rWDemptlHAKcZCojE4K X-Received: by 2002:ad4:5762:0:b0:6ee:ba58:e099 with SMTP id 6a1803df08f44-6f4bfbe9351mr15148256d6.15.1745457072171; Wed, 23 Apr 2025 18:11:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457072; cv=none; d=google.com; s=arc-20240605; b=AEDxghFtuJHR40KdIG//T4LV5vk7WoyPzovSmaWN2EMv7bLQJlxR2TfnHL+hmjr8KT PG94jYIJCIKw3byD+f3ASoY5Y8qdZAR6RP9GS6X5tO8Z+hP7Ce34ZWZ+PfcDBIIa+vlQ jqa08ucoED455VHWF+f+gzd5KKc7UqxDsNKHW4jN3GUIRjvfCgJbmDYAKAKdXSP1xdrF ul1h5Vz3m2cRKFLjk6EbJyS+T3zjHP/v1sIekKDwYr4xczCFrJq/8iBHHMLVNVS0Z37H sXrXLvgMb6DGCyey68k/u3cNUzxPG96Hf5YBpQKyuaqQ171dNTozwn5QXUvLQNDGUGQV +Wzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Judoew0yyRM+ZQdcs+U7k7YNBkFAe4iaEkKni645IrU=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=BW6B/giF77b26Chlg0tIaKYe3Wb2YNAjExRwZ8vU7BWgZ7K2fusLp28zYmAu4O/3Ho o1cnyoRuFJwiurV8yrEkDV9AbR0V5GnELw0FZK5qNSe1vzBdaVylxqcxT0Jppf59Kyzj /LcKk3V072Ph8+jhradRfCc3BUZRBwXENiT5qvz1I59iYasyTN/uSD+NxJWa99gWSSn3 NjvZxIwwNDewnsJ4i8o9bvXZhSTTHpbwIix0Nyr9chxZYyLKKpc97uFYLMNJNM+4eQ7j 5XxjULkP36B3EskulqFUxX0eVjHNoWV9JODS2UICoIGMItAcaRPXhSmezB4UA6L8V7uX mIaA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JRiRZa5a; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea27a337csi4844921cf.584.2025.04.23.18.11.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:11:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JRiRZa5a; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kxk-0006lY-7H; Wed, 23 Apr 2025 21:01:12 -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 1u7kwm-0004pE-GT for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:14 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7kwj-0005TE-P2 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:11 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-736c3e7b390so373073b3a.2 for ; Wed, 23 Apr 2025 18:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456407; x=1746061207; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Judoew0yyRM+ZQdcs+U7k7YNBkFAe4iaEkKni645IrU=; b=JRiRZa5aWKCLMvLiWcV32HG8w/+tFttgp0iyX1QG3JZkIpH12Q4bIQDoLO1S9PZVvG VwYigDdGl4lRI7CQO4gQxc++95eW/fFu4N+bgxq2gADmEXHcA0RMu+q3yBXbnROr7Ow1 NEUWQHeG52UKMOWtKzF5rXcP+JotpjOTuV2AiL7idqRTWm2Ki/KuxYe4IXrowvB5gCm4 s3Qgr+UO9cOb60WHBmSNS3/j5MHWByjkJ+GdUZiHTiyEebjVLC9ToTUiLQ9/pMlNvmr+ xZ5sWcoYwF7hFIF4n9+KoDYrUljqX9d++C1y8fBOhYFppWe0LRueMirxVu6vXdX1sitE T6dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456407; x=1746061207; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Judoew0yyRM+ZQdcs+U7k7YNBkFAe4iaEkKni645IrU=; b=R1S/tazFMxX479FzxM293zrxGnx7AYs/DUefHa+qm0NhGW5IBa92RxBo1ucuC/XcBN 821ocXeb5TDf5+M8fcdQ0Q4Ug+NuoyvkMORvrXoLtUHN6Ygh9OKmzk4WgBZn1UgCbhQF 1L7sKNi/0ug0FYL8buxIioI55lNpqN28yqGSd+en5BuYk6JUF++ii4XEFFvcNEhJeDSX MWJhFaF/UzQXO1M3Fl7D0EwIj9M5VpTxjeRdQ2voAbpfFvrGmTGAKNXcXdrbArXsuRvY xuSeDbkwKAwOJLSlzKTII3K2gW3X2FRVPmO9SJET6IGjwXxlUtLvw2NJdN7tDwsFe/R6 1Vcg== X-Gm-Message-State: AOJu0Ywwj/64HH8pz1Z4rqkKai5NbZ2qGe66YkQICJYr2vS7bqGzTNDH jblDmXNq1Ac9xr4FKaz1vAbM8ovvwdzmQ4fzuj3jaIpHmWvvTQjxbcpRRVfCqlkcmByPn0qAIxT j X-Gm-Gg: ASbGncvmBBHRB2TUSsbf3uEmDIvQz0YHyBRBDtrFhv5d1C1eWpCgYv0m0dgP8PHADwq fHiwl5o82MdFj2aBCZyi/KQ8AtTyeN9o1uTyp8YjRxIUbBugotO6IoGVmme0oUcZjXy7cOeXWUR kGGqV4cU+2gsVwDGZP0yB5GzabzqlLCfbXk0RimXLGWf6m/3AXQFz3yPcPx241Ko/VM8ikE9NhS MdAjmEr4KUhErTWs0p65DSWKmDPyGEXLBAGxCA8TKyJ3PRaj/d9QRsezYcE4YG0yL9c5LnefbF2 1B4j2oVJ53aP7hEIkrfEz0G6J1aFbVBJsSZGpYqSw1LpnM+JkYSE2b9JH2ciRn4nf6KBw7W9w6U HMHoaJ1skBQ== X-Received: by 2002:a05:6a20:3d90:b0:1fd:f48b:f397 with SMTP id adf61e73a8af0-20444f0e8fcmr697526637.23.1745456406938; Wed, 23 Apr 2025 18:00:06 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 126/148] target/riscv: Do not expose rv128 CPU on user mode emulation Date: Wed, 23 Apr 2025 17:49:11 -0700 Message-ID: <20250424004934.598783-127-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé As Richard mentioned: We should allow RV128 in user-mode at all until there's a kernel abi for it. Remove the experimental 'x-rv128' CPU on user emulation (since it is experimental, no deprecation period is required). Reported-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/riscv/cpu.c | 10 ++++------ target/riscv/tcg/tcg-cpu.c | 5 +++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 430b02d2a5..ad534cee51 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -697,7 +697,7 @@ static void rv64_xiangshan_nanhu_cpu_init(Object *obj) #endif } -#ifdef CONFIG_TCG +#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) static void rv128_base_cpu_init(Object *obj) { RISCVCPU *cpu = RISCV_CPU(obj); @@ -708,11 +708,9 @@ static void rv128_base_cpu_init(Object *obj) /* Set latest version of privileged specification */ env->priv_ver = PRIV_VERSION_LATEST; -#ifndef CONFIG_USER_ONLY set_satp_mode_max_supported(RISCV_CPU(obj), VM_1_10_SV57); -#endif } -#endif /* CONFIG_TCG */ +#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */ static void rv64i_bare_cpu_init(Object *obj) { @@ -3255,9 +3253,9 @@ static const TypeInfo riscv_cpu_type_infos[] = { DEFINE_VENDOR_CPU(TYPE_RISCV_CPU_VEYRON_V1, MXL_RV64, rv64_veyron_v1_cpu_init), DEFINE_VENDOR_CPU(TYPE_RISCV_CPU_XIANGSHAN_NANHU, MXL_RV64, rv64_xiangshan_nanhu_cpu_init), -#ifdef CONFIG_TCG +#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) DEFINE_DYNAMIC_CPU(TYPE_RISCV_CPU_BASE128, MXL_RV128, rv128_base_cpu_init), -#endif /* CONFIG_TCG */ +#endif /* CONFIG_TCG && !CONFIG_USER_ONLY */ DEFINE_BARE_CPU(TYPE_RISCV_CPU_RV64I, MXL_RV64, rv64i_bare_cpu_init), DEFINE_BARE_CPU(TYPE_RISCV_CPU_RV64E, MXL_RV64, rv64e_bare_cpu_init), DEFINE_PROFILE_CPU(TYPE_RISCV_CPU_RVA22U64, MXL_RV64, rva22u64_profile_cpu_init), diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 710449d17e..5d0429b4d0 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -1046,7 +1046,6 @@ static bool riscv_cpu_is_generic(Object *cpu_obj) static bool riscv_tcg_cpu_realize(CPUState *cs, Error **errp) { RISCVCPU *cpu = RISCV_CPU(cs); - RISCVCPUClass *mcc = RISCV_CPU_GET_CLASS(cpu); if (!riscv_cpu_tcg_compatible(cpu)) { g_autofree char *name = riscv_cpu_get_name(cpu); @@ -1055,6 +1054,9 @@ static bool riscv_tcg_cpu_realize(CPUState *cs, Error **errp) return false; } +#ifndef CONFIG_USER_ONLY + RISCVCPUClass *mcc = RISCV_CPU_GET_CLASS(cpu); + if (mcc->misa_mxl_max >= MXL_RV128 && qemu_tcg_mttcg_enabled()) { /* Missing 128-bit aligned atomics */ error_setg(errp, @@ -1063,7 +1065,6 @@ static bool riscv_tcg_cpu_realize(CPUState *cs, Error **errp) return false; } -#ifndef CONFIG_USER_ONLY CPURISCVState *env = &cpu->env; tcg_cflags_set(CPU(cs), CF_PCREL); From patchwork Thu Apr 24 00:49:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883849 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204306wrs; Wed, 23 Apr 2025 18:11:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVkRDrsaFGmLX+x/FmTc2/UviAYgCvL55ko6JvnM7qvqyEn2gHzG2g50fdHgUxcXuYVvzCq1g==@linaro.org X-Google-Smtp-Source: AGHT+IE4zQLiNbHvjMthxc45DkPtYS7a3kG5EGYfFYT12ZVe0P1+9wXYoXPdH3ZxAc0S+SbaRCx1 X-Received: by 2002:a05:6214:242d:b0:6d8:6a74:ae68 with SMTP id 6a1803df08f44-6f4bfc71482mr12477846d6.29.1745457096760; Wed, 23 Apr 2025 18:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457096; cv=none; d=google.com; s=arc-20240605; b=fuObIU1BXF+VebW/OHOiHWBFSltbkOJB2SBD7WITyKFoSozNW6LyIz7X0HYuCp5M0G CEiLi3Z+bWOwijt7YqefC866NFNALsaIOyAM142iE5RGndrd1DkaNZZgf4JVRJBAXVot smMZO/6zd/I6pXADygrAHP9LUz+YuxnEqOLMZtbxCQV2lFX9z5I5SU05naWTr0+fPEen 5S6wSwV2GL1MkghdzqHpjjcfL6sW9mJkmjA2nrW1SF0MB+SKC033ub/Rn3rlQiW/eTE7 i2Q/ZS3ckJ0OsQMjEpd45eUOzM0jLIsXPvc9TOlJ8o3FKDT1khR7udZFI459YK/qlq8j q4QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zQn5pEpTklz98PI0kmgU6Xej9Zd0Hkqt6ZpcSg4eg/g=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=gOUYhBZC29sMDWo/HXk7W6Js+TsrrEq6F/A1vwrUzwvYWCDybaLqVEHaafvGSnW6Gp yLEQA+C0RxgP6ekRGlhkiniYD5bk+Hx/HR1IA+Kqyeh04F0AWk0GswrwpYbW1YVFHtIG 5CRUN0tklKIaAplCQ9a0m3HkbaaWnvvy65kb/aRHpM+Jo1bszeaziJ4Qi85mmvfVKCFH mpyqlWUoNOZDAPU1mUA2wavJLpqVcrsLWKxaPqgUTb5/QiCxwtQ2FTyUjDBqWoadCyyY kRgZiPmf/MAcNyNCOUPqqI0vKtnmBOAw6RPd7rAsCfyv96ulqbluj3/h0SzOl+4UYMIl PRcg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iCn1l2ed; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0aea219si3530226d6.305.2025.04.23.18.11.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:11:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iCn1l2ed; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kz3-00007Q-9r; Wed, 23 Apr 2025 21:02:33 -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 1u7kwo-0004zU-D1 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:16 -0400 Received: from mail-pf1-x430.google.com ([2607:f8b0: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 1u7kwj-0005TW-Qs for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:12 -0400 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-736b0c68092so335400b3a.0 for ; Wed, 23 Apr 2025 18:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456408; x=1746061208; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zQn5pEpTklz98PI0kmgU6Xej9Zd0Hkqt6ZpcSg4eg/g=; b=iCn1l2edFt1u4td72apjz7ZO3Wjq5PBljVsRqxNn5WEKc6N14ujFU8uX4WD+k02t3V SiiqZkVBPmzAMOm/ERTmQbL8iI3AC9dIUc0IV9/iwSv/5SAKQtR90IKRpSCsGZmLSKSt /j8gBmg320sXmrHOfldzEiny1muef5DA9JfrjnytqJlwwK6tbJIKxA1niEWwZfenB0G1 WTiTlYA/HVpVc7z02S50V8rEJkyS0QYI3z1P0KR29Y0U9PQD0dJKfs4/f1cCQi7Pyt2Y CJT1svxCvZf+Rho/7/mvCVzWzB6C1rkXHq446u6chSNPTB/w1sCdcm5NfSh3vFPELKQP 8+fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456408; x=1746061208; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zQn5pEpTklz98PI0kmgU6Xej9Zd0Hkqt6ZpcSg4eg/g=; b=XbDwmTQs73krgb/hzTZBURqueRX2dj85Gmpy6b9ZT1GGp0DN2IUBEzSVfIBJf8GbnE imyjLsBHIJxRcFEdzsIlgw/1l2F7fbuginuRE+2Ya/fPjhrHHRwCT2eIv+uUi+if/wI0 xpy0PS6qhkS/4pCykgxjXmD8Io0uBzqawJ+4f9VnnJ3HcLMrWwTYJ2EXKrkVKxazkyFi diF1puegrb50jnNmi8vISvKvs5Bgihgo9IUdUc/x2umcUbnqykoL9hCc22WluNRwxmDP rNRH2OzuHxemfCUW5uycvoJIaV6by88ll40F8S0ETmQFKxk0lA1znPITtz75PlgbJhFf DTeQ== X-Gm-Message-State: AOJu0Yz4jAhsyXHbSpl4mq+jWimEADGd8arJpvbXrHtoMi3KLfIPM0As roonV9GXRMRViT9FOX2FOKV7nXDkW8R9lSlLPhtunrEJ70UW0JTfuTlui9Y2qGGb54WtGg3abzn s X-Gm-Gg: ASbGncs19fajSo6EWviu+5U4bBIAtzA6NPeWSrKUDRYP2ZMCoytIYRReCEW7Yluz2SJ iOCgS8lY8ZkNw5kt1lISizhIq8KDFJVXR0762b3R60jH4xWbN5hm5Fkdn46NvYCNvEoykLs3FpB cB7d1bWBNJzEt9rGEvI9smIcOaMhaVFIt3AwbE1Lbvmkie/y8twe3BfeMHbaQApBSGl30GfG1AV HU/GYLDMwifohjw0SxgmWwYJ4LW8oaIAHv0zj8CXXz+j2lM20Mlx6Lqx3RgQJgu64gn/Azm4KAz xXQJknBq6J8caNap8+1i/KkrDsXfryFvmy6Pj8Del4Bh2g3ir/1GKo1P8lAM+0vFSbdsmcu6lrI = X-Received: by 2002:a05:6a21:918a:b0:1ee:dcd3:80d7 with SMTP id adf61e73a8af0-20444d1f398mr1014137637.0.1745456407956; Wed, 23 Apr 2025 18:00:07 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 127/148] tcg: Include missing 'cpu.h' in translate-all.c Date: Wed, 23 Apr 2025 17:49:12 -0700 Message-ID: <20250424004934.598783-128-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé tb_check_watchpoint() calls cpu_get_tb_cpu_state(), which is declared in each "cpu.h" header. It is indirectly included via "tcg/insn-start-words.h". Since we want to rework "tcg/insn-start-words.h", removing "cpu.h" in the next commit, add the missing header now, otherwise we'd get: accel/tcg/translate-all.c:598:9: error: call to undeclared function 'cpu_get_tb_cpu_state' [-Wimplicit-function-declaration] 598 | cpu_get_tb_cpu_state(env, &pc, &cs_base, &flags); | ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index ed41fc5d0c..c5590eb695 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -69,6 +69,7 @@ #include "internal-target.h" #include "tcg/perf.h" #include "tcg/insn-start-words.h" +#include "cpu.h" TBContext tb_ctx; From patchwork Thu Apr 24 00:49:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883912 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3209260wrs; Wed, 23 Apr 2025 18:29:24 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUpQucOtqP2koqCIZCYdsE2saCeDB2DF67Y8aNjbS6RYQgtusRm50NXD62q02XX80iiiMJU0A==@linaro.org X-Google-Smtp-Source: AGHT+IFICNszK8LBf3O34tZpV/AqwLAlPRLKyQfg7usDaa1RaG/mQvpACoB9I+BMi9pbRUIPguyU X-Received: by 2002:a05:622a:1a14:b0:476:a895:7e87 with SMTP id d75a77b69052e-47eb49b929amr10474251cf.48.1745458164099; Wed, 23 Apr 2025 18:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458164; cv=none; d=google.com; s=arc-20240605; b=DD2VVyJ/I2/u7aQ6JfP49wBwTLjSm1Mj+Ep3XLgqgm+Rmz/TLpqwtQIwn+Me+Qk+BW 0CStLq2U/7rYw0NHWja+pgrscbr/ZJYDODoT8Fq6S03B8oyskxnQE7tBqJCx8FmVLLfE olY3iWYrgkNgYnjsi3tMstngj5If50Mvg8LOXt5L5MIVdXOiVH9CS7EClvReAhVM0UAL X+iRqgeGobFr1bcdvVP+ZO6eNCfK/XZU4AhREGz88Wjn8+UguFbDP4gmKyeujVtQJJ/u z+GS/7ZRleNivB4dC/n+kKFoAVeF1kTPI8EEvEaGLW5QlUSZBxINLOKLXB7vocCpZLxH Zdbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lhnd2huLJrsHHz0inXKOebAfdB7C56aOSUXVvrPsarQ=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=L0Rvmf8CvbaIymgN9FkriASvuYbtJDcNSavOe73Caawo4bexxVwyQAc1A9dojwpr8l teNzoFKSI+5eouLYizrL4K3THrxGs2O/oAGD7I9bZDmDGDn0OSnLXCcfjhp7wb16oYIe rlDmfw4QSAa7Fjn27zLj0YQcnB3x0ONYB4uz3ig9+isD3EMv4fEJKhI0JAABH5gZo3+r 2Xq7rdDgsnuUTbn/KwjQyPWxJmaZT0/LawTMA7SIi3Hcwk2NAlnBIYcfRDrrTqgBTEQO y8PV0W5GzuF9ywJj+HXeBb0HmQaa2lOQughfqFNEH8wfGYgtvAc8Xk4gS+8RBiFsUX7V VuHg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aPrYj9Go; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea26a3a63si5662731cf.556.2025.04.23.18.29.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:29:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aPrYj9Go; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kyP-0008A2-5K; Wed, 23 Apr 2025 21:01:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7kwo-0004zT-JK for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:16 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0: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 1u7kwk-0005Tg-HE for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:13 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-736a7e126c7so341474b3a.3 for ; Wed, 23 Apr 2025 18:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456409; x=1746061209; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lhnd2huLJrsHHz0inXKOebAfdB7C56aOSUXVvrPsarQ=; b=aPrYj9GoJhJuO1GSAPEOvz7cSkL6FvXdRdl/XBOUT2EGwQ7gFV0FZtpGH4kN4hjEhl ejpCnFqPDXvTzqDP2yp3/iHkL+Fh8NLYT8cKiDkAhxmtgTORTbPaumw1tWT0nL8EvcH6 jmfe4CexPdsx8Q+kF8V9uS7hzRnpgz0jnhUxLaQjF0h1e3idd/vBYJyPg1xPLOHEXZ2R vOlR2OYyuiKq9Or3OubS+1STTOmjoXYsgKlnUuGEDhuakEZssq4fl6x3jEzahrNE1s9v ojsgkO2Do2DxMvSj7fNQl4uIlVUUd8FDS6jMTOUJEZ9IW1+BKF2vmvXDXh5sIktjFB26 XJkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456409; x=1746061209; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lhnd2huLJrsHHz0inXKOebAfdB7C56aOSUXVvrPsarQ=; b=NGoJSPCc22Z8cKtqtcCDdj//ot4zgRLme/7My2Ph5qFwvIgAHey17vC/Y1Ijm01tqz QzhqPOs62EiB1xK34lzV677zV5FUwwR2WUihI+r6YG/jxf/IeWHcjqLrJwpUzZn9LSS1 CT27AQPgWMBUGz4AesgF00NjnnZrI4tagc0mEoy6euTR+/w2ALp5MgYg5AA1Uf+X2gty jdOzJvXYn26oSCLsTFHSv20RMXq+vbUM8qPfL5V6sjlwL7a5tNdKdmrE8s6kqnh62Kni 20nP7sHIhRp/DxOvkVVTEO1df9dmov0N7Z3XZtiY8ADhfbY/CQyjc83YJg1mqVLfz62K eyWA== X-Gm-Message-State: AOJu0Yz3fQHer0YV7v2mK9Tnrdp7lOY57FxjJ0OJatQG94tgVbS0wVgA RZyOAjt10gZLRsHmr5YaaXfSyATtBZ2FMfgWYMsJjmRVgnwaQFYNGwVtnxy6EiD4/URU4j5+fp9 p X-Gm-Gg: ASbGncs5tQIyQOA2xpzddAgfEOJuTSjEMiqmn6e50Z6itRfv1gj6sSa9wbp7qpjoY9V sCtFkZ9XuL/+LU9l4SWZHyKmgX8TGsIBXUE2Mxgr/SpuUbv8CEO9yRcTzvSyBhfuR2e+kk79nn+ zBrM8s/PIm9xEi4nO29VNjs9iygSowLmUe5vcXzICm2lZqZIR4pahav7KDsPoL+4EuiTLPK33K9 7gor0rGRUMiOfRMw3zpE5vWldamXBX1iT7FkvZO49UyXJlah1po/zclKunIMaDQKif2pVgYQCA/ IY3ViprkzEc4oZm/KRfhWmRXwnuAZTLKVll0dVBoEftcn6FGW9ZkFzuMcFjPRPWl+EZli+Rcwv4 = X-Received: by 2002:a05:6a21:e97:b0:1f5:8b9b:ab56 with SMTP id adf61e73a8af0-20444f04463mr1057135637.18.1745456408642; Wed, 23 Apr 2025 18:00:08 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 128/148] tcg: Declare TARGET_INSN_START_EXTRA_WORDS in 'cpu-param.h' Date: Wed, 23 Apr 2025 17:49:13 -0700 Message-ID: <20250424004934.598783-129-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé To avoid including the huge "cpu.h" for a simple definition, move TARGET_INSN_START_EXTRA_WORDS to "cpu-param.h". Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/insn-start-words.h | 2 +- target/arm/cpu-param.h | 7 +++++++ target/arm/cpu.h | 6 ------ target/hppa/cpu-param.h | 2 ++ target/hppa/cpu.h | 2 -- target/i386/cpu-param.h | 2 ++ target/i386/cpu.h | 2 -- target/m68k/cpu-param.h | 2 ++ target/m68k/cpu.h | 2 -- target/microblaze/cpu-param.h | 2 ++ target/microblaze/cpu.h | 2 -- target/mips/cpu-param.h | 2 ++ target/mips/cpu.h | 2 -- target/openrisc/cpu-param.h | 2 ++ target/openrisc/cpu.h | 2 -- target/riscv/cpu-param.h | 8 ++++++++ target/riscv/cpu.h | 6 ------ target/s390x/cpu-param.h | 2 ++ target/s390x/cpu.h | 2 -- target/sh4/cpu-param.h | 2 ++ target/sh4/cpu.h | 2 -- target/sparc/cpu-param.h | 2 ++ target/sparc/cpu.h | 1 - 23 files changed, 34 insertions(+), 30 deletions(-) diff --git a/include/tcg/insn-start-words.h b/include/tcg/insn-start-words.h index 50c18bd326..c439c09f2f 100644 --- a/include/tcg/insn-start-words.h +++ b/include/tcg/insn-start-words.h @@ -6,7 +6,7 @@ #ifndef TARGET_INSN_START_WORDS -#include "cpu.h" +#include "cpu-param.h" #ifndef TARGET_INSN_START_EXTRA_WORDS # define TARGET_INSN_START_WORDS 1 diff --git a/target/arm/cpu-param.h b/target/arm/cpu-param.h index a7ae42d17d..2cee4be693 100644 --- a/target/arm/cpu-param.h +++ b/target/arm/cpu-param.h @@ -37,6 +37,13 @@ # define TARGET_PAGE_BITS_LEGACY 10 #endif /* !CONFIG_USER_ONLY */ +/* + * ARM-specific extra insn start words: + * 1: Conditional execution bits + * 2: Partial exception syndrome for data aborts + */ +#define TARGET_INSN_START_EXTRA_WORDS 2 + /* ARM processors have a weak memory model */ #define TCG_GUEST_DEFAULT_MO (0) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index c1a0faed3a..3705b34285 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -98,12 +98,6 @@ #define offsetofhigh32(S, M) (offsetof(S, M) + sizeof(uint32_t)) #endif -/* ARM-specific extra insn start words: - * 1: Conditional execution bits - * 2: Partial exception syndrome for data aborts - */ -#define TARGET_INSN_START_EXTRA_WORDS 2 - /* The 2nd extra word holding syndrome info for data aborts does not use * the upper 6 bits nor the lower 13 bits. We mask and shift it down to * help the sleb128 encoder do a better job. diff --git a/target/hppa/cpu-param.h b/target/hppa/cpu-param.h index 7ed6b5741e..68ed84e84a 100644 --- a/target/hppa/cpu-param.h +++ b/target/hppa/cpu-param.h @@ -19,6 +19,8 @@ #define TARGET_PAGE_BITS 12 +#define TARGET_INSN_START_EXTRA_WORDS 2 + /* PA-RISC 1.x processors have a strong memory model. */ /* * ??? While we do not yet implement PA-RISC 2.0, those processors have diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index da5f8adcd5..acc9937240 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -48,8 +48,6 @@ #define PRIV_KERNEL 0 #define PRIV_USER 3 -#define TARGET_INSN_START_EXTRA_WORDS 2 - /* No need to flush MMU_ABS*_IDX */ #define HPPA_MMU_FLUSH_MASK \ (1 << MMU_KERNEL_IDX | 1 << MMU_KERNEL_P_IDX | \ diff --git a/target/i386/cpu-param.h b/target/i386/cpu-param.h index b0e884c5d7..0c8efce861 100644 --- a/target/i386/cpu-param.h +++ b/target/i386/cpu-param.h @@ -22,6 +22,8 @@ #endif #define TARGET_PAGE_BITS 12 +#define TARGET_INSN_START_EXTRA_WORDS 1 + /* The x86 has a strong memory model with some store-after-load re-ordering */ #define TCG_GUEST_DEFAULT_MO (TCG_MO_ALL & ~TCG_MO_ST_LD) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 17ad0b644b..9866595cd0 100644 --- a/target/i386/cpu.h +++ b/target/i386/cpu.h @@ -1610,8 +1610,6 @@ typedef struct { #define MAX_FIXED_COUNTERS 3 #define MAX_GP_COUNTERS (MSR_IA32_PERF_STATUS - MSR_P6_EVNTSEL0) -#define TARGET_INSN_START_EXTRA_WORDS 1 - #define NB_OPMASK_REGS 8 /* CPU can't have 0xFFFFFFFF APIC ID, use that value to distinguish diff --git a/target/m68k/cpu-param.h b/target/m68k/cpu-param.h index 7afbf6d302..256a2b5f8b 100644 --- a/target/m68k/cpu-param.h +++ b/target/m68k/cpu-param.h @@ -17,4 +17,6 @@ #define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 +#define TARGET_INSN_START_EXTRA_WORDS 1 + #endif diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 0b70e8c6ab..39d0b9d6d7 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -78,8 +78,6 @@ #define M68K_MAX_TTR 2 #define TTR(type, index) ttr[((type & ACCESS_CODE) == ACCESS_CODE) * 2 + index] -#define TARGET_INSN_START_EXTRA_WORDS 1 - typedef CPU_LDoubleU FPReg; typedef struct CPUArchState { diff --git a/target/microblaze/cpu-param.h b/target/microblaze/cpu-param.h index c866ec6c14..5d55e0e3c4 100644 --- a/target/microblaze/cpu-param.h +++ b/target/microblaze/cpu-param.h @@ -27,6 +27,8 @@ /* FIXME: MB uses variable pages down to 1K but linux only uses 4k. */ #define TARGET_PAGE_BITS 12 +#define TARGET_INSN_START_EXTRA_WORDS 1 + /* MicroBlaze is always in-order. */ #define TCG_GUEST_DEFAULT_MO TCG_MO_ALL diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 2bfa396c96..d511f22a55 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -233,8 +233,6 @@ typedef struct CPUArchState CPUMBState; #define STREAM_CONTROL (1 << 3) #define STREAM_NONBLOCK (1 << 4) -#define TARGET_INSN_START_EXTRA_WORDS 1 - /* use-non-secure property masks */ #define USE_NON_SECURE_M_AXI_DP_MASK 0x1 #define USE_NON_SECURE_M_AXI_IP_MASK 0x2 diff --git a/target/mips/cpu-param.h b/target/mips/cpu-param.h index 8fcb1b4f5f..99ca8d1684 100644 --- a/target/mips/cpu-param.h +++ b/target/mips/cpu-param.h @@ -20,6 +20,8 @@ #endif #define TARGET_PAGE_BITS 12 +#define TARGET_INSN_START_EXTRA_WORDS 2 + #define TCG_GUEST_DEFAULT_MO (0) #endif diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 20f31370bc..d16f9a7220 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -100,8 +100,6 @@ struct CPUMIPSFPUContext { #define FP_UNIMPLEMENTED 32 }; -#define TARGET_INSN_START_EXTRA_WORDS 2 - typedef struct CPUMIPSMVPContext CPUMIPSMVPContext; struct CPUMIPSMVPContext { int32_t CP0_MVPControl; diff --git a/target/openrisc/cpu-param.h b/target/openrisc/cpu-param.h index 37627f2c39..7ea0ecb55a 100644 --- a/target/openrisc/cpu-param.h +++ b/target/openrisc/cpu-param.h @@ -12,6 +12,8 @@ #define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 +#define TARGET_INSN_START_EXTRA_WORDS 1 + #define TCG_GUEST_DEFAULT_MO (0) #endif diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index 19ee85ff5a..569819bfb0 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -40,8 +40,6 @@ struct OpenRISCCPUClass { ResettablePhases parent_phases; }; -#define TARGET_INSN_START_EXTRA_WORDS 1 - enum { MMU_NOMMU_IDX = 0, MMU_SUPERVISOR_IDX = 1, diff --git a/target/riscv/cpu-param.h b/target/riscv/cpu-param.h index fba30e966a..ff4ba81965 100644 --- a/target/riscv/cpu-param.h +++ b/target/riscv/cpu-param.h @@ -16,6 +16,14 @@ # define TARGET_VIRT_ADDR_SPACE_BITS 32 /* sv32 */ #endif #define TARGET_PAGE_BITS 12 /* 4 KiB Pages */ + +/* + * RISC-V-specific extra insn start words: + * 1: Original instruction opcode + * 2: more information about instruction + */ +#define TARGET_INSN_START_EXTRA_WORDS 2 + /* * The current MMU Modes are: * - U mode 0b000 diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 867e539b53..167909c89b 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -45,12 +45,6 @@ typedef struct CPUArchState CPURISCVState; # define TYPE_RISCV_CPU_BASE TYPE_RISCV_CPU_BASE64 #endif -/* - * RISC-V-specific extra insn start words: - * 1: Original instruction opcode - * 2: more information about instruction - */ -#define TARGET_INSN_START_EXTRA_WORDS 2 /* * b0: Whether a instruction always raise a store AMO or not. */ diff --git a/target/s390x/cpu-param.h b/target/s390x/cpu-param.h index 5c331ec424..a8a4377f4f 100644 --- a/target/s390x/cpu-param.h +++ b/target/s390x/cpu-param.h @@ -12,6 +12,8 @@ #define TARGET_PHYS_ADDR_SPACE_BITS 64 #define TARGET_VIRT_ADDR_SPACE_BITS 64 +#define TARGET_INSN_START_EXTRA_WORDS 2 + /* * The z/Architecture has a strong memory model with some * store-after-load re-ordering. diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index 940eda8dd1..90f64ee20c 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -37,8 +37,6 @@ #define TARGET_HAS_PRECISE_SMC -#define TARGET_INSN_START_EXTRA_WORDS 2 - #define MMU_USER_IDX 0 #define S390_MAX_CPUS 248 diff --git a/target/sh4/cpu-param.h b/target/sh4/cpu-param.h index 2b6e11dd0a..f328715ee8 100644 --- a/target/sh4/cpu-param.h +++ b/target/sh4/cpu-param.h @@ -16,4 +16,6 @@ # define TARGET_VIRT_ADDR_SPACE_BITS 32 #endif +#define TARGET_INSN_START_EXTRA_WORDS 1 + #endif diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index 7752a0c2e1..906f99ddf0 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h @@ -127,8 +127,6 @@ typedef struct tlb_t { #define UTLB_SIZE 64 #define ITLB_SIZE 4 -#define TARGET_INSN_START_EXTRA_WORDS 1 - enum sh_features { SH_FEATURE_SH4A = 1, SH_FEATURE_BCR3_AND_BCR4 = 2, diff --git a/target/sparc/cpu-param.h b/target/sparc/cpu-param.h index 6952ee2b82..62d47b804b 100644 --- a/target/sparc/cpu-param.h +++ b/target/sparc/cpu-param.h @@ -21,6 +21,8 @@ # define TARGET_VIRT_ADDR_SPACE_BITS 32 #endif +#define TARGET_INSN_START_EXTRA_WORDS 1 + /* * From Oracle SPARC Architecture 2015: * diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h index 734dfdb1d3..83ac818933 100644 --- a/target/sparc/cpu.h +++ b/target/sparc/cpu.h @@ -223,7 +223,6 @@ typedef struct trap_state { uint32_t tt; } trap_state; #endif -#define TARGET_INSN_START_EXTRA_WORDS 1 typedef struct sparc_def_t { const char *name; From patchwork Thu Apr 24 00:49:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883886 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207383wrs; Wed, 23 Apr 2025 18:22:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVwcOw+ngvVkXtI4trUYQFNt0XFP/ia5dQQFe6kEJmMPc9dkNLD5xwy3M8lNnqIL5QW3iPajw==@linaro.org X-Google-Smtp-Source: AGHT+IERA85ICYvRNZYSbWDFqG4cQRmI9RIvG9U8cJhj3lCLzHbHWoxir+hwy1EJMk389mtgDsGS X-Received: by 2002:a05:622a:554:b0:471:cdae:ac44 with SMTP id d75a77b69052e-47eb52b3358mr10936211cf.47.1745457731853; Wed, 23 Apr 2025 18:22:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457731; cv=none; d=google.com; s=arc-20240605; b=FAHz+3CydrBlk1b5Nu3x3P/EMsruuwxCxTgkVuVxvn7dH4wzdomiEj/hiIEZaBDDd5 7P72cK1rMsrIaTlddT1fx9GaS72WN1ZdHJS7kfdRzEDediYNKtEL0d/MVLQGzAWE5q67 GHddxOT67klMEupZ1gM+Eb+Bz2AwephjQXqeBsAchHBEk2lyLf/gdB97ZmICrJCnS1ik iurhmcEX6lb62LZlVu9GWdnyo916MuoFgSDb4EroGtX1a/iXuGylL53agK8Zm9KY8aFj 0WR79pev6igS4pKwdI35HBG6ykQjHKZJJYLyP3lLePv+F/2LbTjh0bRtAX5ExtWe/bc+ +QPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TD3+nJDQxNuFLk7Pe2oHBRQSgwi4i3j139vVWlzEmKQ=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=MyORl7p/DGxCUHRr0MWBoB9k1I8J+K1VWApc8Qwxfape8GhHANVeVDmKViKR76qvAX 0D5XAdaBDlLx+J3HrYZpg4iA+qd7YuWRrB1hdh92xLppkoFfMCsHMsGKvxyO4xK8z5Ky aYjxql3uq8Zfvu2me7uYH/CN6apJM7C9hnbI0t+lnaNTnVh5cEhcKmrEO6TsgtMkQGa3 WKEigrUjbqLPowdqZ1cn4lSr+/2KjDsgwOT5ugy5/EXdqpv0wUUUwQA64KlM8wFhijs9 MkhJJ62a73hYfjRFQbGfPOOGtik42MZb4/m2XhyeZ6fQCrHqEIUEhhwpr4s9muah9cPt RtLA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lDi1g0gt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1f95c0fsi5658711cf.352.2025.04.23.18.22.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:22:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lDi1g0gt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kzN-0000Og-S4; Wed, 23 Apr 2025 21:03: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 1u7kwo-0004zV-DU for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:16 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwl-0005Tv-4h for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:13 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-227d6b530d8so4631565ad.3 for ; Wed, 23 Apr 2025 18:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456409; x=1746061209; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TD3+nJDQxNuFLk7Pe2oHBRQSgwi4i3j139vVWlzEmKQ=; b=lDi1g0gtwNkCMmNQVmAy0euEJ73WQRiQkSdfPZw8GsqwUodjtvbUKHKuMoa/jV34Pt ZkgsqTvt3jg2v/siYO+h3Sn1r542Mkf5lTvnA2wQn2XXTo+o4M8QBhRfdv3Gb4wlR3R5 JN4dWGjm+Hz99WgvOrZa1BMu+N3IymAWGhTPV4E+vCd3X/Ey7suDVSFkGcY2BMr57SZb zuHsO1coUaDd+Pn4zTThgIXQAbFG0zGPpmD5lgY4fclK7vbi9DC7jLymKp2wnLKKja5b lndMsuh+42ZW3RLXeJaMGJX8s91FFhHX+UIgUdeDRVz6Dlx1g6UhsbJSaGPW1kBKTV7x fADQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456409; x=1746061209; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TD3+nJDQxNuFLk7Pe2oHBRQSgwi4i3j139vVWlzEmKQ=; b=A5sU4I2+eVM7vwyw/hhWvgB5YsaKDWlcQ7MrApzBZLv75GVh+2aJLCWM7KIeUry33e o937Fj6QIZh64xxUi+SMDDumFMI1ZqHezS9CksTg5NCHpp54dsNIfkQDo9xL9WwCMdxY pdRuspsOQYaHc6tT54pisKRaeO85Rr7UPjj5qOG4T8FaoDvq8rYM8UB2Lr2Gyaud5n5f DWR8hLqhr1nNssNNQusC2DF+ThrIuzWeMV6rWvi9h/7dP/3LbFpww8o6Qpx784hD6kDs 1z19+6BinaKo9L9ELQbXZWbNb+ztAI9TZvaWLkn1kpWaKBXP6yNuobB5hv0iMZgYKlw0 l/tg== X-Gm-Message-State: AOJu0YwJbFK7caJPqBzNENguJSdfzvg+DwVVe6+gHLZk6BVQhbwT2c6T ol3jDrkgF6tonWlcD69jV69eUPt5ve3eF5ORnHv4dHtHYbrOJI8t1aFEETP5KLfw8LCNnsYoN4B 9 X-Gm-Gg: ASbGncvnK7sUKo8pd5KpQlSAT+cui3BLniRzv1bHFBeBpVTzGSedRQkM4Fb8y3h+0uZ eHIFxPEnh+HzDhyG6ju4bec9QQqg2JnlF4dWbSWqYvNuKGDfddPYjiW0nFX1VOWDSD5V5lS9Rh1 crc3D4s6Wgkyx7lD70DCcw3pz74ei7VbIWQp1bExeP38xmm0kncTIrKYaDhf1I18DT4tR7WmHXE PgE00ANCNXLdrmcRCs8yJvX7PRA2RAB1cbAtO7guSaEnpaW6A99+Mf2UrGvXQ27cBYkHHoTUdsa Rj83WFpDffXQY7q6eD2uNE0ki9EYi08Mrsey5W6BFOql1/3EEa2JS4K5A7nTKaMSgrdqwn4LXow = X-Received: by 2002:a17:902:ebcb:b0:22c:35c5:e30d with SMTP id d9443c01a7336-22db3c0bf11mr7968205ad.13.1745456409399; Wed, 23 Apr 2025 18:00:09 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 129/148] tcg: Always define TARGET_INSN_START_EXTRA_WORDS Date: Wed, 23 Apr 2025 17:49:14 -0700 Message-ID: <20250424004934.598783-130-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Do not define TARGET_INSN_START_EXTRA_WORDS under the hood, have each target explicitly define it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- include/tcg/insn-start-words.h | 4 ---- include/tcg/tcg-op.h | 2 +- target/alpha/cpu-param.h | 2 ++ target/avr/cpu-param.h | 2 ++ target/hexagon/cpu-param.h | 2 ++ target/loongarch/cpu-param.h | 2 ++ target/ppc/cpu-param.h | 2 ++ target/rx/cpu-param.h | 2 ++ target/tricore/cpu-param.h | 2 ++ target/xtensa/cpu-param.h | 2 ++ 10 files changed, 17 insertions(+), 5 deletions(-) diff --git a/include/tcg/insn-start-words.h b/include/tcg/insn-start-words.h index c439c09f2f..d416d19bcf 100644 --- a/include/tcg/insn-start-words.h +++ b/include/tcg/insn-start-words.h @@ -8,10 +8,6 @@ #include "cpu-param.h" -#ifndef TARGET_INSN_START_EXTRA_WORDS -# define TARGET_INSN_START_WORDS 1 -#else # define TARGET_INSN_START_WORDS (1 + TARGET_INSN_START_EXTRA_WORDS) -#endif #endif /* TARGET_INSN_START_WORDS */ diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index bc46b5570c..cded92a447 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -23,7 +23,7 @@ # error #endif -#ifndef TARGET_INSN_START_EXTRA_WORDS +#if TARGET_INSN_START_EXTRA_WORDS == 0 static inline void tcg_gen_insn_start(target_ulong pc) { TCGOp *op = tcg_emit_op(INDEX_op_insn_start, 64 / TCG_TARGET_REG_BITS); diff --git a/target/alpha/cpu-param.h b/target/alpha/cpu-param.h index 63989e71c0..dd44feb179 100644 --- a/target/alpha/cpu-param.h +++ b/target/alpha/cpu-param.h @@ -24,6 +24,8 @@ # define TARGET_VIRT_ADDR_SPACE_BITS (30 + TARGET_PAGE_BITS) #endif +#define TARGET_INSN_START_EXTRA_WORDS 0 + /* Alpha processors have a weak memory model */ #define TCG_GUEST_DEFAULT_MO (0) diff --git a/target/avr/cpu-param.h b/target/avr/cpu-param.h index f5248ce9e7..9d37848d97 100644 --- a/target/avr/cpu-param.h +++ b/target/avr/cpu-param.h @@ -25,6 +25,8 @@ #define TARGET_PHYS_ADDR_SPACE_BITS 24 #define TARGET_VIRT_ADDR_SPACE_BITS 24 +#define TARGET_INSN_START_EXTRA_WORDS 0 + #define TCG_GUEST_DEFAULT_MO 0 #endif diff --git a/target/hexagon/cpu-param.h b/target/hexagon/cpu-param.h index 45ee7b4640..635d509e74 100644 --- a/target/hexagon/cpu-param.h +++ b/target/hexagon/cpu-param.h @@ -23,4 +23,6 @@ #define TARGET_PHYS_ADDR_SPACE_BITS 36 #define TARGET_VIRT_ADDR_SPACE_BITS 32 +#define TARGET_INSN_START_EXTRA_WORDS 0 + #endif diff --git a/target/loongarch/cpu-param.h b/target/loongarch/cpu-param.h index 52437946e5..dbe414bb35 100644 --- a/target/loongarch/cpu-param.h +++ b/target/loongarch/cpu-param.h @@ -13,6 +13,8 @@ #define TARGET_PAGE_BITS 12 +#define TARGET_INSN_START_EXTRA_WORDS 0 + #define TCG_GUEST_DEFAULT_MO (0) #endif diff --git a/target/ppc/cpu-param.h b/target/ppc/cpu-param.h index 553ad2f4c6..d0651d2ac8 100644 --- a/target/ppc/cpu-param.h +++ b/target/ppc/cpu-param.h @@ -37,6 +37,8 @@ # define TARGET_PAGE_BITS 12 #endif +#define TARGET_INSN_START_EXTRA_WORDS 0 + #define TCG_GUEST_DEFAULT_MO 0 #endif diff --git a/target/rx/cpu-param.h b/target/rx/cpu-param.h index ef1970a09e..84934f3bca 100644 --- a/target/rx/cpu-param.h +++ b/target/rx/cpu-param.h @@ -24,4 +24,6 @@ #define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 +#define TARGET_INSN_START_EXTRA_WORDS 0 + #endif diff --git a/target/tricore/cpu-param.h b/target/tricore/cpu-param.h index 790242ef3d..eb33a67c41 100644 --- a/target/tricore/cpu-param.h +++ b/target/tricore/cpu-param.h @@ -12,4 +12,6 @@ #define TARGET_PHYS_ADDR_SPACE_BITS 32 #define TARGET_VIRT_ADDR_SPACE_BITS 32 +#define TARGET_INSN_START_EXTRA_WORDS 0 + #endif diff --git a/target/xtensa/cpu-param.h b/target/xtensa/cpu-param.h index 5e4848ad05..e7cb747aaa 100644 --- a/target/xtensa/cpu-param.h +++ b/target/xtensa/cpu-param.h @@ -16,6 +16,8 @@ #define TARGET_VIRT_ADDR_SPACE_BITS 32 #endif +#define TARGET_INSN_START_EXTRA_WORDS 0 + /* Xtensa processors have a weak memory model */ #define TCG_GUEST_DEFAULT_MO (0) From patchwork Thu Apr 24 00:49:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883924 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3209830wrs; Wed, 23 Apr 2025 18:31:23 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWz2iJNZhts1G50iuA6IR8Xyn1tAeEBdr8DvpxjsCuKUn85FCLYGrJlBHkjXh5Pzq+CHuEO1w==@linaro.org X-Google-Smtp-Source: AGHT+IGbkrvi4MKDeLquyybaYX3zbFe+E/n6f5GJZpUAU7QUZscdFCWBc1YAI4W1be1hrl+kWEyF X-Received: by 2002:ac8:7e92:0:b0:476:afd2:5b6f with SMTP id d75a77b69052e-47eb33a690amr8781481cf.29.1745458283739; Wed, 23 Apr 2025 18:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458283; cv=none; d=google.com; s=arc-20240605; b=aFgJUHO5J+G1sdSRBb2QDAqhDaemnVLbeuoFzNvM1A3igfun5OQ3gCrzCVATI2e3dI +MtIkjC+ndMvZEFs0dNhcIC9FUw4lxU3W3kyPuOJ2foYWoLNp5zXTEnA7o6USHsj603B B+itYozb9JfSI00X3E7zN98KdPuf7Qu05g7Dc7SbpXPJ1XaBioopjQNQpi8CjdZY2rNf PUZgAL9E+3Zb5q75XjXx6a7utsZ6djzD8Tlyzykl4F9UGQ2DUmF62fYqDeXy9regK7LP TCNiCcAJGxaez0EcqH4QeJkWjl+Wg0Bka0Pq4H+3YA+AdzAuQFircP0cF6gurMiyMPTN EFRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=v9hCTYp5xbc1UwKRhEJl2katxrg6RoRKPLw5poUutPU=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=bRs897p8gOyjJ3UHXR3Vge4+d7D/+3gn/68oXaIo3VRqbptUl1UwD7CU48+F5F1nsW E3HdSw4lngb0afO95uGPkRxvoqQlhsS7scXIxImDiljwTcu9j+0BEQarcvNp66NkcN65 dONQyXdyNeV+dMB9ciJccZaUL4sVGAmUIPBOE4x+9mPByOpTBZo+OA9TzXU0S80MqLsg knk8SouzMmwcQ5CdBW7z04c/XAfk/B/OIyA2le4P95cWiW0qhGa7EnIwQ8dUuoCf2H2b Eook9abSus/ulXMaFI+20xuBhAYKiondcBubmdFhUJ9sBCVY6A9WZJtp7KGtn/hQOXG6 IQbg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qgMs8IKi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47e9f2ca18esi5443131cf.22.2025.04.23.18.31.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:31:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qgMs8IKi; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ky0-0007CK-8A; Wed, 23 Apr 2025 21:01:30 -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 1u7kwo-0004zX-Gp for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:16 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwl-0005U4-Im for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:13 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-22d95f0dda4so6724645ad.2 for ; Wed, 23 Apr 2025 18:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456410; x=1746061210; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v9hCTYp5xbc1UwKRhEJl2katxrg6RoRKPLw5poUutPU=; b=qgMs8IKiHumsykUlPLix9o3KrOO9jNjvLnl6ggiBOyakab43hwLWxJwKfgsD+639pI 3B4WpHppZYVEPhpNS6t90+c2c410zCd8BUby9VGtSiWFxt5W6L1FW9+VVqMDhMZBk5en wdTqJKPJdMLpkgvQykhDA9wHqMdPJVN5tgaxCy3aqAdNNc9hV5xaMPtKTh9l67GulLul AgBkKpFv5XA3RtZg8KL5bw7GG+vvZm5Or1lD6HiMj6VYufnZu2nvwCVxo6oin/MHMXyE 2w8njCmP4Yc/s6t9Q6Qu/t1c4b6tYFR0Ctp9PNoXRFqQTv+2djupQc+kiaOObHDV4n9W 3p9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456410; x=1746061210; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v9hCTYp5xbc1UwKRhEJl2katxrg6RoRKPLw5poUutPU=; b=B9s4fTAs7CrDB+bZyprTSyljRlzsptlPXGE2Sp+3vFR1awuJfJM1bMsg2sr6EFBeOT G2igQa/oaEirwbW3qih09qjUTMGx1BcuBsv8W6PiTL9HtAVSplR3NKDVt2mg250bsET2 /tuv8FyNka+6AFj4fLX8YhkfGzQrz2oqWIJIXU84+Mnio9CLNcsodk1mGhF8+rpB+yCO 0EaNWCdEepyqRnXJqJUAvnkMt8cP58vELWltE+PqSugJFItJzjXiIIuiAvORQr5trMEF Lqee047357/lu+vz05eIEySnPShcml60Ku8LTZTYYWhsDhTm8KebFsDE68XqXYEeMBnV 3XhA== X-Gm-Message-State: AOJu0Yw/LoZE3x5lHsOc/R0HI9SahGv/wZOg34TZ93BmGVO34E181RQk KSZDcLjPJLxsXtDR7EYdZcSKAsK9vC0qF7uZvkbIZVVPPxj/WHhYaX+pECLPNwWIh/blo0chVA9 F X-Gm-Gg: ASbGncvLjI5UjJ5sVSNFh6K1ZRi6U57+AztOTjVg1VfwM+3fuDGvvwmA2VvjV6fGvtF VeSiLoR6BNJACaSfIMxAJ26k8a9ayADy0d46Y2Oe/hyGOLAcRG6Sjr6ABfkSZJq/8M2ietMWO7P MwmwpZlwYDtfoeZOag43Ofk3eg5V/Ba5Nzr97ZfykdAQ4H2M2sqzcAYVz9Nf9bGCzYQFJzuTgxI V0dzuq9hzc/aYsujX2mZo5nRkoYfk1vctehJbSJxCAy7qP8YoRCyRIZm2Y2XDu8w5r9R2RxNHoH ggN3vKUCxBisKoaSfHuKA4YwIEzMJzpihT5l/tQoskWpPJy6buOi5kW/OCX4Px1n4hTmO32Hg5g = X-Received: by 2002:a17:902:d489:b0:220:ff3f:6cba with SMTP id d9443c01a7336-22db3d71b30mr8849455ad.38.1745456410008; Wed, 23 Apr 2025 18:00:10 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 130/148] exec: Restrict 'cpu-ldst-common.h' to accel/tcg/ Date: Wed, 23 Apr 2025 17:49:15 -0700 Message-ID: <20250424004934.598783-131-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- include/{exec => accel/tcg}/cpu-ldst-common.h | 6 +++--- include/exec/cpu_ldst.h | 2 +- accel/tcg/translator.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename include/{exec => accel/tcg}/cpu-ldst-common.h (97%) diff --git a/include/exec/cpu-ldst-common.h b/include/accel/tcg/cpu-ldst-common.h similarity index 97% rename from include/exec/cpu-ldst-common.h rename to include/accel/tcg/cpu-ldst-common.h index c46a6ade5d..8bf17c2fab 100644 --- a/include/exec/cpu-ldst-common.h +++ b/include/accel/tcg/cpu-ldst-common.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: LGPL-2.1-or-later */ -#ifndef CPU_LDST_COMMON_H -#define CPU_LDST_COMMON_H +#ifndef ACCEL_TCG_CPU_LDST_COMMON_H +#define ACCEL_TCG_CPU_LDST_COMMON_H #ifndef CONFIG_TCG #error Can only include this header with TCG @@ -119,4 +119,4 @@ uint32_t cpu_ldl_code_mmu(CPUArchState *env, vaddr addr, uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); -#endif /* CPU_LDST_COMMON_H */ +#endif /* ACCEL_TCG_CPU_LDST_COMMON_H */ diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 63847f6e61..74761ba5f3 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -67,7 +67,7 @@ #endif #include "exec/cpu-common.h" -#include "exec/cpu-ldst-common.h" +#include "accel/tcg/cpu-ldst-common.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/abi_ptr.h" diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index c53bbdef99..034f2f359e 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -11,7 +11,7 @@ #include "qemu/bswap.h" #include "qemu/log.h" #include "qemu/error-report.h" -#include "exec/cpu-ldst-common.h" +#include "accel/tcg/cpu-ldst-common.h" #include "accel/tcg/cpu-mmu-index.h" #include "exec/target_page.h" #include "exec/translator.h" From patchwork Thu Apr 24 00:49:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883907 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3208419wrs; Wed, 23 Apr 2025 18:26:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUt2A0eXuTSRbZPUz2dvhk/wK6uB53jlb+64f+IcW3E2rE7PNxAqAm/tlCC3EaDtrtHGNVT+w==@linaro.org X-Google-Smtp-Source: AGHT+IEg3vNipbAVEr9585m1xnPqljO6kPVE5U1nlSAJ0Fv5UuLEkN7AMH8Rc7bXwmHvmO7kRnmY X-Received: by 2002:a05:6214:761:b0:6d8:8a8f:75b0 with SMTP id 6a1803df08f44-6f4bfbe0750mr15307556d6.14.1745457969719; Wed, 23 Apr 2025 18:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457969; cv=none; d=google.com; s=arc-20240605; b=WppppCm0IRxNdLSDpv5v6oPsHMIc1NncxsjxaddUWWCF3DNc8FDe6vBYKMxNF4P66/ oeeb/TdZRjBlRFMQ+BFS1V3sZe2K73g0RYoUbqdRSb7eDe6HJbz3jE9wtNGNwB4zmNwG ifRYZFzdmqbpTkGTEIV8wAIXUbqz7Jdtesj4nDJ1FBkRAQUyUPmkFZTdNT2kT0E+LLM8 s2CBmsJMM1+A41lPAneSo8cSilDbWwLZfYe/XxqmNarh7tXnntVjwLgRlIgQBXkUvE3q ZJNgOKh8StKiUX+D61XBorApVzuD2LPFHfYfC6tOd436NuA3+4tcPjSbMFVjIlZ05d0z X7Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kG36f6Jj9ZLzZg5DXZFQTfeIh+dt0yHtk/44qelrlg0=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=N/xlq3OsjI0X33SoYg7thwRE6guWbjHhlEh5Gzz/g3ctA1hQn5qzCf2oh3lutT6Ovg 5/sr/58EVaK7xUeaYztRvjzamtyHSQh+0CW7a8GemaCCUPPry5QSIZdpK1co3UvPhxjf q8//mj83ydqTOHOSJgD7xwkMNlIbvrjDXQgywLzDiLL7WEbyJ+pCGGO3s7GsVnVAi27Y m64ZTT7vw9kMOkRyriBL01gUz8MS/IJUcg4NIM41WbIOa5CH1XnCZjitHPRJIfrrA/kZ Oe+4JvBfN2M5vofHzjFvPJ94amQoVHOMq8TXZpYp6lVnVxK14vuP43YVjNaczggkdiZh 3G6Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="a02W/ckA"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c08d26ebsi4097996d6.27.2025.04.23.18.26.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:26:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="a02W/ckA"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7ky5-0007Id-V3; Wed, 23 Apr 2025 21:01: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 1u7kws-00057H-G7 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:18 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0: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 1u7kwn-0005UG-TB for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:17 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-739b3fe7ce8so400713b3a.0 for ; Wed, 23 Apr 2025 18:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456411; x=1746061211; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kG36f6Jj9ZLzZg5DXZFQTfeIh+dt0yHtk/44qelrlg0=; b=a02W/ckAQUOW/ZD+17GRtbTVnO4eysijc4VS8aGU0nDRItoUkQZzDGkH4o/OJqm6OL nzAoYSCO+kK6lZxgQBPpSsCH6Ws3SNqF2R8Ps+MWhm/cmSg/HYZUvw9aXoPtd5OhrhKx zticAN2ATo6LoZHAxkUHbboulLrVbyikZ7RionSauJr69GRIyXS0LMHhmFiTecbxKqFx shhe0cWa2OXNq/zo5LqQX945u23FRZacteCzLrXgBS3E3HZoELIzNCmjxLo5kV/ff1V2 IK+C0lLABg8MKGzVF332PjQb02luPP4q+VFbSScZhLeGhSgxcFo6clC2pdZSBnHZpqP+ 796g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456411; x=1746061211; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kG36f6Jj9ZLzZg5DXZFQTfeIh+dt0yHtk/44qelrlg0=; b=tRqn8TuwHqOs5SK4a9Ycx+602rLvUNhB/tHyY7aXPvbWm/m4z0Sll1NWBWVCyksALw THjQCTHd6bhkqBm/mnuk4Fb7CglEtPRsWUOKpwk9YqvDwybCDm3GI8gZOiXJ2jp344EX XEDJbfZ+pjjycS6+/Si/yUpjPSXWhoMF+vw4GkRsrRh5NOJNGFG1uhs2OTPZPbF8c3p4 c5QrieLDUlQ0OKqBnOqmIzOq3Hb4gU7memBWYLniLwVQewSfAcAuWBQ1yHsHVL1Amf09 BE0xJHT4CuBzeM2RX67+ufuJHUlvhfP94J7oSdP5DLIPxRLldIJz7tWUtqEk3t7BbekN X/kQ== X-Gm-Message-State: AOJu0YyUPMlyD4gGHQpptqL1ts8lNULvnW+aVOsYPXwpGDWHk9lAREbs fIqPUZLWpj7WdajJ62uNYi0Vt6GB9HX6uRM8z6sc8C2v+t9WZILWgsVFBWZhU4L+sJ/WObUj8hZ G X-Gm-Gg: ASbGncsfu0YsttJQMyPQ61PRspPV+WAfedKPAQqbvbdblO96jftGvGDXddCayZ1tYYH TEK72REouMntoo1CYvV5V9g9XcNBw5WsuD/vyokfRb0h5P9IjwYVZ2YUUNaOTDHI5zN5+IsfpIo TypNeifEevJvI4ygrozUoYjQHFO19RegIkwGf/SB8DpCdRlcCRwi6qCxiVvLWEUIIryMunRnIdn xDdD1/9MVe/IJ31hFYk8t3N3HZu0aH8hou6MQf4ZKAvZHFlFKDvrRpZLt9KbPSnjCasaON8PYdy Wvj1TmQ1EXrYtr5kqEG8ZerOE+/oxX6yYZ/Ge8rehnrLB8nXa459CnAfWHU4LGsvYqp7UZ605t4 = X-Received: by 2002:a05:6a21:3513:b0:1f5:5ca4:2744 with SMTP id adf61e73a8af0-20444e94cd7mr909233637.17.1745456410925; Wed, 23 Apr 2025 18:00:10 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 131/148] exec: Restrict 'cpu_ldst.h' to accel/tcg/ Date: Wed, 23 Apr 2025 17:49:16 -0700 Message-ID: <20250424004934.598783-132-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Mechanical change using: $ sed -i -e 's,exec/cpu_ldst,accel/tcg/cpu-ldst,' \ $(git grep -l exec/cpu_ldst.h) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- bsd-user/qemu.h | 2 +- include/{exec/cpu_ldst.h => accel/tcg/cpu-ldst.h} | 6 +++--- include/exec/exec-all.h | 2 +- linux-user/qemu.h | 2 +- target/arm/tcg/sve_ldst_internal.h | 2 +- accel/tcg/cputlb.c | 2 +- accel/tcg/user-exec.c | 2 +- target/alpha/mem_helper.c | 2 +- target/arm/tcg/helper-a64.c | 2 +- target/arm/tcg/m_helper.c | 2 +- target/arm/tcg/mte_helper.c | 2 +- target/arm/tcg/mve_helper.c | 2 +- target/arm/tcg/op_helper.c | 2 +- target/arm/tcg/pauth_helper.c | 2 +- target/arm/tcg/sme_helper.c | 2 +- target/avr/helper.c | 2 +- target/hexagon/op_helper.c | 2 +- target/hexagon/translate.c | 2 +- target/hppa/op_helper.c | 2 +- target/i386/tcg/access.c | 2 +- target/i386/tcg/fpu_helper.c | 2 +- target/i386/tcg/mem_helper.c | 2 +- target/i386/tcg/mpx_helper.c | 2 +- target/i386/tcg/seg_helper.c | 2 +- target/i386/tcg/system/excp_helper.c | 2 +- target/i386/tcg/system/misc_helper.c | 2 +- target/i386/tcg/system/seg_helper.c | 2 +- target/i386/tcg/system/svm_helper.c | 2 +- target/i386/tcg/user/seg_helper.c | 2 +- target/loongarch/cpu.c | 2 +- target/loongarch/tcg/csr_helper.c | 2 +- target/loongarch/tcg/fpu_helper.c | 2 +- target/loongarch/tcg/iocsr_helper.c | 2 +- target/loongarch/tcg/op_helper.c | 2 +- target/loongarch/tcg/tlb_helper.c | 2 +- target/m68k/fpu_helper.c | 2 +- target/m68k/op_helper.c | 2 +- target/microblaze/cpu.c | 2 +- target/microblaze/op_helper.c | 2 +- target/microblaze/translate.c | 2 +- target/mips/tcg/ldst_helper.c | 2 +- target/mips/tcg/msa_helper.c | 2 +- target/mips/tcg/system/tlb_helper.c | 2 +- target/ppc/mem_helper.c | 2 +- target/ppc/mmu_helper.c | 2 +- target/ppc/tcg-excp_helper.c | 2 +- target/riscv/op_helper.c | 2 +- target/riscv/vector_helper.c | 2 +- target/riscv/zce_helper.c | 2 +- target/rx/helper.c | 2 +- target/rx/op_helper.c | 2 +- target/s390x/tcg/crypto_helper.c | 2 +- target/s390x/tcg/int_helper.c | 2 +- target/s390x/tcg/mem_helper.c | 2 +- target/s390x/tcg/misc_helper.c | 2 +- target/s390x/tcg/vec_helper.c | 2 +- target/sh4/op_helper.c | 2 +- target/sparc/int32_helper.c | 2 +- target/sparc/ldst_helper.c | 2 +- target/tricore/op_helper.c | 2 +- target/tricore/translate.c | 2 +- 61 files changed, 63 insertions(+), 63 deletions(-) rename include/{exec/cpu_ldst.h => accel/tcg/cpu-ldst.h} (99%) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index c1c508281a..244670dd24 100644 --- a/bsd-user/qemu.h +++ b/bsd-user/qemu.h @@ -22,7 +22,7 @@ #include "qemu/int128.h" #include "cpu.h" #include "qemu/units.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/exec-all.h" #include "user/abitypes.h" diff --git a/include/exec/cpu_ldst.h b/include/accel/tcg/cpu-ldst.h similarity index 99% rename from include/exec/cpu_ldst.h rename to include/accel/tcg/cpu-ldst.h index 74761ba5f3..f97a730703 100644 --- a/include/exec/cpu_ldst.h +++ b/include/accel/tcg/cpu-ldst.h @@ -59,8 +59,8 @@ * The "mmu" suffix carries the full MemOpIdx, with both mmu_idx and the * MemOp including alignment requirements. The alignment will be enforced. */ -#ifndef CPU_LDST_H -#define CPU_LDST_H +#ifndef ACCEL_TCG_CPU_LDST_H +#define ACCEL_TCG_CPU_LDST_H #ifndef CONFIG_TCG #error Can only include this header with TCG @@ -560,4 +560,4 @@ static inline void clear_helper_retaddr(void) #define clear_helper_retaddr() do { } while (0) #endif -#endif /* CPU_LDST_H */ +#endif /* ACCEL_TCG_CPU_LDST_H */ diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index f52a680f42..70608a11b6 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -21,7 +21,7 @@ #define EXEC_ALL_H #if defined(CONFIG_USER_ONLY) -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #endif #include "exec/mmu-access-type.h" #include "exec/translation-block.h" diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 948de8431a..0b19fa43e6 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -2,7 +2,7 @@ #define QEMU_H #include "cpu.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "user/abitypes.h" #include "user/page-protection.h" diff --git a/target/arm/tcg/sve_ldst_internal.h b/target/arm/tcg/sve_ldst_internal.h index 4f159ec4ad..f2243daf37 100644 --- a/target/arm/tcg/sve_ldst_internal.h +++ b/target/arm/tcg/sve_ldst_internal.h @@ -20,7 +20,7 @@ #ifndef TARGET_ARM_SVE_LDST_INTERNAL_H #define TARGET_ARM_SVE_LDST_INTERNAL_H -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" /* * Load one element into @vd + @reg_off from @host. diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 0de46903dd..2cafd38d2a 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -23,7 +23,7 @@ #include "exec/exec-all.h" #include "exec/page-protection.h" #include "system/memory.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/cputlb.h" #include "exec/tb-flush.h" #include "system/ram_addr.h" diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 7f57d8f1af..1b878ead7a 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -26,7 +26,7 @@ #include "tcg/tcg.h" #include "qemu/bitops.h" #include "qemu/rcu.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "user/cpu_loop.h" #include "qemu/main-loop.h" #include "user/page-protection.h" diff --git a/target/alpha/mem_helper.c b/target/alpha/mem_helper.c index 872955f5e7..a4d5adb40c 100644 --- a/target/alpha/mem_helper.c +++ b/target/alpha/mem_helper.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" static void do_unaligned_access(CPUAlphaState *env, vaddr addr, uintptr_t retaddr) { diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c index 507dbc1a44..08d8f63ffe 100644 --- a/target/arm/tcg/helper-a64.c +++ b/target/arm/tcg/helper-a64.c @@ -30,7 +30,7 @@ #include "qemu/crc32c.h" #include "exec/cpu-common.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/target_page.h" #include "exec/tlb-flags.h" #include "qemu/int128.h" diff --git a/target/arm/tcg/m_helper.c b/target/arm/tcg/m_helper.c index f7354f3c6e..37dc98dc35 100644 --- a/target/arm/tcg/m_helper.c +++ b/target/arm/tcg/m_helper.c @@ -18,7 +18,7 @@ #include "exec/exec-all.h" #include "exec/page-protection.h" #ifdef CONFIG_TCG -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "semihosting/common-semi.h" #endif #if !defined(CONFIG_USER_ONLY) diff --git a/target/arm/tcg/mte_helper.c b/target/arm/tcg/mte_helper.c index 888c670754..7dc5fb776b 100644 --- a/target/arm/tcg/mte_helper.c +++ b/target/arm/tcg/mte_helper.c @@ -29,7 +29,7 @@ #else #include "system/ram_addr.h" #endif -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/helper-proto.h" #include "exec/tlb-flags.h" #include "accel/tcg/cpu-ops.h" diff --git a/target/arm/tcg/mve_helper.c b/target/arm/tcg/mve_helper.c index 274003e2e5..f9f67d1f88 100644 --- a/target/arm/tcg/mve_helper.c +++ b/target/arm/tcg/mve_helper.c @@ -22,7 +22,7 @@ #include "internals.h" #include "vec_internal.h" #include "exec/helper-proto.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/exec-all.h" #include "tcg/tcg.h" #include "fpu/softfloat.h" diff --git a/target/arm/tcg/op_helper.c b/target/arm/tcg/op_helper.c index 71ba406782..38d49cbb9d 100644 --- a/target/arm/tcg/op_helper.c +++ b/target/arm/tcg/op_helper.c @@ -24,7 +24,7 @@ #include "internals.h" #include "cpu-features.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "cpregs.h" #define SIGNBIT (uint32_t)0x80000000 diff --git a/target/arm/tcg/pauth_helper.c b/target/arm/tcg/pauth_helper.c index c4b143024f..59bf27541d 100644 --- a/target/arm/tcg/pauth_helper.c +++ b/target/arm/tcg/pauth_helper.c @@ -22,7 +22,7 @@ #include "internals.h" #include "cpu-features.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/helper-proto.h" #include "tcg/tcg-gvec-desc.h" #include "qemu/xxhash.h" diff --git a/target/arm/tcg/sme_helper.c b/target/arm/tcg/sme_helper.c index dcc48e43db..96b84c37a2 100644 --- a/target/arm/tcg/sme_helper.c +++ b/target/arm/tcg/sme_helper.c @@ -22,7 +22,7 @@ #include "internals.h" #include "tcg/tcg-gvec-desc.h" #include "exec/helper-proto.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/exec-all.h" #include "qemu/int128.h" #include "fpu/softfloat.h" diff --git a/target/avr/helper.c b/target/avr/helper.c index 32cbf17919..afa591470f 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -27,7 +27,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/target_page.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/helper-proto.h" bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request) diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index 6da8db8ea5..3f3d86db2b 100644 --- a/target/hexagon/op_helper.c +++ b/target/hexagon/op_helper.c @@ -18,7 +18,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/helper-proto.h" #include "fpu/softfloat.h" #include "cpu.h" diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index fe7858703c..dd26801e64 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon/translate.c @@ -23,7 +23,7 @@ #include "exec/helper-gen.h" #include "exec/helper-proto.h" #include "exec/translation-block.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/log.h" #include "internal.h" #include "attribs.h" diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index beb8f88799..2398ce2c64 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "qemu/timer.h" #include "trace.h" #ifdef CONFIG_USER_ONLY diff --git a/target/i386/tcg/access.c b/target/i386/tcg/access.c index 5a4721dcee..0fdd587edd 100644 --- a/target/i386/tcg/access.c +++ b/target/i386/tcg/access.c @@ -3,7 +3,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/exec-all.h" #include "exec/target_page.h" #include "access.h" diff --git a/target/i386/tcg/fpu_helper.c b/target/i386/tcg/fpu_helper.c index c1184ca219..1cbadb1453 100644 --- a/target/i386/tcg/fpu_helper.c +++ b/target/i386/tcg/fpu_helper.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "tcg-cpu.h" #include "exec/cputlb.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/helper-proto.h" #include "fpu/softfloat.h" #include "fpu/softfloat-macros.h" diff --git a/target/i386/tcg/mem_helper.c b/target/i386/tcg/mem_helper.c index 3ef84e90d9..84a0815217 100644 --- a/target/i386/tcg/mem_helper.c +++ b/target/i386/tcg/mem_helper.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "qemu/int128.h" #include "qemu/atomic128.h" #include "tcg/tcg.h" diff --git a/target/i386/tcg/mpx_helper.c b/target/i386/tcg/mpx_helper.c index b942665adc..a0f816dfae 100644 --- a/target/i386/tcg/mpx_helper.c +++ b/target/i386/tcg/mpx_helper.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/helper-proto.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/exec-all.h" #include "exec/target_page.h" #include "helper-tcg.h" diff --git a/target/i386/tcg/seg_helper.c b/target/i386/tcg/seg_helper.c index 9dfbc4208c..3af902e0ec 100644 --- a/target/i386/tcg/seg_helper.c +++ b/target/i386/tcg/seg_helper.c @@ -23,7 +23,7 @@ #include "qemu/log.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/log.h" #include "helper-tcg.h" #include "seg_helper.h" diff --git a/target/i386/tcg/system/excp_helper.c b/target/i386/tcg/system/excp_helper.c index a563c9b35e..93614aa3e5 100644 --- a/target/i386/tcg/system/excp_helper.c +++ b/target/i386/tcg/system/excp_helper.c @@ -19,7 +19,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/target_page.h" diff --git a/target/i386/tcg/system/misc_helper.c b/target/i386/tcg/system/misc_helper.c index 67896c8c87..9c3f5cc99b 100644 --- a/target/i386/tcg/system/misc_helper.c +++ b/target/i386/tcg/system/misc_helper.c @@ -21,7 +21,7 @@ #include "qemu/main-loop.h" #include "cpu.h" #include "exec/helper-proto.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "system/address-spaces.h" #include "system/memory.h" #include "exec/cputlb.h" diff --git a/target/i386/tcg/system/seg_helper.c b/target/i386/tcg/system/seg_helper.c index b07cc9f9b1..d4ea890c12 100644 --- a/target/i386/tcg/system/seg_helper.c +++ b/target/i386/tcg/system/seg_helper.c @@ -23,7 +23,7 @@ #include "qemu/main-loop.h" #include "cpu.h" #include "exec/helper-proto.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "tcg/helper-tcg.h" #include "../seg_helper.h" diff --git a/target/i386/tcg/system/svm_helper.c b/target/i386/tcg/system/svm_helper.c index f9982b72d1..b27049b9ed 100644 --- a/target/i386/tcg/system/svm_helper.c +++ b/target/i386/tcg/system/svm_helper.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/cputlb.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "tcg/helper-tcg.h" /* Secure Virtual Machine helpers */ diff --git a/target/i386/tcg/user/seg_helper.c b/target/i386/tcg/user/seg_helper.c index c45f2ac2ba..5692dd5195 100644 --- a/target/i386/tcg/user/seg_helper.c +++ b/target/i386/tcg/user/seg_helper.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "tcg/helper-tcg.h" #include "tcg/seg_helper.h" diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index cb96b17911..4cc8e02f70 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -29,7 +29,7 @@ #include #endif #ifdef CONFIG_TCG -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "tcg/tcg.h" #endif diff --git a/target/loongarch/tcg/csr_helper.c b/target/loongarch/tcg/csr_helper.c index 6a7a65c860..2942d7feb8 100644 --- a/target/loongarch/tcg/csr_helper.c +++ b/target/loongarch/tcg/csr_helper.c @@ -13,7 +13,7 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "exec/cputlb.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "hw/irq.h" #include "cpu-csr.h" diff --git a/target/loongarch/tcg/fpu_helper.c b/target/loongarch/tcg/fpu_helper.c index a83acf64b0..fc3fd0561e 100644 --- a/target/loongarch/tcg/fpu_helper.c +++ b/target/loongarch/tcg/fpu_helper.c @@ -9,7 +9,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "fpu/softfloat.h" #include "internals.h" diff --git a/target/loongarch/tcg/iocsr_helper.c b/target/loongarch/tcg/iocsr_helper.c index b6916f53d2..e62170de3c 100644 --- a/target/loongarch/tcg/iocsr_helper.c +++ b/target/loongarch/tcg/iocsr_helper.c @@ -10,7 +10,7 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #define GET_MEMTXATTRS(cas) \ ((MemTxAttrs){.requester_id = env_cpu(cas)->cpu_index}) diff --git a/target/loongarch/tcg/op_helper.c b/target/loongarch/tcg/op_helper.c index b17208e5b9..94e3b28016 100644 --- a/target/loongarch/tcg/op_helper.c +++ b/target/loongarch/tcg/op_helper.c @@ -11,7 +11,7 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "internals.h" #include "qemu/crc32c.h" #include /* for crc32 */ diff --git a/target/loongarch/tcg/tlb_helper.c b/target/loongarch/tcg/tlb_helper.c index 0d6c9844a6..9a76a2a205 100644 --- a/target/loongarch/tcg/tlb_helper.c +++ b/target/loongarch/tcg/tlb_helper.c @@ -16,7 +16,7 @@ #include "exec/exec-all.h" #include "exec/page-protection.h" #include "exec/target_page.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/log.h" #include "cpu-csr.h" diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.c index eb1cb8c687..ac4a0d85be 100644 --- a/target/m68k/fpu_helper.c +++ b/target/m68k/fpu_helper.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "softfloat.h" /* diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index 15bad5dd46..242aecccbb 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "semihosting/semihost.h" #if !defined(CONFIG_USER_ONLY) diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 88baeb6807..d10ae0702a 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -28,7 +28,7 @@ #include "qemu/module.h" #include "hw/qdev-properties.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/gdbstub.h" #include "exec/translation-block.h" #include "fpu/softfloat-helpers.h" diff --git a/target/microblaze/op_helper.c b/target/microblaze/op_helper.c index f6378030b7..4624ce5b67 100644 --- a/target/microblaze/op_helper.c +++ b/target/microblaze/op_helper.c @@ -24,7 +24,7 @@ #include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "fpu/softfloat.h" void helper_put(uint32_t id, uint32_t ctrl, uint32_t data) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 4bb867c969..7dcad6cf0d 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -21,7 +21,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "tcg/tcg-op.h" #include "exec/helper-proto.h" #include "exec/helper-gen.h" diff --git a/target/mips/tcg/ldst_helper.c b/target/mips/tcg/ldst_helper.c index f92a923d7a..2fb879fcbc 100644 --- a/target/mips/tcg/ldst_helper.c +++ b/target/mips/tcg/ldst_helper.c @@ -24,7 +24,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/memop.h" #include "internal.h" diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index 969dd34b3e..14de4a71ff 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -22,7 +22,7 @@ #include "internal.h" #include "tcg/tcg.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/helper-proto.h" #include "exec/memop.h" #include "exec/target_page.h" diff --git a/target/mips/tcg/system/tlb_helper.c b/target/mips/tcg/system/tlb_helper.c index d239fa9353..e477ef812a 100644 --- a/target/mips/tcg/system/tlb_helper.c +++ b/target/mips/tcg/system/tlb_helper.c @@ -25,7 +25,7 @@ #include "exec/exec-all.h" #include "exec/page-protection.h" #include "exec/target_page.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/log.h" #include "exec/helper-proto.h" diff --git a/target/ppc/mem_helper.c b/target/ppc/mem_helper.c index 0967624afe..d7e8d678f4 100644 --- a/target/ppc/mem_helper.c +++ b/target/ppc/mem_helper.c @@ -24,7 +24,7 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "helper_regs.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "internal.h" #include "qemu/atomic128.h" diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c index c90ceb7d60..2138666122 100644 --- a/target/ppc/mmu_helper.c +++ b/target/ppc/mmu_helper.c @@ -37,7 +37,7 @@ #include "mmu-radix64.h" #include "mmu-booke.h" #include "exec/helper-proto.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" /* #define FLUSH_ALL_TLBS */ diff --git a/target/ppc/tcg-excp_helper.c b/target/ppc/tcg-excp_helper.c index c422648cfd..2b15e5f2f0 100644 --- a/target/ppc/tcg-excp_helper.c +++ b/target/ppc/tcg-excp_helper.c @@ -20,7 +20,7 @@ #include "qemu/main-loop.h" #include "qemu/log.h" #include "target/ppc/cpu.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" #include "system/runstate.h" diff --git a/target/riscv/op_helper.c b/target/riscv/op_helper.c index f3d26b6b95..5b0db2c45a 100644 --- a/target/riscv/op_helper.c +++ b/target/riscv/op_helper.c @@ -23,7 +23,7 @@ #include "internals.h" #include "exec/exec-all.h" #include "exec/cputlb.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/helper-proto.h" #include "exec/tlb-flags.h" #include "trace.h" diff --git a/target/riscv/vector_helper.c b/target/riscv/vector_helper.c index 7de6cbae5c..b8ae704457 100644 --- a/target/riscv/vector_helper.c +++ b/target/riscv/vector_helper.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "exec/memop.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/page-protection.h" #include "exec/helper-proto.h" #include "exec/tlb-flags.h" diff --git a/target/riscv/zce_helper.c b/target/riscv/zce_helper.c index b433bda16d..50d65f386c 100644 --- a/target/riscv/zce_helper.c +++ b/target/riscv/zce_helper.c @@ -20,7 +20,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" target_ulong HELPER(cm_jalt)(CPURISCVState *env, uint32_t index) { diff --git a/target/rx/helper.c b/target/rx/helper.c index e8aabf40ff..0640ab322b 100644 --- a/target/rx/helper.c +++ b/target/rx/helper.c @@ -20,7 +20,7 @@ #include "qemu/bitops.h" #include "cpu.h" #include "exec/log.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "hw/irq.h" void rx_cpu_unpack_psw(CPURXState *env, uint32_t psw, int rte) diff --git a/target/rx/op_helper.c b/target/rx/op_helper.c index b3ed822dd1..a2f1f3824d 100644 --- a/target/rx/op_helper.c +++ b/target/rx/op_helper.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "fpu/softfloat.h" #include "tcg/debug-assert.h" diff --git a/target/s390x/tcg/crypto_helper.c b/target/s390x/tcg/crypto_helper.c index 93aabd236f..642c1b18c4 100644 --- a/target/s390x/tcg/crypto_helper.c +++ b/target/s390x/tcg/crypto_helper.c @@ -18,7 +18,7 @@ #include "tcg_s390x.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" static uint64_t R(uint64_t x, int c) { diff --git a/target/s390x/tcg/int_helper.c b/target/s390x/tcg/int_helper.c index 2af970f2c8..253c036415 100644 --- a/target/s390x/tcg/int_helper.c +++ b/target/s390x/tcg/int_helper.c @@ -25,7 +25,7 @@ #include "exec/exec-all.h" #include "qemu/host-utils.h" #include "exec/helper-proto.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" /* #define DEBUG_HELPER */ #ifdef DEBUG_HELPER diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index d5eece4384..0cdfd380ce 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -28,7 +28,7 @@ #include "exec/exec-all.h" #include "exec/cputlb.h" #include "exec/page-protection.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/target_page.h" #include "exec/tlb-flags.h" #include "accel/tcg/cpu-ops.h" diff --git a/target/s390x/tcg/misc_helper.c b/target/s390x/tcg/misc_helper.c index e02f443850..d5088493ea 100644 --- a/target/s390x/tcg/misc_helper.c +++ b/target/s390x/tcg/misc_helper.c @@ -28,7 +28,7 @@ #include "qemu/timer.h" #include "exec/exec-all.h" #include "exec/cputlb.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/target_page.h" #include "qapi/error.h" #include "tcg_s390x.h" diff --git a/target/s390x/tcg/vec_helper.c b/target/s390x/tcg/vec_helper.c index dafc4c3582..781ccc565b 100644 --- a/target/s390x/tcg/vec_helper.c +++ b/target/s390x/tcg/vec_helper.c @@ -16,7 +16,7 @@ #include "tcg/tcg.h" #include "tcg/tcg-gvec-desc.h" #include "exec/helper-proto.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/exec-all.h" void HELPER(gvec_vbperm)(void *v1, const void *v2, const void *v3, diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c index 99394b714c..e7fcad3c1b 100644 --- a/target/sh4/op_helper.c +++ b/target/sh4/op_helper.c @@ -20,7 +20,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "fpu/softfloat.h" #ifndef CONFIG_USER_ONLY diff --git a/target/sparc/int32_helper.c b/target/sparc/int32_helper.c index f026606102..39db4ffa70 100644 --- a/target/sparc/int32_helper.c +++ b/target/sparc/int32_helper.c @@ -21,7 +21,7 @@ #include "qemu/main-loop.h" #include "cpu.h" #include "trace.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "exec/log.h" #include "system/runstate.h" diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index 3fa5e78816..4c5dba19d1 100644 --- a/target/sparc/ldst_helper.c +++ b/target/sparc/ldst_helper.c @@ -27,7 +27,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/target_page.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "system/memory.h" #ifdef CONFIG_USER_ONLY #include "user/page-protection.h" diff --git a/target/tricore/op_helper.c b/target/tricore/op_helper.c index a0d5a0da1d..ae559b6922 100644 --- a/target/tricore/op_helper.c +++ b/target/tricore/op_helper.c @@ -19,7 +19,7 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include /* for crc32 */ diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 5c7ed395ca..7cd26d8eab 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "tcg/tcg-op.h" -#include "exec/cpu_ldst.h" +#include "accel/tcg/cpu-ldst.h" #include "qemu/qemu-print.h" #include "exec/helper-proto.h" From patchwork Thu Apr 24 00:49:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883923 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3209818wrs; Wed, 23 Apr 2025 18:31:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWnz9MgvhDdG9MKdBbsDQq4mW8ft7G8VAv+GQzABvARClRvjebgrLNUnsG9W187iAO18GwEyw==@linaro.org X-Google-Smtp-Source: AGHT+IHzV/FSGoDZnnW/mJxsr9atm74AWvQwiOvQ+8FGRmV1SgdR7yWfFHfC6/ppdWSA8c+BG4ws X-Received: by 2002:a05:620a:25cb:b0:7c8:e67b:8076 with SMTP id af79cd13be357-7c956f60758mr158417185a.50.1745458281350; Wed, 23 Apr 2025 18:31:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458281; cv=none; d=google.com; s=arc-20240605; b=aflkNaQjETIC/3v19RxqY2Czhd8fLRutAZOQovZI+jF/WRKr1H8WAu5LZLyv9c7UFK EhC9yXFIe5zeJ1LLq1gdPnavSMFHXeJL2hBgmxIkNDWxQCMUQQQX7ank7/BCU1B8jEY/ Bco30zAwmsGCmhI6ihf7JhdUMnjAFd+ZezRD+7x76Xw2w1edF3hQcrvxbnmAB5ouFyBC M8AmBAcB3WtcEFiwyD5KsQ3xi4xY0x+q5OmCxNYrJbG+dmIhzr2MC69r4v2vISvUUeJT jXqRW1O5Xs0VvG8lBPr4eO7rby1LZOgt2kmUxjqiplSg6F2++ux3TUPNYopczfZ5BnGV +O5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Mp9J9qjnxFI/eYHYBGLU+fFqwqKgFBMYv+K6pTDgibE=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=dZNkl0P5+ufb9sczkfi/C60fiU5aatMTqO+cMhatZBPqzwUuNvokmsNxvopS10EIkL vEt91T4yrscKAsbalC5GxaoigAoX07bws0rEDdYhtG2bOd10tl+gLeF/zDZ86i2JZe2c c3uMwdhhpQxdvVVRi0vZ1/kLnMWcXZ/PL3QZPrJvbpzbFT86cL1FkEB0hG8o8s2S/Lcg nzuCtT8nuCr1rO+0mj1V4jE6MbX5xlxRYIqC44ZHNk/taE2o0HJA5ATxcG7TL4aWjemq +bQe7O5WN2xFOXzwuKv++r4ZDJIPAwTQ3b8GUMKJuFS4j3pNwRZYWA+HykkeVe3UdHSG 3vSQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=efDpYvo+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958c9b670si27550985a.98.2025.04.23.18.31.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:31:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=efDpYvo+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7l02-0001qN-6N; Wed, 23 Apr 2025 21:03: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 1u7kwq-00052O-GD for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:17 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwo-0005UN-5F for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:15 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-736a72220edso419994b3a.3 for ; Wed, 23 Apr 2025 18:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456412; x=1746061212; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Mp9J9qjnxFI/eYHYBGLU+fFqwqKgFBMYv+K6pTDgibE=; b=efDpYvo+Hv+NZNJ0SefBUwh/7aptIeF+Rvat0kqakMm3ijeR1JS1z953nFhailoFIy N2WmnMhESs00OLsLNJBJvxQlyzjf0op5u0L+lqLFODqvasTVPMXKl0Ct5+KPJx8tHHNp TR2GnpWG/gU+hqOxtsB5S7UJMmDYOZFsu5XncvnA0JsY8/LJ2iBNPip25dZrNIRmg+Bz nzU53Ub+HoqSwPczFvZYW7CkEjZnFkBT/cI+S1GPF/b045XXW+8qblaRbh5U5i+Z+rY7 8Pc1OnBaQosXqZRRq0E31PZH4jvBqQp1Q5xrLUoMiWgXa1yM0u8pVWbaZ62qDiIzWkIP wi3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456412; x=1746061212; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Mp9J9qjnxFI/eYHYBGLU+fFqwqKgFBMYv+K6pTDgibE=; b=qehHcf1lTkTp6TFboPq6U5AQ1XHQhysnzMN2qd2Mrp54zu81DO0/vEzROkrSYLGuHN qti01/TtLt5cfbPSrrYpvqeGVQldHZvV4di0H6CxEIotOqtShcdTel/Uxv0l8k2BD2wo Ll5+FCk4BuUixlVp5WbUUZIfPVTbxiING2CvlxKPi9YzqoptHqyaewHpmRMemI1KYMZO Oe6X9Vem80ILAeCx55kWyEEU7d0QCALzyryoJlzcVduTHH7v1qar9DqcwKybK5cigXRY /n5lo6klTsZic9GS2QO/woScBPs4s90VcMHrkPgf12zrBbPd/5D1rZ1+KJC+nUL9BuX5 hH2g== X-Gm-Message-State: AOJu0Yz8CiZqC8FreEG2pLJPGFN2EzjN2D+pzEUaKXeGP2Vq5J6zeow3 1C6uVbbtp5RBVI6NT3dBCkcgKOZ1ee70eCVGpRjj8cqJKUP2cl7P5hfOtYo9IuX9HwMx4u003H+ 2 X-Gm-Gg: ASbGncvWzK0cZain5qkaW+PkABNSw6C4Y85u/KjVI5I4iAuw7Gp2SWpvmzhdiJznpz6 SnBubHNKeW9OQdwgyxC7vzWG9cMr6q5kPzrW8hrHHdyU4ZGdsjLLTO+u6EkHcJva0+oAWgsIH3S dZzDBbiGVTCL9gkq13MOWdElfYHfE/545ufDVb4T2Wn48aBfXrGG9t1MEv39lvHfBFESsHi3wLe /oV2pH5xdj5GW8unogNAZxvaoDW9JIntFW/Th7vTKZTfvzld+2lN7fkdZqaXWlMaXu0i8RKB+AK 6HxS0H2+LH5BMdoHKOGOewcnZFW8d+zsYT53ts/TF3SZWjiIAAWNtWmfPCJzeQ125poo1/m5QNJ qKmd7W3jCtw== X-Received: by 2002:a05:6a20:c707:b0:1f5:8748:76b0 with SMTP id adf61e73a8af0-20444f25fd2mr887921637.29.1745456411667; Wed, 23 Apr 2025 18:00:11 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 132/148] exec: Do not include 'accel/tcg/cpu-ldst.h' in 'exec-all.h' Date: Wed, 23 Apr 2025 17:49:17 -0700 Message-ID: <20250424004934.598783-133-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Only 2 files requiring "accel/tcg/cpu-ldst.h" API do not include it: - accel/tcg/cpu-exec.c - target/arm/tcg/sve_helper.c Include it there and remove it from "exec/exec-all.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 3 --- accel/tcg/cpu-exec.c | 1 + target/arm/tcg/sve_helper.c | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 70608a11b6..944b579d91 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -20,9 +20,6 @@ #ifndef EXEC_ALL_H #define EXEC_ALL_H -#if defined(CONFIG_USER_ONLY) -#include "accel/tcg/cpu-ldst.h" -#endif #include "exec/mmu-access-type.h" #include "exec/translation-block.h" diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 5ced3879ac..b00f046b29 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -22,6 +22,7 @@ #include "qapi/error.h" #include "qapi/type-helpers.h" #include "hw/core/cpu.h" +#include "accel/tcg/cpu-ldst.h" #include "accel/tcg/cpu-ops.h" #include "trace.h" #include "disas/disas.h" diff --git a/target/arm/tcg/sve_helper.c b/target/arm/tcg/sve_helper.c index 9b0d40c9e1..87b6b4b3e6 100644 --- a/target/arm/tcg/sve_helper.c +++ b/target/arm/tcg/sve_helper.c @@ -30,6 +30,7 @@ #include "tcg/tcg.h" #include "vec_internal.h" #include "sve_ldst_internal.h" +#include "accel/tcg/cpu-ldst.h" #include "accel/tcg/cpu-ops.h" #ifdef CONFIG_USER_ONLY #include "user/page-protection.h" From patchwork Thu Apr 24 00:49:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883844 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3203996wrs; Wed, 23 Apr 2025 18:10:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUGvyO10dbDVP2tABw9jCHkI3yqXATgZbL8gg6gakxi6S7VYbfygwam5kvCsPCsX5+lY9n8Qw==@linaro.org X-Google-Smtp-Source: AGHT+IFQv8zYVESULBfv4rnNJ8Sm76uqYeSQ6WN+qGpv8Ce3amhC2OhQDWAVDhOPEpo7A7P147wK X-Received: by 2002:a05:622a:4d:b0:476:9377:17aa with SMTP id d75a77b69052e-47eb4ba3a4emr10604371cf.52.1745457033013; Wed, 23 Apr 2025 18:10:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457032; cv=none; d=google.com; s=arc-20240605; b=dXCu4iREfFc52KA/tR5fvfFSjG1AIJHiIAo0/y8fli953UMyQdGVRH5HVdCW83KrK4 ZxmDUmFZdBSzwi2NajlRR19W7XbRcsyhmQS2YHjKOnxAvjQ6fCLAgKFfm/iQ/NOaKcIM z96h8bc2wBFNm+B8PpiZqVQSv6O3PJoxRw7l4jCMxtPqUv1Dnpvuw6LD7fMOtNPLYf1W j7a6fku6BT847SvIFM1RXSFJ39Gap07xqa4phFDshV7MyM59/+VZUcdpWcmOrP7flFel J80fhr0udwYoGoXN3F7lDDpWhyhEOvKJOd2MjakCS66mUbbnQVTg207qU7iCLqpAGbqM 2pDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q2Qeo3QXQKKP4XnDRGevpdG6ZhTAI9iOzSVzVjKvTY4=; fh=GenBbR+/7gYaTcd1KqVHGA9TQPQZSS4lyPm/ns+6Qjo=; b=ZFnlZGcni9UKxQ/9MMfdcNnvQmk5a95qM8/HiypouIq/hgh/sWWGF9abmVVD+dxUEy EVGzOQIHnkkZzGLtf4oWbODQdr+8jGihAhJTJqY0uZaVbphEvZ6eIcfciybkMxiE7svj /OCkvsBLLpsIxsrcjOXFQnwckDaT4gm6eeV/t6lgQ/6CdeWEDZRq/V18ZMnGCRRjdazc NS7KmNzucAzE/VI2vqxeUej2CYSysZKFB9Jbgvd790dbqUWq+ca2SSeVup39WvesTc0o Q0HPEsP76Gvc1ILISNOZ/70jtEqSETKkXODec5jHlTIe/LSvHP9Qwy0DO7sY9MouSg1e XIEw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SlSL46FI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea199688esi5218711cf.281.2025.04.23.18.10.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:10:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SlSL46FI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kxj-0006lc-Nw; Wed, 23 Apr 2025 21:01:12 -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 1u7kwr-00055Y-Tf for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:18 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwo-0005UY-6g for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:17 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2279915e06eso4598915ad.1 for ; Wed, 23 Apr 2025 18:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456412; x=1746061212; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q2Qeo3QXQKKP4XnDRGevpdG6ZhTAI9iOzSVzVjKvTY4=; b=SlSL46FI/gIygliorbCTrsQm3AKSfDEBmbDjP9wXHgE9aHEENP19pgKDY7qDVpFhB/ 74P9bk+XwLYW2djFgqb9OZ8o+Wj6Yyc8dhJ8no0ZR0GtNh5aR19/sNjPKt8MGIA8g2Eq CQMIvSUNjUej7B5Pr6Y4Jp0sZycB+Blc6L1a7kRsGRfAiYfw3lVwerSYtus8zrbRz4ke iYbNRUKxmKy5EPz9c+1fl24X1T32XSaYX+KnDGX8EtCcszAjZKRQnCvqhLmvUs4tvIoS oIeLTXPa+sCq+3/s2zTUuJt85OC8xlFxOlZDkucQzOj4xDpX/FEz+W0ZvlEb9oZ06z4h GXfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456412; x=1746061212; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q2Qeo3QXQKKP4XnDRGevpdG6ZhTAI9iOzSVzVjKvTY4=; b=FyNYgw/j16/yP6ZTm4simL3ncS/91YUjbQ0F4s7juXnFUstfNBQPDaQKHz09DlG8RX MZnd8PDPRPbcpG6qPBCxLefX8VhmEK+LJikDpAIaHEyEruXz8/krL5S3RqhSMnt9gMYD G8sN1kpMn3zxGW6J60qIuKCLUH9AF3V8xGOEjOevJJoWzRcZlblHkrnBZwf2za0F/5SG IwD61vNz5usX2YMXDgP61vDMg7JQbzCP5UNH+4Co1VrAaqvqmSeebvloqtrq1hWOAg9K GgImqMZQxub9R+mTW8tc9NR+7QH2I7VPoFaPhBbAHKpBaO77DXBuVmB28OmGXSqq8DtP u4vg== X-Gm-Message-State: AOJu0Yzdt9wh6QhyJJ7ZopraOjsiSlMq5k7oyIr+BPTsmA4dNAPXzXG1 SOT+IBkSQyFJ1a8kD8DvCYpHgKf1FzaWwDgaD5iOUutmq2l3bxixdCn8KppYMJ+zuc+pgPFtkQu 4 X-Gm-Gg: ASbGncuyURlgu3SN0dkMk230FYa+odhdnNMqhIOGxFw8a2VZ3/V3RHqobPFs04zOfRw E2W/5stnk/l8cVX+ySDHVnc44bNOuLyZ8ty05EyT0+tsL3dkNuUR4AYOxoCsXuy8atzpHyCM544 VywsLC0o29y0tTFfUJhpUJOYyA1NpY+Yjo3Qe7cvHjZlS5+y4/KyjhRm7mZXhFCz/3E+2DD8N11 LHfQarLRaGvdv76kLAraRw7txyPD6uj0NqSfRIGIu3UI0IatmNz8aIBANEnIttlGiBzaKEI0lm8 SnrFTo3ADP+fj8o6NzhHJ2OKPviaHeelvKVSfaPtowRno0rNVs87HGI3v78P1ceL9iDsc/UoAk0 = X-Received: by 2002:a17:903:8c6:b0:223:619e:71e9 with SMTP id d9443c01a7336-22db3bb6f8cmr8245595ad.11.1745456412471; Wed, 23 Apr 2025 18:00:12 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Anton Johansson , Pierrick Bouvier Subject: [PULL 133/148] tcg: Always define TCG_GUEST_DEFAULT_MO Date: Wed, 23 Apr 2025 17:49:18 -0700 Message-ID: <20250424004934.598783-134-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé We only require the TCG_GUEST_DEFAULT_MO for MTTCG-enabled frontends, otherwise we use a default value of TCG_MO_ALL. In order to simplify, require the definition for all targets, defining it for hexagon, m68k, rx, sh4 and tricore. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/hexagon/cpu-param.h | 3 +++ target/m68k/cpu-param.h | 3 +++ target/rx/cpu-param.h | 3 +++ target/sh4/cpu-param.h | 3 +++ target/tricore/cpu-param.h | 3 +++ accel/tcg/translate-all.c | 4 ---- 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/target/hexagon/cpu-param.h b/target/hexagon/cpu-param.h index 635d509e74..7cc63a01d4 100644 --- a/target/hexagon/cpu-param.h +++ b/target/hexagon/cpu-param.h @@ -25,4 +25,7 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 +/* MTTCG not yet supported: require strict ordering */ +#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL + #endif diff --git a/target/m68k/cpu-param.h b/target/m68k/cpu-param.h index 256a2b5f8b..10a8d74bfa 100644 --- a/target/m68k/cpu-param.h +++ b/target/m68k/cpu-param.h @@ -19,4 +19,7 @@ #define TARGET_INSN_START_EXTRA_WORDS 1 +/* MTTCG not yet supported: require strict ordering */ +#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL + #endif diff --git a/target/rx/cpu-param.h b/target/rx/cpu-param.h index 84934f3bca..fe39a77ca3 100644 --- a/target/rx/cpu-param.h +++ b/target/rx/cpu-param.h @@ -26,4 +26,7 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 +/* MTTCG not yet supported: require strict ordering */ +#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL + #endif diff --git a/target/sh4/cpu-param.h b/target/sh4/cpu-param.h index f328715ee8..acdf239749 100644 --- a/target/sh4/cpu-param.h +++ b/target/sh4/cpu-param.h @@ -18,4 +18,7 @@ #define TARGET_INSN_START_EXTRA_WORDS 1 +/* MTTCG not yet supported: require strict ordering */ +#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL + #endif diff --git a/target/tricore/cpu-param.h b/target/tricore/cpu-param.h index eb33a67c41..45fde756b6 100644 --- a/target/tricore/cpu-param.h +++ b/target/tricore/cpu-param.h @@ -14,4 +14,7 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 +/* MTTCG not yet supported: require strict ordering */ +#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL + #endif diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index c5590eb695..7467255f6e 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -353,11 +353,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, tcg_ctx->tlb_dyn_max_bits = CPU_TLB_DYN_MAX_BITS; #endif tcg_ctx->insn_start_words = TARGET_INSN_START_WORDS; -#ifdef TCG_GUEST_DEFAULT_MO tcg_ctx->guest_mo = TCG_GUEST_DEFAULT_MO; -#else - tcg_ctx->guest_mo = TCG_MO_ALL; -#endif restart_translate: trace_translate_block(tb, pc, tb->tc.ptr); From patchwork Thu Apr 24 00:49:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883846 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204160wrs; Wed, 23 Apr 2025 18:11:06 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVogxthDHr9I3N1zl7blKQD5EBhmOIwwRklzAVP77zIK+hJzTZfUpU/dpwXT+EkfihHWe/qTA==@linaro.org X-Google-Smtp-Source: AGHT+IG0puSgtLqY6j2pFS7878JRAJzRWfempx94jJ223WAahRvLiqxFSrH+sPOOZhSpvqie5LKP X-Received: by 2002:ad4:5dc5:0:b0:6e8:f464:c9a9 with SMTP id 6a1803df08f44-6f4bfbb4c7cmr15335256d6.2.1745457066342; Wed, 23 Apr 2025 18:11:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457066; cv=none; d=google.com; s=arc-20240605; b=HnGJE/lXBsUJYB9rUaE8MiVTcp6CS/f25NCafKMpVXsca0x2GvfwcjRluTKrtKMZFA qdq2H1bR9tFfja5q6XHqmd9fMoWU8NKzH790SYRwGDOwSO9VqAaJJCmCcCdOTksX5QWW caLxSJgLeaInR6qrJDa44i04JknSxBI6umFd4w7DCUEYyKeaVgiFP7P0RFaPXOHWyHTb M/L23WoQ4jYY125owfljsXOpJ2gj1NYMvimkLM72qcqFMhRHw0OmalvykAao+Xw7GtI5 jg9mxsILcpT/Z3769Rel44IkMHNTtiOXSU5yTiQ1bHI8u65kY0bd9d47wkapfGPGk80D lA6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sQncdcCBTAzD3tdjUYfUMSnmVN4uvUMzzqpT196vY4c=; fh=GenBbR+/7gYaTcd1KqVHGA9TQPQZSS4lyPm/ns+6Qjo=; b=ZPgRWviqzPcDKLx8IaFHXh0X/9ydQ1zqKG6igkxlxfQHRsOpsl8MdbXSRhZ6/NPQWw Nxkb7bdmWPL/o8j66Sj4zF9VFlEWghilfTixCy+i2K34GfrnOTsfKDRkxaAh9YfdlSqC KC3IRZAXFTHUw9i2a2JJlXBLutmbNKZw0SAHf1vaC5V1aaJ3O/XAVXBCbn2OBorgllP7 5M8j7trHUCRZGWr1Nw07bEUcazkjeNRG0R9KDo5hQFFMpRafElUp1Zpppb3rnOHS6Ouz +hF0ORPf6sRDk23qSfLE7/1yQ0rRlSk0wBkeMQI5QQ4pIDxQ+Wqs1uMWFh7ybKfUgIpj H+og==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L5EFUqb+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c08d6646si3818396d6.1.2025.04.23.18.11.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:11:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L5EFUqb+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kwz-0005Sz-6K; Wed, 23 Apr 2025 21:00: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 1u7kws-00057X-JG for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:18 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwp-0005Ue-Q2 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:18 -0400 Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-736a7e126c7so341524b3a.3 for ; Wed, 23 Apr 2025 18:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456413; x=1746061213; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sQncdcCBTAzD3tdjUYfUMSnmVN4uvUMzzqpT196vY4c=; b=L5EFUqb+4WfThfiQHU2A+sGqSLph1enJySFlWRDsrMgJ8VJTszkxQB9uReuwaLSDcX fXcQe9Z4kmVBPfhwrLjb3PawvcbY48/MGLXDdzTyiZMGaXublvId6K0NxLt76IiRWBY2 PS8MfRzQqzmFiidnIAaqtNgSAN0m7v3KhHeWeSHIgUtQ+VCgP4gdKd43oxfX3e2qMnoK FLXBGqZmPM8SDRKMtldM568iQQ/5XMqr/qY8gixmRZPrqBc/c255VxfhJFoh/oP/PJPi a9UTEMAO1fcxJDHi97wPgyjiW5z1MaqSrwllExrjbo4CJlrg61vcGdZsd8Y7fpUPjxwV diig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456413; x=1746061213; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sQncdcCBTAzD3tdjUYfUMSnmVN4uvUMzzqpT196vY4c=; b=gT/XsmMUUJg596tSNSBmoaFYA+1a/TKw21pMMW4ba2UZshEbPAb4UvaiBxZPfTQW5M C6i8oML990vxkkq6/n4RwWmsNkgm+kkFq3+tLfRY6I07VauH5A4eB3o/NSGzN8O3PXCh S/V0H8BMcpWo/d2jyZHQJDeHJsMDLa4QwwPi5Ey5W1bzteOM/HhEOLf2uRC/PTx8V+hr zDPvPlOBDb9V7X61rxKpTOAc2LsvmOIcOTMTnzVfuI3vSWib0g2zS2kp2WGHUsjPl326 ubSBSB72XhrJVOuVcNXhS7BNE6buXzPDX3GaI7JDs9sY5JBntLhv9hFW+5lK+llt8Ccb Nbcw== X-Gm-Message-State: AOJu0YytN2YBpGBAehXpJvzF/Pu2Sk6zv/0KE3hUIgozem5Ojr25U0/b 2/gfoUfQgkXRmRVDHsglBJr37J8p0OTxnoA+fhU9ImG9yLE43ULJvAhnn7u+IhQ/Y47LDeh3yO1 s X-Gm-Gg: ASbGnctUWEK+Gcj1NgawI+l0vhYRbwPobx5yWcADXRJSqlSnfpyGXBbrPKA0b5bJIJg bbUdhg2jb+z5nl0gnbtQeexol3D2hKXALSPnvl11SnZvLkwqZo8A+5fmDmP8LPb7i4LnqhsgSY2 JYhfSQI2v/gnymiCoaJgA6xVwBYnYxjLCY5LheokMGC7ktHh+NrPHWhFjK7ilPz1DgY0BEWpOPc 02NXVIFQtcFduKZFJtjFiJfrJzX55RY2XYFtWkJZY9OrBfGsR3/H1x2Sjo7GGZBdI35mLnIZT+Y l4ikbdzO31rKAHYOGNHBMZtZTi0fMZEgPxNGPmmQcaY3TrCeh7eBL4laBJHW2zNyefTt2ihIqPs FucQ709YSmg== X-Received: by 2002:a05:6a21:3294:b0:1f5:769a:a4be with SMTP id adf61e73a8af0-20444f9e8bemr964027637.36.1745456413343; Wed, 23 Apr 2025 18:00:13 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Anton Johansson , Pierrick Bouvier Subject: [PULL 134/148] tcg: Simplify tcg_req_mo() macro Date: Wed, 23 Apr 2025 17:49:19 -0700 Message-ID: <20250424004934.598783-135-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Now that TCG_GUEST_DEFAULT_MO is always defined, simplify the tcg_req_mo() macro. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/internal-target.h | 9 +-------- accel/tcg/tcg-all.c | 3 --- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index 05abaeb8e0..1a46a7c87d 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -52,17 +52,10 @@ G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr); * memory ordering vs the host memory ordering. A non-zero * result indicates that some barrier is required. * - * If TCG_GUEST_DEFAULT_MO is not defined, assume that the - * guest requires strict ordering. - * * This is a macro so that it's constant even without optimization. */ -#ifdef TCG_GUEST_DEFAULT_MO -# define tcg_req_mo(type) \ +#define tcg_req_mo(type) \ ((type) & TCG_GUEST_DEFAULT_MO & ~TCG_TARGET_DEFAULT_MO) -#else -# define tcg_req_mo(type) ((type) & ~TCG_TARGET_DEFAULT_MO) -#endif /** * cpu_req_mo: diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 7a5b810b88..a5a1fd6a11 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -77,9 +77,6 @@ static bool default_mttcg_enabled(void) return false; } #ifdef TARGET_SUPPORTS_MTTCG -# ifndef TCG_GUEST_DEFAULT_MO -# error "TARGET_SUPPORTS_MTTCG without TCG_GUEST_DEFAULT_MO" -# endif return true; #else return false; From patchwork Thu Apr 24 00:49:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883850 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3204507wrs; Wed, 23 Apr 2025 18:12:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV1TOlTyVBPx9JNzq+fiKiFJg0gS6LaPiBNteXYJDBXwK8Ar673AlRkYpiQ3f70Uwph0X0AjQ==@linaro.org X-Google-Smtp-Source: AGHT+IHW/wW9u9Pq+TPxf+j19xlUqO2UmnXvM6RF+RmLUmPjRRWD91Ck39SlKb4NSK9VKMzK3e8A X-Received: by 2002:a05:6214:19cd:b0:6ea:d046:bcc9 with SMTP id 6a1803df08f44-6f4bfc8af59mr12933666d6.40.1745457140222; Wed, 23 Apr 2025 18:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457140; cv=none; d=google.com; s=arc-20240605; b=ArX0DNns6zMbsZ0SW1/0z9PxvtTwEXdCdyMVHi+cZlxE1aedCEMqI86kclAiLsyx+/ xm0/0v9Z9s1aQ7OruigaUg5hD/WW8wcEbLQM/R+KAX8wxcOKN30L97xHJekdcqa1SEJM 4Bm1vtQKbd77+G99XtesvwOi5ebTBvB6L9Wwn06z5JyC4/Us4RUBqcHgHErscQKqXp3m 1dqSYbI9KxaNnAmyoR0d9q7nVQ3Io3QK5P7IsNvolC3r+8N6haYdWBLZXI4oENQ/TgZu WMugKXSti8qP7Q30HgQ92GZrjynzj5Ic+rTFgoA9l2/4S7+ZLJh8L8fC92U0gXIvUatS kXNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=daDsqIY3JqZY3gWJRoer5Pq3HW0D1tA51SVXkh4oP34=; fh=GenBbR+/7gYaTcd1KqVHGA9TQPQZSS4lyPm/ns+6Qjo=; b=i1GZACVZGSgRIbTAJsAYCVwaBlYQHtF9KP/X/jEp6PycWG/ofK68JEKA4FNFWy/wbY /yYaBI3oDhpJEjiG902RBCsfw2V8pKhNH4VqojVCRWcpDuygfaJre7rarfu774+7vA3T E3o+bY4Q4YAheuRm8wElRnv/8OQyXNywCr+9pHVDq8yLAVmAzslr7Ep6FjXfBasEcp3D VIIJ8bFJ0JOYQ8c2ILWlLwg3KpBeCTECwo2vcg7DB5z+gRkT9lu9sBo1+tAR1zWa5QoC Hekp8ngdpHDuyGoOOndacSfV8NRuOhm9PCm4W+HP1kr1bnHN+islTBfPzThvIz0u9GBQ 1ccw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NO60wzXQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0b0d356si3795546d6.452.2025.04.23.18.12.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:12:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NO60wzXQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kx6-00065n-0y; Wed, 23 Apr 2025 21:00:33 -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 1u7kwu-0005CF-4Z for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:20 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwp-0005V4-SU for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:19 -0400 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-aee79a0f192so238466a12.3 for ; Wed, 23 Apr 2025 18:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456414; x=1746061214; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=daDsqIY3JqZY3gWJRoer5Pq3HW0D1tA51SVXkh4oP34=; b=NO60wzXQHPv3pD/ll92Gr40PZiTqBqR5QqRR5/VgkWyb08GwYU9i5vJ/RRgMoTwoVl 5HEKR480zAHrl3tu/yPA5lWboNJx1nQW1qvAtHEGrL+M8nGd04BkOv8d0fh6Fi0FdhPJ kHe/V9X96Pat8xz1HBzv7n2OG+zZ6tH8YE6psz2ZNf/faNYlxpn+I5jeAMP8f+ixm70A 7kD9m+3X6ZmRSl3JU+n3zph2faV+NP8ViP7rNBjPDFA88DCBPG323/ID4rdzOgobwJcD /+F4/T4A9iO4RjpXWhKSrYQARCn1jjZvRa8ZJFC+XWM2lTBTYAGFEI6LxLfFjx20xTnY tk3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456414; x=1746061214; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=daDsqIY3JqZY3gWJRoer5Pq3HW0D1tA51SVXkh4oP34=; b=jHZbLxWG1bDojskhP1j+PXq1JwSgq7lCe4Ptw45cPbGNmc0P0WfPngJDuc9teDy7hc jopCn1t2ovqnW3/aBL1b/kNYcmR83Mv8Hc5bN+l64yGC//u5VZg+bQ8CHCW9TUgqU0eC tDOTX4i8PjYqwrPLSeS00Y5jsX51EfMNoapIbKuFhOwQMdLwE7An8hOdzsaCNF1RYqwC 8H2PggJFSo16tvXALrgsAqxUh5ive+PYPEL8aSowyIBzHG7MKQnGube1ZDCFmFlg+Fbs 4CgS6ycU4R4iFuszxi8qtxTJvs+l7C6Dmjk1cF7ITLL7nZr+lVAID0U9WZf95Xk3LZU1 /9xA== X-Gm-Message-State: AOJu0YwHST9BFPyCBO6SqHnurp0CLA9NkNmE3z6EAoC79FxxAx2C7xJZ O+pr0eVsrnJyMP7tvKjHvHa0cjOfP+gDwYesRtLvArQdrfpk9+siLtc0XwnvcmbvuMDnNI5oDX0 j X-Gm-Gg: ASbGncvs5OiLeijTHNP0vXZsoV0MqhbId5dar4Gd5hFqbL7ziWJDJeTNuwEqjSlrdDm +7TnBm/R+8Gjgvjk7/2jbsDwShQCm+DsXImrS4Lt2yR7tDRDpZns4qQiImaEaAqOL9CeEd+9Mjh gJnE65ONCPRk+xuykGXcL6f1WHuHLPO5Tljss1Oox9nFfMtDnwTAIpa654smHH9HEooC75iZmID pvWzNPWZ0ILncPfgqBhPys7h8ONUSRPdTwJeNGIn475ENid8JUjkdAvTmApKHMGbVxlW9G5FH0J nPXzv3egtjKJ5ZKCDAVdhPZMhl8d+OtTom4vQMeaRdl1O8knAUMw+9/RDhROzRLYtgXo/Wht1mo = X-Received: by 2002:a05:6a21:1510:b0:1fd:ecfa:b6d7 with SMTP id adf61e73a8af0-20444f2e8cdmr937021637.28.1745456414042; Wed, 23 Apr 2025 18:00:14 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Anton Johansson , Pierrick Bouvier Subject: [PULL 135/148] tcg: Define guest_default_memory_order in TCGCPUOps Date: Wed, 23 Apr 2025 17:49:20 -0700 Message-ID: <20250424004934.598783-136-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Add the TCGCPUOps::guest_default_memory_order field and have each target initialize it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/accel/tcg/cpu-ops.h | 8 ++++++++ target/alpha/cpu.c | 2 ++ target/arm/cpu.c | 2 ++ target/arm/tcg/cpu-v7m.c | 2 ++ target/avr/cpu.c | 1 + target/hexagon/cpu.c | 1 + target/hppa/cpu.c | 2 ++ target/i386/tcg/tcg-cpu.c | 1 + target/loongarch/cpu.c | 2 ++ target/m68k/cpu.c | 2 ++ target/microblaze/cpu.c | 2 ++ target/mips/cpu.c | 2 ++ target/openrisc/cpu.c | 2 ++ target/ppc/cpu_init.c | 1 + target/riscv/tcg/tcg-cpu.c | 2 ++ target/rx/cpu.c | 2 ++ target/s390x/cpu.c | 2 ++ target/sh4/cpu.c | 2 ++ target/sparc/cpu.c | 2 ++ target/tricore/cpu.c | 1 + target/xtensa/cpu.c | 2 ++ 21 files changed, 43 insertions(+) diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h index 106a0688da..a4932fc5d7 100644 --- a/include/accel/tcg/cpu-ops.h +++ b/include/accel/tcg/cpu-ops.h @@ -16,8 +16,16 @@ #include "exec/memop.h" #include "exec/mmu-access-type.h" #include "exec/vaddr.h" +#include "tcg/tcg-mo.h" struct TCGCPUOps { + + /** + * @guest_default_memory_order: default barrier that is required + * for the guest memory ordering. + */ + TCGBar guest_default_memory_order; + /** * @initialize: Initialize TCG state * diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 99d839a279..6f931117a2 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -235,6 +235,8 @@ static const struct SysemuCPUOps alpha_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps alpha_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = alpha_translate_init, .translate_code = alpha_translate_code, .synchronize_from_tb = alpha_cpu_synchronize_from_tb, diff --git a/target/arm/cpu.c b/target/arm/cpu.c index c9e043bc9b..3f20e258fd 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2671,6 +2671,8 @@ static const struct SysemuCPUOps arm_sysemu_ops = { #ifdef CONFIG_TCG static const TCGCPUOps arm_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = arm_translate_init, .translate_code = arm_translate_code, .synchronize_from_tb = arm_cpu_synchronize_from_tb, diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c index 1a913faa50..4553fe9de0 100644 --- a/target/arm/tcg/cpu-v7m.c +++ b/target/arm/tcg/cpu-v7m.c @@ -232,6 +232,8 @@ static void cortex_m55_initfn(Object *obj) } static const TCGCPUOps arm_v7m_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = arm_translate_init, .translate_code = arm_translate_code, .synchronize_from_tb = arm_cpu_synchronize_from_tb, diff --git a/target/avr/cpu.c b/target/avr/cpu.c index feb73e722b..67918684fa 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -224,6 +224,7 @@ static const struct SysemuCPUOps avr_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps avr_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, .initialize = avr_cpu_tcg_init, .translate_code = avr_cpu_translate_code, .synchronize_from_tb = avr_cpu_synchronize_from_tb, diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index ad1f303fbc..b12e0dccd0 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -325,6 +325,7 @@ static void hexagon_cpu_init(Object *obj) #include "accel/tcg/cpu-ops.h" static const TCGCPUOps hexagon_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, .initialize = hexagon_translate_init, .translate_code = hexagon_translate_code, .synchronize_from_tb = hexagon_cpu_synchronize_from_tb, diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 51bff0c5d6..ac4560febe 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -253,6 +253,8 @@ static const struct SysemuCPUOps hppa_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps hppa_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = hppa_translate_init, .translate_code = hppa_translate_code, .synchronize_from_tb = hppa_cpu_synchronize_from_tb, diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 35b17f2b18..3e1b315340 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -125,6 +125,7 @@ static bool x86_debug_check_breakpoint(CPUState *cs) #include "accel/tcg/cpu-ops.h" static const TCGCPUOps x86_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, .initialize = tcg_x86_init, .translate_code = x86_translate_code, .synchronize_from_tb = x86_cpu_synchronize_from_tb, diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 4cc8e02f70..ee74509a66 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -864,6 +864,8 @@ static void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags) #include "accel/tcg/cpu-ops.h" static const TCGCPUOps loongarch_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = loongarch_translate_init, .translate_code = loongarch_translate_code, .synchronize_from_tb = loongarch_cpu_synchronize_from_tb, diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index 4409d8941c..bfde9b8594 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -589,6 +589,8 @@ static const struct SysemuCPUOps m68k_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps m68k_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = m68k_tcg_init, .translate_code = m68k_translate_code, .restore_state_to_opc = m68k_restore_state_to_opc, diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index d10ae0702a..e46863574c 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -427,6 +427,8 @@ static const struct SysemuCPUOps mb_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps mb_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = mb_tcg_init, .translate_code = mb_translate_code, .synchronize_from_tb = mb_cpu_synchronize_from_tb, diff --git a/target/mips/cpu.c b/target/mips/cpu.c index cb0d6dde0e..67a8550cc1 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -551,6 +551,8 @@ static int mips_cpu_mmu_index(CPUState *cs, bool ifunc) } static const TCGCPUOps mips_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = mips_tcg_init, .translate_code = mips_translate_code, .synchronize_from_tb = mips_cpu_synchronize_from_tb, diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index dc55594a7d..e62c698a40 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -243,6 +243,8 @@ static const struct SysemuCPUOps openrisc_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps openrisc_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = openrisc_translate_init, .translate_code = openrisc_translate_code, .synchronize_from_tb = openrisc_cpu_synchronize_from_tb, diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index fd8c42069e..1cf18e0dae 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7479,6 +7479,7 @@ static const struct SysemuCPUOps ppc_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps ppc_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, .initialize = ppc_translate_init, .translate_code = ppc_translate_code, .restore_state_to_opc = ppc_restore_state_to_opc, diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 5d0429b4d0..ded2d68ad7 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -140,6 +140,8 @@ static void riscv_restore_state_to_opc(CPUState *cs, } static const TCGCPUOps riscv_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = riscv_translate_init, .translate_code = riscv_translate_code, .synchronize_from_tb = riscv_cpu_synchronize_from_tb, diff --git a/target/rx/cpu.c b/target/rx/cpu.c index e14d9cbef9..d7eac551fd 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -204,6 +204,8 @@ static const struct SysemuCPUOps rx_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps rx_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = rx_translate_init, .translate_code = rx_translate_code, .synchronize_from_tb = rx_cpu_synchronize_from_tb, diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index d15b1943e0..f232d82fa3 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -345,6 +345,8 @@ void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc, } static const TCGCPUOps s390_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = s390x_translate_init, .translate_code = s390x_translate_code, .restore_state_to_opc = s390x_restore_state_to_opc, diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index df093988cb..29f4be7ba9 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -262,6 +262,8 @@ static const struct SysemuCPUOps sh4_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps superh_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = sh4_translate_init, .translate_code = sh4_translate_code, .synchronize_from_tb = superh_cpu_synchronize_from_tb, diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index af3cec43e7..ef04efcb18 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -1001,6 +1001,8 @@ static const struct SysemuCPUOps sparc_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps sparc_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = sparc_tcg_init, .translate_code = sparc_translate_code, .synchronize_from_tb = sparc_cpu_synchronize_from_tb, diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index 833a93d37a..3bf399335a 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -172,6 +172,7 @@ static const struct SysemuCPUOps tricore_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps tricore_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, .initialize = tricore_tcg_init, .translate_code = tricore_translate_code, .synchronize_from_tb = tricore_cpu_synchronize_from_tb, diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 51f9ee9e89..2347106495 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -232,6 +232,8 @@ static const struct SysemuCPUOps xtensa_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps xtensa_tcg_ops = { + .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .initialize = xtensa_translate_init, .translate_code = xtensa_translate_code, .debug_excp_handler = xtensa_breakpoint_handler, From patchwork Thu Apr 24 00:49:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883927 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3210103wrs; Wed, 23 Apr 2025 18:32:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXICQMrmqFD5ccka97/eBbb1YqOqazbkK+qEMGiIm2xzSt5DkrQVLmQN8pzMDQvNO2u/ZmHMw==@linaro.org X-Google-Smtp-Source: AGHT+IE0JAu7XYPJMdl9YXJtmcUt2iD4bxI7MMPPAELP8WJMPpXSo9XWnvpuEX+01+oC9WdCOdqE X-Received: by 2002:a05:6214:cae:b0:6ea:ee53:5751 with SMTP id 6a1803df08f44-6f4c125575fmr7657036d6.21.1745458353560; Wed, 23 Apr 2025 18:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458353; cv=none; d=google.com; s=arc-20240605; b=fDjV/jtTB/MpKOIRBDD8d4WkDbLO9Nn7HLEy+o4fQsWuKqn8EVKB/yZNGr9P3DxnRB OnDx2i53a6GU2KbeTXdvXnoGEeSqasyKXu+MnyuNn1jp0IQmP+RchfCrjh3GxLq/ifd/ c4EkbStzytFl7UlTgJSOl/odd0aE716eqHv2wRI2GSjOWLeUv6rE12c19xzKqmIP7pMy SX5RJAHNGlqi2PyfA8BlE2I89d8NqNis+oVly6K4VNVA4/hANrUpEephbArsKU6DfVDl RnWsKhylmRRh6VuciVHDzwzGHYpmCc+HU/AMtk5XlwQDegHR+eDrMwVA7344Oqcoh1Jd R6hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8LpPYWP0OXO9mhIHJpVptIpUQyJvCDi5tzk8x0yv51A=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=cMkzBG0mQcVdm/Qc6ihd8EmGrQtYtEWjj5izO2bxZaZ+vipCEz9EWZ57OmchGhwbhf nPETG+YTA9aLgqEQTeS+1Wtyej9GWPtSg9suiD5QIrwbxh0O0CCNOOtAda/CD/tqMq+X 8LZqYmtMH2pbfSvt+1M9Xoepl/xs7QrwaKQE8U9twdgUE9EbByI2sGFBrZav8dDHS5NY nh2PVz51aaz6F7a4x9XwIVKpH1/azDdnzCG1gJHXty/QIj3XKoHmyfyQ7VtuYjcB8HXg QNF4qzBau9R4NyQbcEM5vtkC47/A3OukxXXOnTyffGPsRDn0hmnI6pMkeioLKKesFghH 19ZQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SeJm7nf+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0acb526si3991376d6.186.2025.04.23.18.32.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:32:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SeJm7nf+; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7l07-00024R-9p; Wed, 23 Apr 2025 21:03: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 1u7kwt-0005B9-EH for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:19 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwq-0005VC-C6 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:19 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-736c277331eso1610893b3a.1 for ; Wed, 23 Apr 2025 18:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456415; x=1746061215; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8LpPYWP0OXO9mhIHJpVptIpUQyJvCDi5tzk8x0yv51A=; b=SeJm7nf+n4NgKctRLuh8sA37b3Z/UB72aZ4mcJPC5Ne/WhslEc7yeDRuJmaGoUelj9 z4ScNwSaAxGcYmLb1ojIlr9kXdRqUCJ2SiLVeSljYia5fHvDiq7qYZU3GwjLqnVhECsX vX0/NtUN5tkY7viY8QnzcxOiUvLWmi+rM4tOnV4KEybFA8g8AsNyBOduyu0X95A2RLfp +iuOCVP4oXmhlxfVNerm5X7r67uKZdw80ffqZh/bAZxz4XEKRuxlGjOeUSgRd9UsbuEM uFWJPpd3dBN15hZSuglxYf+J0Yi4REpr3dpa6PjS2T/U3T0hu4DTGUCcakRwomNeVBYp U6JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456415; x=1746061215; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8LpPYWP0OXO9mhIHJpVptIpUQyJvCDi5tzk8x0yv51A=; b=sZZmTzbMdcA11ehGXlBba6CXSN9mu60gF8onwKzksDdysSRzcqJs9PjeZ7jJXxfc0q HuIE7n/JMyj/pK6zHFNhCAcDbcnMQOcIT3reN7nSMQM4oDTz4V0e3uO1i3dNB63Lhh0h tZ8ZApGA3CQsSvH8HVemoF8qrbRCEqlmqhAv/UkbyFGM7xuwnrl0o88ukQuukiJHqoOC 96zpvCA2WYY7/ncI7Gtkr5pJElDsOKGx1oJ2oA8ySl8i4sAgHWhIsYUpGRXljrELAKJz AJde3/YtvVBhYz5L49d+TvE0PzJTFr9/vGXtI+ouoaOrq51qfRAotV9AANe6yZLESoXy bxmw== X-Gm-Message-State: AOJu0YyVlyTlkHWUANR76uuhAxwV65gRVLxUKVrF043sm0BDXpG+NoSW lBLj+ccN5y30IrbGyEkvW3VYKz2kQgaCvy1I7B3E6Sqixt+ZLZr0fwsyxuIK5+H0tJYqzfv9JnB d X-Gm-Gg: ASbGncvozLhujewzZWETVZ75MOGKMr1TeQ72u9tWjm/yKWZ/AlKLflptEPDGsAy79v0 rv3nW6BDD5qBA8dH7qBd4jODPKDkrJ3d3t934zDeomjKTvzk/zTxh3ENrJBcX7uAQ+3k348btg8 2NfMQmaTsMzpa+tSXTJAWK2hbF9y/ruv++rz3WVWKAY1Sm3Cqa52vkkBH9hTiacrLn8PxkyQTs5 D1olHAgqYd/QBLqJOPslPxfvrwIjVbGM8K0Fi0dCqruphRxed+e+WWvGWuGjbIFAv18VXNbK5fh puZIJ2Cq3qwa/G0XwQaY4cjO1SKS3jWjF5sts8h2YS8HOEXqvSMLwgzbHp3FFt1Uqsmy4VcqPpU = X-Received: by 2002:a05:6a20:d48b:b0:1f3:20be:c18a with SMTP id adf61e73a8af0-20445eed23amr610692637.10.1745456414938; Wed, 23 Apr 2025 18:00:14 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 136/148] tcg: Remove use of TCG_GUEST_DEFAULT_MO in tb_gen_code() Date: Wed, 23 Apr 2025 17:49:21 -0700 Message-ID: <20250424004934.598783-137-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Use TCGCPUOps::guest_default_memory_order to set TCGContext::guest_mo. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 7467255f6e..c007b9a190 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -353,7 +353,7 @@ TranslationBlock *tb_gen_code(CPUState *cpu, tcg_ctx->tlb_dyn_max_bits = CPU_TLB_DYN_MAX_BITS; #endif tcg_ctx->insn_start_words = TARGET_INSN_START_WORDS; - tcg_ctx->guest_mo = TCG_GUEST_DEFAULT_MO; + tcg_ctx->guest_mo = cpu->cc->tcg_ops->guest_default_memory_order; restart_translate: trace_translate_block(tb, pc, tb->tc.ptr); From patchwork Thu Apr 24 00:49:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883859 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3205254wrs; Wed, 23 Apr 2025 18:14:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUnl/jLv2giooC/Es6fnMlv4Ckl6XBfywnesZaZ1WikUlPAgc2IYr/uXavOHnIlTW415YQcBA==@linaro.org X-Google-Smtp-Source: AGHT+IGMLF1gFLWn7HZA4/+C/ZBxkmO3wZNbiHqC3ucikSi6n45gXvKPjCJnYcdfHX0AfTPaGY8R X-Received: by 2002:a05:6214:2484:b0:6e8:90eb:e591 with SMTP id 6a1803df08f44-6f4bfc222bdmr12654676d6.24.1745457284717; Wed, 23 Apr 2025 18:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457284; cv=none; d=google.com; s=arc-20240605; b=jlXAtpoVjxqi+5gS1k6xFf/IQYcbA2XJ/KVMeLlSLTjKgPdFzVdzpX3Vdu6KJDe4d2 F96twz01qvU9FYxkyxTl685XefNVk/vBcjJpCzMHdug8OO09AFe8hZQUecY7bfrt4Q0T D8RjkXzH3RVwtsQPDrlYrQPQ94dTHXSn7SJorneYChZ+brBMzsvL1lGrtBE66eOUfZ9C ISQfR+6H7qFfVLiKY42KMsr7ptsmr4r0dodPwek6s46du8IEHc6HMBufNNVwIF831TOh WdX8TwV/UPQTO8WxFlB3qM/QIAlEN/5achmwEbmxRHtm3MptcVSll2ASx9ZUuUspjeK0 YVLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9MNvSRDi98aye64ClUWawrfGEwwTpHlnQYD/vV4dHwA=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=gtKeX6D92NfA1OzdsaBGZKZw1TJGGnqInqMiaKe75lV3MTzLiWEKZKNp4ZtOdJ6ANl WnjvQfJxezApTt4HJRlHAl8iGenu2D2Se9OkZyj4hhJHKxbMFOeSlAG9zcr77hDBpIeV XKldDNDU5VfCFjbezqPEDh9inqZJZmgFMAvRTfGSHEAbBSuWa1dGogqfNsBFxABcgnIF k+DCzEX2iLl/ZmC/G/1M+w2gOt2sY72aSB5MsrMcIACyeA1D48YK8qoMZcDAVRWaFFS0 uhyOo8V1r6S26Udt9QQGzYKg7GQebuAjLvrrzuy68jF50tYX3y6A9TO4M6//hyrKuf8r VEnQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=khbK+y+q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea1f9a345si5344671cf.384.2025.04.23.18.14.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:14:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=khbK+y+q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7l04-0001wR-OS; Wed, 23 Apr 2025 21:03:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7kwu-0005Fb-J3 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:21 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0: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 1u7kwr-0005VP-Bj for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:20 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-7370a2d1981so311842b3a.2 for ; Wed, 23 Apr 2025 18:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456416; x=1746061216; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9MNvSRDi98aye64ClUWawrfGEwwTpHlnQYD/vV4dHwA=; b=khbK+y+qZHd+DpKSvbvQLeu1aRP1+YAVmCZhPnlg9p1hmtFxGQE/3dEXT/azWNHJlv fMj7sYqiHU9NKNqL3WbE7uInpfXJoFdFxxTDAysEfSlKIL7BU8dQjhDsN8hdj/V5DWiw /5Xgv0UhkqdTSJDQbPkq/C+KsACMo80fmsrBKkU1seoq1doo6RnMP0LcokcShFbL7KQk yfV5G2K9+eosKFk6csWLFvPQG8is+xilAaFBQlq2P+8oinka/hV5wsDYt5xykM6lnKJl I+7VMdmT2A4KscAhRbQMS86xJA4WLAwzPrNBBjhA0/ASaMn7AZ/E+YvCQI1twxK1fiZb 0nxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456416; x=1746061216; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9MNvSRDi98aye64ClUWawrfGEwwTpHlnQYD/vV4dHwA=; b=xSjtcuS8X3lms0nRRPFdO5d/brkC4ryt3RGAAhafp6swgkSJI3dAbZoqDuEjnMGihV yGbdw1yrTAvq2VZgY2XJNYnDjOpIdjo1orKFhN1at1CJocaXtYS7gBeMHa9WVuErI4U/ /WpRLpdezXckHgN42sZc07aTg56uiZLr+EGK1gOm4MSvt1ZBJ49Dq2kq9IRYxEegnIOp drk/WwB2d1qM456tw/iCsvQoRRE6F2lrnLGs109/Cdf8x99c/27C/Nn290y2XcQgYtcT 2iYmfDd5pm73tLMkmHwQ0r4zvDkiV0eFm97PGHBVJjgSkdBRoZeWUQvQ/qCwMM7a9DVi wY6A== X-Gm-Message-State: AOJu0YxjiOY1s4NL86CJwxk+quZusjNYBwyK8zwcNOsV1NDVRq14j6FH muAhvBp6lkleht+273g1HUqhWvYH2WmYsf0WVdn0bhy+4Zfx9LX5oo4kbYq1hmFfo2plkLjhEj+ i X-Gm-Gg: ASbGncsdW/vPVSE0tC1BIJABCqY2kD3eUtSKnYgukrst8lQjq1rr786lW1dQ9JWsXO3 7h5Wk4htjfrYF1o8itES+jOEAv2pRnhrh1ptVvQZ0e1ekPV+Dvvg3FIvHFW6ofey5hQDQG7T+n6 8m3/l5TzWD0Z83kbUKmJ37AKZuinls2JCzEPz0Kk9MeC3oOTyKudJEWT71CGi1R2hpJPVIrW4Eg wXRH0ND07dRyNTMJNBfuiil+0VQAqWSzBbr5pyknn1ACMfgA2i+2mypsXxZtv7KfGXIwFnq+S7J ry6I2uIU1YvsZ7C0A5AYBtiYH/GWtFM6nLdYof4WdRc2TTl8i8R1tiuqp4MSpFz+B7O4dsfEJ8E = X-Received: by 2002:a05:6a20:549c:b0:1f5:5807:13c7 with SMTP id adf61e73a8af0-20444e9c443mr862966637.17.1745456415731; Wed, 23 Apr 2025 18:00:15 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 137/148] tcg: Propagate CPUState argument to cpu_req_mo() Date: Wed, 23 Apr 2025 17:49:22 -0700 Message-ID: <20250424004934.598783-138-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé In preparation of having tcg_req_mo() access CPUState in the next commit, pass it to cpu_req_mo(), its single caller. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- accel/tcg/internal-target.h | 3 ++- accel/tcg/cputlb.c | 20 ++++++++++---------- accel/tcg/user-exec.c | 20 ++++++++++---------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index 1a46a7c87d..23aac39b57 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -59,12 +59,13 @@ G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr); /** * cpu_req_mo: + * @cpu: CPUState * @type: TCGBar * * If tcg_req_mo indicates a barrier for @type is required * for the guest memory model, issue a host memory barrier. */ -#define cpu_req_mo(type) \ +#define cpu_req_mo(cpu, type) \ do { \ if (tcg_req_mo(type)) { \ smp_mb(); \ diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 2cafd38d2a..35b1ff03a5 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -2324,7 +2324,7 @@ static uint8_t do_ld1_mmu(CPUState *cpu, vaddr addr, MemOpIdx oi, MMULookupLocals l; bool crosspage; - cpu_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD); + cpu_req_mo(cpu, TCG_MO_LD_LD | TCG_MO_ST_LD); crosspage = mmu_lookup(cpu, addr, oi, ra, access_type, &l); tcg_debug_assert(!crosspage); @@ -2339,7 +2339,7 @@ static uint16_t do_ld2_mmu(CPUState *cpu, vaddr addr, MemOpIdx oi, uint16_t ret; uint8_t a, b; - cpu_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD); + cpu_req_mo(cpu, TCG_MO_LD_LD | TCG_MO_ST_LD); crosspage = mmu_lookup(cpu, addr, oi, ra, access_type, &l); if (likely(!crosspage)) { return do_ld_2(cpu, &l.page[0], l.mmu_idx, access_type, l.memop, ra); @@ -2363,7 +2363,7 @@ static uint32_t do_ld4_mmu(CPUState *cpu, vaddr addr, MemOpIdx oi, bool crosspage; uint32_t ret; - cpu_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD); + cpu_req_mo(cpu, TCG_MO_LD_LD | TCG_MO_ST_LD); crosspage = mmu_lookup(cpu, addr, oi, ra, access_type, &l); if (likely(!crosspage)) { return do_ld_4(cpu, &l.page[0], l.mmu_idx, access_type, l.memop, ra); @@ -2384,7 +2384,7 @@ static uint64_t do_ld8_mmu(CPUState *cpu, vaddr addr, MemOpIdx oi, bool crosspage; uint64_t ret; - cpu_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD); + cpu_req_mo(cpu, TCG_MO_LD_LD | TCG_MO_ST_LD); crosspage = mmu_lookup(cpu, addr, oi, ra, access_type, &l); if (likely(!crosspage)) { return do_ld_8(cpu, &l.page[0], l.mmu_idx, access_type, l.memop, ra); @@ -2407,7 +2407,7 @@ static Int128 do_ld16_mmu(CPUState *cpu, vaddr addr, Int128 ret; int first; - cpu_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD); + cpu_req_mo(cpu, TCG_MO_LD_LD | TCG_MO_ST_LD); crosspage = mmu_lookup(cpu, addr, oi, ra, MMU_DATA_LOAD, &l); if (likely(!crosspage)) { if (unlikely(l.page[0].flags & TLB_MMIO)) { @@ -2735,7 +2735,7 @@ static void do_st1_mmu(CPUState *cpu, vaddr addr, uint8_t val, MMULookupLocals l; bool crosspage; - cpu_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST); + cpu_req_mo(cpu, TCG_MO_LD_ST | TCG_MO_ST_ST); crosspage = mmu_lookup(cpu, addr, oi, ra, MMU_DATA_STORE, &l); tcg_debug_assert(!crosspage); @@ -2749,7 +2749,7 @@ static void do_st2_mmu(CPUState *cpu, vaddr addr, uint16_t val, bool crosspage; uint8_t a, b; - cpu_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST); + cpu_req_mo(cpu, TCG_MO_LD_ST | TCG_MO_ST_ST); crosspage = mmu_lookup(cpu, addr, oi, ra, MMU_DATA_STORE, &l); if (likely(!crosspage)) { do_st_2(cpu, &l.page[0], val, l.mmu_idx, l.memop, ra); @@ -2771,7 +2771,7 @@ static void do_st4_mmu(CPUState *cpu, vaddr addr, uint32_t val, MMULookupLocals l; bool crosspage; - cpu_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST); + cpu_req_mo(cpu, TCG_MO_LD_ST | TCG_MO_ST_ST); crosspage = mmu_lookup(cpu, addr, oi, ra, MMU_DATA_STORE, &l); if (likely(!crosspage)) { do_st_4(cpu, &l.page[0], val, l.mmu_idx, l.memop, ra); @@ -2792,7 +2792,7 @@ static void do_st8_mmu(CPUState *cpu, vaddr addr, uint64_t val, MMULookupLocals l; bool crosspage; - cpu_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST); + cpu_req_mo(cpu, TCG_MO_LD_ST | TCG_MO_ST_ST); crosspage = mmu_lookup(cpu, addr, oi, ra, MMU_DATA_STORE, &l); if (likely(!crosspage)) { do_st_8(cpu, &l.page[0], val, l.mmu_idx, l.memop, ra); @@ -2815,7 +2815,7 @@ static void do_st16_mmu(CPUState *cpu, vaddr addr, Int128 val, uint64_t a, b; int first; - cpu_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST); + cpu_req_mo(cpu, TCG_MO_LD_ST | TCG_MO_ST_ST); crosspage = mmu_lookup(cpu, addr, oi, ra, MMU_DATA_STORE, &l); if (likely(!crosspage)) { if (unlikely(l.page[0].flags & TLB_MMIO)) { diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 1b878ead7a..3f4d682446 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -1061,7 +1061,7 @@ static uint8_t do_ld1_mmu(CPUState *cpu, vaddr addr, MemOpIdx oi, void *haddr; uint8_t ret; - cpu_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD); + cpu_req_mo(cpu, TCG_MO_LD_LD | TCG_MO_ST_LD); haddr = cpu_mmu_lookup(cpu, addr, get_memop(oi), ra, access_type); ret = ldub_p(haddr); clear_helper_retaddr(); @@ -1075,7 +1075,7 @@ static uint16_t do_ld2_mmu(CPUState *cpu, vaddr addr, MemOpIdx oi, uint16_t ret; MemOp mop = get_memop(oi); - cpu_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD); + cpu_req_mo(cpu, TCG_MO_LD_LD | TCG_MO_ST_LD); haddr = cpu_mmu_lookup(cpu, addr, mop, ra, access_type); ret = load_atom_2(cpu, ra, haddr, mop); clear_helper_retaddr(); @@ -1093,7 +1093,7 @@ static uint32_t do_ld4_mmu(CPUState *cpu, vaddr addr, MemOpIdx oi, uint32_t ret; MemOp mop = get_memop(oi); - cpu_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD); + cpu_req_mo(cpu, TCG_MO_LD_LD | TCG_MO_ST_LD); haddr = cpu_mmu_lookup(cpu, addr, mop, ra, access_type); ret = load_atom_4(cpu, ra, haddr, mop); clear_helper_retaddr(); @@ -1111,7 +1111,7 @@ static uint64_t do_ld8_mmu(CPUState *cpu, vaddr addr, MemOpIdx oi, uint64_t ret; MemOp mop = get_memop(oi); - cpu_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD); + cpu_req_mo(cpu, TCG_MO_LD_LD | TCG_MO_ST_LD); haddr = cpu_mmu_lookup(cpu, addr, mop, ra, access_type); ret = load_atom_8(cpu, ra, haddr, mop); clear_helper_retaddr(); @@ -1130,7 +1130,7 @@ static Int128 do_ld16_mmu(CPUState *cpu, abi_ptr addr, MemOp mop = get_memop(oi); tcg_debug_assert((mop & MO_SIZE) == MO_128); - cpu_req_mo(TCG_MO_LD_LD | TCG_MO_ST_LD); + cpu_req_mo(cpu, TCG_MO_LD_LD | TCG_MO_ST_LD); haddr = cpu_mmu_lookup(cpu, addr, mop, ra, MMU_DATA_LOAD); ret = load_atom_16(cpu, ra, haddr, mop); clear_helper_retaddr(); @@ -1146,7 +1146,7 @@ static void do_st1_mmu(CPUState *cpu, vaddr addr, uint8_t val, { void *haddr; - cpu_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST); + cpu_req_mo(cpu, TCG_MO_LD_ST | TCG_MO_ST_ST); haddr = cpu_mmu_lookup(cpu, addr, get_memop(oi), ra, MMU_DATA_STORE); stb_p(haddr, val); clear_helper_retaddr(); @@ -1158,7 +1158,7 @@ static void do_st2_mmu(CPUState *cpu, vaddr addr, uint16_t val, void *haddr; MemOp mop = get_memop(oi); - cpu_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST); + cpu_req_mo(cpu, TCG_MO_LD_ST | TCG_MO_ST_ST); haddr = cpu_mmu_lookup(cpu, addr, mop, ra, MMU_DATA_STORE); if (mop & MO_BSWAP) { @@ -1174,7 +1174,7 @@ static void do_st4_mmu(CPUState *cpu, vaddr addr, uint32_t val, void *haddr; MemOp mop = get_memop(oi); - cpu_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST); + cpu_req_mo(cpu, TCG_MO_LD_ST | TCG_MO_ST_ST); haddr = cpu_mmu_lookup(cpu, addr, mop, ra, MMU_DATA_STORE); if (mop & MO_BSWAP) { @@ -1190,7 +1190,7 @@ static void do_st8_mmu(CPUState *cpu, vaddr addr, uint64_t val, void *haddr; MemOp mop = get_memop(oi); - cpu_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST); + cpu_req_mo(cpu, TCG_MO_LD_ST | TCG_MO_ST_ST); haddr = cpu_mmu_lookup(cpu, addr, mop, ra, MMU_DATA_STORE); if (mop & MO_BSWAP) { @@ -1206,7 +1206,7 @@ static void do_st16_mmu(CPUState *cpu, vaddr addr, Int128 val, void *haddr; MemOpIdx mop = get_memop(oi); - cpu_req_mo(TCG_MO_LD_ST | TCG_MO_ST_ST); + cpu_req_mo(cpu, TCG_MO_LD_ST | TCG_MO_ST_ST); haddr = cpu_mmu_lookup(cpu, addr, mop, ra, MMU_DATA_STORE); if (mop & MO_BSWAP) { From patchwork Thu Apr 24 00:49:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883914 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3209283wrs; Wed, 23 Apr 2025 18:29:29 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWC9bWvMggT0DOPgWzMH/BRJRluSHnxhspv4+SjNa5gK7zNj6BfxVRDGPRyTQeCTtariQuoFA==@linaro.org X-Google-Smtp-Source: AGHT+IFIE4u4Lfj3RXUlEy+1THHjRwnTaHUpeCJIdm4Kp4gjsrxaORQY1oimzK5spyTRoD+nZV/0 X-Received: by 2002:a05:620a:3948:b0:7c7:56ac:1e89 with SMTP id af79cd13be357-7c956e8bb31mr144511085a.3.1745458169270; Wed, 23 Apr 2025 18:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458169; cv=none; d=google.com; s=arc-20240605; b=MKx+L10ucSPGC9ZhbOItfMXsMZ7j7+ZSZ6t29qF3vnaLPko3LlBqqvyQuYxBmOCmxt w0j2RAz9IflMK9dtaGEs75RwcL4DbVn+iNY7bsefm4AnXJDDZh7cFqihsfJXFbGVYiLA C6+fuL9YNBqgKa4yZymZCzNF1bC1qBW33e1JeFvuBd0KXznR5KNxjDyqePLtkqldevva ATSq2pIqY3WBWTxYgB7AuA5tXWpfz/wdAILnoDxIetu4HrB20KHMWStUz5pgQwuM7Ccy fbiiAF0WvM266MjEzRjjPcKq5ff7O+igoaJ3LLlukFIOS2TKFZLq1SnjTkN4Bt5zZ2Ni GzOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NFR9lsWoMXNYRBlDfEvBXzbnQL4knAWePayfKJdKcZo=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=duIeGocWO8lSIyHFHnD7T4P3Ny4fg6CfeWWLyljRNH/27uMFtqZ49GY1gAm/D9Jr/+ 3zpUJbh1ZAEB25vR7tajuFptyHvCDK6RLakMRd1Z0dhdaOQvf1UbrxL2Yeo+kxwIIDmQ +J29273OMaCZ82G+G3602z56ZUD75/q8V614EA//EK6R6CX1HD7ffFhxy6ZSBtSrbY8w 1BlJqw5ipCd6J5UJ1y0H4h2yulhIopPWYas4ttnnaPo23Y02DWtYg88mGptZNNG1udVO L9jn1kg2LBWWLexc+HpuuwwQD+EXDJ6tLm5fyIIA1FFiCPkoIff00lkMQsVGfz+qo59x +mUQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mSyV3buJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958c9e306si26569385a.54.2025.04.23.18.29.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:29:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mSyV3buJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kyV-0008Gv-Cb; Wed, 23 Apr 2025 21:01: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 1u7kwu-0005Hh-Qp for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:21 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kws-0005WI-CA for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:20 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-2295d78b45cso6795035ad.0 for ; Wed, 23 Apr 2025 18:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456416; x=1746061216; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NFR9lsWoMXNYRBlDfEvBXzbnQL4knAWePayfKJdKcZo=; b=mSyV3buJv/+sWgF7ZWKKAR1aeEs/xKb0TBY4cup1L2NUKzEwPYl/qOvubIjpY7Z0Sc Ec0pEdYu/WZf311cc3C/PncHDpXIxtvPTYWodjLtL6hGI3hyn4yn6Og9ThZXLZtLq1WC qgxJ+VOlXvgBgJy97SgycB0O+UfvY6hcAeED7d8UX1Jdm1Q2wZKcEVga1nfWuFva/Uaq ym+EWuIQpiC5Jw8fbjYIhetqbZApY+tNkQNGe7A1hdGftRJgeOcQoSeJ2olm/VaD/98j Pvgp/m2e5gN7XqegCyqxvcKfSnZRiGKDu6P65wT7yAtbdoiTlpsiASRogfCLynTjMeMT TshQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456416; x=1746061216; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NFR9lsWoMXNYRBlDfEvBXzbnQL4knAWePayfKJdKcZo=; b=Eayf4BqQz9j/rIrZfg+OH0lADseujg3Di32L5oGeYQiRz1w2j2wx0ax2au4tLd3eqe KFRUdrJUPUxnV+9nWy39NvUtbV6oEATl1Sjj8gVCNETyt4hrXw+2GtcFhGKASCaksdYn Cuv9pXGzlC7fNBrrG/W5vk5nsLUqDbFg5G35g/flmXy1PzfM+2BydewtMql/YyNSKSZY UYEglhXSsO7dXa6WDd1/nCo5KLr6oK5ITUjxZFOkiC2rKSlmlrImAxMiKwj0vZust28n BpYselkHUYJksJeJkTkjjBJN0IwW8gTu4RomwO+WpvVHqHomAfi9TsBXeaTXnGsVwZr4 I6PQ== X-Gm-Message-State: AOJu0YwsiKW1nui0eHVDcE0kxrx6gyBIjJUmssNIB8miWe9y7xT1+GNa 3ih44ET9/4K6OMwtpKTODUKPprhY/ZwC7RJB5JtabDD4Fo7YaNkNgYeU/XBeJUTt+gcWLp/J66x 6 X-Gm-Gg: ASbGncu/hyP4DoqGhV+kXEW5tqEPL+UN0SveMnPm7VrRBG4LRioSimwX4gaCkcrW4gD Dqh0id4rDMeMl86xlAplzBMbN6ODzgJ5CrCSnxiFn8wKSqMXlldIq86VyIe+26UM88OX94q3n4W 5+2pk33NLzx/C2BzNwfriFRbU1OinA/0zgwar5JjU4U6f0WH+Lljf4L7bG5AEdzN5ZIUw2iiNnW X93WgUWKaE0eJ26b9S45jzvwLMHFKUlJ+Ynm5kmwSMbPYzjjPZ15ZAleQzztlLHjH+oW+Zkhaz7 t0Hr8ap5n+LaqZkmRcQYeKsOZ1GVzzEsvGC9L+5UDX6KOafoAB6vwOQ07d3Ib+T700A9aSa4XQC VPjZo+tGXhg== X-Received: by 2002:a17:902:ecca:b0:227:e6fe:2908 with SMTP id d9443c01a7336-22db3d9a1efmr8773675ad.48.1745456416548; Wed, 23 Apr 2025 18:00:16 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 138/148] tcg: Have tcg_req_mo() use TCGCPUOps::guest_default_memory_order Date: Wed, 23 Apr 2025 17:49:23 -0700 Message-ID: <20250424004934.598783-139-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé In order to use TCG with multiple targets, replace the compile time use of TCG_GUEST_DEFAULT_MO by a runtime access to TCGCPUOps::guest_default_memory_order via CPUState. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- accel/tcg/internal-target.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index 23aac39b57..f5a3fd7e40 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -46,16 +46,15 @@ G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr); /** * tcg_req_mo: + * @guest_mo: Guest default memory order * @type: TCGBar * * Filter @type to the barrier that is required for the guest * memory ordering vs the host memory ordering. A non-zero * result indicates that some barrier is required. - * - * This is a macro so that it's constant even without optimization. */ -#define tcg_req_mo(type) \ - ((type) & TCG_GUEST_DEFAULT_MO & ~TCG_TARGET_DEFAULT_MO) +#define tcg_req_mo(guest_mo, type) \ + ((type) & guest_mo & ~TCG_TARGET_DEFAULT_MO) /** * cpu_req_mo: @@ -67,7 +66,7 @@ G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr); */ #define cpu_req_mo(cpu, type) \ do { \ - if (tcg_req_mo(type)) { \ + if (tcg_req_mo(cpu->cc->tcg_ops->guest_default_memory_order, type)) { \ smp_mb(); \ } \ } while (0) From patchwork Thu Apr 24 00:49:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883869 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3206243wrs; Wed, 23 Apr 2025 18:17:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVSwIfJgmBgg1zj6l4lQ/447EO+VHYvhRm3ZTTGCX7vScLC0niNwz4HgfOyMCT35UeBC0p6dw==@linaro.org X-Google-Smtp-Source: AGHT+IFloZn7VFf9kvJPLePWnhwczqsIqBCpAoFogxG1joSzObL/KBJlSfENH81Y0aX3L5Gqio60 X-Received: by 2002:a05:620a:270e:b0:7c7:b8bf:35cf with SMTP id af79cd13be357-7c9585c6a5dmr98268985a.7.1745457460969; Wed, 23 Apr 2025 18:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457460; cv=none; d=google.com; s=arc-20240605; b=HtFQj9M+fG25roq3Yh4cxKUmAgzuS0ddFk9UBFj0dJeOEWdRhZEin03WHrx8z2zeBu wZFIfCS9l40luTylAR2uX613IGln2hPqZreq5D7qyzSiLhj7qLILrBsRtnM4Y0a4pTwr yb0ENOF/03cTVTF4QD8K4YacOF+WbYqYPHQpUxlTm9VybJYq46Jia7I9+NoD2GpwnRoN 6Z5ab43orYQHF8Rby9zzJ2iWWecE7Zzq8NpH8P54INKWANGV3uHU/FfGqZ/at2901lMW SqTA8GhAiCK9mspZErOppMGsx8eC6A7qOo0TXocPZmwXcy9LWv5m6sbdzrZgL1+3QTfr Rh1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YYHQtuGiuymmjGUHHCn+9yiZGa5qUf/qG4Dwvjes2M8=; fh=GenBbR+/7gYaTcd1KqVHGA9TQPQZSS4lyPm/ns+6Qjo=; b=H3HXLJHFumfxLHcTUiDx+zjobtk9apgFCeNb+Zdclyi7bBpM1Vs0NNv5ptjw4soVWo FC335Ou2tWT3lcr+C5EfJBu6Ru8Lxp73DpsBGiNAGy+PgHyE6LtookFBit3kYlUbCBZJ YSxhRj0lsPiVwIu4o8N/IShi1W/xCWdankOTPOpnHYIf3jQ7SAvftj+ahm5/mCj0AXNo AoCBUIdTgo3dp3AUZ3N2xXZRNDBvvueEa1g8r32fDzByuP6BSsTPQsV1AaJaqp/t9w0j E18DE5LmQwe6bkQ+i7OCV2+lwJWZBNDBxTA727msyLUd9N5/FMKplBk+e1Xr/96Hfe95 sQqw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O5lodMG4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958cd5029si24188385a.160.2025.04.23.18.17.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:17:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O5lodMG4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7l01-0001qK-W2; Wed, 23 Apr 2025 21:03: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 1u7kwx-0005NU-4e for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:23 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwt-0005X0-G4 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:22 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-227cf12df27so4477775ad.0 for ; Wed, 23 Apr 2025 18:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456418; x=1746061218; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YYHQtuGiuymmjGUHHCn+9yiZGa5qUf/qG4Dwvjes2M8=; b=O5lodMG43LHt9/X35bJWJldUAh2wJbNPuASSPjjqJ/L+0vblyGdRW+PaHU70Vxff7w uMoHdDZh/0ZOiXz+/xuqKtV3BnpBlvIh/c5Hqt0cQ9z1H84g8F7Qri70PUFJE5d4Icx0 3EThze7i7bPmD7pLPllMs1RclAD9s3yK3L5550F/N7iotilnSFERJvICzRrzFIw+hY98 1M0vn7PApt6akAFiVVSr0mVWN3oHGcPz2are/45JHYTloMlGMKix7DLefTZWrfal3/7Y 8yQwN0o0CPGV3/MQe8aaEEViQQuXdECxwRrVrq3XTXTXiDkuvGCBXYlAuAgTuL7KTeGV G9Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456418; x=1746061218; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YYHQtuGiuymmjGUHHCn+9yiZGa5qUf/qG4Dwvjes2M8=; b=V8CDmJ40OEY1rRamk1l/snjfdhfxLEMDFfeWmcKC68kRcA/uZrHvY0a4Ar56oqIfje 7kwvuGo0lXDxL5xixP9AMuWUbV33fQeNYz60m1ulaFUv+65mw4N67iGwmCfes3gBjNLq UCKRNK+pPVWdYuBWN9T8+OkdiP4anaE/v+QkGTD01PVnpq3QiLMwfRcg4ZBRjQuujYGe xQRMFfdbzsdz2v03bAg+BycGUHC+Qj+LwXObblWhkvOgFB39VSx94XmIXC7ysnPZeDET IOdIkE/gr4MKv2pH8mgw2782IwvsyRsuqOVdezb42GTO7MioGp8TpL21VeXU3bFk2Aar jsHQ== X-Gm-Message-State: AOJu0Yw7OW8nodp7KKqt4WE57pBWd2ONGgwdr3+WQCcSJvSxfSeoiVal NVLYfxncZ+lHELvFFin9H/L9m2iSAiFiInz2UYpMYnGBJMnzPg7B6vGGyOEYapqglNLn2B6yCm8 C X-Gm-Gg: ASbGncumruVm5dq+qNLR4x31lZ5xx7H8VpaQY0XESvZ/0OB42Bsg7VOlyHfR71CVQuT eMQDZZtGGCLgP0IOGYFpLqI7HPhvAcziP3+mNU0/0zBFFA3qAMczeeLE1Rue0etDEU1f7r5kMQW iUhpPnsFqz/g7qhiB41old2zs+qWRiA0PEAj76FwuKqRGWxq8Yi9R2e/Gvje//B3IV4TSavkYcY 4ktFSUpKDoRl+mYXrrti4IMgNHSFT/UGBI97opjld9b/HwsVa0Zxr98g7RZZw6VYOZWBWmrWd5C KP8Ki4AZZT4JxeR+xhm6uyFKv6DJwNoKlsDvfXV3aazpkdQsjJ25DArRY2X2GOor8hkYV43/hGo = X-Received: by 2002:a17:903:1b03:b0:223:807f:7f92 with SMTP id d9443c01a7336-22db4983516mr5422885ad.20.1745456417486; Wed, 23 Apr 2025 18:00:17 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Anton Johansson , Pierrick Bouvier Subject: [PULL 139/148] tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally Date: Wed, 23 Apr 2025 17:49:24 -0700 Message-ID: <20250424004934.598783-140-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé By directly using TCGCPUOps::guest_default_memory_order, we don't need the TCG_GUEST_DEFAULT_MO definition anymore. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- target/alpha/cpu-param.h | 3 --- target/arm/cpu-param.h | 3 --- target/avr/cpu-param.h | 2 -- target/hexagon/cpu-param.h | 3 --- target/hppa/cpu-param.h | 8 -------- target/i386/cpu-param.h | 3 --- target/loongarch/cpu-param.h | 2 -- target/m68k/cpu-param.h | 3 --- target/microblaze/cpu-param.h | 3 --- target/mips/cpu-param.h | 2 -- target/openrisc/cpu-param.h | 2 -- target/ppc/cpu-param.h | 2 -- target/riscv/cpu-param.h | 2 -- target/rx/cpu-param.h | 3 --- target/s390x/cpu-param.h | 6 ------ target/sh4/cpu-param.h | 3 --- target/sparc/cpu-param.h | 23 ----------------------- target/tricore/cpu-param.h | 3 --- target/xtensa/cpu-param.h | 3 --- target/alpha/cpu.c | 3 ++- target/arm/cpu.c | 3 ++- target/arm/tcg/cpu-v7m.c | 3 ++- target/avr/cpu.c | 2 +- target/hexagon/cpu.c | 3 ++- target/hppa/cpu.c | 8 +++++++- target/i386/tcg/tcg-cpu.c | 5 ++++- target/loongarch/cpu.c | 2 +- target/m68k/cpu.c | 3 ++- target/microblaze/cpu.c | 3 ++- target/mips/cpu.c | 2 +- target/openrisc/cpu.c | 2 +- target/ppc/cpu_init.c | 2 +- target/riscv/tcg/tcg-cpu.c | 2 +- target/rx/cpu.c | 3 ++- target/s390x/cpu.c | 6 +++++- target/sh4/cpu.c | 3 ++- target/sparc/cpu.c | 23 ++++++++++++++++++++++- target/tricore/cpu.c | 3 ++- target/xtensa/cpu.c | 3 ++- docs/devel/multi-thread-tcg.rst | 4 ++-- 40 files changed, 66 insertions(+), 101 deletions(-) diff --git a/target/alpha/cpu-param.h b/target/alpha/cpu-param.h index dd44feb179..a799f42db3 100644 --- a/target/alpha/cpu-param.h +++ b/target/alpha/cpu-param.h @@ -26,7 +26,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 -/* Alpha processors have a weak memory model */ -#define TCG_GUEST_DEFAULT_MO (0) - #endif diff --git a/target/arm/cpu-param.h b/target/arm/cpu-param.h index 2cee4be693..5c5bc8a009 100644 --- a/target/arm/cpu-param.h +++ b/target/arm/cpu-param.h @@ -44,7 +44,4 @@ */ #define TARGET_INSN_START_EXTRA_WORDS 2 -/* ARM processors have a weak memory model */ -#define TCG_GUEST_DEFAULT_MO (0) - #endif diff --git a/target/avr/cpu-param.h b/target/avr/cpu-param.h index 9d37848d97..f74bfc2580 100644 --- a/target/avr/cpu-param.h +++ b/target/avr/cpu-param.h @@ -27,6 +27,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 -#define TCG_GUEST_DEFAULT_MO 0 - #endif diff --git a/target/hexagon/cpu-param.h b/target/hexagon/cpu-param.h index 7cc63a01d4..635d509e74 100644 --- a/target/hexagon/cpu-param.h +++ b/target/hexagon/cpu-param.h @@ -25,7 +25,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 -/* MTTCG not yet supported: require strict ordering */ -#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL - #endif diff --git a/target/hppa/cpu-param.h b/target/hppa/cpu-param.h index 68ed84e84a..9bf7ac76d0 100644 --- a/target/hppa/cpu-param.h +++ b/target/hppa/cpu-param.h @@ -21,12 +21,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 2 -/* PA-RISC 1.x processors have a strong memory model. */ -/* - * ??? While we do not yet implement PA-RISC 2.0, those processors have - * a weak memory model, but with TLB bits that force ordering on a per-page - * basis. It's probably easier to fall back to a strong memory model. - */ -#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL - #endif diff --git a/target/i386/cpu-param.h b/target/i386/cpu-param.h index 0c8efce861..ebb844bcc8 100644 --- a/target/i386/cpu-param.h +++ b/target/i386/cpu-param.h @@ -24,7 +24,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 1 -/* The x86 has a strong memory model with some store-after-load re-ordering */ -#define TCG_GUEST_DEFAULT_MO (TCG_MO_ALL & ~TCG_MO_ST_LD) - #endif diff --git a/target/loongarch/cpu-param.h b/target/loongarch/cpu-param.h index dbe414bb35..58cc45a377 100644 --- a/target/loongarch/cpu-param.h +++ b/target/loongarch/cpu-param.h @@ -15,6 +15,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 -#define TCG_GUEST_DEFAULT_MO (0) - #endif diff --git a/target/m68k/cpu-param.h b/target/m68k/cpu-param.h index 10a8d74bfa..256a2b5f8b 100644 --- a/target/m68k/cpu-param.h +++ b/target/m68k/cpu-param.h @@ -19,7 +19,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 1 -/* MTTCG not yet supported: require strict ordering */ -#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL - #endif diff --git a/target/microblaze/cpu-param.h b/target/microblaze/cpu-param.h index 5d55e0e3c4..e0a3794513 100644 --- a/target/microblaze/cpu-param.h +++ b/target/microblaze/cpu-param.h @@ -29,7 +29,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 1 -/* MicroBlaze is always in-order. */ -#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL - #endif diff --git a/target/mips/cpu-param.h b/target/mips/cpu-param.h index 99ca8d1684..58f450827f 100644 --- a/target/mips/cpu-param.h +++ b/target/mips/cpu-param.h @@ -22,6 +22,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 2 -#define TCG_GUEST_DEFAULT_MO (0) - #endif diff --git a/target/openrisc/cpu-param.h b/target/openrisc/cpu-param.h index 7ea0ecb55a..b4f57bbe69 100644 --- a/target/openrisc/cpu-param.h +++ b/target/openrisc/cpu-param.h @@ -14,6 +14,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 1 -#define TCG_GUEST_DEFAULT_MO (0) - #endif diff --git a/target/ppc/cpu-param.h b/target/ppc/cpu-param.h index d0651d2ac8..e4ed9080ee 100644 --- a/target/ppc/cpu-param.h +++ b/target/ppc/cpu-param.h @@ -39,6 +39,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 -#define TCG_GUEST_DEFAULT_MO 0 - #endif diff --git a/target/riscv/cpu-param.h b/target/riscv/cpu-param.h index ff4ba81965..cfdc67c258 100644 --- a/target/riscv/cpu-param.h +++ b/target/riscv/cpu-param.h @@ -34,6 +34,4 @@ * - M mode HLV/HLVX/HSV 0b111 */ -#define TCG_GUEST_DEFAULT_MO 0 - #endif diff --git a/target/rx/cpu-param.h b/target/rx/cpu-param.h index fe39a77ca3..84934f3bca 100644 --- a/target/rx/cpu-param.h +++ b/target/rx/cpu-param.h @@ -26,7 +26,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 -/* MTTCG not yet supported: require strict ordering */ -#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL - #endif diff --git a/target/s390x/cpu-param.h b/target/s390x/cpu-param.h index a8a4377f4f..abfae3bedf 100644 --- a/target/s390x/cpu-param.h +++ b/target/s390x/cpu-param.h @@ -14,10 +14,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 2 -/* - * The z/Architecture has a strong memory model with some - * store-after-load re-ordering. - */ -#define TCG_GUEST_DEFAULT_MO (TCG_MO_ALL & ~TCG_MO_ST_LD) - #endif diff --git a/target/sh4/cpu-param.h b/target/sh4/cpu-param.h index acdf239749..f328715ee8 100644 --- a/target/sh4/cpu-param.h +++ b/target/sh4/cpu-param.h @@ -18,7 +18,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 1 -/* MTTCG not yet supported: require strict ordering */ -#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL - #endif diff --git a/target/sparc/cpu-param.h b/target/sparc/cpu-param.h index 62d47b804b..45eea9d6ba 100644 --- a/target/sparc/cpu-param.h +++ b/target/sparc/cpu-param.h @@ -23,27 +23,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 1 -/* - * From Oracle SPARC Architecture 2015: - * - * Compatibility notes: The PSO memory model described in SPARC V8 and - * SPARC V9 compatibility architecture specifications was never implemented - * in a SPARC V9 implementation and is not included in the Oracle SPARC - * Architecture specification. - * - * The RMO memory model described in the SPARC V9 specification was - * implemented in some non-Sun SPARC V9 implementations, but is not - * directly supported in Oracle SPARC Architecture 2015 implementations. - * - * Therefore always use TSO in QEMU. - * - * D.5 Specification of Partial Store Order (PSO) - * ... [loads] are followed by an implied MEMBAR #LoadLoad | #LoadStore. - * - * D.6 Specification of Total Store Order (TSO) - * ... PSO with the additional requirement that all [stores] are followed - * by an implied MEMBAR #StoreStore. - */ -#define TCG_GUEST_DEFAULT_MO (TCG_MO_LD_LD | TCG_MO_LD_ST | TCG_MO_ST_ST) - #endif diff --git a/target/tricore/cpu-param.h b/target/tricore/cpu-param.h index 45fde756b6..eb33a67c41 100644 --- a/target/tricore/cpu-param.h +++ b/target/tricore/cpu-param.h @@ -14,7 +14,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 -/* MTTCG not yet supported: require strict ordering */ -#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL - #endif diff --git a/target/xtensa/cpu-param.h b/target/xtensa/cpu-param.h index e7cb747aaa..7a0c22c900 100644 --- a/target/xtensa/cpu-param.h +++ b/target/xtensa/cpu-param.h @@ -18,7 +18,4 @@ #define TARGET_INSN_START_EXTRA_WORDS 0 -/* Xtensa processors have a weak memory model */ -#define TCG_GUEST_DEFAULT_MO (0) - #endif diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 6f931117a2..eeaf3a81c1 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -235,7 +235,8 @@ static const struct SysemuCPUOps alpha_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps alpha_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* Alpha processors have a weak memory model */ + .guest_default_memory_order = 0, .initialize = alpha_translate_init, .translate_code = alpha_translate_code, diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 3f20e258fd..3e9760b551 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2671,7 +2671,8 @@ static const struct SysemuCPUOps arm_sysemu_ops = { #ifdef CONFIG_TCG static const TCGCPUOps arm_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* ARM processors have a weak memory model */ + .guest_default_memory_order = 0, .initialize = arm_translate_init, .translate_code = arm_translate_code, diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c index 4553fe9de0..89d4e4b4a2 100644 --- a/target/arm/tcg/cpu-v7m.c +++ b/target/arm/tcg/cpu-v7m.c @@ -232,7 +232,8 @@ static void cortex_m55_initfn(Object *obj) } static const TCGCPUOps arm_v7m_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* ARM processors have a weak memory model */ + .guest_default_memory_order = 0, .initialize = arm_translate_init, .translate_code = arm_translate_code, diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 67918684fa..8f79cf4c08 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -224,7 +224,7 @@ static const struct SysemuCPUOps avr_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps avr_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .guest_default_memory_order = 0, .initialize = avr_cpu_tcg_init, .translate_code = avr_cpu_translate_code, .synchronize_from_tb = avr_cpu_synchronize_from_tb, diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index b12e0dccd0..3d14e5cc6a 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -325,7 +325,8 @@ static void hexagon_cpu_init(Object *obj) #include "accel/tcg/cpu-ops.h" static const TCGCPUOps hexagon_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* MTTCG not yet supported: require strict ordering */ + .guest_default_memory_order = TCG_MO_ALL, .initialize = hexagon_translate_init, .translate_code = hexagon_translate_code, .synchronize_from_tb = hexagon_cpu_synchronize_from_tb, diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index ac4560febe..dfbd933056 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -253,7 +253,13 @@ static const struct SysemuCPUOps hppa_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps hppa_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* PA-RISC 1.x processors have a strong memory model. */ + /* + * ??? While we do not yet implement PA-RISC 2.0, those processors have + * a weak memory model, but with TLB bits that force ordering on a per-page + * basis. It's probably easier to fall back to a strong memory model. + */ + .guest_default_memory_order = TCG_MO_ALL, .initialize = hppa_translate_init, .translate_code = hppa_translate_code, diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 3e1b315340..d941df0956 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -125,7 +125,10 @@ static bool x86_debug_check_breakpoint(CPUState *cs) #include "accel/tcg/cpu-ops.h" static const TCGCPUOps x86_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* + * The x86 has a strong memory model with some store-after-load re-ordering + */ + .guest_default_memory_order = TCG_MO_ALL & ~TCG_MO_ST_LD, .initialize = tcg_x86_init, .translate_code = x86_translate_code, .synchronize_from_tb = x86_cpu_synchronize_from_tb, diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index ee74509a66..f5b8ef29ab 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -864,7 +864,7 @@ static void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags) #include "accel/tcg/cpu-ops.h" static const TCGCPUOps loongarch_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .guest_default_memory_order = 0, .initialize = loongarch_translate_init, .translate_code = loongarch_translate_code, diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index bfde9b8594..b2d8c8f1de 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -589,7 +589,8 @@ static const struct SysemuCPUOps m68k_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps m68k_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* MTTCG not yet supported: require strict ordering */ + .guest_default_memory_order = TCG_MO_ALL, .initialize = m68k_tcg_init, .translate_code = m68k_translate_code, diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index e46863574c..4efba0dddb 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -427,7 +427,8 @@ static const struct SysemuCPUOps mb_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps mb_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* MicroBlaze is always in-order. */ + .guest_default_memory_order = TCG_MO_ALL, .initialize = mb_tcg_init, .translate_code = mb_translate_code, diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 67a8550cc1..2ae7ba4407 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -551,7 +551,7 @@ static int mips_cpu_mmu_index(CPUState *cs, bool ifunc) } static const TCGCPUOps mips_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .guest_default_memory_order = 0, .initialize = mips_tcg_init, .translate_code = mips_translate_code, diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index e62c698a40..87fe779042 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -243,7 +243,7 @@ static const struct SysemuCPUOps openrisc_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps openrisc_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .guest_default_memory_order = 0, .initialize = openrisc_translate_init, .translate_code = openrisc_translate_code, diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 1cf18e0dae..9ba775971a 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7479,7 +7479,7 @@ static const struct SysemuCPUOps ppc_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps ppc_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .guest_default_memory_order = 0, .initialize = ppc_translate_init, .translate_code = ppc_translate_code, .restore_state_to_opc = ppc_restore_state_to_opc, diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index ded2d68ad7..50e81b2e52 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -140,7 +140,7 @@ static void riscv_restore_state_to_opc(CPUState *cs, } static const TCGCPUOps riscv_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + .guest_default_memory_order = 0, .initialize = riscv_translate_init, .translate_code = riscv_translate_code, diff --git a/target/rx/cpu.c b/target/rx/cpu.c index d7eac551fd..f073fe8fc9 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -204,7 +204,8 @@ static const struct SysemuCPUOps rx_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps rx_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* MTTCG not yet supported: require strict ordering */ + .guest_default_memory_order = TCG_MO_ALL, .initialize = rx_translate_init, .translate_code = rx_translate_code, diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index f232d82fa3..1e101b5afe 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -345,7 +345,11 @@ void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc, } static const TCGCPUOps s390_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* + * The z/Architecture has a strong memory model with some + * store-after-load re-ordering. + */ + .guest_default_memory_order = TCG_MO_ALL & ~TCG_MO_ST_LD, .initialize = s390x_translate_init, .translate_code = s390x_translate_code, diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 29f4be7ba9..7a05301c6f 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -262,7 +262,8 @@ static const struct SysemuCPUOps sh4_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps superh_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* MTTCG not yet supported: require strict ordering */ + .guest_default_memory_order = TCG_MO_ALL, .initialize = sh4_translate_init, .translate_code = sh4_translate_code, diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index ef04efcb18..56d9417ae3 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -1001,7 +1001,28 @@ static const struct SysemuCPUOps sparc_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps sparc_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* + * From Oracle SPARC Architecture 2015: + * + * Compatibility notes: The PSO memory model described in SPARC V8 and + * SPARC V9 compatibility architecture specifications was never + * implemented in a SPARC V9 implementation and is not included in the + * Oracle SPARC Architecture specification. + * + * The RMO memory model described in the SPARC V9 specification was + * implemented in some non-Sun SPARC V9 implementations, but is not + * directly supported in Oracle SPARC Architecture 2015 implementations. + * + * Therefore always use TSO in QEMU. + * + * D.5 Specification of Partial Store Order (PSO) + * ... [loads] are followed by an implied MEMBAR #LoadLoad | #LoadStore. + * + * D.6 Specification of Total Store Order (TSO) + * ... PSO with the additional requirement that all [stores] are followed + * by an implied MEMBAR #StoreStore. + */ + .guest_default_memory_order = TCG_MO_LD_LD | TCG_MO_LD_ST | TCG_MO_ST_ST, .initialize = sparc_tcg_init, .translate_code = sparc_translate_code, diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index 3bf399335a..c68954b409 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -172,7 +172,8 @@ static const struct SysemuCPUOps tricore_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps tricore_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* MTTCG not yet supported: require strict ordering */ + .guest_default_memory_order = TCG_MO_ALL, .initialize = tricore_tcg_init, .translate_code = tricore_translate_code, .synchronize_from_tb = tricore_cpu_synchronize_from_tb, diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 2347106495..2cbf4e3010 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -232,7 +232,8 @@ static const struct SysemuCPUOps xtensa_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps xtensa_tcg_ops = { - .guest_default_memory_order = TCG_GUEST_DEFAULT_MO, + /* Xtensa processors have a weak memory model */ + .guest_default_memory_order = 0, .initialize = xtensa_translate_init, .translate_code = xtensa_translate_code, diff --git a/docs/devel/multi-thread-tcg.rst b/docs/devel/multi-thread-tcg.rst index b0f473961d..14a2a9dc7b 100644 --- a/docs/devel/multi-thread-tcg.rst +++ b/docs/devel/multi-thread-tcg.rst @@ -28,8 +28,8 @@ vCPU Scheduling We introduce a new running mode where each vCPU will run on its own user-space thread. This is enabled by default for all FE/BE combinations where the host memory model is able to accommodate the -guest (TCG_GUEST_DEFAULT_MO & ~TCG_TARGET_DEFAULT_MO is zero) and the -guest has had the required work done to support this safely +guest (TCGCPUOps::guest_default_memory_order & ~TCG_TARGET_DEFAULT_MO is zero) +and the guest has had the required work done to support this safely (TARGET_SUPPORTS_MTTCG). System emulation will fall back to the original round robin approach From patchwork Thu Apr 24 00:49:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883921 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3209784wrs; Wed, 23 Apr 2025 18:31:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXFYHCZe8WdG+4Qe0vDdG761b+Le71pzKultuVWO8TezfWX0F0Dvjy73P35BRsEF0rxMKiPgQ==@linaro.org X-Google-Smtp-Source: AGHT+IG9W8UuaU6u8uDzuLGn9nBasUnz2fY1yw9fb7YJK4qojYLGj3gXfF0UiTmfrZBlmc+reRZv X-Received: by 2002:ac8:584c:0:b0:476:a74d:f23b with SMTP id d75a77b69052e-47eb52c26afmr8990491cf.48.1745458275502; Wed, 23 Apr 2025 18:31:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458275; cv=none; d=google.com; s=arc-20240605; b=JeeWSLEnTiYiNFF6cOVBonCK2wLbzBUvvmBbs83JpXkEK7+jbSj+NYgMi9zEUbUEX/ FLBx9oAQfzJhEIUfgBVMmeKCirJ4dG5v9ABs1bEAdtHyv2yxllEv+uAent/69Hl7VIES Y9yg2gI64CPe1uMlpl6NFK4ySFShWol6UsfkasAGeWVmEsJcVX4CSMB+hEWFH4+Jjlbm 9MlhLOnz371yew0h+zSX6pQuHRDOTvoPpvcyFtKpnbnjuvZ1azKaM0nFaH0tXTdHUEar jNsKEZsWozFWadk9Z/i957LpXlGAQWbAPaT7cXIzwC5dPeqAYy1kgUgI9fZwptpGNOc2 PKrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7VXEDUlPkpIMjb0Jt+mGuDdJy2bXxmmNFXU1sXIXZA4=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=ZGiexuAUOSSspDujP9FN1LNkvCtzOf9EEErUZSrCMwrtVV7oml+U7vGBL62Uy8RIl2 ZHoAEYjchncEJ+m8og8BEMlJ1fbbwniiFn0EvnviZ8/G+2UOw6DJYOTmY88hRQAQPpd0 sXYmhpnuXBCdmnW+9O5e8vcgdnNeuHqIAYrIYffVw2ZBnj+/kLhtdgeZ1n8xK8jLkCE4 uBaXDSuHGDg/emHdcU9JSGIOHXnh21YbPBH9/X/w7rB05N/phvxQfjGiuuixAEfV0MSy CxNncWmLC1dc9JVp8OnwR1R8uipM0tr+DUTj15WC9PE1rSVWlUXZ6CnRG+0qOahOjdMz 9JwA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B5hnbVZ4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea25ae719si5484151cf.546.2025.04.23.18.31.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:31:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B5hnbVZ4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7l0V-0003LN-RG; Wed, 23 Apr 2025 21:04: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 1u7kwz-0005Wl-5N for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:25 -0400 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwt-0005XC-V2 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:24 -0400 Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-73bf5aa95e7so372361b3a.1 for ; Wed, 23 Apr 2025 18:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456418; x=1746061218; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7VXEDUlPkpIMjb0Jt+mGuDdJy2bXxmmNFXU1sXIXZA4=; b=B5hnbVZ4rGdEq8Gqve76Rt/gtItWKv3I/e1LvIRMNZDax0AW3WI6bzFMogiMgvqAOw Idl8AVtIo/yT2eHxzoPezNW8w2ua12I+x11MX6EQEMusLCZ0/nwdGzO9e+FLzJ66HN9c Yld6AgiNEn1MnUOwsw2n9g+5suHg9IqNQAWF/X9Llzt2CxKcNng9A/FXsDyqjJ54Kkwl kBMmZMEjebdnL+ONrn2qkTgVIsg98c5V9LHQbtJ4NifhhRamqSvIh9e4ruDQ5oyJnFxm EtsEnVoUL5+xDLWlLDNpcJqzusLofpNl9Og4jxbxrY9m0I9tvAsu18N3SRCIx0ydMEpL efIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456418; x=1746061218; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7VXEDUlPkpIMjb0Jt+mGuDdJy2bXxmmNFXU1sXIXZA4=; b=NkFZK3aO1DW//kSvv6RJNpp25gVDM01lmt8MTNG+wCGHNlMtbqwEFjexqBPpftkgBX cqUTtL8IzdTYw7GqreSjswYPBzQX1yiiVyMU/Dj/VYij7gDOqKCcchpPl3fKiR2F7zzZ vMBij4SSjKENkSUYs/nDR9K4MPoNjaFOE7uBOUn1yZ/3YGWOS8JL3tP9mMjychzCpfeR +tdzybIVhHaXrui/OjT2pTpToexscdPED4I8Nj9UawlszVIXzSTYTtS89p/YpBSunIrY b9IGbsZQBZ+QHnlST3t0uA9VcNw86pLK9QVAjTz00kti01ge4TdCDUl9+ocKR5sNyIyt YcUA== X-Gm-Message-State: AOJu0YycQVECBjpur/a2+KayIbwTw1/SKZ6ntv1z9JrBZSFVkzwKfNzD 7+9jL/4ui3xkxY7qdb4vblUqjgoPVKIskHYpjpUR8xkhK+wDAOw/aLbDiSVlyjHpap59GfXVWV5 w X-Gm-Gg: ASbGncuxvRaZ8eLCCJmAoSgaXv7Z0bOGDrc2orFg1sUf42SjReB15f3JiK2lzRV2561 8Y1C58uidUT0Lu6b7MAvr6te3xEyDUr0GJDovnYyRbcqv1owQ/TdcJxNKB/fBh7L3t6KtrexYuu B5xfNCPBhcxo2QAeLg9DPRbHPyGax6QnWFPXFuZKnM+HOkXtX5+xYNCIjcRhP/UxDepQCqe/pGm x+pRFl2UNjM8GVGNCXuDPeRpcVCqkKFV2KrMobMPdH8QkEjIqxJhR+rKUOkSsnhaGiDPo6PMbXC uF8X42zazMKTQg9a2EDf5LotDojK9cSwlHohT2UcmGgO+Ukpt54pW49EBON5vqSeXNMGAZX79+g yH7SeW/aAog== X-Received: by 2002:a05:6a20:c70e:b0:1f5:57d0:7014 with SMTP id adf61e73a8af0-20444f23718mr934259637.25.1745456418182; Wed, 23 Apr 2025 18:00:18 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 140/148] tcg: Move cpu_req_mo() macro to target-agnostic 'backend-ldst.h' Date: Wed, 23 Apr 2025 17:49:25 -0700 Message-ID: <20250424004934.598783-141-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- accel/tcg/backend-ldst.h | 41 +++++++++++++++++++++++++++++++++++++ accel/tcg/internal-target.h | 28 ------------------------- accel/tcg/cputlb.c | 1 + accel/tcg/user-exec.c | 1 + 4 files changed, 43 insertions(+), 28 deletions(-) create mode 100644 accel/tcg/backend-ldst.h diff --git a/accel/tcg/backend-ldst.h b/accel/tcg/backend-ldst.h new file mode 100644 index 0000000000..9c3a407a5a --- /dev/null +++ b/accel/tcg/backend-ldst.h @@ -0,0 +1,41 @@ +/* + * Internal memory barrier helpers for QEMU (target agnostic) + * + * Copyright (c) 2003 Fabrice Bellard + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef ACCEL_TCG_BACKEND_LDST_H +#define ACCEL_TCG_BACKEND_LDST_H + +#include "tcg-target-mo.h" + +/** + * tcg_req_mo: + * @guest_mo: Guest default memory order + * @type: TCGBar + * + * Filter @type to the barrier that is required for the guest + * memory ordering vs the host memory ordering. A non-zero + * result indicates that some barrier is required. + */ +#define tcg_req_mo(guest_mo, type) \ + ((type) & guest_mo & ~TCG_TARGET_DEFAULT_MO) + +/** + * cpu_req_mo: + * @cpu: CPUState + * @type: TCGBar + * + * If tcg_req_mo indicates a barrier for @type is required + * for the guest memory model, issue a host memory barrier. + */ +#define cpu_req_mo(cpu, type) \ + do { \ + if (tcg_req_mo(cpu->cc->tcg_ops->guest_default_memory_order, type)) { \ + smp_mb(); \ + } \ + } while (0) + +#endif diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index f5a3fd7e40..9a9cef3140 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -13,7 +13,6 @@ #include "exec/exec-all.h" #include "exec/translation-block.h" #include "tb-internal.h" -#include "tcg-target-mo.h" #include "exec/mmap-lock.h" /* @@ -44,31 +43,4 @@ void page_table_config_init(void); G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr); #endif /* CONFIG_USER_ONLY */ -/** - * tcg_req_mo: - * @guest_mo: Guest default memory order - * @type: TCGBar - * - * Filter @type to the barrier that is required for the guest - * memory ordering vs the host memory ordering. A non-zero - * result indicates that some barrier is required. - */ -#define tcg_req_mo(guest_mo, type) \ - ((type) & guest_mo & ~TCG_TARGET_DEFAULT_MO) - -/** - * cpu_req_mo: - * @cpu: CPUState - * @type: TCGBar - * - * If tcg_req_mo indicates a barrier for @type is required - * for the guest memory model, issue a host memory barrier. - */ -#define cpu_req_mo(cpu, type) \ - do { \ - if (tcg_req_mo(cpu->cc->tcg_ops->guest_default_memory_order, type)) { \ - smp_mb(); \ - } \ - } while (0) - #endif /* ACCEL_TCG_INTERNAL_H */ diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 35b1ff03a5..d9fb68d719 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -48,6 +48,7 @@ #include "qemu/plugin-memory.h" #endif #include "tcg/tcg-ldst.h" +#include "backend-ldst.h" /* DEBUG defines, enable DEBUG_TLB_LOG to log to the CPU_LOG_MMU target */ diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 3f4d682446..5eef8e7f18 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -37,6 +37,7 @@ #include "qemu/int128.h" #include "trace.h" #include "tcg/tcg-ldst.h" +#include "backend-ldst.h" #include "internal-common.h" #include "internal-target.h" #include "tb-internal.h" From patchwork Thu Apr 24 00:49:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883878 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207108wrs; Wed, 23 Apr 2025 18:21:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUC95l/fcvWITA1RpsPiWF8LZ+cAClwn5iIHwkRPpACsm5FAgma7Buw3LlarBHW6lYAStUv9g==@linaro.org X-Google-Smtp-Source: AGHT+IEux6mwfZ0vLau84Suml9BzPpdWASf0eSV6ziqhuo6qPlCSODyKPcEJ6jf3A3KiDGCtDfBl X-Received: by 2002:a05:620a:198d:b0:7c5:4b91:6a44 with SMTP id af79cd13be357-7c956ea92d3mr140168285a.19.1745457668691; Wed, 23 Apr 2025 18:21:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457668; cv=none; d=google.com; s=arc-20240605; b=IpFqyKggVgFbfgF2u3ik5cf8QmvBu4mvB6k6CCC8WkSxkOSw8flszfZswdIIAmrsZl dV5a22ry0lW+OgCnFuDfegy1Zk7BUqlpF5egdS6ATRZQiNIVM8R6cB/UrQQxrnmrucTn ezgnRXrG2HP4yGtKV2nWE/+jCfGLpI1fpYk0l6GSw6Mdg1HOnL/CGb6fOx85Zar4T/av 0pfHNWGA5AYYP8JYC14MKLhUQaIeTPeizVm8+eJ7a0PzMlJhlQ079gUHoceHwmPYYuw/ q1pdffbLzz/J20jTJ/I5qq4jhuTQggoTs9ADtEIv0lK+q/A7cK3hveueGoAE3BW9fPeL kSTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JULegdjF4TEWKbMa1RsDi++XULImatCldLbzXwzcxYs=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=Un4JdPxKCmJqGAplWjv9r2v9H0USvDQFHD9PPBj0a2+uBtaY3n78ev9V+/FlYqpPjG yPW1EEOBkle9I+bdHibTg6AImqgjw3dvqm8pkv0JyA7YGX9his7A5HSbb+MvJkhlOOBp sv+4wgYOvGFE4iSBLywenJ0LxiHv3fX3sWoQy1L6K9NRMzgA8Q2WBkwKeNZtbf728qvO DtEboCL1szPGJNZyVGEIg6xGRtR1fqWX/FmzgvLPsX2jI1l4sMDTnHngcoYbiBmVLz5l Kt89HBadUe5OujuP4+zTgQN/Vc73taxdOq1DHjXix2lPlxr0DBJZQakecO/YWZl8nL6d 5gpA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QQPLpXCp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ebf2e6si23917685a.521.2025.04.23.18.21.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:21:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QQPLpXCp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7l0K-0002VA-VY; Wed, 23 Apr 2025 21:03:53 -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 1u7kwy-0005RM-40 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:24 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0: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 1u7kwv-0005XR-3B for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:23 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-73c17c770a7so484574b3a.2 for ; Wed, 23 Apr 2025 18:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456419; x=1746061219; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JULegdjF4TEWKbMa1RsDi++XULImatCldLbzXwzcxYs=; b=QQPLpXCpB2A7iMYQZVAEu2+OcPb4gHQOUcmotjHEWpXRn4FIyzEvGObTwnfl2L7l9d ltbpanYqBNvIxXXS1R60NcC/eUItFAYzvGJVn6GRU19LuyUmjcOkTsKxu4bN5Wgj0FP1 ksxdKPWTfZtbuXiptBNY635YwmR2JQAlWYJ/YiCxocSfe4h9NP9yZnzBmOsq2YnJhopH ux2YOMViHimZCfNeBeGjMhX1PIdOoVfgFQ63rFrG/C4KIrmGfQPzdRFXkND0iDOIphsD OExQ6kpyWI1iBvlxqNGMdtj/GwYCAsqdxrbA1m3u0IuwS4zYfiV4ay39Xh2p8a99weBV v7VQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456419; x=1746061219; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JULegdjF4TEWKbMa1RsDi++XULImatCldLbzXwzcxYs=; b=iQ+JXI3WszFLAqyp2uYco3ms9RGw4OtvFKys4icx5e5SmBkffyPRdraxiGDq6xar+O EW8qQtvY0M7mMkUnrEVgZ9Kb963s1J2U5ji6AW2BQ+svJi8cTgTGmKPXT+0Pj15jGxr3 UkT3f1lEW2QpZWnjkHLHqwuOzvE0NHG+sKOvsXQehfy2TUc26DLxpL/MJeeLFeHRDWXz +41R57bglPtAAoKvjGpe0bpZSdgWaJPgtZALsWO9XAMQwwIHh+7+7x/0fWQZLwXMqtII I7VwnnWWQGDofLWBsB4J4Ft/Kline7cC/pOqVnjCg1VGT/iAWPEjhbsfbujgzw77Kix1 iElg== X-Gm-Message-State: AOJu0YyqyEdhcM39jSQ25BrrjRfVCmquAi30eWU+zLfj8HjONYqrSVf0 ZYvZOneIl+RsRWjjd9Rjl06eOMpcCqvJTLrKawZD0E92EzO+haNSzPfDgmhoT9EJLAQ5YznGRGi x X-Gm-Gg: ASbGncuPKkgj3n708oxgf3SAyxOHJ2/sSHn6hgaGsGqCJsywPWoURtZlNscmxxhmxIA hq5gyU159jSDqZsfbnO4ptWBvuhmFqK8lsU22waMSsr+ul9/NB3d0wYpqB6y5/0aGmk56ouChKA lPOPyRc4NSuRTgln9OpKl5+j5Z7c9qv6/tWDhMHYFG1OKIdnyZiSyThc4O9aYqqcCArfZD8lJsL 9ofiQTxn9018tPQMvTuQNxt3Or6VT3tUYc3fpZbhrL7FpbNxcLqyKsqZlVMOA96SqIwR6fu7i+p Qj12JUl7MreHiZKPXXvPdLasQARInnzmTecoS1QHYaMkgzbxHWMAOi4E9WW9MF7+ZHg3UfamMMr PePSESUXw9g== X-Received: by 2002:a05:6a20:6a1f:b0:1f3:2c55:8d8a with SMTP id adf61e73a8af0-20444ec8881mr825442637.12.1745456419040; Wed, 23 Apr 2025 18:00:19 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 141/148] tcg: Pass max_threads not max_cpus to tcg_init Date: Wed, 23 Apr 2025 17:49:26 -0700 Message-ID: <20250424004934.598783-142-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org In effect, hoist the check for mttcg from tcg_n_regions() to tcg_init_machine(). Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/tcg/startup.h | 6 +++--- tcg/tcg-internal.h | 2 +- accel/tcg/tcg-all.c | 14 ++++++++------ tcg/region.c | 27 ++++++++++++--------------- tcg/tcg.c | 14 +++++++------- 5 files changed, 31 insertions(+), 32 deletions(-) diff --git a/include/tcg/startup.h b/include/tcg/startup.h index f71305765c..95f574af2b 100644 --- a/include/tcg/startup.h +++ b/include/tcg/startup.h @@ -29,12 +29,12 @@ * tcg_init: Initialize the TCG runtime * @tb_size: translation buffer size * @splitwx: use separate rw and rx mappings - * @max_cpus: number of vcpus in system mode + * @max_threads: number of vcpu threads in system mode * * Allocate and initialize TCG resources, especially the JIT buffer. - * In user-only mode, @max_cpus is unused. + * In user-only mode, @max_threads is unused. */ -void tcg_init(size_t tb_size, int splitwx, unsigned max_cpus); +void tcg_init(size_t tb_size, int splitwx, unsigned max_threads); /** * tcg_register_thread: Register this thread with the TCG runtime diff --git a/tcg/tcg-internal.h b/tcg/tcg-internal.h index a648ee7a0e..ff85fb23fa 100644 --- a/tcg/tcg-internal.h +++ b/tcg/tcg-internal.h @@ -34,7 +34,7 @@ extern TCGContext **tcg_ctxs; extern unsigned int tcg_cur_ctxs; extern unsigned int tcg_max_ctxs; -void tcg_region_init(size_t tb_size, int splitwx, unsigned max_cpus); +void tcg_region_init(size_t tb_size, int splitwx, unsigned max_threads); bool tcg_region_alloc(TCGContext *s); void tcg_region_initial_alloc(TCGContext *s); void tcg_region_prologue_set(TCGContext *s); diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index a5a1fd6a11..3efc7350eb 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -103,18 +103,20 @@ bool one_insn_per_tb; static int tcg_init_machine(MachineState *ms) { TCGState *s = TCG_STATE(current_accel()); -#ifdef CONFIG_USER_ONLY - unsigned max_cpus = 1; -#else - unsigned max_cpus = ms->smp.max_cpus; -#endif + unsigned max_threads = 1; tcg_allowed = true; mttcg_enabled = s->mttcg_enabled; page_init(); tb_htable_init(); - tcg_init(s->tb_size * MiB, s->splitwx_enabled, max_cpus); + +#ifndef CONFIG_USER_ONLY + if (mttcg_enabled) { + max_threads = ms->smp.max_cpus; + } +#endif + tcg_init(s->tb_size * MiB, s->splitwx_enabled, max_threads); #if defined(CONFIG_SOFTMMU) /* diff --git a/tcg/region.c b/tcg/region.c index 478ec051c4..7ea0b37a84 100644 --- a/tcg/region.c +++ b/tcg/region.c @@ -422,7 +422,7 @@ void tcg_region_reset_all(void) tcg_region_tree_reset_all(); } -static size_t tcg_n_regions(size_t tb_size, unsigned max_cpus) +static size_t tcg_n_regions(size_t tb_size, unsigned max_threads) { #ifdef CONFIG_USER_ONLY return 1; @@ -431,24 +431,25 @@ static size_t tcg_n_regions(size_t tb_size, unsigned max_cpus) /* * It is likely that some vCPUs will translate more code than others, - * so we first try to set more regions than max_cpus, with those regions + * so we first try to set more regions than threads, with those regions * being of reasonable size. If that's not possible we make do by evenly * dividing the code_gen_buffer among the vCPUs. + * + * Use a single region if all we have is one vCPU thread. */ - /* Use a single region if all we have is one vCPU thread */ - if (max_cpus == 1 || !qemu_tcg_mttcg_enabled()) { + if (max_threads == 1) { return 1; } /* - * Try to have more regions than max_cpus, with each region being >= 2 MB. + * Try to have more regions than threads, with each region being >= 2 MB. * If we can't, then just allocate one region per vCPU thread. */ n_regions = tb_size / (2 * MiB); - if (n_regions <= max_cpus) { - return max_cpus; + if (n_regions <= max_threads) { + return max_threads; } - return MIN(n_regions, max_cpus * 8); + return MIN(n_regions, max_threads * 8); #endif } @@ -731,11 +732,7 @@ static int alloc_code_gen_buffer(size_t size, int splitwx, Error **errp) * and then assigning regions to TCG threads so that the threads can translate * code in parallel without synchronization. * - * In system-mode the number of TCG threads is bounded by max_cpus, so we use at - * least max_cpus regions in MTTCG. In !MTTCG we use a single region. - * Note that the TCG options from the command-line (i.e. -accel accel=tcg,[...]) - * must have been parsed before calling this function, since it calls - * qemu_tcg_mttcg_enabled(). + * In system-mode the number of TCG threads is bounded by max_threads, * * In user-mode we use a single region. Having multiple regions in user-mode * is not supported, because the number of vCPU threads (recall that each thread @@ -749,7 +746,7 @@ static int alloc_code_gen_buffer(size_t size, int splitwx, Error **errp) * in practice. Multi-threaded guests share most if not all of their translated * code, which makes parallel code generation less appealing than in system-mode */ -void tcg_region_init(size_t tb_size, int splitwx, unsigned max_cpus) +void tcg_region_init(size_t tb_size, int splitwx, unsigned max_threads) { const size_t page_size = qemu_real_host_page_size(); size_t region_size; @@ -787,7 +784,7 @@ void tcg_region_init(size_t tb_size, int splitwx, unsigned max_cpus) * As a result of this we might end up with a few extra pages at the end of * the buffer; we will assign those to the last region. */ - region.n = tcg_n_regions(tb_size, max_cpus); + region.n = tcg_n_regions(tb_size, max_threads); region_size = tb_size / region.n; region_size = QEMU_ALIGN_DOWN(region_size, page_size); diff --git a/tcg/tcg.c b/tcg/tcg.c index dfd48b8264..ec7f6743d7 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1499,7 +1499,7 @@ static void process_constraint_sets(void); static TCGTemp *tcg_global_reg_new_internal(TCGContext *s, TCGType type, TCGReg reg, const char *name); -static void tcg_context_init(unsigned max_cpus) +static void tcg_context_init(unsigned max_threads) { TCGContext *s = &tcg_init_ctx; int n, i; @@ -1538,15 +1538,15 @@ static void tcg_context_init(unsigned max_cpus) * In user-mode we simply share the init context among threads, since we * use a single region. See the documentation tcg_region_init() for the * reasoning behind this. - * In system-mode we will have at most max_cpus TCG threads. + * In system-mode we will have at most max_threads TCG threads. */ #ifdef CONFIG_USER_ONLY tcg_ctxs = &tcg_ctx; tcg_cur_ctxs = 1; tcg_max_ctxs = 1; #else - tcg_max_ctxs = max_cpus; - tcg_ctxs = g_new0(TCGContext *, max_cpus); + tcg_max_ctxs = max_threads; + tcg_ctxs = g_new0(TCGContext *, max_threads); #endif tcg_debug_assert(!tcg_regset_test_reg(s->reserved_regs, TCG_AREG0)); @@ -1554,10 +1554,10 @@ static void tcg_context_init(unsigned max_cpus) tcg_env = temp_tcgv_ptr(ts); } -void tcg_init(size_t tb_size, int splitwx, unsigned max_cpus) +void tcg_init(size_t tb_size, int splitwx, unsigned max_threads) { - tcg_context_init(max_cpus); - tcg_region_init(tb_size, splitwx, max_cpus); + tcg_context_init(max_threads); + tcg_region_init(tb_size, splitwx, max_threads); } /* From patchwork Thu Apr 24 00:49:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883876 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3207046wrs; Wed, 23 Apr 2025 18:20:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV/j0SmYs6JQriS39WTqugXtDifaXwXD+FcceMkGe+oIgr4AcPNCSDS6pYAttKuNeM+LhAQlw==@linaro.org X-Google-Smtp-Source: AGHT+IG+PGXciOg/sPYF4LV61F42HBjORKMr0tpM5bD/lOu8ffefvXD9RSS6NlLVmH7IR1izTZpD X-Received: by 2002:a05:6214:d64:b0:6f4:b8eb:4815 with SMTP id 6a1803df08f44-6f4bfa6b16amr17578796d6.0.1745457655971; Wed, 23 Apr 2025 18:20:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457655; cv=none; d=google.com; s=arc-20240605; b=GdwSYIM59zNjtAczIW37bMxaJoMuORhHxX0jVw+7Nah490Gd4ZjeJoDXx8cWDveCbA ycvdPZTUxKRzWJTd74HxL45xjqFTaeN7ilawMFRliL/AWO7vJDtYfQBH5SOU4pk/7wKz 1ZsBMXavjNh8g94Sbu1xaIY2ur2CIp+PRrI/lVX9wOq3T7AhPiWAK6UJwCdhN+XLOwKu kFRIlWLh0CL2NMklhIcHEnx4ePLCwUeOM5FDkQEN57K/o5EyJEYaNnC4l3aFv2obeNIE X0wztcWfWia9pXi4BFNwmUvQSjDy2MwnDskXiCGiHx8lVZqIPjqcqp30nzQXj/sVUvVh dCGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Lgi2ZSVQ13wT2MCsVR2Sol/xGooWiIWNyPhzHZZ9Q0k=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=X8QZlzFrLfLDLQBjgnH3H5irBznAT3YmH4cRig0oBSaylp8l9bH7QB9kCDEifv8cFx Brl38Xdo97kv9zARU9jdPyrs/9m1dEQZHCRNlFgx8U7s9CiHGQRPw3C+K2gU2wEsyXCn fR3asSotof9LOdWnEuWeZDjJNHRbyxtvgNw3eoSz+vY+JoNo+6WV4Hv97JUUGAPEpwLm OznfnHyYt6qndbq6bHreMTngocMGSWnpEO7o+cjQ8XY0rKm7e+xA/2bYQNlITjvPZexp v/EGdAzXylyxnqKI2MldVyJXjL1BNjOYCDPnd1um+zN2HqkSbAgG2755LP/lFhnRnGcc SqlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GbpJShh0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0b21188si3980326d6.485.2025.04.23.18.20.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:20:55 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GbpJShh0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kyY-0008H5-Fp; Wed, 23 Apr 2025 21:02: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 1u7kwy-0005RJ-0M for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:24 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwv-0005Xc-Hn for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:23 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-225477548e1so5257455ad.0 for ; Wed, 23 Apr 2025 18:00:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456420; x=1746061220; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Lgi2ZSVQ13wT2MCsVR2Sol/xGooWiIWNyPhzHZZ9Q0k=; b=GbpJShh0m2EcKxP93T2QMBBw0ykBmXncUd3Kg7bRHYkUWA79yowu6rGVyDc0+hSG+8 BRg5nD1wZW+LO55JMQ6u6lBNlI8fMzvmwZeK7Pw7mzfNPu31yZrsi78Sl4NNqGpzs0yM wxkGQ8OsTRX7165a8Zr9Xm90QsmIMQ1PpdujCRf65Y8IlHD9xWafCguFrRZ5MOlGsZke wBRlT05x4KOryn4UZb1JSKkqrc1LEP5i3WRQGruxLkU8mSURa2tegujbnHoDFPun05Zk u7N7F+9FMiKP0mkJ/PVO2cBBGdnlc2Li7ar4dF6ldsOj487yCf1IeRdDhZQoJeA//9SA dvDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456420; x=1746061220; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Lgi2ZSVQ13wT2MCsVR2Sol/xGooWiIWNyPhzHZZ9Q0k=; b=Xdzd36it2mFWqSW3NMJIy7JA+WoDNUpaoaIGzFNBV2LSEJgmcoSWpsB1EUqgTWixTC i1uYQLfKagzcOqPZqww97VCMrPe3A6lPYuRq6Pc1e/ryeS1UZHHmW8uKgxzhslBpgjId vwyrf+p60dPGqzPgyRW1+x6G+oMHdHyhpy8u3RQutVJwRrNK1tWNpWk8wez6FNh34qXW Juo9U11XynZK3UYHaVbx2HAs/TbTsrbOLFE77CPmOX5bwwehcPyxMoOLmQTOeYfBe0yL FiCu+iFcshMS4zcaNwqFHNf6yVJ/0Mkgao1GGg1MZjOMowffeZ+FVgWNPJIqmrLeeeJO DCaw== X-Gm-Message-State: AOJu0YxZcawVCsS7Ezl9fNMGckVQKtZijVUPza2FsQHLF6r0PuuDUIly fMAMz82Y5tU9A5JjfOu9sxIvsdMyqqlcGkdpmMacENovgzzyCDRGQA9n8OM1hQamJPFjcvyfc7r j X-Gm-Gg: ASbGnct2J7hNX4xALuiYSOOujInH7sZmCbO4HuJfwREzMn2F1W8HQFwW2qNvCnAo/jK +6p1Bh83/7uufKTZaqoMK/PsAF+SFSKC1ISR118jrHbilq5pNB7S6EBvTRkOLUphObO9pw7CM58 0PXzyiaO1rikt3eGyOCO8VyvQRspW3eaWF+CRJSqmaSSTuf3/cB9tUrXpaodBzrwl2gHPuef/WG qLaPuR5NjezsHSzhqzW/0b4IbC+fhHinjg2kjrkJAMLquX6XtybcxjfhzXheSuHvWHHPMRNvg2E xJPHvr0cjYK6robM5J2XwdaOIwO0vdlAZKh/7FEP32AW5UkYxYYHiZDay1aKKJdnSqTEKmkCfWg = X-Received: by 2002:a17:903:230a:b0:21f:4649:fd49 with SMTP id d9443c01a7336-22db3db67dcmr7906825ad.49.1745456419748; Wed, 23 Apr 2025 18:00:19 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 142/148] tcg: Move qemu_tcg_mttcg_enabled() to 'system/tcg.h' Date: Wed, 23 Apr 2025 17:49:27 -0700 Message-ID: <20250424004934.598783-143-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé qemu_tcg_mttcg_enabled() is specific to 1/ TCG and 2/ system emulation. Move the prototype declaration to "system/tcg.h", reducing 'mttcg_enabled' variable scope. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-ID: <20250403220420.78937-17-philmd@linaro.org> Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 9 --------- include/system/tcg.h | 8 ++++++++ accel/tcg/tcg-all.c | 17 ++++++++++++++--- target/riscv/tcg/tcg-cpu.c | 1 + 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 10b6b25b34..c8d6abff19 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -594,15 +594,6 @@ extern CPUTailQ cpus_queue; extern __thread CPUState *current_cpu; -/** - * qemu_tcg_mttcg_enabled: - * Check whether we are running MultiThread TCG or not. - * - * Returns: %true if we are in MTTCG mode %false otherwise. - */ -extern bool mttcg_enabled; -#define qemu_tcg_mttcg_enabled() (mttcg_enabled) - /** * cpu_paging_enabled: * @cpu: The CPU whose state is to be inspected. diff --git a/include/system/tcg.h b/include/system/tcg.h index 73229648c6..7622dcea30 100644 --- a/include/system/tcg.h +++ b/include/system/tcg.h @@ -17,4 +17,12 @@ extern bool tcg_allowed; #define tcg_enabled() 0 #endif +/** + * qemu_tcg_mttcg_enabled: + * Check whether we are running MultiThread TCG or not. + * + * Returns: %true if we are in MTTCG mode %false otherwise. + */ +bool qemu_tcg_mttcg_enabled(void); + #endif diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 3efc7350eb..bb759cec07 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -38,6 +38,7 @@ #include "hw/qdev-core.h" #else #include "hw/boards.h" +#include "system/tcg.h" #endif #include "internal-common.h" #include "cpu-param.h" @@ -58,6 +59,17 @@ typedef struct TCGState TCGState; DECLARE_INSTANCE_CHECKER(TCGState, TCG_STATE, TYPE_TCG_ACCEL) +#ifndef CONFIG_USER_ONLY + +static bool mttcg_enabled; + +bool qemu_tcg_mttcg_enabled(void) +{ + return mttcg_enabled; +} + +#endif /* !CONFIG_USER_ONLY */ + /* * We default to false if we know other options have been enabled * which are currently incompatible with MTTCG. Otherwise when each @@ -97,7 +109,6 @@ static void tcg_accel_instance_init(Object *obj) #endif } -bool mttcg_enabled; bool one_insn_per_tb; static int tcg_init_machine(MachineState *ms) @@ -106,14 +117,14 @@ static int tcg_init_machine(MachineState *ms) unsigned max_threads = 1; tcg_allowed = true; - mttcg_enabled = s->mttcg_enabled; page_init(); tb_htable_init(); #ifndef CONFIG_USER_ONLY - if (mttcg_enabled) { + if (s->mttcg_enabled) { max_threads = ms->smp.max_cpus; + mttcg_enabled = true; } #endif tcg_init(s->tb_size * MiB, s->splitwx_enabled, max_threads); diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 50e81b2e52..88f7cdb887 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -36,6 +36,7 @@ #include "tcg/tcg.h" #ifndef CONFIG_USER_ONLY #include "hw/boards.h" +#include "system/tcg.h" #endif /* Hash that stores user set extensions */ From patchwork Thu Apr 24 00:49:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883841 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202732wrs; Wed, 23 Apr 2025 18:06:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWjK79maYwraulUOQONMWgWAtp3uRPmgjWm6cShS3Aduf75t8FgutV9KI5FnmSbbHbO7QxdTg==@linaro.org X-Google-Smtp-Source: AGHT+IEXP9Z8Dpwks/vf/79b6ls+BHiL6C6gQEAAPw/w9KxIW5gSOglHELjtM+Q1IGjiMMQ/mH6z X-Received: by 2002:a05:6214:c48:b0:6ed:1da2:afac with SMTP id 6a1803df08f44-6f4bfc6daf1mr17605356d6.32.1745456797504; Wed, 23 Apr 2025 18:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456797; cv=none; d=google.com; s=arc-20240605; b=UcZ+mPWnkBfo+WaM5jH9W9iMiMmKmmxbx7IkIr6L2ocQRInRrtiRB/9G527LHRLW6S tS0qfVqjt9kYjYUCVHdVM1ocfd54X8yfobssJ8X2HtzDqd91xyuZIltv0WgkyHCrSpyV hEi3MPcYmZOvpoV3JNdBP/AEvkmQrQAeT6cw/5h0NOdk0nV3N4C0MH59jmioLJogW/mA MjwlTq9JH0DGtFUFXw2MOeW26PbEYGuz+JGvA/9mXLsT3AvLl/ZtJPoSVYbKWfobYGZU tQ93bOPSX1Ja6meulF2vsjU0wF6VW+nGJ4q5zjtgww5X47ZGIZi/EDxds90kAhQ+R6SO HH+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tGFd37j+l93zOqMm5a5N6sYRNEZpuNLxVMZbuAwdikI=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=EYsWCfgOoevC+s+AEoVM2VUNmfW+aA1QaT8JNZPdCAop7O02dS2bx/Pp0wp5OzUTIu sYkOA8Ty8EEAQ0gZ1OWMdeHZawR7T2+QC9rlp79/bvTh9e5GlJMnl8mauz7iYqJN9QeW esPeWWL/7z+gJzFYP1otUJUBAj61CBD74VfQmSvLKr/X1z/qKDpqLv3zVnjt7O2cKZ6P 5MrXuyVkP/0e6O0+7/xnqyBh06hf0FWwP0kwCDu2UbcV5pISKANPHPwuxdSeBNOnGi2i jdcO88GPjN9ppvgNabUmcMXl2WCLRNnE6DiM7PkM/LDSf3RmVs1q0ORySt36SUIlMEvf u61w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PcKtJh0v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0acc9f2si3619596d6.185.2025.04.23.18.06.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:06:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PcKtJh0v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7l0R-00030Q-NM; Wed, 23 Apr 2025 21:03: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 1u7kwy-0005TU-Kv for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:25 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kww-0005Xp-0v for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:24 -0400 Received: by mail-pg1-x52c.google.com with SMTP id 41be03b00d2f7-b074d908e56so263356a12.2 for ; Wed, 23 Apr 2025 18:00:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456420; x=1746061220; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tGFd37j+l93zOqMm5a5N6sYRNEZpuNLxVMZbuAwdikI=; b=PcKtJh0v6w2/7s1PehhXD46HTHmxjVXUuevsQqjrGZlAZIY6IF0ZT/SCsv48kNFd/k socX4MyM2xQuuTTQHyeZZzsGtnAnjLZ8GJNCysOrTV1IQ6Sk05NhRqjmh3ArbzI04CIQ jVeQ+G7dxsyJH/vyi/vprVSHZT1E7BuBIMz9btlGUXGDU4S3MAumpFpsCynK4L/nGM5Y Cd5ZycJ+3oDIYSVf6KpoRiEsG5iAuGAV6E18apFEVU04aPCtNE8znQUcpQQpyk+nGjL+ eiWooGpp7MfMJcR6xqvvRwwuRhv5eaSs9N9aSsqhVbLEUUGHWYQDvhZ3TaFii2KnHFR5 vVNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456420; x=1746061220; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tGFd37j+l93zOqMm5a5N6sYRNEZpuNLxVMZbuAwdikI=; b=Pc8dI1wPn86SILYFGZ2zvucytTKGyUQPOH4jTnVWFC+L90fe5uBk1buHi9guArMTSe ObJRqMydoTGrStluA6f6IkvoR9OWgigMI6H729kzxiLJh9ttjvLV6+1+uCgO7r2/LFeA zjTm6N2NRlEDT4TouxhSIAOjRmQj5ambyTxwJxblrVNtEy3/YEOz81D7NhFEEDWa0amD H1uF7i9o+FxdKSiJGdm1JwcQBnFkMxOSc+kbnjjHSMwW9uqkrfVQS+HlWnO+W7u68tGM 51zDhHCVwdW36ChWoruRLdZsp2fQ6nqkKQ7h1iIAcDiWA60GcFvgje4mjgYUVbgllitb xQzg== X-Gm-Message-State: AOJu0Yy1r4U0afM2/zswNCXclXUzuzCClREDIS0h6EsmSX+9cjKn+vvy K2UUPzlyrcJfk74V39EWsCMhoO1RTbNU8aKr4u1C64TlhCHC1exrwzx9ipTlWL/LFJjcGedBMpf h X-Gm-Gg: ASbGnctUvaWYo+hKXdEuyQpHiNAO+B3ahAui+NdCDWIsHJYkIenoycZ6hMOtW7sjkOA 3Av1eizxt6c847FYocySdMWOdwJyhpT/Xy/+Gw/iL8o8MInVf2QdrotSQIFJDH0e6BSx+2IahKC O/hMZmfC0mIipVMRZ1rDiyNDloAEFonLVyhD7fm3XWP14SHPzKbym6LpDSktU4f9tcstHPnd5El a+Mw6vaIwfp3NQAHx2fdhRucixfysHWTWJl7vs974m8qVzjhumI5sT07E0kRGyazrU/vC9BXMc6 1D3bFXbl60NWKFx6waUXlxZzPz6h/JYUW18iq1fL7TWGmJugW6BukzCjuphcO7Temk3PeuVliN8 = X-Received: by 2002:a05:6a21:3386:b0:1f5:92ac:d6a1 with SMTP id adf61e73a8af0-20444e81bf1mr805281637.4.1745456420448; Wed, 23 Apr 2025 18:00:20 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 143/148] accel/tcg: Remove mttcg_enabled Date: Wed, 23 Apr 2025 17:49:28 -0700 Message-ID: <20250424004934.598783-144-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52c.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org In qemu_tcg_mttcg_enabled, read the value from TCGState and eliminate the separate global variable. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tcg-all.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index bb759cec07..b754f92905 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -60,14 +60,11 @@ DECLARE_INSTANCE_CHECKER(TCGState, TCG_STATE, TYPE_TCG_ACCEL) #ifndef CONFIG_USER_ONLY - -static bool mttcg_enabled; - bool qemu_tcg_mttcg_enabled(void) { - return mttcg_enabled; + TCGState *s = TCG_STATE(current_accel()); + return s->mttcg_enabled; } - #endif /* !CONFIG_USER_ONLY */ /* @@ -124,7 +121,6 @@ static int tcg_init_machine(MachineState *ms) #ifndef CONFIG_USER_ONLY if (s->mttcg_enabled) { max_threads = ms->smp.max_cpus; - mttcg_enabled = true; } #endif tcg_init(s->tb_size * MiB, s->splitwx_enabled, max_threads); From patchwork Thu Apr 24 00:49:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883834 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202140wrs; Wed, 23 Apr 2025 18:04:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXzsM/eCe2S2KAO6jMNc0wNNbPI1bmqlBmTZxFJszT4Ug815EtpCDn9jngOjd4awQJZuFjvBg==@linaro.org X-Google-Smtp-Source: AGHT+IHllP8yy2cZ1sSekEsKD/bhgMVlV7iur05jUh5a68E3CpSjX8XCC6iWfjiHmVx0Te++J7kQ X-Received: by 2002:a05:6214:d49:b0:6f2:b7d4:afb9 with SMTP id 6a1803df08f44-6f4bfbab36dmr15169726d6.2.1745456689871; Wed, 23 Apr 2025 18:04:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456689; cv=none; d=google.com; s=arc-20240605; b=lBEZz8B04V2WxAwoa8IFye9/juK7iEGPSAwGEuZeHhIGCD63jJTGUFCvtoSysh0P9q SRMq1YUKkN1DMm7xMyjckDFEuuLMShuLz6sRdJAz7nUj0JTKqVDoJqUyI2VbfXFEPWf9 XQwos05Z9cdSGOO4ZPl1whqQoI49VKM2jZXznZTgRuWHbl3vZhJVFteyK29FgrP5RqI1 EXj3xMgF+1RZRM05VRj7DW6l0xIlq8lrfw6sOteB9SD8T9VTZEQehZfy3KN53irZUJlG K95vnNXSdkgfzSWYmyAG16gJwbkuUEHpF9jZvo7Et/eXTOxBwy3kHcEiSZL0CaNB5V6N wtgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mQbPDTOsf1VGzqz8fPGND6jRUNUvO1vNZUX54zef5RU=; fh=HGG5jZNhe8Q+zQJ9+mddel2c/xsqW3vEoqbd78QYiOw=; b=PJYnNXLg7LEcoX/yDDNLuzkv8Mgc7Iokfz4cEZJSpO0khuQkT67Z8ZZj9EFNft6Zda PWskFmaFv1nCWnoXEHSR71EZTlnTMFGDW+mpu0dywEpNNYi/dpWZ1449yI3Ql3prpvL7 LEn5+gNiMQ/pclLx0NOzai50HGkUt90g5VWgspRRbgUdP9qldEkcpp3qCezG5ae5GFQ2 CNrIDeJzIvbOxWXPerJS4oVY+CxoDwS3rVhElO7C32KDeOjSzFeblkPJ8dTXOIUUNqkV HX6e+OMXVNtiYTr6oERJzddwhzUAYcwTiszRn2PXQbhhfy8MqB1z2dSTVgpzVnNDBC1u hf9w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=duTURFy9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c0b0c340si3494156d6.436.2025.04.23.18.04.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=duTURFy9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kz9-0000Cv-6w; Wed, 23 Apr 2025 21:02:40 -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 1u7kwz-0005X4-CP for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:25 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0: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 1u7kww-0005Y0-JS for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:24 -0400 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-736c1138ae5so368648b3a.3 for ; Wed, 23 Apr 2025 18:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456421; x=1746061221; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mQbPDTOsf1VGzqz8fPGND6jRUNUvO1vNZUX54zef5RU=; b=duTURFy9CFWrGJPtMOMa5nD9lxtu9Ts9XEY7Y4TnfIjYtMgFJ6bO59zT6VQkKh+DiA T2LYF3n5m+mJNeL1k8/z0jf9sZX0THkjkpMGBSE+d0fObmhyb1maMEjec2DS+O44f5Sq vMhZGpvC1qTN4cTNAKRzLNdeMxJaLlndpCn0iz3mTFvwdDNdGjKechfQa5DtsmA5ZsOE p18f5KV9GKB/WE40vrLfE+FhSBtHnXxwlUxW9m6VPNeXQn5S+qbtt0rO+GHka1MBJvXH garjCCz9O4KxrO7CamwrjMpGQ3bBjOl5NL3hVsROf3B71xoX9jp99OvtFf5NLMMtayxc iYzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456421; x=1746061221; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mQbPDTOsf1VGzqz8fPGND6jRUNUvO1vNZUX54zef5RU=; b=nmpm/wVe8cBzYNHOoC4a8ObwvKbrTqm1MNbOUAHOe77aNvSxgSAazjoLwx8CYn4gZb wP34SNN1vteI9VqXn7zZxa1ORipcNK0PdQU+jXph0WPSilZm5b5OQ+24z8qbNvumTxPd QOmQogMxRCiMFTc0DWbhHPbPATMM3zrLpIO8iN8NcZTL0y2ne7SjBqTs3eVJbRswiiLn TKSTQhShRNdBXQRzzJqjRrKu/tZIDWpu2HTbwNsKpVGqNMxZc0ipeVgJrpci5qmThObn ucOx6SvDqXlFCRvYwHS4F3kAZSsPH0CxFriLDPrP9HlaHFooBmis8yaOntl3izDgkG/r orzw== X-Gm-Message-State: AOJu0YyBE7Yeaw5VjoOE7yP0NhbffSC2cbpnAxtVZHAesOn4iuja8qUP IHsp9N5XYv1j1/utG23NHnMAP0kWs/hB/bw7kOg1qDqE3SsKTob9zfqQzRL+/PUzRVLiM/0xA72 Y X-Gm-Gg: ASbGnctvdT5yLT9/N4mMXo7MuTD5O7NmyamPjD70yPG7rKyGYn97Y0XCdae2ZUFGMc2 MfY79zACwe4hDMye8EPtbYG7ktCdtvMkAyrcQWDhEs0KGJ+WywXyKQx9llhJvYzYyesO7e4PUFU nUSDg2oARAMhMXzXAdex/Zrbymsb4Bkq/nUs/mW7PskgWJlx6EWz+28QTVptS/C9CaXORXTpCMh KzoYst2xYBSnmGH5yW6F6DIBgPbGar0yqP3ZrlHkjGsHvDfFptCxTi6j2CoiECLWYiyBh/06crO 8vb/bJKkB+nieVRtavmI2kKXkDtCDAQi7tCHVQ6WfFsVIzUJ4Q5URRx/Q2X2SyZoHULM88nyzZM = X-Received: by 2002:a05:6a00:9287:b0:736:546c:eb69 with SMTP id d2e1a72fcca58-73e245e3df6mr949176b3a.9.1745456421102; Wed, 23 Apr 2025 18:00:21 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Anton Johansson Subject: [PULL 144/148] tcg: Convert TCGState::mttcg_enabled to TriState Date: Wed, 23 Apr 2025 17:49:29 -0700 Message-ID: <20250424004934.598783-145-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Use the OnOffAuto type as 3-state. Since the TCGState instance is zero-initialized, the mttcg_enabled is initialzed as AUTO (ON_OFF_AUTO_AUTO). In tcg_init_machine(), if mttcg_enabled is still AUTO, set a default value (effectively inlining the default_mttcg_enabled() method content). In the tcg_get_thread() getter, consider AUTO / OFF states as "single", otherwise ON is "multi". Reviewed-by: Anton Johansson Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/tcg-all.c | 74 ++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index b754f92905..fa77a4c5a2 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -32,6 +32,7 @@ #include "qemu/error-report.h" #include "qemu/accel.h" #include "qemu/atomic.h" +#include "qapi/qapi-types-common.h" #include "qapi/qapi-builtin-visit.h" #include "qemu/units.h" #if defined(CONFIG_USER_ONLY) @@ -47,7 +48,7 @@ struct TCGState { AccelState parent_obj; - bool mttcg_enabled; + OnOffAuto mttcg_enabled; bool one_insn_per_tb; int splitwx_enabled; unsigned long tb_size; @@ -63,41 +64,14 @@ DECLARE_INSTANCE_CHECKER(TCGState, TCG_STATE, bool qemu_tcg_mttcg_enabled(void) { TCGState *s = TCG_STATE(current_accel()); - return s->mttcg_enabled; + return s->mttcg_enabled == ON_OFF_AUTO_ON; } #endif /* !CONFIG_USER_ONLY */ -/* - * We default to false if we know other options have been enabled - * which are currently incompatible with MTTCG. Otherwise when each - * guest (target) has been updated to support: - * - atomic instructions - * - memory ordering primitives (barriers) - * they can set the appropriate CONFIG flags in ${target}-softmmu.mak - * - * Once a guest architecture has been converted to the new primitives - * there is one remaining limitation to check: - * - The guest can't be oversized (e.g. 64 bit guest on 32 bit host) - */ - -static bool default_mttcg_enabled(void) -{ - if (icount_enabled()) { - return false; - } -#ifdef TARGET_SUPPORTS_MTTCG - return true; -#else - return false; -#endif -} - static void tcg_accel_instance_init(Object *obj) { TCGState *s = TCG_STATE(obj); - s->mttcg_enabled = default_mttcg_enabled(); - /* If debugging enabled, default "auto on", otherwise off. */ #if defined(CONFIG_DEBUG_TCG) && !defined(CONFIG_USER_ONLY) s->splitwx_enabled = -1; @@ -113,16 +87,40 @@ static int tcg_init_machine(MachineState *ms) TCGState *s = TCG_STATE(current_accel()); unsigned max_threads = 1; +#ifndef CONFIG_USER_ONLY +# ifdef TARGET_SUPPORTS_MTTCG + bool mttcg_supported = true; +# else + bool mttcg_supported = false; +# endif + if (s->mttcg_enabled == ON_OFF_AUTO_AUTO) { + /* + * We default to false if we know other options have been enabled + * which are currently incompatible with MTTCG. Otherwise when each + * guest (target) has been updated to support: + * - atomic instructions + * - memory ordering primitives (barriers) + * they can set the appropriate CONFIG flags in ${target}-softmmu.mak + * + * Once a guest architecture has been converted to the new primitives + * there is one remaining limitation to check: + * - The guest can't be oversized (e.g. 64 bit guest on 32 bit host) + */ + if (mttcg_supported && !icount_enabled()) { + s->mttcg_enabled = ON_OFF_AUTO_ON; + } else { + s->mttcg_enabled = ON_OFF_AUTO_OFF; + } + } + if (s->mttcg_enabled == ON_OFF_AUTO_ON) { + max_threads = ms->smp.max_cpus; + } +#endif + tcg_allowed = true; page_init(); tb_htable_init(); - -#ifndef CONFIG_USER_ONLY - if (s->mttcg_enabled) { - max_threads = ms->smp.max_cpus; - } -#endif tcg_init(s->tb_size * MiB, s->splitwx_enabled, max_threads); #if defined(CONFIG_SOFTMMU) @@ -144,7 +142,7 @@ static char *tcg_get_thread(Object *obj, Error **errp) { TCGState *s = TCG_STATE(obj); - return g_strdup(s->mttcg_enabled ? "multi" : "single"); + return g_strdup(s->mttcg_enabled == ON_OFF_AUTO_ON ? "multi" : "single"); } static void tcg_set_thread(Object *obj, const char *value, Error **errp) @@ -159,10 +157,10 @@ static void tcg_set_thread(Object *obj, const char *value, Error **errp) warn_report("Guest not yet converted to MTTCG - " "you may get unexpected results"); #endif - s->mttcg_enabled = true; + s->mttcg_enabled = ON_OFF_AUTO_ON; } } else if (strcmp(value, "single") == 0) { - s->mttcg_enabled = false; + s->mttcg_enabled = ON_OFF_AUTO_OFF; } else { error_setg(errp, "Invalid 'thread' setting %s", value); } From patchwork Thu Apr 24 00:49:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883860 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3205694wrs; Wed, 23 Apr 2025 18:15:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVOlaYeBxPrpWYgn8KIIN9R/dazBwqcIpbMOTcZgNFMOIzA6ZhBcRyCsp+HTF+oYa2iLVsT3A==@linaro.org X-Google-Smtp-Source: AGHT+IEiZnsDE43LH1kHmrdrckqOIWJ/B/Nj9dlY1LsqUQLvtWnMrpPyYp2P7FOwrdSUi+HwKpmC X-Received: by 2002:a05:622a:1819:b0:47a:e775:da52 with SMTP id d75a77b69052e-47eb4ba6dccmr11415621cf.38.1745457357251; Wed, 23 Apr 2025 18:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457357; cv=none; d=google.com; s=arc-20240605; b=QeiB9QxoLeDOiGIykWrpPYBaLsX7FtZWte3m2NpdMTrj2ZUGLYiM0JTnSVcRGHKqIA hHzYFAWmqT7kRurFKX7xnMi63Ol/X/d5kgLCJ5QdEtWTJ3bss/tLj+JQ+Gh3g+AmRee5 +a73dU/ncsB5AZAw4r2Yr4CT6Xdiy2Czlcwmu8DkHwENCeuxXfDDI+Nvb1Sjosd2JiGS nD0oDVWrHZ6XpopHIdzc8z3zD9eZIfoNrKVOGwSWQqONU/d3d0YKIYh1lMfBS5opfag/ C8S0GmuXowin2TeEOC8XFJpks4+fDzTtWrW2cwVvxUi/vuYJTR1xq09mzP6SVq6KWaby 1+oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JLzC9VkDx4HsryHBPy+FJ9fpV0dAAKB9NnelMQm4FiI=; fh=i/pWNGcx7KiR3ewgypxpPkuORYlkCnVXLqKVm9/UgNc=; b=JWrT56gORYtC5HjfSaAv4i+VMD/dXOf4YtVP7N+Kr8h8xZg3tm1YLNkQyDrJqV3rlA HtjKGvizL8c1opxPekPu4aRExUDBxxdakBJMKlBpKaRo5IDqbsutF/2ouPjMCuU6mtrF Y4Sgtf7kigxC4Gdmc3pY6M/Nkm1goIQ4slNHQaV2r6wpVVLrjRu47Ww2DyJ8FgXhYJjL fYCvTbsldlQJibSSmiPx+dtTdkwhLmU+xhUhMOP/E4Kq7JWEb5Zw+JNVztsQr/LNTH8t Y/IbmWNl/oMKUKYUggd7PnFkAedn1WnQYyU0icGVCz/77FvewyZ778LzWw8P+yOlnmjL o5/A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ti5An7wU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea198730dsi5568071cf.332.2025.04.23.18.15.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:15:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ti5An7wU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7l0g-0004F9-D9; Wed, 23 Apr 2025 21:04:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u7kwz-0005X6-LO for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:25 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0: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 1u7kwx-0005YF-G3 for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:25 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-7390d21bb1cso356572b3a.2 for ; Wed, 23 Apr 2025 18:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456422; x=1746061222; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JLzC9VkDx4HsryHBPy+FJ9fpV0dAAKB9NnelMQm4FiI=; b=Ti5An7wUPB3a2pM0Tktf9y++Ojv6bj9Ox1SjmIww+1CRFt2qPMJIzrchWS8jd5gQTu dmbS4ItHjB55EzLfVH1e+HD09kGPqZI7B9SXZpKPVi061d75tkvAWIxYfsraF6D9FrNg whIZtUMqHa3yuLpHEf019YY8c0FOoSmttaxp18Qllj2DqifIgs4GKbD0YrbN05jf6jLY ZSPYLGcM7hz867MluL6sNeijLl5l+1eYPpQshPLj6DqChVpRksuLrzZt+f0O0pH7izav NwtDLSSkL/NInx27DF1mCJjEfIH/nPnklnAgO8Wf2TnB2B9aeJAQ3XO2wopr1n8wKOO2 ce9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456422; x=1746061222; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JLzC9VkDx4HsryHBPy+FJ9fpV0dAAKB9NnelMQm4FiI=; b=wSamPIiJvjEZKavXtf8uBsgadIFveo1ZsevuGROSamk1aS9Dx5IZRkT63hb6pYXic/ cVwOJMnzjuDCOgS0Ms6COel7pnOkWQ7J1k6r/ri7B80y9gwWqy5axVTuk228WVnD0FUJ KL2YENQdTZoXEl7Ih2j+H4xTU/p7P3sXHanilGLvGFZqQOCooyEXX/Yuvq8ooDenB3Tv 6Grq5zc4NJLq+C+zxGFmn7glqdo5QCydo7qRDrNyrxHP4nTr8sRYpREhFuZ+ihcUj0B6 TL4yJSzYowE83rMCWm4WPUkPXQ/REF0GOm8V3VTXB2IGpR1PwgNAsdxGC0MPgWgnG+VE SD4A== X-Gm-Message-State: AOJu0Yz/WiBUOjyaihX/gGF1VD6macdTG0IIJZBcPkG9ZTwJU3Ljy80n AGS1DbUxU05SabHaxx9YgxIAAdAKW7HlTmrGqHd5T3EI8MZBs9P2GvoAWK8o/NDhSo5Fv+IwdjV R X-Gm-Gg: ASbGnctRvtIOnWJzaUh2sRvyvu3E+7XwaI4XqXINiH+jj4UcSCc7KHBpvF9RCojp1F1 3lDLTJFAMPvykpobGsVTlYYhjhnA0TbJF5yPvPgED1REyGegl2n720sgJ/kQTv0uc9UH0SFR5lQ c6H2H/d45JTI+rKKxiBGSgWl2+UVw7CWkX0aBhhEXSiVxv0wV2/OwVR6Un5uL0viRuUK6YthLNb fxdANy+TltCrgGmno+Qd30bilpESJeZGplupd6k8/q+kZ/bSUcsaKgYu40HbDN8mZ7UrYO5v6KI jGC64J43ibvrn5yHp0M2ZPnS6VneJBKPeDqymL9Sf2jjL8MDYrhGKs9zOX/MwUdbVFxmeSH5MVg = X-Received: by 2002:a05:6a21:118e:b0:1ee:e2ac:5159 with SMTP id adf61e73a8af0-20444ebde5bmr873604637.19.1745456422011; Wed, 23 Apr 2025 18:00:22 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PULL 145/148] accel/tcg: Move mttcg warning to tcg_init_machine Date: Wed, 23 Apr 2025 17:49:30 -0700 Message-ID: <20250424004934.598783-146-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Delay the warning to tcg_init_machine, because we will have resolved the CPUClass at that point. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/tcg-all.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index fa77a4c5a2..ecdd48847c 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -93,7 +93,8 @@ static int tcg_init_machine(MachineState *ms) # else bool mttcg_supported = false; # endif - if (s->mttcg_enabled == ON_OFF_AUTO_AUTO) { + switch (s->mttcg_enabled) { + case ON_OFF_AUTO_AUTO: /* * We default to false if we know other options have been enabled * which are currently incompatible with MTTCG. Otherwise when each @@ -108,12 +109,22 @@ static int tcg_init_machine(MachineState *ms) */ if (mttcg_supported && !icount_enabled()) { s->mttcg_enabled = ON_OFF_AUTO_ON; + max_threads = ms->smp.max_cpus; } else { s->mttcg_enabled = ON_OFF_AUTO_OFF; } - } - if (s->mttcg_enabled == ON_OFF_AUTO_ON) { + break; + case ON_OFF_AUTO_ON: + if (!mttcg_supported) { + warn_report("Guest not yet converted to MTTCG - " + "you may get unexpected results"); + } max_threads = ms->smp.max_cpus; + break; + case ON_OFF_AUTO_OFF: + break; + default: + g_assert_not_reached(); } #endif @@ -153,10 +164,6 @@ static void tcg_set_thread(Object *obj, const char *value, Error **errp) if (icount_enabled()) { error_setg(errp, "No MTTCG when icount is enabled"); } else { -#ifndef TARGET_SUPPORTS_MTTCG - warn_report("Guest not yet converted to MTTCG - " - "you may get unexpected results"); -#endif s->mttcg_enabled = ON_OFF_AUTO_ON; } } else if (strcmp(value, "single") == 0) { From patchwork Thu Apr 24 00:49:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883897 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3208127wrs; Wed, 23 Apr 2025 18:25:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUMy/XoJiPLgfkPWFRhsL81AxGksIZBFoyW+dwVX8k1nDaR7gDY6wmF3HDwCuErrv1wFPF8eQ==@linaro.org X-Google-Smtp-Source: AGHT+IHNLAoUpMUe/Csek5zgcnoRN7bmp7RH6Ry5o7Q1E0v/P/gNUSpmZWCfxxYzMLYr9Ax8J7vN X-Received: by 2002:a05:622a:2b4a:b0:47c:fefb:a5a with SMTP id d75a77b69052e-47ec38680b5mr7702941cf.11.1745457908261; Wed, 23 Apr 2025 18:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745457908; cv=none; d=google.com; s=arc-20240605; b=c2fP+UkiAw2vc7Ve4bJXxkV23fWffROQGQzRR4/TNi3BJW3gq2XqM8LiTYAhc9sxxa IOK/hELLXsPZVNBwJ/vhO/PJ1/0TRR/YDhcyW1RBhoMs6KePcxC9RJPS2wIH7LnuUEHf lCHCM1Y7GVaSayJYj+dgxcO5jYke5XSzeyzsv9rl9Rbn3tLYYTee5X92Oa9WHCqC1vR6 lbcSsQRQfXLqSmzyAg68Vfac20lF8m7EuhkCgaIrHucyqbL4WZvwmFnH6J2jqFSB7EuL ylg5UR5cgtMPdJu4sEY4j5+AmJ5sBUTS5pyWIalmUCaNfpNfUHIqvRmUSAsAm674i/w4 NDGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kCb0nI+2CCy6xbgQ0QUcGLa1ZUmAGxVEjmnQDdUz4pI=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=JG3IWMNp6oL1J2gk0gsh6hyFWQmzAo0wvc6Ks1KwNGc5j5tdSsHrBj9uN/7up70xJ0 P50bU3Uu7v15evWTeyYkEnhbM8zH0iD3pRgTniBZacld7uLUpKmyNc5qoIQHmSu5AmMp w6LNQUCNtqdCkHHWpLqZ9oAiXpfcjckRkKpLy+T9x442IZhxSCkvYhJoxT+5x2aXA+Ll sbGdiWgmR2DNymnS3kmyBiUGbiwy3j4Ze0MPZNwswLCSxArSYKMdRXtxHFnV8/L+/gml 5nvHWGNVGYlxbnSbGn9RrOR8eq0Mr/ehOSEgjYMN4yYxV/ivhTTPBt3TcW+3Vqnx5ZdO Xesw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Aqs/fsk4"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-47ea2ba8fc7si5506591cf.624.2025.04.23.18.25.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:25:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Aqs/fsk4"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kzZ-0000RY-BW; Wed, 23 Apr 2025 21:03: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 1u7kx0-0005ax-OG for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:26 -0400 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwy-0005YT-LR for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:26 -0400 Received: by mail-pg1-x52d.google.com with SMTP id 41be03b00d2f7-af908bb32fdso411793a12.1 for ; Wed, 23 Apr 2025 18:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456423; x=1746061223; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kCb0nI+2CCy6xbgQ0QUcGLa1ZUmAGxVEjmnQDdUz4pI=; b=Aqs/fsk4hGfooCkFjiB1ZrTQGnMzOOdl5Gjk6q/rbuEs88SxZczMQ7d40Pval/YMhN PriJ8ZKbG1XYRdhSEIIhgB2DGtu10voqs0NOJUFNSJJ09cG5gJ1/sWPTrfvRJwkxauQC 3705OKd8ui/Iy804bIcJBDmEL2b0SCxLJSA/7IbWMZO2yjoAPzpsOAekrLDoHPavWjZg baAd+FgXxFUSs8MltsMwU3RkZAZWNCQ8M103x9bNGF7xcnMIXD+bOeVJb7EQTjJYNMRA kFZli1eRuXGtyYyEZYcwV3L3kcz8xHRE9TOq/kbTEgnlHTpqH0TUkq5440/HpB0akFyY 9+ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456423; x=1746061223; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kCb0nI+2CCy6xbgQ0QUcGLa1ZUmAGxVEjmnQDdUz4pI=; b=qW5ifMkodIMvkgZVWZk9rrqtrzkcBgrn2B8d2mfqGaJaqP0guR3Uqe129hSGKOY25x yzHlHOmph/Xs2AQvTN3d/itkTw3qZE8U6RmLpEA1mlwn69GXNTJKkBMQC+BBBNsncgxR yxrZwyBuaZNJHGjdtd9A0wZsy1ipKUNpdj5hQOvPniUC/FrbZl+eAd5LTFxQCivbVamj cmrAz0cvdoCJhGwmf+xblVxmxr/uEMknGI1auyUBPQfKJoegPUnjyLeqN3uuVyO/aEGc 0E1Ig4ig7mtGn+epx2pb5leOk6+otNX9zKtGnSB5kF7lR7XnBlWKvaXqvdUKkBuzcNxT UcBg== X-Gm-Message-State: AOJu0YyYAiveLml9bTcHWIGbf5/op4fEw4vagGzjxnpl/1CiSKarciZ0 LPH4U5dLRODp+k1rZpvZoa4ZSrEMsLRZ9BG6aNv1TmixAGWsdZKLGjo+7B5Czq9GqEV3Ioth0wc s X-Gm-Gg: ASbGncsHV+wFVfvjLbT2fstyoZmcEZYGfM9DMQylXMD3KNEbjZl30AlAw7Va0QlyL8/ T6wvapOy2KbdPS9fYMpvka2QZes9WYN7dPY/M240RBURSOaODflQdU46BI25ZaZEZMeP53pwM3N 7V/FGAPQQC29l247RWRhQKZ9bg28Ys8dq227dUtBVumt6D576CdbGqRHXUbhZmY2HGs9/OzB8yP f+wPELt8mAY/vbME435oc/W8b8XCygXhnQmbSnoWm4DrIaRqgNwgEf0stEFm7cuqaKfE8iFwM5b o/hzBfBJbkevliYR7bSWnb29YnAShJaYF9DYDcOkqywkau4IkL0QDram3Q1yoEH8bhMzBBC31U8 = X-Received: by 2002:a05:6a20:9f8d:b0:1ee:c598:7a87 with SMTP id adf61e73a8af0-20445fb9734mr592964637.14.1745456422765; Wed, 23 Apr 2025 18:00:22 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 146/148] target/riscv: Remove AccelCPUClass::cpu_class_init need Date: Wed, 23 Apr 2025 17:49:31 -0700 Message-ID: <20250424004934.598783-147-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52d; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Expose riscv_tcg_ops symbol, then directly set it as CPUClass::tcg_ops in TYPE_RISCV_CPU's class_init(), using CONFIG_TCG #ifdef'ry. No need for the AccelCPUClass::cpu_class_init() handler anymore. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20250405161320.76854-2-philmd@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- target/riscv/tcg/tcg-cpu.h | 2 ++ target/riscv/cpu.c | 3 +++ target/riscv/tcg/tcg-cpu.c | 16 +--------------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/target/riscv/tcg/tcg-cpu.h b/target/riscv/tcg/tcg-cpu.h index ce94253fe4..a23716a5ac 100644 --- a/target/riscv/tcg/tcg-cpu.h +++ b/target/riscv/tcg/tcg-cpu.h @@ -26,6 +26,8 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, Error **errp); void riscv_tcg_cpu_finalize_features(RISCVCPU *cpu, Error **errp); bool riscv_cpu_tcg_compatible(RISCVCPU *cpu); +extern const TCGCPUOps riscv_tcg_ops; + struct DisasContext; struct RISCVCPUConfig; typedef struct RISCVDecoder { diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index ad534cee51..2b830b3317 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -3054,6 +3054,9 @@ static void riscv_cpu_common_class_init(ObjectClass *c, void *data) cc->get_arch_id = riscv_get_arch_id; #endif cc->gdb_arch_name = riscv_gdb_arch_name; +#ifdef CONFIG_TCG + cc->tcg_ops = &riscv_tcg_ops; +#endif /* CONFIG_TCG */ device_class_set_props(dc, riscv_cpu_properties); } diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 88f7cdb887..44fdf6c4cf 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -140,7 +140,7 @@ static void riscv_restore_state_to_opc(CPUState *cs, env->excp_uw2 = data[2]; } -static const TCGCPUOps riscv_tcg_ops = { +const TCGCPUOps riscv_tcg_ops = { .guest_default_memory_order = 0, .initialize = riscv_translate_init, @@ -1527,24 +1527,10 @@ static void riscv_tcg_cpu_instance_init(CPUState *cs) } } -static void riscv_tcg_cpu_init_ops(AccelCPUClass *accel_cpu, CPUClass *cc) -{ - /* - * All cpus use the same set of operations. - */ - cc->tcg_ops = &riscv_tcg_ops; -} - -static void riscv_tcg_cpu_class_init(CPUClass *cc) -{ - cc->init_accel_cpu = riscv_tcg_cpu_init_ops; -} - static void riscv_tcg_cpu_accel_class_init(ObjectClass *oc, void *data) { AccelCPUClass *acc = ACCEL_CPU_CLASS(oc); - acc->cpu_class_init = riscv_tcg_cpu_class_init; acc->cpu_instance_init = riscv_tcg_cpu_instance_init; acc->cpu_target_realize = riscv_tcg_cpu_realize; } From patchwork Thu Apr 24 00:49:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883832 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3202147wrs; Wed, 23 Apr 2025 18:04:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVagWcqUvY3lMWgrwM4sBi8AnuzgIZvC5A9ZGz6R8N9q8YmqRoqXgwcTBRa8Yde2IpTK5masQ==@linaro.org X-Google-Smtp-Source: AGHT+IEXuBRn0dXLvt5TYO3eYyrvYtC/V2ltV/UOu0nTUK2Tp6Sn7fy3ZlAJ7k5MV1lukuuH5Js2 X-Received: by 2002:a05:620a:c4a:b0:7c7:a591:4f9b with SMTP id af79cd13be357-7c956ede20emr122161685a.28.1745456690198; Wed, 23 Apr 2025 18:04:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745456690; cv=none; d=google.com; s=arc-20240605; b=DEX4Zk4IW8zPt4p7lhsMUD7yKXgv84Cmlvzji94WlAwyZ7Uij5FpDX8r087Xn9P6jL 0SwwXaNviykdtqV/+j0dVM6aKHx08iWruAbj11SJLb39iSdmqJE26yxcpXaxLLP46x6M KS2c4BP+1KgmZV/o5oOvTED31REYUliDmq/UFVjnbMPSK4sO6tEya/c7byipz5KRF4C+ r1D1vhPV0fQZ5jrDFFQhEDk7Oe0H+VV1U+gupF4Rb3Iyg07yngb+pGkx9arZAMW7U6Z0 PQ6CEGNYnOHpRTokZK02BCjS3FWuz3ceHJ/VTeF5U3bl29J6VPmnXNDJxFhNUNhY32UP 6vOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=MUCugy16Yk60Mq47s28P0+0wiiVLsU6AqUaVBrtQ/5g=; fh=kQadAhxV42GJ3cd2VUw1RyURv/zJQGvmUdF7iLEVTtc=; b=RSDrQgXzdRLdxxnPebdXAH4LCztONQPDebW24LjDEcfuPB4NTjMTEb1FrNicPZi+ln 81FIm85fWCy441I62pNS2sUgcPZ/XdZymjFF1rx/IqWLorQKtHuwN+Uah28VvlSADW5r qx1fTTKFuqFHT54aArxTr8KGOyPgABvlt/xIvxHHxwR1YyxvEEXCFe5Qh2mMetAS0sHD TsbPj26kj9jPPQu4tele1vtUWwSqr1FooMHue0uKTHpJ12eLRzFCGKNEAqMEq5G5z/TH gXi3DwxNjXjOE3EVNPCk5oxQDcHoE2RV2S/ghlYUbkkvXoLKFRM4fDx2XmsURxMterz2 YKvw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qlDWOGE0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c958ee1a72si20261685a.620.2025.04.23.18.04.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:04:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qlDWOGE0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7l0a-0003fw-DD; Wed, 23 Apr 2025 21:04: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 1u7kx1-0005mo-Lu for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:28 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kwz-0005Yg-EI for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:27 -0400 Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-b03bc416962so274683a12.0 for ; Wed, 23 Apr 2025 18:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456424; x=1746061224; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MUCugy16Yk60Mq47s28P0+0wiiVLsU6AqUaVBrtQ/5g=; b=qlDWOGE0J9vO2yKZbrFR6cvGlbwTSKXB5VWV17L5DbbAIGuZR072HVhH7zA0Ra+qjY yLkKSP0RqhxmhwI3/QKo9qFNCFQejH73OJ28AVtVEWpmRWzvHIKmn8WghmeX1L4lRkv1 xy/HEA70IzURAF6KyxfwkVpPMPOM5X/DKD4603EtQBtveY+dXK+Ap4R0G5ztwi3nGDjO aMM5sZ9T7SEeL2TkVSiLE+oaEHRm2hH9sWTyaZ/1uCa68mAWXHpTMktv2ahKGX7MgOdf jtZOiSM5p8tlD0pc1OfJ4ZwbZHQ8iJKUJgJV7s7PvfDgh8ZCcNDT2tQ30t8m8a3HJ5Me 9qiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456424; x=1746061224; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MUCugy16Yk60Mq47s28P0+0wiiVLsU6AqUaVBrtQ/5g=; b=rJ7QgQauI1FJFvm2vYQsItyFFFv1W+oYLPGmeEF4i1cPyQdg3ec9n3SnSui/LWu52C cXsYIwu+D99fuwPfruqQX7x/+9+2jXIRGk1Oka6GWlTql2XNgeOs1V3m7w0S5Cjbz+d/ weW5qvm97KZx/e5DrjbGaxcFRW/cu5tE6rqc4KmigcToRmCzEJxuEPWoHDELofZQUYkR uAnppTLs/PnupwJ1KRJru/TJcNL18lknrtyaTM/MQoUICnOtiMOsq4ikkzA09/E1DON5 EppNI2fOOo2YPtWWmTpWhRTp0cC4Yy4GFANgd5aMpc5JflyrpBB68kY5tbcGhfejuhx8 biNw== X-Gm-Message-State: AOJu0Yx7drM5P33oNPy9A/R1N8LhTFnuwrE04A+zSNDiQFJzPqAiS3bv lgeuI+UyPe6xOrmDKsaKQX8pEBpgusiLn/ZRx5FI2aU7VZbLFe4eebFVfM1CEl19Xuph/t4/FCc p X-Gm-Gg: ASbGncs/Fj7wIzr/8wpVNdjuJl+aJGi1wDnf5bTu6crZbsh+UToiOYTfA8r+Rn067jy +eKRGLy/356EI2ryN2KMuT8d8sL9Xhlu4FQ33J5L8Otlf2Mg8+MlR91zR352trS6TRtnCO1beMp P8wKVn7yQrnX0mbvZxZH6Dv2+mY9sfk/Qu9/uSO21051grbE7a7wtdzxgDL1OaZuWEM379je+Mu TzUcmAfUmN+e3hp949OeQVsaV7bQdTM+86SLiK/VDTGhoxMFgS00cHmOgq1eHSRYRgXj2aL3pTo O98oFbaTJ1TJC4xK7ERcZ5N96Qfpb+zn9F69YdI/O2cZdWi33eEF6TMjG+ldtbJ6bBZaaMWmiRc //rXN/ATKTg== X-Received: by 2002:a17:902:ebc1:b0:224:6ee:ad with SMTP id d9443c01a7336-22db3db16ddmr10598365ad.44.1745456423627; Wed, 23 Apr 2025 18:00:23 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 147/148] target/i386: Remove AccelCPUClass::cpu_class_init need Date: Wed, 23 Apr 2025 17:49:32 -0700 Message-ID: <20250424004934.598783-148-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Expose x86_tcg_ops symbol, then directly set it as CPUClass::tcg_ops in TYPE_X86_CPU's class_init(), using CONFIG_TCG #ifdef'ry. No need for the AccelCPUClass::cpu_class_init() handler anymore. Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20250405161320.76854-3-philmd@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- target/i386/tcg/tcg-cpu.h | 4 ++++ target/i386/cpu.c | 4 ++++ target/i386/tcg/tcg-cpu.c | 14 +------------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/target/i386/tcg/tcg-cpu.h b/target/i386/tcg/tcg-cpu.h index 7580f8afb4..85bcd61678 100644 --- a/target/i386/tcg/tcg-cpu.h +++ b/target/i386/tcg/tcg-cpu.h @@ -19,6 +19,8 @@ #ifndef TCG_CPU_H #define TCG_CPU_H +#include "cpu.h" + #define XSAVE_FCW_FSW_OFFSET 0x000 #define XSAVE_FTW_FOP_OFFSET 0x004 #define XSAVE_CWD_RIP_OFFSET 0x008 @@ -76,6 +78,8 @@ QEMU_BUILD_BUG_ON(offsetof(X86XSaveArea, zmm_hi256_state) != XSAVE_ZMM_HI256_OFF QEMU_BUILD_BUG_ON(offsetof(X86XSaveArea, hi16_zmm_state) != XSAVE_HI16_ZMM_OFFSET); QEMU_BUILD_BUG_ON(offsetof(X86XSaveArea, pkru_state) != XSAVE_PKRU_OFFSET); +extern const TCGCPUOps x86_tcg_ops; + bool tcg_cpu_realizefn(CPUState *cs, Error **errp); int x86_mmu_index_pl(CPUX86State *env, unsigned pl); diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 57f62cc869..1f970aa4da 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -43,6 +43,7 @@ #include "hw/boards.h" #include "hw/i386/sgx-epc.h" #endif +#include "tcg/tcg-cpu.h" #include "disas/capstone.h" #include "cpu-internal.h" @@ -8915,6 +8916,9 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data) #ifndef CONFIG_USER_ONLY cc->sysemu_ops = &i386_sysemu_ops; #endif /* !CONFIG_USER_ONLY */ +#ifdef CONFIG_TCG + cc->tcg_ops = &x86_tcg_ops; +#endif /* CONFIG_TCG */ cc->gdb_arch_name = x86_gdb_arch_name; #ifdef TARGET_X86_64 diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index d941df0956..e13d0f6f86 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -124,7 +124,7 @@ static bool x86_debug_check_breakpoint(CPUState *cs) #include "accel/tcg/cpu-ops.h" -static const TCGCPUOps x86_tcg_ops = { +const TCGCPUOps x86_tcg_ops = { /* * The x86 has a strong memory model with some store-after-load re-ordering */ @@ -152,17 +152,6 @@ static const TCGCPUOps x86_tcg_ops = { #endif /* !CONFIG_USER_ONLY */ }; -static void x86_tcg_cpu_init_ops(AccelCPUClass *accel_cpu, CPUClass *cc) -{ - /* for x86, all cpus use the same set of operations */ - cc->tcg_ops = &x86_tcg_ops; -} - -static void x86_tcg_cpu_class_init(CPUClass *cc) -{ - cc->init_accel_cpu = x86_tcg_cpu_init_ops; -} - static void x86_tcg_cpu_xsave_init(void) { #define XO(bit, field) \ @@ -211,7 +200,6 @@ static void x86_tcg_cpu_accel_class_init(ObjectClass *oc, void *data) acc->cpu_target_realize = tcg_cpu_realizefn; #endif /* CONFIG_USER_ONLY */ - acc->cpu_class_init = x86_tcg_cpu_class_init; acc->cpu_instance_init = x86_tcg_cpu_instance_init; } static const TypeInfo x86_tcg_cpu_accel_type_info = { From patchwork Thu Apr 24 00:49:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 883916 Delivered-To: patch@linaro.org Received: by 2002:a5d:474d:0:b0:38f:210b:807b with SMTP id o13csp3209359wrs; Wed, 23 Apr 2025 18:29:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUAkLraSALJ95P/wjGOds4hnxsk5Cg0FYrMnIOwbi+C0qqDtr5WkKvXLH+cUo9JIViuuD3oJg==@linaro.org X-Google-Smtp-Source: AGHT+IG+mP+PuFYMJH5U7k1FviXLj0O+D8o70QL25Fo8EMvK5RAXn6Yk5CkRcR2rIrQwMbzs9j6D X-Received: by 2002:a05:6214:29ef:b0:6e8:9bcd:bba6 with SMTP id 6a1803df08f44-6f4bfbb8011mr18640716d6.7.1745458186491; Wed, 23 Apr 2025 18:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1745458186; cv=none; d=google.com; s=arc-20240605; b=d4+lL148jdNv6ObI4AavidBemsY2Mf+Zo0xTsF2R4fszdE+i8QTnjRlV22kEqY6NGO 0sYDANploRe+lrCGgZyeDdIuBe1wUPyNw08RL7nAg/nXp2iY2RKHRK7R81DKWgWZ+VgL NqH5VD8dRVcPn3VqZBbDP0fodQSQ4NDR4AtDJHtWmNnFUA7Q4BE2d0ZNRZq8GBW6fFz8 OnmC4A4S5+4FTyk4VeCcSl0/QYG37TIdkA9J9aeVCr9SNoBaKJTkGyemwyE0M7gkjtJG KXo1u2zqGssIdAw6F2zyM9GmX/i3+aiLeg2ThZhGfKEgkNLYfFR5t7DHei5nViHs411s avww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=U1g4DVjg5c6Ho5GZomYZSoMm8tVjtbkgyt05K/brssM=; fh=GenBbR+/7gYaTcd1KqVHGA9TQPQZSS4lyPm/ns+6Qjo=; b=lSvxZFlYyrof6bqhIu5XOzj5onCsisTKTUklWAlVA3aJTTktrfydSn62Yn9PXNpC0y +ab/GauaZ0r3U/fR8Wblbu4S+zp5n9iJMVL5PsaWwnUuXk3NLQ8Yoszfky6nZgE9n6DN 4CN1AiSnEi6TslROKGYDVuQrDZBsJZQ7709RH9AEWt0NhkjCA5QmntIgzCZtk2AiMjRj Sk0KET8lWe4WRCA23lDey4qH/MuGEa2DBL7jHkE14UA3pNQtWEXxL8vEZMeLNB8tgIer it+FXTATQ+MionoOx8NIt3AyxOcqKZmlJFVzXx9k1sigY+KVE7v4tYgpkfTTEkSVsL5L dmPw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WqKWMdE9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6f4c08d2e7bsi4267516d6.64.2025.04.23.18.29.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Apr 2025 18:29:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WqKWMdE9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7kzo-0001RP-Nx; Wed, 23 Apr 2025 21:03:22 -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 1u7kx5-000691-Ma for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:32 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7kx1-0005Z1-Cz for qemu-devel@nongnu.org; Wed, 23 Apr 2025 21:00:31 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2255003f4c6so4872145ad.0 for ; Wed, 23 Apr 2025 18:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745456424; x=1746061224; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U1g4DVjg5c6Ho5GZomYZSoMm8tVjtbkgyt05K/brssM=; b=WqKWMdE9V+2+7Iabpf9seMQZGBtPEfpV6B3fxbWWQqn1jNUQdq1jXJdv1sBHKuJ0fi Ybrjv9XkVBeOkeEsiaPW6Ne+28O9iAPHaY67eDo9Lps+anEHZZDB4HhBJ7FJto1eBhAm f6gm1qsxK0KkKvzqPirFlCdC0p7ajUiP92dHIhab7Venxb7no/kb4PYTNnPI201Oe/Lx N7KVb5/yXNzJ2fbEHdYVO46Z2E47rluWPIbKMXQvnV2tXAuSa/gZ2/zD17vinLEdyEwP 3msgiuhOhrpZJCqOq8Dlkw6SJUR4MD0ht3rXPe0iRri5qzPvcUVK14aZ/AmQ0/29PrZV uO2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745456424; x=1746061224; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U1g4DVjg5c6Ho5GZomYZSoMm8tVjtbkgyt05K/brssM=; b=buC6qXqHaUebA2rfv4t08XLLlKu3zZr0joBhooEcVpxDNGocMHJng+BEoFTpqiWabI CfUxGQ0nukn2gdHL+YOZAdcrBghNEqOGmk2wdbWsid4byPwdkL1DPEjMdzXJsZC/yiVe pBoa8/leT/clbwLWIIuVz36eb2pMDBBkmvbtOiX9aRMGKO5jznSQwNQmk3a5M/mQaCbr rwkZReER7jx4o4OyvOdMnjCO00Ws74oIsTKDrCbL2Tyb4grBGbDtuMG2jGuPcnWYhrvf T9DmwnpYbjDiMk62CwKf464JC6aqDGEFt6JPAQ2un6Q8+L36AdHmBmU2fbj+bKNWDQsM 2QyA== X-Gm-Message-State: AOJu0YyYZFwCJFWrtY9lTac+HnmxzF+auZRbF9VYdfLKku53GONC8fLb AOXjt9tuOntLYI0xJWzLZDbFsMP4geohlZJynyma/hb/9aZ6z4Gk2na7nYTAokp5ld/Kcvnd77g c X-Gm-Gg: ASbGncsRDYgoGXJ57m2Xyi/6FwHmuS/OxTRDjnZkshzFIfY2ax+tQ2CAh7qiu/KHBht ZsJ4oMDOQbVDYuJo2UQrvujAMlKROuH8+zxGmABLUCbvQmjEZTDMrjoy9/8hxTGOKac+0EP/Hw6 B2JdTS5D8uDKOuZlIEvjzwwzr7Zhf6Ia4GzqK8WvXc4JMRHw+BbTsGHz3oxelnM39Qj85ZVUcSh wyE3n5PUZx0cXc3xLNEDF/ar3U5+M+FLJzVl1fABlX7ewG2nHqVzUB4/YWsWtelKVhxI8aKJBtu wq0FP8SEHnyimm4RPZLA2XQUp8sNQzYHftvP2DDEZev6fNigSy54hTXB0qhDpurGobbke7hpu60 = X-Received: by 2002:a17:903:1103:b0:22c:3609:97ed with SMTP id d9443c01a7336-22db3c3a039mr7385185ad.30.1745456424472; Wed, 23 Apr 2025 18:00:24 -0700 (PDT) Received: from stoup.. (71-212-47-143.tukw.qwest.net. [71.212.47.143]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f76f45c7sm129259a12.16.2025.04.23.18.00.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 18:00:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Anton Johansson , Pierrick Bouvier Subject: [PULL 148/148] tcg: Convert TARGET_SUPPORTS_MTTCG to TCGCPUOps::mttcg_supported field Date: Wed, 23 Apr 2025 17:49:33 -0700 Message-ID: <20250424004934.598783-149-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250424004934.598783-1-richard.henderson@linaro.org> References: <20250424004934.598783-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Instead of having a compile-time TARGET_SUPPORTS_MTTCG definition, have each target set the 'mttcg_supported' field in the TCGCPUOps structure. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Reviewed-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-ID: <20250405161320.76854-17-philmd@linaro.org> Signed-off-by: Richard Henderson --- include/accel/tcg/cpu-ops.h | 8 ++++++++ include/exec/poison.h | 1 - accel/tcg/tcg-all.c | 11 +++++------ target/alpha/cpu.c | 1 + target/arm/cpu.c | 1 + target/arm/tcg/cpu-v7m.c | 1 + target/avr/cpu.c | 1 + target/hexagon/cpu.c | 1 + target/hppa/cpu.c | 1 + target/i386/tcg/tcg-cpu.c | 1 + target/loongarch/cpu.c | 1 + target/m68k/cpu.c | 1 + target/microblaze/cpu.c | 1 + target/mips/cpu.c | 1 + target/openrisc/cpu.c | 1 + target/ppc/cpu_init.c | 1 + target/riscv/tcg/tcg-cpu.c | 1 + target/rx/cpu.c | 1 + target/s390x/cpu.c | 1 + target/sh4/cpu.c | 1 + target/sparc/cpu.c | 1 + target/tricore/cpu.c | 1 + target/xtensa/cpu.c | 1 + configs/targets/aarch64-softmmu.mak | 1 - configs/targets/alpha-softmmu.mak | 1 - configs/targets/arm-softmmu.mak | 1 - configs/targets/hppa-softmmu.mak | 1 - configs/targets/i386-softmmu.mak | 1 - configs/targets/loongarch64-softmmu.mak | 1 - configs/targets/microblaze-softmmu.mak | 1 - configs/targets/microblazeel-softmmu.mak | 1 - configs/targets/mips-softmmu.mak | 1 - configs/targets/mipsel-softmmu.mak | 1 - configs/targets/or1k-softmmu.mak | 1 - configs/targets/ppc64-softmmu.mak | 1 - configs/targets/riscv32-softmmu.mak | 1 - configs/targets/riscv64-softmmu.mak | 1 - configs/targets/s390x-softmmu.mak | 1 - configs/targets/sparc-softmmu.mak | 1 - configs/targets/sparc64-softmmu.mak | 1 - configs/targets/x86_64-softmmu.mak | 1 - configs/targets/xtensa-softmmu.mak | 1 - configs/targets/xtensaeb-softmmu.mak | 1 - docs/devel/multi-thread-tcg.rst | 2 +- 44 files changed, 34 insertions(+), 28 deletions(-) diff --git a/include/accel/tcg/cpu-ops.h b/include/accel/tcg/cpu-ops.h index a4932fc5d7..0e4352513d 100644 --- a/include/accel/tcg/cpu-ops.h +++ b/include/accel/tcg/cpu-ops.h @@ -19,6 +19,14 @@ #include "tcg/tcg-mo.h" struct TCGCPUOps { + /** + * mttcg_supported: multi-threaded TCG is supported + * + * Target (TCG frontend) supports: + * - atomic instructions + * - memory ordering primitives (barriers) + */ + bool mttcg_supported; /** * @guest_default_memory_order: default barrier that is required diff --git a/include/exec/poison.h b/include/exec/poison.h index a09e0c1263..bc422719d8 100644 --- a/include/exec/poison.h +++ b/include/exec/poison.h @@ -35,7 +35,6 @@ #pragma GCC poison TARGET_HAS_BFLT #pragma GCC poison TARGET_NAME -#pragma GCC poison TARGET_SUPPORTS_MTTCG #pragma GCC poison TARGET_BIG_ENDIAN #pragma GCC poison TCG_GUEST_DEFAULT_MO #pragma GCC poison TARGET_HAS_PRECISE_SMC diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index ecdd48847c..b0d4e3e136 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -41,8 +41,9 @@ #include "hw/boards.h" #include "system/tcg.h" #endif +#include "accel/tcg/cpu-ops.h" #include "internal-common.h" -#include "cpu-param.h" +#include "cpu.h" struct TCGState { @@ -88,11 +89,9 @@ static int tcg_init_machine(MachineState *ms) unsigned max_threads = 1; #ifndef CONFIG_USER_ONLY -# ifdef TARGET_SUPPORTS_MTTCG - bool mttcg_supported = true; -# else - bool mttcg_supported = false; -# endif + CPUClass *cc = CPU_CLASS(object_class_by_name(CPU_RESOLVING_TYPE)); + bool mttcg_supported = cc->tcg_ops->mttcg_supported; + switch (s->mttcg_enabled) { case ON_OFF_AUTO_AUTO: /* diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index eeaf3a81c1..35fb145d27 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -237,6 +237,7 @@ static const struct SysemuCPUOps alpha_sysemu_ops = { static const TCGCPUOps alpha_tcg_ops = { /* Alpha processors have a weak memory model */ .guest_default_memory_order = 0, + .mttcg_supported = true, .initialize = alpha_translate_init, .translate_code = alpha_translate_code, diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 3e9760b551..377791c84d 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2671,6 +2671,7 @@ static const struct SysemuCPUOps arm_sysemu_ops = { #ifdef CONFIG_TCG static const TCGCPUOps arm_tcg_ops = { + .mttcg_supported = true, /* ARM processors have a weak memory model */ .guest_default_memory_order = 0, diff --git a/target/arm/tcg/cpu-v7m.c b/target/arm/tcg/cpu-v7m.c index 89d4e4b4a2..f71560aa43 100644 --- a/target/arm/tcg/cpu-v7m.c +++ b/target/arm/tcg/cpu-v7m.c @@ -234,6 +234,7 @@ static void cortex_m55_initfn(Object *obj) static const TCGCPUOps arm_v7m_tcg_ops = { /* ARM processors have a weak memory model */ .guest_default_memory_order = 0, + .mttcg_supported = true, .initialize = arm_translate_init, .translate_code = arm_translate_code, diff --git a/target/avr/cpu.c b/target/avr/cpu.c index 8f79cf4c08..84f3b839c9 100644 --- a/target/avr/cpu.c +++ b/target/avr/cpu.c @@ -225,6 +225,7 @@ static const struct SysemuCPUOps avr_sysemu_ops = { static const TCGCPUOps avr_tcg_ops = { .guest_default_memory_order = 0, + .mttcg_supported = false, .initialize = avr_cpu_tcg_init, .translate_code = avr_cpu_translate_code, .synchronize_from_tb = avr_cpu_synchronize_from_tb, diff --git a/target/hexagon/cpu.c b/target/hexagon/cpu.c index 3d14e5cc6a..3c5191282e 100644 --- a/target/hexagon/cpu.c +++ b/target/hexagon/cpu.c @@ -327,6 +327,7 @@ static void hexagon_cpu_init(Object *obj) static const TCGCPUOps hexagon_tcg_ops = { /* MTTCG not yet supported: require strict ordering */ .guest_default_memory_order = TCG_MO_ALL, + .mttcg_supported = false, .initialize = hexagon_translate_init, .translate_code = hexagon_translate_code, .synchronize_from_tb = hexagon_cpu_synchronize_from_tb, diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index dfbd933056..10e18c945e 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -260,6 +260,7 @@ static const TCGCPUOps hppa_tcg_ops = { * basis. It's probably easier to fall back to a strong memory model. */ .guest_default_memory_order = TCG_MO_ALL, + .mttcg_supported = true, .initialize = hppa_translate_init, .translate_code = hppa_translate_code, diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index e13d0f6f86..621502c984 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -125,6 +125,7 @@ static bool x86_debug_check_breakpoint(CPUState *cs) #include "accel/tcg/cpu-ops.h" const TCGCPUOps x86_tcg_ops = { + .mttcg_supported = true, /* * The x86 has a strong memory model with some store-after-load re-ordering */ diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index f5b8ef29ab..fe9462b3b7 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -865,6 +865,7 @@ static void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags) static const TCGCPUOps loongarch_tcg_ops = { .guest_default_memory_order = 0, + .mttcg_supported = true, .initialize = loongarch_translate_init, .translate_code = loongarch_translate_code, diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c index b2d8c8f1de..99adc5eb91 100644 --- a/target/m68k/cpu.c +++ b/target/m68k/cpu.c @@ -591,6 +591,7 @@ static const struct SysemuCPUOps m68k_sysemu_ops = { static const TCGCPUOps m68k_tcg_ops = { /* MTTCG not yet supported: require strict ordering */ .guest_default_memory_order = TCG_MO_ALL, + .mttcg_supported = false, .initialize = m68k_tcg_init, .translate_code = m68k_translate_code, diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index 4efba0dddb..edfb05758b 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -429,6 +429,7 @@ static const struct SysemuCPUOps mb_sysemu_ops = { static const TCGCPUOps mb_tcg_ops = { /* MicroBlaze is always in-order. */ .guest_default_memory_order = TCG_MO_ALL, + .mttcg_supported = true, .initialize = mb_tcg_init, .translate_code = mb_translate_code, diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 2ae7ba4407..473cecdebc 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -551,6 +551,7 @@ static int mips_cpu_mmu_index(CPUState *cs, bool ifunc) } static const TCGCPUOps mips_tcg_ops = { + .mttcg_supported = TARGET_LONG_BITS == 32, .guest_default_memory_order = 0, .initialize = mips_tcg_init, diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index 87fe779042..6601e0c066 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -244,6 +244,7 @@ static const struct SysemuCPUOps openrisc_sysemu_ops = { static const TCGCPUOps openrisc_tcg_ops = { .guest_default_memory_order = 0, + .mttcg_supported = true, .initialize = openrisc_translate_init, .translate_code = openrisc_translate_code, diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 9ba775971a..fde7d71fc6 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -7479,6 +7479,7 @@ static const struct SysemuCPUOps ppc_sysemu_ops = { #include "accel/tcg/cpu-ops.h" static const TCGCPUOps ppc_tcg_ops = { + .mttcg_supported = TARGET_LONG_BITS == 64, .guest_default_memory_order = 0, .initialize = ppc_translate_init, .translate_code = ppc_translate_code, diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 44fdf6c4cf..426145c3b9 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -141,6 +141,7 @@ static void riscv_restore_state_to_opc(CPUState *cs, } const TCGCPUOps riscv_tcg_ops = { + .mttcg_supported = true, .guest_default_memory_order = 0, .initialize = riscv_translate_init, diff --git a/target/rx/cpu.c b/target/rx/cpu.c index f073fe8fc9..0a7a2b55b5 100644 --- a/target/rx/cpu.c +++ b/target/rx/cpu.c @@ -206,6 +206,7 @@ static const struct SysemuCPUOps rx_sysemu_ops = { static const TCGCPUOps rx_tcg_ops = { /* MTTCG not yet supported: require strict ordering */ .guest_default_memory_order = TCG_MO_ALL, + .mttcg_supported = false, .initialize = rx_translate_init, .translate_code = rx_translate_code, diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 1e101b5afe..41cccc1e69 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -345,6 +345,7 @@ void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc, } static const TCGCPUOps s390_tcg_ops = { + .mttcg_supported = true, /* * The z/Architecture has a strong memory model with some * store-after-load re-ordering. diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c index 7a05301c6f..861fdd47f7 100644 --- a/target/sh4/cpu.c +++ b/target/sh4/cpu.c @@ -264,6 +264,7 @@ static const struct SysemuCPUOps sh4_sysemu_ops = { static const TCGCPUOps superh_tcg_ops = { /* MTTCG not yet supported: require strict ordering */ .guest_default_memory_order = TCG_MO_ALL, + .mttcg_supported = false, .initialize = sh4_translate_init, .translate_code = sh4_translate_code, diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 56d9417ae3..f7d231c6f8 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -1023,6 +1023,7 @@ static const TCGCPUOps sparc_tcg_ops = { * by an implied MEMBAR #StoreStore. */ .guest_default_memory_order = TCG_MO_LD_LD | TCG_MO_LD_ST | TCG_MO_ST_ST, + .mttcg_supported = true, .initialize = sparc_tcg_init, .translate_code = sparc_translate_code, diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index c68954b409..a4f93e7d91 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -174,6 +174,7 @@ static const struct SysemuCPUOps tricore_sysemu_ops = { static const TCGCPUOps tricore_tcg_ops = { /* MTTCG not yet supported: require strict ordering */ .guest_default_memory_order = TCG_MO_ALL, + .mttcg_supported = false, .initialize = tricore_tcg_init, .translate_code = tricore_translate_code, .synchronize_from_tb = tricore_cpu_synchronize_from_tb, diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 2cbf4e3010..971e67ad97 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -234,6 +234,7 @@ static const struct SysemuCPUOps xtensa_sysemu_ops = { static const TCGCPUOps xtensa_tcg_ops = { /* Xtensa processors have a weak memory model */ .guest_default_memory_order = 0, + .mttcg_supported = true, .initialize = xtensa_translate_init, .translate_code = xtensa_translate_code, diff --git a/configs/targets/aarch64-softmmu.mak b/configs/targets/aarch64-softmmu.mak index 82cb72cb83..5dfeb35af9 100644 --- a/configs/targets/aarch64-softmmu.mak +++ b/configs/targets/aarch64-softmmu.mak @@ -1,6 +1,5 @@ TARGET_ARCH=aarch64 TARGET_BASE_ARCH=arm -TARGET_SUPPORTS_MTTCG=y TARGET_KVM_HAVE_GUEST_DEBUG=y TARGET_XML_FILES= gdb-xml/aarch64-core.xml gdb-xml/aarch64-fpu.xml gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-vfp-sysregs.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml gdb-xml/arm-m-profile-mve.xml gdb-xml/aarch64-pauth.xml # needed by boot.c diff --git a/configs/targets/alpha-softmmu.mak b/configs/targets/alpha-softmmu.mak index 89f3517aca..5275076e50 100644 --- a/configs/targets/alpha-softmmu.mak +++ b/configs/targets/alpha-softmmu.mak @@ -1,3 +1,2 @@ TARGET_ARCH=alpha -TARGET_SUPPORTS_MTTCG=y TARGET_LONG_BITS=64 diff --git a/configs/targets/arm-softmmu.mak b/configs/targets/arm-softmmu.mak index afc64f5927..6a5a8eda94 100644 --- a/configs/targets/arm-softmmu.mak +++ b/configs/targets/arm-softmmu.mak @@ -1,5 +1,4 @@ TARGET_ARCH=arm -TARGET_SUPPORTS_MTTCG=y TARGET_XML_FILES= gdb-xml/arm-core.xml gdb-xml/arm-vfp.xml gdb-xml/arm-vfp3.xml gdb-xml/arm-vfp-sysregs.xml gdb-xml/arm-neon.xml gdb-xml/arm-m-profile.xml gdb-xml/arm-m-profile-mve.xml # needed by boot.c TARGET_NEED_FDT=y diff --git a/configs/targets/hppa-softmmu.mak b/configs/targets/hppa-softmmu.mak index 63ca74ed5e..ea331107a0 100644 --- a/configs/targets/hppa-softmmu.mak +++ b/configs/targets/hppa-softmmu.mak @@ -1,4 +1,3 @@ TARGET_ARCH=hppa TARGET_BIG_ENDIAN=y -TARGET_SUPPORTS_MTTCG=y TARGET_LONG_BITS=64 diff --git a/configs/targets/i386-softmmu.mak b/configs/targets/i386-softmmu.mak index 5dd8921756..e9d89e8ab4 100644 --- a/configs/targets/i386-softmmu.mak +++ b/configs/targets/i386-softmmu.mak @@ -1,5 +1,4 @@ TARGET_ARCH=i386 -TARGET_SUPPORTS_MTTCG=y TARGET_KVM_HAVE_GUEST_DEBUG=y TARGET_KVM_HAVE_RESET_PARKED_VCPU=y TARGET_XML_FILES= gdb-xml/i386-32bit.xml diff --git a/configs/targets/loongarch64-softmmu.mak b/configs/targets/loongarch64-softmmu.mak index 351341132f..fc44c54233 100644 --- a/configs/targets/loongarch64-softmmu.mak +++ b/configs/targets/loongarch64-softmmu.mak @@ -1,7 +1,6 @@ TARGET_ARCH=loongarch64 TARGET_BASE_ARCH=loongarch TARGET_KVM_HAVE_GUEST_DEBUG=y -TARGET_SUPPORTS_MTTCG=y TARGET_XML_FILES= gdb-xml/loongarch-base32.xml gdb-xml/loongarch-base64.xml gdb-xml/loongarch-fpu.xml gdb-xml/loongarch-lsx.xml gdb-xml/loongarch-lasx.xml # all boards require libfdt TARGET_NEED_FDT=y diff --git a/configs/targets/microblaze-softmmu.mak b/configs/targets/microblaze-softmmu.mak index 99a33ed44a..23457d0ae6 100644 --- a/configs/targets/microblaze-softmmu.mak +++ b/configs/targets/microblaze-softmmu.mak @@ -1,6 +1,5 @@ TARGET_ARCH=microblaze TARGET_BIG_ENDIAN=y -TARGET_SUPPORTS_MTTCG=y # needed by boot.c TARGET_NEED_FDT=y TARGET_XML_FILES=gdb-xml/microblaze-core.xml gdb-xml/microblaze-stack-protect.xml diff --git a/configs/targets/microblazeel-softmmu.mak b/configs/targets/microblazeel-softmmu.mak index 52cdeae1a2..c82c509623 100644 --- a/configs/targets/microblazeel-softmmu.mak +++ b/configs/targets/microblazeel-softmmu.mak @@ -1,5 +1,4 @@ TARGET_ARCH=microblaze -TARGET_SUPPORTS_MTTCG=y # needed by boot.c TARGET_NEED_FDT=y TARGET_XML_FILES=gdb-xml/microblaze-core.xml gdb-xml/microblaze-stack-protect.xml diff --git a/configs/targets/mips-softmmu.mak b/configs/targets/mips-softmmu.mak index b62a088249..c9588066b8 100644 --- a/configs/targets/mips-softmmu.mak +++ b/configs/targets/mips-softmmu.mak @@ -1,4 +1,3 @@ TARGET_ARCH=mips TARGET_BIG_ENDIAN=y -TARGET_SUPPORTS_MTTCG=y TARGET_LONG_BITS=32 diff --git a/configs/targets/mipsel-softmmu.mak b/configs/targets/mipsel-softmmu.mak index 620ec68178..90e09bdc3e 100644 --- a/configs/targets/mipsel-softmmu.mak +++ b/configs/targets/mipsel-softmmu.mak @@ -1,3 +1,2 @@ TARGET_ARCH=mips -TARGET_SUPPORTS_MTTCG=y TARGET_LONG_BITS=32 diff --git a/configs/targets/or1k-softmmu.mak b/configs/targets/or1k-softmmu.mak index adfddb1a8a..0e47d9878b 100644 --- a/configs/targets/or1k-softmmu.mak +++ b/configs/targets/or1k-softmmu.mak @@ -1,5 +1,4 @@ TARGET_ARCH=openrisc -TARGET_SUPPORTS_MTTCG=y TARGET_BIG_ENDIAN=y # needed by boot.c and all boards TARGET_NEED_FDT=y diff --git a/configs/targets/ppc64-softmmu.mak b/configs/targets/ppc64-softmmu.mak index 7cee0e97f4..74572864b3 100644 --- a/configs/targets/ppc64-softmmu.mak +++ b/configs/targets/ppc64-softmmu.mak @@ -1,7 +1,6 @@ TARGET_ARCH=ppc64 TARGET_BASE_ARCH=ppc TARGET_BIG_ENDIAN=y -TARGET_SUPPORTS_MTTCG=y TARGET_KVM_HAVE_GUEST_DEBUG=y TARGET_XML_FILES= gdb-xml/power64-core.xml gdb-xml/power-fpu.xml gdb-xml/power-altivec.xml gdb-xml/power-spe.xml gdb-xml/power-vsx.xml # all boards require libfdt diff --git a/configs/targets/riscv32-softmmu.mak b/configs/targets/riscv32-softmmu.mak index c828066ce6..db55275b86 100644 --- a/configs/targets/riscv32-softmmu.mak +++ b/configs/targets/riscv32-softmmu.mak @@ -1,6 +1,5 @@ TARGET_ARCH=riscv32 TARGET_BASE_ARCH=riscv -TARGET_SUPPORTS_MTTCG=y TARGET_XML_FILES= gdb-xml/riscv-32bit-cpu.xml gdb-xml/riscv-32bit-fpu.xml gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-32bit-virtual.xml # needed by boot.c TARGET_NEED_FDT=y diff --git a/configs/targets/riscv64-softmmu.mak b/configs/targets/riscv64-softmmu.mak index 09f613d24a..2bdd4a62cd 100644 --- a/configs/targets/riscv64-softmmu.mak +++ b/configs/targets/riscv64-softmmu.mak @@ -1,6 +1,5 @@ TARGET_ARCH=riscv64 TARGET_BASE_ARCH=riscv -TARGET_SUPPORTS_MTTCG=y TARGET_KVM_HAVE_GUEST_DEBUG=y TARGET_XML_FILES= gdb-xml/riscv-64bit-cpu.xml gdb-xml/riscv-32bit-fpu.xml gdb-xml/riscv-64bit-fpu.xml gdb-xml/riscv-64bit-virtual.xml gdb-xml/riscv-32bit-cpu.xml gdb-xml/riscv-32bit-virtual.xml # needed by boot.c diff --git a/configs/targets/s390x-softmmu.mak b/configs/targets/s390x-softmmu.mak index 5242ebe7c2..76dd5de658 100644 --- a/configs/targets/s390x-softmmu.mak +++ b/configs/targets/s390x-softmmu.mak @@ -1,6 +1,5 @@ TARGET_ARCH=s390x TARGET_BIG_ENDIAN=y -TARGET_SUPPORTS_MTTCG=y TARGET_KVM_HAVE_GUEST_DEBUG=y TARGET_XML_FILES= gdb-xml/s390x-core64.xml gdb-xml/s390-acr.xml gdb-xml/s390-fpr.xml gdb-xml/s390-vx.xml gdb-xml/s390-cr.xml gdb-xml/s390-virt.xml gdb-xml/s390-virt-kvm.xml gdb-xml/s390-gs.xml TARGET_LONG_BITS=64 diff --git a/configs/targets/sparc-softmmu.mak b/configs/targets/sparc-softmmu.mak index 78c2e25bd1..57801faf1f 100644 --- a/configs/targets/sparc-softmmu.mak +++ b/configs/targets/sparc-softmmu.mak @@ -1,4 +1,3 @@ TARGET_ARCH=sparc TARGET_BIG_ENDIAN=y -TARGET_SUPPORTS_MTTCG=y TARGET_LONG_BITS=32 diff --git a/configs/targets/sparc64-softmmu.mak b/configs/targets/sparc64-softmmu.mak index f7bab97a00..2504e31ae3 100644 --- a/configs/targets/sparc64-softmmu.mak +++ b/configs/targets/sparc64-softmmu.mak @@ -1,5 +1,4 @@ TARGET_ARCH=sparc64 TARGET_BASE_ARCH=sparc TARGET_BIG_ENDIAN=y -TARGET_SUPPORTS_MTTCG=y TARGET_LONG_BITS=64 diff --git a/configs/targets/x86_64-softmmu.mak b/configs/targets/x86_64-softmmu.mak index 1ceefde131..5619b2bc68 100644 --- a/configs/targets/x86_64-softmmu.mak +++ b/configs/targets/x86_64-softmmu.mak @@ -1,6 +1,5 @@ TARGET_ARCH=x86_64 TARGET_BASE_ARCH=i386 -TARGET_SUPPORTS_MTTCG=y TARGET_KVM_HAVE_GUEST_DEBUG=y TARGET_KVM_HAVE_RESET_PARKED_VCPU=y TARGET_XML_FILES= gdb-xml/i386-64bit.xml diff --git a/configs/targets/xtensa-softmmu.mak b/configs/targets/xtensa-softmmu.mak index 65845df4ff..2a9797338a 100644 --- a/configs/targets/xtensa-softmmu.mak +++ b/configs/targets/xtensa-softmmu.mak @@ -1,3 +1,2 @@ TARGET_ARCH=xtensa -TARGET_SUPPORTS_MTTCG=y TARGET_LONG_BITS=32 diff --git a/configs/targets/xtensaeb-softmmu.mak b/configs/targets/xtensaeb-softmmu.mak index f1f789d697..5204729af8 100644 --- a/configs/targets/xtensaeb-softmmu.mak +++ b/configs/targets/xtensaeb-softmmu.mak @@ -1,4 +1,3 @@ TARGET_ARCH=xtensa TARGET_BIG_ENDIAN=y -TARGET_SUPPORTS_MTTCG=y TARGET_LONG_BITS=32 diff --git a/docs/devel/multi-thread-tcg.rst b/docs/devel/multi-thread-tcg.rst index 14a2a9dc7b..da9a1530c9 100644 --- a/docs/devel/multi-thread-tcg.rst +++ b/docs/devel/multi-thread-tcg.rst @@ -30,7 +30,7 @@ user-space thread. This is enabled by default for all FE/BE combinations where the host memory model is able to accommodate the guest (TCGCPUOps::guest_default_memory_order & ~TCG_TARGET_DEFAULT_MO is zero) and the guest has had the required work done to support this safely -(TARGET_SUPPORTS_MTTCG). +(TCGCPUOps::mttcg_supported). System emulation will fall back to the original round robin approach if: