From patchwork Fri Mar 25 14:57:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 554035 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp5524296mag; Fri, 25 Mar 2022 07:59:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzozG/qnIkVMhnRAIauddng1Svq04tvbk3pzHD34eFf9QwwrQJzSrmb0J60WH3wSPXXlFCv X-Received: by 2002:a05:622a:e:b0:2e1:c5fa:459 with SMTP id x14-20020a05622a000e00b002e1c5fa0459mr9580602qtw.111.1648220345316; Fri, 25 Mar 2022 07:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648220345; cv=none; d=google.com; s=arc-20160816; b=KwCWRIr1ZlcRnH35E1tSc+jacw+rSJIGteh/NsAh/eN3KoSQsJnJ+51EA7orl294aV XVluef24V96TWB/1FBZLf9NsK9Iy1ZxNY7h2ZED4QbrcExss6tMmDw1C1044xbqbMxpI hwjeL7kyN0ZEBrAkV8nEYaxDNLD9xLwHOM6HH1nvRdgGmQYFo/kkkTQUXr5iX5XFfgbR uLT8pdLoO9gto8RUV+7Ym0zfZJpvdTvQy/jQlyziUr0dKWZvTXP/dWEb2sO3dDX0E39d gE0PjgYcHfUhnZkXld/K6Ne4XHtufwgmUaXl98R4JR2IJ8x6hRC3Q2uD64A6dGb9tooU nakA== 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:to:from :dkim-signature; bh=TWtmfgvwYkUX9wcjAyTXXtbd5s1CzMoUdTQHNvNTkV0=; b=ovisoTXFT6gyiKzSZOhHJinW1oxzRTBW2oQnc/b67QUGIJSzBOJAwbCSsDM8Fr2zzu gJN8Pu3BJR3/bIDvUSCe62tqiShyDmUC58i1sjp0nEkwHYjz0bUeZc13H6HDVoADTR65 Q3ULDWVZRKGXZGGKTIqVzMcxr4BAzsAJhT7jkkItMRZs6YRO51G+DneOouUNQa4il6h2 QIJfgL6iefYRInChm7YfnFRS9oi877xzkNQmRDjp+kzWEX8QpnOeO0tYEOx/gChxcZiI r00pA7987j5uOC6NgURfSd7QKif95elQPkjjAo4rRBb70s4MHXgRjDmRb5LzesTtVb4r agRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rt7SQHtn; 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 a18-20020a0cca92000000b00440e46a7d7csi1252895qvk.538.2022.03.25.07.59.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Mar 2022 07:59:05 -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=rt7SQHtn; 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]:43442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nXlP6-0004x3-Sx for patch@linaro.org; Fri, 25 Mar 2022 10:59:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXlNb-0004s4-N7 for qemu-devel@nongnu.org; Fri, 25 Mar 2022 10:57:31 -0400 Received: from [2a00:1450:4864:20::333] (port=53861 helo=mail-wm1-x333.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nXlNa-0004D5-1Q for qemu-devel@nongnu.org; Fri, 25 Mar 2022 10:57:31 -0400 Received: by mail-wm1-x333.google.com with SMTP id p189so4605155wmp.3 for ; Fri, 25 Mar 2022 07:57:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=TWtmfgvwYkUX9wcjAyTXXtbd5s1CzMoUdTQHNvNTkV0=; b=rt7SQHtn5jkymSs/aVCTYbI4/EyyvxWwpCgO2Mb4bqdgxCorMSWaTMFcXvm1ZiTXkv ldcFZlvPGZLrG0pi4d/vDfGgAT6SiX2DRZx95X0EYaAW06Gy4Dh3Ms0lu4koRaizCEDk D10Ouk/GgpS1UWNbVu+WQAoPyVa0W0WEFTigK4JyDyKHnhp9gHIyegBpGITMGFInSdk9 DrTm6oypNtypGzAank0jZDCtJI3gre+GRHJz7GmQibuNNG8ONrazvk32fsKEDyrYmPLu BMmjwCNhw6n0nm/N7Dt2qBR6C1NTaTQ/SzS56Ve5KxfcsBu7OJKEs0Ly2bc7npwID7jO bYtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TWtmfgvwYkUX9wcjAyTXXtbd5s1CzMoUdTQHNvNTkV0=; b=J0tVNlaoqcdx2FtNPaxpDy6TPv0GauCiwohzYJ+Bop7L31EL4/3YQE+sTPkleoTzYw O9N93ucevX1IQlH3/aYCWOWa/vRR1e9qt+nsH3BEWIZ3rd0eeF+1f0Ps5gjaOqRDKl5N l5cps8CXZ3C/mGGQ2HRo7CyKF/4XSYYqKhtt5dkts0j7a8WINyWTmh0Ex6NnbmQv1pMH WH45hMOGSqnbXnX2175ia9RzOE4C457FUkPZ/6MIywnYUDG5iMxscpkEVinIjwpo14O1 fffqUl7dVWLgVAGFEeZvUzNphg9k2LY+1q5TsYtfPL+fO1BuaysNavrcUqw/i7nyqsMI MgNQ== X-Gm-Message-State: AOAM532H7nY9qs+BEYykPpGBRiRLbCcd5r1gtf/6vmriHu4CHLY1r4o1 iDQVUbP/UlhDSTLNf8fbdSdbXVOJfcqejQ== X-Received: by 2002:a1c:3bd5:0:b0:38c:9b9f:1b24 with SMTP id i204-20020a1c3bd5000000b0038c9b9f1b24mr19883235wma.129.1648220248502; Fri, 25 Mar 2022 07:57:28 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id c7-20020a5d4f07000000b00203db8f13c6sm5200583wru.75.2022.03.25.07.57.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 07:57:28 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 1/2] target/arm: Fix sve_ld1_z and sve_st1_z vs MMIO Date: Fri, 25 Mar 2022 14:57:24 +0000 Message-Id: <20220325145725.3891659-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220325145725.3891659-1-peter.maydell@linaro.org> References: <20220325145725.3891659-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::333 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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" From: Richard Henderson Both of these functions missed handling the TLB_MMIO flag during the conversion to handle MTE. Fixes: 10a85e2c8ab6 ("target/arm: Reuse sve_probe_page for gather loads") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/925 Signed-off-by: Richard Henderson Message-id: 20220324010932.190428-1-richard.henderson@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/sve_helper.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c index 07be55b7e1a..d45d0886159 100644 --- a/target/arm/sve_helper.c +++ b/target/arm/sve_helper.c @@ -6734,7 +6734,11 @@ void sve_ld1_z(CPUARMState *env, void *vd, uint64_t *vg, void *vm, if (mtedesc && arm_tlb_mte_tagged(&info.attrs)) { mte_check(env, mtedesc, addr, retaddr); } - host_fn(&scratch, reg_off, info.host); + if (unlikely(info.flags & TLB_MMIO)) { + tlb_fn(env, &scratch, reg_off, addr, retaddr); + } else { + host_fn(&scratch, reg_off, info.host); + } } else { /* Element crosses the page boundary. */ sve_probe_page(&info2, false, env, addr + in_page, 0, @@ -7112,7 +7116,9 @@ void sve_st1_z(CPUARMState *env, void *vd, uint64_t *vg, void *vm, if (likely(in_page >= msize)) { sve_probe_page(&info, false, env, addr, 0, MMU_DATA_STORE, mmu_idx, retaddr); - host[i] = info.host; + if (!(info.flags & TLB_MMIO)) { + host[i] = info.host; + } } else { /* * Element crosses the page boundary.