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: store only the most preferred capability of a type #1402

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

cagatay-y
Copy link
Contributor

@cagatay-y cagatay-y commented Sep 25, 2024

According to the section 4.1.4 of the VIRTIO specification v1.2, "[t]he order of the capabilities in the capability list specifies the order of preference suggested by the device." Accordingly, store only the most preferred capability of a type in the UniCapsCollection structure when only one is necessary.

This also allows the corresponding fields to be changed from vectors to singles (when appropriate) and the existence of the mandatory capabilities to be checked early on.

According to the section 4.1.4 of the VIRTIO specification v1.2, "[t]he order of the capabilities in the capability list specifies the order of preference suggested by the device." Accordingly, store only the most preffered capability of a type in the `UniCapsCollection` structure when only one is necessary.

This also allows the corresponding fields to be changed from vectors to singles (when appropriate) and the existence of the mandatory capabilities to be checked early on.
@mkroening mkroening self-assigned this Sep 25, 2024
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!

@mkroening mkroening added this pull request to the merge queue Oct 14, 2024
Merged via the queue into hermit-os:main with commit 38544ba Oct 14, 2024
12 checks passed
@cagatay-y cagatay-y deleted the cap-priority branch November 15, 2024 13:57
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.

2 participants