[PATCH 34/38] KVM: PPC: e500: fix typo in tlb code

2012-02-28 Thread Alexander Graf
The tlbncfg registers should be populated with their respective TLB's values. Fix the obvious typo. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc

[PATCH 35/38] KVM: PPC: booke: Support perfmon interrupts

2012-02-28 Thread Alexander Graf
When during guest context we get a performance monitor interrupt, we currently bail out and oops. Let's route it to its correct handler instead. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

[PATCH 36/38] KVM: PPC: booke: expose good state on irq reinject

2012-02-28 Thread Alexander Graf
came from the interrupt reinject code. This helps getting reasonable numbers out of perf. Signed-off-by: Alexander Graf ag...@suse.de --- v2 - v3: - actually sync host state - no need for vcpu in sync --- arch/powerpc/kvm/booke.c | 56 + 1 files

[PATCH 33/38] KVM: PPC: bookehv: remove unused code

2012-02-28 Thread Alexander Graf
There was some unused code in the exit code path that must have been a leftover from earlier iterations. While it did no harm, it's superfluous and thus should be removed. Signed-off-by: Alexander Graf ag...@suse.de --- v2 - v3: - fix commit message - also remove lwzr9, VCPU_KVM(r4

[PATCH 32/38] KVM: PPC: booke: add GS documentation for program interrupt

2012-02-28 Thread Alexander Graf
The comment for program interrupts triggered when using bookehv was misleading. Update it to mention why MSR_GS indicates that we have to inject an interrupt into the guest again, not emulate it. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c | 10 -- 1 files

[PATCH 02/38] powerpc/e500: split CPU_FTRS_ALWAYS/CPU_FTRS_POSSIBLE

2012-02-28 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Split e500 (v1/v2) and e500mc/e5500 to allow optimization of feature checks that differ between the two. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/cputable.h | 12

[PATCH 29/38] KVM: PPC: bookehv: disable MAS register updates early

2012-02-28 Thread Alexander Graf
more logical to do it this way around. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S index 469bd3f

[PATCH 31/38] KVM: PPC: booke: Readd debug abort code for machine check

2012-02-28 Thread Alexander Graf
When during guest execution we get a machine check interrupt, we don't know how to handle it yet. So let's add the error printing code back again that we dropped accidently earlier and tell user space that something went really wrong. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc

[PATCH 15/38] KVM: PPC: e500mc support

2012-02-28 Thread Alexander Graf
varun.se...@freescale.com, and Liu Yu yu@freescale.com. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/cputable.h |6 +- arch/powerpc/include/asm/kvm.h|1 + arch/powerpc/kernel

[PATCH 28/38] KVM: PPC: bookehv: remove SET_VCPU

2012-02-28 Thread Alexander Graf
The SET_VCPU macro is a leftover from times when the vcpu struct wasn't stored in the thread on vcpu_load/put. It's not needed anymore. Remove it. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S |8 1 files changed, 0 insertions(+), 8 deletions

[PATCH 27/38] KVM: PPC: bookehv: remove negation for CONFIG_64BIT

2012-02-28 Thread Alexander Graf
Instead if doing #ifndef CONFIG_64BIT ... #else ... #endif we should rather do #ifdef CONFIG_64BIT ... #else ... #endif which is a lot easier to read. Change the bookehv implementation to stick with this rule. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc

[PATCH 20/38] KVM: PPC: rename CONFIG_KVM_E500 - CONFIG_KVM_E500V2

2012-02-28 Thread Alexander Graf
The CONFIG_KVM_E500 option really indicates that we're running on a V2 machine, not on a machine of the generic E500 class. So indicate that properly and change the config name accordingly. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/Kconfig|8 arch/powerpc

[PATCH 25/38] KVM: PPC: booke: BOOKE_IRQPRIO_MAX is n+1

2012-02-28 Thread Alexander Graf
The semantics of BOOKE_IRQPRIO_MAX changed to denote the highest available irqprio + 1, so let's reflect that in the code too. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm

[PATCH 26/38] KVM: PPC: bookehv: fix exit timing

2012-02-28 Thread Alexander Graf
When using exit timing stats, we clobber r9 in the NEED_EMU case, so better move that part down a few lines and fix it that way. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 24/38] KVM: PPC: booke: rework rescheduling checks

2012-02-28 Thread Alexander Graf
kvmppc_prepare_to_enter function for all ppc targets that does signal and reschedule checking for us. Signed-off-by: Alexander Graf ag...@suse.de --- v2 - v3: - check for signals earlier --- arch/powerpc/include/asm/kvm_ppc.h |2 +- arch/powerpc/kvm/book3s.c |4 +- arch/powerpc/kvm

[PATCH 16/38] KVM: PPC: e500mc: Add doorbell emulation support

2012-02-28 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- v1 - v2: - introduce and use constants - drop e500mc ifdefs --- arch/powerpc/include/asm/dbell.h |2 + arch/powerpc/kvm/booke.c |2 + arch/powerpc/kvm/e500_emulate.c | 68 ++ 3 files changed, 72

[PATCH 12/38] powerpc/booke: Provide exception macros with interrupt name

2012-02-28 Thread Alexander Graf
Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/head_44x.S | 23 +-- arch/powerpc/kernel/head_booke.h | 41 ++ arch/powerpc/kernel/head_fsl_booke.S | 52 +- 3 files

[PATCH 17/38] KVM: PPC: e500mc: implicitly set MSR_GS

2012-02-28 Thread Alexander Graf
When setting MSR for an e500mc guest, we implicitly always set MSR_GS to make sure the guest is in guest state. Since we have this implicit rule there, we don't need to explicitly pass MSR_GS to set_msr(). Remove all explicit setters of MSR_GS. Signed-off-by: Alexander Graf ag...@suse.de

[PATCH 11/38] KVM: PPC: e500: emulate tlbilx

2012-02-28 Thread Alexander Graf
...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500.h |1 + arch/powerpc/kvm/e500_emulate.c |9 ++ arch/powerpc/kvm/e500_tlb.c | 52 +++ 3 files changed, 62 insertions(+), 0 deletions(-) diff --git a/arch

[PATCH 05/38] KVM: PPC: booke: Move vm core init/destroy out of booke.c

2012-02-28 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com e500mc will want to do lpid allocation/deallocation here. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/44x.c |9 + arch/powerpc/kvm/booke.c |9 - arch/powerpc

[PATCH 08/38] KVM: PPC: e500: clean up arch/powerpc/kvm/e500.h

2012-02-28 Thread Alexander Graf
-by: Scott Wood scottw...@freescale.com [agraf: fix bisectability] Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500.h | 25 ++--- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/kvm/e500.h b/arch/powerpc/kvm/e500.h index

[PATCH 03/38] KVM: PPC: factor out lpid allocator from book3s_64_mmu_hv

2012-02-28 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com We'll use it on e500mc as well. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h |3 ++ arch/powerpc/include/asm/kvm_booke.h |3 ++ arch/powerpc/include/asm

[PATCH 06/38] KVM: PPC: e500: rename e500_tlb.h to e500.h

2012-02-28 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This is in preparation for merging in the contents of arch/powerpc/include/asm/kvm_e500.h. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500.c |2 +- arch/powerpc

[PATCH 09/38] KVM: PPC: e500: refactor core-specific TLB code

2012-02-28 Thread Alexander Graf
-by: Scott Wood scottw...@freescale.com [agraf: fix bisectability] Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_host.h |2 + arch/powerpc/kvm/e500.c | 357 +++ arch/powerpc/kvm/e500.h | 62 - arch/powerpc/kvm

[PATCH 07/38] KVM: PPC: e500: merge asm/kvm_e500.h into arch/powerpc/kvm/e500.h

2012-02-28 Thread Alexander Graf
to be referenced from outside arch/powerpc/kvm. Signed-off-by: Scott Wood scottw...@freescale.com [agraf: fix bisectability] Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_e500.h | 96 --- arch/powerpc/kvm/e500.c |1 - arch

[PATCH 00/38] KVM: PPC: e500mc support v3

2012-02-28 Thread Alexander Graf
- sync host state instead of guest state to pt_regs - optimize reinject code path to get out fast when not reinjecting Alexander Graf (23): KVM: PPC: e500mc: Add doorbell emulation support KVM: PPC: e500mc: implicitly set MSR_GS KVM: PPC: e500mc: Move r1/r2 restoration very early KVM: PPC

[PATCH 04/38] KVM: PPC: booke: add booke-level vcpu load/put

2012-02-28 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This gives us a place to put load/put actions that correspond to code that is booke-specific but not specific to a particular core. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/44x.c

[PATCH] KVM: PPC: Don't sync timebase when inside KVM

2012-02-28 Thread Alexander Graf
. Reported-by: Stuart Yoder b08...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/smp.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 46695fe..670b453 100644 --- a/arch/powerpc

Re: [PATCH] KVM: PPC: Don't sync timebase when inside KVM

2012-02-29 Thread Alexander Graf
On 29.02.2012, at 18:50, Scott Wood scottw...@freescale.com wrote: On 02/28/2012 08:16 PM, Alexander Graf wrote: When we know that we're running inside of a KVM guest, we don't have to worry about synchronizing timebases between different CPUs, since the host already took care

[PATCH] PPC: Don't sync timebase when inside VM

2012-03-02 Thread Alexander Graf
When running inside a virtual machine, we can not modify timebase, so let's just not call the functions for it then. This resolves hangs when booting e500 SMP guests on overcommitted hosts. Reported-by: Stuart Yoder b08...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch

Re: [PATCH] PPC: Don't sync timebase when inside VM

2012-03-02 Thread Alexander Graf
On 02.03.2012, at 17:20, Scott Wood wrote: On Fri, Mar 02, 2012 at 03:12:33PM +0100, Alexander Graf wrote: When running inside a virtual machine, we can not modify timebase, so let's just not call the functions for it then. This resolves hangs when booting e500 SMP guests on overcommitted

[PATCH] KVM: PPC: Save/Restore CR over vcpu_run

2012-03-05 Thread Alexander Graf
On PPC, CR2-CR4 are nonvolatile, thus have to be saved across function calls. We didn't respect that for any architecture until Paul spotted it in his patch for Book3S-HV. This patch saves/restores CR for all KVM capable PPC hosts. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm

Re: [PATCH] KVM: PPC: check error return of kvmppc_core_vcpu_create first

2012-03-05 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de Thanks a lot for sending the patch nevertheless! Alex -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/4] KVM: PPC: Book3S HV: Save and restore CR in __kvmppc_vcore_entry

2012-03-05 Thread Alexander Graf
On 02/03/2012 11:53 AM, Paul Mackerras wrote: The ABI specifies that CR fields CR2--CR4 are nonvolatile across function calls. Currently __kvmppc_vcore_entry doesn't save and restore the CR, leading to CR2--CR4 getting corrupted with guest values, possibly leading to incorrect behaviour in its

Re: [PATCH] KVM: PPC: Book3s: PR: Add SPAPR H_BULK_REMOVE support

2012-03-05 Thread Alexander Graf
On 01/31/2012 07:25 AM, Matt Evans wrote: SPAPR support includes various in-kernel hypercalls, improving performance by cutting out the exit to userspace. H_BULK_REMOVE is implemented in this patch. Signed-off-by: Matt Evansm...@ozlabs.org Thanks, applied to kvm-ppc-next. Alex -- To

Re: [PATCH 1/2] powerpc/e500: make load_up_spe a normal fuction

2012-03-07 Thread Alexander Graf
On 02/28/2012 08:09 AM, Yin Olivia-R63875 wrote: Hi Scott, This had been reviewed before and accepted by internal tree. http://linux.freescale.net/patchwork/patch/11100/ http://git.am.freescale.net/gitolite/gitweb.cgi/sdk/kvm.git/commit/?h=for-sdk1.2id=c5088844dc665dbdae4fa51b8d58dc203bacc17e

Re: [PATCH v2 1/2] powerpc/e500: make load_up_spe a normal fuction

2012-03-07 Thread Alexander Graf
On 03/01/2012 02:20 AM, Olivia Yin wrote: From: Liu Yuyu@freescale.com So that we can call it when improving SPE switch like book3e did for fp switch. Timur / Scott, can you please (n)ack this one? Alex Signed-off-by: Liu Yuyu@freescale.com Signed-off-by: Olivia

Re: [PATCH v9 1/4] KVM: PPC: epapr: Factor out the epapr init

2012-03-07 Thread Alexander Graf
On 08.03.2012, at 00:12, Stuart Yoder wrote: From: Liu Yu-B13201 yu@freescale.com from the kvm guest paravirt init code. Signed-off-by: Liu Yu yu@freescale.com [stuart.yo...@freescale.com: misc minor fixes] Signed-off-by: Stuart Yoder stuart.yo...@freescale.com --- -v9: no

Re: [PATCH v9 2/4] KVM: PPC: epapr: Add idle hcall support for host

2012-03-07 Thread Alexander Graf
On 08.03.2012, at 00:12, Stuart Yoder wrote: From: Liu Yu-B13201 yu@freescale.com And add a new flag definition in kvm_ppc_pvinfo to indicate whether host support EV_IDLE hcall. Signed-off-by: Liu Yu yu@freescale.com [stuart.yo...@freescale.com: fixes for conditions allowing

Re: [PATCH v9 3/4] KVM: PPC: epapr: install ev_idle hcall for e500 guest

2012-03-07 Thread Alexander Graf
On 08.03.2012, at 00:12, Stuart Yoder wrote: From: Liu Yu-B13201 yu@freescale.com If the guest hypervisor node contains has-idle property. Jeez those patch descriptions drive me insane. Could you please rewrite them to actually describe what the patches are about? Signed-off-by:

Re: [PATCH v9 4/4] KVM: PPC: epapr: Update other hypercall invoking

2012-03-07 Thread Alexander Graf
On 08.03.2012, at 00:12, Stuart Yoder wrote: From: Liu Yu-B13201 yu@freescale.com Discard the old way that invoke hypercall, instead, use epapr paravirt. Signed-off-by: Liu Yu yu@freescale.com [stuart.yo...@freescale.com: kconfig fixes] Signed-off-by: Stuart Yoder

Re: [PATCH v9 2/4] KVM: PPC: epapr: Add idle hcall support for host

2012-03-07 Thread Alexander Graf
On 08.03.2012, at 00:37, Scott Wood wrote: On 03/07/2012 05:27 PM, Alexander Graf wrote: On 08.03.2012, at 00:12, Stuart Yoder wrote: if (vcpu-requests) { + /* kvm_vcpu_block() sets KVM_REQ_UNHALT, but it is +* not cleared elsewhere as on x86. Clear it here

Re: [PATCH v9 2/4] KVM: PPC: epapr: Add idle hcall support for host

2012-03-08 Thread Alexander Graf
On 08.03.2012, at 05:18, Yoder Stuart-B08248 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, March 07, 2012 5:39 PM To: Wood Scott-B07421 Cc: Yoder Stuart-B08248; kvm-ppc@vger.kernel.org; k...@vger.kernel.org Subject: Re: [PATCH v9 2/4

[PATCH] KVM: PPC: Pass EA to updating emulation ops

2012-03-11 Thread Alexander Graf
that information as value to put into the register. While at it, also move the XOP variants of the above instructions to the new scheme of using the already known vaddr instead of calculating it themselves. Reported-by: Jörg Sommer jo...@alea.gnuu.de Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc

[PATCH] KVM: PPC: Save/Restore CR over vcpu_run

2012-03-12 Thread Alexander Graf
On PPC, CR2-CR4 are nonvolatile, thus have to be saved across function calls. We didn't respect that for any architecture until Paul spotted it in his patch for Book3S-HV. This patch saves/restores CR for all KVM capable PPC hosts. Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2

Re: [PATCH v2 1/2] powerpc/e500: make load_up_spe a normal fuction

2012-03-12 Thread Alexander Graf
On 07.03.2012, at 18:08, Scott Wood wrote: On 03/07/2012 07:56 AM, Alexander Graf wrote: On 03/01/2012 02:20 AM, Olivia Yin wrote: From: Liu Yuyu@freescale.com So that we can call it when improving SPE switch like book3e did for fp switch. Timur / Scott, can you please (n)ack

[PATCH 19/38] KVM: PPC: e500mc: add load inst fixup

2012-03-12 Thread Alexander Graf
fixup code that keeps guest code from potentially crashing our host kernel. Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2: - fix whitespace - use explicit preempt counts v2 - v3: - fix whitespace (for real) diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm

Re: [PATCH] kvm/book3s: Make kernel emulated H_PUT_TCE available for PR KVM

2012-03-13 Thread Alexander Graf
On 13.03.2012, at 03:49, Benjamin Herrenschmidt wrote: There is nothing in the code for emulating TCE tables in the kernel that prevents it from working on PR KVM... other than ifdef's and location of the code. This renames book3s_64_vio_hv.c to book3s_64_vio.c and moves the bulk of the

Re: [PATCH] kvm/book3s: Make kernel emulated H_PUT_TCE available for PR KVM

2012-03-13 Thread Alexander Graf
Am 13.03.2012 um 21:09 schrieb Benjamin Herrenschmidt b...@kernel.crashing.org: On Tue, 2012-03-13 at 14:47 +0100, Alexander Graf wrote: +++ b/arch/powerpc/include/asm/kvm_host.h @@ -183,10 +183,14 @@ struct kvm_arch { unsigned long lpcr; unsigned long rmor; struct

Re: [PATCH v4] KVM: Factor out kvm_vcpu_kick to arch-generic code

2012-03-13 Thread Alexander Graf
On 08.03.2012, at 22:44, Christoffer Dall wrote: Any news on the status of this? On Thu, Feb 9, 2012 at 8:45 PM, Alexander Graf ag...@suse.de wrote: On 10.02.2012, at 02:40, Christoffer Dall wrote: The kvm_vcpu_kick function performs roughly the same funcitonality on most all

Re: [Android-virt] [PATCH v4] KVM: Factor out kvm_vcpu_kick to arch-generic code

2012-03-13 Thread Alexander Graf
On 13.03.2012, at 21:47, Christoffer Dall wrote: On Tue, Mar 13, 2012 at 4:34 PM, Alexander Graf ag...@suse.de wrote: On 08.03.2012, at 22:44, Christoffer Dall wrote: Any news on the status of this? On Thu, Feb 9, 2012 at 8:45 PM, Alexander Graf ag...@suse.de wrote: On 10.02.2012

[PATCH] KVM: PPC: Rework wqp conditional code

2012-03-13 Thread Alexander Graf
is not declared yet, so we can't dereference it. This patch moves all logic into the generic inline function, at which time we have all information necessary. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_host.h |6 +- include/linux/kvm_host.h|6

[PATCH] KVM: PPC: Emulate tw and td instructions

2012-03-13 Thread Alexander Graf
far, so let's also add support for the other two. This fixes kernel booting with recents book3s_32 guest kernels. Reported-by: Jörg Sommer jo...@alea.gnuu.de Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/emulate.c | 14 ++ 1 files changed, 14 insertions(+), 0

[PATCH v2] KVM: PPC: Rework wqp conditional code

2012-03-13 Thread Alexander Graf
is not declared yet, so we can't dereference it. This patch moves all logic into the generic inline function, at which time we have all information necessary. Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2: - fix typo --- arch/powerpc/include/asm/kvm_host.h |6 +- include/linux

Re: [PATCH] powerpc/kvm: Fix magic page vs. 32-bit RTAS on ppc64

2012-03-14 Thread Alexander Graf
On 14.03.2012, at 08:52, Benjamin Herrenschmidt wrote: When the kernel calls into RTAS, it switches to 32-bit mode. The magic page was is longer accessible in that case, causing the patched instructions in the RTAS call wrapper to crash. This fixes it by making available a 32-bit mapping

[PATCH] KVM: PPC: Book3s: PR: Add HV traps so we can run in HV=1 mode on p7

2012-03-14 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index e2be5ad..62d93b0 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm

[PATCH] KVM: PPC: Book3S: PR: Fix preemption

2012-03-14 Thread Alexander Graf
We were leaking preemption counters. Fix the code to always toggle between preempt and non-preempt properly. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch

[PATCH] KVM: PPC: Ignore unhalt request from kvm_vcpu_block

2012-03-14 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |1 + arch/powerpc/kvm/book3s_pr_papr.c |1 + arch/powerpc/kvm/booke.c |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index

[PATCH 01/56] KVM: PPC: Book3s_32: Fix compile error

2012-03-15 Thread Alexander Graf
-to-pointer-cast] Fix this by explicity casting the u64 to long before we use it as a pointer. Reported-by: Jörg Sommer jo...@alea.gnuu.de Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH 02/56] powerpc/booke: Set CPU_FTR_DEBUG_LVL_EXC on 32-bit

2012-03-15 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com Currently 32-bit only cares about this for choice of exception vector, which is done in core-specific code. However, KVM will want to distinguish as well. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de

[PATCH 05/56] KVM: PPC: booke: add booke-level vcpu load/put

2012-03-15 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This gives us a place to put load/put actions that correspond to code that is booke-specific but not specific to a particular core. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/44x.c

[PATCH 09/56] KVM: PPC: e500: clean up arch/powerpc/kvm/e500.h

2012-03-15 Thread Alexander Graf
-by: Scott Wood scottw...@freescale.com [agraf: fix bisectability] Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500.h | 25 ++--- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/arch/powerpc/kvm/e500.h b/arch/powerpc/kvm/e500.h index

[PATCH 10/56] KVM: PPC: e500: refactor core-specific TLB code

2012-03-15 Thread Alexander Graf
-by: Scott Wood scottw...@freescale.com [agraf: fix bisectability] Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_host.h |2 + arch/powerpc/kvm/e500.c | 357 +++ arch/powerpc/kvm/e500.h | 62 - arch/powerpc/kvm

[PATCH 16/56] KVM: PPC: e500mc support

2012-03-15 Thread Alexander Graf
varun.se...@freescale.com, and Liu Yu yu@freescale.com. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/cputable.h |6 +- arch/powerpc/include/asm/kvm.h|1 + arch/powerpc/kernel

[PATCH 13/56] powerpc/booke: Provide exception macros with interrupt name

2012-03-15 Thread Alexander Graf
Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kernel/head_44x.S | 23 +-- arch/powerpc/kernel/head_booke.h | 41 ++ arch/powerpc/kernel/head_fsl_booke.S | 52 +- 3 files

[PATCH 08/56] KVM: PPC: e500: merge asm/kvm_e500.h into arch/powerpc/kvm/e500.h

2012-03-15 Thread Alexander Graf
to be referenced from outside arch/powerpc/kvm. Signed-off-by: Scott Wood scottw...@freescale.com [agraf: fix bisectability] Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_e500.h | 96 --- arch/powerpc/kvm/e500.c |1 - arch

[PATCH 11/56] KVM: PPC: e500: Track TLB1 entries with a bitmap

2012-03-15 Thread Alexander Graf
Yu yu@freescale.com. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500.h |5 +++ arch/powerpc/kvm/e500_tlb.c | 72 --- 2 files changed, 72 insertions(+), 5 deletions(-) diff

[PATCH 07/56] KVM: PPC: e500: rename e500_tlb.h to e500.h

2012-03-15 Thread Alexander Graf
From: Scott Wood scottw...@freescale.com This is in preparation for merging in the contents of arch/powerpc/include/asm/kvm_e500.h. Signed-off-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500.c |2 +- arch/powerpc

[PATCH 36/56] KVM: PPC: booke: Support perfmon interrupts

2012-03-15 Thread Alexander Graf
When during guest context we get a performance monitor interrupt, we currently bail out and oops. Let's route it to its correct handler instead. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

[PATCH 42/56] KVM: PPC: Book3S HV: Save and restore CR in __kvmppc_vcore_entry

2012-03-15 Thread Alexander Graf
. This adds instructions to save and restore CR at the points where we save and restore the nonvolatile GPRs. Signed-off-by: Paul Mackerras pau...@samba.org Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_hv_interrupts.S |8 ++-- 1 files changed, 6 insertions(+), 2

[PATCH 54/56] KVM: PPC: Book3S: PR: Fix preemption

2012-03-15 Thread Alexander Graf
We were leaking preemption counters. Fix the code to always toggle between preempt and non-preempt properly. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch

[PATCH 55/56] KVM: PPC: Ignore unhalt request from kvm_vcpu_block

2012-03-15 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |1 + arch/powerpc/kvm/book3s_pr_papr.c |1 + arch/powerpc/kvm/booke.c |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index

[PATCH 40/56] KVM: PPC: Book3s: PR: Add SPAPR H_BULK_REMOVE support

2012-03-15 Thread Alexander Graf
From: Matt Evans m...@ozlabs.org SPAPR support includes various in-kernel hypercalls, improving performance by cutting out the exit to userspace. H_BULK_REMOVE is implemented in this patch. Signed-off-by: Matt Evans m...@ozlabs.org Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc

[PATCH 56/56] powerpc/kvm: Fix magic page vs. 32-bit RTAS on ppc64

2012-03-15 Thread Alexander Graf
of the magic page in that case. This mapping is flushed whenever we switch the kernel back to 64-bit mode. Signed-off-by: Benjamin Herrenschmidt b...@kernel.crashing.org [agraf: add a check if the magic page is mapped] Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c|3

[PATCH 53/56] KVM: PPC: Book3s: PR: Add HV traps so we can run in HV=1 mode on p7

2012-03-15 Thread Alexander Graf
-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index e2be5ad..62d93b0 100644 --- a/arch/powerpc/kvm/book3s_pr.c +++ b/arch/powerpc/kvm

[PATCH 50/56] KVM: PPC: Pass EA to updating emulation ops

2012-03-15 Thread Alexander Graf
that information as value to put into the register. While at it, also move the XOP variants of the above instructions to the new scheme of using the already known vaddr instead of calculating it themselves. Reported-by: Jörg Sommer jo...@alea.gnuu.de Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc

[PATCH 51/56] KVM: PPC: Book3S: Compile fix for ppc32 in HIOR

2012-03-15 Thread Alexander Graf
On PPC32 we can not use get_user/put_user for 64bit wide variables, as there is no single instruction that could load or store variables that big. So instead, we have to use copy_from/to_user which works everywhere. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_pr.c

[PATCH 49/56] KVM: PPC: Work around POWER7 DABR corruption problem

2012-03-15 Thread Alexander Graf
-volatile GPRs and the FPRs are done with the guest setup of the PMU active. Signed-off-by: Paul Mackerras pau...@samba.org Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_hv_interrupts.S |9 ++- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 93 ++- 2

[PATCH 52/56] KVM: PPC: Emulate tw and td instructions

2012-03-15 Thread Alexander Graf
far, so let's also add support for the other two. This fixes kernel booting with recents book3s_32 guest kernels. Reported-by: Jörg Sommer jo...@alea.gnuu.de Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/emulate.c | 14 ++ 1 files changed, 14 insertions(+), 0

[PATCH 47/56] Restore guest CR after exit timing calculation

2012-03-15 Thread Alexander Graf
...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S index 57e2fa4..909e96e 100644

[PATCH 43/56] KVM: PPC: Save/Restore CR over vcpu_run

2012-03-15 Thread Alexander Graf
On PPC, CR2-CR4 are nonvolatile, thus have to be saved across function calls. We didn't respect that for any architecture until Paul spotted it in his patch for Book3S-HV. This patch saves/restores CR for all KVM capable PPC hosts. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm

[PATCH 41/56] KVM: PPC: Book3S HV: Fix kvm_alloc_linear in case where no linears exist

2012-03-15 Thread Alexander Graf
Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_hv_builtin.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv_builtin.c b/arch/powerpc/kvm/book3s_hv_builtin.c index bed1279..e1b60f5 100644 --- a/arch/powerpc/kvm

[PATCH 39/56] KVM: PPC: Booke: only prepare to enter when we enter

2012-03-15 Thread Alexander Graf
So far, we've always called prepare_to_enter even when all we did was return to the host. This patch changes that semantic to only call prepare_to_enter when we actually want to get back into the guest. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c | 18

[PATCH 38/56] KVM: PPC: booke: Reinject performance monitor interrupts

2012-03-15 Thread Alexander Graf
When we get a performance monitor interrupt, we need to make sure that the host receives it. So reinject it like we reinject the other host destined interrupts. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/hw_irq.h |1 + arch/powerpc/kvm/booke.c |4

[PATCH 37/56] KVM: PPC: booke: expose good state on irq reinject

2012-03-15 Thread Alexander Graf
came from the interrupt reinject code. This helps getting reasonable numbers out of perf. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c | 56 + 1 files changed, 41 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/kvm

[PATCH 35/56] KVM: PPC: e500: fix typo in tlb code

2012-03-15 Thread Alexander Graf
The tlbncfg registers should be populated with their respective TLB's values. Fix the obvious typo. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/e500_tlb.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc

[PATCH 32/56] KVM: PPC: booke: Readd debug abort code for machine check

2012-03-15 Thread Alexander Graf
When during guest execution we get a machine check interrupt, we don't know how to handle it yet. So let's add the error printing code back again that we dropped accidently earlier and tell user space that something went really wrong. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc

[PATCH 34/56] KVM: PPC: bookehv: remove unused code

2012-03-15 Thread Alexander Graf
There was some unused code in the exit code path that must have been a leftover from earlier iterations. While it did no harm, it's superfluous and thus should be removed. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S |7 --- 1 files changed, 0

[PATCH 31/56] KVM: PPC: bookehv: add comment about shadow_msr

2012-03-15 Thread Alexander Graf
For BookE HV the guest visible MSR is shared-msr and is identical to the MSR that is in use while the guest is running, because we can't trap reads from/to MSR. So shadow_msr is unused there. Indicate that with a comment. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm

[PATCH 29/56] KVM: PPC: bookehv: remove SET_VCPU

2012-03-15 Thread Alexander Graf
The SET_VCPU macro is a leftover from times when the vcpu struct wasn't stored in the thread on vcpu_load/put. It's not needed anymore. Remove it. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S |8 1 files changed, 0 insertions(+), 8 deletions

[PATCH 28/56] KVM: PPC: bookehv: remove negation for CONFIG_64BIT

2012-03-15 Thread Alexander Graf
Instead if doing #ifndef CONFIG_64BIT ... #else ... #endif we should rather do #ifdef CONFIG_64BIT ... #else ... #endif which is a lot easier to read. Change the bookehv implementation to stick with this rule. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc

[PATCH 27/56] KVM: PPC: bookehv: fix exit timing

2012-03-15 Thread Alexander Graf
When using exit timing stats, we clobber r9 in the NEED_EMU case, so better move that part down a few lines and fix it that way. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 26/56] KVM: PPC: booke: BOOKE_IRQPRIO_MAX is n+1

2012-03-15 Thread Alexander Graf
The semantics of BOOKE_IRQPRIO_MAX changed to denote the highest available irqprio + 1, so let's reflect that in the code too. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm

[PATCH 25/56] KVM: PPC: booke: rework rescheduling checks

2012-03-15 Thread Alexander Graf
kvmppc_prepare_to_enter function for all ppc targets that does signal and reschedule checking for us. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_ppc.h |2 +- arch/powerpc/kvm/book3s.c |4 +- arch/powerpc/kvm/booke.c | 72

[PATCH 23/56] KVM: PPC: booke: remove leftover debugging

2012-03-15 Thread Alexander Graf
The e500mc patches left some debug code in that we don't need. Remove it. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 9fcc760

[PATCH 24/56] KVM: PPC: booke: deliver program int on emulation failure

2012-03-15 Thread Alexander Graf
space however decides that it wants to ignore the debug, we would at least do the right thing afterwards. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/booke.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm

[PATCH 22/56] KVM: PPC: make e500v2 kvm and e500mc cpu mutually exclusive

2012-03-15 Thread Alexander Graf
We can't run e500v2 kvm on e500mc kernels, so indicate that by making the 2 options mutually exclusive in kconfig. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/Kconfig b/arch

[PATCH 20/56] KVM: PPC: e500mc: add load inst fixup

2012-03-15 Thread Alexander Graf
fixup code that keeps guest code from potentially crashing our host kernel. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S | 30 +- 1 files changed, 29 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm

[PATCH 19/56] KVM: PPC: e500mc: Move r1/r2 restoration very early

2012-03-15 Thread Alexander Graf
fix up our guest instruction read code. And for that to work we need r1/r2 restored. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/bookehv_interrupts.S | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch

[PATCH 21/56] KVM: PPC: rename CONFIG_KVM_E500 - CONFIG_KVM_E500V2

2012-03-15 Thread Alexander Graf
The CONFIG_KVM_E500 option really indicates that we're running on a V2 machine, not on a machine of the generic E500 class. So indicate that properly and change the config name accordingly. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/Kconfig|8 arch/powerpc

<    5   6   7   8   9   10   11   12   13   14   >