Received: by 2002:a05:7208:c250:b0:86:f851:443 with SMTP id w16csp942400rbd; Thu, 13 Jun 2024 01:56:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUwuEaPrvlWDPRqFVihfK3ctXIN7H5Drm1HshTHDcf4ikGcZBck4UYX+M9KFKf672raWXiqRSz92869wXygiVQTHjpSwpIQEkMxo4gKTw== X-Google-Smtp-Source: AGHT+IFIavY6UMj1huk1Vh6loKx8GcH9MeuVgHTz9IjZyHBcvsj562xpuhArTeSosnRJsd8yGg7r X-Received: by 2002:a05:6a21:819e:b0:1b4:b4af:6052 with SMTP id adf61e73a8af0-1b8bf0634acmr2344491637.23.1718269019042; Thu, 13 Jun 2024 01:56:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718269019; cv=pass; d=google.com; s=arc-20160816; b=j0v3kadJi8clDH7YHpXMv+ZNv8kQG52nOACs3J4ogjtSlZWsHHQttU/SvwL3/xVQ5W qYZd4G6SAXQJs6jYREXMcS7SDGG56+yvzjUS8eMaseQ4VowkfoMe19CUxV1dTFZHEhTL hANQrG1G7RvDwImtAMyDy8Gx2VEYKJOzuK/lG2COKn6xdc4YFcV0P5k7Aokj5MZbsDDi c4N9oewlNuDVnC8JU3CUDsRTqmBMHeYVZTNHaT64fgwTdwvKlkpwfgBqfRgAK+V9HUX/ fJjEC9vjXKQQKrHVhaP2KtF9vO3QizdfB0FWFzsfFaUryGr6DE4SIiUlqEAMjGBpPoKw kTFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Bowi7EOkTndTQt3cslYbea98TP7rJlt6kYEQxSxfRQU=; fh=RnTTPvdCACFKRwnq9Rez7zEx8GHWRp53uUw0Mc9BA4I=; b=nbaF+phWS8sqPn5a9r4O25KfsAisBeGnyK5qNTRl6f0UiSczwFfT9l9siSKd8NfgGa vqji37Ds7WuW21ioTbeXhu+jtJYrF6hw02iW+/NYUVUxmonAWNSFWb8tSyFAJTyB35gp MX+Exk5xV8u2IZlzYLbQ9LTzJnndxdZcOhO2MZl2erWft4xLrcwzIZyb3qdVszXLcIJ/ vMwvDS4OIu7nItIWLZYedL800cp46BeIvaV9zFonFfn2351RCN5SSAwxgLJXE6A+4i85 ab3vh4skO2V+9ChWmN2NqyiniAxMw+mISldBc8BoNMQ11vcivvK7M8NEfZlSI0UwCEMX 23Jg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=rCuBfqHf; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-212840-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212840-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee4636f5esi890544a12.601.2024.06.13.01.56.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 01:56:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212840-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=rCuBfqHf; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-212840-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212840-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 84CC6B26012 for ; Thu, 13 Jun 2024 08:40:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D3F413D63A; Thu, 13 Jun 2024 08:38:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="rCuBfqHf" Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 4540413D608 for ; Thu, 13 Jun 2024 08:38:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718267926; cv=none; b=BpM5v6mZNdkAcnnfUeC4TtTAVFfimLKPMQ1PMRuoRfa60c40ZKeLJUxdszGEGS5q9KJ7+jbPs6lK46+YJaMOd9gqqKoknsvvrsLmCF+yuhCc53l2KD+UCIddJW5O5ikZX5BPGt4nTMcNtdVuJdysMv6f3lZRo5MtLg93rZPaY1I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718267926; c=relaxed/simple; bh=9SUeiVi1T9oGrBbo854n3vOCgOUM0D7zt4AESPxaOPw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fXTcKOdWe7HpW1bC4ZCXxuyhAjGrsqDrX7HhwS8rPCzm380XyIxrCfz0rmL76i/QKWux25Ly13XsSOVHNIy4Y+0WBY/XjB9bAdaxhqcEQuBNf5BS8PVzqRuQ8v1ZdtuGYS8QXiQH9fMoDaFlm/l77hCudENv/4L/mEUCWdzb9Kc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=rCuBfqHf; arc=none smtp.client-ip=91.218.175.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: shahuang@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1718267919; 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=Bowi7EOkTndTQt3cslYbea98TP7rJlt6kYEQxSxfRQU=; b=rCuBfqHfkguMUdlF6u8DRs0d0yksqiHxDzN0PlaV3AhxkrAUcUy96qZD4WDSx8mjOqPEX4 Jws3URRCEyxeDtGrSJeDq393+zqy++RBmNHTLS2jgV4plUQozy3596VX4auQ2kFZY3S6H1 XR2XCNV1A3JN7SyJMZKf3aMAz5N5Rxg= X-Envelope-To: maz@kernel.org X-Envelope-To: kvmarm@lists.linux.dev X-Envelope-To: eauger@redhat.com X-Envelope-To: sebott@redhat.com X-Envelope-To: cohuck@redhat.com X-Envelope-To: catalin.marinas@arm.com X-Envelope-To: james.morse@arm.com X-Envelope-To: kvm@vger.kernel.org X-Envelope-To: linux-arm-kernel@lists.infradead.org X-Envelope-To: linux-kernel@vger.kernel.org X-Envelope-To: linux-kselftest@vger.kernel.org X-Envelope-To: pbonzini@redhat.com X-Envelope-To: shuah@kernel.org X-Envelope-To: suzuki.poulose@arm.com X-Envelope-To: will@kernel.org X-Envelope-To: yuzenghui@huawei.com Date: Thu, 13 Jun 2024 01:38:33 -0700 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Shaoqin Huang Cc: Marc Zyngier , 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 Message-ID: References: <20240612023553.127813-1-shahuang@redhat.com> <8634pilbja.wl-maz@kernel.org> <7f1ca739-42f5-4e3a-a0c9-b1eac4522a97@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7f1ca739-42f5-4e3a-a0c9-b1eac4522a97@redhat.com> X-Migadu-Flow: FLOW_OUT On Thu, Jun 13, 2024 at 04:31:45PM +0800, Shaoqin Huang wrote: > Hi Marc, > > On 6/12/24 18:07, Marc Zyngier wrote: > > 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: Heh, I should've further specified a per-CPU mechanism :) > > - 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. > > Thanks for putting your comments here. > > If we don't care about the FEAT_CNTSC right now. Could I fix the compile > issue and respin this again without the background of enabling migration > between MtCollins and AmpereOne, and just keep the information of the > different BT field between different machine? I don't think cross-platform migration is relevant for the KVM UAPI you're trying to augment. We want to give userspace the ability to control the visible feature set for a VM, which *could* be used by userspace in such a way to transparently migrate VMs. So if you could focus the changelog purely as an improvement upon the existing controls we expose to the VMM then the patch is more obviously justified. Please do respin. -- Thanks, Oliver