Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20876832rwd; Thu, 29 Jun 2023 08:06:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ67aTtMX+I6cXaf9BQ8QIjZIe4ioEhD93I8+qM5D+mEkSOuHg7nU317acrrp3IYwRuGM0iF X-Received: by 2002:a17:90a:1a13:b0:262:ea57:43f with SMTP id 19-20020a17090a1a1300b00262ea57043fmr12107095pjk.37.1688051174053; Thu, 29 Jun 2023 08:06:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688051174; cv=none; d=google.com; s=arc-20160816; b=SD/GAX7lWa5/yHcuDCoDLDWLOl5BBkVtN9UAhKk1OJ/2RsUX7gIfG3xdpjjDnkxfKB 9TfSmHLfmADQzJmJamYxp1aNGS3yd0C5veNmzZ2L9b/YFtLL43WA0OoJhmgBchAuZCog Ds57BGEYkDQqgWoWB+GG4Ad3qpOoKRrvrppP88dlrlBW4bSED+8Ok+8XGPUMSee7Sl1o rA8CLUZlcgX5fQ7dCnaxXkaHFyzVdqFlRRVdoJEN29N/peOggjv9SqCd5kfK0y9hyrSk lq9Ds8GgojL/MGTzpds9TWHqP2tdxpEfrBjdwwH51k5y8qck3l2lY6jqjea5D6gswBPp i+Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=+G7ByiJkOPlOFfd2ptqq/kPpfy3NrgiSperB9/hP8QQ=; fh=MyPuuR6dKkzmXwVoXyVihF102H9tRr2/UeWuKT07tjA=; b=R9MXeJumfUtF+8eUlzPB5kHS0z4QkSzXXUcdFc54bYwOvDfFvvoLiwAITXHXdHdtL4 yz99Rpm6c0eJ+E67TiBAgDo13+tf7xke61MhVpV+vjoqCfMdiG0yBtXGwh/vOz4or3G2 TCKj8N38U5DAHN7fvmdNeP5OhO5N5TclZpGHTo3/wPm0C7i72p92hgx0b3ssl7VPFQCc fi0AcIROcnvFTHxDb8kEwNzoiXAJHnQ7iA2SjPAPIrSwSyNe1rnqlJ29l9b9TlGhCFoc DUS2FnOTalP6mAdhjpPlEvCH/972m1YnvV529z/nWpsIylwTFB+L3wEBvlKmFh4BGYLR ItYg== 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=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x17-20020a17090a789100b0025998ebdc4csi10797799pjk.60.2023.06.29.08.05.56; Thu, 29 Jun 2023 08:06:14 -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=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232296AbjF2Owh (ORCPT + 99 others); Thu, 29 Jun 2023 10:52:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232265AbjF2Owf (ORCPT ); Thu, 29 Jun 2023 10:52:35 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 254052D56 for ; Thu, 29 Jun 2023 07:52:31 -0700 (PDT) Received: from kwepemm600007.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4QsLyJ335hz1HBZb; Thu, 29 Jun 2023 22:52:08 +0800 (CST) Received: from [10.174.185.179] (10.174.185.179) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 29 Jun 2023 22:52:25 +0800 Subject: Re: [PATCH] irqchip/gic-v4.1: Properly lock VPEs when doing a directLPI invalidation To: Marc Zyngier CC: , Thomas Gleixner , Kunkun Jiang , References: <20230617073242.3199746-1-maz@kernel.org> From: Zenghui Yu Message-ID: Date: Thu, 29 Jun 2023 22:52:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20230617073242.3199746-1-maz@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.185.179] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600007.china.huawei.com (7.193.23.208) 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 Hi Marc, On 2023/6/17 15:32, Marc Zyngier wrote: > We normally rely on the irq_to_cpuid_[un]lock() primitives to make > sure nothing will change col->idx while performing a LPI invalidation. "change col_idx while performing a vLPI invalidation"? > However, these primitives do not cover VPE doorbells, and we have > some open-coded locking for that. Unfortunately, this locking is > pretty bogus. > > Instead, extend the above primitives to cover VPE doorbells and > convert the whole thing to it. > > Fixes: f3a059219bc7 ("irqchip/gic-v4.1: Ensure mutual exclusion between vPE affinity change and RD access") > Reported-by: Kunkun Jiang > Signed-off-by: Marc Zyngier > Cc: Zenghui Yu > Cc: wanghaibin.wang@huawei.com Reviewed-by: Zenghui Yu Nit: I think the Subject header can be changed to 'irqchip/gic-v4' as the bug it fixes only affects GICv4 HW. v4.1 is unaffected. Thanks, Zenghui