From patchwork Mon Jun 26 15:39:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 696467 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp3300658wrm; Mon, 26 Jun 2023 08:48:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6sq7Bz5/d3D7PfZpF3fYI5lC2bUk52ZnQknBqfX/ZhTjvFjOxOe5oqyDEanMyP9tF2i6Ah X-Received: by 2002:a05:620a:8a87:b0:763:ab7c:c3c with SMTP id qu7-20020a05620a8a8700b00763ab7c0c3cmr16404446qkn.46.1687794506477; Mon, 26 Jun 2023 08:48:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687794506; cv=none; d=google.com; s=arc-20160816; b=ROCP2sW7FovijMh1FcH/zMeHy/xcbJCMhxgdhXukrxJF0cBm852wvEVe2Crx3MXRwz wHg3fga85RthKuKLwbGbL9l4efDFfc5FFDj4HmIywIlZvRW95jwy7sUITOHiwohc/mJ8 0/+2zCpvr9F2s8vYBVuN8BViVz1txUaXfakwjKv6lJ4X9y2TKV30AyWb+Gu+JINq0Ie/ 15zgOa/FxCfcbZ5/4ipTyRnvtE0A0lesn/n6pwXKO1fEB2gtTbSDhzsVu4ZuDeXG0Cjf iazPK7sJs8G0yoeiNp6izsb7ajuFzMw9tRahObwvYh/Zw4nfdgyIWFt4megVSXdQ/iZY 6BWA== 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=R2+Hm6IjSv/mwZjS2+GOqKio9bezVgYj0L4FRTARgNA=; fh=l3rThTWYtfg9kQ3pwkdseR7wGfUMT6wsJF5cqMswxYY=; b=qeWlV7/WD9fOilMeo74ghDarsJWLCc6NMazUfynID1CYJVL4gYstxoPOsXRgPQJeA5 OrnGa1peKoi61QmwvmETJN60jUGHQxvTuqa1I1aq9/oD8IVs1SlKUc8OTT8DggVx9U5o AEmGuzhvK5o5E0U6fzQ18lN2j+RZJTh4896/HBhhS3B9+TvFL9G0bWM3xu5AxdPc7vLG /tDzKeF+pyVH241kbJgqRCxdqDUbD1o1RCa+aqNvOS+3zwHNOdRHHSn4ng1OikwHANtW qqExD9eCwdKycNK+nVkXCPrKivE7y3HgH9s2OZ/x8RheMU35fNALxSVw195HTOo/oZl+ scnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hGILxFjw; 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 bj23-20020a05620a191700b007620a2f6f07si886768qkb.474.2023.06.26.08.48.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jun 2023 08:48:26 -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=hGILxFjw; 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 1qDoKb-0000wT-T0; Mon, 26 Jun 2023 11:40:45 -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 1qDoJq-0000Ig-NB for qemu-devel@nongnu.org; Mon, 26 Jun 2023 11:39:59 -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 1qDoJm-0002qK-Ab for qemu-devel@nongnu.org; Mon, 26 Jun 2023 11:39:58 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-3112c11fdc9so2961150f8f.3 for ; Mon, 26 Jun 2023 08:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687793992; x=1690385992; 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=R2+Hm6IjSv/mwZjS2+GOqKio9bezVgYj0L4FRTARgNA=; b=hGILxFjwJtIhseih/uysF5RsAegiGk1RBOFlnldVg1vk4yclWbTrsPBq/oz0KZjoyo XsTu1JtC5bfxjQ6VSvQZ1TwItJvoPsny/wUVU1N9alHNyaBJiPlQqmYHsh9oaa61jtl9 kMRx7d/kpUFTEgm2cR5y/usl03lZd3ABXE9W757pIAAWBbndUUn+ymve2jvyuF/uR/45 AgNjFU23U2lXyZ5scwMX/c5O0eVLqJxhqD2B8dHXELSwKExVhTj3yIpZYPAPIgoHFtiH JrbDcqXF3DvLOkWImIVoOP9iH2ONaTQUXwzbLQ9TuzIfEFXd/a01b078QwVsut21gb+B 1zOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687793992; x=1690385992; 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=R2+Hm6IjSv/mwZjS2+GOqKio9bezVgYj0L4FRTARgNA=; b=HrGjNR0qML6jXZKOoY5YlVU+Iwt+c+Gf6ZdETTjGPViw7H0bR6CFYHzMMRDGfVq+hY rv7LsFwopR8rgAT/hMDo39459BIe366kXWIwTr36L3aYpY6r2hvxM4IFjc5ux4/qnVgL +0bhuFWGDCDRE8cj3LjBrFeO9RRYyQDe3V85PRLkEgAY9chABCYJcwa3IJjxtzKcD3VT tnGioydhK5GYtYAy0eOu0gqE7lltlWw3z3Obfm1ybnIe5jghyTdGsg0JXV0P7ShwkFTA qprNETAQFPms983yHhuX6dkJ2/zLupf++h2nyd2/Bf8BDwWmWWKrjPJqyOUBdw0Wc7oG akhQ== X-Gm-Message-State: AC+VfDzTEDntXgZMl7jolGFyVYU4M5KvA7jTrTA0i6FwNEBYh7ysKwdM 7b7+IbvfjzxqSjKGqe+ViviVwKPzfe3VKoJ/dIXcXzu8 X-Received: by 2002:adf:ec45:0:b0:30f:c9f5:7370 with SMTP id w5-20020adfec45000000b0030fc9f57370mr9754314wrn.25.1687793992077; Mon, 26 Jun 2023 08:39:52 -0700 (PDT) Received: from localhost.localdomain ([139.47.42.170]) by smtp.gmail.com with ESMTPSA id t1-20020adfe441000000b00313f45f74a8sm2164178wrm.103.2023.06.26.08.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 08:39:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Anton Johansson Subject: [PULL 09/22] accel/tcg: Replace target_ulong with vaddr in *_mmu_lookup() Date: Mon, 26 Jun 2023 17:39:32 +0200 Message-Id: <20230626153945.76180-10-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230626153945.76180-1-richard.henderson@linaro.org> References: <20230626153945.76180-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=richard.henderson@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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Anton Johansson Update atomic_mmu_lookup() and cpu_mmu_lookup() to take the guest virtual address as a vaddr instead of a target_ulong. Signed-off-by: Anton Johansson Reviewed-by: Richard Henderson Message-Id: <20230621135633.1649-10-anjo@rev.ng> Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 6 +++--- accel/tcg/user-exec.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index d873e58a5d..e02cfc550e 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1898,15 +1898,15 @@ static bool mmu_lookup(CPUArchState *env, vaddr addr, MemOpIdx oi, * Probe for an atomic operation. Do not allow unaligned operations, * or io operations to proceed. Return the host address. */ -static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr, - MemOpIdx oi, int size, uintptr_t retaddr) +static void *atomic_mmu_lookup(CPUArchState *env, vaddr addr, MemOpIdx oi, + int size, uintptr_t retaddr) { uintptr_t mmu_idx = get_mmuidx(oi); MemOp mop = get_memop(oi); int a_bits = get_alignment_bits(mop); uintptr_t index; CPUTLBEntry *tlbe; - target_ulong tlb_addr; + vaddr tlb_addr; void *hostaddr; CPUTLBEntryFull *full; diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index d71e26a7b5..f8b16d6ab8 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -889,7 +889,7 @@ void page_reset_target_data(target_ulong start, target_ulong last) { } /* The softmmu versions of these helpers are in cputlb.c. */ -static void *cpu_mmu_lookup(CPUArchState *env, abi_ptr addr, +static void *cpu_mmu_lookup(CPUArchState *env, vaddr addr, MemOp mop, uintptr_t ra, MMUAccessType type) { int a_bits = get_alignment_bits(mop); @@ -1324,8 +1324,8 @@ uint64_t cpu_ldq_code_mmu(CPUArchState *env, abi_ptr addr, /* * Do not allow unaligned operations to proceed. Return the host address. */ -static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr, - MemOpIdx oi, int size, uintptr_t retaddr) +static void *atomic_mmu_lookup(CPUArchState *env, vaddr addr, MemOpIdx oi, + int size, uintptr_t retaddr) { MemOp mop = get_memop(oi); int a_bits = get_alignment_bits(mop);