From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkyGY-0006ZG-Uk for qemu-devel@nongnu.org; Fri, 16 Sep 2016 14:53:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bkyGV-0007kF-Pa for qemu-devel@nongnu.org; Fri, 16 Sep 2016 14:53:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bkyGV-0007kB-Fo for qemu-devel@nongnu.org; Fri, 16 Sep 2016 14:53:35 -0400 Date: Fri, 16 Sep 2016 21:53:33 +0300 From: "Michael S. Tsirkin" Message-ID: <20160916215220-mutt-send-email-mst@kernel.org> References: <1473971873-2966-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL v3 0/6] virtio,pci: fixes and updates List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , davidkiarie4@gmail.com On Fri, Sep 16, 2016 at 11:57:54AM +0100, Peter Maydell wrote: > On 15 September 2016 at 21:38, Michael S. Tsirkin wrot= e: > > The following changes since commit d1eb8f2acba579830cf3798c3c15ce51be= 852c56: > > > > fpu: add mechanism to check for invalid long double formats (2016-0= 9-15 12:43:18 +0100) > > > > are available in the git repository at: > > > > git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstrea= m > > > > for you to fetch changes up to a5a43875b352810d29dc27e7b0fb602eb7ef2d= 31: > > > > MAINTAINERS: add virtio-* tests (2016-09-15 23:37:16 +0300) > > > > ---------------------------------------------------------------- > > virtio,pci: fixes and updates > > > > AMD IOMMU emulation > > virtio feature negotiation rework > > > > Signed-off-by: Michael S. Tsirkin > > > > ---------------------------------------------------------------- >=20 > Fails to build on ppc64be, still: > /home/pm215/qemu/hw/i386/amd_iommu.c:245:5: error: expected =E2=80=98,=E2= =80=99, =E2=80=98;=E2=80=99 > or =E2=80=98}=E2=80=99 before =E2=80=98uint32_t=E2=80=99 > uint32_t reserved_3:29; > ^ > /home/pm215/qemu/hw/i386/amd_iommu.c: In function =E2=80=98amdvi_comple= te_ppr=E2=80=99: > /home/pm215/qemu/hw/i386/amd_iommu.c:588:62: error: =E2=80=98CMDComplet= ePPR=E2=80=99 > has no member named =E2=80=98reserved_3=E2=80=99 > if (pprcomp->reserved_1 || pprcomp->reserved_2 || pprcomp->reserve= d_3 || > ^ > /home/pm215/qemu/hw/i386/amd_iommu.c:589:16: error: =E2=80=98CMDComplet= ePPR=E2=80=99 > has no member named =E2=80=98reserved_4=E2=80=99 > pprcomp->reserved_4 || pprcomp->reserved_5) { > ^ > /home/pm215/qemu/hw/i386/amd_iommu.c:589:39: error: =E2=80=98CMDComplet= ePPR=E2=80=99 > has no member named =E2=80=98reserved_5=E2=80=99 > pprcomp->reserved_4 || pprcomp->reserved_5) { > ^ >=20 > Missing semicolon, again, line 237. >=20 > In fact looking at this code it just looks broken. Structures > like this: >=20 > typedef struct QEMU_PACKED { > #ifdef HOST_WORDS_BIGENDIAN > uint64_t type:4; /* command type */ > uint64_t reserved_1:44; > uint64_t devid:16; /* related devid */ > #else > uint64_t devid:16; > uint64_t reserved_1:44; > uint64_t type:4; > #endif /* __BIG_ENDIAN_BITFIELD */ > uint64_t reserved_2; > } CMDInvalIntrTable; >=20 > seem to be trying to represent bit layouts in memory using > bitfields, but this is just not portable. It's not sufficient > to have a "bigendian vs littleendian" set of ifdefs. >=20 > The portable way to do this is to write the code to use > bitwise logical operations (and functions like extract64 > and deposit64) to manipulate things. As a bonus you get rid > of all these host-specific #ifdefs that are tripping you > up now. >=20 > It would be nice if C bitfields worked the way this code > wants them to, but they don't, alas. >=20 > thanks > -- PMM I agree, I wanted to rework this in tree but maybe best to fix it first. I dropped all this code from tree for now. --=20 MST