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 A89D4C61DA4 for ; Wed, 22 Feb 2023 20:43:54 +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=HG7OtZTsBlCEx5dRU1x7gJOjErjLjt7pax9YSgRQpuI=; b=lptVzY+rD8tsTC QedpXBBSL1lTOMJs+finzLz5xUkBqD1cK4vo/W5OZ/c87l8Zk1NyNs9JIUvksMEqzBwjGb3Y37zLx xpiALROR3RSX9z7f67LdneHJbQShn5FTDh8aHqFq3ODcRacI0aIbGlGnc173kRxPBGt+64a4zv8TP vQ9ktx7LF5PZPimsSqnqN9TwvW/xo7pydK3WovOFDqhtCeFsbaxs+ZISUNAd+7WMiDxzViZwaOffA fkQi9Ep5J2od7OTD1KtuFI8h7rr9FOG81M0bunONieJQ3zQsD5KKwbYeZB2AUeuSDfRHrfaDHXR83 jdPEQf9TIMzJXV1cjTJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUvwv-00E2oJ-EV; Wed, 22 Feb 2023 20:42:49 +0000 Received: from out-46.mta1.migadu.com ([95.215.58.46]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pUvwr-00E2mg-SB for linux-arm-kernel@lists.infradead.org; Wed, 22 Feb 2023 20:42:47 +0000 Date: Wed, 22 Feb 2023 20:42:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1677098561; 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=kD+XppnfLP0E2iO1C7ruilUpekZwlEOlQK4WHR1kf+Q=; b=W9gFc4CfCTYwQDXk138UV69Yq2TsLPPEsIqcKsb6iicowcIbtY+j4q2Fb7ivGZZRFtDfGT Tt8eko0kRCo1vi6aKPEhg2lfXYeBQDFtwZxGwH/VfKpgCVFSFqFe5NoV1LDxOY+W2EbDx2 8AzxaJpFZCTvEjznVnFpuD+3b61QGBY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Ryan Roberts Cc: Marc Zyngier , Anshuman Khandual , kvmarm@lists.cs.columbia.edu, Catalin Marinas , kvmarm@lists.linux.dev, Will Deacon , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1 00/12] KVM: arm64: Support FEAT_LPA2 at hyp s1 and vm s2 Message-ID: References: <20221206135930.3277585-1-ryan.roberts@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230222_124246_351525_FD701CDA X-CRM114-Status: GOOD ( 25.72 ) 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 Hi Ryan, On Mon, Feb 20, 2023 at 02:17:30PM +0000, Ryan Roberts wrote: > Hi Oliver, > > Apologies for having gone quiet on this. I came back to this work today only to > notice that you sent the below response on the 20th Dec but it did not get > picked up by my mail client somehow (although I'm sure it was operator error). I > just spotted it on lore.kernel.org. Huh, sounds like the arm mail server is not a fan of me... Alex reported my messages arriving in spam as well. I'll let you decide what that means about what I have to say :) > I'm planning to post a second version soon-ish, with all your comments > addressed. I think everything except the below is pretty clear and straight forward. Great! > On 20/12/2022 18:28, Oliver Upton wrote: > > Ryan, you say that it is possible for hardware to support LPA2 for a > > single stage of translation. Are you basing that statement on something > > in the Arm ARM or the fact that there are two different enumerations > > for stage-1 and stage-2? > > Its based on there being 2 separate enumerations. I've dug into this with our > architecture folks; while it is clearly possible that the HW (or L0 hyp) to > present an ID register that says one stage supports LPA2 and the other doesn't, > the real intention behind having the 2 fields separated out is for an L0 hyp to > be able to limit the stage2 granule sizes that it advertises to guest > hypervisors. There are no anticipated use cases where HW or L0 hypervisor might > want to advertise support for LPA2 in one stage and not the other. Yep, this is exactly what I was getting at. My impression of the stage-2 enumerations was that they solely exist for choking down the supported granule size, I was quite surprised to see LPA2 show up in both fields independently. > So on that basis, it sounds to me like we should just test for LPA2 support in > both stages and require both to be supported. That simplifies things > significantly - I can just use a static key to globally flip between pte > formats, and a bunch of the noisy refactoring disappears. Whoever wants to take advantage of split support is welcome to share their use case and upstream the patches. Otherwise, I think the simpler approach to enlightening KVM of LPA2 reduces friction on actually getting the initial enablement done. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel