From patchwork Fri Oct 30 16:40:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 1391152 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:1231::1; helo=merlin.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=merlin.20170209 header.b=hOYrIKlF; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=default header.b=mY2QczB+; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 4CN7NR5H3Tz9s0b for ; Sat, 31 Oct 2020 03:40:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=r5d/z8xeIoqCSI/M08j4nFhEcHAqrctvn74NpG45CpU=; b=hOYrIKlFTYyBQ3xjnTEarHmN+b 2pwwtDXNcw4WOU394ePVxaZWenpVyotBRkh+j+F+Po0soGxqky6dMmD/ixKRL3+NeCXTeNznvBfwS o46JFHHi6TFP+F+y2DeGnIhzVA1kgSKATHIFkG7mNQTAEZ2KUD25lH0M6eTFvC93Zv0rMOiT6dONh RWH2bvBeoVvJyfj4dAA2QJquJMm2EbSwEc28afcX2WkVxsKOq8QsH8F4wYYZauLYO9iv2ob6mUx07 MVhaJvhiYdwPPWcG/LxBBFPCdbtAaN+16KtZHHZSzwMp8EHI1F/2gYSnayda1v0vtfaAE4XVQZHif Akram2LQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYXS2-0004IT-KA; Fri, 30 Oct 2020 16:40:30 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYXRy-0004G6-8J for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 16:40:27 +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 692BA20756; Fri, 30 Oct 2020 16:40:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604076025; bh=5IdJB+vSy9WtqFoTUhuMK/Ne2TdAtmbDZodcpICYmnU=; h=From:To:Cc:Subject:Date:From; b=mY2QczB+bo87U8fMn7qv4VHllqSccKIUuhsW02/aX4Yuj8hqMHxzWIpI/pbvM9juv TIJ34uxNPzi5eMZdtSGLXP7Rq5BKtOojZdB/xkk1SA9Aoe32WIxPEu2mkS0OK998DC PcLczwkdcqVxVXvgyHHQBRK9HdIjhMRqE5f0cSfs= 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 1kYXRu-005noK-96; Fri, 30 Oct 2020 16:40:22 +0000 From: Marc Zyngier To: Paolo Bonzini Subject: [GIT PULL] KVM/arm64 fixes for 5.10, take #1 Date: Fri, 30 Oct 2020 16:40:05 +0000 Message-Id: <20201030164017.244287-1-maz@kernel.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: pbonzini@redhat.com, dbrazdil@google.com, gshan@redhat.com, james.morse@arm.com, mark.rutland@arm.com, qais.yousef@arm.com, qperret@google.com, sashukla@nvidia.com, vladimir.murzin@arm.com, will@kernel.org, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.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-20201030_124026_471354_8F51A623 X-CRM114-Status: GOOD ( 14.14 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-5.2 points) 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 -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Santosh Shukla , Gavin Shan , kvm@vger.kernel.org, Quentin Perret , kernel-team@android.com, Suzuki K Poulose , kvmarm@lists.cs.columbia.edu, Vladimir Murzin , James Morse , linux-arm-kernel@lists.infradead.org, David Brazdil , Will Deacon , Qais Yousef , Julien Thierry Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org [Apologies for the spam, I appear to have forgotten to Cc the lists in my initial posting] Hi Paolo, It was good to see you (and everyone else) at KVM Forum this week! And to celebrate, here's a first batch of fixes for KVM/arm64. A bunch of them are addressing issues introduced by the invasive changes that took place in the 5.10 merge window (MM, nVHE host entry). A few others are addressing some older bugs (VFIO PTE mappings, AArch32 debug, composite huge pages), and a couple of improvements (HYP-visible capabilities are made more robust). Please pull, M. The following changes since commit 4e5dc64c43192b4fd4c96ac150a8f013065f5f5b: Merge branches 'kvm-arm64/pt-new' and 'kvm-arm64/pmu-5.9' into kvmarm-master/next (2020-10-02 09:25:55 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-fixes-5.10-1 for you to fetch changes up to 22f553842b14a1289c088a79a67fb479d3fa2a4e: KVM: arm64: Handle Asymmetric AArch32 systems (2020-10-30 16:06:22 +0000) ---------------------------------------------------------------- KVM/arm64 fixes for 5.10, take #1 - Force PTE mapping on device pages provided via VFIO - Fix detection of cacheable mapping at S2 - Fallback to PMD/PTE mappings for composite huge pages - Fix accounting of Stage-2 PGD allocation - Fix AArch32 handling of some of the debug registers - Simplify host HYP entry - Fix stray pointer conversion on nVHE TLB invalidation - Fix initialization of the nVHE code - Simplify handling of capabilities exposed to HYP - Nuke VCPUs caught using a forbidden AArch32 EL0 ---------------------------------------------------------------- Gavin Shan (1): KVM: arm64: Use fallback mapping sizes for contiguous huge page sizes Marc Zyngier (4): KVM: arm64: Don't corrupt tpidr_el2 on failed HVC call KVM: arm64: Remove leftover kern_hyp_va() in nVHE TLB invalidation KVM: arm64: Drop useless PAN setting on host EL1 to EL2 transition KVM: arm64: Fix AArch32 handling of DBGD{CCINT,SCRext} and DBGVCR Mark Rutland (3): KVM: arm64: Factor out is_{vhe,nvhe}_hyp_code() arm64: cpufeature: reorder cpus_have_{const, final}_cap() arm64: cpufeature: upgrade hyp caps to final Qais Yousef (1): KVM: arm64: Handle Asymmetric AArch32 systems Santosh Shukla (1): KVM: arm64: Force PTE mapping on fault resulting in a device mapping Will Deacon (2): KVM: arm64: Allocate stage-2 pgd pages with GFP_KERNEL_ACCOUNT KVM: arm64: Fix masks in stage2_pte_cacheable() arch/arm64/include/asm/cpufeature.h | 40 ++++++++++++++++++++++++++++--------- arch/arm64/include/asm/kvm_host.h | 1 + arch/arm64/include/asm/virt.h | 9 ++++----- arch/arm64/kernel/image-vars.h | 1 - arch/arm64/kvm/arm.c | 19 ++++++++++++++++++ arch/arm64/kvm/hyp/nvhe/host.S | 2 -- arch/arm64/kvm/hyp/nvhe/hyp-init.S | 23 ++++++++++++++------- arch/arm64/kvm/hyp/nvhe/tlb.c | 1 - arch/arm64/kvm/hyp/pgtable.c | 4 ++-- arch/arm64/kvm/mmu.c | 27 ++++++++++++++++++------- arch/arm64/kvm/sys_regs.c | 6 +++--- 11 files changed, 96 insertions(+), 37 deletions(-)