From nobody Fri Apr 4 09:03:52 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=1741582796; cv=none; d=zohomail.com; s=zohoarc; b=RsH4OVc0jLEdfw606r5/MU5FjqFW5yybsXHAdJmvOrjbbmMqDHDG7E4QQZOK1BwHRGXP3n6MhcVUr6lh2WBnUWwUVK51S8snaalilvm6Na7ss0kM09/ZIRWhMCL3IGQIFG9a/LJgtJENayamISCmx2Am4/svLqqxTLBBAUF1oiE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582796; 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=1JZyw573LWlQgbC9bGnVcpJUmDARxtxiYGI4BMcj5vE=; b=MGgNEnYnQvu50xbzY2q0oBbI9iWNlAYGO3mN4M/XZQ1rzMBlMKMgDFhEU5VYGTpe10T20PH7LNcKx3ckVR7tIOm41erQ3szB/nB3NezrdJttrj8KgZu/fzzkf6KPBdr5i9RogWwr+7bu+AL4bk4M5UDbR4I7ycggWLnEzc/+QRk= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582796033368.63652989972934; Sun, 9 Mar 2025 21:59:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVE9-0002fO-N2; Mon, 10 Mar 2025 00:58:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVE7-0002dl-Im for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:58:55 -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 <pierrick.bouvier@linaro.org>) id 1trVE4-00089V-Gp for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:58:55 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-22548a28d0cso35990505ad.3 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:58:52 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:58:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582731; x=1742187531; 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=1JZyw573LWlQgbC9bGnVcpJUmDARxtxiYGI4BMcj5vE=; b=VLHaBYUyG7viQO2dbAkNjLUCtJCKq/23NN2citHXBDltpRObJxOhpmRKwVDh2HxAtS YFNI7TQqtUIqy1s8tB/1rVhUhoeVPP5qwMY2DDH88qWpZqiuxGoTfBhAFQAbtwozO09F XBIHaBmO010vXwaOU0PTuKWxtx0n4t+zwTaQwCilmBp/3C3zWPchi2JNqJ/Yer+SucJm 70EZfggY1E/r8AmHvR2xuMXRZIGzBNSKgQoiCUxG7u66YuwnGFMEPaFlj93wnXSBUzlp jldxpItyDgBOYSeiu3/8ihroYCNiH9JtTJEU6HeWi6Rh1j9mmJzmv92UYJfoQdVoLw+C OtsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582731; x=1742187531; 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=1JZyw573LWlQgbC9bGnVcpJUmDARxtxiYGI4BMcj5vE=; b=MRRdUSzZVkLWBmqBEcpOxqGRh8UkqgLwcXwZeSqA9dLloNNCgl1BTXZqeAZz+hb20m ySRwkCQg7FIf637/Kd4f/pl89sO/2j5gfsBayG6AEj//XTo+X06UuGBvYIj+8nEagFaT sQzE5jTKG2mk6AF1gH8geQ9JvNCZ73vRVAogIdp+IUmQHT656LABIvEWGUCBVev+8eVC ajD7Y+ZHEZdweRm5P84q1Lsy2xIMeY/svuQ4e7k7alI1qnxZbd5gZMYlry2SalGHEZ+z 15FuDR1AQ2gs7h8/Z07Rq9evVqT66WCHu2Iya3+6UvILaltm/f2yP3H7ywj6OmbskQYn uT6Q== X-Gm-Message-State: AOJu0YzdjyGtHdVd4irpSG2tcufNeI34xfgdHKg9QMdRoKyep+LqgXCt N8KpyB1v5CoDMOx62joD6bHPYCDoQYyy28GmlhisZsqLeExj1N2iuRLopVlIQ0IgUt3yQHrpU6i t8dM= X-Gm-Gg: ASbGnctQ13NJb/RmHKX+0hPweLlubHrcDy24dKIA+qUzMiwuLHYRVANPi0j3an9Djrp nK0bo48ur8itQTE7q1JUYdTyyg5Ql3uffHDdeIpNCusMVkUjc5EW4gHdHm44Z6iBbAU6R7UlDlI N53RDCLSinxB3BmapIbCCxlzWEhM10ESTg5LwnAinVTAfJWYf6GKfXo2vjt9TyehnzShLxIfYE+ yuE3ItROTATQdKCtsY19OWDycSc9MeHw0Wk/8Dt9CKzm/Hbgd8ivA2LQ3xYGEXFo1HRUE2/6n6n UIW+N7eHX1EkXmXgxZX/tiMndDy33qfY5aJ2DFaBf4Ux X-Google-Smtp-Source: AGHT+IHsrTctZA7T98GoAjZcAG6E707cPIOSM6QcsZhsVvq9UPUg2kUQ9eJxgIpK7zPxh80fLwzPDw== X-Received: by 2002:a17:902:f644:b0:224:76f:9e45 with SMTP id d9443c01a7336-22428a8c6femr219904905ad.21.1741582731096; Sun, 09 Mar 2025 21:58:51 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 01/16] exec/memory_ldst: extract memory_ldst declarations from cpu-all.h Date: Sun, 9 Mar 2025 21:58:27 -0700 Message-Id: <20250310045842.2650784-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582796750019000 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. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- include/exec/cpu-all.h | 12 ------------ include/exec/memory_ldst.h.inc | 13 +++++-------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 8cd6c00cf89..17ea82518a0 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -69,18 +69,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..74519a88de0 100644 --- a/include/exec/memory_ldst.h.inc +++ b/include/exec/memory_ldst.h.inc @@ -19,7 +19,8 @@ * License along with this library; if not, see <http://www.gnu.org/licens= es/>. */ =20 -#ifdef TARGET_ENDIANNESS +uint8_t glue(address_space_ldub, SUFFIX)(ARG1_DECL, + hwaddr addr, MemTxAttrs attrs, MemTxResult *result); uint16_t glue(address_space_lduw, SUFFIX)(ARG1_DECL, hwaddr addr, MemTxAttrs attrs, MemTxResult *result); uint32_t glue(address_space_ldl, SUFFIX)(ARG1_DECL, @@ -28,15 +29,15 @@ uint64_t glue(address_space_ldq, SUFFIX)(ARG1_DECL, hwaddr addr, MemTxAttrs attrs, MemTxResult *result); void glue(address_space_stl_notdirty, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); +void glue(address_space_stb, SUFFIX)(ARG1_DECL, + hwaddr addr, uint8_t val, MemTxAttrs attrs, MemTxResult *result); void glue(address_space_stw, SUFFIX)(ARG1_DECL, hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result); 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, hwaddr addr, MemTxAttrs attrs, MemTxResult *result); uint16_t glue(address_space_lduw_be, SUFFIX)(ARG1_DECL, @@ -49,8 +50,6 @@ uint64_t glue(address_space_ldq_le, SUFFIX)(ARG1_DECL, hwaddr addr, MemTxAttrs attrs, MemTxResult *result); uint64_t glue(address_space_ldq_be, SUFFIX)(ARG1_DECL, hwaddr addr, MemTxAttrs attrs, MemTxResult *result); -void glue(address_space_stb, SUFFIX)(ARG1_DECL, - hwaddr addr, uint8_t val, MemTxAttrs attrs, MemTxResult *result); void glue(address_space_stw_le, SUFFIX)(ARG1_DECL, hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result); void glue(address_space_stw_be, SUFFIX)(ARG1_DECL, @@ -63,9 +62,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 09:03:52 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=1741582901; cv=none; d=zohomail.com; s=zohoarc; b=gCHkjE/2YduK6V05ejUwY5xGq3eYVeKTkZcqyCambnTsS5nXASa3xlMgCgMMams4yoGiV9Xyvze67oRWxYHQUsh2Naj11dpwDGCj69T88oNvut28M7q3HlbIdvOljRQcrfQ+MVT5pUIF+nKXqzYK0tUFkpY6ysNE+tY3hBFiE3I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582901; 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=2OIqebmv6TCVHIjcnbRR2ASx6yOnmt3f1dkycngreo0=; b=YLymYPpgMAQ9GrVtRNXnv41FeQQGQ69h1rMW2JpezA0/1Uc4d+0wRMuvHYelVjGeyizUCLWg65SIxnF/yF8973KYn1efJQxCnCetoWvjYMxspzKmE2mSF+cgs/VPrTbTgiuhqTgCjQ41ksvnHu40IDMByWuX0XRNoPqh9VpAayk= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582901028114.66473937391902; Sun, 9 Mar 2025 22:01:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVEO-0002rE-1U; Mon, 10 Mar 2025 00:59:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVE9-0002et-04 for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:58:57 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVE5-00089l-Ni for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:58:56 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-219f8263ae0so68330205ad.0 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:58:53 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.58.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582732; x=1742187532; 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=2OIqebmv6TCVHIjcnbRR2ASx6yOnmt3f1dkycngreo0=; b=jcPE9O9P8Fc95FdoQn4698mHWysM37eBDw4J3oDl+/Xyb8dPUdsJVD/WwiEfk9zAzd 5iZmLs1u++gqW2JsYog+YYLxwZfv5Nv84MD5raFcUVtk4/gxUoXZb5qGrJ21OS5BaOEq C4tCEBtxji6s65G46WiSD2tduxPi4TeyYzNpCzvaAisn2LRJpyZ9bg+1Og9Yb3y8vOM1 fntk3UjG/kVH8XwOSSUnNlkWTzceTd5Uima1pyJx5VgF7+bGNWGg+MUcXAHTkYP7bkvJ OtJWFpD+iSY1+xkQVpTgySDz/W9tFFDYMVdDktH+jJJTNd33HATg/F6zZtNAGS8vwetl Zkaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582732; x=1742187532; 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=2OIqebmv6TCVHIjcnbRR2ASx6yOnmt3f1dkycngreo0=; b=ipVAPGx+nzLs56YohfuGawn6v2Y5xNvgud/Vl9/ID0E6YSqkiNQs8H7sDHgvb6Q64q yY+CtAZC7QIk8VIRM4OZcM3v6eNcu7dikM4u8xn+Qz1hCsTcRCHYr2b5qKHYJM2Z4AFt J4NKNWYoPOWkAUQgfQMJb5jYRFcznJlFERvQZqw3GFl/pb3tW7iGN269Pw7SOO405SN3 NIChmzqPxV/iO+7dIi6JoQog8TifYukB7CPBsqIltN1cP6YWxb4RigzDhCYNUXMVwdqH SSXnYMa84Cmjl8u0+tRFXklwSs/j3ggG1uHANwOFLLdkoJjhQ5x3V4PDLsaFy7REst3e A2aw== X-Gm-Message-State: AOJu0YxOMdPv2YMX+OgTvRgEpgK19XkKYJaNm9SzDKrZ98GDzla4DEhm qWE7NDILQbIJ9cGjbkV8rRQd6hjWEdOxa5s5GNiZeTTGtDu7NFvD2wPAONSHAbjW2etdi1rEQXb UXrw= X-Gm-Gg: ASbGncvVwFFj5CNeIriqG8AHwWnPzPfr4pOcLnVsbepKgahOzh4hEdf9rGqWhyMa7E6 UbPGOLofKn9JEafG4Q5R770RSWCQXOcMmjVeNMlNlJosejc2IcPzq13neUFvRrql0oEw0weOQov 8C98A3obINWfNFbwAKugK4Pw6Dh+Cf7L9pJlZ2FtRzehvzps4SjZq36jBbHTEBlPiXkRlByAECR LzfyrdLHwgeAUL07gtt2WNKQQ+WYdqJjPnjpdTDvgR+L/gYPuXreN1PFbiLDuwW7zofKbWrhChN gbOSPlc9IL3DaxT4dRbpkVjq26uGIU7LxZLz4pDhMGQ9 X-Google-Smtp-Source: AGHT+IFiauNE3phtYbHOElNurEea3KFBOmPJM6YIEsLLcuetadtqaCJcJRoQf8PU7u5dj3ax/cwksA== X-Received: by 2002:a05:6a00:17a7:b0:736:47a5:e268 with SMTP id d2e1a72fcca58-736aa9bc787mr17756988b3a.1.1741582732211; Sun, 09 Mar 2025 21:58:52 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 02/16] exec/memory_ldst_phys: extract memory_ldst_phys declarations from cpu-all.h Date: Sun, 9 Mar 2025 21:58:28 -0700 Message-Id: <20250310045842.2650784-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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::632; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x632.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582903003019000 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. To allow this, we need to implement address_space_st{*}_cached, simply forwarding the calls to _cached_slow variants. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 15 ------------ include/exec/memory.h | 36 +++++++++++++++++++++++++++++ include/exec/memory_ldst_phys.h.inc | 5 +--- 3 files changed, 37 insertions(+), 19 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 17ea82518a0..1c2e18f492b 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -75,21 +75,6 @@ static inline void stl_phys_notdirty(AddressSpace *as, h= waddr addr, uint32_t val MEMTXATTRS_UNSPECIFIED, NULL); } =20 -#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 =20 /* page related stuff */ diff --git a/include/exec/memory.h b/include/exec/memory.h index 78c4e0aec8d..7c20f36a312 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -2798,6 +2798,42 @@ static inline void address_space_stb_cached(MemoryRe= gionCache *cache, } } =20 +static inline uint16_t address_space_lduw_cached(MemoryRegionCache *cache, + hwaddr addr, MemTxAttrs attrs, MemTxResult *result) +{ + return address_space_lduw_cached_slow(cache, addr, attrs, result); +} + +static inline void address_space_stw_cached(MemoryRegionCache *cache, + hwaddr addr, uint16_t val, MemTxAttrs attrs, MemTxResult *result) +{ + address_space_stw_cached_slow(cache, addr, val, attrs, result); +} + +static inline uint32_t address_space_ldl_cached(MemoryRegionCache *cache, + hwaddr addr, MemTxAttrs attrs, MemTxResult *result) +{ + return address_space_ldl_cached_slow(cache, addr, attrs, result); +} + +static inline void address_space_stl_cached(MemoryRegionCache *cache, + hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result) +{ + address_space_stl_cached_slow(cache, addr, val, attrs, result); +} + +static inline uint64_t address_space_ldq_cached(MemoryRegionCache *cache, + hwaddr addr, MemTxAttrs attrs, MemTxResult *result) +{ + return address_space_ldq_cached_slow(cache, addr, attrs, result); +} + +static inline void address_space_stq_cached(MemoryRegionCache *cache, + hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result) +{ + address_space_stq_cached_slow(cache, addr, val, attrs, result); +} + #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 <http://www.gnu.org/licens= es/>. */ =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 09:03:52 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=1741582842; cv=none; d=zohomail.com; s=zohoarc; b=jEmkB4/6tby9fC6o/ycL6u/VC7+gbtVTJ2yYhy8nHsCKz1i9hRjA/6AEgwDLd+FdZA9mHQXZs4ElfgIZjuN4Zkn7PuE4g4/jqeBTtSOKaHAoeNq85mzEFr5PwwXez+HBbkvbF7K6/83/ilXfaE94R02Vij1eJEaNTrfrx2bwP5o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582842; 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=OGwlDw5fL6/8/4sqaw9ZjtskhrLsqkJfziSvtmiyf9E=; b=i8hyJy8+kDdMUc46ZQcfwrbdFDBhV7g8U0re4GRo76V17Gx5e9zEoW16rC5YudBDQ7Nhwig9qmuA38zTwA7F2G8LRuXQckpk4QBFaDWYNnhbUiGym78i8akPTeqPgsAPjink2Jd3XwnIlpKNyFq/ur7HckXSDlrlCQRAJiU1XRM= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582842718816.2518891086613; Sun, 9 Mar 2025 22:00:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVED-0002hD-6H; Mon, 10 Mar 2025 00:59:01 -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 <pierrick.bouvier@linaro.org>) id 1trVE8-0002eX-Mm for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:58:56 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVE6-0008AM-O1 for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:58:56 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-224341bbc1dso35372125ad.3 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:58:54 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582733; x=1742187533; 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=OGwlDw5fL6/8/4sqaw9ZjtskhrLsqkJfziSvtmiyf9E=; b=C/dmSnoo/WaJwqv1MvGKpaZcIRy/+iYe73PGBeuXHt7fEZVcPRu3VP1DjJinKaKuG1 8jGgHm/K3T04G9Gx4n2heD+Ij+qc0LmPGb4jED36fyF2uUWa2yS8tZAVoTqrgYqHRQen /MZyXK8hVI7OvG/OqDEl4RRIh6NaD6xfPpn3Q9gjjdim5R27yrms1bSzC07AROFSaZc6 CPEFDx7+aRUfmj+tu44eaXWD3aiQ2KIRvtlKA/qGMTDOoLV/TPu/vSqfhy/kAP6WcyFH PDzdQ3v7DGbRt9CUMZse3ki2pcIrqINMe38C2LptuEN3SUfN7PaaSaW0WilHAGnTFRbJ SuDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582733; x=1742187533; 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=OGwlDw5fL6/8/4sqaw9ZjtskhrLsqkJfziSvtmiyf9E=; b=PTuqWMTkcdTweoKisxVmHgCrfN+QdDjZ7Ir79PDIFiqejEUizxuA+gCAMl1qx57hXo F3aJlde+HZ45FptWWoR2O0BKDjmm39W9JWsjIDmjV5BwsjYyzCRsVbWKMG1tQIZsaeQj deTlMZvQPhoTwIXvhaAmoARUDfxFz6vzPvYOoe9hFT9sZM5Khu/rzTnse2Rt2ln9kYdm Bs/Eabh7z9XfkhNadLqN9cC3Rpf1/n9YVtJxUO95hSTnXlHjeKDz1RtcGLFQin5yWxYg fZ3YnGuqnc0OYXyCoK31HowmHc5ZTItc9xoJ2ojbLTzsQj4DLW75Fu4+d1c4LJTmArWH BHMQ== X-Gm-Message-State: AOJu0Yw63f/CqKC2cvTDDj4PNRLv+KNaABeUPtPQ/afQ09ph/b9CJsWQ y8IFYYl9C5KAzE1Vy2oYgt9rVKhhz75xEi2wxei4HmlNSVVRAYNk0yaz1JvKYLZQYXjRFbAy+te 4bGk= X-Gm-Gg: ASbGncuggsP/mf6wd/vhszRRtYK+KlsLKi7ajSppyBykmzH52gUh2PiqevgSQFPB7NY yUqRUYWfM5Hs65NCffNp4qauJtoR7cG0my6sQ7Ph1BOC/YiCnqne4xFTP9nQGCDrsdsszel/h7p mSeWF9AL5VjjQe6+ZyYz2Cmh9LfaJmGpbp0n34RdSLY+IVnBIltwvtZ6y3bDPxQK5kjPMqBGbdg NyMN4AXjeQyCzU/BNZfVfxoNZrL6SqTVJjrcB7rHEXhE2yVnFMsqwCXYVWuaj3p3c1BQa0VdPrn R53StkxZ/VjJ1aDInCBbOThsPemqrXfOc9rK+f/7SJ2k X-Google-Smtp-Source: AGHT+IF9OJp4stFJ9k/lsvOwoQRvqqkA/ZzdxglsajfWtO3On0dbMxz5MT0xvVfYC1mLC7gyZMGdug== X-Received: by 2002:a05:6a00:13a9:b0:736:3be3:3d77 with SMTP id d2e1a72fcca58-736aaac69ddmr15637676b3a.16.1741582733352; Sun, 09 Mar 2025 21:58:53 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 03/16] include: move target_words_bigendian() from tswap to bswap Date: Sun, 9 Mar 2025 21:58:29 -0700 Message-Id: <20250310045842.2650784-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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::635; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x635.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582844987019000 Content-Type: text/plain; charset="utf-8" This is needed for next commits (especially when implementing st/ld primitives which will use this function). As well, remove reference to TARGET_BIG_ENDIAN, as we are about to remove this dependency. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> --- include/exec/tswap.h | 11 ----------- include/qemu/bswap.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/exec/tswap.h b/include/exec/tswap.h index ecd4faef015..cc662cd8b54 100644 --- a/include/exec/tswap.h +++ b/include/exec/tswap.h @@ -10,17 +10,6 @@ =20 #include "qemu/bswap.h" =20 -/** - * 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! - */ -bool target_words_bigendian(void); - /* * If we're in target-specific code, we can hard-code the swapping * condition, otherwise we have to do (slower) run-time checks. diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index b915835bead..ebf6f9e5f5c 100644 --- a/include/qemu/bswap.h +++ b/include/qemu/bswap.h @@ -1,6 +1,8 @@ #ifndef BSWAP_H #define BSWAP_H =20 +#include <stdbool.h> + #undef bswap16 #define bswap16(_x) __builtin_bswap16(_x) #undef bswap32 @@ -8,6 +10,16 @@ #undef bswap64 #define bswap64(_x) __builtin_bswap64(_x) =20 +/** + * target_words_bigendian: + * Returns true if the (default) endianness of the target is big endian, + * false otherwise. + * Common code should normally never need to know about the endianness of = the + * target, so please do *not* use this function unless you know very well + * what you are doing! + */ +bool target_words_bigendian(void); + static inline uint32_t bswap24(uint32_t x) { return (((x & 0x000000ffU) << 16) | --=20 2.39.5 From nobody Fri Apr 4 09:03:52 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=1741582937; cv=none; d=zohomail.com; s=zohoarc; b=faAxBC2MvtQE2OWuA3v9jbbAfaw0inv6wjSTolzsW209536uJ+X3Y8xmk/HcWGqIGlVgpeMqnimRUItAIlc2KLSloTcTqVKgTcVnioEgXysHxWyD8kv2Bft4FWgStHtw4s+0tG8Yt1rDGllro789ozvn+Xq8uhzORw2InTnE2Ds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582937; 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=S8ktbxqhQcYI9crAlIF4CNR4KDCM1LZDZwDTggcCVc4=; b=fm62ywSkSL/Vo8o+ZvoDi/d0sW/TltBiXsFZwZ9SIMKGXazm/cQHUe0c0qIb1UfS7pCx0fJcatBI32d9NYGpipdOtFW1pzaaEOb1CFQ9M000zpStgcJ8+tOLmXZGP49tl+ubqG4Izj1WXYWX8zInbLCZBHExMdCFMlpkLtxRbMI= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582937758438.11968608324673; Sun, 9 Mar 2025 22:02:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVEE-0002jh-Os; Mon, 10 Mar 2025 00:59:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEA-0002gh-11 for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:58:58 -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 <pierrick.bouvier@linaro.org>) id 1trVE8-0008Ap-1O for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:58:57 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-22337bc9ac3so70486805ad.1 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:58:55 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:58:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582734; x=1742187534; 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=S8ktbxqhQcYI9crAlIF4CNR4KDCM1LZDZwDTggcCVc4=; b=XqfG/WawNVMKLNTOePVoEkkyUACJ8hHblHL3f6oFS5TCmnQOOK0UQ8dIgksKjrSJae GIHQPN+TtteVEzDhOBdP6vfBydY4EOo6ANP9a3CNB4ytUy575jU2aLuNu6p4H+Um841m ORPmqIiE99kikX6CPCje18WIKuYmv9CPh1t5lYjXFvnF2MAeZ65eYqAMiG4lM7kCNzPl bLY2BD7hbnl1MYsr6PAV320UltbfjQcH5UuqMIKrdJ6wEaRRzesn7GJWi5WSJmVsKu02 vhTRD/RhvsVnTuw6+UzWB7/w6SDPzdxfYvoaaj/FWdTrWkqbUWu6QCj4X/ibcnGp+x/s caWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582734; x=1742187534; 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=S8ktbxqhQcYI9crAlIF4CNR4KDCM1LZDZwDTggcCVc4=; b=WiFNGvZLOkGBeiZVxVJRXSgvCf5wsq4f2Utm4m8CoIe6nT2yttxtNHfzUO/ThqdCdZ XkZvs5lQtKvMDJM+9udJpuUd+gVQTUi0COir3jmx/gvHh0ZWi2PILU8tzqZ7yPghHkTj eyPlTmE1agy8JIDkhxoSM/6XNBLVbQuZZiiT4D/pk7SwvGpR1kRukOxM6cSpiUbcO8rt SkznELW+0EAP+MP/dDzefvTZGY7t4d96qqewwTu90z2+rE1kqQZnmgnghJPjgboRjYJd Ms3XSOuV7Py7ZnHi1U6EJ2nCZ4vByNnSv34suH+AFcdyBSUhGlMpaE8yslHQvthW1hXP HmhA== X-Gm-Message-State: AOJu0Yz9K5KnPzQmV/SY+csikOAwYgLJ4ybv8x7UYTsjOy+HmSP7bbzI 91twC1B6j/s5vJmcMr0W3/OUhGdBJnGpura3Q4DjNrkTygcTSmotPyqu+o9LKfPo5gcIJT9m0su 9OFs= X-Gm-Gg: ASbGnct7T8/WK0lPwRQa2c9N77hPSJaD+FWeBIIZtBas9soTq3vDFdNG7Ppzq6Svlyd /AtLVOc4Us6D0lL8Ewk/T2VcMUJjUnq27WYm9Oalh3RjBAneJHU03BSysMqLH+O5VWp5+xEY5Gv Wrj8KYqeXlIUzLTdyDNA0QzaC5d610cjlfSnnLXC8ACKJnDENyH+Ka72G3QrzMkhceXvzgF5gBt mIsG1UFQTIUzuzFu3+rm6olpyFJSpnN0UnnNEQJkUtlbKe4eDIJdWkYiJM7Z96WurI3E+QBtn/k G7xoPHOpeqd14xmvNNe8CqNybJeMEvLohoNLFuS0w1gD X-Google-Smtp-Source: AGHT+IHkXXNzkEnz2BccPlbhHJNUY3LGOIbmL0i4gzfHTIIx3yoWhp8OGUsmgyQKBXK356JOEhoSQw== X-Received: by 2002:a05:6a00:2493:b0:736:ab48:5b0 with SMTP id d2e1a72fcca58-736ab48061fmr14740098b3a.2.1741582734610; Sun, 09 Mar 2025 21:58:54 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 04/16] exec/memory.h: make devend_memop target agnostic Date: Sun, 9 Mar 2025 21:58:30 -0700 Message-Id: <20250310045842.2650784-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582940754019100 Content-Type: text/plain; charset="utf-8" Will allow to make system/memory.c common later. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- include/exec/memory.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 7c20f36a312..698179b26d2 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -3164,25 +3164,23 @@ 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 + if (HOST_BIG_ENDIAN !=3D target_words_bigendian()) { + /* Swap if non-host endianness or native (target) endianness */ + return (end =3D=3D DEVICE_HOST_ENDIAN) ? 0 : MO_BSWAP; + } + const int non_host_endianness =3D DEVICE_LITTLE_ENDIAN ^ DEVICE_BIG_ENDIAN ^ DEVICE_HOST_ENDIAN; =20 /* In this case, native (target) endianness needs no swap. */ return (end =3D=3D non_host_endianness) ? MO_BSWAP : 0; -#endif } -#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 09:03:52 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=1741582875; cv=none; d=zohomail.com; s=zohoarc; b=HTVb8JhmSU3SaRUfeelmJaR0s7B1hNHxoNlXsTUAReka5F6dnYcZMJmckBqcQtrhXy+mTR/2KH+y82HveBHrtkfHbx3QwKn4V99JF+Db6yByHqEJFdt0okGrJFkWwshoZLddJCePzYwhEmvsWQA3+wCW0hbQ0ztZHydSUI+IZ50= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582875; 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=gKLFWb+An2Ks9U+R2rK1VtO2Tw0/JUbGbAmdQc7IQwE=; b=ORHfYG+rnhgMxJJGUbQ/yvPYwINLN2EJBwKM/vLnIznR9Oq6OlF0F9ahnsY2P9fxLp5tSOlGLnXM4RfxnKoRAGHrfQjrt4nVLRNr3iCSNiayI1vA1JhT/rlzCLs1y78r4chd45UMGK0oayN2UmAjj+uvldFrgg4i2rqQjtcVyfs= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582875174769.5065358470183; Sun, 9 Mar 2025 22:01:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVEQ-0002z5-FR; Mon, 10 Mar 2025 00:59:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEA-0002hP-Ut for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:58:59 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVE9-0008BP-4G for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:58:58 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-22398e09e39so65589495ad.3 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:58:56 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.58.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582736; x=1742187536; 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=gKLFWb+An2Ks9U+R2rK1VtO2Tw0/JUbGbAmdQc7IQwE=; b=JdiFIFNFGaRXaPCm8U5P8FdZpKmDB6O6YwU21ocPjsoaVLe0lq1/R4rxCoDY9Ephfm NJ1tnLk2zDSG592CXIBfXbup8YOL0RRq4zJEMrHzaGChWnaqyI7+0BiMHbDPdQK46bqq ZB7mnF+8WGf3zj0GiU8mC2CVw5NS+50HqrS8G65oFyh5P48K4sNZiRC+4EXVytz/6rrB dtI4cjaPOTgpk1WHHWlepIhydmduKHlzTiqACZ8ZBHvypuaiBejPXSoRdQMFrLSMKwxd pR4zYO95cwV76eW/VA54czC+YQQ0EBlb3ooPWiNJHiA9tABq487eGCEocBBroNVLpWHz p+PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582736; x=1742187536; 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=gKLFWb+An2Ks9U+R2rK1VtO2Tw0/JUbGbAmdQc7IQwE=; b=SKjm0VeQN/w/25gWJGjmMxo7SaXs8tWu66Hwa/BLPTe3XuupG8bZpcKUbi81CKguIx GGzM9ExYPNYxYC9VFZfguNkYlbPpQ9iHFEmz7PpWuKngA8x1BPfnAnX6GeVMdo9MCzav 8IKEMPCDqOQ/QhldotbmVqeZLYQU10o81hck8zt0z2cOUp5gRvlt9Zf7CymKa3tX49/n kA4WK/0pif27K7gBcpIAWGot3GXup8eN5EXhjCamXCA4Yx8x8V1lUQIg7EcCNjsEO2p0 GlsCbs4ZGhxcBOpSC1zpjQ+VWYJ8MmefhwL+pPmESuU4lUn/4RXmAtK96+wVS7Jcrk1L KrcQ== X-Gm-Message-State: AOJu0YxU/FnTr1dH3NhP9H403jl54z+gBWFyIuOZ9ivf3xDEJTceRDsr uW28Utraqhybw17IytbR9ILYokSzxhIMMke8n6g9jlP1Fv3x5z6kTZyLm2pxV4HFQhfHxwbfxOa KpuY= X-Gm-Gg: ASbGnctAqdD/pbQAl43aVUQMIJnBtpKHsS5Jgx3Qi8g5Ww7BNKukjblOqSi75G39X0U cq2RNDRFaFGSHs+Sv2upbWHxoVWCnGyz12OoXpyrcbPsnmXf2z+yinQSRj89nP5HcAx2QhW5vpe YGjGAdcoVDvMLI2feSoDvIjJIKANsJMPzBL7ZdmvT/djxSV/xcjmfoZ0dX2UscBo3ceraCyBACi MJLssTaPGaojabEYkdcNqOO3TT4oeal5m00tdCnZeUTD1BoNya+2YhXGm+0kgS4XAUuVTEtbJoS totUSqY7xfYFklwhE76ieFnM2nPnvP6IOXBu2hu/GgOP X-Google-Smtp-Source: AGHT+IEAovvlOy2ME9s2bcowigrmpQEpYOhHLOJWN1HotCTdKvUP3vKFXajlsE4wLKble7VBohAKKQ== X-Received: by 2002:a05:6a00:4fc6:b0:736:32d2:aa82 with SMTP id d2e1a72fcca58-736aab17045mr17832470b3a.23.1741582735793; Sun, 09 Mar 2025 21:58:55 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 05/16] qemu/bswap: implement {ld,st}.*_p as functions Date: Sun, 9 Mar 2025 21:58:31 -0700 Message-Id: <20250310045842.2650784-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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::635; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582877066019000 Content-Type: text/plain; charset="utf-8" For now, they are duplicate of the same macros in cpu-all.h that we eliminate in next commit. Keep code readable by not defining them with macros, but simply their implementation. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> --- include/qemu/bswap.h | 70 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h index ebf6f9e5f5c..46ec62f716d 100644 --- a/include/qemu/bswap.h +++ b/include/qemu/bswap.h @@ -442,6 +442,76 @@ DO_STN_LDN_P(be) =20 #undef DO_STN_LDN_P =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 + #undef le_bswap #undef be_bswap #undef le_bswaps --=20 2.39.5 From nobody Fri Apr 4 09:03:52 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=1741582797; cv=none; d=zohomail.com; s=zohoarc; b=gNi6NPXWUOSUdRiFru+UF7BNoYpM9+ouwEPbodn8/SKEGXF9Ojb1biFoEzMFuudejgS3hTJMT909t/w+Anl2sNY7krcbx2dUAV3qr7FAsyiT4ANL74eGYxxS2GHDV4P5Ew36lmfzjQVERHNTGpIWXT74sqZ68TFCvdGZj2cWSfw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582797; 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=ErKU0wbfVZdnsjs5NMSuiTB4KixyX1gD9AraKkIZNBI=; b=POLnGVeUIhASLvA86B8/saYD/BsZrwdmhSAU9Pel81Toz8JPj9DyAWDgElAZf69y6i3pG/Y4MiQAR+0UDXA4j68R2Z5Xp1m06eK0CfYCxhyztvMMzSbHkc7vM/cObPPGwZ2F61YY/rhs49Q2EH2dawteVRydd9jP9hCWYyOJ2Dg= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582797847295.80021157769977; Sun, 9 Mar 2025 21:59:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVES-00035v-O1; Mon, 10 Mar 2025 00:59:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVED-0002iE-Gq for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:01 -0400 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEA-0008C6-L6 for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:00 -0400 Received: by mail-pj1-x1031.google.com with SMTP id 98e67ed59e1d1-2feb96064e4so7420520a91.1 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:58:58 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.58.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:58:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582737; x=1742187537; 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=ErKU0wbfVZdnsjs5NMSuiTB4KixyX1gD9AraKkIZNBI=; b=Wwce749RdHqlRIBZdhrckPzjhjP88AYfjokiqXFaAhgQLoXstreXcOoKtRrqZFr1Q/ 7GcYLPbDlUIzkM/14W+uly017zKgkxkbl9nLoKSa7Bt7KEb1T+xvZ/s4nCGpD/CPHALl 2h6jRWIHOEcdVQXGUY5JZQxLq6JQQJNWbaCSwAdn7owihpXGldkiiJpknoXlaDNG0B+c mv1PJubKa68QATrc+S4EF635osuJQB00I2WDI/qrU5HZ+4gfrSL1vDsoNtsiQiJ7uwoh z14m92uCqW61mWzZI3GcnLoxmzG5fZU3McNEI7x+lTBQotkjNuUmdPfglZHWM9bZEJ0z +XQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582737; x=1742187537; 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=ErKU0wbfVZdnsjs5NMSuiTB4KixyX1gD9AraKkIZNBI=; b=Ou6g6OHmHRicFhWlK3+gcUDiEvrB6eNvpAvli0FelWMQvygktfLcqBqY9gcYeXXDVS jxwM+qbetKmZNEWWNDs+2+1IUGCMwGROXzd8sxkGNerTkq9rblJFETkAI39HCi5Hoy3J 5SSYxVJcUNPyhd84KYjXXjilZkilIdh0Ze9cuPo7r82F4YLNVEHxL5x8G/hi/7XNqB3G d40tzQLGdGxjSHLE1BmV51Kb5nyf/Z9cwDjD53lgCa7FgfLfTNxUTmW10RS42hT4Y+Pa EjuMWqaUYYijf4toD09Kt2ripBbAJB6WY8PTYe4RUfaQWdb6qSK7ppL5wRLqPOoJo0ew 9QWg== X-Gm-Message-State: AOJu0YysIb7Wo4cicvlGunYY6abmVO9ehdftYr68nVEqjqzOs7Z6quoz S3+Zl7e/idqEuYMZgCP1qYjejIzJ6gE/3KrMar+EEI3P4nk5bS9ZNqBqWsWEpCaV/6FJ7YQoSAK cXRw= X-Gm-Gg: ASbGnctHyWuKqqoUPpGKpJ193RrT6C+Nx4O+yTt8GJnvK5EJ5ELwIKtUZav/Jt+dXLD 54MqL1ykGYSa52Nrymk8JyL3BlMhzSoXkgkpG6WIGDoY/XiRACXN89PuFUQkbRoKUN1EPjPfYS6 uTLkA+IL7cVxj5KTIA1P+5GOgnDmzGt8RHaE4aZbDEctOdWKi8wWP0G3xhXg0yZJeJcdiFFbSPW kJ/xwyGvn+m9d+IMiinW879qOvKTYOXRnL4HBV7q6K0Va582sKADyRigwjQQ9nFqIE1FpEA7O5B NlxZaDyIYgtk0LyCVt4SniStgUcMVXh8RgTSoFBlt0za X-Google-Smtp-Source: AGHT+IHO0adHTKDFbdiZLdbwVjzffyYfi7nVPL6wN+0ieHxoGwNOezFQMlR0NxHpJZQhWhI8f44U4w== X-Received: by 2002:a05:6a21:9786:b0:1f5:8506:5039 with SMTP id adf61e73a8af0-1f585065599mr1040552637.28.1741582737079; Sun, 09 Mar 2025 21:58:57 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 06/16] exec/cpu-all.h: we can now remove ld/st macros Date: Sun, 9 Mar 2025 21:58:32 -0700 Message-Id: <20250310045842.2650784-7-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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::1031; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1031.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582800414019100 Content-Type: text/plain; charset="utf-8" Functions declared in bswap.h will be used instead. At this point, we finished to extract memory API from cpu-all.h, and it can be called from any common or target dependent code. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> --- include/exec/cpu-all.h | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 1c2e18f492b..625b4c51f3c 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) --=20 2.39.5 From nobody Fri Apr 4 09:03:52 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=1741582958; cv=none; d=zohomail.com; s=zohoarc; b=gTy1zRTmGlmr1LyEpahYvMo37bYSFIn/wweNboWLgRSi4Wfw+tZBHjzS9OiXzZpcqa7aeNE9zb6/2Wo3+uBYlVvB8/QYKe8/q1cQjSeZDeDrskQSotnIiDUzRPGQ9e7kN1+ad3XWUFY5EcEhEotlsMMKEb8NjZ+mqyH7qoQVu8Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582958; 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=8s25jeAGTcBk8xCVR99anv09nY4TtNOY1pAkSQYXuE0=; b=LZeIVn/7iXUzc0apV5JNprkhqPJ2vr5i9LksKQgti7+9HXKkG1MMGPmLU3dJEGGoV8+H5shXX2euve6dNzB1wbs8k/n8/L5WCqXllMhEkohk6jKugF90ceR95ezElkF4WJyUodW4B05wCSQuGQkmB2O23Q2p3pHFG9woukoXqrA= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582958865741.8686923157271; Sun, 9 Mar 2025 22:02:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVEP-0002xB-O7; Mon, 10 Mar 2025 00:59:13 -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 <pierrick.bouvier@linaro.org>) id 1trVEE-0002jV-KJ for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:02 -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 <pierrick.bouvier@linaro.org>) id 1trVEB-0008Cb-Ic for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:01 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-224100e9a5cso67677985ad.2 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:58:59 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.58.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582738; x=1742187538; 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=8s25jeAGTcBk8xCVR99anv09nY4TtNOY1pAkSQYXuE0=; b=FT2AMJmHPXRPAFnTCSUvwxAyd8qigQBdwqs3pQGAweV0AAQUZurWGzj3Q8QReepFfs 0wrE4ZHYegSPjEsl2gLm6ggHjt2CDd8Q8b3HmcOLLRTE56fg/vTxymABUKlabEZNhrVr ippkwC7tzKq9RUF0fDXlDcDYm6mFNbDadxh5bvYImksfRF/eUMS/JIp+cretcZpR/YpI 0XBGpKQ9I5ZLKiYCtcRZuTnyGkL4XK277KSZb4B1LWZdyMK6th3nauVhMSJw0PMYqd+M Xn3vRjxy3ZsrpIiU/YwWwpa8P7gPk4dAfaNWbJC9y6UWiKeYOVkWFoe28EYapIK0mSrF eQGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582738; x=1742187538; 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=8s25jeAGTcBk8xCVR99anv09nY4TtNOY1pAkSQYXuE0=; b=chQOQa8XnZoa0mzv+NjkZJD+k0l5iL04Le1ZDltv+HXGFFJNzvdW0cL9s2qrGwzELz NL/2fhWeokcuyr5XA0eedSGDyYTTvHxzhAc3/B4Y2BHN/BTxqtHYB0idMHlvuMivl54Z D2DEw0U+XVI+IYnpQEFd+amUcCCN3VMt++59D+43Kdz2LzbbI8BeQDTOuX3Vj+dCBYOG kcJfeLmzanT7Lyq5lOsBUHD8ZTQ+3UUwHp9Chx7SGfMj4HY8V33SUviBIQ19fxIrz7mU 6/B9Mn9Zfeir8miomNc9gE64IqbHLI9bdhrgLI2y9TFdKMp/iXAUDvmzM3trRwAZde/J HtnQ== X-Gm-Message-State: AOJu0Ywuz0vwieBWgYF/0puuLhPN+OFqbA1V08StXgsQrG/+Q4syATHd 5sFwubmQAxc+I0RLgkvrJTSfVhHcDkvuBQSnUYqt4nqoj9TpbYEVFnITsF2U3avaZ4a83BU956B aOJ0= X-Gm-Gg: ASbGncvhPhWdi0cMYwW8HV65eZ/SQgrvh+FM81seakm0IGtV22pYS564/TZMb3XGwie ZDpNKNFOC73O7JF6hWdn+IeoHJpxuvXGag2ek2gbQrDvmcwpQOsXQEFcKrGiQP3CJFMhMXA+577 cq4k//TVJj981Rws9dMdSESZhwo+D1nFY7UMjaw0uMo6RmHZXMuMSlqvGrWEgtFOu6Lq743vcuK foF1uSLtF7Rx/5LfjfZFwhZlU2iY+hcoAIno3+i0ep0L87ouZIvSpTzR1O2jsaA2VCo1dcV8Xa5 cMp85PFrZZhMYLQlupmjf+hxsxqoSOv12+O0VJ0jqvibNm1ZAPnbhVI= X-Google-Smtp-Source: AGHT+IGRoGZ7coEeYo9o9fE7YTKv7YM5Vcb8VYcCl0LtzUFuhPuPAIbAabhl/TEnMhgrans4FlUiUA== X-Received: by 2002:a17:902:f648:b0:220:d601:a704 with SMTP id d9443c01a7336-22428a967a4mr181654565ad.18.1741582738292; Sun, 09 Mar 2025 21:58:58 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 07/16] codebase: prepare to remove cpu.h from exec/exec-all.h Date: Sun, 9 Mar 2025 21:58:33 -0700 Message-Id: <20250310045842.2650784-8-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582959567019000 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- include/tcg/tcg-op.h | 1 + target/ppc/helper_regs.h | 2 ++ hw/ppc/spapr_nested.c | 1 + hw/sh4/sh7750.c | 1 + page-vary-target.c | 3 ++- target/riscv/bitmanip_helper.c | 1 + 6 files changed, 8 insertions(+), 1 deletion(-) 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 23958c6383a..18bbb1403c6 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..12fda410bb0 100644 --- a/page-vary-target.c +++ b/page-vary-target.c @@ -20,8 +20,9 @@ #define IN_PAGE_VARY 1 =20 #include "qemu/osdep.h" -#include "exec/page-vary.h" #include "exec/exec-all.h" +#include "exec/page-vary.h" +#include "exec/target_page.h" =20 bool set_preferred_target_page_bits(int bits) { diff --git a/target/riscv/bitmanip_helper.c b/target/riscv/bitmanip_helper.c index b99c4a39a1f..d93312a811c 100644 --- a/target/riscv/bitmanip_helper.c +++ b/target/riscv/bitmanip_helper.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "qemu/host-utils.h" #include "exec/exec-all.h" +#include "exec/target_long.h" #include "exec/helper-proto.h" #include "tcg/tcg.h" =20 --=20 2.39.5 From nobody Fri Apr 4 09:03:52 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=1741582997; cv=none; d=zohomail.com; s=zohoarc; b=QfZFA+BlF/uEovMjapC5EbORg9AnfjVgSyJnWnTb/+vQisv73hs0AAZLmfCq73oEwXHFfvrukgA7SgL1DvFECjtssUVH8KAFOWd00bjryOTgjgduZg6znVWfSh/vwasJNPpi0FE6CIB5xtKXY1mAonbzKpVC+pZynglfmwVX7vA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582997; 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=nnRQREfY8a8hSo7O5I1BTgAG3l8eG/Rc3wUh1Oiddgs=; b=Bit8KwSY8LiwognFfrchtDUMVOFLFL3O36qBk7OhbYjuTNeFlckpS+zRfw19NnIR0hFVGFmhPiLnzAmXkdoet1S68wYDQ2O7hsBoZ8EWfdMZ86dJ6Cvh4hbrWQUw0Q92sHZavevFBgeYCzgwmQGnbFiY7832G2OPaiP7C8l/hsU= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582997190542.7117053408726; Sun, 9 Mar 2025 22:03:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVET-000379-1g; Mon, 10 Mar 2025 00:59:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEF-0002km-Ij for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:03 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVED-0008DD-Bs for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:03 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-223959039f4so72659255ad.3 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:59:00 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.58.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582739; x=1742187539; 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=nnRQREfY8a8hSo7O5I1BTgAG3l8eG/Rc3wUh1Oiddgs=; b=pBB0yIIQMjqXPtIPw2JtEsxFF1ibdordyOWSb/+W6GImQNLIqe5h79mYRQEpbVhIYM mNNC26cnt0PCnR7gz9/+ZWY53IXd/3L/g7p6fCXWvTqSkNYfCkqdqFyTPlUdJw4Okj+p jMmosXMlFB8tvRa6piN8OlGJ9O6MoLov//rcZef6zMq9lsB1IgZWAcxbYTvVmuDiR98J WEooH5ZHxi6E5IcipvtISeBCkd8UW5wEMJHS6Emg+H2yKnIHORX/0k7UJiG4Xi87wa4L 2YE3M+Py/jtbDM6xqTZ+TBk7hkHB4wH5yxy6GEEI3Js0d7qbDmNwA6iLM+4wUSoh5J42 mbtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582739; x=1742187539; 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=nnRQREfY8a8hSo7O5I1BTgAG3l8eG/Rc3wUh1Oiddgs=; b=YArsvN1cBAdYcdTP5foBYGJTCbpzYZp6wDdlYfdpDd4Mew849L3wI9FZNuqY6VAdk+ yyxKWRs23pnxYMLNnOc8baYBSMuCifdSgBnzWXxKWKpkU+dC//Gbfq9lvotvMeX7aI4N N+oFKhfDHjS7L4DUUJm5+7+FncUdjZxK0T/uKs5/7Uy7/qrKm8HRDhFhcgb5jWZ+Z0yE 6XMZzxvbDfMSbzSJ9iU2X1z5628QiyXS/KUmBBIGnCnMR2gbbe3Q2gbpgUAdf+3uLSfq PgXIBFNFe0Yl3RxV8E/au5ndNkhllviY8RQKXQtruUkO/N0KYEsbvM6peiTjgVgdHO9D Y6Wg== X-Gm-Message-State: AOJu0Yz8+47gHqlzw3qqsqzyrCWJrvu/ZFqRVy+7H17mmVxBR1whl4pV EIHyOGkl2vhTFmr2iT+ErNo1dJ2H6EYbmhpxg4qOF9cuqS1QIruo27wStQ5rYSteMwwV4mwC+Jv FTp0= X-Gm-Gg: ASbGncvmq8HJIIzmbxK7LS8Ld4P8gyjs8Df96bBXat863Y5UgGgeNo+WDyUbDl0+Bcx ZQqi5wUYYFYudy2Vaig2z6be1QENK3USjIGZiTwpI9viePYgG02OaqANhfs7Td7CAKGukOVHTNu Dhe82kjAmzjlbPoDVGF7ZYVaSrW1d+HKwL2JiV6OhRCxFOEqpCYTvDAgiPdwpJ9fhs3/fN40G5J P9Md9B9vzRElzs3X0uhIHGYfokg0zJJH9ZTPrUaTNUDAeFGkatk/dFboVVzoMsZHp8GzGUaWl8f BJWoj4d+/dqhXxsh0MFUWWGU8ds5Bu5aHlzP9M/NU1tV X-Google-Smtp-Source: AGHT+IHAsq4Y63EYcwwuW/i7zg2X2liiOFC3cUgAGGWfi3nL4Ogmzyt5TH8VxxgwmAwHkd5TSMj4Zg== X-Received: by 2002:a05:6a00:3e29:b0:736:5ee3:64d5 with SMTP id d2e1a72fcca58-736aaaed79amr16963023b3a.23.1741582739550; Sun, 09 Mar 2025 21:58:59 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 08/16] exec/exec-all: remove dependency on cpu.h Date: Sun, 9 Mar 2025 21:58:34 -0700 Message-Id: <20250310045842.2650784-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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::62c; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582998833019100 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- include/exec/exec-all.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 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 09:03:52 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=1741582920; cv=none; d=zohomail.com; s=zohoarc; b=dsm15JTIW5O7CHcFoiVfHRXl+JZXdmPxZIKNvzHW0SGB4lq3MTw+YZAYIKrQXsIm1rGo+aQj1iVlXNaFdKl+UGJNZZQXOKE/omlyDdiBfihUUYP01d5SivKZEndAho0y8ACeqky6ly+bLEPa1Y+sWSYDCsb4rNEydR8sHtthcA4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582920; 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=IPEDYJNluDpPES/gm3SGsU7HvgYj8dBtSrlHoVBQ0cc=; b=deWyEIlcVA/MnIi2GSP9e8plCpbX0Ux/ndOiqQGJ0/JPPN16pHjwE1EdAONpuUdRytgAMRxOrIWOHmugcxYlDDfX9bk/QD5LcMgOJhstvtup6RgFYnOaO9D3kFy4AK/tFN9hitL2gi8MG2hwWZVukYMCAG7luzylWvsva0415mA= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582920745313.0918164927324; Sun, 9 Mar 2025 22:02:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVEW-0003Cl-Hh; Mon, 10 Mar 2025 00:59:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEG-0002ma-Q5 for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:05 -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 <pierrick.bouvier@linaro.org>) id 1trVEE-0008DT-In for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:04 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-22409077c06so47319445ad.1 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:59:01 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.58.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:59:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582741; x=1742187541; 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=IPEDYJNluDpPES/gm3SGsU7HvgYj8dBtSrlHoVBQ0cc=; b=w5WAxzQkQYi719ro+LOhQPeexczifTbfpsjRxYjDw/CzalY7NBp7/8HHWfIljuD5HV 1uuvLMK752Mxts0Jd6K9n+bcm4mtDr9tv6Cphri8doMk7Dd6G7PccsGKGLG93KHytLIO GiT3dzmdoF9amAnfzzHjYmf5EfqN8vmp8fR1REztrOMbxmxCh9Bh+R3RZ43u2N0gVdCl kUoNQb+qFxBYUI0W+Q+UDcEpKUBcIepg9XyxKQxH43vxhDgMsDfLQHUB6fRQQFjMICOb 8ykoUy8bNapGbnyfd18CnhHlVd15EsXkGmMZ9K1q0WKE3m/rBpqwoEGEeAcSuwtbgGcV ngJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582741; x=1742187541; 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=IPEDYJNluDpPES/gm3SGsU7HvgYj8dBtSrlHoVBQ0cc=; b=nPVFsKpCmdrLMjCj2Sun1fPQXpe9IddVluH6xeZP+Wn40VoA2C/flTmogji8YKvI2U /AU9ed2/YFF+0+eaOww4UlT+uk/xV8zPLSc8FMI9S24EClH0zptMIx8lYmfnfJxPPoat M4Wv2mSGuNp2licAwOoKeoi1ZuSM7Ib8zNdPAn9oPjJNppnCYLEipQwH4DA9KS6ZWy+C Sua501S6Nzpvu6CIhyYqX4hAVQgAOaeJgEkmaRFyr3+i1SElmjPJvrn4KdzPrW2QzHb0 rIcO1UYW8wdYT4bpWPdPoO/QjCuLCQ6O+kAzhIJxptYvRKbNQlTdDO4FXM26tiWl24+H eDbA== X-Gm-Message-State: AOJu0Yxizcw91DJKVAbF9oYQmXBsC4TtSmzu4B505N4sbfFoPEsd+nfF 4ou2HdFoQMUiGQHlJWsksol1jvJNbROasuFClMlttrQ2cA59+WtbYpuS9DYSxn8tWdjCpxrDSNt YopY= X-Gm-Gg: ASbGncv6AGmOcSBt82mLtjqAPLWhHfKj/03atZ2ygT2ro76PRLCMqxvvQ/8N/kCZYFH cI/1FyJuEIQrkWA+14X6Tsw0+IMQgN+r1kIot82QDTt4HcGgdaoDAfATDJGH7H2kuRt3XhtRjfS BFWdDsEBwgwz2Uab1H8+ROJSofT3FkAaZ5YVVWwjTm5NDJR52JZ449WQjds891S8tKh0qInSdOA yOzCKcsM9VM3BuXcpwytxILA+Cw2T7eyTEnxEbbw58ugY6SoPD1/CcHPvO3JypQioftpvgrt66i f22vVWJyZOPvpYUYLjv3Yj70eGNjhCxHJaWsC0z8x41K X-Google-Smtp-Source: AGHT+IGnRL2uatBuqKhV40BV7IK05QSeZki08kFFlneJ+DA+/in0OuYiAmS5NbuJabl8/7CaVrRM1Q== X-Received: by 2002:a05:6a00:cc2:b0:736:4704:d5da with SMTP id d2e1a72fcca58-736aab14d5amr19552625b3a.22.1741582740826; Sun, 09 Mar 2025 21:59:00 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 09/16] exec/memory-internal: remove dependency on cpu.h Date: Sun, 9 Mar 2025 21:58:35 -0700 Message-Id: <20250310045842.2650784-10-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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=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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582921005019000 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- include/exec/memory-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 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 09:03:52 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=1741582797; cv=none; d=zohomail.com; s=zohoarc; b=Y71xZAXRx15DN4bStJvDRpmoGr8YazhuFT/9t/jBp9RbhM9PuIEnrDjjL8Lino7bcNp2q5cgbSxa06JIBe2ok1BV5O1s4Ujr2XLWMf8LcIn3Jcq9tqdkJj0H1NgKlF+NjzcDa03pTiK/9+jmnRqbKgk7XrCcVRxkucJYy//XCOQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582797; 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=pcOq/B0qkF7oBYEuLqTVXYwaTmG9K1DoxB38gebkidU=; b=DmQS3LzTKmdtp9GXjc3d/XKKY8J3L+FEwmU7EwQewK/XJB7N97VeOQgYU0dv0aOK2Cxc7Rw1tLNrt+jbG3S3J3QZQTwSFPat6h2cXMgf+SLOKMLXI4OgBXR2FeQH4Y/05GGbuJ2c5FLn13MVomVBNi7WtKp01zIAFsM48u8n904= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582797045168.64681135217677; Sun, 9 Mar 2025 21:59:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVEU-0003Ai-SE; Mon, 10 Mar 2025 00:59:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEG-0002mb-VD for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:05 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEF-0008E5-Aq for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:04 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2243803b776so52191105ad.0 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:59:02 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.59.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582742; x=1742187542; 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=pcOq/B0qkF7oBYEuLqTVXYwaTmG9K1DoxB38gebkidU=; b=MmAje4LwQBE2I1ZMIg8wQsLaVTq+sBbZfC4bNlM/JcEAPe0dqg3IaOO502cq8Qz2E/ uRexT1Neu2vw6vS/0ZKGMfJLG2POAHFRjeBSxHK9HD3y2Lt+zGFgtO3LJ2WkitirgTro 6Lavx7SHQe5V9ycv1dYH3otkngjF4Jh6alAF0n/zV6RY5mr1FrNfMPNJC4YEHV8iXSFZ x4oC+nolMNUNYMserNjQAB8vdAyadFiOwikpQZhaYJ/k5/3OD+wn2jG35Rr+jPbvhStY Al52QVCeMMU6WaxhoDAT0rcRkUyaIq+ullAs3Ep13rXunxp2CRKVymsKdsOmOsc9nMdz /DhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582742; x=1742187542; 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=pcOq/B0qkF7oBYEuLqTVXYwaTmG9K1DoxB38gebkidU=; b=o304f6QxLkBtxC2z+X/7ADs0wQ+4RdfyKYi1qPcmbo8fWidW5Dwy2gCbpyGao96mMc 3p+mFScAAfv0uiVo745fhWtWmZwConlgWhbvQUsP7zd3nirnjDARR5EaD/rNxVTbBAHw Qp1SrrlRkTxykOsm5ZFEHnEY7f67VwGqp4RM0qvh8GmUWbYwZ1735HHA4TuaopbqvHSh qUT7vDjeVHxmC/+23uvHfRonbdoucKpQayi3t2KXfMU5ho/hpGLZR4hikdkSrkbd1gt+ wfhQRr5OVminDoJK5TOrr2WVOuAvJ5CLAyn4TA6dANlMSAa0xQAwpv+EcAJutDJYwUhJ 8fAw== X-Gm-Message-State: AOJu0YwRRVINzI1H8CrDurXsKEH3aHnlnSiPkNav79ZPv7GaL72iD5Xt 0bdkuoR09QBls36eYtyMEFzTZYA8M3NlkZY4fW74AMKRZi+Hy8u+koKgiKpPUEQ1DprE4Y6T9Jm R4Wo= X-Gm-Gg: ASbGnctyzXP1lQmRc2a/Ox9iVwa9yRJ4pErYZ1+3EZ98bpoqvooWzj4IaURNRic7d7L ytogVJYaiJmy+V9GSpQlucGHzzxQN7S0Goc/J5psDhCl9GktypJ6eayU2M4gULPwanW3ki7yDSr k8w8Rr+QuHAquK56lWbixjw0Ftv2FC4bvDTZ2LvszApOnmoD7UiByyyIYFnqdsT5d/5Prne6ttw mz059Z7IciCOUb3VYZFXOSqFPJOC6dzw1QerTX+ThKfXTUeergGRdzrrmhJRvvxelNPdF+Z5T6q nNyLUiEW+ponrrvYrxoDN0jiq+pbD48J2KFY2j1cJall X-Google-Smtp-Source: AGHT+IEEpEpujiC2fwj7VGkMO+uHTookE/oxRvy3WzoSDUTK3dbiUUraMl3feFU8Mr38LhiryglRJw== X-Received: by 2002:a05:6a21:8dc2:b0:1ee:c1b2:76d4 with SMTP id adf61e73a8af0-1f544f67b54mr22292031637.40.1741582742058; Sun, 09 Mar 2025 21:59:02 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 10/16] exec/ram_addr: remove dependency on cpu.h Date: Sun, 9 Mar 2025 21:58:36 -0700 Message-Id: <20250310045842.2650784-11-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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::62c; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582798473019100 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- include/exec/ram_addr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 3d8df4edf15..7c011fadd11 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 09:03:52 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=1741583013; cv=none; d=zohomail.com; s=zohoarc; b=F93fH0/R6IT5at8Nm2mwJAWUqmgMls22MYGlMo1ozvNRnCvyOnOT5U0Saz/Jlu6/XPxJ2e5yQv3fm73FdYqHnHPqNZCN5Z5RAiz56KNEYMd2kAXioQsnGSP4aLxgKITUoIjduF0gjdmDttcHey3pr3yX/Qgfllf5hGJCRa+xLfI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741583013; 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=bTI1e75Far6tkvgIJWf413Q47HXvE/J/3XXxjgsh6yQ=; b=IsFE+F6GoQTqGnv6la7/NEknXrWHGcKk84+BD3I5iFy9g2/gZ8+v6sOD60XiIyfZszFqSy1QMDmjp3pub6gX+eLLiKPAA2GPICcqYY47hIXyFxZT0P1BMeUW7WghXV4xYLdwR1yXRix0v3jHnp8jJMwE+21eeI29xFXf5LuLesc= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741583013105815.451453497291; Sun, 9 Mar 2025 22:03:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVEX-0003Dc-GZ; Mon, 10 Mar 2025 00:59:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEI-0002o6-3i for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:06 -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 <pierrick.bouvier@linaro.org>) id 1trVEG-0008Er-Hz for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:05 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-225477548e1so20296065ad.0 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:59:04 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:59:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582743; x=1742187543; 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=bTI1e75Far6tkvgIJWf413Q47HXvE/J/3XXxjgsh6yQ=; b=kgO0I2Z2i8woKAk8FaddliG1tD2SGpko1sMhM+i5IQXACXbaKOwwihut3SnG2h712+ glozo+AUSNN1lywt1nNQCH+y2KAxze+SUy45gskM6vzvkm4wj+EPtZdCgsyJm2WJOywL uFlcDWpE47jXMBmU3R24hhjYPZdEHl26w+dn2qjBw0kw6ZQsutu0E7bwWcvn5ifMObKC MMlTLFHRx7zIasTuHthRWFNdcxlnNbVCyaScT1tgKSAx2evD/uydIIIgH0hoSexFxPEm ZKW2hOyvnnT2ZZQ6AmX0EHbQcJyblgN0ip0T4SI1Pl6a/63QNFSAG3TmzITdBct83Yrn qCnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582743; x=1742187543; 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=bTI1e75Far6tkvgIJWf413Q47HXvE/J/3XXxjgsh6yQ=; b=KtoxcYFmrg54ExbqB0QanzyTo4lTGFZP/O9Gt8EJ2fBgM0Cwuec4Hd6y7aFFycT2H5 VqL7cmJCylHrSQZ62I6Gy0yhtHNq39QKg31VRp2ticBpX5y8xhlVpem1KNgCpBn9XYLo ojB7G+MtAT6jIJAasOuhthUU3umgVzRsZM/Mm2zG5y/YKxsZ4lAcAVZ8+P3a5A+qw9Sb EAkUNBD3i/N9LzJUw6rcfDtak5MmvbfcjZGy/tBrm0xcnVfUkiffAlxH3tBL573ebfOW ZsF9nxjBhsEJnFYHmBWVm4AfdVG9VrN1gjjd2IsPLcm4S1XFmdW3s4WxEmD0OVpGdHyf Mpvw== X-Gm-Message-State: AOJu0YzOlfnxoCpjLZsgAwJeobLHtMm9DPPzjD2sAUnE3kZzgZqpxyVZ IemQraBIKjR6h3t4YmDyYM6NT7USC5zqwuajBPT4NvCreOGqLd38AvHXGbVV+2G6955bSpNAMoX Ak0U= X-Gm-Gg: ASbGnct+unumZJSS3x9/D+rK/zyA496t+2RmTyS+oa2GiB4GVsHF3Z/f+KNScHVUUmB IKDzcwtROndrVOypT39Voud3d1Y4H8uqXatxULb+Yp4jPF2/Arqgr8/px4uGHkJk2w5xsIpB019 FOjLKiQY0fg+DYD7vf3v5RNXmnmCAZY6P2dkCPpxy7ni/7CsBJVkBFzMTPiKb+XnS34LQ0kIvhK KzahFQee1LE+FQsBE2dkwYUX2Uk1+tOdVV/u3Wnp3pc/mhPvYmutFvu4/XBZ6P8U7t1/6WehBUh gF8D/GBf9l5geVpG/n5LsOsbiCjaiSSBTEYaUmq2WmNv X-Google-Smtp-Source: AGHT+IEJmFw/36nK1SG72X+BhxhrmIBbQ3tB+znRJTwS+V3kz822OtyZYcKaYIi+o8+TLN45WlwkAA== X-Received: by 2002:a17:903:32c5:b0:224:3c9:19ae with SMTP id d9443c01a7336-22428c07361mr200227865ad.34.1741582743213; Sun, 09 Mar 2025 21:59:03 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 11/16] system/kvm: make kvm_flush_coalesced_mmio_buffer() accessible for common code Date: Sun, 9 Mar 2025 21:58:37 -0700 Message-Id: <20250310045842.2650784-12-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741583014883019100 Content-Type: text/plain; charset="utf-8" This function is used by system/physmem.c will be turn into common code in next commit. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- 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 09:03:52 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=1741582944; cv=none; d=zohomail.com; s=zohoarc; b=CpRcjllH1t0iwbihqWVYbHmmGbxOqknRIEqSdJ/hU9FFYB5D5B0rcYV/VCheW/PK1ilHKY+MeAqqTzHMc+KHY+GH/5Jv9eKPax/uzH69s6Jyk+BTOoyhNR1NQdL1dm9x/hzzb/MjtT53a+iO4IwhlvUG+rpOGg1HpHaFg1xPd18= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582944; 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=0+faf/Iypy1sVhFNFInOCPAbXVKj8STEbMMwCdFMyRw=; b=ZwRK2KCRl+nWZcKY3aQWuS7vleLaA0mBriyqOy9jWJRED1viIbMP3VsD+bcDd4U1u3zhcpxCLgeJreLAdzTUAtRvi4KoPL9i7P9/zdqklixIY3MT1WtePw1cRTnnp6+CSOO7VHfFPXUP7GxLc42Xf9ob0s17FUnaSi9UpMnb7vs= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582944249240.1368962100488; Sun, 9 Mar 2025 22:02:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVER-00031c-G1; Mon, 10 Mar 2025 00:59: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 <pierrick.bouvier@linaro.org>) id 1trVEJ-0002pm-Fb for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:08 -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 <pierrick.bouvier@linaro.org>) id 1trVEH-0008Fm-ME for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:07 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-224171d6826so50463135ad.3 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:59:05 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582744; x=1742187544; 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=0+faf/Iypy1sVhFNFInOCPAbXVKj8STEbMMwCdFMyRw=; b=ovCKNP9v024+gM0P/HHOGPI0VD1930U7Ycfp0GAZWknfo+rPit2pJhoyCBq3BP74DN S71l4d0kMgOO1uMJDfrsAg4F26bhaFnFiYrbfiiSex895/4i7iBBAkUySPYL2pDgJwxL B2o+QLclM2OS9yGYqUpBStG0uYc53z+O674YxKd23O21mk7m/kVDhCn7zO3d7nomE36y Z34Sc2K3JkWggtk6JKeYhsdftpMUVHk2ogHdsUNdQ16JTApkeFsqgAQWQPsKIhKm9M0b DQhXIPjeuox7xXH2idOYtoOlalRPiswJyVJPBnTYOk6+2refzcLj2NVRIu7inkkmcfEj C53Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582744; x=1742187544; 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=0+faf/Iypy1sVhFNFInOCPAbXVKj8STEbMMwCdFMyRw=; b=N9tJP6G+zH54BrRfj2FwBmN5KpbPjp1inkTZmYI1Ynl5WaF3Ugbo/7ngeeCgCuPfZB mjMD9mXeYKhpj0EVryubgk8E7BzeDIZ48/umXiI5elZ/vU9bp06mKbpQLaiZ6s47at3R rSQqvwwwTOYF86QTBU7t+RUJocPu/VxiFiAfbjcJw5AMSI6eDQnCHrOIr1a6H13Ex9nA PGC0odWKcdadba7XJzVeOJo1bj3a9L0FuZf7KQ6pOy5SII9fG9SmWzUnmJ8rG7+kFeBa kcgDDYSLvxQXeuSdoHzOfXE3N3Nt7G9eUR+oIw9k46VzwS/HdiRY33hJLPPzjG81iT89 6b6Q== X-Gm-Message-State: AOJu0Yw15za/aWkVmYriQ5aZbP/JVFprbgAWWVJYkbz2wrb9EM323BUw yQUtmnO64qU6rbfhpA04D/d2lccknBaH+wQxnXeLKpEd84PBCE70iH4kjLiiWKkqDojiZ/8UfYM 6I2c= X-Gm-Gg: ASbGncvzDA9BwG66B0hRm7nUNUdLrTtXUFYtIFs4TKBrJa0s4x91Iqhs/3l1Vc4Bubg rbZf0XuJ7NcJfeMdW/cgnnz3kJcjo7qPs0yNYtHzxtRL66da/pDwlCCDfMndcyDRxtdd1X2Dv9F b6QEA81mgNBICJYa1IF8yDqEXUiIoDHJifyinZyS/Lybs1vEC9pJK4/mKnnRyGER4rGlUQI1JeN lwSSIgga73PNu+razxnk+j7WpRQjT4C3LYtZ+MUm0ia6IOPGG8FywecMq71JPul8r6R2HC1hFpu gk9IOGqUEHivvRS1jv7J74C/F0R1LSNHiDHZxZK8pAg6D8lsdxhmcY0= X-Google-Smtp-Source: AGHT+IHvC7npbpjr3DTdxoZwzYb1dM7G7lfM3pxuLeNMzVZpdYuqkJ12UM6z/Bptz/oCAInuSIhPSQ== X-Received: by 2002:a05:6a20:a11f:b0:1f3:2d62:3151 with SMTP id adf61e73a8af0-1f544acc6camr22843444637.7.1741582744338; Sun, 09 Mar 2025 21:59:04 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 12/16] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled Date: Sun, 9 Mar 2025 21:58:38 -0700 Message-Id: <20250310045842.2650784-13-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582946756019100 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- include/exec/ram_addr.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 7c011fadd11..098fccb5835 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -342,7 +342,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) @@ -418,7 +420,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 09:03:52 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=1741582850; cv=none; d=zohomail.com; s=zohoarc; b=TDLeeBwqDGYCHcLH+oVn6BZMa5qv32mkyTnC8+QLvljvkqD6E/9yH6ClKYTzbBGACH3P5ngOT+VOF5CiaEpSNmPj5RJbcNFpLcdV00KxuUZqpsCy/MTduIkWvVFxtJtozOW3Z7hA3RG75aY9jSTs5CgIOkmVnWQMAXX9xWRUmK4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582850; 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=Mz3bAPQKR6fBbshrwXBmzVU3oJFomZ1j01ZC38m+4VY=; b=Rm2z7m32qIOZFHyL/QrffuZkvbORGs2QfV7idJdskVavFf9cVNOsvWZE56dEyeU/SXkVvgWyRrvMIWTZsmvvpEyxHWRoeH+ECN0Z8qaAnjHTJp/Q4za4B7OQmbmdc2XO1BTB49SOfBqpZHGog/TwE03mPbsPC9VKXGL092u+vKE= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582850588838.9377500032629; Sun, 9 Mar 2025 22:00:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVES-00036N-S2; Mon, 10 Mar 2025 00:59:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEL-0002qO-Sv for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:10 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEJ-0008GV-9V for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:08 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-22435603572so30008625ad.1 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:59:06 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.59.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582745; x=1742187545; 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=Mz3bAPQKR6fBbshrwXBmzVU3oJFomZ1j01ZC38m+4VY=; b=TLlehUDwGr3Ojy/jycr09XR9AGfp44aChpgfM5jJV7kaXsAnSr+JA5kc4a3EqTKgpM JtxCX0tVzaWove2jYvdSkdAn9S8DRdO6zp6WHBlwT6FNJBdQYnitgqWkQC5ZZW+5dnai XaUkP9u/wkqot5dliz9Al9J4xvegDm3RNQsMDfVuuLPODSJXcR6PtgYxajmw1xy/3E/A uzQRBfems31WGv2A7S3iZ/OVUuV+G6g6o2N7kv29HkTAt/FKyasWn+Il+/q5UfA44RhV iERRe/ukaJ9BeHhn47IuEvrTlO9c2QLYcQGqKVRm4O9ajzHD4FFS7q4LHh1w9NRDo0X/ jxcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582745; x=1742187545; 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=Mz3bAPQKR6fBbshrwXBmzVU3oJFomZ1j01ZC38m+4VY=; b=tIhSRKpZetgZWLF/ojChPnfd1NVU5xugEjIdfY0CAAlOLH5mHQzkZpmfKG4HpZx2yw 0ciHAjjKmIW0oBo76o5fenx5JlkknXz3ZTXo2k5pZFXl0E1DfocKo6BAWzEv/9arEhfP /TFpfgBdXQVX31yoH6vB6opt7erDdEwItPVJZFxlEzo+qnvvQR4tUamqkGxG1ZX3dH70 tU3i5fSwEN0K41uVuC9RJAx/gVsHnuFeVS8DGdxQ/D0yetRaBMZT+pcFMS4q/mX2DiBL cGhRNwCI97nOSATgXbhgVynzbe84ou2BmHlH6mm6xeMLY15EuL8OUDmB4ctUgOW0EZUP voIw== X-Gm-Message-State: AOJu0YzZwP0TabvLcI3zkGmYxuESt7TLSYQBZ/333JpWGeDG8GlYqPmS oFur2pa6OB3sWKa68Z9ZA8NimwPQhwVBJ3aZOR36Y9inDDNPBzeWsUVX44DWK2h5yy8ugVI1POG GGUQ= X-Gm-Gg: ASbGncv4bzj9ggTOoRTZo1zTO54hFwHlYD1zSVu2UU7sQgU31+wHNeW53PWpVq9xr27 MADBtbi+MULaZgfd449v2Ms1K+/yD6PPm/44SJ9TuIwU3Lsx7gR5kla4h6WnaKWdeTBjco8npWF bQ1XfaZ36ZQWkHsMh8K7QPSRqbGnWOQNF89EXkeiOurQFrSh/0V54tTMsLBPEuWWELZG++jNRjB mpLZD8nelENaGsknHDvF52ln8HIHrevTmC39R6WJp4BjaLjm8LNzywwH69f/Oi2O3XLkumL8jgQ zWpGw4Qz18jQOL1fKHhrl0QuxBSWnsPlVJ8uBHkSJC6CDqpJlNQDvak= X-Google-Smtp-Source: AGHT+IF05iTMc8yin7+8YVYQSgdEUPUj/50hW5+Z0DK0JGoSuS9iEibUeyOyOMAIIkH5mDIAK7kv9A== X-Received: by 2002:a05:6a00:2e17:b0:736:3954:d78c with SMTP id d2e1a72fcca58-736aaa1ce42mr17690072b3a.6.1741582745578; Sun, 09 Mar 2025 21:59:05 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 13/16] hw/xen: add stubs for various functions Date: Sun, 9 Mar 2025 21:58:39 -0700 Message-Id: <20250310045842.2650784-14-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582852540019100 Content-Type: text/plain; charset="utf-8" Those functions are used by system/physmem.c, and are called only if xen is enabled (which happens only if CONFIG_XEN is not set). So we can crash in case those are called. Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Richard Henderson <richard.henderson@linaro.org> --- hw/xen/xen_stubs.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++ hw/xen/meson.build | 3 +++ 2 files changed, 59 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..19cee84bbb4 --- /dev/null +++ b/hw/xen/xen_stubs.c @@ -0,0 +1,56 @@ +/* + * 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(); +} + +void xen_invalidate_map_cache(void) +{ + 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 09:03:53 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=1741582880; cv=none; d=zohomail.com; s=zohoarc; b=WXenJzrnXOo5v545wCyvRL0HlC2IVJPLqJCSFHEPOjmkauP02sNbCtimDiy7gni5jom04oh0SML8XDPWPQrMMO3Ww2h8SjlmDK1kUtXGOVtfrAKTEc2pYmI7mL3kQx9+bHWid48GyPHeWhzphVLkY11v5qMquiO67Kj0coLKL2s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582880; 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=GMZho2jTEznhsPIS6UESQksv+KrJv0rJOAa8ZMe9/mc=; b=T0lsgw+hz94gnxeDQ25yoqp2t8l8kfT3m97X3YdmTI6Fxxz0q/gry1I04Oy4yUqQJavc0lcBOH9lll+HoJnUERMZ4mjDMQ5TibsIMaYpQyis8et6N0yfb1S2gWFUSFZToLx6AlOfpNk5zTUVwjD9V21JOJYqTxBSBGW7GeT8nDw= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582880330132.17021444011186; Sun, 9 Mar 2025 22:01:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVEU-00039m-C0; Mon, 10 Mar 2025 00:59:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEP-0002xe-Io for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:13 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEK-0008Gz-1S for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:13 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-223fb0f619dso69003065ad.1 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:59:07 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582747; x=1742187547; 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=GMZho2jTEznhsPIS6UESQksv+KrJv0rJOAa8ZMe9/mc=; b=vl/3QBoIqw9Qo67gjzeRTZf5tZdGGkp3Lk25WiyBkbcHApQ+4XU1tJxOeULMgE5/PM PJHZelilBpXjGuYDj4lbx5CuCFhH3ysjnYYENFVXMENJwK+/heFoKkrMBHIof8/NpgQn S4s68eN8qFQDBc+mqgwm1qrX4aIUkegXv9QyrvYIGCLedMbadpjhsCrwxEkdpcFbA+uV TIkeybhjxnDkT7fvXh6s3I5icbD1H3a31ud+kdnF/PirgRm5HxlPyeFncdb+oSNIxe2d wZKYuKBS5mHz2qXcEwXXhcpCdx6E+5lKapmgyfj4f1qdHj5XkhOI/92zOwwraqcK209p KUZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582747; x=1742187547; 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=GMZho2jTEznhsPIS6UESQksv+KrJv0rJOAa8ZMe9/mc=; b=bKrBbp6hFhE3ZIidDOPhpUEYSEj6WS85pGXttOdFOwF4KtnbodnRkYbveZ+8fUs4h4 8oSRA5X8mBVgt/LLKGuPGRI9icGw3RDkoeV5dSqCzvYEdi0iwJOhFReJU/QNg4/xcV5B wvY/REXoeb6zDURmDt9DaKofNj1Fkp4lIkOsvihBV4H5TGD9P8k84gr8nbiaQa+uPk1+ jzDkRXj5u4GEH02aiqHONpaz4oeH49Nf8VRvq59YmLpbe+G3Cbt1Rjrz/NEe3w/5zJ8e A68pjLqjQ5HyNUkMaDy5gKafD5KSlUdJdGjpqpc72Zl2KJJYFChYxpFD3z3l0rOMb/wa 2k+Q== X-Gm-Message-State: AOJu0Ywh5eH7It67Iv7MQHnPhFFs5NNpCdu92HDvlDdddmSQUXE0Kr1C /SNsx7vJtABshvFF7upsvX4BEXUEEh0Z6B/o//6ob7MANnmJ93r/1HRW3ecZ4Pe68ry/w2TsUhs 6VzE= X-Gm-Gg: ASbGnctprfWkyapYcQNZmCkrmnTnNVyH1wG4HZRXQ2HOrHVqJ+kUEoiUN7qesL9+6rW sTJht/MdutwE3pSk3tSCc35/PxVqRlw7St+8iElWuxWi5Lvn3tn8O4wZ5UnUP4ERRibWQmI6mzs +rMwaf1AnDV1RNKy56N3f1YV7ek+jkAeahyN6BuTxhOW3JECEEN5al51FUIIdiOqQmCtIDkhh3d QQxhejIjwfa+QG3aKby1Cn3OeRERu19eqtL5jBlYELgJqtITmQcqk6NctF+1SGurQC+mAl1kS2I Bl37AYBXHqVpk/JVa+0iBbWAQJ4+9Jx1+sHOyVH1mNs7 X-Google-Smtp-Source: AGHT+IHbQ1zJTyihYPTNnOdjfB7Sf4JwjgD8pBM833NXOATM0his3HUH4Ux5tSFbwWsuCfmQbH8fWg== X-Received: by 2002:a17:902:d488:b0:215:4a4e:9262 with SMTP id d9443c01a7336-2242887fd5cmr174335945ad.8.1741582746784; Sun, 09 Mar 2025 21:59:06 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 14/16] system/physmem: compilation unit is now common to all targets Date: Sun, 9 Mar 2025 21:58:40 -0700 Message-Id: <20250310045842.2650784-15-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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::632; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x632.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582881027019000 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- system/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/meson.build b/system/meson.build index c83d80fa248..9d0b0122e54 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', 'memory.c', - 'physmem.c', )]) =20 system_ss.add(files( @@ -15,6 +14,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 09:03:53 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=1741582880; cv=none; d=zohomail.com; s=zohoarc; b=jiQAXdYqpIl6BW+nybt9gqWDKWucllj00Um04cculOblj4daMN0K8ku+ZUop/S9pmFiCvU9J4VT9/PjSwLX3MS0nXuRAh8eeFGu/QKpSGhCydeppY2mN40VkGpfaPuJkAWYh/cThGiNoybrtUsLNHWQyRJCwGETk1P3uOdrrhaQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582880; 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=ca5XHIZHBD7tCKLnU5sMNG3rMchaOW2xdNGbrtAeUuA=; b=RJiVg6W3QnZta6nw+3idistsWGBh3ERxbpMN4Q7j5XfBNJ11O1pCVwhGGtxhx50OpyDjcBrlwwYsANWsOyqtzy2IEf1GsXciP1VRSJeLNqs5LpgfYDk5na+5PqmBvYTpPoLGoxR7ztWHSkcj0d2fmIVWgsJMf4WTlZ1W9H95urA= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582880760724.9008076464672; Sun, 9 Mar 2025 22:01:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVEa-0003Id-0O; Mon, 10 Mar 2025 00:59:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEP-0002wX-39 for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:13 -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 <pierrick.bouvier@linaro.org>) id 1trVEL-0008HV-OV for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:12 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-22401f4d35aso65269595ad.2 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:59:08 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.59.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582748; x=1742187548; 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=ca5XHIZHBD7tCKLnU5sMNG3rMchaOW2xdNGbrtAeUuA=; b=ySc+Fjh76uAWjQo2Kxax9o8asbpc5/1bAbd8ms9coFa2CNsf/RJN0+6GvgYS++0KVT +aY4ky90rvuW5F6oWXegFtw1prJ9FTInQpDQPRS7OFjoGTkEfZ4zHpLpIvz3m21fWY40 RPQFCFHkHy8oi1fi1WDh0mp1UFvwv/e6WBxa8SpaL/ES1L8Isr7Vt9VCtxiaIn8v+U+3 PLS6ZcaW7AfhbEd9arVI2NWPQNu8IncNv5ABd4yEc5gWrqIEoi5xCLmnPTnzYNt1i5Rw Lqr5nYGeHvrap8bHgY57vhQC+S3SGBJJWFBebqwXrEavmVoXRqgF5Hqzuzqv2DGN/32u AMoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582748; x=1742187548; 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=ca5XHIZHBD7tCKLnU5sMNG3rMchaOW2xdNGbrtAeUuA=; b=cXHZftJehrvt0GaQsACfyyRtBMXlhIGt2SdV5cLPDw1W3FYrqktGM6yWYs0cefm/54 4W1I8H9Mew2RQC9JSZtCr8l6yhKI1fuHowzE/J4ZlMbF1Y19f8jkJGK7HU/6rX64rU+J vBqQtjfALf18b/ADhb0PjVggFWmvZkft6UemyymEkotF09AUn9OAUNgY8KcJjBitnLmz DVchPxm/diVsfzjg+tidYXVn8zRg0h1DlgaaLu+PtihxpJaslon2ZMGGWM/oOcfwRbYd 3bK73v3duWK4Fbo7ih5fHPo9U0nW/gJBSSc1H8zMUVj1z9Vjfaf4rZuKNffkruxZ4ctP oJ4g== X-Gm-Message-State: AOJu0YxzMT29JDtCuid8UmgOLQkCqKu2VzYjtsQbgMkk7U7HxCWyYXSR WRWgVjwP80LnjsX1UbSy0Ki5U7iQ4XfDYKLgSt3i+dFmJ01QOxLgAEqaW60mnAx96eHY4kNPyxg mzbg= X-Gm-Gg: ASbGncv2Nx54VJnS4wR+HGE8CdXzPAbhQoPEK0Y4vHcI71GmMPnB/b0epxVLXBlR1hj sQC2bZC4KPL188N6eyQrDsIPuPxRj/QiD4A+8fF1mswIkQjpF/vQwV7CFuWvNFu3d3sypVT5yL/ QROjBp4njnlxo9dvaJG60jj+miOU3HyrJaCy2jffKvk/e7myNA/x2219EpdXp+72ajJoHKb2v47 r3TmTK+GvOKuAPYjccv4qxafZZhm3cVA9EJQnZVtspAGFU+PK0UpHGJu5q+PcR4u7bOGSAmn+ig mU09GJZuiNKU/GeuvJu7bHkMqoOd6DP88Xmo/8bGrL0j X-Google-Smtp-Source: AGHT+IHOxR50kjFp3DQk9gSBOkNND2h3Drx9YEHpcRm5j+6hJ+poi1niGnSE9oReFoFKVWczKyJ1NQ== X-Received: by 2002:a05:6a00:2315:b0:730:7600:aeab with SMTP id d2e1a72fcca58-736aa9fea71mr18336179b3a.13.1741582748003; Sun, 09 Mar 2025 21:59:08 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 15/16] system/memory: make compilation unit common Date: Sun, 9 Mar 2025 21:58:41 -0700 Message-Id: <20250310045842.2650784-16-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582882846019000 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> --- system/memory.c | 22 +++++++++++++++------- system/meson.build | 2 +- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/system/memory.c b/system/memory.c index 4c829793a0a..b401be8b5f1 100644 --- a/system/memory.c +++ b/system/memory.c @@ -355,11 +355,11 @@ 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 + if (target_words_bigendian()) { + return mr->ops->endianness !=3D DEVICE_LITTLE_ENDIAN; + } else { + return mr->ops->endianness =3D=3D DEVICE_BIG_ENDIAN; + } } =20 static void adjust_endianness(MemoryRegion *mr, uint64_t *data, MemOp op) @@ -2584,7 +2584,11 @@ void memory_region_add_eventfd(MemoryRegion *mr, unsigned i; =20 if (size) { - adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE); + if (target_words_bigendian()) { + adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_BE); + } else { + adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_LE); + } } memory_region_transaction_begin(); for (i =3D 0; i < mr->ioeventfd_nb; ++i) { @@ -2619,7 +2623,11 @@ void memory_region_del_eventfd(MemoryRegion *mr, unsigned i; =20 if (size) { - adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE); + if (target_words_bigendian()) { + adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_BE); + } else { + adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_LE); + } } memory_region_transaction_begin(); for (i =3D 0; i < mr->ioeventfd_nb; ++i) { diff --git a/system/meson.build b/system/meson.build index 9d0b0122e54..881cb2736fe 100644 --- a/system/meson.build +++ b/system/meson.build @@ -1,7 +1,6 @@ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( 'arch_init.c', 'ioport.c', - 'memory.c', )]) =20 system_ss.add(files( @@ -14,6 +13,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 09:03:53 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=1741582932; cv=none; d=zohomail.com; s=zohoarc; b=bTbizHPNIJqyxQuo67Bor1P51ErDgpxc5Jxb8fP3F79eZC9A18njyav/AnehlPUGwxk/4I+vWop/kdbB2r4wAbbHFNZUXcdRuEHYaqkIqWUP4CX6R+2t8E7fgFdbhEg7MmizHmnzmyXOGqvngOXR9uesy959DNpx9Dmxwt+7//M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741582932; 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=yo5TAW5cQeh1DHP1d5HtuffIuVKJac+rUoQhULbtd80=; b=OQAzBqj6U0LFhTYhHYTL6MCGl2yQR2+H8TqRtpayvxDHJalwtPU9a5D6DJK2u4EaoA6NE/7Zpes5X7AnljQt5IgRQ/m8jgDUs5sCq1MvdOmNg+e6IqdnzWtoE/xcwysGuBRqjpK0gmGqhcwDSCrLEGoZl9S54UxWvmFMJsoEHlU= 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=<pierrick.bouvier@linaro.org> (p=none dis=none) Return-Path: <qemu-devel-bounces+importer=patchew.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1741582932071627.4300416027585; Sun, 9 Mar 2025 22:02:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1trVEb-0003NS-R6; Mon, 10 Mar 2025 00:59:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEP-0002xc-IY for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:13 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <pierrick.bouvier@linaro.org>) id 1trVEM-0008Ht-N3 for qemu-devel@nongnu.org; Mon, 10 Mar 2025 00:59:13 -0400 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2f44353649aso5724933a91.0 for <qemu-devel@nongnu.org>; Sun, 09 Mar 2025 21:59:10 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-736d2ae318csm1708308b3a.53.2025.03.09.21.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Mar 2025 21:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741582749; x=1742187549; 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=yo5TAW5cQeh1DHP1d5HtuffIuVKJac+rUoQhULbtd80=; b=jLPqevBtlhY7745DKYvPHrRFxIFvApoW5Sal+uA+E2NTEbez2Qc4GUaEoDpLXoE34U +gbOrOh+awYNhahSqzxyPecPvCd+E/qxcm2x1xdwEbnC91krU9iYUYCdK745ub8/Dwch DO3u2zoVwar4c9WDX2zqxD8peyjJUtjEyO8mtsrXX1AAI22tf8BnTpfG6Ai1FLODEbCg e81B2IWDcm3CVd8E1lm6VoeykiGI2OdpBUkqb/oCmOq/dHcFeJ3KfneyG96NISUQ+UHE PPRND3AQ9ZY8yuH03DiQMRhcz/BU6pWTWCkT0zuyryj3aoXfa7v98JAVLeQ0mvt2vbnB awEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741582749; x=1742187549; 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=yo5TAW5cQeh1DHP1d5HtuffIuVKJac+rUoQhULbtd80=; b=K2kCUD1cPo7a1jrNyTXhRx8ZCYmj6wdRkjHKePbm8R1zyOUsBcg1CgtHrWuMUosIdj 9f46Fz21rs3JAYYXH1Xk8E+dkL7MeeoYmUY0r+Bd8xB8EyULLGy6ruxzJO6cY+5fmZzk KgvnW9I5z165mIb3Olrtn+I62UaHKnfafO7l+XWawXHRLg//6PK9aqgGGzvitQyr+O/5 qbiKL1ghahsp1N9z+yFxGQoATuVJ8zffquPwPYxwov8uUcxGvsXeN4m4BGfgFjReYjkV 4mNIu+SYnGy0eD+RYlHdYaWfHWcb/q1oCL6BoV+9QNt26iHRNifsoqL2ERwWqZv/gh8A YHhg== X-Gm-Message-State: AOJu0Yyo4HpjBEf0j6+J2fcMk2HpS8BTp7PKbdaMJegduCbiS+i/BNkh ASN4L6y3BMNlbO34+HKA7vMZmlpDp3psijA1iluMhmAzunhXCOo2Ilflj78AA5dO5k+Z+V10AxI 1En0= X-Gm-Gg: ASbGncv6663vFBg3hLyuTHGI7Z7Zb/mMIi0rWBWticNSfWJqW9d81JPo1rSZg08qk54 SR445mH0dqv07S11kd4ft5NzKJcyZxkrHOGM6pnIIglobR6Kg8PXgNYiMDRtL7mAUrVHlUNssO6 lcsMfgwfAQjymdrSz7lG7+7Y9fzWCUGCCqpuEoeDs0I+MmjDZ+vuiX6arxpW5E4Chav1O08++db tshlcUEg9BLw54t0Mgtqaab2tGZJQDLTsMgF/FJz6uUsn+DcUq1MJEPs9iJP8JeZaaHA3IWVTIi K1c2Eb5AJjWfXxrt5od8teNS0fyHhkHWtOWX1mUy2xKp X-Google-Smtp-Source: AGHT+IE5gWrqVh7MPBsCW9xpH4WbBfOw86WZFsUWQXQSa3FRghy/XQpC1OkuRKA1xd7a02NCd2RqPg== X-Received: by 2002:a05:6a21:6e93:b0:1f5:6e00:14da with SMTP id adf61e73a8af0-1f56e0016d7mr7868375637.40.1741582749217; Sun, 09 Mar 2025 21:59:09 -0700 (PDT) From: Pierrick Bouvier <pierrick.bouvier@linaro.org> To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Alistair Francis <alistair.francis@wdc.com>, Richard Henderson <richard.henderson@linaro.org>, Harsh Prateek Bora <harshpb@linux.ibm.com>, alex.bennee@linaro.org, Palmer Dabbelt <palmer@dabbelt.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, kvm@vger.kernel.org, Peter Xu <peterx@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, David Hildenbrand <david@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Paul Durrant <paul@xen.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Anthony PERARD <anthony@xenproject.org>, Yoshinori Sato <ysato@users.sourceforge.jp>, manos.pitsidianakis@linaro.org, qemu-riscv@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>, xen-devel@lists.xenproject.org, Stefano Stabellini <sstabellini@kernel.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PATCH 16/16] system/ioport: make compilation unit common Date: Sun, 9 Mar 2025 21:58:42 -0700 Message-Id: <20250310045842.2650784-17-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250310045842.2650784-1-pierrick.bouvier@linaro.org> References: <20250310045842.2650784-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::1035; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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: 1741582934723019100 Content-Type: text/plain; charset="utf-8" Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> --- system/ioport.c | 1 - system/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/system/ioport.c b/system/ioport.c index 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 881cb2736fe..3faec7e4dfb 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', )]) =20 system_ss.add(files( @@ -12,6 +11,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