From patchwork Tue Jun 20 08:26:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694447 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp186505wrm; Tue, 20 Jun 2023 01:28:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Y+5tTVEhJHx5Rv7VTQQ0aNwWz477jEXIN5jBOQf7teMoQq9op9sWFRD5IReMGL4yXYtkM X-Received: by 2002:a05:6214:f2f:b0:62f:f348:78ff with SMTP id iw15-20020a0562140f2f00b0062ff34878ffmr16315877qvb.16.1687249718437; Tue, 20 Jun 2023 01:28:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687249718; cv=none; d=google.com; s=arc-20160816; b=BoH6liJfnBS74EnFasNj9adnzVsyA66L4curm7yknqfg+0mUOjd43RGrMAP+fES5+g TdU1KXTGrpaJH1h4bIVratEHYVEL4YKbOrI2/LuCNVbkgc/gpG6wkp0tW6yNm8hlkJ5k m0PjY6qOUeTqKEyQgZGeH41GQhJXihvW/eLAaAfyuelNMb8G9ekZsIp4NI8EwhBFpunq ZKEhvGcBzcQAOYQOr2kadj/KeOdS8W2REFfy2RJyQUx5oBejT+DRWfr9z+tpgEHSokqu L6sVmtOlPPWwyle0a/UWkQSi49FxoeM8i9tyxPfQnpXSY7yUl3aqI6HIMpKPcGNsDXVO v/VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=5qAxKzsGv/w4NXHL6fX7FdhMDg3IBfNx3EYgkWhvKP4=; b=WDh6mIN4L6KRReATXhsIEVtVJNyg2lnctkoq0DghCZm7NR+Nz8v1yUFakwxqgAIjBh m2CBh1+qwftZ0KwjHRvCC4ZtiU5gLdxcKUXXpEHJgcEFIhbZyUtCkKf/WE2ilgO5EgvO hvz82tiae8COZdYbnZPrZ/vfSuzetMmeCmLX8qyM9K3Jre7UoFA6sYk5Pe8l4v6gVRUL LPIb6HgaFaGPOq55hPaPzr+yfBAsevSQU1zbMbZINvhTV19fRsGekqkbqvx1m7WyaJxt Mjppd1VjbMsteUzdiwLJNf1bd85pXFlme9k1i0UYyo2hxgEY3ScgSk+F5NGJ44E2cIUh gDWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VGKG0O8p; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q15-20020a05621419ef00b005f166e642f9si620111qvc.331.2023.06.20.01.28.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jun 2023 01:28:38 -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=VGKG0O8p; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qBWhB-0003tS-Qw; Tue, 20 Jun 2023 04:26:37 -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 1qBWh8-0003r1-1k for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:26:34 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBWh5-0006AV-CH for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:26:33 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-514ab6cb529so10479517a12.1 for ; Tue, 20 Jun 2023 01:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687249590; x=1689841590; 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=5qAxKzsGv/w4NXHL6fX7FdhMDg3IBfNx3EYgkWhvKP4=; b=VGKG0O8pre/I4yNWijrwPgO2j5w1xtE3IEQZEJTUX0yqxN7eDT69EPObvmYPnQvqu+ OvT/MO1foRohWSTXKFTq6jnQt/4jgeacmQeO8FT7VI8yaOc0MSVq1GuiTyM5KQgQtR99 utZNGwqfSdcOpsyVANFPlNQdqf3jhy1nhOfWvfFwRsv6XOm0fZyR0qGXzx0AY02s80A7 Obc4352r/r21RPQl942YK8YAyGzj5YHR0b5bvhm4huo1fdYiHD86Tg0rAU2QQAN43gkb T9Psg0VejMOHG/5Em+9/jaxQkSSKOT6qxP7A99lokkqBdQA4kpXbBoynxRKjJTIUy3Sy 7Xxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687249590; x=1689841590; 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=5qAxKzsGv/w4NXHL6fX7FdhMDg3IBfNx3EYgkWhvKP4=; b=ZfLux42emQcVvDigDL2iS3Lx9LoHVOR2HEVCl7f9vsT11BACD7N0KWfywnSevgAJA1 w09wuWFpp1S5wf2b++vpFuHRX/4a1Hag7LEm7sSZmZ7xbdDdI+x1Tt787I7XtO2Jn5Vj S56Qk3qQQpzGUUt27s7LQIAzGGqbvr0QZoanoqPVXvGtkFG8qAmcaUF0czknqGKi5i6X 1FVFedXlRZPKFvl43X4oF0EC3JXQrv3eQhmaoCJreVAsWIvE7QOmZNiGURAmrFicFBL3 3E4wXeO5gpcUd8J11riLXcltDgXoBle7xU7Oqw13nhspstY+GkKQvUSWa82nFPBcMt+g k+fw== X-Gm-Message-State: AC+VfDwVdi/FPTS1vVTLmZUTawVA4PXwW9uLNmnIeM4KEuwvHGp2ikxo T97hRgkXTEncVYcX03rP99AZGvxGqFecr2Yn+0Ejc/Sr X-Received: by 2002:a17:907:7ba0:b0:989:4b:e69e with SMTP id ne32-20020a1709077ba000b00989004be69emr2430933ejc.4.1687249589975; Tue, 20 Jun 2023 01:26:29 -0700 (PDT) Received: from stoup.lan ([176.176.183.29]) by smtp.gmail.com with ESMTPSA id z19-20020a170906669300b00977c7566ccbsm935901ejo.164.2023.06.20.01.26.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 01:26:29 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 15/16] exec/cpu-defs: Check for SOFTMMU instead of !USER_ONLY Date: Tue, 20 Jun 2023 10:26:10 +0200 Message-Id: <20230620082611.770620-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620082611.770620-1-richard.henderson@linaro.org> References: <20230620082611.770620-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=richard.henderson@linaro.org; helo=mail-ed1-x535.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé We want to check the softmmu tlb availability, not if we are targetting system emulation. Besides, this code could be used by user emulation in the future. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230605230216.17202-1-philmd@linaro.org> Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index 0d418a0384..4cb77c8dec 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -60,7 +60,7 @@ */ #define NB_MMU_MODES 16 -#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG) +#if defined(CONFIG_SOFTMMU) && defined(CONFIG_TCG) #include "exec/tlb-common.h" /* use a fully associative victim tlb of 8 entries */ @@ -89,9 +89,9 @@ # endif # endif -#endif /* !CONFIG_USER_ONLY && CONFIG_TCG */ +#endif /* CONFIG_SOFTMMU && CONFIG_TCG */ -#if !defined(CONFIG_USER_ONLY) +#if defined(CONFIG_SOFTMMU) /* * The full TLB entry, which is not accessed by generated TCG code, * so the layout is not as critical as that of CPUTLBEntry. This is @@ -133,9 +133,9 @@ typedef struct CPUTLBEntryFull { TARGET_PAGE_ENTRY_EXTRA #endif } CPUTLBEntryFull; -#endif /* !CONFIG_USER_ONLY */ +#endif /* CONFIG_SOFTMMU */ -#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG) +#if defined(CONFIG_SOFTMMU) && defined(CONFIG_TCG) /* * Data elements that are per MMU mode, minus the bits accessed by * the TCG fast path. @@ -201,7 +201,7 @@ typedef struct CPUTLB { typedef struct CPUTLB { } CPUTLB; -#endif /* !CONFIG_USER_ONLY && CONFIG_TCG */ +#endif /* CONFIG_SOFTMMU && CONFIG_TCG */ /* * This structure must be placed in ArchCPU immediately