From patchwork Thu Nov 25 16:19:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 1559800 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=KhC6ndao; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J0NPV5rGjz9sR4 for ; Fri, 26 Nov 2021 03:19:42 +1100 (AEDT) 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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=YQlSwWXPw07DML+FruLRAVtsW4o8yHIzCs8whwth4Vw=; b=KhC6ndao2uFuOs MEIeMA83dSzBiQ/RrWkn02AYhg7i+7oSmTO+iNRd2ZPufZbEF1ErtDVpOhwHpBxGDYKFRY4jvnMtQ xcu//eUr/pM/QiSEk+nQ3J4EcqKY5VBIuySWw0KLdpswlqQNKe9fTjbM5PY3GJBDNP++rovzz1mA4 T2l/koR5l7q1ToB8nznX2yhCoDOLb4T06vpEgID0M4L1fBHxlLjcyDo4w5GB7hdyBPVyo6eU0wX3R /fI2n27+2Z2H0vyaF28ZZwJ3oxk1Mf3uNxAWSWWB85YGKM8S1rKxDMEjJ+WLzXuZ1aG0MIigxoF3o Wy/wleYEI0W/Oi2ulm2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqHSv-008GXL-HK; Thu, 25 Nov 2021 16:19:18 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mqHSn-008GVe-4C for linux-arm-kernel@lists.infradead.org; Thu, 25 Nov 2021 16:19:12 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9074160FE7; Thu, 25 Nov 2021 16:19:07 +0000 (UTC) Received: from sofa.misterjones.org ([185.219.108.64] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mqHSj-007qd3-84; Thu, 25 Nov 2021 16:19:05 +0000 From: Marc Zyngier To: Paolo Bonzini Cc: Catalin Marinas , Chris January , Fuad Tabba , Will Deacon , James Morse , Suzuki K Poulose , Alexandru Elisei , linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, kernel-team@android.com Subject: [GIT PULL] KVM/arm64 fixes for 5.16, take #2 Date: Thu, 25 Nov 2021 16:19:02 +0000 Message-Id: <20211125161902.106749-1-maz@kernel.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: pbonzini@redhat.com, catalin.marinas@arm.com, Chris.January@arm.com, tabba@google.com, will@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, alexandru.elisei@arm.com, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, kernel-team@android.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211125_081909_240939_93B481C8 X-CRM114-Status: GOOD ( 12.45 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Paolo, Here's the second set of fixes for 5.16. The main items are a fix for an unfortunate signed constant extension, leading to an unbootable kernel on ARMv8.7 systems. The two other patches are fixes for [...] Content analysis details: (-5.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [198.145.29.99 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 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+incoming-imx=patchwork.ozlabs.org@lists.infradead.org Paolo, Here's the second set of fixes for 5.16. The main items are a fix for an unfortunate signed constant extension, leading to an unbootable kernel on ARMv8.7 systems. The two other patches are fixes for the rare cases where we evaluate PSTATE too early on guest exit. Please pull, M. The following changes since commit fa55b7dcdc43c1aa1ba12bca9d2dd4318c2a0dbf: Linux 5.16-rc1 (2021-11-14 13:56:52 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-fixes-5.16-2 for you to fetch changes up to 1f80d15020d7f130194821feb1432b67648c632d: KVM: arm64: Avoid setting the upper 32 bits of TCR_EL2 and CPTR_EL2 to 1 (2021-11-25 15:51:25 +0000) ---------------------------------------------------------------- KVM/arm64 fixes for 5.16, take #2 - Fix constant sign extension affecting TCR_EL2 and preventing running on ARMv8.7 models due to spurious bits being set - Fix use of helpers using PSTATE early on exit by always sampling it as soon as the exit takes place - Move pkvm's 32bit handling into a common helper ---------------------------------------------------------------- Catalin Marinas (1): KVM: arm64: Avoid setting the upper 32 bits of TCR_EL2 and CPTR_EL2 to 1 Marc Zyngier (2): KVM: arm64: Save PSTATE early on exit KVM: arm64: Move pkvm's special 32bit handling into a generic infrastructure arch/arm64/include/asm/kvm_arm.h | 4 ++-- arch/arm64/kvm/hyp/include/hyp/switch.h | 14 ++++++++++++++ arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 7 ++++++- arch/arm64/kvm/hyp/nvhe/switch.c | 8 +------- arch/arm64/kvm/hyp/vhe/switch.c | 4 ++++ 5 files changed, 27 insertions(+), 10 deletions(-)