[PULL 15/51] KVM: PPC: Book3S PR: Keep volatile reg values in vcpu rather than shadow_vcpu

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org Currently PR-style KVM keeps the volatile guest register values (R0 - R13, CR, LR, CTR, XER, PC) in a shadow_vcpu struct rather than the main kvm_vcpu struct. For 64-bit, the shadow_vcpu exists in two places, a kmalloc'd struct and in the PACA, and it gets

[PULL 30/51] kvm: powerpc: allow guest control E attribute in mas2

2013-10-31 Thread Alexander Graf
From: Bharat Bhushan r65...@freescale.com E bit in MAS2 bit indicates whether the page is accessed in Little-Endian or Big-Endian byte order. There is no reason to stop guest setting E, so allow him. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com Signed-off-by: Alexander Graf

[PULL 39/51] kvm: powerpc: book3s: remove kvmppc_handler_highmem label

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This label is not used now. Signed-off-by: Paul Mackerras pau...@samba.org Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_hv_interrupts.S | 3 ---

[PULL 16/51] KVM: PPC: Book3S PR: Allow guest to use 64k pages

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This adds the code to interpret 64k HPTEs in the guest hashed page table (HPT), 64k SLB entries, and to tell the guest about 64k pages in kvm_vm_ioctl_get_smmu_info(). Guest 64k pages are still shadowed by 4k pages. This also adds another hash table to the

[PULL 14/51] KVM: PPC: Book3S PR: Fix compilation without CONFIG_ALTIVEC

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org Commit 9d1ffdd8f3 (KVM: PPC: Book3S PR: Don't corrupt guest state when kernel uses VMX) added a call to kvmppc_load_up_altivec() that isn't guarded by CONFIG_ALTIVEC, causing a link failure when building a kernel without CONFIG_ALTIVEC set. This adds an

[PULL 08/51] KVM: PPC: Book3S HV: Avoid unbalanced increments of VPA yield count

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org The yield count in the VPA is supposed to be incremented every time we enter the guest, and every time we exit the guest, so that its value is even when the vcpu is running in the guest and odd when it isn't. However, it's currently possible that we

[PULL 17/51] KVM: PPC: Book3S PR: Use 64k host pages where possible

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org Currently, PR KVM uses 4k pages for the host-side mappings of guest memory, regardless of the host page size. When the host page size is 64kB, we might as well use 64k host page mappings for guest mappings of 64kB and larger pages and for guest real-mode

[PULL 11/51] KVM: PPC: Book3S HV: Add support for guest Program Priority Register

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org POWER7 and later IBM server processors have a register called the Program Priority Register (PPR), which controls the priority of each hardware CPU SMT thread, and affects how fast it runs compared to other SMT threads. This priority can be controlled by

[PULL 06/51] KVM: PPC: Book3S HV: Restructure kvmppc_hv_entry to be a subroutine

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org We have two paths into and out of the low-level guest entry and exit code: from a vcpu task via kvmppc_hv_entry_trampoline, and from the system reset vector for an offline secondary thread on POWER7 via kvm_start_guest. Currently both just branch to

[PULL 13/51] KVM: PPC: Book3S HV: Don't crash host on unknown guest interrupt

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org If we come out of a guest with an interrupt that we don't know about, instead of crashing the host with a BUG(), we now return to userspace with the exit reason set to KVM_EXIT_UNKNOWN and the trap vector in the hw.hardware_exit_reason field of the kvm_run

[PULL 01/51] KVM: PPC: Book3S HV: Reserve POWER8 space in get/set_one_reg

2013-10-31 Thread Alexander Graf
From: Michael Neuling mi...@neuling.org This reserves space in get/set_one_reg ioctl for the extra guest state needed for POWER8. It doesn't implement these at all, it just reserves them so that the ABI is defined now. A few things to note here: - This add *a lot* state for transactional

[PULL 10/51] KVM: PPC: Book3S HV: Store LPCR value for each virtual core

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This adds the ability to have a separate LPCR (Logical Partitioning Control Register) value relating to a guest for each virtual core, rather than only having a single value for the whole VM. This corresponds to what real POWER hardware does, where there is

[PULL 07/51] KVM: PPC: Book3S HV: Pull out interrupt-reading code into a subroutine

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This moves the code in book3s_hv_rmhandlers.S that reads any pending interrupt from the XICS interrupt controller, and works out whether it is an IPI for the guest, an IPI for the host, or a device interrupt, into a new function called kvmppc_read_intr.

[PULL 09/51] KVM: PPC: BookE: Add GET/SET_ONE_REG interface for VRSAVE

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This makes the VRSAVE register value for a vcpu accessible through the GET/SET_ONE_REG interface on Book E systems (in addition to the existing GET/SET_SREGS interface), for consistency with Book 3S. Signed-off-by: Paul Mackerras pau...@samba.org

[PULL 03/51] KVM: PPC: Book3S HV: Implement timebase offset for guests

2013-10-31 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org This allows guests to have a different timebase origin from the host. This is needed for migration, where a guest can migrate from one host to another and the two hosts might have a different timebase origin. However, the timebase seen by the guest must not

[PULL 29/51] powerpc: book3e: _PAGE_LENDIAN must be _PAGE_ENDIAN

2013-10-31 Thread Alexander Graf
From: Bharat Bhushan r65...@freescale.com For booke3e _PAGE_ENDIAN is not defined. Infact what is defined is _PAGE_LENDIAN which is wrong and that should be _PAGE_ENDIAN. There are no compilation errors as arch/powerpc/include/asm/pte-common.h defines _PAGE_ENDIAN to 0 as it is not defined

[PULL 32/51] kvm: powerpc: e500: mark page accessed when mapping a guest page

2013-10-31 Thread Alexander Graf
From: Bharat Bhushan r65...@freescale.com Mark the guest page as accessed so that there is likely less chances of this page getting swap-out. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com Acked-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de ---

[PULL 45/51] kvm: powerpc: book3s: Add is_hv_enabled to kvmppc_ops

2013-10-31 Thread Alexander Graf
From: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com This help us to identify whether we are running with hypervisor mode KVM enabled. The change is needed so that we can have both HV and PR kvm enabled in the same kernel. If both HV and PR KVM are included, interrupts come in to the HV

[PULL 46/51] kvm: powerpc: book3s: pr: move PR related tracepoints to a separate header

2013-10-31 Thread Alexander Graf
From: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com This patch moves PR related tracepoints to a separate header. This enables in converting PR to a kernel module which will be done in later patches Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com Signed-off-by: Alexander Graf

<    1   2