Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1322690rwb; Thu, 19 Jan 2023 09:10:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXvC2u6kuOoiuQzyUo/YPnwZhhYSXD4ODoaArZwN8SlFfOeBBnoqkxb1OZqP6XWHsuG8PmJN X-Received: by 2002:a05:6a20:4408:b0:b8:66d3:30b8 with SMTP id ce8-20020a056a20440800b000b866d330b8mr16372204pzb.20.1674148249730; Thu, 19 Jan 2023 09:10:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674148249; cv=none; d=google.com; s=arc-20160816; b=aEhkUHDpA9LXt/B77ZZMOkZ8tT8DHujKaXbsLtVk+E2u8KWkhM0aOd7YmtQfcYNYQg ZcySpbD6ncddL/3KSi30JnGvMBwifURu26Sp65j7C/KR/geWHbgXkfw3DyE+W2Y9ubSR tsW6luZJD6Bbw2W1KdC5ClMwIUPFzFrUSp0ViR+bQnBi0hcmNTd4XNXlTSofezH3kKrg HYfqF8zJCaKeOVLOxskQRVsQv5X5L7ZzSw1Y/MzimE4zj38rCo7jqSC6+MDHJvUPEMoi 6p8UUxx1EQGEx5lBZt5/lZeadSzQ3y63tntbE65+uDU0n3Kiu16LFycwwuIWOUjjd4b9 5nlA== 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:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=z9AcesbRfM8AyuvBswQAgK3Gx191bj3OeWXftzL4StA=; b=AK0wOO//cxotjQs41kYSlGlRNBvkhld432fUzne/x/y/8fU6WiLSVJzLAMtR164Kvh fIL3dFqz1uiWgIhBA7IPM1tvDvpirlbn3CX8LZ1GVSNYiAcREJIxcuMO7NyhWpb6Za6I uwznK59hPbTS8J+uEuPc9mfd5xdjA8P2f36fwPtx34wbqXHlZhdisC1ayOU+HC80Nvhk +D19/J8ULYjT8U/e8+uXEcKeQzzR4rfuo5JvHTVlHberZm9p5COvvRDajc5MPAjceipF /FYT2DUFTxw9SMapUUouIncKloGLjNqC6/BRDw8ewolvZEUqxoUvkImcmzjHK9O2oSqc M+hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=RQ5kdE4Q; 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=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v11-20020a63d54b000000b0048e5531bc09si38931585pgi.277.2023.01.19.09.10.43; Thu, 19 Jan 2023 09:10:49 -0800 (PST) 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=@quicinc.com header.s=qcdkim header.b=RQ5kdE4Q; 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=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230350AbjASQm2 (ORCPT + 45 others); Thu, 19 Jan 2023 11:42:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbjASQmV (ORCPT ); Thu, 19 Jan 2023 11:42:21 -0500 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9157E78A93 for ; Thu, 19 Jan 2023 08:42:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1674146538; x=1705682538; h=message-id:date:mime-version:subject:from:to:cc: references:in-reply-to:content-transfer-encoding; bh=z9AcesbRfM8AyuvBswQAgK3Gx191bj3OeWXftzL4StA=; b=RQ5kdE4QTo+QzLUpyTMOqdLDl93yF+3om0hcwXqCssuaMMn0BMTI4Mwf DAWtuIbKXCMJXxG6JkzLVBFv1gUDR8XXaEqeCstjdzXddC8ZzOEnPa9T0 dZ5NokDeRRY3N3bJ3P0We4EVRVMWdBzFPB4WDaGO8kTC1/MaAisdX0tIg g=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-02.qualcomm.com with ESMTP; 19 Jan 2023 08:42:18 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.45.79.139]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jan 2023 08:42:17 -0800 Received: from [10.216.7.49] (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Thu, 19 Jan 2023 08:42:16 -0800 Message-ID: <97f8d450-8f1b-c89d-f0eb-813d17744975@quicinc.com> Date: Thu, 19 Jan 2023 22:12:12 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: Query about IPI as NMI (pseudo-NMI) support patches Content-Language: en-US From: Mukesh Ojha To: Marc Zyngier CC: lkml References: <5bed08c5-8663-4e68-27b4-8b6d3957a880@quicinc.com> <86zgb07tfs.wl-maz@kernel.org> <86v8ln7bqw.wl-maz@kernel.org> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 1/4/2023 9:19 PM, Mukesh Ojha wrote: > Hi Marc, > > Thanks for your patience in replying queries > > On 1/3/2023 11:15 PM, Marc Zyngier wrote: >> On Tue, 03 Jan 2023 16:45:04 +0000, >> Mukesh Ojha wrote: >>> >>> Hi, >>> >>> Thanks for your reply. >>> >>> On 1/2/2023 10:41 PM, Marc Zyngier wrote: >>>> Hi Mukesh, >>>> >>>> On Mon, 02 Jan 2023 16:44:59 +0000, >>>> Mukesh Ojha wrote: >>>>> >>>>> Hi Marc, >>>>> >>>>> I was looking similar support mentioned in below patch series. >>>>> >>>>> https://lore.kernel.org/lkml/CAFA6WYO0+LQ=mB1spCstt0cNZ0G+sZu_+Wrv6BKSeXqF5SRq4A@mail.gmail.com/#t >>>>> >>>>> >>>>> Wanted to check if there is chance of these patches to land in >>>>> mainline ? >>>> >>>> I certainly have no intention to merge it as is, specially as there is >>>> no good usage model for it other than "but think of debug!". >>>> >>>> We have exactly *one* SGI left. If we are going to lose it over such a >>>> feature, I'd want a description of how we are going to share it >>>> between potential users, and how we claw some currently used SGIs >>>> back. >>> >>> >>> But, looks like patch will fail if SGI is not available. >>> >>> https://lore.kernel.org/lkml/1604317487-14543-4-git-send-email-sumit.garg@linaro.org/ >>> >>> >>> >>> >>> set_smp_ipi_range(base_sgi, 8); >>> >>> +    if (n > nr_ipi) >>> +        set_smp_dynamic_ipi(ipi_base + nr_ipi); >>> + >>> >>> So, static SGI allocation still has higher priority than dynamic >>> one.  Would you be accepting if we keep it under some >>> CONFIG_ARM64_IPI_NMI_DEBUG ? >> >> But why should this thing have priority over other potential features? >> As I said above, there are two requirements: >> >> - being able to share a single NMI SGI amongst multiple users >> >> - being able to free existing SGIs in case we absolutely need an SGI >>    for some other purposes >> >> In both cases, this is about making the SGI space scale *beyond* the 8 >> possible interrupts that we have. This needs to be solved to get >> something like this in. > > Agree, we have shortage of SGI's, Will try to think if we can fix this. > > However, I think IPI_CPU_STOP is something which can be used as an NMI, > As this will be used only(once) during panic()->send_smp_stop(). > > Can we do some special handling for IPI_CPU_STOP similar to pmu > interrupts like request it as NMI and fallback to normal irq if not > supported/on error ? Can we do this ? -Mukesh > > >> >> And I don't think hiding this behind an obscure "debug" configuration >> option that will get abused with out of tree stuff is a good move. >> Quite the opposite. >> > > Thanks, Make sense. > >> Thanks, >> >>     M. >> > > -Mukesh