From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753114AbbE1FZr (ORCPT ); Thu, 28 May 2015 01:25:47 -0400 Received: from ozlabs.org ([103.22.144.67]:52430 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751690AbbE1FYE (ORCPT ); Thu, 28 May 2015 01:24:04 -0400 Date: Thu, 28 May 2015 14:59:19 +1000 From: David Gibson To: Greg Kurz Cc: Rusty Russell , "Michael S. Tsirkin" , Thomas Huth , kvm@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Cornelia Huck Subject: Re: [PATCH v6 7/8] vhost: cross-endian support for legacy devices Message-ID: <20150528045919.GH6681@voom.redhat.com> References: <20150424122211.19156.97626.stgit@bahia.local> <20150424122632.19156.88058.stgit@bahia.local> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Uu2n37VG4rOBDVuR" Content-Disposition: inline In-Reply-To: <20150424122632.19156.88058.stgit@bahia.local> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Uu2n37VG4rOBDVuR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 24, 2015 at 02:27:24PM +0200, Greg Kurz wrote: > This patch brings cross-endian support to vhost when used to implement > legacy virtio devices. Since it is a relatively rare situation, the > feature availability is controlled by a kernel config option (not set > by default). >=20 > The vq->is_le boolean field is added to cache the endianness to be > used for ring accesses. It defaults to native endian, as expected > by legacy virtio devices. When the ring gets active, we force little > endian if the device is modern. When the ring is deactivated, we > revert to the native endian default. >=20 > If cross-endian was compiled in, a vq->user_be boolean field is added > so that userspace may request a specific endianness. This field is > used to override the default when activating the ring of a legacy > device. It has no effect on modern devices. >=20 > Signed-off-by: Greg Kurz Reviewed-by: David Gibson --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --Uu2n37VG4rOBDVuR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVZqCnAAoJEGw4ysog2bOSHh8P/iQXAlZAk6uVRICEqhnOfpyq Ui/vR2lOISix8TPuEl0vUyZwLTxu4eT6DivWvA0KPRCSuUrwXp4GYxp/vPtV4uG7 SQC2kHQB2+cWsuMzR0QIkHT3aBTQhUky4w8nMlqjoDCWLUE1EYt7k4vHq9yJZHur 3h0DMjcgpUkUhdc92eDbchuF6JICaeyTbl7eEP+N721g5fSBs0rbaKDXvsOMMYC4 35qwaTY2MIrZ1snI9jSdvkXnlfU+MN58AA5J8UXXvlvh0m+YE9C3NJ/NUswBqgLh 1jtF2qdaK7GHYsLdgJ0Ui685V2ChSNTSH3HEfnGghDvStQnODb+CSyXtxXsOccwn 3ht7aJQ/47SyFn4I2L0RoaBUFac6c2+dm+tnOp/Yn94Dp+++UB1IeA9GqJZbZiFm IVgCSZeUrJQOEyD0oM8vbi2Tel/TMlrKtYkS3968HV/C+WZj94Mg9XCAplEhDBD2 zfj5IDxlmOcD/HPlqLyRjoVAfR049IpSu3kc/w+T+UZ1UjW7LiNuRh4PMF6ZcAGb viP381G6VCqguFaea6snA+81OgkPyvD3eQVgcDwluYiwRI8eJlFBqBG0M3hGrbfJ dBVPUnEvh/pBCZMOentNEPLVzkKFJv2cWZUqoEDhnKqqtUg8Q2DHl7loZnqeOo52 fyiGJZcNClqYJmHqu1mW =RAE5 -----END PGP SIGNATURE----- --Uu2n37VG4rOBDVuR--