Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp338235lqp; Wed, 12 Jun 2024 03:09:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW7aRNBRZ1ZmJhq48acB3C5n7ExqGDrpiartxSF+4cynxIEbCc08QxZ2w4Ww+5SohymYizF/vulS4vPrxJE60Nbd0/mV7MASw+KCjbTBw== X-Google-Smtp-Source: AGHT+IFT2GbZ+WNxXPT47r8TuRV4YJC4vobk3jye2VpuZIzyut4ENgTiEwMl6+cHzBKzf7ceMgOy X-Received: by 2002:a05:6a20:b9a7:b0:1b4:b4af:6052 with SMTP id adf61e73a8af0-1b8a9c3d610mr1580834637.23.1718186945478; Wed, 12 Jun 2024 03:09:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718186945; cv=pass; d=google.com; s=arc-20160816; b=ScXAcpheZdloIxJp0igYtH2NN9Fk6FtPliyRYlILTq0ETAa/erJyY/RAYVQFNP9d3A 2c4MFDTWuAJMUtWu3ENQhEzYwQc/OZswKv2VBwc14M3G/6vfOeUV+DTF+cutEO3/o4UP TAXTc/y1M9PxxJNIwthOPpWTs38v2sUAQL3GLbDH0k21RDBfWFD0gCzSaMdCQsdU8xXw Gkr949ZFRoDdYtgOyhp/LQqQwL4oX4iyqomrfQqRGuR6XypAhfgOTeUBTdl1FGDUQTyv pWPCoyqQDfGaRSSdM1dKwu08XO6QqmnouQQ0/Q7RoWzH6U8LyB2oRutq9+3hTJH0OxwH tqVg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=+7OuYocvIeMghbWWam9Ri16glAry5CtgJLsPEvNxii8=; fh=nFXiRWDLIrUUQoQCzAogMUC2UXSs9GkPWQwRFOsyuv0=; b=nxwWJvb9l054V1eZRr7rSv0HDQ8q1y1r4/9uJFbDmeh1vsxouiaxff7nktKWEvTTwT winilpdXbOGcRM2eZX3IRNMkBzEZfV5yCq8oqgKqUVKFWu+eEf7odQaVqyWPkYI+J9Sx HLLzEPpTSWIcz/dE6HooQ8ZdBdqG5li2xMeaDfWRW3/7bztd2ujsP3gQE3pTX+r4v44a tbuQcBUuWqcqBAoggrRhBLW8RN9P/9ZBUXneumDePnvuAM6EtR841ZCNoHGuTK+USk8+ Ns/woQUe4BgDZfiAj19b4oH+tmjQ6PXRiROqANo47+Wn7fjhqtbG6O7m+fqiHKVLlRjM pF/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eCDtxszx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-211326-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e8c6796beasi7699628a12.865.2024.06.12.03.09.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 03:09:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211326-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eCDtxszx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-211326-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211326-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D430728968F for ; Wed, 12 Jun 2024 10:08:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2351D16E875; Wed, 12 Jun 2024 10:07:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eCDtxszx" 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 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.