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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71AA8EB64D9 for ; Thu, 29 Jun 2023 14:52:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232313AbjF2Owj (ORCPT ); Thu, 29 Jun 2023 10:52:39 -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 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