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 9C814CCD199 for ; Fri, 17 Oct 2025 13:12:28 +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-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Subject:Cc:To:From: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZFUwMaS8sd9qf6t1NgyQ18O2GayyP6WUBPrqBr2m6tc=; b=iqKXMznc+vQp2JFqPCzEPV+gKa jnAud3MCUvE6yxPSlUTbxvTuwHkf4H7ngXE3HuF65tH+EVNMVZVa+wIF6s2TDxrdYDv5vn/M1PMzH XiXCGJwDX9jMf8z2KXTq74opn5IRA0rWgkgyu5S30bt6ijyL5+UlwBc1JGa+8b7OQFuXpJ8nMtYUP ccucuKRmKpE6lN9LxHnpkbUF+02Ww3/OmiEjYHWYeO+zN1EBuIDbSggOwzqiwX1fJh5y/gsNoA9Gc 4jARlvJ34gUlmPSB+jPM0REtonM4n4EW8SuDl2r8EbyrnveBbpyGhTEEvAzqqWtwV8KAE3qXzAZy5 eU2AsmCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1v9kFn-00000007tA7-0ONK; Fri, 17 Oct 2025 13:12:19 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1v9kFl-00000007t9q-46jU for linux-arm-kernel@bombadil.infradead.org; Fri, 17 Oct 2025 13:12:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :MIME-Version:References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date: Sender:Reply-To:Content-ID:Content-Description; bh=ZFUwMaS8sd9qf6t1NgyQ18O2GayyP6WUBPrqBr2m6tc=; b=C7Kp/fdfXS9XcQkj4zDxrfsbOb 6RnjXUcrmH1SOy0XHiy5QfkCrYBNUODgS5gfkQ1u6BcfYz92nCAQgTCfq8fYvhrd+/mYb7DmAHwZq 6ytrCQvKdNaY+TDQu53VwG1+kpxvuUv8D//3g7jZltrNiFKGSpZGgtHuQcnkPwG6b6AqiY72JnBQT IR7nYEoBxxt28nsDjuCpOrvqR844UaEEZrs3Vs7AilmIAsj17mApxaV1uVB7i4T2YP5xiT2GwLUYS lb98WoOqwrnf2GN5kwymfzuU9SnXZwzoASV+7dw2t0lTXY40vqk7kCO3OzLRYGIxhi69KoeS2CqMy J8RY/USg==; Received: from sea.source.kernel.org ([172.234.252.31]) by desiato.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1v9kFi-00000007bNl-47QQ for linux-arm-kernel@lists.infradead.org; Fri, 17 Oct 2025 13:12:16 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 0C33E406F4; Fri, 17 Oct 2025 13:12:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E02B0C4CEF9; Fri, 17 Oct 2025 13:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1760706729; bh=9KlFuLAkwJ4a/5wNWExTdqK64zOppCjiNFnqYb4Kz7s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lhWCZtDmDiTZ4ql08msWeD2HqjieTZZIrcEZpxKLBjERubZh56rMFXxxnMNCj5Hhl 0NBwLoTS8zht7LkR5o3ijD9sp36eovZxIJhSowBgSMGcwvozYpkZxbC4EBDs3p/kBb aqAeVbthYXMzRbsGTYlGpTD7AUr4g/xV2/gqNo/7BuZNtUZgRd8TMgvQXn5BWnfDEY eQbDbwZSL9zddrEr5+ECUXo5zyKUc04HodSxFJmveXw1h6Z21wLdxe4aQeo44In0kN dSz/KtzDq5BxIpCOMyqRNM+S9TZ1LU/7Zzb+IrIfVGBeAc18wxNPJu2HUSQxg72QAB VvCpXu53gR4Fw== 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.98.2) (envelope-from ) id 1v9kFb-0000000EsLQ-2aIz; Fri, 17 Oct 2025 13:12:07 +0000 Date: Fri, 17 Oct 2025 14:12:07 +0100 Message-ID: <86wm4twu3c.wl-maz@kernel.org> From: Marc Zyngier To: Zhou Wang Cc: , Subject: Re: Question about heterogeneous VM live migration In-Reply-To: <866aca63-1f6b-2109-fa76-6d68cb7c547a@hisilicon.com> References: <866aca63-1f6b-2109-fa76-6d68cb7c547a@hisilicon.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/30.1 (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=UTF-8 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: wangzhou1@hisilicon.com, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org 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-20251017_141215_404395_3A19C128 X-CRM114-Status: GOOD ( 22.02 ) 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 Thu, 16 Oct 2025 03:00:07 +0100, Zhou Wang wrote: >=20 > Hi, >=20 > We are now trying to do heterogeneous VM live migration among HiSilicon A= RM > servers, seems there are problems about disabling a feature in guest. >=20 > For a feature, if we disable it in VM by configure related ID register fi= eld, > we should make it actually been disabled, e.g. configure related control > register in EL2 or trap EL0/EL1 access to EL2. This is in general not possible. > Possible problems: >=20 > 1. Some features can not be disabled actually in EL0/EL1, e.g. FEAT_AFP, > FEAT_RPRES, FEAT_CSSC, FEAT_LRCPC3... >=20 > Disabling it by ID can not avoid a stupid user to directly use it with= out ID > checking, which may bring subtle problem in heterogeneous VM live migr= ation. Yes. There is no solution to that. > 2. For some features, it can be trapped, but KVM does not support yet. No= t sure > if we should support them in future. >=20 > E.g. If we disable ID of FEAT_HAFT for guest, we need configure > HCRX_EL2.TCR2En to 0, so access to TCR2_EL1.HAFT will be trapped. That's wrong. If you force TCR2EN to 0, none of the TCR2_EL1 controls will work. For example, you'd lose the POE/PIE controls. > For FEAT_PAN3, it instroduces EPAN to SCTLR_EL1=EF=BC=8Cif we dis= able ID of > FEAT_PAN3, we need make SCTLR_EL1 to trap by setting HFGRTR_EL2.SCTLR_EL= 1. >=20 > Seems there are no trap setting in above cases. Just a quick look, may= be I > miss something. >=20 > I am not sure if we already consider above problems, any help will be app= reciated. we know about most of these things already. In general, you cannot hide features that the host has, other than indicating to the guest that they may not exist. The underlying HW is still there and will act as expected. I think you're simply expecting too much from the architecture. M. --=20 Without deviation from the norm, progress is not possible.