]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
amd-vi: gcc build errors
authorrlibby <rlibby@FreeBSD.org>
Fri, 7 Jul 2017 06:37:19 +0000 (06:37 +0000)
committerrlibby <rlibby@FreeBSD.org>
Fri, 7 Jul 2017 06:37:19 +0000 (06:37 +0000)
commit2160513c843ec2f3a076239455097062ba7153c1
tree49cdafb632ad6ab242d75ba6e533297e86a3f688
parentfbee636f7a13bef169fafe3d6e0157d78ebbbcd3
amd-vi: gcc build errors

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.

Reviewed by: anish, grehan
Approved by: markj (mentor)
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11485
sys/amd64/vmm/amd/amdvi_hw.c
sys/amd64/vmm/amd/amdvi_priv.h
sys/amd64/vmm/amd/ivrs_drv.c