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 3/4] kvm: powerpc: define a linux pte lookup function

2013-10-08 Thread Scott Wood
On Tue, 2013-10-08 at 11:33 +0530, Bharat Bhushan wrote: > We need to search linux "pte" to get "pte" attributes for > setting TLB in KVM. > This patch defines a linux_pte_lookup() function for same. > > Signed-off-by: Bharat Bhushan > --- > arch/powerpc/include/asm/pgtable.h | 35

[PATCH v4 2/3] KVM: PPC: Book3S: add helper routines to detect endian order

2013-10-08 Thread Cédric Le Goater
They will be used to decide whether to byte-swap or not. When Little Endian host kernels come, these routines will need to be changed accordingly. Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/kvm_book3s.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/powe

[PATCH v4 1/3] KVM: PPC: Book3S: add helper routine to load guest instructions

2013-10-08 Thread Cédric Le Goater
This patch adds an helper routine kvmppc_ld32() to load an instruction form the guest. This routine will be modified in the next patch to take into account the endian order of the guest. Signed-off-by: Cédric Le Goater --- Changes in v4: - got rid of useless helper routine kvmppc_ld_inst(). (A

[PATCH v4 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

[PATCH v4 0/3] KVM: PPC: Book3S: MMIO support for Little Endian guests

2013-10-08 Thread Cédric Le Goater
MIO 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. The first patches add simple helper routines to load instructions from the guest. It prepares ground for

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

2013-10-08 Thread Cedric Le Goater
On 10/08/2013 05:36 PM, Alexander Graf wrote: > > On 08.10.2013, at 17:31, 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 v3 3/3] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2013-10-08 Thread Alexander Graf
On 08.10.2013, at 17:31, 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 v3 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

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 2/3] KVM: PPC: Book3S: add helper routines to detect endian

2013-10-08 Thread Cédric Le Goater
They will be used to decide whether to byte-swap or not. When Little Endian host kernels come, these routines will need to be changed accordingly. Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/kvm_book3s.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/powe

[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

[PATCH v2 1/3] KVM: PPC: Book3S: add helper routine to load guest instructions

2013-10-08 Thread Cédric Le Goater
This patch adds an helper routine kvmppc_ld_inst() to load an instruction form the guest. This routine will be modified in the next patch to take into account the endian order of the guest. Signed-off-by: Cédric Le Goater --- arch/powerpc/include/asm/kvm_book3s.h | 16 ++-- arch/po

[PATCH v2 0/3] KVM: PPC: Book3S: MMIO support for Little Endian guests

2013-10-08 Thread Cédric Le Goater
MIO 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. The first patches add simple helper routines to load instructions from the guest. It prepares ground for

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

2013-10-08 Thread Cedric Le Goater
On 10/08/2013 01:22 PM, Paul Mackerras wrote: > On Mon, Oct 07, 2013 at 04:27:47PM +0200, 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 befor

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

2013-10-08 Thread Paul Mackerras
On Mon, Oct 07, 2013 at 04:27:47PM +0200, 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 i