From mboxrd@z Thu Jan 1 00:00:00 1970 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 65FDBC433FE for ; Sat, 12 Nov 2022 11:35:50 +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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=m+xkvfbM7CXekICdVTY9OCttYkarUU1uyyZKoOCvidk=; b=NPk4BG4fbS6hdY T/3UZK08fvI3NiJtBhvEaYaSmV6FF60CnA0mxRbc3IQjObsYf6SzYLcTqC46oLyp8PfyXXn6xngSM H3PnDp96Z2VHrxDw1WknxJO+M5x1taKEqtrdLQdAe7BFPFpHM8QmL631mdos6jWnPUnrIaYUatEqs aPA4kERp52YbAkAss0SkRCAYN00svc5HuZUgfe5c34LYLY/u+WQtGmQnxX0W0FDR6t/r/Zg8p4P1+ 9i4xH+3ZCn/D9OrRqS4is+x9nldy4jf3H6uznAjbaLo2NPKMwxm7x+tOCnz1bAyh4M2MZrEAzGj0x rm3l1v8Pv3xjN8StDKkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otomK-005JNf-MW; Sat, 12 Nov 2022 11:34:28 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otomA-005JLl-HP for linux-arm-kernel@lists.infradead.org; Sat, 12 Nov 2022 11:34:26 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 97ABEB80749; Sat, 12 Nov 2022 11:34:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 33375C433D6; Sat, 12 Nov 2022 11:34:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668252852; bh=TICsOqZ+F6SCs8G9lz3hREYCxOxvmit4kwLHuA53NFE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RJaaG/Yy84x70uMAmz/9oA2n9R0eQJaoaskobxifQYzrQfTHFC59bzXC40+Zi0yz4 0BiG+sQ4zb0GGUtGTbweCSivDNXN3jICCLOE0ZC6u2wgxdFR1rlKxPlOK/CBg7Qcnd sAPwFfnPN6BXSnPv/ScjxXa2QW6rh0Ii1npijKIJz5wnfEMuFNA0rct2vg72Sa1JPv 9It3jDsczE10BO01LZ8jSlbNIhIBaG6/vu1hHDNoiETnh8txCFoZkMg7nKqcohPjam othJH4WbbTiNwa235KuT+Fh3w/Ow5xSz3A13xuZiriX5Unbd0mI7W1X81cASGMtS9P UmtAURCR5iuFQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1otom1-005bXl-MX; Sat, 12 Nov 2022 11:34:09 +0000 Date: Sat, 12 Nov 2022 11:34:09 +0000 Message-ID: <86bkpcpfta.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Will Deacon , kvmarm@lists.linux.dev, Vincent Donnefort , James Morse , Mark Rutland , Alexandru Elisei , kernel-team@android.com, Quentin Perret , Philippe =?UTF-8?B?TWF0aGlldS1EYXVkw6k=?= , Suzuki K Poulose , Fuad Tabba , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sean Christopherson , Catalin Marinas , Chao Peng Subject: Re: [PATCH v6 00/26] KVM: arm64: Introduce pKVM hyp VM and vCPU state at EL2 In-Reply-To: References: <20221110190259.26861-1-will@kernel.org> <166819337067.3836113.13147674500457473286.b4-ty@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, will@kernel.org, kvmarm@lists.linux.dev, vdonnefort@google.com, james.morse@arm.com, mark.rutland@arm.com, alexandru.elisei@arm.com, kernel-team@android.com, qperret@google.com, philmd@linaro.org, suzuki.poulose@arm.com, tabba@google.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, seanjc@google.com, catalin.marinas@arm.com, chao.p.peng@linux.intel.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-20221112_033424_978586_359E0BCD X-CRM114-Status: GOOD ( 35.01 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 11 Nov 2022 20:08:46 +0000, Oliver Upton wrote: > > On Fri, Nov 11, 2022 at 07:06:14PM +0000, Marc Zyngier wrote: > > On Thu, 10 Nov 2022 19:02:33 +0000, Will Deacon wrote: > > > This is version six of the pKVM EL2 state series, extending the pKVM > > > hypervisor code so that it can dynamically instantiate and manage VM > > > data structures without the host being able to access them directly. > > > These structures consist of a hyp VM, a set of hyp vCPUs and the stage-2 > > > page-table for the MMU. The pages used to hold the hypervisor structures > > > are returned to the host when the VM is destroyed. > > > > > > [...] > > > > As for Oliver's series, I've tentatively applied this to -next. > > I've dropped Oliver's patch for now, but kept the RFC one. Maybe I'll > > change my mind. > > > > Anyway, there was an interesting number of conflicts between the two > > series, which I tried to resolve as well as I could, but it is likely > > I broke something (although it compiles, so it must be perfect). > > > > Please have a look and shout if/when you spot something. > > Here is where you and I diverged on the conflict resolution, neither > amounts to a whole lot but feel free to squash in. Hoping that Will + co > can test the pKVM side of this. > > diff --git a/arch/arm64/kvm/hyp/nvhe/mm.c b/arch/arm64/kvm/hyp/nvhe/mm.c > index f2c4672697c2..318298eb3d6b 100644 > --- a/arch/arm64/kvm/hyp/nvhe/mm.c > +++ b/arch/arm64/kvm/hyp/nvhe/mm.c > @@ -265,7 +265,7 @@ static int __create_fixmap_slot_cb(const struct kvm_pgtable_visit_ctx *ctx, > { > struct hyp_fixmap_slot *slot = per_cpu_ptr(&fixmap_slots, (u64)ctx->arg); > > - if (!kvm_pte_valid(*ctx->ptep) || ctx->level != KVM_PGTABLE_MAX_LEVELS - 1) > + if (!kvm_pte_valid(ctx->old) || ctx->level != KVM_PGTABLE_MAX_LEVELS - 1) > return -EINVAL; > > slot->addr = ctx->addr; > diff --git a/arch/arm64/kvm/hyp/nvhe/setup.c b/arch/arm64/kvm/hyp/nvhe/setup.c > index b47d969ae4d3..110f04627785 100644 > --- a/arch/arm64/kvm/hyp/nvhe/setup.c > +++ b/arch/arm64/kvm/hyp/nvhe/setup.c > @@ -190,7 +190,7 @@ static void hpool_put_page(void *addr) > } > > static int fix_host_ownership_walker(const struct kvm_pgtable_visit_ctx *ctx, > - enum kvm_pgtable_walk_flags visit) > + enum kvm_pgtable_walk_flags visit) > { > enum kvm_pgtable_prot prot; > enum pkvm_page_state state; > Thanks. I've folded that in the resolution and regenerated the -next branch after taking another patch from Gavin in the dirty-ring series. I've managed to test the result on both VHE and nVHE this morning, and the wheels are still attached. I don't have a good setup for pKVM at the moment though, and it is likely that the rest of the monster series will need some rework. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel