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 E34CA78F4A for ; Tue, 4 Feb 2025 18:15:15 +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=1738692917; cv=none; b=ITV8mT+tBur4QdkMB6z2SyodrK2WqiTgHee4e9sZe2bw9025sGm8cz5h9ocomWfG8pPVO2uuiOFuN1TR9zFb5vsdqo3Ch5anRZ8Y0SCtdpLJxZphCfxpGoYnoTnB3NkK72emmyFQxtq1pL5mkA+GZyz4XSy8mOW4B7gfB8X2jR8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738692917; c=relaxed/simple; bh=2LSVZ4W6m8nEx8goPtG1GhcWRHVAI2hM0Jp8C0NRChc=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=rYSr3w9EQDiqMC7ow+vxufphRZdT70SPMSdOTxVWyR4YBbFz6Bc/ifEgE4JgM9O7gubsEdWgqZ+E5Joqrb9IyfNy9FEgXX0ioYsse+O/thpwwDTpm/WvPzEHifjrJ4XiZEgxkmykYyRB7r6i82N+wl0LhDoNe+d43khjqUfEYgY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=R9XUANQY; 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="R9XUANQY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51DCBC4CEDF; Tue, 4 Feb 2025 18:15:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738692915; bh=2LSVZ4W6m8nEx8goPtG1GhcWRHVAI2hM0Jp8C0NRChc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=R9XUANQYgg8aEVqRHCmJnRlIERZr/wMn2ysrSgkISqTI6Um1GAKN3xoVWz2ycBDGy +Vfu9N3ubxDfUbGuyuf4UzgGmljAI72wQVsyl0dTr3g9kiiStYwNOjolveQ0DRAvIQ JOETpGxVtG+s7vYHMR7NGHVO43ERx9GUQcylDUaFj+Ny+ul4JwF6DTVBTOfKIEeBdu Dfhum/6s3iqbPYGIkTUJal/XCMstr4c4WXJePKGovnyQRDfKGDcTeV+HayySyQ3eYp IMfC6tzTWdd07z7omK8iE2yOkKCCP/oSpJcgXJNNq1PMZOamEZyc9nYtUY2QuD+lqX WRc/xAnlMD1Cw== 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 1tfNS5-000W9z-4M; Tue, 04 Feb 2025 18:15:13 +0000 Date: Tue, 04 Feb 2025 18:15:11 +0000 Message-ID: <86zfj1tw40.wl-maz@kernel.org> From: Marc Zyngier To: Sebastian Ott Cc: Shameer Kolothum , kvmarm@lists.linux.dev, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, Cornelia Huck , eric.auger@redhat.com, yuzenghui@huawei.com, wangzhou1@hisilicon.com, jiangkunkun@huawei.com, jonathan.cameron@huawei.com, anthony.jebson@huawei.com, linux-arm-kernel@lists.infradead.org, linuxarm@huawei.com Subject: Re: [PATCH v5 0/4] KVM: arm64: Errata management for VM Live migration In-Reply-To: References: <20250124151732.6072-1-shameerali.kolothum.thodi@huawei.com> <76172c57-aac6-d540-5b98-8de100c0886c@redhat.com> <8634gtvdmi.wl-maz@kernel.org> 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.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev 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: sebott@redhat.com, shameerali.kolothum.thodi@huawei.com, kvmarm@lists.linux.dev, oliver.upton@linux.dev, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, cohuck@redhat.com, eric.auger@redhat.com, yuzenghui@huawei.com, wangzhou1@hisilicon.com, jiangkunkun@huawei.com, jonathan.cameron@huawei.com, anthony.jebson@huawei.com, linux-arm-kernel@lists.infradead.org, linuxarm@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 Tue, 04 Feb 2025 17:42:04 +0000, Sebastian Ott wrote: > > On Tue, 4 Feb 2025, Marc Zyngier wrote: > > On Tue, 04 Feb 2025 16:45:38 +0000, > > Sebastian Ott wrote: > >> > >> Hey, > >> > >> On Fri, 24 Jan 2025, Shameer Kolothum wrote: > >>> On ARM64 platforms most of the errata workarounds are based on CPU > >>> MIDR/REVIDR values and a number of these workarounds need to be > >>> implemented by the Guest kernel as well. This creates a problem when > >>> Guest needs to be migrated to a platform that differs in these > >>> MIDR/REVIDR values even if the VMM can come up with a common minimum > >>> feature list for the Guest using the recently introduced "Writable > >>> ID registers" support. > >> > >> Currently MIDR/REVIDR are still RO and guest access is not trapped - so > >> even with the errata management patches in place the guest state would > >> change and a migration (between hosts that differ in these regs) would > >> not be possible. Are there any plans to allow to actually change these? > > > > Sure thing. We only need a victim! :) > > ;-) Nice. I'll hack smth up then. Great. Ideally, you would get rid of all the remaining invariant registers (MIDR, REVIDR and AIDR). But you must preserve the current behaviour as the default, sampling these registers on the CPU that initialises KVM, and preserve the values for userspace to observe unless they are written to (yes, that's broken, but we're stuck with that). Also, please don't trap MIDR_EL1. That's very pointless. You only need to trap REVIDR and AIDR via HCR_EL2.TID1. Thanks, M. -- Without deviation from the norm, progress is not possible.