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 lists.gnu.org (lists.gnu.org [209.51.188.17]) (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 56AEAD65C49 for ; Thu, 14 Nov 2024 12:34:05 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBZ2Y-0006FT-Ey; Thu, 14 Nov 2024 07:33:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tBZ2U-0006FF-2d for qemu-devel@nongnu.org; Thu, 14 Nov 2024 07:33:34 -0500 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tBZ2S-0001aB-Cd for qemu-devel@nongnu.org; Thu, 14 Nov 2024 07:33:33 -0500 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B7AB95C3F3D; Thu, 14 Nov 2024 12:32:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF46DC4CECD; Thu, 14 Nov 2024 12:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731587602; bh=YwY3k+ntZ0/HCQXqKl7NxMZiJ26bQcS2mI1ABe72Y9I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YHXc9huuMR6anJRexfDBoh9AqIjKMr4NXdFWWAxGTaKi/rp716oeEL567BZ6vb3vJ R4rTm4IfYXWzq8delzkHLk5+6QtjbiRRc+qqxGXNeyP03J1VijAyvKWrSphgVWcYdc 3F1JnLcKLMuzE54kgoUxrL2L4nB96QyPttBD6Ly4+zJWujyraXtdajBYWzLkDtUQRf kL70smRiur54wbS/FaTCZpNn8NgMCS/NxLZ3+pnHF6eGf6Jzvzxs96sjqIWYArxXjm m928JlMEExafJYNV4v6JVgf9TzoBNkaho2fS0oj+pTp50tPmNeE4V+vZL6F/8ZEoOU p0TQCDhF70SYQ== 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 1tBZ2G-00CpfB-DO; Thu, 14 Nov 2024 12:33:20 +0000 Date: Thu, 14 Nov 2024 12:33:18 +0000 Message-ID: <864j4avvu9.wl-maz@kernel.org> From: Marc Zyngier To: Zhou Wang Cc: , Shameer Kolothum , "Zengtao (B)" Subject: Re: Question about migration on ARM system In-Reply-To: References: 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) 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: wangzhou1@hisilicon.com, qemu-devel@nongnu.org, shameerali.kolothum.thodi@huawei.com, prime.zeng@hisilicon.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Received-SPF: pass client-ip=2604:1380:4641:c500::1; envelope-from=maz@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.122, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Thu, 14 Nov 2024 09:03:24 +0000, Zhou Wang wrote: > > Hi, > > I am tring to heterogeneous live migration on ARM64 host. Now I just use > below kernel/qemu branch to have a try: > https://github.com/hisilicon/kernel-dev/tree/private-v6.11-rc2-hisi-migrn-wip > https://github.com/hisilicon/qemu/tree/stable-8.2-kunpeng920-initial-v2 > > Currently guest on GICv4.1 and GICv3 host can do migration successfully. I am > not sure that it is expected. It isn't. Or rather, it shouldn't. Are you reporting a KVM problem or a QEMU problem? > > GICv4.1 exports GICD_TYPER2.nASSGIcap and GICD_CTRL.nASSGIreq to guest, so > guests(GICv3) on GICv4.1 and GICv3 host will have different state here. So > basically a guest on host GICv4.1 will lost state when it move to a host with > GICv3. > > It seems that current mainline qemu does not consider GICD_TYPER2, and guest > OS(linux) does not use GICD_TYPER2.nASSGIcap and GICD_CTRL.nASSGIreq(just > check cap and set req), so current test has been passed. Well, the guest won't test that after migration. It doesn't even know it is migrated. But Linux definitely uses it at probe time. > > In fact, there was some discussions about this problem: > https://lore.kernel.org/kvmarm/20200304203330.4967-21-maz@kernel.org/ > > I am not sure if we should prevent users from doing migration between host > GICv3 and GICv4.1? We should allow the v3->v4.1 path (we can hide the nAS SGIs), but we should not it the other way around. Thanks, M. -- Without deviation from the norm, progress is not possible.