Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp515390lqg; Fri, 1 Mar 2024 11:59:34 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWdVjz8bTAKb1JohVsWLlGdj8etuk6xnC+hnTCpaKO85X9xfoSTJtmHwVo5Hd08laybBocs80sSoSXWFpzGyp7ae9V30uOBddX4jC6F0w== X-Google-Smtp-Source: AGHT+IFR8fqXKeofgjb060DF4jRWJrRO5SggsB1V/69ntqCWjevJZb3olcj/NAaQQHMfnXn9RILu X-Received: by 2002:a05:6a20:734f:b0:1a1:208d:8089 with SMTP id v15-20020a056a20734f00b001a1208d8089mr3423465pzc.34.1709323174126; Fri, 01 Mar 2024 11:59:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709323174; cv=pass; d=google.com; s=arc-20160816; b=cKecVfTXCqnXmVC9eeWEyiuPXeSJIKBc9NRgixsE/8h3jvviw8m1TpRePkUtAxwTh1 2NQaMofhxgLN+vkcdlYMgOJQSdJd9V2ez7IRfjq2eHwhTw3jt5ucjEdZMqvc52hrApw+ mdC7/4BFOXIBgAtHyn3r9HYsaK0lDQqNXYKJwKvy3sHasQnQpIasG0StGkI7gPfHb7kA XiRB+LywKyFyw5irFxek99X+jQIX1QSfJWMp2RTsE3HyGFSeF4qVGYxw1uyttAh6Lhwt 75Q1ghzl1TYjyRMukfPcaBDRXryJ8zSv2wBSaTh/xrrfwblyYxfXWFScJnUQOX1AJkbq zXaw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=PfFPGWCK+GSDiSmRj2uN72ko5lEX5jt2xXFl55bKfn4=; fh=G0OUIx1k7U7mAtmoL6cdHnAsRYfiOo4AmqqNbotlSS8=; b=YxtDMXrLTpg21gJ2WiSwr+tqhpP9d1VZfdufbbPFI5MECCOUm2mLQmVGKY9IED40mg W+eecyQrKmrxtCqL/89Ui42Bm0cz/cvQVZWtYhqdAgPoug4ldiuMYmQsY24Yric3gQHp j/bvk4NdlkbTrhhlRqQ6vky2PMLNAWC1MnetFwqcXk9hykIesrkFB5KwbUEgh9xg4ARA yeDIcP1OQT4RuGP7q7p5s50moKmP2b1IzQBK8K39z2CsgapOM1j+Xrq+4J7JrDEA52Ls wyOv41KbMQ1OpdbRYVh+7iHrZR1qpjqaR5XZxYMv8gcEiNkCABlgMOsDj1Zcy4zNp3EU DInQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=alhEwi3X; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-89052-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89052-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 9-20020a630f49000000b005cf268638edsi4208212pgp.177.2024.03.01.11.59.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 11:59:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89052-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=alhEwi3X; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-89052-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89052-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BC86A287523 for ; Fri, 1 Mar 2024 19:59:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 746913BB27; Fri, 1 Mar 2024 19:59:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="alhEwi3X"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Vp36FRU2" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41F703AC34 for ; Fri, 1 Mar 2024 19:59:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709323166; cv=none; b=oQXd3aLD0DcTu+yvN8pAtKcucoiMft7e9KcPLiBcuYWGq07+ZGYxv9OeTtEFtEW1MRDZvlHEm1aK5A+DvMUP3wVOmEk6fRT3qHktzv2Q0B65/UsB04rFb13ngWipN9H+baGBpGe6jb2p1HZcobtg2IduaE9ViuuKwxQCf9XvmIQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709323166; c=relaxed/simple; bh=vEw8hKXCZ7Q5pqWVw83KkjUoR47z/R3Z0Zqq9PA2VM8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=BSymK+SB/iZMlMUrppt+6UtS/zNwFmQcxwa59Tefyzj2r6yDVq2kpTeiNW4odpHGEBd2qkEnGqkHKZpGCcQAZNyk3q/QdQXQHTHe992Ecwl17RIwgUvPUwul8ptg8NIGi4vu9tGxpoIn3VdHREHs3FLWCP5KXTd81YEVC5hEfdU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=alhEwi3X; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Vp36FRU2; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709323163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PfFPGWCK+GSDiSmRj2uN72ko5lEX5jt2xXFl55bKfn4=; b=alhEwi3XGV0RCP4AGdMXeUdQqlR/iZDCbIaF93tSJe/gCqqH3SEY2MjHkTjX6Xj1upVyIi rkDbyCEoDDnIE/gt3xatWfGmA7E854npJzX9W5BOLihCK+GVGVQ/14g8Qok9X9xz2iGxmm eeSiLXYtg4Vwo3LZLp3QwoRCv/eVlsPpYYjue+Kj+U2cx52ZtYfCyIjeEOrgCiVBar3cOj 4bR2/hDXYKZJx+RHOzzcgTyPsrqiIbV6nSNaLRCt7j6V/JsaeANqoWJow2o6pUGvaPx2yP pn3bSCAYLELeq0nnCde+BTnHjCKUk4SUMkg1zzH+fTipr3GfkEkb7k2Oe7OQ9A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709323163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=PfFPGWCK+GSDiSmRj2uN72ko5lEX5jt2xXFl55bKfn4=; b=Vp36FRU2Xs3ultveYfGUTxgAlIEr9vbpLjThGBBl/hAXtk+WbJb7AoJfe9d1I/5Y13uzWf goXB4PKql1Ma2jDw== To: Jacob Pan Cc: Dimitri Sivanich , David Woodhouse , Lu Baolu , Joerg Roedel , Will Deacon , Robin Murphy , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Steve Wahl , Russ Anderson , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH] Allocate DMAR fault interrupts locally In-Reply-To: <20240301115000.4ba2e411@jacob-builder> References: <87plwe7w3m.ffs@tglx> <20240301115000.4ba2e411@jacob-builder> Date: Fri, 01 Mar 2024 20:59:22 +0100 Message-ID: <87msrhwwo5.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Jacob! On Fri, Mar 01 2024 at 11:50, Jacob Pan wrote: > On Thu, 29 Feb 2024 23:18:37 +0100, Thomas Gleixner > wrote: >> On Thu, Feb 29 2024 at 14:07, Dimitri Sivanich wrote: >> The real problems are: >> >> 1) This approach only works when _ALL_ APs have been brought up during >> boot. With 'maxcpus=N' on the command line this will fail to enable >> fault handling when the APs which have not been brought up initially >> are onlined later on. >> >> This might be working in practice because intel_iommu_init() will >> enable the interrupts later on via init_dmars() unconditionally, but >> that's far from correct because IRQ_REMAP does not depend on >> INTEL_IOMMU. > The dmar fault interrupt is VT-d's own interrupt, not subject to IRQ_REMAP. > So this set up has nothing to do with IR, right? Both interrupt remap and the IOMMU use DMAR and both set the DMAR's fault interrupt up, whatever comes first. If IR is enabled then IR does it, if not then the IOMMU init handles it. But yes, the interrupt is part of DMAR. > Maybe we should not call it irq_remap_work, call it dmar_fault_irq_work > instead? This work thing does not work at all as I explained in detail. No matter how you name it. The only sane way to do that is with a hotplug state. Thanks, tglx