Skip to content

x86/irq: bound extra_guest_irqs once nr_irqs is known - #51

Open
azenla wants to merge 1 commit into
edera/4.22from
azenla/fix/tpu-fixes
Open

azenla wants to merge 1 commit into
edera/4.22from
azenla/fix/tpu-fixes

Conversation

@azenla

@azenla azenla commented Oct 10, 2026

Copy link
Copy Markdown
Member

setup_system_domains() clamps "extra_guest_irqs=" against arch_hwdom_irqs(dom_xen), which is bounded by nr_irqs. That runs before init_irq_data() computes nr_irqs, so any value above the default is cut to zero ("domU IRQs bounded to 16") and domUs get only nr_static_irqs PIRQs. Passing through a device with many MSI-X vectors then fails with -ENOSPC in map_pirq.

Run the bound check from x86 setup right after init_irq_data() instead.

setup_system_domains() clamps "extra_guest_irqs=" against
arch_hwdom_irqs(dom_xen), which is bounded by nr_irqs. That runs before
init_irq_data() computes nr_irqs, so any value above the default is cut to
zero ("domU IRQs bounded to 16") and domUs get only nr_static_irqs PIRQs.
Passing through a device with many MSI-X vectors then fails with -ENOSPC in
map_pirq.

Run the bound check from x86 setup right after init_irq_data() instead.

Signed-off-by: Alex Zenla <alex@edera.dev>

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review

Reviewed at 8522d31.

This check did not finish, so it has nothing to say about the diff. The run log has the reason.

Test Coverage

Reviewed at 8522d31.

This check did not finish, so it has nothing to say about the diff. The run log has the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant