From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.19 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796010083; b=okG09FbtnM43NH8J+v0qlSOWPwNHGV5MAIjkkXWD5eMU2Qhz4bbITCIBsh+1pGTEXWrM LvWfj9AvEBHbA0XOfxqLt1VsUomeNZxBZbjpABjsfYAtMu88IKuAOScTKPIyF6YRTkYII 02jiEBMwXsGdTKE2wlsdZF8x0GiJIIHYK8AzNyT6+fQS/Kuo2oY1O6gNIoHgLo6Roz1io U8u6N1rfEoOchCicoLbhupucFAtmSTSW46EEMgvrM9YmKNm+kwsAzJz4UMq6WQQO7BFIY mw2EO13HJDocMPPr0CnrFCAH6H2i6za2kWLnPkpRf/3BliszY53irXV4J03WXbWGYzQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796010083; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=/kb6XIcBeAheu0HB4VPPO1pic+M8274eTdjD05F1oMI=; b=YwuHBA9mjrBrQn1kFNMVuVWXVxaWrNckcmnCPdTihXmXg1amLg1NwRtBLveTj35+iRnK Fbr7u7x1o1VNgUix5NOljYWoOBCGlnjwd2IZFjPKey1vJDUPHajjWu2KSflVz2xEuRuLi 5CEnjgf28XRHOQxWVPUVn/O4RcAy8Agj+tHTfNPoWTYiUFWWABuvlbaerYda3QZ6X1UiG HLZJCVYSj4hxmDFbfK+sI4UPAAER9ZNRYe0NX7bIUzsXZL9ujXaPtAVEZ1eMmIkW3Y69l U3PS9smZXpZWqfV1uV3CVEXJ2nzSN6dYQUle6qk3IG0gJDCUZniKpdUa5iKqZ+Xgfkg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Pbo4dR6M; arc=none smtp.remote-ip=192.198.163.19 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A20E5606A32C; Mon, 30 Nov 2026 03:41:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A20E5606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Pbo4dR6M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796010083; x=1827546083; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KXaYeuXJ0ZlEYLiXidV4/6HI6/syehAodxpLFhoUTeU=; b=Pbo4dR6MVNEnweCZUpO9LA3FnzWhg/Yc02vWAuhKSBYwuU/j+NPrY/f9 LWut+r0V3ZtlrB/GOsdHEuB/D+QW6l70bACkcqN84aH80K7oiRqUiLedk MvXe8m1NB4z9ZcHAMG24ypdOfagFFiSCtRuYsc1Dq2j+lJetzEj8S75Xp 1Wc+8glIzCv+oWlmtr3KE9WvguFpL5kwH3Zev5o6Cmo61JJnZZUhaPbwO eN5+BCp4+vheDVszFacdA7q2xm/r3ySHrJZZshmJYX4txVE56FcorF/9K q6n2I0H3X05AoEWjSzwIVn6+CjOKpj+8MGBmPJI/nHJa+He9Xm2zWvH+i Q==; X-CSE-ConnectionGUID: 7Aix30AeSVSEeuhrQ916Fg== X-CSE-MsgGUID: aWrYr42tQ/qoKCU5EihDcA== X-IronPort-AV: E=McAfee;i="6800,10657,11981"; a="4848393" X-IronPort-AV: E=Sophos;i="6.27,242,1787036400"; d="scan'208";a="4848393" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2026 19:41:22 -0800 X-CSE-ConnectionGUID: 03TtBTxGS4yS8ZZBw5v7Gw== X-CSE-MsgGUID: xUMSqudsT3uYTKNig3rPXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,242,1787036400"; d="scan'208";a="12951101" Received: from pankris-x299-ud4-pro.bj.intel.com ([10.238.152.122]) by fmviesa005.fm.intel.com with ESMTP; 29 Nov 2026 19:41:13 -0800 From: Kris Pan To: tglx@kernel.org, maz@kernel.org Cc: mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, x86@kernel.org, peterz@infradead.org, frederic@kernel.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, longman@redhat.com, tj@kernel.org, corbet@lwn.net, linux-doc@vger.kernel.org, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, joro@8bytes.org, will@kernel.org, robin.murphy@arm.com, dwmw2@infradead.org, baolu.lu@linux.intel.com, vasant.hegde@amd.com, suravee.suthikulpanit@amd.com, iommu@lists.linux.dev, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, linux-hyperv@vger.kernel.org, bhelgaas@google.com, lpieralisi@kernel.org, linux-pci@vger.kernel.org, steve.wahl@hpe.com, bigeasy@linutronix.de, clrkwllms@kernel.org, linux-rt-devel@lists.linux.dev, radu@rendec.net, linux-kernel@vger.kernel.org, Kris Pan Subject: [RFC PATCH 08/10] x86/apic: Support runtime IRQ isolation Date: Mon, 30 Nov 2026 11:37:06 +0800 Message-ID: <20261130033709.2704805-9-kris.pan@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261130033709.2704805-1-kris.pan@intel.com> References: <20261130033709.2704805-1-kris.pan@intel.com> X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit x86_vector_activate() allocates an initial APIC vector before irq_setup_affinity() runs, so the initial target can be a runtime isolated CPU even though later affinity updates are filtered. The policy must be evaluated from the descriptor's leaf irq_data: x86_vector_activate() runs with the vector level's irq_data, whose parent_data is NULL, so a filterability walk from there would only see lapic_controller and bypass the FILTERABLE/PASSTHROUGH contract of the intermediate domains. Resolve the leaf first and gate the filtered fallbacks on the same check. Use the shared isolation selection helper for the initial vector. Then try the node-local and global online fallbacks with only the runtime-isolated CPUs removed, before the upstream unfiltered ones. Boot-time isolcpus=domain CPUs stay valid fallback targets exactly as they were before any runtime partition existed, and an isolated CPU in the local node is not picked while a housekeeping CPU exists elsewhere. Read the runtime isolated set once per vector assignment and share it between the two filtered fallbacks, so they cannot observe different isolation states. Guard these paths with RCU and the managed/balance checks, and opt lapic_controller into IRQCHIP_AFFINITY_FILTERABLE. The forwarding levels above the vector chip are not delivery chips: ioapic_chip, ioapic_ir_chip, the MSI chips installed by x86_init_dev_msi_info() (including the DMAR and AMDVI parents), dmar_msi_controller, hpet_msi_controller, intel_ir_chip, intel_ir_chip_post_msi, amd_ir_chip, hyperv_ir_chip, hyperv_root_ir_chip, the Hyper-V PCI MSI parents (arch/x86/hyperv/irqdomain.c and drivers/pci/controller/pci-hyperv.c) and the UV core domain only pass the mask to their parent and derive no state from it, so mark them IRQCHIP_AFFINITY_PASSTHROUGH. Without the interrupt-remapping levels the walk would disable filtering on every machine which boots with VT-d or AMD-Vi interrupt remapping. An unmarked MSI parent domain keeps filtering off for its interrupts. The Hyper-V parents and the UV core domain were missed by the first version, which left filtering off on every Hyper-V guest and root-partition pass-through device. Allocate the isolation mask only when CONFIG_CPU_ISOLATION is enabled, so it stays out of the image otherwise. arch_early_irq_init() has no error path, so a failed allocation disables the x86 fallback filtering with a warning instead of returning -ENOMEM and continuing with an unusable mask, or adding a new BUG_ON(). The cpumask_available() check makes the separate ready flag redundant. Signed-off-by: Kris Pan --- arch/x86/hyperv/irqdomain.c | 4 +- arch/x86/kernel/apic/io_apic.c | 6 +- arch/x86/kernel/apic/msi.c | 8 +- arch/x86/kernel/apic/vector.c | 105 +++++++++++++++++++++++- arch/x86/kernel/hpet.c | 3 +- arch/x86/platform/uv/uv_irq.c | 1 + drivers/iommu/amd/iommu.c | 1 + drivers/iommu/hyperv/hv-irq-remap-x86.c | 2 + drivers/iommu/intel/irq_remapping.c | 2 + drivers/pci/controller/pci-hyperv.c | 2 + 10 files changed, 124 insertions(+), 10 deletions(-) diff --git a/arch/x86/hyperv/irqdomain.c b/arch/x86/hyperv/irqdomain.c index b3ad50a874dca..65d067df0b4eb 100644 --- a/arch/x86/hyperv/irqdomain.c +++ b/arch/x86/hyperv/irqdomain.c @@ -304,6 +304,7 @@ static struct irq_chip hv_pci_msi_controller = { .irq_ack = irq_chip_ack_parent, .irq_compose_msi_msg = hv_irq_compose_msi_msg, .irq_set_affinity = irq_chip_set_affinity_parent, + .flags = IRQCHIP_AFFINITY_PASSTHROUGH, }; static bool hv_init_dev_msi_info(struct device *dev, struct irq_domain *domain, @@ -315,7 +316,8 @@ static bool hv_init_dev_msi_info(struct device *dev, struct irq_domain *domain, if (!msi_lib_init_dev_msi_info(dev, domain, real_parent, info)) return false; - chip->flags |= IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MOVE_DEFERRED; + chip->flags |= IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MOVE_DEFERRED | + IRQCHIP_AFFINITY_PASSTHROUGH; info->ops->msi_prepare = pci_msi_prepare; diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 7d7175d012288..d5f0c78bcb6f8 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1860,7 +1860,8 @@ static struct irq_chip ioapic_chip __read_mostly = { .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_get_irqchip_state = ioapic_irq_get_chip_state, .flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MOVE_DEFERRED | - IRQCHIP_AFFINITY_PRE_STARTUP, + IRQCHIP_AFFINITY_PRE_STARTUP | + IRQCHIP_AFFINITY_PASSTHROUGH, }; static struct irq_chip ioapic_ir_chip __read_mostly = { @@ -1874,7 +1875,8 @@ static struct irq_chip ioapic_ir_chip __read_mostly = { .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_get_irqchip_state = ioapic_irq_get_chip_state, .flags = IRQCHIP_SKIP_SET_WAKE | - IRQCHIP_AFFINITY_PRE_STARTUP, + IRQCHIP_AFFINITY_PRE_STARTUP | + IRQCHIP_AFFINITY_PASSTHROUGH, }; static inline void init_IO_APIC_traps(void) diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c index da5f44a80313f..c1fc271720a46 100644 --- a/arch/x86/kernel/apic/msi.c +++ b/arch/x86/kernel/apic/msi.c @@ -214,10 +214,13 @@ static bool x86_init_dev_msi_info(struct device *dev, struct irq_domain *domain, if (WARN_ON_ONCE(domain != real_parent)) return false; info->chip->irq_set_affinity = msi_set_affinity; - info->chip->flags |= IRQCHIP_MOVE_DEFERRED; + info->chip->flags |= IRQCHIP_MOVE_DEFERRED | + IRQCHIP_AFFINITY_PASSTHROUGH; break; case DOMAIN_BUS_DMAR: case DOMAIN_BUS_AMDVI: + /* The IR domain in between only forwards the mask. */ + info->chip->flags |= IRQCHIP_AFFINITY_PASSTHROUGH; break; default: WARN_ON_ONCE(1); @@ -317,7 +320,8 @@ static struct irq_chip dmar_msi_controller = { .irq_compose_msi_msg = dmar_msi_compose_msg, .irq_write_msi_msg = dmar_msi_write_msg, .flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MOVE_DEFERRED | - IRQCHIP_AFFINITY_PRE_STARTUP, + IRQCHIP_AFFINITY_PRE_STARTUP | + IRQCHIP_AFFINITY_PASSTHROUGH, }; static int dmar_msi_init(struct irq_domain *domain, diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index bddc544653999..1848ef920caec 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -9,6 +9,8 @@ */ #include #include +#include +#include #include #include #include @@ -41,6 +43,24 @@ struct irq_domain *x86_vector_domain; EXPORT_SYMBOL_GPL(x86_vector_domain); static DEFINE_RAW_SPINLOCK(vector_lock); static cpumask_var_t vector_searchmask; +#ifdef CONFIG_CPU_ISOLATION +static cpumask_var_t vector_isolation_mask; + +/* + * Return the scratch mask for the runtime IRQ isolation filter, or NULL + * when CPU isolation is disabled or the mask could not be allocated. + */ +static struct cpumask *irq_isolation_scratch(void) +{ + return cpumask_available(vector_isolation_mask) ? + vector_isolation_mask : NULL; +} +#else +static inline struct cpumask *irq_isolation_scratch(void) +{ + return NULL; +} +#endif static struct irq_chip lapic_controller; static struct irq_matrix *vector_matrix; #ifdef CONFIG_SMP @@ -284,11 +304,44 @@ static int assign_irq_vector(struct irq_data *irqd, const struct cpumask *dest) return ret; } +/* + * The isolation policy has to be evaluated against the descriptor's leaf + * irq_data. x86_vector_activate() runs with the vector level's irq_data, + * whose parent_data is NULL, so a filterability walk from there would + * only see the vector chip and bypass the FILTERABLE/PASSTHROUGH contract + * of the intermediate domains. + */ +static struct irq_data *irq_isolation_policy_data(struct irq_data *irqd) +{ + struct irq_desc *desc = irq_data_to_desc(irqd); + + return desc ? &desc->irq_data : irqd; +} + +static const struct cpumask * +irq_isolation_affinity_mask(struct irq_data *data) +{ + const struct cpumask *affmsk = irq_data_get_affinity_mask(data); + struct cpumask *scratch = irq_isolation_scratch(); + + if (!scratch || !irq_isolation_active() || !irqd_can_balance(data) || + irqd_affinity_is_managed(data)) + return affmsk; + + lockdep_assert_held(&vector_lock); + if (irq_isolation_select_mask(data, affmsk, scratch)) + affmsk = scratch; + return affmsk; +} + static int assign_irq_vector_any_locked(struct irq_data *irqd) { + struct irq_data *policy = irq_isolation_policy_data(irqd); /* Get the affinity mask - either irq_default_affinity or (user) set */ - const struct cpumask *affmsk = irq_data_get_affinity_mask(irqd); + const struct cpumask *affmsk = irq_isolation_affinity_mask(policy); + struct cpumask *scratch = irq_isolation_scratch(); int node = irq_data_get_node(irqd); + bool isolate; if (node != NUMA_NO_NODE) { /* Try the intersection of @affmsk and node mask */ @@ -302,13 +355,52 @@ static int assign_irq_vector_any_locked(struct irq_data *irqd) if (!assign_vector_locked(irqd, vector_searchmask)) return 0; + isolate = scratch && irq_isolation_active() && + irq_isolation_can_filter(policy) && + !irqd_affinity_is_managed(policy) && irqd_can_balance(policy); + + /* + * Take a single snapshot of the runtime isolated set for both + * fallbacks below. Reading it twice could observe two different + * isolation states, and the scratch buffer is no longer needed by + * @affmsk at this point. + */ + if (isolate) { + rcu_read_lock(); + housekeeping_runtime_isolated(scratch); + rcu_read_unlock(); + } + + if (node != NUMA_NO_NODE && isolate) { + /* + * Only runtime-isolated CPUs are excluded here. Boot-time + * isolcpus=domain CPUs must stay valid fallback targets, + * exactly as without runtime isolation. + */ + cpumask_andnot(vector_searchmask, cpumask_of_node(node), + scratch); + if (!cpumask_empty(vector_searchmask) && + !assign_vector_locked(irqd, vector_searchmask)) + return 0; + } + + if (isolate) { + cpumask_andnot(vector_searchmask, cpu_online_mask, scratch); + if (!cpumask_empty(vector_searchmask) && + !assign_vector_locked(irqd, vector_searchmask)) + return 0; + } + + /* + * The filtered targets are exhausted, or isolation does not apply. + * Retry the upstream unfiltered targets, but only after the + * filtered global set: an isolated CPU in the local node must not + * be preferred over a housekeeping CPU elsewhere. + */ if (node != NUMA_NO_NODE) { - /* Try the node mask */ if (!assign_vector_locked(irqd, cpumask_of_node(node))) return 0; } - - /* Try the full online mask */ return assign_vector_locked(irqd, cpu_online_mask); } @@ -808,6 +900,10 @@ int __init arch_early_irq_init(void) irq_set_default_domain(x86_vector_domain); BUG_ON(!alloc_cpumask_var(&vector_searchmask, GFP_KERNEL)); +#ifdef CONFIG_CPU_ISOLATION + if (!zalloc_cpumask_var(&vector_isolation_mask, GFP_KERNEL)) + pr_err("x86/apic: Failed to allocate the IRQ isolation mask\n"); +#endif /* * Allocate the vector matrix allocator data structure and limit the @@ -1036,6 +1132,7 @@ static struct irq_chip lapic_controller = { .irq_compose_msi_msg = x86_vector_msi_compose_msg, .irq_force_complete_move = apic_force_complete_move, .irq_retrigger = apic_retrigger_irq, + .flags = IRQCHIP_AFFINITY_FILTERABLE, }; #ifdef CONFIG_SMP diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 8dc7b710e1250..dcbf33e15774c 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -511,7 +511,8 @@ static struct irq_chip hpet_msi_controller __ro_after_init = { .irq_set_affinity = msi_domain_set_affinity, .irq_retrigger = irq_chip_retrigger_hierarchy, .irq_write_msi_msg = hpet_msi_write_msg, - .flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_AFFINITY_PRE_STARTUP, + .flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_AFFINITY_PRE_STARTUP | + IRQCHIP_AFFINITY_PASSTHROUGH, }; static int hpet_msi_init(struct irq_domain *domain, diff --git a/arch/x86/platform/uv/uv_irq.c b/arch/x86/platform/uv/uv_irq.c index 4f200ac96ce08..8f810259092f0 100644 --- a/arch/x86/platform/uv/uv_irq.c +++ b/arch/x86/platform/uv/uv_irq.c @@ -70,6 +70,7 @@ static struct irq_chip uv_irq_chip = { .irq_unmask = uv_noop, .irq_eoi = apic_ack_irq, .irq_set_affinity = uv_set_irq_affinity, + .flags = IRQCHIP_AFFINITY_PASSTHROUGH, }; static int uv_domain_alloc(struct irq_domain *domain, unsigned int virq, diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index 0f04013f590d4..9705831adef37 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -4285,6 +4285,7 @@ static struct irq_chip amd_ir_chip = { .irq_set_affinity = amd_ir_set_affinity, .irq_set_vcpu_affinity = amd_ir_set_vcpu_affinity, .irq_compose_msi_msg = ir_compose_msi_msg, + .flags = IRQCHIP_AFFINITY_PASSTHROUGH, }; static const struct msi_parent_ops amdvi_msi_parent_ops = { diff --git a/drivers/iommu/hyperv/hv-irq-remap-x86.c b/drivers/iommu/hyperv/hv-irq-remap-x86.c index 4963c9ce05dc5..2b6a5693e7de7 100644 --- a/drivers/iommu/hyperv/hv-irq-remap-x86.c +++ b/drivers/iommu/hyperv/hv-irq-remap-x86.c @@ -58,6 +58,7 @@ static struct irq_chip hyperv_ir_chip = { .name = "HYPERV-IR", .irq_ack = apic_ack_irq, .irq_set_affinity = hyperv_ir_set_affinity, + .flags = IRQCHIP_AFFINITY_PASSTHROUGH, }; static int hyperv_irq_remapping_alloc(struct irq_domain *domain, @@ -256,6 +257,7 @@ static struct irq_chip hyperv_root_ir_chip = { .irq_ack = apic_ack_irq, .irq_set_affinity = hyperv_root_ir_set_affinity, .irq_compose_msi_msg = hyperv_root_ir_compose_msi_msg, + .flags = IRQCHIP_AFFINITY_PASSTHROUGH, }; static int hyperv_root_irq_remapping_alloc(struct irq_domain *domain, diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_remapping.c index 25c26f706984a..c9483bb0c6961 100644 --- a/drivers/iommu/intel/irq_remapping.c +++ b/drivers/iommu/intel/irq_remapping.c @@ -1282,6 +1282,7 @@ static struct irq_chip intel_ir_chip = { .irq_set_affinity = intel_ir_set_affinity, .irq_compose_msi_msg = intel_ir_compose_msi_msg, .irq_set_vcpu_affinity = intel_ir_set_vcpu_affinity, + .flags = IRQCHIP_AFFINITY_PASSTHROUGH, }; /* @@ -1326,6 +1327,7 @@ static struct irq_chip intel_ir_chip_post_msi = { .irq_set_affinity = intel_ir_set_affinity, .irq_compose_msi_msg = intel_ir_compose_msi_msg, .irq_set_vcpu_affinity = intel_ir_set_vcpu_affinity, + .flags = IRQCHIP_AFFINITY_PASSTHROUGH, }; static void fill_msi_msg(struct msi_msg *msg, u32 index, u32 subhandle) diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index 824cf27e85e67..0263b1ba75959 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c @@ -2138,6 +2138,7 @@ static bool hv_pcie_init_dev_msi_info(struct device *dev, struct irq_domain *dom chip->irq_set_affinity = irq_chip_set_affinity_parent; chip->irq_retrigger = irq_chip_retrigger_hierarchy; + chip->flags |= IRQCHIP_AFFINITY_PASSTHROUGH; if (IS_ENABLED(CONFIG_X86)) chip->flags |= IRQCHIP_MOVE_DEFERRED; @@ -2171,6 +2172,7 @@ static struct irq_chip hv_msi_irq_chip = { .irq_eoi = irq_chip_eoi_parent, .irq_mask = hv_irq_mask, .irq_unmask = hv_irq_unmask, + .flags = IRQCHIP_AFFINITY_PASSTHROUGH, }; static int hv_pcie_domain_alloc(struct irq_domain *d, unsigned int virq, unsigned int nr_irqs, -- 2.43.0