From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH v3 9/9] kvmtool: virtio: enable arm/arm64 support for bi-endianness Date: Wed, 07 May 2014 13:25:16 +0100 Message-ID: <536A262C.7000100@arm.com> References: <1398363443-3764-1-git-send-email-marc.zyngier@arm.com> <1398363443-3764-10-git-send-email-marc.zyngier@arm.com> <20140506142807.GI30234@arm.com> <87mweuq0os.fsf@approximate.cambridge.arm.com> <8738glq5ku.fsf@approximate.cambridge.arm.com> <20140507124054.680a26fb@bahia.local> <87ha51onna.fsf@approximate.cambridge.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Greg Kurz , Will Deacon , Pekka Enberg , "kvmarm@lists.cs.columbia.edu" , "kvm@vger.kernel.org" , "agraf@suse.de" To: Peter Maydell Return-path: Received: from fw-tnat.austin.arm.com ([217.140.110.23]:35533 "EHLO collaborate-mta1.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752012AbaEGMZS (ORCPT ); Wed, 7 May 2014 08:25:18 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 07/05/14 13:17, Peter Maydell wrote: > On 7 May 2014 12:04, Marc Zyngier wrote: >> On Wed, May 07 2014 at 11:40:54 am BST, Greg Kurz wrote: >>> All the fuzz is not really about enforcing kernel access... PPC also >>> has a current endianness selector (MSR_LE) but it only makes sense >>> if you are in the cpu context. Initial versions of the virtio biendian >>> support for QEMU PPC64 used an arbitrary cpu: in this case, the >>> only sensible thing to look at to support kernel based virtio is the >>> interrupt endianness selector (LPCR_ILE), because if gives a safe >>> hint of the kernel endianness. >>> >>> The patch set has evolved and now uses current_cpu at device reset time. >>> As a consequence, we are not necessarily tied to the kernel LPCR_ILE >>> selector I guess. > > Ah yes, I'd forgotten the history behind why we ended up looking > at interrupt endianness. > >> That makes a lot of sense, thanks for explaining that. You're basically >> doing the exact same thing we do with kvmtool on ARM. So if we have >> similar architectural features on both sides, why don't we support both >> kernel and userspace access? > > I don't think that we really need to get into whether userspace > access is or is not a good idea -- "endianness of the CPU which > does the virtio reset at the point when it does that reset" is a > nice simple rule that should generalise across architectures, > so why make it more complicated than that? This definition looks pretty good to me. Simple and to the point. Thanks, M. -- Jazz is not dead. It just smells funny...