[PATCH 0/5] Fixes and improvements for HV KVM on PPC

2014-12-02 Thread Paul Mackerras
This series of patches is based on Alex Graf's kvm-ppc-queue branch and is intended for the 3.19 merge window. It starts by removing the code to support HV KVM on PPC970 processors. This code is hardly used now since there are not many HV-capable PPC970 machines (Apple G5 machines are not

[PATCH 2/5] KVM: PPC: Book3S HV: Fix endianness of instruction obtained from HEIR register

2014-12-02 Thread Paul Mackerras
There are two ways in which a guest instruction can be obtained from the guest in the guest exit code in book3s_hv_rmhandlers.S. If the exit was caused by a Hypervisor Emulation interrupt (i.e. an illegal instruction), the offending instruction is in the HEIR register (Hypervisor Emulation

[PATCH 1/5] KVM: PPC: Book3S HV: Remove code for PPC970 processors

2014-12-02 Thread Paul Mackerras
This removes the code that was added to enable HV KVM to work on PPC970 processors. The PPC970 is an old CPU that doesn't support virtualizing guest memory. Removing PPC970 support also lets us remove the code for allocating and managing contiguous real-mode areas, the code for the

[PATCH 5/5] KVM: PPC: Book3S: Enable in-kernel XICS emulation by default

2014-12-02 Thread Paul Mackerras
From: Anton Blanchard an...@samba.org The in-kernel XICS emulation is faster than doing it all in QEMU and it has got a lot of testing, so enable it by default. Signed-off-by: Anton Blanchard an...@samba.org Signed-off-by: Paul Mackerras pau...@samba.org --- arch/powerpc/kvm/Kconfig | 1 + 1

[PATCH 3/5] KVM: PPC: Book3S HV: Improve H_CONFER implementation

2014-12-02 Thread Paul Mackerras
From: Sam Bobroff sam.bobr...@au1.ibm.com Currently the H_CONFER hcall is implemented in kernel virtual mode, meaning that whenever a guest thread does an H_CONFER, all the threads in that virtual core have to exit the guest. This is bad for performance because it interrupts the other threads

[PATCH 4/5] KVM: PPC: Book3S HV: Add fast real-mode H_RANDOM implementation.

2014-12-02 Thread Paul Mackerras
From: Michael Ellerman mich...@ellerman.id.au Some PowerNV systems include a hardware random-number generator. This HWRNG is present on POWER7+ and POWER8 chips and is capable of generating one 64-bit random number every microsecond. The random numbers are produced by sampling a set of 64

[PATCH] powerpc: powernv: Return to cpu offline loop when finished in KVM guest

2014-12-02 Thread Paul Mackerras
When a secondary hardware thread has finished running a KVM guest, we currently put that thread into nap mode using a nap instruction in the KVM code. This changes the code so that instead of doing a nap instruction directly, we instead cause the call to power7_nap() that put the thread into nap