From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsl2p-0000qd-Pf for qemu-devel@nongnu.org; Sat, 08 Oct 2016 02:23:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bsl2l-0002ad-CP for qemu-devel@nongnu.org; Sat, 08 Oct 2016 02:23:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bsl2l-0002aF-64 for qemu-devel@nongnu.org; Sat, 08 Oct 2016 02:23:35 -0400 Date: Sat, 8 Oct 2016 14:23:29 +0800 From: Peter Xu Message-ID: <20161008062329.GD3666@pxdev.xzpeter.org> References: <20161005130657.3399-1-rkrcmar@redhat.com> <20161005130657.3399-4-rkrcmar@redhat.com> <20161007150553.2e4ccc9a@nial.brq.redhat.com> <20161007162414.GA20006@potion> <20161008061409.GC3666@pxdev.xzpeter.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161008061409.GC3666@pxdev.xzpeter.org> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 3/8] intel_iommu: pass whole remapped addresses to apic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Radim =?utf-8?B?S3LEjW3DocWZ?= Cc: Igor Mammedov , qemu-devel@nongnu.org, Eduardo Habkost , "Michael S. Tsirkin" , Paolo Bonzini , Richard Henderson On Sat, Oct 08, 2016 at 02:14:09PM +0800, Peter Xu wrote: > On Fri, Oct 07, 2016 at 06:24:15PM +0200, Radim Kr=C4=8Dm=C3=A1=C5=99 w= rote: >=20 > [...] >=20 > > KVM accepts the address in host endianess and QEMU/VTD code also uses > > host endianess for internal representation of memory addresses, so th= is > > hunk should be fine. > >=20 > > It is confusing, because the VTD is definitely broken with respect to > > endianess -- it is even trying to swap the order of bits in a byte in > > the definition of VTD_MSIMessage. > > I don't believe that dma_memory_write() accepted LE address on BE hos= ts, > > so the existing code for filling the address is wrong: > >=20 > > msg.__addr_head =3D cpu_to_le32(0xfee); >=20 > Yeah. This is my fault. Sorry for the troubles. >=20 > I have a patch (as well...) to fix this in my local tree, but not > posted (as mst suggested). Maybe it's time to post some of them now (I > tried to make patches more into a bunch so that they won't be lost in > mailing list in case maintainer missed it). I'll send them after your series to avoid unecessary conflicts. -- peterx