Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5930650rwd; Mon, 5 Jun 2023 10:22:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ68Pv7YNk8dM5BX7uKcc4bPt/wpsAVp8qQBzW3S092GaOkDc8s6APWvQ50asGO+OJED7HgU X-Received: by 2002:a17:902:f7cf:b0:1b0:7cc:982a with SMTP id h15-20020a170902f7cf00b001b007cc982amr8142824plw.5.1685985762659; Mon, 05 Jun 2023 10:22:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685985762; cv=none; d=google.com; s=arc-20160816; b=F5t/DzX4MkFP9t32RRjK4xN2bcRoyJyWQw3PY38wiSk86PB3PyG8hYvFnsLb8BDwWu PKarMrYjx7bjaaKU6jn76RWTqQIX+WVZCh4eW3WK8RcYv5uuurKLxp0//6q9WZAEKz1O RV3e2ZoqRqGo5k46einIJ2NCoDk0OoKGuMdZyFL9E6aTAH6rijs4tj5+7yRF0fdzE5MT ULW4PcY+syc/t56kuthZpnH63bqRS9xdXoA3EiKIQbhEWZiEXQaQNuaj80Lqq92+yXp5 DogW8kOmaomzPgD8OQgA3T9kKMahkxGblK6BrNISGou4FewpMhiTR6RqHA8XTZ4gW9tn 2mwg== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-filter; bh=KcP52s6Jw81oN0ddZllHGZWFTWEw/h5qK+0sGBKaOvQ=; b=dzYmDtbZMi/WHUCeZKD0kCwX1FZoKiBz42YglT2jHKBYhTqUzan0tOIwZIbxVXoltd qtnMbqp7mFhsHql5RamyGKHFiTTv9gVChXX9o8vItE68WRnwa7/s702BKvKeaBnVxap/ e/ITQ6YdhJBKulqMUD07F91bd2QwLCqOPP2Uigwq464T/eG+GYsyt+OHP7wD7QH5w9mf R2oaNLXsdLs7ss65db8oalo16OF6WRyxU0ivBR2LSZRv+Od6t04/lAbxfctYc10Q8n0O Yr58Rez6kW5jPsykufBvCXON52aRcd482ZZhyp6AoXHDHG6FynDJxmfM8OvjO72c+tvn HwuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zytor.com header.s=2023051001 header.b=GdQsEfqH; 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=zytor.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l17-20020a170902f69100b001aaf5dcd774si6014707plg.173.2023.06.05.10.22.29; Mon, 05 Jun 2023 10:22:42 -0700 (PDT) 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=@zytor.com header.s=2023051001 header.b=GdQsEfqH; 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=zytor.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235019AbjFEQ4E (ORCPT + 99 others); Mon, 5 Jun 2023 12:56:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233729AbjFEQ4D (ORCPT ); Mon, 5 Jun 2023 12:56:03 -0400 Received: from mail.zytor.com (unknown [IPv6:2607:7c80:54:3::138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A46FE8; Mon, 5 Jun 2023 09:56:02 -0700 (PDT) Received: from [172.27.2.41] ([73.231.166.163]) (authenticated bits=0) by mail.zytor.com (8.17.1/8.17.1) with ESMTPSA id 355Gtg3v3944865 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Mon, 5 Jun 2023 09:55:42 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 355Gtg3v3944865 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2023051001; t=1685984144; bh=KcP52s6Jw81oN0ddZllHGZWFTWEw/h5qK+0sGBKaOvQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=GdQsEfqH+ayBj0hAAn8mpzHQWafKlnObqngLYYTdkre0rsaSsmWB6UIxeTlTGLO0V VNsnnBiJQ6dWpKMDr3XN4cd9XTfy1zwN4pA9T+fA1eQcAqDphst2LFrSeyrfbXkFow q5MnSobQSYrLM5nyzvn+nCBDtJ75nu2sW+za7DcvdF7d1TS8RqSdrBJuFvUZNV+HWg DtXi9no/UF1dauuKoKYuw7N2u8Cv9UtrLyruHK5RdPBI3XIk5oNlg7warB0ikLoCPY 8u4TFdjsbPQytToeL2I9Z1L3TEpuhMcOPp0awscThA2b/iC1XZE37m/MlijLazwGoT YilmBo9KmoDlg== Message-ID: <2d069dc4-6383-57f2-819c-23b7d65f460e@zytor.com> Date: Mon, 5 Jun 2023 09:55:40 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v8 29/33] x86/fred: allow FRED systems to use interrupt vectors 0x10-0x1f Content-Language: en-US To: Thomas Gleixner , Xin Li , linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org Cc: mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, peterz@infradead.org, andrew.cooper3@citrix.com, seanjc@google.com, pbonzini@redhat.com, ravi.v.shankar@intel.com, jiangshanlai@gmail.com, shan.kang@intel.com References: <20230410081438.1750-1-xin3.li@intel.com> <20230410081438.1750-30-xin3.li@intel.com> <87zg5e57go.ffs@tglx> From: "H. Peter Anvin" In-Reply-To: <87zg5e57go.ffs@tglx> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On 6/5/23 07:06, Thomas Gleixner wrote: > On Mon, Apr 10 2023 at 01:14, Xin Li wrote: >> From: "H. Peter Anvin (Intel)" >> >> FRED inherits the Intel VT-x enhancement of classified events with >> a two-level event dispatch logic. The first-level dispatch is on >> the event type, and the second-level is on the event vector. This >> also means that vectors in different event types are orthogonal, >> thus, vectors 0x10-0x1f become available as hardware interrupts. >> >> Enable interrupt vectors 0x10-0x1f on FRED systems (interrupt 0x80 is >> already enabled.) Most of these changes are about removing the >> assumption that the lowest-priority vector is hard-wired to 0x20. > > I'm not really interested in this again premature optimization. > > Can we please clarify how the final result of FRED vector layout will > look like? > > I rather give up on reclaiming these 16 vectors than making _all_ system > vectors dynamically assignable to avoid an extra partitioning of the > vector space. > So this patch was meant to go *after* the FRED patch set proper. This patch does not change any of the system vectors except, by necessity, IRQ_MOVE_CLEANUP_VECTOR, nor does it change the way they are assigned to fixed vectors today. It does make the lowest *non*-system vector a variable, but the system vectors are at the end. This is something that should be commented: the setting of bits in system_vector is really misleading: those aren't "system vectors", they are the vectors reserved for hardware use. On IDT, this means vectors 0-31 because they are used for exceptions, but on FRED interrupts and exceptions are separate; however vectors 0-15 still need to be reserved because the APIC doesn't support them. We *could* change that, but that is completely independent of this. -hpa