Thanks to visit codestin.com
Credit goes to github.com

Skip to content

vmm: interrupt: Allocate GSIs for MSI/MSI-X interrupt vectors lazily - #7940

Merged
likebreath merged 2 commits into
cloud-hypervisor:mainfrom
likebreath:0328/gsi_lazy_allocation
Apr 1, 2026
Merged

likebreath merged 2 commits into
cloud-hypervisor:mainfrom
likebreath:0328/gsi_lazy_allocation

Conversation

@likebreath

Copy link
Copy Markdown
Member

Previously, GSIs were eagerly allocated for all MSI-X vectors a device
advertises (i.e. the maximum the device can support). This can easily
exhaust KVM_MAX_IRQ_ROUTES (4096) with modern NVMe devices
that support up to 2048 MSI-X vectors.

Defer GSI allocation to the first time an interrupt vector is
unmasked. The EventFd is still created eagerly since external
components (e.g. VFIO) need it at device init time.

Previously, GSIs were eagerly allocated for all MSI-X vectors a device
advertises (i.e. the maximum the device can support). This can easily
exhaust KVM_MAX_IRQ_ROUTES (4096) with modern NVMe devices that support
up to 2048 MSI-X vectors.

Defer GSI allocation to the first time an interrupt vector is
unmasked. The EventFd is still created eagerly since external
components (e.g. VFIO) need it at device init time.

Signed-off-by: Bo Chen <[email protected]>
@phip1611

Copy link
Copy Markdown
Member

FYI: My colleague @amphi build properly GSI free'ing, e.g. on device unplug. Although not directly related, I think you'd be very interested in that as well. We hadn't have the time to upstream yet.

cyberus-technology#74

@likebreath
likebreath marked this pull request as ready for review March 31, 2026 22:20
@likebreath
likebreath requested a review from a team as a code owner March 31, 2026 22:20
@likebreath
likebreath added this pull request to the merge queue Apr 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 1, 2026
@likebreath
likebreath added this pull request to the merge queue Apr 1, 2026
Merged via the queue into cloud-hypervisor:main with commit 0686045 Apr 1, 2026
38 checks passed
@rbradford rbradford moved this to ✅ Done in Cloud Hypervisor Roadmap Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

4 participants