[PATCH V3] KVM: PPC: BOOK3S: PR: Enable Little Endian PR guest

2014-01-27 Thread Aneesh Kumar K.V
This patch make sure we inherit the LE bit correctly in different case so that we can run Little Endian distro in PR mode Signed-off-by: Aneesh Kumar K.V --- Changes from V2: * Move H_SET_MODE to qemu arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kernel/asm-offsets.c | 1 + arch

[PATCH V3] POWERPC: BOOK3S: KVM: Use the saved dsisr and dar values on book3s 64

2014-01-27 Thread Aneesh Kumar K.V
Although it's optional IBM POWER cpus always had DAR value set on alignment interrupt. So don't try to compute these values. Signed-off-by: Aneesh Kumar K.V --- Changes from V2: * Depend on cpu feature flag to decide whether to use fault_dsir or not arch/powerpc/include/asm/cputable.h| 1 +

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-27 Thread Scott Wood
On Sat, 2014-01-25 at 03:15 +0100, Alexander Graf wrote: > Ok, let's go through the combinations for a 32-bit write of 0x01020304 on PPC > and what data[] looks like > > your proposal: > > BE guest, BE host: { 0x01, 0x02, 0x03, 0x04 } > LE guest, BE host: { 0x04, 0x03, 0x02, 0x01 } > BE gu

Re: [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect

2014-01-27 Thread Aneesh Kumar K.V
Alexander Graf writes: > On 27.01.2014, at 11:28, Aneesh Kumar K.V > wrote: > >> Alexander Graf writes: >> >>> On 21.01.2014, at 10:42, Aneesh Kumar K.V >>> wrote: >>> Liu Ping Fan writes: > To make sure that on host, the pages marked with _PAGE_NUMA result in a > faul

Re: [PATCH 00/18] KVM: PPC: Book3S HV: POWER8 support

2014-01-27 Thread Alexander Graf
On 08.01.2014, at 11:25, Paul Mackerras wrote: > This series of patches adds support for the new POWER8 processor in > HV-mode KVM. The series is based on a merge of Alex Graf's for-3.13 > tree into his kvm-ppc-queue tree, as there are some important bugfixes > in the for-3.13 tree that touch c

Re: [PATCH 16/18] KVM: PPC: Book3S HV: Add transactional memory support

2014-01-27 Thread Alexander Graf
On 08.01.2014, at 11:25, Paul Mackerras wrote: > This adds saving of the transactional memory (TM) checkpointed state > on guest entry and exit. We only do this if we see that the guest has > an active transaction. > > It also adds emulation of the TM state changes when delivering IRQs > into

Re: [PATCH 14/18] KVM: PPC: Book3S HV: Add new state for transactional memory

2014-01-27 Thread Alexander Graf
On 08.01.2014, at 11:25, Paul Mackerras wrote: > From: Michael Neuling > > Add new state for transactional memory (TM) to kvm_vcpu_arch. Also add > asm-offset bits that are going to be required. > > This also moves the existing TFHAR, TFIAR and TEXASR SPRs into a > CONFIG_PPC_TRANSACTIONAL_M

Re: [PATCH 07/18] KVM: PPC: Book3S HV: Consolidate code that checks reason for wake from nap

2014-01-27 Thread Alexander Graf
On 08.01.2014, at 11:25, Paul Mackerras wrote: > Currently in book3s_hv_rmhandlers.S we have three places where we > have woken up from nap mode and we check the reason field in SRR1 > to see what event woke us up. This consolidates them into a new > function, kvmppc_check_wake_reason. It look

Re: [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect

2014-01-27 Thread Alexander Graf
On 27.01.2014, at 11:28, Aneesh Kumar K.V wrote: > Alexander Graf writes: > >> On 21.01.2014, at 10:42, Aneesh Kumar K.V >> wrote: >> >>> Liu Ping Fan writes: >>> To make sure that on host, the pages marked with _PAGE_NUMA result in a fault when guest access them, we shou

Re: [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect

2014-01-27 Thread Paul Mackerras
On Mon, Jan 27, 2014 at 10:11:40AM +0100, Alexander Graf wrote: > > On 21.01.2014, at 10:42, Aneesh Kumar K.V > wrote: > > > Liu Ping Fan writes: > > > >> To make sure that on host, the pages marked with _PAGE_NUMA result in a > >> fault > >> when guest access them, we should force the check

Re: [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect

2014-01-27 Thread Aneesh Kumar K.V
Alexander Graf writes: > On 21.01.2014, at 10:42, Aneesh Kumar K.V > wrote: > >> Liu Ping Fan writes: >> >>> To make sure that on host, the pages marked with _PAGE_NUMA result in a >>> fault >>> when guest access them, we should force the checking when guest uses >>> hypercall >>> to setup

Re: [PATCH v2] KVM: Specify byte order for KVM_EXIT_MMIO

2014-01-27 Thread Peter Maydell
On 27 January 2014 07:52, Alexander Graf wrote: > > On 26.01.2014, at 06:43, Victor Kamensky wrote: >> Scott's definition interpretation does not depend on CPU type. >> It is much simpler. It does not use notion not very well defined >> like "real bus". it does not use word 'endianness', byteswap

Re: [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect

2014-01-27 Thread Alexander Graf
On 21.01.2014, at 10:42, Aneesh Kumar K.V wrote: > Liu Ping Fan writes: > >> To make sure that on host, the pages marked with _PAGE_NUMA result in a fault >> when guest access them, we should force the checking when guest uses >> hypercall >> to setup hpte. >> >> Signed-off-by: Liu Ping Fan