From patchwork Wed Mar 13 21:33:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1911861 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=ftxLuPco; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Tw3jK0jktz23rN for ; Thu, 14 Mar 2024 08:36:05 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkWFO-0002XE-Or; Wed, 13 Mar 2024 17:34:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkWFJ-0002H2-Ub for qemu-ppc@nongnu.org; Wed, 13 Mar 2024 17:34:45 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rkWFH-0007rr-U9 for qemu-ppc@nongnu.org; Wed, 13 Mar 2024 17:34:45 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-33d90dfe73cso216361f8f.0 for ; Wed, 13 Mar 2024 14:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710365682; x=1710970482; 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=8X472is1XN7Nm+dILoz/idT0Hrtz/X3rNIf8XYJ+iTQ=; b=ftxLuPcoqiHOwjaIRz+nXm/cc7GnJ3LW5N4apU5H+5lyzFyK3BP4t1lXikkODggPzJ vkW5KoGIrfo1gOd/vZDiehQukxmZF0z/QfOJxQXlD6LoUnjX5IsOnmg5rFATOExSMAja pO9FgmdPNuS+Qyl/rabRkWgiXOlm1J2P9263Q+T2SXQxekzQ81OqBYE58UH782hWBdSF I3kGY/dUM0kOtIAgrGPmMWWV/vJHuBiyb4M7o01e/NWgVH7rhC72+7omatG5Z7m5rPd2 Glx1Gj44hSaZv68pJh5YgbwHA2nHqsPbqSzwGsK+VSOl34wiSysPE5iKL6nuzGLxLnl8 QDUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710365682; x=1710970482; 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=8X472is1XN7Nm+dILoz/idT0Hrtz/X3rNIf8XYJ+iTQ=; b=dEj8o5pkh5X0HdVq91HVVo3l7B8VVzvQQpLccNA4oooJWd2t3TDQZQ9Z5LSsjVplF7 rBRCWwMtFblaQyxU0DKgY1BfUkDo6XoMHIE5B0jF7qEGjtKnwSAQkc+tjG6JwQk6cVIQ xL0V5d68iExfSLxVxyPLKrfF//kmIBEIeBC6fGeaYSWuLHFuZQ0zbB2ebI24+wP6hX6o s0aL8hKdVXUE7r4+AGwWNGY1rEF8djg2Us+iv7ng1dqHiOW1nReSW2p+AuxV+f2QnUxb Qgrg677Xt+7u4W3iWGeARbbnJVaSenDHmN4j3xN7zAsvR4DcwXkLz/6zTa0QkhbaM6mT EGCg== X-Forwarded-Encrypted: i=1; AJvYcCW7Yn3wy8yxbC8Pzh6qle2DyPslL8AVpPqyQ1vKwSpmYGfPhaPSt27HhosFYf5j264dTLTmeajATOvdUelSGNtFfEot X-Gm-Message-State: AOJu0YyAl6/Ou8tWrmrVeSN21ol6oLCCnxnvL69CUnLhsk19SzQNuzxV h3X4IeReHgrY1YyMwYm/Rs/Qcyb+dFLQssWmVAI28BbAKKYrF95D4OBUwNAZJ3Q= X-Google-Smtp-Source: AGHT+IFQ+X44STFpsLaI99RVxnAcASp7BBxTUJTZK6/k7vY0xknW8WQ41XVXSu0eVbwc2O4gAu+F1A== X-Received: by 2002:adf:a296:0:b0:33e:bc7f:edd7 with SMTP id s22-20020adfa296000000b0033ebc7fedd7mr2372862wra.7.1710365682559; Wed, 13 Mar 2024 14:34:42 -0700 (PDT) Received: from m1x-phil.lan ([176.176.182.179]) by smtp.gmail.com with ESMTPSA id bk1-20020a0560001d8100b0033e95794186sm57071wrb.83.2024.03.13.14.34.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 13 Mar 2024 14:34:42 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Richard Henderson , qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= , Paolo Bonzini , Thomas Huth , qemu-ppc@nongnu.org Subject: [PATCH-for-9.1 09/12] accel/tcg/internal: Check for USER_ONLY definition instead of SOFTMMU Date: Wed, 13 Mar 2024 22:33:36 +0100 Message-ID: <20240313213339.82071-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240313213339.82071-1-philmd@linaro.org> References: <20240313213339.82071-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-ppc@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-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-ppc-bounces+incoming=patchwork.ozlabs.org@nongnu.org Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal-target.h | 6 +++--- accel/tcg/tb-hash.h | 4 ++-- accel/tcg/tcg-all.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/accel/tcg/internal-target.h b/accel/tcg/internal-target.h index 4e36cf858e..b22b29c461 100644 --- a/accel/tcg/internal-target.h +++ b/accel/tcg/internal-target.h @@ -24,7 +24,7 @@ #define assert_memory_lock() #endif -#if defined(CONFIG_SOFTMMU) && defined(CONFIG_DEBUG_TCG) +#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_DEBUG_TCG) void assert_no_pages_locked(void); #else static inline void assert_no_pages_locked(void) { } @@ -62,12 +62,12 @@ void tb_unlock_page1(tb_page_addr_t, tb_page_addr_t); void tb_unlock_pages(TranslationBlock *); #endif -#ifdef CONFIG_SOFTMMU +#ifndef CONFIG_USER_ONLY void tb_invalidate_phys_range_fast(ram_addr_t ram_addr, unsigned size, uintptr_t retaddr); G_NORETURN void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr); -#endif /* CONFIG_SOFTMMU */ +#endif /* !CONFIG_USER_ONLY */ TranslationBlock *tb_gen_code(CPUState *cpu, vaddr pc, uint64_t cs_base, uint32_t flags, diff --git a/accel/tcg/tb-hash.h b/accel/tcg/tb-hash.h index a0c61f25cd..45a484ce82 100644 --- a/accel/tcg/tb-hash.h +++ b/accel/tcg/tb-hash.h @@ -25,7 +25,7 @@ #include "qemu/xxhash.h" #include "tb-jmp-cache.h" -#ifdef CONFIG_SOFTMMU +#ifndef CONFIG_USER_ONLY /* Only the bottom TB_JMP_PAGE_BITS of the jump cache hash bits vary for addresses on the same page. The top bits are the same. This allows @@ -58,7 +58,7 @@ static inline unsigned int tb_jmp_cache_hash_func(vaddr pc) return (pc ^ (pc >> TB_JMP_CACHE_BITS)) & (TB_JMP_CACHE_SIZE - 1); } -#endif /* CONFIG_SOFTMMU */ +#endif /* CONFIG_USER_ONLY */ static inline uint32_t tb_hash_func(tb_page_addr_t phys_pc, vaddr pc, diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index c6619f5b98..929af1f64c 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -116,7 +116,7 @@ static int tcg_init_machine(MachineState *ms) tb_htable_init(); tcg_init(s->tb_size * MiB, s->splitwx_enabled, max_cpus); -#if defined(CONFIG_SOFTMMU) +#if !defined(CONFIG_USER_ONLY) /* * There's no guest base to take into account, so go ahead and * initialize the prologue now.