lkl: Add MSI and MSI-X support - #642
Open
clingfei wants to merge 1 commit into
Open
Conversation
clingfei
force-pushed
the
pci-msi
branch
2 times, most recently
from
August 7, 2026 08:58
f486523 to
557a360
Compare
clingfei
force-pushed
the
pci-msi
branch
2 times, most recently
from
August 9, 2026 12:17
826d048 to
83bfffe
Compare
Add PCI MSI/MSI-X interrupt support for LKL PCI devices. Implement LKL arch MSI hooks so PCI drivers can allocate MSI and MSI-X vectors through the generic PCI MSI fallback path. MSI vectors are backed by contiguous LKL IRQ blocks, while MSI-X vectors preserve sparse hardware vector indexes. The setup path associates MSI descriptors with LKL IRQs, installs an MSI irq_chip, programs the MSI multiple-message enable value, and unwinds IRQ state on failures. Extend the LKL PCI host ABI with MSI/MSI-X setup and teardown callbacks, and teach the VFIO PCI host backend to wire VFIO MSI/MSI-X eventfds to LKL IRQs. When MSI/MSI-X is enabled, the VFIO backend disables the INTx path, polls the MSI eventfds, triggers the matching LKL IRQs, and restores INTx when MSI/MSI-X is torn down. Also fix LKL ioremap handling for BAR offsets and add KUnit coverage for MSI IRQ allocation, sparse MSI-X vector indexes, and failure unwind paths. Enable PCI_MSI in the LKL defconfig and include the MSI KUnit suite in the LKL test configuration. Signed-off-by: Cheng Lingfei <chenglingfei@foxmail.com>
Author
|
Thanks. Test failures have been fixed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add PCI MSI/MSI-X interrupt support for LKL PCI devices.
Implement LKL arch MSI hooks so PCI drivers can allocate MSI and MSI-X vectors through the generic PCI MSI fallback path. MSI vectors are backed by contiguous LKL IRQ blocks, while MSI-X vectors preserve sparse hardware vector indexes. The setup path associates MSI descriptors with LKL IRQs, installs an MSI irq_chip, programs the MSI multiple-message enable value, and unwinds IRQ state on failures.
Extend the LKL PCI host ABI with MSI/MSI-X setup and teardown callbacks, and teach the VFIO PCI host backend to wire VFIO MSI/MSI-X eventfds to LKL IRQs. When MSI/MSI-X is enabled, the VFIO backend disables the INTx path, polls the MSI eventfds, triggers the matching LKL IRQs, and restores INTx when MSI/MSI-X is torn down.
Also fix LKL ioremap handling for BAR offsets and add KUnit coverage for MSI IRQ allocation, sparse MSI-X vector indexes, and failure unwind paths. Enable PCI_MSI in the LKL defconfig and include the MSI KUnit suite in the LKL test configuration.