From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973531; cv=none; d=zohomail.com; s=zohoarc; b=TWVd+h9Vk4z6sFvLtuZ0uT1Y+H5FnoCPbVuE7S1k6M2aiaJ1DDuT1mw+xJYrSOj76DJR5PvSlNK8vSM5MWNHHlEJhisCzw8MynSPqCVI8yGXeALZQby29Y7aChsDhF4CepgYiDg2kfDp5+Y0ROYRxjEPdFYv8Tz2FT1l2AV5szY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973531; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=949DeBQijWmgHqYCdDdupcSTn3rDdND8nLqwkILEwEI=; b=QibwYJsabi5pvlFi18upvBEShI3lE+xTkz09Ojh0f0Fw/KwbkkjUczATDRPMrbHwpdQnSOwbY/5KmLdN/6LriFNxTWjS2yijz9xOWboY16G3KyoABf8R3sGYb/uoQSaYpztdNhJuzBOoaSleyobqHHsnu3cH2ulRH99HyksqawM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1741973531592816.3878785503199; Fri, 14 Mar 2025 10:32:11 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.914967.1320606 (Exim 4.92) (envelope-from ) id 1tt8sy-00032t-Ri; Fri, 14 Mar 2025 17:31:52 +0000 Received: by outflank-mailman (output) from mailman id 914967.1320606; Fri, 14 Mar 2025 17:31:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8sy-00030r-ME; Fri, 14 Mar 2025 17:31:52 +0000 Received: by outflank-mailman (input) for mailman id 914967; Fri, 14 Mar 2025 17:31:52 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8sy-0000xy-0W for xen-devel@lists.xenproject.org; Fri, 14 Mar 2025 17:31:52 +0000 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [2607:f8b0:4864:20::635]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 34227646-00fa-11f0-9899-31a8f345e629; Fri, 14 Mar 2025 18:31:47 +0100 (CET) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-22355618fd9so48786925ad.3 for ; Fri, 14 Mar 2025 10:31:47 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:45 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 34227646-00fa-11f0-9899-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973506; x=1742578306; darn=lists.xenproject.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=949DeBQijWmgHqYCdDdupcSTn3rDdND8nLqwkILEwEI=; b=KBnjvRvhagUil1NbY5Wp+4g1yfeD+sXYIOueppDRSbnhehO/S9YwsIHISLPhjtWNCz zp62Ev1zE8gM6WN2FLMk4avgeV8Dj2dNn+9FJwg11+QM2a6nMxiLrwKMi3C1PLfVlCNH uvN08ou5A0gvo1Y7GcUJUBk1VfHWTsInu2otRRGmKW2LavK5xtVado9whASiggAuOLmi U5p7h4i3ZwgxVgmJQ2BctwpXSEHTzh9efr993gP1xOUmTavdn2q/okVnvOVSdYQf/Nkj ySrsFCJN316u7Iv4ebc/a6ol6n74z/83BZh37hJL/94eSci/lomHBgw5mKUvCUnmFjjL HhfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973506; x=1742578306; 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=949DeBQijWmgHqYCdDdupcSTn3rDdND8nLqwkILEwEI=; b=XpvVdXeYtRS2nhTHTAjwTNHYYP2d/7ewCRAk8M2hCnFW8d1vCcRAoJfk8U8YI1s532 aKdwGP6lNredE/AnawIGfpQ6U7t/lymTqeBf6orNK4Z6uFRY9uz6TIrA9CN7OqOioqkO 1PD8e8wOkI8vbqZj+L48/EPK+D38tAQ2S394QQPrwKWZgrA0YpqbXQPNehhGgIlOC2cf NXptj+JMhnb9An5vuDCGdUnttftV1aPq14avtQqqjAII9kv4F+g0rIVUy89eFOxGgFOG GANOzo6G06Rstu2qY6DsgftFvEar+7SFDMwi+5p0nb6JT9EJ/6C4ZtcizOsDTq34nFuJ eGZg== X-Forwarded-Encrypted: i=1; AJvYcCU2Ky5Mu5ckK0MxufRecUmrfAYjk4nYUbr2XGW08pUO0D3B7OpZPUvQIqDCOwYiahl/tMhQUWlF46o=@lists.xenproject.org X-Gm-Message-State: AOJu0YzsoexX+YoB3KsREJIFYTaHCQG+03CrSj4aHh5iukhrLprBsCmP Id+40VRTNxP9hlcfvPQDIWlMXfRGwRYw8DM0/3BcnQsqGZZyBW4gXZuM3yIcZ9E= X-Gm-Gg: ASbGncukhdxRL7/SR+0NZJ1zzmsO20fwQeHeVJJvmk8nN+jfqTkp8msekK2jULOE7w0 CpgV/YGtcTTAQ88oc9ovENnHCWHpeEvn9hf5j63/2C+K/ZZsCulbHxf8vK7qKPArhTJCP0Gc/Cz NltCuCGmsn4/rE8sPbA0tBhFxjVHVPOwgPXaeai3+Eqg+u3q8ljP1gnz/GqISKHveBz+kHX0ldn RL+oUAI2WQvT8t4Hjzu9vItCMcGgZatDfd/spT9CmB1lNRd//UGHaBzz+mdqpJ4FFMS4+0CGhJW XlJKC1zg+cqWg0MJADQr8+W6SvDVGaDcmi+WchWQnl6C X-Google-Smtp-Source: AGHT+IEjELEcHkUSgYSyUpOQLSDQBfR3q2soKgt+mWzeI9X+HyRoUAOICNrXniu51BG9jWIge0MJZQ== X-Received: by 2002:a05:6a21:168e:b0:1f5:7f2e:5c3c with SMTP id adf61e73a8af0-1f5c113795cmr4514154637.1.1741973505987; Fri, 14 Mar 2025 10:31:45 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 01/17] exec/tswap: target code can use TARGET_BIG_ENDIAN instead of target_words_bigendian() Date: Fri, 14 Mar 2025 10:31:23 -0700 Message-Id: <20250314173139.2122904-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973532066019000 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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 ecd4faef015..2683da0adb7 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 t= he + * endianness of the target, so please do *not* use this function unless y= ou + * know very well what you are doing! */ bool target_words_bigendian(void); +#ifdef COMPILING_PER_TARGET +#define target_words_bigendian() TARGET_BIG_ENDIAN +#endif =20 /* * If we're in target-specific code, we can hard-code the swapping diff --git a/cpu-target.c b/cpu-target.c index cae77374b38..519b0f89005 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -155,6 +155,7 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...) abort(); } =20 +#undef target_words_bigendian bool target_words_bigendian(void) { return TARGET_BIG_ENDIAN; --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973526; cv=none; d=zohomail.com; s=zohoarc; b=Q7CdgF3UW9nQN/KWBmBndPQhFlPLrDCm/4GGzGcxVwy7uPo0bMAM3eM+h7DlYPO334XAgRPpHnY48eWQRCsQtQiugbsRd30a9mHt0Jjr+g4YUPYKWZBShLIOsqExLtbw//2YQFDhFA+7wkgl3u4sdfZNfrUG+X/KZhUTOIxR0H8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973526; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fjQjYNlvDIsMbe7+veFF5h4s6vvln32m8yANkT1fS5Y=; b=AGz3govQq9llOgaMn3u/Fr7TmUraJCVwZar9oPd3BpsWENHgPzMAPzEuafTrNKnSLyx0RWe1yzfWBUWRLzSAH/EDnrvStDCKpWpZpBMVCVFdvpsERRHHsKHDeY43Pxqt/995yDEQZFZnxYRym79DioWPItVWA9h4fV9jFr2d9cA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1741973526084156.82298159283414; Fri, 14 Mar 2025 10:32:06 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.914965.1320589 (Exim 4.92) (envelope-from ) id 1tt8sx-0002eJ-1W; Fri, 14 Mar 2025 17:31:51 +0000 Received: by outflank-mailman (output) from mailman id 914965.1320589; Fri, 14 Mar 2025 17:31:50 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8sw-0002eA-TH; Fri, 14 Mar 2025 17:31:50 +0000 Received: by outflank-mailman (input) for mailman id 914965; Fri, 14 Mar 2025 17:31:49 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8sv-0000Ih-ES for xen-devel@lists.xenproject.org; Fri, 14 Mar 2025 17:31:49 +0000 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [2607:f8b0:4864:20::62c]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 34f68fcf-00fa-11f0-9ab9-95dc52dad729; Fri, 14 Mar 2025 18:31:48 +0100 (CET) Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-219f8263ae0so42497105ad.0 for ; Fri, 14 Mar 2025 10:31:48 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:46 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 34f68fcf-00fa-11f0-9ab9-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973507; x=1742578307; darn=lists.xenproject.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=fjQjYNlvDIsMbe7+veFF5h4s6vvln32m8yANkT1fS5Y=; b=RBhlbKFT6B+RLi5oJUJxl0lHPgD0UvV+GQPzzL6HgsOHDqXz/PEaFUrGBgbU47Rfju VHponTgnpwMuQKMJCmXqdtt5njac1BoxA7uZoglk1f5jqzPQ8FBJ905mzrI24oy93BEW arF5LSrZ1rijyb/GUDfctZwY5zei/Zq9anY371yJpHkcyn7Mm4EExHUtM674C+PTxTWi Lf5C3+rxVt1PvD85HTZdf8dfeGp3X7Ndu5BydqPKpqSF1XY90uydWtD2/I72E7GOJ+hp xkfSd4Oi+zEJVmVlzqfqGYAaiLLXauLmiwFpBrOkuRJw+lJFPXl5sJ2KsbMM24BtmvEU LPvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973507; x=1742578307; 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=fjQjYNlvDIsMbe7+veFF5h4s6vvln32m8yANkT1fS5Y=; b=filHEVwuFyvYM9cAwvSCPNq1iZWhLs1bQyfHaJ75Ecp4NB4eWyb5cfGjxIHCGlRF2R 8GgkQ4GlDCQmfHJd4D5806mcoV5UMPvdPrg/mKzEhDl/0Q8c7OF9MoUaYNjms/Rrn+4R o92rTtt+WClt9FcaXi7LLNgw92XMwfcY4u6jiIDzMgtjJFUlk6jgk2LF3blstKh1WrL5 G2FTAqV7UdMchKVztdCH1KKfu2T1zPQJqtOBHvUv4X6mDiHGNkBSwFZf4l4f93ddaU5o NWGh6FZoVkQS0SUW0j2b5q3WkhSh60D8doX50YurDSKzNK+SsE1SdgTyGxD182JpKXYd xs8A== X-Forwarded-Encrypted: i=1; AJvYcCXMAYwC6uX4s1Yh997ZgH4iP3MOlEEgVxlTE7sCaTa1Pthvj4OLCemvoJN4Kp2nciWtUSm6C9qIc68=@lists.xenproject.org X-Gm-Message-State: AOJu0Ywg8F0R29N8CSU+nM71+t6XYZNtgBVEQZXMrnm9BTBxc1OvK9cw nzhiMOOfLjAtwKoErFpHYB4CBJU0O6PGXyDODqdQrrcNeCllvcK+HeHNmZxqR7M= X-Gm-Gg: ASbGnct/76THHAy24uyo05dac14yUmoDwHiGDBuJM7yoLd7/hZBVwZrg/61TYhG4efB ZRi3KC6nFNIcQR+VAfdwC3p8D4130+t3rmG9hDobTLAKTa+oNWauq2zZMEkVezvv/l8S/IYBOt+ g9JhwSGVMVnoOS8WhpYbHX9VmWCKGeB3jdxIyH7XxH4smcrX9dPmbI4HEvjXCqCUiE3WhVBmMZP TgTy+4XlIVLuW0oH1eUtVdUVkKlzYyh/mHkqcDiJHKHfNhD9vLxdL10g7T7RoAYONYE4NBM18xM TWOmTrV/PM+fJ4uM3TpQoZ0SjKYOqX4rOqLo3ND/GCfm X-Google-Smtp-Source: AGHT+IG98FFUYfg0sUj6szpvN+iBBsyjmwTHoAxx0itmB7R9pQNc8XnfcIaBUehzGw+xAOY05im+Eg== X-Received: by 2002:a05:6a20:c106:b0:1f3:47e2:80b3 with SMTP id adf61e73a8af0-1f5c11c3cd2mr3981620637.20.1741973507092; Fri, 14 Mar 2025 10:31:47 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 02/17] exec/tswap: implement {ld,st}.*_p as functions instead of macros Date: Fri, 14 Mar 2025 10:31:24 -0700 Message-Id: <20250314173139.2122904-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973528266019100 Content-Type: text/plain; charset="utf-8" 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 --- 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 8cd6c00cf89..e56c064d46f 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -38,31 +38,6 @@ #define BSWAP_NEEDED #endif =20 -/* 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 */ =20 #if !defined(CONFIG_USER_ONLY) diff --git a/include/exec/tswap.h b/include/exec/tswap.h index 2683da0adb7..84060a49994 100644 --- a/include/exec/tswap.h +++ b/include/exec/tswap.h @@ -80,4 +80,74 @@ static inline void tswap64s(uint64_t *s) } } =20 +/* 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 */ --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973536; cv=none; d=zohomail.com; s=zohoarc; b=aEhTtV2DVY0Ipw3nEeh8LLPU25SAc0rpe4Em27ShA52A7z9QhIMD4KNN7HGcLQsYzxMFAPrVT8jb8CUDoMGvkJiqK0jP1oTwT5oVXYWStPCeuRcQDh1sIk212W8vKas1oeCLazCw2V2gGjNGC53WKZlH9aXzCqP35vCCOZqywBA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973536; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fcP4MFj0H7Fu3AxOxTbJlPG2KgbdJwiBtz5sSPdKZDU=; b=do0K/9i1De/3L5g/0j/1263s4yBMZWx3WS2zSRI2+bhuaGU5HLuSMycwh/5/7IkZdEhWNhfN3mofIY7tN12Tx/Q5VdJeaOWn0RayyGqD1rj2RzvXgllkkWXfhL/sTU/vQoJps03zt9w6+UNqxpibzzFmdeSqCI7lbZIhwJzdJE8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1741973536625122.51613596886568; Fri, 14 Mar 2025 10:32:16 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.914970.1320618 (Exim 4.92) (envelope-from ) id 1tt8t1-0003Wn-9F; Fri, 14 Mar 2025 17:31:55 +0000 Received: by outflank-mailman (output) from mailman id 914970.1320618; Fri, 14 Mar 2025 17:31:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8t1-0003WX-4g; Fri, 14 Mar 2025 17:31:55 +0000 Received: by outflank-mailman (input) for mailman id 914970; Fri, 14 Mar 2025 17:31:54 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8t0-0000xy-14 for xen-devel@lists.xenproject.org; Fri, 14 Mar 2025 17:31:54 +0000 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [2607:f8b0:4864:20::62b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 35a4cb4e-00fa-11f0-9899-31a8f345e629; Fri, 14 Mar 2025 18:31:49 +0100 (CET) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-22403cbb47fso45115365ad.0 for ; Fri, 14 Mar 2025 10:31:49 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:48 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 35a4cb4e-00fa-11f0-9899-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973508; x=1742578308; darn=lists.xenproject.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=fcP4MFj0H7Fu3AxOxTbJlPG2KgbdJwiBtz5sSPdKZDU=; b=aZSmT5jRYQBGwWjDtUsLhl678rFHFxibP6wFupLEeQfhK51rdf7vzlHlot1wwzCOWr 6z+WeKKOt7mH21sI7aHma6+ZZDWTHjxuk71TmFUNxcdsf563lVpakWmSyHTF5ATgiHZY RmIjQOyCN3szcmMyeT7eCltnB3oAsTPrQVpu97zLeP1d+lXOgc9DgzPoQbDX9bxeVtZ8 mYPEMDpkgelXxifhAZT/+fWqXGgvtQr9qaUgchnQOoYnPN+nuj6KlwEkFflGFNIIOua0 5ddaFumi/POqtFPe9R07GH2CKNK2KA+v0Phi1gW+lIYsSXg2+EmkyA3aW+3lDZ4H4DI1 2OJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973508; x=1742578308; 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=fcP4MFj0H7Fu3AxOxTbJlPG2KgbdJwiBtz5sSPdKZDU=; b=ph/uPrg9cZD6Me1mQTBXF7V6c/SFHblPw7uP/pSBFD/f10Fd/kailEB8ldoV3KHvzN a91MTAOyBgsGOOA7Ar024mWcA0CrWGSk2jJjMBkCMfscHB2G8Cu9r/b0oeCO9OMCozJi /LZuT/3ioJqfXgiZetFw9k7RojD+vz+IwFZixRVhbUY+8xhfRT2FepcPQdqizgy7ZSXm TotN6Mm6WtYDR+mjycujg1ny3SAbcoYLz0PImMYcxggVN7dNd6b9AXDEJoM/NXaAJOdH r7jRBmnwUZJoK/bWhxZ4v2bYROwo7CNrGTCZgc3Mx7IK5fXsGcWpe97M0Xw6J45xg6+R 4j8w== X-Forwarded-Encrypted: i=1; AJvYcCUNFO6ji0Y79I25P6va8OwrIGXyrl6HNMR9DLP4CIWf06TipHTabQ8VQqY+NUig5M4hZQ7ItAyHD1U=@lists.xenproject.org X-Gm-Message-State: AOJu0YyLc8NqywL1VahYe2JW1jCeT0WLe4sMfJ2U2Je891jQUs20aZsm aWX477x2O0Rxc7RJ8fSg9b05+HK+01AVDKJIYZeltniIXia0Fq94v8CsLTtUAJk= X-Gm-Gg: ASbGncvNduuzzVszGfIY2xCdhIHc1ebyguYcEF6Tobqu+iQjIo3SPvRzfQXUY5hIWco CKMA3IjZgegL6LTOaSCMuwKkDneDM6JABgIhPza6W7o4DKGTUcz/8bShz4iVLE3CcIcKfmM0YAk l4v0qufsZeCrNT/MjfkbnjFC3ui+6cAaQuG7ubaoPVaPBxBw3O8nXqnCNPt9+Js0XVnCQvcuUDI qmwHChhJ1kdnviTPok0S3TCP8iVeq0nwEgDSNpU7ujElfOgmJam87LbwgFKzA/Eg6tZjMynooqy MqrQq48Ym0JliCEil+dDG5OMom4iIqGTIZro1iLZPWjm X-Google-Smtp-Source: AGHT+IEybdH1a4UlSgUtF+/hwXdxnavqEZfmFC1l+XuioTIMcBmIgOmIQCQoptJbICxTDzesMl+Yag== X-Received: by 2002:a05:6a00:a1f:b0:732:5164:3cc with SMTP id d2e1a72fcca58-737223e7399mr3832395b3a.19.1741973508455; Fri, 14 Mar 2025 10:31:48 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 03/17] exec/memory_ldst: extract memory_ldst declarations from cpu-all.h Date: Fri, 14 Mar 2025 10:31:25 -0700 Message-Id: <20250314173139.2122904-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973538295019100 Content-Type: text/plain; charset="utf-8" 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 --- 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 e56c064d46f..0e8205818a4 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -44,18 +44,6 @@ =20 #include "exec/hwaddr.h" =20 -#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 92ad74e9560..7270235c600 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 . */ =20 -#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 =20 #undef ARG1_DECL #undef ARG1 #undef SUFFIX -#undef TARGET_ENDIANNESS --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973540; cv=none; d=zohomail.com; s=zohoarc; b=OHJDddvnKlwm7v5IZ5Xt0rTdU3dG1378WQv6EpRQbecaLtmrl2b2u4KDyXEffOrpKHl4UF8Z6O54yiA112VXUtwGCd2fdqWWpE7L5eyTn1t7GO+i6D9kMT0Bwb2BCa6yljCscF8kMJ0+QMcCW7tG1GEX7vda5NQw9BPGjlT5Ip4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973540; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=G6OuFeXnonCJBRRaCKlE2hD3nLeAbwsquVgoLJADjfc=; b=FpjKapeLboKXu1NQ2g7u+WA0CY2IQA+Arl0/VPWXDrC5Oi2MTnSiZHXGJ2Si9Ks13cmhyfYfuMpVuohLRJNkTxL301t6/n+Ofyb2geLsvN2wh3HRqkzcYpK1Hoy4q4eENUZeRIIl+YBlQzjaxYb7xkNujlDcsT8PRnYuwzdG7Gs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1741973540008870.89566806812; Fri, 14 Mar 2025 10:32:20 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.914971.1320629 (Exim 4.92) (envelope-from ) id 1tt8t2-0003ph-MS; Fri, 14 Mar 2025 17:31:56 +0000 Received: by outflank-mailman (output) from mailman id 914971.1320629; Fri, 14 Mar 2025 17:31:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8t2-0003ny-Gg; Fri, 14 Mar 2025 17:31:56 +0000 Received: by outflank-mailman (input) for mailman id 914971; Fri, 14 Mar 2025 17:31:55 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8t1-0000xy-1I for xen-devel@lists.xenproject.org; Fri, 14 Mar 2025 17:31:55 +0000 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [2607:f8b0:4864:20::62f]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 364f078a-00fa-11f0-9899-31a8f345e629; Fri, 14 Mar 2025 18:31:51 +0100 (CET) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2232aead377so53466945ad.0 for ; Fri, 14 Mar 2025 10:31:51 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:49 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 364f078a-00fa-11f0-9899-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973509; x=1742578309; darn=lists.xenproject.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=G6OuFeXnonCJBRRaCKlE2hD3nLeAbwsquVgoLJADjfc=; b=RPGjC7gs8GTHNpxWHD/FaJX63VphE9wwtO5FlkiiHbgEVnz9ApA3mq2o8jDlbWEaMD 1h4PJhmP1da/RMK0ngfYJtXlsH8x3vpOdv6f3wVkcAbDZpIDK1+6Kl6EilsNijw9uZdn c6pV4HJaLqIapDmCBVNlnVPkxayTO3Jl5wROGcrPW0sOe8dEpI92J3KpbiLh6tBPasmn 89KTC0A4BbWqaZriobp4iZY/rS3nUdZCVESbWM+O2xQlLJfftgGIWVCLDBZjvLcBD7+2 2yF/BhBYlAzCY5hmL6Clf3Cwv4soSI1u5c5CkvOXXCqqZKT8ZzWZw4WT0Yv881EFa/mW p/Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973509; x=1742578309; 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=G6OuFeXnonCJBRRaCKlE2hD3nLeAbwsquVgoLJADjfc=; b=RC/9Ph0hO85vneEYSTSxR2R8KfEjsGQ5bXfBdxQWfRbNoiq6s0KopDGsYA64P7XEt8 T4kEOy+uKDwUZ+NaVuJDlGGDH4sHE94z+nnphiHKLG7JodQDt+e7ZD7b1tSXlR0SBQoM Unedok2YcDgh8dLDU1tfICWY5wvA28Vzx+84REI1C/CF5drSuiHrkV1RYk/b7x24RS+X 1x7ljkzroY0nq7nAzpQSW2NmFotoEykfPFLuUpnM0dAKyHiwQ6ljDPUtWYs17jTkTFrY 0hdC+o1Zo4Y5wDIIIz0PzcbmyuhBRr5z98jpB/EFy+6sOLfG8V5/n1/WDpCWLvvj0Maz ovYQ== X-Forwarded-Encrypted: i=1; AJvYcCUNn2oKb2Ml55R1w6Wwy+zoYyZlBoiWqk7ub7mD5Gi3sMTo+vcTfPS2xcgvuRpzknLXky3cAsVQhzE=@lists.xenproject.org X-Gm-Message-State: AOJu0Yx2kDItZogCcZrV7d5GH3o6EkTlY0vyxxHKZwYkYC3RnBqfj5sO TKkiazoMTAFIQ9AZ+7ti9J4M9xeGXGUq67COC5JZn+f4FS09mpIjc+jQzE6LwKU= X-Gm-Gg: ASbGncs8AQEPVAM8yRQcjqkxIYXkWH9pEVYbY+M5pWN9QXpH669sh9Ijuzv4F7AZE7Q YksuVSmL52jl0UBwgt3OLr1yUgarb5b95qlQcTIMEMhAdrUAJiuroGKr5tMiqhZVKvOxfHxHsjq RRxMGtwbJlxShz5uQTChedhPJq+nPdTAUaE0jHAOqSCdkNG/mH/IXZ3qAlJfRAYK+BeVVJ303Uv evBrsEfD1d8+7CZGI5hHshL40CjxhZkIV0fO5KDgnaUX8bWCtw+qu/KBbqyrU7ms9t6uTJHZqBJ a0X64A4MI46PkiTcfPHmujVCo2YyA15aBBleW25dfjI5 X-Google-Smtp-Source: AGHT+IFQBeqqn3ezA5En8rRFWwDRdkhHWJ51dC4tNWFcY4zpXwmWJXk93HseKx7PQbRLNq1zxfYk9w== X-Received: by 2002:a05:6a21:1519:b0:1f5:8a1d:3905 with SMTP id adf61e73a8af0-1f5c10f7d60mr6252806637.7.1741973509576; Fri, 14 Mar 2025 10:31:49 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 04/17] exec/memory_ldst_phys: extract memory_ldst_phys declarations from cpu-all.h Date: Fri, 14 Mar 2025 10:31:26 -0700 Message-Id: <20250314173139.2122904-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973542312019100 Content-Type: text/plain; charset="utf-8" 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 --- include/exec/cpu-all.h | 29 ----------------------------- include/exec/memory.h | 10 ++++++++++ include/exec/memory_ldst_phys.h.inc | 5 +---- 3 files changed, 11 insertions(+), 33 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 0e8205818a4..902ca1f3c7b 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -38,35 +38,6 @@ #define BSWAP_NEEDED #endif =20 -/* 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 d09af58c971..da21e9150b5 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" =20 +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(MemoryReg= ionCache *cache, } } =20 +#define ENDIANNESS +#include "exec/memory_ldst_cached.h.inc" + #define ENDIANNESS _le #include "exec/memory_ldst_cached.h.inc" =20 diff --git a/include/exec/memory_ldst_phys.h.inc b/include/exec/memory_ldst= _phys.h.inc index ecd678610d1..db67de75251 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 . */ =20 -#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, hwad= dr 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 =20 #undef ARG1_DECL #undef ARG1 #undef SUFFIX -#undef TARGET_ENDIANNESS --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973543; cv=none; d=zohomail.com; s=zohoarc; b=ZT18O0b7CXW8mN15GiVtLfm5bHhkpOf4oXaqDy9FQ3GWzh74svJ9suh3iGzsu6EHI5tK06Sz2FYeBuvBpbKaJ9y7bvQ3HSM3USS7Tuc6BCC1+EyLKfK2aK5PAr2cz5hsSZMKQD8SZO9BMjl9rP0JVdPpu7/sQ9mI9TqBooXTX9M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973543; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wT5ohu0Ui7xrH+jgYqMJMpKemGPcZNvy7jzdyuAyzEs=; b=aVprRkUjohYcmOjrxJn8mLOAT/DhsbspPReVnbZFKyRd04LoPK+iuG4JQvNL5WcEcqeSROXOxZpn4fbXX9Veq+D/VuIspdcu1BcvEOmu1w08DhYmzifA+cNqLNvUOxjPCp4lZmVdG1yB1i//JDNAxRNT50eT5R92pSOjMhA73yM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1741973543470291.8039530100948; Fri, 14 Mar 2025 10:32:23 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.914972.1320636 (Exim 4.92) (envelope-from ) id 1tt8t3-0003uv-7v; Fri, 14 Mar 2025 17:31:57 +0000 Received: by outflank-mailman (output) from mailman id 914972.1320636; Fri, 14 Mar 2025 17:31:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8t2-0003sv-TY; Fri, 14 Mar 2025 17:31:56 +0000 Received: by outflank-mailman (input) for mailman id 914972; Fri, 14 Mar 2025 17:31:56 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8t2-0000xy-1c for xen-devel@lists.xenproject.org; Fri, 14 Mar 2025 17:31:56 +0000 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [2607:f8b0:4864:20::631]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 36f5e975-00fa-11f0-9899-31a8f345e629; Fri, 14 Mar 2025 18:31:52 +0100 (CET) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-22398e09e39so51803695ad.3 for ; Fri, 14 Mar 2025 10:31:52 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:50 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 36f5e975-00fa-11f0-9899-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973511; x=1742578311; darn=lists.xenproject.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=wT5ohu0Ui7xrH+jgYqMJMpKemGPcZNvy7jzdyuAyzEs=; b=f1rpiZP08QqLZ0CE8ZYBaNMBHT3mDjfkuGEoFwa5xnlGPoeDoXlGN79fNiMqYibPe8 6qjKXtbQ0Szb3u29Rq7MYzy2p+Q0GWEJQYfNkKPlTQLvtI8B3Q77+fR4OSVItNkJ8kxR Q5b7Cu9HZteDdU3oJcajBfg+F2LFunfmAuK9ONPKq+XuAxIDxsURbjKYsdaNSgfsTa34 Xs2W6aZp0m89YouxjIhOLiEIc+KXRO0s1O8xkLcIRAa1Y9Jn/5QHxh9SbenchgVqo29d TPMZCdG3qVvwlGZKqVJc860PH62lrEwu3CwCr7Nzo2HFNSyMYL+zKo2B9UYqA8rNJzVT I9zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973511; x=1742578311; 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=wT5ohu0Ui7xrH+jgYqMJMpKemGPcZNvy7jzdyuAyzEs=; b=EJ/ie68UtR1IP4x/+5dcgMIzl3T30uvYXXJmrVC/dxFq2A4TJe5/CS/rH/R+xmx5fY 7JQ8obTcPAdtFhVaAitgwFM1OcTyhZI+LKmbMN01cRRo/OYcQJCrZmufOXWbWMPnI3Co czWtmxhJdzCUNUW77JHo9Oh4627IyVTU29IayCJjY8T4uyQ3BJW0So7Zp06uouSfaET8 dfEEWfNbg/H+vQbjOzjEBuk/Thuyab90vBCcFKfB49jc5QaY3MATtA5wD6A033LMKPzn lZBX6WflDB3mzkQxEh9jkcs3Wnf+z4Cq3VkLMetLSv5CumY4IWK4tLl1i2UWKeC1NQTm 1mpw== X-Forwarded-Encrypted: i=1; AJvYcCVDioyIjEYGXl1AtwooesWV2bYFCv3QAxAHOj1/0dE+EGt9K50fuYbuveb27cwj2p+9RBXrP9Hf4wM=@lists.xenproject.org X-Gm-Message-State: AOJu0Yz1RapwBRmDOG+F9TY8UndvNLw+skM5Hc7iZ3u38+9uC3PLs3XP 8ikioUPSCkSwU0eW5/9E2qhcu4Sg+VYb3QJaJ0F9aQv5kQdS8fsjYUzf3SxQw2k= X-Gm-Gg: ASbGncsFXSc5mpz93nx+jLZOpD3h0YwrBNlMhS+ryukW0iVJ+NhkBsDp59pEhRsUmRI V/FtN84h3ETpRItdKEi18XbGPCIF8h73bIIxGhU2tKo8yUL2kb+FokUI77fV/+8SXHxrIERcSLy nwF1CTkyBM15j/cI5i46i6JLpAOrCErPSsOxzWlrXDh1NK/p2DcJcqxLU1YaB+BH9oh3yKQBEhA calnf9xlspaUMl6Gb2V5xG4zz2ROKP4W/CAuDl1kdIEAP0SBtjwCsI3Bxrv8AMYa7UvdKNAqfER amJcP8gQIgdbvVNYl+LY2sNt6A4U0wQ1m7+8QrCywy98 X-Google-Smtp-Source: AGHT+IHrpliMNKDFJoDtMC4n7ul1BPKlqc8CVK3A1d9AQSWcUHjtbEMPub70Om5ILhqP0o6bsvQnoA== X-Received: by 2002:a05:6a21:9005:b0:1f5:75a9:526c with SMTP id adf61e73a8af0-1f5c117e146mr4872005637.13.1741973510710; Fri, 14 Mar 2025 10:31:50 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 05/17] exec/memory.h: make devend_memop "target defines" agnostic Date: Fri, 14 Mar 2025 10:31:27 -0700 Message-Id: <20250314173139.2122904-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973544098019000 Content-Type: text/plain; charset="utf-8" Will allow to make system/memory.c common later. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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 da21e9150b5..069021ac3ff 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); =20 -#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 !=3D DEVICE_LITTLE_ENDIAN && DEVICE_HOST_ENDIAN !=3D DEVICE_BIG_ENDIAN); =20 -#if HOST_BIG_ENDIAN !=3D TARGET_BIG_ENDIAN - /* Swap if non-host endianness or native (target) endianness */ - return (end =3D=3D DEVICE_HOST_ENDIAN) ? 0 : MO_BSWAP; -#else - const int non_host_endianness =3D - DEVICE_LITTLE_ENDIAN ^ DEVICE_BIG_ENDIAN ^ DEVICE_HOST_ENDIAN; - - /* In this case, native (target) endianness needs no swap. */ - return (end =3D=3D non_host_endianness) ? MO_BSWAP : 0; -#endif + bool big_endian =3D (end =3D=3D DEVICE_NATIVE_ENDIAN + ? target_words_bigendian() + : end =3D=3D DEVICE_BIG_ENDIAN); + return big_endian ? MO_BE : MO_LE; } -#endif /* COMPILING_PER_TARGET */ =20 /* * Inhibit technologies that require discarding of pages in RAM blocks, e.= g., --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973543; cv=none; d=zohomail.com; s=zohoarc; b=QQns1uiSi3IzP6A5HzV6MZOuQIA2lbBd7hb1xWuvPjAu3KgeCYuWGbYbZomYipfcrkQey9cx9GxRoFcdM42OD0Xwx8a65nHy0Nodhl7L5KoTZeRgVWN0WS/kU/3Z3Ujm8B8XKs5HSdL1V2GkJ2Liknl2e+4X4ZYzI5SRHnBBMrw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973543; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mZcjdDtX1Z7JVvsuWgguTldfqVr7ZBWkV3i9i17ooa8=; b=hXHXl19Mo1rsRAEAknLGdT38u+cqQ5tl+rbVUnEmOhGRUYkHPE/E7RJ03FFwwjUkNK92FmuYwqRA8TQBh4Xb15cFe3oPZgSi1vlwaG5bQ4+cLAv9gne7sUVXMcKnIiCO47dRV1DORWfh6wS4Kbx5XMPtN72lCCaXv6iHmMziI2A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1741973543853454.7248447412552; Fri, 14 Mar 2025 10:32:23 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.914973.1320649 (Exim 4.92) (envelope-from ) id 1tt8t4-0004Kk-VN; Fri, 14 Mar 2025 17:31:58 +0000 Received: by outflank-mailman (output) from mailman id 914973.1320649; Fri, 14 Mar 2025 17:31:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8t4-0004Iy-KR; Fri, 14 Mar 2025 17:31:58 +0000 Received: by outflank-mailman (input) for mailman id 914973; Fri, 14 Mar 2025 17:31:57 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tt8t3-0000xy-1c for xen-devel@lists.xenproject.org; Fri, 14 Mar 2025 17:31:57 +0000 Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [2607:f8b0:4864:20::62b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 37ada7f0-00fa-11f0-9899-31a8f345e629; Fri, 14 Mar 2025 18:31:53 +0100 (CET) Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-225b5448519so44944565ad.0 for ; Fri, 14 Mar 2025 10:31:53 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:51 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 37ada7f0-00fa-11f0-9899-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973512; x=1742578312; darn=lists.xenproject.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=mZcjdDtX1Z7JVvsuWgguTldfqVr7ZBWkV3i9i17ooa8=; b=On3N5RnjG6CDLw0GxVnAXIuA2OOm+JODVdFabP//UbCFxQA7lH310ewQwBC8PtGA7K 6nbcZiHyn4LkmPRgIhpL0IEqetTK5oIl9TYH3En/OMnxSJF87edR6wDQQG8tlL2lYlKm k9dbc/oSC7cQ1O35ITZ2OlRtNUkHQMC7VUdyN8lUgDBbGQ/wLeu9NPkqEbCzZKR/qcRE 0MoPBIqvkU2zTZlMUceg5h2Izev2J1rqrYCKe9nuqWsKUs/hUTFKTJwDzdFoYRNlL8tK qVCbA2EhKo0yRRF+Lk+U7GVU2l+fAcDLdeVTgHSw3DB3YIj4EjHBfYYY2SeF2d1VoYRp teyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973512; x=1742578312; 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=mZcjdDtX1Z7JVvsuWgguTldfqVr7ZBWkV3i9i17ooa8=; b=eIB18KERE368Ugw7m+yUXbQf+OJTBHUoCFPeeYUaNJ8xziIlJo+MCd32uUsU9vvNpT sHKIcJYlJDdoHnRUSR7x/9eaHlEhojv4tcuzBgk/g2eYprQjc3Dyk0KB8slFmV0Udomh nS7esWbsLoILk9vXoDExCmVt873nbfDuc5jBFwCBk9FGVDHxbKTAwiKBb504jeLbvQEN G2hfApxZvqh6w+andSPxzWCRUSdf+Nc/Yu7ii5xDaRfVmSEYxyAHZOG3N/9/djumR8kT FnnvoC8F0GihABqmxTiqhoPFf1ufCp5NKfQed81g4xnIC0WEHjO5a0ZpJXWJ5+rGzEoS IWJg== X-Forwarded-Encrypted: i=1; AJvYcCXZ+lPgb8Op62q261hmJ/W7wfQWG+FCOr1lDIIPKqPI3UzPxS651ME0I6ygRHmmvbatyLKiyR73YNc=@lists.xenproject.org X-Gm-Message-State: AOJu0YwPYGDEXnu7ZcrjCuFk5xBxL0YhdIvKOO8sv+gFt6LqpDVSD7IT D/la1iUbUalqODNZbf+mfv7rzSXKVss44Qsmys5gUgONtmSa8l3yGoZsVjFb3UI= X-Gm-Gg: ASbGncsSSWZQigfSjvlKT0b6AMDd8rrN+pX9Fg2vS3YUjmIi7+gNMHBQDRACrktNQxn lvjbybsnPgeypGCJEkpVpIl0Tfw1iQ4aTmXaq0oortixBXkmbE9A8BWkExqwR5o+zCErVSz/gQb trS5qJ2vAfDOxCQJd8vSZQbKnPfEXlrvYWB0junCovQn/nnTOS+6FNTgHamuWyNYe+rdmqcc9ba t6XJV+3fOt/ba9p0JeWLzl0CGwxvyQupa55q1O2xjCqz+hSron7pDDw7xMpdtZ+SwbVhlx5f7AM i8eYuEFWLylImewSp/84f7dFO6sCKgkUviYuxhR2IBv+ X-Google-Smtp-Source: AGHT+IEORLbJQZPgomOf1sDjTcDkAnGl+mlFCK1VHaTDHzBWmfJYoIo2+c2hSAC++5jNWglDm/0AKA== X-Received: by 2002:a05:6a21:502:b0:1f5:8179:4f47 with SMTP id adf61e73a8af0-1f5c11d86e1mr5274835637.20.1741973511929; Fri, 14 Mar 2025 10:31:51 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 06/17] codebase: prepare to remove cpu.h from exec/exec-all.h Date: Fri, 14 Mar 2025 10:31:28 -0700 Message-Id: <20250314173139.2122904-7-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973546373019100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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 a02850583bd..bc46b5570c4 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -9,6 +9,7 @@ #define TCG_TCG_OP_H =20 #include "tcg/tcg-op-common.h" +#include "exec/target_long.h" =20 #ifndef TARGET_LONG_BITS #error must include QEMU headers diff --git a/target/ppc/helper_regs.h b/target/ppc/helper_regs.h index 8196c1346dc..b928c2c452d 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 =20 +#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 201f6292033..a79e398c132 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 6faf0e3ca8b..41306fb6008 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 3f81144cda8..84ddeb7c26a 100644 --- a/page-vary-target.c +++ b/page-vary-target.c @@ -21,7 +21,7 @@ =20 #include "qemu/osdep.h" #include "exec/page-vary.h" -#include "exec/exec-all.h" +#include "exec/target_page.h" =20 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 5a189dc3d70..c422648cfdd 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 b99c4a39a1f..e9c8d7f7780 100644 --- a/target/riscv/bitmanip_helper.c +++ b/target/riscv/bitmanip_helper.c @@ -20,7 +20,7 @@ =20 #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" =20 --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973782; cv=none; d=zohomail.com; s=zohoarc; b=e6duVEgIr4JudEgfYGVFh9LgUkuUmAptk/YxHF1fLyjYt8M5qIcvnxu6qG86/gPjFRKmXcjFe5tpfqjV5bD2+Nyrk6dER5kiQb82YLygkXWlJ2FEI7vAG8B8pQdqHJGkd8J5g4bjoqQ52zI1/Vsqu3P56JD9Yw5+IYudIMEhCAU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973782; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bYYGOsy+zcSjxVOnigwMonGaAhWbZB7W76ZyOX5Jlgc=; b=iwSBVxGkWZ0MMyjkMBjPWQaMPRw5aaNn1kh8yEzcFg9RZsvK8YeZdF7yysI6tqJHBF5FxCU625u/2HX3sEW+gLA24R092hwKXirbcKftgai0yTkz/i8Z3GDsrRQM65C6+PDww6sfUNfS+lso0p2DZIUArp260wfVhwpT/UsPVls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741973782126509.94432300595145; Fri, 14 Mar 2025 10:36:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tt8tm-0005wW-OT; Fri, 14 Mar 2025 13:32: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 1tt8t6-0005as-Fk for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32: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 1tt8t0-0008F0-Mf for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:31:59 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-22355618fd9so48789715ad.3 for ; Fri, 14 Mar 2025 10:31:53 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973513; x=1742578313; 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=bYYGOsy+zcSjxVOnigwMonGaAhWbZB7W76ZyOX5Jlgc=; b=H9duQxFvfjDJ/5RWK7zM0lYMQNiNW83G69CdomQndShsG0t/7YILuSCNLqX2ihNS/D i+B6XoQzVfYWuwsauMEUySfWjVi1N4w+JhsXwe/vPgkkjVOGKkk3bHnYW9NbwQzDd/WL BSGO47p2tQV2Zi9v0WOTK+B3XwknoHEsl2G1BKwEymS5tGs/2zHGaFGBzJAA4YPamiyV P5J14SyIpc3YZ2UKY2Lu86TH9yVmHCwzgBPWMsTdp8qu847nuevOTU98prGZ+SO5EgNC /4Fa49yUr2Xc/68pP6D/Q2tXMT80Pfzs8TI8hDv+nd1O47rMk3JrgtD9kfsTqICx8tyL FUOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973513; x=1742578313; 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=bYYGOsy+zcSjxVOnigwMonGaAhWbZB7W76ZyOX5Jlgc=; b=WiATb9ViDEHCL2eOfd4c6K6V+sgKSrwy0+gjKSbZZ2nhciW0KO4koiDhCMlf+UbLum yV47H1LF8RQjtE8ld1EtMbN8iZTqal6ddz7Zpe12EMUGgt5yz4scdLw96pTGaVR3OB6/ RpP0bWHrQP0oYftHztSfIKloKNuuKfdohQmoHqCmvkpbhk0LMVJqpevrn5fbw1PM4XZp vbTFEvL5hhuW26ULQHuW+VSMSDVYgZ4hndgfdwJpy7cUQ4nPPX9UyrH5/1zHKOTX168m VJsjMsMq7Gng/vDHHMSJ2Snmhk9Kt8nOYx5T+8HFugJnvR6l2dEXzJq15VUSG1qo2T9A /c5g== X-Gm-Message-State: AOJu0Yz8j9xEhNUz0bPz7yfNL5sLUOu71fhSK7wcEhoDvPsVwPEubccZ z3JgV07gAIGyYHL+MbU6qAGZQAmRuteboxSQxYNP+2X5yNajJrvOgCSUQlt2ChKeQUoXDByxBkT JAF4= X-Gm-Gg: ASbGncu7IbygaVXxiCWeGzw987XONgc8yF093/5EQwl1juxgDif0qpRwfSJUE9F841r 8OJ7uA19rD+DAiJywQUuOkfx9GLEEGHV0bZK1vIAQmzam5MPPgtMibMfdk/PM9QFDVRLZR7B1OL Lpo9NHAArecb/fP3T+CZgZS7YTBMRflAOxtXZGTKsvk8QPBeBoWgQ0PPLFqECUhp8SH03ObJkDH qL2CVN86fn9h++qAZFFIMpgy8S8N50Cy8UW13yHXjAdedhS4D09kpM9/n0VywaZWu+4G+QdwsMd KPwUCtoNO7eEENAwQW8RR0xITcD4VtMB0HbCJjOWjlPn X-Google-Smtp-Source: AGHT+IHKJWanCd9a3ngVFjdniRCV0nA3qgwDHy2sNxgD5gHXjvzGRnW7PF30BgY1b31dJB7uC0Yy3g== X-Received: by 2002:a05:6a21:7308:b0:1f5:64fd:68eb with SMTP id adf61e73a8af0-1f5c1137439mr5964561637.7.1741973513079; Fri, 14 Mar 2025 10:31:53 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 07/17] exec/exec-all: remove dependency on cpu.h Date: Fri, 14 Mar 2025 10:31:29 -0700 Message-Id: <20250314173139.2122904-8-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=pierrick.bouvier@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973785098019000 Content-Type: text/plain; charset="utf-8" Previous commit changed files relying transitively on it. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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 dd5c40f2233..19b0eda44a7 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 =20 -#include "cpu.h" #if defined(CONFIG_USER_ONLY) #include "exec/cpu_ldst.h" #endif --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973582; cv=none; d=zohomail.com; s=zohoarc; b=HO6fH+ctG/Lr6w4C3VoY0TTOjzr9fa9XcMDOaW2Hw5FZ8j28QUiucAW/lgzdoR/fgMKhSPjmaR9qc+7AZp+OiUTHWa8AnmGMlnhS+ClHBi7F7y/tqVx+mw9bebPUrKPtx6b1ODbO/z/VaWBEaC0PMbmqGhCIAlUIDDbR+pMOduU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973582; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Rp8GQC6vA5rTxSSazblnkjuLZPjrJAYUOFg9uGM493s=; b=iKR6g9nwno3+g6e5qamlkTTASEdS5lRsZbXO7FTvUGZJKAW5NDQoWcZ9jPRc5CffoQLQJyfUMMIL4KhwjXlwbbSVNiqaob96Ngb5lpbpPv5ZUWmKBMBpYFHpX/giSCGVbtaMKkfAX3Oc/yPetyPAG5Hjtdw3zBJ250byooH9FB4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741973582804214.22098834031272; Fri, 14 Mar 2025 10:33:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tt8tb-0005qj-MR; Fri, 14 Mar 2025 13:32:31 -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 1tt8t6-0005av-Pz for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:01 -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 1tt8t2-0008FU-02 for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:00 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-225d66a4839so27410665ad.1 for ; Fri, 14 Mar 2025 10:31:55 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973514; x=1742578314; 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=Rp8GQC6vA5rTxSSazblnkjuLZPjrJAYUOFg9uGM493s=; b=rcCAWRVOqdONLLa9THoKi/dZLe6yF2jipUj1xzob7exTSojrLaz6WcO+Y1MEcu9noP ETbQQ/bWjuUN4g5RCJjiSJOjDXNeGGm98n0Wzo5BxoF9W+rPQ3LjzI8VV/sF70+Vhy3z X4M27tmJUv5NIZjI6i/l+iaTH5M74wCQ9N299ee6DeDUTKjq6/pzdGnCKKR8X96VcuC6 gAtMlulzFjpR8GghTP7o3J5wVUmU8ZUtu+JRHnHXvHNvEypPNnvlhkxl5pMY+GsPXMUE r0yY8nlPvWzGmqyGhWws+oHBfebZJ0PxoTk4B1trM2+irJsY6vRFVmxc0t+sYdFI8Cgm pVZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973514; x=1742578314; 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=Rp8GQC6vA5rTxSSazblnkjuLZPjrJAYUOFg9uGM493s=; b=VDIElCEG9wkgEToTelfdzedDNY06Yn3e7+NhnXeOimoLYOTEtCEcX4yFuwrkCZOheW d0NhOWpxKeiSWb5WL5S7n46TV1rwMcJ+hxfP3yVSMcARcLAkVOXHEP2YNsH0Fx5O6mKh wwq7g8/Vn0y9qyFX6qXZwuepzVROy5TiafK0FwXV07qUcdpmiiqMJvwPOHBi+pd3E39A tJsRoCDOw5MEHsijY8zDa1ZTSl+S0WxxpLDAnPRZ0hvUn0zsWb3CR8HgUUphGGC5sTZw bLPxm0JBHR9bCkp9SLj33AenMCsOQLZOA+Cy9QbkR84OCzwxA83w/5f0ouDi+Gcx+gE7 Tvmw== X-Gm-Message-State: AOJu0Yz4dIGhgzDHPtTe+VPLnHJtbAEyjaL77Xf1wng/1mELr0etndpV Lyly0QqsKxKG+sYUY3vYEcrQHaTwD7Nlb6L6oeTLLLuD9smHeS6P/wELPem/p28hbIY5mjx87G/ 5hCU= X-Gm-Gg: ASbGncvRKcS3RiQtavdLCsuGeq/ClUnLfvpdWxmKb1wxekQBTY3tF8f4PCYOkVR2hbS jX0cg2jgcrTXGj+50ozUi8HAKU4xAtfwZrUPNg7qVazVRBRxeBFf3ZHbwmBl6oMjbyjwBOewwmz 5zNlWnJN8XnhSRILUVvjhsgaurKyIEefCBAgn1+MXiMUhU+1YFRtPZFT53OjHeObNFFHbjY7ylr 0t/S6d1IwkNArrAyLoIq6wD7tvETxku5Gh/IbiJp/EptIPNT/SiGhf51onMVi/+tQwfp88xz945 odJCpU6inbZfx+MQ+UFXbUXgy6wKCj70HAhv6arfq6V3 X-Google-Smtp-Source: AGHT+IGePgTU4KS0V7kjk76bTSqsHMsJJFpsZKEW9Y9cBbqNQCd9EST3S+oni0XLMdUtO/XVrzydIg== X-Received: by 2002:a05:6a20:728d:b0:1f5:9cdc:54bb with SMTP id adf61e73a8af0-1f5b07bb133mr8380424637.11.1741973514284; Fri, 14 Mar 2025 10:31:54 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 08/17] exec/memory-internal: remove dependency on cpu.h Date: Fri, 14 Mar 2025 10:31:30 -0700 Message-Id: <20250314173139.2122904-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=pierrick.bouvier@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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973584310019000 Content-Type: text/plain; charset="utf-8" Needed so compilation units including it can be common. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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 100c1237ac2..b729f3b25ad 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 =20 -#include "cpu.h" - #ifndef CONFIG_USER_ONLY static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv) { --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973783; cv=none; d=zohomail.com; s=zohoarc; b=M7xgxcyuZHQlkbr/P6TBkE+fPKRWFwO64ThXDpnkWxJYhCXBZXkxzxM7znq/Qozf2F1pKEWaJnbA2JpXBVThYlGpyAT5aOwycg75S6qNZ6bOX6wfykdpDtsM72Cp9WMZgL/wSXvx2rbiA8wx2FMH5wNhCUWxJm7Mwj6ozcaHU1Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973783; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PfpTTedni4gUGfvRcfnvXw4xTvY7JO0pNjOjXTZ7pI8=; b=MyK1onNeseY18X1sRPw2zOt9NllYRtuYfd2afj9RdHbdg8GqmUboBouS1vx5WFp+vN9buTW9cPrwHEKR54TlP/IH1f+wt2FuvoYr43Gdhfzttyjazu88DqrXYE2+JUB3H89SojGoGy//6oMOHmcoKtsMR6TMmxy29CyMDXWvHCs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741973783589732.2545935362929; Fri, 14 Mar 2025 10:36:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tt8ti-0005tL-7o; Fri, 14 Mar 2025 13:32: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 1tt8tC-0005cp-NM for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:07 -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 1tt8t5-0008Fw-Ne for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:02 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-225df540edcso18252275ad.0 for ; Fri, 14 Mar 2025 10:31:56 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973515; x=1742578315; 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=PfpTTedni4gUGfvRcfnvXw4xTvY7JO0pNjOjXTZ7pI8=; b=QM8Kuu6PyYcqBshbDbxID7Dnz9SsNnmCksX2a5w7zaRfTKxxtZzjZPDQGHza1TYmGc 5KN5UvuIXLwX1azcvqNjT9xTLvuS/0/M5TBZRJjLam0acqL1oc5N2zpD/0GGr7Lpl0MQ MmeB0qPJB4YiyFknwMx5JA++zFiCpRjPz1LlNjaMhkjTqRgNzZnXYm+MCINwHNBvxfSM oLXkxp+gqBduWjEWkfs6T+xmRtgVcVAu+2tMODKWXXRQxqc1vHBI8g7gzNHTen9MzO3G Ejv4K8x1PJog/jKIQD5hQJAQmpzutkspbxOofHP18hijH5yRZ7gOh3fNe2cN8aryraIC 70gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973515; x=1742578315; 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=PfpTTedni4gUGfvRcfnvXw4xTvY7JO0pNjOjXTZ7pI8=; b=EyIO5cGCdFyN5tSeh+cb1GzSA9AivpKBsTsfPGe+B6PgmS5ED+nqI/3NNanx/u5L8q QXMUCxMCLPMtwPBpl1StQhsuarCGpNe1Hl+odDlNTEuxv3r5t4jicHWZp8HeZgsN4BD/ LiIJSWhaBexr6VDbXjcqFow66EZewfiBFjO3KHsAsIlxlhAnHha/u7FuVeH2rF1NDKGH YVxCNMuphwaN1zfT76XUq0wPwlRJ1QC/JFFxPVvvrraqvS8CZCiuxdQZG8FiBQupH2Pg xITotPKJwODpwcqOJ7GhkzkbzoZkeCP6mbCJPxFJrkva/ltYBHHWZXV46GFX8O0pF3OG C3Fw== X-Gm-Message-State: AOJu0Yw/yUUrY4RMUta0ZNMil+umfEeyuvv06UQYX1RTZ3OiQQI8r3v+ l1HPLgrPOvkIdlQocITYnNdnmk25dQ4gpQGa4YAB3jaFUvo3+3ZYCF+Z4ZX+cyHWBiUuJbTUJnM lRt0= X-Gm-Gg: ASbGncvXAn76uRvRQwQDOFvyfY+Jxtl9H+kwxdTlcQhMIhHMWk+bQUdT1I0Y6wi28TF 7pIeUMyFn2vy6qEo/ZuGKz4erq5AxYvOcI+durPqH3V4xk+a72dfHlxsLE0dz3kzswsRxRIaTW/ EJ0R1AgqLMaZiP9pNqAK+Jl7SWbhacSRPrLPObJBmKtLYirUBl0lf0guaSwyoIlnBA5raty3OFC VnmOOIZf900UohbirOFzbVzkM8kj0mp74NnN9uUd/DHFo13luJ6LxNLOlNgAJevo9Ethgg7aXpI OeA8l1Ff0AjFSSthGqywKWET/D5CBIt0dpKGcOfw+SO5O/91Ammb86s= X-Google-Smtp-Source: AGHT+IGj/I3RP0NPhKjXDLOwbHPd8rrkJpTvSehnV45pZ5KtPvxWJrCPU4ZqmKsKsNZoI57izw+qbw== X-Received: by 2002:a05:6300:619c:b0:1f3:323e:3743 with SMTP id adf61e73a8af0-1f5c28650c4mr5059385637.12.1741973515400; Fri, 14 Mar 2025 10:31:55 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 09/17] exec/ram_addr: remove dependency on cpu.h Date: Fri, 14 Mar 2025 10:31:31 -0700 Message-Id: <20250314173139.2122904-10-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=pierrick.bouvier@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973786338019100 Content-Type: text/plain; charset="utf-8" Needed so compilation units including it can be common. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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 e4c28fbec9b..f5d574261a3 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -20,13 +20,14 @@ #define RAM_ADDR_H =20 #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" =20 #include "exec/hwaddr.h" --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973671; cv=none; d=zohomail.com; s=zohoarc; b=eNHVPcP9bm9UHCsERYAf756iKy8aq594BREBlchRbmsiFwlLgMH8fvyaQdVDq+02SMTepgzudK+9npNCl+tCKkTo7rLuJFiJlxSadzI3rkIEt0UF3jUdix/+q+UqI+H8Pt9VYUpKwo9cyV/WQkC0uYkcih2JmtKkkkt34RJcL2U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973671; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BsftdeZcZ0LsVJ43Vlgc1kB7SrUHDvnjwuIeYSteybs=; b=JttW+krEUdBnRtq1rLmt5xIY+vaiuun1EGUsg8inuNxuF4Hp4mZFW7j3nZVLAaLO0x1BVsEZum5+Znk5kdmB9yVURA7g+KH2AfO2v3KOttWypdn2X3D7DTDNwi+IDwD+YyEH83HVRZcvMrT978bpOCRD0f5ALaXzjnpwz8C0QqM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741973671931823.5891147170585; Fri, 14 Mar 2025 10:34:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tt8tt-00061h-1A; Fri, 14 Mar 2025 13:32: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 1tt8tE-0005eS-5x for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:10 -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 1tt8t6-0008Gc-HH for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:06 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-223fd89d036so50298045ad.1 for ; Fri, 14 Mar 2025 10:31:57 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973516; x=1742578316; 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=BsftdeZcZ0LsVJ43Vlgc1kB7SrUHDvnjwuIeYSteybs=; b=qBZPtlgqFNp4zq6y6ma4Yfxc1QOVdub8vKffWegWoQvwX6G5rMVWJ0NOFgpen17hUM UJZUzMOyEdr7D2n3K+5rUpgF072GafNDuQfLTqccGKDkqvXl57dCdFMq4/VxplvuVJOM vbhOr70kgHEkcvDGVHoC3WgOntcNjg4+K6DvmkfOhr+Ba88joJ2yg9zBkynWnFOXFN6n izJNTrfzN1ixIRT/xZB3P3ehHNB7272A5oLsSBMq0286zdhGOYOb9aWtLlBcuWflMFrq nrUXD+0PfXlF1R1BqIdF6Z7pPWQqvLkQ0C4qL/hUmv57328JH1ld4Mx/ocPfANsT398f lQbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973516; x=1742578316; 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=BsftdeZcZ0LsVJ43Vlgc1kB7SrUHDvnjwuIeYSteybs=; b=pokIFXjuAh2O10s4yiKgQtuz8TUmjsCZOKNA4Bop6/olGmaIDDyLFaUuV7Z6o9Bw4t DFfYoC7QdaSCgbIQLHGfEY3uy3htkZjSUwopClBtNXnLATYeuDlCsj1HlVHwRHSabqyL Ljs890syWkjIEOBDn0bloWED65EkSjxQ9fL68XiSpR8q7FEaW1wr3TUuljZ9y6rFOoUu R1COo/rRXaL3A1QVMgrVahzrpKrxaSCXD7sMvYm3+ZElET6tRVEDwMM4c3Gv5jb5HU6e ETyPyXzolRGMtNJmUp+cKI4trvjX/nXqtuaHL0vUmuUBQPrEwmM6LsbPG/nZkfhwj9/O EX/A== X-Gm-Message-State: AOJu0Yw+uhBtd+VSRm4iwY+ajpgKxqLBA7wsxcmt7qpUQtrhGBjsIzwm W34FLSCPGwixxaJjuHEZk9euQrnr7kaPdQH75mXlNCgf1pWsx+yoUKr2EybnitpjxL/mc7Dj9+j wTdw= X-Gm-Gg: ASbGncvXosdWTtypbSiJcRsI+5DSe3MZqQsxt7p9b1/bnq3shBbPPhDzPrIRFEneXEk f8o/F99eVA2puV5dLy6qbWuSocqzUNpoF8b5WpgMPJxyAmq6x9Pr067yf1PRDOAUaOYm5xEyiVR 6oJy87H5kSwV7cJXt+JDHB+6BP4NajpMux02pX1rgUthIv6txE4xThSJXky9N9TFQ6Y8YfqaBLS flTb5Droxm59OXFsFkglgB4AfQLZoEgSXO9IDaut9tLOY9pn2lhueI6N8twlqQYjz+8C+80cuaN nqqSpuhGjXvsBQritenxSDzVBkxxWQIbPyJhCQAKITfl X-Google-Smtp-Source: AGHT+IHMleMJwhfQuIw2SImS8wKBtMic5A4ELNmhk5zJYoh3vglYg1/X+SLV/IgTuYLv0/Y4ZISJug== X-Received: by 2002:a05:6a20:1595:b0:1f5:8622:5ecd with SMTP id adf61e73a8af0-1f5c12c78aamr4816767637.32.1741973516583; Fri, 14 Mar 2025 10:31:56 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 10/17] system/kvm: make kvm_flush_coalesced_mmio_buffer() accessible for common code Date: Fri, 14 Mar 2025 10:31:32 -0700 Message-Id: <20250314173139.2122904-11-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=pierrick.bouvier@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973672583019000 Content-Type: text/plain; charset="utf-8" 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 --- include/system/kvm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h index ab17c09a551..21da3b8b052 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); =20 -#ifdef COMPILING_PER_TARGET -#include "cpu.h" - void kvm_flush_coalesced_mmio_buffer(void); =20 +#ifdef COMPILING_PER_TARGET +#include "cpu.h" + /** * kvm_update_guest_debug(): ensure KVM debug structures updated * @cs: the CPUState for this cpu --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973898; cv=none; d=zohomail.com; s=zohoarc; b=ILlOvTfhZ6kHs1SJX76y1WkEp9rLQw+Qkd8nk0ts2MPVIgoclQuh0gY4sY6131tXuHB2EnGFZhV3rofeNtjLxLLksOVGyMnecLrzn8xMsdBl9Ajo5FYVLetGXOYbEGc0PEcAcNOqUelw7hLugKXFnvWtvZqfxwHAeRaogrSLaAo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973898; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PABH8iZPN9WF+wJr72ZMp6Lm7i1C+9jWBJAvssLik90=; b=jc/76c8rFyXC8O6dghZw//C92mIY+lIl+azbJd0kFRQbAO6oDopNhy2KUldF2/ffE6/WpKUPii/+HCShgMrQi35GeqE6eu51q8FYKoJGGAIqBDQtd/OIlEz7abzESszbbNTf29kCdvJTca3pbOceDCfmMILSueXd6WFjK6Zmmi0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17419738977731001.8887032853963; Fri, 14 Mar 2025 10:38:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tt8tr-0005zg-67; Fri, 14 Mar 2025 13:32: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 1tt8tC-0005ck-LA for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:07 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tt8t5-0008Gy-O4 for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:02 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-22409077c06so62105425ad.1 for ; Fri, 14 Mar 2025 10:31:58 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973518; x=1742578318; 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=PABH8iZPN9WF+wJr72ZMp6Lm7i1C+9jWBJAvssLik90=; b=RigcekInGiGOc5YBWHVAb7RUpSErD0BgiyvMOpduGne9YVutA9AXx6IkvO4qmIb1+z R8ScThTT+KIO7cJrAeEhpojkUWNTA5ezfgWvBgU1WUspo8kjXKWcO/OhPMaUTub3GTA1 2aw9jSYKWpp/kSjHfEKwrsouLQoLoHLycqTiYdjbkPG951OBpBXGCdNuQtQduIQuOjxA pZ0aL7clQO8h2W1CTPv4UZm6tFeOcwvquV9kd0gVXtCuaGSX9e1E+iIGXHmICHphEza7 sCTiVPs5R6G5YK8ozHNw1WcRXAUDE2UrbGpRgJKt++vTqHWiStwuTmnS5JuQ+8N3WQSk sRkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973518; x=1742578318; 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=PABH8iZPN9WF+wJr72ZMp6Lm7i1C+9jWBJAvssLik90=; b=oITGXpFiNERy3AL+vCqecvWhmyBjHuWtYPUwyYU3Zpa3FJSrnA11WntNYwn4UQNnkN OIQXjA3wMhjAs2ZPgfO+Du0f3KDNFWVP/ZUtJ7cx7QjaqIfJ1wdKnCzjJytZ9Siy2vNy Dpd3gZ3fjBy8EjwUk8/lWt3YD4vKBYaWB7K8Z5D8fa4hgLnQz9vbN/5fh6EBrnMyXeGI sYEQ7EAtCvs88cX3rF2+HsMhOEeefGkrwOBJ9kKFUqJdvRusyf9urzSNE8fbMP3M5VPx BN9kDCgF6zd2fLiWGpEx3Y/DiOkY7dqNTRpRuerL8jqOYedQUi5b57CJa2zNHHqhPdKg mB4Q== X-Gm-Message-State: AOJu0YzNYUeJ/XxvSHGuQTjbMzqofrEA5baDTSK58gcVFGG+AabVQSoS mcEFRzHD64Dv9ju92hG4thsu8lHXt00le1b3pUdIAZk6t0A9zUB2y5qxtshrSCGIgsByJZZMCEa lTSU= X-Gm-Gg: ASbGncvlx6LxKjv7bZprMDZaPk4oEXtsa7Za7QFSdnal/2MPr7hiKblXNgshgqbQc3h QnExyUT6p/Hx7vk8R/zA1r+fpr0eJCqJPFtYqmhKvkH+0sZzGkQ3QisMVA5Rhd4cGiJTGgcFnxp E3ZnwYv0b6mzP78WrFZ37/DnxCMZ6cwp538hsAJWyeerhovYPUjhum4AxWyEs8rUuKTQHrnCw9f CWmdY0pYb1M0552uCjVB3CzM10QYdo/RAvTmufbGowPgls+gmll5/8ENQh/wutFIXWFO928cvid ft9FwCQWAMw/3n3J3zgERORB9t3zXvnPiphE1890vn7/ X-Google-Smtp-Source: AGHT+IGnTvSqXO1fzlE+2xVmojsF7Bo5wJQ+q4TppfmkSKTjR2FsyvyfU5Ot+87AVkRJkvXuDcvBmA== X-Received: by 2002:a05:6a00:228e:b0:736:562b:9a9c with SMTP id d2e1a72fcca58-7372242d387mr4348766b3a.18.1741973517785; Fri, 14 Mar 2025 10:31:57 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 11/17] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled Date: Fri, 14 Mar 2025 10:31:33 -0700 Message-Id: <20250314173139.2122904-12-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973899031019100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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 f5d574261a3..92e8708af76 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, } } =20 - xen_hvm_modified_memory(start, length); + if (xen_enabled()) { + xen_hvm_modified_memory(start, length); + } } =20 #if !defined(_WIN32) @@ -415,7 +417,9 @@ uint64_t cpu_physical_memory_set_dirty_lebitmap(unsigne= d long *bitmap, } } =20 - 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 =3D tcg_enabled() ? DIRTY_CLIENTS_ALL : DIRTY_CLIE= NTS_NOCODE; =20 --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973777; cv=none; d=zohomail.com; s=zohoarc; b=Oi1Qx9fVdxYBxLfDWUG34/RTbzsbYLGUWD8rlNquepo3C4tIOeo1Pdgz2CQy9fFC9z0MQlJx7pJP9hIaB+APX2dz2rju/l+PXU/vOeBS0PKqAiGKfiWmcSxsuoVXQ0yry3hwJJvRJbO18GnBXR3gAZKW3DCO5Wt4WG6ZFBxDOuw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973777; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=WZK4IDfbpcoj/UHXYNBc9hj61CH/qnmJNHrSERoWz24=; b=FUboHF11FgXlit9jCBfasbVaYwL6vDNCtmU8G/dFse0MD4UphOMI09nPabTGN/dCIataF2lcCYqmNVuUQbjse3Iozd35WfWAk3d5f7peqzXdk7G2PX6hlgaskYStIJDuwg0EZstuHaye3YKLdn5wa/ObKxNec3HpZK1ckTfDGDM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741973777807949.6142643769019; Fri, 14 Mar 2025 10:36:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tt8ts-00061Q-NA; Fri, 14 Mar 2025 13:32: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 1tt8tE-0005ed-5z for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:10 -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 1tt8t6-0008HG-HA for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:06 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-22409077c06so62105905ad.1 for ; Fri, 14 Mar 2025 10:31:59 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973519; x=1742578319; 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=WZK4IDfbpcoj/UHXYNBc9hj61CH/qnmJNHrSERoWz24=; b=k285P5i9vOuCu9IxPnh7OBLSosROs8en99zv6zczWSCR9fI16nQSB1ZKJhuimUck6P QMT8a2nOci676V8rchwL97ywt4v5jj/U/zANyulfkxL33nnwRCSXBlSFli+5kOwMa5Sw Jct6qfL/2y3S415Be2+Ptd8kNpxao1GpH6lpRGGf/j+hkFmDGd8WtWCV3b1CJ4OIMoer tK+y6vtrSwy2LRnFEm5fnT4TW9BGr8FZz0+bocPDzY7Mb8MEmkkYcNsoa5B74dEEnOhm 1qH2c7ySCW4/BpS26uCJjZGCuHPfa8E+1aLs/ccFn4lUgLJloJJRCoUSFN5uUYFcOC5h mfgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973519; x=1742578319; 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=WZK4IDfbpcoj/UHXYNBc9hj61CH/qnmJNHrSERoWz24=; b=SbYIyHJczAtdWV+zbe0jgoi9xlg/tnI6TW4VqgerRP7oQtghyByvnuJxCXgdHVjGLA gNdVtWG+kqBqHcpGG0a6EhFXxdtdzX8qHlrx102iEVgN8Fkd/AUwgwVuBiMsflN46av1 EZEaAFOq9KQLa4tWiowmAraqi7Bk/xIccHEl32x47q2Av0TCtag4uzj1zFK+fkEbQAZw w+p/Aie/i1AILQOpA31KHKMJbfHtMqcowkU2gXUwMaFHKr7eDJfqHwKf2vRqWyW8ex1M xBxJPla2u0IoJ7NfqtaTC40Phou2o1zfO34rF39VL9p/bHrMjEaTrNJJ5erufdAw7yAM taZA== X-Gm-Message-State: AOJu0Yw1se82XyrCAvC2eyR94H/jLN0n9PNmeQoP/0E6kXRtdPZZkUgU n1xS1E4N8rFg6tuPO6ZfaReAVWSvJ5YKVJVWshIDU+0v7R3vHBz3AVhPkVvyXqQnNt9ZeQYtilt vQtY= X-Gm-Gg: ASbGnctoAY5PoC2QLK/kUwdan7L3DlIX2lC5DRSypi1CsUqg8YC7S8UJ9cxD6Csym2U HCBdSRI0ruIIwjfhTr+ODi5tT989WuImoufzFzeMH8nYSFWIgsh6hGthRsVTGbJq25xH3c5d1Oq WNoOUcQ1ZCs09qrdvHmzt+98JgIjjG6stpgdT/aiWVEQzJBLiElY/aRSKL26q4vmlpELQHVtmRB +DaNN8rrJz+R6PVvOuudfkV/GaHDd/3qPj412xq0PTp4rIWcY0jZLmsUgB0wdiiDxdHAu+t6THa UbE8gU/k/Q4fhlJQVv24IqWGLL8kA1LkgBNvCZkqfOJn X-Google-Smtp-Source: AGHT+IFO+PDwMeyLa4EGhItdNdod3PivHdGg2tuOsQqj5N7me/+24tmsBkj8Jw+BltKmizpirWlssg== X-Received: by 2002:a05:6a00:b4e:b0:736:533b:f6fa with SMTP id d2e1a72fcca58-737223bf5e7mr3790179b3a.13.1741973518933; Fri, 14 Mar 2025 10:31:58 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier , Anthony PERARD Subject: [PATCH v5 12/17] hw/xen: add stubs for various functions Date: Fri, 14 Mar 2025 10:31:34 -0700 Message-Id: <20250314173139.2122904-13-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=pierrick.bouvier@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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973781036019100 Content-Type: text/plain; charset="utf-8" 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 Acked-by: Anthony PERARD Signed-off-by: Pierrick Bouvier --- 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 00000000000..5e565df3929 --- /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 onl= y 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 4a486e36738..a1850e76988 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( =20 system_ss.add(when: ['CONFIG_XEN', xen], if_true: files( 'xen-operations.c', +), +if_false: files( + 'xen_stubs.c', )) =20 xen_specific_ss =3D ss.source_set() --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973989; cv=none; d=zohomail.com; s=zohoarc; b=Okak65aY7jBtJGu1F7E/GpSzlGi/ngVvNkEYFZNa/IvEtsSqbX3flnZxWpT12IiGAEBmYH4lmVydVcdcI0eFqjg/PcdT6y0KivxKcxdHeM41GnaBQopfa6NCT5xKWQfoke+uyp+QzudiMmy7OVKvUVdrWx/u2HswDfJD5KJmz3E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973989; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cOa15ppvF5kxsldjPkSIJYe5T0c824L9GaUvR3via0Q=; b=FMu5APany3Clqmm6hBDF90m+vr0xkHWbcYG7e627wzZOp/OYBXzrvEMUS9SYu1WdwIU0j4ReY76IfH7dWCzQvI3FkaCobC6a33Qjh98fR0YWkuPUuO8YGliC4C+0TGJEF+iwNvfA+OL8Qtcf9RqFH4mUaTpVWnUsFjyt6JqcU9o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741973989016201.0338116408327; Fri, 14 Mar 2025 10:39:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tt8tr-0005ze-4j; Fri, 14 Mar 2025 13:32: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 1tt8tI-0005ft-Q6 for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:16 -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 1tt8tF-0008IR-2l for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:12 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-225a28a511eso43039015ad.1 for ; Fri, 14 Mar 2025 10:32:00 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.31.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973520; x=1742578320; 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=cOa15ppvF5kxsldjPkSIJYe5T0c824L9GaUvR3via0Q=; b=x4ccqJU2JUQQ4yet4DjM5vBu8Il7lqMZ4PMkueyUg/A4G8TO/fe7ORIXPA2F3x7clI jJvmHQXPhumSvRwXKjWOtjZ/+Hc/i1aIAu/Hv+X7XTWZUO6B+/8ck5A/Sp178Z4FRlU+ nIAHYPdbt3JdT9hbdis4mAHBU3QRZ0s60mrd8vX0gLmrvwz7pcPumVOt7H2mV9Ow75Jt KERHQ2e2QTkgpfHXSS6P1AA1u60vFcBOJAkHkoFv0iCtM/vqgIMyVbmvVPhklOOVEF3h 3GbTIcbPiM/4GhTWu5YmPugR72mixdwCIt1dqiBRYVd7z1Cwu/g5pv4Irctz25FGyKAp g+Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973520; x=1742578320; 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=cOa15ppvF5kxsldjPkSIJYe5T0c824L9GaUvR3via0Q=; b=hrrmS8ESv/WkOVvztp0q4JGegl0TCkaWZIR4F8IbknF/7aN/p96v6WJIZ+BWPpFS8j eNk06uru3oVq19IIhUh+fqh1yXEUC5nQ6Uoz1G6mJJEwnDU3s+opGgJUrjZdHrFLU/T/ yed5Isz5BxCYGoIqUm9sag90vJWM7oBsZ5uZSJf23JrAncMwTGBh/rHej9VIHwCCl3zX L1KUa96Ton+hKT20kX19K8T/XpAhJV9boiwYWZt9Ikk+GZ//xgZG1dhBAgaFPkq7BehB Y9PjRyPis8gZKCIXehs2MGRIppb6l/wjMu37bnp27pCkTSKzocjWS+HjjzoO26YkymZl dImA== X-Gm-Message-State: AOJu0Yx+Y7iprq2pCOcyifc2WxL/VDt8gtCwzkD6FUBqQKX2r95oR2tO JQVBEWEyFtasoVxoruhPgARpzRd9DFMUeHs7ifvYOGic9tQmv7pOY/W7ekKy1f8ve5GuM4797PY UsZ4= X-Gm-Gg: ASbGncvxsT1li3eLbfmlNo2Lto7VVaRkzgZxHHMip79bynZwBI4qlmj8N7ccGrOp1ub UuoRWIoJH2OpHkCYPnsmb6zZ4D71T/Lzniu1lEnAaDeg3plrWNE6oDdH7Ymo7VdkxUiswqzlRaP kcxX33T9YoUJH9WpC0NK9SGFcqv8NEker6DTwPkQmz6qs0xljhQrHVk7ztdLV2NL86ezcAHImlW YKOvl6iOqELF6RUBTM5voUHi07sShN9UZW18sLxAFGlwx7NzqnY/YUec8YHxEGoTXffQWhk5ixy ONmLgYBcZpNlp3IsEnZgQ3gzsgI+7aJRMoCWy5+GMHYoqndpKyQxdBg= X-Google-Smtp-Source: AGHT+IFlQhNJcOD04DdXfXRzIQFpLw7YnyShzSPUUYA1tOEz0vWyEbVCk22Q9xZ8telIqsQxDa+sSQ== X-Received: by 2002:a05:6a21:4a8c:b0:1f0:e42e:fb1d with SMTP id adf61e73a8af0-1f5c1326a41mr6196288637.36.1741973520104; Fri, 14 Mar 2025 10:32:00 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 13/17] system/physmem: compilation unit is now common to all targets Date: Fri, 14 Mar 2025 10:31:35 -0700 Message-Id: <20250314173139.2122904-14-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=pierrick.bouvier@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973991193019100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- system/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/meson.build b/system/meson.build index eec07a94513..bd82ef132e7 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', )]) =20 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', --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973696; cv=none; d=zohomail.com; s=zohoarc; b=ZGAsRRWWuBQoRSt455hV4PtwQisrS/qRkdosIZpuL7euZV/vt5lNEAiM1YNywZgK5iZldCgSdKtvvM0fisU2u62COhEGqpQbGnXK6sYDWkDRUV4qSGiDFZTJ/mLThW5nKAxvjiXzo5KDH6iZnNTaLT2jutUwqfEYSGqlyvdxiuA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973696; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0vI16NHb2tKWbIxjnq/SoVUTdY/Lep770BkCc47k0Rc=; b=HG2bOnCtVdDV49DS5a4/+wbIxkK2qkeHePnq6GdlSQL3lFvJgGvwk22rMz4+bxHukN2Xho2E36+EPCZKCDNST/lE2WHnsYyTY5z4dkYT5guxdmcjRlNiN0pIGWSSdZFVLkvAd3WRD1cguFDJWnA2wiAWJar5KB1pCmkS/eXgv3A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741973696589334.6660080413434; Fri, 14 Mar 2025 10:34:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tt8tp-0005y7-3H; Fri, 14 Mar 2025 13:32: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 1tt8tJ-0005fv-7K for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:16 -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 1tt8tF-0008Io-1G for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:12 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-2243803b776so66984475ad.0 for ; Fri, 14 Mar 2025 10:32:02 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973521; x=1742578321; 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=0vI16NHb2tKWbIxjnq/SoVUTdY/Lep770BkCc47k0Rc=; b=N23ywjmO/uXqb54kDNyZLNU4nfZo0sSKep4zmAmuojzrktWIuZkkfp3xLnNhSHjCkN 9v4Sdrkma7B8fxuFIH+tlh2KWxQnS4UmOhG+CY/Whyq8gyK/arNOk0/iZS6ad0AkZvMb rAEQVm3nN1vp2naiTnB63wOwwSGqcMN+WD5V+pCZSPpSt0598n9dAs1jJMlN0uGe3rkK iNGLQWnlt9PsSgjdDOvRgv+H+ab5HkKNszTxteqYdF16YoBHknfkH7/sOToVRyMetK+0 MF8rV6NWXfFamwCRFCyY1NaQ4YCOqKV9RciC8MQ96dDXchFukcUqoyzt5i4iJ4mrxtDL ZUzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973521; x=1742578321; 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=0vI16NHb2tKWbIxjnq/SoVUTdY/Lep770BkCc47k0Rc=; b=CryHV1eCPzHWRSqIqhzKBM8wEGgRo7V2LFcr0IwKYEeVbkgqLZs7ENEDvzYxBauuOH Tuz5zpO1J8QQbwr0u8KZKw/l7CkO6sy8UvyGne3X8Kn60DW24kvo2n96KH44CkeI3icu v6rzTas8MbmYYSMmWbwnKAZMPBT/ZlresPwouV8G3G4HgljipGLxfr3qhd85u5PzSf1e JhGlld5zfkZlGFKNLHYjvBwBak+ApkIBodjY90v1Ry6M9g7or3Qon2my6yTNHgohWLma hqOwZv/GpN0wBh6TYeS1juL8Ro1RhT2OSOF7moBtrO55HDQFOyM88Fa6YbftatRuEYQF EmfA== X-Gm-Message-State: AOJu0YwH0syQyH6GvtU0ZRSCfMTlUG4o/EOhskqku4Tm0PH7kGjES9f7 STNBq6zYjfUrhonVN0h3LQkcKnDL+IjMnuRKPg7LT5ZRtf061ohRDG3tOpZYn7XhWZBQWjhvkn0 7uu8= X-Gm-Gg: ASbGncuXTcawmtZLHUaBkmy3z4dibhbwyTMa6eXnFHX5E1ObtYhPfQWX8u7Rn1f7HF+ i7uCxehj0rj63AVba7qH+xn2f7dxDi0bHz9jU8RkiUkRax0lR3xea3tQY3FQUsCAGGGJWGv67Pf 9943VbleFTP7cWqKN0DsjQCYk+ONqsGYtv77H8PWNkN9C/LANnJRrN0iZZXuU+hWy2HnKHrijrt Pm2SBG0PnAp2VZ2gQLRu9cztAccWUK6x7qa0FKQ6CCQAQYT5meAMKSP7YfamNohmiE6Q+ldro4j aZnnbhBygm5oFCRe2OlR18nw2Wr2izalUzY9rYUiAtff X-Google-Smtp-Source: AGHT+IG6cCxvjsVBwzL07VH+mus/++8may6iqII6GPehxKvNj4VKnHVcl4393YyfiqPTiVq1ksSu0w== X-Received: by 2002:a05:6a20:9c8d:b0:1ee:efa5:6573 with SMTP id adf61e73a8af0-1f5c113f552mr5261243637.8.1741973521265; Fri, 14 Mar 2025 10:32:01 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 14/17] include/exec/memory: extract devend_big_endian from devend_memop Date: Fri, 14 Mar 2025 10:31:36 -0700 Message-Id: <20250314173139.2122904-15-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=pierrick.bouvier@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973698691019100 Content-Type: text/plain; charset="utf-8" we'll use it in system/memory.c. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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 069021ac3ff..70177304a92 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); =20 -/* 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 !=3D DEVICE_LITTLE_ENDIAN && DEVICE_HOST_ENDIAN !=3D DEVICE_BIG_ENDIAN); =20 - bool big_endian =3D (end =3D=3D DEVICE_NATIVE_ENDIAN - ? target_words_bigendian() - : end =3D=3D DEVICE_BIG_ENDIAN); - return big_endian ? MO_BE : MO_LE; + if (end =3D=3D DEVICE_NATIVE_ENDIAN) { + return target_words_bigendian(); + } + return end =3D=3D 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; } =20 /* --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973853; cv=none; d=zohomail.com; s=zohoarc; b=QCr9XzIJKJS9SCJN4z1lNbfOSiKnIMw/7vRgQWs7QgGbQA7QgrYTiYR/QBCP8NrFRoDG1H40nlgA7XhMu0xT8GtR21WggRgpSi4ZTekZf4cIdtf/rXcBjC1xlCLtGdda+ksKBQFFkZwG+FkFkfJewb7QKH5bhHlT0+7xIHFj8MU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973853; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ipPAyCMNYKQgJ+e1Pj22cNEjWMul6XXi9iVGdQZJ7Rc=; b=EZGxcQeTdlKYT5tuVkq+hzi6JzFYavZH2iAPDFIktcirZalN4VT5jPD3VHzA5/+wQQ2m3wvIpFc+K1VUHfHLrRifIVuVVjvdlWbPCIbnwXf4oCtQp/AYBXnKhnnnN4M+qh9AGMQnnNSx6abMx88cioDyuBnomuzs4or5GoXDwkg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 174197385331790.98300382772322; Fri, 14 Mar 2025 10:37:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tt8tw-00064g-22; Fri, 14 Mar 2025 13:32: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 1tt8tI-0005fQ-Ce for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:16 -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 1tt8tD-0008JC-SK for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:10 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-224100e9a5cso48995405ad.2 for ; Fri, 14 Mar 2025 10:32:03 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.32.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973522; x=1742578322; 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=ipPAyCMNYKQgJ+e1Pj22cNEjWMul6XXi9iVGdQZJ7Rc=; b=xYpxq0h+ebVTHIFOxqOTni3MZq7i51vLM/Fq6xr3oB+lL5j6gnulNtIi1/nvoTA+9L i+Em+bU1uCB9SlekJRhF9tJNn/5re4+HcwBYSPFnIvHjGdniWSqe2fu9cTTJBnh/Eoss YkifVC3c22qadqgAgxnrIEqIqvJ4H5ATUuDWuN5wzDD0FBMaZw2yPFHX01s7BMDYD6f+ aaUTA0yEgiwFyQzkZIFrP0b+NjO7ptPndqxtYaQItgxs7tD7WvSnA6EimTOJTIhfVb3E fUMz2ut3DMhpipXVn9f7Fo5mo16C9hm/5V1lJxquceMMG04WUKl+WhxBMP/NPKhN3Byz /EHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973522; x=1742578322; 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=ipPAyCMNYKQgJ+e1Pj22cNEjWMul6XXi9iVGdQZJ7Rc=; b=RJy8gnZxJzqgPaHFbhpHTLTAAPO7HxeDT2vP6FLxpi2L7lKY+nMfdCNhX5vLBwrFf8 CzO5yAhU9uwt6/Gfmc5L64K+8XIJslb9AdpIDDIUgNjsnnrnR0OSbnaCkG6SPGTu6j7W utXaIQqSu9GBzYUl1ik0qLWrkSJyyApgGuxu27GeLZYYtaj9G9NyaYOz4OmDWYv6Qorq gYWoEl2vULRup03jvKTmlR9U2gW56DJwWxP8pyPJqr1eHje7Lh4uPY9Wht3zqxSh1Mpp 2pPC6vxuMjudHAtuhit/lyM3aWkSHo9b5Q095501pPri9vrWhOzLoSj2A2EOIyZS1dJd a7wQ== X-Gm-Message-State: AOJu0Yyt1+H83e0CXnV7pPirf7V6U6J71aBWr5Ud1YZ4DjozOzkyk3O5 Bx+FMUK5iCEuhr6ciaSx4T3v+ZE3MKFXKxHU/1Xyeb7VYlnJ4aCa82cd4AGPdLqsQt4cOhYDB4E x63c= X-Gm-Gg: ASbGnctNZd2VS1/6pZYchf4uApvrGmMQtuRcTJOiFPY3X/2/oBtQfRQHpI+/tSO0CGd uu5QqmhBeu5RdRfXoxKGwF7MLeq/kNVH/1v6VJYMPtYGrMuvI13Br67fILbeF/wUDSVz809TDZw 8746EAAvaTfkKE2rRv8QjbEDQJ6Y9lJ4Lpss3dLDKXLDTctUdM+rD7q0BrkbiqqLgv9cHCA3Pfx mo98qTamX2n8zy934YhitM/0wZ7DoLEkqK6ne29IxNuIGpTfuTNUOG9oQ7cLAxaM8iT9vIwx0ee ViEVQEHnp4DRGGhVMp6oP/XH1eepIOXEM8hd3rpZ1f/6 X-Google-Smtp-Source: AGHT+IEtHSmevJ6R5avE3bKBZZosO5sZ+P9hAoOgJtZ8OftQtbIF6mLlVq94OOMFZzJGHDBT5BJrHg== X-Received: by 2002:a05:6a21:6d88:b0:1f5:7873:3053 with SMTP id adf61e73a8af0-1f5c12ec5b1mr4773946637.29.1741973522470; Fri, 14 Mar 2025 10:32:02 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 15/17] include/exec/memory: move devend functions to memory-internal.h Date: Fri, 14 Mar 2025 10:31:37 -0700 Message-Id: <20250314173139.2122904-16-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=pierrick.bouvier@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973855469019000 Content-Type: text/plain; charset="utf-8" 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=C3=A9 --- 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 b729f3b25ad..c75178a3d6b 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -43,5 +43,24 @@ void address_space_dispatch_free(AddressSpaceDispatch *d= ); =20 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 !=3D DEVICE_LITTLE_ENDIAN && + DEVICE_HOST_ENDIAN !=3D DEVICE_BIG_ENDIAN); + + if (end =3D=3D DEVICE_NATIVE_ENDIAN) { + return target_words_bigendian(); + } + return end =3D=3D 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 70177304a92..a3bb0542bf6 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); =20 -/* returns true if end is big endian. */ -static inline bool devend_big_endian(enum device_endian end) -{ - QEMU_BUILD_BUG_ON(DEVICE_HOST_ENDIAN !=3D DEVICE_LITTLE_ENDIAN && - DEVICE_HOST_ENDIAN !=3D DEVICE_BIG_ENDIAN); - - if (end =3D=3D DEVICE_NATIVE_ENDIAN) { - return target_words_bigendian(); - } - return end =3D=3D 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 mem= ory --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973979; cv=none; d=zohomail.com; s=zohoarc; b=jSkURs5rjPVbWR59/TFXYJuTw0nCq9h+BILHrbjVvC46yAqDtaPSfcyXZFubGm6C/sB7j5GprnuP1YQjabVfyJBO6E7fHJuIv8aWPaGv8jqQzK2LY+VEbvadFPjpQfVM+wATQSk29ynlKP9qAbHALWbP/2/puRyKIJbSY5cf0vk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973979; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EBRugwqnxw4q7Phz2P050i5IjB6Zbf1WGwdoEilqtkY=; b=WCszQ+hOwRJUztb+g4Wn+CwgBOXIGz7eN7NAkiOyZrx3KfdrmJ2PEWkbmSwKh0eZR8zRsnwYBAAkAWXRdlBCejyueO95cVaSaip0X963VZIp3m77YmosAcji7PW/81kbKiEvGIK9hlq+bOGrnV7xp4FnYrHB/uUvw4kVurBmxFE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741973979614836.0553383400976; Fri, 14 Mar 2025 10:39:39 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tt8tu-00063G-IT; Fri, 14 Mar 2025 13:32: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 1tt8tL-0005gW-9L for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32: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 1tt8tF-0008JT-E5 for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:14 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-225df540edcso18254665ad.0 for ; Fri, 14 Mar 2025 10:32:04 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.32.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973524; x=1742578324; 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=EBRugwqnxw4q7Phz2P050i5IjB6Zbf1WGwdoEilqtkY=; b=bq/hioWF6BlpZB8kw8QqycHbjAXtdCj5BaYZo6e3k5D3JcMCaMdBNPAhlLh9uT3jDG RuUaiiKvnOg9JOgbGcLU0TDLoeEPHYXtNlFx+JRsHyAYfpFlI3s3C2fgvt5ItCj7bEcg 9XKJuOF9cxcdt5qYt2bwfl+c7hwU3ryCMhRbsISzlcvdNkRpnSL1TQ83YMtVYB5HFh9F hoxZZWMDW1R618UFlR8xkT4MkOV0KfFma5d0AZz+Rq9BcH2TX6LguNJ3DVEg3DdUFzEG J6vEVGWVL6AO/4Z0gYQVITCgIHwS2xwVbQrNdF/QKNUWvmibQZz2lhqomL4l6SNzCGUC hb4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973524; x=1742578324; 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=EBRugwqnxw4q7Phz2P050i5IjB6Zbf1WGwdoEilqtkY=; b=n4thnmdXFa/OzN+U07s8CZJ9Pxm94avCKEi7sBfSyKInVtcCJs4KjnC0r7BLe0NA// qizUqjxmiXgi9YotS7q6ipyKT+LS6i7QlTLUzBbQYX1mCqP0nIONKPhv3wxkY73CyrRO YrshyjagjWj0Q4qZFlV5LkA+rDHwWSYehj+vG9X1V9U3tDl3hLROm2U1RO73mwm8FtgT iQQyXbmerlEg6tG8d0hcheVi2iSjWrFcmHL4jlMNp90VODPErL5FS1mZ/57e7jEw/qHR InLRKQ2vFXWhRbJtCqPUgjPm8fmLblLtv6awf1GUreez1u0hChhSixIZKljl8Utoia63 v3xg== X-Gm-Message-State: AOJu0Yz2iDgzhwGSxUOfbykH5OkxNVV5BM1QTFlSI36hTTn2NrfcGApd DOlUdKbdWDFwO6/4eJ4Pu6yqm/xvHm/MvanpBTBubCgMmZp6iyPzOUPKBmEw/5fvKAxxOQxczve fKuo= X-Gm-Gg: ASbGncto5i4Xgx1WU3q45CsFwrPrtXW1xsv8JRahcxpAaFaCwb0+z0D+E6PV/LJw6FT 2SmfX/++AptpPqLpME0qipXFpIwAULwZ0pF2mT9EBbbn5etrpQeF6ovaCXDnuHXVFjT151OMIpl gKAHQfOaXjHjCEGa2LqTD7/75PvW7MhOHInQp6jwAZdP1KxWvxJFcBQmQvfjm5t+eCJ/THGqeu9 qovkUTfYp/qJIM7k+SOQbuQ7I7EYz9V6rQy2BwdIvqDG3xjWSp410kd/tVcP/WbxDtGM4Vpl1XH 9aH7lglH6ue/FCHT5DIIVdH/dYx3WkbFm26UtyOihepQ3kuWgapFeRU= X-Google-Smtp-Source: AGHT+IFTScYSX7clzsDQUywbpsrF2iPQsXcqATUvOkRpCep5DuIqTnkqpSfhY4o7FVAe26d7sGjRdg== X-Received: by 2002:a05:6a21:1583:b0:1e1:a449:ff71 with SMTP id adf61e73a8af0-1f5c279ef94mr4638551637.1.1741973523678; Fri, 14 Mar 2025 10:32:03 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 16/17] system/memory: make compilation unit common Date: Fri, 14 Mar 2025 10:31:38 -0700 Message-Id: <20250314173139.2122904-17-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=pierrick.bouvier@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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973981301019100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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 4c829793a0a..eddd21a6cdb 100644 --- a/system/memory.c +++ b/system/memory.c @@ -353,15 +353,6 @@ static void flatview_simplify(FlatView *view) } } =20 -static bool memory_region_big_endian(MemoryRegion *mr) -{ -#if TARGET_BIG_ENDIAN - return mr->ops->endianness !=3D DEVICE_LITTLE_ENDIAN; -#else - return mr->ops->endianness =3D=3D DEVICE_BIG_ENDIAN; -#endif -} - static void adjust_endianness(MemoryRegion *mr, uint64_t *data, MemOp op) { if ((op & MO_BSWAP) !=3D devend_memop(mr->ops->endianness)) { @@ -563,7 +554,7 @@ static MemTxResult access_with_adjusted_size(hwaddr add= r, /* FIXME: support unaligned access? */ access_size =3D MAX(MIN(size, access_size_max), access_size_min); access_mask =3D MAKE_64BIT_MASK(0, access_size * 8); - if (memory_region_big_endian(mr)) { + if (devend_big_endian(mr->ops->endianness)) { for (i =3D 0; i < size; i +=3D access_size) { r |=3D 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; =20 if (size) { - adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE); + MemOp mop =3D (target_words_bigendian() ? MO_BE : MO_LE) | size_me= mop(size); + adjust_endianness(mr, &mrfd.data, mop); } memory_region_transaction_begin(); for (i =3D 0; i < mr->ioeventfd_nb; ++i) { @@ -2619,7 +2611,8 @@ void memory_region_del_eventfd(MemoryRegion *mr, unsigned i; =20 if (size) { - adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE); + MemOp mop =3D (target_words_bigendian() ? MO_BE : MO_LE) | size_me= mop(size); + adjust_endianness(mr, &mrfd.data, mop); } memory_region_transaction_begin(); for (i =3D 0; i < mr->ioeventfd_nb; ++i) { diff --git a/system/meson.build b/system/meson.build index bd82ef132e7..4f44b78df31 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', )]) =20 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', --=20 2.39.5 From nobody Fri Apr 4 03:38:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1741973627; cv=none; d=zohomail.com; s=zohoarc; b=iSRYXTNEEJ6iYWGyZwk8UI/ZeUM4Bge/AbhBoBlr11PF20PochSLtzH0Uikvej4Lm5dVEPiqTRlx45VifC9303fUqJdooPZT2Ke5+wPmOEwhi6FLhr0dPVn4fK2lxy8nI+iRTKYRo92oH1WIJaPAJj1OLlWtmRlzKvTwnpAdKkc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741973627; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pdsNHldr91xnqdGHk1DTLXuYnmkD/cCe/HKmA2EoKL4=; b=LzWTF0yTKCz/GZz9ALggqEDyVgRzBVUHPWVRa+0qpN1fXn/cboPfXNKM3KBjnNHbvUTXR+zXGN+qe8UEBxXJzOQ7AkNSCBvGCFTpgikLqk79Ojqly7hSCwal0uya/feqcXM71V/7pfjRfLYifb5rvcvnEMlqds+N3RoAlNs5Wek= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17419736276151019.15908140184; Fri, 14 Mar 2025 10:33:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tt8uI-0006X3-Rw; Fri, 14 Mar 2025 13:33: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 1tt8tI-0005fs-Q0 for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:16 -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 1tt8tF-0008Jj-19 for qemu-devel@nongnu.org; Fri, 14 Mar 2025 13:32:12 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-219f8263ae0so42502505ad.0 for ; Fri, 14 Mar 2025 10:32:05 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9cd03bsm2990529a12.8.2025.03.14.10.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 10:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741973525; x=1742578325; 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=pdsNHldr91xnqdGHk1DTLXuYnmkD/cCe/HKmA2EoKL4=; b=o0TsBlHvwzPry7dZIYBB3/tKrBPkA7Ip6AGgpw4DSKNlQHzaP33D1IE4bMMxdgunbE B2Q25p2kCZ/nrs1vAxfSmIziSaUFerD6z8YZWZf/+LICU2IqZMTqCpdCCqQFMTfQD3aC h/scudom0yreY/ubpMqpBndAnObPEhYLwV43uJR1DMqbnUqGYXkOZ1dgMLKmRbC1PG+Y M4SL8SX5Db9nt6oIBaFMG+1+VHFHh22PUMkwKXZkXva4v9h9Y5tgNYuOYOw/et4By5sZ TEjNrc313mc25N/WBE5SU2NiUxb8mBj6LfxHUjox82uZfAdGQs3Qa0AZyk8HVqi9mo5S iMcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741973525; x=1742578325; 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=pdsNHldr91xnqdGHk1DTLXuYnmkD/cCe/HKmA2EoKL4=; b=lomcgqmBFRk7w2vRL9HFetNSE9Z0lGxlvGU0F/fDD4Z3XWYGhnms2/ZrpkMZervCej +3sax8ti6zb6bdtMFuX8nrpHuxNtd6ne4T+xiQp7iWJWbIOiKz8NFy8kcuaFvEIYbvbF 6BupUO4r9S++I4uwR9Q9eltCGn+CsesfljoVbklbMhu4/uAj6ELLehd0UbEnOJ2j9/4x yTcmlYR4KwsWzceTiY+eb/t0G7dD/yXhaM5mCZEImykdpYniVA+pk1ISmOR9qwKkVAcp ymBHgbltmX3p4qgQT9ggnkL6YFrtw7W9nXmZeRMZQLlGExzg3O4Zt12UOFKklGfHLJrY 9qsw== X-Gm-Message-State: AOJu0YxgtayIUGC04CJhXeUdVQbhOvJ/AUiQQdx2NrVO/mtgSUJD8F9N kZGyY2VDzJJ7u1acOZrFKFUkJIE9g1SqAV8czTVNJxKiMMC1V2NLELi4sLiO/xizrNAqp40jM3Z E9MY= X-Gm-Gg: ASbGncvvSbj64I3HzVSh/nfeH0oKl9huFD08vI9fTp6M2XaoKQRfjWXdiDR8brolQkr /QaiJYYGYkhFS9Cp9KWw/JQtNgczUGTgWlYQbv/bQy0WHfWAScjV5k0CLnSDjsTwSVGyuhvz+7I yLDKf+L1KURA9Wy/BJ5/+wv2Fj+iZBVOxkhvbnv0CQS+Z8hxPV7Ow1+8cble5cU6b3loaxoWFmc EK8F3nkOsZbC3ER2jH6qqZywNCQJOga+A3rT7MPypNW0kkGxvDo+NSoTWEezbj7Lt63QDKWoi0Z Lop7pAORuX5PE8JSYLuQ3NHHa1lHys/oJDqr67/CjUsJ X-Google-Smtp-Source: AGHT+IHKE9NhNFaDqc44peROMWsjYJioKgZvs6KA5f3lAVTw3ISh5g4Lmu4Vqxy0jtgBCp9rXQffRQ== X-Received: by 2002:a05:6a21:1f81:b0:1f5:75a9:5257 with SMTP id adf61e73a8af0-1f5c1174fd0mr5240657637.13.1741973524846; Fri, 14 Mar 2025 10:32:04 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Yoshinori Sato , Paul Durrant , Peter Xu , alex.bennee@linaro.org, Harsh Prateek Bora , David Hildenbrand , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , "Edgar E. Iglesias" , Liu Zhiwei , Nicholas Piggin , Daniel Henrique Barboza , qemu-riscv@nongnu.org, manos.pitsidianakis@linaro.org, Palmer Dabbelt , Anthony PERARD , kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Paolo Bonzini , Weiwei Li , Pierrick Bouvier Subject: [PATCH v5 17/17] system/ioport: make compilation unit common Date: Fri, 14 Mar 2025 10:31:39 -0700 Message-Id: <20250314173139.2122904-18-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> References: <20250314173139.2122904-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=pierrick.bouvier@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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741973628469019000 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- 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 55c2a752396..89daae9d602 100644 --- a/system/ioport.c +++ b/system/ioport.c @@ -26,7 +26,6 @@ */ =20 #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 4f44b78df31..063301c3ad0 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', )]) =20 @@ -13,6 +12,7 @@ system_ss.add(files( 'dirtylimit.c', 'dma-helpers.c', 'globals.c', + 'ioport.c', 'memory_mapping.c', 'memory.c', 'physmem.c', --=20 2.39.5