[PATCH] PPC: KVM: fix VCPU run for HV KVM

2014-01-09 Thread Alexey Kardashevskiy
When write to MMIO happens and there is an ioeventfd for that and is handled successfully, ioeventfd_write() returns 0 (success) and kvmppc_handle_store() returns EMULATE_DONE. Then kvmppc_emulate_mmio() converts EMULATE_DONE to RESUME_GUEST_NV and this broke from the loop. This adds handling of R

[PATCH v2] kvm/ppc: IRQ disabling cleanup

2014-01-09 Thread Scott Wood
Simplify the handling of lazy EE by going directly from fully-enabled to hard-disabled. This replaces the lazy_irq_pending() check (including its misplaced kvm_guest_exit() call). As suggested by Tiejun Chen, move the interrupt disabling into kvmppc_prepare_to_enter() rather than have each caller

[PATCH] kvm: Provide kvm_vcpu_eligible_for_directed_yield() stub

2014-01-09 Thread Scott Wood
Commit 7940876e1330671708186ac3386aa521ffb5c182 ("kvm: make local functions static") broke KVM PPC builds due to removing (rather than moving) the stub version of kvm_vcpu_eligible_for_directed_yield(). This patch reintroduces it. Signed-off-by: Scott Wood Cc: Stephen Hemminger Cc: Alexander Gr

Re: [PATCH] KVM: PPC: e500: Fix bad address type in deliver_tlb_misss()

2014-01-09 Thread Alexander Graf
On 09.01.2014, at 16:01, Mihai Caraman wrote: > Use gva_t instead of unsigned int for eaddr in deliver_tlb_miss(). > > Signed-off-by: Mihai Caraman Thanks, applied to kvm-ppc-queue. Alex -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to major

[PATCH] KVM: PPC: e500: Fix bad address type in deliver_tlb_misss()

2014-01-09 Thread Mihai Caraman
Use gva_t instead of unsigned int for eaddr in deliver_tlb_miss(). Signed-off-by: Mihai Caraman --- arch/powerpc/kvm/e500_mmu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/e500_mmu.c b/arch/powerpc/kvm/e500_mmu.c index ebca6b8..50860e9 100644 --- a/

Re: [PATCH] KVM: PPC: Book3S HV: use xics_wake_cpu only when defined

2014-01-09 Thread Alexander Graf
On 30.12.2013, at 15:36, Andreas Schwab wrote: > Signed-off-by: Andreas Schwab Thanks, applied kvm-ppc-queue with CC to stable. Please keep in mind that the Apple G5 can not execute HV KVM. Alex -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message

Re: [PATCH 2/3] kvm/ppc: IRQ disabling cleanup

2014-01-09 Thread Alexander Graf
On 03.01.2014, at 03:51, Scott Wood wrote: > On Sun, 2013-12-29 at 16:43 +0100, Alexander Graf wrote: >> On 11.07.2013, at 00:47, Scott Wood wrote: >>> diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c >>> index ddfaf56..c13caa0 100644 >>> --- a/arch/powerpc/kvm/book3s_pr

Re: [PATCH 0/4] powernv: kvm: numa fault improvement

2014-01-09 Thread Alexander Graf
On 11.12.2013, at 09:47, Liu Ping Fan wrote: > This series is based on Aneesh's series "[PATCH -V2 0/5] powerpc: mm: Numa > faults support for ppc64" > > For this series, I apply the same idea from the previous thread "[PATCH 0/3] > optimize for powerpc _PAGE_NUMA" > (for which, I still try

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

2014-01-09 Thread Alexander Graf
On 09.01.2014, at 11:51, 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 order, > or more generally in a different endian order of the host, the > instruction needs to be byte-swapped before b

[PATCH v8] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2014-01-09 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 order, or more generally in a different endian order of the host, the instruction needs to be byte-swapped before being emulated. This patch adds a helper routine which tests

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

2014-01-09 Thread Cedric Le Goater
On 01/09/2014 11:17 AM, Alexander Graf wrote: > > On 09.01.2014, at 11:02, 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 order, >> or more generally in a different endian order of the ho

[PATCH] KVM: PPC: Unify kvmppc_get_last_inst and sc

2014-01-09 Thread Alexander Graf
We had code duplication between the inline functions to get our last instruction on normal interrupts and system call interrupts. Unify both helper functions towards a single implementation. Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/kvm_book3s.h | 18 +++--- 1 file c

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

2014-01-09 Thread Alexander Graf
On 09.01.2014, at 11:02, 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 order, > or more generally in a different endian order of the host, the > instruction needs to be byte-swapped before b

[PATCH v7] KVM: PPC: Book3S: MMIO emulation support for little endian guests

2014-01-09 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 order, or more generally in a different endian order of the host, the instruction needs to be byte-swapped before being emulated. This patch adds a helper routine which tests

[PATCH v2] KVM: PPC: Add devname:kvm aliases for modules

2014-01-09 Thread Alexander Graf
Systems that support automatic loading of kernel modules through device aliases should try and automatically load kvm when /dev/kvm gets opened. Add code to support that magic for all PPC kvm targets, even the ones that don't support modules yet. Signed-off-by: Alexander Graf --- v1 -> v2: