From: Alexander Graf Subject: Re: [PATCH v8] KVM: PPC: Book3S: MMIO emulation support for little endian guests Date: Thu, 9 Jan 2014 11:55:02 +0100 Message-ID: <31023356-BEED-40BE-AD91-FED8E97F73C3@suse.de> References: <52CE7B11.8000603@fr.ibm.com> <1389264676-4915-1-git-send-email-clg@fr.ibm.com> Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Paul Mackerras , kvm-ppc@vger.kernel.org, "kvm@vger.kernel.org mailing list" To: =?iso-8859-1?Q?C=E9dric_Le_Goater?= Return-path: In-Reply-To: <1389264676-4915-1-git-send-email-clg@fr.ibm.com> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 09.01.2014, at 11:51, C=E9dric Le Goater wrote: > MMIO emulation reads the last instruction executed by the guest > and then emulates. If the guest is running in Little Endian order, > or more generally in a different endian order of the host, the > instruction needs to be byte-swapped before being emulated. >=20 > This patch adds a helper routine which tests the endian order of > the host and the guest in order to decide whether a byteswap is > needed or not. It is then used to byteswap the last instruction > of the guest in the endian order of the host before MMIO emulation > is performed. >=20 > Finally, kvmppc_handle_load() of kvmppc_handle_store() are modified > to reverse the endianness of the MMIO if required. >=20 > Signed-off-by: C=E9dric Le Goater > --- > How's that ? As the changes were small, I kept them in one patch=20 > but I can split if necessary.=20 Very nice, thanks a lot. Applied to kvm-ppc-queue. Alex