Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3176374rwd; Mon, 29 May 2023 06:50:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4R7PlvskopPyvifcCzTVutkYAA7ywxkrfLKAzG6g87BhfrWtGkP3B/x9/Dz1dYLPl5Gz1s X-Received: by 2002:a17:902:dac7:b0:1af:ea40:34f2 with SMTP id q7-20020a170902dac700b001afea4034f2mr10117736plx.11.1685368228038; Mon, 29 May 2023 06:50:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685368228; cv=none; d=google.com; s=arc-20160816; b=JKMZC1uEk5fhNPsR5gios9CyOOBHfIZCn6WvL1UCkvJ67rnJAQ4PaVPr4kO0IZk78Y WeZfPkyYcMhG62C0wZUvSX+km0TCpBxZS4/K98b7YOqumrAqsvbbD/pkyy55FiFtjdJF wgjxD9fNAxTKkS2uQJLw1cz2eNVOmCap4eWBCu0neqKd9ajCIEODpnDBxUvnCZBcS1Z3 Uw56gpA4E1r9T3COA+zakKA9qrqrNOAsEFXvT4S9WeAiDkTpdQrOtBnJLMSjX74+J6Pl dorXJk6E3umV0YPeCcDTmv9OFbeAmadhOv5Bzz8GnHQXymojFkpJAJsXuAE2GN/2jCc4 ERGg== 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 :references:to:subject:user-agent:mime-version:date:message-id; bh=dHkyhlF8+dPdQTFsSbyAx9+EZnVwpXMqLnjo6BjOnZ4=; b=LurSuAKf5T6xmEaLiRfY9ciJbVGJ04CPROQGiKx81XALvWF7ATnPYzpGPU0SX+pYme 3J7nGNYsQf5wk603ZWX+RITbqH1Rd8S8nbG0UcmcsNtY73ET0Cj78eJHpd5axzT/will dN2b4o/7RgDdIDtM6WmuaF6oQ74qMky7hlkUtdHHC40WXkL8Lode1SoLlrlCPdJrYYuH Ha/DgTg1rshsGWVuWanwKCyRm1fDAgNm/1Y4JxWTnlR2QfZRim++h3DVLykj4QJEmmWL kI6tRJOZ+jLzAzVIsy7VghwpeXdP1H+NmTF2et8i8LMNnv6ey2WtCfucUiwMyIvvbJ6Y 9Ezw== 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 u12-20020a170903124c00b001adf24718c1si6850665plh.256.2023.05.29.06.50.12; Mon, 29 May 2023 06:50:28 -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 S229535AbjE2Nfy (ORCPT + 99 others); Mon, 29 May 2023 09:35:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229854AbjE2Nfx (ORCPT ); Mon, 29 May 2023 09:35:53 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E10578E for ; Mon, 29 May 2023 06:35:50 -0700 (PDT) Received: from dggpemm500003.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QVGdC5ZzszqTQX; Mon, 29 May 2023 21:31:11 +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; Mon, 29 May 2023 21:35:48 +0800 Message-ID: Date: Mon, 29 May 2023 21:35:48 +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 To: Marc Zyngier References: <87v8gfo9rg.wl-maz@kernel.org> <7f07c54fb0a4448fbccce0f97cb5e512@hisilicon.com> <86leh9di4l.wl-maz@kernel.org> CC: From: wangwudi In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.145.254] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) 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/29 21:24, wangwudi 写道: > > > -----邮件原件----- > 发件人: Marc Zyngier [mailto:maz@kernel.org] > 发送时间: 2023年5月27日 21:22 > 收件人: wangwudi > 抄送: linux-kernel@vger.kernel.org > 主题: Re: [Question about gic vmovp cmd] Consider adding VINVALL after VMOVP > > On Sat, 27 May 2023 10:51:50 +0100, > wangwudi wrote: >> >> >> >> 在 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. > > Then what is that all for? > >> >>> >>>> 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. > > 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*. > >> >>>> >>>> @@ -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 :-). > > 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. > Okay, thank you for your patience. > Thanks, > > M. > > -- > Without deviation from the norm, progress is not possible.