Page MenuHomeFreeBSD

amd-vi: fix gcc build errors
ClosedPublic

Authored by rlibby on Jul 5 2017, 5:07 AM.
Tags
None
Referenced Files
F147242148: D11485.id.diff
Mon, Mar 9, 9:29 AM
F147195431: D11485.id30422.diff
Mon, Mar 9, 12:43 AM
F147177462: D11485.id30422.diff
Sun, Mar 8, 9:15 PM
Unknown Object (File)
Sat, Mar 7, 6:25 PM
Unknown Object (File)
Sat, Mar 7, 3:26 PM
Unknown Object (File)
Sat, Mar 7, 3:26 PM
Unknown Object (File)
Fri, Mar 6, 3:30 PM
Unknown Object (File)
Fri, Mar 6, 3:25 PM
Subscribers

Details

Summary

amdvi_cmp_wait: gcc complained about a malformed string behind an ifdef.

struct amdvi_dte: widen the type of the first reserved bitfield so that the packed representation would not cross an alignment boundary for that type. Apparently that causes in-tree gcc (4.2) to insert padding (despite packed, resulting in a wrong structure definition), and causes more modern gcc to emit a warning.

ivrs_hdr_iterate_tbl: delete a misleading check about header length being less than 0 (the type is unsigned) and replace it with a check that the length doesn't exceed the table size.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Thanks for this work. Let me give it a quick test (later today) to verify.

Tested fine on a Ryzen 1700, passing through an em device to an 11.1 guest, and doing lots of network file transfers.

I think you'd want Anish to sign off on this as he's the author/maintainer of the AMD IOMMU code.

This revision is now accepted and ready to land.Jul 6 2017, 7:36 AM
This revision was automatically updated to reflect the committed changes.