Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-11-08 Thread Cedric Le Goater
On 11/06/2013 06:55 AM, Paul Mackerras wrote: > On Tue, Nov 05, 2013 at 02:01:14PM +0100, Alexander Graf wrote: >> >> On 05.11.2013, at 13:28, Cedric Le Goater wrote: >> >>> +/* >>> + * Compare endian order of host and guest to determine whether we need >>> + * to byteswap or not >>> + */ >>> stat

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-11-05 Thread Paul Mackerras
On Tue, Nov 05, 2013 at 02:01:14PM +0100, Alexander Graf wrote: > > On 05.11.2013, at 13:28, Cedric Le Goater wrote: > > > +/* > > + * Compare endian order of host and guest to determine whether we need > > + * to byteswap or not > > + */ > > static inline bool kvmppc_need_byteswap(struct kvm_vc

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-11-05 Thread Alexander Graf
On 05.11.2013, at 13:28, Cedric Le Goater wrote: > On 11/04/2013 12:44 PM, Alexander Graf wrote: >> >> On 10.10.2013, at 12:16, Paul Mackerras wrote: >> >>> On Wed, Oct 09, 2013 at 10:29:53AM +0200, Alexander Graf wrote: Am 09.10.2013 um 07:59 schrieb Paul Mackerras : >

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-11-05 Thread Cedric Le Goater
On 11/04/2013 12:44 PM, Alexander Graf wrote: > > On 10.10.2013, at 12:16, Paul Mackerras wrote: > >> On Wed, Oct 09, 2013 at 10:29:53AM +0200, Alexander Graf wrote: >>> >>> >>> Am 09.10.2013 um 07:59 schrieb Paul Mackerras : >>> On Wed, Oct 09, 2013 at 01:46:29AM +0200, Alexander Graf wrot

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-11-04 Thread Alexander Graf
On 10.10.2013, at 12:16, Paul Mackerras wrote: > On Wed, Oct 09, 2013 at 10:29:53AM +0200, Alexander Graf wrote: >> >> >> Am 09.10.2013 um 07:59 schrieb Paul Mackerras : >> >>> On Wed, Oct 09, 2013 at 01:46:29AM +0200, Alexander Graf wrote: Am 09.10.2013 um 01:31 schrieb Paul

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-10 Thread Paul Mackerras
On Wed, Oct 09, 2013 at 10:29:53AM +0200, Alexander Graf wrote: > > > Am 09.10.2013 um 07:59 schrieb Paul Mackerras : > > > On Wed, Oct 09, 2013 at 01:46:29AM +0200, Alexander Graf wrote: > >> > >> > >> Am 09.10.2013 um 01:31 schrieb Paul Mackerras : > >> > >>> True, until we get to POWER8 wi

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-09 Thread Cedric Le Goater
On 10/09/2013 10:29 AM, Alexander Graf wrote: > > > Am 09.10.2013 um 07:59 schrieb Paul Mackerras : > >> On Wed, Oct 09, 2013 at 01:46:29AM +0200, Alexander Graf wrote: >>> >>> >>> Am 09.10.2013 um 01:31 schrieb Paul Mackerras : >>> True, until we get to POWER8 with its split little-endian

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-09 Thread Alexander Graf
Am 09.10.2013 um 07:59 schrieb Paul Mackerras : > On Wed, Oct 09, 2013 at 01:46:29AM +0200, Alexander Graf wrote: >> >> >> Am 09.10.2013 um 01:31 schrieb Paul Mackerras : >> >>> True, until we get to POWER8 with its split little-endian support, >>> where instructions and data can have differe

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-08 Thread Paul Mackerras
On Wed, Oct 09, 2013 at 01:46:29AM +0200, Alexander Graf wrote: > > > Am 09.10.2013 um 01:31 schrieb Paul Mackerras : > > > True, until we get to POWER8 with its split little-endian support, > > where instructions and data can have different endianness... > > How exactly does that work? They a

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-08 Thread Alexander Graf
Am 09.10.2013 um 01:31 schrieb Paul Mackerras : > On Tue, Oct 08, 2013 at 04:25:31PM +0200, Alexander Graf wrote: >> >> On 08.10.2013, at 16:12, Cédric Le Goater wrote: >> >>> MMIO emulation reads the last instruction executed by the guest >>> and then emulates. If the guest is running in Lit

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-08 Thread Paul Mackerras
On Tue, Oct 08, 2013 at 04:25:31PM +0200, Alexander Graf wrote: > > On 08.10.2013, at 16:12, Cédric Le Goater wrote: > > > MMIO emulation reads the last instruction executed by the guest > > and then emulates. If the guest is running in Little Endian mode, > > the instruction needs to be byte-sw

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-08 Thread Cedric Le Goater
On 10/08/2013 04:25 PM, Alexander Graf wrote: > > On 08.10.2013, at 16:12, Cédric Le Goater wrote: > >> MMIO emulation reads the last instruction executed by the guest >> and then emulates. If the guest is running in Little Endian mode, >> the instruction needs to be byte-swapped before being em

Re: [PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-08 Thread Alexander Graf
On 08.10.2013, at 16:12, Cédric Le Goater wrote: > MMIO emulation reads the last instruction executed by the guest > and then emulates. If the guest is running in Little Endian mode, > the instruction needs to be byte-swapped before being emulated. > > This patch stores the last instruction in

[PATCH v2 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-08 Thread Cédric Le Goater
MMIO emulation reads the last instruction executed by the guest and then emulates. If the guest is running in Little Endian mode, the instruction needs to be byte-swapped before being emulated. This patch stores the last instruction in the endian order of the host, primarily doing a byte-swap if n