Page MenuHomeFreeBSD

hyperv storvsc: Don't abuse struct sglist to hold virtual addresses.
ClosedPublic

Authored by jhb on Sep 13 2021, 6:09 PM.
Tags
None
Referenced Files
F137743307: D31933.id102192.diff
Tue, Nov 25, 9:44 AM
F137743305: D31933.id95057.diff
Tue, Nov 25, 9:44 AM
F137743304: D31933.id.diff
Tue, Nov 25, 9:44 AM
F137743241: D31933.diff
Tue, Nov 25, 9:43 AM
Unknown Object (File)
Thu, Oct 30, 4:05 AM
Unknown Object (File)
Thu, Oct 30, 4:05 AM
Unknown Object (File)
Mon, Oct 27, 8:31 PM
Unknown Object (File)
Oct 21 2025, 2:35 AM
Subscribers

Details

Summary

struct sglist is intended for holding S/G lists of physical address
ranges, not virtual address ranges. GCC 9.x issues several warnings
due to casts between pointers and integers of different sizes as a
result (vm_paddr_t is 64-bits on i386). Instead, add a local 'struct
hv_sglist' which uses an array of 'struct iovec' to hold the S/G list
of virtual address ranges.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Sep 13 2021, 6:09 PM

This looks reasonable to me but I will defer to @whu for detailed review.

Please give me a few days to review. I am tied up with other issues right now. Thanks!

This revision was not accepted when it landed; it landed in state Needs Review.Feb 1 2022, 1:13 AM
This revision was automatically updated to reflect the committed changes.