Page MenuHomeFreeBSD

amd-vi: fix gcc build errors
ClosedPublic

Authored by rlibby on Jul 5 2017, 5:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 3 2024, 1:00 PM
Unknown Object (File)
Oct 3 2024, 12:08 PM
Unknown Object (File)
Oct 1 2024, 1:00 PM
Unknown Object (File)
Sep 28 2024, 4:01 AM
Unknown Object (File)
Sep 27 2024, 5:11 AM
Unknown Object (File)
Sep 20 2024, 6:04 PM
Unknown Object (File)
Sep 9 2024, 1:39 AM
Unknown Object (File)
Aug 28 2024, 4:00 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.