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 05DB6C4332F for ; Fri, 11 Nov 2022 20:10:23 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vNVEqN6H+DbMGdyJ8XfM90NcCCax/mnbGcemnPN4Ph4=; b=xR9FiPYS6yC1dD D1Qb2rw/EPABAaaR/9NtcOT0vTGmVOALOZT02kCT06Qri198c9eH8SP240W5uOu/ImkkP4YJv/dMk z72xsQVIi5PGSWfSYtX2cARrjrh3YKOaiD4n0zuBe+GL+SZMxE4RlJic6IQhY33ays0aRbU/aDh/X kfDjHDvwuxDUgZs6hyHCbZB/MuFxHteKlP9rxri6pmPXQ7vnOj+RuNPj8TAWFNoiH6C9jt2210IOU T+gAmfbfzZk+JM+lhAVPaWfbcgqiD7BoCbMXFzvA+B9FIxte9F8QnT52W+g/9VPFBWdBwn7mEAvs8 u5V16brxvSaTguz/R8ZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otaKi-000pZP-7d; Fri, 11 Nov 2022 20:09:00 +0000 Received: from out0.migadu.com ([2001:41d0:2:267::]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otaKe-000pW6-0j for linux-arm-kernel@lists.infradead.org; Fri, 11 Nov 2022 20:08:58 +0000 Date: Fri, 11 Nov 2022 20:08:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1668197331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CR/BgVwe7HxMaTNopzcYpQIyocAwzhPLTHwWe8JX9Gw=; b=OM7owYX06RCsWyr3GpCAaL643zHY+VuwSmSnrlYjCjLQ61BDWMzV5BxFBxTxGP2IW/CEW9 oK2VL8hw8Vil+G29J6pG+qEaAGCCooA3ymhNAFp9cqj1wbQO4OaE80xeUPkhiqc5xfu9dr a9fHq9pK7su/PInOw+OmYLq4keyUK/0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Marc Zyngier Cc: Will Deacon , kvmarm@lists.linux.dev, Vincent Donnefort , James Morse , Mark Rutland , Alexandru Elisei , kernel-team@android.com, Quentin Perret , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , 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 Message-ID: References: <20221110190259.26861-1-will@kernel.org> <166819337067.3836113.13147674500457473286.b4-ty@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <166819337067.3836113.13147674500457473286.b4-ty@kernel.org> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221111_120856_566009_65468FD6 X-CRM114-Status: GOOD ( 21.56 ) 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, 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, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel