From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3BFC816E89E; Wed, 12 Jun 2024 10:07:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718186845; cv=none; b=NLcO/dv2Ppg5YFTY1rjKKcYP6fhN2jsiZ8f0soIwT2pvfugvx3QadikG/V8lwxlMsgHIOWrfninSQeisOFFLXvIxRoMfufIynmD/9TyEPc/gwgkKL/MEKKCDgrc9sDXooVlYVVIPbr7ahBvGva2Y74kxiTzl2YrjYiIb+VuaLPU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718186845; c=relaxed/simple; bh=wijopm0nhucG+7m8+AH2LAOLzwedkcVS1zjeQR1rbGE=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=kWtwmJyAHDZpQo3I090ZMx7GPYH93lzY30w2EbYQtl1a+EXmTbRkmeOX7p4RC6m8qNwfXi387ZmnbEhclwqFresxXPE68C4cjPXykAw1mXc1zJ2CC1h/YXkWPTTj/0CLN78hCs2v/OxBUpt5jWa1rg+Fyka8oRRAyH9NifaAZpQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eCDtxszx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eCDtxszx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAD94C32789; Wed, 12 Jun 2024 10:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718186844; bh=wijopm0nhucG+7m8+AH2LAOLzwedkcVS1zjeQR1rbGE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=eCDtxszxNoB0piqxLuB/bD6m5JPZBy2liC/2ayWxt71f4cTQCaPFw/Wr6S6U81R0/ WB5Brgoy4oB+3lpQCkkBTJQ2h/PvJV051cwaoluv4tGNAtFW4516zoYm1aPXz/LmWP S5OD1m1AYqm2/T8w9SUKCHOebT4JUcGaGTX4FzoiMIKmn9+qlnkv0UEayd5tFMIq3v AL5CkssPTZLYThiIaEKcHOfFheTV8ziG414PmBVrwH2j6Yky4ACVfxH4nv553eLh8L Cb52Tvaqm0beIXCv5AdDhIdwwmsdCIrP92H2CGWk6zjgglufiPb9p16AakkQrh+Srb PnscSM29EsFpw== 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 1sHKt0-0037CS-An; Wed, 12 Jun 2024 11:07:22 +0100 Date: Wed, 12 Jun 2024 11:07:21 +0100 Message-ID: <8634pilbja.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: Shaoqin Huang , kvmarm@lists.linux.dev, Eric Auger , Sebastian Ott , Cornelia Huck , Catalin Marinas , James Morse , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Paolo Bonzini , Shuah Khan , Suzuki K Poulose , Will Deacon , Zenghui Yu Subject: Re: [RFC PATCH v1 0/2] KVM: arm64: Making BT Field in ID_AA64PFR1_EL1 writable In-Reply-To: References: <20240612023553.127813-1-shahuang@redhat.com> 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/29.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, shahuang@redhat.com, kvmarm@lists.linux.dev, eauger@redhat.com, sebott@redhat.com, cohuck@redhat.com, catalin.marinas@arm.com, james.morse@arm.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, pbonzini@redhat.com, shuah@kernel.org, suzuki.poulose@arm.com, will@kernel.org, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Wed, 12 Jun 2024 06:30:51 +0100, Oliver Upton wrote: > > Hi Shaoqin, > > On Tue, Jun 11, 2024 at 10:35:50PM -0400, Shaoqin Huang wrote: > > Hi guys, > > > > I'm trying to enable migration from MtCollins(Ampere Altra, ARMv8.2+) to > > AmpereOne(AmpereOne, ARMv8.6+), the migration always fails when migration from > > MtCollins to AmpereOne due to some register fields differing between the > > two machines. > > > > In this patch series, we try to make more register fields writable like > > ID_AA64PFR1_EL1.BT. This is first step towards making the migration possible. > > Some other hurdles need to be overcome. This is not sufficient to make the > > migration successful from MtCollins to AmpereOne. > > It isn't possible to transparently migrate between these systems. The > former has a cntfrq of 25MHz, and the latter has a cntfrq of 1GHz. There > isn't a mechanism for scaling the counter frequency, and I have zero > appetite for a paravirt interface. Note that there *is* an architectural workaround in the form of FEAT_CNTSC. But of course: - it is optional (and likely not implemented) - it is global (hence affecting all SW running on the machine) - it invalidates the requirements of ARMv8.6 (who cares?) - KVM has nothing to do with it (yay!) So if the two systems (from the same manufacturer) were ever designed to allow migration between the two, they would have at least baked some of that in. As for the paravirt interface, I agree that this is a non-starter (been there, done that, dumped it in the bin). The patch itself is interesting and may be of use once it has been put to a compiler and not just dumped on the list without any testing. M. -- Without deviation from the norm, progress is not possible.