From patchwork Wed Mar 13 21:33:33 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: 780058 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:ed0:b0:33e:7753:30bd with SMTP id ea16csp137012wrb; Wed, 13 Mar 2024 14:36:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWTToSDKbuWAT0jcmNqw6k3ZvMH6FN/53xTsP+GnqUJS9xy4BjJRtLQkXJqdPAQQlyt6wvTCI9vUxgMzKLMXWUK X-Google-Smtp-Source: AGHT+IEw+RYDULKiK/d8ucAaYmKMwyGtu8lbFZ1UJhMm6BX3x7Yum0ZJNyel/YkAwjBoMPnSgLEK X-Received: by 2002:a05:6122:45a:b0:4d4:21cc:5f4f with SMTP id f26-20020a056122045a00b004d421cc5f4fmr145622vkk.11.1710365805815; Wed, 13 Mar 2024 14:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1710365805; cv=none; d=google.com; s=arc-20160816; b=VAvs0u5bwFZoGx1i1tyCDeZC1Cso2Gl/jUsQi63FpltL9nkryqISu+W/rsX/F9Swm/ 0KSk6Ml45ZBP0JEPBi0SASA00lQq/WWxwCI+tAfsGP7fcXJKTEL+ti+aKYHGjDc1e61i ryhE1Zuv+ns9viddqs9FRJ++9er00MgJfRqY4JRXuMS0ohsGEiL1+hOVpb6sGU5rIlgK xm7MH0iAUfzXW3J4XdnzE0nqBZez0gShvv76mAv7R0rM0lglS5g4N7UQME5rvXiHYwhf qMqf4dfIKhGS9707ocvFVg8unT9P806nCRBzY0SAgNjuKH9JiEe+bKdzHjjR1xQgg6SQ YtRg== 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=RBkHrPM3L+Twu6UqfDL2FrSyFRu3n6fnatxa83i/Hyg=; fh=UbD2lrmFlJQmNk4HkUVXcq2BDE0Brzrv8mgvy3lqTLk=; b=hLmNVubYT06Pq4rYBo3bOdZjzM6B83QhW2E+kF6P5tm4moHz0gGKzdfy/hUcEnMdzW irSlNqxbcWUHJxEAPjgE/LWK183Dp9TQgdqnMB6gOdOAg1OYLzmGtmnowNDSn2F4IYaE ssOb/y5BLc37ZSPvJgMTgMK0tHtQJY/97EBJhi+Ky17oGaLitgmniW4dUg6uqE7C46Ia RPpgt5kdNEAi3K2VvZ/dtVoyMf8gRhrZCkc1tFCTDHhD/c+aY79MGChSgb7Z4VbXKC/o GhVFahFqfZJ2fm26bK7xxJBPsTSxB66HKpIit4f29pPjCqurtKGvPEk6kUy9mXLX0vH4 +N+g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I437kgiG; 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 gm10-20020a056214268a00b00690d4e72106si75842qvb.508.2024.03.13.14.36.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2024 14:36:45 -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=I437kgiG; 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 1rkWF3-0001Ve-JY; Wed, 13 Mar 2024 17:34:29 -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 1rkWF2-0001V1-L2 for qemu-devel@nongnu.org; Wed, 13 Mar 2024 17:34:28 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rkWEy-0007py-N7 for qemu-devel@nongnu.org; Wed, 13 Mar 2024 17:34:28 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-413eee86528so2228745e9.3 for ; Wed, 13 Mar 2024 14:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710365663; x=1710970463; 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=RBkHrPM3L+Twu6UqfDL2FrSyFRu3n6fnatxa83i/Hyg=; b=I437kgiG66I2bLr5WT0oT0B9o0NyniwhC/BMdRWe4TKKo35fnN6bIgTH1BwGeeC1Cr o5JDfgvq2bXcnsFsqzCH0tzyCnNkCN3MzOmpgUuy1A0OZP1fo/c4yCmrxsNYv6bCNdC4 B0hss/24ZGin+5X60hFwupaP/Qyg4+M86knPdtRJRaz5smobddUEB6Ap9R5g0M24M8YU wKLkck4DmiFShN+rx7Xw4oJO+RRWUA8UUbyUhR65ti8BsjRt4xf8ZJRgd4+G6YDhTDnr vW4oUbpSK15BH/Pmx4p13kjTQq1MScT/dxO0y7e0JhXGjCtfWc/P7ROPkq2PSrsPJVcg 4ACg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710365663; x=1710970463; 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=RBkHrPM3L+Twu6UqfDL2FrSyFRu3n6fnatxa83i/Hyg=; b=QQVTGKDedf0rVWhwZEQRmaWLbPOkbvgf6koNc7zyMjxAXi2OQ2E8RIRyuSa/vwgr5P 5iOJY0yQuZxQxxg6gWbNeWFZH1SaM5MMBTt5/TLfqVNlNC/gafBFDxihP+h8tLMKoCaU AdGOuHpiaEjBGjpCwCykeDxPHkYdSDvc58Unogc8VkRrJTiYcl61oFDqo8ccQU/wLSPR i8YiAjitFi0tFlcUwroXOacdJkqJ3+V4CPsKZ5EtzBcamxqt5VVzLDmgCpXwHw769KhG cfv3sKgHoPR6p0lk856n+PSBdnarDALM6ogKBxrjzeO95VW2PqANfMWaibO9KrjaZ7bG lUEw== X-Forwarded-Encrypted: i=1; AJvYcCXHUrBrygIX6CPzrrAL0V2fhavBCAj4bHu8xTbMo337T8PaA/7HCK2e9LXn9dVCstG/pKyEogtFc2IVdHoh6+46lULttD0= X-Gm-Message-State: AOJu0YwWdWTgpepqM/qjmJI+W1+Fh/gE5LX3TMLMrm7d/5jvd0xkiC7X ABWbvk0ORMOlo4KHf18OM0p0EhN9etKlT3JDNW3u8VNySWO2t7r2/grCFH8LxII= X-Received: by 2002:adf:e8ce:0:b0:33b:62c0:6181 with SMTP id k14-20020adfe8ce000000b0033b62c06181mr2353388wrn.42.1710365663045; Wed, 13 Mar 2024 14:34:23 -0700 (PDT) Received: from m1x-phil.lan ([176.176.182.179]) by smtp.gmail.com with ESMTPSA id j30-20020a05600c1c1e00b004133825e6cfsm3459020wms.24.2024.03.13.14.34.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 13 Mar 2024 14:34:22 -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 06/12] tcg/sparc64: Check for USER_ONLY definition instead of SOFTMMU one Date: Wed, 13 Mar 2024 22:33:33 +0100 Message-ID: <20240313213339.82071-7-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::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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-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 Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- tcg/sparc64/tcg-target.c.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tcg/sparc64/tcg-target.c.inc b/tcg/sparc64/tcg-target.c.inc index 176c98740b..56915a913b 100644 --- a/tcg/sparc64/tcg-target.c.inc +++ b/tcg/sparc64/tcg-target.c.inc @@ -78,7 +78,7 @@ static const char * const tcg_target_reg_names[TCG_TARGET_NB_REGS] = { #define TCG_REG_T2 TCG_REG_G2 #define TCG_REG_T3 TCG_REG_O7 -#ifndef CONFIG_SOFTMMU +#ifdef CONFIG_USER_ONLY # define TCG_GUEST_BASE_REG TCG_REG_I5 #endif @@ -961,7 +961,7 @@ static void tcg_target_qemu_prologue(TCGContext *s) tcg_out32(s, SAVE | INSN_RD(TCG_REG_O6) | INSN_RS1(TCG_REG_O6) | INSN_IMM13(-frame_size)); -#ifndef CONFIG_SOFTMMU +#ifdef CONFIG_USER_ONLY if (guest_base != 0) { tcg_out_movi_int(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, guest_base, true, TCG_REG_T1); @@ -1075,7 +1075,7 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h, h->aa.align = MAX(h->aa.align, s_bits); a_mask = (1u << h->aa.align) - 1; -#ifdef CONFIG_SOFTMMU +#ifndef CONFIG_USER_ONLY int mem_index = get_mmuidx(oi); int fast_off = tlb_mask_table_ofs(s, mem_index); int mask_off = fast_off + offsetof(CPUTLBDescFast, mask); @@ -1147,7 +1147,7 @@ static TCGLabelQemuLdst *prepare_host_addr(TCGContext *s, HostAddress *h, tcg_out_bpcc0(s, COND_NE, BPCC_PN | BPCC_ICC, 0); } h->base = guest_base ? TCG_GUEST_BASE_REG : TCG_REG_G0; -#endif +#endif /* CONFIG_USER_ONLY */ /* If the guest address must be zero-extended, do in the delay slot. */ if (addr_type == TCG_TYPE_I32) {