From patchwork Tue Mar 18 21:31:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874436 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76726wru; Tue, 18 Mar 2025 14:36:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWXO67NRMzqyqcuXsBxHMlPmTwEka7tjyzpkFCyzujnkQoFrk33lblqB2uolhc1k+QyHr/4rg==@linaro.org X-Google-Smtp-Source: AGHT+IGgnqgtXiWcVTJKdP87g/0v+kFoZjqOk0paZmeEaCdr43+PjUD2mM22FSu19HsZbpKTwzr+ X-Received: by 2002:a05:622a:2514:b0:476:97d3:54f with SMTP id d75a77b69052e-47708375328mr9485001cf.14.1742333805673; Tue, 18 Mar 2025 14:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333805; cv=none; d=google.com; s=arc-20240605; b=j4aCOpWhFrnUJqn5HA6xdBFkqUoQixjfZ8xcuFF59OpYDSe9YvJhPY4BGWFV9FdUS6 Z3DT2jsj9YdAgV3/Qi6H7EcSeK2eZiZHtWDyFNLIj4UqzPzLa8NddcLzxXtfKPrLNn4y hY7ryeQck1Yt/wUQ1pq13rqMV9611G7ZC/r1xCVC1/GZYw6CraqEbH3eI35Ne/o+lJUq 3H9oK+3/u9EOT+KxYKzVABL65e+x2k4mTHd6MU/M4Gu8hkd0VB/VKd/CpZITdr5lCw5r OUNmwhdd4tu+FSP79piKSg83BdVVb305OVkq58wKj2ay1bLFCXAYcBpw9wI0A0O/TJrm DV3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TCoWmgPRVw8+vOgQ2VpvLXdyfprmS+31wGRDcwl1Zz8=; fh=X2BdofTg3ap7GqjRQQSx3DRQn8p5IaGehLtT9UQirp8=; b=Ir4ZL7VqI25ANRaSNJH7+mgEw8uD8uL2bXB3TpvNT/yQExhDh/cz2A/KTdECVWxaAN 6yNmcqpGVXIf9zwNQTQNnYL3r8EKcZcbNZABDUWU09NpCYQ6pJC7ITSmHoPvDuHRKzG3 HiFs2aa6iq/33R4oVwLWOBsJrPeizFWR5Af80OlBYoNvpoiGnuBAGQ6DbipB4yv+j6DK wghBTgvECTiznEbKcoQZU5RSeu5RMomqBQBIku9fMAuot5/LM0AHMCS3860I+93+6153 K4EGV8x6Hs2jvQ+VtZWOcO/zKDqs7VkZ3KEhwBta/JEtjvy1LnTgJrMwbVQHefKCwXvH 4uWg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ckjzLH+7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb856762si125596631cf.513.2025.03.18.14.36.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ckjzLH+7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueXu-0001EY-10; Tue, 18 Mar 2025 17:32:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXn-0001Du-73 for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:15 -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 1tueXl-0000ia-4n for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:14 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2260c91576aso49620925ad.3 for ; Tue, 18 Mar 2025 14:32:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333531; x=1742938331; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TCoWmgPRVw8+vOgQ2VpvLXdyfprmS+31wGRDcwl1Zz8=; b=ckjzLH+7aeZkIhbZ2cx7ew32JnLoMcXkW71RYmo/BF85Hx1dl8WirTC4v2041h914q fMslhdDEGzFqH8EbDcbr0N4ZgsF85cwNZo2pKZvu+9REMplJX9s4W2Oh3viz1/IIHSq+ HrHsUu/ADvH7WHG/csM6zh0GYGCDLqNOkzu8EPs/RhYzhaMsW/kiylRR9Au+eVG6NhxJ E2uKW9FtAU3643RxiAx7DX1f4qAm2ehPsY8K+VEjsfz5JUVlcRvFMUYgbiSj9/awXTXJ foW6H+itYoK2hkbvH83GU3RQiP4kF+SFRT2VhtHzKEGHaKCsc6o5JU30Gm41E10zNTRJ OSlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333531; x=1742938331; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TCoWmgPRVw8+vOgQ2VpvLXdyfprmS+31wGRDcwl1Zz8=; b=qMKYIo/xAqMz/yJdlggDTInkRgh3g3XX3j6WOXHY2ng0YfHRapqeSIspBpgymmFoYb lOS7laHUH+fURAzOwUmUXfnB979di7Yl4Ku/ZlZP/vJNMXpLFYDh4QL5rlGXWhdu99s3 FEy5jkSTaxkZ9w+vuw/XqDQAKqQdbJMVVOF49gsDMsonxalaK+aemOa4oXAwvEhYAlwE i6Bu7vjzNozzoKBq98mjetaIy70FLimUi4VGHMBwzdRWn9Yj5D8BeNKZrLXsl08FW+sy wB/8MVkLrq2AGcW4QNZc41yheZYlxTaDO2BDLeDNmZMzGKCojJTyS/cziNUzyT3Ita8U kFxA== X-Gm-Message-State: AOJu0YxPFHBAl9xO+8K9Vo33Xpb5xmPpU7YRqAC7ecChHKWtBGU7GFwr /QMEOlOjm2WuvSLhW2cS70QZp/nt2ajH/2qFJh/i5A6T6latuEPrVUs/mA5A66zwbh+lPJGNvyP 7 X-Gm-Gg: ASbGncsS+V6erWdToJAJItN/DdCt/zkg0mXGb3slRn0f3zSBDetI73iONx3veVAYlZ0 r5xuUsuHGi/new78btewnDTMaxHxmY/YrUH5QBiQviwn68aQErY7THtIbKcE/9ZLj9K8TNGvcS/ SoLF5WbSieFDTKaqvgUIqvO0DIFlYZQdMJQBiCb0bZdMNilnbAjvxcaE2ohVEW3RkEt9/Hj8Egw H+zd7twit3D7VXSed3tUsPEdC731tXv0zKpbrE2I7yUkBtvqQajRhwjEgaG7045CDx29W0O7KmB o93L9txpyOcUa7rJAwu+TJDiEqLAcRz3sPcIUFGrc89J5mvN7FNm53mOTRke8a38YlS9SJrSH0S X X-Received: by 2002:a05:6a21:692:b0:1f5:79c4:5da0 with SMTP id adf61e73a8af0-1fbecd36b70mr288549637.31.1742333531154; Tue, 18 Mar 2025 14:32:11 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org, =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= Subject: [PATCH v2 01/42] accel/tcg: Build user-exec-stub.c once Date: Tue, 18 Mar 2025 14:31:26 -0700 Message-ID: <20250318213209.2579218-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org CONFIG_USER_ONLY == !CONFIG_SYSTEM_ONLY. Therefore it's cleaner to just add to user_ss. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 38ff227eb0..14bf797fda 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -12,7 +12,6 @@ tcg_specific_ss.add(files( 'translator.c', )) tcg_specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c')) -tcg_specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_false: files('user-exec-stub.c')) if get_option('plugins') tcg_specific_ss.add(files('plugin-gen.c')) endif @@ -22,6 +21,10 @@ specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( 'cputlb.c', )) +user_ss.add(when: ['CONFIG_TCG'], if_true: files( + 'user-exec-stub.c', +)) + system_ss.add(when: ['CONFIG_TCG'], if_true: files( 'icount-common.c', 'monitor.c', From patchwork Tue Mar 18 21:31:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874423 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75855wru; Tue, 18 Mar 2025 14:34:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUfn8SBsazkGlCc6aN1peHIP1FBC4Nac4Scs9OVmGGBD4rba1mzJljLh69fWS0Wi6Bss7NlBw==@linaro.org X-Google-Smtp-Source: AGHT+IF0Ed/pSvDTk9hZu22pUAIX6/pyXUEFKYo95HKD/sn299wp4r+ndDXONyKLASrjrlS/83kk X-Received: by 2002:a05:622a:4205:b0:475:16db:b911 with SMTP id d75a77b69052e-477083a4fa3mr8920151cf.52.1742333666422; Tue, 18 Mar 2025 14:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333666; cv=none; d=google.com; s=arc-20240605; b=Mhq0do5GX762FaBNjAVnD+KUvepZd8gTSaUIvFo8w8riaIvxSvE9TJHQIejM/8vQkX 3/SYvSnfwUd5yneEZoleI3dDzQrFzJhTSne2CVtliYeZv7ichEahNr5eyb2PWKpJ+7dF ZqvocmRqNOSiyVzp2XscjRm0oFjJPdKnrXtOtX/8jkzdhmtIaMP5c2eHybGHdmemMl8h Demn/4X0AXSWPtJ7b1WlIrblSsGFCcG9JQx2NQ1g8vyxxTNEKVKtAs35ii/02EkO+gpI BfXcqai4iBRbNyvq4RlZs2WmfHpvvwLyUaZ2x079oh9JHtcQ40HxVRri45bU4lje/XXq BwCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jprqwHHwWojdGfQ1QgUvwGwX1dYcnH5RZgYMJfPxUv8=; fh=X2BdofTg3ap7GqjRQQSx3DRQn8p5IaGehLtT9UQirp8=; b=Dvjc7v6Zj73W1//4BSLwZP3fpvJCxlkY+CbO66UtXmY1EqPpDyR16DsRxT90MJWGVm HAdzPwI/gXlSWdNdR8UrsZZQAL3S/fpLUiq7tlJhw9BGcRuxq8s937cYiLsjLcdtZ2ma +j6Onvck/zEd3HjCoiQn0pgpXBP2iwCOVbY6Tc3Hd/1IJ6MUCj25UN/i/3iqLZc8axUY 4e7t0DIPX8l5HKgq6lrsIuM9baIb+VrONBnn/3Wp7W8qlb4YtpUByPd0RRKPRhxAHNsR ySpXinixupTcln+sAjnnT1O83GSg+uHCQsHuX3uS/wlTkGVq61ruA1uZT+ItcKH39+zc gRhA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d7gEwzjo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb882623si123569111cf.625.2025.03.18.14.34.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:34:26 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d7gEwzjo; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueXz-0001H6-V4; Tue, 18 Mar 2025 17:32:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXo-0001E7-4s for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:16 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXl-0000ij-DE for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:15 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-2255003f4c6so110619775ad.0 for ; Tue, 18 Mar 2025 14:32:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333532; x=1742938332; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jprqwHHwWojdGfQ1QgUvwGwX1dYcnH5RZgYMJfPxUv8=; b=d7gEwzjo1cC5IG1mJ/NCqtA9TjCE/8371QGLgp0An+SOvsq5HeB8FYTcfez/JkWi4R lycxqkkekN/+j+P7w3tpErpwjqa4M2OQhcxabXjO3pJY1xC3aVZIcodiFEfTxc5I80T6 v8oA8chnZGyWCt4n+5KvGN93SOq+sTNjiqAsQavc+vtdI8bGrj4optKj+7+JBicjwXKe UkwyYoqtTL5Pyg+2N/35crot0L7I1twJu3RIDAi/HYXqnwLN694gmaGuALOzlCxWUGIP jqm8yrFYhKYLjGXLHNd7QjT7ApT7zK+Z3e2rB/6EB7KFZ+fX+40i8ToLxuqqbZFRQrzB 7KyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333532; x=1742938332; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jprqwHHwWojdGfQ1QgUvwGwX1dYcnH5RZgYMJfPxUv8=; b=u6BtYajxvYWL2JVS2bM8QKPIkEsyAWIUHG7CPqETiFD2L1Xo6aHMoC/+leCJqGdbVy Wk9tpsbtuDZ1tRZ6cOa7O8rMpumP4025owaCGIDN+DvJJ8U7KSxuJ9V6m1Ej8IS5olXf o0IVFDEpvQYs6v3CVzSfuGVaZD+9UhyofTg/UYYCmNrTdMHpWi1bhP63BnlqB6A/LWxS ciahnRdP/MypDditPZ+iQH2D/U+QH8+V1PU13JisEKreF/BN+mRKd863cd8RRVS91Sj7 pM8pynfnnA0tmUH66Opu0GDBt/Kj9Ut3PM6EE9tKjBIddjdqLYAY6qPG9qZJc+DYfY40 EPAQ== X-Gm-Message-State: AOJu0YyvYh8f8lLEPweul2/qnK0nxWfIfW1ij3ZY6UrnxdgYmRIJOB9p AfK/IREoPGJ7S683HkOfNKvrVvfVqw6OlmDq0jwzDWucRVYN0Jl8mJ7R0+5BHYH3Pd4UTtntLuW q X-Gm-Gg: ASbGncuz/cUNuKNGhO57/Xy3MGfEuO9qr1OKHkbnEdxc44yUGvv0IA6gGym864qa4tT nOquOnLqn/fSYzXnMs/XjhsTE9baMccHi89sNaXEU2iUXI0n5XgKvJM65PieIEUaFcbBqfkTgsO 1DMgXySvkoDi2DpMfEtKr+BxsASs+ZTQDl3j709tNKNAxc5uXZEZsJKwICHHPJyKMdLo/rrW0I5 jMq5tOJaZA0UDBaVoGqI9GRvrfwYGghJnK/hHWnFEs0aL9Tp4q5Mczrwlxrx1sjKrU4B2X6A202 sD04z+3i2Jj2Xj/gINq06uGzdhW1lPmMERInQTnvm5DN4UrRXcunecKNIiryRjyTPSWjKLMKKq4 / X-Received: by 2002:a05:6a21:a44:b0:1f5:873b:3d32 with SMTP id adf61e73a8af0-1fbed503e74mr260397637.39.1742333531951; Tue, 18 Mar 2025 14:32:11 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org, =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= Subject: [PATCH v2 02/42] accel/tcg: Build plugin-gen.c once Date: Tue, 18 Mar 2025 14:31:27 -0700 Message-ID: <20250318213209.2579218-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We assert that env immediately follows CPUState in cpu-all.h. Change the offsetof expressions to be based on CPUState instead of ArchCPU. Reviewed-by: Alex Bennée Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 13 +++++-------- accel/tcg/meson.build | 7 ++++--- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 7e5f040bf7..c1da753894 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -22,13 +22,12 @@ #include "qemu/osdep.h" #include "qemu/plugin.h" #include "qemu/log.h" -#include "cpu.h" #include "tcg/tcg.h" #include "tcg/tcg-temp-internal.h" -#include "tcg/tcg-op.h" -#include "exec/exec-all.h" +#include "tcg/tcg-op-common.h" #include "exec/plugin-gen.h" #include "exec/translator.h" +#include "exec/translation-block.h" enum plugin_gen_from { PLUGIN_GEN_FROM_TB, @@ -89,15 +88,13 @@ static void gen_enable_mem_helper(struct qemu_plugin_tb *ptb, qemu_plugin_add_dyn_cb_arr(arr); tcg_gen_st_ptr(tcg_constant_ptr((intptr_t)arr), tcg_env, - offsetof(CPUState, neg.plugin_mem_cbs) - - offsetof(ArchCPU, env)); + offsetof(CPUState, neg.plugin_mem_cbs) - sizeof(CPUState)); } static void gen_disable_mem_helper(void) { tcg_gen_st_ptr(tcg_constant_ptr(0), tcg_env, - offsetof(CPUState, neg.plugin_mem_cbs) - - offsetof(ArchCPU, env)); + offsetof(CPUState, neg.plugin_mem_cbs) - sizeof(CPUState)); } static TCGv_i32 gen_cpu_index(void) @@ -113,7 +110,7 @@ static TCGv_i32 gen_cpu_index(void) } TCGv_i32 cpu_index = tcg_temp_ebb_new_i32(); tcg_gen_ld_i32(cpu_index, tcg_env, - -offsetof(ArchCPU, env) + offsetof(CPUState, cpu_index)); + offsetof(CPUState, cpu_index) - sizeof(CPUState)); return cpu_index; } diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 14bf797fda..185830d0f5 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -3,6 +3,10 @@ common_ss.add(when: 'CONFIG_TCG', if_true: files( 'tcg-runtime.c', 'tcg-runtime-gvec.c', )) +if get_option('plugins') + common_ss.add(when: 'CONFIG_TCG', if_true: files('plugin-gen.c')) +endif + tcg_specific_ss = ss.source_set() tcg_specific_ss.add(files( 'tcg-all.c', @@ -12,9 +16,6 @@ tcg_specific_ss.add(files( 'translator.c', )) tcg_specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c')) -if get_option('plugins') - tcg_specific_ss.add(files('plugin-gen.c')) -endif specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_specific_ss) specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( From patchwork Tue Mar 18 21:31:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874418 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75745wru; Tue, 18 Mar 2025 14:34:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW7S+qhqPUKmTJr6/r3KGAMJwbMuxAE4zfl1TYE83/F9jl6E8eJIlI5FSK7GQPnleDDIWZHng==@linaro.org X-Google-Smtp-Source: AGHT+IEr7LUJY6gpJ71199hCmkVnb9tLavqfJ5NP8znznfvnpuFopJdSC27w66U2go5Cf8CuNNGF X-Received: by 2002:a05:620a:1a81:b0:7c0:a9ee:e6c1 with SMTP id af79cd13be357-7c59b5e30edmr742315185a.7.1742333647935; Tue, 18 Mar 2025 14:34:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333647; cv=none; d=google.com; s=arc-20240605; b=es6v4zXaMzF53MIasl8/1mycdRBvUtiOke177aEtcw5z8EVTrg9BZVOLqKwpD3UCR0 /EVmXEstvv0IK3vgg7LY0O9CwuzI7BlMSG0l7lCzfeZZgiCzW9jAexRGYp2T40AlAGen nNyv4XLUeQWQfjS0lJDwv8rKNCsqILB5I7tGTT2T6rLxKO+D7i493nIBZEDlgCCiK0+F q2SQYJyMPu1KjC3U4FqFJFvum6lj8bTJvtitMs9rVWm/zr9YGkjERgMb/WzvvgyHnj10 38TuKZhD/oTV+1paa237GWUfbRJy7HOs7quu1jOheW1Me9plHqx1MeFvKiWKAqKMl/IM X/rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=lD9jDoC4IS62bMndhOtFSfLQLyZKi8PN0X3J0KsjhhM=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=DUR5V7mHvtNxClb5IAloGZka8ramH6+H8zMqImNbf9r/JQnfS58Yy9m2BmS5gJ6uDn rLXJM97bTORozq856Yf3bqr3KHqz+E+aICCbbCLW/gAoU2kTvTnrae7nIyrv3Yf0Pz1m 5vAfouGkcKDMAYp7kgUz+LQg89SNgwd0ROxNqOwbkD2HZCzNrsx6p7LB1sa4KuPTYWh8 dYet/pr8/bQy29shspFNoqb1b4J4pD9pE/rhW5a74uANxoEQpBywZqs4j+S7byNMPsh+ gCsNCv9xRANwWiqCnh6Gf/Vp9XITzxnZMas7ZhlJVCtCn9tw5e3Bshw3HxRqA+7HriWT qRRg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=onEdvnv9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb85be25si137047931cf.591.2025.03.18.14.34.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:34:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=onEdvnv9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueXy-0001GK-Rl; Tue, 18 Mar 2025 17:32:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXo-0001E9-AJ for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:16 -0400 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXm-0000is-6O for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:15 -0400 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-225df540edcso1782185ad.0 for ; Tue, 18 Mar 2025 14:32:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333532; x=1742938332; 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=lD9jDoC4IS62bMndhOtFSfLQLyZKi8PN0X3J0KsjhhM=; b=onEdvnv9hT40qAF9DPzfXMLFzwX4ZOmbH/y3Txx4i/UMlenpCSWZhYWwtCvX6V1ONc Fcn4CUEBRNvYt1LA0tjgeJJx9oQ9JK8W+G2T81a11XFNokjpeWIHW4ISDvaD0d4znQLg imubEInEu0zQLmDESkOMUZpP9GKv9X+EmqxmUhnVcGMHDqKltt8O/t9r5Zc3R3kRQkmI t0PY5smxUWR2geSI6Mf378xFuL1+9V/Qd0970Dv9pzr7KKm+WCh8dtGnzLhRKEs6sxr2 rV3pWGHmtwSxoRtcQUdkucIXftRV8j9d0qfIuTzzPJMXYA44w3NSIoERS5C8k2NMc/fn p0+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333532; x=1742938332; 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=lD9jDoC4IS62bMndhOtFSfLQLyZKi8PN0X3J0KsjhhM=; b=IDZCW57uZjYRXn3nj9geI6gtNjfuz9vLFLqZCY8wHKH6IfFKgoY2cM9yoIy87hbylj uSPIhaJE9ZvV+lSdpJiEPr+nUVWre2scYxP3Q1rSYNwlC8DN5NE0+nLkexLgRmTF9LAE JKDS0RFE4tSnJGoXvM9jk/HVr8rsDH2UU5VHbiSW/P2Py+ydThodTcRRvBpLwzUM6Yxk lLnhqosuLfjm3O6fihZWVyn1TlKvZ/CXS14Pwg5aaMso41gJGaqs7EZ6OmdmqyHIbrMW g6lOetQ5IEhX7R8+cjzn8wRG7oDG806S/0zNbVWjLTOHkcY33Et2yyVEHaH9CCMnJs4c 0gGg== X-Gm-Message-State: AOJu0Yw05erIPsd2CsGeyaUafjF7WamDIWhL8HiK5yAm9XXR3xyhVHmC tc09JtlWy7yQrXp4IyPwcT1ZsfupNmWhi+pxFEzMCCWrej7HZ7sQU67lPbtbgFQI4aX8C4vf38e o X-Gm-Gg: ASbGncuVXZ9IxThOw/NbdsvGFsY2nOy89CG9kts+YxehD1A5JHaC8KIDJFIP/czOBiY fRNXok6rhyaq3QwCLBS/0ZI9BVYF0IaX1meTLojCavg1ILtWP9YVXVNG7dOCdsCPDdOLK4d7VTp AU3+Mqw84QwcylGN2nsaZZjrY8Ds0q9CP20qVSaqjHTaYV3K1s2t7OmXguMSRLuqet8bkqbHgD/ WRpleeO7lFC254wMePjkncWvhDAh4/jc0QWuCv5Ek9VoIuXTIZ7enXYcjHUU602bE0Ng9xFXUiF WU144qpOd6/kXCMl/iwkCluGYA/I1t85q/zz2tiLjfqVhBDv/gyY1yiXj0U7wH3j4gFvKE9XGoj k X-Received: by 2002:a05:6a00:908d:b0:736:aea8:c9b7 with SMTP id d2e1a72fcca58-73757764898mr9108417b3a.2.1742333532522; Tue, 18 Mar 2025 14:32:12 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 03/42] accel/tcg: Fix cpu_ld*_code_mmu for user mode Date: Tue, 18 Mar 2025 14:31:28 -0700 Message-ID: <20250318213209.2579218-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62b; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These routines are buggy in multiple ways: - Use of target-endian loads, then a bswap that depends on the host endiannness. - A non-unwinding code load must set_helper_retaddr 1, which is magic within adjust_signal_pc. - cpu_ldq_code_mmu used MMU_DATA_LOAD The bugs are hidden because all current uses of cpu_ld*_code_mmu are from system mode. Fixes: 2899062614a ("accel/tcg: Add cpu_ld*_code_mmu") Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier Reviewed-by: Pierrick Bouvier --- accel/tcg/user-exec.c | 41 ++++------------------------------------- 1 file changed, 4 insertions(+), 37 deletions(-) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 2322181b15..629a1c9ce6 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -1257,58 +1257,25 @@ uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr ptr) uint8_t cpu_ldb_code_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) { - void *haddr; - uint8_t ret; - - haddr = cpu_mmu_lookup(env_cpu(env), addr, oi, ra, MMU_INST_FETCH); - ret = ldub_p(haddr); - clear_helper_retaddr(); - return ret; + return do_ld1_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } uint16_t cpu_ldw_code_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) { - void *haddr; - uint16_t ret; - - haddr = cpu_mmu_lookup(env_cpu(env), addr, oi, ra, MMU_INST_FETCH); - ret = lduw_p(haddr); - clear_helper_retaddr(); - if (get_memop(oi) & MO_BSWAP) { - ret = bswap16(ret); - } - return ret; + return do_ld2_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } uint32_t cpu_ldl_code_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) { - void *haddr; - uint32_t ret; - - haddr = cpu_mmu_lookup(env_cpu(env), addr, oi, ra, MMU_INST_FETCH); - ret = ldl_p(haddr); - clear_helper_retaddr(); - if (get_memop(oi) & MO_BSWAP) { - ret = bswap32(ret); - } - return ret; + return do_ld4_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } uint64_t cpu_ldq_code_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) { - void *haddr; - uint64_t ret; - - haddr = cpu_mmu_lookup(env_cpu(env), addr, oi, ra, MMU_DATA_LOAD); - ret = ldq_p(haddr); - clear_helper_retaddr(); - if (get_memop(oi) & MO_BSWAP) { - ret = bswap64(ret); - } - return ret; + return do_ld8_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } #include "ldst_common.c.inc" From patchwork Tue Mar 18 21:31:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874414 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75349wru; Tue, 18 Mar 2025 14:33:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU2u8b32e7duqdGjVLlxAtFSGqVatXXp7c9XC5vA2AAckbVdbG2L7ci8VIE1p6IQIpZ+ZqwgQ==@linaro.org X-Google-Smtp-Source: AGHT+IEBRSY+R7arYLT07I+8e+r1GsSzSOF3z2BYx26+Wygdz5ip0MCwe8PQCFrRiA0FAANiGjqt X-Received: by 2002:a05:622a:248a:b0:476:9e82:6515 with SMTP id d75a77b69052e-47708314e0fmr9452751cf.23.1742333584325; Tue, 18 Mar 2025 14:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333584; cv=none; d=google.com; s=arc-20240605; b=ZoM7mOeioED5zHAQF5TcCFQpqhEZq4Tqjlrz4OXEqT5lzBAI1OBZ8v5yDOtWcCQaSV xy9hvr2RlAZm0BhsXEeQ1jgj58HF8wt1Sh5wsuCyZyoL/iCwh6bVYlahYxmHL3/hS4vm 1xmdHRLH5lq6b82c6r1T8P2mBhaezb2FmJQ1ekHCGRsh7cpnqkBOWMAKt3dctggRkgWt ncRLMwv9DAm/buTFQTVF47UXNdHDVQy1YtX1hfL0byEvYitLhSNvbAUtlUkkDWW/JWSu P01To4zwvjcTD6beMcvzLd78OZp16weiBB687/QyPK+HR4UptOrBMlguyT10poAdMu1P VEwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2/SnGbiJXxdcdsQzFocCM8W+C/HoHgmlhXBwGvsNJIU=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=CrWstZCz2lo3dw4rzPlmHL1XD/dYK+z+oQCM9JEXx1UnIH9x3cPw3TBHbBZQlfklue jl76+Ys0pjNjfK8aO40ZYSNhHMkKmjUgLbrvefkSH/aFxgxlp4ttD4Og+EyV5mUgIzaa z8W796ExF7iq/BUL/XEsEvoGiL6jC+I0KrpVK0RsQYpV5oJWJVOPKjcNj0ziT534RHWv jlT2x8po1wGKEtgpTSGsVpOeO/9BzyxWaerZu7Qok9IpMx8weGYob/sdIWL6nS4Oj6Ls xkAJZOwiDqCv4WmvAFdQbfAD01mkHRbJR2ryF3ZzOaVpPjWcvd3ecZ9xFK57CRoYDkl/ tqJA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YtL14j50; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb7e1cbasi122683381cf.265.2025.03.18.14.33.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:33:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YtL14j50; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueY3-0001Ij-HN; Tue, 18 Mar 2025 17:32:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXq-0001Ei-Kn for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:20 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXn-0000j7-Qh for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:18 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-224019ad9edso4652635ad.1 for ; Tue, 18 Mar 2025 14:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333533; x=1742938333; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2/SnGbiJXxdcdsQzFocCM8W+C/HoHgmlhXBwGvsNJIU=; b=YtL14j50ljH94QUeNR72+WRSIl7/ybWGj/axI+KwD5N2cnD8+cQXgzp9LUQ3CY3RcF 2zVgePGRht+45xxvbDvCHSYdFoYnFI2O7FNzc0Qh4c7LOF0FWpyfJFoyXAMr5C/NI7Ud BidMji6oS03mq/n56YXJHEv1eA30kR4xyGypzQ6kKTGoqKD9Ml7sY+o95G1mIIyFjmGM SkdcfjVDUesz4aOBedc9bDImcKLo2KP78kfy0T+8x9L9wxxAKwewHXc3rbzDf5IuMZ0G PM4eEnQLnswkNe9NcTyiZI8WXVaNOWj2SRvF5QVTsSPZJNKg7146Qq2SecjdRtmfdsEw k70A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333533; x=1742938333; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2/SnGbiJXxdcdsQzFocCM8W+C/HoHgmlhXBwGvsNJIU=; b=H2WZvavH0zozEU1jpDk/G0rpMnp/nZle6e5vE2+2CTVIlAt1WU2fUzE8oFFWlWcRiL Lsz6E/zYrkz41hmnmLOk9tan/1c3IsEG0TGTi8vPFe4sb9B7rcTYHD9zD3rZUB6Rqckg lxTPWKbEFGwPr5EluFatXcex7Y4xcGZMArsItx0vhAfsinYQSmyqbieJc7xkSPc6LR75 xtFm6m/ui/UpRbCB3oXA3Z2r8OXbitQLafnyBCZrDnfJzHV63fdW2rps7IcaUsCW5QSL 2AmotOXU43qeGdAoeLHONaoWeOZy8Z6+W3io7EVSYrp146cr2ujaArZ980Opw3d5sDRJ D0NA== X-Gm-Message-State: AOJu0YyLvBkMaTO4xvpvdHo2GmlsrGFYs52ny8xL5Lux+5vYin3Pc/pb JIppPvlUUiecuco7deWomYsi4l1mjfU24Bc2Ol9C848aJr25QotHx0w+MT2NIOOES6CtHiV6DeH 6 X-Gm-Gg: ASbGncutrPdcrsmtV467QD+RdrJ4H8goBHVvC6HEXOixasSt7ToInvXG0LJ5KVSWTDJ WyxfOBdSrm1sj0pg4F4duqbyD94+Dy8YDr4ktGqwGtR+vPLrfU1wZ3iIaJRNXKdJa83VCEzmw2q OHXTkQ3ueCbJq7Drzo9ohIaHBrZlq8GcNfZ3DVJrZg0RTfvzBJ72Jr/YqmAH5gS5pD8hMd99s4C QFHaQ6VWgpPZ3OtI1YrLWT1NjuCJG4jfseLVk72nI+g/xRZxf5NPV20YNlxm7It5gtUY2XYTcsA 2YTNL3Udj3YhX7ef5KgqZq+GdFIjAt3lrbMoapLE9fRaA0wfR7yxyg5mdejr+4/RQb0Er2D3BF2 x X-Received: by 2002:a05:6a21:62c2:b0:1f5:80eb:8481 with SMTP id adf61e73a8af0-1fbeb7a2128mr362799637.13.1742333533206; Tue, 18 Mar 2025 14:32:13 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 04/42] include/exec: Use vaddr for *_mmu guest memory access routines Date: Tue, 18 Mar 2025 14:31:29 -0700 Message-ID: <20250318213209.2579218-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Use vaddr only for the newest api, because it has the least number of uses and therefore is the easiest to audit. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 16 ++++++------- include/exec/cpu_ldst.h | 48 ++++++++++++++++++------------------- accel/tcg/cputlb.c | 8 +++---- accel/tcg/user-exec.c | 8 +++---- accel/tcg/ldst_common.c.inc | 20 ++++++++-------- 5 files changed, 50 insertions(+), 50 deletions(-) diff --git a/accel/tcg/atomic_template.h b/accel/tcg/atomic_template.h index 89593b2502..08a475c10c 100644 --- a/accel/tcg/atomic_template.h +++ b/accel/tcg/atomic_template.h @@ -77,7 +77,7 @@ # define END _le #endif -ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, abi_ptr addr, +ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, vaddr addr, ABI_TYPE cmpv, ABI_TYPE newv, MemOpIdx oi, uintptr_t retaddr) { @@ -101,7 +101,7 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, abi_ptr addr, } #if DATA_SIZE < 16 -ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, abi_ptr addr, ABI_TYPE val, +ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, vaddr addr, ABI_TYPE val, MemOpIdx oi, uintptr_t retaddr) { DATA_TYPE *haddr = atomic_mmu_lookup(env_cpu(env), addr, oi, @@ -120,7 +120,7 @@ ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, abi_ptr addr, ABI_TYPE val, } #define GEN_ATOMIC_HELPER(X) \ -ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, abi_ptr addr, \ +ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, vaddr addr, \ ABI_TYPE val, MemOpIdx oi, uintptr_t retaddr) \ { \ DATA_TYPE *haddr, ret; \ @@ -156,7 +156,7 @@ GEN_ATOMIC_HELPER(xor_fetch) * of CF_PARALLEL's value, we'll trace just a read and a write. */ #define GEN_ATOMIC_HELPER_FN(X, FN, XDATA_TYPE, RET) \ -ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, abi_ptr addr, \ +ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, vaddr addr, \ ABI_TYPE xval, MemOpIdx oi, uintptr_t retaddr) \ { \ XDATA_TYPE *haddr, cmp, old, new, val = xval; \ @@ -202,7 +202,7 @@ GEN_ATOMIC_HELPER_FN(umax_fetch, MAX, DATA_TYPE, new) # define END _be #endif -ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, abi_ptr addr, +ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, vaddr addr, ABI_TYPE cmpv, ABI_TYPE newv, MemOpIdx oi, uintptr_t retaddr) { @@ -226,7 +226,7 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, abi_ptr addr, } #if DATA_SIZE < 16 -ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, abi_ptr addr, ABI_TYPE val, +ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, vaddr addr, ABI_TYPE val, MemOpIdx oi, uintptr_t retaddr) { DATA_TYPE *haddr = atomic_mmu_lookup(env_cpu(env), addr, oi, @@ -245,7 +245,7 @@ ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, abi_ptr addr, ABI_TYPE val, } #define GEN_ATOMIC_HELPER(X) \ -ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, abi_ptr addr, \ +ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, vaddr addr, \ ABI_TYPE val, MemOpIdx oi, uintptr_t retaddr) \ { \ DATA_TYPE *haddr, ret; \ @@ -278,7 +278,7 @@ GEN_ATOMIC_HELPER(xor_fetch) * of CF_PARALLEL's value, we'll trace just a read and a write. */ #define GEN_ATOMIC_HELPER_FN(X, FN, XDATA_TYPE, RET) \ -ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, abi_ptr addr, \ +ABI_TYPE ATOMIC_NAME(X)(CPUArchState *env, vaddr addr, \ ABI_TYPE xval, MemOpIdx oi, uintptr_t retaddr) \ { \ XDATA_TYPE *haddr, ldo, ldn, old, new, val = xval; \ diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 769e9fc440..ddd8e0cf48 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -157,48 +157,48 @@ void cpu_stl_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, void cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint64_t val, int mmu_idx, uintptr_t ra); -uint8_t cpu_ldb_mmu(CPUArchState *env, abi_ptr ptr, MemOpIdx oi, uintptr_t ra); -uint16_t cpu_ldw_mmu(CPUArchState *env, abi_ptr ptr, MemOpIdx oi, uintptr_t ra); -uint32_t cpu_ldl_mmu(CPUArchState *env, abi_ptr ptr, MemOpIdx oi, uintptr_t ra); -uint64_t cpu_ldq_mmu(CPUArchState *env, abi_ptr ptr, MemOpIdx oi, uintptr_t ra); -Int128 cpu_ld16_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra); +uint8_t cpu_ldb_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint16_t cpu_ldw_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint32_t cpu_ldl_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint64_t cpu_ldq_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +Int128 cpu_ld16_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); -void cpu_stb_mmu(CPUArchState *env, abi_ptr ptr, uint8_t val, +void cpu_stb_mmu(CPUArchState *env, vaddr ptr, uint8_t val, MemOpIdx oi, uintptr_t ra); -void cpu_stw_mmu(CPUArchState *env, abi_ptr ptr, uint16_t val, +void cpu_stw_mmu(CPUArchState *env, vaddr ptr, uint16_t val, MemOpIdx oi, uintptr_t ra); -void cpu_stl_mmu(CPUArchState *env, abi_ptr ptr, uint32_t val, +void cpu_stl_mmu(CPUArchState *env, vaddr ptr, uint32_t val, MemOpIdx oi, uintptr_t ra); -void cpu_stq_mmu(CPUArchState *env, abi_ptr ptr, uint64_t val, +void cpu_stq_mmu(CPUArchState *env, vaddr ptr, uint64_t val, MemOpIdx oi, uintptr_t ra); -void cpu_st16_mmu(CPUArchState *env, abi_ptr addr, Int128 val, +void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, MemOpIdx oi, uintptr_t ra); -uint32_t cpu_atomic_cmpxchgb_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_atomic_cmpxchgb_mmu(CPUArchState *env, vaddr addr, uint32_t cmpv, uint32_t newv, MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgw_le_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_atomic_cmpxchgw_le_mmu(CPUArchState *env, vaddr addr, uint32_t cmpv, uint32_t newv, MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgl_le_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_atomic_cmpxchgl_le_mmu(CPUArchState *env, vaddr addr, uint32_t cmpv, uint32_t newv, MemOpIdx oi, uintptr_t retaddr); -uint64_t cpu_atomic_cmpxchgq_le_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_atomic_cmpxchgq_le_mmu(CPUArchState *env, vaddr addr, uint64_t cmpv, uint64_t newv, MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgw_be_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_atomic_cmpxchgw_be_mmu(CPUArchState *env, vaddr addr, uint32_t cmpv, uint32_t newv, MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgl_be_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_atomic_cmpxchgl_be_mmu(CPUArchState *env, vaddr addr, uint32_t cmpv, uint32_t newv, MemOpIdx oi, uintptr_t retaddr); -uint64_t cpu_atomic_cmpxchgq_be_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_atomic_cmpxchgq_be_mmu(CPUArchState *env, vaddr addr, uint64_t cmpv, uint64_t newv, MemOpIdx oi, uintptr_t retaddr); #define GEN_ATOMIC_HELPER(NAME, TYPE, SUFFIX) \ TYPE cpu_atomic_ ## NAME ## SUFFIX ## _mmu \ - (CPUArchState *env, abi_ptr addr, TYPE val, \ + (CPUArchState *env, vaddr addr, TYPE val, \ MemOpIdx oi, uintptr_t retaddr); #ifdef CONFIG_ATOMIC64 @@ -244,10 +244,10 @@ GEN_ATOMIC_HELPER_ALL(xchg) #undef GEN_ATOMIC_HELPER_ALL #undef GEN_ATOMIC_HELPER -Int128 cpu_atomic_cmpxchgo_le_mmu(CPUArchState *env, abi_ptr addr, +Int128 cpu_atomic_cmpxchgo_le_mmu(CPUArchState *env, vaddr addr, Int128 cmpv, Int128 newv, MemOpIdx oi, uintptr_t retaddr); -Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, abi_ptr addr, +Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, vaddr addr, Int128 cmpv, Int128 newv, MemOpIdx oi, uintptr_t retaddr); @@ -297,13 +297,13 @@ Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, abi_ptr addr, # define cpu_stq_mmuidx_ra cpu_stq_le_mmuidx_ra #endif -uint8_t cpu_ldb_code_mmu(CPUArchState *env, abi_ptr addr, +uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); -uint16_t cpu_ldw_code_mmu(CPUArchState *env, abi_ptr addr, +uint16_t cpu_ldw_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); -uint32_t cpu_ldl_code_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_ldl_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); -uint64_t cpu_ldq_code_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr); diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index fb22048876..b03998f926 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -2925,25 +2925,25 @@ uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr) return do_ld8_mmu(cs, addr, oi, 0, MMU_INST_FETCH); } -uint8_t cpu_ldb_code_mmu(CPUArchState *env, abi_ptr addr, +uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t retaddr) { return do_ld1_mmu(env_cpu(env), addr, oi, retaddr, MMU_INST_FETCH); } -uint16_t cpu_ldw_code_mmu(CPUArchState *env, abi_ptr addr, +uint16_t cpu_ldw_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t retaddr) { return do_ld2_mmu(env_cpu(env), addr, oi, retaddr, MMU_INST_FETCH); } -uint32_t cpu_ldl_code_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_ldl_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t retaddr) { return do_ld4_mmu(env_cpu(env), addr, oi, retaddr, MMU_INST_FETCH); } -uint64_t cpu_ldq_code_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t retaddr) { return do_ld8_mmu(env_cpu(env), addr, oi, retaddr, MMU_INST_FETCH); diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 629a1c9ce6..dec17435c5 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -1254,25 +1254,25 @@ uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr ptr) return ret; } -uint8_t cpu_ldb_code_mmu(CPUArchState *env, abi_ptr addr, +uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { return do_ld1_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } -uint16_t cpu_ldw_code_mmu(CPUArchState *env, abi_ptr addr, +uint16_t cpu_ldw_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { return do_ld2_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } -uint32_t cpu_ldl_code_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_ldl_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { return do_ld4_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); } -uint64_t cpu_ldq_code_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { return do_ld8_mmu(env_cpu(env), addr, oi, ra ? ra : 1, MMU_INST_FETCH); diff --git a/accel/tcg/ldst_common.c.inc b/accel/tcg/ldst_common.c.inc index ebbf380d76..0447c0bb92 100644 --- a/accel/tcg/ldst_common.c.inc +++ b/accel/tcg/ldst_common.c.inc @@ -135,7 +135,7 @@ static void plugin_load_cb(CPUArchState *env, abi_ptr addr, } } -uint8_t cpu_ldb_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) +uint8_t cpu_ldb_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { uint8_t ret; @@ -145,7 +145,7 @@ uint8_t cpu_ldb_mmu(CPUArchState *env, abi_ptr addr, MemOpIdx oi, uintptr_t ra) return ret; } -uint16_t cpu_ldw_mmu(CPUArchState *env, abi_ptr addr, +uint16_t cpu_ldw_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { uint16_t ret; @@ -156,7 +156,7 @@ uint16_t cpu_ldw_mmu(CPUArchState *env, abi_ptr addr, return ret; } -uint32_t cpu_ldl_mmu(CPUArchState *env, abi_ptr addr, +uint32_t cpu_ldl_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { uint32_t ret; @@ -167,7 +167,7 @@ uint32_t cpu_ldl_mmu(CPUArchState *env, abi_ptr addr, return ret; } -uint64_t cpu_ldq_mmu(CPUArchState *env, abi_ptr addr, +uint64_t cpu_ldq_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { uint64_t ret; @@ -178,7 +178,7 @@ uint64_t cpu_ldq_mmu(CPUArchState *env, abi_ptr addr, return ret; } -Int128 cpu_ld16_mmu(CPUArchState *env, abi_ptr addr, +Int128 cpu_ld16_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { Int128 ret; @@ -205,14 +205,14 @@ static void plugin_store_cb(CPUArchState *env, abi_ptr addr, } } -void cpu_stb_mmu(CPUArchState *env, abi_ptr addr, uint8_t val, +void cpu_stb_mmu(CPUArchState *env, vaddr addr, uint8_t val, MemOpIdx oi, uintptr_t retaddr) { helper_stb_mmu(env, addr, val, oi, retaddr); plugin_store_cb(env, addr, val, 0, oi); } -void cpu_stw_mmu(CPUArchState *env, abi_ptr addr, uint16_t val, +void cpu_stw_mmu(CPUArchState *env, vaddr addr, uint16_t val, MemOpIdx oi, uintptr_t retaddr) { tcg_debug_assert((get_memop(oi) & MO_SIZE) == MO_16); @@ -220,7 +220,7 @@ void cpu_stw_mmu(CPUArchState *env, abi_ptr addr, uint16_t val, plugin_store_cb(env, addr, val, 0, oi); } -void cpu_stl_mmu(CPUArchState *env, abi_ptr addr, uint32_t val, +void cpu_stl_mmu(CPUArchState *env, vaddr addr, uint32_t val, MemOpIdx oi, uintptr_t retaddr) { tcg_debug_assert((get_memop(oi) & MO_SIZE) == MO_32); @@ -228,7 +228,7 @@ void cpu_stl_mmu(CPUArchState *env, abi_ptr addr, uint32_t val, plugin_store_cb(env, addr, val, 0, oi); } -void cpu_stq_mmu(CPUArchState *env, abi_ptr addr, uint64_t val, +void cpu_stq_mmu(CPUArchState *env, vaddr addr, uint64_t val, MemOpIdx oi, uintptr_t retaddr) { tcg_debug_assert((get_memop(oi) & MO_SIZE) == MO_64); @@ -236,7 +236,7 @@ void cpu_stq_mmu(CPUArchState *env, abi_ptr addr, uint64_t val, plugin_store_cb(env, addr, val, 0, oi); } -void cpu_st16_mmu(CPUArchState *env, abi_ptr addr, Int128 val, +void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, MemOpIdx oi, uintptr_t retaddr) { tcg_debug_assert((get_memop(oi) & MO_SIZE) == MO_128); From patchwork Tue Mar 18 21:31:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874424 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75939wru; Tue, 18 Mar 2025 14:34:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW7IvymWIfzxcfM5BSNI6QyUMtAmnPGR81wEk7+7F/NxxcD9jNPtYg50yx6Z/zRu8tR0b2Xpw==@linaro.org X-Google-Smtp-Source: AGHT+IFNDwMPctIKgRPADZYldi9PyOMiXGj/V6MloERO/FzJHFFt4Z32e69oCB3PLHJ6zRC/qVK6 X-Received: by 2002:a05:6214:2426:b0:6e6:6c7c:984a with SMTP id 6a1803df08f44-6eb293dd38dmr4709866d6.29.1742333682999; Tue, 18 Mar 2025 14:34:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333682; cv=none; d=google.com; s=arc-20240605; b=TREYTcWRukFto2Fh0RqBhmL6J3jW8QUmODeSioZDLJuuBxV8ZuWo3sDBYws5d4jV2v HEShDHLn+nlofp1nYt8LBx5QZFWa1KOrX6MhfhBtrzUpszpqnW+96qmKsTjc3nunxFps rGhzILK8y2g2fMGxo13x/nJID1b2jamc38tK0UhAW9qdbVGCgi6lwa/dWclrqhfQq0SY RGKBRZZz4jE7wwUC05zxLaGYeTk9RFx6mouTLO9Ka1jgO9skGFT9WGrZ3+WQfJ+hVES5 7Y/FMrRLcIlRZVXceMTxZMYDKkyZU0rbbetYprDa+pY/GjNmcX0HGA02F2vNwKitKWx1 oKLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Eyx3jHfuOzS1kFXjXoFUhMf/lfjFavDcf4Lxs2+4npE=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=ULx4k/Trfq028UQIVxmi5cZzjGqObB0nIuYWMrvOXJ9TolYNwgIo7jeWhRyQx1zmuk OT3eUHn5krOtKMyzL4P+psvEILMHhnWmLp0gud8IL1MiEn7vcb5Cxf52iGp7h53Kf5Fg VQU7OjzIFehWuF2u5sNLtds53zUEnEVhTnwG3ZNONe0DjI/kAaGrJYpBFClL4mPpJQky cgamidfNcE0F/X36EkEIrDC+FrjpMP6IQiHoPsn5EDN7m0rmOilBZPLg8NU/KRG5CMhA Ufd3bUxR+3MYwbV6NgGexA0DTmNpC8BopLNdPGBHBEaQOLMgNofI02Si18b7uUyF0zP7 2Jng==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="euBcB0/q"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6eade35509fsi124566166d6.301.2025.03.18.14.34.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:34:42 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="euBcB0/q"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueYE-0001Ou-BS; Tue, 18 Mar 2025 17:32: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 1tueXq-0001Ec-8f for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:20 -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 1tueXn-0000j5-OA for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:17 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-22580c9ee0aso107398965ad.2 for ; Tue, 18 Mar 2025 14:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333534; x=1742938334; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Eyx3jHfuOzS1kFXjXoFUhMf/lfjFavDcf4Lxs2+4npE=; b=euBcB0/qWLne5ZQ+AS9GyqwXA8+BdoYcsS9H5FZhBJC2HQRvj6g7LPfETqh5+wm+9S xTuLzXW4JOymDFV/0AZqjUU8rHT0viP9PV//1Zbv2C0MCzFHOxn59NH3urBz8dEw2hdF 1ervzxjTtGUh+10iFQs3VPJEgZmmdAmHFSzswFz6RixzmMy0qjzlNCYZ/RfxwKDwMiR1 rztip4+ntmElViQswZByEQ5t6pkgVq9+3XLo8noVCoaC4W6hbapnk1Mx0+QqsGsO/B2G CpItpWnu87tEGcwjZjytdZ3nk48fIonbyq8BBbEu/J42v27rr9lG0+5v5fAzZSSk/raw zTuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333534; x=1742938334; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Eyx3jHfuOzS1kFXjXoFUhMf/lfjFavDcf4Lxs2+4npE=; b=tQwZ52uN34REfxS69uh2jerKShMLALIrmgzoStX2Ime/tKcfgEe9EwE6WfNPuktJMh WD4btKomQzVT6ILzN5KOLjUAknn4zHYeM9ZifnBSf7AFfyYjgqAN4rf7FxG4aan9F0oq y5r4TMapb2hUeFzEZz0M/eNcqIE6NiFRGFbM6IdJtSBeHcqlHs0AyTe/0tddZfLdlcUK 4NEjHaKNW9BsW8yUKjLKn4qvAV/GuAhFruh89NAcVKEbmJlvCNT0gdke4i2y2gQv4kW4 AeYqJNuKeFn+bp6WHTe9SyzaFNeiOpO/RoYD9AVjobmF1mu9lchyHr++qczzbls/zqa3 +JRw== X-Gm-Message-State: AOJu0YwvaPK2lFWvFierpOtm8vP+13810tePaWy+E0TjOPX2CGgfFfZi O1rxI2oV+4kdCQJDUmuQeOElbMz3/DVUXE57zFTHngUn0EaRJe6Pdo2vf1PUylN2Ix1ATd5OLFY t X-Gm-Gg: ASbGnctEnxD8c+XsKA4SKFEYvL9OApymD2DuWn1l5GtuGIagTcNpaWGnJR9k2lSAIQS m+/Ikhdwb9lS46vhC4ANccvblfmlluY3aKBiyPOFT0v5GPULsReJ225U3SVMnXsx9IZl2d2Hdmj hsIzmm4feJ1b4TThshXmAAg9a/P0c50GHqOZPsqn+sUyGOXqtnZlvSox6V98IyshXSXM9U5xyh9 QX1RrEl/XcBC5gpmGODPNb9F8AZZJLQbdL+o54YAC0VgA4lI3SGt3QWY4oGuRJtXgCTwWuO/IQL a1wzFdj/s5UbaKADrL/OnNtSBuzU5w+9168VajjTaWeLFV/rC4hZBSmmYlrPR5jo1Cn9yhNa1EJ Y X-Received: by 2002:a05:6a00:2350:b0:736:53c5:33ba with SMTP id d2e1a72fcca58-7376d6f2168mr431654b3a.16.1742333533985; Tue, 18 Mar 2025 14:32:13 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 05/42] include/exec: Split out cpu-ldst-common.h Date: Tue, 18 Mar 2025 14:31:30 -0700 Message-ID: <20250318213209.2579218-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Split out the *_mmu api, which no longer uses target specific argument types. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu-ldst-common.h | 122 +++++++++++++++++++++++++++++++++ include/exec/cpu_ldst.h | 108 +---------------------------- 2 files changed, 123 insertions(+), 107 deletions(-) create mode 100644 include/exec/cpu-ldst-common.h diff --git a/include/exec/cpu-ldst-common.h b/include/exec/cpu-ldst-common.h new file mode 100644 index 0000000000..c46a6ade5d --- /dev/null +++ b/include/exec/cpu-ldst-common.h @@ -0,0 +1,122 @@ +/* + * Software MMU support + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef CPU_LDST_COMMON_H +#define CPU_LDST_COMMON_H + +#ifndef CONFIG_TCG +#error Can only include this header with TCG +#endif + +#include "exec/memopidx.h" +#include "exec/vaddr.h" +#include "exec/mmu-access-type.h" +#include "qemu/int128.h" + +uint8_t cpu_ldb_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint16_t cpu_ldw_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint32_t cpu_ldl_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +uint64_t cpu_ldq_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); +Int128 cpu_ld16_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); + +void cpu_stb_mmu(CPUArchState *env, vaddr ptr, uint8_t val, + MemOpIdx oi, uintptr_t ra); +void cpu_stw_mmu(CPUArchState *env, vaddr ptr, uint16_t val, + MemOpIdx oi, uintptr_t ra); +void cpu_stl_mmu(CPUArchState *env, vaddr ptr, uint32_t val, + MemOpIdx oi, uintptr_t ra); +void cpu_stq_mmu(CPUArchState *env, vaddr ptr, uint64_t val, + MemOpIdx oi, uintptr_t ra); +void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, + MemOpIdx oi, uintptr_t ra); + +uint32_t cpu_atomic_cmpxchgb_mmu(CPUArchState *env, vaddr addr, + uint32_t cmpv, uint32_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint32_t cpu_atomic_cmpxchgw_le_mmu(CPUArchState *env, vaddr addr, + uint32_t cmpv, uint32_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint32_t cpu_atomic_cmpxchgl_le_mmu(CPUArchState *env, vaddr addr, + uint32_t cmpv, uint32_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint64_t cpu_atomic_cmpxchgq_le_mmu(CPUArchState *env, vaddr addr, + uint64_t cmpv, uint64_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint32_t cpu_atomic_cmpxchgw_be_mmu(CPUArchState *env, vaddr addr, + uint32_t cmpv, uint32_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint32_t cpu_atomic_cmpxchgl_be_mmu(CPUArchState *env, vaddr addr, + uint32_t cmpv, uint32_t newv, + MemOpIdx oi, uintptr_t retaddr); +uint64_t cpu_atomic_cmpxchgq_be_mmu(CPUArchState *env, vaddr addr, + uint64_t cmpv, uint64_t newv, + MemOpIdx oi, uintptr_t retaddr); + +#define GEN_ATOMIC_HELPER(NAME, TYPE, SUFFIX) \ +TYPE cpu_atomic_ ## NAME ## SUFFIX ## _mmu \ + (CPUArchState *env, vaddr addr, TYPE val, \ + MemOpIdx oi, uintptr_t retaddr); + +#ifdef CONFIG_ATOMIC64 +#define GEN_ATOMIC_HELPER_ALL(NAME) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, b) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, w_le) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, w_be) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, l_le) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, l_be) \ + GEN_ATOMIC_HELPER(NAME, uint64_t, q_le) \ + GEN_ATOMIC_HELPER(NAME, uint64_t, q_be) +#else +#define GEN_ATOMIC_HELPER_ALL(NAME) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, b) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, w_le) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, w_be) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, l_le) \ + GEN_ATOMIC_HELPER(NAME, uint32_t, l_be) +#endif + +GEN_ATOMIC_HELPER_ALL(fetch_add) +GEN_ATOMIC_HELPER_ALL(fetch_sub) +GEN_ATOMIC_HELPER_ALL(fetch_and) +GEN_ATOMIC_HELPER_ALL(fetch_or) +GEN_ATOMIC_HELPER_ALL(fetch_xor) +GEN_ATOMIC_HELPER_ALL(fetch_smin) +GEN_ATOMIC_HELPER_ALL(fetch_umin) +GEN_ATOMIC_HELPER_ALL(fetch_smax) +GEN_ATOMIC_HELPER_ALL(fetch_umax) + +GEN_ATOMIC_HELPER_ALL(add_fetch) +GEN_ATOMIC_HELPER_ALL(sub_fetch) +GEN_ATOMIC_HELPER_ALL(and_fetch) +GEN_ATOMIC_HELPER_ALL(or_fetch) +GEN_ATOMIC_HELPER_ALL(xor_fetch) +GEN_ATOMIC_HELPER_ALL(smin_fetch) +GEN_ATOMIC_HELPER_ALL(umin_fetch) +GEN_ATOMIC_HELPER_ALL(smax_fetch) +GEN_ATOMIC_HELPER_ALL(umax_fetch) + +GEN_ATOMIC_HELPER_ALL(xchg) + +#undef GEN_ATOMIC_HELPER_ALL +#undef GEN_ATOMIC_HELPER + +Int128 cpu_atomic_cmpxchgo_le_mmu(CPUArchState *env, vaddr addr, + Int128 cmpv, Int128 newv, + MemOpIdx oi, uintptr_t retaddr); +Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, vaddr addr, + Int128 cmpv, Int128 newv, + MemOpIdx oi, uintptr_t retaddr); + +uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, + MemOpIdx oi, uintptr_t ra); +uint16_t cpu_ldw_code_mmu(CPUArchState *env, vaddr addr, + MemOpIdx oi, uintptr_t ra); +uint32_t cpu_ldl_code_mmu(CPUArchState *env, vaddr addr, + MemOpIdx oi, uintptr_t ra); +uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr, + MemOpIdx oi, uintptr_t ra); + +#endif /* CPU_LDST_COMMON_H */ diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index ddd8e0cf48..1fbdbe59ae 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -66,11 +66,8 @@ #error Can only include this header with TCG #endif -#include "exec/memopidx.h" -#include "exec/vaddr.h" +#include "exec/cpu-ldst-common.h" #include "exec/abi_ptr.h" -#include "exec/mmu-access-type.h" -#include "qemu/int128.h" #if defined(CONFIG_USER_ONLY) #include "user/guest-host.h" @@ -157,100 +154,6 @@ void cpu_stl_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, void cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint64_t val, int mmu_idx, uintptr_t ra); -uint8_t cpu_ldb_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); -uint16_t cpu_ldw_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); -uint32_t cpu_ldl_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); -uint64_t cpu_ldq_mmu(CPUArchState *env, vaddr ptr, MemOpIdx oi, uintptr_t ra); -Int128 cpu_ld16_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra); - -void cpu_stb_mmu(CPUArchState *env, vaddr ptr, uint8_t val, - MemOpIdx oi, uintptr_t ra); -void cpu_stw_mmu(CPUArchState *env, vaddr ptr, uint16_t val, - MemOpIdx oi, uintptr_t ra); -void cpu_stl_mmu(CPUArchState *env, vaddr ptr, uint32_t val, - MemOpIdx oi, uintptr_t ra); -void cpu_stq_mmu(CPUArchState *env, vaddr ptr, uint64_t val, - MemOpIdx oi, uintptr_t ra); -void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, - MemOpIdx oi, uintptr_t ra); - -uint32_t cpu_atomic_cmpxchgb_mmu(CPUArchState *env, vaddr addr, - uint32_t cmpv, uint32_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgw_le_mmu(CPUArchState *env, vaddr addr, - uint32_t cmpv, uint32_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgl_le_mmu(CPUArchState *env, vaddr addr, - uint32_t cmpv, uint32_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint64_t cpu_atomic_cmpxchgq_le_mmu(CPUArchState *env, vaddr addr, - uint64_t cmpv, uint64_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgw_be_mmu(CPUArchState *env, vaddr addr, - uint32_t cmpv, uint32_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint32_t cpu_atomic_cmpxchgl_be_mmu(CPUArchState *env, vaddr addr, - uint32_t cmpv, uint32_t newv, - MemOpIdx oi, uintptr_t retaddr); -uint64_t cpu_atomic_cmpxchgq_be_mmu(CPUArchState *env, vaddr addr, - uint64_t cmpv, uint64_t newv, - MemOpIdx oi, uintptr_t retaddr); - -#define GEN_ATOMIC_HELPER(NAME, TYPE, SUFFIX) \ -TYPE cpu_atomic_ ## NAME ## SUFFIX ## _mmu \ - (CPUArchState *env, vaddr addr, TYPE val, \ - MemOpIdx oi, uintptr_t retaddr); - -#ifdef CONFIG_ATOMIC64 -#define GEN_ATOMIC_HELPER_ALL(NAME) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, b) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, w_le) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, w_be) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, l_le) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, l_be) \ - GEN_ATOMIC_HELPER(NAME, uint64_t, q_le) \ - GEN_ATOMIC_HELPER(NAME, uint64_t, q_be) -#else -#define GEN_ATOMIC_HELPER_ALL(NAME) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, b) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, w_le) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, w_be) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, l_le) \ - GEN_ATOMIC_HELPER(NAME, uint32_t, l_be) -#endif - -GEN_ATOMIC_HELPER_ALL(fetch_add) -GEN_ATOMIC_HELPER_ALL(fetch_sub) -GEN_ATOMIC_HELPER_ALL(fetch_and) -GEN_ATOMIC_HELPER_ALL(fetch_or) -GEN_ATOMIC_HELPER_ALL(fetch_xor) -GEN_ATOMIC_HELPER_ALL(fetch_smin) -GEN_ATOMIC_HELPER_ALL(fetch_umin) -GEN_ATOMIC_HELPER_ALL(fetch_smax) -GEN_ATOMIC_HELPER_ALL(fetch_umax) - -GEN_ATOMIC_HELPER_ALL(add_fetch) -GEN_ATOMIC_HELPER_ALL(sub_fetch) -GEN_ATOMIC_HELPER_ALL(and_fetch) -GEN_ATOMIC_HELPER_ALL(or_fetch) -GEN_ATOMIC_HELPER_ALL(xor_fetch) -GEN_ATOMIC_HELPER_ALL(smin_fetch) -GEN_ATOMIC_HELPER_ALL(umin_fetch) -GEN_ATOMIC_HELPER_ALL(smax_fetch) -GEN_ATOMIC_HELPER_ALL(umax_fetch) - -GEN_ATOMIC_HELPER_ALL(xchg) - -#undef GEN_ATOMIC_HELPER_ALL -#undef GEN_ATOMIC_HELPER - -Int128 cpu_atomic_cmpxchgo_le_mmu(CPUArchState *env, vaddr addr, - Int128 cmpv, Int128 newv, - MemOpIdx oi, uintptr_t retaddr); -Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, vaddr addr, - Int128 cmpv, Int128 newv, - MemOpIdx oi, uintptr_t retaddr); - #if TARGET_BIG_ENDIAN # define cpu_lduw_data cpu_lduw_be_data # define cpu_ldsw_data cpu_ldsw_be_data @@ -297,15 +200,6 @@ Int128 cpu_atomic_cmpxchgo_be_mmu(CPUArchState *env, vaddr addr, # define cpu_stq_mmuidx_ra cpu_stq_le_mmuidx_ra #endif -uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, - MemOpIdx oi, uintptr_t ra); -uint16_t cpu_ldw_code_mmu(CPUArchState *env, vaddr addr, - MemOpIdx oi, uintptr_t ra); -uint32_t cpu_ldl_code_mmu(CPUArchState *env, vaddr addr, - MemOpIdx oi, uintptr_t ra); -uint64_t cpu_ldq_code_mmu(CPUArchState *env, vaddr addr, - MemOpIdx oi, uintptr_t ra); - uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr); uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr); uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr); From patchwork Tue Mar 18 21:31:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874449 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp77652wru; Tue, 18 Mar 2025 14:39:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUWRtO9SSiVqfmC/f3fzS+knTcGsilXFKZaoW8NPu/oPuZUaKT9STRzG/JPLSCgwU0d/3nKXw==@linaro.org X-Google-Smtp-Source: AGHT+IG5rNUO9HLhE9J/MIIu/fFR8FXPf/RNcOn2ZTze9vQHM52dh1eTkXmq+BsZxhRQk0vS9hgv X-Received: by 2002:a05:6214:300b:b0:6e8:9e8f:cfb with SMTP id 6a1803df08f44-6eb293af77dmr4536436d6.24.1742333948301; Tue, 18 Mar 2025 14:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333948; cv=none; d=google.com; s=arc-20240605; b=ijqc6FxpAA4a5byGfrAXu0IGofcKTnHKnR37kzn2zqaKRLTiGFNXgecfmErngbl4Gg M8HHnLd7nytzIb2ScwGHzI9a7jVsVOWb8Jvv07dGb5RxTdu8dSZ4I2l3wWm2ruNzo9nI 1xBusmWGFJ2t5/5sgp9LIHZg9v2rX9Aq9yCv6iz6xxhVU0bKi8JPzaHryhV30Tyg9Dtw U10C8bGG4oRWk35aldfOUmkI2whCodpPxJWwwN3s53fRY39xRdNHVHZ3SwWHOMdU84fG ZbGGEgV/7uC5hYGsIoGc7eRYlmliCt0lYHCbZx8wo43uHXDuDO/lkQ7iYplBkrSyH5Xp eZCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ed/f0ps4N0zqTL5jgBMLusXY9jc4rfpD8cqPEiyV4Ok=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=AK4NBOiNrWTymFUOH8TO80LLaJ6IMXejQSqgyX5MaWVHIFeFNs0MVIG0yVfo8gXaE8 UAXTwOppfM8UpBBHehRkK9JeOe0jOZdL43ghWbfHKamYrBPVG7OjP2Rn2kOhdvKnkf0l lkPUYYVpl6NFBKjtPzE7STLkUEc9O/VPJJz9yFg1hQzJllsCWx0lxPmRiUp1eyU0/Lk3 hVPgva5ESQIDhmvDeUFKofjA0yb4ARehQTETnAs0whiwPLUxnA7M1qNm2cObo7pgQ4D2 WjaUiqU7Bv3/4zS6R9VUNWwE1CPDuMalgyq8cCtdbT1MK90vYYEhJV5pUbufkylNUfCk iSQA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FPEPPNDR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6eade36f3d3si129975976d6.456.2025.03.18.14.39.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:39:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FPEPPNDR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueYG-0001Q0-3w; Tue, 18 Mar 2025 17:32:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXr-0001Eo-6z for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:20 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXo-0000jF-FC for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:18 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-22349bb8605so137297715ad.0 for ; Tue, 18 Mar 2025 14:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333535; x=1742938335; 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=Ed/f0ps4N0zqTL5jgBMLusXY9jc4rfpD8cqPEiyV4Ok=; b=FPEPPNDR0hhfETTnZu8IbJRR3AxGYLa0KnSS1kXE8Hz5N80cegoH1GgWQMdbn6nLbo 4bITSZeN+TMehyzmhK9opZqqscDtGU4ePnZ266G1v5aJrPNtWu+PuD/ARpxw3d83jZNB 4MUCwX1Qybo1i6Mv4LaX65M5H76fB2t1sNQDU6I/kA/n8SSGiXo6lDUkoHZb99Nfksjv 2ysJiXoYliW2MzRCoe5/TGLUP3TslTMfrhgoTfYRJxI19pA5EQcj7PNqMtJyldJQIOCt fK5HT+pqqL/dqPEeDvbTvsb05Y/Mb5kFOPXdC8rYEqK4V1M89YyzvoKY1fhlZsexrhta 1nGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333535; x=1742938335; 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=Ed/f0ps4N0zqTL5jgBMLusXY9jc4rfpD8cqPEiyV4Ok=; b=iltWiBLovKGJjLtCJDmwM1TEyfVjr5I60deyDwTlqeXx/HvShmW3Ws0EgHcum+iaDW XQjTxM2Ku9LeevynBW8HDTIDpKDE0852bsgO8Ph3QXul174B6H3HW15+LY4A1ZmKPkXv exrUvI0lqDcbyKbn9qFflqz+lfjs9/8hA84C2loVjLuM0Ame4mtirLjEcqMVh52/AOTn gSjPa7l0Ukqaxq4j7Zxj0QmQxtF5HGC+LpM0Ro4W2ER3APDbuw0WaHdrYV8noPFNIEWk 3pcUW5FwZ0tuTNS41iWhgotH/dcfJlVVrY2qX7h1KjJnaJg4wpHbuzoI3CtC5Tk2dmiI Dbdg== X-Gm-Message-State: AOJu0YziXFYZOE+/Ia7FLLUHpNceiAAkfUykMpm3EcvTfWf1sRRZCf3J LK6h4o+x0rfqCHfdeTEggSacyLJMnhYQdG4GAwOf/PEqomGg9bTQ8MTEDjfJHGXeNQAjllKn6tv X X-Gm-Gg: ASbGncv5+lI2H7vM1+MuMfxx/hFFZfPJIXsibdG5Rapl3ZbMPBbuQvSb1hroLd25cty 0jxLpeokX7Pt9GBktivBF766D9dM1sJaht1gSzRYwnj6UU5VNX1iVwkC2txvgbR8bqOL91+tZk1 LOczRHYWex+fMB+9pVYy0+Sv//nH4ejrGhybAcLwr+eyitXuCWNbPrsLQptrLCL3EBOfPjDtKzb DE3bW8Sn+9HtDzwu4bN6rG6WJjCDUu/lduj1TAHlFSED42NzcZzL7TImIs4bfElIGypoTfxl3Cm reJz5GRKbUNlP/nU8xsogNNOY0SzIOZl6btsR1pNroGlNQ9VnQs8y87SRNL/rI8RnNMJSnn7K// 6 X-Received: by 2002:a05:6a20:1605:b0:1f5:8e33:c417 with SMTP id adf61e73a8af0-1fbeb18508emr366826637.2.1742333534774; Tue, 18 Mar 2025 14:32:14 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 06/42] include/exec: Split out cpu-mmu-index.h Date: Tue, 18 Mar 2025 14:31:31 -0700 Message-ID: <20250318213209.2579218-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The implementation of cpu_mmu_index was split between cpu-common.h and cpu-all.h, depending on CONFIG_USER_ONLY. We already have the plumbing common to user and system mode. Using MMU_USER_IDX requires the cpu.h for a specific target, and so is restricted to when we're compiling per-target. Include the new header only where needed. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- include/exec/cpu-all.h | 6 ------ include/exec/cpu-common.h | 20 ------------------ include/exec/cpu-mmu-index.h | 39 +++++++++++++++++++++++++++++++++++ include/exec/cpu_ldst.h | 1 + semihosting/uaccess.c | 1 + target/arm/gdbstub64.c | 3 +++ target/hppa/mem_helper.c | 1 + target/i386/tcg/translate.c | 1 + target/loongarch/cpu_helper.c | 1 + target/microblaze/helper.c | 1 + target/microblaze/mmu.c | 1 + target/openrisc/translate.c | 1 + target/sparc/cpu.c | 1 + target/sparc/mmu_helper.c | 1 + target/tricore/helper.c | 1 + target/xtensa/mmu_helper.c | 1 + 16 files changed, 54 insertions(+), 26 deletions(-) create mode 100644 include/exec/cpu-mmu-index.h diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 902ca1f3c7..6108351f58 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -48,8 +48,6 @@ CPUArchState *cpu_copy(CPUArchState *env); #ifdef CONFIG_USER_ONLY -static inline int cpu_mmu_index(CPUState *cs, bool ifetch); - /* * Allow some level of source compatibility with softmmu. We do not * support any of the more exotic features, so only invalid pages may @@ -59,10 +57,6 @@ static inline int cpu_mmu_index(CPUState *cs, bool ifetch); #define TLB_MMIO (1 << (TARGET_PAGE_BITS_MIN - 2)) #define TLB_WATCHPOINT 0 -static inline int cpu_mmu_index(CPUState *cs, bool ifetch) -{ - return MMU_USER_IDX; -} #else /* diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 3771b2130c..be032e1a49 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -272,24 +272,4 @@ static inline CPUState *env_cpu(CPUArchState *env) return (CPUState *)env_cpu_const(env); } -#ifndef CONFIG_USER_ONLY -/** - * cpu_mmu_index: - * @env: The cpu environment - * @ifetch: True for code access, false for data access. - * - * Return the core mmu index for the current translation regime. - * This function is used by generic TCG code paths. - * - * The user-only version of this function is inline in cpu-all.h, - * where it always returns MMU_USER_IDX. - */ -static inline int cpu_mmu_index(CPUState *cs, bool ifetch) -{ - int ret = cs->cc->mmu_index(cs, ifetch); - tcg_debug_assert(ret >= 0 && ret < NB_MMU_MODES); - return ret; -} -#endif /* !CONFIG_USER_ONLY */ - #endif /* CPU_COMMON_H */ diff --git a/include/exec/cpu-mmu-index.h b/include/exec/cpu-mmu-index.h new file mode 100644 index 0000000000..b46e622048 --- /dev/null +++ b/include/exec/cpu-mmu-index.h @@ -0,0 +1,39 @@ +/* + * cpu_mmu_index() + * + * Copyright (c) 2003 Fabrice Bellard + * + * SPDX-License-Identifier: LGPL-2.1+ + */ + +#ifndef EXEC_CPU_MMU_INDEX_H +#define EXEC_CPU_MMU_INDEX_H + +#include "hw/core/cpu.h" +#include "tcg/debug-assert.h" +#ifdef COMPILING_PER_TARGET +#include "cpu.h" +#endif + +/** + * cpu_mmu_index: + * @env: The cpu environment + * @ifetch: True for code access, false for data access. + * + * Return the core mmu index for the current translation regime. + * This function is used by generic TCG code paths. + */ +static inline int cpu_mmu_index(CPUState *cs, bool ifetch) +{ +#ifdef COMPILING_PER_TARGET +# ifdef CONFIG_USER_ONLY + return MMU_USER_IDX; +# endif +#endif + + int ret = cs->cc->mmu_index(cs, ifetch); + tcg_debug_assert(ret >= 0 && ret < NB_MMU_MODES); + return ret; +} + +#endif /* EXEC_CPU_MMU_INDEX_H */ diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 1fbdbe59ae..0b10d840fe 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -67,6 +67,7 @@ #endif #include "exec/cpu-ldst-common.h" +#include "exec/cpu-mmu-index.h" #include "exec/abi_ptr.h" #if defined(CONFIG_USER_ONLY) diff --git a/semihosting/uaccess.c b/semihosting/uaccess.c index 382a366ce3..a957891166 100644 --- a/semihosting/uaccess.c +++ b/semihosting/uaccess.c @@ -9,6 +9,7 @@ #include "qemu/osdep.h" #include "exec/cpu-all.h" +#include "exec/cpu-mmu-index.h" #include "exec/exec-all.h" #include "semihosting/uaccess.h" diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c index 1a4dbec567..a9d8352b76 100644 --- a/target/arm/gdbstub64.c +++ b/target/arm/gdbstub64.c @@ -27,6 +27,9 @@ #include #include "mte_user_helper.h" #endif +#ifdef CONFIG_TCG +#include "exec/cpu-mmu-index.h" +#endif int aarch64_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index fb1d93ef1f..510786518d 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/cputlb.h" +#include "exec/cpu-mmu-index.h" #include "exec/page-protection.h" #include "exec/helper-proto.h" #include "hw/core/cpu.h" diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index a8935f487a..20a5c69795 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -20,6 +20,7 @@ #include "qemu/host-utils.h" #include "cpu.h" +#include "exec/cpu-mmu-index.h" #include "exec/exec-all.h" #include "exec/translation-block.h" #include "tcg/tcg-op.h" diff --git a/target/loongarch/cpu_helper.c b/target/loongarch/cpu_helper.c index 930466ca48..8662fb36ed 100644 --- a/target/loongarch/cpu_helper.c +++ b/target/loongarch/cpu_helper.c @@ -8,6 +8,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/cpu-mmu-index.h" #include "internals.h" #include "cpu-csr.h" diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index 27fc929bee..996514ffe8 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/cputlb.h" +#include "exec/cpu-mmu-index.h" #include "exec/page-protection.h" #include "qemu/host-utils.h" #include "exec/log.h" diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c index f8587d5ac4..987ac9e3a7 100644 --- a/target/microblaze/mmu.c +++ b/target/microblaze/mmu.c @@ -22,6 +22,7 @@ #include "qemu/log.h" #include "cpu.h" #include "exec/cputlb.h" +#include "exec/cpu-mmu-index.h" #include "exec/page-protection.h" static unsigned int tlb_decode_size(unsigned int f) diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index 7a6af183ae..5b437959ac 100644 --- a/target/openrisc/translate.c +++ b/target/openrisc/translate.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "exec/cpu-mmu-index.h" #include "exec/exec-all.h" #include "tcg/tcg-op.h" #include "qemu/log.h" diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index 5716120117..1bf00407af 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -22,6 +22,7 @@ #include "cpu.h" #include "qemu/module.h" #include "qemu/qemu-print.h" +#include "exec/cpu-mmu-index.h" #include "exec/exec-all.h" #include "exec/translation-block.h" #include "hw/qdev-properties.h" diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c index 7548d01777..4a0cedd9e2 100644 --- a/target/sparc/mmu_helper.c +++ b/target/sparc/mmu_helper.c @@ -21,6 +21,7 @@ #include "qemu/log.h" #include "cpu.h" #include "exec/cputlb.h" +#include "exec/cpu-mmu-index.h" #include "exec/page-protection.h" #include "qemu/qemu-print.h" #include "trace.h" diff --git a/target/tricore/helper.c b/target/tricore/helper.c index a64412e6bd..be3d97af78 100644 --- a/target/tricore/helper.c +++ b/target/tricore/helper.c @@ -20,6 +20,7 @@ #include "hw/registerfields.h" #include "cpu.h" #include "exec/cputlb.h" +#include "exec/cpu-mmu-index.h" #include "exec/page-protection.h" #include "fpu/softfloat-helpers.h" #include "qemu/qemu-print.h" diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c index 63be741a42..96140c89c7 100644 --- a/target/xtensa/mmu_helper.c +++ b/target/xtensa/mmu_helper.c @@ -33,6 +33,7 @@ #include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "exec/cputlb.h" +#include "exec/cpu-mmu-index.h" #include "exec/exec-all.h" #include "exec/page-protection.h" From patchwork Tue Mar 18 21:31:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874425 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75953wru; Tue, 18 Mar 2025 14:34:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUketQgyP3QT8NfEb3nx0CPOqX3Rro1YZfl/LEwuvArkJVYJ6ZXJJfDxLM45FwFoyhGqj7flw==@linaro.org X-Google-Smtp-Source: AGHT+IG9FRFY+4+mammBo48anhzcJYbZ4uLL5S8shWFpdlNH6UEvjZHgmSmf7Z2wX10+99c16jJZ X-Received: by 2002:a05:6214:19c2:b0:6e8:f701:f6d9 with SMTP id 6a1803df08f44-6eb29389750mr6246976d6.12.1742333685576; Tue, 18 Mar 2025 14:34:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333685; cv=none; d=google.com; s=arc-20240605; b=NPv3A+Rq3OEVBc97N11b61kYMmCkhs9TqYjBw7exE1kSYzmJ/qUyCJxC1c7XnuYCk+ NGJBmHPAN8rn3L1wZ4gyGuIgcyLKxcyPseVbZUYvwlbwqn8eBAoo+66RW5TeC1+eEZmn i1j301oZFwKOILv1W62TWCDOPkxoW/2QDFS173zRsjiyauTXUSJsQbVEYhkNMRzMpiG2 c1cuSKJ9hcI6kHy8SZqzso2wPzjR4jfwQAFlOpb+U5pPR23sbItcFuVboLJR4X3FH3wF ji+air2CjC6WMNGLrfnCO0rvtwigZFTdkSGYTWXGJ5kDDJGMqMWQ+AE8rjzmQ88veRJQ FzyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vm0/nE2CjM27q+FxSsNB0we+deYSuG4Jg/ZtoddLVow=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=OM+/W/Lde5ydkvLGHJ3Zw7Dv99h/puPp4x+xmPGVfL/gvmpNLwYZ8nL25J7AzQVJUw 6vzIhE6+ugDulbvlWRSDzNsP11YMbIiKKtJjFyU9VybH6Z6b1M7LQZV8Gu87uEwC6LRC JkEhVvXy0XwDtIzfj2l/f8NI0A8+zrzoSlzI7wtgLMziTGLCdSsviNeKQerdtSSFXjCj qenadmAyEMIOYAj8kXCjJ0gvTbGnmJtdlVoavtvSYqA5+b1TrRNzLxenUFCkkp3Yo1SB gnuiyawzcHYqAkNHGR/4g0paArANfjaRMf6oFnQJ8e1FWEz1ru8RJREk9PZ0qBav/RWA SZVQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UFn4eWld; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6eb266e9063si7622206d6.255.2025.03.18.14.34.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:34:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UFn4eWld; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueY6-0001KV-0Y; Tue, 18 Mar 2025 17:32:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXr-0001Eu-QX for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:20 -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 1tueXo-0000jU-Vb for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:19 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-224171d6826so23860765ad.3 for ; Tue, 18 Mar 2025 14:32:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333535; x=1742938335; 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=vm0/nE2CjM27q+FxSsNB0we+deYSuG4Jg/ZtoddLVow=; b=UFn4eWldOVVjy/fCfVSTLg8ZPFuDA2q7ErnhQWTrelz3WVD3eG04XVp7kNlAT63B83 EneyL2SecKANbvIa1LKbViR+BQOHS9lIcHgUtI76huXg+4Wh9Vi80sc8HDleCcihLLlq 5qP58FbaH71XjzgLJ5f+FzlyFHRG04meGaf7wqIMKbi2c5SOqu24/EoJFqG3/aXHOmeC wmu1Ah8TF61v+pMDG7aG7cREnKQnjpMTVLFXeCCMQuC9X3zfdIYBG70Wg1VQUOjL1OCf WEbp9cZI99xA8J9q2RTwO7fAzaLnTWtb64EZp02toniy0VoQ/ZBUQBWB+h/EZ+fBsg3q /Q2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333535; x=1742938335; 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=vm0/nE2CjM27q+FxSsNB0we+deYSuG4Jg/ZtoddLVow=; b=gnm9QZIv5/WNTgcW849CbHyPscF4njz4bGWKdfAk/kgCYm2SCCmEPvd4XXiHF73Xj3 Ah2Ak6yGOsh/o9cOFKtWNG0zWdgtXX0U/4hxcnjCSX7zocs0VBeODhuq3t6luK6qcBGO mfALfeT87SJ62itdfwRkdlZ7AjMRErxbQTo8c6tbRMWPKOvq66lw9UTak5V9PU6Rf9lE AUr4MoVljKB0gdkdTkx4Hn+kymx4PlO0b3GE+6xC7/FmAvVj5vhYpb6wW8lhmTXQTnGq H/M4DJdZsQog1cZg1uunt682PgmytH6dyap2hW50uZnKBU58UEV5BqdZ75RyGa8AJpGG IEmA== X-Gm-Message-State: AOJu0YzHKTInXeZCGivrtyl/TAOkttsDQhkAyu+D7cV42wJK4Q7ja/wP 3B71yD41LC0+AwL9i/vxj9oJ9Bi7i0l6aEyAr0EmPNbAjkaFTCVxqhBJn4xU1AZFjLjBcNLPW4S F X-Gm-Gg: ASbGncsdD0Z4WLPn+kKHZbECVdNrjNnWXVrJDP+ibuGXSd0Nm1mHdbZ1yt280ssYhe0 NLg3HT7ZAQKuMsX1o7Z5zE+zWPjKR0X1aKlyyFDid6BS1L+IqGicVOWk5uioUSMtlqiJGw7RoZN hMYeHaHT64drhkx2ynFMln4G4lZLPHzMQuhSzAHwvnwa2pWNXfns7UtUxcGhBhFIKqzZpsxHLJx amwF1xFvzK4otWcgtlmuJVhlrPvERHmoxYz4bnBhaBFUQqLf9RaL+DET0HeaASJlcH3T1yWdNwA i80ocxe6lL4hZ3YTqbhWHxpHedwrbp+GyPFi3f6cGLWq89R9ad2JhEIvjqkWljy6pPy3dU6n+7b J X-Received: by 2002:a05:6a21:3947:b0:1ee:d418:f764 with SMTP id adf61e73a8af0-1fbed40d102mr305000637.38.1742333535449; Tue, 18 Mar 2025 14:32:15 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 07/42] include/exec: Inline *_mmuidx_ra memory operations Date: Tue, 18 Mar 2025 14:31:32 -0700 Message-ID: <20250318213209.2579218-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These need to be per-target for 'abi_ptr'. Expand inline to the *_mmu api with trivial massaging of the arguments. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 163 ++++++++++++++++++++++++++++-------- accel/tcg/ldst_common.c.inc | 118 -------------------------- 2 files changed, 129 insertions(+), 152 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 0b10d840fe..4149f04368 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -119,41 +119,136 @@ void cpu_stl_le_data_ra(CPUArchState *env, abi_ptr ptr, void cpu_stq_le_data_ra(CPUArchState *env, abi_ptr ptr, uint64_t val, uintptr_t ra); -uint32_t cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -int cpu_ldsb_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint32_t cpu_lduw_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -int cpu_ldsw_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint32_t cpu_ldl_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint64_t cpu_ldq_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint32_t cpu_lduw_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -int cpu_ldsw_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint32_t cpu_ldl_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); -uint64_t cpu_ldq_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, - int mmu_idx, uintptr_t ra); +static inline uint32_t +cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx); + return cpu_ldb_mmu(env, addr, oi, ra); +} -void cpu_stb_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, - int mmu_idx, uintptr_t ra); -void cpu_stw_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, - int mmu_idx, uintptr_t ra); -void cpu_stl_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, - int mmu_idx, uintptr_t ra); -void cpu_stq_be_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint64_t val, - int mmu_idx, uintptr_t ra); -void cpu_stw_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, - int mmu_idx, uintptr_t ra); -void cpu_stl_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint32_t val, - int mmu_idx, uintptr_t ra); -void cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr ptr, uint64_t val, - int mmu_idx, uintptr_t ra); +static inline int +cpu_ldsb_mmuidx_ra(CPUArchState *env, abi_ptr addr, int mmu_idx, uintptr_t ra) +{ + return (int8_t)cpu_ldub_mmuidx_ra(env, addr, mmu_idx, ra); +} + +static inline uint32_t +cpu_lduw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUW | MO_UNALN, mmu_idx); + return cpu_ldw_mmu(env, addr, oi, ra); +} + +static inline int +cpu_ldsw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return (int16_t)cpu_lduw_be_mmuidx_ra(env, addr, mmu_idx, ra); +} + +static inline uint32_t +cpu_ldl_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUL | MO_UNALN, mmu_idx); + return cpu_ldl_mmu(env, addr, oi, ra); +} + +static inline uint64_t +cpu_ldq_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUQ | MO_UNALN, mmu_idx); + return cpu_ldq_mmu(env, addr, oi, ra); +} + +static inline uint32_t +cpu_lduw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUW | MO_UNALN, mmu_idx); + return cpu_ldw_mmu(env, addr, oi, ra); +} + +static inline int +cpu_ldsw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + return (int16_t)cpu_lduw_le_mmuidx_ra(env, addr, mmu_idx, ra); +} + +static inline uint32_t +cpu_ldl_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUL | MO_UNALN, mmu_idx); + return cpu_ldl_mmu(env, addr, oi, ra); +} + +static inline uint64_t +cpu_ldq_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUQ | MO_UNALN, mmu_idx); + return cpu_ldq_mmu(env, addr, oi, ra); +} + +static inline void +cpu_stb_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx); + cpu_stb_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUW | MO_UNALN, mmu_idx); + cpu_stw_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stl_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUL | MO_UNALN, mmu_idx); + cpu_stl_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stq_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_BEUQ | MO_UNALN, mmu_idx); + cpu_stq_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUW | MO_UNALN, mmu_idx); + cpu_stw_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stl_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUL | MO_UNALN, mmu_idx); + cpu_stl_mmu(env, addr, val, oi, ra); +} + +static inline void +cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, + int mmu_idx, uintptr_t ra) +{ + MemOpIdx oi = make_memop_idx(MO_LEUQ | MO_UNALN, mmu_idx); + cpu_stq_mmu(env, addr, val, oi, ra); +} #if TARGET_BIG_ENDIAN # define cpu_lduw_data cpu_lduw_be_data diff --git a/accel/tcg/ldst_common.c.inc b/accel/tcg/ldst_common.c.inc index 0447c0bb92..99a56df3fb 100644 --- a/accel/tcg/ldst_common.c.inc +++ b/accel/tcg/ldst_common.c.inc @@ -248,124 +248,6 @@ void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, * Wrappers of the above */ -uint32_t cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx); - return cpu_ldb_mmu(env, addr, oi, ra); -} - -int cpu_ldsb_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - return (int8_t)cpu_ldub_mmuidx_ra(env, addr, mmu_idx, ra); -} - -uint32_t cpu_lduw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUW | MO_UNALN, mmu_idx); - return cpu_ldw_mmu(env, addr, oi, ra); -} - -int cpu_ldsw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - return (int16_t)cpu_lduw_be_mmuidx_ra(env, addr, mmu_idx, ra); -} - -uint32_t cpu_ldl_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUL | MO_UNALN, mmu_idx); - return cpu_ldl_mmu(env, addr, oi, ra); -} - -uint64_t cpu_ldq_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUQ | MO_UNALN, mmu_idx); - return cpu_ldq_mmu(env, addr, oi, ra); -} - -uint32_t cpu_lduw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUW | MO_UNALN, mmu_idx); - return cpu_ldw_mmu(env, addr, oi, ra); -} - -int cpu_ldsw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - return (int16_t)cpu_lduw_le_mmuidx_ra(env, addr, mmu_idx, ra); -} - -uint32_t cpu_ldl_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUL | MO_UNALN, mmu_idx); - return cpu_ldl_mmu(env, addr, oi, ra); -} - -uint64_t cpu_ldq_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUQ | MO_UNALN, mmu_idx); - return cpu_ldq_mmu(env, addr, oi, ra); -} - -void cpu_stb_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_UB, mmu_idx); - cpu_stb_mmu(env, addr, val, oi, ra); -} - -void cpu_stw_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUW | MO_UNALN, mmu_idx); - cpu_stw_mmu(env, addr, val, oi, ra); -} - -void cpu_stl_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUL | MO_UNALN, mmu_idx); - cpu_stl_mmu(env, addr, val, oi, ra); -} - -void cpu_stq_be_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_BEUQ | MO_UNALN, mmu_idx); - cpu_stq_mmu(env, addr, val, oi, ra); -} - -void cpu_stw_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUW | MO_UNALN, mmu_idx); - cpu_stw_mmu(env, addr, val, oi, ra); -} - -void cpu_stl_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint32_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUL | MO_UNALN, mmu_idx); - cpu_stl_mmu(env, addr, val, oi, ra); -} - -void cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, - int mmu_idx, uintptr_t ra) -{ - MemOpIdx oi = make_memop_idx(MO_LEUQ | MO_UNALN, mmu_idx); - cpu_stq_mmu(env, addr, val, oi, ra); -} - -/*--------------------------*/ - uint32_t cpu_ldub_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) { int mmu_index = cpu_mmu_index(env_cpu(env), false); From patchwork Tue Mar 18 21:31:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874426 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76076wru; Tue, 18 Mar 2025 14:35:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWLS8pm8mg2EyC5+fyFab8GBOiI24E4NJHgNI9F4W0LQSJaXtj3qW+B71/1R6/739fXtQjVeg==@linaro.org X-Google-Smtp-Source: AGHT+IFihg16JbRQxOUtIJsp/DIVAh8afLb5Tp2D8J/4LCIEO8C+74t8XyePI+8Io0ZS84dBo3t0 X-Received: by 2002:a05:622a:1bab:b0:476:973c:4090 with SMTP id d75a77b69052e-477082dfbaemr8226011cf.16.1742333708560; Tue, 18 Mar 2025 14:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333708; cv=none; d=google.com; s=arc-20240605; b=etBp8PhDhv0OLMs5i4zEYC5bRHBQmcELfna2Slcw5MfG7N8DeMJaxfs/pWpmz73BoI KKE1jPichowR0di2vIuk3Ek+Iml6toonAdr+wtdIqbGT4kBfULvpnoMWV80IoNIz1iDR 7nEV26BizKfJ63G1hGs5HcJs5C333GBnfaVVlGwbaXgnziGRV2z1Fke+qw9TDcRpe8P/ jhMhbGylx65tEev1CiGLWkIs9GN7cAbJl3dPq+VWmTkD5LKbXHHkW9ogAOkjWzQiKLBt ZATVXPhT5h59wmGGBcF1aoxqSwZB0DJhAsyB2x+KgqrHMPitmUS47AOLIinFmW1MnTMg xPDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zeri+twoEW7Zt/DU9oQuJ6uk1NkyW5mEGlj/nPXa6pY=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=c9yZUpOE9suF0LMRA2LlujN6Mwje+zTRPz6MeNtF1Ua0NDzwVr8cMRQOdzO0FQVSDd ilmTELo1jCUw+WY988vXfTizuFy5Q3JwwEG2hx43cXWsJ6C75mK+NStnTjiZOTYBM5P6 POSUNzZmAxqPgHlLUHvUuexC3PQXsE3z3wfw5am4munqEw2tPXo/NhNG9WaBk09e78ph U6bK7ppnePgMRsccT8W7eSZIHMdNa7/pbOss6P5xrfY9baRiSdAXVaoFeGqKP2p0ysT9 Ym7c/8VIgidmZFvL011ifQO6NSy2UfOxkOXKOYcdtGQt7sfap0xpxAMS/FPlTnqr4zLz xsmA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yR9yQ2+a; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb7e2208si123070061cf.217.2025.03.18.14.35.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:35:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yR9yQ2+a; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueYA-0001MN-Sv; Tue, 18 Mar 2025 17:32:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXt-0001F0-1d for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:21 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXp-0000jw-Uy for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:20 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-22438c356c8so107497765ad.1 for ; Tue, 18 Mar 2025 14:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333536; x=1742938336; 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=zeri+twoEW7Zt/DU9oQuJ6uk1NkyW5mEGlj/nPXa6pY=; b=yR9yQ2+amvHN4t/azJqK4tdgz+bOL+y8PRsCX3yqNT05+FQRXhg4GpuuMy6abj9eFo vAwidFc697Jhn8KG8M3EnhK3mztKjUZ28tmPqxDUsO77VB8gNQXfblbSm3rSC9Oj41r5 WQ+US8Xa/Nv+qc01NPt59fNsdLzST8mUzNYHW5zXVoitoJxyGJaRHPeh3Quk+4C5C3eE Frss5lrv0LHkAwGgs0RDP+MRZknlLbE2Ui6CmENqd89rqhWhv0f6Xw+CgQUkJOUKl74z lO2Zd8hlEYbJ0lJdRCvEY6WKTJ6XR3idfBIrr9P404Iob/KBNO/lIAFFw7REDQDMDIpx ntcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333536; x=1742938336; 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=zeri+twoEW7Zt/DU9oQuJ6uk1NkyW5mEGlj/nPXa6pY=; b=FWLv2n+jXfcq9WpWWpEFw05itBJUWSN6pe66W48BMxjCTJC1xQ97N8PtMbV4Oat/XF n41VYCIYRN4aBqYTylwAcIgK/s1JaXHbpvx34aFtkyF8fjVRm1j3pb4P8pjGVY2TQozG VZBkTGVnHmiB02E2uXUJCoM0qjP8gDNWTTL8tDSJ+l8hrMs+lz8Q54UjQzwTbg6VA2lY nO4mgbbqnnYnwgyq3CJUuKXVIXGFsSP9yuTxOW5+P483029hNZP+TSZ89DDWLOqoi5zW kwQpfLN4HSIFTAGYriKET3b9+wjCO+KenZ2xfunNEES4rCHqF94QtPdylCg+WlTaVlcF 0mgQ== X-Gm-Message-State: AOJu0YxjLq0JiccbOpAC8YUWal5lXZjNsjsWXiwtwmiEUKSWZ1f6iX21 eQ5kuRGn+fXF+2zWQwawID2wfRv56u7g1wyMyUoKJRgZxVdzSLG7FAlRxv8dX6Li/pKFqWJpLKV X X-Gm-Gg: ASbGncsze507JB0pB96mQ392ogdyI2UGk8yoGyFkqDd3uxX2wlVwmkQyXkkQIRBAGJz +QRsYHfARA1t0IPm/E7NH5/WWXACGTDgsCIT4ebex8S40R1GQ/wxrSLEbE0+rWnrh76H/uNsvEG VSb8B40o/ty8MYLE9Gr2xflvTXLMT5NUtKeevpuUDw2KehajmHFi1xlLV8m54fiQvRr2OLImL3k iO9NAJakF7z08J8AQqt4vrV6dw3GzYno/rPV94Zqqt621wxcOmG20KxZZpeNb5bdibGl5dckpBH RvGq8eP+zuDF2a7a0YMw/HXU6MQoIr4jixHIDM65aNV6+KBtQihMUpkPCJp+byaKQFwqv4zPPp/ Mj2fINzgSE/s= X-Received: by 2002:a05:6a20:2583:b0:1f5:5b77:3818 with SMTP id adf61e73a8af0-1fbece406bbmr296479637.27.1742333536305; Tue, 18 Mar 2025 14:32:16 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 08/42] include/exec: Inline *_data_ra memory operations Date: Tue, 18 Mar 2025 14:31:33 -0700 Message-ID: <20250318213209.2579218-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These need to be per-target for 'abi_ptr'. Expand inline to the *_mmuidx_ra api with a lookup of the target's cpu_mmu_index(). Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 144 +++++++++++++++++++++++++++++------- accel/tcg/ldst_common.c.inc | 108 --------------------------- 2 files changed, 118 insertions(+), 134 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 4149f04368..a2a90c7554 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -85,17 +85,6 @@ int cpu_ldsw_le_data(CPUArchState *env, abi_ptr ptr); uint32_t cpu_ldl_le_data(CPUArchState *env, abi_ptr ptr); uint64_t cpu_ldq_le_data(CPUArchState *env, abi_ptr ptr); -uint32_t cpu_ldub_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -int cpu_ldsb_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint32_t cpu_lduw_be_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -int cpu_ldsw_be_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint32_t cpu_ldl_be_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint64_t cpu_ldq_be_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint32_t cpu_lduw_le_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -int cpu_ldsw_le_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint32_t cpu_ldl_le_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); -uint64_t cpu_ldq_le_data_ra(CPUArchState *env, abi_ptr ptr, uintptr_t ra); - void cpu_stb_data(CPUArchState *env, abi_ptr ptr, uint32_t val); void cpu_stw_be_data(CPUArchState *env, abi_ptr ptr, uint32_t val); void cpu_stl_be_data(CPUArchState *env, abi_ptr ptr, uint32_t val); @@ -104,21 +93,6 @@ void cpu_stw_le_data(CPUArchState *env, abi_ptr ptr, uint32_t val); void cpu_stl_le_data(CPUArchState *env, abi_ptr ptr, uint32_t val); void cpu_stq_le_data(CPUArchState *env, abi_ptr ptr, uint64_t val); -void cpu_stb_data_ra(CPUArchState *env, abi_ptr ptr, - uint32_t val, uintptr_t ra); -void cpu_stw_be_data_ra(CPUArchState *env, abi_ptr ptr, - uint32_t val, uintptr_t ra); -void cpu_stl_be_data_ra(CPUArchState *env, abi_ptr ptr, - uint32_t val, uintptr_t ra); -void cpu_stq_be_data_ra(CPUArchState *env, abi_ptr ptr, - uint64_t val, uintptr_t ra); -void cpu_stw_le_data_ra(CPUArchState *env, abi_ptr ptr, - uint32_t val, uintptr_t ra); -void cpu_stl_le_data_ra(CPUArchState *env, abi_ptr ptr, - uint32_t val, uintptr_t ra); -void cpu_stq_le_data_ra(CPUArchState *env, abi_ptr ptr, - uint64_t val, uintptr_t ra); - static inline uint32_t cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, int mmu_idx, uintptr_t ra) { @@ -250,6 +224,124 @@ cpu_stq_le_mmuidx_ra(CPUArchState *env, abi_ptr addr, uint64_t val, cpu_stq_mmu(env, addr, val, oi, ra); } +/*--------------------------*/ + +static inline uint32_t +cpu_ldub_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_ldub_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline int +cpu_ldsb_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + return (int8_t)cpu_ldub_data_ra(env, addr, ra); +} + +static inline uint32_t +cpu_lduw_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_lduw_be_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline int +cpu_ldsw_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + return (int16_t)cpu_lduw_be_data_ra(env, addr, ra); +} + +static inline uint32_t +cpu_ldl_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_ldl_be_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline uint64_t +cpu_ldq_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_ldq_be_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline uint32_t +cpu_lduw_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_lduw_le_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline int +cpu_ldsw_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + return (int16_t)cpu_lduw_le_data_ra(env, addr, ra); +} + +static inline uint32_t +cpu_ldl_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_ldl_le_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline uint64_t +cpu_ldq_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + return cpu_ldq_le_mmuidx_ra(env, addr, mmu_index, ra); +} + +static inline void +cpu_stb_data_ra(CPUArchState *env, abi_ptr addr, uint32_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stb_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stw_be_data_ra(CPUArchState *env, abi_ptr addr, uint32_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stw_be_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stl_be_data_ra(CPUArchState *env, abi_ptr addr, uint32_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stl_be_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stq_be_data_ra(CPUArchState *env, abi_ptr addr, uint64_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stq_be_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stw_le_data_ra(CPUArchState *env, abi_ptr addr, uint32_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stw_le_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stl_le_data_ra(CPUArchState *env, abi_ptr addr, uint32_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stl_le_mmuidx_ra(env, addr, val, mmu_index, ra); +} + +static inline void +cpu_stq_le_data_ra(CPUArchState *env, abi_ptr addr, uint64_t val, uintptr_t ra) +{ + int mmu_index = cpu_mmu_index(env_cpu(env), false); + cpu_stq_le_mmuidx_ra(env, addr, val, mmu_index, ra); +} + #if TARGET_BIG_ENDIAN # define cpu_lduw_data cpu_lduw_be_data # define cpu_ldsw_data cpu_ldsw_be_data diff --git a/accel/tcg/ldst_common.c.inc b/accel/tcg/ldst_common.c.inc index 99a56df3fb..2f203290db 100644 --- a/accel/tcg/ldst_common.c.inc +++ b/accel/tcg/ldst_common.c.inc @@ -248,114 +248,6 @@ void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, * Wrappers of the above */ -uint32_t cpu_ldub_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_ldub_mmuidx_ra(env, addr, mmu_index, ra); -} - -int cpu_ldsb_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - return (int8_t)cpu_ldub_data_ra(env, addr, ra); -} - -uint32_t cpu_lduw_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_lduw_be_mmuidx_ra(env, addr, mmu_index, ra); -} - -int cpu_ldsw_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - return (int16_t)cpu_lduw_be_data_ra(env, addr, ra); -} - -uint32_t cpu_ldl_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_ldl_be_mmuidx_ra(env, addr, mmu_index, ra); -} - -uint64_t cpu_ldq_be_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_ldq_be_mmuidx_ra(env, addr, mmu_index, ra); -} - -uint32_t cpu_lduw_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_lduw_le_mmuidx_ra(env, addr, mmu_index, ra); -} - -int cpu_ldsw_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - return (int16_t)cpu_lduw_le_data_ra(env, addr, ra); -} - -uint32_t cpu_ldl_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_ldl_le_mmuidx_ra(env, addr, mmu_index, ra); -} - -uint64_t cpu_ldq_le_data_ra(CPUArchState *env, abi_ptr addr, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - return cpu_ldq_le_mmuidx_ra(env, addr, mmu_index, ra); -} - -void cpu_stb_data_ra(CPUArchState *env, abi_ptr addr, - uint32_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stb_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stw_be_data_ra(CPUArchState *env, abi_ptr addr, - uint32_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stw_be_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stl_be_data_ra(CPUArchState *env, abi_ptr addr, - uint32_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stl_be_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stq_be_data_ra(CPUArchState *env, abi_ptr addr, - uint64_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stq_be_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stw_le_data_ra(CPUArchState *env, abi_ptr addr, - uint32_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stw_le_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stl_le_data_ra(CPUArchState *env, abi_ptr addr, - uint32_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stl_le_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -void cpu_stq_le_data_ra(CPUArchState *env, abi_ptr addr, - uint64_t val, uintptr_t ra) -{ - int mmu_index = cpu_mmu_index(env_cpu(env), false); - cpu_stq_le_mmuidx_ra(env, addr, val, mmu_index, ra); -} - -/*--------------------------*/ - uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr addr) { return cpu_ldub_data_ra(env, addr, 0); From patchwork Tue Mar 18 21:31:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874413 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75348wru; Tue, 18 Mar 2025 14:33:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX9eFcG1VHqBNJvEeV6lRU03G8FVm3wPxvpN90MeZZXvdiVpTBEzbsOFIj+5XuzUeDIUO3vxw==@linaro.org X-Google-Smtp-Source: AGHT+IHK/XuAIof1ftRqYpR+T2qe7fRlXvChmoXv9fTSImZmyfLevpw2YsQKc2YWRm+W63k6AXid X-Received: by 2002:a05:620a:2954:b0:7c5:4caa:21af with SMTP id af79cd13be357-7c5a84a5426mr29428885a.53.1742333583955; Tue, 18 Mar 2025 14:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333583; cv=none; d=google.com; s=arc-20240605; b=UqC/DgwcoLem45NJW4OINvuLy+HPjJ3GjDd4N5a9YAFZPq/y5qQAEipfvQpJPy9CAv J+wZGL3N7b1nF6trFM7PchUf+JIWuoEwrT1Cy0ZoSM3dqkbrr/oWwOLYK1smovxJNKLD ePDXw/Cm0ZV83Eb4EcRZZJyLutEFXWXJrL5DYOofaNARRQSJPgdOAGY85VVcdKJW2bb2 ZAkjjkOCcp/aayvEO9c6Z4gCLIu9JJGSnZJO/7e0cVnp0z0Why9kJ5nHYM/x2CB9kwBv LSPxib5Y83tHqoXxnfM0lc49SvB5CuCzDs6Vvr7aSke6MLHBeGvq9QrmLLH5mHzgxgJw onPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=auoZ5sagChoUoImtq+fRnexF2VfkXuVWg9ycaR6Q+kM=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=HXtloodzI/mZpBSBRcYHhsedCvcF6pvzk4HjAQKv0ulMD+fNO1Voe5GdxFVR+7VacT LTmGCj66CoVw42UTuGF5RghP8MDvp/eaBZLRSlhzsCWlRq+5HgawanYM8t3EWW7DAOuh HLh4EPCnvCOU78J6A37cQEV3mHcebD/MZj1jHOk8p5N6Ra9Hd07vHymJkyDIHooZqopS 0atpJbQi360qnu5aJCT6IQ+kY0sCX+W3xlk7HFsC9GFZSvvhrTUVj6pxOboCg7TN4vxt NhTDW5GPx+vmvZu7WRrboKdxLjVcP0KDB3EkeK+IJNxYlVHOdNP8xe4ECGQH7DdmyMu0 sBjg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zVP+cfuY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573b730aasi1366129385a.113.2025.03.18.14.33.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:33:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zVP+cfuY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueY6-0001LQ-Uu; Tue, 18 Mar 2025 17:32: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 1tueXt-0001F1-22 for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:21 -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 1tueXq-0000kH-FZ for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:20 -0400 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-224341bbc1dso118071315ad.3 for ; Tue, 18 Mar 2025 14:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333537; x=1742938337; 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=auoZ5sagChoUoImtq+fRnexF2VfkXuVWg9ycaR6Q+kM=; b=zVP+cfuY6ib4ilho+327OYcV6Wi7X51rcxoRgqm8fFxKLEgS5C50SBNa/zkeNwH/d2 D8PUX0wz71rBrT4atyQw3qYOIwxBeBlaFkAC/wBF6zdGcB19rORPrFXSxzuKF+JVom23 j4rE5A7d4u0g1yy7YScbdXE7AmZ4Uc9Xbznakrgp67z53CoueEQZ7wwP9sBsPo65/1vT 3IS18t81dwBboJBvATmcoad2j55CtcGsRGXHHdCzaAsWw3taZVIhC8QaT4f46ATHGXAD D2/igHcZGat9GBdmlMzqcWvbimeT+lHM6PZ6vmlV9ENuGbnWISycmKtqpZoXt7r7xDpB IM3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333537; x=1742938337; 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=auoZ5sagChoUoImtq+fRnexF2VfkXuVWg9ycaR6Q+kM=; b=qBh+CLg8Rrq3cUKn7tpruChlFt3LWvjhBcgzVPfTv07RNOqx+dGpuWx8I3FBvurMLO H+P9a4SMIcEefEiou+GtTJpgCcYDIwYpgEck1rydz/PPD4f354/LV8Rqw52Jrs6Ep+VP UUzqeukS3KCjaWcpBGhqg8fuIA6g6wFU5TICVkqOzG0DAAa/WYpWwgcjFw7HaZZeyHPz 4Ez1dbBql+8dyAs57AV7d5hS9SJofdLpEc3mp9l+WMtyreWYjdC6hH9GMGw/IdlCmomB YZRgkd46O8T5cnoy/RGxjL7RkVdOAtaBkWa77qQWBfvovqa+NNew82+qsDEnD4aqRE89 yVDQ== X-Gm-Message-State: AOJu0YwZUTNCjYWnIVOQFCwo8BdeLbvJg+y24uOkD1tT87QcoTF1FJT6 2+Lwk3cuKIzApotC4oXsp9M48keqS7EcIb5vnxEHumumsqhaOnb/eXd2l8huwcAUrRBk7g8OkJn d X-Gm-Gg: ASbGncsJwVnuaZNTbiqaCGh780w4EET4oS6Tye877l92oecVHyZuJ/FPwtZPqt83akI 6soLp7J1kHn2YB2MqC20/Xx1nI9MebljS/vZjNCOjprcARzmxsuwHVrkbOv9JC/4SqTybx7g0yl 91cL3UZVKP5s1d31zDkyob39V2ih19XL2OSvY3YMZYzporTYNKaxbCJ6U6hSUz4xCyZhnHdGb3T oZvGJBo4CgPSmvOWC67aJLSLbKNO0lBeeiU5QxBx32d+mqg/kDQQv9MnNlaEzZhjEhdN04CAllO ThiVSDXyPA5IkRyw4xoFP5iKp1iyd43SFsu4r2dI/17OGMmc6IrRmjHDzOZ5CW9hBSFVXW7iHkD 40FMwmnZ3L74= X-Received: by 2002:a05:6a20:9f0a:b0:1f5:56fe:b437 with SMTP id adf61e73a8af0-1fbed31338dmr303264637.32.1742333537084; Tue, 18 Mar 2025 14:32:17 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:16 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 09/42] include/exec: Inline *_data memory operations Date: Tue, 18 Mar 2025 14:31:34 -0700 Message-ID: <20250318213209.2579218-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These need to be per-target for 'abi_ptr'. Expand inline to the *_data_ra api with ra == 0. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 123 ++++++++++++++++++++++++++++++------ accel/tcg/ldst_common.c.inc | 89 -------------------------- 2 files changed, 104 insertions(+), 108 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index a2a90c7554..d084da0b5f 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -74,25 +74,6 @@ #include "user/guest-host.h" #endif /* CONFIG_USER_ONLY */ -uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr ptr); -int cpu_ldsb_data(CPUArchState *env, abi_ptr ptr); -uint32_t cpu_lduw_be_data(CPUArchState *env, abi_ptr ptr); -int cpu_ldsw_be_data(CPUArchState *env, abi_ptr ptr); -uint32_t cpu_ldl_be_data(CPUArchState *env, abi_ptr ptr); -uint64_t cpu_ldq_be_data(CPUArchState *env, abi_ptr ptr); -uint32_t cpu_lduw_le_data(CPUArchState *env, abi_ptr ptr); -int cpu_ldsw_le_data(CPUArchState *env, abi_ptr ptr); -uint32_t cpu_ldl_le_data(CPUArchState *env, abi_ptr ptr); -uint64_t cpu_ldq_le_data(CPUArchState *env, abi_ptr ptr); - -void cpu_stb_data(CPUArchState *env, abi_ptr ptr, uint32_t val); -void cpu_stw_be_data(CPUArchState *env, abi_ptr ptr, uint32_t val); -void cpu_stl_be_data(CPUArchState *env, abi_ptr ptr, uint32_t val); -void cpu_stq_be_data(CPUArchState *env, abi_ptr ptr, uint64_t val); -void cpu_stw_le_data(CPUArchState *env, abi_ptr ptr, uint32_t val); -void cpu_stl_le_data(CPUArchState *env, abi_ptr ptr, uint32_t val); -void cpu_stq_le_data(CPUArchState *env, abi_ptr ptr, uint64_t val); - static inline uint32_t cpu_ldub_mmuidx_ra(CPUArchState *env, abi_ptr addr, int mmu_idx, uintptr_t ra) { @@ -342,6 +323,110 @@ cpu_stq_le_data_ra(CPUArchState *env, abi_ptr addr, uint64_t val, uintptr_t ra) cpu_stq_le_mmuidx_ra(env, addr, val, mmu_index, ra); } +/*--------------------------*/ + +static inline uint32_t +cpu_ldub_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_ldub_data_ra(env, addr, 0); +} + +static inline int +cpu_ldsb_data(CPUArchState *env, abi_ptr addr) +{ + return (int8_t)cpu_ldub_data(env, addr); +} + +static inline uint32_t +cpu_lduw_be_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_lduw_be_data_ra(env, addr, 0); +} + +static inline int +cpu_ldsw_be_data(CPUArchState *env, abi_ptr addr) +{ + return (int16_t)cpu_lduw_be_data(env, addr); +} + +static inline uint32_t +cpu_ldl_be_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_ldl_be_data_ra(env, addr, 0); +} + +static inline uint64_t +cpu_ldq_be_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_ldq_be_data_ra(env, addr, 0); +} + +static inline uint32_t +cpu_lduw_le_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_lduw_le_data_ra(env, addr, 0); +} + +static inline int +cpu_ldsw_le_data(CPUArchState *env, abi_ptr addr) +{ + return (int16_t)cpu_lduw_le_data(env, addr); +} + +static inline uint32_t +cpu_ldl_le_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_ldl_le_data_ra(env, addr, 0); +} + +static inline uint64_t +cpu_ldq_le_data(CPUArchState *env, abi_ptr addr) +{ + return cpu_ldq_le_data_ra(env, addr, 0); +} + +static inline void +cpu_stb_data(CPUArchState *env, abi_ptr addr, uint32_t val) +{ + cpu_stb_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stw_be_data(CPUArchState *env, abi_ptr addr, uint32_t val) +{ + cpu_stw_be_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stl_be_data(CPUArchState *env, abi_ptr addr, uint32_t val) +{ + cpu_stl_be_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stq_be_data(CPUArchState *env, abi_ptr addr, uint64_t val) +{ + cpu_stq_be_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stw_le_data(CPUArchState *env, abi_ptr addr, uint32_t val) +{ + cpu_stw_le_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stl_le_data(CPUArchState *env, abi_ptr addr, uint32_t val) +{ + cpu_stl_le_data_ra(env, addr, val, 0); +} + +static inline void +cpu_stq_le_data(CPUArchState *env, abi_ptr addr, uint64_t val) +{ + cpu_stq_le_data_ra(env, addr, val, 0); +} + #if TARGET_BIG_ENDIAN # define cpu_lduw_data cpu_lduw_be_data # define cpu_ldsw_data cpu_ldsw_be_data diff --git a/accel/tcg/ldst_common.c.inc b/accel/tcg/ldst_common.c.inc index 2f203290db..9791a4e9ef 100644 --- a/accel/tcg/ldst_common.c.inc +++ b/accel/tcg/ldst_common.c.inc @@ -243,92 +243,3 @@ void cpu_st16_mmu(CPUArchState *env, vaddr addr, Int128 val, do_st16_mmu(env_cpu(env), addr, val, oi, retaddr); plugin_store_cb(env, addr, int128_getlo(val), int128_gethi(val), oi); } - -/* - * Wrappers of the above - */ - -uint32_t cpu_ldub_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_ldub_data_ra(env, addr, 0); -} - -int cpu_ldsb_data(CPUArchState *env, abi_ptr addr) -{ - return (int8_t)cpu_ldub_data(env, addr); -} - -uint32_t cpu_lduw_be_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_lduw_be_data_ra(env, addr, 0); -} - -int cpu_ldsw_be_data(CPUArchState *env, abi_ptr addr) -{ - return (int16_t)cpu_lduw_be_data(env, addr); -} - -uint32_t cpu_ldl_be_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_ldl_be_data_ra(env, addr, 0); -} - -uint64_t cpu_ldq_be_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_ldq_be_data_ra(env, addr, 0); -} - -uint32_t cpu_lduw_le_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_lduw_le_data_ra(env, addr, 0); -} - -int cpu_ldsw_le_data(CPUArchState *env, abi_ptr addr) -{ - return (int16_t)cpu_lduw_le_data(env, addr); -} - -uint32_t cpu_ldl_le_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_ldl_le_data_ra(env, addr, 0); -} - -uint64_t cpu_ldq_le_data(CPUArchState *env, abi_ptr addr) -{ - return cpu_ldq_le_data_ra(env, addr, 0); -} - -void cpu_stb_data(CPUArchState *env, abi_ptr addr, uint32_t val) -{ - cpu_stb_data_ra(env, addr, val, 0); -} - -void cpu_stw_be_data(CPUArchState *env, abi_ptr addr, uint32_t val) -{ - cpu_stw_be_data_ra(env, addr, val, 0); -} - -void cpu_stl_be_data(CPUArchState *env, abi_ptr addr, uint32_t val) -{ - cpu_stl_be_data_ra(env, addr, val, 0); -} - -void cpu_stq_be_data(CPUArchState *env, abi_ptr addr, uint64_t val) -{ - cpu_stq_be_data_ra(env, addr, val, 0); -} - -void cpu_stw_le_data(CPUArchState *env, abi_ptr addr, uint32_t val) -{ - cpu_stw_le_data_ra(env, addr, val, 0); -} - -void cpu_stl_le_data(CPUArchState *env, abi_ptr addr, uint32_t val) -{ - cpu_stl_le_data_ra(env, addr, val, 0); -} - -void cpu_stq_le_data(CPUArchState *env, abi_ptr addr, uint64_t val) -{ - cpu_stq_le_data_ra(env, addr, val, 0); -} From patchwork Tue Mar 18 21:31:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874450 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp77689wru; Tue, 18 Mar 2025 14:39:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXwB/xfPyoVfHSe0089KJM4RhPav2nUYKkksNhhoBeiORn1TTu3Fv/pCPI/A81LeXkebtuGgg==@linaro.org X-Google-Smtp-Source: AGHT+IEpO8HnCw3cpNKe8ZCR/c3MFbt77/X7uufvnfSzav4SZv1XQs3uyRC5sGYZYhKbVvug6e17 X-Received: by 2002:a05:620a:31a5:b0:7c5:6b15:1488 with SMTP id af79cd13be357-7c5a828538bmr25912685a.10.1742333956201; Tue, 18 Mar 2025 14:39:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333956; cv=none; d=google.com; s=arc-20240605; b=IJVdgj1ir6LtA0+ekjwCw9lqkMqtyzpaosF55RTrX9bMo1rJNnvm6ty6NY0uOGUeS2 Kl06TxWvRY0UKcPBYC90hpXjg6UZVDPxzpkhJrfC1tMqcHAxJnBz94vqhUecRz66rbvt M4pwF9mm2a/+Bfk3vfqlbnO7zTp9nsqTJUXtmBjnMiYD6YSqjKDPJDeFuUYpAH8tgLDg WKHIFyZBpLwcinQ+3yLjRBkZBjCJb0MMFaBJ/6399dcfEa4BHOG3mfcxuqF7nzZSTyWv AuAi5KsJMTA4tpY4irnHGCSd5AgmVFIVJGCiBZBeB1CENGVpKczEpmNSlNzk/HLISz1/ yztg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JU8wqJZNcN7ysbw8CBh8AnFHtEMmgB8RIMM8bAnUnEQ=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=dBwek59BFGF212YZxafYwVwObIaxfbqi+5u84K+WSL3N9a2AM25DA9nsIC4PrdDrxR N8IBNBoscc0qWcdXMbbr966Ci6KINdZlK13Y018YpsIJ7PmYYPdrtr3XlYP1Jw4vwhU2 0ZBjZDZHMh5ydCv7KmLUlEO9LgR9EMblM37vvb+Nm+FJPdV2pOCcAcNuJN7JB0W+wS3R yxhqOJyjymsMsUTXm7GQK5fIn7vBX5oGsBOfIsx4yfhvGbIMtzyq+RDzBRmREZjAuPEg HSKnj6cIHBEKjGG2GFdgVgCLDs/1AE2IXghle5cWoAWpXGd7oYDWV9y1a8DJHHfhr0/e 1meg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bj3fnud7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573cb7269si1330930085a.327.2025.03.18.14.39.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:39:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bj3fnud7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueYG-0001Q5-4V; Tue, 18 Mar 2025 17:32:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXu-0001FQ-1x for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:23 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXr-0000kQ-EG for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:21 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-2260c91576aso49622005ad.3 for ; Tue, 18 Mar 2025 14:32:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333538; x=1742938338; 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=JU8wqJZNcN7ysbw8CBh8AnFHtEMmgB8RIMM8bAnUnEQ=; b=Bj3fnud7yzZ9F+6Qdycvg2xnbzeg8rXCkYQHBbp4EGZxGGxHVQobZyaSq00aIdOEse K1GSTC1t6xf96wJzuC/M2XENHe//9AO2+wLucAnx8rPacH4bTrsVRJYhI26zefIMOm7o xOin25jANW9Dz1DaWtvON3J0jzPbDxDunQhdl8zRjhBGRt7cBxFuKYD/VeOySG6FrMCK ubU6ymdNM1eMNy3BSkgtUZMQnxW/eF35TBsBVJChelh++gmMboyx+OztNK4UmaRX+llO oNXKYaMcChWm8WYRbPEqq89YiFhYck43JS49VyCTfgVLGDYhYBqWcsJ0sIJspu3UnZ1z 0Uug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333538; x=1742938338; 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=JU8wqJZNcN7ysbw8CBh8AnFHtEMmgB8RIMM8bAnUnEQ=; b=jStKBVjViPetr7TUphnfPeWMpEM1rzaMuOiPDR+Tc3UTfiwzOZBLYiDUAqmO9a0+0r gFeDwd4kgc5c5WQIvLmgYw7VhILyVOz3LZcoKjCN87oaiiQJgxWzxOz1NYI0JRymaDz/ CanA4lHwgcVl5KVQZyqWrBJCCuh47a05R6UcjiGiL6PGJaxITJw6I9zBY1eOuS1jmMRB ljcWSpOY0Mp0LOFciEBJCOVH4TK7co6VKXxOVmZ0cE/mlLGnU3czyAHK0H0VdBWQlloh 84iUlPjsMgMpR4OdrVL/9jojzk61eOH5g3USEr0aaikRpPZQyF47B+rmfoCqJQP4WPS6 F5bw== X-Gm-Message-State: AOJu0YxGnffN2oHq73w2bAe60MawhexwGFhCsxuEKxEi22QU4CEQnavI 4r6a3fmCKpXTpWO3uYuvpPTavViIoMUQ+nl4904ecDiaim84hUEPALUgqkjjfGKePJwfH8zKxdc 4 X-Gm-Gg: ASbGncvstdPVTCyLdyQ4eEGiJCI1EDgofbgAsb1kCoNYzXtxIDQqYcUp0WWGeb0a8DP 37nLSmGdDPbatuk1SVPWbn9HJWoSNhLURbNP6n1bacvBUuw8MEx1u6nEXOkReSZkfakA0AO8/rV BGADV+lNN7EEUxY/ezi4sbGAWaaMvcCdk3lcGZ/MTVlnLzFMmcX93VqM+JPosoTS903bGkbxLq7 ePCArTAjfv9y4OsqlxO/UivZgq341/+Y7CP7037rNDBY3kgMAzlnnYkk3b8n4SPwVH5u+L/nsOm sxdDw03pF8zX8TlYJWX3Y6GlqaKDajY2VjxRe/gHDYZe7rxrNhL+WKq2Eyf1jMlR4SjVIWyZF5B I X-Received: by 2002:a05:6a20:1590:b0:1f1:432:f4a3 with SMTP id adf61e73a8af0-1fbebc870a8mr274860637.23.1742333537669; Tue, 18 Mar 2025 14:32:17 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 10/42] include/exec: Inline *_code memory operations Date: Tue, 18 Mar 2025 14:31:35 -0700 Message-ID: <20250318213209.2579218-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org These need to be per-target for 'abi_ptr' and endianness. These expand inline to the *_mmu api with a lookup of the target's cpu_mmu_index() and ra == 0. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 31 +++++++++++++++++++++++++++---- accel/tcg/cputlb.c | 28 ---------------------------- accel/tcg/user-exec.c | 40 ---------------------------------------- 3 files changed, 27 insertions(+), 72 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index d084da0b5f..82e67eff68 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -473,10 +473,33 @@ cpu_stq_le_data(CPUArchState *env, abi_ptr addr, uint64_t val) # define cpu_stq_mmuidx_ra cpu_stq_le_mmuidx_ra #endif -uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr); -uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr); -uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr); -uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr); +static inline uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr) +{ + CPUState *cs = env_cpu(env); + MemOpIdx oi = make_memop_idx(MO_UB, cpu_mmu_index(cs, true)); + return cpu_ldb_code_mmu(env, addr, oi, 0); +} + +static inline uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr) +{ + CPUState *cs = env_cpu(env); + MemOpIdx oi = make_memop_idx(MO_TEUW, cpu_mmu_index(cs, true)); + return cpu_ldw_code_mmu(env, addr, oi, 0); +} + +static inline uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr) +{ + CPUState *cs = env_cpu(env); + MemOpIdx oi = make_memop_idx(MO_TEUL, cpu_mmu_index(cs, true)); + return cpu_ldl_code_mmu(env, addr, oi, 0); +} + +static inline uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr) +{ + CPUState *cs = env_cpu(env); + MemOpIdx oi = make_memop_idx(MO_TEUQ, cpu_mmu_index(cs, true)); + return cpu_ldq_code_mmu(env, addr, oi, 0); +} /** * tlb_vaddr_to_host: diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index b03998f926..2817c9dbdd 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -2897,34 +2897,6 @@ static void do_st16_mmu(CPUState *cpu, vaddr addr, Int128 val, /* Code access functions. */ -uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr addr) -{ - CPUState *cs = env_cpu(env); - MemOpIdx oi = make_memop_idx(MO_UB, cpu_mmu_index(cs, true)); - return do_ld1_mmu(cs, addr, oi, 0, MMU_INST_FETCH); -} - -uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr addr) -{ - CPUState *cs = env_cpu(env); - MemOpIdx oi = make_memop_idx(MO_TEUW, cpu_mmu_index(cs, true)); - return do_ld2_mmu(cs, addr, oi, 0, MMU_INST_FETCH); -} - -uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr addr) -{ - CPUState *cs = env_cpu(env); - MemOpIdx oi = make_memop_idx(MO_TEUL, cpu_mmu_index(cs, true)); - return do_ld4_mmu(cs, addr, oi, 0, MMU_INST_FETCH); -} - -uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr addr) -{ - CPUState *cs = env_cpu(env); - MemOpIdx oi = make_memop_idx(MO_TEUQ, cpu_mmu_index(cs, true)); - return do_ld8_mmu(cs, addr, oi, 0, MMU_INST_FETCH); -} - uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t retaddr) { diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index dec17435c5..ebc7c3ecf5 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -1214,46 +1214,6 @@ static void do_st16_mmu(CPUState *cpu, vaddr addr, Int128 val, clear_helper_retaddr(); } -uint32_t cpu_ldub_code(CPUArchState *env, abi_ptr ptr) -{ - uint32_t ret; - - set_helper_retaddr(1); - ret = ldub_p(g2h_untagged(ptr)); - clear_helper_retaddr(); - return ret; -} - -uint32_t cpu_lduw_code(CPUArchState *env, abi_ptr ptr) -{ - uint32_t ret; - - set_helper_retaddr(1); - ret = lduw_p(g2h_untagged(ptr)); - clear_helper_retaddr(); - return ret; -} - -uint32_t cpu_ldl_code(CPUArchState *env, abi_ptr ptr) -{ - uint32_t ret; - - set_helper_retaddr(1); - ret = ldl_p(g2h_untagged(ptr)); - clear_helper_retaddr(); - return ret; -} - -uint64_t cpu_ldq_code(CPUArchState *env, abi_ptr ptr) -{ - uint64_t ret; - - set_helper_retaddr(1); - ret = ldq_p(g2h_untagged(ptr)); - clear_helper_retaddr(); - return ret; -} - uint8_t cpu_ldb_code_mmu(CPUArchState *env, vaddr addr, MemOpIdx oi, uintptr_t ra) { From patchwork Tue Mar 18 21:31:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874431 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76512wru; Tue, 18 Mar 2025 14:36:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUC+d0OcH73NQFbUggYDQuyJYF/iR2X2Tsg1v7+VVvwGv4bo7dk9Needb9YrjC2yFbCLD1yxQ==@linaro.org X-Google-Smtp-Source: AGHT+IF/fhOpUtJtS0KO9B3p1QxJN8TvdhqVzAhcWclwpFBgXEyNujD13hVtS4HEs7Kirv2ioxhu X-Received: by 2002:a05:622a:550d:b0:462:b7c9:10e with SMTP id d75a77b69052e-476fcc95c91mr79319471cf.13.1742333772075; Tue, 18 Mar 2025 14:36:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333772; cv=none; d=google.com; s=arc-20240605; b=fRxBXVCu8c5VntCgreFWz/q061sADlfb1DHCM0J52vZKZ0onqtlBiPmuy0cNQ/sTF7 KDPSjH/XVsxVR4OeEu63wb5kGMCx/BeKup9TDNcwHlzAFNr50PKB2pzWTN2SjP/ke/WS F0X2JXF6OkMqIMZWOFkfcN2e6U6GMLjqmgjwuBF40kio7nNsNoeQBHYXlKkHdwb6a7IF esiUcco3FPvu4IL10WW3OS1vek13R+7/9tQei/j9/pokFm6UzRmmn08oB4D6yOguT3Vz CWWtoNICNcwDOrIMN/6SzvaSeZ+/H23NJhmchoyZLsvxMBcCqp4+EOfG0U3sK3tvex5u c8ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LcMEdfq6hiU3L5D0NgU/JReS9ixFpwCT7tXsb8tm0s8=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=iQr/0bOVOQNOq+8GXXA9IpkKFaW94CK1Xk5mEYq18VGEBEXjJ+GmmhENtKwmeHHkS9 HQ+7btl63zkU8Qx3e4sWfGbkrIEDs5OgPhfOFeV31Da1N1YXPlGhWqMn9Xn2hNKf/yTM 4R09D+Pt/CCgILalxUf1eH7ri/a0mmgeOh/IQEIkOvSMPM2i3z8YMv4dxYt/5DBQVZT7 afcd77ORKhKUtLlRxy5eFDv3vS2EhYpQBQ4TQ5V7TK9FjnFyqH+56oC7QRAoccRtnnyF EYh9J1iOpTEuw9NAnaNM81C9FSMZheyGw+mSdKcgC+cFgFx2tfFrvP2QZecz+MpaH4bz Eyzw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zzCLapjI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb64cfdasi130061041cf.174.2025.03.18.14.36.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:36:12 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zzCLapjI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueYE-0001P0-JG; Tue, 18 Mar 2025 17:32: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 1tueXu-0001FU-Kv for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:25 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXs-0000kb-2i for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:22 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-225df540edcso1783245ad.0 for ; Tue, 18 Mar 2025 14:32:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333538; x=1742938338; 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=LcMEdfq6hiU3L5D0NgU/JReS9ixFpwCT7tXsb8tm0s8=; b=zzCLapjIDS6MGG24zs8kMWcaZGDsoS7RoLmjMNKZNLtfC6zrze7zN6JtZ3CrH6ybou 7T9AFtNqR3ZyYr2/KmTeaZ7ZJpcxlAEYP/qFfXyLfJtCsBtcyVGXf9KPoEMs3HnF6ztn awGihH7ECZQyauEvR2bHAVEJFecP9w4BTss1UKd9MM667IfeISZld9gAnXm0LbKwGD2C WsYsyjLoZrDApzad2XOLzW6eNn1deVpZ+D8K+S93XITKEdtX2NUUyRz9srikfJGTb11G FKA25MU/JIBahsIjsplrAtph7EEOii1+fgUjAaeXcVwTWSdJEiOipLwVBlwO+rxNsYaf K5XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333538; x=1742938338; 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=LcMEdfq6hiU3L5D0NgU/JReS9ixFpwCT7tXsb8tm0s8=; b=Co0B8U6szAEYEjB1XhDdI33atB11crhXp7aFyzWynsJCBtA1SFqhmlj3bF290g1cCu j2AaitUdgMHAsnl57dYzveaQIFik/BIuwZFzvDbDJ+l+V7eqVXuuZL7uKp7DEL5xfuhz 2X2Y9PDt+7BNXNfeJBCVlVCdKhMVtBcEV/zcByCThWYV+iKboXn76qungyL3tlQG25r5 E777LZFpuKB2rAB3NhM4yOetV+/XMZsu/ZyaKJk7BtYnV3vzAnhQTHjCWh2YzRKS4+BI Ubvf0Rs37BC7DJL38bniEIxzPJDxBnt/gDndR00/4ZZMIL4qaNWWkjFNloajP8hNXYvS Utcg== X-Gm-Message-State: AOJu0YyHPs0TwaxZLW82QctoAtYbTcwksMOsO2GkOk94owgyO6y5arsE wEh6XFhN4p7mgIdJAhRdxaR0cB2hLlW9M4o9ZtJNMTrzqt/BgTNxsGJEkp0C/AavDfavRRhuTL1 a X-Gm-Gg: ASbGncuBQtNRRHSNE+vgTY1Zv/b8FYaY8JWujIfZ+cHiIrzOf4GHaXeAag2zS1OATSe mnaUhbWUlYuRcAxVumluESbhYOuQG9POL9F92c5NM6RGIwyYsKhegrUb1C2fekbmh+5M+xDwCk2 sUCBaT1IqILh/q2MUuW1el5tvcyycZv8uY26xhbeyz6SPT29tXrGBjbQUNnnWFu8RJ65Mwp2RRw pidFyvLl3xbYdcSJ7jiBtHYgLm6e/vT4jgvkZUURifVR61BN8f5uasC93ncPCb6dkqTjGeMvYpT 1thuue56GDFBsJIsFWZ4UnZrxYTBA6JGFXVKJ87Ts5QL7nnvcPzyDuLZJBSfG9nqE2upaG0GULj G X-Received: by 2002:a05:6a00:6813:b0:734:26c6:26d3 with SMTP id d2e1a72fcca58-7375778c95fmr7261989b3a.5.1742333538281; Tue, 18 Mar 2025 14:32:18 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 11/42] accel/tcg: Perform aligned atomic reads in translator_ld Date: Tue, 18 Mar 2025 14:31:36 -0700 Message-ID: <20250318213209.2579218-12-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Perform aligned atomic reads in translator_ld, if possible. According to https://lore.kernel.org/qemu-devel/20240607101403.1109-1-jim.shu@sifive.com/ this is required for RISC-V Ziccif. Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: Pierrick Bouvier --- accel/tcg/translator.c | 42 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index ef1538b4fc..157be33bf6 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -265,12 +265,14 @@ static bool translator_ld(CPUArchState *env, DisasContextBase *db, if (likely(((base ^ last) & TARGET_PAGE_MASK) == 0)) { /* Entire read is from the first page. */ - memcpy(dest, host + (pc - base), len); - return true; + goto do_read; } if (unlikely(((base ^ pc) & TARGET_PAGE_MASK) == 0)) { - /* Read begins on the first page and extends to the second. */ + /* + * Read begins on the first page and extends to the second. + * The unaligned read is never atomic. + */ size_t len0 = -(pc | TARGET_PAGE_MASK); memcpy(dest, host + (pc - base), len0); pc += len0; @@ -329,7 +331,39 @@ static bool translator_ld(CPUArchState *env, DisasContextBase *db, host = db->host_addr[1]; } - memcpy(dest, host + (pc - base), len); + do_read: + /* + * Assume aligned reads should be atomic, if possible. + * We're not in a position to jump out with EXCP_ATOMIC. + */ + host += pc - base; + switch (len) { + case 2: + if (QEMU_IS_ALIGNED(pc, 2)) { + uint16_t t = qatomic_read((uint16_t *)host); + stw_he_p(dest, t); + return true; + } + break; + case 4: + if (QEMU_IS_ALIGNED(pc, 4)) { + uint32_t t = qatomic_read((uint32_t *)host); + stl_he_p(dest, t); + return true; + } + break; +#ifdef CONFIG_ATOMIC64 + case 8: + if (QEMU_IS_ALIGNED(pc, 8)) { + uint64_t t = qatomic_read__nocheck((uint64_t *)host); + stq_he_p(dest, t); + return true; + } + break; +#endif + } + /* Unaligned or partial read from the second page is not atomic. */ + memcpy(dest, host, len); return true; } From patchwork Tue Mar 18 21:31:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874421 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75796wru; Tue, 18 Mar 2025 14:34:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUr3lsLzYpwn5rhq9TYM/lHLbz9w78JMENpPZX9KkeTEjtVd2TSc9IMU5a582D7RJAWPmhlaA==@linaro.org X-Google-Smtp-Source: AGHT+IHHn0yU6Cxqr3AA+q0XU1vOnyP/p8m7vgHbOueD0ZFMvJ5fu3gPP0a0mII0NCiuGNGCYoPD X-Received: by 2002:a05:620a:198b:b0:7c5:a2de:71d3 with SMTP id af79cd13be357-7c5a838edd9mr29919485a.20.1742333656006; Tue, 18 Mar 2025 14:34:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333655; cv=none; d=google.com; s=arc-20240605; b=aFqG5sHUMoZL7PnmC6NFa9jLzeHRGhCT9GJc5VAnpaQ7jHLnGPqY8AC9CBqEvRvoUI IKx7YAjJaG1ojS6jMpthn7yNrmZECQywxx66QidthQ3a2oR4pb15T08YIMbvIoBHMux+ +jjpRwmWc5XofjRRsNWMuUw6u/DYHHPSobtjAzW3EA+HlkDiUw71LwommF2BDVLGidQl OODqIX18n5MfdK5SBrqCPx7tpVh1/X6QWuOInuuhXeh/quXLt5T5ZkgB/xgZW4VsDUu4 PSFgYL5Mv6Xws5Ab/dloCV9R7YUu7xN9/fUXVri0EAhWlClfsxGhBVQL7mNjTNPl6JEH iIww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=nSn0WohsE0EYobxYvvs0WEl3hmTMlKy5q8Ka9aS9xl0=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=TKhJIBbW0mVJwGeVQPi/8GFBITltCKv17i475pBG4qjJpG7f1czPM3NU8UxV27IQhw 8k2vMHYEb9l+JcXmYztbz1afu0mVarM8SuQzMnq7OHGhjILpJJP4z3mWk/BuUaQ6lLns iQ6UsNV/39aAu58WdbRf+im7pTlVUewZnLsZphCmVi46ymAFoKcwK5odUsRywtXyGp09 ahcBVV5cN37JEEwbOO6InG356sUb8dnmqXTSKiSjM4S1TzguO9Wxx/3DRdWNV/b7vI3b cJcCAVOXIO0M+ajWf3DVi3CC9ubVBsRq0Xccl8STUWFw4L/RLuZxbshg7ZDc+0nnjeh5 oeGg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n9lISRGJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573cf03easi1333191985a.450.2025.03.18.14.34.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:34:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n9lISRGJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueY6-0001Kc-Bv; Tue, 18 Mar 2025 17:32:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXv-0001Fh-BV for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:26 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXs-0000kn-PI for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:22 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-2240b4de12bso24409415ad.2 for ; Tue, 18 Mar 2025 14:32:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333539; x=1742938339; 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=nSn0WohsE0EYobxYvvs0WEl3hmTMlKy5q8Ka9aS9xl0=; b=n9lISRGJGltqVfX48qFOLvustay+18gw8RQ4f2xaB9ibvgOdCBMgvYfpM/T9apMrLC RzPOj0h+wnVs9MAPEOOkhWiqMNcrQf6wjeEzI66MpJbjPHyb++Ic10Y156JKy9OpAHTM Ko2wEEbEfC4GM+t5eFO89mi2h9hrnZXBTCwyy+49I9AfHDl7xsJ0SihzcLu+UT31xaBs RCLJpK9PD/0LrZFwMyMeXAJ1apCGRLqMkJC6Ths0FfS2RUkvEhiTVZ1KoqoBw1f9mz2J vLcFETTNxfyiyE8yE2LxjYfif1YKsIceeDjeNwYiQdMqwxrY79pyItjWKW49k5kwLlhd 5+3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333539; x=1742938339; 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=nSn0WohsE0EYobxYvvs0WEl3hmTMlKy5q8Ka9aS9xl0=; b=V5rSZiid1C9cAO0vbrWmRfQHoALAchZVTvFQjgXXocUPHMtVrcWzXczauZeiAvSc5R M06m5qeXNKnvci2PZOHU2urYM0SDYIsGB/q1+gfb7yAIKoz32sn4JbXdVSBjVOlkky3F e2Lz+z1dnx1vcX+JxOrQrN4EAF3PSeMCTjLNQeQ8YVxS6eD4mugRZCFse2E8TSdx9ESO YZar0aFf+bMR2Kpl3/Y0sRdBX6szAKvi6yzs9W6VohzJS4GdhhKw3etjxZBtVO7r2Ca/ U1n2AeWiI7IpBaNxLtnZgehms5TqURDo16uUATFtlOtmqfVvwUsirbnIw+gvESRhnIzG n2Vw== X-Gm-Message-State: AOJu0Ywas6wWBGQYZQBoVtA5aWAHEUSWW44YpVbH9QYFrdFOtJMncBqz vVDUoZWhjWuI0p6mtbQhNCUhuf/RGW1UBtdP5r/Cv39AXXLkPgj1k55tBG1BkYiwpj5QrZwoMDi y X-Gm-Gg: ASbGnctCe2fyROW4qbAgGsystsRMyyQqOd6f09XgP8yF84SdkyDzAJV98uT3EYujozE vfldOdXAYqWrrXL/XdghitFx/UHT7XP2wfgLKC3sm0trT0ibduNL2IujKDAS23MUW/KYTQlPouP PvYinJDjkoJAX+mtKO1hR70pNZNpm786W0gn/CgLjouxgdRxEzQPzL5we2BCZt2D2urIiBqXJUB AuWxWpt38VfGZFPlY6FRjz6BwIWoxL/WVfdYBdzgwLWLOCR7FOQj7KLHDtVPs59tgfzhbhc+OsM 5RDPyyZVGocA7FEbQ5iRDj6hDBUU1iqo0EnAYWj8CimWEKAPCiZmazSGWLk56HD/Aqd9CuIP/7Z m X-Received: by 2002:a05:6a20:9f43:b0:1f5:63f9:9eb4 with SMTP id adf61e73a8af0-1fbed40cec4mr297497637.35.1742333538892; Tue, 18 Mar 2025 14:32:18 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 12/42] accel/tcg: Use cpu_ld*_code_mmu in translator.c Date: Tue, 18 Mar 2025 14:31:37 -0700 Message-ID: <20250318213209.2579218-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Cache the mmu index in DisasContextBase. Perform the read on host endianness, which lets us share code with the translator_ld fast path. Signed-off-by: Richard Henderson --- include/exec/translator.h | 1 + accel/tcg/translator.c | 58 ++++++++++++++++++--------------------- 2 files changed, 28 insertions(+), 31 deletions(-) diff --git a/include/exec/translator.h b/include/exec/translator.h index d70942a10f..205dd85bba 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -73,6 +73,7 @@ struct DisasContextBase { int max_insns; bool plugin_enabled; bool fake_insn; + uint8_t code_mmuidx; struct TCGOp *insn_start; void *host_addr[2]; diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 157be33bf6..6fd9237298 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -11,10 +11,10 @@ #include "qemu/log.h" #include "qemu/error-report.h" #include "exec/exec-all.h" +#include "exec/cpu-ldst-common.h" +#include "exec/cpu-mmu-index.h" #include "exec/translator.h" -#include "exec/cpu_ldst.h" #include "exec/plugin-gen.h" -#include "exec/cpu_ldst.h" #include "exec/tswap.h" #include "tcg/tcg-op-common.h" #include "internal-target.h" @@ -142,6 +142,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns, db->host_addr[1] = NULL; db->record_start = 0; db->record_len = 0; + db->code_mmuidx = cpu_mmu_index(cpu, true); ops->init_disas_context(db, cpu); tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */ @@ -457,55 +458,50 @@ bool translator_st(const DisasContextBase *db, void *dest, uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, vaddr pc) { - uint8_t raw; + uint8_t val; - if (!translator_ld(env, db, &raw, pc, sizeof(raw))) { - raw = cpu_ldub_code(env, pc); - record_save(db, pc, &raw, sizeof(raw)); + if (!translator_ld(env, db, &val, pc, sizeof(val))) { + MemOpIdx oi = make_memop_idx(MO_UB, db->code_mmuidx); + val = cpu_ldb_code_mmu(env, pc, oi, 0); + record_save(db, pc, &val, sizeof(val)); } - return raw; + return val; } uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc) { - uint16_t raw, tgt; + uint16_t val; - if (translator_ld(env, db, &raw, pc, sizeof(raw))) { - tgt = tswap16(raw); - } else { - tgt = cpu_lduw_code(env, pc); - raw = tswap16(tgt); - record_save(db, pc, &raw, sizeof(raw)); + if (!translator_ld(env, db, &val, pc, sizeof(val))) { + MemOpIdx oi = make_memop_idx(MO_UW, db->code_mmuidx); + val = cpu_ldw_code_mmu(env, pc, oi, 0); + record_save(db, pc, &val, sizeof(val)); } - return tgt; + return tswap16(val); } uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc) { - uint32_t raw, tgt; + uint32_t val; - if (translator_ld(env, db, &raw, pc, sizeof(raw))) { - tgt = tswap32(raw); - } else { - tgt = cpu_ldl_code(env, pc); - raw = tswap32(tgt); - record_save(db, pc, &raw, sizeof(raw)); + if (!translator_ld(env, db, &val, pc, sizeof(val))) { + MemOpIdx oi = make_memop_idx(MO_UL, db->code_mmuidx); + val = cpu_ldl_code_mmu(env, pc, oi, 0); + record_save(db, pc, &val, sizeof(val)); } - return tgt; + return tswap32(val); } uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc) { - uint64_t raw, tgt; + uint64_t val; - if (translator_ld(env, db, &raw, pc, sizeof(raw))) { - tgt = tswap64(raw); - } else { - tgt = cpu_ldq_code(env, pc); - raw = tswap64(tgt); - record_save(db, pc, &raw, sizeof(raw)); + if (!translator_ld(env, db, &val, pc, sizeof(val))) { + MemOpIdx oi = make_memop_idx(MO_UQ, db->code_mmuidx); + val = cpu_ldq_code_mmu(env, pc, oi, 0); + record_save(db, pc, &val, sizeof(val)); } - return tgt; + return tswap64(val); } void translator_fake_ld(DisasContextBase *db, const void *data, size_t len) From patchwork Tue Mar 18 21:31:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874422 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75818wru; Tue, 18 Mar 2025 14:34:20 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWE7iBr7UbiBNRGh/MZlpHGpzhGMirWFO4xN2fbEXU+SK7puaJS8wVoMNMkNbY/O1/P9E7kzA==@linaro.org X-Google-Smtp-Source: AGHT+IGzo7Ebn/YBVG18DTQwM5RUH0NTmhnRtxnAcq57cuqNPOg/YNYVoQJLekLgE6fepTjiLhnx X-Received: by 2002:a05:620a:29d4:b0:7c5:3d60:7f8d with SMTP id af79cd13be357-7c5a83968d8mr39633285a.19.1742333660740; Tue, 18 Mar 2025 14:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333660; cv=none; d=google.com; s=arc-20240605; b=SEnARvY6mONwSqN1+tirbtC5c0Oiyagu6+CeKWWs2uwzLrnZD9Mq5i1hIexeFM5pi9 bKGelSDQr+FygX9RlpAgxqonOa298IhF+P3chyw/DtjWCZVtX/vxio721kff3VUGhtCS YAkTWpeJ9B7kECQvlBZ8w+D7zlqc+cPWJfiUMOYkUl3S6UR9nrbY2SjqTEWi7bWEogJi e4s2iPC4lFsllNM9ikPfn7VWwdkzCobm7kjaPTJpUTuF2xXCcXPNzZidkgbJdF4kNQfI i6bMMf73YNda5emziOKnBoAljfDQqLgS6fg8dmh65mbEMT65/EbOf36ccYHfebVjoFpD qvUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QSPoYWWiP5ut+52NUoRVWLIF418rfs9djKfkXcCgaag=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=LRlAoO5JQ7qMMlKtNN+iEfUZmnjzzjAJm9sHzLiC8btLOvSqpkvmbOU15apQWfr9es 27ftzSy73g4wHq5opJOkSTr/CAhK4YkgEF5ejsUK20DIoeqqPXckBcwsUZ7Ep+ncK9A/ EvQmod4PUnwL0bOHQ4Ual7qxDgF5tsmKtOKiPrulcxEjT+CV9MZCmJJD9sHnka1KW4+d +U+4O1QoyWtv5wejrXFJxYRDHpbkVQNhcp+QrDXy8kgPIos+Tw/MsxAHRKgn53VeBXkV BawpFCXLEPSUfcnTAHpNsoN3LjlIQyE0KkMkOTKnzvlcrJPlA1gjD+NwLUJJ/Xwl4OtV X78w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eqKXfg2W; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573ccb264si1284502485a.231.2025.03.18.14.34.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:34:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eqKXfg2W; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueYE-0001PC-PD; Tue, 18 Mar 2025 17:32: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 1tueXv-0001Fp-Ko for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:26 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXt-0000kz-3u for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:23 -0400 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-3018e2d042bso3441563a91.2 for ; Tue, 18 Mar 2025 14:32:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333539; x=1742938339; 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=QSPoYWWiP5ut+52NUoRVWLIF418rfs9djKfkXcCgaag=; b=eqKXfg2WSle9OL1zMNHev4P18E/mpByniryqQirI9umBowgE4X6+gK9TxQnPOmBEAX Dx2f2KsxQSZnWaisj9oUWNuwt/qQJkC1CgeSS5NjAI+3uhH6PU5Dgz3AMKTZUudg3jFc HIm0vmhBAX+/2Fg1wrADe0aqx53yZv40u9sJX607KZed6cmvJYwZLOBQp9Sb9L1blLcm 4k+zaofNOnJXbumt9TxQBtGNSP1G+5qfllXnViGs+lILbTwp4HXsrnhHnnZp6dgtdo7T OuNYmC6rT22EmKebvoH3AAEn0VYMMWAqx7tQK7Wvom6igcOTMx4aNQyR48wWWTynorfj PYuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333539; x=1742938339; 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=QSPoYWWiP5ut+52NUoRVWLIF418rfs9djKfkXcCgaag=; b=eTApn9EAIcCGni+1Ick83a8Pgw4gKxugbeq8WrgQ/pFZNWUsFoTjMo9958x2eG0NKq TpOHWelyPq5pF+5lssTCHjLTntJ3VKqlzMF/ERCJ/PHaMgSKcC8+0cL7w5YPNoelklgG Ca495y9pp8W53vilbRZGuk8ocEqO9e8ipvphxuHIRlgOd0iw2tvpY/oi3CGRStJqqYH5 dQ5ZGbscEq7Rmmj0m9F2zYrV1+yKwYwfvylsr5W4dRE4VX1xjrejAQ6m6xka2ozYbQY8 sd3ujp229OVpr+rZnD7YvaaUk9pjBq7oI9X10jPiv+MGQrIPUbff6hMptO5skQG+b0Nf nYfA== X-Gm-Message-State: AOJu0YzQWvXfBZOn2hQL992VQ6u+6iLQyCsJc+9YN9goaHLsTJ2WacKj E1US+cWVeZeCy7glTyQDokNnQNkQjGPBSGB9jDLSss/1dUYzrS48iutnBz2xsjCtftI66sl0zNQ 0 X-Gm-Gg: ASbGncvuQVgpb/Ely8nQOEcL3YhE0ilUEAvOo2//z5LQAq+syNfJK6ZnT/H5bCTKAa+ K6iJHCayj8VfMItl7sbOHht+RPtU4nrIhu+7/4xJB8S7UTza6MzQmLiZnpnzCEWgPGobTENGvVG PiKQa49uJt0zEYwG7jjFlzLKLttIISLijKpJMckU9Y76e6qjSU9hGTQHcwv1X0pQOhb6Dvjf2Aa FSdT8Yy9LlqY3XWhun2QTWesQHgmJdHq5rbTPCNG3PjoDtBKmxvqrliL3egR9ZhsE/D1aMn4HRy Xk9osMS2h11/wiKQ0iRtZG+kar0bSUJ81EiX7uMwXDFP5PvRKU3aYBI820dp+PkTUGhHLZptCuv k X-Received: by 2002:a17:90b:2f4d:b0:2fe:99cf:f579 with SMTP id 98e67ed59e1d1-301bde35951mr377430a91.4.1742333539508; Tue, 18 Mar 2025 14:32:19 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 13/42] accel/tcg: Implement translator_ld*_end Date: Tue, 18 Mar 2025 14:31:38 -0700 Message-ID: <20250318213209.2579218-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Add a new family of translator load functions which take an absolute endianness value in the form of MO_BE/MO_LE. Expand the other translator_ld* functions on top of this. Remove exec/tswap.h from translator.c. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/translator.h | 49 ++++++++++++++++++++++++--------------- accel/tcg/translator.c | 26 +++++++++++++++------ 2 files changed, 49 insertions(+), 26 deletions(-) diff --git a/include/exec/translator.h b/include/exec/translator.h index 205dd85bba..3c32655569 100644 --- a/include/exec/translator.h +++ b/include/exec/translator.h @@ -18,7 +18,7 @@ * member in your target-specific DisasContext. */ -#include "qemu/bswap.h" +#include "exec/memop.h" #include "exec/vaddr.h" /** @@ -181,42 +181,53 @@ bool translator_io_start(DisasContextBase *db); */ uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, vaddr pc); -uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc); -uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc); -uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc); +uint16_t translator_lduw_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian); +uint32_t translator_ldl_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian); +uint64_t translator_ldq_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian); + +#ifdef COMPILING_PER_TARGET +static inline uint16_t +translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc) +{ + return translator_lduw_end(env, db, pc, MO_TE); +} + +static inline uint32_t +translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc) +{ + return translator_ldl_end(env, db, pc, MO_TE); +} + +static inline uint64_t +translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc) +{ + return translator_ldq_end(env, db, pc, MO_TE); +} static inline uint16_t translator_lduw_swap(CPUArchState *env, DisasContextBase *db, vaddr pc, bool do_swap) { - uint16_t ret = translator_lduw(env, db, pc); - if (do_swap) { - ret = bswap16(ret); - } - return ret; + return translator_lduw_end(env, db, pc, MO_TE ^ (do_swap * MO_BSWAP)); } static inline uint32_t translator_ldl_swap(CPUArchState *env, DisasContextBase *db, vaddr pc, bool do_swap) { - uint32_t ret = translator_ldl(env, db, pc); - if (do_swap) { - ret = bswap32(ret); - } - return ret; + return translator_ldl_end(env, db, pc, MO_TE ^ (do_swap * MO_BSWAP)); } static inline uint64_t translator_ldq_swap(CPUArchState *env, DisasContextBase *db, vaddr pc, bool do_swap) { - uint64_t ret = translator_ldq(env, db, pc); - if (do_swap) { - ret = bswap64(ret); - } - return ret; + return translator_ldq_end(env, db, pc, MO_TE ^ (do_swap * MO_BSWAP)); } +#endif /* COMPILING_PER_TARGET */ /** * translator_fake_ld - fake instruction load diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 6fd9237298..7ef04fc597 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -8,6 +8,7 @@ */ #include "qemu/osdep.h" +#include "qemu/bswap.h" #include "qemu/log.h" #include "qemu/error-report.h" #include "exec/exec-all.h" @@ -15,7 +16,6 @@ #include "exec/cpu-mmu-index.h" #include "exec/translator.h" #include "exec/plugin-gen.h" -#include "exec/tswap.h" #include "tcg/tcg-op-common.h" #include "internal-target.h" #include "disas/disas.h" @@ -468,7 +468,8 @@ uint8_t translator_ldub(CPUArchState *env, DisasContextBase *db, vaddr pc) return val; } -uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc) +uint16_t translator_lduw_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian) { uint16_t val; @@ -477,10 +478,14 @@ uint16_t translator_lduw(CPUArchState *env, DisasContextBase *db, vaddr pc) val = cpu_ldw_code_mmu(env, pc, oi, 0); record_save(db, pc, &val, sizeof(val)); } - return tswap16(val); + if (endian & MO_BSWAP) { + val = bswap16(val); + } + return val; } -uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc) +uint32_t translator_ldl_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian) { uint32_t val; @@ -489,10 +494,14 @@ uint32_t translator_ldl(CPUArchState *env, DisasContextBase *db, vaddr pc) val = cpu_ldl_code_mmu(env, pc, oi, 0); record_save(db, pc, &val, sizeof(val)); } - return tswap32(val); + if (endian & MO_BSWAP) { + val = bswap32(val); + } + return val; } -uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc) +uint64_t translator_ldq_end(CPUArchState *env, DisasContextBase *db, + vaddr pc, MemOp endian) { uint64_t val; @@ -501,7 +510,10 @@ uint64_t translator_ldq(CPUArchState *env, DisasContextBase *db, vaddr pc) val = cpu_ldq_code_mmu(env, pc, oi, 0); record_save(db, pc, &val, sizeof(val)); } - return tswap64(val); + if (endian & MO_BSWAP) { + val = bswap64(val); + } + return val; } void translator_fake_ld(DisasContextBase *db, const void *data, size_t len) From patchwork Tue Mar 18 21:31:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874420 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75790wru; Tue, 18 Mar 2025 14:34:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVJ0NkoMwjLmQKZTyCW8LqUFCYbjojqFLA34NLkz0G6V1B/xfkptgupyqhW7waeFwZ9kUgYtQ==@linaro.org X-Google-Smtp-Source: AGHT+IHcfFnw7PDqROeC69+917BB0JO60kQlkL0+iE6KG6RcxOxu+jRRuB8VWybH0fdaX6tvWgO9 X-Received: by 2002:a05:620a:1917:b0:7c5:5791:122b with SMTP id af79cd13be357-7c5a847c616mr39464585a.37.1742333655399; Tue, 18 Mar 2025 14:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333655; cv=none; d=google.com; s=arc-20240605; b=Fsb96Dwbj3uyb8WxSM32fVYX5Apbo8NPQ9WyTQr5pd7JyoAn/q+RNIZfxYXo/qzqKy 0V0vlQoJeOFaZeQ+aY/PGcJHnptULapc6JTDCgntg4rw4OZ51P02Rd2R1eIgyX/+l4+S 1RYhzvMtiaF/5Mqw4R26aoXRePZBn+4G5malY/CooDQt9x2bi6sOfUuYxFsXo6LtyVhU 4BXBLf/rVjhg7FhzkGRymlQj1VzXX0fw9GwKrEopE9tWi4R0wJ2j6dEMFpQ7gUMfXulM 7FuA7ja+JWRVeKszDcltWgQTXVtprlXfeQk4eoacb/liO6TgZC6gJpQrFqCD2Qqg7rwF CXGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EXxySmM5H2uZxfcMpHXVVabc3DpRRBx3hmcc7DOhhC4=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=g/9xQ5cdbweWPZrJtc9Z16FbyT0Pd/KFux1jePVTbk3rNBxcbm3NiLNflOVIdHdUhv bBTwZa7sfe23B/QxubYcVpwhx6d6XdDsGq6FE7JvKPcWPPPUNgmlL4AP7Eu0+yqzkJL/ VqKYLD1V0ufDyFEYe49PYo1LmwQgnH5k6VHCgPueb+qnCeBPF80PlZZMtkbPoR9qHN3c 3A+AkvGZlZqYEt8KrjB9zfVWNzRY5i5xC/BCntIylHrXHdCmb8y2nOb5MbrMlKK5sR2n lKznH2fUwXLczAqgH6LP/BOFy6G/AovyMp/dpfiG9nF/1SzyrPH5kolc5uZTalaCxpdE g0Bg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FJWI1NbP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573b95422si1261391985a.157.2025.03.18.14.34.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:34:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FJWI1NbP; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueYO-0001RT-Ir; Tue, 18 Mar 2025 17:32:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXv-0001Fq-Ma for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:26 -0400 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXt-0000l7-Mg for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:23 -0400 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-3014678689aso5033010a91.0 for ; Tue, 18 Mar 2025 14:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333540; x=1742938340; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EXxySmM5H2uZxfcMpHXVVabc3DpRRBx3hmcc7DOhhC4=; b=FJWI1NbPE92AMuGYqNRP2DgHzvpQB62CBdY5a7m2zBaRvGWdF8id7PEFvrdij/rt/U lPsX9MBm0hzv/V31xrofp87+z7Fn2liTIYtn5QZuL88Rm1TjmC2xDuY8K5f/HvhSAXHm k9DmtZUAdbCKWgLtp0CbXzhUGr5ufXPfEfzi1YGI65/VFxdHBV7x7BmBpFiwTn/HcAkX gtZD5FWdOSQp0CRbQs5kLdojUigqFf7AjzdjaEMhnvnha622nz1lCfFNJ3cEN3A5J/aR /dIh3iYF36gBN25N2tPllK+BKETfygn8PB6BZRw8NDaDpv4a/0MJv+HhqZi9Em6xGmJ7 0+mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333540; x=1742938340; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EXxySmM5H2uZxfcMpHXVVabc3DpRRBx3hmcc7DOhhC4=; b=skO2RF5tsZfEei63muNtSmfbGLm7Vw7ZSRWSBou8KXL4YxpVRWO2XiqxHr+hH+IDgI dDztOvQzAloxB/qxMXVXBmKoQ8JUbg8iPGMwsi6CFjbPdM7YU0se8fJeh/cocIfaP421 xAs+kXtY6SMEHB508ZjLGZIvsII8FUM3YphTHCKEgTtl1Pfsz3Swjhj6SRyXa+88q+J9 ZVi+8204vbgiq8G5ngo/LTuZY6RCnZ45X2f0IBTLsYYOu0nvgE+UtPGYc6IGlC3NxlA9 3AIg007mNyx08M6HylFvVXAHMVpgHAxJtplKSO7zvZomQup/RTYkwvlsBfQrW1KLedqG kOGg== X-Gm-Message-State: AOJu0Yy9P0iiLD5/Za37JixMQMfkJA+xI0pKWNRGKNAjNbLRFSsABRfF P5nX1Af7PWqATttyX4YPGOqPbKnkpkZ4ZQAduxnUKk9ex3TVU7xdeKx4tpjX/8cpEphaB3PftWR F X-Gm-Gg: ASbGncsGIJTcmezHkyjdJ4tQLePCkni/V+cr8yjYoNa2GMfesT3CHAjs264/Jjxs58g N+p0mZzRT0i+QTcG17QvW5RiTcop2mkqlNzicQvAPOQGxmnyon7FMoXZR5nYQbJi/94NStqVnWS wdxqiXeYj0pKf/rn1jk0C6I/62pzPTUXMcKsjVX+FbHRe9owcsmqNzGM00pbbWqT2o/6OMGSDrX /GIu9K84fFH2qcDGCCZdwMWSimOmsXhXTcDgvE5ei3WUc5jG46LD5+Xl+d7i0O587NUKjOPvP3u DE2tALfOEQqzs8w/YuCx/ouUMgllHN/vemPnCPE4o3U5RmFNfSL3vdIvChzMeqP5Gx9at+Vvrf4 YIpsi/NnHKi0= X-Received: by 2002:a17:90b:17cd:b0:2ee:f80c:6889 with SMTP id 98e67ed59e1d1-301be221d24mr293321a91.33.1742333540143; Tue, 18 Mar 2025 14:32:20 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:19 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 14/42] accel/tcg: Remove mmap_lock/unlock from watchpoint.c Date: Tue, 18 Mar 2025 14:31:39 -0700 Message-ID: <20250318213209.2579218-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The mmap_lock is user-only, whereas watchpoint.c is only compiled for system mode. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/watchpoint.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/accel/tcg/watchpoint.c b/accel/tcg/watchpoint.c index 65b21884ce..cfb37a49e7 100644 --- a/accel/tcg/watchpoint.c +++ b/accel/tcg/watchpoint.c @@ -124,17 +124,14 @@ void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, } cpu->watchpoint_hit = wp; - mmap_lock(); /* This call also restores vCPU state */ tb_check_watchpoint(cpu, ra); if (wp->flags & BP_STOP_BEFORE_ACCESS) { cpu->exception_index = EXCP_DEBUG; - mmap_unlock(); cpu_loop_exit(cpu); } else { /* Force execution of one insn next time. */ cpu->cflags_next_tb = 1 | CF_NOIRQ | curr_cflags(cpu); - mmap_unlock(); cpu_loop_exit_noexc(cpu); } } else { From patchwork Tue Mar 18 21:31:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874415 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75483wru; Tue, 18 Mar 2025 14:33:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVj39bKG3+f47HBicu0eLZs5y7Pwaok4V364pERcBM12yLTRs0MmNbY/pDxJZhm+UkVKjnoxQ==@linaro.org X-Google-Smtp-Source: AGHT+IFSLaJ8SZv7EKROnIAW8pHJhNWbpISpBwLxFju4O8w+DojcBpTYrG6F7CTf75u6QzYOooy0 X-Received: by 2002:a05:620a:2616:b0:7c5:3da2:fc75 with SMTP id af79cd13be357-7c5a8396adbmr27064985a.24.1742333602095; Tue, 18 Mar 2025 14:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333602; cv=none; d=google.com; s=arc-20240605; b=HIvVkFxXIKb1Rf8MmqpdgtuAMLIClXWxYfF7eM2KTrhXOvB9xYPMJRuf9A9rOXgcZr hT10dWJ4ikNRnfbnI7tHsAOVpZ/LaOeQjS7uFy9VCC8Al0h3DXgG6uQvzbklwqoXwzad D8OA1q2k7E+CHp8f03dD6/uCyW67AhpuQKPDhucHT+QhPHB6wqVqqXbro3I+pfva6Bld a3dGItYOMHo5wToDod9cH9YxJDB6s3e1ZE3gM3gPNbCRGsIoebTqwATZLsGqnrp0KC1r BGAPYj7+bg3chX+LYHgkJ9zySjZ/NTUy2qBMO2BQ2Z8grfUjR6D5sBK0r+Jvu/wm17GV /BlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ND0Di9AWhbRdiSFtP1yfC5dCcVpda7GL/aN3C0ZIrvs=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=XrGnreiTKtdUx8ZqMZhtUdKK1MAgs5HA7ys8nUWlQOpDq86HcxLWWLRB9DPsLOHqxs 0RctsVAa7PlGo+P2pXWZKYccVJTplLXrAeGS4fhT7C3i71gGxAgSZ0Mm+ceIgXuJecEQ sKzFWs/rPYVomQBt9q0q9QxJkYmN8QD8MlnmMw2P7qPk3mnbc9bm3LSFFXSFcu/SRL2E Fojs3CxQzIT39Aslxy4K4/YsT9rCyLKopQKpJ0S6G3DxfZz3qbbgkbhVY8MTSbj1Tn39 6kOPYPNIsFVKCNAdUdUgP5wr4Zktbmd+4Vvv5IOrWy9tUlP5LjRmRg3wAVpNyHygQOOs FZ/A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="bFT/lf3w"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573b72eccsi1274761285a.56.2025.03.18.14.33.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:33:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="bFT/lf3w"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueYB-0001MO-Dp; Tue, 18 Mar 2025 17:32:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXw-0001GD-Rp for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:26 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXu-0000lP-C2 for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:24 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-22438c356c8so107498375ad.1 for ; Tue, 18 Mar 2025 14:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333541; x=1742938341; 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=ND0Di9AWhbRdiSFtP1yfC5dCcVpda7GL/aN3C0ZIrvs=; b=bFT/lf3wqosoVdyIceXskPORWaaDTfGyxNvVuMt237DPSUylBr8kZQsAOoeplvBLbH 6MPTfnKyrt0TzhxMlMjpz8lSQ55VKPqE2fRlGLnQQitYprp/O6HitjxRbWYZsarNBlCi ni+8xAHEkzWOXs+pGEeXqxwSdhtpl2TjNitBrNGyspFKt824SwPxQi1ZKUUHCbVogBVF rBi2sjkzzc+w+tpxsjslDwLRH6sSlz/mMwANGeL6p9xR3mlmi9b1QPPyNPCkoeHqLFKQ yRfP+6wAVkBkdm3Rn409tlAhOF5wvgJ4mHJCcMqwE334jCHO8tkHOJqRMG1yMj3KKKiG gs8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333541; x=1742938341; 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=ND0Di9AWhbRdiSFtP1yfC5dCcVpda7GL/aN3C0ZIrvs=; b=k1BT61rI24wXeTQSNhLDpBqUFw3Vp9xC0vxjOFoatLxWSh3s3ihtuLEoYHKZ66k7fq eOp+FoQtZQgNXy/XHJtLgkaeLDQFiQWEgryTEZBmq6dZw4sZlXSLXtPv3TbdNZfnyJmn o6VkOnLL6Y7plv63DydWMFGU/IzoKHQeqKSYF89yrcl7QtdyyyGu/2LSEiBTniDH4QtT J6mHjOZmC6ASG5wjFJPnEZCeecKu5DcvofWX8VSLO2iAACVDqILiskeNK3g9sxUXdgtp uS81xrM1vSLwhq/AELHNI0LVv3vpIBmfWdCoDlwhWW//zFvL3IP351SvUsg1EcDyI7BX th+A== X-Gm-Message-State: AOJu0YwlNqJL0k4IpRlSSFhXEiubWdyJZm4OuOBvLNYMiMJmU25YVrSL vpTtoVgxEw+kKSpE0qGpx7BacOTRmhP0KIbxIhgGToG4TVtuPAtdOU10P8o0p+cid4Lur3eGpSO Z X-Gm-Gg: ASbGncuTeTF9fV4XYwkAIEh3wTp96RbIIjFm/LGWVz9F/aXqM9jR2GufHQOE+3b1WWq /wMXsa3QSbNN8JlW+6j4fE/1tJRW4L+ptHP2pbrkpab/X/iF780o8P6WTeceDoBa15N9/Au2kgX NcYYVqQ3jYJqw3QtWsuISnQ8PqhJPNNDgps0ydI87MbbinP2Kw2oHHxmlhIaybPDSkGqVSSZJnj E8XI8oqpB/KoLuRoBaz7E+ztKfO7jE8/u4CWzjDu2gCUaQ1fHSgCKTPgUIK6btMEBWc3pntuAJ7 y0spT22AWaozIJINJtlxo28BqUjHMvtAedi5BMVi+sns3j+mgw9fNHEBrfy3yG8H7OirhPiu6QK nUlLf11wgJeM= X-Received: by 2002:a05:6a21:329c:b0:1f5:8eec:e521 with SMTP id adf61e73a8af0-1fbeba8d6d0mr294393637.15.1742333540983; Tue, 18 Mar 2025 14:32:20 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 15/42] include/exec: Split out mmap-lock.h Date: Tue, 18 Mar 2025 14:31:40 -0700 Message-ID: <20250318213209.2579218-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Split out mmap_lock, et al from page-protection.h to a new header. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/internal-target.h | 1 + include/exec/mmap-lock.h | 33 +++++++++++++++++++++++++++++++++ include/exec/page-protection.h | 22 ---------------------- accel/tcg/cpu-exec.c | 1 + accel/tcg/tb-maint.c | 1 + accel/tcg/translate-all.c | 1 + linux-user/arm/cpu_loop.c | 1 + linux-user/elfload.c | 1 + linux-user/flatload.c | 1 + linux-user/mmap.c | 1 + linux-user/syscall.c | 1 + target/arm/helper.c | 1 + 12 files changed, 43 insertions(+), 22 deletions(-) create mode 100644 include/exec/mmap-lock.h diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index 2cdf11c905..c88f007ffb 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -13,6 +13,7 @@ #include "exec/translation-block.h" #include "tb-internal.h" #include "tcg-target-mo.h" +#include "exec/mmap-lock.h" /* * Access to the various translations structures need to be serialised diff --git a/include/exec/mmap-lock.h b/include/exec/mmap-lock.h new file mode 100644 index 0000000000..eb02dd409c --- /dev/null +++ b/include/exec/mmap-lock.h @@ -0,0 +1,33 @@ +/* + * QEMU user-only mmap lock, with stubs for system mode + * + * Copyright (c) 2003 Fabrice Bellard + * + * SPDX-License-Identifier: LGPL-2.1+ + */ +#ifndef EXEC_MMAP_LOCK_H +#define EXEC_MMAP_LOCK_H + +#ifdef CONFIG_USER_ONLY + +void TSA_NO_TSA mmap_lock(void); +void TSA_NO_TSA mmap_unlock(void); +bool have_mmap_lock(void); + +static inline void mmap_unlock_guard(void *unused) +{ + mmap_unlock(); +} + +#define WITH_MMAP_LOCK_GUARD() \ + for (int _mmap_lock_iter __attribute__((cleanup(mmap_unlock_guard))) \ + = (mmap_lock(), 0); _mmap_lock_iter == 0; _mmap_lock_iter = 1) + +#else + +static inline void mmap_lock(void) {} +static inline void mmap_unlock(void) {} +#define WITH_MMAP_LOCK_GUARD() + +#endif /* CONFIG_USER_ONLY */ +#endif /* EXEC_MMAP_LOCK_H */ diff --git a/include/exec/page-protection.h b/include/exec/page-protection.h index 3e0a8a0333..c43231af8b 100644 --- a/include/exec/page-protection.h +++ b/include/exec/page-protection.h @@ -38,26 +38,4 @@ */ #define PAGE_PASSTHROUGH 0x0800 -#ifdef CONFIG_USER_ONLY - -void TSA_NO_TSA mmap_lock(void); -void TSA_NO_TSA mmap_unlock(void); -bool have_mmap_lock(void); - -static inline void mmap_unlock_guard(void *unused) -{ - mmap_unlock(); -} - -#define WITH_MMAP_LOCK_GUARD() \ - for (int _mmap_lock_iter __attribute__((cleanup(mmap_unlock_guard))) \ - = (mmap_lock(), 0); _mmap_lock_iter == 0; _mmap_lock_iter = 1) -#else - -static inline void mmap_lock(void) {} -static inline void mmap_unlock(void) {} -#define WITH_MMAP_LOCK_GUARD() - -#endif /* !CONFIG_USER_ONLY */ - #endif diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index ef3d967e3a..372b876604 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -27,6 +27,7 @@ #include "disas/disas.h" #include "exec/cpu-common.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "exec/translation-block.h" #include "tcg/tcg.h" #include "qemu/atomic.h" diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 3f1bebf6ab..d5899ad047 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -24,6 +24,7 @@ #include "exec/log.h" #include "exec/exec-all.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "exec/tb-flush.h" #include "tb-internal.h" #include "system/tcg.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 82bc16bd53..16e5043597 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -45,6 +45,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "tb-internal.h" #include "exec/translator.h" #include "exec/tb-flush.h" diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index 7416e3216e..e8417d0406 100644 --- a/linux-user/arm/cpu_loop.c +++ b/linux-user/arm/cpu_loop.c @@ -25,6 +25,7 @@ #include "signal-common.h" #include "semihosting/common-semi.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "user/page-protection.h" #include "target/arm/syndrome.h" diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 8799e4ea27..f54054dce3 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -10,6 +10,7 @@ #include "user/tswap-target.h" #include "user/page-protection.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "exec/translation-block.h" #include "user/guest-base.h" #include "user-internals.h" diff --git a/linux-user/flatload.c b/linux-user/flatload.c index d5cb1830dd..4beb3ed1b9 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -35,6 +35,7 @@ #include "qemu.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "user-internals.h" #include "loader.h" #include "user-mmap.h" diff --git a/linux-user/mmap.c b/linux-user/mmap.c index d1f36e6f16..f88a80c31e 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -21,6 +21,7 @@ #include "trace.h" #include "exec/log.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "exec/tb-flush.h" #include "exec/translation-block.h" #include "qemu.h" diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b32de763f7..4928f0b080 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -26,6 +26,7 @@ #include "tcg/startup.h" #include "target_mman.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "exec/tb-flush.h" #include "exec/translation-block.h" #include diff --git a/target/arm/helper.c b/target/arm/helper.c index bb445e30cd..0454b06a6c 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -14,6 +14,7 @@ #include "cpu-features.h" #include "exec/helper-proto.h" #include "exec/page-protection.h" +#include "exec/mmap-lock.h" #include "qemu/main-loop.h" #include "qemu/timer.h" #include "qemu/bitops.h" From patchwork Tue Mar 18 21:31:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874438 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76738wru; Tue, 18 Mar 2025 14:36:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVhZZJYo4omcqcvWAERloI1VGI1xFLsXGLJgDCvxdCxKRaHbhnJ1GK9uiOhuRGIrYXgbTNKqQ==@linaro.org X-Google-Smtp-Source: AGHT+IHkANUXvBMmZEN0Q3nzQYYsB7uzmMbDvwI1fihDC2WWSH/nO3D7DzCmUR1yWZmZQBHnbQt8 X-Received: by 2002:a05:620a:1714:b0:7c5:3c62:804c with SMTP id af79cd13be357-7c5a839694emr37835085a.21.1742333807029; Tue, 18 Mar 2025 14:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333807; cv=none; d=google.com; s=arc-20240605; b=Nh0Ipno424N3Hn2kJRI//eLl829y5Y0wcMjX4RagmFJZLPODNexoJdwU+1wawTFlul Tvtcw1GzKiAvbVSiGvSQfJK7YxaYo0ieCaNJa7lZUPZ3U54fzjG2BSS1IvD23g2WyL9Q 7/98+5k+CUTmj2Moi8loKQ4LaUxgdQhKrxo0h+n0Gl30WDWMU1ArvYJsOtb1qUF6KAln K6h8LrniFK1qEYIKDBsEGQexXVSySA0zhuS8UeIdBciZimOjhcHpkwU6v8Dmlhg5V8Rs zyaUpX0A5bpgrf8+OBWa8Dw6EuBc1FfV875Zqe8dnUBxF3v+dhLcSdY1vrTVDp1ERvb1 XffQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5Vy4OS6+kytqNxPY4BirlC8+5dEDTTdRSenPp1EOGp0=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=OmwdtvVj2ALi4Mt1ymvNK8ckHDEYSisUKvioIHsxhMnGL22QB6sgzwTsYg1+x3pqli hPI//Z0whqrlxlhxPPFsCD9QoX4xdvdcENvRzRjRJen79y4G06HrHpe/IeAokZqb/RV1 2zI5X62m+u66Qhx8PE1wszcPMI2zr38zbYEb0+aEqKpl52nA9TunjSwBUQaGYXM8co4E LktwAWZP5tyxjLbMYokeO4B6e9hsIZsg4BzTnLnXHHJWfxgLPkxUDdz+sEFSL9luuoZ1 JlhscUknBu49tGrausVKwMvRYKpHr5gFpXOV/62RihR/oCI4vIeGOaHC9XoeGZMqbI1E rZfA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G0rFfLes; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573d18cd4si1275506285a.491.2025.03.18.14.36.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:36:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G0rFfLes; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZS-0002zU-RL; Tue, 18 Mar 2025 17:34:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY2-0001IV-61 for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:30 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXv-0000ll-Ub for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:28 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-22403cbb47fso116512815ad.0 for ; Tue, 18 Mar 2025 14:32:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333542; x=1742938342; 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=5Vy4OS6+kytqNxPY4BirlC8+5dEDTTdRSenPp1EOGp0=; b=G0rFfLeskA/3Vs54VgNMhjUvuynciyokfyyTaKK6h2S2Hujl0LQOLicLY6p8x5Y8gB s2UdAvSyHNqGgnuZusj6gRoT7a8TXqZ193pN8iP/nJTtuGjnc3lT++exFpgHFKcmXpjL X/tnjVsNpf94dpXn702eZI9ct0SmmFKVrDD6JuBJ4P7u6g1qxLHXi3oRuvctMeCRJb9o ed1k1gngF4gtEJ2BXjSkPLEpF1E32S2+BCbP1t7Y9fYtYwJXhmP4O31O7ydcY6YKa9vx mHmjI+E+FDVxNBWNrSbesfv5OYcZwbsxHGSFMADD03f4o6u0Ztr3/2QvdCvexzEoyWiy nYrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333542; x=1742938342; 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=5Vy4OS6+kytqNxPY4BirlC8+5dEDTTdRSenPp1EOGp0=; b=NIJFe3FtJD3CHBCYnv7PY7avOfEfYHZXSP9vumW6h2/UxF7ctv9UXIvHNNTiCBtAUr 7xuY1Lb4JiKyZH0U1HnYONk4jikusTFuy0eTmhGa8NK9nVVDh5Nv7EqXG1yLVfqK38oE OdQTm03Q0q0iATPz9tmjAvALAuJhJU2xebZ4bx+xBgbZkrqKtFlO/qfrIaQ0XvPmq1nP QN+uM5MSpRX7awY9RG84NwjC5TdFA+cERUNuBXRkqbtL8bgwNd/N2jRk88WmHC/SqjDo Ykqp0KE6tRH2VreupzXxsMFfPKIW55O0sV0ikz/D/mTBc/NYnKKBu09RO+ZhvQUz98xC leaA== X-Gm-Message-State: AOJu0YwNQdUCH4bo+P+fYnAJjufRvVpLZozu3LKoFQfbe9kxcMQPZvZB BXen33T7KM/ioE5m1nK2fRAvICc0fDwqDisGiqhW6dhMXZAyIzH16MHcvUIb3hlq6BHKlo5NM6q I X-Gm-Gg: ASbGnctgeGRR57OivuiKD6xWRFdREgVkOsIbh08RsBKU2ALB2spYccj9N+bVexLo+aJ Pp0Lm5Pylsgf2LIWKxI/JkHNXFigpBk26lg49EfQ93whiEMmaZf5EvsnLGIFI4fo61XDkQ8r7/N v9pLZlUz90/JauUVfECvlV/R6qHqixGsHKXcpCW4UEao8eFR+ev3jDsezQxoG6g8KiCTthVftqY E9ynS3M7ik4U/l7aCJWXdnFCedqa1M7VVF78m6M5D6iNqf7C9/y4w0i5qWD1qbhcBtsgTvoWltk eLWQ9ORvddsLAv4Grda7SGFu86XcP73wLaIvmGHJTDNEfK1x1lbvhlSxp0klnlwgjRYYmcbAHXU C X-Received: by 2002:a05:6a21:b91:b0:1f5:884a:7549 with SMTP id adf61e73a8af0-1fbed503dfamr271644637.41.1742333541941; Tue, 18 Mar 2025 14:32:21 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 16/42] include/system: Move exec/memory.h to system/memory.h Date: Tue, 18 Mar 2025 14:31:41 -0700 Message-ID: <20250318213209.2579218-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the existing includes with sed -i ,exec/memory.h,system/memory.h,g Move the include within cpu-all.h into a !CONFIG_USER_ONLY block. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- hw/arm/strongarm.h | 2 +- hw/display/apple-gfx.h | 2 +- hw/display/framebuffer.h | 2 +- hw/display/vga_int.h | 2 +- hw/hyperv/hv-balloon-our_range_memslots.h | 2 +- hw/intc/ioapic_internal.h | 2 +- hw/net/i82596.h | 2 +- hw/net/pcnet.h | 2 +- hw/tpm/tpm_ppi.h | 2 +- hw/usb/hcd-uhci.h | 2 +- hw/vfio/pci.h | 2 +- hw/virtio/vhost-iova-tree.h | 2 +- include/exec/cpu-all.h | 4 +++- include/exec/ioport.h | 2 +- include/exec/ram_addr.h | 2 +- include/hw/acpi/acpi.h | 2 +- include/hw/acpi/ich9_tco.h | 2 +- include/hw/arm/fsl-imx25.h | 2 +- include/hw/arm/fsl-imx31.h | 2 +- include/hw/arm/fsl-imx6.h | 2 +- include/hw/arm/fsl-imx6ul.h | 2 +- include/hw/arm/omap.h | 2 +- include/hw/arm/stm32l4x5_soc.h | 2 +- include/hw/boards.h | 2 +- include/hw/char/parallel.h | 2 +- include/hw/char/riscv_htif.h | 2 +- include/hw/char/serial-mm.h | 2 +- include/hw/char/serial.h | 2 +- include/hw/display/macfb.h | 2 +- include/hw/fsi/aspeed_apb2opb.h | 2 +- include/hw/fsi/cfam.h | 2 +- include/hw/fsi/fsi-master.h | 2 +- include/hw/fsi/fsi.h | 2 +- include/hw/fsi/lbus.h | 2 +- include/hw/gpio/npcm7xx_gpio.h | 2 +- include/hw/i2c/npcm7xx_smbus.h | 2 +- include/hw/i2c/pm_smbus.h | 2 +- include/hw/i386/apic_internal.h | 2 +- include/hw/i386/x86.h | 2 +- include/hw/ide/ahci.h | 2 +- include/hw/ipmi/ipmi.h | 2 +- include/hw/isa/apm.h | 2 +- include/hw/isa/isa.h | 2 +- include/hw/m68k/q800.h | 2 +- include/hw/mem/npcm7xx_mc.h | 2 +- include/hw/mem/pc-dimm.h | 2 +- include/hw/mips/mips.h | 2 +- include/hw/misc/auxbus.h | 2 +- include/hw/misc/ivshmem-flat.h | 2 +- include/hw/misc/mac_via.h | 2 +- include/hw/misc/npcm7xx_mft.h | 2 +- include/hw/misc/npcm_clk.h | 2 +- include/hw/misc/npcm_gcr.h | 2 +- include/hw/misc/pvpanic.h | 2 +- include/hw/net/dp8393x.h | 2 +- include/hw/net/msf2-emac.h | 2 +- include/hw/nvram/mac_nvram.h | 2 +- include/hw/nvram/npcm7xx_otp.h | 2 +- include/hw/pci-host/fsl_imx8m_phy.h | 2 +- include/hw/pci-host/pam.h | 2 +- include/hw/pci-host/remote.h | 2 +- include/hw/pci/pci.h | 2 +- include/hw/pci/pcie_host.h | 2 +- include/hw/pci/shpc.h | 2 +- include/hw/ppc/mac_dbdma.h | 2 +- include/hw/ppc/pnv_lpc.h | 2 +- include/hw/ppc/pnv_occ.h | 2 +- include/hw/ppc/pnv_sbe.h | 2 +- include/hw/ppc/pnv_xscom.h | 2 +- include/hw/ppc/ppc4xx.h | 2 +- include/hw/ppc/vof.h | 2 +- include/hw/ppc/xics.h | 2 +- include/hw/register.h | 2 +- include/hw/remote/proxy-memory-listener.h | 2 +- include/hw/sh4/sh_intc.h | 2 +- include/hw/southbridge/ich9.h | 2 +- include/hw/sysbus.h | 2 +- include/hw/timer/npcm7xx_timer.h | 2 +- include/hw/tricore/tricore.h | 2 +- include/hw/usb.h | 2 +- include/hw/vfio/vfio-common.h | 2 +- include/hw/vfio/vfio-container-base.h | 2 +- include/hw/virtio/vhost-backend.h | 2 +- include/hw/virtio/vhost.h | 2 +- include/hw/virtio/virtio.h | 2 +- include/hw/xen/xen-pvh-common.h | 2 +- include/hw/xtensa/mx_pic.h | 2 +- include/qemu/iova-tree.h | 2 +- include/qemu/reserved-region.h | 2 +- include/system/dma.h | 2 +- include/system/hostmem.h | 2 +- include/system/kvm_int.h | 2 +- include/{exec => system}/memory.h | 8 ++------ include/system/vhost-user-backend.h | 2 +- migration/rdma.h | 2 +- rust/wrapper.h | 2 +- target/loongarch/cpu.h | 2 +- target/mips/cpu.h | 2 +- accel/kvm/kvm-all.c | 2 +- accel/tcg/cputlb.c | 2 +- backends/tpm/tpm_util.c | 2 +- block/blkio.c | 4 ++-- disas/disas-mon.c | 2 +- hw/acpi/erst.c | 2 +- hw/avr/atmega.c | 2 +- hw/block/fdc-sysbus.c | 2 +- hw/core/cpu-system.c | 2 +- hw/core/loader-fit.c | 2 +- hw/core/loader.c | 2 +- hw/display/edid-region.c | 2 +- hw/hyperv/hyperv.c | 2 +- hw/i386/acpi-common.c | 2 +- hw/i386/acpi-microvm.c | 2 +- hw/i386/pc_piix.c | 2 +- hw/intc/mips_gic.c | 2 +- hw/intc/ompic.c | 2 +- hw/net/ne2000.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/pci-host/remote.c | 2 +- hw/ppc/pnv_homer.c | 2 +- hw/ppc/sam460ex.c | 2 +- hw/remote/iommu.c | 2 +- hw/remote/machine.c | 2 +- hw/remote/proxy-memory-listener.c | 2 +- hw/remote/vfio-user-obj.c | 2 +- hw/s390x/s390-pci-inst.c | 2 +- hw/timer/sh_timer.c | 2 +- hw/vfio/common.c | 2 +- hw/vfio/container.c | 2 +- hw/vfio/platform.c | 2 +- hw/xtensa/sim.c | 2 +- hw/xtensa/virt.c | 2 +- hw/xtensa/xtensa_memory.c | 2 +- hw/xtensa/xtfpga.c | 2 +- migration/dirtyrate.c | 2 +- migration/rdma.c | 2 +- migration/savevm.c | 2 +- monitor/hmp-cmds-target.c | 2 +- stubs/ram-block.c | 2 +- system/dirtylimit.c | 2 +- system/ioport.c | 2 +- system/memory.c | 2 +- system/memory_mapping.c | 2 +- system/physmem.c | 2 +- system/qtest.c | 2 +- target/xtensa/cpu.c | 2 +- tests/qtest/fuzz/generic_fuzz.c | 2 +- tests/qtest/fuzz/qos_fuzz.c | 2 +- tests/unit/test-resv-mem.c | 2 +- ui/console.c | 2 +- util/vfio-helpers.c | 2 +- MAINTAINERS | 2 +- docs/devel/memory.rst | 2 +- scripts/analyze-inclusions | 2 +- 154 files changed, 158 insertions(+), 160 deletions(-) rename include/{exec => system}/memory.h (99%) diff --git a/hw/arm/strongarm.h b/hw/arm/strongarm.h index 192821f6aa..b11b3a3379 100644 --- a/hw/arm/strongarm.h +++ b/hw/arm/strongarm.h @@ -1,7 +1,7 @@ #ifndef STRONGARM_H #define STRONGARM_H -#include "exec/memory.h" +#include "system/memory.h" #include "target/arm/cpu-qom.h" #define SA_CS0 0x00000000 diff --git a/hw/display/apple-gfx.h b/hw/display/apple-gfx.h index 3900cdbabb..a8b1d1efc0 100644 --- a/hw/display/apple-gfx.h +++ b/hw/display/apple-gfx.h @@ -9,7 +9,7 @@ #define QEMU_APPLE_GFX_H #include "qemu/queue.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-properties.h" #include "ui/surface.h" diff --git a/hw/display/framebuffer.h b/hw/display/framebuffer.h index 38fa0dcec6..29a828ce7a 100644 --- a/hw/display/framebuffer.h +++ b/hw/display/framebuffer.h @@ -1,7 +1,7 @@ #ifndef QEMU_FRAMEBUFFER_H #define QEMU_FRAMEBUFFER_H -#include "exec/memory.h" +#include "system/memory.h" /* Framebuffer device helper routines. */ diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index f77c1c1145..60ad26e03e 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -27,7 +27,7 @@ #include "ui/console.h" #include "exec/ioport.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/display/bochs-vbe.h" #include "hw/acpi/acpi_aml_interface.h" diff --git a/hw/hyperv/hv-balloon-our_range_memslots.h b/hw/hyperv/hv-balloon-our_range_memslots.h index df3b686bc7..b1f19d77da 100644 --- a/hw/hyperv/hv-balloon-our_range_memslots.h +++ b/hw/hyperv/hv-balloon-our_range_memslots.h @@ -11,7 +11,7 @@ #define HW_HYPERV_HV_BALLOON_OUR_RANGE_MEMSLOTS_H -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "hv-balloon-page_range_tree.h" diff --git a/hw/intc/ioapic_internal.h b/hw/intc/ioapic_internal.h index 37b8565539..51205767f4 100644 --- a/hw/intc/ioapic_internal.h +++ b/hw/intc/ioapic_internal.h @@ -22,7 +22,7 @@ #ifndef HW_INTC_IOAPIC_INTERNAL_H #define HW_INTC_IOAPIC_INTERNAL_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/intc/ioapic.h" #include "hw/sysbus.h" #include "qemu/notify.h" diff --git a/hw/net/i82596.h b/hw/net/i82596.h index f0bbe810eb..4bdfcaf856 100644 --- a/hw/net/i82596.h +++ b/hw/net/i82596.h @@ -3,7 +3,7 @@ #define I82596_IOPORT_SIZE 0x20 -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #define PORT_RESET 0x00 /* reset 82596 */ diff --git a/hw/net/pcnet.h b/hw/net/pcnet.h index eb7f46aab3..a94356ec30 100644 --- a/hw/net/pcnet.h +++ b/hw/net/pcnet.h @@ -7,7 +7,7 @@ #define PCNET_LOOPTEST_CRC 1 #define PCNET_LOOPTEST_NOCRC 2 -#include "exec/memory.h" +#include "system/memory.h" #include "hw/irq.h" /* BUS CONFIGURATION REGISTERS */ diff --git a/hw/tpm/tpm_ppi.h b/hw/tpm/tpm_ppi.h index bf5d4a300f..88f316ee95 100644 --- a/hw/tpm/tpm_ppi.h +++ b/hw/tpm/tpm_ppi.h @@ -12,7 +12,7 @@ #ifndef TPM_TPM_PPI_H #define TPM_TPM_PPI_H -#include "exec/memory.h" +#include "system/memory.h" typedef struct TPMPPI { MemoryRegion ram; diff --git a/hw/usb/hcd-uhci.h b/hw/usb/hcd-uhci.h index 6d26b94e92..d4664297cf 100644 --- a/hw/usb/hcd-uhci.h +++ b/hw/usb/hcd-uhci.h @@ -28,7 +28,7 @@ #ifndef HW_USB_HCD_UHCI_H #define HW_USB_HCD_UHCI_H -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/timer.h" #include "hw/pci/pci_device.h" #include "hw/usb.h" diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h index d94ecaba68..6c59300248 100644 --- a/hw/vfio/pci.h +++ b/hw/vfio/pci.h @@ -12,7 +12,7 @@ #ifndef HW_VFIO_VFIO_PCI_H #define HW_VFIO_VFIO_PCI_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/pci/pci_device.h" #include "hw/vfio/vfio-common.h" #include "qemu/event_notifier.h" diff --git a/hw/virtio/vhost-iova-tree.h b/hw/virtio/vhost-iova-tree.h index 0c4ba5abd5..08f63b61cd 100644 --- a/hw/virtio/vhost-iova-tree.h +++ b/hw/virtio/vhost-iova-tree.h @@ -11,7 +11,7 @@ #define HW_VIRTIO_VHOST_IOVA_TREE_H #include "qemu/iova-tree.h" -#include "exec/memory.h" +#include "system/memory.h" typedef struct VhostIOVATree VhostIOVATree; diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 6108351f58..981a08e3bb 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -22,9 +22,11 @@ #include "exec/page-protection.h" #include "exec/cpu-common.h" #include "exec/cpu-interrupt.h" -#include "exec/memory.h" #include "exec/tswap.h" #include "hw/core/cpu.h" +#ifndef CONFIG_USER_ONLY +#include "system/memory.h" +#endif /* some important defines: * diff --git a/include/exec/ioport.h b/include/exec/ioport.h index 4397f12f93..ecea3575bc 100644 --- a/include/exec/ioport.h +++ b/include/exec/ioport.h @@ -24,7 +24,7 @@ #ifndef IOPORT_H #define IOPORT_H -#include "exec/memory.h" +#include "system/memory.h" #define MAX_IOPORTS (64 * 1024) #define IOPORTS_MASK (MAX_IOPORTS - 1) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 92e8708af7..8677761af5 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -26,7 +26,7 @@ #include "exec/ramlist.h" #include "exec/ramblock.h" #include "exec/exec-all.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/target_page.h" #include "qemu/rcu.h" diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h index d1a4fa2af8..4b8ee094c4 100644 --- a/include/hw/acpi/acpi.h +++ b/include/hw/acpi/acpi.h @@ -21,7 +21,7 @@ */ #include "qemu/notify.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/acpi/acpi_dev_interface.h" /* diff --git a/include/hw/acpi/ich9_tco.h b/include/hw/acpi/ich9_tco.h index 2562a7cf39..b3c3f69451 100644 --- a/include/hw/acpi/ich9_tco.h +++ b/include/hw/acpi/ich9_tco.h @@ -10,7 +10,7 @@ #ifndef HW_ACPI_TCO_H #define HW_ACPI_TCO_H -#include "exec/memory.h" +#include "system/memory.h" #include "migration/vmstate.h" /* As per ICH9 spec, the internal timer has an error of ~0.6s on every tick */ diff --git a/include/hw/arm/fsl-imx25.h b/include/hw/arm/fsl-imx25.h index df2f83980f..b68d4334a0 100644 --- a/include/hw/arm/fsl-imx25.h +++ b/include/hw/arm/fsl-imx25.h @@ -29,7 +29,7 @@ #include "hw/sd/sdhci.h" #include "hw/usb/chipidea.h" #include "hw/watchdog/wdt_imx2.h" -#include "exec/memory.h" +#include "system/memory.h" #include "target/arm/cpu.h" #include "qom/object.h" diff --git a/include/hw/arm/fsl-imx31.h b/include/hw/arm/fsl-imx31.h index 40c593a5cf..41232a2237 100644 --- a/include/hw/arm/fsl-imx31.h +++ b/include/hw/arm/fsl-imx31.h @@ -25,7 +25,7 @@ #include "hw/i2c/imx_i2c.h" #include "hw/gpio/imx_gpio.h" #include "hw/watchdog/wdt_imx2.h" -#include "exec/memory.h" +#include "system/memory.h" #include "target/arm/cpu.h" #include "qom/object.h" diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h index 9da32fc189..124bbd478f 100644 --- a/include/hw/arm/fsl-imx6.h +++ b/include/hw/arm/fsl-imx6.h @@ -34,7 +34,7 @@ #include "hw/usb/imx-usb-phy.h" #include "hw/pci-host/designware.h" #include "hw/or-irq.h" -#include "exec/memory.h" +#include "system/memory.h" #include "cpu.h" #include "qom/object.h" diff --git a/include/hw/arm/fsl-imx6ul.h b/include/hw/arm/fsl-imx6ul.h index 8277b0e8b2..4e3209b25b 100644 --- a/include/hw/arm/fsl-imx6ul.h +++ b/include/hw/arm/fsl-imx6ul.h @@ -33,7 +33,7 @@ #include "hw/net/imx_fec.h" #include "hw/usb/chipidea.h" #include "hw/usb/imx-usb-phy.h" -#include "exec/memory.h" +#include "system/memory.h" #include "cpu.h" #include "qom/object.h" #include "qemu/units.h" diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index 7cb87ea89c..6185507373 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -20,7 +20,7 @@ #ifndef HW_ARM_OMAP_H #define HW_ARM_OMAP_H -#include "exec/memory.h" +#include "system/memory.h" #include "target/arm/cpu-qom.h" #include "qemu/log.h" #include "qom/object.h" diff --git a/include/hw/arm/stm32l4x5_soc.h b/include/hw/arm/stm32l4x5_soc.h index c243fb0e7f..c2fae6e23f 100644 --- a/include/hw/arm/stm32l4x5_soc.h +++ b/include/hw/arm/stm32l4x5_soc.h @@ -24,7 +24,7 @@ #ifndef HW_ARM_STM32L4x5_SOC_H #define HW_ARM_STM32L4x5_SOC_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/arm/armv7m.h" #include "hw/or-irq.h" #include "hw/misc/stm32l4x5_syscfg.h" diff --git a/include/hw/boards.h b/include/hw/boards.h index f22b2e7fc7..02f43ac5d4 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -3,7 +3,7 @@ #ifndef HW_BOARDS_H #define HW_BOARDS_H -#include "exec/memory.h" +#include "system/memory.h" #include "system/hostmem.h" #include "system/blockdev.h" #include "qapi/qapi-types-machine.h" diff --git a/include/hw/char/parallel.h b/include/hw/char/parallel.h index cfb97cc7cc..7b04478226 100644 --- a/include/hw/char/parallel.h +++ b/include/hw/char/parallel.h @@ -1,7 +1,7 @@ #ifndef HW_PARALLEL_H #define HW_PARALLEL_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/isa/isa.h" #include "hw/irq.h" #include "chardev/char-fe.h" diff --git a/include/hw/char/riscv_htif.h b/include/hw/char/riscv_htif.h index df493fdf6b..ee0ca29902 100644 --- a/include/hw/char/riscv_htif.h +++ b/include/hw/char/riscv_htif.h @@ -22,7 +22,7 @@ #include "chardev/char.h" #include "chardev/char-fe.h" -#include "exec/memory.h" +#include "system/memory.h" #define TYPE_HTIF_UART "riscv.htif.uart" diff --git a/include/hw/char/serial-mm.h b/include/hw/char/serial-mm.h index 62a8489d69..77abd098e0 100644 --- a/include/hw/char/serial-mm.h +++ b/include/hw/char/serial-mm.h @@ -27,7 +27,7 @@ #define HW_SERIAL_MM_H #include "hw/char/serial.h" -#include "exec/memory.h" +#include "system/memory.h" #include "chardev/char.h" #include "hw/sysbus.h" #include "qom/object.h" diff --git a/include/hw/char/serial.h b/include/hw/char/serial.h index 942b372df6..4bf90a46f3 100644 --- a/include/hw/char/serial.h +++ b/include/hw/char/serial.h @@ -27,7 +27,7 @@ #define HW_SERIAL_H #include "chardev/char-fe.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/fifo8.h" #include "qom/object.h" diff --git a/include/hw/display/macfb.h b/include/hw/display/macfb.h index 27cebefc9e..0fae1f33a6 100644 --- a/include/hw/display/macfb.h +++ b/include/hw/display/macfb.h @@ -13,7 +13,7 @@ #ifndef MACFB_H #define MACFB_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/irq.h" #include "hw/nubus/nubus.h" #include "hw/sysbus.h" diff --git a/include/hw/fsi/aspeed_apb2opb.h b/include/hw/fsi/aspeed_apb2opb.h index f6a2387abf..878619eafa 100644 --- a/include/hw/fsi/aspeed_apb2opb.h +++ b/include/hw/fsi/aspeed_apb2opb.h @@ -8,7 +8,7 @@ #ifndef FSI_ASPEED_APB2OPB_H #define FSI_ASPEED_APB2OPB_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/fsi/fsi-master.h" #include "hw/sysbus.h" diff --git a/include/hw/fsi/cfam.h b/include/hw/fsi/cfam.h index 7abc3b287b..cceb4bd6f1 100644 --- a/include/hw/fsi/cfam.h +++ b/include/hw/fsi/cfam.h @@ -7,7 +7,7 @@ #ifndef FSI_CFAM_H #define FSI_CFAM_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/fsi/fsi.h" #include "hw/fsi/lbus.h" diff --git a/include/hw/fsi/fsi-master.h b/include/hw/fsi/fsi-master.h index 68e5f56db2..b634ecd393 100644 --- a/include/hw/fsi/fsi-master.h +++ b/include/hw/fsi/fsi-master.h @@ -7,7 +7,7 @@ #ifndef FSI_FSI_MASTER_H #define FSI_FSI_MASTER_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "hw/fsi/fsi.h" #include "hw/fsi/cfam.h" diff --git a/include/hw/fsi/fsi.h b/include/hw/fsi/fsi.h index e00f6ef078..f34765ed80 100644 --- a/include/hw/fsi/fsi.h +++ b/include/hw/fsi/fsi.h @@ -7,7 +7,7 @@ #ifndef FSI_FSI_H #define FSI_FSI_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "hw/fsi/lbus.h" #include "qemu/bitops.h" diff --git a/include/hw/fsi/lbus.h b/include/hw/fsi/lbus.h index 558268c013..12519073cd 100644 --- a/include/hw/fsi/lbus.h +++ b/include/hw/fsi/lbus.h @@ -9,7 +9,7 @@ #include "hw/qdev-core.h" #include "qemu/units.h" -#include "exec/memory.h" +#include "system/memory.h" #define TYPE_FSI_LBUS_DEVICE "fsi.lbus.device" OBJECT_DECLARE_SIMPLE_TYPE(FSILBusDevice, FSI_LBUS_DEVICE) diff --git a/include/hw/gpio/npcm7xx_gpio.h b/include/hw/gpio/npcm7xx_gpio.h index b1d771bd77..7c0bf61a96 100644 --- a/include/hw/gpio/npcm7xx_gpio.h +++ b/include/hw/gpio/npcm7xx_gpio.h @@ -15,7 +15,7 @@ #ifndef NPCM7XX_GPIO_H #define NPCM7XX_GPIO_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" /* Number of pins managed by each controller. */ diff --git a/include/hw/i2c/npcm7xx_smbus.h b/include/hw/i2c/npcm7xx_smbus.h index dc45963c0e..9c544c561b 100644 --- a/include/hw/i2c/npcm7xx_smbus.h +++ b/include/hw/i2c/npcm7xx_smbus.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_SMBUS_H #define NPCM7XX_SMBUS_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/i2c/i2c.h" #include "hw/irq.h" #include "hw/sysbus.h" diff --git a/include/hw/i2c/pm_smbus.h b/include/hw/i2c/pm_smbus.h index 0d74207efb..dafe0df4f6 100644 --- a/include/hw/i2c/pm_smbus.h +++ b/include/hw/i2c/pm_smbus.h @@ -1,7 +1,7 @@ #ifndef PM_SMBUS_H #define PM_SMBUS_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/i2c/smbus_master.h" #define PM_SMBUS_MAX_MSG_SIZE 32 diff --git a/include/hw/i386/apic_internal.h b/include/hw/i386/apic_internal.h index d6e85833da..429278da61 100644 --- a/include/hw/i386/apic_internal.h +++ b/include/hw/i386/apic_internal.h @@ -22,7 +22,7 @@ #define QEMU_APIC_INTERNAL_H #include "cpu.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/timer.h" #include "target/i386/cpu-qom.h" #include "qom/object.h" diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index d43cb3908e..258b1343a1 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -18,7 +18,7 @@ #define HW_I386_X86_H #include "exec/hwaddr.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/boards.h" #include "hw/i386/topology.h" diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index ac0292c634..cd07b87811 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -24,7 +24,7 @@ #ifndef HW_IDE_AHCI_H #define HW_IDE_AHCI_H -#include "exec/memory.h" +#include "system/memory.h" typedef struct AHCIDevice AHCIDevice; diff --git a/include/hw/ipmi/ipmi.h b/include/hw/ipmi/ipmi.h index 77a7213ed9..2882eb7f3d 100644 --- a/include/hw/ipmi/ipmi.h +++ b/include/hw/ipmi/ipmi.h @@ -25,7 +25,7 @@ #ifndef HW_IPMI_H #define HW_IPMI_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/isa/apm.h b/include/hw/isa/apm.h index b6e070c00e..0834539045 100644 --- a/include/hw/isa/apm.h +++ b/include/hw/isa/apm.h @@ -1,7 +1,7 @@ #ifndef APM_H #define APM_H -#include "exec/memory.h" +#include "system/memory.h" #define APM_CNT_IOPORT 0xb2 #define ACPI_PORT_SMI_CMD APM_CNT_IOPORT diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 40d6224a4e..1d852011b3 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -3,7 +3,7 @@ /* ISA bus */ -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ioport.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/m68k/q800.h b/include/hw/m68k/q800.h index 34365c9860..9caaed9692 100644 --- a/include/hw/m68k/q800.h +++ b/include/hw/m68k/q800.h @@ -26,7 +26,7 @@ #include "hw/boards.h" #include "qom/object.h" #include "target/m68k/cpu-qom.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/m68k/q800-glue.h" #include "hw/misc/mac_via.h" #include "hw/net/dp8393x.h" diff --git a/include/hw/mem/npcm7xx_mc.h b/include/hw/mem/npcm7xx_mc.h index 7ed38be243..568cc35fdd 100644 --- a/include/hw/mem/npcm7xx_mc.h +++ b/include/hw/mem/npcm7xx_mc.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_MC_H #define NPCM7XX_MC_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" /** diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index fe0f3ea963..e0dbdd43dc 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -16,7 +16,7 @@ #ifndef QEMU_PC_DIMM_H #define QEMU_PC_DIMM_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/mips/mips.h b/include/hw/mips/mips.h index 101799f7d3..1f3672ba5f 100644 --- a/include/hw/mips/mips.h +++ b/include/hw/mips/mips.h @@ -7,7 +7,7 @@ /* Kernels can be configured with 64KB pages */ #define INITRD_PAGE_SIZE (64 * KiB) -#include "exec/memory.h" +#include "system/memory.h" /* bonito.c */ PCIBus *bonito_init(qemu_irq *pic); diff --git a/include/hw/misc/auxbus.h b/include/hw/misc/auxbus.h index 03cacdee42..ccd18ce209 100644 --- a/include/hw/misc/auxbus.h +++ b/include/hw/misc/auxbus.h @@ -25,7 +25,7 @@ #ifndef HW_MISC_AUXBUS_H #define HW_MISC_AUXBUS_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/misc/ivshmem-flat.h b/include/hw/misc/ivshmem-flat.h index 0c2b015781..09bc3abcad 100644 --- a/include/hw/misc/ivshmem-flat.h +++ b/include/hw/misc/ivshmem-flat.h @@ -14,7 +14,7 @@ #include "qemu/queue.h" #include "qemu/event_notifier.h" #include "chardev/char-fe.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "hw/sysbus.h" diff --git a/include/hw/misc/mac_via.h b/include/hw/misc/mac_via.h index 63cdcf7c69..6a15228150 100644 --- a/include/hw/misc/mac_via.h +++ b/include/hw/misc/mac_via.h @@ -9,7 +9,7 @@ #ifndef HW_MISC_MAC_VIA_H #define HW_MISC_MAC_VIA_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" #include "hw/misc/mos6522.h" #include "hw/input/adb.h" diff --git a/include/hw/misc/npcm7xx_mft.h b/include/hw/misc/npcm7xx_mft.h index d6384382ce..e4b997a6ad 100644 --- a/include/hw/misc/npcm7xx_mft.h +++ b/include/hw/misc/npcm7xx_mft.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_MFT_H #define NPCM7XX_MFT_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/clock.h" #include "hw/irq.h" #include "hw/sysbus.h" diff --git a/include/hw/misc/npcm_clk.h b/include/hw/misc/npcm_clk.h index 8fa1e14bdd..52e972f460 100644 --- a/include/hw/misc/npcm_clk.h +++ b/include/hw/misc/npcm_clk.h @@ -16,7 +16,7 @@ #ifndef NPCM_CLK_H #define NPCM_CLK_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/clock.h" #include "hw/sysbus.h" diff --git a/include/hw/misc/npcm_gcr.h b/include/hw/misc/npcm_gcr.h index d81bb9afb2..702e7fddb1 100644 --- a/include/hw/misc/npcm_gcr.h +++ b/include/hw/misc/npcm_gcr.h @@ -16,7 +16,7 @@ #ifndef NPCM_GCR_H #define NPCM_GCR_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" #include "qom/object.h" diff --git a/include/hw/misc/pvpanic.h b/include/hw/misc/pvpanic.h index 049a94c112..5098693437 100644 --- a/include/hw/misc/pvpanic.h +++ b/include/hw/misc/pvpanic.h @@ -15,7 +15,7 @@ #ifndef HW_MISC_PVPANIC_H #define HW_MISC_PVPANIC_H -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "standard-headers/misc/pvpanic.h" diff --git a/include/hw/net/dp8393x.h b/include/hw/net/dp8393x.h index 4a3f7478be..24273dc1f4 100644 --- a/include/hw/net/dp8393x.h +++ b/include/hw/net/dp8393x.h @@ -22,7 +22,7 @@ #include "hw/sysbus.h" #include "net/net.h" -#include "exec/memory.h" +#include "system/memory.h" #define SONIC_REG_COUNT 0x40 diff --git a/include/hw/net/msf2-emac.h b/include/hw/net/msf2-emac.h index 846ba6e6dc..b5d9127e46 100644 --- a/include/hw/net/msf2-emac.h +++ b/include/hw/net/msf2-emac.h @@ -23,7 +23,7 @@ */ #include "hw/sysbus.h" -#include "exec/memory.h" +#include "system/memory.h" #include "net/net.h" #include "net/eth.h" #include "qom/object.h" diff --git a/include/hw/nvram/mac_nvram.h b/include/hw/nvram/mac_nvram.h index 0c4dfaeff6..e9d8398f84 100644 --- a/include/hw/nvram/mac_nvram.h +++ b/include/hw/nvram/mac_nvram.h @@ -26,7 +26,7 @@ #ifndef MAC_NVRAM_H #define MAC_NVRAM_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" #define MACIO_NVRAM_SIZE 0x2000 diff --git a/include/hw/nvram/npcm7xx_otp.h b/include/hw/nvram/npcm7xx_otp.h index ea4b5d0731..77b05f8b82 100644 --- a/include/hw/nvram/npcm7xx_otp.h +++ b/include/hw/nvram/npcm7xx_otp.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_OTP_H #define NPCM7XX_OTP_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" /* Each OTP module holds 8192 bits of one-time programmable storage */ diff --git a/include/hw/pci-host/fsl_imx8m_phy.h b/include/hw/pci-host/fsl_imx8m_phy.h index 4f4875b37d..5f1b212fd9 100644 --- a/include/hw/pci-host/fsl_imx8m_phy.h +++ b/include/hw/pci-host/fsl_imx8m_phy.h @@ -11,7 +11,7 @@ #include "hw/sysbus.h" #include "qom/object.h" -#include "exec/memory.h" +#include "system/memory.h" #define TYPE_FSL_IMX8M_PCIE_PHY "fsl-imx8m-pcie-phy" OBJECT_DECLARE_SIMPLE_TYPE(FslImx8mPciePhyState, FSL_IMX8M_PCIE_PHY) diff --git a/include/hw/pci-host/pam.h b/include/hw/pci-host/pam.h index 005916f826..44f3908160 100644 --- a/include/hw/pci-host/pam.h +++ b/include/hw/pci-host/pam.h @@ -50,7 +50,7 @@ * 0xf0000 - 0xfffff System BIOS Area Memory Segments */ -#include "exec/memory.h" +#include "system/memory.h" #define SMRAM_C_BASE 0xa0000 #define SMRAM_C_END 0xc0000 diff --git a/include/hw/pci-host/remote.h b/include/hw/pci-host/remote.h index 690a01f0fe..5264c35936 100644 --- a/include/hw/pci-host/remote.h +++ b/include/hw/pci-host/remote.h @@ -11,7 +11,7 @@ #ifndef PCI_HOST_REMOTE_H #define PCI_HOST_REMOTE_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/pci/pcie_host.h" #define TYPE_REMOTE_PCIHOST "remote-pcihost" diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 822fbacdf0..c2fe6caa2c 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -1,7 +1,7 @@ #ifndef QEMU_PCI_H #define QEMU_PCI_H -#include "exec/memory.h" +#include "system/memory.h" #include "system/dma.h" #include "system/host_iommu_device.h" diff --git a/include/hw/pci/pcie_host.h b/include/hw/pci/pcie_host.h index 82d92177da..f09de76bfe 100644 --- a/include/hw/pci/pcie_host.h +++ b/include/hw/pci/pcie_host.h @@ -22,7 +22,7 @@ #define PCIE_HOST_H #include "hw/pci/pci_host.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #define TYPE_PCIE_HOST_BRIDGE "pcie-host-bridge" diff --git a/include/hw/pci/shpc.h b/include/hw/pci/shpc.h index a0789df153..ad1089567a 100644 --- a/include/hw/pci/shpc.h +++ b/include/hw/pci/shpc.h @@ -1,7 +1,7 @@ #ifndef SHPC_H #define SHPC_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/hotplug.h" #include "hw/pci/pci_device.h" #include "migration/vmstate.h" diff --git a/include/hw/ppc/mac_dbdma.h b/include/hw/ppc/mac_dbdma.h index 672c2be471..896ee4a2b1 100644 --- a/include/hw/ppc/mac_dbdma.h +++ b/include/hw/ppc/mac_dbdma.h @@ -23,7 +23,7 @@ #ifndef HW_MAC_DBDMA_H #define HW_MAC_DBDMA_H -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/iov.h" #include "system/dma.h" #include "hw/sysbus.h" diff --git a/include/hw/ppc/pnv_lpc.h b/include/hw/ppc/pnv_lpc.h index 174add4c53..266d56214f 100644 --- a/include/hw/ppc/pnv_lpc.h +++ b/include/hw/ppc/pnv_lpc.h @@ -20,7 +20,7 @@ #ifndef PPC_PNV_LPC_H #define PPC_PNV_LPC_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/ppc/pnv.h" #include "hw/qdev-core.h" #include "hw/isa/isa.h" /* For ISA_NUM_IRQS */ diff --git a/include/hw/ppc/pnv_occ.h b/include/hw/ppc/pnv_occ.h index 3ec42de0ff..013ea2e53e 100644 --- a/include/hw/ppc/pnv_occ.h +++ b/include/hw/ppc/pnv_occ.h @@ -20,7 +20,7 @@ #ifndef PPC_PNV_OCC_H #define PPC_PNV_OCC_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #define TYPE_PNV_OCC "pnv-occ" diff --git a/include/hw/ppc/pnv_sbe.h b/include/hw/ppc/pnv_sbe.h index b6b378ad14..48a8b86a80 100644 --- a/include/hw/ppc/pnv_sbe.h +++ b/include/hw/ppc/pnv_sbe.h @@ -20,7 +20,7 @@ #ifndef PPC_PNV_SBE_H #define PPC_PNV_SBE_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #define TYPE_PNV_SBE "pnv-sbe" diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h index a927aea1c0..b14549db70 100644 --- a/include/hw/ppc/pnv_xscom.h +++ b/include/hw/ppc/pnv_xscom.h @@ -20,7 +20,7 @@ #ifndef PPC_PNV_XSCOM_H #define PPC_PNV_XSCOM_H -#include "exec/memory.h" +#include "system/memory.h" typedef struct PnvXScomInterface PnvXScomInterface; typedef struct PnvChip PnvChip; diff --git a/include/hw/ppc/ppc4xx.h b/include/hw/ppc/ppc4xx.h index 1bd9b8821b..2e94b00673 100644 --- a/include/hw/ppc/ppc4xx.h +++ b/include/hw/ppc/ppc4xx.h @@ -26,7 +26,7 @@ #define PPC4XX_H #include "hw/ppc/ppc.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" /* diff --git a/include/hw/ppc/vof.h b/include/hw/ppc/vof.h index d3f293da8b..2918aaab12 100644 --- a/include/hw/ppc/vof.h +++ b/include/hw/ppc/vof.h @@ -8,7 +8,7 @@ #include "qom/object.h" #include "exec/address-spaces.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/cpu-defs.h" typedef struct Vof { diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index e94d53405f..097fcdf00f 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -28,7 +28,7 @@ #ifndef XICS_H #define XICS_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/register.h b/include/hw/register.h index 6a076cfcdf..a913c52aee 100644 --- a/include/hw/register.h +++ b/include/hw/register.h @@ -12,7 +12,7 @@ #define REGISTER_H #include "hw/qdev-core.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/registerfields.h" #include "qom/object.h" diff --git a/include/hw/remote/proxy-memory-listener.h b/include/hw/remote/proxy-memory-listener.h index c4f3efb928..ec516d8267 100644 --- a/include/hw/remote/proxy-memory-listener.h +++ b/include/hw/remote/proxy-memory-listener.h @@ -9,7 +9,7 @@ #ifndef PROXY_MEMORY_LISTENER_H #define PROXY_MEMORY_LISTENER_H -#include "exec/memory.h" +#include "system/memory.h" #include "io/channel.h" typedef struct ProxyMemoryListener { diff --git a/include/hw/sh4/sh_intc.h b/include/hw/sh4/sh_intc.h index f62d5c5e13..94f183121e 100644 --- a/include/hw/sh4/sh_intc.h +++ b/include/hw/sh4/sh_intc.h @@ -1,7 +1,7 @@ #ifndef SH_INTC_H #define SH_INTC_H -#include "exec/memory.h" +#include "system/memory.h" typedef unsigned char intc_enum; diff --git a/include/hw/southbridge/ich9.h b/include/hw/southbridge/ich9.h index 6c60017024..1e231e89c9 100644 --- a/include/hw/southbridge/ich9.h +++ b/include/hw/southbridge/ich9.h @@ -7,7 +7,7 @@ #include "hw/pci/pci.h" #include "hw/pci/pci_device.h" #include "hw/rtc/mc146818rtc.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/notify.h" #include "qom/object.h" diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index 81bbda10d3..7dc88aaa27 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -4,7 +4,7 @@ /* Devices attached directly to the main system bus. */ #include "hw/qdev-core.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #define QDEV_MAX_MMIO 32 diff --git a/include/hw/timer/npcm7xx_timer.h b/include/hw/timer/npcm7xx_timer.h index d45c051b56..e287375dce 100644 --- a/include/hw/timer/npcm7xx_timer.h +++ b/include/hw/timer/npcm7xx_timer.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_TIMER_H #define NPCM7XX_TIMER_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" #include "qemu/timer.h" diff --git a/include/hw/tricore/tricore.h b/include/hw/tricore/tricore.h index c19ed3f013..4ffc0fe1d6 100644 --- a/include/hw/tricore/tricore.h +++ b/include/hw/tricore/tricore.h @@ -1,7 +1,7 @@ #ifndef HW_TRICORE_H #define HW_TRICORE_H -#include "exec/memory.h" +#include "system/memory.h" struct tricore_boot_info { uint64_t ram_size; diff --git a/include/hw/usb.h b/include/hw/usb.h index e410693d0c..26a9f3ecde 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -25,7 +25,7 @@ * THE SOFTWARE. */ -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "qemu/iov.h" #include "qemu/queue.h" diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 04b123a6c9..f5b3f45a43 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -21,7 +21,7 @@ #ifndef HW_VFIO_VFIO_COMMON_H #define HW_VFIO_VFIO_COMMON_H -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/queue.h" #include "qemu/notify.h" #include "ui/console.h" diff --git a/include/hw/vfio/vfio-container-base.h b/include/hw/vfio/vfio-container-base.h index 4cff9943ab..6aca02fb3d 100644 --- a/include/hw/vfio/vfio-container-base.h +++ b/include/hw/vfio/vfio-container-base.h @@ -13,7 +13,7 @@ #ifndef HW_VFIO_VFIO_CONTAINER_BASE_H #define HW_VFIO_VFIO_CONTAINER_BASE_H -#include "exec/memory.h" +#include "system/memory.h" typedef struct VFIODevice VFIODevice; typedef struct VFIOIOMMUClass VFIOIOMMUClass; diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h index 70c2e8ffee..d6df209a2f 100644 --- a/include/hw/virtio/vhost-backend.h +++ b/include/hw/virtio/vhost-backend.h @@ -11,7 +11,7 @@ #ifndef VHOST_BACKEND_H #define VHOST_BACKEND_H -#include "exec/memory.h" +#include "system/memory.h" typedef enum VhostBackendType { VHOST_BACKEND_TYPE_NONE = 0, diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index a9469d50bc..bb4b58e115 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -3,7 +3,7 @@ #include "hw/virtio/vhost-backend.h" #include "hw/virtio/virtio.h" -#include "exec/memory.h" +#include "system/memory.h" #define VHOST_F_DEVICE_IOTLB 63 #define VHOST_USER_F_PROTOCOL_FEATURES 30 diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 6386910280..7e0c471ea4 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -14,7 +14,7 @@ #ifndef QEMU_VIRTIO_H #define QEMU_VIRTIO_H -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-core.h" #include "net/net.h" #include "migration/vmstate.h" diff --git a/include/hw/xen/xen-pvh-common.h b/include/hw/xen/xen-pvh-common.h index 17c5a58a5a..5db83d88ec 100644 --- a/include/hw/xen/xen-pvh-common.h +++ b/include/hw/xen/xen-pvh-common.h @@ -9,7 +9,7 @@ #ifndef XEN_PVH_COMMON_H__ #define XEN_PVH_COMMON_H__ -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "hw/boards.h" #include "hw/pci-host/gpex.h" diff --git a/include/hw/xtensa/mx_pic.h b/include/hw/xtensa/mx_pic.h index 500424c8d3..cd316d86eb 100644 --- a/include/hw/xtensa/mx_pic.h +++ b/include/hw/xtensa/mx_pic.h @@ -28,7 +28,7 @@ #ifndef XTENSA_MX_PIC_H #define XTENSA_MX_PIC_H -#include "exec/memory.h" +#include "system/memory.h" struct XtensaMxPic; typedef struct XtensaMxPic XtensaMxPic; diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h index 16d354a814..14e82a22d5 100644 --- a/include/qemu/iova-tree.h +++ b/include/qemu/iova-tree.h @@ -23,7 +23,7 @@ * for the thread safety issue. */ -#include "exec/memory.h" +#include "system/memory.h" #include "exec/hwaddr.h" #define IOVA_OK (0) diff --git a/include/qemu/reserved-region.h b/include/qemu/reserved-region.h index 8e6f0a97e2..9026cf08fd 100644 --- a/include/qemu/reserved-region.h +++ b/include/qemu/reserved-region.h @@ -20,7 +20,7 @@ #ifndef QEMU_RESERVED_REGION_H #define QEMU_RESERVED_REGION_H -#include "exec/memory.h" +#include "system/memory.h" /* * Insert a new region into a sorted list of reserved regions. In case diff --git a/include/system/dma.h b/include/system/dma.h index e142f7efa6..aaa03b9711 100644 --- a/include/system/dma.h +++ b/include/system/dma.h @@ -10,7 +10,7 @@ #ifndef DMA_H #define DMA_H -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "block/block.h" #include "block/accounting.h" diff --git a/include/system/hostmem.h b/include/system/hostmem.h index 62642e602c..88fa791ac7 100644 --- a/include/system/hostmem.h +++ b/include/system/hostmem.h @@ -16,7 +16,7 @@ #include "system/numa.h" #include "qapi/qapi-types-machine.h" #include "qom/object.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/bitmap.h" #include "qemu/thread-context.h" diff --git a/include/system/kvm_int.h b/include/system/kvm_int.h index 4de6106869..756a3c0a25 100644 --- a/include/system/kvm_int.h +++ b/include/system/kvm_int.h @@ -9,7 +9,7 @@ #ifndef QEMU_KVM_INT_H #define QEMU_KVM_INT_H -#include "exec/memory.h" +#include "system/memory.h" #include "qapi/qapi-types-common.h" #include "qemu/accel.h" #include "qemu/queue.h" diff --git a/include/exec/memory.h b/include/system/memory.h similarity index 99% rename from include/exec/memory.h rename to include/system/memory.h index a3bb0542bf..f901976ed5 100644 --- a/include/exec/memory.h +++ b/include/system/memory.h @@ -11,10 +11,8 @@ * */ -#ifndef MEMORY_H -#define MEMORY_H - -#ifndef CONFIG_USER_ONLY +#ifndef SYSTEM_MEMORY_H +#define SYSTEM_MEMORY_H #include "exec/cpu-common.h" #include "exec/hwaddr.h" @@ -3197,5 +3195,3 @@ void ram_block_add_cpr_blocker(RAMBlock *rb, Error **errp); void ram_block_del_cpr_blocker(RAMBlock *rb); #endif - -#endif diff --git a/include/system/vhost-user-backend.h b/include/system/vhost-user-backend.h index 327b0b84f1..5ed953cd53 100644 --- a/include/system/vhost-user-backend.h +++ b/include/system/vhost-user-backend.h @@ -13,7 +13,7 @@ #define QEMU_VHOST_USER_BACKEND_H #include "qom/object.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/option.h" #include "qemu/bitmap.h" #include "hw/virtio/vhost.h" diff --git a/migration/rdma.h b/migration/rdma.h index f55f28bbed..4d3386b84a 100644 --- a/migration/rdma.h +++ b/migration/rdma.h @@ -19,7 +19,7 @@ #ifndef QEMU_MIGRATION_RDMA_H #define QEMU_MIGRATION_RDMA_H -#include "exec/memory.h" +#include "system/memory.h" void rdma_start_outgoing_migration(void *opaque, InetSocketAddress *host_port, Error **errp); diff --git a/rust/wrapper.h b/rust/wrapper.h index d927ad6799..3bc4a6c899 100644 --- a/rust/wrapper.h +++ b/rust/wrapper.h @@ -52,7 +52,7 @@ typedef enum memory_order { #include "qemu-io.h" #include "system/system.h" #include "hw/sysbus.h" -#include "exec/memory.h" +#include "system/memory.h" #include "chardev/char-fe.h" #include "hw/clock.h" #include "hw/qdev-clock.h" diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index eae874c67b..1916716547 100644 --- a/target/loongarch/cpu.h +++ b/target/loongarch/cpu.h @@ -14,7 +14,7 @@ #include "hw/registerfields.h" #include "qemu/timer.h" #ifndef CONFIG_USER_ONLY -#include "exec/memory.h" +#include "system/memory.h" #endif #include "cpu-csr.h" #include "cpu-qom.h" diff --git a/target/mips/cpu.h b/target/mips/cpu.h index f6877ece8b..9ef72a95d7 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -4,7 +4,7 @@ #include "cpu-qom.h" #include "exec/cpu-defs.h" #ifndef CONFIG_USER_ONLY -#include "exec/memory.h" +#include "system/memory.h" #endif #include "fpu/softfloat-types.h" #include "hw/clock.h" diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index f89568bfa3..0d47bb0d9b 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -33,7 +33,7 @@ #include "system/cpus.h" #include "system/accel-blocker.h" #include "qemu/bswap.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ram_addr.h" #include "qemu/event_notifier.h" #include "qemu/main-loop.h" diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 2817c9dbdd..6f0ea9067b 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -22,7 +22,7 @@ #include "accel/tcg/cpu-ops.h" #include "exec/exec-all.h" #include "exec/page-protection.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/cpu_ldst.h" #include "exec/cputlb.h" #include "exec/tb-flush.h" diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c index f07a2656ce..f2d1739e33 100644 --- a/backends/tpm/tpm_util.c +++ b/backends/tpm/tpm_util.c @@ -25,7 +25,7 @@ #include "qapi/error.h" #include "qapi/visitor.h" #include "tpm_int.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/qdev-properties.h" #include "system/tpm_backend.h" #include "system/tpm_util.h" diff --git a/block/blkio.c b/block/blkio.c index 5f4fce2b1b..4142673984 100644 --- a/block/blkio.c +++ b/block/blkio.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include #include "block/block_int.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/cpu-common.h" /* for qemu_ram_get_fd() */ #include "qemu/defer-call.h" #include "qapi/error.h" @@ -19,7 +19,7 @@ #include "qobject/qdict.h" #include "qemu/module.h" #include "system/block-backend.h" -#include "exec/memory.h" /* for ram_block_discard_disable() */ +#include "system/memory.h" /* for ram_block_discard_disable() */ #include "block/block-io.h" diff --git a/disas/disas-mon.c b/disas/disas-mon.c index 37bf16ac79..9c693618c2 100644 --- a/disas/disas-mon.c +++ b/disas/disas-mon.c @@ -7,7 +7,7 @@ #include "qemu/osdep.h" #include "disas-internal.h" #include "disas/disas.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/core/cpu.h" #include "monitor/monitor.h" diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c index ec64f92893..5c4c1dc638 100644 --- a/hw/acpi/erst.c +++ b/hw/acpi/erst.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/qdev-core.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "hw/pci/pci_device.h" #include "qom/object_interfaces.h" diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c index f6844bf118..59c0160283 100644 --- a/hw/avr/atmega.c +++ b/hw/avr/atmega.c @@ -12,7 +12,7 @@ #include "qemu/module.h" #include "qemu/units.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "system/system.h" #include "hw/qdev-properties.h" diff --git a/hw/block/fdc-sysbus.c b/hw/block/fdc-sysbus.c index 381b492aec..4955e478cd 100644 --- a/hw/block/fdc-sysbus.c +++ b/hw/block/fdc-sysbus.c @@ -26,7 +26,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qom/object.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/sysbus.h" #include "hw/block/fdc.h" #include "migration/vmstate.h" diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index aed5076ec7..5ef8c24b5b 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -22,7 +22,7 @@ #include "qapi/error.h" #include "exec/address-spaces.h" #include "exec/cputlb.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/tb-flush.h" #include "exec/tswap.h" #include "hw/qdev-core.h" diff --git a/hw/core/loader-fit.c b/hw/core/loader-fit.c index 6eb66406b0..2dea485ae0 100644 --- a/hw/core/loader-fit.c +++ b/hw/core/loader-fit.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/units.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/loader.h" #include "hw/loader-fit.h" #include "qemu/cutils.h" diff --git a/hw/core/loader.c b/hw/core/loader.c index ce6ff1b52e..564b63106e 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -59,7 +59,7 @@ #include "uboot_image.h" #include "hw/loader.h" #include "hw/nvram/fw_cfg.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/boards.h" #include "qemu/cutils.h" #include "system/runstate.h" diff --git a/hw/display/edid-region.c b/hw/display/edid-region.c index 675429dc18..f1596fba9a 100644 --- a/hw/display/edid-region.c +++ b/hw/display/edid-region.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/display/edid.h" static uint64_t edid_region_read(void *ptr, hwaddr addr, unsigned size) diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index 831e04f214..382c62d668 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -12,7 +12,7 @@ #include "qemu/module.h" #include "qapi/error.h" #include "exec/address-spaces.h" -#include "exec/memory.h" +#include "system/memory.h" #include "system/kvm.h" #include "qemu/bitops.h" #include "qemu/error-report.h" diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c index 0cc2919bb8..7bd08067a7 100644 --- a/hw/i386/acpi-common.c +++ b/hw/i386/acpi-common.c @@ -23,7 +23,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/acpi/acpi.h" #include "hw/acpi/aml-build.h" #include "hw/acpi/utils.h" diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c index 279da6b4aa..bc6571778c 100644 --- a/hw/i386/acpi-microvm.c +++ b/hw/i386/acpi-microvm.c @@ -24,7 +24,7 @@ #include "qemu/cutils.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/acpi/acpi.h" #include "hw/acpi/acpi_aml_interface.h" #include "hw/acpi/aml-build.h" diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 6c91e2d292..e9dbbe086a 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -47,7 +47,7 @@ #include "hw/i386/kvm/clock.h" #include "hw/sysbus.h" #include "hw/i2c/smbus_eeprom.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/acpi/acpi.h" #include "qapi/error.h" #include "qemu/error-report.h" diff --git a/hw/intc/mips_gic.c b/hw/intc/mips_gic.c index 5e3cbeabec..12d3908938 100644 --- a/hw/intc/mips_gic.c +++ b/hw/intc/mips_gic.c @@ -14,7 +14,7 @@ #include "qemu/module.h" #include "qapi/error.h" #include "hw/sysbus.h" -#include "exec/memory.h" +#include "system/memory.h" #include "system/kvm.h" #include "system/reset.h" #include "kvm_mips.h" diff --git a/hw/intc/ompic.c b/hw/intc/ompic.c index 42af4567c6..169baf2ded 100644 --- a/hw/intc/ompic.c +++ b/hw/intc/ompic.c @@ -13,7 +13,7 @@ #include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "migration/vmstate.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #define TYPE_OR1K_OMPIC "or1k-ompic" diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index b482c5f3af..b1923c8c3e 100644 --- a/hw/net/ne2000.c +++ b/hw/net/ne2000.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "net/eth.h" #include "qemu/module.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/irq.h" #include "migration/vmstate.h" #include "ne2000.h" diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index 0a91a8ae6c..4931ea24f6 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -28,7 +28,7 @@ #include "hw/pci/shpc.h" #include "hw/pci/slotid_cap.h" #include "hw/qdev-properties.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/pci/pci_bus.h" #include "hw/hotplug.h" #include "qom/object.h" diff --git a/hw/pci-host/remote.c b/hw/pci-host/remote.c index bfb25ef6af..be077d075e 100644 --- a/hw/pci-host/remote.c +++ b/hw/pci-host/remote.c @@ -28,7 +28,7 @@ #include "hw/pci/pcie_host.h" #include "hw/qdev-properties.h" #include "hw/pci-host/remote.h" -#include "exec/memory.h" +#include "system/memory.h" static const char *remote_pcihost_root_bus_path(PCIHostState *host_bridge, PCIBus *rootbus) diff --git a/hw/ppc/pnv_homer.c b/hw/ppc/pnv_homer.c index 18a53a80c1..0521f9a428 100644 --- a/hw/ppc/pnv_homer.c +++ b/hw/ppc/pnv_homer.c @@ -20,7 +20,7 @@ #include "qemu/log.h" #include "qapi/error.h" #include "exec/hwaddr.h" -#include "exec/memory.h" +#include "system/memory.h" #include "system/cpus.h" #include "hw/qdev-core.h" #include "hw/qdev-properties.h" diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 7dc3b309c8..a070de23cf 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -24,7 +24,7 @@ #include "exec/page-protection.h" #include "hw/loader.h" #include "elf.h" -#include "exec/memory.h" +#include "system/memory.h" #include "ppc440.h" #include "hw/pci-host/ppc4xx.h" #include "hw/block/flash.h" diff --git a/hw/remote/iommu.c b/hw/remote/iommu.c index 7c56aad0fc..ec845d1f58 100644 --- a/hw/remote/iommu.c +++ b/hw/remote/iommu.c @@ -13,7 +13,7 @@ #include "hw/remote/iommu.h" #include "hw/pci/pci_bus.h" #include "hw/pci/pci.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "trace.h" diff --git a/hw/remote/machine.c b/hw/remote/machine.c index fdc6c441bb..d4616025e8 100644 --- a/hw/remote/machine.c +++ b/hw/remote/machine.c @@ -16,7 +16,7 @@ #include "qemu/osdep.h" #include "hw/remote/machine.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qapi/error.h" #include "hw/pci/pci_host.h" #include "hw/remote/iohub.h" diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c index a926f61ebe..ce7f5b9bfb 100644 --- a/hw/remote/proxy-memory-listener.c +++ b/hw/remote/proxy-memory-listener.c @@ -10,7 +10,7 @@ #include "qemu/int128.h" #include "qemu/range.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/cpu-common.h" #include "exec/ram_addr.h" #include "qapi/error.h" diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c index 6e51a92856..9bdd0a465b 100644 --- a/hw/remote/vfio-user-obj.c +++ b/hw/remote/vfio-user-obj.c @@ -57,7 +57,7 @@ #include "hw/qdev-core.h" #include "hw/pci/pci.h" #include "qemu/timer.h" -#include "exec/memory.h" +#include "system/memory.h" #include "hw/pci/msi.h" #include "hw/pci/msix.h" #include "hw/remote/vfio-user-obj.h" diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 8cdeb6cb7f..b4e003c19c 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "exec/memop.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/error-report.h" #include "system/hw_accel.h" #include "hw/boards.h" diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c index 7788939766..d4fa32c9d6 100644 --- a/hw/timer/sh_timer.c +++ b/hw/timer/sh_timer.c @@ -9,7 +9,7 @@ */ #include "qemu/osdep.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/log.h" #include "hw/irq.h" #include "hw/sh4/sh.h" diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 1a0d9290f8..989c6ee83d 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -28,7 +28,7 @@ #include "hw/vfio/vfio-common.h" #include "hw/vfio/pci.h" #include "exec/address-spaces.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ram_addr.h" #include "exec/target_page.h" #include "hw/hw.h" diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 7c57bdd27b..1d1c5f9a77 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -24,7 +24,7 @@ #include "hw/vfio/vfio-common.h" #include "exec/address-spaces.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ram_addr.h" #include "qemu/error-report.h" #include "qemu/range.h" diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 67bc57409c..96c6bf5654 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -28,7 +28,7 @@ #include "qemu/main-loop.h" #include "qemu/module.h" #include "qemu/range.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "qemu/queue.h" #include "hw/sysbus.h" diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c index 1cea29c66d..49d17e7bb2 100644 --- a/hw/xtensa/sim.c +++ b/hw/xtensa/sim.c @@ -32,7 +32,7 @@ #include "hw/boards.h" #include "hw/loader.h" #include "elf.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/error-report.h" #include "xtensa_memory.h" #include "xtensa_sim.h" diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c index b08404fc17..b10866ccd8 100644 --- a/hw/xtensa/virt.c +++ b/hw/xtensa/virt.c @@ -33,7 +33,7 @@ #include "hw/pci-host/gpex.h" #include "net/net.h" #include "elf.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/error-report.h" #include "xtensa_memory.h" #include "xtensa_sim.h" diff --git a/hw/xtensa/xtensa_memory.c b/hw/xtensa/xtensa_memory.c index 2c1095f017..13a6077d86 100644 --- a/hw/xtensa/xtensa_memory.c +++ b/hw/xtensa/xtensa_memory.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/error-report.h" #include "xtensa_memory.h" diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index 3f3677f1c9..3bd0ef8268 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -34,7 +34,7 @@ #include "hw/loader.h" #include "hw/qdev-properties.h" #include "elf.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/tswap.h" #include "hw/char/serial-mm.h" #include "net/net.h" diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index 4cd14779d6..09caf92f87 100644 --- a/migration/dirtyrate.c +++ b/migration/dirtyrate.c @@ -27,7 +27,7 @@ #include "qobject/qdict.h" #include "system/kvm.h" #include "system/runstate.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/xxhash.h" #include "migration.h" diff --git a/migration/rdma.c b/migration/rdma.c index 76fb034923..d9603ab603 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -30,7 +30,7 @@ #include "qemu/sockets.h" #include "qemu/bitmap.h" #include "qemu/coroutine.h" -#include "exec/memory.h" +#include "system/memory.h" #include #include #include diff --git a/migration/savevm.c b/migration/savevm.c index ce158c3512..c33200a33f 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -48,7 +48,7 @@ #include "qapi/qapi-builtin-visit.h" #include "qemu/error-report.h" #include "system/cpus.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/target_page.h" #include "trace.h" #include "qemu/iov.h" diff --git a/monitor/hmp-cmds-target.c b/monitor/hmp-cmds-target.c index 239c2a61a4..6654d31406 100644 --- a/monitor/hmp-cmds-target.c +++ b/monitor/hmp-cmds-target.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "disas/disas.h" #include "exec/address-spaces.h" -#include "exec/memory.h" +#include "system/memory.h" #include "monitor/hmp-target.h" #include "monitor/monitor-internal.h" #include "qapi/error.h" diff --git a/stubs/ram-block.c b/stubs/ram-block.c index 108197683b..e88fab31a5 100644 --- a/stubs/ram-block.c +++ b/stubs/ram-block.c @@ -1,7 +1,7 @@ #include "qemu/osdep.h" #include "exec/ramlist.h" #include "exec/cpu-common.h" -#include "exec/memory.h" +#include "system/memory.h" void *qemu_ram_get_host_addr(RAMBlock *rb) { diff --git a/system/dirtylimit.c b/system/dirtylimit.c index 7dedef8dd4..30cd09f3d1 100644 --- a/system/dirtylimit.c +++ b/system/dirtylimit.c @@ -19,7 +19,7 @@ #include "system/dirtylimit.h" #include "monitor/hmp.h" #include "monitor/monitor.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/target_page.h" #include "hw/boards.h" #include "system/kvm.h" diff --git a/system/ioport.c b/system/ioport.c index 89daae9d60..2291739039 100644 --- a/system/ioport.c +++ b/system/ioport.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "exec/ioport.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "trace.h" diff --git a/system/memory.c b/system/memory.c index eddd21a6cd..2865d0deb1 100644 --- a/system/memory.c +++ b/system/memory.c @@ -16,7 +16,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qapi/visitor.h" #include "qemu/bitops.h" #include "qemu/error-report.h" diff --git a/system/memory_mapping.c b/system/memory_mapping.c index 37d3325f77..8538a8241e 100644 --- a/system/memory_mapping.c +++ b/system/memory_mapping.c @@ -16,7 +16,7 @@ #include "qapi/error.h" #include "system/memory_mapping.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/address-spaces.h" #include "hw/core/cpu.h" diff --git a/system/physmem.c b/system/physmem.c index e97de3ef65..be92969a4a 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -50,7 +50,7 @@ #include "qemu/log.h" #include "qemu/memalign.h" #include "qemu/memfd.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ioport.h" #include "system/dma.h" #include "system/hostmem.h" diff --git a/system/qtest.c b/system/qtest.c index 12152efbcd..5407289154 100644 --- a/system/qtest.c +++ b/system/qtest.c @@ -17,7 +17,7 @@ #include "system/runstate.h" #include "chardev/char-fe.h" #include "exec/ioport.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/tswap.h" #include "hw/qdev-core.h" #include "hw/irq.h" diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 7663b62d01..ec6a0a8b66 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -36,7 +36,7 @@ #include "migration/vmstate.h" #include "hw/qdev-clock.h" #ifndef CONFIG_USER_ONLY -#include "exec/memory.h" +#include "system/memory.h" #endif diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index d107a496da..239be9372d 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -20,7 +20,7 @@ #include "tests/qtest/libqos/pci-pc.h" #include "fuzz.h" #include "string.h" -#include "exec/memory.h" +#include "system/memory.h" #include "exec/ramblock.h" #include "hw/qdev-core.h" #include "hw/pci/pci.h" diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c index d3839bf999..9afe8bf6d8 100644 --- a/tests/qtest/fuzz/qos_fuzz.c +++ b/tests/qtest/fuzz/qos_fuzz.c @@ -19,7 +19,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/main-loop.h" #include "tests/qtest/libqtest.h" diff --git a/tests/unit/test-resv-mem.c b/tests/unit/test-resv-mem.c index cd8f7318cc..4de2d042d1 100644 --- a/tests/unit/test-resv-mem.c +++ b/tests/unit/test-resv-mem.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "qemu/range.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qemu/reserved-region.h" #define DEBUG 0 diff --git a/ui/console.c b/ui/console.c index 6456e8dd90..6cd122cf40 100644 --- a/ui/console.c +++ b/ui/console.c @@ -35,7 +35,7 @@ #include "qemu/option.h" #include "chardev/char.h" #include "trace.h" -#include "exec/memory.h" +#include "system/memory.h" #include "qom/object.h" #include "qemu/memfd.h" diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c index f8bab46c68..fdff042ab4 100644 --- a/util/vfio-helpers.c +++ b/util/vfio-helpers.c @@ -16,7 +16,7 @@ #include "qapi/error.h" #include "exec/ramlist.h" #include "exec/cpu-common.h" -#include "exec/memory.h" +#include "system/memory.h" #include "trace.h" #include "qemu/error-report.h" #include "standard-headers/linux/pci_regs.h" diff --git a/MAINTAINERS b/MAINTAINERS index 8f470a1c9b..f606e158a7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3106,7 +3106,7 @@ R: Philippe Mathieu-Daudé S: Supported F: include/exec/ioport.h F: include/exec/memop.h -F: include/exec/memory.h +F: include/system/memory.h F: include/exec/ram_addr.h F: include/exec/ramblock.h F: include/system/memory_mapping.h diff --git a/docs/devel/memory.rst b/docs/devel/memory.rst index 69c5e3f914..57fb2aec76 100644 --- a/docs/devel/memory.rst +++ b/docs/devel/memory.rst @@ -369,4 +369,4 @@ callbacks are called: API Reference ------------- -.. kernel-doc:: include/exec/memory.h +.. kernel-doc:: include/system/memory.h diff --git a/scripts/analyze-inclusions b/scripts/analyze-inclusions index b6280f25c8..d2c566667d 100644 --- a/scripts/analyze-inclusions +++ b/scripts/analyze-inclusions @@ -53,7 +53,7 @@ echo $(grep_include -F 'trace/generated-tracers.h') files include generated-trac echo $(grep_include -F 'qapi/error.h') files include qapi/error.h echo $(grep_include -F 'qom/object.h') files include qom/object.h echo $(grep_include -F 'block/aio.h') files include block/aio.h -echo $(grep_include -F 'exec/memory.h') files include exec/memory.h +echo $(grep_include -F 'system/memory.h') files include system/memory.h echo $(grep_include -F 'fpu/softfloat.h') files include fpu/softfloat.h echo $(grep_include -F 'qemu/bswap.h') files include qemu/bswap.h echo From patchwork Tue Mar 18 21:31:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874447 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp77348wru; Tue, 18 Mar 2025 14:38:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWIAAoc/MB16X0PF2QPS0gEI1+VLp5GtfOcQ1J5hakeRfNBnUbVoVmRkAdo2UW5CAmvqci1UA==@linaro.org X-Google-Smtp-Source: AGHT+IG9e+o3vfwBNyrLtyHxnlyk7H1x0lsAhLnrH+S5g/u0S73PeIQAmobL4faLhO6guy0S84CW X-Received: by 2002:a05:620a:2955:b0:7c5:5670:bd77 with SMTP id af79cd13be357-7c5a84e319dmr29986785a.55.1742333897350; Tue, 18 Mar 2025 14:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333897; cv=none; d=google.com; s=arc-20240605; b=iatd9Ofmml5rrtH8Z2EbHh4L5QHu8MEkxAa5uU5p4xX1nCVDegTwxVGAT9+AxK+d1p t7kYnBMiZyMqd1tTg6wCrftOPDeZqzEepVela0OPd4XWGyy+u798Hkg4SF6fuuiHU9ee hxL8nhuDDB9FoFxIWOlAc5yx19fLqrCBQvTuAHET6SMcMPmD5DQl6VYTaM0XnDwhjNxA PPmz6fWiZn6Ct4Q5+sVeTipUdapkCChhzm/Q6xD9SukNGQfHLxKmX8epQltEpE3QW8NM Nw6lbeoaqwYXt1GEwLwFaANEDBfnmZQnhUojzIEV6kLm2OL/p1qML/Eedd/8XmwCse9i Wq0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dW4HWl+6laCsLktZBTNr7QQBNjGPzTqOH74ZWy3bb4A=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=AWah629GZqDvQ+NWu4cKA3WHhOIiwPQs7u7ahhyjjuAc2YEeJnGeV/tMCF9ibm2Ewx URA4tQBKnK174fbUOBHbyEGfGvRTiMrbfwALND3gLkEcOX4oGj7POiOaJGKYrbTXWfG+ MbfxLPIFMH1xaXZZ69p7PA/vjY50ei/KGkgIR1lfO7oVca/ml6Lb2cO2sGkmNwNV+Br7 GyTkQtow50IOqbUPeZjrAXxMSqMUDRcRrI/zFHastIbeWzkrS8SQ4EhNntd4S0JsEEq3 yaZE361Vvsdo6D5r9XkWXVyKX2g2biw0CbRgbEivspWM0oSIefZd+0Udl2m1yg2/BQBy Z4kA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aM2agcrw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573d1475bsi1253076485a.479.2025.03.18.14.38.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:38:17 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aM2agcrw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueYh-0001fu-3q; Tue, 18 Mar 2025 17:33:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY2-0001IZ-Bn for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:30 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXw-0000m8-T1 for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:29 -0400 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-301302a328bso6789454a91.2 for ; Tue, 18 Mar 2025 14:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333543; x=1742938343; 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=dW4HWl+6laCsLktZBTNr7QQBNjGPzTqOH74ZWy3bb4A=; b=aM2agcrwnQ+oXHLUIGiSTkEFkOtUXz5P6AHE0JzP4MbwH7sk+vjaAPKl6wIylj+n94 LIdRbSm4SoFyNrMWnome+lExf4EThH7KkL113PvjXSlPubxMOTJLCohiQgTIuBN1HzlQ c1oE3kG4ANJJQA07lTJ2HeG3QPX7qBIrbbv+U0Fk3Gkt6C0WD6uQB7hdSQ90pha0c4yb IEFWBEiM3zjsIwvBAuD54XcjH85wV2WYoYPGTncObihgo9sVUmqsfEGS13sEklCbnLyl 0NKXmq0ZQ9tfpt2P3y2setj4g3nTBsCF15S/HpsAHA0RMT7QEfvbFdXwQFyf+gLai2LS tgaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333543; x=1742938343; 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=dW4HWl+6laCsLktZBTNr7QQBNjGPzTqOH74ZWy3bb4A=; b=Xaf9SyjvmPAJn2CV6+69ZLLVEKxs9jKJkl9vfsoiu0wh9hQDRbkWOVgWXzSi4Y+Ny5 CfzgXXZFs8x7A8IdxyXKUV1+kCstA8UxbdfvG7Xm2Zii9I53jjVrE3LuBCqaxBFJlpyh SQxFykDQlYNexN8+sNMl9SvgTdi7h9PfnW/0kQHfswXn5WQMwcbYo42T/lgsQz3ODSeO U8/jD0leCpvd4oY6mP3BnReZnISBb40lW2/22dS1AsROz2tfDI/x/KU42oU2C0iBDCv/ syQSSXdox7qb3a2ZUOT8291H0NXXEcr+GMWiRKTAfejGxvdm866H3ml6Vta77C0Tw4Zl yVxw== X-Gm-Message-State: AOJu0YyvLHD+NWfX6pUi1fThN5KrX89V3pDsQkkKXLcTKpiZCCfDplG6 TUBKZx4e6k9FF7LIREBHJDSrB/jJoK57/53g654XKueIlDcoD1pD6CoT2Z1iBHlzWTDH1MpgHVU W X-Gm-Gg: ASbGncuBmYzrEjq7AUimU+wNsCpYBBtefgRA1wnp+Ojr1y0gyBZL+50Oioo0toK718e 3N1ur13Bo2tdEITmS5smlih6La4506oRbQ3B0AJr6UQvhUBap0EbaEXT4DUbWXppDPSjQF5OSI7 Ssny3Z2bvkQR/G49ByDLfPuEgM3nwaKF82hCQCP0IkEsRFzAx/j17LYD12pOjtxAbokt8fjhxAo FEyLEVShBkxUg/RQFjHf5OfiP6QVse9GIhYtQoVNtVqUNnHHzN//0lGmoi4XKlnDPd6BhuKLoFs rcqYOd639f4kIM2kpE5WYxdycbK7+bqlxSWvwNbsqN4NAkVgadkz4+It5imCBg0yxAU6QSgS48s R X-Received: by 2002:a17:90b:180c:b0:2fe:b016:a6ac with SMTP id 98e67ed59e1d1-301bde7ae1amr307956a91.15.1742333542726; Tue, 18 Mar 2025 14:32:22 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 17/42] include/system: Move exec/address-spaces.h to system/address-spaces.h Date: Tue, 18 Mar 2025 14:31:42 -0700 Message-ID: <20250318213209.2579218-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the existing includes with sed. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- hw/net/i82596.h | 2 +- hw/s390x/ipl.h | 2 +- include/hw/misc/lasi.h | 2 +- include/hw/nubus/nubus.h | 2 +- include/hw/ppc/vof.h | 2 +- include/hw/tricore/triboard.h | 2 +- include/{exec => system}/address-spaces.h | 8 ++------ include/system/dma.h | 2 +- rust/wrapper.h | 2 +- target/i386/hvf/vmx.h | 2 +- accel/hvf/hvf-accel-ops.c | 2 +- hw/acpi/erst.c | 2 +- hw/arm/aspeed_ast10x0.c | 2 +- hw/arm/bananapi_m2u.c | 2 +- hw/arm/collie.c | 2 +- hw/arm/exynos4_boards.c | 2 +- hw/arm/fsl-imx31.c | 2 +- hw/arm/fsl-imx8mp.c | 2 +- hw/arm/imx8mp-evk.c | 2 +- hw/arm/integratorcp.c | 2 +- hw/arm/kzm.c | 2 +- hw/arm/microbit.c | 2 +- hw/arm/mps2-tz.c | 2 +- hw/arm/mps2.c | 2 +- hw/arm/mps3r.c | 2 +- hw/arm/msf2-soc.c | 2 +- hw/arm/msf2-som.c | 2 +- hw/arm/musca.c | 2 +- hw/arm/omap1.c | 2 +- hw/arm/omap_sx1.c | 2 +- hw/arm/orangepi.c | 2 +- hw/arm/stellaris.c | 2 +- hw/arm/stm32f100_soc.c | 2 +- hw/arm/stm32f205_soc.c | 2 +- hw/arm/stm32f405_soc.c | 2 +- hw/arm/stm32l4x5_soc.c | 2 +- hw/avr/atmega.c | 2 +- hw/char/goldfish_tty.c | 2 +- hw/char/omap_uart.c | 2 +- hw/char/riscv_htif.c | 2 +- hw/core/cpu-system.c | 2 +- hw/core/null-machine.c | 2 +- hw/core/sysbus.c | 2 +- hw/dma/rc4030.c | 2 +- hw/hyperv/hv-balloon.c | 2 +- hw/hyperv/hyperv.c | 2 +- hw/i386/kvm/xen_evtchn.c | 2 +- hw/i386/kvm/xen_gnttab.c | 2 +- hw/i386/kvm/xen_overlay.c | 2 +- hw/i386/sgx-epc.c | 2 +- hw/i386/sgx.c | 2 +- hw/i386/vapic.c | 2 +- hw/ide/ahci-sysbus.c | 2 +- hw/input/lasips2.c | 2 +- hw/intc/loongarch_extioi.c | 2 +- hw/intc/riscv_aplic.c | 2 +- hw/intc/riscv_imsic.c | 2 +- hw/loongarch/virt.c | 2 +- hw/mem/memory-device.c | 2 +- hw/microblaze/petalogix_ml605_mmu.c | 2 +- hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +- hw/microblaze/xlnx-zynqmp-pmu.c | 2 +- hw/mips/mipssim.c | 2 +- hw/misc/allwinner-h3-dramc.c | 2 +- hw/misc/allwinner-r40-dramc.c | 2 +- hw/misc/ivshmem-flat.c | 2 +- hw/misc/mac_via.c | 2 +- hw/net/i82596.c | 2 +- hw/nvram/fw_cfg.c | 2 +- hw/openrisc/openrisc_sim.c | 2 +- hw/openrisc/virt.c | 2 +- hw/pci-host/mv64361.c | 2 +- hw/ppc/pegasos2.c | 2 +- hw/ppc/pnv_psi.c | 2 +- hw/ppc/ppc4xx_sdram.c | 2 +- hw/ppc/prep_systemio.c | 2 +- hw/ppc/rs6000_mc.c | 2 +- hw/ppc/spapr_ovec.c | 2 +- hw/ppc/vof.c | 2 +- hw/remote/iommu.c | 2 +- hw/riscv/microblaze-v-generic.c | 2 +- hw/riscv/opentitan.c | 2 +- hw/riscv/shakti_c.c | 2 +- hw/s390x/css.c | 2 +- hw/s390x/s390-skeys.c | 2 +- hw/s390x/virtio-ccw.c | 2 +- hw/sparc/sun4m_iommu.c | 2 +- hw/sparc64/sun4u_iommu.c | 2 +- hw/timer/hpet.c | 2 +- hw/tpm/tpm_crb.c | 2 +- hw/vfio/ap.c | 2 +- hw/vfio/ccw.c | 2 +- hw/vfio/common.c | 2 +- hw/vfio/container.c | 2 +- hw/vfio/platform.c | 2 +- hw/vfio/spapr.c | 2 +- hw/virtio/vhost-vdpa.c | 2 +- hw/virtio/virtio-balloon.c | 2 +- hw/virtio/virtio-bus.c | 2 +- monitor/hmp-cmds-target.c | 2 +- monitor/hmp-cmds.c | 2 +- system/ioport.c | 2 +- system/memory.c | 2 +- system/memory_mapping.c | 2 +- target/arm/hvf/hvf.c | 2 +- target/arm/kvm.c | 2 +- target/avr/helper.c | 2 +- target/i386/cpu-apic.c | 2 +- target/i386/cpu.c | 2 +- target/i386/kvm/xen-emu.c | 2 +- target/i386/nvmm/nvmm-all.c | 2 +- target/i386/sev.c | 2 +- target/i386/tcg/system/misc_helper.c | 2 +- target/i386/tcg/system/tcg-cpu.c | 2 +- target/i386/whpx/whpx-all.c | 2 +- target/loongarch/kvm/kvm.c | 2 +- target/riscv/kvm/kvm-cpu.c | 2 +- target/s390x/mmu_helper.c | 2 +- target/s390x/sigp.c | 2 +- target/s390x/tcg/excp_helper.c | 2 +- target/xtensa/dbg_helper.c | 2 +- hw/display/apple-gfx.m | 2 +- 122 files changed, 123 insertions(+), 127 deletions(-) rename include/{exec => system}/address-spaces.h (89%) diff --git a/hw/net/i82596.h b/hw/net/i82596.h index 4bdfcaf856..dc1fa1a1dc 100644 --- a/hw/net/i82596.h +++ b/hw/net/i82596.h @@ -4,7 +4,7 @@ #define I82596_IOPORT_SIZE 0x20 #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #define PORT_RESET 0x00 /* reset 82596 */ #define PORT_SELFTEST 0x01 /* selftest */ diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h index 8e3882d506..c6ecb3433c 100644 --- a/hw/s390x/ipl.h +++ b/hw/s390x/ipl.h @@ -14,7 +14,7 @@ #define HW_S390_IPL_H #include "cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-core.h" #include "hw/s390x/ipl/qipl.h" #include "qom/object.h" diff --git a/include/hw/misc/lasi.h b/include/hw/misc/lasi.h index f01c0f680a..0bdfb11b50 100644 --- a/include/hw/misc/lasi.h +++ b/include/hw/misc/lasi.h @@ -12,7 +12,7 @@ #ifndef LASI_H #define LASI_H -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/pci/pci_host.h" #include "hw/boards.h" diff --git a/include/hw/nubus/nubus.h b/include/hw/nubus/nubus.h index fee79b71d1..7825840dca 100644 --- a/include/hw/nubus/nubus.h +++ b/include/hw/nubus/nubus.h @@ -11,7 +11,7 @@ #include "hw/qdev-properties.h" #include "hw/sysbus.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #include "qemu/units.h" diff --git a/include/hw/ppc/vof.h b/include/hw/ppc/vof.h index 2918aaab12..3a0fbffe54 100644 --- a/include/hw/ppc/vof.h +++ b/include/hw/ppc/vof.h @@ -7,7 +7,7 @@ #define HW_VOF_H #include "qom/object.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/memory.h" #include "exec/cpu-defs.h" diff --git a/include/hw/tricore/triboard.h b/include/hw/tricore/triboard.h index 8250470643..ca49a0c752 100644 --- a/include/hw/tricore/triboard.h +++ b/include/hw/tricore/triboard.h @@ -21,7 +21,7 @@ #include "qapi/error.h" #include "hw/boards.h" #include "system/system.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #include "hw/tricore/tc27x_soc.h" diff --git a/include/exec/address-spaces.h b/include/system/address-spaces.h similarity index 89% rename from include/exec/address-spaces.h rename to include/system/address-spaces.h index 0d0aa61d68..72d17afb0f 100644 --- a/include/exec/address-spaces.h +++ b/include/system/address-spaces.h @@ -11,16 +11,14 @@ * */ -#ifndef EXEC_ADDRESS_SPACES_H -#define EXEC_ADDRESS_SPACES_H +#ifndef SYSTEM_ADDRESS_SPACES_H +#define SYSTEM_ADDRESS_SPACES_H /* * Internal interfaces between memory.c/exec.c/vl.c. Do not #include unless * you're one of them. */ -#ifndef CONFIG_USER_ONLY - /* Get the root memory region. This interface should only be used temporarily * until a proper bus interface is available. */ @@ -35,5 +33,3 @@ extern AddressSpace address_space_memory; extern AddressSpace address_space_io; #endif - -#endif diff --git a/include/system/dma.h b/include/system/dma.h index aaa03b9711..82e7ad5437 100644 --- a/include/system/dma.h +++ b/include/system/dma.h @@ -11,7 +11,7 @@ #define DMA_H #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "block/block.h" #include "block/accounting.h" diff --git a/rust/wrapper.h b/rust/wrapper.h index 3bc4a6c899..f80dbab24f 100644 --- a/rust/wrapper.h +++ b/rust/wrapper.h @@ -64,4 +64,4 @@ typedef enum memory_order { #include "chardev/char-serial.h" #include "exec/memattrs.h" #include "qemu/timer.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" diff --git a/target/i386/hvf/vmx.h b/target/i386/hvf/vmx.h index 80ce26279b..87a478f7fd 100644 --- a/target/i386/hvf/vmx.h +++ b/target/i386/hvf/vmx.h @@ -33,7 +33,7 @@ #include "system/hvf.h" #include "system/hvf_int.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" static inline uint64_t rreg(hv_vcpuid_t vcpu, hv_x86_reg_t reg) { diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 12fc30c276..601c3bc0ac 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@ -50,7 +50,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/exec-all.h" #include "gdbstub/enums.h" #include "hw/boards.h" diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c index 5c4c1dc638..2e49b551f2 100644 --- a/hw/acpi/erst.c +++ b/hw/acpi/erst.c @@ -23,7 +23,7 @@ #include "hw/acpi/acpi-defs.h" #include "hw/acpi/aml-build.h" #include "hw/acpi/bios-linker-loader.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/hostmem.h" #include "hw/acpi/erst.h" #include "trace.h" diff --git a/hw/arm/aspeed_ast10x0.c b/hw/arm/aspeed_ast10x0.c index ec329f4991..21ffab10f3 100644 --- a/hw/arm/aspeed_ast10x0.c +++ b/hw/arm/aspeed_ast10x0.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/qdev-clock.h" #include "hw/misc/unimp.h" diff --git a/hw/arm/bananapi_m2u.c b/hw/arm/bananapi_m2u.c index 4d84d10d24..b750a575f7 100644 --- a/hw/arm/bananapi_m2u.c +++ b/hw/arm/bananapi_m2u.c @@ -19,7 +19,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "hw/boards.h" diff --git a/hw/arm/collie.c b/hw/arm/collie.c index eaa5c52d45..e83aee58c6 100644 --- a/hw/arm/collie.c +++ b/hw/arm/collie.c @@ -16,7 +16,7 @@ #include "strongarm.h" #include "hw/arm/boot.h" #include "hw/block/flash.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #include "qemu/error-report.h" diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c index 43dc89d902..2d8f2d7326 100644 --- a/hw/arm/exynos4_boards.c +++ b/hw/arm/exynos4_boards.c @@ -28,7 +28,7 @@ #include "hw/sysbus.h" #include "net/net.h" #include "hw/arm/boot.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/exynos4210.h" #include "hw/net/lan9118.h" #include "hw/qdev-properties.h" diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c index 9de0f2148f..2a8ffb15f7 100644 --- a/hw/arm/fsl-imx31.c +++ b/hw/arm/fsl-imx31.c @@ -23,7 +23,7 @@ #include "qapi/error.h" #include "hw/arm/fsl-imx31.h" #include "system/system.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "chardev/char.h" #include "target/arm/cpu-qom.h" diff --git a/hw/arm/fsl-imx8mp.c b/hw/arm/fsl-imx8mp.c index c3f6da6322..2cf5eeaf31 100644 --- a/hw/arm/fsl-imx8mp.c +++ b/hw/arm/fsl-imx8mp.c @@ -9,7 +9,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/bsa.h" #include "hw/arm/fsl-imx8mp.h" #include "hw/intc/arm_gicv3.h" diff --git a/hw/arm/imx8mp-evk.c b/hw/arm/imx8mp-evk.c index e1a7892fd7..6e64ec4ea5 100644 --- a/hw/arm/imx8mp-evk.c +++ b/hw/arm/imx8mp-evk.c @@ -7,7 +7,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/boot.h" #include "hw/arm/fsl-imx8mp.h" #include "hw/boards.h" diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index 8aa2e6e98e..ac0c6c6096 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -16,7 +16,7 @@ #include "hw/misc/arm_integrator_debug.h" #include "hw/net/smc91c111.h" #include "net/net.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/runstate.h" #include "system/system.h" #include "qemu/log.h" diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c index 08d2b3025c..362c145409 100644 --- a/hw/arm/kzm.c +++ b/hw/arm/kzm.c @@ -19,7 +19,7 @@ #include "hw/arm/boot.h" #include "hw/boards.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "net/net.h" #include "hw/net/lan9118.h" #include "hw/char/serial-mm.h" diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c index 3f56fb45ce..ade363daaa 100644 --- a/hw/arm/microbit.c +++ b/hw/arm/microbit.c @@ -13,7 +13,7 @@ #include "hw/boards.h" #include "hw/arm/boot.h" #include "system/system.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/nrf51_soc.h" #include "hw/i2c/microbit_i2c.h" diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c index 13ed868b6b..b0633a5a69 100644 --- a/hw/arm/mps2-tz.c +++ b/hw/arm/mps2-tz.c @@ -54,7 +54,7 @@ #include "hw/arm/armv7m.h" #include "hw/or-irq.h" #include "hw/boards.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "system/reset.h" #include "hw/misc/unimp.h" diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 3f8db0cab6..6958485a66 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -33,7 +33,7 @@ #include "hw/arm/armv7m.h" #include "hw/or-irq.h" #include "hw/boards.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/qdev-properties.h" #include "hw/misc/unimp.h" diff --git a/hw/arm/mps3r.c b/hw/arm/mps3r.c index 1bddb5e822..4dd1e8a718 100644 --- a/hw/arm/mps3r.c +++ b/hw/arm/mps3r.c @@ -28,7 +28,7 @@ #include "qemu/units.h" #include "qapi/error.h" #include "qobject/qlist.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "cpu.h" #include "system/system.h" #include "hw/boards.h" diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c index e8a5b231ba..bc9b419e37 100644 --- a/hw/arm/msf2-soc.c +++ b/hw/arm/msf2-soc.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/char/serial-mm.h" #include "hw/arm/msf2-soc.h" #include "hw/misc/unimp.h" diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c index 9b20f1e2c9..29c76c6860 100644 --- a/hw/arm/msf2-som.c +++ b/hw/arm/msf2-som.c @@ -33,7 +33,7 @@ #include "hw/qdev-properties.h" #include "hw/arm/boot.h" #include "hw/qdev-clock.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/msf2-soc.h" #define DDR_BASE_ADDRESS 0xA0000000 diff --git a/hw/arm/musca.c b/hw/arm/musca.c index e9c092abc3..a4f43f1992 100644 --- a/hw/arm/musca.c +++ b/hw/arm/musca.c @@ -22,7 +22,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/arm/boot.h" #include "hw/arm/armsse.h" diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c index 3ee10b4777..91d7e3f04b 100644 --- a/hw/arm/omap1.c +++ b/hw/arm/omap1.c @@ -23,7 +23,7 @@ #include "qemu/main-loop.h" #include "qapi/error.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/qdev-properties.h" diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c index 24b4043183..aa1e96b3ad 100644 --- a/hw/arm/omap_sx1.c +++ b/hw/arm/omap_sx1.c @@ -34,7 +34,7 @@ #include "hw/arm/boot.h" #include "hw/block/flash.h" #include "system/qtest.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/cutils.h" #include "qemu/error-report.h" diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c index 634af9b0a1..e0956880d1 100644 --- a/hw/arm/orangepi.c +++ b/hw/arm/orangepi.c @@ -19,7 +19,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "hw/boards.h" diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 3361111360..cbe914c93e 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -20,7 +20,7 @@ #include "net/net.h" #include "hw/boards.h" #include "qemu/log.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/arm/armv7m.h" #include "hw/char/pl011.h" diff --git a/hw/arm/stm32f100_soc.c b/hw/arm/stm32f100_soc.c index 53b5636452..0eabaf8d9b 100644 --- a/hw/arm/stm32f100_soc.c +++ b/hw/arm/stm32f100_soc.c @@ -27,7 +27,7 @@ #include "qapi/error.h" #include "qemu/module.h" #include "hw/arm/boot.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/stm32f100_soc.h" #include "hw/qdev-properties.h" #include "hw/qdev-clock.h" diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c index 47a54e592b..32e96912f0 100644 --- a/hw/arm/stm32f205_soc.c +++ b/hw/arm/stm32f205_soc.c @@ -26,7 +26,7 @@ #include "qapi/error.h" #include "qemu/module.h" #include "hw/arm/boot.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/arm/stm32f205_soc.h" #include "hw/qdev-properties.h" #include "hw/qdev-clock.h" diff --git a/hw/arm/stm32f405_soc.c b/hw/arm/stm32f405_soc.c index 18d8824f29..bba9060daf 100644 --- a/hw/arm/stm32f405_soc.c +++ b/hw/arm/stm32f405_soc.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/arm/stm32f405_soc.h" #include "hw/qdev-clock.h" diff --git a/hw/arm/stm32l4x5_soc.c b/hw/arm/stm32l4x5_soc.c index dbf75329f7..6278d354c8 100644 --- a/hw/arm/stm32l4x5_soc.c +++ b/hw/arm/stm32l4x5_soc.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/or-irq.h" #include "hw/arm/stm32l4x5_soc.h" diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c index 59c0160283..ee8747781e 100644 --- a/hw/avr/atmega.c +++ b/hw/avr/atmega.c @@ -13,7 +13,7 @@ #include "qemu/units.h" #include "qapi/error.h" #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/system.h" #include "hw/qdev-properties.h" #include "hw/sysbus.h" diff --git a/hw/char/goldfish_tty.c b/hw/char/goldfish_tty.c index 7374561141..f0891ffa4d 100644 --- a/hw/char/goldfish_tty.c +++ b/hw/char/goldfish_tty.c @@ -15,7 +15,7 @@ #include "chardev/char-fe.h" #include "qemu/log.h" #include "trace.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/dma.h" #include "hw/char/goldfish_tty.h" diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c index 07fb868965..8cbf6ce803 100644 --- a/hw/char/omap_uart.c +++ b/hw/char/omap_uart.c @@ -21,7 +21,7 @@ #include "chardev/char.h" #include "hw/arm/omap.h" #include "hw/char/serial-mm.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" /* UARTs */ struct omap_uart_s { diff --git a/hw/char/riscv_htif.c b/hw/char/riscv_htif.c index ec5db5a597..c884be5d75 100644 --- a/hw/char/riscv_htif.c +++ b/hw/char/riscv_htif.c @@ -28,7 +28,7 @@ #include "chardev/char-fe.h" #include "qemu/timer.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/tswap.h" #include "system/dma.h" #include "system/runstate.h" diff --git a/hw/core/cpu-system.c b/hw/core/cpu-system.c index 5ef8c24b5b..82b68b8927 100644 --- a/hw/core/cpu-system.c +++ b/hw/core/cpu-system.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/cputlb.h" #include "system/memory.h" #include "exec/tb-flush.h" diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c index 7f1fb562be..a6e477a2d8 100644 --- a/hw/core/null-machine.c +++ b/hw/core/null-machine.c @@ -14,7 +14,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "hw/boards.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/core/cpu.h" static void machine_none_init(MachineState *mch) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index 98819d5dc6..6eb4c0f15a 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -21,7 +21,7 @@ #include "qapi/error.h" #include "hw/sysbus.h" #include "monitor/monitor.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" static void sysbus_dev_print(Monitor *mon, DeviceState *dev, int indent); static char *sysbus_get_fw_dev_path(DeviceState *dev); diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c index 5bf54347ed..6842e7d491 100644 --- a/hw/dma/rc4030.c +++ b/hw/dma/rc4030.c @@ -32,7 +32,7 @@ #include "qemu/timer.h" #include "qemu/log.h" #include "qemu/module.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" #include "qom/object.h" diff --git a/hw/hyperv/hv-balloon.c b/hw/hyperv/hv-balloon.c index 6f33c3e741..0b1da723c8 100644 --- a/hw/hyperv/hv-balloon.c +++ b/hw/hyperv/hv-balloon.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "hv-balloon-internal.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/cpu-common.h" #include "exec/ramblock.h" #include "hw/boards.h" diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index 382c62d668..d21e428eae 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -11,7 +11,7 @@ #include "qemu/main-loop.h" #include "qemu/module.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/memory.h" #include "system/kvm.h" #include "qemu/bitops.h" diff --git a/hw/i386/kvm/xen_evtchn.c b/hw/i386/kvm/xen_evtchn.c index 9b8b092bc2..f9223ef1a1 100644 --- a/hw/i386/kvm/xen_evtchn.c +++ b/hw/i386/kvm/xen_evtchn.c @@ -23,7 +23,7 @@ #include "qobject/qdict.h" #include "qom/object.h" #include "exec/target_page.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/vmstate.h" #include "trace.h" diff --git a/hw/i386/kvm/xen_gnttab.c b/hw/i386/kvm/xen_gnttab.c index 7b843a72b1..430ba62896 100644 --- a/hw/i386/kvm/xen_gnttab.c +++ b/hw/i386/kvm/xen_gnttab.c @@ -17,7 +17,7 @@ #include "qapi/error.h" #include "qom/object.h" #include "exec/target_page.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/vmstate.h" #include "hw/sysbus.h" diff --git a/hw/i386/kvm/xen_overlay.c b/hw/i386/kvm/xen_overlay.c index db9aa7942d..a2b26e9906 100644 --- a/hw/i386/kvm/xen_overlay.c +++ b/hw/i386/kvm/xen_overlay.c @@ -16,7 +16,7 @@ #include "qapi/error.h" #include "qom/object.h" #include "exec/target_page.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/vmstate.h" #include "hw/sysbus.h" diff --git a/hw/i386/sgx-epc.c b/hw/i386/sgx-epc.c index 875e1c5c33..00b220d4d6 100644 --- a/hw/i386/sgx-epc.c +++ b/hw/i386/sgx-epc.c @@ -17,7 +17,7 @@ #include "qapi/error.h" #include "qapi/visitor.h" #include "target/i386/cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" static const Property sgx_epc_properties[] = { DEFINE_PROP_UINT64(SGX_EPC_ADDR_PROP, SGXEPCDevice, addr, 0), diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c index e665e2111c..5685c4fb80 100644 --- a/hw/i386/sgx.c +++ b/hw/i386/sgx.c @@ -20,7 +20,7 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "qapi/qapi-commands-misc-target.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/hw_accel.h" #include "system/reset.h" #include diff --git a/hw/i386/vapic.c b/hw/i386/vapic.c index 14de9b7a82..26aae64e5d 100644 --- a/hw/i386/vapic.c +++ b/hw/i386/vapic.c @@ -16,7 +16,7 @@ #include "system/hw_accel.h" #include "system/kvm.h" #include "system/runstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/i386/apic_internal.h" #include "hw/sysbus.h" #include "hw/boards.h" diff --git a/hw/ide/ahci-sysbus.c b/hw/ide/ahci-sysbus.c index 03a5bd42d0..3c1935d81c 100644 --- a/hw/ide/ahci-sysbus.c +++ b/hw/ide/ahci-sysbus.c @@ -22,7 +22,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index d9f8c36778..987034efd3 100644 --- a/hw/input/lasips2.c +++ b/hw/input/lasips2.c @@ -29,7 +29,7 @@ #include "hw/input/lasips2.h" #include "exec/hwaddr.h" #include "trace.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/vmstate.h" #include "hw/irq.h" #include "qapi/error.h" diff --git a/hw/intc/loongarch_extioi.c b/hw/intc/loongarch_extioi.c index a51a215e6e..a558c50185 100644 --- a/hw/intc/loongarch_extioi.c +++ b/hw/intc/loongarch_extioi.c @@ -11,7 +11,7 @@ #include "qapi/error.h" #include "hw/irq.h" #include "hw/loongarch/virt.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/intc/loongarch_extioi.h" #include "trace.h" diff --git a/hw/intc/riscv_aplic.c b/hw/intc/riscv_aplic.c index 5964cde7e0..789c4a4d6e 100644 --- a/hw/intc/riscv_aplic.c +++ b/hw/intc/riscv_aplic.c @@ -22,7 +22,7 @@ #include "qemu/module.h" #include "qemu/error-report.h" #include "qemu/bswap.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/sysbus.h" #include "hw/pci/msi.h" #include "hw/boards.h" diff --git a/hw/intc/riscv_imsic.c b/hw/intc/riscv_imsic.c index 241b12fef0..852f413e5a 100644 --- a/hw/intc/riscv_imsic.c +++ b/hw/intc/riscv_imsic.c @@ -22,7 +22,7 @@ #include "qemu/module.h" #include "qemu/error-report.h" #include "qemu/bswap.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/sysbus.h" #include "hw/pci/msi.h" #include "hw/boards.h" diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index a5840ff968..08ae2d9692 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -18,7 +18,7 @@ #include "system/reset.h" #include "system/rtc.h" #include "hw/loongarch/virt.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/irq.h" #include "net/net.h" #include "hw/loader.h" diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index 1de8dfec7d..1a432e9bd2 100644 --- a/hw/mem/memory-device.c +++ b/hw/mem/memory-device.c @@ -17,7 +17,7 @@ #include "qemu/range.h" #include "hw/virtio/vhost.h" #include "system/kvm.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" static bool memory_device_is_empty(const MemoryDeviceState *md) diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c index 21ad215e44..c887c7a99e 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -36,7 +36,7 @@ #include "hw/boards.h" #include "hw/char/serial-mm.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/ssi/ssi.h" #include "boot.h" diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c index bdba2006b7..f976c90bd2 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -33,7 +33,7 @@ #include "system/system.h" #include "hw/boards.h" #include "hw/misc/unimp.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/char/xilinx_uartlite.h" #include "boot.h" diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c index bdbf7328bf..0922c65295 100644 --- a/hw/microblaze/xlnx-zynqmp-pmu.c +++ b/hw/microblaze/xlnx-zynqmp-pmu.c @@ -17,7 +17,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "cpu.h" #include "boot.h" diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c index c530688e76..b6dabf2893 100644 --- a/hw/mips/mipssim.c +++ b/hw/mips/mipssim.c @@ -28,7 +28,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/datadir.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/clock.h" #include "hw/mips/mips.h" #include "hw/char/serial-mm.h" diff --git a/hw/misc/allwinner-h3-dramc.c b/hw/misc/allwinner-h3-dramc.c index c4f3eb9274..74ff71b753 100644 --- a/hw/misc/allwinner-h3-dramc.c +++ b/hw/misc/allwinner-h3-dramc.c @@ -24,7 +24,7 @@ #include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/module.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "qapi/error.h" #include "hw/misc/allwinner-h3-dramc.h" diff --git a/hw/misc/allwinner-r40-dramc.c b/hw/misc/allwinner-r40-dramc.c index 96e1848c21..5908a059e8 100644 --- a/hw/misc/allwinner-r40-dramc.c +++ b/hw/misc/allwinner-r40-dramc.c @@ -24,7 +24,7 @@ #include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/module.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "qapi/error.h" #include "qemu/bitops.h" diff --git a/hw/misc/ivshmem-flat.c b/hw/misc/ivshmem-flat.c index 40309a8ff3..076c4b42de 100644 --- a/hw/misc/ivshmem-flat.c +++ b/hw/misc/ivshmem-flat.c @@ -17,7 +17,7 @@ #include "hw/qdev-properties-system.h" #include "hw/sysbus.h" #include "chardev/char-fe.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" #include "hw/misc/ivshmem-flat.h" diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c index 03b1feda50..3c0819c58a 100644 --- a/hw/misc/mac_via.c +++ b/hw/misc/mac_via.c @@ -16,7 +16,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/vmstate.h" #include "hw/sysbus.h" #include "hw/irq.h" diff --git a/hw/net/i82596.c b/hw/net/i82596.c index ee919dab3c..64ed3c8390 100644 --- a/hw/net/i82596.c +++ b/hw/net/i82596.c @@ -15,7 +15,7 @@ #include "hw/irq.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/module.h" #include "trace.h" #include "i82596.h" diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index a757939cfb..cbfb2b5303 100644 --- a/hw/nvram/fw_cfg.c +++ b/hw/nvram/fw_cfg.c @@ -27,7 +27,7 @@ #include "system/system.h" #include "system/dma.h" #include "system/reset.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "hw/nvram/fw_cfg.h" #include "hw/qdev-properties.h" diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index 83d7c2a8af..c2284a7d41 100644 --- a/hw/openrisc/openrisc_sim.c +++ b/hw/openrisc/openrisc_sim.c @@ -28,7 +28,7 @@ #include "net/net.h" #include "hw/openrisc/boot.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/device_tree.h" #include "system/system.h" #include "hw/sysbus.h" diff --git a/hw/openrisc/virt.c b/hw/openrisc/virt.c index 3055306783..0d1c1f103c 100644 --- a/hw/openrisc/virt.c +++ b/hw/openrisc/virt.c @@ -11,7 +11,7 @@ #include "qemu/guest-random.h" #include "qapi/error.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/irq.h" #include "hw/boards.h" #include "hw/char/serial-mm.h" diff --git a/hw/pci-host/mv64361.c b/hw/pci-host/mv64361.c index 9c41c155fb..a297318c6e 100644 --- a/hw/pci-host/mv64361.c +++ b/hw/pci-host/mv64361.c @@ -17,7 +17,7 @@ #include "hw/irq.h" #include "hw/intc/i8259.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/log.h" #include "qemu/error-report.h" #include "trace.h" diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index 246d6d633b..7b2dc6985c 100644 --- a/hw/ppc/pegasos2.c +++ b/hw/ppc/pegasos2.c @@ -31,7 +31,7 @@ #include "qemu/error-report.h" #include "system/kvm.h" #include "kvm_ppc.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/qom-qobject.h" #include "qobject/qdict.h" #include "trace.h" diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index 1fe11dde50..f832ee61e8 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -18,7 +18,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/irq.h" #include "target/ppc/cpu.h" #include "qemu/log.h" diff --git a/hw/ppc/ppc4xx_sdram.c b/hw/ppc/ppc4xx_sdram.c index 562bff8d53..bf0faad9e7 100644 --- a/hw/ppc/ppc4xx_sdram.c +++ b/hw/ppc/ppc4xx_sdram.c @@ -34,7 +34,7 @@ #include "qapi/error.h" #include "qemu/log.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" /* get_system_memory() */ +#include "system/address-spaces.h" /* get_system_memory() */ #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/ppc/ppc4xx.h" diff --git a/hw/ppc/prep_systemio.c b/hw/ppc/prep_systemio.c index b1f2e130f0..08f29e72e4 100644 --- a/hw/ppc/prep_systemio.c +++ b/hw/ppc/prep_systemio.c @@ -28,7 +28,7 @@ #include "hw/isa/isa.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #include "qemu/error-report.h" /* for error_report() */ #include "qemu/module.h" diff --git a/hw/ppc/rs6000_mc.c b/hw/ppc/rs6000_mc.c index 0e5d53b8b6..27f1c90f06 100644 --- a/hw/ppc/rs6000_mc.c +++ b/hw/ppc/rs6000_mc.c @@ -24,7 +24,7 @@ #include "hw/isa/isa.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qapi/error.h" #include "trace.h" #include "qom/object.h" diff --git a/hw/ppc/spapr_ovec.c b/hw/ppc/spapr_ovec.c index 88e29536aa..6d6eaf67cb 100644 --- a/hw/ppc/spapr_ovec.c +++ b/hw/ppc/spapr_ovec.c @@ -15,7 +15,7 @@ #include "hw/ppc/spapr_ovec.h" #include "migration/vmstate.h" #include "qemu/bitmap.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/error-report.h" #include "trace.h" #include diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c index 09cb77de93..f14efa3a7c 100644 --- a/hw/ppc/vof.c +++ b/hw/ppc/vof.c @@ -15,7 +15,7 @@ #include "qemu/units.h" #include "qemu/log.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/ppc/vof.h" #include "hw/ppc/fdt.h" #include "system/runstate.h" diff --git a/hw/remote/iommu.c b/hw/remote/iommu.c index ec845d1f58..3e0758a21e 100644 --- a/hw/remote/iommu.c +++ b/hw/remote/iommu.c @@ -14,7 +14,7 @@ #include "hw/pci/pci_bus.h" #include "hw/pci/pci.h" #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" /** diff --git a/hw/riscv/microblaze-v-generic.c b/hw/riscv/microblaze-v-generic.c index d8e67906d2..e863c50cbc 100644 --- a/hw/riscv/microblaze-v-generic.c +++ b/hw/riscv/microblaze-v-generic.c @@ -22,7 +22,7 @@ #include "net/net.h" #include "hw/boards.h" #include "hw/char/serial-mm.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/char/xilinx_uartlite.h" #include "hw/misc/unimp.h" diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c index 98a67fe52a..019d6b3986 100644 --- a/hw/riscv/opentitan.c +++ b/hw/riscv/opentitan.c @@ -28,7 +28,7 @@ #include "hw/riscv/boot.h" #include "qemu/units.h" #include "system/system.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" /* * This version of the OpenTitan machine currently supports diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c index e2242b97d0..17c5c72102 100644 --- a/hw/riscv/shakti_c.c +++ b/hw/riscv/shakti_c.c @@ -25,7 +25,7 @@ #include "hw/intc/riscv_aclint.h" #include "system/system.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/riscv/boot.h" static const struct MemmapEntry { diff --git a/hw/s390x/css.c b/hw/s390x/css.c index 738800c98d..2059c5dd0b 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -14,7 +14,7 @@ #include "qapi/visitor.h" #include "qemu/bitops.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/s390x/ioinst.h" #include "hw/qdev-properties.h" #include "hw/s390x/css.h" diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 811d892122..425e3e4a87 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -19,7 +19,7 @@ #include "qobject/qdict.h" #include "qemu/error-report.h" #include "system/memory_mapping.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/kvm.h" #include "migration/qemu-file-types.h" #include "migration/register.h" diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 43f3b162c8..e8ecb90826 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/kvm.h" #include "net/net.h" #include "hw/virtio/virtio.h" diff --git a/hw/sparc/sun4m_iommu.c b/hw/sparc/sun4m_iommu.c index 5a4c1f5e3b..4a542b18d2 100644 --- a/hw/sparc/sun4m_iommu.c +++ b/hw/sparc/sun4m_iommu.c @@ -29,7 +29,7 @@ #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qemu/module.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" /* diff --git a/hw/sparc64/sun4u_iommu.c b/hw/sparc64/sun4u_iommu.c index eba811af0c..533fcae1fb 100644 --- a/hw/sparc64/sun4u_iommu.c +++ b/hw/sparc64/sun4u_iommu.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "hw/sparc/sun4u_iommu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/log.h" #include "qemu/module.h" #include "trace.h" diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index ccb97b6806..ea82472105 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -36,7 +36,7 @@ #include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" #include "hw/timer/i8254.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #include "trace.h" diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index 6cdeb72df0..b668aee97a 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -18,7 +18,7 @@ #include "qemu/module.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "hw/pci/pci_ids.h" #include "hw/acpi/tpm.h" diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index c7ab4ff57a..d6575d7c44 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -28,7 +28,7 @@ #include "migration/vmstate.h" #include "hw/qdev-properties.h" #include "hw/s390x/ap-bridge.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qom/object.h" #define TYPE_VFIO_AP_DEVICE "vfio-ap" diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index e5e0d9e3e7..29e804e122 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -27,7 +27,7 @@ #include "hw/s390x/vfio-ccw.h" #include "hw/qdev-properties.h" #include "hw/s390x/ccw-device.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" #include "qemu/module.h" diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 989c6ee83d..98832af88d 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -27,7 +27,7 @@ #include "hw/vfio/vfio-common.h" #include "hw/vfio/pci.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/memory.h" #include "exec/ram_addr.h" #include "exec/target_page.h" diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 1d1c5f9a77..2e993c7e73 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -23,7 +23,7 @@ #include #include "hw/vfio/vfio-common.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/memory.h" #include "exec/ram_addr.h" #include "qemu/error-report.h" diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index 96c6bf5654..c6edbdd4ae 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -29,7 +29,7 @@ #include "qemu/module.h" #include "qemu/range.h" #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/queue.h" #include "hw/sysbus.h" #include "trace.h" diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index 1a5d1611f2..c9a7dd8d68 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -13,7 +13,7 @@ #include #include "system/kvm.h" #include "system/hostmem.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/vfio/vfio-common.h" #include "hw/hw.h" diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 7efbde3d4c..1e0336df1d 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -20,7 +20,7 @@ #include "hw/virtio/virtio-net.h" #include "hw/virtio/vhost-shadow-virtqueue.h" #include "hw/virtio/vhost-vdpa.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "migration/blocker.h" #include "qemu/cutils.h" #include "qemu/main-loop.h" diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 2eb5a14fa2..0d0603c674 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -24,7 +24,7 @@ #include "hw/boards.h" #include "system/balloon.h" #include "hw/virtio/virtio-balloon.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qapi/error.h" #include "qapi/qapi-events-machine.h" #include "qapi/visitor.h" diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c index 896feb37a1..d1c79c567b 100644 --- a/hw/virtio/virtio-bus.c +++ b/hw/virtio/virtio-bus.c @@ -28,7 +28,7 @@ #include "qapi/error.h" #include "hw/virtio/virtio-bus.h" #include "hw/virtio/virtio.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" /* #define DEBUG_VIRTIO_BUS */ diff --git a/monitor/hmp-cmds-target.c b/monitor/hmp-cmds-target.c index 6654d31406..011a367357 100644 --- a/monitor/hmp-cmds-target.c +++ b/monitor/hmp-cmds-target.c @@ -24,7 +24,7 @@ #include "qemu/osdep.h" #include "disas/disas.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/memory.h" #include "monitor/hmp-target.h" #include "monitor/monitor-internal.h" diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 7ded3378cf..8ddcdd76c1 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -14,7 +14,7 @@ */ #include "qemu/osdep.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/ioport.h" #include "exec/gdbstub.h" #include "gdbstub/enums.h" diff --git a/system/ioport.c b/system/ioport.c index 2291739039..5300716464 100644 --- a/system/ioport.c +++ b/system/ioport.c @@ -28,7 +28,7 @@ #include "qemu/osdep.h" #include "exec/ioport.h" #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "trace.h" struct MemoryRegionPortioList { diff --git a/system/memory.c b/system/memory.c index 2865d0deb1..a4185ea353 100644 --- a/system/memory.c +++ b/system/memory.c @@ -33,7 +33,7 @@ #include "qemu/accel.h" #include "hw/boards.h" #include "migration/vmstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" //#define DEBUG_UNASSIGNED diff --git a/system/memory_mapping.c b/system/memory_mapping.c index 8538a8241e..da708a08ab 100644 --- a/system/memory_mapping.c +++ b/system/memory_mapping.c @@ -17,7 +17,7 @@ #include "system/memory_mapping.h" #include "system/memory.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/core/cpu.h" //#define DEBUG_GUEST_PHYS_REGION_ADD diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 2439af63a0..93a3f9b53d 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -22,7 +22,7 @@ #include -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "hw/irq.h" #include "qemu/main-loop.h" diff --git a/target/arm/kvm.c b/target/arm/kvm.c index da30bdbb23..97de8c7e93 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -30,7 +30,7 @@ #include "internals.h" #include "hw/pci/pci.h" #include "exec/memattrs.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "gdbstub/enums.h" #include "hw/boards.h" #include "hw/irq.h" diff --git a/target/avr/helper.c b/target/avr/helper.c index 3412312ad5..a1e2cc9c35 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -26,7 +26,7 @@ #include "exec/cputlb.h" #include "exec/page-protection.h" #include "exec/cpu_ldst.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/helper-proto.h" bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request) diff --git a/target/i386/cpu-apic.c b/target/i386/cpu-apic.c index c1708b04bb..242a05fdbe 100644 --- a/target/i386/cpu-apic.c +++ b/target/i386/cpu-apic.c @@ -14,7 +14,7 @@ #include "system/hw_accel.h" #include "system/kvm.h" #include "system/xen.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/qdev-properties.h" #include "hw/i386/apic_internal.h" #include "cpu-internal.h" diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 1b64ceaaba..dba1b3ffef 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -38,7 +38,7 @@ #ifndef CONFIG_USER_ONLY #include "system/reset.h" #include "qapi/qapi-commands-machine-target.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "hw/i386/sgx-epc.h" #endif diff --git a/target/i386/kvm/xen-emu.c b/target/i386/kvm/xen-emu.c index e81a245881..b23010374f 100644 --- a/target/i386/kvm/xen-emu.c +++ b/target/i386/kvm/xen-emu.c @@ -17,7 +17,7 @@ #include "system/kvm_int.h" #include "system/kvm_xen.h" #include "kvm/kvm_i386.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "xen-emu.h" #include "trace.h" #include "system/runstate.h" diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index 04e5f7e637..91f0e32366 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -9,7 +9,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/ioport.h" #include "qemu/accel.h" #include "system/nvmm.h" diff --git a/target/i386/sev.c b/target/i386/sev.c index 0e1dbb6959..ba88976e9f 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -39,7 +39,7 @@ #include "qapi/qapi-commands-misc-target.h" #include "confidential-guest.h" #include "hw/i386/pc.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "qemu/queue.h" OBJECT_DECLARE_TYPE(SevCommonState, SevCommonStateClass, SEV_COMMON) diff --git a/target/i386/tcg/system/misc_helper.c b/target/i386/tcg/system/misc_helper.c index ce18c75b9f..0555cf2604 100644 --- a/target/i386/tcg/system/misc_helper.c +++ b/target/i386/tcg/system/misc_helper.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/cpu_ldst.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/cputlb.h" #include "tcg/helper-tcg.h" #include "hw/i386/apic.h" diff --git a/target/i386/tcg/system/tcg-cpu.c b/target/i386/tcg/system/tcg-cpu.c index 13a3507863..ab1f3c7c59 100644 --- a/target/i386/tcg/system/tcg-cpu.c +++ b/target/i386/tcg/system/tcg-cpu.c @@ -23,7 +23,7 @@ #include "system/system.h" #include "qemu/units.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "tcg/tcg-cpu.h" diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 41fb8c5a4e..d58cb11cee 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/ioport.h" #include "gdbstub/helpers.h" #include "qemu/accel.h" diff --git a/target/loongarch/kvm/kvm.c b/target/loongarch/kvm/kvm.c index 28735c80be..1668f12410 100644 --- a/target/loongarch/kvm/kvm.c +++ b/target/loongarch/kvm/kvm.c @@ -18,7 +18,7 @@ #include "system/kvm_int.h" #include "hw/pci/pci.h" #include "exec/memattrs.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "hw/irq.h" #include "hw/loongarch/virt.h" diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 4ffeeaa1c9..9686fa86e0 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -35,7 +35,7 @@ #include "accel/accel-cpu-target.h" #include "hw/pci/pci.h" #include "exec/memattrs.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/boards.h" #include "hw/irq.h" #include "hw/intc/riscv_imsic.h" diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index d8f483898d..b079d120db 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -17,7 +17,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "cpu.h" #include "s390x-internal.h" #include "kvm/kvm_s390x.h" diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c index 6a4d9c5081..a3347f1236 100644 --- a/target/s390x/sigp.c +++ b/target/s390x/sigp.c @@ -14,7 +14,7 @@ #include "hw/boards.h" #include "system/hw_accel.h" #include "system/runstate.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "exec/cputlb.h" #include "exec/exec-all.h" #include "system/tcg.h" diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index f969850f87..ac733f407f 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -28,7 +28,7 @@ #include "tcg_s390x.h" #ifndef CONFIG_USER_ONLY #include "qemu/timer.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "hw/s390x/ioinst.h" #include "hw/s390x/s390_flic.h" #include "hw/boards.h" diff --git a/target/xtensa/dbg_helper.c b/target/xtensa/dbg_helper.c index 5546c82ecd..163a1ffc7b 100644 --- a/target/xtensa/dbg_helper.c +++ b/target/xtensa/dbg_helper.c @@ -31,7 +31,7 @@ #include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "exec/exec-all.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" void HELPER(wsr_ibreakenable)(CPUXtensaState *env, uint32_t v) { diff --git a/hw/display/apple-gfx.m b/hw/display/apple-gfx.m index c4323574e1..2ff1c90df7 100644 --- a/hw/display/apple-gfx.m +++ b/hw/display/apple-gfx.m @@ -18,7 +18,7 @@ #include "qapi/visitor.h" #include "qapi/error.h" #include "block/aio-wait.h" -#include "exec/address-spaces.h" +#include "system/address-spaces.h" #include "system/dma.h" #include "migration/blocker.h" #include "ui/console.h" From patchwork Tue Mar 18 21:31:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874417 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75714wru; Tue, 18 Mar 2025 14:34:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXBEL0fSbdK0kRR0FM4TLVE0nU9+LCbcZBrCgVwjqHWIB6foeMAo9YFLZzwj98Mx9GykPxaJQ==@linaro.org X-Google-Smtp-Source: AGHT+IGJLxNDBBlDmBJZT8IgspPvW21VrtzGZEtE4HVjHgsFSlxnvRE9iQuzDCa0DZ8esD8EEELq X-Received: by 2002:a05:6214:2269:b0:6df:97a3:5e5a with SMTP id 6a1803df08f44-6eb29412850mr6342476d6.28.1742333641419; Tue, 18 Mar 2025 14:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333641; cv=none; d=google.com; s=arc-20240605; b=ZPBU9CvfxDhogVFk0CdZD+/0WjFeoj3K0E/olLxBcooay0ByFmDuQ2mqVX3WJA96mz i9wOOLmPyvzo8sKl9x1zQKG2hW4mvK/AuC0C0cNDuYaBahbMtwUNq6xXJw5kScMnyJyX lYXg+fy6eJbRv7Z1BcG0s8Nxv9pF7P9CUPnlG3suA1NZ6b82j3E8WsegDbhF5PMPDiuk a4jV+AXusqhqb/fyIVs4o3lOnd3RtuwEpmtmUPUjagmwyybmGJcIC7C6PKN7bl9HPKI3 iuzOuEn//SF1VSs6Y/BGr6uBhPtByz5HuYqsFkSW8NxXi8f5qX/2Fvqb8f2MGkFkZiKa uLFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wdcU5viY3SJ9g5sCwNaHxEvqZRSzfoQpbG9ZwJLuUEY=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=amIi/0zc053JYnZ5xzimZLWqe/g07bXBQz2FUvrNSwXBRFXNKjyY2psOQxJZ93RoWi OnqV2A9cb+8VdDQNgURpz21WDxSxvnmHQKhzQs89yNeJ3m18cQp5bmFIGs6P03GMoZmH UzJ8kMn4e/xUwLB7Et65AzCUM9QQC4gQoDkwtlow7rt1IE4IcHP/P7voQIp+UOZVRXtb 1K++bN8uYcMxE4EjbQjL8QkfdPKVC1EAGeex+K3v8jEDUUd0NxwXKul29qh/aIDkRC4K 9LV3xV+e5RTYwEdriu1l33TIHT4UkbLvTGk3wLoaT97nea50VzK623ExyUYUkVzvX/P1 y6LA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AvCBmi0v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6eade33ec93si129355556d6.249.2025.03.18.14.34.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:34:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AvCBmi0v; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueYO-0001RU-Im; Tue, 18 Mar 2025 17:32:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueXz-0001H5-Hr for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:27 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXw-0000mB-T4 for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:26 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-22423adf751so108676845ad.2 for ; Tue, 18 Mar 2025 14:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333543; x=1742938343; 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=wdcU5viY3SJ9g5sCwNaHxEvqZRSzfoQpbG9ZwJLuUEY=; b=AvCBmi0vswiLkUYm24OaSSNuDQtThOaMtw8/7kYOFF6L8X6R0e8FPMgQoLijt+HzXi rcFK45/cZUvJV7Ru/okaDTYeMEEgJwi/WDH6+W8vKcHIaqduQ1UZVtwYZc+qryj44sTc 8RKQNSRBuVocpQyD3b84DQyB+DtbqsqxyOXVRQm71b+VZhqBs2hq5Vbm8TEXki19Rdt5 uDoSy9qcNJu2eqongKgH/7r3XhD5Rap0Cihtk+Wdhpp6uqxYZEBHvWTHMgaPIzv11a3a rn2e7ktbsq+Vj81s2bihYChMmu3WNmjt1xkyLrvNfNMoKCdnwFfGUAGQpj4qc9gy2lEI ZS0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333543; x=1742938343; 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=wdcU5viY3SJ9g5sCwNaHxEvqZRSzfoQpbG9ZwJLuUEY=; b=XAVlSJRSv2+TfDwlKadHJXODm9OuS3dF5nglZOZaOaWq80jpBjRMKHen366rLq/izF PmsQTwWtQ+CJt99KSxOLwYtkjjM0s8xpYmy3K3qtZOI5K1rxuxM9uDAhHY8Hf+Ijy436 tOHJdIgdZ56kFO3eBaKHh39GlCRYbbu9bCD2v1xPQHdX4x8EaZ4OCvj2ML4yPYd6Keme u4+4n0CVfp/aIDqSZtoeymlGQUyDqalh29+R7GkTc/Wkds4uQJPsb/c1Hh2f6kORBcZx TkfzFQ7/CicLZa8qMy5nA6hQzxiYSkIPHPqUHGF5uMBlClPLI1zybtywYdDnZNMdj6rW N11w== X-Gm-Message-State: AOJu0YyWxj1NrCk8wEGrOlhq8PXwCezawck4Fb+Ek4KZy88oG5VpA6Ms DpH8GouAafPPiqeh/tZJI3liKzhBYmyRjmOwgzMdiAG29uKmzBK3lT4pYHvQapoD4qIKBSXdejN K X-Gm-Gg: ASbGnctFUw6XR1s3EAlFephcsLwrz9TmMS4I6AHLuFVXbfiZ9wXqflpfbTrlsqTGC5O +25kBx/7AWi0TMuFk9Y1leB8I3CcsLamQaf/ob3IVgtcJFbqfatC0mJKP9AJrOW1afgLkZW+Ch+ 31a70rR6yI8pGJdRi3NYEtoWJeHjogUWVQCQXegKfULR6dFdhxBJ0xGmbX9MgxqgexxnOfp4eg/ fWx8XWzE8Lk0bUqY5u8iYtUVWR4SusrN+DEhDlaVfkxZlgGwKFkWxC440keBShWe82SVRAqz7Mh IYqApqX6QKSiIU8LTP+fQa1ok8dBTc0tniBweLcmZQ8lxpKBO+niF8iw5b9i2zWojcpLQ3uFKQ6 d X-Received: by 2002:a05:6a20:2d28:b0:1ee:b8bc:3d2e with SMTP id adf61e73a8af0-1fbeb3911a0mr309534637.8.1742333543423; Tue, 18 Mar 2025 14:32:23 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 18/42] include/system: Move exec/ioport.h to system/ioport.h Date: Tue, 18 Mar 2025 14:31:43 -0700 Message-ID: <20250318213209.2579218-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the existing includes with sed. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- hw/display/vga_int.h | 2 +- include/hw/char/parallel-isa.h | 2 +- include/hw/dma/i8257.h | 2 +- include/hw/ide/ide-bus.h | 2 +- include/hw/isa/isa.h | 2 +- include/{exec => system}/ioport.h | 6 ++---- hw/block/fdc-isa.c | 2 +- monitor/hmp-cmds.c | 2 +- system/ioport.c | 2 +- system/physmem.c | 2 +- system/qtest.c | 2 +- target/i386/nvmm/nvmm-all.c | 2 +- target/i386/whpx/whpx-all.c | 2 +- tests/qtest/fuzz/qtest_wrappers.c | 2 +- MAINTAINERS | 2 +- 15 files changed, 16 insertions(+), 18 deletions(-) rename include/{exec => system}/ioport.h (97%) diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index 60ad26e03e..747b5cc6cf 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -26,7 +26,7 @@ #define HW_VGA_INT_H #include "ui/console.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "system/memory.h" #include "hw/display/bochs-vbe.h" diff --git a/include/hw/char/parallel-isa.h b/include/hw/char/parallel-isa.h index 5284b2ffec..3edaf9dbe4 100644 --- a/include/hw/char/parallel-isa.h +++ b/include/hw/char/parallel-isa.h @@ -12,7 +12,7 @@ #include "parallel.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "hw/isa/isa.h" #include "qom/object.h" diff --git a/include/hw/dma/i8257.h b/include/hw/dma/i8257.h index 4342e4a91e..33b6286d5a 100644 --- a/include/hw/dma/i8257.h +++ b/include/hw/dma/i8257.h @@ -2,7 +2,7 @@ #define HW_I8257_H #include "hw/isa/isa.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "qom/object.h" #define TYPE_I8257 "i8257" diff --git a/include/hw/ide/ide-bus.h b/include/hw/ide/ide-bus.h index 4841a7dcd6..121b455fcd 100644 --- a/include/hw/ide/ide-bus.h +++ b/include/hw/ide/ide-bus.h @@ -1,7 +1,7 @@ #ifndef HW_IDE_BUS_H #define HW_IDE_BUS_H -#include "exec/ioport.h" +#include "system/ioport.h" #include "hw/ide/ide-dev.h" #include "hw/ide/ide-dma.h" diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 1d852011b3..a82c5f1004 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -4,7 +4,7 @@ /* ISA bus */ #include "system/memory.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/exec/ioport.h b/include/system/ioport.h similarity index 97% rename from include/exec/ioport.h rename to include/system/ioport.h index ecea3575bc..780ea5a676 100644 --- a/include/exec/ioport.h +++ b/include/system/ioport.h @@ -21,8 +21,8 @@ * IO ports API */ -#ifndef IOPORT_H -#define IOPORT_H +#ifndef SYSTEM_IOPORT_H +#define SYSTEM_IOPORT_H #include "system/memory.h" @@ -39,9 +39,7 @@ typedef struct MemoryRegionPortio { #define PORTIO_END_OF_LIST() { } -#ifndef CONFIG_USER_ONLY extern const MemoryRegionOps unassigned_io_ops; -#endif void cpu_outb(uint32_t addr, uint8_t val); void cpu_outw(uint32_t addr, uint16_t val); diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c index a10c24aab1..561cfa47c1 100644 --- a/hw/block/fdc-isa.c +++ b/hw/block/fdc-isa.c @@ -42,7 +42,7 @@ #include "system/block-backend.h" #include "system/blockdev.h" #include "system/system.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "qemu/log.h" #include "qemu/main-loop.h" #include "qemu/module.h" diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 8ddcdd76c1..74a0f56566 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -15,7 +15,7 @@ #include "qemu/osdep.h" #include "system/address-spaces.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "exec/gdbstub.h" #include "gdbstub/enums.h" #include "monitor/hmp.h" diff --git a/system/ioport.c b/system/ioport.c index 5300716464..4f96e9119f 100644 --- a/system/ioport.c +++ b/system/ioport.c @@ -26,7 +26,7 @@ */ #include "qemu/osdep.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "system/memory.h" #include "system/address-spaces.h" #include "trace.h" diff --git a/system/physmem.c b/system/physmem.c index be92969a4a..2850e14780 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -51,7 +51,7 @@ #include "qemu/memalign.h" #include "qemu/memfd.h" #include "system/memory.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "system/dma.h" #include "system/hostmem.h" #include "system/hw_accel.h" diff --git a/system/qtest.c b/system/qtest.c index 5407289154..523a047995 100644 --- a/system/qtest.c +++ b/system/qtest.c @@ -16,7 +16,7 @@ #include "system/qtest.h" #include "system/runstate.h" #include "chardev/char-fe.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "system/memory.h" #include "exec/tswap.h" #include "hw/qdev-core.h" diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index 91f0e32366..17394d073d 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "system/address-spaces.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "qemu/accel.h" #include "system/nvmm.h" #include "system/cpus.h" diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index d58cb11cee..b64852e13e 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "system/address-spaces.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "gdbstub/helpers.h" #include "qemu/accel.h" #include "system/whpx.h" diff --git a/tests/qtest/fuzz/qtest_wrappers.c b/tests/qtest/fuzz/qtest_wrappers.c index 0580f8df86..d7adcbe3fd 100644 --- a/tests/qtest/fuzz/qtest_wrappers.c +++ b/tests/qtest/fuzz/qtest_wrappers.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "hw/core/cpu.h" -#include "exec/ioport.h" +#include "system/ioport.h" #include "fuzz.h" diff --git a/MAINTAINERS b/MAINTAINERS index f606e158a7..9a702ff636 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3104,7 +3104,7 @@ M: Peter Xu M: David Hildenbrand R: Philippe Mathieu-Daudé S: Supported -F: include/exec/ioport.h +F: include/system/ioport.h F: include/exec/memop.h F: include/system/memory.h F: include/exec/ram_addr.h From patchwork Tue Mar 18 21:31:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874440 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76794wru; Tue, 18 Mar 2025 14:36:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVppfZ1K0Ashxd5fM2kz5JVpqUiVXTnLS8nQvF0Sr2b8pbm0ADqrfvze/+/1DJnxWW2bi2++g==@linaro.org X-Google-Smtp-Source: AGHT+IH94x/n6wqU10n7p/wb6wWOXZYlCwO5byP/70XnHdzUENVshysF5hZ+ZM6Y9Fnr4lmDqBBF X-Received: by 2002:ad4:5cca:0:b0:6e4:269f:60fe with SMTP id 6a1803df08f44-6eb2928c8cdmr7619356d6.10.1742333817244; Tue, 18 Mar 2025 14:36:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333817; cv=none; d=google.com; s=arc-20240605; b=dGBsK/7wmdGOkwQhb+ebq2AhyEEjV/gj7SiKdd/cS/TvVY0qde1HQe3+8ze7P/5MJI KBPZArjqjs+SgTa8DxKj1BO8G5FpMpXBijulf5tpWk1+dZUn3qwv0TPRZ9IBDNXRFkp0 xgGRhdBFdtaBFUJKH9WzQ7ozR4rnEzFg5eifMvvU2Y/NKG9YtYG6gFMzAN4C+rF6EBRM amtOu9mXyXHQ8cqhq1xkgch+NiLdEKkjCL/EGzT/soAByTLUivlOHIy+WFoCeFf2SGLH m+47NM8Frzo+Dtj7zwkjF1yGAracj/bxZDWwPtlDXL3NGEBMFi2FPoACpSLi7akLxuYR zBmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PGIsJ49PlQz0cO++UliO79dMkBrOAt4xODayzQ//uqA=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=CnwHRuVd9s1gE6QkYHSK6HiUU1Bqyy66hV1D2+IOkwEbVwusykwZRHB++KaNrOwZE6 uxWMQR2wxrBd7/Wh/sAxQe3ns74iNX39VuniS72vnq834pd4UJi7q7frWo0nvZxiEHsO xWSCLudo7sa22OCPDVaaGfyXMJs/0fVc+FFy/3Xju+h5klf/P2+d3pnep5WvaZelsJ+W ttMvRvRLx4Uhx6aAnwiENlvDepuCmgzuUA6vaJ8NUPaj9AfM3bhSSSM20HuysYKcn59e 90eqMPG5F4ASnZbRwXeSt9EK7doKzOyc12OfDpd0AYjoMh7jWPw+ZwvdqPO8MAMXfyyH 6txg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ljFzHrQX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6eade213251si130052726d6.156.2025.03.18.14.36.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:36:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ljFzHrQX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZ0-0001qx-13; Tue, 18 Mar 2025 17:33:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY2-0001IQ-1u for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:30 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXy-0000mQ-3X for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:28 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-223fd89d036so123812635ad.1 for ; Tue, 18 Mar 2025 14:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333545; x=1742938345; 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=PGIsJ49PlQz0cO++UliO79dMkBrOAt4xODayzQ//uqA=; b=ljFzHrQXYlNh1481KTWkSjDoSbdhGHGRkPn8Hku/mLcHGF2JMlYZ+z/YPFlaZh/9Dl 2YAg8rjZmUSLoMz1oA5JVlSw2gq12aLEjlr0L/nlWsUdEEqHDRoOdGkZkGiNNn0pi6Ef t2XVlBv2LCfGGaKUEwIyOpkqqvW3iL08Ti/liLY/JTvmCuin72qWkobS/qalSXPgTemw 0bX578swp9pYkHnada5nlqyn3pmRqOhWFPhX3TaA4ztC5mEhSNKZd72aUwlh3Tw918lO AHmu8kixQ66IMAPNmHNo88IJUDBwDiGDFVEzywrDkKiZSDny0u3QFgM21q+BzQSgzpvQ qHaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333545; x=1742938345; 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=PGIsJ49PlQz0cO++UliO79dMkBrOAt4xODayzQ//uqA=; b=H2vMn2ci0Sl2EGvZL0zAZsnrxbQh/RETzw6c1eyJaSaLvRFK2DHK4S3P9SGE2IGLZH tNNEOvWR2ReRTOAa8m0ZU5z53VVhkO7HKhqWfgFKThcHCuWc3KrDTPfs5L6aHUG939+j 9F9ZBYtbPCFqVW21r9q8rd1HC1DnbXLdx0o6Kui/dqVlJPqACH3RrYWNmuYwUg8MHvYQ Q643otr5vQRXKGraCyj5dOnd8NS4Q0jDciiVcArdXpk4Jalr39/LlSvRxx9a+DbgkuJB vENgNE9ql87L/1OmdZ8JkerGkQqtF9lsBvSaieMc9AovGoV8WYAUsZuCoZvOhZuDQgns HNIA== X-Gm-Message-State: AOJu0YwzetksgeVT8S9wUPXgt3QGDh21Q567Bqvcr5kXtLzGaSfpYh3Y +AfCQCbEsY0wnzE9de5cespYymP12vTz5rR9DQTH6alY9/3v6zTkzeHYuWzJokoNFtKiWpnIMBC R X-Gm-Gg: ASbGnctmjcRByu8BZc20a6ZE3PRscGLei0RLaym7mHzSPrLlOFICOGhUq408LFNsagD fCmtOcUDiGSCd8r3YgJGOiuOKc0F6Njm+TIanMEXFTaKCtGca9rFwMT88EUVO0y8ZHfv7N+mvqg 4nJsdhSM1vtWoy+uv4r4aYVIim9yPo1yKcKKWyhGnSQ9iuOZIjilBjmvFHQwJAr+FoV5reFBfY/ AYqRfpV7gtHTuaBUUJPBcj3czjOCMDvpPkUKtPF56SHwVP9ntOoCC6vL3gBIFvGxFEeoTgm1Dvf ldNEi5OO+2kDf5W/Gymq0gu7xWNpSEt0XIWHeLL2ZxNSZb6CR093ScuEEo7EPPpAu6s5GE0roGB K X-Received: by 2002:a05:6a21:6e49:b0:1f5:75a9:5255 with SMTP id adf61e73a8af0-1fbed40cbe6mr281728637.39.1742333544594; Tue, 18 Mar 2025 14:32:24 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:23 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 19/42] include/system: Move exec/ram_addr.h to system/ram_addr.h Date: Tue, 18 Mar 2025 14:31:44 -0700 Message-ID: <20250318213209.2579218-20-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the existing includes with sed. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/{exec => system}/ram_addr.h | 7 +++---- accel/kvm/kvm-all.c | 2 +- accel/tcg/cputlb.c | 2 +- accel/tcg/translate-all.c | 2 +- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_caps.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/remote/memory.c | 2 +- hw/remote/proxy-memory-listener.c | 2 +- hw/s390x/s390-stattrib-kvm.c | 2 +- hw/s390x/s390-stattrib.c | 2 +- hw/s390x/s390-virtio-ccw.c | 2 +- hw/vfio/common.c | 3 +-- hw/vfio/container.c | 2 +- hw/vfio/spapr.c | 2 +- hw/virtio/virtio-mem.c | 2 +- migration/ram.c | 2 +- system/memory.c | 2 +- system/physmem.c | 2 +- target/arm/tcg/mte_helper.c | 2 +- target/ppc/kvm.c | 2 +- target/s390x/kvm/kvm.c | 2 +- MAINTAINERS | 2 +- 23 files changed, 25 insertions(+), 27 deletions(-) rename include/{exec => system}/ram_addr.h (99%) diff --git a/include/exec/ram_addr.h b/include/system/ram_addr.h similarity index 99% rename from include/exec/ram_addr.h rename to include/system/ram_addr.h index 8677761af5..3b81c3091f 100644 --- a/include/exec/ram_addr.h +++ b/include/system/ram_addr.h @@ -16,10 +16,9 @@ * The functions declared here will be removed soon. */ -#ifndef RAM_ADDR_H -#define RAM_ADDR_H +#ifndef SYSTEM_RAM_ADDR_H +#define SYSTEM_RAM_ADDR_H -#ifndef CONFIG_USER_ONLY #include "system/xen.h" #include "system/tcg.h" #include "exec/cputlb.h" @@ -559,5 +558,5 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(RAMBlock *rb, return num_dirty; } -#endif + #endif diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 0d47bb0d9b..0723a3933b 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -34,7 +34,7 @@ #include "system/accel-blocker.h" #include "qemu/bswap.h" #include "system/memory.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qemu/event_notifier.h" #include "qemu/main-loop.h" #include "trace.h" diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 6f0ea9067b..134e523cab 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -27,7 +27,7 @@ #include "exec/cputlb.h" #include "exec/tb-flush.h" #include "exec/memory-internal.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "exec/mmu-access-type.h" #include "exec/tlb-common.h" #include "exec/vaddr.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 16e5043597..167535bcb1 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -40,7 +40,7 @@ #endif #endif #else -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #endif #include "exec/cputlb.h" diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index a415e51d07..7ae7122093 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -77,7 +77,7 @@ #include "hw/virtio/virtio-scsi.h" #include "hw/virtio/vhost-scsi-common.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "system/confidential-guest-support.h" #include "hw/usb.h" #include "qemu/config-file.h" diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c index 815c94ed2f..f2f5722d8a 100644 --- a/hw/ppc/spapr_caps.c +++ b/hw/ppc/spapr_caps.c @@ -27,7 +27,7 @@ #include "qapi/error.h" #include "qapi/visitor.h" #include "system/hw_accel.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "target/ppc/cpu.h" #include "target/ppc/mmu-hash64.h" #include "cpu-models.h" diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index e0a9d50edc..384269b831 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -34,7 +34,7 @@ #include "hw/pci/pci_host.h" #include "hw/ppc/spapr.h" #include "hw/pci-host/spapr.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include #include "trace.h" #include "qemu/error-report.h" diff --git a/hw/remote/memory.c b/hw/remote/memory.c index 6d60da91e0..00193a552f 100644 --- a/hw/remote/memory.c +++ b/hw/remote/memory.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "hw/remote/memory.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qapi/error.h" static void remote_sysmem_reset(void) diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c index ce7f5b9bfb..30ac74961d 100644 --- a/hw/remote/proxy-memory-listener.c +++ b/hw/remote/proxy-memory-listener.c @@ -12,7 +12,7 @@ #include "qemu/range.h" #include "system/memory.h" #include "exec/cpu-common.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "hw/remote/mpqemu-link.h" diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c index 2a8e31718b..f5695b0e53 100644 --- a/hw/s390x/s390-stattrib-kvm.c +++ b/hw/s390x/s390-stattrib-kvm.c @@ -16,7 +16,7 @@ #include "qemu/error-report.h" #include "system/kvm.h" #include "system/memory_mapping.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "kvm/kvm_s390x.h" #include "qapi/error.h" diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c index be07c28c6e..d95b58a8a8 100644 --- a/hw/s390x/s390-stattrib.c +++ b/hw/s390x/s390-stattrib.c @@ -16,7 +16,7 @@ #include "hw/qdev-properties.h" #include "hw/s390x/storage-attributes.h" #include "qemu/error-report.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qapi/error.h" #include "qobject/qdict.h" #include "cpu.h" diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 75b32182eb..81e570905e 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "system/confidential-guest-support.h" #include "hw/boards.h" #include "hw/s390x/sclp.h" diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 98832af88d..bae0633c3d 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -29,8 +29,7 @@ #include "hw/vfio/pci.h" #include "system/address-spaces.h" #include "system/memory.h" -#include "exec/ram_addr.h" -#include "exec/target_page.h" +#include "system/ram_addr.h" #include "hw/hw.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" diff --git a/hw/vfio/container.c b/hw/vfio/container.c index 2e993c7e73..812d5edbcf 100644 --- a/hw/vfio/container.c +++ b/hw/vfio/container.c @@ -25,7 +25,7 @@ #include "hw/vfio/vfio-common.h" #include "system/address-spaces.h" #include "system/memory.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qemu/error-report.h" #include "qemu/range.h" #include "system/reset.h" diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index c9a7dd8d68..66a2d2bb0d 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -17,7 +17,7 @@ #include "hw/vfio/vfio-common.h" #include "hw/hw.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qemu/error-report.h" #include "qapi/error.h" #include "trace.h" diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index 5f57eccbb6..c7968ee0c6 100644 --- a/hw/virtio/virtio-mem.c +++ b/hw/virtio/virtio-mem.c @@ -24,7 +24,7 @@ #include "hw/virtio/virtio-mem.h" #include "qapi/error.h" #include "qapi/visitor.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "migration/misc.h" #include "hw/boards.h" #include "hw/qdev-properties.h" diff --git a/migration/ram.c b/migration/ram.c index 424df6d9f1..6295f675df 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -48,7 +48,7 @@ #include "qapi/qapi-commands-migration.h" #include "qapi/qmp/qerror.h" #include "trace.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "exec/target_page.h" #include "qemu/rcu_queue.h" #include "migration/colo.h" diff --git a/system/memory.c b/system/memory.c index a4185ea353..6a5d853071 100644 --- a/system/memory.c +++ b/system/memory.c @@ -26,7 +26,7 @@ #include "trace.h" #include "exec/memory-internal.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "system/kvm.h" #include "system/runstate.h" #include "system/tcg.h" diff --git a/system/physmem.c b/system/physmem.c index 2850e14780..765d195cb0 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -67,7 +67,7 @@ #include "system/replay.h" #include "exec/memory-internal.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "qemu/pmem.h" diff --git a/target/arm/tcg/mte_helper.c b/target/arm/tcg/mte_helper.c index 5d6d8a17ae..80164a8050 100644 --- a/target/arm/tcg/mte_helper.c +++ b/target/arm/tcg/mte_helper.c @@ -27,7 +27,7 @@ #include "user/cpu_loop.h" #include "user/page-protection.h" #else -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #endif #include "exec/cpu_ldst.h" #include "exec/helper-proto.h" diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 992356cb75..8b12b8e7d2 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -41,7 +41,7 @@ #include "trace.h" #include "gdbstub/enums.h" #include "exec/memattrs.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "system/hostmem.h" #include "qemu/cutils.h" #include "qemu/main-loop.h" diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c index 4d56e653dd..b9f1422197 100644 --- a/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -41,7 +41,7 @@ #include "system/runstate.h" #include "system/device_tree.h" #include "gdbstub/enums.h" -#include "exec/ram_addr.h" +#include "system/ram_addr.h" #include "trace.h" #include "hw/s390x/s390-pci-inst.h" #include "hw/s390x/s390-pci-bus.h" diff --git a/MAINTAINERS b/MAINTAINERS index 9a702ff636..3e1af7e1b2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3107,7 +3107,7 @@ S: Supported F: include/system/ioport.h F: include/exec/memop.h F: include/system/memory.h -F: include/exec/ram_addr.h +F: include/system/ram_addr.h F: include/exec/ramblock.h F: include/system/memory_mapping.h F: system/dma-helpers.c From patchwork Tue Mar 18 21:31:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874454 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp78533wru; Tue, 18 Mar 2025 14:41:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXOxRCpwlB6+IuBPDP++mMp9JXiDudaxv6xvjuslgnhmqD2/USd8unl4YHepUPxw9asn5TREg==@linaro.org X-Google-Smtp-Source: AGHT+IFVWRGbckghgHvaWvvRUsjh8sokbP5VqzXv1LRId0HcfcqMwBys5lQDclQ+HRwde8hv1P/R X-Received: by 2002:a05:622a:250c:b0:476:8825:99bf with SMTP id d75a77b69052e-47708309536mr8592621cf.27.1742334117739; Tue, 18 Mar 2025 14:41:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742334117; cv=none; d=google.com; s=arc-20240605; b=GjzXyakTE0H6AcF4hQjoBbp9MzCNKpZyRjwwiaJV4YfCV3C83rRpgO995Z8e9SDXGb NqAPd5EciXvJXB8cigDUOZ03fZUwxI0jwqoWLdfJ9jT5/UskxH3yp4u/xoh6C/jgOOMh Lgj82XADX5kkqL1ci2NPI4r2QybAX3jKx1ew+GLOmKlA3Pgolxo/luX/9OdsW+zkA3cI Ye4SV/867SVe3RHY/l8S4YIU9umRkUg5Rll+PUDSVpeCqWfBfgyJuB0w3AdUT0W0tg6c r+lJpts58o6dyZy9QZfR7OuxSpERcLEnKFY4QM3N3j+84HddSrADFfhXUHSgyVThH52M 9N6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kraIMO+aYH2Sb+qY0LYmwD3RFZQ9KCHdPpg+Pm0WQ1w=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=bR6h27H1oHC4jsv7zmBmZ490C4EGt5th9t4RT3s4XjG1wW8nK9/cJfmsH3zFmd4j+E 82AOhSSrL9XKg5DIC5QjFdfd9CuF2RFCgBS4fwABC/GL62ugSsVoPIezsTmv+80SxgtJ 8WLubONog8YpfltBnRBdPxPMNic25OHWDO9ddlORTqvGsoQ44lWv3JD0WLWxHW/zfFfY 7EMieYgg/L4gRcNeNRJoJ2hdI2ZSkpiBVvvTtqLjzzGii9y8D6fltMLdQoGQsAeJgLrG IoR9Yr0ka5hKowpFjOtBRauk5/P8NTBN1tbD1++abSEaP6giEK8y7Vp5Qj7HRV0fUZE8 cs1g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="g/AEN38+"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb61af93si133286791cf.128.2025.03.18.14.41.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:41:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="g/AEN38+"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZZ-0003MN-6d; Tue, 18 Mar 2025 17:34:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY2-0001IW-5i for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:30 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueXy-0000mV-Na for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:29 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-225fbdfc17dso56597555ad.3 for ; Tue, 18 Mar 2025 14:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333545; x=1742938345; 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=kraIMO+aYH2Sb+qY0LYmwD3RFZQ9KCHdPpg+Pm0WQ1w=; b=g/AEN38+VuaFcWMQk1+Yf+SbUCZyJY+xuWCoNg8ef12k2Mg7BMRauFNRcSjcvC/nop EDTdjpwK+/XnWn3dzEqy5yjWK+Zt2ATh5apqF21PSNWsVqJzJKuGVwuNjawiYZV6+cSE soYuDb4SjUPtBjXWXR9VfqWKSfwoEB3llA01s2LWvMGsP7AJ+jZP4kdS3Dq7juhauVTF E2e349y09TxYt4dYSzCIvtM0j69s620NKfZMLIeELSwrGAT1anmqrLRpe4xZMxRAHmGL KEMP4zRBwK827U+aKeaku1gL9tbErvNAFZkP1vWnyysp/B2VFFv9D+bZqGJYsrw9OU7w 0UOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333545; x=1742938345; 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=kraIMO+aYH2Sb+qY0LYmwD3RFZQ9KCHdPpg+Pm0WQ1w=; b=gNZcFcg32MkyHfyXCR6bnnH9q3FLfIVnsV2B1uOtlq5W4hyVkZfCvRrQ10+at6yigj XLeBoZF71rRpN3gLCeiskr+84F4FyngaFFDQV6id65IC4VjekyKWm0wcOoJ+DtA9VDUr Re+rKDPzeX3n4ycOUsRT0ibaY5nEXoj9aZTgUX87jghYTPOoJJ/axTgP4pD88oZlR0vq BsXXyluvKLB0wP6btN6DcSHMF5LeoUOdrCmu7wZgu2cu74OSMiHncgVa8UBI7CQ+2OQ4 tyvGox+FdQGBB+zRNuzYKuETCQGcu1Fufnnf/J3gQlBjxMrjM+/MJdENxXYF9iIIs41b 2QUw== X-Gm-Message-State: AOJu0YzhrQM6ZvDN8fXGjFovRsUbufeT6nEdvJKYiveEI2HSEQuZ7Zsa oiT7aTZil8BLIarJ2zFaXoA9QtmWdVJ5InHMMU4FdtVrXKTODbATaIt8Ge2WNQHLSIOcPQv5ecU z X-Gm-Gg: ASbGncslZnoyKrMa3SWtl623IRGtmVzWGmocfdjhUuw25DTc/Nc2ZeHNzFvr1772uJZ PQ3JauJt9sFj3RHhl30A728MoOWYYEQyTM8hvoHA8tvfr91/8FQmcjZ7y8FGbNQBr2UoU9gRROW OP/BVaUb87b+0QUUtuhxLvumsrFa5iHXWGv+DIVhrP97OdtzazwZwOMVyuSRNTchzUXRsErC0qf RVv2HvhUWKEfZVvqXGNMPWQ1RypYn3d9uQf/8dPxJrreAjZ1ChWpOZIoeN3Bqsqsz6SRyYjl3Mo FWjOxIXKdQav3qs5T0fyTgnoS8uVNsXqhJp94E4aRu7CIQOMNJytcW94hpyQH19XSezhgb6BGxi G X-Received: by 2002:a05:6a20:244d:b0:1f3:41d5:6608 with SMTP id adf61e73a8af0-1fbece41eb8mr259547637.26.1742333545247; Tue, 18 Mar 2025 14:32:25 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 20/42] include/system: Move exec/ramblock.h to system/ramblock.h Date: Tue, 18 Mar 2025 14:31:45 -0700 Message-ID: <20250318213209.2579218-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the existing includes with sed. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/system/ram_addr.h | 2 +- include/{exec => system}/ramblock.h | 9 ++++----- hw/display/virtio-gpu-udmabuf.c | 2 +- hw/hyperv/hv-balloon.c | 2 +- hw/virtio/vhost-user.c | 2 +- migration/dirtyrate.c | 2 +- migration/file.c | 2 +- migration/multifd-nocomp.c | 2 +- migration/multifd-qatzip.c | 2 +- migration/multifd-qpl.c | 2 +- migration/multifd-uadk.c | 2 +- migration/multifd-zero-page.c | 2 +- migration/multifd-zlib.c | 2 +- migration/multifd-zstd.c | 2 +- migration/multifd.c | 2 +- migration/postcopy-ram.c | 2 +- tests/qtest/fuzz/generic_fuzz.c | 2 +- MAINTAINERS | 2 +- 18 files changed, 21 insertions(+), 22 deletions(-) rename include/{exec => system}/ramblock.h (96%) diff --git a/include/system/ram_addr.h b/include/system/ram_addr.h index 3b81c3091f..b4e4425acb 100644 --- a/include/system/ram_addr.h +++ b/include/system/ram_addr.h @@ -23,7 +23,7 @@ #include "system/tcg.h" #include "exec/cputlb.h" #include "exec/ramlist.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "exec/exec-all.h" #include "system/memory.h" #include "exec/target_page.h" diff --git a/include/exec/ramblock.h b/include/system/ramblock.h similarity index 96% rename from include/exec/ramblock.h rename to include/system/ramblock.h index 64484cd821..d8a116ba99 100644 --- a/include/exec/ramblock.h +++ b/include/system/ramblock.h @@ -16,11 +16,10 @@ * The functions declared here will be removed soon. */ -#ifndef QEMU_EXEC_RAMBLOCK_H -#define QEMU_EXEC_RAMBLOCK_H +#ifndef SYSTEM_RAMBLOCK_H +#define SYSTEM_RAMBLOCK_H -#ifndef CONFIG_USER_ONLY -#include "cpu-common.h" +#include "exec/cpu-common.h" #include "qemu/rcu.h" #include "exec/ramlist.h" @@ -91,5 +90,5 @@ struct RAMBlock { */ ram_addr_t postcopy_length; }; -#endif + #endif diff --git a/hw/display/virtio-gpu-udmabuf.c b/hw/display/virtio-gpu-udmabuf.c index 85ca23cb32..0510577475 100644 --- a/hw/display/virtio-gpu-udmabuf.c +++ b/hw/display/virtio-gpu-udmabuf.c @@ -19,7 +19,7 @@ #include "hw/virtio/virtio-gpu.h" #include "hw/virtio/virtio-gpu-pixman.h" #include "trace.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "system/hostmem.h" #include #include diff --git a/hw/hyperv/hv-balloon.c b/hw/hyperv/hv-balloon.c index 0b1da723c8..acabff2c4a 100644 --- a/hw/hyperv/hv-balloon.c +++ b/hw/hyperv/hv-balloon.c @@ -12,7 +12,7 @@ #include "system/address-spaces.h" #include "exec/cpu-common.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "hw/boards.h" #include "hw/hyperv/dynmem-proto.h" #include "hw/hyperv/hv-balloon.h" diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 267b612587..48561d3c74 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -28,7 +28,7 @@ #include "system/cryptodev.h" #include "migration/postcopy-ram.h" #include "trace.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include #include diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index 09caf92f87..986624c79a 100644 --- a/migration/dirtyrate.c +++ b/migration/dirtyrate.c @@ -14,7 +14,7 @@ #include "qemu/error-report.h" #include "hw/core/cpu.h" #include "qapi/error.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "exec/target_page.h" #include "qemu/rcu_queue.h" #include "qemu/main-loop.h" diff --git a/migration/file.c b/migration/file.c index 7f11e26f5c..bb8031e3c7 100644 --- a/migration/file.c +++ b/migration/file.c @@ -6,7 +6,7 @@ */ #include "qemu/osdep.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "qemu/cutils.h" #include "qemu/error-report.h" #include "qapi/error.h" diff --git a/migration/multifd-nocomp.c b/migration/multifd-nocomp.c index ffe75256c9..94f248e8a2 100644 --- a/migration/multifd-nocomp.c +++ b/migration/multifd-nocomp.c @@ -11,7 +11,7 @@ */ #include "qemu/osdep.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "exec/target_page.h" #include "file.h" #include "migration-stats.h" diff --git a/migration/multifd-qatzip.c b/migration/multifd-qatzip.c index 6a0e989fae..7419e5dc0d 100644 --- a/migration/multifd-qatzip.c +++ b/migration/multifd-qatzip.c @@ -13,7 +13,7 @@ */ #include "qemu/osdep.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "qapi/error.h" #include "qemu/error-report.h" #include "qapi/qapi-types-migration.h" diff --git a/migration/multifd-qpl.c b/migration/multifd-qpl.c index 88e2344af2..52902eb00c 100644 --- a/migration/multifd-qpl.c +++ b/migration/multifd-qpl.c @@ -14,7 +14,7 @@ #include "qemu/module.h" #include "qapi/error.h" #include "qapi/qapi-types-migration.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "multifd.h" #include "qpl/qpl.h" diff --git a/migration/multifd-uadk.c b/migration/multifd-uadk.c index 6895c1f65a..fd7cd9b5e8 100644 --- a/migration/multifd-uadk.c +++ b/migration/multifd-uadk.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "qemu/module.h" #include "qapi/error.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "migration.h" #include "multifd.h" #include "options.h" diff --git a/migration/multifd-zero-page.c b/migration/multifd-zero-page.c index f1e988a959..dbc1184921 100644 --- a/migration/multifd-zero-page.c +++ b/migration/multifd-zero-page.c @@ -12,7 +12,7 @@ #include "qemu/osdep.h" #include "qemu/cutils.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "migration.h" #include "migration-stats.h" #include "multifd.h" diff --git a/migration/multifd-zlib.c b/migration/multifd-zlib.c index 8cf8a26bb4..8820b2a787 100644 --- a/migration/multifd-zlib.c +++ b/migration/multifd-zlib.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include #include "qemu/rcu.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "exec/target_page.h" #include "qapi/error.h" #include "migration.h" diff --git a/migration/multifd-zstd.c b/migration/multifd-zstd.c index abed140855..3c2dcf76b0 100644 --- a/migration/multifd-zstd.c +++ b/migration/multifd-zstd.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include #include "qemu/rcu.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "exec/target_page.h" #include "qapi/error.h" #include "migration.h" diff --git a/migration/multifd.c b/migration/multifd.c index dfb5189f0e..86c83e43c0 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -16,7 +16,7 @@ #include "qemu/rcu.h" #include "exec/target_page.h" #include "system/system.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "qemu/error-report.h" #include "qapi/error.h" #include "file.h" diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 5d3edfcfec..995614b38c 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -31,7 +31,7 @@ #include "qemu/error-report.h" #include "trace.h" #include "hw/boards.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "socket.h" #include "yank_functions.h" #include "tls.h" diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index 239be9372d..507de74806 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -21,7 +21,7 @@ #include "fuzz.h" #include "string.h" #include "system/memory.h" -#include "exec/ramblock.h" +#include "system/ramblock.h" #include "hw/qdev-core.h" #include "hw/pci/pci.h" #include "hw/pci/pci_device.h" diff --git a/MAINTAINERS b/MAINTAINERS index 3e1af7e1b2..18a5381afd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3108,7 +3108,7 @@ F: include/system/ioport.h F: include/exec/memop.h F: include/system/memory.h F: include/system/ram_addr.h -F: include/exec/ramblock.h +F: include/system/ramblock.h F: include/system/memory_mapping.h F: system/dma-helpers.c F: system/ioport.c From patchwork Tue Mar 18 21:31:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874419 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75784wru; Tue, 18 Mar 2025 14:34:14 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU6Lb4SWREEVyuQKdEJlczwArG1yFLOSdqrykBsg1TMqTd5iAVK66/uHvUE9lUcmZrW4VRQgw==@linaro.org X-Google-Smtp-Source: AGHT+IHTFI4AoN10OBLB/B5gIcOmLSoyO1XJpk0UjBBszK5bUeIpb6de56gSO/9kkh9k3yf2monz X-Received: by 2002:a05:620a:c42:b0:7c0:6419:8bd3 with SMTP id af79cd13be357-7c5a83968b1mr41747285a.22.1742333654724; Tue, 18 Mar 2025 14:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333654; cv=none; d=google.com; s=arc-20240605; b=CJRbBIrQE9xMqY1k52XGvTMmhrBm5bQlqfDRyVXxj+skP9StjXXP85IHHHmGq37o0S wN8jqrvsFISy8YJMG+0g1RtzdWT1gjjpjDw1e6a23lZYjxatRw4ok2MdJ64ykA9NW8M3 FFBrO0mNIPMW866S3X1ch2boj5GDvCNLSHwusYrlLKclVuj+g6aT6VRW4n5C+y8yLgtv fjG6AkL63In47DC9+Y0L39ClHoeebd/FO8B5qLqS5O82Zh5to/zPyenWNe5mY3f/2jpV mywpHX2oBH8uzUJahSnrj7JwrU9KeLQq0Lix7Dd11+HEtvhBQ/MPHUW3Gv3ZACxJQujb N8Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hSTxcdVupVH5RULwmr3LUReRVWUe6351QoWFFPPNbok=; fh=/pP9di4F2bYfeZ4/TrjTEpGjPwLAFU8L14QXSABUJGs=; b=HuXH8fs5GDhy4abKL+IafkjjH761NS2dMZtNGKzCeNQJNbX4fQPLfzi39Ro8YZ2imP 2O5x+qKUatf0JSpB2DpeoZ68q7MPB950Wu1+w5egPRKBRi3iRq22gaj0CWgQTGHA2MBM 5tSROXjRQu7yO9LTINu1+dWe7AmqhMtsrW/b4cYW4gD7A9Rf9nnNERs4mZEJm6e1mIgg SWhkQ2zKAZZz99Q/Vdy+k97lJ/3I0T4WJoLoL/WCK9LQj98jPTOYGlN6Tq9TSwwkYIWk HMCw0RZYRijZDIPJNGiUSa6/CqECfXI63YhPTQYVDFGngRBJEU3Xr+xi5+zgsRktTNxy F7+g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ugzD6i+c; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573b954cesi1282264385a.190.2025.03.18.14.34.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:34:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ugzD6i+c; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZF-0002NJ-48; Tue, 18 Mar 2025 17:33:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY3-0001J7-8l for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32: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 1tueXz-0000mc-Dl for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:30 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-22438c356c8so107498965ad.1 for ; Tue, 18 Mar 2025 14:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333546; x=1742938346; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hSTxcdVupVH5RULwmr3LUReRVWUe6351QoWFFPPNbok=; b=ugzD6i+cpM32xiAybeIElbec0YrnTo4BvFe/QyRACSjmtjueHeUecfRBJ9fyNAMzjn sS29xKovGHTvRtPmV+2DfPu1JiAWUmwDnCfhW7gQ84ERhevqNl74DXcR4dUjQXvzTcIF t39b0eAJ8GI3URriQI9Nm564Ha07kdD6CvUVv/z6xFrqJkngF4hTUB2kCNbNDmhkMRpN mzFUIlM/Vu+72yUJmi6wKxmC6ouR/4okJ2aMX8dUNU4cU3aFiPAQx6jeRkumKbWn+7iN 5URmIP2iXuyH9mmxEeoDS/YZ8s2Mh2bU8Nrnj4Qo9YV7rVbJCm7h2yLqmGe1FkAqt4/9 lD0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333546; x=1742938346; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hSTxcdVupVH5RULwmr3LUReRVWUe6351QoWFFPPNbok=; b=mIRNMvDZcJ35W9RVmjlZ7uKRwGt+hJvGHW1RHODrghh4XVO6n12bFwnscEf0Szrn2j 6IH2xFEoQKPKR7uGpvrFIQ1sNksmJ7Wfzi25SlDnS/a+LEZBy7ihDrDjYcAEQ0d+/wAa IiEhuzHCdXBrh7yn78m8JtCiccO0KLiv4NEu5yuCdEDNRDei9HBd9SEYP8UuftTpFB8G P/cBEEn09NzVH+7uvJNEOxZc10+8mGgnIQGE2xyrO3VIS8lYraPitzZjT5g230HMnJCp lULpzi19xckGF6zEktaqdPXPP9LklKvhtNuDCW9TyQOg0qyDXsej/gnqmebrliScSDvI TGqg== X-Gm-Message-State: AOJu0Yxh4FWz7f2TA3BDJOJpi3ePFI8MuFpNGStDoKHKriDs3iJ1EZVY GrSYM+38oO5eGP9qjqiG+2OFT4jAyJIOeKH7Z5gejIsSTnVRviLTDSXJCJzgMKenfc6nMouFUj7 9 X-Gm-Gg: ASbGncs+blMaUHVl5aqf9K8SZ/hYx4mUtyzVic23J+bHYLvH5G8qT5l4Qyu4K9YUjFS rcAYKw7gN/yCu4dasKYA4rtzOf6WB8sMU9Y9a5/7ZeJwdFXG8DpPlF/GIHNxBcMtkYiDqza/aot kPyi3EpIWQXVuxgHq9E7RYYv0tR3+3wYia20X0frUypcOOJILWe6TUahful+Kx8x1QeNxKmdWxk /w8GkuSrs2pnm4XwtJQI5RwE64p3QKzqW9Z6yRBEVxdSRoHhjTKaUAp6fVdn7C7+iIV3eg15ujt BhABdLnI1DMd0Ggp9vv6JiV2KoazkXvaoDHHBymz9FLRclsrZJVe1X8Kt2frRbrWXnKcHLGeuJX C X-Received: by 2002:a05:6a21:33a5:b0:1f5:8655:3282 with SMTP id adf61e73a8af0-1fbed503dcemr233053637.42.1742333545878; Tue, 18 Mar 2025 14:32:25 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org, David Hildenbrand Subject: [PATCH v2 21/42] accel/tcg: Remove unnecesary inclusion of memory-internal.h in cputlb.c Date: Tue, 18 Mar 2025 14:31:46 -0700 Message-ID: <20250318213209.2579218-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé At some point cputlb.c stopped depending on the "exec/memory-internal.h" header. Clean that now. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson Message-ID: <20250317161329.40300-2-philmd@linaro.org> --- accel/tcg/cputlb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 134e523cab..613f919fff 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -26,7 +26,6 @@ #include "exec/cpu_ldst.h" #include "exec/cputlb.h" #include "exec/tb-flush.h" -#include "exec/memory-internal.h" #include "system/ram_addr.h" #include "exec/mmu-access-type.h" #include "exec/tlb-common.h" From patchwork Tue Mar 18 21:31:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874455 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp78545wru; Tue, 18 Mar 2025 14:42:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVBpjbEPLjsAsIHIRzC0y61MGcFvrD2lnzxqpDZAUzydb2RHnn+/PBrUl3A+tCUBxkKpJmDDA==@linaro.org X-Google-Smtp-Source: AGHT+IGHqXcdZdjZcAl5ML09Oav+r+AaXmgWlfOjQkYqu6phIpsb+vX+Z6fD6kOKac8wooV8hB6D X-Received: by 2002:a05:620a:1983:b0:7c5:61b2:b7c with SMTP id af79cd13be357-7c5a84a2573mr38859385a.47.1742334121833; Tue, 18 Mar 2025 14:42:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742334121; cv=none; d=google.com; s=arc-20240605; b=Nc8jSMfVKfn0cmLe/S3DXIZqCSX5aYodGrHFa+OpqpBtEd8GxYI2Zl+3FPbEHvZaHp rjd7taMTBA3VxFtJSw8sMVgcEQc6MbSm6qrFMjdD+3K8RwRYC+FVcZu6WuW5wGW5h0xU Q+ijNABafwS1GN9EzoUZm8fz6ysWVeJ0dyndNjc/414Gwa0J754/cwoyiSDdrF+8frvr Hcbs4U7YMQAAkv00M7PXgIb/4cRxmQfkN/cmnS+2ETeT5Ht13jj0V28+PO1DMJgd0UGV leXptgQ+uaHncUM/XFCNe7opRPTVe8ekyjPFadpv423vibfcY0FW4ZVweWc/jHgp43PH AD9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HrnLnr+uuMo0u5RlpGRH5yvm9z5ZGh78Msw1Ubctmpo=; fh=/pP9di4F2bYfeZ4/TrjTEpGjPwLAFU8L14QXSABUJGs=; b=OlI+QuvslWsYHd2eO3TL/lNcISgHvNT/Gw3LsKpCELoFxOrvaWRe3xe3w4soFQs2Sf pr1EDDFXcfM3q0PQOpiPEXr5oor1RX/gvsU8cdgksl+y5a+PkGbttgzs5RX1SswNzu13 qxJspBQdrcFKsRxUTX1uJlKZVtGfdowedo2U9RD+Cx2NsBMCpfWT/bHwFPR9aYhx5dYF P+tpxU9ePxZwSgzA6v6TlgM6u1grCPOeFR0Rpv6+JNyBR1Hd+NpDGWl7GxKNU6gv5xBv VFv0TqGItRNMNo+dBJKByd/ny/Dw5v3rdhmVDcXOUkiogCDgF9ff2BAQOuTaQTamIdSC BSvA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I9LnFM0s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573d1a6c5si1262380485a.561.2025.03.18.14.42.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:42:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I9LnFM0s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZZ-0003MC-6k; Tue, 18 Mar 2025 17:34:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY3-0001JH-CC for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:31 -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 1tueY0-0000mj-6R for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:30 -0400 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-22438c356c8so107499075ad.1 for ; Tue, 18 Mar 2025 14:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333547; x=1742938347; 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=HrnLnr+uuMo0u5RlpGRH5yvm9z5ZGh78Msw1Ubctmpo=; b=I9LnFM0sN4SwFyIeLFHtCMQGT9vkDtwsoSwcCV4grF7WyXGV1YAzhxscIHD/H5ayo4 ah6w1NAmx4HfS8GpsQLJElKJRfiE+FG8HgQWQOt8h30rqxlVEa9xd57NpS++GIw1m3iZ HCtxYIFODAe+JmqesOS5ng3XywErzJglnkzeVGIgJKrbzskj9g23maQNvMMvbADtRpBa x6TAVISUhLuj24nQNDeW4YVDu+WsrBd5Rc17A26RPyRajMeXqBNkcdkNHYfkwS2OLFtS k4VlomGVkGH+xIEDe2D05v2LZ5jXd8sWsIsIQ5TSN6L3H4bkWsFCCvnzTcdfO4KPe/5u T/tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333547; x=1742938347; 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=HrnLnr+uuMo0u5RlpGRH5yvm9z5ZGh78Msw1Ubctmpo=; b=pxriGkhF0svYkapwTLeqHQJS7yb+9ga0SH1oSZMowD87O3HJFOp5UeeJbFk00Y6Fpo 2HuwmDYPaWt5RoDem7+HRWq3Q8piJ8Qd2UCWBWlm8vZeR6g87tbIhoAHFTWwmrWibTPF UwyY5+B+rgKyhrPg7a/z4HqsgmxGCVmd5SCSKhHtPnZlKDScZh6Zd2qMMyjoxkzVFcvX iZ36qhEhjDv+XAnmvW/t1hnpo6+7CgQQrtppS10V9zSEYk+MIsdtH8q5gAfboLXarDI3 mjgvJzt4vp1g8mATGNZ/EIKDGFce/ZPM706mNDzTY0Rg7cxuHL9H8ytdgv1MtsHTzOeF ih6A== X-Gm-Message-State: AOJu0YwCyeAHFNS1clNWrkxmCoAckj6UmUjxEny2M0Ze8+V+nBI87b4b T7vsB3eOZeK+TMg9ZXPhLN/zMftMxXSf8viokPndw+/ZwumvVZAd7anNZvwxH7+6iVTwgUBJo8l h X-Gm-Gg: ASbGncuE5JdaB1cl+jE4GoEEIf+YZWgkHlyh0/xnPdet8ppylOcBLZnnOK07BzUCXg+ tbLLfQfAE2NFjY3mSG14Uf8VR0DidihAfwXEgAyZafXPl8e8YPlP94fFjyGnDKNWcg8SgZQXeYc A8jBso1HabYyegmZgaSfw/Px9bU86Zjfx4W7fbqf5bT5D2d46gnmBGc6y+wB4aoo5zu+bAd5uTy ufl+Oe8hcM6D9HRLxHXr3iRx5pHjYVdWk8Aczjny2K153USGiP73QocDZP2f8fLYGxCaE2vL3ig N7HnXKnG26JA2twC+rK4OmwOXRyJuO83d1MfrmLg91lXyrDXAxhA8yE09O3CIlYV5lZcJ6ACVPv y X-Received: by 2002:a05:6a20:9f43:b0:1f3:2a83:7548 with SMTP id adf61e73a8af0-1fbed40d0bamr269209637.38.1742333546657; Tue, 18 Mar 2025 14:32:26 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org, David Hildenbrand Subject: [PATCH v2 22/42] exec: Restrict memory-internal.h to system/ Date: Tue, 18 Mar 2025 14:31:47 -0700 Message-ID: <20250318213209.2579218-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé Only file units within the system/ directory need access to "memory-internal.h". Restrict its scope by moving it there. The comment from commit 9d70618c684 ("memory-internal.h: Remove obsolete claim that header is obsolete") is now obsolete, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson Message-ID: <20250317161329.40300-3-philmd@linaro.org> --- {include/exec => system}/memory-internal.h | 6 ------ system/memory.c | 4 ++-- system/physmem.c | 3 ++- MAINTAINERS | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) rename {include/exec => system}/memory-internal.h (88%) diff --git a/include/exec/memory-internal.h b/system/memory-internal.h similarity index 88% rename from include/exec/memory-internal.h rename to system/memory-internal.h index c75178a3d6..085e81a9fe 100644 --- a/include/exec/memory-internal.h +++ b/system/memory-internal.h @@ -11,12 +11,6 @@ * */ -/* - * This header is for use by exec.c, memory.c and accel/tcg/cputlb.c ONLY, - * for declarations which are shared between the memory subsystem's - * internals and the TCG TLB code. Do not include it from elsewhere. - */ - #ifndef MEMORY_INTERNAL_H #define MEMORY_INTERNAL_H diff --git a/system/memory.c b/system/memory.c index 6a5d853071..7e2f16f4e9 100644 --- a/system/memory.c +++ b/system/memory.c @@ -24,8 +24,6 @@ #include "qemu/qemu-print.h" #include "qom/object.h" #include "trace.h" - -#include "exec/memory-internal.h" #include "system/ram_addr.h" #include "system/kvm.h" #include "system/runstate.h" @@ -35,6 +33,8 @@ #include "migration/vmstate.h" #include "system/address-spaces.h" +#include "memory-internal.h" + //#define DEBUG_UNASSIGNED static unsigned memory_region_transaction_depth; diff --git a/system/physmem.c b/system/physmem.c index 765d195cb0..1bf97a5704 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -66,7 +66,6 @@ #include "qemu/main-loop.h" #include "system/replay.h" -#include "exec/memory-internal.h" #include "system/ram_addr.h" #include "qemu/pmem.h" @@ -88,6 +87,8 @@ #include #endif +#include "memory-internal.h" + //#define DEBUG_SUBPAGE /* ram_list is read under rcu_read_lock()/rcu_read_unlock(). Writes diff --git a/MAINTAINERS b/MAINTAINERS index 18a5381afd..51267f1c78 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3115,7 +3115,7 @@ F: system/ioport.c F: system/memory.c F: system/memory_mapping.c F: system/physmem.c -F: include/exec/memory-internal.h +F: system/memory-internal.h F: scripts/coccinelle/memory-region-housekeeping.cocci Memory devices From patchwork Tue Mar 18 21:31:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874435 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76714wru; Tue, 18 Mar 2025 14:36:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWWUIr6+woqZ98UoW5OQ+uAaGGfnB7ZCSTymcI8w/nseUIChwK+YEZ6j7i0hlPekk1tBY5fEg==@linaro.org X-Google-Smtp-Source: AGHT+IFKZ2Q/o79Xd/GjTCl9c+5FXTKdAJwjNSFkLyGOh1xWRh+8bj1g74l6siy7CVwcoyfF7aOs X-Received: by 2002:a05:620a:1a28:b0:7c5:47d3:10c2 with SMTP id af79cd13be357-7c5a84a2882mr31889185a.52.1742333804603; Tue, 18 Mar 2025 14:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333804; cv=none; d=google.com; s=arc-20240605; b=lzQXCHE5RlAmvcZbuh8nFGvBWDl+wwUjHPks0i04+aLSXFpJnRulXeVL9n9/M+/fG3 gGTu+tzOKwMA+rwcjpu52BwgA3ecBWB330r3Ujlxjz87xjotYLe8XA/3FrdkQf8Kz02e 2HCkQEGlST1PlsdOpKLNkf+y5j1zAN2CPp0MApmX+0AKzGRTpT/A3O0BFZfjrDcQX5+K /a4q6qge5E5uK+o6AKkCckK8LDz7wsmPlTncLPP9849xF+lwaimRcTaGArJhjHg07QFG MAd7Z2oIVEbeeDdUmeiAdMcStjwEYa8lfVczZwgzIT4nARAYZk80abfdfNRmLWYOKdel 17cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7jrgt/XCMOgJKy403kS5/j6/fnymT1kJMQRDGV0b46U=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=QBC0QiaWXShLN87TOFRr3rmChxPpvi/242cSI6q8o1+xV+0DTYkyWbx15klfpiTGtS GmG8HwVfkp9WO+5pVZqLnVMCHm9uTC0Z51wqpnSbinM0TAdjZMjMfKl/jiMM7BoufjUa QIwzBvVMnGAy9HqtXldnKhFVVM/Aq1W37Au280TILJIP5dVfk9fPf4kOsnswPMQAzWby 8W8lUJjT55b0h3oUSEUK8e45LeBSYp0kjARBNUtzaH92LeFQOC7L1evmsyfBp7Gh49RB BL38t3juuU6SaNigj9mVr8GQLmjZfoXGExr1babMFRHdNxAsdEw+gtOp08KwVR1C590g bJXA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wTyaD2XF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6eade33e92dsi123416946d6.260.2025.03.18.14.36.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:36:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wTyaD2XF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZd-0003d6-3o; Tue, 18 Mar 2025 17:34:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY3-0001Jn-PC for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:32 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueY0-0000mz-Js for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:31 -0400 Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-22401f4d35aso116911585ad.2 for ; Tue, 18 Mar 2025 14:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333547; x=1742938347; 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=7jrgt/XCMOgJKy403kS5/j6/fnymT1kJMQRDGV0b46U=; b=wTyaD2XFOMb3hiJ0XA4QcttjQogVcmZGxstSVc9Ps5eUC4nmRgwmdUl5C3vA7EhooP C2eaE1zWMdqNpME4u1JJeKs1RXIMpIXKzK6xQ+E0OAw9dYrtOT9J3qUQKI9s1egIm13l iSNAkYQuf5vS6AhT6n9dQM8Uql3DykPHPN4INjLZzcta5L4Hdobk70fkDOBFhIb0RE9w jD74LofdyDNNOOLPyc1nXiITGLXePCgCtEwR9O4BGHYVNnX2iQFgKZ8SsmN2kSvpVS+i fU7CvYH7UBvT7qVHiEvZNBy8ZsVoMqYcUVp5O6eFe9VWZUD1GJzZ45bqJrIoz2YXDmNz 1SuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333547; x=1742938347; 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=7jrgt/XCMOgJKy403kS5/j6/fnymT1kJMQRDGV0b46U=; b=SmEPO2aqqTqlP376hp1Q6vH4MzDT6ZNoqpO9U4BTmhsM9n4OZ/aqKvwNxpX7HsF7vK zaShCvPXyrwbAmmhKZGFMfDMidhOCT6xew/Ij/HNKLcQvu5W/kEcZP3XTNfCmamCKzg1 3dIQLImI/sRjtk0BwyBb3WbpNEOG0aMAwc1PSa5ktYTTG12I0tUUAe8kxXgZFwLsoFMh iUZz1lSvD06/LobeEjcEuX3MNN6xIhDX3FB9Fq9XM5GOgVGI+0dDVmFweFOUP6CqrxkE SvsJF3j8woK3Ilgxabpntf0Nbmxvv2tGVT2zx25UX8HPjoXqsimFQbFP6BaOWAjehFRt 6c4w== X-Gm-Message-State: AOJu0YzOYp4PY1uPrgoB8SAC8OVq27U8lXnBZl1IEGsC/vEaZSmtNJKk K+SFg9QsbCotfC3YKCI7uRbSBmGo2X4umMcvpzQAZZBGb0aiRIYGPy78Kubx7OTD3t11uc/BhX5 k X-Gm-Gg: ASbGncuNVU6pLaAydBxp4Ck4Qn9ypBwZyWUWnIssa8sP6hJ/WuPUI5TsjZWT/+1dT8W BanSt14wgAS0Shq2Zxi4g3h4L5NVUmRVQL9OzBN4bhKJmIHWqIQWN4bzJP14wnCZBPFnTkNeBRH FpNConxfW8VjzRt/jTM/OpXICXltoGJZEG/vlhKppIG0zaC08jb0Arhdam9mjexf9KK7dpI+10i mE2KLiq94slmF+n/xHvw4pH7voweAJkGVWUPe74rjZ0FfV6m5c+KLXXshS7ZZ/J5/eLJbEyARkV xe8rUQ9290b9hpK9D3B7xiWLK1hZ2Xl0UxjIhpiZkpWIQlDVZFKRPZCUVyr3EI04+O4vfE09tsa s X-Received: by 2002:a05:6a21:62c6:b0:1f5:75a9:5257 with SMTP id adf61e73a8af0-1fbeb4a330amr354168637.13.1742333547296; Tue, 18 Mar 2025 14:32:27 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:26 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 23/42] meson: Introduce top-level libuser_ss and libsystem_ss Date: Tue, 18 Mar 2025 14:31:48 -0700 Message-ID: <20250318213209.2579218-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We already have two subdirectories for which we need to build files twice, for user vs system modes. Move this handling to the top level. This cannot be combined with user_ss or system_ss, because the formulation has not been extended to support configuration symbols. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- gdbstub/meson.build | 32 ++++++++------------------------ meson.build | 22 ++++++++++++++++++++++ tcg/meson.build | 23 ++--------------------- 3 files changed, 32 insertions(+), 45 deletions(-) diff --git a/gdbstub/meson.build b/gdbstub/meson.build index dff741ddd4..0e8099ae9c 100644 --- a/gdbstub/meson.build +++ b/gdbstub/meson.build @@ -4,32 +4,16 @@ # types such as hwaddr. # -# We need to build the core gdb code via a library to be able to tweak -# cflags so: - -gdb_user_ss = ss.source_set() -gdb_system_ss = ss.source_set() - # We build two versions of gdbstub, one for each mode -gdb_user_ss.add(files('gdbstub.c', 'user.c')) -gdb_system_ss.add(files('gdbstub.c', 'system.c')) +libuser_ss.add(files( + 'gdbstub.c', + 'user.c' +)) -gdb_user_ss = gdb_user_ss.apply({}) -gdb_system_ss = gdb_system_ss.apply({}) - -libgdb_user = static_library('gdb_user', - gdb_user_ss.sources() + genh, - c_args: '-DCONFIG_USER_ONLY', - build_by_default: false) - -libgdb_system = static_library('gdb_system', - gdb_system_ss.sources() + genh, - build_by_default: false) - -gdb_user = declare_dependency(objects: libgdb_user.extract_all_objects(recursive: false)) -user_ss.add(gdb_user) -gdb_system = declare_dependency(objects: libgdb_system.extract_all_objects(recursive: false)) -system_ss.add(gdb_system) +libsystem_ss.add(files( + 'gdbstub.c', + 'system.c' +)) common_ss.add(files('syscalls.c')) diff --git a/meson.build b/meson.build index 7f75256acf..329e7f056a 100644 --- a/meson.build +++ b/meson.build @@ -3666,12 +3666,14 @@ io_ss = ss.source_set() qmp_ss = ss.source_set() qom_ss = ss.source_set() system_ss = ss.source_set() +libsystem_ss = ss.source_set() specific_fuzz_ss = ss.source_set() specific_ss = ss.source_set() rust_devices_ss = ss.source_set() stub_ss = ss.source_set() trace_ss = ss.source_set() user_ss = ss.source_set() +libuser_ss = ss.source_set() util_ss = ss.source_set() # accel modules @@ -4049,6 +4051,26 @@ common_ss.add(qom, qemuutil) common_ss.add_all(when: 'CONFIG_SYSTEM_ONLY', if_true: [system_ss]) common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss) +libuser_ss = libuser_ss.apply({}) +libuser = static_library('user', + libuser_ss.sources() + genh, + c_args: '-DCONFIG_USER_ONLY', + dependencies: libuser_ss.dependencies(), + build_by_default: false) +libuser = declare_dependency(objects: libuser.extract_all_objects(recursive: false), + dependencies: libuser_ss.dependencies()) +common_ss.add(when: 'CONFIG_USER_ONLY', if_true: libuser) + +libsystem_ss = libsystem_ss.apply({}) +libsystem = static_library('system', + libsystem_ss.sources() + genh, + c_args: '-DCONFIG_SOFTMMU', + dependencies: libsystem_ss.dependencies(), + build_by_default: false) +libsystem = declare_dependency(objects: libsystem.extract_all_objects(recursive: false), + dependencies: libsystem_ss.dependencies()) +common_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: libsystem) + # Note that this library is never used directly (only through extract_objects) # and is not built by default; therefore, source files not used by the build # configuration will be in build.ninja, but are never built by default. diff --git a/tcg/meson.build b/tcg/meson.build index 69ebb4908a..7df378d773 100644 --- a/tcg/meson.build +++ b/tcg/meson.build @@ -27,24 +27,5 @@ if host_os == 'linux' tcg_ss.add(files('perf.c')) endif -tcg_ss = tcg_ss.apply({}) - -libtcg_user = static_library('tcg_user', - tcg_ss.sources() + genh, - dependencies: tcg_ss.dependencies(), - c_args: '-DCONFIG_USER_ONLY', - build_by_default: false) - -tcg_user = declare_dependency(objects: libtcg_user.extract_all_objects(recursive: false), - dependencies: tcg_ss.dependencies()) -user_ss.add(tcg_user) - -libtcg_system = static_library('tcg_system', - tcg_ss.sources() + genh, - dependencies: tcg_ss.dependencies(), - c_args: '-DCONFIG_SOFTMMU', - build_by_default: false) - -tcg_system = declare_dependency(objects: libtcg_system.extract_all_objects(recursive: false), - dependencies: tcg_ss.dependencies()) -system_ss.add(tcg_system) +libuser_ss.add_all(tcg_ss) +libsystem_ss.add_all(tcg_ss) From patchwork Tue Mar 18 21:31:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874453 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp78135wru; Tue, 18 Mar 2025 14:40:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWHhUu5qKFHs7qg32+Q46m/dpg2PPb6gQfLgrENe2L3NRD1Bh+OgHqljEBEw9pNMQzln+T2DA==@linaro.org X-Google-Smtp-Source: AGHT+IGKATm8XR0rICISxvsX7IlCoTAMcwzPReD4lUmfMF9nRngTAwAELbT8l26lHQv7vWYkwQXK X-Received: by 2002:a05:622a:59c4:b0:476:6625:eed4 with SMTP id d75a77b69052e-477083debe8mr9720451cf.38.1742334044110; Tue, 18 Mar 2025 14:40:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742334044; cv=none; d=google.com; s=arc-20240605; b=C/CUbFo8ZRJp3PuDt7Cow7HqQ9/Kgrja10NduymDG89cHq+j8mbC0TXJN4D9UDgO8+ XcsrsK7ThyZRbu/SOZTOTkenC/9gdOg0b0lyQnaFHgzUZbl3VlmNCrM9YtJDX2mJYgSG ZITalMHQFILGks098QKtmvZf1nQC7UeVrw1mZISD4A1RhgCdCivbaPswP7d95I3nCPGQ Mf7Wwr1Wr17loGXf7lTbj/5m37nHqgtkm7COcct2/C6oPJ4uXDJ4XEEOysRpzpnZt4ml AuwcWjNqjUfcO5j9pu/rQWJ2tZlDAA3MbAcdooNvlGCmxSzGyTgiVPP+jcfDoq5CDPd2 P/lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ijlmz6/bRJsdkPdqsV+cz0ErI9CNddyOzeS8owSZGCU=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=POuqu2tDZBeYqJfM1+voUjvlgEnHRUKesLQku902T5J12byikCAnrXYX1vZSVqmTOG CqJxjOJA4aF+INRJWkhV0tswaJkrgtFRgF7/OTk/EWQ1pN3NNbXCqUruP8a1kdxCCcms p/Hve3sgJRgGg9UUXIYyq0GxWHUGl9bUJ6qxv+txDYuyj5y33bi9ZuLzEzw4NWihhoJS AAt3QuWRe4U/S2zhIo39EbgMby9qL7svCPZ7f2O7JLbsPoFwzCwm8lt36rNcPlviHHxL nXUg3Ku9cry7G/nI0b+t2deJhXR9c6Snr13WJrogZUMG2I0l2BcdvqveWWeTuAi5rbeG tbUA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mEGl4lUu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb7df333si130871151cf.251.2025.03.18.14.40.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:40:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mEGl4lUu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZZ-0003OS-In; Tue, 18 Mar 2025 17:34:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY3-0001JY-JC for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:31 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueY1-0000nB-If for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:31 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-223fd89d036so123813175ad.1 for ; Tue, 18 Mar 2025 14:32:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333548; x=1742938348; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ijlmz6/bRJsdkPdqsV+cz0ErI9CNddyOzeS8owSZGCU=; b=mEGl4lUubWV+UkXvoxvF+isLcKd3fBOr0OOHmlbzcNVhsehjMGX2eoYSLw+ozgiLPA WBSFbdV8pMF6OGMWIdH7Qx6RAT1vSbVs3B8E7EoNcgAu2wexoKnBmWtMJXx2ZHI177S9 7jc5+ZNzckxp+9B+otiJVBGSnblBdLNRT4P+7k+gqTtawUCbsN560Z0Fk88a0J9c0ZnY loT4A2ZeMFdKVaJM3cY9h9m/+Wa2bO3bnobejEySJswwgYWM/5Kr6tkkxio76uu7fDva Nl9VM8MLs1grxlpC0ZYcx5jnvxAcJ6ZTQMlX7yK1aS4/JvRYgd1shJwosI56GHMwmCDv JwSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333548; x=1742938348; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ijlmz6/bRJsdkPdqsV+cz0ErI9CNddyOzeS8owSZGCU=; b=P+qkNOOD9K6xLhYOiOYLiFE3TVJMQWWpHyePIevml+U2HXWJHEKlNFe5hxTRo0LlHW HV8yBkrClbaeGlxsdkJVcBSf3F8rR8f+D2QCeOa935AnGZsXoH5hQzVVJFnJ9CQTeaMC mlNS150ihMGvLGsCVFkGR0qEQZeH+n5nO7GGG4ZMQFZpif/DDz/9Dvz+b/ZQnUERb2EV pl7aBCeicHqv4T6x9NHVyrD/dvXJ3Temkhbnq0xPj0lGGOD2reaIqkHsKGj4K4Bwfwtx dI22B8u1WNkP7laA6QcprHue2cjqh5NUxAgyPRirwB0fmTFYm5Jkw3Y//Ivm2S7LRypf BheA== X-Gm-Message-State: AOJu0YyVCOKTc1Uzl6hzeWlINYczPqzOt6hm00iyNCg8VILbXXDIppXb SJdoZCa3GRj8u5rNEfcFyVvCdGrX0vKi15WJlyo0odwPVftuLvBpOYcpog/yoALQLAIU2PE4May / X-Gm-Gg: ASbGncs/v8GouhyvtLoMybARNQCmi21bOX2tFFP7yotCkcExwMYiFAxa5jjRAnnoVKT 9JQ6hBRHpxe4FPnih83GW8TE/9x/J2RIUfdnUhyODjI4EFjT5lquk4ET5lPe76LSjRPfQhJ7Lp4 bFsh4wUnK1nKakI1cuqILnMVKrA0Zm9t7nSgI4pHFBK+9I3qA7rUwcUcGBwUihrj3r8TtAHMcSq sR4xL7vpTLt+ePoouqcVkgn1hMyuh23bHUaO/ygmIRKYSxTYYUOoq7HiImO7KYN2ZPnBPLNO6uk AteqK1c1PdF6QOAuJPMmbB50S803pyefUH00yMQX5vj+qFr/UQSpqAtaxK49jWp99adB05F0cry W X-Received: by 2002:a05:6a20:12d5:b0:1f5:a3e8:64dd with SMTP id adf61e73a8af0-1fbe852bd0bmr445597637.0.1742333547926; Tue, 18 Mar 2025 14:32:27 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 24/42] gdbstub: Move syscalls.c out of common_ss Date: Tue, 18 Mar 2025 14:31:49 -0700 Message-ID: <20250318213209.2579218-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Copy to libuser_ss and libsystem_ss. This file uses semihosting/semihost.h, which has separate implementations with and without CONFIG_USER_ONLY. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- gdbstub/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdbstub/meson.build b/gdbstub/meson.build index 0e8099ae9c..b25db86767 100644 --- a/gdbstub/meson.build +++ b/gdbstub/meson.build @@ -7,15 +7,15 @@ # We build two versions of gdbstub, one for each mode libuser_ss.add(files( 'gdbstub.c', + 'syscalls.c', 'user.c' )) libsystem_ss.add(files( 'gdbstub.c', + 'syscalls.c', 'system.c' )) -common_ss.add(files('syscalls.c')) - # The user-target is specialised by the guest specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-target.c')) From patchwork Tue Mar 18 21:31:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874437 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76742wru; Tue, 18 Mar 2025 14:36:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXJLEcY3FR7Du4lfTgoup2Lp9KjzXXwSn+KqNndABc0kRg/U6C9yEI3h44LGoUs+rfTMnK4fg==@linaro.org X-Google-Smtp-Source: AGHT+IGpFSUelSmXhtnwhkl/0CGxTDbyjaarRJ1cUeX0tAie9o3ZObGOF25pqh0D2sP1z7iLW69A X-Received: by 2002:a05:620a:2414:b0:7c5:4893:faaf with SMTP id af79cd13be357-7c5a8460e35mr29670385a.45.1742333807467; Tue, 18 Mar 2025 14:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333807; cv=none; d=google.com; s=arc-20240605; b=TU0JBAAZixk4gdk3+vysXbvyKkg+lT94loIwEGkAXq0Srvta1QXr6d0BMWmErZ9NX+ eTPQ2jKVZNIOh1QCR2FiAv8ojRJiKLJ9rYMjdv5BWT22JqeekcuC5heQAmTnbuNwXpnV SU/L2UmdONzDsC2bX0SxB8j2A3PUVqiy7UfO0nJcnokkBq0nA5J58oT0g5LmhTw/EOxA qrLntxZi64thd+LeRYji/n7k4Lw03OfTXO+FshspO00lD21GBJ+0zahPxb5UgxCptKt6 Zo85s9GWmrHLhm9yoVMNGe82O5/g5dVt+SsDyPCBS7I8qMU4sn85dndcZ0ekKbuVkB2r /yhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5QmVx49VUNvE0VebpWYF9vpR8W6QUfLccSgTbYDwMAs=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=SNtByRtw57kynjjORfO7WpEWO0IjcljdstQLHgg0ehfNb/2gH2e4TG2e4EIO2wJTJJ 1atj/LXo1/+wGO+YPTJSM34lt0KoMr2oRyIxWG1YG+iRJXHjgJIAeAevwPKubDtJinZU beIAkiYTHg7RHZdbW7Vph69fFz4XY+jehUiAyBziovJOX69+waSHmgmpjGdES9Mm0/gC FXiFk5kJJ77XFR8FH3lHKNqGanSYGsICOBT8zSHIo4fdID7CAx7rD/VigTR8BV0ipecb 5bzBvfH79idzzgQl0p1JaikRe34U931U0a5IFmyQb/o+tZrcYEwVimDsqQycAfGL7lOC OVfg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ug9fZVCU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573cae6d2si1247469185a.264.2025.03.18.14.36.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:36:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ug9fZVCU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZF-0002Ou-Gw; Tue, 18 Mar 2025 17:33:46 -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 1tueY4-0001KE-I7 for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:33 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueY2-0000nd-3w for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:31 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2255003f4c6so110623335ad.0 for ; Tue, 18 Mar 2025 14:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333548; x=1742938348; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5QmVx49VUNvE0VebpWYF9vpR8W6QUfLccSgTbYDwMAs=; b=Ug9fZVCU9vAKmyL4VhCcn2zGXK5szRjo54OJnmp5vr4Ztrg24rA/E+BhMg7WUSxVQF lSTcOYYrLA4pScOqViZdaeZq/2RYYv+UGGrQV2B1hgSJZ4GbXU462WYnJ8sZw4UwFqTi yzEhvATHchPJ/+MU5O54TyQQN+TT2zftBpS/ReL8m5dS0ldlKa9ApKN1uyK8bOloJh+g +NDpYLNSkw2oLgp4dIr1HUn0LQ5bIeDTnk+90ZUi37OLZ7bNKgSKugomR8laUc5BDvbn wHsAWBh5SL5nejLzKPLXL+biyNnWFEW19plZVD/mALj7/04rWtqAUGJJd7DREENFOkOh Lr+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333548; x=1742938348; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5QmVx49VUNvE0VebpWYF9vpR8W6QUfLccSgTbYDwMAs=; b=CbiJvs1Ti3SKjNJiOp9iK/MbW+x6W6F/jfVujGSmIYJLmO8YwDGxMBdLEu8jKdRt0Q 9Zod4wenyaNQSCXuygD/4tIBtWiWYb1uVyqPwN0HLtQF9K5jYwA9bqsPC4uWrd8I1BeD Kl9eYxSxMISGd6DyD/NrgJgwqpDfbINn0cTmXxHHyMZpx4O3JKdQIkWhNO51JNFQtC7Y abzitQgJBCEhpWAORRR4+or/U5e/oG42HxaEBkrA+Xh+96yaM4NxA/ttDILDAo6C6jp4 jUgrGzyrkpytaeGDWiKtM1bgmGzp1I+lSOzpD1YxkXY7sgSEXJdVT5TFbDXyrbTYlIcd HzYw== X-Gm-Message-State: AOJu0YzDxFjhkWDN3R+dvSUU/y/yhqAKkRm0jFq+jTXMzcXKJFs09Tup QWezr9vq2WMk8rpNB7qJmI0/Id4qsaqq4RpncWEhMQPSQbhoquiEndmg39xLPyIWV0VZKeHuc7V W X-Gm-Gg: ASbGnctZH6G6gT83b5ZGicWqjSRP2C/oMXi/O/C6wvBpjUa/HYgJXIM7TvC9rR3wWXz ZN3Ui+F4MVolwFAGC/9S3eksZ7A2886VO3IGFjuT9re9Mqqz202nPYZ1n4GAxLSvi81KSuxbXMd lWMuszmUOlHTeAOmESByLrOxfhsIZKGXT+uTKEFINoh1uM2FDBrUPzDQY7DBm/YlAGy1YfuSbJG 3l67qjSByMCR87Loq7yT5Mifhx5UxhQz7q7BZGS8cK4fvIK0SzfKhOXXr038JGLSXeWnMvG4NJy j6Ot0KlXDBUk2RWuJawT1g+nVM5ts1gaQLya7l7+l7LPXrbpQwzoZyEBZoxE5ifa8JNQ+yAJNo2 E X-Received: by 2002:a05:6a20:2d23:b0:1f5:8a03:ea22 with SMTP id adf61e73a8af0-1fbece408e9mr272333637.33.1742333548526; Tue, 18 Mar 2025 14:32:28 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 25/42] accel/tcg: Use libuser_ss and libsystem_ss Date: Tue, 18 Mar 2025 14:31:50 -0700 Message-ID: <20250318213209.2579218-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While some of these files are built exactly once, due to being in only libuser_ss or libsystem_ss, some of the includes that they depend on require CONFIG_USER_ONLY. So make use of the common infrastructure to allow that. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- accel/tcg/meson.build | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 185830d0f5..72d4acfe5e 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -1,12 +1,21 @@ -common_ss.add(when: 'CONFIG_TCG', if_true: files( +if not get_option('tcg').allowed() + subdir_done() +endif + +tcg_ss = ss.source_set() + +tcg_ss.add(files( 'cpu-exec-common.c', 'tcg-runtime.c', 'tcg-runtime-gvec.c', )) if get_option('plugins') - common_ss.add(when: 'CONFIG_TCG', if_true: files('plugin-gen.c')) + tcg_ss.add(files('plugin-gen.c')) endif +libuser_ss.add_all(tcg_ss) +libsystem_ss.add_all(tcg_ss) + tcg_specific_ss = ss.source_set() tcg_specific_ss.add(files( 'tcg-all.c', @@ -22,11 +31,11 @@ specific_ss.add(when: ['CONFIG_SYSTEM_ONLY', 'CONFIG_TCG'], if_true: files( 'cputlb.c', )) -user_ss.add(when: ['CONFIG_TCG'], if_true: files( +libuser_ss.add(files( 'user-exec-stub.c', )) -system_ss.add(when: ['CONFIG_TCG'], if_true: files( +libsystem_ss.add(files( 'icount-common.c', 'monitor.c', 'tcg-accel-ops.c', From patchwork Tue Mar 18 21:31:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874427 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76349wru; Tue, 18 Mar 2025 14:35:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWFNziXxvTZ03N0gNR1eCHt8YJ+Y6i1M/m6mdV1TtAtM/PYA1mWHw/ZgkzZxAnbuDxOzpvI7A==@linaro.org X-Google-Smtp-Source: AGHT+IF+INPVO9FIyuu22gS2V0mV6mVo+ykyynbA1YMkPRT4LxGt4lqCycEf/7EEjDdrMBJXly6C X-Received: by 2002:a05:620a:4095:b0:7c5:5794:3e66 with SMTP id af79cd13be357-7c5a83d2986mr32585685a.31.1742333743890; Tue, 18 Mar 2025 14:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333743; cv=none; d=google.com; s=arc-20240605; b=bGMUh18zOl1lEMohDB6UOSyKF/pVBGV23EmBaEIKXTYETUOIG6tzXsgmv8ebw/2sTg k8ihw1W5vl6t9HVRyC0fxEi8PeQ+b1Elqg4m0eNjnVx7nkKIc+pWtRz+Yheb81vhKDrr KDmYMTVH+ogWu1bDeH8TOHKD0yHJzir/mw7dQzup6QSD6f7mMdOXjsc+Kf0wDcvBCrID y3zay/a1dhSpfRYvSHzhYSc7vKBMOQybFuG29Ot/UgvoxHQMdvLKH+t/q0YnacV411qg pDXbphSosT0gcaZdzX8ToFGTTeDDTY30fH4LAGP9QYaxZgViL4okX5m2FbMrGBOSpaTK 7KjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ggA+NUCTfLjXVXevEP+BP9AcTpKIsc/HWrtDpZAfGPk=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=fvOHWvSG1F6ph7Rq8dpFg6BelpCHhBozpUD3K7NI+5t8XA75ccpfEDJGFjCGrcpUok 88H0f1RaakdA60D8Yn0l44RNo+0uL2oQFsud9fTNi6aL7SbMAklOe1dSuAql8wmxEPLF CsYofa3VbjHt6gAmHD4KCcx3iOZTIZtNjqFzrHPCbx7snbU0ZMjl1AYZN+iz1usHwK3W A11K24BQYPE1Cc8fP/MKSD1dNwOsmqlL5wIJV8YRnDblcdtwxe5e50p/PRSrdOcVP85o NZ4C2l+/MREITh7j0h9EUJGDobil1lWwiUG4tmYU3RWVO4gpCWcenHRNXRWg7tQy26Bf Pwtw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i9+G+Xci; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573cec3a1si1278062385a.354.2025.03.18.14.35.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:35:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i9+G+Xci; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZp-0004OD-Ga; Tue, 18 Mar 2025 17:34:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY4-0001KP-U9 for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:33 -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 1tueY2-0000nv-TO for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:32 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2255003f4c6so110623475ad.0 for ; Tue, 18 Mar 2025 14:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333549; x=1742938349; 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=ggA+NUCTfLjXVXevEP+BP9AcTpKIsc/HWrtDpZAfGPk=; b=i9+G+XcieQMojHKfgz/du8WSsnxTFD17ucyC6jktM60tlnxaSNvN1RoPk2xDzOiXRL 08ojcFeymfTFYCOm0kgk9EbJjOquFzlPzvXTrRPc/YfBFekCkNDqagxYqHg4i1ltBzsI xCyujkYeLK43evv2ek5eaTb8f+ptywFfNR2a1RmQiBtD3kckXrBOjrFDgXMQP0EDaIYA FNUAuZE5A8neE1M9JiNV08rlgIQhCAcuO8eWqqJ9p4xfahf24t6WgEJngt6Ju677YYpE r4HtceIsUnKc9Oataj6w0QaKpwAUwhz2seXcu9wnJf6ahfZDy7YIHSr1FWkTebBnEYrZ 2uiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333549; x=1742938349; 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=ggA+NUCTfLjXVXevEP+BP9AcTpKIsc/HWrtDpZAfGPk=; b=vIE5Ow/d9WeoeyAkxde1u8SKWbNk42TmDFiSPsVAEtCQlNHVSKJ2xmaFPMng4FprY8 XHlpFTAEqdt155rTtdZc9a3UXEvlvZPUDFRgVLGGQbyCEShDr9POEom8P/aMRXOY6SYh V3rb3u1tZ3K/9rSnCXFgWocB4wHFQORCsSidhaJg1sDS/e4gHdvnY//179yxsQkwah7H 9grCjYPFMGYaiyIMH40RHX0QO82mBTxPvaEjax8enodAtg7gKmWaKglhzPa4wedvHBgg Z1e0IfRur3n1InjnXXEsJyA6LJ+j7nnSVMJ91sRoasAFe235e54PN3KTr3WtnmLZD5wO 9MEQ== X-Gm-Message-State: AOJu0YzYZt4YyrKkWZvXbtBidsfOT+c3WxyCsr0xQcKneLAx8AvSc7L7 MGjj9bfVndFaIQXSoP51S2/7cWGDBWLkEIt8QAWAG6OvjGpo5jXXyXa865YEBfNhvFTi8EDcPjJ D X-Gm-Gg: ASbGncvI1lG2ErdzlB4fUcCESqCIeu+eGqiKl93vDx/GATI+Ax4OhudFk4dpz6ZKJRp 1JkoPFAQs8mXsPzYL6/gYYTLbw0NcKfRZ750hWbqD3wHUDcUTNaZIfKpo3jfofVwVudM185TBUq ucyfGNVoeL19eXD4+PYMegZ67p4HLTJfyCuiAXRN/hkSuo4qAfCjyhmeJfcMR7kHjRawcJZ5Dkw /H3T7Ly5rgqSMbVBplx8w+Y/jCtd+VyKnpOYuH9iQzb0++maHYtuq/t6q6Z0ST/x+cIdb80H9xW l+u51hEMm1y0l89L9y6N1jJ+DL42Gq90PJonmF6MW+gSUJ/G7ZMKs1sIZoccaroOvvGITniwc1U g X-Received: by 2002:a05:6a21:68f:b0:1f3:48d5:7303 with SMTP id adf61e73a8af0-1fbece41f10mr336813637.31.1742333549169; Tue, 18 Mar 2025 14:32:29 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 26/42] semihosting: Move user-only implementation out-of-line Date: Tue, 18 Mar 2025 14:31:51 -0700 Message-ID: <20250318213209.2579218-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Avoid testing CONFIG_USER_ONLY in semihost.h. The only function that's required is semihosting_enabled. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé --- include/semihosting/semihost.h | 29 ++--------------------------- semihosting/user.c | 15 +++++++++++++++ semihosting/meson.build | 2 ++ 3 files changed, 19 insertions(+), 27 deletions(-) create mode 100644 semihosting/user.c diff --git a/include/semihosting/semihost.h b/include/semihosting/semihost.h index 97d2a2ba99..b03e637578 100644 --- a/include/semihosting/semihost.h +++ b/include/semihosting/semihost.h @@ -26,32 +26,6 @@ typedef enum SemihostingTarget { SEMIHOSTING_TARGET_GDB } SemihostingTarget; -#ifdef CONFIG_USER_ONLY -static inline bool semihosting_enabled(bool is_user) -{ - return true; -} - -static inline SemihostingTarget semihosting_get_target(void) -{ - return SEMIHOSTING_TARGET_AUTO; -} - -static inline const char *semihosting_get_arg(int i) -{ - return NULL; -} - -static inline int semihosting_get_argc(void) -{ - return 0; -} - -static inline const char *semihosting_get_cmdline(void) -{ - return NULL; -} -#else /* !CONFIG_USER_ONLY */ /** * semihosting_enabled: * @is_user: true if guest code is in usermode (i.e. not privileged) @@ -59,17 +33,18 @@ static inline const char *semihosting_get_cmdline(void) * Return true if guest code is allowed to make semihosting calls. */ bool semihosting_enabled(bool is_user); + SemihostingTarget semihosting_get_target(void); const char *semihosting_get_arg(int i); int semihosting_get_argc(void); const char *semihosting_get_cmdline(void); void semihosting_arg_fallback(const char *file, const char *cmd); + /* for vl.c hooks */ void qemu_semihosting_enable(void); int qemu_semihosting_config_options(const char *optstr); void qemu_semihosting_chardev_init(void); void qemu_semihosting_console_init(Chardev *); -#endif /* CONFIG_USER_ONLY */ void qemu_semihosting_guestfd_init(void); #endif /* SEMIHOST_H */ diff --git a/semihosting/user.c b/semihosting/user.c new file mode 100644 index 0000000000..9473729beb --- /dev/null +++ b/semihosting/user.c @@ -0,0 +1,15 @@ +/* + * Semihosting for user emulation + * + * Copyright (c) 2019 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "semihosting/semihost.h" + +bool semihosting_enabled(bool is_user) +{ + return true; +} diff --git a/semihosting/meson.build b/semihosting/meson.build index 86f5004bed..ab67f87e4f 100644 --- a/semihosting/meson.build +++ b/semihosting/meson.build @@ -15,5 +15,7 @@ system_ss.add(when: ['CONFIG_SEMIHOSTING'], if_true: files( 'stubs-system.c', )) +user_ss.add(when: 'CONFIG_SEMIHOSTING', if_true: files('user.c')) + specific_ss.add(when: ['CONFIG_ARM_COMPATIBLE_SEMIHOSTING'], if_true: files('arm-compat-semi.c')) From patchwork Tue Mar 18 21:31:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874432 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76552wru; Tue, 18 Mar 2025 14:36:18 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCURenc0aH3qfuEp9bigrlfppyfJisoUqkkZ3e5R4UJ32v+lN4ED/AtpuwIDapVFdT3lwDUeVA==@linaro.org X-Google-Smtp-Source: AGHT+IHjvKMmBCvMGIrl836jOVJ/eglu/2ml75ONXjxNNAG0DhYb/OeGN2cR4WilH2GV9rp9IT4e X-Received: by 2002:a05:620a:578:b0:7c5:5fa0:460c with SMTP id af79cd13be357-7c5a83d3f62mr33684785a.31.1742333778654; Tue, 18 Mar 2025 14:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333778; cv=none; d=google.com; s=arc-20240605; b=iqBhTOThjdOXALlX6WsTKPLtsegijV3kWtnwkPDo/DGXnQ8anhdWLZWhDsVC0UR7N5 pQ00XJ6rgZLupj1AahUjfYT7bV4yS8ZQUve81jI0LBBTatu1t+FXZxd2dzTERxkeJSnB qjyjeBg6s3Pe77lIBd75xFGkLrhkQZLTu4i0JDZpjfV9jH34vNsB0NDmsubfeLR+bgp7 /9XcDT4x0Pg1m5tFdpe+s6RXb68s7kHFwiM/Ay1vhKzEYtw8E27/D6Y1EbGl+6qtBUei 7TZpjn9xcZSZTWYYEJjFNARtX03NvwEyngFmttFt10CKl4DbtA2Iv8hRaN6MmY/+rwOk yaLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rmJPVBq1IIiVyK6FrvUDybHt88qCAdqwKT6ScZgiv/Y=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=aeAoOjc+KyqMnnX9qarxD7iw7GKIWaBQPtDqZTRDAGrxB1hDkMYT9/xPxbhvRQuNYR RFzwRNnZ71dyFdRfYwxCqvssKsmPcgeJP/qc2EPzoW3/Cc1bvrK41cuNjqqadoFY8Jtu 8/V2/Jr9UUYBiC9wOntPU2FCAmrt3KRhlXWJvg+Fp1dYEN4rW/SuQMvp0uTYJ1ycUj5p x/eLv455Vf71Tr5atnyvyCukuq01tXoOOUYIQkjlSPIT2sUMow8fZsa0Ch2dVpyAe9XN 0qNk9YtVKaBUpVLLeSEhm/O+4xHrFaB+xO7NdYaznPYwp5TCflWJdr67ikusqEV4Zjgw UzpQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=htK1UucR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573cef05csi1274741085a.390.2025.03.18.14.36.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:36:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=htK1UucR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueaL-0005bK-KF; Tue, 18 Mar 2025 17:34: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 1tueY4-0001KO-U2 for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:33 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueY3-0000oj-8G for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:32 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-223594b3c6dso133166015ad.2 for ; Tue, 18 Mar 2025 14:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333550; x=1742938350; 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=rmJPVBq1IIiVyK6FrvUDybHt88qCAdqwKT6ScZgiv/Y=; b=htK1UucRyLeRCv464+txXqLlEJGqxIyujKkSMhJWfpvOuh/dU3nTKHVZh5XNek0pJ8 qS03M3iQC8B12IykvKen/JDBEK+L/rWgUlHVCFVemoBrtpwc+P4dsAb6qwz22I4y+V4v 8bRoyF+p7d+TJpc6tywUkNV7weE98piMms8sQfl86UHUgxHMXtMUzR0/pNkC2kNxGAYt ChoQVPklMXkJGwT6SYqiVXNLnwLHlSKM0qbJK+L8GFjet/arS6kaL4gLsWyg1exZNAna 7VdVhe9YKCK6/ZrvX7GqLaK7ACjG0XByCxLwbbWboZZHfCwq59Rib4WCM9s6duQht2PL Mt6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333550; x=1742938350; 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=rmJPVBq1IIiVyK6FrvUDybHt88qCAdqwKT6ScZgiv/Y=; b=UzzIMwrVIzRM9n80Mki61Uw4uxkv3ddJ9LjCVvvLbfh54h7bvveByC7oR2LM9jNL3v 5vGE3uVebe62k0XiRg1yC1xaCD1JpdOMb64WJkA6d0KuWfZQ/IwAGRT07/7wK4A9uJ+X sH6YfGF2ljGxH0r1HbyGGsnKsyZUL10aOmk6FBgPhZwVT9i+OhvTFhwxwaS5mP/qurrX Ytdj1F17/BtihYNmlAeuHH74UG8/Rh50Zfd8Vvszry9dbrEyQ+fnsb/aSsJJp/979oE7 dD/XKyduu+2Ushm4mALvFVZJ6p57jqVbrU6lePUnnrBxiFZTXY+6kVvWpeqQuXHZfoXK aI6A== X-Gm-Message-State: AOJu0YxaIaUvjPSg3LVA55b99byw5o+05Eqhd1KHHcwrw5CT5VFVm4re RGuOXZkakFAuc6+yr5lrkpATJvA+T2Z7ljAKuGqTScsIsufHe2bZXty6yGk1q3/T2wtR5kQNKae h X-Gm-Gg: ASbGncujFbZa+USa27T2zA+f49c1MYRyc+l4jw6YlOQwHksMolCjayUL7VNAoQhDfBv noVgBabQ3lnOCYkGB3roZZ/D5plEs/2ZdkU3EEy7Ih9jP7ag4ca9EVGSfwOByeA6PkiEcXnGaX2 7vEtgYtC6Xxl/29q1hUrDL+JPrrU08fxvenMX0/Httzgv17mMeVderHXamxL5kwPDN3G2T4u715 ssRkF3+DlSwh6+S5MQf5HsWE8Bp9WPnTauz0/3eI+elIekvKuIX9sxliuCM37YNTV5KA4t6L8LC KS7Ee3LnVAgQaBK8ajMGrX5fEfVlGx6eVVv9cjr31WqwEwHrnRRUSebRGgPc53MqIs7aSOxe0Y5 Y X-Received: by 2002:a05:6a20:9f4d:b0:1f3:2e85:c052 with SMTP id adf61e73a8af0-1fbed31614amr328947637.35.1742333549841; Tue, 18 Mar 2025 14:32:29 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 27/42] target/mips: Restrict semihosting tests to system mode Date: Tue, 18 Mar 2025 14:31:52 -0700 Message-ID: <20250318213209.2579218-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We do not set CONFIG_SEMIHOSTING in configs/targets/mips*-linux-user.mak. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- target/mips/cpu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index b207106dd7..47df563e12 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -32,8 +32,10 @@ #include "exec/exec-all.h" #include "hw/qdev-properties.h" #include "hw/qdev-clock.h" -#include "semihosting/semihost.h" #include "fpu_helper.h" +#ifndef CONFIG_USER_ONLY +#include "semihosting/semihost.h" +#endif const char regnames[32][3] = { "r0", "at", "v0", "v1", "a0", "a1", "a2", "a3", @@ -415,12 +417,11 @@ static void mips_cpu_reset_hold(Object *obj, ResetType type) restore_pamask(env); cs->exception_index = EXCP_NONE; +#ifndef CONFIG_USER_ONLY if (semihosting_get_argc()) { /* UHI interface can be used to obtain argc and argv */ env->active_tc.gpr[4] = -1; } - -#ifndef CONFIG_USER_ONLY if (kvm_enabled()) { kvm_mips_reset_vcpu(cpu); } From patchwork Tue Mar 18 21:31:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874428 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76348wru; Tue, 18 Mar 2025 14:35:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVToIR7oN1VTrbKMe8NdhQmzbTo1ZK0I/mr+QNFaJn2bhhARN32MilFk+VJFB6WINxPgwKw2Q==@linaro.org X-Google-Smtp-Source: AGHT+IGPVYcf+7XoVmvfi1weR+oPZhT0jpESlkbkoFlQQzr1zPUdMr/1Ctm80DHU7aT3/Xo3H1B/ X-Received: by 2002:a05:6214:300a:b0:6e8:ea17:8576 with SMTP id 6a1803df08f44-6eb29279d6bmr4558856d6.12.1742333743853; Tue, 18 Mar 2025 14:35:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333743; cv=none; d=google.com; s=arc-20240605; b=EjTkAgncdWJZ/UROp1IhEVgx64DhNXsScS0mpIyXyrku2R8G3yEQTIXH2vHfevP4LT IrQW5ZokO4SwvHqzOSA6Tn7QX81CBxPnfqmeNDZVpD4d1JkD3YBswbo11gWJiSgjd+Oh zg50tpBscfWtlz5TY0AtdVLyjhpnC8pRyN1E663/SG6Br+Xg1Ehn+oQeSxSXOAioUbwm srtkRmEJtRvmn2G/xwTegjnPlQjX122deK1Zz2LTLtVWw/qKBrP3M4+hxRGRwZNR4OKc klZkBEeyC6gKF7M8RTRRNbuGUoRqXTuF74UBvZ+lAmVavSERGBt2Vb8/F6i61s/XGyEk dTrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bcMlC8YA6iYsSudLw9pQkFBFmlvqHQzrCYvrc7Y0wec=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=U6iKDAQuooFqshJvS8Dtw+CJpyPYFJAYm5ezjk1wNf7wekkxIspeoaJpfuosE4b294 O2YrG1E3I/xMR+hmxinxaIHJiax6ZfrkhvGv5usLNN+Qwaubx2Dk6/F4Jy9Iiasv4Z16 NYFsEy5gj2X+bcx9Cilxj/dey9KbmwlI5sY59kJzdhsbVaKsL82+uVofqGAuqmL5MifA LGHn6/th4oL0jO7Q8INWCJ+PpBRJ2c5obsMTsdOi2oyZPOao1Y//Sn/J64+gSDfmnFM2 /cO1ikxeyt4h+gEmiQQFpTgfQXmNdsaLsdpXAuxoqJ3m97V7AI7jLF5FQ3mQwZuLdI4U yp3Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=svJGE8bm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6eade355342si129772276d6.289.2025.03.18.14.35.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:35:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=svJGE8bm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZM-0002ii-FN; Tue, 18 Mar 2025 17:33: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 1tueY6-0001LB-06 for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:34 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueY4-0000p6-7x for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:33 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-22403cbb47fso116514275ad.0 for ; Tue, 18 Mar 2025 14:32:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333550; x=1742938350; 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=bcMlC8YA6iYsSudLw9pQkFBFmlvqHQzrCYvrc7Y0wec=; b=svJGE8bmdnWGUHctXYnW7T014qBCIIbBcgeiQTg/O+mCEYnndE5oAxQCp2S5K7wD85 TEtuGtLLGyR6DCiVfZ9GWRiRkw+xoQdgQyN1F/kEKhVqW6nWeEirpjkwdrolA4dJj6DU EbBdLbHVmm6dE/QkDGyMYjGmfkjBgE2Zr7cIdgqOlMZjxdZA6NzOicEuIqBCF7ZuQvxQ lwxWxlImFxIdIPZ4XSRCKKNjF93s/L+nEQ1xPCv0qaj0qWDxHAcLXHXtIoj/fMjdZwdx 9za+cjkNx9WbMDmf3mVx4u/UE7Wryrv2UgvmoMF0pNCUCWsDQoNpmPFFOndKHZhwgRLl s/rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333550; x=1742938350; 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=bcMlC8YA6iYsSudLw9pQkFBFmlvqHQzrCYvrc7Y0wec=; b=NDJrPJaWe0501P7StwqxM+nNqIKS7jWs26cBi4ueoKdVy3P2vrIRNoFb79dA/43BLQ a/BWHdfgH6Dz7IcECWy9rLRGZnh8F/FkzWdfXhhAo9PJK9pUuQbQV2JG00yLID+jszBl wkDp4l8ZZk53H1Kl54aXgcNjQ88/jZWmdYBEw/pvuByoYPKFt6C/TTSrHYrEZUa7Vojv fmHkgmNWKaU+whokbvOFY7pR0rimby407zXsYmA9/GibjT0oECsiem64dMtIlZFTPLdQ CgpuJDdsqhBTLhLKL3eNCnpz4+N9/BZia6gviLp7NvDRyhqedMe+2EnZJcYPtCWJRZsx h4uQ== X-Gm-Message-State: AOJu0YwHIWBpc444M0J5voFY2Ubn6+jnQkjbiDFb3mnSB7rtymRSwqAh fPSNp6UuFHIbFJNwxF2W/a2VwhScpgVWth2asO9MozNAXa4in+XxUfCmQsZr1xtfxKK3JfF0vAQ a X-Gm-Gg: ASbGncsq9GcZcuXbKoWoOPBPg6mLiGD6Pf2iWRMvYlazgPdwTV+Mq114Tye0pvyzwP6 XFOTQepFQEcFW9E+jxYasCyNoc7ISNykqR0ZqrA+U4gApK2UuLlAjGXTh1jlOZnMYoDGSElYxqY OkKiOauJ7WLOybYNQVIAfG437RVN0aXNKd8BqQtXmC3y45geaYIi/8ZCuUst4x2M5S63oi+4hT9 bwdAvq8P1gUunRvbR+nBhctFdW5Y/8inZTwfXLI58JoG19o6WaJg7wNP3AiN1k5VFav08aV9KGV KLwQNRKZ3qMyb0lbW6jGhNSkGI5MaNcYecWb+Zg0KJSkuGUoXfvYmqoO0HheLWIrHZXWAizu1+l VGmXVs/Fr6Fg= X-Received: by 2002:a05:6a20:9151:b0:1f5:8e96:e75f with SMTP id adf61e73a8af0-1fbeba91ffamr305861637.18.1742333550465; Tue, 18 Mar 2025 14:32:30 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 28/42] target/xtensa: Restrict semihosting tests to system mode Date: Tue, 18 Mar 2025 14:31:53 -0700 Message-ID: <20250318213209.2579218-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We do not set CONFIG_SEMIHOSTING in configs/targets/xtensa*-linux-user.mak. Do not raise SIGILL for user-only unconditionally. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- target/xtensa/translate.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 4f02cefde3..cb817b3119 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -35,14 +35,14 @@ #include "tcg/tcg-op.h" #include "qemu/log.h" #include "qemu/qemu-print.h" -#include "semihosting/semihost.h" #include "exec/translator.h" #include "exec/translation-block.h" - #include "exec/helper-proto.h" #include "exec/helper-gen.h" - #include "exec/log.h" +#ifndef CONFIG_USER_ONLY +#include "semihosting/semihost.h" +#endif #define HELPER_H "helper.h" #include "exec/helper-info.c.inc" @@ -2241,17 +2241,15 @@ static uint32_t test_exceptions_simcall(DisasContext *dc, const OpcodeArg arg[], const uint32_t par[]) { - bool is_semi = semihosting_enabled(dc->cring != 0); -#ifdef CONFIG_USER_ONLY - bool ill = true; -#else - /* Between RE.2 and RE.3 simcall opcode's become nop for the hardware. */ - bool ill = dc->config->hw_version <= 250002 && !is_semi; -#endif - if (ill || !is_semi) { - qemu_log_mask(LOG_GUEST_ERROR, "SIMCALL but semihosting is disabled\n"); +#ifndef CONFIG_USER_ONLY + if (semihosting_enabled(dc->cring != 0)) { + return 0; } - return ill ? XTENSA_OP_ILL : 0; +#endif + qemu_log_mask(LOG_GUEST_ERROR, "SIMCALL but semihosting is disabled\n"); + + /* Between RE.2 and RE.3 simcall opcode's become nop for the hardware. */ + return dc->config->hw_version <= 250002 ? XTENSA_OP_ILL : 0; } static void translate_simcall(DisasContext *dc, const OpcodeArg arg[], From patchwork Tue Mar 18 21:31:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874452 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp77809wru; Tue, 18 Mar 2025 14:39:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW01ONh6+CKmeLvw0EklS0vJaRTEy/1QRQJyfdd7vwKNa+kL4Ld75xW3JkfG48SE/CG0eWSng==@linaro.org X-Google-Smtp-Source: AGHT+IG+OneE3TnHpMVk9NFDDhjOjFh/x6Yos7w4EjUJ4ZWmfrm9ZJ0bnbgYqHKAs2l0rN+KXSLz X-Received: by 2002:a05:620a:2485:b0:7c5:5a97:f770 with SMTP id af79cd13be357-7c5a846ff64mr32094385a.41.1742333983043; Tue, 18 Mar 2025 14:39:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333983; cv=none; d=google.com; s=arc-20240605; b=OSqG4Asf3gAPSiBmWJl7kCqEmoa4UpbNHHJcS2EZvIbU1G9XDJ2F/jtr97o7KapKbz eSWYgeF9NuDD/npMUWwGlNlzQ6dgGolFGtV5s+z8IoT+/gh2iatymOy2zh4+xYV1jqlT y7eQ0UlnwZz1z9oKNzNVldxvqNZIckglHZ7DYikGqZM0CU3J9T/tXGWUU3M+X3Cbqsn1 v88KZ13AO+WcKr4rOlweffmJ87OVbqltIzs7osBmcUVxJbXFwCMb/3VPouh8vjzIft9Z N+HBDNmOMt0o0ijXHTrmL7ghQ31viIEc/8jqqnou4+rBoxzKRQf7TdacrBF3mr4MAehd bLUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yofLWPTggw1m56wNAEDmDc3pTTmVmJjgPYgELkea3zE=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=bEXtydn1jxlKGG1MTKqjJu6uAH51jpSJ5IdicU/DLHrYIZGc79EbBzrBWgTjMvop+h H7zLiCovGGcQs9JBfAmurBSeOVQ/9oSuNkipJO8osm7rqI17i2Ta8Of74/KgoR4cvr93 fqhhMPhLebbWGYLjoC6ipN20j7hmwyI2h/+wAgcZ3Fz+k77YZ8Fo4q/fUB2DPitTxcpy jwzKLoiLqSysOL4QPzvTWzVQuqQwHrkAN3Vcl8e4gAytl/SMb0S4jZ/Kj+r6ToEy1cSt e9sY/lzizKU9QYjXqdO/1qLolzcuBiZpK+xAlUvqnb09aTeSXcMAWOP0f8Nit/Fcb2zj sqDA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v5CLXKZF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573ced46esi1283350185a.370.2025.03.18.14.39.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:39:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v5CLXKZF; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueaZ-0005wo-9m; Tue, 18 Mar 2025 17:35:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY6-0001LR-SD for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:34 -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 1tueY4-0000pX-Lv for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:34 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-2239c066347so131666765ad.2 for ; Tue, 18 Mar 2025 14:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333551; x=1742938351; 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=yofLWPTggw1m56wNAEDmDc3pTTmVmJjgPYgELkea3zE=; b=v5CLXKZF9uPoNcVLE3t4+P3ctxdJtwIw0t1bqFNRFSFSVpddTWHUmjnk7zrsczjzw1 314UPmNtz8p4Wh10J9XaYKMKD105vTlmI/VI5vQ3AbX9BZQGWEGopjImyevyv/tPprlg PAa6XX9PMAgOFFDNytVZwGIOfOI8eI7ZbRe9LsAiBJdayTxXenY1UuDzXXNe0tk0Ia/i RHQ9lsL4VhH+Eq+7b8OoZYVMHGGaf3qx2KfDMLNL1XwYWGok2XeIcuwVRh7RI+hVp+BE Pu9HgPPQa6VdWV7fArVNtVi26lVKkCgzVfJRslXESfyUa3jMx91iM9ZDFtFyd2vWP4nW sCdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333551; x=1742938351; 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=yofLWPTggw1m56wNAEDmDc3pTTmVmJjgPYgELkea3zE=; b=NzSqE8b8ODngJu6TMJH8LCzf1yc/b7b48anZPCZZlYzXXZ6piPbK3vcbdNRVjatZS/ nOcU9Suokgg9L0QngQT4Vqo+hCWQ3+/Tv+FLktQtunb3NM/YjoomxdK7zdolh8q0McSQ hYztY49DtUMsi1gunn1h74kZg4bZxnfXhcdsclVcmKr2UKiaGJyVKyVVn/nz19ZpsMYE FvwdfZywonqnehZX7vGiFp3RvYUNJmuxOLEnkHE26klJT/ohw73+wwYhmcUTuawdAB0l WcZ4HtzR5aA6utW/Jg3O4jkdDETGxm6ajd9eTMJyxQtAQeVoAEQOcBUJTk8SYfPK3zi7 0kCQ== X-Gm-Message-State: AOJu0YwOsUYMuta3G3AfEs++yu8Wp+PmbKGGVaCtkFkcGHqYYVbrTjup faaslQSwD6fzwprLbPQOqnInf9qPP9MAoSnot0BelSvUFD0ss994ZIDvjRVinuP5Pkk+u2lMd+r x X-Gm-Gg: ASbGncsg4dii6zR76zU22ii2q93CL6iEktUaaWg67FlIeOba+wnO4OneW7XvpXCov6q b+p2fv2JILoaGMlU7V6Nl+Sz6RR8gVRPx7GgHUlk/H78EFk6DoyViEI39Wz0RgNDj8tyNBQTWRZ GSAlzwl2AyYogH8HDS18ITS65EkRkjjaAABhO2ts/aTQVAoTSoPMOltVMo7TTjOZHUWGykVDZPc WGviFqOqBDVQALCycenENvwwJoFE1Zi0RhqwwS+4y+8Zux74raL6b8dj0sr7gsjNAtbnACgOO3t JcQjWQTQ4/JUOLBGooE/YCia6NaR5BmdcPgKhJwBurgECWaHdxk6419SdWf1B3q/u+eh2sd7HDe d X-Received: by 2002:a05:6a21:3981:b0:1ee:d06c:cddc with SMTP id adf61e73a8af0-1fbecd46967mr363052637.30.1742333551198; Tue, 18 Mar 2025 14:32:31 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 29/42] include/exec: Split out watchpoint.h Date: Tue, 18 Mar 2025 14:31:54 -0700 Message-ID: <20250318213209.2579218-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Relatively few objects in qemu care about watchpoints, so split out to a new header. Removes an instance of CONFIG_USER_ONLY from hw/core/cpu.h. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- include/exec/watchpoint.h | 41 +++++++++++++++++++++++++++++ include/hw/core/cpu.h | 30 --------------------- accel/tcg/tcg-accel-ops.c | 1 + system/watchpoint.c | 1 + target/arm/debug_helper.c | 1 + target/i386/cpu.c | 1 + target/i386/machine.c | 2 +- target/i386/tcg/system/bpt_helper.c | 1 + target/ppc/cpu.c | 1 + target/ppc/cpu_init.c | 2 +- target/riscv/debug.c | 1 + target/s390x/helper.c | 1 + target/s390x/tcg/excp_helper.c | 1 + target/xtensa/dbg_helper.c | 1 + 14 files changed, 53 insertions(+), 32 deletions(-) create mode 100644 include/exec/watchpoint.h diff --git a/include/exec/watchpoint.h b/include/exec/watchpoint.h new file mode 100644 index 0000000000..4b6668826c --- /dev/null +++ b/include/exec/watchpoint.h @@ -0,0 +1,41 @@ +/* + * CPU watchpoints + * + * Copyright (c) 2012 SUSE LINUX Products GmbH + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + +#ifndef EXEC_WATCHPOINT_H +#define EXEC_WATCHPOINT_H + +#if defined(CONFIG_USER_ONLY) +static inline int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, + int flags, CPUWatchpoint **watchpoint) +{ + return -ENOSYS; +} + +static inline int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, + vaddr len, int flags) +{ + return -ENOSYS; +} + +static inline void cpu_watchpoint_remove_by_ref(CPUState *cpu, + CPUWatchpoint *wp) +{ +} + +static inline void cpu_watchpoint_remove_all(CPUState *cpu, int mask) +{ +} +#else +int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, + int flags, CPUWatchpoint **watchpoint); +int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, + vaddr len, int flags); +void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint); +void cpu_watchpoint_remove_all(CPUState *cpu, int mask); +#endif + +#endif /* EXEC_WATCHPOINT_H */ diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 5d11d26556..d1c1fefea3 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1109,36 +1109,6 @@ static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask) return false; } -#if defined(CONFIG_USER_ONLY) -static inline int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, - int flags, CPUWatchpoint **watchpoint) -{ - return -ENOSYS; -} - -static inline int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, - vaddr len, int flags) -{ - return -ENOSYS; -} - -static inline void cpu_watchpoint_remove_by_ref(CPUState *cpu, - CPUWatchpoint *wp) -{ -} - -static inline void cpu_watchpoint_remove_all(CPUState *cpu, int mask) -{ -} -#else -int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, - int flags, CPUWatchpoint **watchpoint); -int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, - vaddr len, int flags); -void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint); -void cpu_watchpoint_remove_all(CPUState *cpu, int mask); -#endif - /** * cpu_get_address_space: * @cpu: CPU to get address space from diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index d9b662efe3..5c88056157 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -37,6 +37,7 @@ #include "exec/hwaddr.h" #include "exec/tb-flush.h" #include "exec/translation-block.h" +#include "exec/watchpoint.h" #include "gdbstub/enums.h" #include "hw/core/cpu.h" diff --git a/system/watchpoint.c b/system/watchpoint.c index 08dbd8483d..21d0bb36ca 100644 --- a/system/watchpoint.c +++ b/system/watchpoint.c @@ -21,6 +21,7 @@ #include "qemu/error-report.h" #include "exec/cputlb.h" #include "exec/target_page.h" +#include "exec/watchpoint.h" #include "hw/core/cpu.h" /* Add a watchpoint. */ diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index a9a619ba6b..473ee2af38 100644 --- a/target/arm/debug_helper.c +++ b/target/arm/debug_helper.c @@ -13,6 +13,7 @@ #include "cpregs.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" +#include "exec/watchpoint.h" #include "system/tcg.h" #ifdef CONFIG_TCG diff --git a/target/i386/cpu.c b/target/i386/cpu.c index dba1b3ffef..af46c7a392 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -35,6 +35,7 @@ #include "standard-headers/asm-x86/kvm_para.h" #include "hw/qdev-properties.h" #include "hw/i386/topology.h" +#include "exec/watchpoint.h" #ifndef CONFIG_USER_ONLY #include "system/reset.h" #include "qapi/qapi-commands-machine-target.h" diff --git a/target/i386/machine.c b/target/i386/machine.c index 70f632a36f..6cb561c632 100644 --- a/target/i386/machine.c +++ b/target/i386/machine.c @@ -7,7 +7,7 @@ #include "hw/i386/x86.h" #include "kvm/kvm_i386.h" #include "hw/xen/xen.h" - +#include "exec/watchpoint.h" #include "system/kvm.h" #include "system/kvm_xen.h" #include "system/tcg.h" diff --git a/target/i386/tcg/system/bpt_helper.c b/target/i386/tcg/system/bpt_helper.c index be232c1ca9..08ccd3f5e6 100644 --- a/target/i386/tcg/system/bpt_helper.c +++ b/target/i386/tcg/system/bpt_helper.c @@ -21,6 +21,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" +#include "exec/watchpoint.h" #include "tcg/helper-tcg.h" diff --git a/target/ppc/cpu.c b/target/ppc/cpu.c index bfcc695de7..4d8faaddee 100644 --- a/target/ppc/cpu.c +++ b/target/ppc/cpu.c @@ -22,6 +22,7 @@ #include "cpu-models.h" #include "cpu-qom.h" #include "exec/log.h" +#include "exec/watchpoint.h" #include "fpu/softfloat-helpers.h" #include "mmu-hash64.h" #include "helper_regs.h" diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index 8b590e7f17..7394ffc557 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -40,7 +40,7 @@ #include "qemu/cutils.h" #include "disas/capstone.h" #include "fpu/softfloat.h" - +#include "exec/watchpoint.h" #include "helper_regs.h" #include "internal.h" #include "spr_common.h" diff --git a/target/riscv/debug.c b/target/riscv/debug.c index 9db4048523..fea989afe9 100644 --- a/target/riscv/debug.c +++ b/target/riscv/debug.c @@ -30,6 +30,7 @@ #include "trace.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" +#include "exec/watchpoint.h" #include "system/cpu-timers.h" /* diff --git a/target/s390x/helper.c b/target/s390x/helper.c index c689e11b46..e660c69f60 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -27,6 +27,7 @@ #include "target/s390x/kvm/pv.h" #include "system/hw_accel.h" #include "system/runstate.h" +#include "exec/watchpoint.h" void s390x_tod_timer(void *opaque) { diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index ac733f407f..1d51043e88 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -24,6 +24,7 @@ #include "exec/helper-proto.h" #include "exec/cputlb.h" #include "exec/exec-all.h" +#include "exec/watchpoint.h" #include "s390x-internal.h" #include "tcg_s390x.h" #ifndef CONFIG_USER_ONLY diff --git a/target/xtensa/dbg_helper.c b/target/xtensa/dbg_helper.c index 163a1ffc7b..c4f4298a50 100644 --- a/target/xtensa/dbg_helper.c +++ b/target/xtensa/dbg_helper.c @@ -31,6 +31,7 @@ #include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "exec/exec-all.h" +#include "exec/watchpoint.h" #include "system/address-spaces.h" void HELPER(wsr_ibreakenable)(CPUXtensaState *env, uint32_t v) From patchwork Tue Mar 18 21:31:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874446 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp77216wru; Tue, 18 Mar 2025 14:37:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWueNqVEarWkutVhh79e1EShrmdqxyjFR7eSloyr5JAmO36VzLVBFPOZGUZfxkmCufqoVjUIg==@linaro.org X-Google-Smtp-Source: AGHT+IGLTvh/kSw+L+Nw70dVNMTg8Cr7rdTg0CPWn/wRrMceKdKG+uC5VZfzlZvsbLe+xpfJvNCR X-Received: by 2002:a05:620a:4108:b0:7c5:44d0:7dba with SMTP id af79cd13be357-7c5a8283b35mr29138985a.11.1742333877629; Tue, 18 Mar 2025 14:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333877; cv=none; d=google.com; s=arc-20240605; b=TnnryeVk5WjXGllJWufYs4u1IcOLiF7Rzcn8cbTIA9kX8LjX07edyE8j3Jr3KV9FK4 HOYxTVEEaCAy+Pk793ydIeh2AtTFyg8FTCctxjmNeAHMYg3fZuP2WY0jqCdKfLszCYw+ 1alL+KBddhjzCP3jgyyTyy+GC6oRRvzhQ0Yg5r6/Ehv6ymPee+SAcr0Z6KudqxzXDHeK gEAlngaQU8uW+9FLf2Y2bzKdHmcX45tSVN/owhQVovXP/FxIRGq/c0DvOexDQw6v1pSk 03PLv/F4FdMTJqCNYFBhOEFPfuvZxTVd+ZEijn5OOwYbLOw76Dj4GvXzwQZIidH4dde4 4boA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fRqDXJHX2zGNybTG6x2KjIY6H1Iy34YPBBK1EJX6qfI=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=SFjW4mT7vVUKHj+fSJprEaIDyBLmlVOAuYn6TcG24yJfDuhnPVTb7cPmzuCmgFswz3 qc+UqZHBTAte4Fb6WUmi44SSCVRl8VSfvpKqbWU3cIBQRESdEyTwdgMwavycn+DJNDbK KAHkJBVDGsru3TaEUn9l2WC7OzKcUxmXVPsrEadTmcIhWrR42dtnIzG9lYA+YmQhW3DS FQhQPi8k/gkdoRmlgdx7DC4TpmRuXSRjsBGvBXkdGA8T1DqlOwxJhU865ZKhvFvcxkhO cZKWaf8kLgYk8sz+2ucK7DBWMxeUVpId8G0foV/74lHEoYBBASI64v5evrBtR89JJRAd gycg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QpB3E9a0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573d18e18si1238621285a.547.2025.03.18.14.37.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:37:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QpB3E9a0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZf-0003lG-4w; Tue, 18 Mar 2025 17:34:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY6-0001LM-KV for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:34 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueY5-0000pj-2Y for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:34 -0400 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-223fb0f619dso104391095ad.1 for ; Tue, 18 Mar 2025 14:32:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333552; x=1742938352; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fRqDXJHX2zGNybTG6x2KjIY6H1Iy34YPBBK1EJX6qfI=; b=QpB3E9a02mEUtWGdAEnqzzG2d2OfmGDCLy33/SSVPoyAa82N/sO2z8A0rDID8Jexjy j+150I+yNk2Mf2PTWBuHFq3rFejO70VBBm0ip7A234Z/CTz1F57SivnlmZgp0Vc/VdLn KCS16c70PpA5uWQ0MMoGckOymyIhF3JfxyONbVS8NvPVJWZBCDxtco4DC/q7USZUHRo1 yVsjrQhWiVhB6jiDrnlABlZbC+mYuOmDW6JZBi1GNLbRK/Qd000innNHh+D2Jh9/fIB1 5DXjRniRk/0eE406fVzjptd9xeSw54vZYFvsMJreGUWvBamz6eTaGkDnggI6eA4yWAf8 OUiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333552; x=1742938352; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fRqDXJHX2zGNybTG6x2KjIY6H1Iy34YPBBK1EJX6qfI=; b=Vwog0dbyPQsNpDxngQ7ePS1OIOCA2K2BSos795Ha7wznZD7cP/gscwmP2DQP1/+reQ U8aNL5NTaCucu7dEl3nPMKbShAwpqbB92VC/O+uEMVMFUbcL4e5+dAXvBGuVj+tO/hzK 2g/Ww9vQGQmyAc3uMR8xay0JHA7JE2KjzckGJV1xpUcOGv6fx/7Tsq3MLozYx6/bDqvh 9goUKTSehxaReuZ10tB2ixMdbFN3UU1c5Sedmjm5xUdvd3I5MBF3Ys1ANj97i5DYxrka baL1OSSt3I7TTJ7RMtkbdBhYVnKig0DFktc1BPRb5cvkWqq3/EQz8SR+NP8A8bXu93BK t7rw== X-Gm-Message-State: AOJu0YylMIW4eD3+cbaUv+S/qPR2S/hhioerb5HvH6zGKnogbR7VhYuE j4zeGjahWbcKoCKpctimSc5EHpxfdX0QeZJn5rce7CEvKggudHbFnvDJV2sZvo/UdimlDByHaVY A X-Gm-Gg: ASbGncsFpZzypYhNS9ey4vlM+8ZPiOD+rgdBeR6CiJ5xUUdrioTXIkmjE2k8nKD/Rd/ i/+jxeBlMpeIxQG8xS/+t28Wps0hh/13H2S/envFBFAMCKA1Gfwi8pY0iNwMbYPN5LV29BtvpDs JR0Hhrfg42fS9EvwQzc/wpjXIsLSE6qrxRREokShJ2oX7V8bvHVj5YKkIE7KzftHQWD9nUoYTx7 UVXSmZKrIBGwkDKgbanDm8nIjSOnkK/iWFfj0UUdnwQDvH0KLhByvV3BnwlqrwIwPA1iB7Sp/bl JmWGlJKyzlfon0PYG2UeNZO52iV/eqBA2pp73pGxT6uvf8YcKfvBRGmbX/GEUWLbkKyjPJsEz3z 5eRmyETNdfLs= X-Received: by 2002:a05:6a20:c908:b0:1f5:8a1d:38fd with SMTP id adf61e73a8af0-1fbeb3911c3mr366794637.2.1742333551789; Tue, 18 Mar 2025 14:32:31 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:31 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 30/42] hw/core: Move unconditional files to libsystem_ss, libuser_ss Date: Tue, 18 Mar 2025 14:31:55 -0700 Message-ID: <20250318213209.2579218-31-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x633.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Many of the headers used by these require CONFIG_USER_ONLY. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- hw/core/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/meson.build b/hw/core/meson.build index b5a545a0ed..547de6527c 100644 --- a/hw/core/meson.build +++ b/hw/core/meson.build @@ -26,7 +26,7 @@ system_ss.add(when: 'CONFIG_XILINX_AXI', if_true: files('stream.c')) system_ss.add(when: 'CONFIG_PLATFORM_BUS', if_true: files('sysbus-fdt.c')) system_ss.add(when: 'CONFIG_EIF', if_true: [files('eif.c'), zlib, libcbor, gnutls]) -system_ss.add(files( +libsystem_ss.add(files( 'cpu-system.c', 'fw-path-provider.c', 'gpio.c', @@ -46,7 +46,7 @@ system_ss.add(files( 'vm-change-state-handler.c', 'clock-vmstate.c', )) -user_ss.add(files( +libuser_ss.add(files( 'cpu-user.c', 'qdev-user.c', )) From patchwork Tue Mar 18 21:31:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874451 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp77761wru; Tue, 18 Mar 2025 14:39:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXKIFJ3w1702jGB2h3MLh3tf+16nso37BXIkoPnn+ojZYe3b0Zq4Yn07odHhGiQ4/0v70gI3Q==@linaro.org X-Google-Smtp-Source: AGHT+IE1FZwv5jUSRNzQw1U/xcL8/1ewS2p5W+lzNWX7/bqr9CHxFEN9pCkrPFNGPVmnN6lwrJjs X-Received: by 2002:a05:620a:d8b:b0:7c5:5f19:c64f with SMTP id af79cd13be357-7c5a8283075mr40281185a.4.1742333972014; Tue, 18 Mar 2025 14:39:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333972; cv=none; d=google.com; s=arc-20240605; b=Ix9+Qiuqqndr5SgK7TflzSXvj2IgaGHUdnP+ZCcs4mq1LsRykJL3Pylz+qEONWgN6q qd0EXoYshlqB3ra8AhqJ0UJc26YQmAdMdrjpuKx1bsp7flxYBNGTHe65pX/J6V+rhzBE v9GxTtQ3Ip5pzKf1SXeBajBKjkkVuEpPvGx0KP2oPWFgB4hhSxHFJz0oxpvqCkRDVr2d ghQJ6qsBVJYN+KiQ2g8zplMs8W+HBgWoxwJMJSuTpAFPziE8QbdigvzJ2Bx873DcaGUl Woz2rr7rHKXrZsMEkzM40w9KNaRNB8PCoXNRt+mwO89r17+d2VcX47SBApI02QGQOzxT 4byw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IARoCxxf8hO27tnX4lGMuLobcNn2YYTJzhiqo5c0EnQ=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=RvKqkr0Hfe3falVWPgx91vTXkp6D2uvolERACBd8vpt3msMuhD8qtK/2ZWJHC+/nWY VFgr42QLuGzZ9eOYRJnziPxqDS3e0gt9OSUN1Foa3PvsgjRKunvcD5g9sEd+Wmmp8XNA pVHGR1iilQxtzpdsDP4BI4Qh02aJUsSQlRxtLQjRhM6IC0A/U0aKw4+CSar4/3iMe6LT rv3apEHhH0ztYKO/lUSP6T80CnZrrPzbUZJ9bXRjOMhw1fO/1fTZXFj8GfrY9X96ua3b bu/Oo8R6q1srE+CmiU5tquTqSyfU9c2EDF2QIGx7I3i0ZrLGyNXGecmpx1UupL3uSrL+ qLpw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nAzURhds; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573b75466si1348974985a.54.2025.03.18.14.39.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:39:32 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nAzURhds; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZe-0003iW-DU; Tue, 18 Mar 2025 17:34:10 -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 1tueY7-0001Lj-Ex for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:36 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueY5-0000q5-Qm for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:35 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-22401f4d35aso116912635ad.2 for ; Tue, 18 Mar 2025 14:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333552; x=1742938352; 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=IARoCxxf8hO27tnX4lGMuLobcNn2YYTJzhiqo5c0EnQ=; b=nAzURhds7mgVQTwll8G4QPr+2jOZvAx8W675Q5UWiM3ItnsrLCoKoBi7LLxgRWRaum eYTGld97gFMom24KNACfZTuvupJIlmYRSWy3kxuKD1e2Xc8jXnmJvj+V4Xd22eerYPJm ECI2Ey9/cMGJ30oUy5HQ82rdxX95muY792Vmp1tdo/vpZX4lsKfUy3IxzTRiB99Uwa7d ojP8V1SaWqLeun01Is00u/BiE9fIDGKhRCa3LjJ9PgMgTXIeE7/eycA47cM/UZkstJ4f T9LZfaamunlMsCnsKaKvPVPdX+sgib5Cvze40tFoyfIR57HNKuNQlYfHKnHuLTlxrrZ9 h3Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333552; x=1742938352; 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=IARoCxxf8hO27tnX4lGMuLobcNn2YYTJzhiqo5c0EnQ=; b=KwdEqltTsIBwRi14D4h6ENMgoZECQohxQyCZyDpmSmghq8IvXS47x3+rcuK3RORnWi zFPxSALhDF1eUHCH1iZxme2lb7P1/JTGWeAfHQu22wOaFEZUTTkaJoeo9uwHuIuha/l2 2lMe7VviKh9Ia9/0gApkSwLe42SNMwrAmJQh5/JdTkdEzcgYaFRlvI5JM1RNCm3AU5Hf k6kdr1s9S2uVYARppjOfLmG88pNAu2d5zUFnmRQYnqHPwjBBYW5PY7BvGm0qJ/G0QAS0 X7PPo0IMnzWrvd8iCK5CEDdf+yh5hR6yoIIBM1Rip0HZAfWEp4Dc73Q9qIsaEyWkE+th Vt5A== X-Gm-Message-State: AOJu0YyrjfRWQFtMh2OqRQyMBO9IU93VB//pwQgWscRav+rMEJLhRNL9 UzRWZUT9Atej5npg7kJiM7RHLXApxmKfnnVjgpKo/ujidS8gvm6ZGi2aBypn+mPOISdjSRDc02C N X-Gm-Gg: ASbGncuwtx/vme4fmHLT93L6jZltCMEr1zl2PIrX5KnGq0lv7TF4t1f5LMWjISnICh+ ZxdMIGg2y624Ihbw32rTq5fNt2GwzteMhgKYdIsNKqBNXF3RA+EfRiFXpQF43+sLLtOVfDfd/+T jVLSGfBtJveNeL0nQAG8RpuBqEfvHmcAk29JSCM6hfJVAAF642Y3Xpf3B7C2RZhicofusuHBUdR HLDtncS7bGjKcOX11mTNq1X1h2ltgrim7VQbBj88oFGvw+eaxAoY51o+Qxj16BOqNW2odPnQh1T tZsPNvauzaapT1D+/xiwOH+3VfWcORMnCPVRWYWi/OAQGBOwwY3FYX+QoFf16CFy5AbdBk0G1Q4 u X-Received: by 2002:a05:6a21:6f09:b0:1f5:8754:324d with SMTP id adf61e73a8af0-1fbeae91123mr346443637.9.1742333552450; Tue, 18 Mar 2025 14:32:32 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 31/42] system: Move most files to libsystem_ss Date: Tue, 18 Mar 2025 14:31:56 -0700 Message-ID: <20250318213209.2579218-32-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Some of the headers used require CONFIG_USER_ONLY. Do not move vl.c, because it has other include dependencies that are present in system_ss. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé --- system/meson.build | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/meson.build b/system/meson.build index 063301c3ad..c2f0082766 100644 --- a/system/meson.build +++ b/system/meson.build @@ -4,6 +4,10 @@ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( )]) system_ss.add(files( + 'vl.c', +), sdl, libpmem, libdaxctl) + +libsystem_ss.add(files( 'balloon.c', 'bootdevice.c', 'cpus.c', @@ -23,9 +27,8 @@ system_ss.add(files( 'runstate-hmp-cmds.c', 'runstate.c', 'tpm-hmp-cmds.c', - 'vl.c', 'watchpoint.c', -), sdl, libpmem, libdaxctl) +)) if have_tpm system_ss.add(files('tpm.c')) From patchwork Tue Mar 18 21:31:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874445 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp77125wru; Tue, 18 Mar 2025 14:37:41 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXkrmyWr3mVNZsnCN/J5+QWxyiPtP4WS/pJwyhJvrlK2vWQAsymrFf3fkmgGQhvZ93gmRzlgA==@linaro.org X-Google-Smtp-Source: AGHT+IHRgGVhRO/4EwTkFbcw/ZECMxOQXMwkuZyYjMoiBzrhWuG1ywFLpA6f1GbVZMnRojoSDR6l X-Received: by 2002:a0c:f204:0:b0:6e4:5a38:dd0f with SMTP id 6a1803df08f44-6eb1bba40b0mr74308816d6.4.1742333861653; Tue, 18 Mar 2025 14:37:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333861; cv=none; d=google.com; s=arc-20240605; b=Nxa7aGHpdkZFSW2u4EPnVGq6WIvK8frlTEAh1B3oJOFFtHY9DGVRdZI0Alennx+c6O 966hT1xhgzYrzDMWhC32aJtsQjnrn4NuEi+UszUBOPxmScT7puaKzaQDf9mz5fNJX6Cu GN0jk87XvM8A3zIxXoF5ir+g5teLfYnwI9IMbLAn4hbs/BN65ZzCfH15KEVFQraWUcws q1YpE0NKU7SwqmAPANtsDsPYl/kZHt7/JkmjiMW3HuOZ0n0DsTDtmPB2CrwSZoFmabNV 8qoeVLKUwxrobW6dYJStTY9iOvZx+FtM2IDYpL8+rh8/YlfpkNZ+/nTSxSuR1Jf7SUGU kOUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VhN0H72crR7ocnAMdx8d6CUFaK0puwv/7eMWfuXv8/4=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=DKuRF+cL5nUesdl2pYpmi7mqUrmTiRBAcj6rtFL6rrYlkdBcnzfW0ANFIzfiRCgcg5 am5hfMqKifKwpBkaz0E6TXBuaC4pCyTGQnedxge+iNgleWkpKJwfVzzWYIFn/BvLetin q4PgWdVw81ucGAhxoMpRIw+il49lBWFEsKtncKoF8fdAr/rZ9rz1cd4EscPia7bE/MBl NaJswx5DVT/NDbtoV/LwtcWYhzEmfQnj+2VQksgbx1ehokV3gkN2QyDI2Qfmvop2Cr7D GJ20EzIZbf7gywK909nows2wobQZtlMr43Z3/6Bjd9biEsJzwImFhtyWl9e1MADMpVbb rm5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xjWR3DXO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6eade386c15si125680636d6.492.2025.03.18.14.37.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:37:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xjWR3DXO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZD-0002JL-G9; Tue, 18 Mar 2025 17:33:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY7-0001Lm-Tl for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:36 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueY6-0000qE-7F for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:35 -0400 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-225d66a4839so1014385ad.1 for ; Tue, 18 Mar 2025 14:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333553; x=1742938353; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VhN0H72crR7ocnAMdx8d6CUFaK0puwv/7eMWfuXv8/4=; b=xjWR3DXOscRn9v9DDL4iZioHT2HlQYjcO16CkTV4riLuWjFdidqsbBvN5Af8+c/1oB sjO7iNLqHuNaaJ9RHhe3M7hjmYdxKheU2sDLO/DQi2h33UJAAoe92LEN1o7cINuJfDhp e+P4XHf2dqNsWIQ1cs6W8mcdFu+W6k74K9oRPnqZ62kv/32RrWi+LeCJ7HHQCBfc0n6d NO/EtgOFxKvrLT9fC+ViEvxq9gWNxYDRtyNZR9rLlq9YvvjXajl7zuGOhhnSZ35ahso2 kS5J5+kTUomuWBiRpD7IEeCKDRSGG58G3IM7HpdD+4EBssS1eXsegYhbEkON9Q0Pa9G8 lTng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333553; x=1742938353; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VhN0H72crR7ocnAMdx8d6CUFaK0puwv/7eMWfuXv8/4=; b=pwZ1wzWxe4G5KBZkDnHgRTWCFWiyIjwCo5JDNzCt4yjY7dMH2RsZS1ld9+yqn+aPBJ 9m4DcvZlHdQ0RV679XxT9uMdx/WE/rkmNJuJ82LvsiyzZKPNW21mooSBBSRbYv6oyZb8 4hsnmcQgPFD0Q4RKMzAPfBUHCb42PIqfWrMM0SEh9cKXX9zR0T34WKu3E3snQ+1fBUm8 OzIjH4tfllaYyBZiY4aTuBe3wVDMlUz5fSSLXYFiQgu65dfy/oPKZ6JjYW5cFZta/LWM jRIarommAg+dMc72alq0JaI/pR5bApvGvlxUO2rI7uHAl/xizztEVFar76IN3ol0jhE/ 4cOg== X-Gm-Message-State: AOJu0Yw4/eTrQQ845HRhPB5sbus71HOoLGqkOdP5y5SdS2wZnkyWq24R g5rLDKCk30+QhiSpQ1BEsTtoW+XqjiQY51agJnFVBvgLqB7ryVeI+2xfeqdqQpSIPFdXXdHLLf8 E X-Gm-Gg: ASbGnct3IU/I32BUVc1qQLuIkcaQskYuib6KK/gqh3OAWtXmjP4Gt5bZswXGkxnJt/5 9kLUmJM+yK2qZTEXaILSpOUVJeLbYR3rNOS3ZWqrPDfUpCD5axQnHcu5OIjYLtp4cehdQcqupNl /PXpTR1bDZ0EUL5SuwH5TYpwkbhZ2b2B6ZGSq1a7xvS5B4pBzNymwWnK95ZNyMVtvCp3FsugRM/ fRXSVzgYn4KK14aAjVwVdVcWuxc31qbvkyzkEoumP6oZYr1aInUNDUR2OD0K66PX4Fp9onCc4f0 xv0qBTuSuu9M7Z/QZ0vlqEqOD5T/An5HU/MrlomOh33iHP+Q1o5D8si2V875P7gN6cNbNbawU+Q i X-Received: by 2002:a05:6a21:104:b0:1f3:2ae4:82df with SMTP id adf61e73a8af0-1fbe26121f3mr451758637.21.1742333553031; Tue, 18 Mar 2025 14:32:33 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:32 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 32/42] plugins: Move api.c, core.c to libuser_ss, libsystem_ss Date: Tue, 18 Mar 2025 14:31:57 -0700 Message-ID: <20250318213209.2579218-33-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Headers used by these files require CONFIG_USER_ONLY. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- plugins/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/meson.build b/plugins/meson.build index 3be8245a69..5383c7b88b 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -61,5 +61,8 @@ endif user_ss.add(files('user.c', 'api-user.c')) system_ss.add(files('system.c', 'api-system.c')) -common_ss.add(files('loader.c', 'api.c', 'core.c')) +libuser_ss.add(files('api.c', 'core.c')) +libsystem_ss.add(files('api.c', 'core.c')) + +common_ss.add(files('loader.c')) From patchwork Tue Mar 18 21:31:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874434 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76604wru; Tue, 18 Mar 2025 14:36:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUB4mHHwXk3jonK7Y2Jl0saxgUCOpEr3wKpH1AqZQnwWyGocO8n5avfNFeqxNQRmqgTw2aOGw==@linaro.org X-Google-Smtp-Source: AGHT+IH9x7U08m8u3TCMecigv2oJbxHfDwhwYNJWbEhFb5dVNed20WF/lZkj74l5xJoa88UrRrOi X-Received: by 2002:a05:620a:1a9e:b0:7c5:5596:8457 with SMTP id af79cd13be357-7c5a84a5050mr30175585a.57.1742333788196; Tue, 18 Mar 2025 14:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333788; cv=none; d=google.com; s=arc-20240605; b=FnqlE0qd37QhhRz8fClOb/USYz7sNsyoiIy8ihpSi4WtbMnYh/qJ1Rp1d+Ugo2GITv QX0CXxkmov1mCNjvYOR7WS3bmfzr88XH0g/yFaYPhhKGqRdQIokE1KRo4PyW6mE3/PDx qZvaNJg5BlOdvhzyKSkliKI4SAvoQBz2grckmYibz39+yjXVNi3AvK6W6biAXRZOJkuR lXSNHUH+D+5IPdOPYncmmEJZnZrlptMLeiAP4qnbuZFCEEOLyh0Nl9myg6gTxDti+ZcW YFdvJ9/rnz/tSGqIZbSxSBqrOT1wEeWY08NGUtjTK4xlYgYTcFMs6+gjS/1ivCxFCkDm w5Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=irulUe5yhLpB5KcHQZP5AkpEiKTl4QGB2IoJogi1FPE=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=MchtR+ukMj5XkanUI5X6bk61KJzKYQuJJGx9OgnzXcO/XdWOdf1JUbS3b9+SgzhwDy cy7qOR5Bz28lfs1N8wIffr6ssr1AWXtlWrCeQs/IMkgcnYfd5dXRrjfZTV5voQZqSoO1 H8YNC8yYuwSktEgvWNW+pZE5X0z/hT1eH9FaVqe+KWUVO2F3eBBuxFKVnRgNX2U2dbMm oEDrkaDS+dNnQHn93BOsZLasHbdihLPP4/fyBJ7ZMijy1JQ1qziDc/Oypkrh06+t/W8j K5V6oqt3HpT6JNeSuaag1Iz0PpTzmJJ5sTOEqOzDUQ7wzkCsbnWI82DIwhvYbRrK9BFh Q7Tw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O9C5MhjK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573cf1740si1368678785a.437.2025.03.18.14.36.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:36:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O9C5MhjK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZU-00037l-Ut; Tue, 18 Mar 2025 17:34:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY8-0001M9-RF for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:37 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueY7-0000qU-8M for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:36 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-226185948ffso53430975ad.0 for ; Tue, 18 Mar 2025 14:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333554; x=1742938354; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=irulUe5yhLpB5KcHQZP5AkpEiKTl4QGB2IoJogi1FPE=; b=O9C5MhjKpM08IMIyI5ap8kbMyvxG/1FVDnVF68zhznqTtGomdf9eMAQPRqMOciFk1y m2Jqfy6TgniM2WfElnI5rCkn9A0536X56RSGDCj9f2nsLbli+vfnhwpnt7KKN//Go8NZ SEhMZfBXMisZNh7kwH1P37rv/qewuC+iIEWk7BkH4hhpigtM1nbYtezuL9JnPYa3RbDl 93G+oqWxT00Z29W1/eFnEkC8a6wVGvZaEbU9UekqeN5+z4HS5tjL+AqS1nGmGJ10QsR3 XI/fUCnPRAnbnMK9tSTq4+FryxyMndcdGYluAWywh4wPIeup3DLKW0tzeOXnnbiRUnh4 gQvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333554; x=1742938354; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=irulUe5yhLpB5KcHQZP5AkpEiKTl4QGB2IoJogi1FPE=; b=Z5ozO9cuw3oN0jZydASpA+6me1fkdE0BjzRhdsa7UjtHYnIMHPyFiOrX0PmLGo5/3i oN2AgYu0HfujoTU07FlzZRj1VXCIZMWEnu1hWxoWJPIxKVI6Nh2cb9wleIXR4t8FB0JE CyRsb80v/j2oU/zC1R/uwqTexeRtb5v3bgBU/fid932Mytbi9ecBgD6NITGgi7cf3axz /oZejm7IZq+xep7JtaC4DQFbDXqVgWTUnyUtgYTj1WHSA8ng230WXlsVaeMcOF1erHHp 7rU4+Usb7zyPryxNo5QpC+lzRh9iMSyIH4WAjmMjSQgcCx4Ayfl7woF814Lw+JVN8xa1 DM4A== X-Gm-Message-State: AOJu0YzEuDeFgkTL+QiJaPcgNE5pYjiOQsfQAqjM2KHALqYmpKtoCL1S B5n0omQcrHC93bYnIR3QtjUuUaPUTxGLMzHRuiItcEEVCSsFCZffI271bmtpir3ImBBWsWYNMIr i X-Gm-Gg: ASbGncuglFkp3lUHEs0n3/SiKcKUoHoXxlOmUkitII9uqD8AZj/wX4/Dfnera0n/E5/ lmoQBfVPcwfDznaJvHNRVnl71TNe9JxscmZzWt6BjcI3sYMJ44wvLqO95VvE/dB/Iovi9J5X9Sk BMsXxB8FDJlhCgRkUM5O+ydNCqU5H0sE6L2LuZVZjTNMP874lYQliVoLKaS7E/VZqrNdrM2jhwj PzrK5DvcrcLTAHbRUO8oz+rhDxOZJ4cA/BFmPiSiILZDlk3i41H8fGj6KxfikoMB/8QYv3VRkBk u59dke7Qqjy+DM47TeLVbq1fJqyYNPZqfFaomgXplmOiVOdq0eMDHTftV6NXKn8qhDTkN7j5Q2Y A X-Received: by 2002:a05:6a21:7888:b0:1f3:418c:6281 with SMTP id adf61e73a8af0-1fbeae91352mr303047637.4.1742333553743; Tue, 18 Mar 2025 14:32:33 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:33 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 33/42] include/exec: Drop ifndef CONFIG_USER_ONLY from cpu-common.h Date: Tue, 18 Mar 2025 14:31:58 -0700 Message-ID: <20250318213209.2579218-34-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We were hiding a number of declarations from user-only, although it hurts nothing to allow them. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/exec/cpu-common.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index be032e1a49..9b83fd7ac8 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -9,9 +9,7 @@ #define CPU_COMMON_H #include "exec/vaddr.h" -#ifndef CONFIG_USER_ONLY #include "exec/hwaddr.h" -#endif #include "hw/core/cpu.h" #include "tcg/debug-assert.h" #include "exec/page-protection.h" @@ -40,8 +38,6 @@ int cpu_get_free_index(void); void tcg_iommu_init_notifier_list(CPUState *cpu); void tcg_iommu_free_notifier_list(CPUState *cpu); -#if !defined(CONFIG_USER_ONLY) - enum device_endian { DEVICE_NATIVE_ENDIAN, DEVICE_BIG_ENDIAN, @@ -176,8 +172,6 @@ int ram_block_discard_range(RAMBlock *rb, uint64_t start, size_t length); int ram_block_discard_guest_memfd_range(RAMBlock *rb, uint64_t start, size_t length); -#endif - /* Returns: 0 on success, -1 on error */ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, void *ptr, size_t len, bool is_write); From patchwork Tue Mar 18 21:31:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874416 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp75694wru; Tue, 18 Mar 2025 14:33:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW/N1Ki2OKpLGw0IMU3TuJ+ic5soBe0x4fNrvdETyIigWmJQFMFHNrjdPW/dovTB4teUjNXWA==@linaro.org X-Google-Smtp-Source: AGHT+IE3cKzaJl/Q6Cb70LPORVws13ayTOEy+KAieBsZDhdrtOtD9Dgg0yz80jjxMLe5E/Wcoqnj X-Received: by 2002:a05:622a:598f:b0:476:8cad:72e0 with SMTP id d75a77b69052e-47708376702mr7401171cf.15.1742333637713; Tue, 18 Mar 2025 14:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333637; cv=none; d=google.com; s=arc-20240605; b=bzOba+dXP0vR9hV7wpLu+gzQcGxy2SuFs9I+9Z8PMHet9fkWiwoTEK8EGwUXOgZxW2 bkr3oEXfP0sDCHB77p4CpGY1GjCl/WACSdttIYccNqgDpZM6mw8nRx5S8SYa0SpGgcGq ktTtD3wNNz4pwWEQmz1pgER53tlcCJTWx1+3dHS2wuZ0FCNkDNvhdoGdZE52qMrkF/0I gpcAbSXwkyQvLONhpvWnUm2aj+HB5lHoU0ncCca9KRINU7dY3om8muRiejf9cBrvEcW9 UrZh4EOvuF56xROupg68rJg7iOZfsy66AlXaDUgocTp8XouDNo/KOhR8VZJJyU5PLorV 76uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ty/7yi7XDMuhRymJcueNnjTkMJ6TF1/wh379eWbHVlc=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=K23mCfWMK92LPxGcklsIDWUOlWXMaAinpbeEBa+estKZ1fMqCWShTJjSisaJZ6DFRz 2XJg1TLCD0Pw7908A0Yy1rCYf+oqNie02rj9nxOr/GuW2E+hoPUT6tZ7Fs8E5t/sSnGJ HOtkNE+v2RuMJubzxtaJkhzcmbtzi/QQ5qWu+G9/WsFATSuzjbZhCd4QrRhTPAWUdwLJ +wmlbxRFszdb9cQZhHY44Pglj0tunzRC4W/IeaoFTss4IPicwFPuNcBr2NbGheCQX3ad iUhpunNzJAWwvuaPbvFf9Ch+f2vS/E3nBaiF7h0MWaEPO5HtsLa9uxHspEe/IbTRVo3K GQsg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j7S0ZtDY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb856924si127154701cf.481.2025.03.18.14.33.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:33:57 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j7S0ZtDY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZL-0002fh-Ll; Tue, 18 Mar 2025 17:33: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 1tueY9-0001ME-Bi for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:38 -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 1tueY7-0000qg-Jz for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:37 -0400 Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-225b5448519so118460635ad.0 for ; Tue, 18 Mar 2025 14:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333554; x=1742938354; 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=ty/7yi7XDMuhRymJcueNnjTkMJ6TF1/wh379eWbHVlc=; b=j7S0ZtDYcxeAFgtUtx38K6142eQn0NQR2ZWl5PNIlkpUL3r2XULD3aaD1uvHHy+0AZ 0ZFRvRe25kty4EusmG3/Jar5vqPVJm8YDB4d0dtrd+nSTUQ9bBpSgyPPMI350IjP6Mot Cg2cWgignWL290gqu1FppH6wLUfmHhTlg1kcUSbQmZfEXlOkrK3wFQ+GWD5aayoGALky Wj/2dt1Zmu+LuNtgXEM5RHummtOO0D/BADBbkxGR0pZafBuLk8wMbU8kfvutR0Ktdogu 2307sEpV/61bguqBg4+u1DJCPkxUQvqbRKUKxaTRA3rdfW1GzX/wqjxi8frePBDbFxFk JonA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333554; x=1742938354; 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=ty/7yi7XDMuhRymJcueNnjTkMJ6TF1/wh379eWbHVlc=; b=cZV6dA5kKALZGlRW7OS/gPyLOW/V8VmxujWyF4vFb4hK1OEk5c3ukic56SNILuG+BQ Ya/lA75fbkwMj8omcxUfeh5wtVLlspJUmUBvFCfUpW5c7EmkI86UsjA0/CqHYMeaB3sY 3uQFxi53BoG1OnDRbmPHMOrj1jkqMCO4YN1fG6EXwZpWrvmg8VFRIM79q1HDSmW04LYC YDdr2AEXZ3KTrWtFOUKuXvu1S8tIVdHiKztMbzdyo8eQ8wl0145oeNLXLzP2Gdw3csAA PDf1KilJq0cm4KsWNombDzciFVhdgvszS/BMIAyhYLDCtnIsxwdNiaE0BOemlRzCCF07 lmEQ== X-Gm-Message-State: AOJu0YyGWaooDqdj2O8h+iAkbaFE5JJObZsrMuZ5C8O3wtLK/ML2l7RV y+GAtXe199C/BnQwnXMwpfQ79yTGT8DGWPQyp8cZ3oDiIUMJbem55r5cSNjwgWvC8+qFSn2hFf1 s X-Gm-Gg: ASbGncuvO+eV+WPxjkgRIBjUfmb+CA+FxmYUsb6Zh9Gpyh3N8XJMxHmFEPxwmp+Hqjn vA9oPQsg+UCwRz93twcJTDEJWcZJTWDOU2x9mrTUfk1auC2tHeBK47kiH8+ts4oIiu9k0H56XSs uqFRjR+WHrK8AFJiZ5HpJLltKcOocgltp+pdaGiodtuox3DkVVM5xx0kYVuHfNGOkkD6rOz2Eaf heNGQEr5RuAqaTB4hhZvRcRb53usx/L3iwNsUEpOlOlwyx3OHzq41kaDia0mBeeWJm6mL/8I+at qcNodzsMzLK9LSkXeXpzugi9kQnYR6Zw/sT+vJRsGMYKrzbEVEpQIcrQUdwVWOT4Irb59H0wIR5 ILteBC2WLb0w= X-Received: by 2002:a17:90b:3e88:b0:2ff:4f04:4266 with SMTP id 98e67ed59e1d1-301be201d87mr240404a91.23.1742333554351; Tue, 18 Mar 2025 14:32:34 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 34/42] include/hw/core: Drop ifndef CONFIG_USER_ONLY from cpu.h Date: Tue, 18 Mar 2025 14:31:59 -0700 Message-ID: <20250318213209.2579218-35-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We were hiding a number of declarations from user-only, although it hurts nothing to allow them. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index d1c1fefea3..1c63266f07 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -614,8 +614,6 @@ extern bool mttcg_enabled; */ bool cpu_paging_enabled(const CPUState *cpu); -#if !defined(CONFIG_USER_ONLY) - /** * cpu_get_memory_mapping: * @cpu: The CPU whose memory mappings are to be obtained. @@ -676,8 +674,6 @@ int cpu_write_elf32_qemunote(WriteCoreDumpFunction f, CPUState *cpu, */ GuestPanicInformation *cpu_get_crash_info(CPUState *cpu); -#endif /* !CONFIG_USER_ONLY */ - /** * CPUDumpFlags: * @CPU_DUMP_CODE: @@ -701,7 +697,6 @@ enum CPUDumpFlags { */ void cpu_dump_state(CPUState *cpu, FILE *f, int flags); -#ifndef CONFIG_USER_ONLY /** * cpu_get_phys_page_attrs_debug: * @cpu: The CPU to obtain the physical page address for. @@ -758,8 +753,6 @@ bool cpu_virtio_is_big_endian(CPUState *cpu); */ bool cpu_has_work(CPUState *cpu); -#endif /* CONFIG_USER_ONLY */ - /** * cpu_list_add: * @cpu: The CPU to be added to the list of CPUs. @@ -1136,8 +1129,6 @@ const char *target_name(void); #ifdef COMPILING_PER_TARGET -#ifndef CONFIG_USER_ONLY - extern const VMStateDescription vmstate_cpu_common; #define VMSTATE_CPU() { \ @@ -1147,7 +1138,6 @@ extern const VMStateDescription vmstate_cpu_common; .flags = VMS_STRUCT, \ .offset = 0, \ } -#endif /* !CONFIG_USER_ONLY */ #endif /* COMPILING_PER_TARGET */ From patchwork Tue Mar 18 21:32:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874433 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76553wru; Tue, 18 Mar 2025 14:36:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX2Bxi1Kp0bssNqJEVHbytrQOasO/0VXKGS9svkezXHJiRMuTE4gl4T/EdEWQjuUWHeFjF/NQ==@linaro.org X-Google-Smtp-Source: AGHT+IE6Ft9aeB6FZg9X56i/yJ5GWSijjbLV8X17Q8XmvYQnZpBPofp6imgOP8g23OhueWMaMMmu X-Received: by 2002:a05:622a:53c8:b0:476:6e2e:58b with SMTP id d75a77b69052e-477083e7ac6mr9120261cf.49.1742333778677; Tue, 18 Mar 2025 14:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333778; cv=none; d=google.com; s=arc-20240605; b=iRlRmvbuGIrdktT+AQhPd+tf5Y68MNvuN3rUJN8d+/6N5s9CWmJ1e5RWpXHJAEXWsC Shen6S+gFMuRW71KmJplRz864pNXlD+KVitswZwYpAwO7QSiRLqWzRbbsJ38na3tnsdl eP/V7CMIyiKO2De/qUdwkBnH5FW5552VDjgLBo9wk/FwQJegGv3SmH1ZL1EBlziw/k91 CCPMSnZtfv1lxGGdv4gD/g7oLSd1GAPHGg6ujpGshMNuSMB/gSVjt39pjGeRre8x2HmW WHyG/49LZ7nYEeBaQw3oRVlFXgD2X4tY7JTwyzFh+T4UH5wTMylq3+fFRj6I4iW4/bWe OdSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IeHYr04W0m2zNJjTvbQgJtgjfEjOKbLo8D+48jtu/vU=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=i5zXbLjqObPhYLo+h5lb5KiiIj3S881nfxt+Wa6ewQbA9W+YOz5a1Ll9hthaJMgtvz MvAuO0mPT9KqAl88lQ2EPT20V4xh2ep555knhTU03CKdo9AUiYKZKvxg8+rf+a4AZo9y XFWQyllF8Y29zvJQ8EnlP6YKPOPNEp1DzWb+vibVoY765Ky6rqgrn6xDzx0XYAvTLzKR g0oRhsVSJb89cTTQBhZoysFDpxcMVeTurOrT9gkmqtlOuxTDB1u8E1PRZ0XW63z9YEbE lJNzWsahaYs6qd9Z2xjzC4sF4tHxyu0NcKaJYPvUOxidjkRjvr4WwxFXxADlACqMq3Vh pN4g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Thjj7smf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb7e1a22si130923151cf.257.2025.03.18.14.36.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:36:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Thjj7smf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZS-00030F-SV; Tue, 18 Mar 2025 17:34:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueY9-0001MP-SH for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:38 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueY8-0000qx-AR for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:37 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-2241053582dso22093805ad.1 for ; Tue, 18 Mar 2025 14:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333555; x=1742938355; 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=IeHYr04W0m2zNJjTvbQgJtgjfEjOKbLo8D+48jtu/vU=; b=Thjj7smfIybFRLhDcJUVzvjGF1VhHJyNtuT1AjeilrFEYw4dZceuQt2uycqo7S455A 1vGIX+g4a4uqsUVCxoowzPrXGwT+Y0wC5wBsAoDKthVcJZUjF4js+HjnAJWtaBapoFTj gOAPzwgwnJC26tsKyn3pRuPrH6Zg4q9mtBSbKKhhf/VCFDxrYiP8pkhEjBF0mVK31UQu cqMvxfiRwt1ff+JFDJUdE3kaA6Ztz4M6zDh0byGWzmlnVRkTwT7VS5Kld484XWWrKx2p 61GHew1FbTDmo+axMvFaxbEv12/2QvSJmX5GnR4MDWwo4qegzg1SCdgTBPRUML2dnYZN O9tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333555; x=1742938355; 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=IeHYr04W0m2zNJjTvbQgJtgjfEjOKbLo8D+48jtu/vU=; b=fKNTcC0BSoILifVZ33t/rmj/+8EYGB7zR1bnO1Bs9MwEYUIMcp10Go2rX7rrYeC3/a /pO5m4XYAolgxvWoytrGq1MDLA6ddWND9IhR8WqrdevWKCs3kindakv0++atU3mT+d/8 cj0hNY+1iBXDwb5W82OQ1s9Mxl2W2o25Jny0JLKkFXTD9Mh3TYiw3TQ1jTtIRbYXAlVU c5dTmm14haoXfbWVrRDQFQaOe0NzF+YA6xnwgE1t3MTBdwt75rm+7Aiv7lc4pDwgFnyH 6QhBsgb5jCPwE0ep+etkDdzJukL3wvFGBb53khL6GUfuU2B4h+XXWaSJnvOnibhtwpuu 3uGw== X-Gm-Message-State: AOJu0Yx5LJIuBk9l7XlTDYX/g0tHVRjs1TPWROIIk9uSYQch4gX6JH/R btGoDpNvUVZchApMTWGNW1pkfjwCnRHSdv+So6c+MncSJICiFKm9uDEDHT2PBk5qdI86OZ74HEl 0 X-Gm-Gg: ASbGncs+tBbuTPZXY3jlTQD2ZlzjB37LuAvDRPMXMmDWCWZxQbgYiozx+KcmMmVIgOT Z6H5z1j454Zm6URwwjRFuQ8WPy7GnJx1ZOf+CFAu80ftTRyViP9wAaubJ9NV45kLrwBsK+cQvHD l4GlUw+Be1H+72Xafh79cGVVRz/9F9hfK3IfbYpXzLgmw5OXhSiatyNShiFUAFZG74TIyCaZJur XTQeUUMtwRekzhsRPhwz7U1I9Vy1zxvxAR9tviaeELFNKxUc7qs8e5Wq0s+wDOlARnHYQR7PxYP VWsV+LWZd4sO8O7RL/URsHv38CXs7X/qLKyuTpetZ8sS4J/s0DhD28mZBjdrphffmTV01i4RwQU W X-Received: by 2002:a05:6a20:9c89:b0:1f5:8e54:9f10 with SMTP id adf61e73a8af0-1fbecd48b02mr364618637.34.1742333555077; Tue, 18 Mar 2025 14:32:35 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 35/42] include/hw/intc: Remove ifndef CONFIG_USER_ONLY from armv7m_nvic.h Date: Tue, 18 Mar 2025 14:32:00 -0700 Message-ID: <20250318213209.2579218-36-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We were hiding a number of declarations from user-only, although it hurts nothing to allow them. The inlines for user-only are unused. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- include/hw/intc/armv7m_nvic.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/include/hw/intc/armv7m_nvic.h b/include/hw/intc/armv7m_nvic.h index 89fe8aedaa..7b9964fe7e 100644 --- a/include/hw/intc/armv7m_nvic.h +++ b/include/hw/intc/armv7m_nvic.h @@ -189,21 +189,7 @@ int armv7m_nvic_raw_execution_priority(NVICState *s); * @secure: the security state to test * This corresponds to the pseudocode IsReqExecPriNeg(). */ -#ifndef CONFIG_USER_ONLY bool armv7m_nvic_neg_prio_requested(NVICState *s, bool secure); -#else -static inline bool armv7m_nvic_neg_prio_requested(NVICState *s, bool secure) -{ - return false; -} -#endif -#ifndef CONFIG_USER_ONLY bool armv7m_nvic_can_take_pending_exception(NVICState *s); -#else -static inline bool armv7m_nvic_can_take_pending_exception(NVICState *s) -{ - return true; -} -#endif #endif From patchwork Tue Mar 18 21:32:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874443 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76974wru; Tue, 18 Mar 2025 14:37:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXtaoNzCz4EMfStduc25Xn+70wA3AMkYUHgnvaj6iCb2lIevsJvsXgw3R+5FX0/9NVYLdg/1A==@linaro.org X-Google-Smtp-Source: AGHT+IEYZpP8qd5VUb/ea89cWnNy34pzSCdn+iCuPqBSpThw8E7Vvhhf9bPOrUbtzkkAo6TwTMQm X-Received: by 2002:a05:620a:2414:b0:7c5:4893:faaf with SMTP id af79cd13be357-7c5a8460e35mr29871285a.45.1742333838865; Tue, 18 Mar 2025 14:37:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333838; cv=none; d=google.com; s=arc-20240605; b=RTcVurZu5exKrju/LFMkoGqbHjmp3CGo+pejB8w3Au5AI0CAppW2czYSaCCwfixHUs aZbIjF032QcdkkBn/TXp7OQ5GoTvmCZTyfTDJl/5oGADhjsnEa5orF5iwhnYr1z8XJbv PVpc9OsF6A+4rEWnMRx2um5VpQGVpX+JbsmhskBpky1DPYuI2FdQ+yxsVuCQSSAoOwgQ Qu64ULwE7873JRhGix930mV4K12cxtAF4XW9mvsysLFcj9fr3glm8LDchGPWK3sNHPl1 Zn9z7f7yzt7jWQPi3XuIs8qLwVu1P0bSxM3uTEQ0K6d2HCsmE70E+gPwgcr6rcD/beKm Xk3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BoCYXpmxTadp3XapZ6TJFD3hsb+jhxzWsNPz+aVP0mI=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=EVtLfxIavkWk1PNSGMuW9R+i3/7MwPVy4qDZ2FhJwwLYHW6bqOfLzWXZOfBtQldeBn j6Ao17oUrzqpaZtKkbpfvwxnfNGjYHKfoDU7s/s7fjBpBefb7wAv2CihTIfYmFWTXgYq JtyEkdm1xcqD5Gs0kaa568UwusGPfnXkPNUR9kvCZSMI89CocCix4kH4Tky5T2UAmq4w ZJbffDsteUSkO+GiJel5CgpHb3JnPmOu7aBEH1c+YsxzOVATiqNmnq9rqMS0LJEQ63jD syJjI8Al+808uUf0Ht/yqklXAFIv/GKto/bheZLA/gTsnkrRqJZgATRMS7vMJq2sZwhP a6qg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n2ypuDcQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573d33bd6si1249670785a.620.2025.03.18.14.37.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:37:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n2ypuDcQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZi-00043K-CV; Tue, 18 Mar 2025 17:34:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueYA-0001NI-Iv for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:39 -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 1tueY9-0000r8-3K for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:38 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-223fb0f619dso104391975ad.1 for ; Tue, 18 Mar 2025 14:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333556; x=1742938356; 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=BoCYXpmxTadp3XapZ6TJFD3hsb+jhxzWsNPz+aVP0mI=; b=n2ypuDcQ/YTKF8rBzdJBaRpigsUjrWvu9wtDRfZMRF7DYvW8ErzJ656qKBWI9rvsd+ u/86nihvF5p54YZYOvbM6p9xECg3Ls2h5hA4JgsGJLHBI+8RJ/7+myiOxtoShDUbx7s2 0p/phlOKxh1yQa3Rpe+j7X+EGwXlMPy64O0J34t8QOXB3uBbVL0B88TgQHY47AcadnaG 3lYH6mfYf+s+l0LLOzZYWqpD1wE60BPb1OqkJ+RkOOmFOHSTE2fyZfB04z13b0m51Y0g QQhglOg4A6tOuFHSNYKf5NfJdceLesz/RnGst7q2xxsjNUw6WrVatYy9oSmd8MXkAioZ PXCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333556; x=1742938356; 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=BoCYXpmxTadp3XapZ6TJFD3hsb+jhxzWsNPz+aVP0mI=; b=rIIuSXKQhZAvlIE2hruhm3NoINEayW83aaMKX+pc9LLG0cCRza9T+xn9WyxvwJY4LP 1JnFhCjlu254B4UYkbxZfj9mIWrTJH8b0x9rp+wxB3QmdbKv3XtQFDDw3y8erwrNpMQp 0k0ISZA6SALwpFymkNu7tzOkqAH6KW4LH9cPYMcE17pXS+a61mUK0qcMCO/A2dSzhQ/Q 18Pn3bA2kI+uauoNgiYu8u30fFE1shaL4Z8wuHlDa6RkNWJkaEDJS+hZNKcWIl4TZMGA /ZLZ655wea6UeSkj4q7VTcSyIivnoQoDDbu9RuvoxUl9kteYX9f7E5kFwcFXFncOhG3x BCfw== X-Gm-Message-State: AOJu0YwR2mex6JkL6LncI7+mYTwwefbndsPshxHNSoeK1YEHL7W4ahQ+ FQe+QQZfCiF4FZcqLDS0rrwufDixiguXd0VfdoKSdhUh9a1ctRXoNVJBYnMnMt96grLq7tUJrda J X-Gm-Gg: ASbGnct/IcaaHviV9/qJ3/1e3pcuaHMck3PG8GzKiejbhVjb8KcO8UKSiW2GsBB1QLd UVb6TvVj0sZn+R9RETsMNldQCCzexD2Yw8LtN3yqZTINYfibjCy+rSB7q6QgltTPmIkc3EsmaiS RcOQ202nuv8NWaXPhlKTNuLRSLytakEI3Soa7b4SfF5F9ujpzieC1a1zNb3TdztKT5XY86BQs7U vAV7Nwyk3QyxAcFil3PMNo3h4mRxrbfbVEkFMB9lZqn2xHLriY6HqA/HFlWKk//i4qbtz4Pd1mf YmMIbkP/i4Os13LSPwSO0UhnivX+h3Q14upbZlBXoLnkUdy1M/M8Z1u/ikZ83nkhELgwN6qN43J +f3dCB4wcdNc= X-Received: by 2002:a17:90b:3cd0:b0:2fe:8217:2da6 with SMTP id 98e67ed59e1d1-301be1e72f6mr261005a91.22.1742333555786; Tue, 18 Mar 2025 14:32:35 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 36/42] include/hw/s390x: Remove ifndef CONFIG_USER_ONLY in css.h Date: Tue, 18 Mar 2025 14:32:01 -0700 Message-ID: <20250318213209.2579218-37-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org We were hiding a number of declarations from user-only, although it hurts nothing to allow them. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/hw/s390x/css.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h index cd97e2b707..965545ce73 100644 --- a/include/hw/s390x/css.h +++ b/include/hw/s390x/css.h @@ -238,7 +238,6 @@ uint32_t css_get_adapter_id(CssIoAdapterType type, uint8_t isc); void css_register_io_adapters(CssIoAdapterType type, bool swap, bool maskable, uint8_t flags, Error **errp); -#ifndef CONFIG_USER_ONLY SubchDev *css_find_subch(uint8_t m, uint8_t cssid, uint8_t ssid, uint16_t schid); bool css_subch_visible(SubchDev *sch); @@ -262,7 +261,6 @@ int css_enable_mss(void); IOInstEnding css_do_rsch(SubchDev *sch); int css_do_rchp(uint8_t cssid, uint8_t chpid); bool css_present(uint8_t cssid); -#endif extern const PropertyInfo css_devid_ro_propinfo; From patchwork Tue Mar 18 21:32:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874439 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76787wru; Tue, 18 Mar 2025 14:36:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWwm1Vw8Zy1WpRuhHkIVyBo0Xu+Y2FH/cePVPRXH2KJ1F4wyMkYU8knKuUuG/Gh/eH7jDNMjw==@linaro.org X-Google-Smtp-Source: AGHT+IGlk/LpknTv07ugksM4m5yPSt6+m+lwcRCRoAwTOgZJOry8/c/EerpARVhoL2+pzS5n1h8S X-Received: by 2002:a05:620a:260a:b0:7c5:6bd5:2ea3 with SMTP id af79cd13be357-7c5a84a2354mr36464085a.56.1742333816573; Tue, 18 Mar 2025 14:36:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333816; cv=none; d=google.com; s=arc-20240605; b=hS9vzXRSl7RUufQnrZume9EehNow13f3VI5tkU5XTRUGRIg+LVmdvV61wt67D0zPQE PFWR20GEV3pKn0GzzcVZ2iQ0FPa5pEDJfYi/dbNzi7d53XKAglKZWQyaqlTdJmQikGI5 bE7Kfa1aCS7LgEZMxzRjOfqDlUiDq0/GGYNgVyrKTLBV/1b0tHBYO+rPSHZFx6ZgS2QF ZXX7qP2X0codd1xoKOTgbu2J3QguNKJQQh1KkQR2E+nTi8sfXRDm7n2PVFWXLnjSA5kW dy/jXjBQXPEhTC98VqLSbbaetl6uJ4ym6V7/RZ0rhjlReFEMTa7UvdzvynvJY4b4kZlk eHnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qAJhBvKK2tjocHW8D3nM54DyABQcyAL39T963Zv3mLo=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=kQv51dyvquzhO5cStGSPRqxpNPtAQA7ZwL9kXyAZ2YK8YjyiWTIoK0AMEHhxnjGOwH XS8rskTAdAO5qps9m3y2mbvd/Mz9vzwPXF7meWpTU4KN9v3QIsGJ/8oaoyRUMpMLgPEp w7wxL8ZlC7ydbWoBOhpfgmJrxquK4qn9Cks9Z5heFYWsLneb6XSH53XKcyP7u+tlmqO6 DUJfVtQrrHXYamBv3sWuKiJATRAFnUYCxDSi1oDyxiVOyeeT8P/u10kmysgonLdrIbh/ MJ8oazlOY6RjXUg5NJnlmDGoh7qW/rBfCJ1A4xPw9RBFYKUx+ctkaHrsZR6dNDDMJ843 qSIQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kk4KVl6Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573cf0012si1287185785a.394.2025.03.18.14.36.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:36:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kk4KVl6Z; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZp-0004TV-UI; Tue, 18 Mar 2025 17:34:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueYC-0001OD-Do for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:40 -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 1tueY9-0000rW-TZ for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:40 -0400 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-225477548e1so109203605ad.0 for ; Tue, 18 Mar 2025 14:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333557; x=1742938357; 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=qAJhBvKK2tjocHW8D3nM54DyABQcyAL39T963Zv3mLo=; b=Kk4KVl6ZemDq3FNHC6cppUeyncPufqCrtJYyZ7ANQtA5+vIYljCGaEiggb4HrlxQGX sLY5qtkNO8036gu2jCwEd41XttC0l7+O+qHBl6HWELof0XRL2dU74hfSdgde3Jeerqy9 8OG0oBcfaXRh/6sp61l0BEyfNOpE2AhiDSWaweNfjbAqWH1MLzvMdoGalERvOKN5KzsB GKw0x9jJ85b/ewBMUvJz1twpyJgsI6PdP8iKjZLsPGBQECYZpCR9OT4Nljd8R/ULgq/Y SOI1OJw4i7+ylB6f5IkLuDXk3Rq2OtTm1C4qIMs3A+PBjGUxpwCjsLd0or3ok4cPCYp9 /9yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333557; x=1742938357; 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=qAJhBvKK2tjocHW8D3nM54DyABQcyAL39T963Zv3mLo=; b=QDoqbLU5fA2/R7vIRd5n4j12LIUuaO5hagVip4wIryEbpc4V2qoQ0A3p29sBxXPyZW ckMxJVex8tqOkX/ECZNx/R1ycJxZHZrYIVZomA16gIHQ5s9trIcY5hMwKrNLbtR7Tgpm e7LChJYCkRGr5/7XKWX8RYfHj92rXuKB7rcYUTWaH7ihqeHYwf4g0aSNnk6e4E5UuCBf 6X4qLuzGdqh6K46orONWHN7OnUbHknsyZUsGDx07DraALSy9mkGe3oMXYRZtUp+lOVPI JjckxGc4CkKTgPLUooKhrL3ejUURpi880+63dUANKgXYVagOcRoovT4hMhg+bxcEONKy eJmg== X-Gm-Message-State: AOJu0YyxAY9kOH2b+IWbawZRVv8Tsyj7yacSuiQ3OMra14y2Eb4O7fLi DVqlL/ascZh0xSspmQOq75ZnAAluGDZ4JR/qJae1+Y0WzKnE/q0TBw09QQadpdnFX0xq01LJXr2 V X-Gm-Gg: ASbGnctx5iB7XJsPNIQFgLleXq6SAvUlMI7OC76t7/hw4JCdtxVu/lUFuNmxKqgcQD+ dOaNT+7UH4FNhNE5hZF04AB+6o3TMBEwo1rZLQ6cEvoBBpmnY6+h8SmYqQ+w2x7WNoPOptcvdI7 A95+UfrroS3PQDqZaMasas70b9mrNkT/TzJUdlIx/UcIuAwPBdI65CN8uc7V1hoUFMmzltoD0wB TOjT/jt654AOkfhJB1GaUdaJvjVgotHqbCrvb9HVRy7wrjDOtEsrgfk0O5qVZx/dkuFp7vwbjRK 5zOSCiSDGqs3HW/O7L4GQNmsRL8j0zgUCeAkcqT4t0qLyi0e4ch5g/qD91jvknudvDVAg1M2EW7 I X-Received: by 2002:a05:6a21:3286:b0:1f5:8678:182a with SMTP id adf61e73a8af0-1fbeb7a1da1mr303795637.12.1742333556532; Tue, 18 Mar 2025 14:32:36 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 37/42] include/exec: Split out icount.h Date: Tue, 18 Mar 2025 14:32:02 -0700 Message-ID: <20250318213209.2579218-38-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Split icount stuff from system/cpu-timers.h. There are 17 files which only require icount.h, 7 that only require cpu-timers.h, and 7 that require both. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- include/exec/icount.h | 68 ++++++++++++++++++++++++++++++++ include/system/cpu-timers.h | 58 --------------------------- accel/tcg/cpu-exec.c | 2 +- accel/tcg/icount-common.c | 2 +- accel/tcg/monitor.c | 1 + accel/tcg/tcg-accel-ops-icount.c | 2 +- accel/tcg/tcg-accel-ops-mttcg.c | 2 +- accel/tcg/tcg-accel-ops-rr.c | 2 +- accel/tcg/tcg-accel-ops.c | 2 +- accel/tcg/tcg-all.c | 2 +- accel/tcg/translate-all.c | 2 +- hw/core/ptimer.c | 2 +- replay/replay.c | 2 +- stubs/icount.c | 2 +- system/cpu-timers.c | 1 + system/dma-helpers.c | 2 +- system/vl.c | 1 + target/arm/helper.c | 1 + target/riscv/cpu_helper.c | 2 +- target/riscv/csr.c | 2 +- target/riscv/debug.c | 1 + target/riscv/machine.c | 2 +- target/riscv/pmu.c | 2 +- util/async.c | 2 +- util/main-loop.c | 1 + util/qemu-timer.c | 1 + 26 files changed, 92 insertions(+), 75 deletions(-) create mode 100644 include/exec/icount.h diff --git a/include/exec/icount.h b/include/exec/icount.h new file mode 100644 index 0000000000..4964987ae4 --- /dev/null +++ b/include/exec/icount.h @@ -0,0 +1,68 @@ +/* + * icount - Instruction Counter API + * CPU timers state API + * + * Copyright 2020 SUSE LLC + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef EXEC_ICOUNT_H +#define EXEC_ICOUNT_H + +/** + * ICountMode: icount enablement state: + * + * @ICOUNT_DISABLED: Disabled - Do not count executed instructions. + * @ICOUNT_PRECISE: Enabled - Fixed conversion of insn to ns via "shift" option + * @ICOUNT_ADAPTATIVE: Enabled - Runtime adaptive algorithm to compute shift + */ +typedef enum { + ICOUNT_DISABLED = 0, + ICOUNT_PRECISE, + ICOUNT_ADAPTATIVE, +} ICountMode; + +#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) +extern ICountMode use_icount; +#define icount_enabled() (use_icount) +#else +#define icount_enabled() ICOUNT_DISABLED +#endif + +/* + * Update the icount with the executed instructions. Called by + * cpus-tcg vCPU thread so the main-loop can see time has moved forward. + */ +void icount_update(CPUState *cpu); + +/* get raw icount value */ +int64_t icount_get_raw(void); + +/* return the virtual CPU time in ns, based on the instruction counter. */ +int64_t icount_get(void); +/* + * convert an instruction counter value to ns, based on the icount shift. + * This shift is set as a fixed value with the icount "shift" option + * (precise mode), or it is constantly approximated and corrected at + * runtime in adaptive mode. + */ +int64_t icount_to_ns(int64_t icount); + +/** + * icount_configure: configure the icount options, including "shift" + * @opts: Options to parse + * @errp: pointer to a NULL-initialized error object + * + * Return: true on success, else false setting @errp with error + */ +bool icount_configure(QemuOpts *opts, Error **errp); + +/* used by tcg vcpu thread to calc icount budget */ +int64_t icount_round(int64_t count); + +/* if the CPUs are idle, start accounting real time to virtual clock. */ +void icount_start_warp_timer(void); +void icount_account_warp_timer(void); +void icount_notify_exit(void); + +#endif /* EXEC_ICOUNT_H */ diff --git a/include/system/cpu-timers.h b/include/system/cpu-timers.h index 64ae54f6d6..a1abed0d7a 100644 --- a/include/system/cpu-timers.h +++ b/include/system/cpu-timers.h @@ -15,64 +15,6 @@ /* init the whole cpu timers API, including icount, ticks, and cpu_throttle */ void cpu_timers_init(void); -/* icount - Instruction Counter API */ - -/** - * ICountMode: icount enablement state: - * - * @ICOUNT_DISABLED: Disabled - Do not count executed instructions. - * @ICOUNT_PRECISE: Enabled - Fixed conversion of insn to ns via "shift" option - * @ICOUNT_ADAPTATIVE: Enabled - Runtime adaptive algorithm to compute shift - */ -typedef enum { - ICOUNT_DISABLED = 0, - ICOUNT_PRECISE, - ICOUNT_ADAPTATIVE, -} ICountMode; - -#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) -extern ICountMode use_icount; -#define icount_enabled() (use_icount) -#else -#define icount_enabled() ICOUNT_DISABLED -#endif - -/* - * Update the icount with the executed instructions. Called by - * cpus-tcg vCPU thread so the main-loop can see time has moved forward. - */ -void icount_update(CPUState *cpu); - -/* get raw icount value */ -int64_t icount_get_raw(void); - -/* return the virtual CPU time in ns, based on the instruction counter. */ -int64_t icount_get(void); -/* - * convert an instruction counter value to ns, based on the icount shift. - * This shift is set as a fixed value with the icount "shift" option - * (precise mode), or it is constantly approximated and corrected at - * runtime in adaptive mode. - */ -int64_t icount_to_ns(int64_t icount); - -/** - * icount_configure: configure the icount options, including "shift" - * @opts: Options to parse - * @errp: pointer to a NULL-initialized error object - * - * Return: true on success, else false setting @errp with error - */ -bool icount_configure(QemuOpts *opts, Error **errp); - -/* used by tcg vcpu thread to calc icount budget */ -int64_t icount_round(int64_t count); - -/* if the CPUs are idle, start accounting real time to virtual clock. */ -void icount_start_warp_timer(void); -void icount_account_warp_timer(void); -void icount_notify_exit(void); - /* * CPU Ticks and Clock */ diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 372b876604..034c2ded6b 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -35,7 +35,7 @@ #include "exec/log.h" #include "qemu/main-loop.h" #include "exec/cpu-all.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "exec/replay-core.h" #include "system/tcg.h" #include "exec/helper-proto-common.h" diff --git a/accel/tcg/icount-common.c b/accel/tcg/icount-common.c index 402d3e3f4e..d6471174a3 100644 --- a/accel/tcg/icount-common.c +++ b/accel/tcg/icount-common.c @@ -35,7 +35,7 @@ #include "system/replay.h" #include "system/runstate.h" #include "hw/core/cpu.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/cpu-timers-internal.h" /* diff --git a/accel/tcg/monitor.c b/accel/tcg/monitor.c index eeb38a4d9c..1c182b6bfb 100644 --- a/accel/tcg/monitor.c +++ b/accel/tcg/monitor.c @@ -14,6 +14,7 @@ #include "qapi/qapi-commands-machine.h" #include "monitor/monitor.h" #include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/tcg.h" #include "tcg/tcg.h" #include "internal-common.h" diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/tcg-accel-ops-icount.c index 27cf1044c7..d0f7b410fa 100644 --- a/accel/tcg/tcg-accel-ops-icount.c +++ b/accel/tcg/tcg-accel-ops-icount.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "system/replay.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/main-loop.h" #include "qemu/guest-random.h" #include "hw/core/cpu.h" diff --git a/accel/tcg/tcg-accel-ops-mttcg.c b/accel/tcg/tcg-accel-ops-mttcg.c index bdcc385ae9..dfcee30947 100644 --- a/accel/tcg/tcg-accel-ops-mttcg.c +++ b/accel/tcg/tcg-accel-ops-mttcg.c @@ -26,7 +26,7 @@ #include "qemu/osdep.h" #include "system/tcg.h" #include "system/replay.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/main-loop.h" #include "qemu/notify.h" #include "qemu/guest-random.h" diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index f62cf24e1d..6eec5c9eee 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++ b/accel/tcg/tcg-accel-ops-rr.c @@ -27,7 +27,7 @@ #include "qemu/lockable.h" #include "system/tcg.h" #include "system/replay.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/main-loop.h" #include "qemu/notify.h" #include "qemu/guest-random.h" diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index 5c88056157..ccdb781eef 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -29,7 +29,7 @@ #include "system/accel-ops.h" #include "system/tcg.h" #include "system/replay.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/main-loop.h" #include "qemu/guest-random.h" #include "qemu/timer.h" diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index c1a30b0121..7a5b810b88 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -26,7 +26,7 @@ #include "qemu/osdep.h" #include "system/tcg.h" #include "exec/replay-core.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "tcg/startup.h" #include "qapi/error.h" #include "qemu/error-report.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 167535bcb1..bb161ae61a 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -55,7 +55,7 @@ #include "qemu/cacheinfo.h" #include "qemu/timer.h" #include "exec/log.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/tcg.h" #include "qapi/error.h" #include "accel/tcg/cpu-ops.h" diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index 7f63d17ca1..0aeb10fb53 100644 --- a/hw/core/ptimer.c +++ b/hw/core/ptimer.c @@ -11,7 +11,7 @@ #include "migration/vmstate.h" #include "qemu/host-utils.h" #include "exec/replay-core.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/qtest.h" #include "block/aio.h" #include "hw/clock.h" diff --git a/replay/replay.c b/replay/replay.c index 3adc387b3d..a3e24c967a 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/replay.h" #include "system/runstate.h" #include "replay-internal.h" diff --git a/stubs/icount.c b/stubs/icount.c index edbf60cbfa..ceb73b4fc2 100644 --- a/stubs/icount.c +++ b/stubs/icount.c @@ -1,6 +1,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" /* icount - Instruction Counter API */ diff --git a/system/cpu-timers.c b/system/cpu-timers.c index 23dd82b465..cb35fa62b8 100644 --- a/system/cpu-timers.c +++ b/system/cpu-timers.c @@ -36,6 +36,7 @@ #include "hw/core/cpu.h" #include "system/cpu-timers.h" #include "system/cpu-timers-internal.h" +#include "exec/icount.h" /* clock and ticks */ diff --git a/system/dma-helpers.c b/system/dma-helpers.c index 6bad75876f..0d592f6468 100644 --- a/system/dma-helpers.c +++ b/system/dma-helpers.c @@ -13,7 +13,7 @@ #include "trace.h" #include "qemu/thread.h" #include "qemu/main-loop.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/range.h" /* #define DEBUG_IOMMU */ diff --git a/system/vl.c b/system/vl.c index ec93988a03..c17945c493 100644 --- a/system/vl.c +++ b/system/vl.c @@ -89,6 +89,7 @@ #include "audio/audio.h" #include "system/cpus.h" #include "system/cpu-timers.h" +#include "exec/icount.h" #include "migration/colo.h" #include "migration/postcopy-ram.h" #include "system/kvm.h" diff --git a/target/arm/helper.c b/target/arm/helper.c index 0454b06a6c..becbbbd0d8 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -24,6 +24,7 @@ #include "exec/translation-block.h" #include "hw/irq.h" #include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/kvm.h" #include "system/tcg.h" #include "qapi/error.h" diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 6c4391d96b..0dd8645994 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -31,7 +31,7 @@ #include "accel/tcg/cpu-ops.h" #include "trace.h" #include "semihosting/common-semi.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "cpu_bits.h" #include "debug.h" #include "pmp.h" diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 49566d3c08..be4aebb9b2 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -27,7 +27,7 @@ #include "exec/exec-all.h" #include "exec/cputlb.h" #include "exec/tb-flush.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "qemu/guest-random.h" #include "qapi/error.h" #include diff --git a/target/riscv/debug.c b/target/riscv/debug.c index fea989afe9..7fc9e121e1 100644 --- a/target/riscv/debug.c +++ b/target/riscv/debug.c @@ -32,6 +32,7 @@ #include "exec/helper-proto.h" #include "exec/watchpoint.h" #include "system/cpu-timers.h" +#include "exec/icount.h" /* * The following M-mode trigger CSRs are implemented: diff --git a/target/riscv/machine.c b/target/riscv/machine.c index 889e2b6570..a1f70cc955 100644 --- a/target/riscv/machine.c +++ b/target/riscv/machine.c @@ -21,7 +21,7 @@ #include "qemu/error-report.h" #include "system/kvm.h" #include "migration/cpu.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "debug.h" static bool pmp_needed(void *opaque) diff --git a/target/riscv/pmu.c b/target/riscv/pmu.c index 0408f96e6a..a68809eef3 100644 --- a/target/riscv/pmu.c +++ b/target/riscv/pmu.c @@ -22,7 +22,7 @@ #include "qemu/timer.h" #include "cpu.h" #include "pmu.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/device_tree.h" #define RISCV_TIMEBASE_FREQ 1000000000 /* 1Ghz */ diff --git a/util/async.c b/util/async.c index 863416dee9..2719c629ae 100644 --- a/util/async.c +++ b/util/async.c @@ -35,7 +35,7 @@ #include "block/raw-aio.h" #include "qemu/coroutine_int.h" #include "qemu/coroutine-tls.h" -#include "system/cpu-timers.h" +#include "exec/icount.h" #include "trace.h" /***********************************************************/ diff --git a/util/main-loop.c b/util/main-loop.c index acad8c2e6c..42bd75c193 100644 --- a/util/main-loop.c +++ b/util/main-loop.c @@ -27,6 +27,7 @@ #include "qemu/cutils.h" #include "qemu/timer.h" #include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/replay.h" #include "qemu/main-loop.h" #include "block/aio.h" diff --git a/util/qemu-timer.c b/util/qemu-timer.c index 788466fe22..1fb48be281 100644 --- a/util/qemu-timer.c +++ b/util/qemu-timer.c @@ -27,6 +27,7 @@ #include "qemu/timer.h" #include "qemu/lockable.h" #include "system/cpu-timers.h" +#include "exec/icount.h" #include "system/replay.h" #include "system/cpus.h" From patchwork Tue Mar 18 21:32:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874441 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76830wru; Tue, 18 Mar 2025 14:37:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXsqDTyskaSvuS8HlwBrcj8mHR+Uv6RtNxPkPyg9JI10GA9ELEHBddgqX9FYLPNVyYlREu1cg==@linaro.org X-Google-Smtp-Source: AGHT+IFPUMG4kMxj4c6V9j4YeaTx21BsOKl80a4y00oMFXVHXb0jjKbcvzT6BIpbO8/Stkw6iVHh X-Received: by 2002:a05:620a:4485:b0:7c5:55f9:4bbf with SMTP id af79cd13be357-7c5a827d845mr37431885a.7.1742333821280; Tue, 18 Mar 2025 14:37:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333821; cv=none; d=google.com; s=arc-20240605; b=UeohvZmwBEiDqwjC54Ww9xDw4vCWj7ZJu2Ti1zeNr5LC4GaMdAktmihIqZIVEb6rkU 3UTJQ8vAMmQJMXQOt1u/HwGNUO3PQMKzqfRN7NcOJ/HdzeTo4Wppj9/yKTQTDk5E7fxs ngzSU2CGk4DW+U2IIwSl4DIAcScUR9dqL5oOZaGfwTYQnuGvrs+qOc2gMmtyxvvFwSv7 4VaNBGvw4+QC9IFUYpFy/RfbtGk/JR0+zAQlbUzRiR1TXLLtUc0qk3B0jqZe9Pxk75GQ 4C4ZVvStU14prKP4Mw3ANykGpjDYywRBvZnOKrXvtAujms3Pm8soh95YteJbW5b+f4hW X6UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/uK/6e74nn8Fot5LvCS7tmplWHujswrlAKxdO1vG4SM=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=cSa0qPgLcCiTEyFszUct0KSRVoGoIlf5BVidSCY09lW3+sOjbNa8lbIywRrXJZbyz9 6MAYTjYN8/heWFseI8BEgDUX6hn96wle0HUEzoXR2osIt12Imy6ix/oZ6UjSfG7welMa +SfaAKkDFHEV7ludLQNVRLeywNW0TL2BCB0T7WRGtMjiBFh4C72dORMyqcHGtsP7DBUy GLZqKyvoTZ2oGVa8LizXuLo+B6nvW3b48w4GPMNdTirk1AnGekCm7s9g9Ma0UMLs5cNc cS1s6Am1p3oJCwoC0s2kfLwxxu/WDqe50oLZBBoCvlvseZ/uVv+yJxhLbcDzjvHc24c6 A55Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xa/cjMSU"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573d14222si1247224485a.470.2025.03.18.14.37.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:37:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xa/cjMSU"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZm-0004At-Gi; Tue, 18 Mar 2025 17:34:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueYC-0001OB-5z for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:40 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueYA-0000ri-OF for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:39 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-224100e9a5cso119674255ad.2 for ; Tue, 18 Mar 2025 14:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333557; x=1742938357; 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=/uK/6e74nn8Fot5LvCS7tmplWHujswrlAKxdO1vG4SM=; b=xa/cjMSU2Xcl+2CAfqBE+Lt7LYZWGlHNdMjmqPg+PUHoX80orjL+blAtMnkZbazkg7 Dc2psVAg38yYMEyVQOFK3t0TVR7NPESRJC/5v9mQl7nfIjt1NWCVtxhnu4So2NOG6bXz aeiYl4VeII4tCyBy0YA7Qs45ZJQi3N4SHK5PShHGD2c8h8jiAL6SiRwsTnYEqgjyC7zU 2vsku/Po2wcbiPUvqa02EjaR1CyOkXeGWHCp0q5eIa1Kt2xKn+RItrDsEKBY7OnqWxaB fnw02WM3NiLA/Vb10ZR1+C17NloRXyqHYx3bKR5TA4g4IKQle7XxREYke/B0LiJneugz 3bPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333557; x=1742938357; 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=/uK/6e74nn8Fot5LvCS7tmplWHujswrlAKxdO1vG4SM=; b=m+UPQN8qGKXiKsCruRChEZsgmGrZXhRQ8GkHsGQXFjDmy5AUglKwj4R46l85QSf3sO 5pKXPlOcTPfb+3P9G8hZ3d4LgI/wBPKO5ilduRjJf85eqkwu7TvFDVC6CwoxwB7/tS0F 4ydjMTFsz8k8UA4HAxSu2E7kRYk6esIHQTeCDS3MXOh8f9Sz32qFfHtw7z0BMOQuv+T4 yxtlmG3N5qsR8a1LrDl1yhbVIvYDj0vlc504FJTNu3zrURgiAw/KBkDFXYridWlBnIR7 p+2VLkCinH+4WXL3HLX0a4dsEVQPmHW0ldb3URlsSWTvar9HkWJM6PuSV0mNtHivl39/ Yg3A== X-Gm-Message-State: AOJu0YypNw4rJLLXDuOnWwYdXrDsNnY671NZn+O88vK9Npr4LlkhhiIG eiyADdNPswM+hz0dVeOmKWWw5L3mhtzks6XgWnqmrdACTO5v2NbdwsjMMar/tDI8qK1GnJAIxDb 7 X-Gm-Gg: ASbGncvBuDwmAZu9fT1CJm2jtvp0XoA0HUibsOCpETpbbdI8lurlYDScf7fkbBt4uXX RJGEmf3ZqdIVlR/H6Q9zTt+bNONGYsoT1/G+fc1jgug+3EVFbBmNKMA9uRNJNGukKr5xVbehYBL A4dYy3FOms5MJrf2QdG0Ea3ul+JQ8D9cepDvINgaRsza7F+p0ZrdKRYbXRzLWKRoexsafEupSo3 o8QzSzhxN/2v1vBB1HsxOJS8m/eWn3SyoRzN98oX5vc+jl/Qr17Mdm7xZQGWnaS+cKL7h7+bQZC W5BasYO3DonLbJ/xpjNoaJ2t85oiWOd3TjnhrDU2CT4EnRnk5xDgaEYUGCePL3nSnmDaPWbjdE0 S X-Received: by 2002:a05:6a21:7316:b0:1f5:75a9:526c with SMTP id adf61e73a8af0-1fbeb896816mr347704637.13.1742333557321; Tue, 18 Mar 2025 14:32:37 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 38/42] include/exec: Protect icount_enabled from poisoned symbols Date: Tue, 18 Mar 2025 14:32:03 -0700 Message-ID: <20250318213209.2579218-39-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Richard Henderson --- include/exec/icount.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/include/exec/icount.h b/include/exec/icount.h index 4964987ae4..7a26b40084 100644 --- a/include/exec/icount.h +++ b/include/exec/icount.h @@ -22,13 +22,21 @@ typedef enum { ICOUNT_ADAPTATIVE, } ICountMode; -#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) +#ifdef CONFIG_TCG extern ICountMode use_icount; #define icount_enabled() (use_icount) #else #define icount_enabled() ICOUNT_DISABLED #endif +/* Protect the CONFIG_USER_ONLY test vs poisoning. */ +#if defined(COMPILING_PER_TARGET) || defined(COMPILING_SYSTEM_VS_USER) +# ifdef CONFIG_USER_ONLY +# undef icount_enabled +# define icount_enabled() ICOUNT_DISABLED +# endif +#endif + /* * Update the icount with the executed instructions. Called by * cpus-tcg vCPU thread so the main-loop can see time has moved forward. From patchwork Tue Mar 18 21:32:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874442 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76857wru; Tue, 18 Mar 2025 14:37:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWmPsxyR2jLa4bamFp9ObWIh9ZZiggz81dnDtfd8oMNlbxT97ysFCZtdG21rBYiVUUyFGhUyw==@linaro.org X-Google-Smtp-Source: AGHT+IFgkKeI+Rhzyhatve3Em7dIYeAsYrkHU5q/b1EaLlw2uOTQtATvNYlrX7cBSotPLO946/+z X-Received: by 2002:a05:622a:5199:b0:476:8eae:3366 with SMTP id d75a77b69052e-47708328eaamr8836511cf.30.1742333824930; Tue, 18 Mar 2025 14:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333824; cv=none; d=google.com; s=arc-20240605; b=fU4VR95lg+XHn8/7yxkyvNHvqv3UXyO8dV+MW2pL4wjWlswf+KCnYhvMHfzKFhRQ0l 7ipAa76hIbsG/DzTqw4SuhT81YdL/JVArh+tNw0ki66eCyEBovfZHCu74+YTq7Z3Pnpx O0t7mb/vdYUl6KQ2Zdg82jmknXWNN5xnnHXcMZPX7tEmW6eXe+7lfdu7Ft5xEuaJSCSM piw770/4QZ2Gh1NCl4Bj0CCHnP9ItDxhhJqyYpEjDFlShLylWIMU1hscopXGnx5CCb/e NNPIebekkbqHG9nmECCKqH1atUmo0qIhwXc2aP0u8hBAlcJ8McOnqMN15zVFmZ9wF+rN s9Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HfhMo6u4WSJa0m+zVQXeBrRktRhGKRYmsVkZ31uEjlo=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=eSv51s8B2lvUSh0LGBV+fEcrIw+AeWfyjr8krkl9EyylhU6h1x90xzk80hI1xvb17b vXQTRQDsWSyyGOnR5uyEfhFDZWLQxgfH2F5fAvhCEcxt4XVag51HNiN7HzpZcHD9jP9h krr1tSP42AlVBk1D6b0FFs1xK2blo1cMMppcFpcJhfYFBjmtmF2c3HSS+I+xtdyLSDTM 0xgS/qFa30iWvRJIS+dFXuWrtT4Ml/UGkXsCTYtagBN5YFxm9F5eHUT6nM6eLdK/C71E bAEb4QErzTaZc/bQ7uKJiHA7MW9XIONp5MPKOiNriKsQ2CrgJsDWALMVCnxVw7SZqmCe V7Fw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Is/Q9T7/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb8150bfsi126712551cf.367.2025.03.18.14.37.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:37:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Is/Q9T7/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tueZz-0004hE-If; Tue, 18 Mar 2025 17:34:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueYD-0001ON-3W for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:41 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueYB-0000rp-4m for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:32:40 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-2232aead377so139696325ad.0 for ; Tue, 18 Mar 2025 14:32:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333558; x=1742938358; 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=HfhMo6u4WSJa0m+zVQXeBrRktRhGKRYmsVkZ31uEjlo=; b=Is/Q9T7/eWSK3g8Lmin6RHCHW9AmKEBU4nPveWeGf7+83DWXnRsU/4eRz80s6YCCqJ l3Pse57RzREtVvEUms9TCbs8X/rsOihgSfnm4uYa2HHDA7Hgeyglmw7JQkmbcMqUYIA+ htYaOQV6AsCRgL8h2wutuw+8KMu8CSr9L3DO+9NWbNagf2sEJjIBcDQhFjrk2chevhio rp//PIyQEnAolXrsmoGaCtoQvl2prVam3j63r1zU+A1OxWIjr2Bg2r63NEHTIk2f/Ak/ dAzkr50gsYTt/jGzIbW/mUQnK5njxJ3qhjvewOgxUM0Zn96JETEnpzHSCpGRYnhhebYy mw3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333558; x=1742938358; 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=HfhMo6u4WSJa0m+zVQXeBrRktRhGKRYmsVkZ31uEjlo=; b=eRDcHczVEla/1QDFLxmRu7HD7S5FfxCaFUVsXLueIYn2IetT1Cz0auUvY0/CK+sf9T VStcDnt16SQvwEOjOWqYjWfE43G26pvKnpDiFx7FBNVPXwGw2+J11yOcfWXaHTG6fOtB 7cidH5rdsuCU2Sm+zHhtLEG7UlmkM6jqD3jcJBxjogc73UIgtaL9c/wCTZyCSDnuHyou y1ZdvTpJ3e0b9DVmjJiOBSb/UhDU4x9/TJJ+fY+N7EYHftghcx+sRZEjG0kuWur0jTtf k+2+DQ6OJmUG6wTxbHDsRepjul+Qz4no0iFv3myQMKE3/qFALvJVHtep7lSAQLmb/SoC 8t5Q== X-Gm-Message-State: AOJu0Ywmp5GzcQyrZWbyIA+co9ZYJrm3gNyJD6RiEnhj3FiyU9cafpVw 6s2WXckjW6lc5/SqHTbRvlpHHuRFe8+yXVCHPAgYxhASDt7WRuHHTCHOH+dQyRrrpgs6PLtFb5C T X-Gm-Gg: ASbGncu8X5HiNeuGhl7zjggLt9n7NBA2ttOpkRrsvj0nDKrH9V03VZVbq1q/NSWGz8x LABMoixIVDLsZLUaCiN9kFOr6sCQrlAVYkaneABeaAfSElrUUzdPwVrVynf4taZJswiGQMg7+YO moFapwP8StiGwykYLJBtecxoBMTy550Wpz56L2vow7O7NElAUkYr+BLd9U34fuK4scEWbSsJj6l twp8vxLX88Wu607OBrhZKtKHqDoruC7OnXWNT2DxLa/I3Dhh8ME6FqPqd0wj6ACBsfYJAQQlLdN ZlgujUEJEYCsw3CFifrcrh64TcC8M/CGxXexAEweEN7aEfOm3UuU65a6AIzekpm8yW0dkMX2kdr v X-Received: by 2002:a05:6a20:549c:b0:1f5:84c8:5d03 with SMTP id adf61e73a8af0-1fbeaf9381emr377145637.3.1742333557892; Tue, 18 Mar 2025 14:32:37 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-af56e9ddf4fsm9473854a12.21.2025.03.18.14.32.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:32:37 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 39/42] include/system: Remove ifndef CONFIG_USER_ONLY in qtest.h Date: Tue, 18 Mar 2025 14:32:04 -0700 Message-ID: <20250318213209.2579218-40-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This is include/system, so CONFIG_USER_ONLY will never be true. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- include/system/qtest.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/system/qtest.h b/include/system/qtest.h index 6ddddc501b..84b1f8c6ee 100644 --- a/include/system/qtest.h +++ b/include/system/qtest.h @@ -23,7 +23,6 @@ static inline bool qtest_enabled(void) return qtest_allowed; } -#ifndef CONFIG_USER_ONLY void G_GNUC_PRINTF(2, 3) qtest_sendf(CharBackend *chr, const char *fmt, ...); void qtest_set_command_cb(bool (*pc_cb)(CharBackend *chr, gchar **words)); bool qtest_driver(void); @@ -33,6 +32,5 @@ void qtest_server_init(const char *qtest_chrdev, const char *qtest_log, Error ** void qtest_server_set_send_handler(void (*send)(void *, const char *), void *opaque); void qtest_server_inproc_recv(void *opaque, const char *buf); -#endif #endif From patchwork Tue Mar 18 21:32:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874448 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp77629wru; Tue, 18 Mar 2025 14:39:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXdcbIU/Gnjrkbzt+eBFuu8Er4CedViwaNeVX2KrqWyqLEAZWh90IVgvGlIsm/Z90n3y4rJ8Q==@linaro.org X-Google-Smtp-Source: AGHT+IEtki80qRIzzI6Aw65jd6ZwcuiuVGoiWGhiNTQH5No3fxM+UgiLPhLX5ETeWJVXn3n3+Dhz X-Received: by 2002:a05:620a:46a3:b0:7c5:3b52:517d with SMTP id af79cd13be357-7c5a84d9048mr44490585a.54.1742333944681; Tue, 18 Mar 2025 14:39:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333944; cv=none; d=google.com; s=arc-20240605; b=QmQhRco5pLYikOf953PHNhp2ojl0dcM+o+fgXr4bZrtPibOzJK67s/JoCrLkegfrbb 0ZEPqbynahIHSef6XB6picbUlFjZq2iPumBNxazfdFaXhwOYkvOFfzdDdzkU8S7186Xm 8Hi93htG9kHB1RT8msgTiPE+YM1oHBassm1HfEDm3PNPiegIsR+GliGXu3sUBtm5RJbf /Of3VYUVST4XbZSvqApmJkcXIl2x1+OwPdMmxWHTfPL/bywkU/QW43GK9LrwubvLBcfV QyCZETH3zHz0fsGehqKV5fECNHvlDIfmq5yIoCRSRJJnAMNXsGBPdEqVVH641j3ZmsW9 mpzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z/d4Opsx2QmpRYGlTe7zbsmEBVXLmlU0lp+CJtYfxNc=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=VG84qZ9VCFKI9OQrItc473Lai+Fpa/7j9h1iSFctg5WUU4fNWtsJ8KbNkS1S49rm4R AhSOFm072mpswAUtM5D/Y3NOT81mGE4z1E91mJNCk8OzNJUKT/fs74Iwj8Q1+so/qg0W rMko59AnSa2YL2gY1g0aR8AMPaaA4v04SInsbdqIeGYih8WAorzAHTBiShbKz92gJiSm pbycgorPC6ULVHEX8g/lkVnhY9qkcEhpNMFPqDcyH+jm/hWtI1iIssF/cuyyhUxa2bb9 fLGEgigveCoHHOiqtMd+FUmhafjRYh5AxLJ6BGKRGIcGZkoS4dvuO1Q2f89kF/xjjBLY N1yQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d6HSaOLQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573cf0a9esi1243695685a.409.2025.03.18.14.39.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:39:04 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d6HSaOLQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuebB-0007zb-Qs; Tue, 18 Mar 2025 17:35:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueb8-0007g1-DQ for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:35:42 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueb6-0001PM-GY for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:35:42 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-2243803b776so4601655ad.0 for ; Tue, 18 Mar 2025 14:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333739; x=1742938539; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Z/d4Opsx2QmpRYGlTe7zbsmEBVXLmlU0lp+CJtYfxNc=; b=d6HSaOLQj+ygTdqD3c8qhBMsGu8c0ZWWsFJVnlWPhTflDMoYcQRKyL55jN0GwwT5xv 2/mZCv1Vm/P1jXukmGqxa8WJGWYjpYMJz20a3rhhGnJgkeVQh01ped9nd53BgPY7H5SZ 8XhZ5p11sXZX+ba3KpykE2xl0KYDyzxqbMMs8sI25bGko1ERBY34a/t30ru4ss9EHthH S5QMuYcqIIt1ajr+hma6t4+5oSckmYY4L2UsJTBuHGfpC92BsxN4aCt5CK7tOslr1hnu 1GARnQKu93iyltZ6iRhkqJcPIuer/5bVTe8E9mlelXqP2BeWXPOTzTeowkvKtbcYDKjI T3/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333739; x=1742938539; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z/d4Opsx2QmpRYGlTe7zbsmEBVXLmlU0lp+CJtYfxNc=; b=YC5tv9+ep5RgTr9TUhcdX2Ey74UzaxlE0LGGXnvyAKVzfq8A8xnFqhxDCNb8Pi27Ji yPnkZ2osejq9Er9ihBpuS4Q9A3RVX7YD3JOn+k44HsTZLrZ1HWaURUg/aVzjUtcwHMe4 bUHOy9i2ASs28Xxj+NcRQfpvn1ePh14f631ubugr6UTBveQ1a4Vve73F7cn4egcMBOnx DZGr5xKq2dhUFGzum78hOZ2Cjnzt94x7bxRFg5NwZdnLAeQuwL7WNCp5i9ENfqFtBXYL +X23zhpDxntP51Vw5ukEcmyQSx4AKo3oULdU1vu98XZgI9upacq1wRUGYy8tmF4jx4W7 dL3Q== X-Gm-Message-State: AOJu0Yyhs+7eYs+yUgdY72riZd3ff1Q4yfFHerlizTpw+8i2lUh9dFP/ MQrZnGHKmSeppw7PZ/cdrq8GUlJtozMRa36evLWnk0ktbBnUjPghPy/IUuUiTT0S7gMn7gVew3z f X-Gm-Gg: ASbGncvHOBmbGmDLN2JXun52ExDI6CjpilTUVkpxE4KTiLkJWtiMAtDZ1hZy5LGGqkL 8DIkhsunzMt3SjuxQPr6cEWlZeUdiYF5WLofiIlIzqdPV4nKz3W71d6yLh85UHyHfDrqvPPPdmQ drMlw8aUinoRFn7YUmE/GklqGi8hKRTQFGZQCNzEMyj6UJEJnpHIXmkKzYSs6raz9B1XMJkdb86 +3wC8J78OMzI7GBFEQsH0+B5KlKMATjc8+D5e+VBtRuTz3PE48GupsnLes3yvXCbjHsaJexzHWa 9JTzjWU3HaWeL+ojmO3qRGt6nFBsIlMhqLefbxw780ZVQxZJldAui5LWu2iFptzA9VBCLC3PnUV 9 X-Received: by 2002:a17:902:d509:b0:215:9642:4d7a with SMTP id d9443c01a7336-226495a62cfmr3719615ad.0.1742333738937; Tue, 18 Mar 2025 14:35:38 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-301539e9ab7sm8678072a91.11.2025.03.18.14.35.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:35:38 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 40/42] include/qemu: Remove ifndef CONFIG_USER_ONLY from accel.h Date: Tue, 18 Mar 2025 14:32:05 -0700 Message-ID: <20250318213209.2579218-41-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While setup_post and has_memory will not be used for CONFIG_USER_ONLY, let the struct have constant layout. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson --- include/qemu/accel.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/qemu/accel.h b/include/qemu/accel.h index 972a849a2b..fbd3d897fe 100644 --- a/include/qemu/accel.h +++ b/include/qemu/accel.h @@ -38,13 +38,13 @@ typedef struct AccelClass { const char *name; int (*init_machine)(MachineState *ms); -#ifndef CONFIG_USER_ONLY + bool (*cpu_common_realize)(CPUState *cpu, Error **errp); + void (*cpu_common_unrealize)(CPUState *cpu); + + /* system related hooks */ void (*setup_post)(MachineState *ms, AccelState *accel); bool (*has_memory)(MachineState *ms, AddressSpace *as, hwaddr start_addr, hwaddr size); -#endif - bool (*cpu_common_realize)(CPUState *cpu, Error **errp); - void (*cpu_common_unrealize)(CPUState *cpu); /* gdbstub related hooks */ int (*gdbstub_supported_sstep_flags)(void); @@ -78,12 +78,10 @@ const char *current_accel_name(void); void accel_init_interfaces(AccelClass *ac); -#ifndef CONFIG_USER_ONLY int accel_init_machine(AccelState *accel, MachineState *ms); /* Called just before os_setup_post (ie just before drop OS privs) */ void accel_setup_post(MachineState *ms); -#endif /* !CONFIG_USER_ONLY */ /** * accel_cpu_instance_init: From patchwork Tue Mar 18 21:32:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874430 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp76509wru; Tue, 18 Mar 2025 14:36:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUrNuvpsg3KsXP0E3wLMOvW+PTLr2/qD1AQFbNYDK5Lgiu/HP4+yI/GEckGMmYpZ8CunSquag==@linaro.org X-Google-Smtp-Source: AGHT+IEhzPM4UMwSZcft3eRnWeTfHl/erslXlQ4HiNrpD4smpjpY72bp8sWSl1CfHTe4jcUHEdHD X-Received: by 2002:a05:622a:588f:b0:476:98d6:13f8 with SMTP id d75a77b69052e-477082de4a6mr9126481cf.21.1742333771785; Tue, 18 Mar 2025 14:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333771; cv=none; d=google.com; s=arc-20240605; b=Zblpl4gmewH8bmEr5p51QFxpjgvA4PD/Hso/vs6j2SNS630ksLLYXKB9acR9x6TEqg bQ5AEIGAjmV4Elj4dhIHko1OfObwsgJo2bNCuwCpld7jT+ZlRGlJwPX8kgvFNeFE5Ahx RM3a8dOuhX4Jq/b6MnFqV0PobQEttzbt9elRHu0FHujhlPZ4PwT4nk+/0ExuIOruatHe l3WnmEMrwrEq85V2yiL/T/9hUimVWzMP1pnHC9GBTHSmYYutei0gK2W0+9OiJlhJbS7W 9w90ZbuxN3Idhgbof+9ER/FiH/LlRFyldp4EkzOkwCCl2cpsvuyTxfHxuALlkQzAyIze aCow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZHfKPAV4txpIA6DabBRkgaflv6NwjVJFAo4bciu0CZ4=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=AQDj9JMjeGnleqTSx4f1a0PCWVrD7hYWbwgIskzapv57JkP8lK2shnZX2+uUXF+94h tI0l7Y8rOAZfWlol0v19pkf8vhUuK3HX97YzYP0iuVls6txNGRTlv3OAJdwutenfPgrP lVqAQm37jnWWAD6qzOoAQhnXg8I3kmC1AbBLJeIJXLEZ3PxJN+7HD7y23yNUF36gsAHS a5cWnrAGDXpm2TUU7QKo28awBPXyUnU38uC7cE1MKJQAsbJrGo0ad2YvaBtiztcjMP6x EvnPnNj6jboY/HvxXQSpIzVMDdJdCMq4tD2EqAWmj2yVZwbtUZAbKYuG8dSQ5tn8vz91 TP6Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YmSOZCca; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c573b756fcsi1258321985a.49.2025.03.18.14.36.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:36:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YmSOZCca; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuebE-0008BC-Mp; Tue, 18 Mar 2025 17:35:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tueb9-0007nJ-2u for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:35:43 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueb7-0001PO-9o for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:35:42 -0400 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-30155bbbed9so4945865a91.1 for ; Tue, 18 Mar 2025 14:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333739; x=1742938539; 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=ZHfKPAV4txpIA6DabBRkgaflv6NwjVJFAo4bciu0CZ4=; b=YmSOZCcaXjSShsG9AglN95SH+gOrjcFx0tXi+SXjt1GuNtIFKJ1A/oAqJYgSyjzOKI 5q4SYfkT3ypVon9RFpooxLLE3SZr99HwLVBywRR3rsQ3Yhy1vRiG4/pnuHt0XUmt4Uio og5My7b+AMNCO8zXKLmerLIQmhWtita/iDWHkJa8x0hzMy9dyTuK3uXk88OMKIh9b0XO wczaPWGa1/+KOsifuReYeetv4UpZ5DotouDMKYc/8kvgBloPaq+E0muWgOW2neV3BzPB APKYijLloaad0RVJx1hjDRHDKIex0hZS9bq7oQcykcHLO5DbrxMnhBAJCoIUa1uVtgaa 24nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333739; x=1742938539; 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=ZHfKPAV4txpIA6DabBRkgaflv6NwjVJFAo4bciu0CZ4=; b=kVzWi5zxG0Eg0QUWJQ4+A0DGP2gJphIWFDJWfbtfYvpnAA4NOBS52pffP0SWCX/iN7 4oEIvARveRBDO8wup8mpiWYE0bObfEeyA/r/+iSkvZiQjJb7zdGDEibQQVXF2NWOsHR6 OEatTSCyT/ywBmG8d9f0laforGdBp57ZFHL52CxyuV4tlf7D3HfFXFRQ2a1il2yU2mro sS+vD+YA0dyfA+95QfIdATsYJ8P2TBdFrbHbzlCE4WgGooYhdevoVCtxN1Hw/RJiNB+P OUDCENwr5OXtWvmLfoAWvIvE0g4+8Bm09/yDzBDVmAc3gN7mcYzzcLntXO9at1PTv3Ca F1LA== X-Gm-Message-State: AOJu0Yycq6IDKmZQLrIdp6+70BUKQ7gPYOTpe/ue+cNvWJARFI1NuhSk BJo418h5LcksLh445NxocGhhNGfYx5T1F1svjGTggTslttfQ3NPiiUDmztP6u31Hu1/SeJHmlHo Q X-Gm-Gg: ASbGnctUKo3z59T78CNRZKpGof1MTNmLO0CPBTGLhpa2eMEhpeozDG/yGnwMkjOKO6r jEE0LxU4rx0WbfDe4xz+ymolwu0BU8bQcHIVpOp6cDM9QoOPNji2BYFtcWflUjbdUoCPnqJp/wp lPYXoxzNqMeT1ZsBWsYLiqOPgCz6THSnP9eWn+FedY2RYV0ESBZ8O3oQc4SFUeeHI+WXgAGQlPN rvXXLIk6PO+9/h6XWWz1TjHCpb+yIe2Buxyf38HeI/iOBySKfN4kQf5B4yMFlaoPZ9oUIrh+xxx fODmMvgOToSTvVULm9PGZn+YeGcXtl1+xK63SN5OZpzfkcMgFrwpddZOKjtvl43cnD3xvhsbp6m b X-Received: by 2002:a17:90b:2f84:b0:2fe:afa7:eaf8 with SMTP id 98e67ed59e1d1-301bde5b0damr352211a91.13.1742333739651; Tue, 18 Mar 2025 14:35:39 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-301539e9ab7sm8678072a91.11.2025.03.18.14.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:35:39 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 41/42] target/riscv: Remove ifndef CONFIG_USER_ONLY from cpu_cfg.h Date: Tue, 18 Mar 2025 14:32:06 -0700 Message-ID: <20250318213209.2579218-42-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While RISCVCPUConfig.satp_mode is unused for user-only, this header is used from disas/riscv.h, whose users are only built once. The savings of 4 bytes isn't worth it. Reviewed-by: Pierrick Bouvier Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu_cfg.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/riscv/cpu_cfg.h b/target/riscv/cpu_cfg.h index 8a843482cc..cfe371b829 100644 --- a/target/riscv/cpu_cfg.h +++ b/target/riscv/cpu_cfg.h @@ -196,9 +196,7 @@ struct RISCVCPUConfig { bool short_isa_string; -#ifndef CONFIG_USER_ONLY RISCVSATPMap satp_mode; -#endif }; typedef struct RISCVCPUConfig RISCVCPUConfig; From patchwork Tue Mar 18 21:32:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 874444 Delivered-To: patch@linaro.org Received: by 2002:a5d:6a90:0:b0:38f:210b:807b with SMTP id s16csp77114wru; Tue, 18 Mar 2025 14:37:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWwcseTD67vnB5/yhzN/4d9Zs7nKCirIomTpWnegP2/fZ51YL9iFZ+7nR3Khs8z/WUcMgr6jg==@linaro.org X-Google-Smtp-Source: AGHT+IF5QrTwltMRRIHoeBGBSE3ucWmWnl/2AhgwiIg8HQK6RSJPT4ZeS3H2OOxXlH4qH7euRcHH X-Received: by 2002:a05:622a:489a:b0:476:8588:ceae with SMTP id d75a77b69052e-477083b52aamr8480721cf.45.1742333860518; Tue, 18 Mar 2025 14:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742333860; cv=none; d=google.com; s=arc-20240605; b=Ph2kD2tsJiGgDdLolwPeUoOSLGOZk3PZNbfvLthFFm11mvnR79U2Nenv/m46SG39cy Y8XLjXWvNQH/u4Ig+t6wtHbmpUGsoH2FNw0ZR12I3Vubym6C6a115dFkPWREfcaQ7hHX Hldcq9q0tlcPdNvhSvWrPimcivxezGMOx2SALSWlaHNUy45vYolGLd5Ly3YVjbYoA3f+ XNaC/ScEcJaq/8/JMZNlFCYNRiItJppzZr/rfqjgRBb6MVyMMDFmhdTky4L+ocRevK0H BOVQKoTvb0Xxr2rntSQhAWX5swGVhZoszdHc4S2HjjsxhBkdrCW9reW9MryRLslHBWR5 YX4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=13k0jwEVfxqTq93kSJ5yE5chyzbVZf0RIEGz6xTXmR4=; fh=6c3iePwzSVcIevU/n11cXtkmPbvvYSh1prLosaYzn/o=; b=RwyHm1J/tPNzRurdkyBjrZktP0BtAzNQkBFf3asnYUOW6J+yEvWpBdxVbTtPa4t3Sp sjMRipq1vKxNNXJ2naM9n8LHHDUgsMqqyAFE53QvLXXtngyNhs1tF253WM2gJi5iMMM3 olGuQ6uHy3bWg9MQvc6CoCx7YSpkjvazhb4IIgfpyV7dtB4ymzne0aVAvDJ6zQm2SlWZ N4CxpPOILXZEUtUZ3HD5I4YyyiA1OyatCoX0mbHXKFMFh08pXHxBMkRgvFUjcj2wivBP Y/L0ugUy+BtfbQ/h6YxIs/uumocmGhTxpqMRdS+73+dlJpAEM5nuRdnq2ccq5iQCLpOW 0SiA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eBzeKaPy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-476bb64d09csi126871811cf.191.2025.03.18.14.37.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Mar 2025 14:37:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eBzeKaPy; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuebY-0008Ul-6B; Tue, 18 Mar 2025 17:36:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuebA-0007vH-0v for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:35:44 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tueb7-0001PV-Q7 for qemu-devel@nongnu.org; Tue, 18 Mar 2025 17:35:43 -0400 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2ff4a4f901fso6406478a91.2 for ; Tue, 18 Mar 2025 14:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742333740; x=1742938540; 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=13k0jwEVfxqTq93kSJ5yE5chyzbVZf0RIEGz6xTXmR4=; b=eBzeKaPyTaUf8jOXxd2/ymIYvsum6TZLpCDy05l5Wp0cmCENKg625AaNXPQwkjakfq BMCYiiMv0fJl/16o0BjOTbZPS//WMPlWIxt5jw1bRCiI71ulacxmuuLP20+dT1IDp96D 89C7Nf9Ne37Dai82DPczIAe8tBQGkZ/nuu1w245xOswuMuUOiSkwjGWkD2nFNhsY70lm kNKdt3ZFMHPKrqH9Ci/Mq884N1VFwDr9yItM640Kofe0fqO35svgnsdttU9tJeegn6e3 foG6KN8Y9gEwcXH5mpxL6RNE/cWU0RuG5OpZcnhWlt/4RfhOgFizcuFVWXlYxx+LBrqX KVBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742333740; x=1742938540; 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=13k0jwEVfxqTq93kSJ5yE5chyzbVZf0RIEGz6xTXmR4=; b=kEuzXBdNafpxy37lMCLJS1QfsT7f2WU0oxzKsJYvs8YtsHXuVWm3Wuu9EI+LCzNQRt 1WUZ+aq3cKpaazMlmmATAN9Qgk+0zulg+mpLPXZ7TeoOdW/7VPlg6K26HaTsl1cpOm+x FS6Tg1o5OpJKh3JIiY4nJO5vc6qF7cJgCpQakVKmzlmzh2AKuDxV02CPnBKxeHXBveNT ROotW4jEaUTVjfMfL//FH/hFN0OJ4PQByjBxgwHi+sdl9ZOObDlX9dNVhMrzSpsUuHJT 0Kmv8VsW/ECGQRIkpOPTPjVKSnSGJwsT75qi+Yn4DadepHcO3Fz5M0hRK1RLhcwJlBl+ DYPg== X-Gm-Message-State: AOJu0YyiEil/0TRuH9JYwoUWoRCTDcV1p5reqLxDykSIK/JjcqNDitXA SCdF3iT0c5qinCT5xYQ+7ZehvcNefdI+a3EhocX74WgLxQb53jMkz1Q4UA7m4T2OUjBeqp8mOlo W X-Gm-Gg: ASbGncss9Ho6BDksXGTQ2NC9UkVqLGGN51z2d+KBfypmiHwyGMGGSbNImChJEMidVtd VzDB3j10Oby8fn9cacLGkJ9loSI2+4xlFpZkat/tMzwUp8wXoL0PtEEj22FwB7hkUTev/Ih/+5B a5JreJOt8HmeN1CvXvKVlyUrFKldNZRwy3CgRyUBc+tuP5EWTeBcQlsFUs4H14SMBN0xSQzivSi HKv4zKROgPtvSt6yDiTeifWLrPKztVhs4UzHBEFPmNd48LEEPJxyV+FhtdLQoPaP8zQtdakh0FK y9+eJy3YDEMbwQd2os1D2h8GhqW3hv9yW+3MyuvmSCjjRUAbpyx9NTYLd837I+W75gxNEPvwpm5 8dlKpBb6gdX8= X-Received: by 2002:a17:90a:ec8f:b0:2ee:d433:7c50 with SMTP id 98e67ed59e1d1-301be1fff3bmr268423a91.23.1742333740447; Tue, 18 Mar 2025 14:35:40 -0700 (PDT) Received: from stoup.. (174-21-74-48.tukw.qwest.net. [174.21.74.48]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-301539e9ab7sm8678072a91.11.2025.03.18.14.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 14:35:40 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pierrick.bouvier@linaro.org, philmd@linaro.org Subject: [PATCH v2 42/42] meson: Only allow CONFIG_USER_ONLY from certain source sets Date: Tue, 18 Mar 2025 14:32:07 -0700 Message-ID: <20250318213209.2579218-43-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250318213209.2579218-1-richard.henderson@linaro.org> References: <20250318213209.2579218-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Poison CONFIG_USER_ONLY and CONFIG_SOFTMMU unless the compilation unit is in specific_ss, libuser_ss, or libsystem_ss. This is intended to prevent files being incorrectly added to common_ss. Remove #ifndef CONFIG_USER_ONLY / #error / #endif blocks. All they do is trigger the poison error. Signed-off-by: Richard Henderson Reviewed-by: Pierrick Bouvier --- include/exec/poison.h | 5 +++++ include/hw/hw.h | 4 ---- include/system/confidential-guest-support.h | 4 ---- include/system/replay.h | 4 ---- include/system/xen.h | 4 ---- meson.build | 6 ++++-- 6 files changed, 9 insertions(+), 18 deletions(-) diff --git a/include/exec/poison.h b/include/exec/poison.h index 8ed04b3108..a6ffe4577f 100644 --- a/include/exec/poison.h +++ b/include/exec/poison.h @@ -67,4 +67,9 @@ #pragma GCC poison CONFIG_WHPX #pragma GCC poison CONFIG_XEN +#ifndef COMPILING_SYSTEM_VS_USER +#pragma GCC poison CONFIG_USER_ONLY +#pragma GCC poison CONFIG_SOFTMMU +#endif + #endif diff --git a/include/hw/hw.h b/include/hw/hw.h index 045c1c8b09..1b33d12b7f 100644 --- a/include/hw/hw.h +++ b/include/hw/hw.h @@ -1,10 +1,6 @@ #ifndef QEMU_HW_H #define QEMU_HW_H -#ifdef CONFIG_USER_ONLY -#error Cannot include hw/hw.h from user emulation -#endif - G_NORETURN void hw_error(const char *fmt, ...) G_GNUC_PRINTF(1, 2); #endif diff --git a/include/system/confidential-guest-support.h b/include/system/confidential-guest-support.h index b68c4bebbc..ea46b50c56 100644 --- a/include/system/confidential-guest-support.h +++ b/include/system/confidential-guest-support.h @@ -18,10 +18,6 @@ #ifndef QEMU_CONFIDENTIAL_GUEST_SUPPORT_H #define QEMU_CONFIDENTIAL_GUEST_SUPPORT_H -#ifdef CONFIG_USER_ONLY -#error Cannot include system/confidential-guest-support.h from user emulation -#endif - #include "qom/object.h" #define TYPE_CONFIDENTIAL_GUEST_SUPPORT "confidential-guest-support" diff --git a/include/system/replay.h b/include/system/replay.h index 8926d8cf4b..1c87c97fdd 100644 --- a/include/system/replay.h +++ b/include/system/replay.h @@ -11,10 +11,6 @@ #ifndef SYSTEM_REPLAY_H #define SYSTEM_REPLAY_H -#ifdef CONFIG_USER_ONLY -#error Cannot include this header from user emulation -#endif - #include "exec/replay-core.h" #include "qapi/qapi-types-misc.h" #include "qapi/qapi-types-run-state.h" diff --git a/include/system/xen.h b/include/system/xen.h index 5f41915732..c2f283d1c2 100644 --- a/include/system/xen.h +++ b/include/system/xen.h @@ -10,10 +10,6 @@ #ifndef SYSTEM_XEN_H #define SYSTEM_XEN_H -#ifdef CONFIG_USER_ONLY -#error Cannot include system/xen.h from user emulation -#endif - #include "exec/cpu-common.h" #ifdef COMPILING_PER_TARGET diff --git a/meson.build b/meson.build index 329e7f056a..b4d65a75e5 100644 --- a/meson.build +++ b/meson.build @@ -4054,7 +4054,8 @@ common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss) libuser_ss = libuser_ss.apply({}) libuser = static_library('user', libuser_ss.sources() + genh, - c_args: '-DCONFIG_USER_ONLY', + c_args: ['-DCONFIG_USER_ONLY', + '-DCOMPILING_SYSTEM_VS_USER'], dependencies: libuser_ss.dependencies(), build_by_default: false) libuser = declare_dependency(objects: libuser.extract_all_objects(recursive: false), @@ -4064,7 +4065,8 @@ common_ss.add(when: 'CONFIG_USER_ONLY', if_true: libuser) libsystem_ss = libsystem_ss.apply({}) libsystem = static_library('system', libsystem_ss.sources() + genh, - c_args: '-DCONFIG_SOFTMMU', + c_args: ['-DCONFIG_SOFTMMU', + '-DCOMPILING_SYSTEM_VS_USER'], dependencies: libsystem_ss.dependencies(), build_by_default: false) libsystem = declare_dependency(objects: libsystem.extract_all_objects(recursive: false),