Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-04-26 Thread Purcareata Bogdan
On 24.04.2015 00:26, Scott Wood wrote: On Thu, 2015-04-23 at 15:31 +0300, Purcareata Bogdan wrote: On 23.04.2015 03:30, Scott Wood wrote: On Wed, 2015-04-22 at 15:06 +0300, Purcareata Bogdan wrote: On 21.04.2015 03:52, Scott Wood wrote: On Mon, 2015-04-20 at 13:53 +0300, Purcareata Bogdan wro

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-04-23 Thread Scott Wood
On Thu, 2015-04-23 at 15:31 +0300, Purcareata Bogdan wrote: > On 23.04.2015 03:30, Scott Wood wrote: > > On Wed, 2015-04-22 at 15:06 +0300, Purcareata Bogdan wrote: > >> On 21.04.2015 03:52, Scott Wood wrote: > >>> On Mon, 2015-04-20 at 13:53 +0300, Purcareata Bogdan wrote: > There was a weird

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-04-23 Thread Purcareata Bogdan
On 23.04.2015 03:30, Scott Wood wrote: On Wed, 2015-04-22 at 15:06 +0300, Purcareata Bogdan wrote: On 21.04.2015 03:52, Scott Wood wrote: On Mon, 2015-04-20 at 13:53 +0300, Purcareata Bogdan wrote: There was a weird situation for .kvmppc_mpic_set_epr - its corresponding inner function is kvmpp

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-04-22 Thread Scott Wood
On Wed, 2015-04-22 at 15:06 +0300, Purcareata Bogdan wrote: > On 21.04.2015 03:52, Scott Wood wrote: > > On Mon, 2015-04-20 at 13:53 +0300, Purcareata Bogdan wrote: > >> There was a weird situation for .kvmppc_mpic_set_epr - its corresponding > >> inner > >> function is kvmppc_set_epr, which is a

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-04-22 Thread Purcareata Bogdan
On 21.04.2015 03:52, Scott Wood wrote: On Mon, 2015-04-20 at 13:53 +0300, Purcareata Bogdan wrote: There was a weird situation for .kvmppc_mpic_set_epr - its corresponding inner function is kvmppc_set_epr, which is a static inline. Removing the static inline yields a compiler crash (Segmentation

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-04-20 Thread Scott Wood
On Mon, 2015-04-20 at 13:53 +0300, Purcareata Bogdan wrote: > On 10.04.2015 02:53, Scott Wood wrote: > > On Thu, 2015-04-09 at 10:44 +0300, Purcareata Bogdan wrote: > >> So at this point I was getting kinda frustrated so I decided to measure > >> the time spend in kvm_mpic_write and kvm_mpic_read.

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-04-20 Thread Purcareata Bogdan
On 10.04.2015 02:53, Scott Wood wrote: On Thu, 2015-04-09 at 10:44 +0300, Purcareata Bogdan wrote: So at this point I was getting kinda frustrated so I decided to measure the time spend in kvm_mpic_write and kvm_mpic_read. I assumed these were the main entry points in the in-kernel MPIC and were

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-04-09 Thread Purcareata Bogdan
On 04.04.2015 00:26, Scott Wood wrote: On Fri, 2015-04-03 at 11:07 +0300, Purcareata Bogdan wrote: On 03.04.2015 02:11, Scott Wood wrote: On Fri, 2015-03-27 at 19:07 +0200, Purcareata Bogdan wrote: On 27.02.2015 03:05, Scott Wood wrote: On Thu, 2015-02-26 at 14:31 +0100, Sebastian Andrzej Sie

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-04-03 Thread Scott Wood
On Fri, 2015-04-03 at 11:07 +0300, Purcareata Bogdan wrote: > On 03.04.2015 02:11, Scott Wood wrote: > > On Fri, 2015-03-27 at 19:07 +0200, Purcareata Bogdan wrote: > >> On 27.02.2015 03:05, Scott Wood wrote: > >>> On Thu, 2015-02-26 at 14:31 +0100, Sebastian Andrzej Siewior wrote: > On 02/26/

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-04-03 Thread Purcareata Bogdan
On 03.04.2015 02:11, Scott Wood wrote: On Fri, 2015-03-27 at 19:07 +0200, Purcareata Bogdan wrote: On 27.02.2015 03:05, Scott Wood wrote: On Thu, 2015-02-26 at 14:31 +0100, Sebastian Andrzej Siewior wrote: On 02/26/2015 02:02 PM, Paolo Bonzini wrote: On 24/02/2015 00:27, Scott Wood wrote:

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-04-02 Thread Scott Wood
On Fri, 2015-03-27 at 19:07 +0200, Purcareata Bogdan wrote: > On 27.02.2015 03:05, Scott Wood wrote: > > On Thu, 2015-02-26 at 14:31 +0100, Sebastian Andrzej Siewior wrote: > >> On 02/26/2015 02:02 PM, Paolo Bonzini wrote: > >>> > >>> > >>> On 24/02/2015 00:27, Scott Wood wrote: > This isn't a

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-03-27 Thread Purcareata Bogdan
On 27.02.2015 03:05, Scott Wood wrote: On Thu, 2015-02-26 at 14:31 +0100, Sebastian Andrzej Siewior wrote: On 02/26/2015 02:02 PM, Paolo Bonzini wrote: On 24/02/2015 00:27, Scott Wood wrote: This isn't a host PIC driver. It's guest PIC emulation, some of which is indeed not suitable for a r

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-27 Thread Paolo Bonzini
On 27/02/2015 02:05, Scott Wood wrote: > Obviously leaving it in a buggy state is not what we want -- but I lean > towards a short term "fix" of putting "depends on !PREEMPT_RT" on the > in-kernel MPIC emulation (which is itself just an optimization -- you > can still use KVM without it). This w

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-26 Thread Scott Wood
On Thu, 2015-02-26 at 14:31 +0100, Sebastian Andrzej Siewior wrote: > On 02/26/2015 02:02 PM, Paolo Bonzini wrote: > > > > > > On 24/02/2015 00:27, Scott Wood wrote: > >> This isn't a host PIC driver. It's guest PIC emulation, some of which > >> is indeed not suitable for a rawlock (in particula

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-26 Thread Sebastian Andrzej Siewior
On 02/26/2015 02:02 PM, Paolo Bonzini wrote: > > > On 24/02/2015 00:27, Scott Wood wrote: >> This isn't a host PIC driver. It's guest PIC emulation, some of which >> is indeed not suitable for a rawlock (in particular, openpic_update_irq >> which loops on the number of vcpus, with a loop body th

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-26 Thread Paolo Bonzini
On 24/02/2015 00:27, Scott Wood wrote: > This isn't a host PIC driver. It's guest PIC emulation, some of which > is indeed not suitable for a rawlock (in particular, openpic_update_irq > which loops on the number of vcpus, with a loop body that calls > IRQ_check() which loops over all pending IR

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-25 Thread Sebastian Andrzej Siewior
* Scott Wood | 2015-02-23 17:27:31 [-0600]: >This isn't a host PIC driver. It's guest PIC emulation, some of which >is indeed not suitable for a rawlock (in particular, openpic_update_irq >which loops on the number of vcpus, with a loop body that calls >IRQ_check() which loops over all pending IR

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-23 Thread Scott Wood
On Fri, 2015-02-20 at 15:54 +0100, Sebastian Andrzej Siewior wrote: > On 02/20/2015 03:12 PM, Paolo Bonzini wrote: > >> Thomas, what is the usual approach for patches like this? Do you take > >> them into your rt tree or should they get integrated to upstream? > > > > Patch 1 is definitely suitabl

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-23 Thread Purcareata Bogdan
On 20.02.2015 17:17, Sebastian Andrzej Siewior wrote: On 02/20/2015 04:10 PM, Paolo Bonzini wrote: On 20/02/2015 16:06, Sebastian Andrzej Siewior wrote: On 02/20/2015 03:57 PM, Paolo Bonzini wrote: Yes, but large latencies just mean the code has to be rewritten (x86 doesn't anymore do event

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-22 Thread Purcareata Bogdan
On 20.02.2015 17:06, Sebastian Andrzej Siewior wrote: On 02/20/2015 03:57 PM, Paolo Bonzini wrote: On 20/02/2015 15:54, Sebastian Andrzej Siewior wrote: Usually you see "scheduling while atomic" on -RT and convert them to raw locks if it is appropriate. Bogdan wrote in 2/2 that he needs to l

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-22 Thread Purcareata Bogdan
On 20.02.2015 16:54, Sebastian Andrzej Siewior wrote: On 02/20/2015 03:12 PM, Paolo Bonzini wrote: Thomas, what is the usual approach for patches like this? Do you take them into your rt tree or should they get integrated to upstream? Patch 1 is definitely suitable for upstream, that's the rea

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-20 Thread Sebastian Andrzej Siewior
On 02/20/2015 04:10 PM, Paolo Bonzini wrote: > On 20/02/2015 16:06, Sebastian Andrzej Siewior wrote: >> On 02/20/2015 03:57 PM, Paolo Bonzini wrote: > >>> Yes, but large latencies just mean the code has to be rewritten (x86 >>> doesn't anymore do event injection in an atomic regions for example).

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-20 Thread Paolo Bonzini
On 20/02/2015 16:06, Sebastian Andrzej Siewior wrote: > On 02/20/2015 03:57 PM, Paolo Bonzini wrote: >> Yes, but large latencies just mean the code has to be rewritten (x86 >> doesn't anymore do event injection in an atomic regions for example). >> Until it is, using raw_spin_lock is correct. >

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-20 Thread Sebastian Andrzej Siewior
On 02/20/2015 03:57 PM, Paolo Bonzini wrote: > > > On 20/02/2015 15:54, Sebastian Andrzej Siewior wrote: >> Usually you see "scheduling while atomic" on -RT and convert them to >> raw locks if it is appropriate. >> >> Bogdan wrote in 2/2 that he needs to limit the number of CPUs in oder >> not ca

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-20 Thread Paolo Bonzini
On 20/02/2015 15:54, Sebastian Andrzej Siewior wrote: > Usually you see "scheduling while atomic" on -RT and convert them to > raw locks if it is appropriate. > > Bogdan wrote in 2/2 that he needs to limit the number of CPUs in oder > not cause a DoS and large latencies in the host. I haven't se

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-20 Thread Sebastian Andrzej Siewior
On 02/20/2015 03:12 PM, Paolo Bonzini wrote: >> Thomas, what is the usual approach for patches like this? Do you take >> them into your rt tree or should they get integrated to upstream? > > Patch 1 is definitely suitable for upstream, that's the reason why we > have raw_spin_lock vs. raw_spin_unl

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-20 Thread Alexander Graf
On 20.02.15 15:12, Paolo Bonzini wrote: > > > On 20/02/2015 14:45, Alexander Graf wrote: >> >> >> On 18.02.15 10:32, Bogdan Purcareata wrote: >>> This patchset enables running KVM SMP guests with external interrupts on an >>> underlying RT-enabled Linux. Previous to this patch, a guest with in-

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-20 Thread Paolo Bonzini
On 20/02/2015 14:45, Alexander Graf wrote: > > > On 18.02.15 10:32, Bogdan Purcareata wrote: >> This patchset enables running KVM SMP guests with external interrupts on an >> underlying RT-enabled Linux. Previous to this patch, a guest with in-kernel >> MPIC >> emulation could easily panic the

Re: [PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-20 Thread Alexander Graf
On 18.02.15 10:32, Bogdan Purcareata wrote: > This patchset enables running KVM SMP guests with external interrupts on an > underlying RT-enabled Linux. Previous to this patch, a guest with in-kernel > MPIC > emulation could easily panic the kernel due to preemption when delivering IPIs > and ex

[PATCH 0/2] powerpc/kvm: Enable running guests on RT Linux

2015-02-18 Thread Bogdan Purcareata
This patchset enables running KVM SMP guests with external interrupts on an underlying RT-enabled Linux. Previous to this patch, a guest with in-kernel MPIC emulation could easily panic the kernel due to preemption when delivering IPIs and external interrupts, because of the openpic spinlock becomi