From nobody Fri Dec 19 04:30:01 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1734029840; cv=none; d=zohomail.com; s=zohoarc; b=VLznnlQKRhBS4Gp0MEP0x7fIFKKXPJWUV2DlRHBxbiZj62RcD0Sq4JPLiD2cFtDlj1S8FuYFy6gvsMTTz4WxvpxQw80PEFmPJfuKyChcVLGi+SZd7BpXJmyPng2IVOLhH8DUMgl2tnf8F51/yVt/iO6AO7GzDDnJbueiDzDkXZE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1734029840; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NYC6oRELj+5ympYW3tq1E6/ibkizwxjQsKp5dy3fobw=; b=Q+AYtUukUEJNGxpGfcXWDxCPCv2ZztPVHyItACcQiMlwpaUqu3xRwqFych6extKj4i1jV6oBYB46psU7MSHjryo8c6Vx9bFIUAQ+g6ZlzeievzZCoWvNf63UI1nlBCc2TSn94nOH4wO/pAfKZCYzCcxTfocCWDG2uawruK2pXvE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1734029840093339.6444561291387; Thu, 12 Dec 2024 10:57:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLoMZ-0002W8-N2; Thu, 12 Dec 2024 13:56:39 -0500 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 1tLoMU-0002Eu-31 for qemu-devel@nongnu.org; Thu, 12 Dec 2024 13:56:34 -0500 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tLoMS-0006tc-BC for qemu-devel@nongnu.org; Thu, 12 Dec 2024 13:56:33 -0500 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-725ce7b82cbso1113815b3a.0 for ; Thu, 12 Dec 2024 10:56:29 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-725ceb7c00asm9859657b3a.95.2024.12.12.10.56.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 12 Dec 2024 10:56:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734029789; x=1734634589; 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=NYC6oRELj+5ympYW3tq1E6/ibkizwxjQsKp5dy3fobw=; b=TZ9lkeo+fvSzeBvkj0/7+BWR6LmVO6ibjtluFKm9u7lvZ1t/a6kEFJfPWehOtBQ1Nm TAXj7R2RhpVVYDHyWY/xYoRikLJx1/7gmrJrT7BR71BtsDb1mwxSa6dhmA52bMfIAvlE FJIamEuWK3/ZRGsoE/UmkoYuKQoPpHGTMZwRAP7qyxurjpnpYSsQhxR54GgMpNg0pVlg LlppeWvOIQQC9JXXqfWAwNGnxMHEkJQspw/8YVCXAYcm8lz8ISIpQKEjI4FlV2QM5/6x iTxuOgI8VVG2WYV89ZdvV5FGNjRM58BYev9JDkpaDgQqpI+iwm/CyUV6TRi813BqEkVB thUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734029789; x=1734634589; 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=NYC6oRELj+5ympYW3tq1E6/ibkizwxjQsKp5dy3fobw=; b=iLgf0sHNaiwvv4pol1W+Jet9ImOpZMrvoCb9sYEYtnTQV39KeQwPKUB4FSaCeUiEeS mh+P4tzkTqcXjc/l1ueeQ2otZu/p5Efq2eNM29n/4PYI1AC98dqS2pOtrBx/x7/2v0tr /U2IhFyc3TskQCxXaUsZVjejiagP7Uss/I9vfGsaZkwjuTxc/MW72S1PDDVXx9L0N2lS +JQbPrdpob8nTyoUa+HECzKuzJz/aqDo+PcsGwSQ/KjYq/x3DgQjkwzvb4QGk6hclBKp FXISgeXIwJdbGCoERjeQLucTuaPrjMcJBwSWb6iW2Mb+NnYJZGlkc1pB57mFOc3a/sk/ Xm9g== X-Gm-Message-State: AOJu0YyFgXB5eKZy+wnnwayadthzB+uyJ+/WZ3EaHXNyC6KPaKcUPjEz InYiXXtpv70fcgrs0FjBGTk4uqD2BvYTrwFtV4vsD4DTlPxwTOCcrJm8M4utKEvvUpphURE7V+R 7 X-Gm-Gg: ASbGncvq3F/7jU8psoEXqjvuRzX/fEaMkwTa+BQSMvC0ZCXuzCkrUlHhsSReyIfslH0 1+HNwOf1IZ9WxVsiJK8dcZ/tyQ+3FAXNtBsQyyCwLxmkTMnlWDHRhYDrXq3CMSAp8Pi6A/5EEzn 14JWAQ689I+9HSMq5E3H3TtweqsVHzcBnijcSF6TpJ3zlMEjpFgZ+ditj1xmcbnaG6F7QlBQqzx Q+j+25yI3F03dMS/q8kv90y0rG/NSg4rAZ3D+9diZMy9svrxphXPl11nw64moSC2NZM4kEX8cac 2LNaCyjhFIN63IApN13OI1HwqUnOnDY= X-Google-Smtp-Source: AGHT+IFkU2xkXlA8Y2CzEYBoSsiW8RBj7199k7WmkhLHeDk0U2aEGg9++ya8Sf3VjW0R/4DAYuNf1w== X-Received: by 2002:a05:6a00:999:b0:725:cfd0:dffa with SMTP id d2e1a72fcca58-72906a01c5emr2101090b3a.5.1734029788724; Thu, 12 Dec 2024 10:56:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 14/18] accel/tcg: Move user-related declarations out of 'exec/cpu-all.h' (4/4) Date: Thu, 12 Dec 2024 19:53:37 +0100 Message-ID: <20241212185341.2857-15-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241212185341.2857-1-philmd@linaro.org> References: <20241212185341.2857-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-pf1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1734029841162116600 Move declarations related to page protection under user emulation from "exec/cpu-all.h" to "user/page-protection.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- include/exec/cpu-all.h | 6 ------ include/user/page-protection.h | 2 ++ accel/tcg/tb-maint.c | 3 +++ bsd-user/signal.c | 1 + cpu-target.c | 1 + linux-user/arm/cpu_loop.c | 1 + linux-user/signal.c | 1 + target/arm/tcg/helper-a64.c | 3 +++ target/s390x/tcg/mem_helper.c | 4 +++- 9 files changed, 15 insertions(+), 7 deletions(-) diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 73b11f58abb..f7eea33b101 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -126,12 +126,6 @@ extern const TargetPageBits target_page; =20 #define TARGET_PAGE_ALIGN(addr) ROUND_UP((addr), TARGET_PAGE_SIZE) =20 -#if defined(CONFIG_USER_ONLY) - -int page_get_flags(target_ulong address); - -#endif - CPUArchState *cpu_copy(CPUArchState *env); =20 /* Flags for use in ENV->INTERRUPT_PENDING. diff --git a/include/user/page-protection.h b/include/user/page-protection.h index bdd98a37de1..51daa186480 100644 --- a/include/user/page-protection.h +++ b/include/user/page-protection.h @@ -19,6 +19,8 @@ void page_protect(tb_page_addr_t page_addr); int page_unprotect(tb_page_addr_t address, uintptr_t pc); =20 +int page_get_flags(target_ulong address); + /** * page_set_flags: * @start: first byte of range diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index 8e272cf790f..3f1bebf6ab5 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -33,6 +33,9 @@ #include "tb-internal.h" #include "internal-common.h" #include "internal-target.h" +#ifdef CONFIG_USER_ONLY +#include "user/page-protection.h" +#endif =20 =20 /* List iterators for lists of tagged pointers in TranslationBlock. */ diff --git a/bsd-user/signal.c b/bsd-user/signal.c index da49b9bffc1..edbcd461bfa 100644 --- a/bsd-user/signal.c +++ b/bsd-user/signal.c @@ -22,6 +22,7 @@ #include "qemu/log.h" #include "qemu.h" #include "exec/page-protection.h" +#include "user/page-protection.h" #include "user/tswap-target.h" #include "gdbstub/user.h" #include "signal-common.h" diff --git a/cpu-target.c b/cpu-target.c index 4a88f1c6db8..69a49202110 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -29,6 +29,7 @@ #include "migration/vmstate.h" #ifdef CONFIG_USER_ONLY #include "qemu.h" +#include "user/page-protection.h" #else #include "hw/core/sysemu-cpu-ops.h" #include "exec/address-spaces.h" diff --git a/linux-user/arm/cpu_loop.c b/linux-user/arm/cpu_loop.c index ec665862d93..709f718a99d 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 "user/page-protection.h" #include "target/arm/syndrome.h" =20 #define get_user_code_u32(x, gaddr, env) \ diff --git a/linux-user/signal.c b/linux-user/signal.c index 9b6d772882d..a191e9b26f2 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -33,6 +33,7 @@ #include "trace.h" #include "signal-common.h" #include "host-signal.h" +#include "user/page-protection.h" #include "user/safe-syscall.h" #include "tcg/tcg.h" =20 diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c index 8f42a28d07b..bc144688dd5 100644 --- a/target/arm/tcg/helper-a64.c +++ b/target/arm/tcg/helper-a64.c @@ -34,6 +34,9 @@ #include "qemu/atomic128.h" #include "fpu/softfloat.h" #include /* for crc32 */ +#ifdef CONFIG_USER_ONLY +#include "user/page-protection.h" +#endif =20 /* C2.4.7 Multiply and divide */ /* special cases for 0 and LLONG_MIN are mandated by the standard */ diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 0e12dae2aa8..307388e5bd1 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -31,7 +31,9 @@ #include "qemu/int128.h" #include "qemu/atomic128.h" =20 -#if !defined(CONFIG_USER_ONLY) +#if defined(CONFIG_USER_ONLY) +#include "user/page-protection.h" +#else #include "hw/s390x/storage-keys.h" #include "hw/boards.h" #endif --=20 2.45.2