Page MenuHomeFreeBSD

Only use byte register access in legacy virtio pci
ClosedPublic

Authored by andrew on Aug 5 2021, 3:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 17, 1:41 AM
Unknown Object (File)
Oct 17 2024, 5:40 PM
Unknown Object (File)
Oct 1 2024, 1:03 PM
Unknown Object (File)
Sep 24 2024, 9:07 AM
Unknown Object (File)
Sep 24 2024, 9:06 AM
Unknown Object (File)
Sep 22 2024, 11:09 AM
Unknown Object (File)
Sep 16 2024, 8:17 AM
Unknown Object (File)
Sep 9 2024, 3:43 AM
Subscribers

Details

Summary

Some simulators don't implement arbitrary sized memory access to the
virtio PCI registers. Follow Linux and use single byte accesses to read
and write to these registers.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40938
Build 37827: arc lint + arc unit

Event Timeline

andrew requested review of this revision.Aug 5 2021, 3:42 PM
bryanv added inline comments.
sys/dev/virtio/pci/virtio_pci_legacy.c
514–516

Nit: IMO these for loops end up being a little more complicated to read now that the body is simpler. For this one, perhaps something like:

for (d = dst, i = 0; i < length; i++) {
	d[i] = vtpci_legacy_read_config_1(sc, off + i)
}
This revision is now accepted and ready to land.Aug 6 2021, 5:49 PM
This revision now requires review to proceed.Aug 9 2021, 9:05 AM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 11 2021, 10:22 AM
This revision was automatically updated to reflect the committed changes.