From patchwork Mon Jun 5 20:15:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 689252 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp2288221wru; Mon, 5 Jun 2023 13:26:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ68lBVZjaAAwEoLrWsjVeUEmiHMbqn3J9yVJ+QmcFzac3JC9o6jTXMpB9dJ3ky77IsRBAUP X-Received: by 2002:a05:620a:2201:b0:75d:a13:ae74 with SMTP id m1-20020a05620a220100b0075d0a13ae74mr688642qkh.36.1685996760689; Mon, 05 Jun 2023 13:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685996760; cv=none; d=google.com; s=arc-20160816; b=AlX/K8TdSoGeED7thVlHTTmm4wm5OCAQ+X8ZCY4ZYJWqCOMLoH4P66hlIKNH4BEHpe Jn6opxDcExYzr1VrKYUvB7Ppn+E9XE+S1ZFws3Azi849d7Y9U25f6InjZLvUCVJ3U1b0 6ftwqPKjz1xaj0DeNV3+q5XmuIVYTAtnaYGKwCoEWUy0Empv/Uk2A62shyiBvqpq/N/+ IcJSCd1Yu/d5Or2okQF2SAcfzjy0orsxCTtPeq99XSQXawO77STLLik1StiE6ZPQNPkS 3PiaM3l1Mw9mYYbQhmCCrp6r2XFdWDhk69Vw/0CKoETQ9IpHxFw9tv79Fki5Xl0Zs+eA 7CIw== 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=vLSnH2FNmWoBPe6jdA7O8wsGiKQZYAPPgH74uYmHViE=; b=nnqNhzXTSM103FC71DODNruH/pDJ4xVlUAhCK0mFOD5MDBvcM78L2icNuTU1qv4cyv 3StXLuIHUUhRG0a5aC5sJNmXwoqm/GMf5gQ5LqWz0BcZvTih3q+efatw9aSghEEGrXJn kh4ExU5F6pTuKlb2d1Vck1OJDkWndu6DMewSKY8ggfAsJmHvUWiPD1XOlQoeuTpggkcE L+HNpnH8s30AGpmemqXmwgmEkgDSU5LyNQ+mA3Av2AIFgd2hT07SMXwZEkL6qVPcIkO3 EtDsUNkrlajyRZrM+nOu1TwzDNgYQAFVpzG62m0Um562a6ueziHXGiya6idPcD1lmvdI i79Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E5V9CD4D; 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 p15-20020ae9f30f000000b0075b39115540si5050360qkg.502.2023.06.05.13.26.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Jun 2023 13:26:00 -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=E5V9CD4D; 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 1q6GcZ-0001r2-Bi; Mon, 05 Jun 2023 16:16: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 1q6GcW-0001ow-Ev for qemu-devel@nongnu.org; Mon, 05 Jun 2023 16:16:04 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q6GcU-0003qn-MF for qemu-devel@nongnu.org; Mon, 05 Jun 2023 16:16:04 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-65242634690so2955330b3a.0 for ; Mon, 05 Jun 2023 13:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685996161; x=1688588161; 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=vLSnH2FNmWoBPe6jdA7O8wsGiKQZYAPPgH74uYmHViE=; b=E5V9CD4D03iGQukTZwCsLGw1uJlAaQh4hd+eZIJn9TIBaDGcoEtv219H7I29YNU8yv ZFAI9xsZ/tkZugGu+3uvfTOOCciZfhupn0zEmiwcjvZJuDjXqFCQ4glPfHi4LFffWmo6 MQbLb+eiMWisEmDFrnOrTczwQCNkJn2ShAYHEa55Fg+NK9+sl0iMDIRh0SAdLaZo96qB uAWR1lZaQn/IHSKL/1eD8aAUKY/mHZtR6dbNlse0flu/C76KNMMGz3rnLDZRkQ7G4zkj gOV3cjQ0XuyvzYRjS+VE2FAwbjsFAezrvU2/bPV4gSvVvZUlgn6Q6Jpdi2x/CXz6jIAB pQew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685996161; x=1688588161; 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=vLSnH2FNmWoBPe6jdA7O8wsGiKQZYAPPgH74uYmHViE=; b=XH7H77MjBHXT4kGkgY2gjSvzdkyTTApPwkiUqCszEnnQzMJsRfoBFm1bexFfsnp2K2 S1RmskpBegetKQg8ACzurGReciVzN36vkfi8Ef8dCX6fIZeSbvwAYgtonAx7k/FxzROd hsyNbe83MjVBqVlmJX4mLwi/L0zEctvwePF4A2UBQdXWN1W3syWhhXSsQFIHSyPkiLeA JRiUfCfL46VjTfwWNdDhFfEJWaRKEGo4CBoNUHg9erS3epAcXBk4o1vmZfXuvSEmuq7R vQHBNp+iBQVerolSGPIzcfIbN+OtXcQgx8o2Y9kd6hTGMQ33Ecy+Hh08pBJYk7MweK23 jj2Q== X-Gm-Message-State: AC+VfDxMN1TIQQjq6VftAQMLA6p67xynDh0C49DoTGf21nQTAkAc1wfV e+ZJggM0aSilYZS3ajjMdNZRLWjIZ/VBS+c/64U= X-Received: by 2002:a05:6a20:244b:b0:112:cf5:d5fb with SMTP id t11-20020a056a20244b00b001120cf5d5fbmr51194pzc.50.1685996161130; Mon, 05 Jun 2023 13:16:01 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:3f85:a600:6a3e:e465]) by smtp.gmail.com with ESMTPSA id f18-20020aa78b12000000b0064d32771fa8sm5552924pfd.134.2023.06.05.13.16.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Jun 2023 13:16:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 12/52] target/arm: Fix test of TCG_OVERSIZED_GUEST Date: Mon, 5 Jun 2023 13:15:08 -0700 Message-Id: <20230605201548.1596865-13-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230605201548.1596865-1-richard.henderson@linaro.org> References: <20230605201548.1596865-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::431; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x431.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 The symbol is always defined, even if to 0. We wanted to test for TCG_OVERSIZED_GUEST == 0. This fixed, the #error is reached while building arm-softmmu, because TCG_OVERSIZED_GUEST is not true (nor supposed to be true) for arm32 guest on a 32-bit host. But that's ok, because this feature doesn't apply to arm32. Add an #ifdef for TARGET_AARCH64. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/ptw.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 69c05cd9da..b0d2a05403 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -418,6 +418,7 @@ static uint64_t arm_casq_ptw(CPUARMState *env, uint64_t old_val, uint64_t new_val, S1Translate *ptw, ARMMMUFaultInfo *fi) { +#ifdef TARGET_AARCH64 uint64_t cur_val; void *host = ptw->out_host; @@ -473,7 +474,7 @@ static uint64_t arm_casq_ptw(CPUARMState *env, uint64_t old_val, * we know that TCG_OVERSIZED_GUEST is set, which means that we are * running in round-robin mode and could only race with dma i/o. */ -#ifndef TCG_OVERSIZED_GUEST +#if !TCG_OVERSIZED_GUEST # error "Unexpected configuration" #endif bool locked = qemu_mutex_iothread_locked(); @@ -497,6 +498,10 @@ static uint64_t arm_casq_ptw(CPUARMState *env, uint64_t old_val, #endif return cur_val; +#else + /* AArch32 does not have FEAT_HADFS. */ + g_assert_not_reached(); +#endif } static bool get_level1_table_address(CPUARMState *env, ARMMMUIdx mmu_idx,