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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
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