Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1108071rdb; Wed, 6 Dec 2023 08:47:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHw4h2R+Ytt+zm9J0xhBCx/8BHkWPYzLP5D3qvpJJuBG2LwTHq0dBTq7krqcoIYWFXHcAC X-Received: by 2002:a05:6358:882b:b0:16b:f6c6:b8aa with SMTP id hv43-20020a056358882b00b0016bf6c6b8aamr2105533rwb.1.1701881245983; Wed, 06 Dec 2023 08:47:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701881245; cv=none; d=google.com; s=arc-20160816; b=tdTxLhv2YGhMmxj/WCka7ysQKn0rvVftPwBnGM9VbZj7DG67bCpCB5Nm67qzZyfleu S6OsUcX6EZuTvvfAnq8hY3WV10OVuSW9irMD72YuoHpvg2WaQ7gPDa3TjMyytwWYw4g/ DP4RI0l3xEXuB5SbQniOm7AfIvP6/sBPS8/pehAADT1zEobCVQCvKVt4UoGV3ACfULKa fRxNiZisJPtNsaCvDZvHZ3MaqGLv+3uc+fnDAoj8k1kb1dqnFijh9/Qth7qDt15Ka0Fi A6Wt6/vpYfeI/RTC4/zEHhuElxtsBZvBoOkY25kP8D7ogMZqE2t7/o5yeZm9NLH0egAO Vzkw== 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=mlX5bK9jkIYszrItVZG6UIm+wb2FCPZ+a8JRRZLLJgw=; fh=zmmCNmWX/qYnCe8iaDOJ+ow6H2W6Ybs9ZtfrTe1mIv0=; b=L5SL+tonQBWyxrkHtb3HeIsAqvu5PR05zS1IK4kWBpFNVDutZOErsHpGFoH8uIZU2N LvrAYNasxywv3LXDJeu99s6ezDRrJ7kJC9wQ3zveo+pfG5528P6dESURhIzqFjvnPxVD eo4tE6IvKLq8UpOM789/ESnlLQUPXt0jZ3kWgSHoivlbEWxlDyWy8fdPakxK9MIGn8rG +b3suAI68yd2nhGI84eSESlU3iAGIFfYu65dg82JBfbtKOO7aA2ZXy9UvM3vXTvE/WA1 vXG/3lf9k1r/yqeFmYlQNP9EwYjqtSx3RWN7aGcPb/GA3rP07ZdbuFNKdJPvT4Oju8uS qupw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WsdGjuy9; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p66-20020a634245000000b005c6921c1ccasi148724pga.600.2023.12.06.08.47.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 08:47:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=WsdGjuy9; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 9F6F0802EE41; Wed, 6 Dec 2023 08:47:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379355AbjLFQrG (ORCPT + 99 others); Wed, 6 Dec 2023 11:47:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378367AbjLFQrE (ORCPT ); Wed, 6 Dec 2023 11:47:04 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C070D4B; Wed, 6 Dec 2023 08:47:10 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701881229; 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=mlX5bK9jkIYszrItVZG6UIm+wb2FCPZ+a8JRRZLLJgw=; b=WsdGjuy92AUUgDroYMjxG/jjQokVwKuBpSRYKmbmKd27tnW+EBxywajIZvVmMvunJYDut4 M2fMiafaRNRQcbDPDENTfDlngU58oPWHlVrZLQhbs1lmLofnIfQkT4nT92HdAAZZyWKmj3 zNOxPPB7VpkCECybOIPIh/crjw4zw6mE++bZVhud7B0edKXPaPQJoBQ4QlMykz8v3onevb NEwo+F1UuzDn6eKT/tBpsvFpnfohbwDfWdzSwcd9uJozVzAjV3ZiMXgoDI5vyGH3UMD/tc MJ+tjGfpaCJHM3P+zKxiYs3amK88NsnldNObPA4su6OduYftUH+8F4oBTX3bDw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701881229; 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=mlX5bK9jkIYszrItVZG6UIm+wb2FCPZ+a8JRRZLLJgw=; b=zPV2A6Xb8rPOnsnoIaveB7SGyrLEQWwOdtoG9FO9qLV1E8eJ37cjtSbqMixexg8DdTdt57 m8XIQJFOQhX5BBAg== 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 03/13] x86: Reserved a per CPU IDT vector for posted MSIs In-Reply-To: <20231112041643.2868316-4-jacob.jun.pan@linux.intel.com> References: <20231112041643.2868316-1-jacob.jun.pan@linux.intel.com> <20231112041643.2868316-4-jacob.jun.pan@linux.intel.com> Date: Wed, 06 Dec 2023 17:47:07 +0100 Message-ID: <87r0jzuvlg.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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 06 Dec 2023 08:47:18 -0800 (PST) On Sat, Nov 11 2023 at 20:16, Jacob Pan wrote: $Subject: x86/vector: Reserve ... > Under posted MSIs, all device MSIs are multiplexed into a single CPU Under? > notification vector. MSI handlers will be de-multiplexed at run-time by > system software without IDT delivery. > > This vector has a priority class below the rest of the system vectors. Why? > Potentially, external vector number space for MSIs can be expanded to > the entire 0-256 range. Don't even mention this. It's wishful thinking and has absolutely nothing to do with the patch at hand. > Signed-off-by: Jacob Pan > --- > arch/x86/include/asm/irq_vectors.h | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h > index 3a19904c2db6..077ca38f5a91 100644 > --- a/arch/x86/include/asm/irq_vectors.h > +++ b/arch/x86/include/asm/irq_vectors.h > @@ -99,9 +99,22 @@ > > #define LOCAL_TIMER_VECTOR 0xec > > +/* > + * Posted interrupt notification vector for all device MSIs delivered to > + * the host kernel. > + * > + * Choose lower priority class bit [7:4] than other system vectors such > + * that it can be preempted by the system interrupts. That's future music and I'm not convinced at all that we want to allow nested interrupts with all their implications. Stack depth is the least of the worries here. There are enough other assumptions about interrupts not nesting in Linux. > + * It is also higher than all external vectors but it should not matter > + * in that external vectors for posted MSIs are in a different number space. This whole priority muck is pointless. The kernel never used it and will never use it. > + */ > +#define POSTED_MSI_NOTIFICATION_VECTOR 0xdf So this just wants to go into the regular system vector number space until there is a conclusion whether we can and want to allow nested interrupts. Premature optimization is just creating more confusion than value. Thanks, tglx