Skip to content

Conversation

@Lencerf
Copy link
Contributor

@Lencerf Lencerf commented Dec 26, 2023

As per virtio spec 4.1.3.1 [1]:

For device configuration access, the driver MUST use 8-bit wide
accesses for 8-bit wide fields, 16-bit wide and aligned accesses for
16-bit wide fields and 32-bit wide and aligned accesses for 32-bit
and 64-bit wide fields.

This patch makes the virtio-pci driver sets 64-bit addresses with 2 32-bit writes to align with the spec.

[1] https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-1220001

As per virtio spec 4.1.3.1 [1]:

> For device configuration access, the driver MUST use 8-bit wide
> accesses for 8-bit wide fields, 16-bit wide and aligned accesses for
> 16-bit wide fields and 32-bit wide and aligned accesses for 32-bit
> and 64-bit wide fields.

This patch makes the virtio-pci driver sets 64-bit addresses with 2
32-bit writes to align with the spec.

[1] https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-1220001

Signed-off-by: Changyuan Lyu <[email protected]>
@retrage retrage self-requested a review December 27, 2023 03:51
Copy link
Contributor

@retrage retrage left a comment

Choose a reason for hiding this comment

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

Thank you for the fix. It looks good to me!

@retrage retrage merged commit 84725ef into cloud-hypervisor:main Dec 27, 2023
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