From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236487; cv=none; d=zohomail.com; s=zohoarc; b=Nm3LO+qMwTf2yL1JDL9HrmaszqINKjl6PDQwLVbvH8XAtilEDHI9sV7NfxDIMMB1gkQZ18QFbUbB3RZzxL/S06e0in3eM7izoKdGgQieD6RzbCDXjAjA1aqGMjcEfHaOaj+NqdIu6Q5lPmxjeev4DSE+6TnFzuZO+eQ1cmNc4T8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236487; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=949DeBQijWmgHqYCdDdupcSTn3rDdND8nLqwkILEwEI=; b=XmP9H2XWibmuiHzBpf09GOe+TJgM/GyrbN2xbg6vlfi72d6oEuqnRKnu+XhKqnxDtd0/PcHpPjQ3es1WxqEMQAvwS2S3AqHZprjWr44XIMeyRrnkSBodTfOW/5TelXxKahmOLDqkINU4FHadFtJ2wqwdqYuL6D4eZQkM+xrT57o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1742236487779190.04151746868342; Mon, 17 Mar 2025 11:34:47 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917736.1322548 (Exim 4.92) (envelope-from ) id 1tuFID-0006Vn-J9; Mon, 17 Mar 2025 18:34:29 +0000 Received: by outflank-mailman (output) from mailman id 917736.1322548; Mon, 17 Mar 2025 18:34:29 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFID-0006Vc-EH; Mon, 17 Mar 2025 18:34:29 +0000 Received: by outflank-mailman (input) for mailman id 917736; Mon, 17 Mar 2025 18:34:28 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIC-0006VW-OI for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:28 +0000 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [2607:f8b0:4864:20::636]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 749a4835-035e-11f0-9aba-95dc52dad729; Mon, 17 Mar 2025 19:34:27 +0100 (CET) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-225fbdfc17dso32761415ad.3 for ; Mon, 17 Mar 2025 11:34:27 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:25 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 749a4835-035e-11f0-9aba-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236466; x=1742841266; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=949DeBQijWmgHqYCdDdupcSTn3rDdND8nLqwkILEwEI=; b=WO1hDLydXsc7OZ7t5g4FthRZtjra2wRWu8Ilq6KjPNb4fEABSgywqUVgt9d9UsKfvr m+s8yBmlWacZ/u6QdmeOdH/LuNsxQ5d3dCCpILT6JlOMh9BoFE4/OW/50ZoncrP5rRJM Kn10rrIVBR2kf3AUVX8tqYBaitD8wyPeVyo69hMW/mFR+zHtxnTXQfL1oEQdBj1A7mJ3 AYbTRConn83QsN+VmqvkU1P3SOkmCFWSEDaeDSJVK+ehgWyhcnd+tNJT+twuXrTK2AsW OLu4kz5bUMcch7Syp/PBdwcnMZkkivI4vkWkCigG2qbi5rZZXApk4su4eeYXKf9zMcz1 g8PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236466; x=1742841266; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=949DeBQijWmgHqYCdDdupcSTn3rDdND8nLqwkILEwEI=; b=bMPzKM0s7d1H6gvugjt2yw4EGGVmptef9VRSk+nIy9zKsiDDJBHhkfavUCTcp7IM6v ePsvQUMy5oaYS0E3pCDhdj/lWFG4i/Y7OPMjKA6tC2vZuB4B4UXyQ5SCRHfleuJ3CFC/ r5DVjC5vqXQ/WNJjFd3Y3kdJ0Plnl6p6UH75+sgUT+3iF3xq4WDo2ksaArTgyuT7l/zJ 7N7mtknqdWBkoXSM5OEPHkTcQMKBQUpNLi2Wv7kFn6gNT6J27WriPiFRcIlgme1ODZpn JgQJ0nD5e5I8Lv6qdBEIgXVBuT5i87ldC8SFivYTwyQjwIvciwQojjDMpqCU4N1yHBI5 VJWQ== X-Forwarded-Encrypted: i=1; AJvYcCX7SH21ftS/5reg36w6aF68XhKpqsEiFccyzvKoH3peYkjJ9lDgKjIZ2tRwc76243+pIXo5eCK7Fbg=@lists.xenproject.org X-Gm-Message-State: AOJu0Ywb0PPYPyPIfnb+y4E4BFglq9p3mBWqbiVjcbIjaLaqgndgeedS AYW6jD5O5etE2SOQwevwZ9lY6Tgpaw3i9i2ioLL0JsXNg9VNzLlIRWJ9X5ViTQA= X-Gm-Gg: ASbGncuA775tYZmbu9tnkiA4IKZXRCDbZWjUQ3f5VIoTPbnJqBO1xQ+Sf9xD1m0yE3R D92GEqdlv3zcrPJXmTULuL4zxvsUGjs78RhvD+Z8v5V0vIcXwPl5LBia+3Ih4K/QJMhLMkFHkKM 0B+HWUYDRCF2tcvxzWGMt09gEFNfR6mpVY1Y1p2MT6KSpfIN2JE0kd5scquDTDy8k+K2BeQS77V 7IVNqOc1qKbSN06RWgCzMV2rZTFKBpIX2TS5AUqU15CxfJlG/N3o7DNZoShlfOTYWrmUvb4msq9 WNd06w4DS/nDem63fWW7cybxMQnJZBP/pB3Qz4JxJTfR X-Google-Smtp-Source: AGHT+IEMdkhHnCOZBQ+9EV0uYxPSw6/JcOSk+BrsDVDiw8khDcGewsFrIqa6c3AgQ8Es/TqwcULwNA== X-Received: by 2002:a05:6a00:139f:b0:736:9e40:13b1 with SMTP id d2e1a72fcca58-737224726e5mr14180634b3a.23.1742236465994; Mon, 17 Mar 2025 11:34:25 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 01/18] exec/tswap: target code can use TARGET_BIG_ENDIAN instead of target_words_bigendian() Date: Mon, 17 Mar 2025 11:34:00 -0700 Message-Id: <20250317183417.285700-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236488596019000 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/tswap.h | 11 ++++++----- cpu-target.c | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/exec/tswap.h b/include/exec/tswap.h index ecd4faef015..2683da0adb7 100644 --- a/include/exec/tswap.h +++ b/include/exec/tswap.h @@ -13,13 +13,14 @@ /** * target_words_bigendian: * Returns true if the (default) endianness of the target is big endian, - * false otherwise. Note that in target-specific code, you can use - * TARGET_BIG_ENDIAN directly instead. On the other hand, common - * code should normally never need to know about the endianness of the - * target, so please do *not* use this function unless you know very well - * what you are doing! + * false otherwise. Common code should normally never need to know about t= he + * endianness of the target, so please do *not* use this function unless y= ou + * know very well what you are doing! */ bool target_words_bigendian(void); +#ifdef COMPILING_PER_TARGET +#define target_words_bigendian() TARGET_BIG_ENDIAN +#endif =20 /* * If we're in target-specific code, we can hard-code the swapping diff --git a/cpu-target.c b/cpu-target.c index cae77374b38..519b0f89005 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -155,6 +155,7 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...) abort(); } =20 +#undef target_words_bigendian bool target_words_bigendian(void) { return TARGET_BIG_ENDIAN; --=20 2.39.5 From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236502; cv=none; d=zohomail.com; s=zohoarc; b=gfWsmmbJcYO7ebjrsvBpX8C59UIrilaTybr0Jp8zGjUzVIlp5FfzrbQC84ycpjPeWKocW1k9C7X+fvjtTkM1mtVgReV5OkgPX5HPLWTQgJnCDtVimLatYKB1xM+9m4fmIaRV4BwVA0GSB8AZGGLb5fpm6SUqDH7EjLkZ5Bdg6gs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236502; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fjQjYNlvDIsMbe7+veFF5h4s6vvln32m8yANkT1fS5Y=; b=mwsVsoF8INnX9n0fZAaqGQ8BANIOeYOjFgWEZ7I2FwS3JC2Wo0X2VUZrfsTZgM96SuQtTnEGpK6waAcKiC6NIxyXYiTXicbefhHYhQXtlSJP+bVASPqcn5wZZW730O6lqeiErmMVTiQQbNiDgRtrq5jEOf/DnUgNm0iyj+ncof4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1742236502538416.3835715484946; Mon, 17 Mar 2025 11:35:02 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917737.1322558 (Exim 4.92) (envelope-from ) id 1tuFIE-0006jb-OB; Mon, 17 Mar 2025 18:34:30 +0000 Received: by outflank-mailman (output) from mailman id 917737.1322558; Mon, 17 Mar 2025 18:34:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIE-0006jU-Lc; Mon, 17 Mar 2025 18:34:30 +0000 Received: by outflank-mailman (input) for mailman id 917737; Mon, 17 Mar 2025 18:34:29 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFID-0006VW-Dr for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:29 +0000 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [2607:f8b0:4864:20::635]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 753978ae-035e-11f0-9aba-95dc52dad729; Mon, 17 Mar 2025 19:34:28 +0100 (CET) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-224100e9a5cso92050275ad.2 for ; Mon, 17 Mar 2025 11:34:28 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:26 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 753978ae-035e-11f0-9aba-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236467; x=1742841267; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fjQjYNlvDIsMbe7+veFF5h4s6vvln32m8yANkT1fS5Y=; b=sS69qPedddzcE3cU3tsH2II1l4yqScO3VP+ufyBiypjyZnIW8GjuOvd3kabIu8ehK4 3uLuU7F6/dWRUBBVgKVT3DDpX9kFKyiMAja8jZDusFF2eSbnNtjs8sSuDJP1Rk9FRSKC /6cljaUnOXg1RoPZWyIlslY3F/osXTTn71RNn7TQ7372RE7BtP4FDeNqSEeYHE7TBMKQ TC+PDTjKvafVoDkXx5NaeLsQ2fdg+6JTLq4DjMq6HV1AKcY8gfRzi/Jo6PHHvsNyCkAO mm67uniLu1a11a+n9eP/qhgqexnn6dlhzc7K3xAdBava7M5go7dsr/K6l6hNTYibSz8B zQkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236467; x=1742841267; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fjQjYNlvDIsMbe7+veFF5h4s6vvln32m8yANkT1fS5Y=; b=YGQ+34HLo6sXrOX+W2jDn8lwkQC42OH+ZeIABOLVtpSjmkSpG26rEKBgjw/NuLQmjT unHFt3nP8VmqP0oqnFztW1ChMIEj6xpMyRoNkiASqb/FyA2RlS0EUoWVKn09Dflb9h7+ P2LrHaj8KfukTGjwbcKsUi+U7cdYRHWn6mELyggxNr97ss1u3+mMCOVXRwGq+rj00gsj 19+ubL1tNaxfJu1W7OAKil829kI3IpYHIv9TVGWhWugSubhbRe8lmVtay+ZXxaZBluJj vZHtvbgx6XnAjk6/5eZnmonI/gYHwcdv4DOzvC/csr6fflgPqnSVsGrL4SZpdILVki6j v+nA== X-Forwarded-Encrypted: i=1; AJvYcCUYIcVpd62CEiUuUjHUT4BoudpNtrLyNicurw2wioqfTj7D2NstM+7wVViRgqN4ghgh3z0HvME25O8=@lists.xenproject.org X-Gm-Message-State: AOJu0YwPBJT9oTWoIW+k/ftOF/TXN1A/lOP2WH9XT2Z5PqESe5oGjmiQ IsGHDzUY7AwDbMRF3ZONZTW41T7QB/DRrlmQ49meeY2RqotYzXXr872IE5pcfL4= X-Gm-Gg: ASbGncuUvafPjI+g+a2Pwd6x6wBdVaK2pNqoInnzS3fDg2Mv5KoHbIuWw6NeJuO9Sfn 350zDCJlz0D4rabSucGRrvG+g/CAe55+sComuzDwKwuGjKz26dBRlxHKPAPOEhue7vj0ZUDs/Qw 2+YEGX4+rGfh7/Uk6A09ryLFFp9tWDNpNFXdQcNsQCFQKbZzzDB4CZCGuwsYiIsnxXyYRHoMdXE hTmIaBZ0j6XAYn7xqi9sUOXBYBx6gnTFilZaNJelTKPa810qe5S0CNfxWwcYN6oLIboTS33wYr6 OY3tRp6qWf459X38yfo89N5InXI1+3J46zvnXfp+G+AI X-Google-Smtp-Source: AGHT+IFi3tqJwrzQePDsXIvC4P2qzcui7bHazmhEI/k1ekPUyZPPBb0NOgqZr9PPYc71RHo1sxISkg== X-Received: by 2002:a05:6a20:4e08:b0:1f5:902e:1e97 with SMTP id adf61e73a8af0-1f5c133476fmr13616359637.41.1742236467105; Mon, 17 Mar 2025 11:34:27 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 02/18] exec/tswap: implement {ld,st}.*_p as functions instead of macros Date: Mon, 17 Mar 2025 11:34:01 -0700 Message-Id: <20250317183417.285700-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236504596019000 Content-Type: text/plain; charset="utf-8" Defining functions allows to use them from common code, by not depending on TARGET_BIG_ENDIAN. Remove previous macros from exec/cpu-all.h. By moving them out of cpu-all.h, we'll be able to break dependency on cpu.h for memory related functions coming in next commits. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/cpu-all.h | 25 --------------- include/exec/tswap.h | 70 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 25 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 8cd6c00cf89..e56c064d46f 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -38,31 +38,6 @@ #define BSWAP_NEEDED #endif =20 -/* Target-endianness CPU memory access functions. These fit into the - * {ld,st}{type}{sign}{size}{endian}_p naming scheme described in bswap.h. - */ -#if TARGET_BIG_ENDIAN -#define lduw_p(p) lduw_be_p(p) -#define ldsw_p(p) ldsw_be_p(p) -#define ldl_p(p) ldl_be_p(p) -#define ldq_p(p) ldq_be_p(p) -#define stw_p(p, v) stw_be_p(p, v) -#define stl_p(p, v) stl_be_p(p, v) -#define stq_p(p, v) stq_be_p(p, v) -#define ldn_p(p, sz) ldn_be_p(p, sz) -#define stn_p(p, sz, v) stn_be_p(p, sz, v) -#else -#define lduw_p(p) lduw_le_p(p) -#define ldsw_p(p) ldsw_le_p(p) -#define ldl_p(p) ldl_le_p(p) -#define ldq_p(p) ldq_le_p(p) -#define stw_p(p, v) stw_le_p(p, v) -#define stl_p(p, v) stl_le_p(p, v) -#define stq_p(p, v) stq_le_p(p, v) -#define ldn_p(p, sz) ldn_le_p(p, sz) -#define stn_p(p, sz, v) stn_le_p(p, sz, v) -#endif - /* MMU memory access macros */ =20 #if !defined(CONFIG_USER_ONLY) diff --git a/include/exec/tswap.h b/include/exec/tswap.h index 2683da0adb7..84060a49994 100644 --- a/include/exec/tswap.h +++ b/include/exec/tswap.h @@ -80,4 +80,74 @@ static inline void tswap64s(uint64_t *s) } } =20 +/* Return ld{word}_{le,be}_p following target endianness. */ +#define LOAD_IMPL(word, args...) \ +do { \ + if (target_words_bigendian()) { \ + return glue(glue(ld, word), _be_p)(args); \ + } else { \ + return glue(glue(ld, word), _le_p)(args); \ + } \ +} while (0) + +static inline int lduw_p(const void *ptr) +{ + LOAD_IMPL(uw, ptr); +} + +static inline int ldsw_p(const void *ptr) +{ + LOAD_IMPL(sw, ptr); +} + +static inline int ldl_p(const void *ptr) +{ + LOAD_IMPL(l, ptr); +} + +static inline uint64_t ldq_p(const void *ptr) +{ + LOAD_IMPL(q, ptr); +} + +static inline uint64_t ldn_p(const void *ptr, int sz) +{ + LOAD_IMPL(n, ptr, sz); +} + +#undef LOAD_IMPL + +/* Call st{word}_{le,be}_p following target endianness. */ +#define STORE_IMPL(word, args...) \ +do { \ + if (target_words_bigendian()) { \ + glue(glue(st, word), _be_p)(args); \ + } else { \ + glue(glue(st, word), _le_p)(args); \ + } \ +} while (0) + + +static inline void stw_p(void *ptr, uint16_t v) +{ + STORE_IMPL(w, ptr, v); +} + +static inline void stl_p(void *ptr, uint32_t v) +{ + STORE_IMPL(l, ptr, v); +} + +static inline void stq_p(void *ptr, uint64_t v) +{ + STORE_IMPL(q, ptr, v); +} + +static inline void stn_p(void *ptr, int sz, uint64_t v) +{ + STORE_IMPL(n, ptr, sz, v); +} + +#undef STORE_IMPL + #endif /* TSWAP_H */ --=20 2.39.5 From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236492; cv=none; d=zohomail.com; s=zohoarc; b=dJ+Aja8f6AHNIFsJQo6BrlqnKBWudIJlF/zoHXRmmlQijedhG8KwovPZsNJ4iaVs1UQNrbafVxAANGCyPIpNYtDzGcQONqyIbbhb9tMFhCTuX/cHuciaPOM+3iRzkNfkKw589lliaa73E6kAC9PaAzpRN4ONrVQiLTLxWA1W0l4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236492; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fcP4MFj0H7Fu3AxOxTbJlPG2KgbdJwiBtz5sSPdKZDU=; b=E4jgACPyZef9SDLqD3MMSK/oeRQXS+hPI8xV03trpp0yjW8xqSW2RvP4yE3thfDyU0ipSIekLQgCmjl/HVIg+vKxELaOMHFNbBhQK9jXkHmpErdJlBpZg5iSfYrtAkpNY8V088fB2H2Tau+gAUsAG3rQXOPk7kqMaDybI0VcSw0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1742236492771219.11151688502537; Mon, 17 Mar 2025 11:34:52 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917738.1322568 (Exim 4.92) (envelope-from ) id 1tuFIG-0006z1-Vm; Mon, 17 Mar 2025 18:34:32 +0000 Received: by outflank-mailman (output) from mailman id 917738.1322568; Mon, 17 Mar 2025 18:34:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIG-0006yn-Sz; Mon, 17 Mar 2025 18:34:32 +0000 Received: by outflank-mailman (input) for mailman id 917738; Mon, 17 Mar 2025 18:34:31 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIF-0006uj-PC for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:31 +0000 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [2607:f8b0:4864:20::633]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 75fa56c0-035e-11f0-9899-31a8f345e629; Mon, 17 Mar 2025 19:34:29 +0100 (CET) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-22435603572so76549815ad.1 for ; Mon, 17 Mar 2025 11:34:29 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:27 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 75fa56c0-035e-11f0-9899-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236468; x=1742841268; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fcP4MFj0H7Fu3AxOxTbJlPG2KgbdJwiBtz5sSPdKZDU=; b=AfnojC/5gkUWfjboFs4WXvfy+JUz6P1sbqKk5455V0cgJcXT0VqPZ/Lh2GYBNrtkHF LJ5Uoaw8ATOX/LaR5TTVmnUVXJUwP0YVEMcU5RNmtgPUf2Ca4/4VB2glZLrf7LiJ9ru4 fI9OS4FtdNgIcsxzUdojcwwxHrrOSz3YnpHz0qw1nQd2R+mw4QkJdslnS4KDn5C3y814 H2BQJFs4tnByI1zkl2ziiqeRxOZxEppl8qaRa8Yz4PzuVAqLDWJ7hJugRKsbgBY/vQKZ iRuV1nIRPuoMQy4gwqc0ZKUPg6G+QqtlGSBbQleFbJ6roXmQ/jXTAN9PhUFtE6mMwzkj ei5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236468; x=1742841268; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fcP4MFj0H7Fu3AxOxTbJlPG2KgbdJwiBtz5sSPdKZDU=; b=lvh6MUZpnueZdBvu09tj0nql3cUnLW0705P/0DdFbBJ6wxdLZBcB/IkmMAyhJgypMp T8GwDW/SMYmLFmGteKOHCgz3maRyPpoKE2MiDrwtCXfb0aseBpBqZwqbncAXbFKtOsf+ +1O8aWh9GzU+1Am9lXO5nWqPxg0SHvPKVDWp2HkEGIf2llCfdmP+yb68MAv8HKMXUnSs tmWjWlBMsiccbLBQx2PMCY7a3PmvPSAVnDea5GANbhfiR8pFL1EVFYRKqUi8fVeosndP Z/9KgouQi2xTAEpOAnwTRWme2VZ/xzupse7u3T2I7M07Qc58EDjQ+raZa7kBQuEWr/Vu gdLg== X-Forwarded-Encrypted: i=1; AJvYcCXSLtP1it+o6NgUTl5bh1rPK6sidYwklmPC3bWi9NHeUbDIV52IS/QdhXSjZAkGLC+9vwCX+AJNoqg=@lists.xenproject.org X-Gm-Message-State: AOJu0Yx674MeGIM8Q/9Zw6ydYNCtyis5vbeUx0XNT+pEjCA7SGgzzJIL RbI+4Cj21zAe8BQI4FT9StaaKfwxJDmycjl3P0YVC6ajM7UkErkZnaKEzbwAVos= X-Gm-Gg: ASbGncuOIJwGBJRG2gBNAUquLvEDYgG5Fe9qIiKN9gz+v1MP9y7rIFO/rgK9vn9eZbS zDsNPWaVY2RzsDopQrJrhRUILKIz9xQMDlk7UA8j+Hizg8zYcw0aTGVke6uGcjeKdFocWua6e0J vgz43PNK9/fGwWctakPNqlWlkZJywTIYSudxsjz66NDaMlaXypvY2zAfHZkGGJ88K4A7LmWBp69 T70vPfFsV/hNhTPYIiOn73P+rQrlWRjdEaGkLnXxwhs53ETPpujsqaRujF0nxEZMm+6j/xs3QD6 uW9FPAUzpdBsqw7dWcPOHvnryUZqALb6/3ww56YJ6jtV X-Google-Smtp-Source: AGHT+IHQDcKJsv+Vb17cz20O+u5FV4YlvIefcRPItg35hxavnuYTE6e3UlOmHk58oIUa6dLl2/Rvnw== X-Received: by 2002:a05:6a00:13a6:b0:736:7175:f252 with SMTP id d2e1a72fcca58-7372239d970mr17183784b3a.14.1742236468325; Mon, 17 Mar 2025 11:34:28 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 03/18] exec/memory_ldst: extract memory_ldst declarations from cpu-all.h Date: Mon, 17 Mar 2025 11:34:02 -0700 Message-Id: <20250317183417.285700-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236494934019100 Content-Type: text/plain; charset="utf-8" They are now accessible through exec/memory.h instead, and we make sure all variants are available for common or target dependent code. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/cpu-all.h | 12 ------------ include/exec/memory_ldst.h.inc | 4 ---- 2 files changed, 16 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index e56c064d46f..0e8205818a4 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -44,18 +44,6 @@ =20 #include "exec/hwaddr.h" =20 -#define SUFFIX -#define ARG1 as -#define ARG1_DECL AddressSpace *as -#define TARGET_ENDIANNESS -#include "exec/memory_ldst.h.inc" - -#define SUFFIX _cached_slow -#define ARG1 cache -#define ARG1_DECL MemoryRegionCache *cache -#define TARGET_ENDIANNESS -#include "exec/memory_ldst.h.inc" - static inline void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32= _t val) { address_space_stl_notdirty(as, addr, val, diff --git a/include/exec/memory_ldst.h.inc b/include/exec/memory_ldst.h.inc index 92ad74e9560..7270235c600 100644 --- a/include/exec/memory_ldst.h.inc +++ b/include/exec/memory_ldst.h.inc @@ -19,7 +19,6 @@ * License along with this library; if not, see . */ =20 -#ifdef TARGET_ENDIANNESS uint16_t glue(address_space_lduw, SUFFIX)(ARG1_DECL, hwaddr addr, MemTxAttrs attrs, MemTxResult *result); uint32_t glue(address_space_ldl, SUFFIX)(ARG1_DECL, @@ -34,7 +33,6 @@ void glue(address_space_stl, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); void glue(address_space_stq, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); -#else uint8_t glue(address_space_ldub, SUFFIX)(ARG1_DECL, hwaddr addr, MemTxAttrs attrs, MemTxResult *result); uint16_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL, @@ -63,9 +61,7 @@ void glue(address_space_stq_le, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); void glue(address_space_stq_be, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); -#endif =20 #undef ARG1_DECL #undef ARG1 #undef SUFFIX -#undef TARGET_ENDIANNESS --=20 2.39.5 From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236495; cv=none; d=zohomail.com; s=zohoarc; b=N6EjjPQrmSDxLTiCnoEnzktlkvArZZ3dtrvNRoIF9QR3pZgrpplGWT5Gxmydl1L1QYAP36FrxeSv4pyLXnSvHEBFKt8NmhLH7qA0ndfRUgVnWFHpQAo4MktDAHJdLyi6NZ1WykIyr1ITPYpA5lkrtstwhwgo87CAYKiHXE3R9jo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236495; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=G6OuFeXnonCJBRRaCKlE2hD3nLeAbwsquVgoLJADjfc=; b=XxTDQez3eEhO+tDVBoBSB3Zx5tJ81nVovcUmo6A3YlJWElLt+0b8GetxWLbbHqU/Uo++nPfeX1ciPPhWiSITsrZJY36n8xMT6ej4L/lsMdu0KK+K56YuyXfhXegwQagZcScY7iV7hYfCfqAxmCKfLKmHNbfRQdDebV+3mphGFyM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1742236495847132.50904950133224; Mon, 17 Mar 2025 11:34:55 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917740.1322584 (Exim 4.92) (envelope-from ) id 1tuFII-0007HC-M2; Mon, 17 Mar 2025 18:34:34 +0000 Received: by outflank-mailman (output) from mailman id 917740.1322584; Mon, 17 Mar 2025 18:34:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFII-0007Fi-EA; Mon, 17 Mar 2025 18:34:34 +0000 Received: by outflank-mailman (input) for mailman id 917740; Mon, 17 Mar 2025 18:34:32 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIG-0006uj-NW for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:32 +0000 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [2607:f8b0:4864:20::62c]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 76a7a811-035e-11f0-9899-31a8f345e629; Mon, 17 Mar 2025 19:34:31 +0100 (CET) Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2239c066347so99589355ad.2 for ; Mon, 17 Mar 2025 11:34:30 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:29 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 76a7a811-035e-11f0-9899-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236469; x=1742841269; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G6OuFeXnonCJBRRaCKlE2hD3nLeAbwsquVgoLJADjfc=; b=bN9fZZZM183D0k2xkDDebS2LedkOj+ArNIJotQJEyqUMoNN6eXdsJmzvL/5BsrfMu8 ntn3iHkWIm9UPZpjrhihhyDWH2YqCIXWWp+xi3vbPsJVwwyB1tRc3dldkawUKvjqN7CN +YffPP7qL95Ss489MHDMijv0z7ZvYt80mu00PQPmI3WVXgoCgG2sOwnMwvWn+8iNO1zL qmVEMQrWlWCPNyuxLy9uMuuXj5rhQYq5FBM2lHG4/JkJa0Z8Y2jhKCoyjfjjbU/e2++T Ct22kVU1uRRojc4nx68uYHYo2X86tWD+W2IA5UXO5cPJGuMQOSCCoFDUvR9nlzx5n4/W lbyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236469; x=1742841269; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G6OuFeXnonCJBRRaCKlE2hD3nLeAbwsquVgoLJADjfc=; b=mYx0EhjAb9Ls2FaLKLLKQwO2YCk1CrO0rVZOEFcCGkjGHjOcoiXILwQ0mKbSr+wRE3 ohi7kB0qwzcCD7dd9gH63yX5cl2kBtmZ/iKaWcVRTKUnCjt1lpAM7htAhHVTCdih91tu xqf57KkOM/3eMXaVKTvWl4J/dB30njdpDZxRnzmkJGVkCo8sppcns2tY44L8TRtk4EP4 oXTpUQRaIYHykA2GCf8gHk4m8H6DETYZ4KrMYxCVIRZm3/MOOe8YXw66eVKNz6dLW6qI 3ZP5wKMhBoBgKyV9ERR7wORpJJGq4SQjsFujKs8CXDEyRiLv555Hp11ivwjXffA7wo1e CTYQ== X-Forwarded-Encrypted: i=1; AJvYcCWj+G1psEb+GEob1kMy5HVNAFa2ESbmxgAL45KbDDUtW1voHlcjXAeJTD//NU4ZX1xKxPXRidlLywA=@lists.xenproject.org X-Gm-Message-State: AOJu0YxOmXws10BY9X+W7yLd+3Kl6LUisfkclIFktFPwLTjgnS4nVhm5 efqhxCkM+7PjtEjVq3aqjvuE2v2BMm1XtTzc0fgfg7GObarS8OS3jGfI5CkQqj4= X-Gm-Gg: ASbGncvHCL+TQZMUcCUu5gF91Img3zBdhHCA5366K1tzcYiIEJO5sUtXLW9ATypyBhO 74Elkmu3MINB+6fQ6Gv6IgroaRr0jDQxB14FwmGhDA2gwkAICUVdKDfC9zU+a7rIzmRgVD4DlQ4 vLiNstBl/wMH8Q72lNPZ6wO0JUheLkCkgkveKZktqQjiScyNReobXc8dwH8yL8TkEo9C5mUX1Qu Dp2nBg4nAHicfd+Ll1n88cQUyMh18J2iuoE68yLsxBXF6Ka0dFB5PcSToc/G6xfOZm2Oxis1etN 63jyLTBm+6znOIBVRe1L76okd6zQ2nyaBHihHlPCEeaC X-Google-Smtp-Source: AGHT+IEuktxGhHzx6xs3EGzvKgpAVns4GkbvMlee+9okZ79gnYJTq9xN+P/LP5FdgPO0zhqsq/U9Fw== X-Received: by 2002:a05:6a00:1916:b0:736:51ab:7aed with SMTP id d2e1a72fcca58-7372240f242mr14927867b3a.16.1742236469458; Mon, 17 Mar 2025 11:34:29 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 04/18] exec/memory_ldst_phys: extract memory_ldst_phys declarations from cpu-all.h Date: Mon, 17 Mar 2025 11:34:03 -0700 Message-Id: <20250317183417.285700-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236504972019100 Content-Type: text/plain; charset="utf-8" They are now accessible through exec/memory.h instead, and we make sure all variants are available for common or target dependent code. Move stl_phys_notdirty function as well. Cached endianness agnostic version rely on st/ld*_p, which is available through tswap.h. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/cpu-all.h | 29 ----------------------------- include/exec/memory.h | 10 ++++++++++ include/exec/memory_ldst_phys.h.inc | 5 +---- 3 files changed, 11 insertions(+), 33 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 0e8205818a4..902ca1f3c7b 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -38,35 +38,6 @@ #define BSWAP_NEEDED #endif =20 -/* MMU memory access macros */ - -#if !defined(CONFIG_USER_ONLY) - -#include "exec/hwaddr.h" - -static inline void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32= _t val) -{ - address_space_stl_notdirty(as, addr, val, - MEMTXATTRS_UNSPECIFIED, NULL); -} - -#define SUFFIX -#define ARG1 as -#define ARG1_DECL AddressSpace *as -#define TARGET_ENDIANNESS -#include "exec/memory_ldst_phys.h.inc" - -/* Inline fast path for direct RAM access. */ -#define ENDIANNESS -#include "exec/memory_ldst_cached.h.inc" - -#define SUFFIX _cached -#define ARG1 cache -#define ARG1_DECL MemoryRegionCache *cache -#define TARGET_ENDIANNESS -#include "exec/memory_ldst_phys.h.inc" -#endif - /* page related stuff */ #include "exec/cpu-defs.h" #include "exec/target_page.h" diff --git a/include/exec/memory.h b/include/exec/memory.h index d09af58c971..da21e9150b5 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -21,6 +21,7 @@ #include "exec/memattrs.h" #include "exec/memop.h" #include "exec/ramlist.h" +#include "exec/tswap.h" #include "qemu/bswap.h" #include "qemu/queue.h" #include "qemu/int128.h" @@ -2732,6 +2733,12 @@ MemTxResult address_space_write_rom(AddressSpace *as= , hwaddr addr, #define ARG1_DECL AddressSpace *as #include "exec/memory_ldst.h.inc" =20 +static inline void stl_phys_notdirty(AddressSpace *as, hwaddr addr, uint32= _t val) +{ + address_space_stl_notdirty(as, addr, val, + MEMTXATTRS_UNSPECIFIED, NULL); +} + #define SUFFIX #define ARG1 as #define ARG1_DECL AddressSpace *as @@ -2798,6 +2805,9 @@ static inline void address_space_stb_cached(MemoryReg= ionCache *cache, } } =20 +#define ENDIANNESS +#include "exec/memory_ldst_cached.h.inc" + #define ENDIANNESS _le #include "exec/memory_ldst_cached.h.inc" =20 diff --git a/include/exec/memory_ldst_phys.h.inc b/include/exec/memory_ldst= _phys.h.inc index ecd678610d1..db67de75251 100644 --- a/include/exec/memory_ldst_phys.h.inc +++ b/include/exec/memory_ldst_phys.h.inc @@ -19,7 +19,6 @@ * License along with this library; if not, see . */ =20 -#ifdef TARGET_ENDIANNESS static inline uint16_t glue(lduw_phys, SUFFIX)(ARG1_DECL, hwaddr addr) { return glue(address_space_lduw, SUFFIX)(ARG1, addr, @@ -55,7 +54,7 @@ static inline void glue(stq_phys, SUFFIX)(ARG1_DECL, hwad= dr addr, uint64_t val) glue(address_space_stq, SUFFIX)(ARG1, addr, val, MEMTXATTRS_UNSPECIFIED, NULL); } -#else + static inline uint8_t glue(ldub_phys, SUFFIX)(ARG1_DECL, hwaddr addr) { return glue(address_space_ldub, SUFFIX)(ARG1, addr, @@ -139,9 +138,7 @@ static inline void glue(stq_be_phys, SUFFIX)(ARG1_DECL,= hwaddr addr, uint64_t va glue(address_space_stq_be, SUFFIX)(ARG1, addr, val, MEMTXATTRS_UNSPECIFIED, NULL); } -#endif =20 #undef ARG1_DECL #undef ARG1 #undef SUFFIX -#undef TARGET_ENDIANNESS --=20 2.39.5 From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236495; cv=none; d=zohomail.com; s=zohoarc; b=MYtJFK4ojEfSaE/dkrUNOEASv88xkzTEz0f1bNWvf5WlhplVaQSeIqqdjI2f4cw3SAy9aLtzvKwN870MVDfG5+RanwhsJJW0M+WaMLzFdS1RfOwdUfrF8CXNLakRkOJSZ2WFXfLb5s7MXE5XfFe/h4N+f8vXXUZc5SYcLn3oQhc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236495; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wT5ohu0Ui7xrH+jgYqMJMpKemGPcZNvy7jzdyuAyzEs=; b=VSyK7huHTX/EF74uSJS7WC4D7499rNxuR8sQE4mAZrXVEsVAkLztjxei2ci1Gpta+jT4x9EnByuRnMosVKkLR4I73XjmNwiTZp5I+ntO26h3dQGF+ImJpI5iyWuFiq39vn3SQDp0RuP1zmYbX0NKkkW9TGrc4lJuIhwhGZCE48Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1742236495836450.93638840800634; Mon, 17 Mar 2025 11:34:55 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917739.1322578 (Exim 4.92) (envelope-from ) id 1tuFII-0007E5-B9; Mon, 17 Mar 2025 18:34:34 +0000 Received: by outflank-mailman (output) from mailman id 917739.1322578; Mon, 17 Mar 2025 18:34:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFII-0007Dw-5W; Mon, 17 Mar 2025 18:34:34 +0000 Received: by outflank-mailman (input) for mailman id 917739; Mon, 17 Mar 2025 18:34:32 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIG-0006VW-Hq for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:32 +0000 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [2607:f8b0:4864:20::62a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 77490491-035e-11f0-9aba-95dc52dad729; Mon, 17 Mar 2025 19:34:32 +0100 (CET) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-225fbdfc17dso32762495ad.3 for ; Mon, 17 Mar 2025 11:34:32 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:30 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 77490491-035e-11f0-9aba-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236470; x=1742841270; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wT5ohu0Ui7xrH+jgYqMJMpKemGPcZNvy7jzdyuAyzEs=; b=aelFy+ihIfqbeG6i6oFawfIrjTkHKz6ILXxMq3n0Y23AFH5yCvASuvxdo9iAEO7OAA sSJjrVZp73G7ONRghDcco5Q32seTEASxfUv17SfH6RzIhGhfLcnt2BKcQllk9a56Cipm lkQhcKZisVcj1pXVHABAops2r50M16uXFqExhw5OG63mLhbXWNcBEKm2undaGWC7RzmA g3vEpSZirqsKhEwxnu1nWo0kvRRRTU3zZhyemtUpA8Zs1fNMRjCmhexY7TQUKttLpSvk j63vhh6vzfJKUyrtPk5eKDN9fVy8kL3Vr9bG2gfa9wHjmvk0YB3Zj7n+JV2iAAFHAPYn vx7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236470; x=1742841270; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wT5ohu0Ui7xrH+jgYqMJMpKemGPcZNvy7jzdyuAyzEs=; b=sUm8MgpnG/lYfmWKb1JaL5odxBj/nMhkwRweYRusiNt4kEp1cmmYuo9Am5iZdqmo6E B10C/eM34eMyYO1AN/HSI9mTHmXWh1iWMrR88h9cSoKsGX+FXszekGvKkB32TKVAt8Ld qUQgEN5SeSyayYRVaAmhzZpLz5DxtyWTdTrmhB/EKLjjYwp83o2mOVoMot0kyBI6mhEw XfsoD5aQSQS492srhYiIp8XKw3DSdNxeqcH7WKfsNP3bpeMoit5P3hzGHgTPI29ACZKT c3iewI7ogSpY5M4MLuXAMS5rJPcA+a0wEBPuJOMQkVs3q3vYyn97ZMhGx6yS9QGsKiRT Zx7Q== X-Forwarded-Encrypted: i=1; AJvYcCUSBhedPHfTnudSjeYy9Z8cffFuY9te792cYE0Et6QHbT5rOzfhUfTQcagpbF1n8+LWsQmY2dDuFEA=@lists.xenproject.org X-Gm-Message-State: AOJu0Yyh5M+y9Hi9yJIL8TeDgvxVvkbPs2DCS/P0JDTEeticqxwJnuwV SkTndlx6kG+RESd3ZQTz7OgbtpGhd5kjrJn90mLhZDB7GegafHdgqSpP9Bbywkk= X-Gm-Gg: ASbGncvQ6z3YCxuHTA8fpEtyI+KovP+g8xfmleDMnxMbDRZqcOVxUYkt7pZTGIyeo99 hL2dS9sfbQtnS25wqB4pUl/lu1FfBIRPfNUzR5BxUZf+5gRyGxyrbKrzm8HsRYC48m67+EmPJJ1 o30H7tOwchgjr8gkb4WkQSPqzEcoxU+p3sDxLn9BfSo/nE7plo/Klzn833jnlsA5uTtoCapGTSC JpMiDFVzuBLQ+rsRoUixNpmqNNiQncW52ejoGa22/cYF0mxaz9oJpVTeR9BG9YpimjEXeOz9IGs 9WrTFYomxSg+8ivlr/SBigmuYVGStOqy6EUuZ/Xm6y5L X-Google-Smtp-Source: AGHT+IHwzlIJ6LxZBvPsjg5l1kKbXhEFWIu9N9qHSrE9Y+TBbc5aw9FWPh64Zl9aShUUkawUwyHzSA== X-Received: by 2002:a17:903:22c8:b0:223:517c:bfa1 with SMTP id d9443c01a7336-225e0af0323mr191813145ad.38.1742236470577; Mon, 17 Mar 2025 11:34:30 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 05/18] exec/memory.h: make devend_memop "target defines" agnostic Date: Mon, 17 Mar 2025 11:34:04 -0700 Message-Id: <20250317183417.285700-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236497362019100 Content-Type: text/plain; charset="utf-8" Will allow to make system/memory.c common later. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index da21e9150b5..069021ac3ff 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -3138,25 +3138,17 @@ address_space_write_cached(MemoryRegionCache *cache= , hwaddr addr, MemTxResult address_space_set(AddressSpace *as, hwaddr addr, uint8_t c, hwaddr len, MemTxAttrs attrs); =20 -#ifdef COMPILING_PER_TARGET /* enum device_endian to MemOp. */ static inline MemOp devend_memop(enum device_endian end) { QEMU_BUILD_BUG_ON(DEVICE_HOST_ENDIAN !=3D DEVICE_LITTLE_ENDIAN && DEVICE_HOST_ENDIAN !=3D DEVICE_BIG_ENDIAN); =20 -#if HOST_BIG_ENDIAN !=3D TARGET_BIG_ENDIAN - /* Swap if non-host endianness or native (target) endianness */ - return (end =3D=3D DEVICE_HOST_ENDIAN) ? 0 : MO_BSWAP; -#else - const int non_host_endianness =3D - DEVICE_LITTLE_ENDIAN ^ DEVICE_BIG_ENDIAN ^ DEVICE_HOST_ENDIAN; - - /* In this case, native (target) endianness needs no swap. */ - return (end =3D=3D non_host_endianness) ? MO_BSWAP : 0; -#endif + bool big_endian =3D (end =3D=3D DEVICE_NATIVE_ENDIAN + ? target_words_bigendian() + : end =3D=3D DEVICE_BIG_ENDIAN); + return big_endian ? MO_BE : MO_LE; } -#endif /* COMPILING_PER_TARGET */ =20 /* * Inhibit technologies that require discarding of pages in RAM blocks, e.= g., --=20 2.39.5 From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236501; cv=none; d=zohomail.com; s=zohoarc; b=PGn14EfxPZFgslFlXfkJ49uiTksWwov/HRlrGuvm2hseZoKI74xnlhlL2+7cs+wao3yaWP9MAUXleAU0lP2OVwCJ40O3fQlA38VsgaV4onhmQrmHxby08tX6F++Ii7bnFwtN9pxCSQ2vp9Zw2PhIYKL9Hp4Aspqi1E2Rm+XGSEM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236501; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mZcjdDtX1Z7JVvsuWgguTldfqVr7ZBWkV3i9i17ooa8=; b=JEMG0BXDnQgH+dzbge6Catu5n+4o2XI/hSaHT+203bW83CmF+y9VYZ77CSJxk/jOwvKLcmW0UDmkQ0zGz4vlO5zSoT7j03PCX5sqr8zUovp2/e+2vXCZ2o1RWZo4Q8b+esE6VHjfnW44tuomnRquvBjt+bF6niTJEz5Fpnp/H8E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1742236501837505.4284965896845; Mon, 17 Mar 2025 11:35:01 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917741.1322589 (Exim 4.92) (envelope-from ) id 1tuFIJ-0007OX-3w; Mon, 17 Mar 2025 18:34:35 +0000 Received: by outflank-mailman (output) from mailman id 917741.1322589; Mon, 17 Mar 2025 18:34:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFII-0007Ly-S4; Mon, 17 Mar 2025 18:34:34 +0000 Received: by outflank-mailman (input) for mailman id 917741; Mon, 17 Mar 2025 18:34:33 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIH-0006VW-Qo for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:33 +0000 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [2607:f8b0:4864:20::631]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 78007f36-035e-11f0-9aba-95dc52dad729; Mon, 17 Mar 2025 19:34:33 +0100 (CET) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-224341bbc1dso88729235ad.3 for ; Mon, 17 Mar 2025 11:34:33 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:31 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 78007f36-035e-11f0-9aba-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236472; x=1742841272; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mZcjdDtX1Z7JVvsuWgguTldfqVr7ZBWkV3i9i17ooa8=; b=S+5g4C5MVY2dvDtJ0ZkI2YIG1J/a6yv6o61nS27M95QBlK20WQv3RbiXkpFg8aPQfp truNAwLFXxMCSbNytDH2wcIL2ujWkqZbcFiHOgNSOpg62GSo1Q5LnnjVPEE7TnsMAfaX TqP7bzNB3XWTnxRXIhN6jEtqEHLxNFuv0SuOUxOGGhDx5pzbY+0jHAKewYCCykDNYroa yUhPVmYwM7dyYmDSd4sXaqWbEmKIpObJGA0nwt9ukPdHH1IXDvnTsg0dpzjkd/6x74QP VaLmdRpDcsVHxwjWDe9UN1NciRjwNMr3MmgSTIoAeJj8SU6nxyjCs5VSJbjY6ojMPmow 7Qvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236472; x=1742841272; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mZcjdDtX1Z7JVvsuWgguTldfqVr7ZBWkV3i9i17ooa8=; b=GSwjU/z0W26tGfyO/RDnco1upmbOHZCiafGwpR7iZnjuFEJNHh6UnALhATX242dv2G 2eL1yTEdDlE6Q5yCW76cVz53qmb2nd/FRn3KIaAPLmPCezABIFV/Ac2kZb/I6fmihXY2 9J69ZwHuj52BHkfKhksUpef693UQ1al5OQspDtzgVBl21a2DGx2J/hPVOHLYFxjIGks7 s5ht1lVP2c4sb5j6Ccoxo3gC50+KfS1AO/J0tf2UEQwuvBSbB/pHkcBIemketnm4TRV9 uBtk+S4EnnojPKnQcAdck8NA652TtU3yvZKjgG+teQSgU3BQh7VOFVY62loDHAuKGfM4 K3/w== X-Forwarded-Encrypted: i=1; AJvYcCVBJ9iyGW8kQgRZ8H1/JANQQvFO4DsFrMZHmdA5FSwpSC4vOOFwnsfpBL/7RgQjINIFrXpS6x2Q8HY=@lists.xenproject.org X-Gm-Message-State: AOJu0YwRB0fsoDUj8UXmKkUSbRuDle0frHyAyAP9SRFWY6jvn7afg9ci TdUIaHaQBq86g78jJ9gfxxFbyLTAEhqjMqOrX3e/0wS5xjGah9Tua7yRk3/NsJ8= X-Gm-Gg: ASbGncv+Y2dUdc7OE1LAqskr/bk16SKA/n8rapniDHqY+hdxWCCnirAQmN9nFfX3nEN yC6yeNdz8xX/VdEGik/y6bCB1mT0+VSNEa0iMLgDEOI3PTUjNwkLFMKVnsCIIKRNArvhxWkyUIQ joc6K9zC5cCcUpvDc3ACsNTINSVYJa4aMOwrzpKD0YAFKe9jYy2tJSVBAvreQfBoFv7S/aVmbhN UsU121pL3qfIJs4ASWMYvBtU23i+wgo7P7373D6Tu1IF83gGUisjhrhhY1NmBR6+Q195Iz08lN/ 3WwSDKgbn3DBpJp8Ts3+Mc0qssIdyjL98Becu8eXfSL7 X-Google-Smtp-Source: AGHT+IGNO8bUyUW0Tf64WVNf5jONex1ECKej9xrvhw7mQgHMktiWmZ+ZuCh9rC5TGEXL07arJnJidg== X-Received: by 2002:a05:6a00:3c81:b0:736:5544:7ad7 with SMTP id d2e1a72fcca58-7375723f949mr818617b3a.14.1742236471771; Mon, 17 Mar 2025 11:34:31 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 06/18] codebase: prepare to remove cpu.h from exec/exec-all.h Date: Mon, 17 Mar 2025 11:34:05 -0700 Message-Id: <20250317183417.285700-7-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236504966019100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/tcg/tcg-op.h | 1 + target/ppc/helper_regs.h | 2 ++ hw/ppc/spapr_nested.c | 1 + hw/sh4/sh7750.c | 1 + page-vary-target.c | 2 +- target/ppc/tcg-excp_helper.c | 1 + target/riscv/bitmanip_helper.c | 2 +- 7 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index a02850583bd..bc46b5570c4 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -9,6 +9,7 @@ #define TCG_TCG_OP_H =20 #include "tcg/tcg-op-common.h" +#include "exec/target_long.h" =20 #ifndef TARGET_LONG_BITS #error must include QEMU headers diff --git a/target/ppc/helper_regs.h b/target/ppc/helper_regs.h index 8196c1346dc..b928c2c452d 100644 --- a/target/ppc/helper_regs.h +++ b/target/ppc/helper_regs.h @@ -20,6 +20,8 @@ #ifndef HELPER_REGS_H #define HELPER_REGS_H =20 +#include "target/ppc/cpu.h" + void hreg_swap_gpr_tgpr(CPUPPCState *env); void hreg_compute_hflags(CPUPPCState *env); void hreg_update_pmu_hflags(CPUPPCState *env); diff --git a/hw/ppc/spapr_nested.c b/hw/ppc/spapr_nested.c index 201f6292033..a79e398c132 100644 --- a/hw/ppc/spapr_nested.c +++ b/hw/ppc/spapr_nested.c @@ -2,6 +2,7 @@ #include "qemu/cutils.h" #include "exec/exec-all.h" #include "exec/cputlb.h" +#include "exec/target_long.h" #include "helper_regs.h" #include "hw/ppc/ppc.h" #include "hw/ppc/spapr.h" diff --git a/hw/sh4/sh7750.c b/hw/sh4/sh7750.c index 6faf0e3ca8b..41306fb6008 100644 --- a/hw/sh4/sh7750.c +++ b/hw/sh4/sh7750.c @@ -29,6 +29,7 @@ #include "hw/irq.h" #include "hw/sh4/sh.h" #include "system/system.h" +#include "target/sh4/cpu.h" #include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" #include "sh7750_regs.h" diff --git a/page-vary-target.c b/page-vary-target.c index 3f81144cda8..84ddeb7c26a 100644 --- a/page-vary-target.c +++ b/page-vary-target.c @@ -21,7 +21,7 @@ =20 #include "qemu/osdep.h" #include "exec/page-vary.h" -#include "exec/exec-all.h" +#include "exec/target_page.h" =20 bool set_preferred_target_page_bits(int bits) { diff --git a/target/ppc/tcg-excp_helper.c b/target/ppc/tcg-excp_helper.c index 5a189dc3d70..c422648cfdd 100644 --- a/target/ppc/tcg-excp_helper.c +++ b/target/ppc/tcg-excp_helper.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" #include "qemu/log.h" +#include "target/ppc/cpu.h" #include "exec/cpu_ldst.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" diff --git a/target/riscv/bitmanip_helper.c b/target/riscv/bitmanip_helper.c index b99c4a39a1f..e9c8d7f7780 100644 --- a/target/riscv/bitmanip_helper.c +++ b/target/riscv/bitmanip_helper.c @@ -20,7 +20,7 @@ =20 #include "qemu/osdep.h" #include "qemu/host-utils.h" -#include "exec/exec-all.h" +#include "exec/target_long.h" #include "exec/helper-proto.h" #include "tcg/tcg.h" =20 --=20 2.39.5 From nobody Thu Apr 3 10:41:05 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=1742236650; cv=none; d=zohomail.com; s=zohoarc; b=UKDhKr2JvM7gEQbfteHA7HzOwNXPPoIN8ZvvFZvKzF+tHWYblzzhlFpIDcqA1gymkEoD3t0FQ7Ch6v+A1GtltKlkL9+GXvCI3fWxmh+VDhkBhmr/KLx9eoO3SRdVawcwot/GY6YVADf592ih41EfYdfHbme6vjRoXGIGM1W6thw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236650; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bYYGOsy+zcSjxVOnigwMonGaAhWbZB7W76ZyOX5Jlgc=; b=e825/3BDYja3dk1WvC+Q7hzEAtP/SsDTza6e6nAKF5s2GKwZxOhyDq8LrwWzpUC2YQDFCv8+HbVIyFhMiyFyhUBAUdwPD6uJ8bOk/HVYWuUwgeCvea7p0TUN5KeXpBbXv9Tj+ulth5Q9/2aO1Ps9y7LDNfyUwlsIEmkY1JH6c0I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1742236650350601.1943937877238; Mon, 17 Mar 2025 11:37:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuFJO-0004vP-BY; Mon, 17 Mar 2025 14:35:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuFIn-0004V4-Fh for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:09 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tuFIU-0006Ah-3b for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:01 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-22359001f1aso41894355ad.3 for ; Mon, 17 Mar 2025 11:34:33 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236473; x=1742841273; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bYYGOsy+zcSjxVOnigwMonGaAhWbZB7W76ZyOX5Jlgc=; b=loTKUbk6UnZS9c0hxYPRqlmFC9nK3iJVBgX5D0URgS3aaImozZPomkhvITgw3A3p98 gR0iqj2ISl1fH0wuL6ak6JSOpKJ0U8YFPW3Ul8KxDEdugJmf5H/x3KyJoLP26T3CGa1X qQ5oriPcK7xvVbu9Vt5Mw9BQ7DMRvcp/IFHJe/Qie1BpMRMI60mmWqJBfsr5/ZmoJuYS 8ovhzcxHG/tyK2/ILWtGBobr3DbamKUzRlIz0eI9WjuBYB+B/a7XD4/3pufY4rqIEP80 pHUu9dFtb7fFX8nsARN770uS0rOuCkJJEhIynXCN/1GyYVUzZqBJRobZ+FYiiq0bMVIs xzXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236473; x=1742841273; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bYYGOsy+zcSjxVOnigwMonGaAhWbZB7W76ZyOX5Jlgc=; b=wSb/oGaiFcXnbmBnXTSkmN6038aILJkQNHGtFTiLS8h6gec4gFnHnZGEqBeR1omZ9W lrj8U9dknRd1ahv7osMYcnmyUO9TQRHTjADIQ/GS1c1koemYMMBKUhcJ9hHsB7YLc2Uf 8VkjmEhxEY/s1fi84hMeKwyGhtweI+r0+Y3COmDburLPhnihrrGpwFcrYunzYLNBWOGF zyVppTU87bqnHBNKtEgTSMgXDVju1wI9Rkvvw4c/TR+2e6wxMBdFPp8JgpdQgZ7ZjH6j 4B++qzNAxYbO1mh1VJUsSUQJa/7OJHUNPIgp3kcmnYnxVD5anpb1i1FDQSnTt7IjuRPQ Gigg== X-Gm-Message-State: AOJu0YxpTf2ss7orTUkyUCSC6odp9aGtTP9M14yJ6U0qPt5l4qG6xnVY 8qEL0iQeagnFhijEoWKruKc7l+4TjTKnFVmvlf8saSD6I3ZpzbqqIlCmGGXKAR5lp22NDOjjnqh r X-Gm-Gg: ASbGncuyxKAsw9c/A0uXQXn0jofiJx8/k6kPjez85XX6c1/JUSaIt+SoFLP7h9BnND8 ebnP+B5GwVy6+2rZC0jYhhcwsnldnqJBIrgaQP6+PvYAsefnvWhB6yr4ecjrATL5t/3NnOej14s z8SrkhUDCxwpChfOrbB7o2Z2VkLTszVeJZJAXwdGtpCLUIskuM9+QcHs7mCCSg+rn+93igAiUdL hEBV2DPHW7broTFqaYrq67fJniTtcXcXb3fKFKWISN/MjA2KfXrzZ1dMbXZ9r6pDpHqGKDdc56e m0JS+/tkqXpzi9MF7dK8B6x/ix8xQzPCRpOpMreoMA12 X-Google-Smtp-Source: AGHT+IFV6DhukzDJTQhxKL2T76dlm4rDEmTDcVzAIQ6vxy9qm1/fBJU2mGtWaSFzbonBb3tr3G7FIw== X-Received: by 2002:a05:6a20:a11b:b0:1ee:efa5:6573 with SMTP id adf61e73a8af0-1fa43cbf794mr1071010637.8.1742236472852; Mon, 17 Mar 2025 11:34:32 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 07/18] exec/exec-all: remove dependency on cpu.h Date: Mon, 17 Mar 2025 11:34:06 -0700 Message-Id: <20250317183417.285700-8-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236652361019100 Content-Type: text/plain; charset="utf-8" Previous commit changed files relying transitively on it. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/exec-all.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index dd5c40f2233..19b0eda44a7 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -20,7 +20,6 @@ #ifndef EXEC_ALL_H #define EXEC_ALL_H =20 -#include "cpu.h" #if defined(CONFIG_USER_ONLY) #include "exec/cpu_ldst.h" #endif --=20 2.39.5 From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236508; cv=none; d=zohomail.com; s=zohoarc; b=mVx4vniF2ATIfaAvUyGVO4VC9cgkqn92I0dbkN3B8Mhc8D85FdbbyY8hPpcsUnwBEDGtAhy5yg0KOK+iPnpDxdby2dLopo3uHs4PKTgBY/vQL3w0IncPNkyOh/hkpBy2qz4RniZ6va3julcotdLfokje24/dbZxRcRiqT1VTCkc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236508; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Rp8GQC6vA5rTxSSazblnkjuLZPjrJAYUOFg9uGM493s=; b=F9usKGwzGEai1WbtH+mcKZt12wEAwcoiidYq9oY3+82vHmwK0xhgODigje+cqmP/rm5bkxbc/YKyreE9Qrgdy/8ET77m5gVfkLRRcEijNDZAbRLrQY2c/6HYYjHUWt/96+/5g73rJ0ddoRi8KihBTyaDGwiljeYdOATdPZuDebU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1742236508775882.3616247269835; Mon, 17 Mar 2025 11:35:08 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917743.1322608 (Exim 4.92) (envelope-from ) id 1tuFIL-000808-Cz; Mon, 17 Mar 2025 18:34:37 +0000 Received: by outflank-mailman (output) from mailman id 917743.1322608; Mon, 17 Mar 2025 18:34:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIL-0007zx-90; Mon, 17 Mar 2025 18:34:37 +0000 Received: by outflank-mailman (input) for mailman id 917743; Mon, 17 Mar 2025 18:34:36 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIJ-0006VW-UQ for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:35 +0000 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [2607:f8b0:4864:20::636]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 79546c03-035e-11f0-9aba-95dc52dad729; Mon, 17 Mar 2025 19:34:35 +0100 (CET) Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-225b5448519so88590925ad.0 for ; Mon, 17 Mar 2025 11:34:35 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:33 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 79546c03-035e-11f0-9aba-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236474; x=1742841274; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Rp8GQC6vA5rTxSSazblnkjuLZPjrJAYUOFg9uGM493s=; b=WQrZry/u3rQFy/srQzn32K/ERX5LuRjJF4kpNxsflRdD+XgMBmhJ5o13VKlOMUm+lI bqkHZ5QtNa5J6BFculxpo/y3jRqO0kgZHFIC79vwW+MqoS0qstav23EWa1IGYZ8zATMT U1lA7qxU9+WeQGs2VirkUzFil9it4K7llOSRpYs4ohvZ2COMpMMXH8DwInn3cFUqFZaL 6LVrg3PUqlbKr3jhzOqJFAOK3DF57Texajvb+BbHk1+UxBoFh4Sr9yMxQMRNwPtM2cni W31REbR2q+9i/gkQpETlsPt5BEyCunyqtkzgOgz5zGjtboJVJBjo0GR3UsdPZNdlEzjz BwIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236474; x=1742841274; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Rp8GQC6vA5rTxSSazblnkjuLZPjrJAYUOFg9uGM493s=; b=BhXRhHUm3JalkfH2a2LPXgzKDjMQdyHtf4NXpfvfG2XH3aQ6CD5aNQZbl5f4DIV5SF +F/9JeHmVXIkiXMKOoN7PTWhDZxGG1Mep2A4r/j7NNAIg2wrQRobKKFTA84hBg4Mvznm g5HBHgIpD2uLtXm52KAKxF8MfM+Ms7bwPucGaz6r/q/rmmBo8NWWtLGkQS+j47y7x4SY UrB+LntQLa65/PT1gmhrTrSUMECEs4FTnvgpXCrBvm+4QMJEEywiso7Fi0KFp3jn1Qyj YStJWIP9HM2ylcILOLkmF209jLmTngYjY8ztHJemSdcXkm2Zh9X4t6vtokOaoMVw+TkL Ck1w== X-Forwarded-Encrypted: i=1; AJvYcCXpPjYMZDaDzur8oM9kNNC1nqWQPYUplDr5aZxSXle1jee/wwBrw9bqwTvSpuVy1DRktO/+knA8PO8=@lists.xenproject.org X-Gm-Message-State: AOJu0YxiacCP2X/o1ztXfrB+6AofPTdFQAt1O9tpRIqborpcNwOsjp0q tgL8WhUz73LZYM+mTaSj+FboJhMkuM8kxIVvvsaTEvg3K/GTEGptjDDmpNTEm74= X-Gm-Gg: ASbGnctJYDKLBAHPfCYJ1msXZALxldSFNCFqbawfLLKduwgczO42MuujZ2leCUEftTk TiMq35Yq9ub5M1PUJ9Ghzi7Tx/opDqAzgKUnV1pwzw50pUgXwQM0FptU/mqpZ+zdFAsaNVgXGZ0 7wUM2vvodzpdoPdIxBR7ATbk4o/E9SPEf6mVl2/akeM+jqQj8IsDbYbc0L16h0MdCXWzyTejmZ4 xDizWwGsX0n/djC1vVLxBHPnOjsKVdANy2Iv4A2P2BTk/T5qcbVkEg1tG+I3XCUtNwDYGZXCfpf yUJ8MGHjEwXpea4yG7u8mEKhg2io2EE0vuplyETueWwN X-Google-Smtp-Source: AGHT+IHGRjUHfsZhtfemIo+dlcyT/9a20csro4vrsnSjWHRpRL87+9vnxPcq6naL2TxBdu+3gDVtPg== X-Received: by 2002:a05:6a00:9a7:b0:736:6ac4:d204 with SMTP id d2e1a72fcca58-73722375218mr14371340b3a.11.1742236473962; Mon, 17 Mar 2025 11:34:33 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 08/18] exec/memory-internal: remove dependency on cpu.h Date: Mon, 17 Mar 2025 11:34:07 -0700 Message-Id: <20250317183417.285700-9-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236510579019000 Content-Type: text/plain; charset="utf-8" Needed so compilation units including it can be common. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 100c1237ac2..b729f3b25ad 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -20,8 +20,6 @@ #ifndef MEMORY_INTERNAL_H #define MEMORY_INTERNAL_H =20 -#include "cpu.h" - #ifndef CONFIG_USER_ONLY static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv) { --=20 2.39.5 From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236506; cv=none; d=zohomail.com; s=zohoarc; b=O0cDy/rUlfA7wIrLpFHQNZUU7MUk0D9qddF5D+ug5RraAxzRDknuBP8pwRf013TVLXK8gJRLLXj213aFyXKGLs+tpUoS5W6N28wDw9HhBAxUgIF1PACSmd/QPMaVnZ7hKAGCJbPbmHLF++LU5peIUO2WcVgUFFOM3rfHL922T68= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236506; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PfpTTedni4gUGfvRcfnvXw4xTvY7JO0pNjOjXTZ7pI8=; b=SuB8JkyTLYCk7BFyMDYAJLiK9Q+hN78lLgIOoTcHuMHP+dSknzt3Zzo3zIyQk7MUloUCdDtYg1IoNOP16OsepcUGnsxkgvyI2xkt9wjSjfO1zgGy13m9oPsKXAG1aejax/FIavN7mATUTFMlWuFUGkAFDMu6IzscwYm/pVG16BM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1742236506460154.99450961339323; Mon, 17 Mar 2025 11:35:06 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917745.1322618 (Exim 4.92) (envelope-from ) id 1tuFIN-0008Kc-Om; Mon, 17 Mar 2025 18:34:39 +0000 Received: by outflank-mailman (output) from mailman id 917745.1322618; Mon, 17 Mar 2025 18:34:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIN-0008KP-J7; Mon, 17 Mar 2025 18:34:39 +0000 Received: by outflank-mailman (input) for mailman id 917745; Mon, 17 Mar 2025 18:34:38 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIM-0006uj-Fv for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:38 +0000 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [2607:f8b0:4864:20::62f]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7a09deff-035e-11f0-9899-31a8f345e629; Mon, 17 Mar 2025 19:34:36 +0100 (CET) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2255003f4c6so82568455ad.0 for ; Mon, 17 Mar 2025 11:34:36 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:34 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7a09deff-035e-11f0-9899-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236475; x=1742841275; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PfpTTedni4gUGfvRcfnvXw4xTvY7JO0pNjOjXTZ7pI8=; b=dr92+fEPc5ZTGJQ+Gp7kIkr+duRXOtgXTxzDRqNTRmhKUTKJRv8ibwPUWmNWEmsDIW N0Bnz5QV7lz4BE8oUt0EAIAH4J3MS8WxFYe3xGCF7rMmfJ8cPBtBStg/TGfYHo7mH8Qt 3bCriGnwfcdsDIgaRbyMCIc6Tn9lMpwPtTNZjYKYmyDPKM83mc0zsvZFQtiMxTxSKyaQ pMuzx/SG2NtuoQVEGb81dZ7AC5Cugrrtvd5g+jbnkEKQjTMqp/ASk/YLqC64szUMvh7E NPZfeZq+4u0B7D9AH9WInuk3rPTegnyn3q2Sr9g+xRSoo7qKVPLWLXJuLXOZXk/3lpH1 y32g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236475; x=1742841275; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PfpTTedni4gUGfvRcfnvXw4xTvY7JO0pNjOjXTZ7pI8=; b=fIDO+4ZCYhWlM2bscj03EQ72yZ1+vHOLkOl44xKa5DbOP/75Wui1dWR3SIXcGobNdy Tr7+rj+iqVtNSFKfR8btQc6RFZ+uYygHTMCNSG149XRaljNv1gop0FCTAG2c3AHolX5K ZMpAkEN5G0aQMmX5fNczFCusnDLJpn7+NkbcO8jfF5X8fmjv9O/lUnPSE0lPxtWpZgui Z1KOVh0Tr6WQJ0zvFPOjuM0gK1xVGwdE/ECXKPqAUx2wtjwrNL3ZNV1DHe/2amXhTCQ1 aUyYK6HfEEvb91RT3RdigGZemGHdMFrEOXwjaEbNbJ7F5KixrWR9cV7KxS9rJhpxroDB Y0KA== X-Forwarded-Encrypted: i=1; AJvYcCWC9e35RocOUB1U8PcgPt1q7mLUH0GKVczlYHPHh1vHU1PY1bPThPibdGEm+3arbc5BpMJzG6tmxD8=@lists.xenproject.org X-Gm-Message-State: AOJu0YybKcmItnIW7ZIabK6PyeVPFQwBNSrfI8EyQfBXDQ+kMohsaPui lvANTSMga5fuGR0HZPDEw1cC2ke4br7M8gh5rsYq0oRhl5n77bqM9FpW1Sz5JWw= X-Gm-Gg: ASbGncuoU/oWnuC8X89RKVMbq65y5eB0WSILfMzeqRIyK1EQVQdBNi/e4bxwvwpu7UQ AA6UtCksKS0jp0C9coaRHtlvcq5FcF/BMmeL26yvIarO6YQN37s2XvG3b2L8FCcHayfzs/aN3oX 5kJ+8BkixuxF5EmmYI/dCUK2NyR2oXMm2ZVOayxOJY26lg87EAkROPS5RdpLwDL0+skyWW8lkf+ +UdySbV6BJyprUrAX46uEoo/fjrH1SiUIOahjlYiTkcs7HC0QsHn0HB6yUryYvA8MlHgdJX1wxw 9MW6rCoAuKd2nAsxR5P9HkFcPoGasMgx9KMboqKo+d70 X-Google-Smtp-Source: AGHT+IHhIUK7t53+vTI188pQaTMyR7EJzQqReYcVMpj4OefpwS1cjUKc4hsfvFYLapAGzkczRRlDcg== X-Received: by 2002:a05:6a00:2196:b0:736:a6e0:e66d with SMTP id d2e1a72fcca58-7372238f773mr15973995b3a.6.1742236475108; Mon, 17 Mar 2025 11:34:35 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 09/18] exec/ram_addr: remove dependency on cpu.h Date: Mon, 17 Mar 2025 11:34:08 -0700 Message-Id: <20250317183417.285700-10-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236508711019000 Content-Type: text/plain; charset="utf-8" Needed so compilation units including it can be common. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/ram_addr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index e4c28fbec9b..f5d574261a3 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -20,13 +20,14 @@ #define RAM_ADDR_H =20 #ifndef CONFIG_USER_ONLY -#include "cpu.h" #include "system/xen.h" #include "system/tcg.h" #include "exec/cputlb.h" #include "exec/ramlist.h" #include "exec/ramblock.h" #include "exec/exec-all.h" +#include "exec/memory.h" +#include "exec/target_page.h" #include "qemu/rcu.h" =20 #include "exec/hwaddr.h" --=20 2.39.5 From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236515; cv=none; d=zohomail.com; s=zohoarc; b=eZIRW2RCwVK06XFvCExqsB6POmn29AIFiqJRZnrMJSF1FInSdaChWuy2okLZpTKlRmnNS00qRv2r0mTeNk6y471cVZDDYmiVTxgZpG26EJSmUGOXTw9/C0nhdNWYXK3ACmER7CZ546gJmtykj92XVbb0sMEHnHPLtGHdqgvrS/E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236515; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BsftdeZcZ0LsVJ43Vlgc1kB7SrUHDvnjwuIeYSteybs=; b=j3vFgu0To7OWLwpMh0zkbA7vRLlJy2KhFLJri4WlNlf7Jb2g6NaJKbRlaV0foQL/aGQVmUtXXKJipNL6p4dEqSmQoshlxq/ivhR2AUY2cwDx4JZM6cWvGcQiyrbigNyKFVj7oi/UXQQLx40M2KZ1JxUSXdD9+fHxb01Kd0+bF80= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1742236515185395.0441745531683; Mon, 17 Mar 2025 11:35:15 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917746.1322626 (Exim 4.92) (envelope-from ) id 1tuFIP-0000As-1Y; Mon, 17 Mar 2025 18:34:41 +0000 Received: by outflank-mailman (output) from mailman id 917746.1322626; Mon, 17 Mar 2025 18:34:41 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIO-00009y-UX; Mon, 17 Mar 2025 18:34:40 +0000 Received: by outflank-mailman (input) for mailman id 917746; Mon, 17 Mar 2025 18:34:39 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIN-0006uj-Fx for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:39 +0000 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [2607:f8b0:4864:20::635]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7ab0f316-035e-11f0-9899-31a8f345e629; Mon, 17 Mar 2025 19:34:37 +0100 (CET) Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-225df540edcso61414345ad.0 for ; Mon, 17 Mar 2025 11:34:37 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:35 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7ab0f316-035e-11f0-9899-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236476; x=1742841276; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BsftdeZcZ0LsVJ43Vlgc1kB7SrUHDvnjwuIeYSteybs=; b=csDciEVVSKkjB1deLTNlS7WgymgexcpHBIWmRcsdBAdiGh3Rdy0JFNmKi+VSvRInl8 pmHKwDeeYzwMq38fGbwFjZ0eqWsXi4/UqnBZhKep+wBbjOgKySfeQITvRnMGJTMKIzTu Se60MNJPp0WCBZa4LN6KHU2NuQcyZCMKwF5BilSfM5Mtk1TaHeGCgsH9iCXyr5DHWp1Z YmduxqPG664074PVFXovR0UXQe/AhYZiXvTdtdsyhAS98Nc0QnovsfNU9B00kGEMSxgM Ks3hMB2AhCJN8IxuY4QJ7Ql/fz3PWXHbYOQU/5O41sMdUmmNTfK6Dl9Xcs19XUHYlIT3 c20g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236476; x=1742841276; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BsftdeZcZ0LsVJ43Vlgc1kB7SrUHDvnjwuIeYSteybs=; b=jI5oDMAUu6xWQ0DV/7wFmcPM/J84/nbaxRCKa5ZFYp265cTEk4sdfW4+LkR0rvJVZl TfrUDmr22K+V3uFVp+73ShuculGvfdGvVksj/ZcyxLR0KMl3Ba8+6FW6I34VZdw1hqCV XI9lUYKXehjnGZ/Cd5edSjt2kgZB+xppFSZmls5bTMt91YB2XYhlnFHc4apWhi8LrMlX tRSYVoI4bT1f21I2lVAbQS0x7sg8m4OAhlw3qK84dfPaZS+9XgKn9ageeferaZ8MaSrm SB8wepm3GgspHDaI+OaIK4oBrTy5gjhGze1ulsOZu5f0bVbfBSl79Ae2OvvzMEHDjfsA xiLA== X-Forwarded-Encrypted: i=1; AJvYcCWNlbc4itPKr3ZoCebtqMVSol+IZBj8uoX6kt5aZSUVa2P20tOFMDHAYMkTocienFouPuKHUqSfcww=@lists.xenproject.org X-Gm-Message-State: AOJu0Yxp7NOlunBKKy97hhkwaCZIoDGJ016F7OBXqtEooCQo36zFKfy6 PVSJnlLa3ujnqI/+plimJ6mnMLTZ1/g2uP+ac/pWSbL5sbJsP1hgspP1c94OVQ4= X-Gm-Gg: ASbGncsopieuK9upLq/udyfhBS8MbrxTsnikuVIM4bAkpol7XxpaDRNzj+tvE2TAbLE fL27lrTbd+9cablRkPkcjVBO+I3dSQzIgUmkWgh3d5wBbW66QvjUgJhXj8g6fo1nRn/EJ6mvpQ8 kkAxKy7whztO8Oq5lsAGHEUjDjh1P07TxYHIRIxKEq7bPWAXk+V9tSVWhXcnHNblVy/LXsvpp4a KRXnSp/P8LE9t093RxCR/PhnxGlPeyJA4HlC/B2DZylrUaOrbicakobauEfcRGq2tWMgJs1iPrQ z+KEXC/AnADvRqg6z1CWlJQyMZ/JNYjCgR/8ciBjNdS1 X-Google-Smtp-Source: AGHT+IFrc3E9fUAh+z3i68X6oJdtySmjNUcFSLSYjTurJl9vG25uO/0RkrUhFSmr8bwDc6/U+8pjrQ== X-Received: by 2002:a05:6a00:3b8e:b0:736:b400:b58f with SMTP id d2e1a72fcca58-7375752916dmr715700b3a.0.1742236476193; Mon, 17 Mar 2025 11:34:36 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 10/18] system/kvm: make kvm_flush_coalesced_mmio_buffer() accessible for common code Date: Mon, 17 Mar 2025 11:34:09 -0700 Message-Id: <20250317183417.285700-11-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236516953019100 Content-Type: text/plain; charset="utf-8" This function is used by system/physmem.c will be turn into common code in next commit. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/system/kvm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/system/kvm.h b/include/system/kvm.h index ab17c09a551..21da3b8b052 100644 --- a/include/system/kvm.h +++ b/include/system/kvm.h @@ -210,11 +210,11 @@ bool kvm_arm_supports_user_irq(void); int kvm_on_sigbus_vcpu(CPUState *cpu, int code, void *addr); int kvm_on_sigbus(int code, void *addr); =20 -#ifdef COMPILING_PER_TARGET -#include "cpu.h" - void kvm_flush_coalesced_mmio_buffer(void); =20 +#ifdef COMPILING_PER_TARGET +#include "cpu.h" + /** * kvm_update_guest_debug(): ensure KVM debug structures updated * @cs: the CPUState for this cpu --=20 2.39.5 From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236518; cv=none; d=zohomail.com; s=zohoarc; b=bsrNZAfbYjAZVvUjr+ziSwsSBRg9HVOYI8C0uGcwrMEFISaFN4CQ/Ndpy5t1zbfIjcA3aY3b5p4uLOn9277S+wqGPk7190kGUXxiyjCBe+/60apL9u6GJ8n928BVDBtK6jbh61VIUpmw6a5GgixJbA8OFQzLm+K/Ud14VWWwc78= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236518; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=PABH8iZPN9WF+wJr72ZMp6Lm7i1C+9jWBJAvssLik90=; b=TeLPXcuey1e0MzqigXlZGkb+hJavEZCncM8WplUCm7u/94DiRAUcSRRlXBS65IGayX7+FNRErlsiXvX51NAbC++ysQVhr3nfQ4qHuFnpQE2XXjFQjyQZfOaGLZOVRvMOXLQflQ4JtSY2t0S9kmY4b+cLIsYWkVkXzsT52pAwwmY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 174223651817674.20224130900988; Mon, 17 Mar 2025 11:35:18 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917753.1322654 (Exim 4.92) (envelope-from ) id 1tuFIS-00010L-Sp; Mon, 17 Mar 2025 18:34:44 +0000 Received: by outflank-mailman (output) from mailman id 917753.1322654; Mon, 17 Mar 2025 18:34:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIS-0000yo-MG; Mon, 17 Mar 2025 18:34:44 +0000 Received: by outflank-mailman (input) for mailman id 917753; Mon, 17 Mar 2025 18:34:42 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIQ-0006uj-Gt for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:42 +0000 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [2607:f8b0:4864:20::62e]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7b5f8b39-035e-11f0-9899-31a8f345e629; Mon, 17 Mar 2025 19:34:38 +0100 (CET) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-225df540edcso61414665ad.0 for ; Mon, 17 Mar 2025 11:34:38 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:36 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7b5f8b39-035e-11f0-9899-31a8f345e629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236477; x=1742841277; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PABH8iZPN9WF+wJr72ZMp6Lm7i1C+9jWBJAvssLik90=; b=AozXs1rjdznk9mpfZNnXgltxkDH4ByHsUKY3lbeMCtU4ed10uGUupSAPr3OIlRUGyf AUUUrCJZv8l8w5omvR6qcNVcCrM2uIJfZhZjTFl3ekVkNpIUZI3XmNLOhIpNitJZp5He EI+40vQhkyssfMRMf9bVX/R+SAzvpJlYvnPDsKv/hWM38yv3LXksvfaxhxr9+HyxHyyE XyJ8leZrlZYYs9PiC2PwkFBW3Ob3/oe6hheU17g0wnRuXX7vxBAuyLzZsMHRMIyZkl5Q /7/kjmBX4Fr9v3Eq66idP4KejoM+fd0Luh6b1t+dZR0QvX+gK4lNxVhxvMdj7oyWRD0U KZ4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236477; x=1742841277; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PABH8iZPN9WF+wJr72ZMp6Lm7i1C+9jWBJAvssLik90=; b=XEp7/tIlL00CeEvzMXqDVkv6upBjxC1NyADhxG1CEQZ4VxC+ReqTc+Q+TF8d9cg6UV rVh8usoWUmIUSGcxp0MxJqy3BdPu4XwBHY1GTCvGklEiIVsa8dzI35sr+UX8/wkvtYIJ HwbhRy9YiHYuGxrRjXbgMfs8lix+RG0ngjdxczHtnOuKXPZ/GEB5Pu/oPYqwBoA6RzyY 5lWVcBpF/m1nHdcCyPiacOEn75zT3I1cEP834L6kLFLYY5X3zbNjYQKuh+xcZbCFErV9 +iJw9cTacRSXdMhGYZrGGxIFq4vJl8f4GWY3CZhlw/yseTYvemCht7mt7t42cxaE3B2R 1deQ== X-Forwarded-Encrypted: i=1; AJvYcCWSEwdR4xcgOhlc3P6LGMc6JcgAY2SDyTWigVUy9E+qezJaPjG0dQY4skjWIJyOs2wpZfnzopX/Kn8=@lists.xenproject.org X-Gm-Message-State: AOJu0YxW6ySBd5ug5SnONDNBzTwEWPP9KoSXH5g7Ez8sSI/mdxuENsw5 FwSeLUlzjkvwGTjpFx0QZShvhHhdqT9Kopafl8qMEw0wuziZmOB8k9+GXlfDf4U= X-Gm-Gg: ASbGncu0dq+9NKtl2rFhmgrVy03Fo5RMfmPOTFVM0n+OnhfRukhxneroQcmMBK5Q9zQ MF1OtRJ9nFX7kWy0uUeAYCTtNKnUk1hu1rE/tTw869/QEe5CzWjSzPORkOj38U88/unilFB5yG8 4AP2sNGqO3HPcfVYzX1WjyPizjp/DQ467ZqHI8HASzqyAEn/1kwsFBOcoSpJ8+ljKmyd7XeHSHe Vb3LS2GiM57amWVEsZVhjDsI4IeifSKtQ5nT5URbyWU1kSNYqIEkahne/CvBl2jgXW06f/ZY+Fi DoPlJb7VFCvcRo9oVBz9mEUJwpP5I3Cp9Ro/uPgNLzl9 X-Google-Smtp-Source: AGHT+IG3g1g1/S4GhLMViIQmdttYJlPvvQDr2HFvFncsoI+sX7+pFPl4do/KG0rupNOCudw5OLu0nA== X-Received: by 2002:a05:6a00:2d8a:b0:732:5875:eb95 with SMTP id d2e1a72fcca58-7375778c1femr704383b3a.4.1742236477316; Mon, 17 Mar 2025 11:34:37 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 11/18] exec/ram_addr: call xen_hvm_modified_memory only if xen is enabled Date: Mon, 17 Mar 2025 11:34:10 -0700 Message-Id: <20250317183417.285700-12-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236518991019100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/ram_addr.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index f5d574261a3..92e8708af76 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -339,7 +339,9 @@ static inline void cpu_physical_memory_set_dirty_range(= ram_addr_t start, } } =20 - xen_hvm_modified_memory(start, length); + if (xen_enabled()) { + xen_hvm_modified_memory(start, length); + } } =20 #if !defined(_WIN32) @@ -415,7 +417,9 @@ uint64_t cpu_physical_memory_set_dirty_lebitmap(unsigne= d long *bitmap, } } =20 - xen_hvm_modified_memory(start, pages << TARGET_PAGE_BITS); + if (xen_enabled()) { + xen_hvm_modified_memory(start, pages << TARGET_PAGE_BITS); + } } else { uint8_t clients =3D tcg_enabled() ? DIRTY_CLIENTS_ALL : DIRTY_CLIE= NTS_NOCODE; =20 --=20 2.39.5 From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236520; cv=none; d=zohomail.com; s=zohoarc; b=SOjoYWUu80nXUu46ksH8xK9JPDfFaAjBZdzH0IU7KBXYUB1xPkmvHpAoyDvO8ws1IavBgsea0/59K4ihwgyZnbyRhScDyotplFE9G0c6KIKvSjJU9hThtCI76taYKTSxISaKOZEF5bJH1+uVvLi9BN8YGAA3prpR4vGhfimd4GY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236520; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=59c6JEMS6FIy924v+CKtazEU0ebGAiMufvTS4mzCbJo=; b=Y0NR6TKc8NWpl231ag8TfnM+d6SVilf94WQQuzwS8a0VLkuJz0Dnh/d5iZmIsVyw5xZyI5e4Nvi/6yYUqoy6KnO0whIxxVmPOgZ+EFLMhG/b/baGO9NSiOrDH/7vpllyeYhospsrpwG+eK2gAhorBtw8kaD1APxzNtWMkOVdohQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1742236520084660.3753695127104; Mon, 17 Mar 2025 11:35:20 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917748.1322637 (Exim 4.92) (envelope-from ) id 1tuFIQ-0000Ui-MP; Mon, 17 Mar 2025 18:34:42 +0000 Received: by outflank-mailman (output) from mailman id 917748.1322637; Mon, 17 Mar 2025 18:34:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIQ-0000TM-Ej; Mon, 17 Mar 2025 18:34:42 +0000 Received: by outflank-mailman (input) for mailman id 917748; Mon, 17 Mar 2025 18:34:40 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIO-0006VW-IZ for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:40 +0000 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [2607:f8b0:4864:20::631]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 7bfe7bee-035e-11f0-9aba-95dc52dad729; Mon, 17 Mar 2025 19:34:40 +0100 (CET) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-2239c066347so99592345ad.2 for ; Mon, 17 Mar 2025 11:34:39 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:38 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7bfe7bee-035e-11f0-9aba-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236478; x=1742841278; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=59c6JEMS6FIy924v+CKtazEU0ebGAiMufvTS4mzCbJo=; b=URBQfIApXa1D9rXmhhCOiHINv56EQS1U5hUrJLxe441UVSY484eSJ+mzfmGAk9cOr1 eqkruCf6g7Ia1dwRMp6FR6Bgy0b9F55SnVz0qv9YHGWrO+1zWVH4yUssrn7OPA9XE8oK h9HtiNvkexenXqWSzL0SZBDKCk6QdfIEe53KOgn0ePm+W50rNlKtJ3YRwPY3DePmspkd Q97szyUgx4zAI0X4VUzEC00so6QYGCx7dFqcMcy5yj6XuFPFLXuH0bQpoUWNA3DdIQ4a C30KRa84Qs7J/cjB7Bv0mNU5YStQ8N/5PQStBSekTvcFNPJ6wef7GIcLx1ADEKKjnwFu Uuwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236478; x=1742841278; 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=59c6JEMS6FIy924v+CKtazEU0ebGAiMufvTS4mzCbJo=; b=dWctuECHa5yTV8jzBhxmnzlYGOLsc1JTJnYaWfNjN2OH1kQVhkGIb0mpGM2j+A4HMx VGuANk1JRWt+8EuSAG32TuwX6+p6D1KrW+HJUHlApjW1lAR56NMdOOb0lvhYsbf0BGuC cOuBBKgK1CPZCDP7eRPVqou02tim3p9I7ZoNgCkBzAF5lg9+z1JbU/wJRfV10fYwPl80 e0y+o7+RD59O+nhc3u/e3y1SWYTutN13nMpyBk2eA1HcTb50SMnvR3Q04RYbVYFh0Rpn ML9gk6I6WiiXcRaAiONa/5hIfmKG3OYow/6N9Lylnm1RmEaUebM9kIfFEOj47T2KJNxt ee4Q== X-Forwarded-Encrypted: i=1; AJvYcCWUkh6c3xx7QeykskkLwEN9Fo2tvtrlgThTI+d+A/+3Tnt6Cukf2Lpc6b43Oa+r/lpaE6qLshAFkyc=@lists.xenproject.org X-Gm-Message-State: AOJu0YzPODRg1pECn/HR27csb7SsHOJz30tpK/jafiBy5kcW7gD8JUIo 2UYFM0rA5gJ39Txl40w9qphqm4LjYkUjr9/w/sjr9piAJYsQuaHNY5bpg6K5ZFg= X-Gm-Gg: ASbGnct8IfzFnW069b0D5bHYFAPd/TIVDb7mo1gVKNnljC0cxnROX+fydg2Ybip0qVs 0YGqDZRBC3uWZYjI5l0sD80fuOVvEN38pCl5S1WnlKWjuTEj05zyleKzoWpYNkesJl03ovT/pc5 HAvxNVyjXK2tcfp+6//87TcU3MdF1io4kD+crH8v0o7NbGv1dc5GrzwwfPqCncfMc4P0Wm1UeUE 1XktfvhHULQpSrA4bOCY5gDNmcH8OMNdVz/OaNy+/zDOFPV33bsuEnDUn+AVIp+J1vH8PCNrXj9 WFnSFVi0mBKGaztE6iBuH2mrol/IncsWC+cmVhxw7AQDvgifJzBpjVY= X-Google-Smtp-Source: AGHT+IGMBPlS4723f/QfXCi2z/TEFSVr/xLDSBzcEDnDoDIjYYHTKxD7//19rhfel7oXOjNf8/+suQ== X-Received: by 2002:a17:902:f711:b0:220:fe51:1aab with SMTP id d9443c01a7336-225e0af4f9cmr187594395ad.38.1742236478508; Mon, 17 Mar 2025 11:34:38 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier , Anthony PERARD Subject: [PATCH v6 12/18] hw/xen: add stubs for various functions Date: Mon, 17 Mar 2025 11:34:11 -0700 Message-Id: <20250317183417.285700-13-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236520981019100 Content-Type: text/plain; charset="utf-8" Those symbols are used by system/physmem.c, and are called only if xen_enabled() (which happens only if CONFIG_XEN is set and xen is available). So we can crash the stubs in case those are called, as they are linked only when CONFIG_XEN is not set. Acked-by: Richard Henderson Reviewed-by: Anthony PERARD Signed-off-by: Pierrick Bouvier --- hw/xen/xen_stubs.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++ hw/xen/meson.build | 3 +++ 2 files changed, 54 insertions(+) create mode 100644 hw/xen/xen_stubs.c diff --git a/hw/xen/xen_stubs.c b/hw/xen/xen_stubs.c new file mode 100644 index 00000000000..5e565df3929 --- /dev/null +++ b/hw/xen/xen_stubs.c @@ -0,0 +1,51 @@ +/* + * Various stubs for xen functions + * + * Those functions are used only if xen_enabled(). This file is linked onl= y if + * CONFIG_XEN is not set, so they should never be called. + * + * Copyright (c) 2025 Linaro, Ltd. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "system/xen.h" +#include "system/xen-mapcache.h" + +void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length) +{ + g_assert_not_reached(); +} + +void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, + struct MemoryRegion *mr, Error **errp) +{ + g_assert_not_reached(); +} + +bool xen_mr_is_memory(MemoryRegion *mr) +{ + g_assert_not_reached(); +} + +void xen_invalidate_map_cache_entry(uint8_t *buffer) +{ + g_assert_not_reached(); +} + +ram_addr_t xen_ram_addr_from_mapcache(void *ptr) +{ + g_assert_not_reached(); +} + +uint8_t *xen_map_cache(MemoryRegion *mr, + hwaddr phys_addr, + hwaddr size, + ram_addr_t ram_addr_offset, + uint8_t lock, + bool dma, + bool is_write) +{ + g_assert_not_reached(); +} diff --git a/hw/xen/meson.build b/hw/xen/meson.build index 4a486e36738..a1850e76988 100644 --- a/hw/xen/meson.build +++ b/hw/xen/meson.build @@ -9,6 +9,9 @@ system_ss.add(when: ['CONFIG_XEN_BUS'], if_true: files( =20 system_ss.add(when: ['CONFIG_XEN', xen], if_true: files( 'xen-operations.c', +), +if_false: files( + 'xen_stubs.c', )) =20 xen_specific_ss =3D ss.source_set() --=20 2.39.5 From nobody Thu Apr 3 10:41:05 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1742236513; cv=none; d=zohomail.com; s=zohoarc; b=RC6iYCr4MK6bF5FNUG4KeuVg4OxDHttWgeSyYriqNMW7CqqU6f93TuKpJogDSco+/sihIwyVriMJNOM8tBtxf7obuddIixmztBxLk7mbUxA1lFpmtdkEP6wlBZoJJIXSVnLU7n3z5a7ZAxO3LNiPLxV/jtnuJCkXbZnsHJNe6Mw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236513; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=RL1NPApLGPlk4f7q724/4D7b3IECBRPwWShMeYRIDxA=; b=AVXlvNvAXxF50J3Fq7mTlh2Tq0NunL1CARYQ6q3/L6+w3ai0b46pALilVHFaqKZanloZCwxtyoHuJscxqgiKhDcO0Z/uTTV8lau7I2h+KGbRG5YLa3JzNYe4nmAyQkeU4EY1fcg0fNg8iwxqPjxs699scghmw4xAQdTN/Te+YZk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1742236513968440.0149860940717; Mon, 17 Mar 2025 11:35:13 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.917752.1322643 (Exim 4.92) (envelope-from ) id 1tuFIR-0000cg-JB; Mon, 17 Mar 2025 18:34:43 +0000 Received: by outflank-mailman (output) from mailman id 917752.1322643; Mon, 17 Mar 2025 18:34:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIR-0000Zu-4j; Mon, 17 Mar 2025 18:34:43 +0000 Received: by outflank-mailman (input) for mailman id 917752; Mon, 17 Mar 2025 18:34:42 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tuFIQ-0006VW-4P for xen-devel@lists.xenproject.org; Mon, 17 Mar 2025 18:34:42 +0000 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [2607:f8b0:4864:20::62f]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 7cb34f52-035e-11f0-9aba-95dc52dad729; Mon, 17 Mar 2025 19:34:41 +0100 (CET) Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-22349bb8605so102852145ad.0 for ; Mon, 17 Mar 2025 11:34:41 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:39 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7cb34f52-035e-11f0-9aba-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236479; x=1742841279; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RL1NPApLGPlk4f7q724/4D7b3IECBRPwWShMeYRIDxA=; b=Ufd+wUjqdIj67ViH+k8bkR/9OHv0GTXCv5BPAL6JxDK8rOnFiBm5RyT7jR9pART7RR VZYclZAsDJqfUOM7DGFWMaNHcpH2p9Y2brVCa7xVQrSltOTZ1f8kRZwPAiu0K5WPKVBt 5CIMJTB61CbRlLQmEavv1uO6UVhzM0GEvpgLMdCKdf1lf3ZytUDtngddfteHVK4ZM3wG tE18j7L1cWtjmfFYym4uKBd9Khh/jtlQfEjNbUXCC0d3UoxX2ElrFwMuc35G1JMBixQw b2viPyiG0o2JAW2CjmKf+J1gif8Y9XuiAr/S0h5hqWdFXUNyNd5UQftuuAoS/scr1kQH gHuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236479; x=1742841279; 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=RL1NPApLGPlk4f7q724/4D7b3IECBRPwWShMeYRIDxA=; b=alCWjp2+gytb/BFtA9eBQ2BcXsz99FeAZvR/jtwLLShVXnymv+CHO+EFq4dzI+lE8a uaelkV1xipjEaR6Y9r+gMb1b3Qc+Ys4Wfg5nl0sCXx8Vs+4ULVWrC8dlP4YrBMynaUd9 VIs/Ny5IoOYGJ5xOOPSjTRG2+2zkn0tjpo6N0aHuPDjcIelWJrgODqj+9wSCg1eG9SB+ xfqJNTE9Lz6lvCUcE/keF+YeKUD93lw2zP9zW4aM/7L35eV135c42czfGQen2+UzREGL lmJtrdgSDsWjJtKV6sC31KPmLV1pb97kjeJJG1mkHPSSEYTe77D8nLqmWyFoUJPcGzmJ yBLA== X-Forwarded-Encrypted: i=1; AJvYcCWtwU6RkztJRUxWl5p82RDMsyDaXelku7+xmO1G46Q0LCoSdHFtp8BNLAQUgP8AVwNmkkvXFsMwHvA=@lists.xenproject.org X-Gm-Message-State: AOJu0YzlooS7a//ajo8PiRyc48BJhAzwxCZBr/H/ALhJxm7TGO0hQu7L btbNe37qIRuZS8ComByj1obVtM7nFdldCSDgtd9DB2E/tKSDGjyLKK3CnzC74JY= X-Gm-Gg: ASbGncvRMuS8tRplNFvvD+Oipo9lv1puU/g2/+AxsoRTI5796Q7AIt6iw5ybRS5D3m7 LYrbwyW/wpy9/SVDRBp4QupxhlGryOlm4snKUkMoxnG0i3IsaMWGZCoFQ0XOCyQM5aV3AhWp5+A fllP763xiBFoiu0Jp6aopeTGRsVHn8Q1SzK/iv5DAv8Wa/OcJrKkORX6msDl0EQPfFFhitpdUkR ZonE0LKLsYXo+YK/juxCWqkAKaSVk8ewuJtNzvdhiHRBhGuRg7/zHJCTzZK8yZnvYhnNCizB/Ee 2sB/IuGOANUmbMIgZyK8vkMyXfiqDFVNfb9ge9I9adWx X-Google-Smtp-Source: AGHT+IFOOeyV31jwF+pNrENhCRDzbP+OAMMjvkw2JiLIZfPvEZk2AdzmBDyPiAzaxdBUCsyNl+0UJg== X-Received: by 2002:a05:6a00:1c83:b0:736:54c9:df2c with SMTP id d2e1a72fcca58-7372240f41dmr13708249b3a.15.1742236479639; Mon, 17 Mar 2025 11:34:39 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 13/18] system/xen: remove inline stubs Date: Mon, 17 Mar 2025 11:34:12 -0700 Message-Id: <20250317183417.285700-14-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236525145019100 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Pierrick Bouvier --- include/system/xen-mapcache.h | 41 ----------------------------------- include/system/xen.h | 21 +++--------------- 2 files changed, 3 insertions(+), 59 deletions(-) diff --git a/include/system/xen-mapcache.h b/include/system/xen-mapcache.h index b68f196ddd5..bb454a7c96c 100644 --- a/include/system/xen-mapcache.h +++ b/include/system/xen-mapcache.h @@ -14,8 +14,6 @@ =20 typedef hwaddr (*phys_offset_to_gaddr_t)(hwaddr phys_offset, ram_addr_t size); -#ifdef CONFIG_XEN_IS_POSSIBLE - void xen_map_cache_init(phys_offset_to_gaddr_t f, void *opaque); uint8_t *xen_map_cache(MemoryRegion *mr, hwaddr phys_addr, hwaddr size, @@ -28,44 +26,5 @@ void xen_invalidate_map_cache(void); uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr, hwaddr new_phys_addr, hwaddr size); -#else - -static inline void xen_map_cache_init(phys_offset_to_gaddr_t f, - void *opaque) -{ -} - -static inline uint8_t *xen_map_cache(MemoryRegion *mr, - hwaddr phys_addr, - hwaddr size, - ram_addr_t ram_addr_offset, - uint8_t lock, - bool dma, - bool is_write) -{ - abort(); -} - -static inline ram_addr_t xen_ram_addr_from_mapcache(void *ptr) -{ - abort(); -} - -static inline void xen_invalidate_map_cache_entry(uint8_t *buffer) -{ -} - -static inline void xen_invalidate_map_cache(void) -{ -} - -static inline uint8_t *xen_replace_cache_entry(hwaddr old_phys_addr, - hwaddr new_phys_addr, - hwaddr size) -{ - abort(); -} - -#endif =20 #endif /* XEN_MAPCACHE_H */ diff --git a/include/system/xen.h b/include/system/xen.h index 990c19a8ef0..5f41915732b 100644 --- a/include/system/xen.h +++ b/include/system/xen.h @@ -25,30 +25,15 @@ #endif /* COMPILING_PER_TARGET */ =20 #ifdef CONFIG_XEN_IS_POSSIBLE - extern bool xen_allowed; - #define xen_enabled() (xen_allowed) - -void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length); -void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, - struct MemoryRegion *mr, Error **errp); - #else /* !CONFIG_XEN_IS_POSSIBLE */ - #define xen_enabled() 0 -static inline void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t le= ngth) -{ - /* nothing */ -} -static inline void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, - MemoryRegion *mr, Error **errp) -{ - g_assert_not_reached(); -} - #endif /* CONFIG_XEN_IS_POSSIBLE */ =20 +void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length); +void xen_ram_alloc(ram_addr_t ram_addr, ram_addr_t size, + struct MemoryRegion *mr, Error **errp); bool xen_mr_is_memory(MemoryRegion *mr); bool xen_mr_is_grants(MemoryRegion *mr); #endif --=20 2.39.5 From nobody Thu Apr 3 10:41:05 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=1742236701; cv=none; d=zohomail.com; s=zohoarc; b=XDHtdm323LniPEiv+ZysGz5gw7u3m0I+dBx+MrELnfLzExzNpAO9g7krCSbwg39kcx6qLECF4aoW/DoLOwsvkbTjs+BFLQVPTB5oGQeB+F61juEFsTWb8boViVssVHqgo1bz5FpauIrvtSX10qXcxAHh1P2TB0mGqeJcv+wSDO0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236701; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cOa15ppvF5kxsldjPkSIJYe5T0c824L9GaUvR3via0Q=; b=aRSk0ecr6GL39DQ8odqg+ShRFY73JOLzwebGSn8em/MQdc0lgP8Cu1lY1nB8Vi/nMOaDLXZoOfWGvRkTarE7ZOgfo5mt7crdyMAgbfKNZG7GktZ4hWiaGUu+ENDjUgnJIYfdGV8LJUjrLQ5LnCrdPNjAiCr6lCupaDG21UhvJk0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1742236700856566.5954156485536; Mon, 17 Mar 2025 11:38:20 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuFJH-0004nk-Az; Mon, 17 Mar 2025 14:35:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuFIm-0004Ut-2H for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:09 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tuFIU-0006Cs-1f for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:01 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-224341bbc1dso88731915ad.3 for ; Mon, 17 Mar 2025 11:34:41 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236481; x=1742841281; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cOa15ppvF5kxsldjPkSIJYe5T0c824L9GaUvR3via0Q=; b=H9vB6z5EbsXQH5NQ61mhUXNOByRlDmN05TQo/y7BSE+wBbHTp1WFXWVNzY0U3LlYwA 7miH5FCWuM+9uehGpbIhAtp0GOqA3859ZDVJtDLEbRfZTtxmBY40xe1TlqMvK6YHir5+ FfiYM2rraan8swxOJ4XzqkTfQud/FQlrJ3ICbVKZ8d/9Nr9hVyjyc3f/s3Ub9cehAU8F IdtsrMid5K4l3ZV+oTrr0XtrdUHI8A2CtUb/Sl1p5mZ/3zSwv9FWqft35x6ivwHdaPjg bAjuqjmE9iLLF27037fuqDcr1y0LfPImR70ec6/FzNM3Stj4yXXyi0In0HLmwdk5+ZHX 1ZSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236481; x=1742841281; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cOa15ppvF5kxsldjPkSIJYe5T0c824L9GaUvR3via0Q=; b=pjV1reK4MtiikwgKcKOWjLUNB1bUCBTiU5GSHZFzamlkguDKLhu6nVTetPm6UzjVf+ fluRlzRcMee9ovvAcfhjVQD5ftJVQXipn12zdYsbre95k3J8bmC8A3nRkKrEpUx/LNPB +66iA6OUvoQDJm1kF6lPbBm/zPCrK9ELvsSmx4zK9aDVWBYIvMuImEU0Z2eb3pwp+oDx 4y8UedOzjSL8gCilHUjMFvV/UmuKQwBc3M6eH6XFQKuUqohqxPAHfAssqOImj7o5YGKC pZ2hhXx5eaPlLeTk5fPs/mhXqDGDYhho5Li+67WPANW5Svm++9dJmSFUqDVl4p+xDscS IA+A== X-Gm-Message-State: AOJu0Yxrt4jr9jAv/FZy6AlotwmhvqAwOtPFTzB7oLJjHEicvIL6+H2E Q2osLejPJbS2hdBG8cZuNGxkw95YYEgQiqtAjWEF1ZCIN7UFJKKQCQjV8akhKD2M99KwfHLHiii g X-Gm-Gg: ASbGncuGNnMg0SguaSErT+1+iDOF0j/rH2b4E4Xvg0qLw8deu/j6lrPgCnklfORd2un 2uJ4LCde7AhgId7qY1FjNu7bYDC5NP1VxY08wBU0o4lRNQW/PL08ucnzLbra+sloNJHbfS+/i/5 N+cJhJeflK7c/frRA7CRJXwAOZIg3AqFRXEwkHA9qzK/8GlrNuiG1SxEK61NlGMytyO4hAKSXYs marH9vJxsB8DgP5ezZZ1irJ6+pCS8Bc+RYMA23Lx1R2zP4Vj6g4oVqcW0S3Vn/bYFMbpj1yI/gv bFERBTSkC2bz29gjintrLDhumyxS++axpWursiiyv+yT7xM8rbY4WnI= X-Google-Smtp-Source: AGHT+IHJvFyPD498ouch6ktpEIoYmR6xx3vtpzwDFb0ar1DtZX7lkpskC+JCwilCa8dJd3A5JvQbZw== X-Received: by 2002:a05:6a21:7895:b0:1f5:9961:c40 with SMTP id adf61e73a8af0-1fa43acdf8emr1048891637.8.1742236480716; Mon, 17 Mar 2025 11:34:40 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 14/18] system/physmem: compilation unit is now common to all targets Date: Mon, 17 Mar 2025 11:34:13 -0700 Message-Id: <20250317183417.285700-15-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236702497019100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- system/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/meson.build b/system/meson.build index eec07a94513..bd82ef132e7 100644 --- a/system/meson.build +++ b/system/meson.build @@ -3,7 +3,6 @@ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( 'ioport.c', 'globals-target.c', 'memory.c', - 'physmem.c', )]) =20 system_ss.add(files( @@ -16,6 +15,7 @@ system_ss.add(files( 'dma-helpers.c', 'globals.c', 'memory_mapping.c', + 'physmem.c', 'qdev-monitor.c', 'qtest.c', 'rtc.c', --=20 2.39.5 From nobody Thu Apr 3 10:41:05 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=1742236686; cv=none; d=zohomail.com; s=zohoarc; b=m4BpdzfAv4k9jnXa7tCwGMHeA8LdvLgUKs9JRPBnbmPdt5NS2Oh7AuGR/nx+p/Kpl63ydB5cmNvM+cOq3xtzlxetFIxzmH+kj6RlMl+Wp3tQDy7r5n0VWDK7ynQLTzKeAl+mZSLw0q5T0A3SQeyoaP8yAXD4/sOBGpQedjyRZ0c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236686; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0vI16NHb2tKWbIxjnq/SoVUTdY/Lep770BkCc47k0Rc=; b=XiSF0wLwfxuYffN5Ol6cp6YAoUCO4zim7I/NJHZ2UbCoNpBeWzSNYb4aTp3gpnuBf/VO5b8xGdUxsma7Iguedd8vb0rlLD3s+1lTK8dGSyQ//YsiJhfqQrf2tt9TwlanJGhWKIK3gaoutF0K/uaurVf8mrFZlO3Jp5vaXVxnua0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1742236686616967.431312737081; Mon, 17 Mar 2025 11:38:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuFJb-00054k-R5; Mon, 17 Mar 2025 14:35:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuFJA-0004ip-D5 for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:31 -0400 Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tuFIW-0006DD-4E for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:28 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-225df540edcso61415945ad.0 for ; Mon, 17 Mar 2025 11:34:44 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236482; x=1742841282; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0vI16NHb2tKWbIxjnq/SoVUTdY/Lep770BkCc47k0Rc=; b=DA2nNTJiVk5bp05CCI1KSkiBTAuCcZemKJjL7T8qfl8hrsLJZeSnUOCUosus0zXweI PWExMvi5z4VLVf9X9PVHu2i6yYiSwUql5iq5ERr/Gli5xpoQneXjddJ8Tnb0fRV/N3LK DRT78uwJh7S9hmVIgcUbp8ZjsaLK/j28xaZxrZvN3ellTlNRyyPH915Upsa5LNw6aKnc kXuu6Dso9YwWDmTf3gK+MhgrTEh2aNyKlB6pNuD22vsMVLHhmX1WefYp9IleP6jpmfAt y3ql+QbOOHVCQXDwMoH9OKYYlh5QpxoEWB+yKk5VpE2R0/3NUBSEB4WUT3MtW7MbjSHN p4DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236482; x=1742841282; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0vI16NHb2tKWbIxjnq/SoVUTdY/Lep770BkCc47k0Rc=; b=aBk+Mdz+mRigewpFJByUkV32Ai3B9DSGP6AOjLE9ahRyplkPTLso+TU3V/uulk2Zgk iz1na4/Z3kwUi9XL308IVWTO8RjB5OghilsqA+E5uJabdQW4LlClFZTgtiLs08ZZtGqa sDv3KQ1HWFu+eiX83HjR/UWgykm4FbdJSDZaj/7oxSn5UKsJMRsDIEyt+UPhHHHT+8az tSYhvm/1WrHrte4zb00ralrBLcj8ipNDWQYZbPf5SOhMtM72cmfAUgHq638P4TvfXP7O +Pd4bYwnuIYnH+ERZOGtmcqCSJNX8xXs3VtaarSGgP1N2ePKjvc2QpIE7HJ1oynHvzYW qvog== X-Gm-Message-State: AOJu0Yy/Shl7i1s7pVR2u4OwzVZYiMoQreL0IniyJ17F6sD8l6XWeubz VHD8nOOlfa6OZHwDAhdGA48vSshmwP8dgLuYXSQCesYKg19n1rwkEY1dCmVLgrKtkEjPMV95ody P X-Gm-Gg: ASbGncuHh49UirX/HrNAlxYv9vCnrW+wRZJItjL40GS7aat74uZ2azLJXO6XanrA6Ii Pim+DiO4ws/gzRhEOxvcoOSN+danwvV5G5HxFMgp5weA76Ce/tzyxl4AsN6nZr8wH007n3j8PTT Z2MZ3QdWhzTSrSp+j8Pdk7S1NUHhv7h+oYR7naDYwAynNlCfe26nKP1mT0YXItaeWTzlv2oPb/2 VxESHmm2ZCTUqCxe8Ieg3z9dUOwWAvqByvBlqWbMx59O6c8lAX1YHSPMahdlRAdE9oyxVNeyGCA cYx1UVORFJj66GnHPehLXkTFR9JoiZWUKNPgqXPLbaRCtKM2l+UTRAQ= X-Google-Smtp-Source: AGHT+IHLCVfoMXXafvmlUL+0Gr6I93fx5MjwwlixqoYIvnF6wjRbfJSSJwsXt8s9Rnrm35OOx0JfRQ== X-Received: by 2002:a05:6a00:a15:b0:736:9f2e:1357 with SMTP id d2e1a72fcca58-737578016a8mr692906b3a.12.1742236481805; Mon, 17 Mar 2025 11:34:41 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 15/18] include/exec/memory: extract devend_big_endian from devend_memop Date: Mon, 17 Mar 2025 11:34:14 -0700 Message-Id: <20250317183417.285700-16-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236688473019100 Content-Type: text/plain; charset="utf-8" we'll use it in system/memory.c. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 069021ac3ff..70177304a92 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -3138,16 +3138,22 @@ address_space_write_cached(MemoryRegionCache *cache= , hwaddr addr, MemTxResult address_space_set(AddressSpace *as, hwaddr addr, uint8_t c, hwaddr len, MemTxAttrs attrs); =20 -/* enum device_endian to MemOp. */ -static inline MemOp devend_memop(enum device_endian end) +/* returns true if end is big endian. */ +static inline bool devend_big_endian(enum device_endian end) { QEMU_BUILD_BUG_ON(DEVICE_HOST_ENDIAN !=3D DEVICE_LITTLE_ENDIAN && DEVICE_HOST_ENDIAN !=3D DEVICE_BIG_ENDIAN); =20 - bool big_endian =3D (end =3D=3D DEVICE_NATIVE_ENDIAN - ? target_words_bigendian() - : end =3D=3D DEVICE_BIG_ENDIAN); - return big_endian ? MO_BE : MO_LE; + if (end =3D=3D DEVICE_NATIVE_ENDIAN) { + return target_words_bigendian(); + } + return end =3D=3D DEVICE_BIG_ENDIAN; +} + +/* enum device_endian to MemOp. */ +static inline MemOp devend_memop(enum device_endian end) +{ + return devend_big_endian(end) ? MO_BE : MO_LE; } =20 /* --=20 2.39.5 From nobody Thu Apr 3 10:41:05 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=1742236818; cv=none; d=zohomail.com; s=zohoarc; b=DUsxmmRzK9GXgtl1tct+dy7CZsk0jfPe44wHDU/Dl1aA3wWZ4Nb09jq9HNxRHFq4Fh6bJnhFvOMJT2W+7RrMIhSwgWhYleD1oAoYmBwuyj7K17ZGX8d7KBEPg0oaSpMRAbeuC4p4S3ByVBi7xBcVGuIsnDkMbD+Wj/YIlp86iTo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236818; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ipPAyCMNYKQgJ+e1Pj22cNEjWMul6XXi9iVGdQZJ7Rc=; b=Oeo0BXl0OjUI1Rf7V4U+BunCow9NDaAIloBt3J1csMAIVWFlKHquGJlSTVyY1knyCV9lz5/+MqyhHCy4OYPtd9hAGj11zPk+YOF30FHKzvpRJ/jgU5Guq/RJjjPITdwrsYcxAukb4ZYIM7eHAHlibSRXq9jlvRjJppT0ItVmDsU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1742236818378938.8467991725619; Mon, 17 Mar 2025 11:40:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuFJZ-00053l-SZ; Mon, 17 Mar 2025 14:35:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuFJG-0004ml-7g for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:35 -0400 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tuFIX-0006DY-SQ for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:33 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2255003f4c6so82571555ad.0 for ; Mon, 17 Mar 2025 11:34:44 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236483; x=1742841283; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ipPAyCMNYKQgJ+e1Pj22cNEjWMul6XXi9iVGdQZJ7Rc=; b=e82twBaYUFzQj40G5+oSfwvx+YUSosr/3XOtYbPD5mEhauXKO7mBL45RJZmIEYhXLX t2pv1mjrk7OLFGNgVO+q23jgKIoj6YmdH/hWpiwEObTl0aofb1yZB6N5EdMfV4e6BOb5 VMzv+7qF8FrFOPHdIcR/SybPW74oQcpcDygwMcsYYbHgKdvWtaQdp15WCkP66Af4FBL+ msiSDf7xG0vSPHJ/B861rlI3/b327NRIFWY8e0cxKF1o/PW6+ULC17EWr7Y50AvfrRgi G+8fyrCeQ9U9FhYbjB6OyIUzyqal6Qnxg3NYJwJpzufjtJm9Q6sz+kXJegwq16R52aAE LWiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236483; x=1742841283; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ipPAyCMNYKQgJ+e1Pj22cNEjWMul6XXi9iVGdQZJ7Rc=; b=ShSVv9ZYAeJ2r2w2qqOfSoXQBkYRQyFSHf7EgkjYCwMP5AVGAhmzbXvhOzum8Q20lL KZPaghHfv3qE2FhhCb6bCuuyeKi42lBCeGOx1Mb+NYDNve6TQmnREBngbexr/G9xz64A 6Eumwby3QTVeYi3pWu1C+zpAPC3BGlK9l9bk898aew6z9msyD7eEvj1OOMkLUgsp+BO/ R+pM7ArlYyfJtiVz/K3OhqVR19ZJmss3niXFeouttt+7NZHYhru8GRw+brSSHLckTzY/ uvwJQkNv7ZxHAmaoce2CmerHKzr2DEpLLlxqX2d8O8zxwYJxEdfI5FPYYfL6t2VZ1Fp9 sp+g== X-Gm-Message-State: AOJu0YzxQhdsOT9jUEDsUkqCkPRJfEaPqdZDbLUBcJVoVbtTPmxul8Ip B7RJ942pO+IIop3eg/moqMWLfXHqDfIY3YKJ7pvtc/hVDyRXURUnCnA+iJ5BUK0cWv2CP3KYjoB M X-Gm-Gg: ASbGncuPGI1tIyFwuyN0tRxcza7ueMdHpPhE5pI1P/IYA2L/+0KEFqjcT/LQ4MYyEtq ZPoFmWcP4NxLNTlGpcxAFjk027hUVKH1BHy3nNJYQpEtQN6RNw11TRTAEG5S/cWYkhgAeD/0hp3 FzraTBViKkP11xrLkvHQDKflnasDjdBZyUWivETGg/ePFfrnSnP3A+uhRRqZYEzwEfFg9LpLKQD xkVJf5avn0DkN37BUDZGFrhFAkrjNOe8aQpA9rFu+gjuO+h2IK51rg+fhCSd+s5+DRKv3V1qao3 sS7PLkoGYAWiteb/F+EVeoZv0Fh8Ww7c2S31QK4AlMU9 X-Google-Smtp-Source: AGHT+IEkZnLpN2CL+GDmBOdEKBU4dHJiRJeeADCMAkJ+O9oEFhXHqcZxYnGUH5GSlkI3pMVX0bW4VQ== X-Received: by 2002:a05:6a00:1a87:b0:736:5725:59b9 with SMTP id d2e1a72fcca58-7372236c6b2mr14484100b3a.2.1742236482975; Mon, 17 Mar 2025 11:34:42 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 16/18] include/exec/memory: move devend functions to memory-internal.h Date: Mon, 17 Mar 2025 11:34:15 -0700 Message-Id: <20250317183417.285700-17-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236820182019000 Content-Type: text/plain; charset="utf-8" Only system/physmem.c and system/memory.c use those functions, so we can move then to internal header. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- include/exec/memory-internal.h | 19 +++++++++++++++++++ include/exec/memory.h | 18 ------------------ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index b729f3b25ad..c75178a3d6b 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -43,5 +43,24 @@ void address_space_dispatch_free(AddressSpaceDispatch *d= ); =20 void mtree_print_dispatch(struct AddressSpaceDispatch *d, MemoryRegion *root); + +/* returns true if end is big endian. */ +static inline bool devend_big_endian(enum device_endian end) +{ + QEMU_BUILD_BUG_ON(DEVICE_HOST_ENDIAN !=3D DEVICE_LITTLE_ENDIAN && + DEVICE_HOST_ENDIAN !=3D DEVICE_BIG_ENDIAN); + + if (end =3D=3D DEVICE_NATIVE_ENDIAN) { + return target_words_bigendian(); + } + return end =3D=3D DEVICE_BIG_ENDIAN; +} + +/* enum device_endian to MemOp. */ +static inline MemOp devend_memop(enum device_endian end) +{ + return devend_big_endian(end) ? MO_BE : MO_LE; +} + #endif #endif diff --git a/include/exec/memory.h b/include/exec/memory.h index 70177304a92..a3bb0542bf6 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -3138,24 +3138,6 @@ address_space_write_cached(MemoryRegionCache *cache,= hwaddr addr, MemTxResult address_space_set(AddressSpace *as, hwaddr addr, uint8_t c, hwaddr len, MemTxAttrs attrs); =20 -/* returns true if end is big endian. */ -static inline bool devend_big_endian(enum device_endian end) -{ - QEMU_BUILD_BUG_ON(DEVICE_HOST_ENDIAN !=3D DEVICE_LITTLE_ENDIAN && - DEVICE_HOST_ENDIAN !=3D DEVICE_BIG_ENDIAN); - - if (end =3D=3D DEVICE_NATIVE_ENDIAN) { - return target_words_bigendian(); - } - return end =3D=3D DEVICE_BIG_ENDIAN; -} - -/* enum device_endian to MemOp. */ -static inline MemOp devend_memop(enum device_endian end) -{ - return devend_big_endian(end) ? MO_BE : MO_LE; -} - /* * Inhibit technologies that require discarding of pages in RAM blocks, e.= g., * to manage the actual amount of memory consumed by the VM (then, the mem= ory --=20 2.39.5 From nobody Thu Apr 3 10:41:05 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=1742236854; cv=none; d=zohomail.com; s=zohoarc; b=LAskco9wvM81tPV5HqAgYsx3to7E3E5dEFjTBGek8vssOxRjXj7cUQDwsxtx51qn2OLUeQ+BhYV65NQNfucCYVavehttBhoi8kRt7EEf/p92tvEMndhadN/xk+EHRUeAiJvXnbUFyCXqZa8vZnF7QzGthyClI7sY0V3Xu+Y1c2M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236854; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=EBRugwqnxw4q7Phz2P050i5IjB6Zbf1WGwdoEilqtkY=; b=NoS36hAFNAxNE/3gOldQ2H+nAWDwQkdfH1sGuDUlYJ7IUpbtAQ+uJuDDllcJKin3/7tdh29/0qQHTLT14G6x77fiDmGnvX7jriydVPPRSjkvSLxPUyLnENXaoEZ4ImFROZfR5pQiEV7Hi1zNLYIdmQdvyOD73WU5vdVJclrwkHE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1742236854001272.968657968087; Mon, 17 Mar 2025 11:40:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuFJY-00053E-QB; Mon, 17 Mar 2025 14:35:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuFJG-0004nX-NM for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:34 -0400 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tuFIX-0006Dk-Cy for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:34 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-225df540edcso61416755ad.0 for ; Mon, 17 Mar 2025 11:34:45 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236484; x=1742841284; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EBRugwqnxw4q7Phz2P050i5IjB6Zbf1WGwdoEilqtkY=; b=wtclrS1vnQKrSCKG+duhvTktAa8YXsFt61dGfLCWkZk6A7N/ihYAKedibD9NuwR3+E S4kRL31mReks20wi5pcKJnTg3ccZt9LSwAwtnwd11YC6lCJX8b88Z78KIVAA5CDS+SPh kOYVSVaMpofKNoMd0rtqtcgXFtUieNIAgrjA9za4q6CR8nsC3XlFi9FR8DXxktnkGp5W LK3dVHPSyiD7Pa+hHP/V+cHAQSXpIjkz87QOo4cb9vVssRSqeI8FfiGyUtK6hi+aeLwx S+O0cFFMUsUzJhZf3gQNrameNDfsIf2aRAqDAm2DCk9mrau/KPc9QZ5Q4y7Oq63qtyqD 3gXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236484; x=1742841284; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EBRugwqnxw4q7Phz2P050i5IjB6Zbf1WGwdoEilqtkY=; b=IpeHbaA21jMEn9OXurOHzxqNyFgSj7xB4F0DSpDbnvPVgHGpQgfuxSG1BtAtUU6FkH ErjkPh5eQ2l/LAVwSOr+xx+SbbJoIFXp9gFP9lSXgHpJfgrtl+DqVKhZIkAf7XIE1tzu bfXsCJHC07pLoR6zQJnDNx2amU13kXFu1NOsyZ3k/GB2hIvhU10eH5mEcKEFXj6bJdBA 2ax2PFJDwYZHmwdNHVm99QrEgpfZTktntt8e1x8i+I5Ffc4EnG0eJkAwhrgkAx80MNV2 LA3l7mdOzc0Dmpo7gxRJ0YxZJ8wklVYUKJt1N7FbPOsLcowU6D/VQwqxd8OXV42bfRx7 7rsA== X-Gm-Message-State: AOJu0YxeR74E2s21oEVT2qEMSpNAPubDbR+9SKe/OhVSgZhH5WQ1M1o+ f3pSG54qNagvAFHFSSfiKY2C5ZmiodunLjp/sHuoKEX3FM0RSjNcvzL507VS4klSKlU0EzrCOoi 8 X-Gm-Gg: ASbGncucWWimqkg9TJXwUeaadNuxNxnMPoUDeUHqcNaTWMbZ4C3cAsTMMNSSb9NGNbV 3gm82/htRT0Sy0Ob2Inh+kT2n7F98fUtYeLq0hPxYCDGMHqP/FAyUsGR/boqeyJXdO/tEwBHFe+ 2YWFQ8pq5X6Lz3tntaII5X4ZqwvfvrYTVDTyLCIC+QEBheBtphvuLGrv3SzkAcvcHaDi3fE8alb j7F1ZacJbVKDwirD9lwrxRQ2mY4EerCtG78JFyvR6Xas9ip08Z+S4eLsryCPh0mpBZYUphVDV7P n2zwlGMZBwt+1mcd4pIx+RGgNf7HV+yERmdiBtonD4ls X-Google-Smtp-Source: AGHT+IHaIWG93SjaignFKD4IVBdMoq9cQTxlUlmFhZIj0sg1/yp4Pm5Fp9URm2R1oo2C+UJzak1b5Q== X-Received: by 2002:a05:6a00:2e84:b0:736:476b:fccc with SMTP id d2e1a72fcca58-737577c60dcmr700300b3a.8.1742236484037; Mon, 17 Mar 2025 11:34:44 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 17/18] system/memory: make compilation unit common Date: Mon, 17 Mar 2025 11:34:16 -0700 Message-Id: <20250317183417.285700-18-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-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::631; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236857025019100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- system/memory.c | 17 +++++------------ system/meson.build | 2 +- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/system/memory.c b/system/memory.c index 4c829793a0a..eddd21a6cdb 100644 --- a/system/memory.c +++ b/system/memory.c @@ -353,15 +353,6 @@ static void flatview_simplify(FlatView *view) } } =20 -static bool memory_region_big_endian(MemoryRegion *mr) -{ -#if TARGET_BIG_ENDIAN - return mr->ops->endianness !=3D DEVICE_LITTLE_ENDIAN; -#else - return mr->ops->endianness =3D=3D DEVICE_BIG_ENDIAN; -#endif -} - static void adjust_endianness(MemoryRegion *mr, uint64_t *data, MemOp op) { if ((op & MO_BSWAP) !=3D devend_memop(mr->ops->endianness)) { @@ -563,7 +554,7 @@ static MemTxResult access_with_adjusted_size(hwaddr add= r, /* FIXME: support unaligned access? */ access_size =3D MAX(MIN(size, access_size_max), access_size_min); access_mask =3D MAKE_64BIT_MASK(0, access_size * 8); - if (memory_region_big_endian(mr)) { + if (devend_big_endian(mr->ops->endianness)) { for (i =3D 0; i < size; i +=3D access_size) { r |=3D access_fn(mr, addr + i, value, access_size, (size - access_size - i) * 8, access_mask, attrs); @@ -2584,7 +2575,8 @@ void memory_region_add_eventfd(MemoryRegion *mr, unsigned i; =20 if (size) { - adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE); + MemOp mop =3D (target_words_bigendian() ? MO_BE : MO_LE) | size_me= mop(size); + adjust_endianness(mr, &mrfd.data, mop); } memory_region_transaction_begin(); for (i =3D 0; i < mr->ioeventfd_nb; ++i) { @@ -2619,7 +2611,8 @@ void memory_region_del_eventfd(MemoryRegion *mr, unsigned i; =20 if (size) { - adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE); + MemOp mop =3D (target_words_bigendian() ? MO_BE : MO_LE) | size_me= mop(size); + adjust_endianness(mr, &mrfd.data, mop); } memory_region_transaction_begin(); for (i =3D 0; i < mr->ioeventfd_nb; ++i) { diff --git a/system/meson.build b/system/meson.build index bd82ef132e7..4f44b78df31 100644 --- a/system/meson.build +++ b/system/meson.build @@ -2,7 +2,6 @@ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( 'arch_init.c', 'ioport.c', 'globals-target.c', - 'memory.c', )]) =20 system_ss.add(files( @@ -15,6 +14,7 @@ system_ss.add(files( 'dma-helpers.c', 'globals.c', 'memory_mapping.c', + 'memory.c', 'physmem.c', 'qdev-monitor.c', 'qtest.c', --=20 2.39.5 From nobody Thu Apr 3 10:41:05 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=1742236830; cv=none; d=zohomail.com; s=zohoarc; b=FZ6QRILV7tNuTuXxEPpjdyZ960CDflAeSZK6I72iS67VrVvcTkQdyzxks1wUauot22mt9QlDGzGihhGdCKSWtJZ0ILnDgyNB6rcCupPL7kje3qtICZ07xrdT7mpF3a1K6fHCoONwbT5dnhEuwO/2lujYMF+CaIKgmxD296k3Liw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742236830; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pdsNHldr91xnqdGHk1DTLXuYnmkD/cCe/HKmA2EoKL4=; b=HrBIqSg10DvD2oaX8FSQM20wtccTm6ynj94woo5K5WxQNxWcjuGz5BG5kaP61wyLUtMAkSvvPdq4RVjAs66c6whs2afJFfVEZpSNQPcOuPslTZTDCN2VKyO9vA1Es6pPVbzGE5sfO1CmVej+pu6dkGb15/FqPhPomnEkik9gMDs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1742236830463834.6118882179047; Mon, 17 Mar 2025 11:40:30 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuFLO-0006rO-MB; Mon, 17 Mar 2025 14:37:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuFJO-0004wA-J1 for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:42 -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 ) id 1tuFIb-0006E7-1M for qemu-devel@nongnu.org; Mon, 17 Mar 2025 14:35:42 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-22438c356c8so83697135ad.1 for ; Mon, 17 Mar 2025 11:34:47 -0700 (PDT) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73711695a2esm8188770b3a.144.2025.03.17.11.34.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Mar 2025 11:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742236485; x=1742841285; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pdsNHldr91xnqdGHk1DTLXuYnmkD/cCe/HKmA2EoKL4=; b=bv2EfyrDbwpspLWOAJosLQNUVAJiyDbDctswELIXN3fPdiN+2ZrM4Whx6Qh70uvltq Bt8+ff8uZaF/6z/yWSmVux8m8eIGgMjb4I9Dy8XFvceK2awta9NpekLW6uFhRo/tvxMr 8Rek45fNzRgTG72ehlePFgxFQIJ+3CkSgxQomDyouQ2X8w9O8VbjOBWsYmqPCoFB7HUF 5lUV+YpUhU8GZAVhE2UblhKaesohNXKUiwYvDTErr7FuAJgU9vT3mXw5ZBOGjNH8aKzp THIlgIoXojLP9xgomr5BvLK+QX5VNDQwDBt3LaLA5MkjvOPw4mHYTSSR8ZxLzCOe/DfL EXNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742236485; x=1742841285; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pdsNHldr91xnqdGHk1DTLXuYnmkD/cCe/HKmA2EoKL4=; b=XlTieaKdlvQryJVp4HsitgF7L1ZANQq4RwYgiIL0tIuD/woGFjxWL1BBwv0uG7xZg1 V1gbc6CBLLWA6eBbJmOh2Fg+unTPBtjt5KvGuZFnKwSBpnxzv9c0Udq27zYSfJdGXFk0 GyKCp2Sv0qtGeWe2VC60wJ8IaHQ4PScgW0yXyvvlES4mEM5euJ/SO4a99nkn3G22t1jc vHO84hdtS/ZVN5H0pu30oKd1/bp0OAGvJubmdX84km8zq4s+N40Q2Y6sRqRB/f8y+uH6 uzqXHhEyfWiB9D/zyLkCevHZkdn7GQkWArLsZfZ41OWCtkZjc8mg1pUgnvGChLA9FYnW LgpQ== X-Gm-Message-State: AOJu0YyNfFvhUroB45DA30NQxcAkAoKfC8EbB0XXDbTFlLPnmVni1IhJ 9re3t5YrV6Vb7Xwq9HhfLnr6ARddJFRvR8F1Po8SseJCyR08+Jbc0G6Y8n9kozq58EAxwAizZHk q X-Gm-Gg: ASbGncuX3QW7ersgcGur9O3hgiIPoWNRaIURSaf3eFW5sYFbB4CYac6hU/XSkuAKVVj SIKv0WFi+QZOIeAwcJh2eQ9/gSqOthn9OfkdY+K1I+JTClhIzfzh4mPzaVoa5OUEpWlqLRmoln0 m+DbG1ILu84h3b2EhF86lniuhLD1iRStswbivd7GT7xKeccMnhl4IBDqbypqwj+85prRo/q7ck2 tI3+xPexPkhjNmaleocEdxYUWtMicYUa+FaYKxxOaqxNdS7DP14axE3mPhFBjZI6OAaCV5I0o70 I3Uu9YNf7hfNBs5SGl4HROq0pHfAf9VHjzGwtbAeQOf1 X-Google-Smtp-Source: AGHT+IHzNNUW3sLQt1T364FsCohrjLgSsBCXmjd/XRyR5B72Si2GIa2LUJ+5Zkf6gr6cDVKPRd/CWg== X-Received: by 2002:a05:6a00:b95:b0:736:3d7c:2368 with SMTP id d2e1a72fcca58-73722353269mr15820164b3a.7.1742236485130; Mon, 17 Mar 2025 11:34:45 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paul Durrant , xen-devel@lists.xenproject.org, David Hildenbrand , "Edgar E. Iglesias" , qemu-riscv@nongnu.org, Liu Zhiwei , Paolo Bonzini , Harsh Prateek Bora , alex.bennee@linaro.org, manos.pitsidianakis@linaro.org, Daniel Henrique Barboza , Richard Henderson , Alistair Francis , qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Weiwei Li , kvm@vger.kernel.org, Palmer Dabbelt , Peter Xu , Yoshinori Sato , Anthony PERARD , Stefano Stabellini , Nicholas Piggin , Pierrick Bouvier Subject: [PATCH v6 18/18] system/ioport: make compilation unit common Date: Mon, 17 Mar 2025 11:34:17 -0700 Message-Id: <20250317183417.285700-19-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250317183417.285700-1-pierrick.bouvier@linaro.org> References: <20250317183417.285700-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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1742236832730019100 Content-Type: text/plain; charset="utf-8" Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier --- system/ioport.c | 1 - system/meson.build | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/system/ioport.c b/system/ioport.c index 55c2a752396..89daae9d602 100644 --- a/system/ioport.c +++ b/system/ioport.c @@ -26,7 +26,6 @@ */ =20 #include "qemu/osdep.h" -#include "cpu.h" #include "exec/ioport.h" #include "exec/memory.h" #include "exec/address-spaces.h" diff --git a/system/meson.build b/system/meson.build index 4f44b78df31..063301c3ad0 100644 --- a/system/meson.build +++ b/system/meson.build @@ -1,6 +1,5 @@ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( 'arch_init.c', - 'ioport.c', 'globals-target.c', )]) =20 @@ -13,6 +12,7 @@ system_ss.add(files( 'dirtylimit.c', 'dma-helpers.c', 'globals.c', + 'ioport.c', 'memory_mapping.c', 'memory.c', 'physmem.c', --=20 2.39.5