Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp790937rwd; Sat, 27 May 2023 06:33:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7rwBj+fRNjmGJu15w2n+kXqS/aWSlU/o2P1IaPuEGPzBqRwBEWG8KFI6P3VRpb+zdn1Bx2 X-Received: by 2002:a17:90a:6681:b0:256:23f:abc5 with SMTP id m1-20020a17090a668100b00256023fabc5mr5388222pjj.10.1685194409834; Sat, 27 May 2023 06:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685194409; cv=none; d=google.com; s=arc-20160816; b=UtQw3gbz5CEMIyRYU49v95fQgvLHaC5vCGUgzkDXvoiqvpHU90VuuS2lkZJ7YENDNz TVXdwQXrdbyYuCtP99jBfyoZ4/c/EdJjEgMC09PQM1Ks0548BNlOCTbwcicWzGD5Obsh kIOFLuKLdb6jn43ai1YRspJE0wzucxNlNtasQJ2FyHJq7qqWbsvo0lTTb59kwKtZdApH 4TqxRfCjPI7cBm4vd/moXIP5g3G5i+RveyodLRQ13WC7kNTgQnGmoI7nyqhF9yKwGMrh hd6G2q81PkEejAOWpH6uGxb0ck4dKjQu6BSlbyTCDQkPvOLBLbwYgkcMPoF3GsFNfBEj gyig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=6SpL3AHi4lmhcNKDyPLLx2l8j4AohilNOMCaF1e+VxU=; b=up2PRqgU2XhNRVgtkNCN0Lft4pyMi/PYzxD8JpirbV0J2MgpjE7Z8LSG7ItnnvFqyE Myzhsz4Pp2hJgzwQu1/5vbTRaCP1HAx3ye0Akxs9kfYFDQz7er5k8n1ex9aPeaN+jOXf 84H1/z9PUe8UNSIusQdVrwnOzzlDe2rbKpXyKW0VHwU0cZ0VhtspelMf6SR9DHMoqHj7 uNltWFas1t5LR42ZLPZQu8mFoARJWZQaZYr/IwjDjZQDdToV32bApap5ufYAL8NzFok3 tYJ0K0PO1nGtxvy6keMUWiMzHsDO0eTtkrTeWqODs5pCeYx8gKfU4F08lyglTVLwsPk+ W2MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uEAPd9QN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot4-20020a17090b3b4400b002478bba4da2si3748497pjb.127.2023.05.27.06.33.14; Sat, 27 May 2023 06:33:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uEAPd9QN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232655AbjE0NWK (ORCPT + 99 others); Sat, 27 May 2023 09:22:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232597AbjE0NWJ (ORCPT ); Sat, 27 May 2023 09:22:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4F5EA6 for ; Sat, 27 May 2023 06:22:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 38A426123A for ; Sat, 27 May 2023 13:22:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B556C433D2; Sat, 27 May 2023 13:22:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685193724; bh=uCEsVxEXegwR+e8NkgAsr+MTjGwSIA/foy+UY6nYbos=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uEAPd9QN585j1PybF8hgr1TJzKI0MDEqNaGixMJU2qgFmnuesv+nKEyySXTAMcA7o y5+S6Nf1YsHBXe87NN/RAIgYC1XCbY7BzkTUeUqlFSe2bUxmcW+ACMvse7pp7U8OCp WS3zhEUL3tXRTGboBNjdxShJEMKycPYuq6VduWrO5W+DqoQ1bx+UdtTnATanw5BdNL AsbInYUxGuYEfnnvUYMNnc/+GGz+7Rs8BA15UDEO7fnb8lP0Na0guEfUsMGZSMc2tA nZUwbXFUuAzsDzuvxH3+8q5Xw5jknGm4ukxwoRU2DNK+gL07gxI8VOrKhSuV+Po7t9 0JpZLJChs/xmg== 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 1q2tru-000kzt-CR; Sat, 27 May 2023 14:22:02 +0100 Date: Sat, 27 May 2023 14:22:02 +0100 Message-ID: <86leh9di4l.wl-maz@kernel.org> From: Marc Zyngier To: wangwudi Cc: Subject: Re: [Question about gic vmovp cmd] Consider adding VINVALL after VMOVP In-Reply-To: References: <87v8gfo9rg.wl-maz@kernel.org> <7f07c54fb0a4448fbccce0f97cb5e512@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/28.2 (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: wangwudi@hisilicon.com, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 27 May 2023 10:51:50 +0100, wangwudi wrote: >=20 >=20 >=20 > =E5=9C=A8 2023/5/27 16:56, wangwudi =E5=86=99=E9=81=93: > >=20 > >=20 > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: Marc Zyngier [mailto:maz@kernel.org]=20 > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B45=E6=9C=8826=E6=97= =A5 15:03 > > =E6=94=B6=E4=BB=B6=E4=BA=BA: wangwudi > > =E6=8A=84=E9=80=81: linux-kernel@vger.kernel.org > > =E4=B8=BB=E9=A2=98: Re: [Question about gic vmovp cmd] Consider adding = VINVALL after VMOVP > >=20 > > On Fri, 26 May 2023 07:04:34 +0100, > > wangwudi wrote: > >> > >> Hi Marc, > >> > >> During vpe migration, VMOVP needs to be executed. > >> If the vpe is migrated for the first time, especially before it is=20 > >> scheduled for the first time, there may be some unusual hanppens over = > >> kexec. > >=20 > > What may happen? >=20 > Actually, I'm not sure. Then what is that all for? >=20 > >=20 > >> We might consider adding a VINVALL cmd after VMOVP to increase=20 > >> robustness. > >=20 > > What are you trying to guarantee by adding this? From a > > performance perspective, this is terrible as you're forcing the > > ITS to drop its caches and reload everything, making the interrupt > > latency far worse than what it should be on each and every vcpu > > migration. >=20 > Agree, this reduces performance. >=20 > >=20 > > We already issue a VINVALL when a VPE is mapped. Why would you > > need anything else? > >=20 >=20 > It is just for robustness, like the VINALL when a VPE is mapped. The VINVALL at the point a VPE is mapped serves a purpose: to invalidate the caches from a previous instance of a VPE with the same VPEID. It's not for "robustness" but for *correctness*. >=20 > >> > >> @@ -1327,6 +1327,7 @@ static void its_send_vmovp(struct its_vpe *vpe) > >> > >> desc.its_vmovp_cmd.col =3D &its->collections[col_id]; > >> its_send_single_vcommand(its, its_build_vmovp_cmd,=20 > >> &desc); > >> + its_send_vinvall(its, vpe); > >> } > >> > >> Do you think it's all right? > >=20 > > I think this is pretty bad. If your HW requires this, then we can > > add it as a workaround for your particular platform, but in > > general, this is not needed. >=20 > Got it, you are right :-). May I suggest that in the future, you post patches that actually serve a real purpose and avoid wasting people's time? Your company employs a bunch of good people, some of which are pretty knowledgeable when it comes to the GIC. Please consult with them before posting such thing. Thanks, M. --=20 Without deviation from the norm, progress is not possible.