From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxDGF-00044r-Ca for qemu-devel@nongnu.org; Wed, 18 Jun 2014 06:38:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxDG6-0000Ig-C7 for qemu-devel@nongnu.org; Wed, 18 Jun 2014 06:38:35 -0400 Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]:52078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxDG6-0000Hd-5g for qemu-devel@nongnu.org; Wed, 18 Jun 2014 06:38:26 -0400 Received: by mail-wi0-f170.google.com with SMTP id cc10so8275406wib.5 for ; Wed, 18 Jun 2014 03:38:25 -0700 (PDT) Date: Wed, 18 Jun 2014 18:38:14 +0800 From: Stefan Hajnoczi Message-ID: <20140618103814.GG14030@stefanha-thinkpad.redhat.com> References: <20140613111703.22108.14322.stgit@bahia.local> <20140617073631.GL16768@stefanha-thinkpad.redhat.com> <539FF0E3.6040407@suse.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JbKQpFqZXJ2T76Sg" Content-Disposition: inline In-Reply-To: <539FF0E3.6040407@suse.de> Subject: Re: [Qemu-devel] [PATCH v8 00/20] virtio endian-ambivalent target List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Kevin Wolf , Peter Maydell , Anthony Liguori , "Michael S. Tsirkin" , Rusty Russell , qemu-devel@nongnu.org, Juan Quintela , aneesh.kumar@linux.vnet.ibm.com, Stefan Hajnoczi , Amit Shah , Paolo Bonzini , Andreas =?iso-8859-1?Q?F=E4rber?= , Greg Kurz --JbKQpFqZXJ2T76Sg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 17, 2014 at 09:40:19AM +0200, Alexander Graf wrote: >=20 > On 17.06.14 09:36, Stefan Hajnoczi wrote: > >On Fri, Jun 13, 2014 at 01:18:00PM +0200, Greg Kurz wrote: > >>This version merges the changes requested during the v7 review, remarks= from > >>ppc64 dump support review (yes, we talked about virtio there) and the w= ork on > >>virtio subsections migration. Also two new patches have been added: > >>- patch #1 is a preliminary fix for virtio-serial posted by Alexander G= raf > >>- patch #9 prepares the work on the virtio_is_big_endian() helper > >> > >>The most significant changes are: > >>- introduction of a new CPU method for virtio > >>- endianness is taken from CPU that resets the device > >>- fastpath virtio memory accessors for fixed endian targets > >>- VMState based virtio subsections (compatibility friendly) > >I'm surprised it's not enough for the virtio device to have an > >endianness field (big/little). It seems these patches make endianness > >depend on the CPUState through which the device is being accessed. > > > >Can you explain why it's necessary to check the CPUState? >=20 > They only check CPUState at the point in time of reset, as that's the only > case where we can derive the implicit endian configuration from :). What bothers me is that real hardware can't do this. Given that VIRTIO 1.0 is always little-endian I guess this is just a temporary hack for ppc little-endian. Would be nice to add a comment so it's clear why this approach is being taken instead of a cleaner solution. Stefan --JbKQpFqZXJ2T76Sg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJToWwWAAoJEJykq7OBq3PIRPoH/3C4kmMXso4Dn6qilPIwHOQt c3ougxXvuv2l+FfS/tyOO5iauKKi3rAtjantiryWjGbvHtJVc9GDinVna+KHXZ3q H80tss3walf6Pvs9cGKbqzqNk0GLvXkZaDNf0jZmw3eB+z7xhqFkt8bxyYdEc8Cf pVu1qwZvuk4OPY2yN5YpBEFVTyalLZrk+VHEoAFidhiPKuLUQtpfcI58C9wXYSnC xtf1y58XHnRyrE7x9SeA81x62u6hmIFlMDEuvo3RJNr6FSrL95ZIyOWVRIn+VkRG x0iXD7lLCVZDxLg8yKOUWpcb9+ocqyvQSnuPX57ZdUD6JmybkZEM0x2w6C78f28= =qHK4 -----END PGP SIGNATURE----- --JbKQpFqZXJ2T76Sg--