From patchwork Fri Mar 5 16:49:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 1448032 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=JlXkEaNi; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (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 ozlabs.org (Postfix) with ESMTPS id 4DsYdQ6N1cz9sVt for ; Sat, 6 Mar 2021 03:50:34 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=WS1PTm8FtXG1FPRvTHAvVbtnsGmbNfPExXGwr/FPimk=; b=JlXkEaNijZrhzQRYeDsgz5TY1r 6GeaAIar2FwUAJG9ao5/vBsI1dfbc5hq1wabFzVy9jIwIOrnD+8npSxD9VwE75Y6WbN3SxzDyrA5z DZtC/kPujvl1MGQSpz/72F8W0G9NmVC/7n7j7zx5LA4ET0MnEcAhtVSoD08eVn77gDwtTbVwojfmW DesJegj431L/2rqSjyXLjPxGn/2HVLOVB6xe9ALaz3L1MAidRiMqukvZ3zbtkieZdHdDmF7TK0k79 7i/vR+w4rJbeWkimaEx+8Jy4+5bWJZ/uuSPTxlY26uquTkwoObz+eleAsyZzOSqAsSwA5kg2HeE/w ZBrr1/Qw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIDeO-00FgBV-PW; Fri, 05 Mar 2021 16:50:04 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIDeH-00FgAE-C4 for linux-arm-kernel@lists.infradead.org; Fri, 05 Mar 2021 16:49:59 +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 A88946508B; Fri, 5 Mar 2021 16:49:55 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lIDeD-00HWzC-DC; Fri, 05 Mar 2021 16:49:53 +0000 From: Marc Zyngier To: Paolo Bonzini Cc: Alexandru Elisei , Andre Przywara , Andrew Scull , Catalin Marinas , Christoffer Dall , Howard Zhang , Jia He , Mark Rutland , Quentin Perret , Shameerali Kolothum Thodi , Suzuki K Poulose , Will Deacon , James Morse , Julien Thierry , kernel-team@android.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [GIT PULL] KVM/arm64 fixes for 5.12, take #1 Date: Fri, 5 Mar 2021 16:49:43 +0000 Message-Id: <20210305164944.3729910-1-maz@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: pbonzini@redhat.com, alexandru.elisei@arm.com, andre.przywara@arm.com, ascull@google.com, catalin.marinas@arm.com, christoffer.dall@arm.com, Howard.Zhang@arm.com, justin.he@arm.com, mark.rutland@arm.com, qperret@google.com, shameerali.kolothum.thodi@huawei.com, suzuki.poulose@arm.com, will@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, kernel-team@android.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org 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-20210305_164958_106874_3BE6E124 X-CRM114-Status: GOOD ( 13.36 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: Spam detection software, running on the system "desiato.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: Hi Paolo, Here's the first batch of fixes for 5.12. We have a handful of low level world-switch regressions, a page table walker fix, more PMU tidying up, and a workaround for systems with creative firmware. 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_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches 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 Hi Paolo, Here's the first batch of fixes for 5.12. We have a handful of low level world-switch regressions, a page table walker fix, more PMU tidying up, and a workaround for systems with creative firmware. Note that this is based on -rc1 despite the breakage, as I didn't feel like holding these patches until -rc2. Please pull, M. The following changes since commit fe07bfda2fb9cdef8a4d4008a409bb02f35f1bd8: Linux 5.12-rc1 (2021-02-28 16:05:19 -0800) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-fixes-5.12-1 for you to fetch changes up to e85583b3f1fe62c9b371a3100c1c91af94005ca9: KVM: arm64: Fix range alignment when walking page tables (2021-03-04 09:54:12 +0000) ---------------------------------------------------------------- KVM/arm64 fixes for 5.12, take #1 - Fix SPE context save/restore on nVHE - Fix some subtle host context corruption on vcpu exit - Fix panic handling on nVHE - Prevent the hypervisor from accessing PMU registers when there is none - Workaround broken firmwares advertising bogus GICv2 compatibility - Fix Stage-2 unaligned range unmapping ---------------------------------------------------------------- Andrew Scull (1): KVM: arm64: Fix nVHE hyp panic host context restore Jia He (1): KVM: arm64: Fix range alignment when walking page tables Marc Zyngier (4): KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key KVM: arm64: Don't access PMSELR_EL0/PMUSERENR_EL0 when no PMU is available KVM: arm64: Rename __vgic_v3_get_ich_vtr_el2() to __vgic_v3_get_gic_config() KVM: arm64: Workaround firmware wrongly advertising GICv2-on-v3 compatibility Suzuki K Poulose (1): KVM: arm64: nvhe: Save the SPE context early Will Deacon (1): KVM: arm64: Avoid corrupting vCPU context register in guest exit arch/arm64/include/asm/kvm_asm.h | 4 ++-- arch/arm64/include/asm/kvm_hyp.h | 8 ++++++- arch/arm64/kernel/image-vars.h | 3 +++ arch/arm64/kvm/hyp/entry.S | 2 +- arch/arm64/kvm/hyp/include/hyp/switch.h | 9 +++++--- arch/arm64/kvm/hyp/nvhe/debug-sr.c | 12 ++++++++-- arch/arm64/kvm/hyp/nvhe/host.S | 15 +++++++------ arch/arm64/kvm/hyp/nvhe/hyp-main.c | 6 ++--- arch/arm64/kvm/hyp/nvhe/switch.c | 14 +++++++++--- arch/arm64/kvm/hyp/pgtable.c | 1 + arch/arm64/kvm/hyp/vgic-v3-sr.c | 40 +++++++++++++++++++++++++++++++-- arch/arm64/kvm/perf.c | 10 +++++++++ arch/arm64/kvm/pmu-emul.c | 10 --------- arch/arm64/kvm/vgic/vgic-v3.c | 12 +++++++--- include/kvm/arm_pmu.h | 9 ++++++-- 15 files changed, 116 insertions(+), 39 deletions(-)