Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1232885rdb; Wed, 6 Dec 2023 12:19:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEXfZz21sP+hpwiQKuqxSbmeZ7nDZpXCfj3B3EnsEHK3B5o6g8Dzaxjry3P7BEOnZ1koZOJ X-Received: by 2002:a05:6a00:1590:b0:6ce:2731:5f6d with SMTP id u16-20020a056a00159000b006ce27315f6dmr1422557pfk.44.1701893965380; Wed, 06 Dec 2023 12:19:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701893965; cv=none; d=google.com; s=arc-20160816; b=tmZjjw/mwB8WuXOBlTx/xGAzOrb2nos3ibetq8GEn2MZ9g87oofNP8irfVFqs+e7wP B3d7cwyEy9d6TLq4Wnk69LPciTnSk5qAfw2v+Qk6G9goxQGTRFvMIzpLALkdd/f+Av54 V12xnzdjOgneXBXTLsH/sViURAlqs3Vm+SHRd/xsPyISBc8BjAxtiySIatkDcoK/HhbR RIuyR3W0Rh+9CTMpsTEVyJCJdwKH81s7bcRNMrFUN6pvb/5LmAzT3WS7fAqQsR1DVXpe jLxQQBggbB9I2mSuy2twoYeM9fmKQw2WLDEcU39+Aw9rmaFf1L4lh6Bw63Wqu1DpB0SN I4Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=R6TvwDJnaqqPW4TKCaM9yFlVVCjb/BuENvek6Jb76QA=; fh=zmmCNmWX/qYnCe8iaDOJ+ow6H2W6Ybs9ZtfrTe1mIv0=; b=CT9854djZGj2Mw3OQ5L9DxGNeOP3aYIX2oMcciczVlEKlJX7NbDba7Z26Yn2OllCkj SKnOPgULK7GvVruNps7qbGJeVIL2rt1vRK3pd/SB/I8rMtGcGsc6g6T/TbWSpteMe29v 0SIxd//V+Owohn5J8KV1/CshSpnELO57yEgTmTBVrDtJPLSMrBIBTuLvmw+3/GJRvLTW JwDSx94HWnWnq+ggOaXp19tFkuoi93KsSRL3q9HIbO2A+fzCC9pmsu/jQfX5cMRj/Q7M zsCw21yWH7yIAI8W6FzRs9PeglI4Av1zjN7vKdJx+xBQwGv+hbWyEyY64HmDFKIDP+At GzFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yTwcWeDw; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b5-20020a056a000cc500b006ce7ef240a4si459194pfv.297.2023.12.06.12.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 12:19:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yTwcWeDw; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 1105D80967B1; Wed, 6 Dec 2023 12:19:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442884AbjLFUTJ (ORCPT + 99 others); Wed, 6 Dec 2023 15:19:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442871AbjLFUTI (ORCPT ); Wed, 6 Dec 2023 15:19:08 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 426A4109; Wed, 6 Dec 2023 12:19:13 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701893951; 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=R6TvwDJnaqqPW4TKCaM9yFlVVCjb/BuENvek6Jb76QA=; b=yTwcWeDw7jPqj5+q0Tx4CJX0jhjsa8DXjdRMbR8dfVtqxJ7USOz0OxSri/O/U/KLk1wG/6 CWdZo5rXeBZ3QgYogA9k01EOEn1ckb6+Y1IhHI6VVbp1oW7DBS/TutaLzgZquJqIqMO0IY zD5UQEjc5ugi45SXhRLlkO8gBXAm3xbdvi+syUjCDaryjTeCz6VzH9JooLyiPuldtJ7xi2 3cHu2IwFbaQ4t2mVJJneP2swPjBaSpCM78mketPCPH1Fr7HNg68ufaHD6G/QTFTssXMYZh tkwRktIzScZ3Hs2QrBWMyjHnp578AGAfFMIOB/kLDNwdC20OJW9BnfNa9fpBFA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701893951; 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=R6TvwDJnaqqPW4TKCaM9yFlVVCjb/BuENvek6Jb76QA=; b=/IhuCefGBcRqXjbOu3r6B3enCMu7fAlAAfJvyNQkViUERDz3yOwRbSMVuQvwtQRnthcLvo ieKXyNIikRBRqRCA== To: Jacob Pan , LKML , X86 Kernel , iommu@lists.linux.dev, Lu Baolu , kvm@vger.kernel.org, Dave Hansen , Joerg Roedel , "H. Peter Anvin" , Borislav Petkov , Ingo Molnar Cc: Raj Ashok , "Tian, Kevin" , maz@kernel.org, peterz@infradead.org, seanjc@google.com, Robin Murphy , Jacob Pan Subject: Re: [PATCH RFC 12/13] iommu/vt-d: Add a helper to retrieve PID address In-Reply-To: <20231112041643.2868316-13-jacob.jun.pan@linux.intel.com> References: <20231112041643.2868316-1-jacob.jun.pan@linux.intel.com> <20231112041643.2868316-13-jacob.jun.pan@linux.intel.com> Date: Wed, 06 Dec 2023 21:19:11 +0100 Message-ID: <874jgvuls0.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 06 Dec 2023 12:19:23 -0800 (PST) On Sat, Nov 11 2023 at 20:16, Jacob Pan wrote: > From: Thomas Gleixner > > When programming IRTE for posted mode, we need to retrieve the > physical we need .... I surely did not write this changelog. > address of the posted interrupt descriptor (PID) that belongs to it's > target CPU. > > This per CPU PID has already been set up during cpu_init(). This information is useful because? > +static u64 get_pi_desc_addr(struct irq_data *irqd) > +{ > + int cpu = cpumask_first(irq_data_get_effective_affinity_mask(irqd)); The effective affinity mask is magically correct when this is called?