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 EB894C25B5F for ; Mon, 6 May 2024 17:36:09 +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=TsdxMCG1dsmB+Xqldlmr3xF1AR2lRU0/5vaRYszXPNM=; b=R6d1xQmgf06Lep ZxuQpy5+KpOjgPi5NIFbWoUdMMEWFZL2iV0R/QS/mp/gh16EVaGJTWWGLVZ4tV1TK694oi4dKY/K+ 89b5nImMp2N0feCOeiIMGcp/ieMBxmHIkfFKirCaOB9ewZL0LUWA6v0j6x3Ijf66U2z+ctZvPqJSU WRfVV74heXkaI23beTmTbD7mGKUWFn6SWe54Xg+5p6HYy0UonoMfF4Samd774BkKBBDauCOFJPrqI 3/fopzcfLWb6/WZjXlTO0+0G0VbKOOzEev63GZy188Gek0+iJQwE0i/s/Du2ageqtAHOTtt6bTpLM p+schxOJIxgVTr7vC07g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s42Fk-00000008G3W-1M5R; Mon, 06 May 2024 17:35:52 +0000 Received: from out-187.mta0.migadu.com ([91.218.175.187]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s42Fh-00000008G2Q-0E7I for linux-arm-kernel@lists.infradead.org; Mon, 06 May 2024 17:35:50 +0000 Date: Mon, 6 May 2024 17:35:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1715016944; 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=RgKXusuHKHkq5SgVIZ+1zKT/7zi+FklfTPfVp22pWBQ=; b=T/fNKyNO24FaKcrUIRzbjfH2nva1HAe9HtRGPfJMYqv3481QWFoaZpHSwMwVcy5vWLWPgV A3rF5llZjnPnHNzAiV+CC5KpFoly1UO/rcAV/1qW4o4gQ0Ij76L68+Y9ge3V0MnIEam3HZ IJo+M20Qlvwf43gH6F3Mbci0Oi3xXUg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Will Deacon Cc: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Marc Zyngier Subject: Re: [PATCH 1/2] KVM: arm64: Fix hvhe/nvhe early alias parsing Message-ID: References: <20240501163400.15838-1-will@kernel.org> <20240501163400.15838-2-will@kernel.org> <20240502102030.GA16965@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240502102030.GA16965@willie-the-truck> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_103549_446765_02EABEA5 X-CRM114-Status: GOOD ( 18.19 ) 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 Thu, May 02, 2024 at 11:20:30AM +0100, Will Deacon wrote: > Hey Oliver, > > On Wed, May 01, 2024 at 05:44:57PM +0000, Oliver Upton wrote: > > On Wed, May 01, 2024 at 05:33:59PM +0100, Will Deacon wrote: > > > Booting a kernel with "arm64_sw.hvhe=1 kvm-arm.mode=nvhe" on the > > > command-line results in KVM initialising using hVHE, whereas one might > > > expect the latter option to override the former. > > > > > > Fix this by adding "arm64_sw.hvhe=0" to the alias expansion for > > > "kvm-arm.mode=nvhe". > > > > Hmm, I wonder if it'd be better to just evaluate the sanitised VH field > > in hvhe_possible(). Otherwise I worry about keeping aliases in sync when > > new command line options come along. > > > > This is similar to what we had before commit 35876f35f482 ("arm64: > > cpufeature: Add helper to test for CPU feature overrides") w/ the added > > use of the sanitised reg. > > > > Thoughts? > > I think that goes wonky when you have the arguments the other way around: > > "kvm-arm.mode=nvhe arm64_sw.hvhe=1" > > would end up using nVHE. Right... What I was hoping to get at is a simple set of arguments to test protected + nVHE, even on systems that support VHE. Although I suppose: "kvm-arm.mode=protected id_aa64mmfr1.vh=0 arm64_sw.hvhe=0" isn't that bad and would preserve precedence of later args. So, FWIW: Acked-by: Oliver Upton -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel