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)
Jan 15 2024, 5:58 PM
Unknown Object (File)
Dec 23 2023, 12:30 AM
Unknown Object (File)
Nov 22 2023, 6:03 PM
Unknown Object (File)
Nov 15 2023, 5:11 PM
Unknown Object (File)
Nov 12 2023, 11:43 PM
Unknown Object (File)
Nov 8 2023, 7:18 PM
Unknown Object (File)
Nov 6 2023, 4:40 AM
Unknown Object (File)
Oct 14 2023, 4:13 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

Lint
Lint Warnings
SeverityLocationCodeMessage
Warningsys/amd64/vmm/amd/amdvi_priv.h:CHMOD1Invalid Executable
Warningsys/amd64/vmm/amd/ivrs_drv.c:CHMOD1Invalid Executable
Unit
No Test Coverage
Build Status
Buildable 10312
Build 10726: arc lint + arc unit

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.