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 2F888C27C75 for ; Wed, 12 Jun 2024 10:07:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+7OuYocvIeMghbWWam9Ri16glAry5CtgJLsPEvNxii8=; b=UUPq7mHqzZfHXcydzoaT17sH8y iNTXys0/5PEDKgvOrov7dD+3Z07OcKuf1Aw7UvywHIXRDywxmX/aTzuPmP9voZ4v/1z4TYP4vWAo3 Mh16AR3D+M3bo6yVaQjfBYnS4N7wG2ubcXUiM2n25NJCpHIQIQ0jLirKbipBOVL2Yui9UxRUNtjNB wDVSFhoLDwmEyOT3Yw+GBMMWaF1/jQl+taDgsBRoxL5fyUmR7iGuOlPJGaGozvgfE205tbZ/Bx+vi twiSnwsFzdZKTMY2b9ZEXLTdwBun9/gvPGEaE34IGNZFcoUfw6Np96imRkK3wUSvjqQ5WFcXElZu0 bWZLajNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHKt7-0000000C9N5-0hWS; Wed, 12 Jun 2024 10:07:29 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHKt3-0000000C9LP-2tjq for linux-arm-kernel@lists.infradead.org; Wed, 12 Jun 2024 10:07:27 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E10CB61300; Wed, 12 Jun 2024 10:07:24 +0000 (UTC) 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) 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240612_030725_852695_BCCA2C3F X-CRM114-Status: GOOD ( 22.87 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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.