From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 0/3] virtio-mmio: handle BE guests on LE hosts Date: Mon, 14 Oct 2013 15:13:13 +0200 Message-ID: <525BEDE9.8070304@redhat.com> References: <1381502171-8187-1-git-send-email-marc.zyngier@arm.com> <525BEBB4.4050603@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org mailing list" , Pawel Moll , "Michael S. Tsirkin" , Marc Zyngier , kvmarm@lists.cs.columbia.edu, linux-arm-kernel To: Alexander Graf Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org List-Id: kvm.vger.kernel.org Il 14/10/2013 15:10, Alexander Graf ha scritto: >> More precisely, it allows the guest drivers to pick the >> endianness they prefer. Mixed-endian virtio works fine on QEMU >> with e.g. a mips guest in emulation mode, because then any given >> QEMU binary will always use the same endianness (e.g. big for >> qemu-system-mips). > > We have the same problem (runtime switchable endianness) on PowerPC. > IBM POWER is gaining Little Endian support in Linux now, so we could > easily end up with an LE guest on a BE host. > > IIRC the way we're going to solve this is to hack up > virtio_is_big_endian() to evaluate the first CPU's endianness mode > (which will always be the same as all other CPU's endianness mode due > to hypercall restrictions). > > You could do the same with ARM if you need to support guest kernels > before the new virtio stuff is there. LE POWER is definitely already > reality upstream. And the virtio standard, when it becomes reality, will be LE-only except for some s390 stuff that I don't claim I understand... Paolo