Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp594792rwd; Sat, 27 May 2023 03:23:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4J0lHrDSYJm/g804Fp10RZHsPy/29LHeclsMW5kpgQzNSDWJrdanHJ5UiC5HPPSL7yXs6z X-Received: by 2002:a17:902:d504:b0:1ae:72fc:a625 with SMTP id b4-20020a170902d50400b001ae72fca625mr6392824plg.37.1685182985046; Sat, 27 May 2023 03:23:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685182985; cv=none; d=google.com; s=arc-20160816; b=noMAu7nNjKd5Utr0gWZNfdPUemlZOICBt8j/QoH434TmoJTvurC2aa0sgARoU6NDra uBu14g5NB/V+11OKomN0Lxjhrz4DHcSpK+2nDDxEOFhhKxVCpWJTxDgeT0zLGlMM2gkq jSHFAIgUZcHjx9XrroSju9hxPGhFHUFcSZ5q2GFe5yG0Wt2lA7u25+6gSLv9ZBZjrbXT Sl8SvKQ3VoC7ezBXLrqIBEBaiPmsGiLKTnzzMM79KJuhT1HFeoS80eSGDTcGWiham6yq u3cedOKXhQj5Oe17gi5M3QALXkkq9kKu9rpywiEEUx1AvOe77FkuSz3rwfiHM5Mb97ak ndpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from:cc:to :references:subject:user-agent:mime-version:date:message-id; bh=kMdehXU3ZUvCj6QWHcb+7OKuujtkYuqQg80oTxSli9Q=; b=a4I1954VwVMwoNhG8s5mKWJsS45T7kBEVC1cqFJ26ijvZ0SLvEeJeqwLWojJnd5de3 y8m+QaW7EsADHYBtLh+VdPPwRHF7STojcOIzpGGU4SkEkLbfpzJigGtQWppYTmTqp3cH bVZpgOH7K3FqQmL1eel4XcPIlYSVj6RUFhMm+KYZc7OpwA23nmS4dY1zqbyrZlcasU9o ojG5+9nqhMZg8z1kmb70FDZ6Z+TqD4mRZa2gZJb7AU28VvQGMSI1Y4Z/yeigag82k0DW KBvfSzD4POPp2aBzMgSVa3Zh2QRIyZCYyF0dJJ7Nmm7Ygr0bSdpD4bkrMj2yQ99AkTp8 qCpQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020a170902a50300b001a92875cda9si5680134plq.288.2023.05.27.03.22.52; Sat, 27 May 2023 03:23:04 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231806AbjE0Jv4 (ORCPT + 99 others); Sat, 27 May 2023 05:51:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231783AbjE0Jvy (ORCPT ); Sat, 27 May 2023 05:51:54 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46E16E3 for ; Sat, 27 May 2023 02:51:53 -0700 (PDT) Received: from dggpemm500003.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QSxqJ0qPmzLmRn; Sat, 27 May 2023 17:50:20 +0800 (CST) Received: from [10.67.145.254] (10.67.145.254) by dggpemm500003.china.huawei.com (7.185.36.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Sat, 27 May 2023 17:51:51 +0800 Message-ID: Date: Sat, 27 May 2023 17:51:50 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Subject: Re: [Question about gic vmovp cmd] Consider adding VINVALL after VMOVP References: <87v8gfo9rg.wl-maz@kernel.org> <7f07c54fb0a4448fbccce0f97cb5e512@hisilicon.com> To: Marc Zyngier CC: From: wangwudi In-Reply-To: <7f07c54fb0a4448fbccce0f97cb5e512@hisilicon.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.145.254] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500003.china.huawei.com (7.185.36.56) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 在 2023/5/27 16:56, wangwudi 写道: > > > -----邮件原件----- > 发件人: Marc Zyngier [mailto:maz@kernel.org] > 发送时间: 2023年5月26日 15:03 > 收件人: wangwudi > 抄送: linux-kernel@vger.kernel.org > 主题: Re: [Question about gic vmovp cmd] Consider adding VINVALL after VMOVP > > 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 >> scheduled for the first time, there may be some unusual hanppens over >> kexec. > > What may happen? Actually, I'm not sure. > >> We might consider adding a VINVALL cmd after VMOVP to increase >> robustness. > > 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. Agree, this reduces performance. > > We already issue a VINVALL when a VPE is mapped. Why would you need anything else? > It is just for robustness, like the VINALL when a VPE is mapped. >> >> @@ -1327,6 +1327,7 @@ static void its_send_vmovp(struct its_vpe *vpe) >> >> desc.its_vmovp_cmd.col = &its->collections[col_id]; >> its_send_single_vcommand(its, its_build_vmovp_cmd, >> &desc); >> + its_send_vinvall(its, vpe); >> } >> >> Do you think it's all right? > > 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. Got it, you are right :-). Thanks for your explaination Wudi > > Thanks, > > M. > > -- > Without deviation from the norm, progress is not possible.