From nobody Tue Nov 26 05:28:04 2024 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=1710365772; cv=none; d=zohomail.com; s=zohoarc; b=oGXZUYSM/aCMlRlRL1h52eHvplKAVcH6SIT4Syl6yuVDP8aMAvePdN/n4qjWao1aiaiXxpLB3A2+kODYYn+WqmON4tbZCFUj07gYSfpcXFQoiovGiKzyrDvdnIAx23G5Udcb+LdCA5Xn13xBSWU9Mg3CjN21DtGvQcMVQJGu2Pg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1710365772; 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=8X472is1XN7Nm+dILoz/idT0Hrtz/X3rNIf8XYJ+iTQ=; b=bnhT+sIL+9ZhzIaE2pn3metnnOVoDgRSGqiP8O8wX8Q+QvykL2vjJQwqV+JsjcuYanNorkumSBW9+ap3TIIHZQLr7Dqv1UE+OBIJHsgp1KPJz65dUdMltLie3sGoXVzd7Rl8W1v6WpEACnZRBo+lRQAEXRiCBFZZS4/4RNNMwfw= 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 1710365772732603.9361919954838; Wed, 13 Mar 2024 14:36:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkWFM-0002Q4-Mt; Wed, 13 Mar 2024 17:34:48 -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-0002FR-PO for qemu-devel@nongnu.org; Wed, 13 Mar 2024 17:34:45 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450: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 1rkWFH-0007rq-TR for qemu-devel@nongnu.org; Wed, 13 Mar 2024 17:34:45 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-33ddd1624beso231733f8f.1 for ; Wed, 13 Mar 2024 14:34:43 -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) 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=SDNMkZPGzSdvxQif9NrZbTWByfOqwYQDsWN2HsqKLdjDul0Zz078EF3umsq2obKm51 bqzTQrSQdXbEI1ihj9LzdMCNmBvPEIJxOKpqNRxEFxhG2qcVLD1kvRNswkBmMrqXmZ4c kZUm769QckB4K32I5M/VYVaXI1SXL8IJO2GlfqmvoyYaFEscPgbzY0bDWY19j0YQADqb q+I9AMIcvCTbGy0vlmlzrPGfls7HFWSDLgXzcOGq+2s0yDTiF0uQgT7dcCHST3S+9TqG mE5yy87PTHLX+omH6Set/ZSeiQCz9TB6jU9nrooxzSqCZJFA9KU6R8l6+XVWJwWw4wEP h+Tw== X-Forwarded-Encrypted: i=1; AJvYcCXKquW5yDCGVlKLV0eQW/VMJ2r2rUd8U/qqHBJcO/N+O0nTKuIdJs+9aRV8LOqbvLAvlPZwlQ0T60exLp2HmhNC5M6dw+Q= X-Gm-Message-State: AOJu0YzJtyCs2QEfP6XUhyGpdL5j+fxBVmqmJxarh89nyDOu5V/5xfhq GlVgbtnIf8VU1RoHnwBob5lS0GThc5c0qeeKk0+QsnWhxADkBxAzwL90SAVHAUE= 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) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Richard Henderson , qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-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 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=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1710365773399100001 Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- 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 =20 -#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 =20 -#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 */ =20 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" =20 -#ifdef CONFIG_SOFTMMU +#ifndef CONFIG_USER_ONLY =20 /* 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 p= c) return (pc ^ (pc >> TB_JMP_CACHE_BITS)) & (TB_JMP_CACHE_SIZE - 1); } =20 -#endif /* CONFIG_SOFTMMU */ +#endif /* CONFIG_USER_ONLY */ =20 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); =20 -#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. --=20 2.41.0