From patchwork Tue May 28 12:59:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fuad Tabba X-Patchwork-Id: 13676671 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DE0CC25B78 for ; Tue, 28 May 2024 13:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=CLh62YknVVgp9xuqQ7Bos/WveevGx67ryXbVsQj8icA=; b=BSw4l6jEVDdzNac6ve9dpJAiIU niY+Th7mKKWNnhrVqNrODJLUdUkAIIgSaazdyaKNLFNVkhJd0J8LAFSZQKy0I9NPBkSrWIEQvuHXd HxKSisP9SuOov66RjFrl/DH/0Gf96V+ZjjJhieFZtXdxtvDle6qIO4GAmiLrNVMoBo4XH3or8Ibgu BlVhMnSzDaYpbcN1ZWwV97k5F694VuITh9ZGP6LyXmQkfvcg+WFtZwN2wadF+E187JSkMvuid1cjX 7YxMWMv2C32HrC8dknfj7gMQkC8kEtjMgHvsCM/8/X1W3192IzP4mEtT5ohcG9EXSzlL6pxJCnYRl mm2B1+yQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBwSD-00000000geD-1BtP; Tue, 28 May 2024 13:01:25 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBwQW-00000000fhB-2p4s for linux-arm-kernel@lists.infradead.org; Tue, 28 May 2024 12:59:42 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-df7719a8e7dso1325340276.1 for ; Tue, 28 May 2024 05:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1716901178; x=1717505978; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Xp4TCseA8S3pG6dkj/s1gzJJ872SKDig/yFvrCI2SV0=; b=IS+OYHoVefPfz20lq8GMkEGuvBM/5VXud4EUaxXGvP55Idil1mWjd4eIdaxod4KVN1 /hYqVKN8r2jwcZF2Qc+6CaqxP8Pdx14tfi6JoI3KLqGOA6o5TWliiM7zvW+goecxSofG Cx7LuXXJlsBVWtxNvjo6E8lCMb7a0aw/acSnT5VtdoBBYJxhFSjILvjnOuVFWOkeX9Mk VYK3OrbHjW+mNFyMUqJ25+TpAITkFnvgt8CMQl9SFDi7He/wFkO3cGTG0PBdFX4VLh9w B96/SlyscPFlEPgi2ZRkUjTou0887Ukvns0VH6eAu/q/Rz4wotc66peEdlsx1y5OxeTv 0yYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716901178; x=1717505978; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Xp4TCseA8S3pG6dkj/s1gzJJ872SKDig/yFvrCI2SV0=; b=iy48AbHK9UBukI7/N0w+t6QJ9TCS1zXlylacTI+labcpnrvZU2H7UEDht6DhjzauYm T5vdycww2gQNd1jPwEWsPNW1WsQaQ2EzRD6B5P23XF3wsDRXPF6twCOt545dNzo3Qdt0 28h7BAPDTZZ8+7eOUDvrqUQAlUmc5VBLcrRA7QjgwoT/9u6/+AhG/i8AUSpBsT6tY+Bo y3PLg1qwJjyhTqlv4bX3WwOCuAbb6/O85BFOyyxPy6tBllGzlsOqM9KA/gDT/rrnXm9/ pZ3fUi/87hWbNNWCLwVodwmFcCcJUEEEDhylFmlzrG07OWElSA/b/C4lswIlaSVBOflb 8XYA== X-Forwarded-Encrypted: i=1; AJvYcCXzu0/xviNY0cpCKVgPIAYbPrckrg8uU7DwK1V53BilQFh5u+LQ7hKo4Ilo2pXGpk4qRnhbdxyF7J+c/piUUcc8qIPb969QeuJAXxm4jXBeLwSUUyo= X-Gm-Message-State: AOJu0Yy3dKvJbtyBBBRcJFsIyby2xaZpu29/erJIRreIEtyx0GtU+bPQ 3pKui3o84OOUC/tOC6Au5VyR1P8XHZ73YUIpei40siAXri5bQ2jtdO2esN+Mvt7+AbVMqE9EhQ= = X-Google-Smtp-Source: AGHT+IEvPGQEXgcVtlwFwfvohMrl8h9bv++S4JYU0s4Tq8mNBnEuIpsELqH9pDFR6aLY5IgHq4tB6CTx7Q== X-Received: from fuad.c.googlers.com ([fda3:e722:ac3:cc00:28:9cb1:c0a8:1613]) (user=tabba job=sendgmr) by 2002:a05:6902:114d:b0:df7:a340:45e5 with SMTP id 3f1490d57ef6-df7a3404caamr1868809276.9.1716901177880; Tue, 28 May 2024 05:59:37 -0700 (PDT) Date: Tue, 28 May 2024 13:59:12 +0100 In-Reply-To: <20240528125914.277057-1-tabba@google.com> Mime-Version: 1.0 References: <20240528125914.277057-1-tabba@google.com> X-Mailer: git-send-email 2.45.1.288.g0e0cd299f1-goog Message-ID: <20240528125914.277057-10-tabba@google.com> Subject: [PATCH v3 09/11] KVM: arm64: Do not use sve_cond_update_zcr updating with ZCR_ELx_LEN_MASK From: Fuad Tabba To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: maz@kernel.org, will@kernel.org, qperret@google.com, tabba@google.com, seanjc@google.com, alexandru.elisei@arm.com, catalin.marinas@arm.com, philmd@linaro.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, mark.rutland@arm.com, broonie@kernel.org, joey.gouly@arm.com, rananta@google.com, yuzenghui@huawei.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240528_055940_987036_F6F26E14 X-CRM114-Status: GOOD ( 11.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org A conditional update of ZCR with ZCR_ELx_LEN_MASK is unlikely to be beneficial, since at the time nobody implements 2k vectors. Signed-off-by: Fuad Tabba --- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-main.c b/arch/arm64/kvm/hyp/nvhe/hyp-main.c index 1088b0bd3cc5..b28d7d8cdc30 100644 --- a/arch/arm64/kvm/hyp/nvhe/hyp-main.c +++ b/arch/arm64/kvm/hyp/nvhe/hyp-main.c @@ -468,7 +468,7 @@ void handle_trap(struct kvm_cpu_context *host_ctxt) case ESR_ELx_EC_SVE: cpacr_clear_set(0, CPACR_ELx_ZEN); isb(); - sve_cond_update_zcr_vq(ZCR_ELx_LEN_MASK, SYS_ZCR_EL2); + write_sysreg_s(ZCR_ELx_LEN_MASK, SYS_ZCR_EL2); break; case ESR_ELx_EC_IABT_LOW: case ESR_ELx_EC_DABT_LOW: