Conversation
added 7 commits
November 30, 2025 12:34
- add msi.asm - add os_bus_cap_check function
``` (qemu) xp /16bx 0xfebd1800 00000000febd1800: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ```
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.
This pull request refactors the way Message Signaled Interrupts (MSI and MSI-X) are initialized and managed for PCI devices, especially for the xHCI USB and Virtio-Net drivers. The main improvement is the introduction of a unified MSI/MSI-X initialization routine in a new driver file, which replaces duplicated code in device-specific drivers. Additionally, interrupt handling and configuration for Virtio-Net is streamlined and improved.
Interrupt Initialization and Handling
msi.asmcontaining routines for initializing MSI and MSI-X (msix_initandmsi_init), which are now used by both xHCI and Virtio-Net drivers to configure interrupts more cleanly and with less duplicated code. [1] [2]xhci_init:inbus/xhci.asmand from Virtio-Net capability parsing, replacing it with calls to the newmsix_initroutine. [1] [2]net_virtio_intand logic to create an IDT gate for Virtio-Net, enabling hardware interrupts for the device when MSI-X is available. [1] [2]Capability Detection and Abstraction
os_bus_cap_checkfor generic PCI capability detection, used by the new MSI/MSI-X initialization routines to simplify and standardize capability checks.Virtio-Net Driver Improvements
net_table, and properly configure queue MSI-X vectors and config interrupts. This improves interrupt management and device configuration. [1] [2] [3] [4]Codebase Cleanup
These changes collectively improve interrupt support for PCI devices, reduce code duplication, and make the drivers easier to maintain and extend.