Re: [PATCH 2/6] KVM: PPC: Add support for multiple-TCE hcalls

2013-05-09 Thread David Gibson
On Mon, May 06, 2013 at 05:25:53PM +1000, Alexey Kardashevskiy wrote: > This adds real mode handlers for the H_PUT_TCE_INDIRECT and > H_STUFF_TCE hypercalls for QEMU emulated devices such as virtio > devices or emulated PCI. These calls allow adding multiple entries > (up to 512) into the TCE tabl

Re: [PATCH v2 4/4] kvm/ppc: IRQ disabling cleanup

2013-05-09 Thread tiejun.chen
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 4e05f8c..f8659aa 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -64,12 +64,14 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu) { int r = 1; - WARN_ON_ONCE(!irqs_disabled())

Re: [PATCH] powerpc: fix numa distance for form0 device tree

2013-05-09 Thread Ben Hutchings
On Tue, 2013-05-07 at 13:49 +1000, Michael Ellerman wrote: > From: Vaidyanathan Srinivasan > > Commit 7122b7bc1757682049780179d7c216dd1c83 upstream. [...] Queued up for 3.2, thanks. Ben. -- Ben Hutchings For every action, there is an equal and opposite criticism. - Harrison signature.as

RE: [PATCH v2 4/4] kvm/ppc: IRQ disabling cleanup

2013-05-09 Thread Bhushan Bharat-R65777
> -Original Message- > From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On > Behalf Of Scott Wood > Sent: Friday, May 10, 2013 8:40 AM > To: Alexander Graf; Benjamin Herrenschmidt > Cc: kvm-...@vger.kernel.org; k...@vger.kernel.org; > linuxppc-dev@lists.ozlabs.o

RE: [PATCH v2 2/4] kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit()

2013-05-09 Thread Bhushan Bharat-R65777
> -Original Message- > From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On > Behalf Of Scott Wood > Sent: Friday, May 10, 2013 8:40 AM > To: Alexander Graf; Benjamin Herrenschmidt > Cc: kvm-...@vger.kernel.org; k...@vger.kernel.org; > linuxppc-dev@lists.ozlabs.o

Re: [PATCH v2 3/4] kvm/ppc: Call trace_hardirqs_on before entry

2013-05-09 Thread tiejun.chen
On 05/10/2013 11:34 AM, Bhushan Bharat-R65777 wrote: -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Scott Wood Sent: Friday, May 10, 2013 8:40 AM To: Alexander Graf; Benjamin Herrenschmidt Cc: kvm-...@vger.kernel.org; k...@vger.kernel

RE: [PATCH 2/2 V8] powerpc/85xx: Add machine check handler to fix PCIe erratum on mpc85xx

2013-05-09 Thread Jia Hongtao-B38951
> > -Original Message- > > From: Wood Scott-B07421 > > Sent: Friday, May 03, 2013 1:04 AM > > To: Jia Hongtao-B38951 > > Cc: linuxppc-dev@lists.ozlabs.org; ga...@kernel.crashing.org; Wood > > Scott- B07421; seg...@kernel.crashing.org; Li Yang-R58472; Jia > > Hongtao-B38951 > > Subject: Re:

RE: [PATCH v2 3/4] kvm/ppc: Call trace_hardirqs_on before entry

2013-05-09 Thread Bhushan Bharat-R65777
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf > Of > Scott Wood > Sent: Friday, May 10, 2013 8:40 AM > To: Alexander Graf; Benjamin Herrenschmidt > Cc: kvm-...@vger.kernel.org; k...@vger.kernel.org; > linuxppc-dev@lists.ozlabs.org; >

[PATCH v2 3/4] kvm/ppc: Call trace_hardirqs_on before entry

2013-05-09 Thread Scott Wood
Currently this is only being done on 64-bit. Rather than just move it out of the 64-bit ifdef, move it to kvm_lazy_ee_enable() so that it is consistent with lazy ee state, and so that we don't track more host code as interrupts-enabled than necessary. Rename kvm_lazy_ee_enable() to kvm_fix_ee_bef

[PATCH v2 1/4] powerpc: hard_irq_disable(): Call trace_hardirqs_off after disabling

2013-05-09 Thread Scott Wood
lockdep.c has this: /* * So we're supposed to get called after you mask local IRQs, * but for some reason the hardware doesn't quite think you did * a proper job. */ if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) return; Since irqs_di

[PATCH v2 0/4] kvm/ppc: interrupt disabling fixes

2013-05-09 Thread Scott Wood
v2: - Split into separate changes - Rebase on top of (and fix a bug in) powerpc: Make hard_irq_disable() do the right thing vs. irq tracing - Move interrupt diasbling/enabling into kvmppc_handle_exit Based on Ben's next branch. Scott Wood (4): powerpc: hard_irq_disable(): Call trace_hardi

[PATCH v2 4/4] kvm/ppc: IRQ disabling cleanup

2013-05-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 v2 2/4] kvm/ppc/booke64: Fix lazy ee handling in kvmppc_handle_exit()

2013-05-09 Thread Scott Wood
EE is hard-disabled on entry to kvmppc_handle_exit(), so call hard_irq_disable() so that PACA_IRQ_HARD_DIS is set, and soft_enabled is unset. Without this, we get warnings such as arch/powerpc/kernel/time.c:300, and sometimes host kernel hangs. Signed-off-by: Scott Wood --- arch/powerpc/kvm/boo

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Scott Wood
On 05/09/2013 05:07:00 PM, Benjamin Herrenschmidt wrote: On Thu, 2013-05-09 at 16:27 -0500, Scott Wood wrote: > On 05/09/2013 07:37:42 AM, Benjamin Herrenschmidt wrote: > > On Thu, 2013-05-09 at 17:44 +0800, tiejun.chen wrote: > > > > > > Actually in the case GS=1 even if EE=0, EXT/DEC/DBELL stil

Re: [PATCH] powerpc/pci: Support per-aperture memory offset

2013-05-09 Thread Benjamin Herrenschmidt
On Thu, 2013-05-09 at 13:47 +, Sethi Varun-B16395 wrote: > [Sethi Varun-B16395] Tested patch on FSL T4240, P4080, P5040 and P1020 > boards. Thanks. Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/l

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Benjamin Herrenschmidt
On Thu, 2013-05-09 at 16:27 -0500, Scott Wood wrote: > On 05/09/2013 07:37:42 AM, Benjamin Herrenschmidt wrote: > > On Thu, 2013-05-09 at 17:44 +0800, tiejun.chen wrote: > > > > > > Actually in the case GS=1 even if EE=0, EXT/DEC/DBELL still occur > > as I > > > recall. > > > > Only if directed

AUTO: Michael Barry is out of the office (returning 13/05/2013)

2013-05-09 Thread Michael Barry
I am out of the office until 13/05/2013. Note: This is an automated response to your message "Linuxppc-dev Digest, Vol 105, Issue 55" sent on 09/05/2013 23:01:55. This is the only notification you will receive while this person is away. ___ Linuxp

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Benjamin Herrenschmidt
On Thu, 2013-05-09 at 14:28 +0100, David Laight wrote: > That will happen if the IRQ goes away while the cpu is performing > the IACK sequence. > If the IRQ goes away while the cpu has interrupts masked then > the cpu won't start the interrupt sequence and then try to > read a vector when no interr

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Scott Wood
On 05/09/2013 07:37:42 AM, Benjamin Herrenschmidt wrote: On Thu, 2013-05-09 at 17:44 +0800, tiejun.chen wrote: > > Actually in the case GS=1 even if EE=0, EXT/DEC/DBELL still occur as I > recall. Only if directed to the hypervisor. This is always the case with KVM, right? At least on booke

[PATCH] rapidio/switches: remove tsi500 driver

2013-05-09 Thread Alexandre Bounine
Remove the driver for Tsi500 Parallel RapidIO switch because this device is not available for several years. Since the first introduction of Tsi500, the parallel RapidIO interface was replaced by the serial RapidIO (sRIO) and therefore there is no value in keeping this driver. Signed-off-by: Alexa

RE: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Chen, Tiejun
> -Original Message- > From: Benjamin Herrenschmidt [mailto:b...@kernel.crashing.org] > Sent: Thursday, May 09, 2013 8:38 PM > To: Chen, Tiejun > Cc: Bhushan Bharat-R65777; Caraman Mihai Claudiu-B02008; Wood > Scott-B07421; linuxppc-dev@lists.ozlabs.org; ag...@suse.de; > kvm-...@vger.ker

RE: [PATCH] powerpc/pci: Support per-aperture memory offset

2013-05-09 Thread Sethi Varun-B16395
> -Original Message- > From: Benjamin Herrenschmidt [mailto:b...@kernel.crashing.org] > Sent: Monday, May 06, 2013 12:20 PM > To: linuxppc-dev > Cc: Kumar Gala; Wood Scott-B07421; Sethi Varun-B16395; Thomas Petazzoni; > Andrew Murray; Bjorn Helgaas; linux-...@vger.kernel.org > Subject: [P

RE: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread David Laight
> Some MPIC implementations tend to generate a spurrious IRQ in the case > of level IRQs going away. IE. they still remember an event occurred and > interrupt the processor, but on IACK return the spurious vector. However > that isn't guaranteed to be the case and it is perfectly ok (and a good > i

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Benjamin Herrenschmidt
On Thu, 2013-05-09 at 17:44 +0800, tiejun.chen wrote: > > Actually in the case GS=1 even if EE=0, EXT/DEC/DBELL still occur as I > recall. Only if directed to the hypervisor. > > Case 1) > > -> Local_irq_disable() will set soft_enabled = 0 > > -> Now Externel interrupt happens, there we set

RE: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-09 Thread Caraman Mihai Claudiu-B02008
> -Original Message- > From: tiejun.chen [mailto:tiejun.c...@windriver.com] > Sent: Thursday, May 09, 2013 2:40 PM > To: Caraman Mihai Claudiu-B02008 > Cc: Wood Scott-B07421; linuxppc-dev@lists.ozlabs.org; ag...@suse.de; kvm- > p...@vger.kernel.org; k...@vger.kernel.org > Subject: Re: [v1][

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Benjamin Herrenschmidt
On Thu, 2013-05-09 at 16:21 +0800, Kevin Hao wrote: > > Is it because that we cannot afford to lose perfmon interrupt for > more accurate capturing of data ? > > Yes, I think this will definitely improve the perf sample quality. This is one of the primary reason why we implemented lazy disabling

Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-09 Thread tiejun.chen
On 05/09/2013 07:34 PM, Caraman Mihai Claudiu-B02008 wrote: VF stands for virtualization fault see MAS8[VF] and we may use it for virtualized Looks KVM PPC have no this mechanism currently since I don't find MAS8_VF is used in kernel, right? Yes but 'we may use it' in the feature, I have a fu

Re: [PATCH 20/21] powerpc/ps3: remove inline marking of EXPORT_SYMBOL functions

2013-05-09 Thread Geoff Levand
On Thu, 2013-05-09 at 14:36 +0400, Denis Efremov wrote: > EXPORT_SYMBOL and inline directives are contradictory to each other. > The patch fixes this inconsistency. > > Found by Linux Driver Verification project (linuxtesting.org). > > Signed-off-by: Denis Efremov > --- > arch/powerpc/platforms

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 07:21 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: tiejun.chen [mailto:tiejun.c...@windriver.com] Sent: Thursday, May 09, 2013 3:48 PM To: Bhushan Bharat-R65777 Cc: Caraman Mihai Claudiu-B02008; Wood Scott-B07421; linuxppc- d...@lists.ozlabs.org; ag...@suse.d

RE: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-09 Thread Caraman Mihai Claudiu-B02008
> >> VF stands for virtualization fault see MAS8[VF] and we may use it for > virtualized > > Looks KVM PPC have no this mechanism currently since I don't find MAS8_VF > is > used in kernel, right? Yes but 'we may use it' in the feature, I have a functional POC with VF. Now we capture virtualized

RE: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Bhushan Bharat-R65777
> -Original Message- > From: tiejun.chen [mailto:tiejun.c...@windriver.com] > Sent: Thursday, May 09, 2013 3:48 PM > To: Bhushan Bharat-R65777 > Cc: Caraman Mihai Claudiu-B02008; Wood Scott-B07421; linuxppc- > d...@lists.ozlabs.org; ag...@suse.de; kvm-...@vger.kernel.org; > k...@vger.kern

[PATCH 20/21] powerpc/ps3: remove inline marking of EXPORT_SYMBOL functions

2013-05-09 Thread Denis Efremov
EXPORT_SYMBOL and inline directives are contradictory to each other. The patch fixes this inconsistency. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Denis Efremov --- arch/powerpc/platforms/ps3/spu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

Re: [PATCH] powerpc/fsl: add property 'reg' to pcie@0 node

2013-05-09 Thread Kevin Hao
On Wed, May 08, 2013 at 05:17:21PM +0800, Minghuan Lian wrote: > The property 'reg' is used to identify the PCIe device. if there is > no 'reg' the PCI driver can not find PCI device node corresponding > to PCI controller, and can not map the interrupts. So all the INTx > interrupts can not be used

Re: [v1][KVM][PATCH 1/1] kvm:ppc:booehv: direct ISI exception to Guest

2013-05-09 Thread tiejun.chen
On 05/08/2013 05:28 PM, tiejun.chen wrote: On 05/08/2013 05:20 PM, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of tiejun.chen Sent: Wednesday, May 08, 2013 4:54 AM To: Wood Scott-B07421 Cc: ag...@suse

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 06:00 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: tiejun.chen [mailto:tiejun.c...@windriver.com] Sent: Thursday, May 09, 2013 3:15 PM To: Bhushan Bharat-R65777 Cc: Caraman Mihai Claudiu-B02008; Wood Scott-B07421; linuxppc- d...@lists.ozlabs.org; ag...@suse.d

RE: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Bhushan Bharat-R65777
> -Original Message- > From: tiejun.chen [mailto:tiejun.c...@windriver.com] > Sent: Thursday, May 09, 2013 3:15 PM > To: Bhushan Bharat-R65777 > Cc: Caraman Mihai Claudiu-B02008; Wood Scott-B07421; linuxppc- > d...@lists.ozlabs.org; ag...@suse.de; kvm-...@vger.kernel.org; > k...@vger.kern

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 04:23 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Caraman Mihai Claudiu-B02008 Sent: Wednesday, May 08, 2013 6:44 PM To: Wood Scott-B07421; tiejun.chen Cc:

[PATCH] powerpc/fsl: add property 'reg' to pcie@0 node

2013-05-09 Thread Minghuan Lian
The property 'reg' is used to identify the PCIe device. if there is no 'reg' the PCI driver can not find PCI device node corresponding to PCI controller, and can not map the interrupts. So all the INTx interrupts can not be used. Signed-off-by: Minghuan Lian --- arch/powerpc/boot/dts/fsl/b4si-po

RE: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Bhushan Bharat-R65777
> -Original Message- > From: tiejun.chen [mailto:tiejun.c...@windriver.com] > Sent: Thursday, May 09, 2013 1:48 PM > To: Bhushan Bharat-R65777 > Cc: Kevin Hao; Caraman Mihai Claudiu-B02008; k...@vger.kernel.org; Wood Scott- > B07421; ag...@suse.de; kvm-...@vger.kernel.org; linuxppc-dev@li

RE: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Bhushan Bharat-R65777
> -Original Message- > From: Linuxppc-dev [mailto:linuxppc-dev- > bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Caraman > Mihai Claudiu-B02008 > Sent: Wednesday, May 08, 2013 6:44 PM > To: Wood Scott-B07421; tiejun.chen > Cc: linuxppc-dev@lists.ozlabs.org; ag...@suse

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Kevin Hao
On Thu, May 09, 2013 at 08:12:51AM +, Bhushan Bharat-R65777 wrote: > > > > -Original Message- > > From: Kevin Hao [mailto:haoke...@gmail.com] > > Sent: Thursday, May 09, 2013 1:38 PM > > To: Bhushan Bharat-R65777 > > Cc: tiejun.chen; Caraman Mihai Claudiu-B02008; k...@vger.kernel.org;

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 04:12 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Kevin Hao [mailto:haoke...@gmail.com] Sent: Thursday, May 09, 2013 1:38 PM To: Bhushan Bharat-R65777 Cc: tiejun.chen; Caraman Mihai Claudiu-B02008; k...@vger.kernel.org; Wood Scott- B07421; ag...@suse.de; kvm

RE: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Bhushan Bharat-R65777
> -Original Message- > From: Kevin Hao [mailto:haoke...@gmail.com] > Sent: Thursday, May 09, 2013 1:38 PM > To: Bhushan Bharat-R65777 > Cc: tiejun.chen; Caraman Mihai Claudiu-B02008; k...@vger.kernel.org; Wood > Scott- > B07421; ag...@suse.de; kvm-...@vger.kernel.org; linuxppc-dev@lists.

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Kevin Hao
On Thu, May 09, 2013 at 07:51:09AM +, Bhushan Bharat-R65777 wrote: > > > > -Original Message- > > From: tiejun.chen [mailto:tiejun.c...@windriver.com] > > Sent: Thursday, May 09, 2013 1:18 PM > > To: Bhushan Bharat-R65777 > > Cc: Caraman Mihai Claudiu-B02008; Wood Scott-B07421; linuxp

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 03:51 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: tiejun.chen [mailto:tiejun.c...@windriver.com] Sent: Thursday, May 09, 2013 1:18 PM To: Bhushan Bharat-R65777 Cc: Caraman Mihai Claudiu-B02008; Wood Scott-B07421; linuxppc- d...@lists.ozlabs.org; ag...@suse.d

RE: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Bhushan Bharat-R65777
> -Original Message- > From: tiejun.chen [mailto:tiejun.c...@windriver.com] > Sent: Thursday, May 09, 2013 1:18 PM > To: Bhushan Bharat-R65777 > Cc: Caraman Mihai Claudiu-B02008; Wood Scott-B07421; linuxppc- > d...@lists.ozlabs.org; ag...@suse.de; kvm-...@vger.kernel.org; > k...@vger.kern

Re: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread tiejun.chen
On 05/09/2013 03:33 PM, Bhushan Bharat-R65777 wrote: -Original Message- From: Linuxppc-dev [mailto:linuxppc-dev- bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Caraman Mihai Claudiu-B02008 Sent: Wednesday, May 08, 2013 6:44 PM To: Wood Scott-B07421; tiejun.chen Cc:

RE: [RFC][KVM][PATCH 1/1] kvm:ppc:booke-64: soft-disable interrupts

2013-05-09 Thread Bhushan Bharat-R65777
> -Original Message- > From: Linuxppc-dev [mailto:linuxppc-dev- > bounces+bharat.bhushan=freescale@lists.ozlabs.org] On Behalf Of Caraman > Mihai Claudiu-B02008 > Sent: Wednesday, May 08, 2013 6:44 PM > To: Wood Scott-B07421; tiejun.chen > Cc: linuxppc-dev@lists.ozlabs.org; ag...@suse