Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable

2012-02-17 Thread Benjamin Herrenschmidt
On Fri, 2012-02-17 at 18:56 -0600, Scott Wood wrote: > Yes, or maybe make it "default y", and/or require an "I know what I'm > doing" option to be set for it to be unset if a board otherwise wants it. > > The ability to turn it off is potentially useful for any board, since > the address map is de

Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable

2012-02-17 Thread Scott Wood
On 02/17/2012 05:01 PM, Timur Tabi wrote: > So I noticed something else. PHYS_64BIT is not defined in > mpc85xx_smp_defconfig. It couldn't have been, since it was selected by another kconfig option. defconfigs only hold non-default options. > However, that select statement also means that we ca

Re: [linuxppc-release] [PATCH 1/2] powerpc: document the FSL MPIC message register binding

2012-02-17 Thread Scott Wood
On 02/17/2012 09:50 AM, Yoder Stuart-B08248 wrote: > > >> -Original Message- >> From: linuxppc-release-boun...@linux.freescale.net [mailto:linuxppc-release- >> boun...@linux.freescale.net] On Behalf Of Jia Hongtao-B38951 >> Sent: Thursday, February 16, 2012 8:49 PM >> To: linuxppc-dev@lis

Re: [PATCH 21/30] KVM: PPC: make e500v2 and e500mc mutually exclusive

2012-02-17 Thread Alexander Graf
On 17.02.2012, at 23:32, Tabi Timur-B04825 wrote: > On Fri, Feb 17, 2012 at 10:56 AM, Alexander Graf wrote: > >> config KVM_E500MC >>bool "KVM support for PowerPC E500MC/E5500 processors" >> - depends on EXPERIMENTAL && PPC_E500MC >> + depends on EXPERIMENTAL && PPC_E500MC

Re: [PATCH] powerpc/85xx:Add PSC9131 RDB Support

2012-02-17 Thread Andy Fleming
On Fri, Feb 17, 2012 at 1:20 PM, Tabi Timur-B04825 wrote: > On Tue, Feb 14, 2012 at 2:37 AM, Prabhakar Kushwaha > wrote: >> >>  Applied on git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git >> branch next > > This is actually a false statement.  "Applied" is past tense, so you > are

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

2012-02-17 Thread Scott Wood
On 02/17/2012 11:13 AM, Alexander Graf wrote: > There's always a chance we're unable to read a guest instruction. The guest > could have its TLB mapped execute-, but not readable, something odd happens > and our TLB gets flushed. So it's a good idea to be prepared for that case > and have a fallbac

Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable

2012-02-17 Thread Timur Tabi
So I noticed something else. PHYS_64BIT is not defined in mpc85xx_smp_defconfig. This means that if we want to build a 36-bit kernel, we need to have "select PHYS_64BIT" in the Kconfig for that board. This is what we have today for the P1022DS. However, that select statement also means that we

Re: [PATCH 24/30] KVM: PPC: booke: call resched after every exit

2012-02-17 Thread Scott Wood
On 02/17/2012 11:13 AM, Alexander Graf wrote: > Instead of checking whether we should reschedule only when we exited > due to an interrupt, let's always check before entering the guest back > again. This gets the target more in line with the other archs. > > Signed-off-by: Alexander Graf > --- >

[git pull] Please pull powerpc.git merge branch

2012-02-17 Thread Benjamin Herrenschmidt
Hi Linus ! Here are a few more fixes for powerpc. Some are regressions, the rest is simple/obvious/nasty enough that I deemed it good to go now. Here's also step one of deprecating legacy iSeries support: we are removing it from the main defconfig. Nobody seems to be using it anymore and the cod

Re: [PATCH 21/30] KVM: PPC: make e500v2 and e500mc mutually exclusive

2012-02-17 Thread Tabi Timur-B04825
On Fri, Feb 17, 2012 at 10:56 AM, Alexander Graf wrote: >  config KVM_E500MC >        bool "KVM support for PowerPC E500MC/E5500 processors" > -       depends on EXPERIMENTAL && PPC_E500MC > +       depends on EXPERIMENTAL && PPC_E500MC && !KVM_E500V2 There was a patch floating around that made

Re: [PATCH 21/30] KVM: PPC: make e500v2 and e500mc mutually exclusive

2012-02-17 Thread Scott Wood
On 02/17/2012 11:13 AM, Alexander Graf wrote: > We can't build e500v2 and e500mc (kvm) support inside the same kernel. > So indicate that by making the 2 options mutually exclusive in kconfig. > > Signed-off-by: Alexander Graf > --- > arch/powerpc/kvm/Kconfig |2 +- > 1 files changed, 1 inse

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

2012-02-17 Thread Scott Wood
On 02/17/2012 03:55 PM, Scott Wood wrote: > Should this be a kvm_make_request instead (with a separate > pending_doorbell bool in vcpu that msgclr can act on), considering > earlier discussion of phasing out atomics on pending_exceptions, in > favor of requests? Ignore the bit about msgclr -- it a

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

2012-02-17 Thread Scott Wood
On 02/17/2012 11:13 AM, Alexander Graf wrote: > When one vcpu wants to kick another, it can issue a special IPI instruction > called msgsnd. This patch emulates this instruction, its clearing counterpart > and the infrastructure required to actually trigger that interrupt inside > a guest vcpu. >

Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable

2012-02-17 Thread Timur Tabi
Benjamin Herrenschmidt wrote: > Sorry, I fail to see how... it basically makes all those boards > non-functional even when enabled... So you're saying that if we allow 32-bit address spacing for a particular board, then we must provide a 32-bit DTS to go with it? I was hoping to use the defconfig

Re: [PATCH 13/30] KVM: PPC: booke: category E.HV (GS-mode) support

2012-02-17 Thread Scott Wood
On 02/17/2012 11:13 AM, Alexander Graf wrote: > From: Scott Wood > > Chips such as e500mc that implement category E.HV in Power ISA 2.06 > provide hardware virtualization features, including a new MSR mode for > guest state. The guest OS can perform many operations without trapping > into the hy

Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable

2012-02-17 Thread Benjamin Herrenschmidt
On Fri, 2012-02-17 at 16:22 +, Tabi Timur-B04825 wrote: > Was this a Freescale internal decision, or is this a generic 85xx > decision? > > For the record, I'm in favor in leaving out support for 32-bit address > map in the upstream kernel, and having it be an option on the SDK > only. Howeve

Re: [PATCH] powerpc/85xx:Add PSC9131 RDB Support

2012-02-17 Thread Tabi Timur-B04825
On Tue, Feb 14, 2012 at 2:37 AM, Prabhakar Kushwaha wrote: > >  Applied on git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc.git > branch next This is actually a false statement. "Applied" is past tense, so you are saying that this patch has *already* been applied to Kumar's powerpc.g

Re: [PATCH v4 1/3] KVM: PPC: epapr: Factor out the epapr init

2012-02-17 Thread Scott Wood
On 02/17/2012 04:03 AM, Liu Yu-B13201 wrote: > > >> -Original Message- >> From: Wood Scott-B07421 >> Sent: Friday, February 17, 2012 1:13 AM >> To: Liu Yu-B13201 >> Cc: ag...@suse.de; kvm-...@vger.kernel.org; k...@vger.kernel.org; >> linuxppc-...@ozlabs.org; Wood Scott-B07421 >> Subject:

Re: [PATCH 2/2 v5] powerpc/85xx: Abstract common define of signal multiplex control for qe

2012-02-17 Thread Tabi Timur-B04825
On Wed, Feb 15, 2012 at 12:58 AM, Zhicheng Fan wrote: > @@ -114,6 +114,24 @@ struct ccsr_guts_86xx { >        __be32  srds2cr1;       /* 0x.0f44 - SerDes2 Control Register 0 */ >  } __attribute__ ((packed)); > > +#ifdef CONFIG_PPC_85xx > + Remove this #ifdef. It doesn't really help, and it make

Re: [PATCH v5 00/27] irq_domain generalization and rework

2012-02-17 Thread Sam Ravnborg
> > > > /* > > * Please do not include this file in generic code. There is currently > > * no requirement for any architecture to implement anything held > > * within this file. > > * > > * Thanks. --rmk > > */ > > > > A quick grep indicates that we've lost this battle ;) Is the comments >

Re: [PATCH v5 00/27] irq_domain generalization and rework

2012-02-17 Thread Russell King - ARM Linux
On Fri, Feb 17, 2012 at 06:42:31PM +0100, Cousson, Benoit wrote: > Hi Grant, > > On 2/16/2012 11:52 PM, Andrew Morton wrote: > > On Thu, 16 Feb 2012 02:09:01 -0700 > > Grant Likely wrote: > > > >> > >> This series generalizes the "irq_host" infrastructure from powerpc > >> so that it can be used

Re: [PATCH v5 00/27] irq_domain generalization and rework

2012-02-17 Thread Cousson, Benoit
Hi Grant, On 2/16/2012 11:52 PM, Andrew Morton wrote: > On Thu, 16 Feb 2012 02:09:01 -0700 > Grant Likely wrote: > >> >> This series generalizes the "irq_host" infrastructure from powerpc >> so that it can be used by all architectures and renames it to "irq_domain". > > drivers/mfd/twl-core.c i

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

2012-02-17 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 --- arch/powerpc/kvm/bookehv_interrupts.S |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kv

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

2012-02-17 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 --- arch/powerpc/kvm/Kconfig|8 arch/powerpc/kvm/Makefile

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

2012-02-17 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 --- arch/powerpc/kvm/bookehv_interrupts.S |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git

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

2012-02-17 Thread Alexander Graf
There's always a chance we're unable to read a guest instruction. The guest could have its TLB mapped execute-, but not readable, something odd happens and our TLB gets flushed. So it's a good idea to be prepared for that case and have a fallback that allows us to fix things up in that case. Add f

[PATCH 14/30] KVM: PPC: booke: standard PPC floating point support

2012-02-17 Thread Alexander Graf
From: Scott Wood e500mc has a normal PPC FPU, rather than SPE which is found on e500v1/v2. Based on code from Liu Yu . Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/system.h |1 + arch/powerpc/kvm/booke.c | 44

[PATCH 22/30] KVM: PPC: booke: remove leftover debugging

2012-02-17 Thread Alexander Graf
The e500mc patches left some debug code in that we don't need. Remove it. Signed-off-by: Alexander Graf --- 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 12a2b0b..4c1e2bc 100644 ---

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

2012-02-17 Thread Alexander Graf
We need to make sure that no MAS updates happen automatically while we have the guest MAS registers loaded. So move the disabling code a bit higher up so that it covers the full time we have guest values in MAS registers. The race this patch fixes should never occur, but it makes the code a bit mo

[PATCH 21/30] KVM: PPC: make e500v2 and e500mc mutually exclusive

2012-02-17 Thread Alexander Graf
We can't build e500v2 and e500mc (kvm) support inside the same kernel. So indicate that by making the 2 options mutually exclusive in kconfig. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/Kco

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

2012-02-17 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 --- arch/powerpc/kvm/booke.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powe

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

2012-02-17 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 --- arch/powerpc/kvm/bookehv_int

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

2012-02-17 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 --- arch/powerpc/include/asm/kvm_host.h |

[PATCH 23/30] KVM: PPC: booke: deliver program int on emulation failure

2012-02-17 Thread Alexander Graf
When we fail to emulate an instruction for the guest, we better go in and tell it that we failed to emulate it, by throwing an illegal instruction exception. Please beware that we basically never get around to telling the guest that we failed thanks to the debugging code right above it. If user sp

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

2012-02-17 Thread Alexander Graf
When one vcpu wants to kick another, it can issue a special IPI instruction called msgsnd. This patch emulates this instruction, its clearing counterpart and the infrastructure required to actually trigger that interrupt inside a guest vcpu. With this patch, SMP guests on e500mc work. Signed-off-

[PATCH 24/30] KVM: PPC: booke: call resched after every exit

2012-02-17 Thread Alexander Graf
Instead of checking whether we should reschedule only when we exited due to an interrupt, let's always check before entering the guest back again. This gets the target more in line with the other archs. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/booke.c | 15 ++- 1 files ch

[PATCH 18/30] KVM: PPC: e500mc: Move r1/r2 restoration very early

2012-02-17 Thread Alexander Graf
If we hit any exception whatsoever in the restore path and r1/r2 aren't the host registers, we don't get a working oops. So it's always a good idea to restore them as early as possible. This time, it actually has practical reasons to do so too, since we need to have the host page fault handler fix

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

2012-02-17 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 --- arch/powerpc/kvm

[PATCH 13/30] KVM: PPC: booke: category E.HV (GS-mode) support

2012-02-17 Thread Alexander Graf
From: Scott Wood Chips such as e500mc that implement category E.HV in Power ISA 2.06 provide hardware virtualization features, including a new MSR mode for guest state. The guest OS can perform many operations without trapping into the hypervisor, including transitions to and from guest userspac

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

2012-02-17 Thread Alexander Graf
From: Scott Wood Add processor support for e500mc, using hardware virtualization support (GS-mode). Current issues include: - No support for external proxy (coreint) interrupt mode in the guest. Includes work by Ashish Kalra , Varun Sethi , and Liu Yu . Signed-off-by: Scott Wood Signed-off-b

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

2012-02-17 Thread Alexander Graf
From: Scott Wood DO_KVM will need to identify the particular exception type. There is an existing set of arbitrary numbers that Linux passes, but it's an undocumented mess that sort of corresponds to server/classic exception vectors but not really. Signed-off-by: Scott Wood Signed-off-by: Alex

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

2012-02-17 Thread Alexander Graf
From: Scott Wood The PID handling is e500v1/v2-specific, and is moved to e500.c. The MMU sregs code and kvmppc_core_vcpu_translate will be shared with e500mc, and is moved from e500.c to e500_tlb.c. Partially based on patches from Liu Yu . Signed-off-by: Scott Wood [agraf: fix bisectability]

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

2012-02-17 Thread Alexander Graf
From: Scott Wood tlbilx is the new, preferred invalidation instruction. It is not found on e500 prior to e500mc, but there should be no harm in supporting it on all e500. Based on code from Ashish Kalra . Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/kvm/e500.h

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

2012-02-17 Thread Alexander Graf
From: Scott Wood Keeping two separate headers for e500-specific things was a pain, and wasn't even organized along any logical boundary. There was TLB stuff in despite the existence of arch/powerpc/kvm/e500_tlb.h, and nothing in needed to be referenced from outside arch/powerpc/kvm. Signed-of

[PATCH 10/30] KVM: PPC: e500: Track TLB1 entries with a bitmap

2012-02-17 Thread Alexander Graf
From: Scott Wood Rather than invalidate everything when a TLB1 entry needs to be taken down, keep track of which host TLB1 entries are used for a given guest TLB1 entry, and invalidate just those entries. Based on code from Ashish Kalra and Liu Yu . Signed-off-by: Scott Wood Signed-off-by: Al

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

2012-02-17 Thread Alexander Graf
From: Scott Wood This is in preparation for merging in the contents of arch/powerpc/include/asm/kvm_e500.h. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/kvm/e500.c |2 +- arch/powerpc/kvm/{e500_tlb.h => e500.h} |6 +++--- arch/powerpc/kvm/e5

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

2012-02-17 Thread Alexander Graf
From: Scott Wood e500mc will want to do lpid allocation/deallocation here. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/kvm/44x.c |9 + arch/powerpc/kvm/booke.c |9 - arch/powerpc/kvm/e500.c |9 + 3 files changed, 18 insertion

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

2012-02-17 Thread Alexander Graf
From: Scott Wood Move vcpu to the beginning of vcpu_e500 to give it appropriate prominence, especially if more fields end up getting added to the end of vcpu_e500 (and vcpu ends up in the middle). Remove gratuitous "extern" and add parameter names to prototypes. Signed-off-by: Scott Wood [agra

[PATCH 00/30] KVM: PPC: e500mc support

2012-02-17 Thread Alexander Graf
(resending with fixed email list - somehow I screwed that one up the first time) This is Scott's e500mc RFC patch set rebased, berobbed of its pt_regs parts and fixed for bisectability. On top of them, I addressed all the comments that I had on the code and that came up in his code as FIXMEs. I

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

2012-02-17 Thread Alexander Graf
From: Scott Wood We'll use it on e500mc as well. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/kvm_book3s.h |3 ++ arch/powerpc/include/asm/kvm_booke.h |3 ++ arch/powerpc/include/asm/kvm_ppc.h|5 arch/powerpc/kvm/book3s_64_mmu_hv.c

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

2012-02-17 Thread Alexander Graf
From: Scott Wood Split e500 (v1/v2) and e500mc/e5500 to allow optimization of feature checks that differ between the two. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/cputable.h | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff

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

2012-02-17 Thread Alexander Graf
From: Scott Wood 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 Signed-off-by: Alexander Graf --- arch/powerpc/kvm/44x.c |3 +++ arch/powerpc/kvm/booke.c |8 arch/

[PATCH 01/30] powerpc/booke: Set CPU_FTR_DEBUG_LVL_EXC on 32-bit

2012-02-17 Thread Alexander Graf
From: Scott Wood 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 Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/cputable.h |5 +++-- 1 files ch

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

2012-02-17 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 --- arch/powerpc/include/asm/kvm_host.h |

[PATCH 13/30] KVM: PPC: booke: category E.HV (GS-mode) support

2012-02-17 Thread Alexander Graf
From: Scott Wood Chips such as e500mc that implement category E.HV in Power ISA 2.06 provide hardware virtualization features, including a new MSR mode for guest state. The guest OS can perform many operations without trapping into the hypervisor, including transitions to and from guest userspac

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

2012-02-17 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 --- arch/powerpc/kvm/bookehv_interrupts.S |8 1 files changed, 0 insertions(+), 8 deletions(-) diff --git

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

2012-02-17 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 --- arch/powerpc/kvm

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

2012-02-17 Thread Alexander Graf
When one vcpu wants to kick another, it can issue a special IPI instruction called msgsnd. This patch emulates this instruction, its clearing counterpart and the infrastructure required to actually trigger that interrupt inside a guest vcpu. With this patch, SMP guests on e500mc work. Signed-off-

[PATCH 24/30] KVM: PPC: booke: call resched after every exit

2012-02-17 Thread Alexander Graf
Instead of checking whether we should reschedule only when we exited due to an interrupt, let's always check before entering the guest back again. This gets the target more in line with the other archs. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/booke.c | 15 ++- 1 files ch

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

2012-02-17 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 --- arch/powerpc/kvm/Kconfig|8 arch/powerpc/kvm/Makefile

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

2012-02-17 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 --- arch/powerpc/kvm/booke.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/booke.c b/arch/powe

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

2012-02-17 Thread Alexander Graf
We need to make sure that no MAS updates happen automatically while we have the guest MAS registers loaded. So move the disabling code a bit higher up so that it covers the full time we have guest values in MAS registers. The race this patch fixes should never occur, but it makes the code a bit mo

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

2012-02-17 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 --- arch/powerpc/kvm/bookehv_interrupts.S |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kv

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

2012-02-17 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 --- arch/powerpc/kvm/bookehv_int

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

2012-02-17 Thread Alexander Graf
There's always a chance we're unable to read a guest instruction. The guest could have its TLB mapped execute-, but not readable, something odd happens and our TLB gets flushed. So it's a good idea to be prepared for that case and have a fallback that allows us to fix things up in that case. Add f

[PATCH 23/30] KVM: PPC: booke: deliver program int on emulation failure

2012-02-17 Thread Alexander Graf
When we fail to emulate an instruction for the guest, we better go in and tell it that we failed to emulate it, by throwing an illegal instruction exception. Please beware that we basically never get around to telling the guest that we failed thanks to the debugging code right above it. If user sp

[PATCH 21/30] KVM: PPC: make e500v2 and e500mc mutually exclusive

2012-02-17 Thread Alexander Graf
We can't build e500v2 and e500mc (kvm) support inside the same kernel. So indicate that by making the 2 options mutually exclusive in kconfig. Signed-off-by: Alexander Graf --- arch/powerpc/kvm/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/Kco

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

2012-02-17 Thread Alexander Graf
From: Scott Wood tlbilx is the new, preferred invalidation instruction. It is not found on e500 prior to e500mc, but there should be no harm in supporting it on all e500. Based on code from Ashish Kalra . Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/kvm/e500.h

[PATCH 22/30] KVM: PPC: booke: remove leftover debugging

2012-02-17 Thread Alexander Graf
The e500mc patches left some debug code in that we don't need. Remove it. Signed-off-by: Alexander Graf --- 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 12a2b0b..4c1e2bc 100644 ---

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

2012-02-17 Thread Alexander Graf
From: Scott Wood The PID handling is e500v1/v2-specific, and is moved to e500.c. The MMU sregs code and kvmppc_core_vcpu_translate will be shared with e500mc, and is moved from e500.c to e500_tlb.c. Partially based on patches from Liu Yu . Signed-off-by: Scott Wood [agraf: fix bisectability]

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

2012-02-17 Thread Alexander Graf
From: Scott Wood Add processor support for e500mc, using hardware virtualization support (GS-mode). Current issues include: - No support for external proxy (coreint) interrupt mode in the guest. Includes work by Ashish Kalra , Varun Sethi , and Liu Yu . Signed-off-by: Scott Wood Signed-off-b

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

2012-02-17 Thread Alexander Graf
From: Scott Wood DO_KVM will need to identify the particular exception type. There is an existing set of arbitrary numbers that Linux passes, but it's an undocumented mess that sort of corresponds to server/classic exception vectors but not really. Signed-off-by: Scott Wood Signed-off-by: Alex

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

2012-02-17 Thread Alexander Graf
From: Scott Wood Keeping two separate headers for e500-specific things was a pain, and wasn't even organized along any logical boundary. There was TLB stuff in despite the existence of arch/powerpc/kvm/e500_tlb.h, and nothing in needed to be referenced from outside arch/powerpc/kvm. Signed-of

[PATCH 10/30] KVM: PPC: e500: Track TLB1 entries with a bitmap

2012-02-17 Thread Alexander Graf
From: Scott Wood Rather than invalidate everything when a TLB1 entry needs to be taken down, keep track of which host TLB1 entries are used for a given guest TLB1 entry, and invalidate just those entries. Based on code from Ashish Kalra and Liu Yu . Signed-off-by: Scott Wood Signed-off-by: Al

[PATCH 18/30] KVM: PPC: e500mc: Move r1/r2 restoration very early

2012-02-17 Thread Alexander Graf
If we hit any exception whatsoever in the restore path and r1/r2 aren't the host registers, we don't get a working oops. So it's always a good idea to restore them as early as possible. This time, it actually has practical reasons to do so too, since we need to have the host page fault handler fix

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

2012-02-17 Thread Alexander Graf
From: Scott Wood We'll use it on e500mc as well. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/kvm_book3s.h |3 ++ arch/powerpc/include/asm/kvm_booke.h |3 ++ arch/powerpc/include/asm/kvm_ppc.h|5 arch/powerpc/kvm/book3s_64_mmu_hv.c

[PATCH 14/30] KVM: PPC: booke: standard PPC floating point support

2012-02-17 Thread Alexander Graf
From: Scott Wood e500mc has a normal PPC FPU, rather than SPE which is found on e500v1/v2. Based on code from Liu Yu . Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/system.h |1 + arch/powerpc/kvm/booke.c | 44

[PATCH 01/30] powerpc/booke: Set CPU_FTR_DEBUG_LVL_EXC on 32-bit

2012-02-17 Thread Alexander Graf
From: Scott Wood 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 Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/cputable.h |5 +++-- 1 files ch

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

2012-02-17 Thread Alexander Graf
From: Scott Wood Move vcpu to the beginning of vcpu_e500 to give it appropriate prominence, especially if more fields end up getting added to the end of vcpu_e500 (and vcpu ends up in the middle). Remove gratuitous "extern" and add parameter names to prototypes. Signed-off-by: Scott Wood [agra

[PATCH 00/30] KVM: PPC: e500mc support

2012-02-17 Thread Alexander Graf
This is Scott's e500mc RFC patch set rebased, berobbed of its pt_regs parts and fixed for bisectability. On top of them, I addressed all the comments that I had on the code and that came up in his code as FIXMEs. I verified that this patch set works just fine on e500mc and doesn't break e500v2, so

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

2012-02-17 Thread Alexander Graf
From: Scott Wood Split e500 (v1/v2) and e500mc/e5500 to allow optimization of feature checks that differ between the two. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/include/asm/cputable.h | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff

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

2012-02-17 Thread Alexander Graf
From: Scott Wood 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 Signed-off-by: Alexander Graf --- arch/powerpc/kvm/44x.c |3 +++ arch/powerpc/kvm/booke.c |8 arch/

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

2012-02-17 Thread Alexander Graf
From: Scott Wood e500mc will want to do lpid allocation/deallocation here. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/kvm/44x.c |9 + arch/powerpc/kvm/booke.c |9 - arch/powerpc/kvm/e500.c |9 + 3 files changed, 18 insertion

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

2012-02-17 Thread Alexander Graf
From: Scott Wood This is in preparation for merging in the contents of arch/powerpc/include/asm/kvm_e500.h. Signed-off-by: Scott Wood Signed-off-by: Alexander Graf --- arch/powerpc/kvm/e500.c |2 +- arch/powerpc/kvm/{e500_tlb.h => e500.h} |6 +++--- arch/powerpc/kvm/e5

Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable

2012-02-17 Thread Tabi Timur-B04825
On Thu, Feb 16, 2012 at 7:27 PM, Kumar Gala wrote: > For some of these platforms like P2041RDB, P3041DS, P3060QDS, P4080DS, & > P5020DS only a 36-bit physical address map is supported by u-boot and the > device tree.  This was a decision that was made to NOT support 32-bit address > map for th

[PATCH] params: Fix parse_args() use in PowerPC's reserve_hugetlb_gpages()

2012-02-17 Thread Pawel Moll
Commit b8076966e8e1 ("params: _initcall-like kernel parameters") changed the parse_args() API without fixing all the callers. Done now. Signed-off-by: Pawel Moll --- arch/powerpc/mm/hugetlbpage.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/mm/hugetlbpa

RE: [linuxppc-release] [PATCH 1/2] powerpc: document the FSL MPIC message register binding

2012-02-17 Thread Yoder Stuart-B08248
> -Original Message- > From: linuxppc-release-boun...@linux.freescale.net [mailto:linuxppc-release- > boun...@linux.freescale.net] On Behalf Of Jia Hongtao-B38951 > Sent: Thursday, February 16, 2012 8:49 PM > To: linuxppc-dev@lists.ozlabs.org > Cc: meador_i...@mentor.com; Li Yang-R58472;

RE: [PATCH v4 1/3] KVM: PPC: epapr: Factor out the epapr init

2012-02-17 Thread Liu Yu-B13201
> -Original Message- > From: Wood Scott-B07421 > Sent: Friday, February 17, 2012 1:13 AM > To: Liu Yu-B13201 > Cc: ag...@suse.de; kvm-...@vger.kernel.org; k...@vger.kernel.org; > linuxppc-...@ozlabs.org; Wood Scott-B07421 > Subject: Re: [PATCH v4 1/3] KVM: PPC: epapr: Factor out the epapr

Re: [RFC PATCH 13/16] powerpc/booke: Provide exception macros with interrupt name

2012-02-17 Thread Benjamin Herrenschmidt
On Tue, 2011-12-20 at 19:34 -0600, Scott Wood wrote: > > There is an existing set of arbitrary numbers that Linux passes, > but it's an undocumented mess that sort of corresponds to > server/classic > exception vectors but not really. > > FIXME: Replace the existing trap numbering rather than add

RE: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable

2012-02-17 Thread Benjamin Herrenschmidt
On Fri, 2012-02-17 at 04:32 +, Li Yang-R58472 wrote: > >Additionally, outside of maybe P2041RDB I believe the majority of > these > >boards ship with 4G of DDR (but that off the top of my head) and thus > >require the 36-bit / PHYS_64BIT support to be enabled. > > I know that current support o

Re: [PATCH 1/2] powerpc/85xx: fix problem that prevents PHYS_64BIT from configurable

2012-02-17 Thread Benjamin Herrenschmidt
On Thu, 2012-02-16 at 20:10 +0800, Li Yang wrote: > Fix the problem that large physical address support cannot be > disabled when some platforms which only provides 36-bit support > are selected. According to the philosophy of kernel config > enabling a platform support doesn't mean the kernel is

Re: [PATCH v1 0/4][makedumpfile] vmalloc translation support for PPC32

2012-02-17 Thread Benjamin Herrenschmidt
On Fri, 2012-02-17 at 11:25 +0530, Suzuki K. Poulose wrote: > > Could you tell me what kind of data is stored in vmalloc region in > PPC ? > > I want to estimate importance of your patches for makedumpfile. > I know at least the modules are loaded in the vmalloc'd region. I have > Cc'ed linux-ppc d

[PATCH 2/2] powerpc/44x: Add more changes for APM821XX EMAC driver

2012-02-17 Thread Duc Dang
This patch includes: Configure EMAC PHY clock source (clock from PHY or internal clock). Do not advertise PHY half duplex capability as APM821XX EMAC does not support half duplex mode. Add changes to support configuring jumbo frame for APM821XX EMAC. Signed-off-by: Duc Dang --- drivers/

[PATCH 1/2] powerpc/44x: Add new compatible value for EMAC node of APM821XX dts file.

2012-02-17 Thread Duc Dang
This compatible value will be used to distinguish some special features of APM821XX EMAC: no half duplex mode support, configuring jumbo frame. Signed-off-by: Duc Dang --- arch/powerpc/boot/dts/bluestone.dts |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/