Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtio-pci: map BAR with the information from capabilities #1403

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

cagatay-y
Copy link
Contributor

Currently, we map the BAR spaces ahead of time and then match them with the capability they belong to. We can get the slot index from the capability and map the space based on that instead. Although creating a BAR list independent of the capability list could be useful for devices that do not support capability lists, we assume the existence of that support anyways. Fixes #1392.

Copy link
Member

@mkroening mkroening left a comment

Choose a reason for hiding this comment

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

Thanks! Could you rebase?

Currently, we map the BAR spaces ahead of time and then match them with the capability they belong to. We can get the slot index from the capability and map the space based on that instead. Although creating a BAR list independent of the capability list could be useful for devices that do not support capability lists, we assume the existence of that support anyways. Fixes hermit-os#1392.
@mkroening mkroening enabled auto-merge January 30, 2025 15:58
@mkroening mkroening added this pull request to the merge queue Jan 30, 2025
Merged via the queue into hermit-os:main with commit 3595c0d Jan 30, 2025
13 checks passed
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.

virtio: PCI BAR mapping may be accessing invalid slots
2 participants