[PATCH v2 0/2] guard virt_spin_lock() with a static key

2017-09-06 Thread Juergen Gross
metal behavior. V2: - use static key instead of making virt_spin_lock() a pvops function Juergen Gross (2): paravirt/locks: use new static key for controlling call of virt_spin_lock() paravirt,xen: correct xen_nopvspin case arch/x86/include/asm/qspinlock.h | 11 +++ arch/x86

Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Juergen Gross
On 05/09/17 16:31, Waiman Long wrote: > On 09/05/2017 10:24 AM, Waiman Long wrote: >> On 09/05/2017 10:18 AM, Juergen Gross wrote: >>> On 05/09/17 16:10, Waiman Long wrote: >>>> On 09/05/2017 09:24 AM, Juergen Gross wrote: >>>>> There are cases where a

[PATCH] paravirt: switch maintainer

2017-09-05 Thread Juergen Gross
Jeremy Fitzhardinge is stepping down as a paravirt maintainer. I'll replace him. While at it, update the file list to the actual pattern. Signed-off-by: Juergen Gross <jgr...@suse.com> --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAI

Re: [PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Juergen Gross
On 05/09/17 15:55, Peter Zijlstra wrote: > On Tue, Sep 05, 2017 at 03:24:43PM +0200, Juergen Gross wrote: >> diff --git a/arch/x86/include/asm/qspinlock.h >> b/arch/x86/include/asm/qspinlock.h >> index 48a706f641f2..fbd98896385c 100644 >> --- a/arch/x86/include/asm/qs

[PATCH 4/4] paravirt,xen: correct xen_nopvspin case

2017-09-05 Thread Juergen Gross
d this set the virt_spin_lock pvops function to _paravirt_false() in case xen_nopvspin has been specified. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/spinlock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c in

[PATCH 2/4] paravirt: switch vcpu_is_preempted to use _paravirt_false() on bare metal

2017-09-05 Thread Juergen Gross
Instead of special casing pv_lock_ops.vcpu_is_preempted when patching use _paravirt_false() on bare metal. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/kernel/paravirt-spinlocks.c | 14 +- arch/x86/kernel/paravirt_patch_32.c | 10 -- arch/x86/

[PATCH 1/4] paravirt: add generic _paravirt_false() function

2017-09-05 Thread Juergen Gross
Add a _paravirt_false() default function returning always false which can be used for cases where a boolean pvops replacement should just say "no". Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/paravirt_types.h | 2 ++ arch/x86/kernel/paravirt.

[PATCH 3/4] paravirt: add virt_spin_lock pvops function

2017-09-05 Thread Juergen Gross
ent. Make virt_spin_lock() a paravirt operation in order to enable users to select an explicit behavior like bare metal. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/paravirt.h | 5 arch/x86/include/asm/paravirt_types.h | 1 + arch/x86/include/asm/qspin

[PATCH 0/4] make virt_spin_lock() a pvops function

2017-09-05 Thread Juergen Gross
behavior. Juergen Gross (4): paravirt: add generic _paravirt_false() function paravirt: switch vcpu_is_preempted to use _paravirt_false() on bare metal paravirt: add virt_spin_lock pvops function paravirt,xen: correct xen_nopvspin case arch/x86/include/asm/paravirt.h | 5 arch

[PATCH] x86/paravirt: remove no longer used paravirt functions

2017-09-04 Thread Juergen Gross
With removal of lguest some of the paravirt functions are no longer needed. Remove them. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/desc.h | 3 +-- arch/x86/include/asm/paravirt.h | 37 --- arch/x86/inclu

Re: [RFC PATCH v2 1/7] x86/paravirt: Add pv_idle_ops to paravirt ops

2017-08-30 Thread Juergen Gross
On 29/08/17 15:55, Konrad Rzeszutek Wilk wrote: > On Tue, Aug 29, 2017 at 11:46:35AM +, Yang Zhang wrote: >> So far, pv_idle_ops.poll is the only ops for pv_idle. .poll is called in >> idle path which will polling for a while before we enter the real idle >> state. >> >> In virtualization,

Re: [PATCH 05/10] paravirt: add new PARAVIRT_FULL config item

2017-05-24 Thread Juergen Gross
On 24/05/17 17:40, Boris Ostrovsky wrote: > On 05/19/2017 11:47 AM, Juergen Gross wrote: >> Add a new config item PARAVIRT_FULL. It will be used to guard the >> pv_*_ops functions used by fully paravirtualized guests (Xen pv-guests >> and lguest) only. >> >> K

Re: [PATCH 00/10] paravirt: make amount of paravirtualization configurable

2017-05-23 Thread Juergen Gross
On 22/05/17 21:42, Boris Ostrovsky wrote: > >> 49 files changed, 1548 insertions(+), 1477 deletions(-) >> create mode 100644 arch/x86/include/asm/paravirt_full.h >> create mode 100644 arch/x86/include/asm/paravirt_types_full.h >> create mode 100644 arch/x86/kernel/paravirt_full.c > > > Do

[PATCH 08/10] paravirt: split pv_mmu_ops for support of PARAVIRT_FULL

2017-05-19 Thread Juergen Gross
Move functions needed for fully paravirtualized guests only into a new structure pvfull_mmu_ops in paravirt_types_full.h, paravirt_full.h and the associated vector into paravirt_full.c. .flush_tlb_others is left in pv_mmu_ops as hyperv support will use it soon. Signed-off-by: Juergen Gross <

[PATCH 06/10] paravirt: split pv_cpu_ops for support of PARAVIRT_FULL

2017-05-19 Thread Juergen Gross
Move functions needed for fully paravirtualized guests only into a new structure pvfull_cpu_ops in paravirt_types_full.h, paravirt_full.h and the associated vector into paravirt_full.c. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/entry/entry_64.S | 4 +-

[PATCH 10/10] paravirt: merge pv_ops_* structures into one

2017-05-19 Thread Juergen Gross
As there are now only very few pvops functions left when CONFIG_PARAVIRT_FULL isn't set, merge the related structures into one named "pv_ops". Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/paravirt.h | 32 arch

[PATCH 07/10] paravirt: split pv_irq_ops for support of PARAVIRT_FULL

2017-05-19 Thread Juergen Gross
Move functions needed for fully paravirtualized guests only into a new structure pvfull_irq_ops in paravirt_types_full.h, paravirt_full.h and the associated vector into paravirt_full.c. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/irqflags.h

[PATCH 09/10] paravirt: split pv_info for support of PARAVIRT_FULL

2017-05-19 Thread Juergen Gross
Move members needed for fully paravirtualized guests only into a new structure pvfull_info in paravirt_types_full.h, paravirt_full.h and the associated vector into paravirt_full.c. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/boot/compressed/misc.h | 1 + ar

[PATCH 00/10] paravirt: make amount of paravirtualization configurable

2017-05-19 Thread Juergen Gross
and LGUEST_GUEST config options. The series has been tested for 32 and 64 bit kernels without PARAVIRT, with PARAVIRT, and with PARAVIRT + PARAVIRT_FULL configured. Juergen Gross (10): x86: remove stale prototype from arch/x86/include/asm/pgalloc.h paravirt: remove unused function paravirt_disable_iospace

[PATCH 05/10] paravirt: add new PARAVIRT_FULL config item

2017-05-19 Thread Juergen Gross
6/kernel/paravirt_full.c new file mode 100644 index ..0c7de64129c5 --- /dev/null +++ b/arch/x86/kernel/paravirt_full.c @@ -0,0 +1,16 @@ +/* +Paravirtualization interfaces for fully paravirtualized guests +Copyright (C) 2017 Juergen Gross SUSE Linux GmbH + +This program i

[PATCH 03/10] xen: move interrupt handling for pv guests under CONFIG_XEN_PV umbrella

2017-05-19 Thread Juergen Gross
There is no need to include pv-guest only object files in a kernel not configured to support those. Move Xen's irq.o, xen-asm*.o and pv parts of entry_*.o into CONFIG_XEN_PV sections. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/entry/entry_32.S | 4 +++- arch/x86/entry/entr

[PATCH 04/10] xen: remove non-pv test from arch/x86/xen/irq.c

2017-05-19 Thread Juergen Gross
As arch/x86/xen/irq.c is used for pv-guests only, there is no need to have a test targeting a HVM guest in it. Remove it. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/irq.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/xen/irq.c b/arch/x

[PATCH 02/10] paravirt: remove unused function paravirt_disable_iospace()

2017-05-19 Thread Juergen Gross
paravirt_disable_iospace() isn't used anywhere. Remove it. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/paravirt_types.h | 2 -- arch/x86/kernel/paravirt.c| 19 --- 2 files changed, 21 deletions(-) diff --git a/arch/x86/inclu

[PATCH 01/10] x86: remove stale prototype from arch/x86/include/asm/pgalloc.h

2017-05-19 Thread Juergen Gross
paravirt_alloc_pmd_clone() doesn't exist anywhere. Remove its prototype. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/pgalloc.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/include/asm/pgalloc.h b/arch/x86/include/asm/pgalloc.h index b2d0cd

Re: Support of lguest?

2017-05-15 Thread Juergen Gross
On 15/05/17 16:22, Vitaly Kuznetsov wrote: > Juergen Gross <jgr...@suse.com> writes: > >> Lguest and Xen pv-guests are the only users of pv_mmu_ops (with the >> one exception of the .exit_mmap member, which is being used by Xen >> HVM-guests, too). >> >&g

Support of lguest?

2017-05-15 Thread Juergen Gross
Lguest and Xen pv-guests are the only users of pv_mmu_ops (with the one exception of the .exit_mmap member, which is being used by Xen HVM-guests, too). As it is possible now to build a kernel without Xen pv-guest support while keeping PVH and PVHVM support, I thought about putting most

[PATCH v3 10/11] vmware: set cpu capabilities during platform initialization

2017-04-18 Thread Juergen Gross
quot; <h...@zytor.com> Cc: x...@kernel.org Cc: virtualization@lists.linux-foundation.org Signed-off-by: Juergen Gross <jgr...@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrov...@oracle.com> Acked-by: Alok Kataria <akata...@vmware.com> --- arch/x86/kernel/cpu/vmware.c | 39 +++

[PATCH v3 00/11] x86: xen cpuid() cleanup

2017-04-18 Thread Juergen Gross
rg Cc: virtualization@lists.linux-foundation.org Juergen Gross (11): xen: set cpu capabilities from xen_start_kernel() x86/xen: don't indicate DCA support in pv domains x86/xen: use capabilities instead of fake cpuid values for aperf x86/xen: use capabilities instead of fake cpuid values for mtrr

[PATCH v2 00/11] x86: xen cpuid() cleanup

2017-04-13 Thread Juergen Gross
com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: Ingo Molnar <mi...@redhat.com> Cc: "H. Peter Anvin" <h...@zytor.com> Cc: x...@kernel.org Cc: virtualization@lists.linux-foundation.org Juergen Gross (11): xen: set cpu capabilities from xen_start_kernel() x86/xen

[PATCH v2 10/11] vmware: set cpu capabilities during platform initialization

2017-04-13 Thread Juergen Gross
quot; <h...@zytor.com> Cc: x...@kernel.org Cc: virtualization@lists.linux-foundation.org Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/kernel/cpu/vmware.c | 39 --- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/arch/x86/k

Re: [PATCH 2/5] stop_machine: yield CPU during stop machine

2016-10-21 Thread Juergen Gross
On 21/10/16 14:05, Peter Zijlstra wrote: > On Fri, Oct 21, 2016 at 01:58:55PM +0200, Christian Borntraeger wrote: >> stop_machine can take a very long time if the hypervisor does >> overcommitment for guest CPUs. When waiting for "the one", lets >> give up our CPU by using the new cpu_relax_yield.

Re: [PATCH v5 7/9] x86, xen: support vcpu preempted check

2016-10-20 Thread Juergen Gross
Corrected xen-devel mailing list address, added other Xen maintainers On 20/10/16 23:27, Pan Xinhui wrote: > From: Juergen Gross <jgr...@suse.com> > > Support the vcpu_is_preempted() functionality under Xen. This will > enhance lock performance on overcommitted hosts (more run

Re: [PATCH v4 0/5] implement vcpu preempted check

2016-10-19 Thread Juergen Gross
3.0 lps | 10419979.0 lps > > Pan Xinhui (5): > kernel/sched: introduce vcpu preempted check interface > locking/osq: Drop the overload of osq_lock() > kernel/locking: Drop the overload of {mutex,rwsem}_spin_on_owner > powerpc/spinlock: support vcpu preempted check > x

[PATCH] virtio: remove config.c

2016-10-11 Thread Juergen Gross
Remove unused file config.c Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/virtio/config.c | 12 1 file changed, 12 deletions(-) delete mode 100644 drivers/virtio/config.c diff --git a/drivers/virtio/config.c b/drivers/virtio/config.c deleted file mode 100644

[PATCH v6 2/6] virt, sched: add generic vcpu pinning support

2016-08-29 Thread Juergen Gross
Add generic virtualization support for pinning the current vcpu to a specified physical cpu. As this operation isn't performance critical (a very limited set of operations like BIOS calls and SMIs is expected to need this) just add a hypervisor specific indirection. Signed-off-by: Juergen Gross

[PATCH v6 1/6] xen: sync xen header

2016-08-29 Thread Juergen Gross
Import the actual version of include/xen/interface/sched.h from Xen. Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: David Vrabel <david.vra...@citrix.com> --- include/xen/interface/sched.h | 100 ++ 1 file changed, 82 insertions(+),

[PATCH v6 4/6] xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu

2016-08-29 Thread Juergen Gross
or the hypervisor isn't supporting it, issue a warning once and disable further pinning attempts. Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: David Vrabel <david.vra...@citrix.com> --- V5: less wordy messages as requested by David Vrabel --- arch/x86/xen/enli

[PATCH v6 6/6] hwmon: use smp_call_on_cpu() for dell-smm i8k

2016-08-29 Thread Juergen Gross
Use the smp_call_on_cpu() function to call system management mode on cpu 0. Make call secure by adding get_online_cpus() to avoid e.g. suspend resume cycles in between. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: add call to get_online_cpus() --- drivers/hwmon/dell-smm-hwmon.

[PATCH v6 3/6] smp: add function to execute a function synchronously on a cpu

2016-08-29 Thread Juergen Gross
special measures in virtualized environments like Xen, too. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V5: rename and reshuffle parameters of smp_call_on_cpu() as requested by Peter Zijlstra test target cpu to be online as requested by Peter Zijlstra V4: change return value i

[PATCH v6 5/6] dcdbas: make use of smp_call_on_cpu()

2016-08-29 Thread Juergen Gross
Use smp_call_on_cpu() to raise SMI on cpu 0. Make call secure by adding get_online_cpus() to avoid e.g. suspend resume cycles in between. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: add call to get_online_cpus() --- drivers/firmware/dcdbas.

[PATCH v6 0/6] Support calling functions on dedicated physical cpu

2016-08-29 Thread Juergen Gross
architecture specific stuff from generic kernel code Juergen Gross (6): xen: sync xen header virt, sched: add generic vcpu pinning support smp: add function to execute a function synchronously on a cpu xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu dcdbas: make

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-11 Thread Juergen Gross
On 11/07/16 17:10, Waiman Long wrote: > On 07/06/2016 02:52 AM, Peter Zijlstra wrote: >> On Tue, Jun 28, 2016 at 10:43:07AM -0400, Pan Xinhui wrote: >>> change fomr v1: >>> a simplier definition of default vcpu_is_preempted >>> skip mahcine type check on ppc, and add config. remove

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Juergen Gross
On 06/07/16 10:19, Peter Zijlstra wrote: > On Wed, Jul 06, 2016 at 09:47:18AM +0200, Juergen Gross wrote: >> On 06/07/16 08:52, Peter Zijlstra wrote: > >>> Paolo, could you help out with an (x86) KVM interface for this? >> >> Xen support of this interface should

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Juergen Gross
On 06/07/16 08:52, Peter Zijlstra wrote: > On Tue, Jun 28, 2016 at 10:43:07AM -0400, Pan Xinhui wrote: >> change fomr v1: >> a simplier definition of default vcpu_is_preempted >> skip mahcine type check on ppc, and add config. remove dedicated macro. >> add one patch to drop

Re: [PATCH v5 0/6] Support calling functions on dedicated physical cpu

2016-06-27 Thread Juergen Gross
On 06/04/16 16:17, Juergen Gross wrote: > Some hardware (e.g. Dell Studio laptops) require special functions to > be called on physical cpu 0 in order to avoid occasional hangs. When > running as dom0 under Xen this could be achieved only via special boot > parameters (vcpu pinni

Re: [PATCH v5 0/6] Support calling functions on dedicated physical cpu

2016-06-20 Thread Juergen Gross
On 06/04/16 16:17, Juergen Gross wrote: > Some hardware (e.g. Dell Studio laptops) require special functions to > be called on physical cpu 0 in order to avoid occasional hangs. When > running as dom0 under Xen this could be achieved only via special boot > parameters (vcpu pinni

Re: [PATCH v5 2/6] virt, sched: add generic vcpu pinning support

2016-06-15 Thread Juergen Gross
On 06/04/16 16:17, Juergen Gross wrote: Add generic virtualization support for pinning the current vcpu to a specified physical cpu. As this operation isn't performance critical (a very limited set of operations like BIOS calls and SMIs is expected to need this) just add a hypervisor specific

Re: [PATCH v5 5/6] dcdbas: make use of smp_call_on_cpu()

2016-06-15 Thread Juergen Gross
On 06/04/16 16:17, Juergen Gross wrote: Use smp_call_on_cpu() to raise SMI on cpu 0. Make call secure by adding get_online_cpus() to avoid e.g. suspend resume cycles in between. Signed-off-by: Juergen Gross <jgr...@suse.com> Could please some maintainer comment on this patch? J

Re: [PATCH v5 0/6] Support calling functions on dedicated physical cpu

2016-05-17 Thread Juergen Gross
On 13/04/16 10:49, Juergen Gross wrote: > On 06/04/16 16:17, Juergen Gross wrote: >> Some hardware (e.g. Dell Studio laptops) require special functions to >> be called on physical cpu 0 in order to avoid occasional hangs. When >> running as dom0 under Xen this could be achi

Re: [PATCH v4 6/6] hwmon: use smp_call_on_cpu() for dell-smm i8k

2016-05-09 Thread Juergen Gross
On 21/04/16 15:27, Pali Rohár wrote: > On Thursday 21 April 2016 15:12:52 Juergen Gross wrote: >> On 21/04/16 12:57, Pali Rohár wrote: >>> On Tuesday 05 April 2016 21:31:52 Pali Rohár wrote: >>>> On Tuesday 05 April 2016 16:54:14 Guenter Roeck wrote: >>>>

Re: [PATCH v4 6/6] hwmon: use smp_call_on_cpu() for dell-smm i8k

2016-04-21 Thread Juergen Gross
On 21/04/16 12:57, Pali Rohár wrote: > On Tuesday 05 April 2016 21:31:52 Pali Rohár wrote: >> On Tuesday 05 April 2016 16:54:14 Guenter Roeck wrote: >>> On Tue, Apr 05, 2016 at 07:10:07AM +0200, Juergen Gross wrote: >>>> Use the smp_call_on_cpu() function to call syst

Re: [PATCH v5 0/6] Support calling functions on dedicated physical cpu

2016-04-13 Thread Juergen Gross
On 06/04/16 16:17, Juergen Gross wrote: > Some hardware (e.g. Dell Studio laptops) require special functions to > be called on physical cpu 0 in order to avoid occasional hangs. When > running as dom0 under Xen this could be achieved only via special boot > parameters (vcpu pinni

[PATCH v5 4/6] xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu

2016-04-06 Thread Juergen Gross
or the hypervisor isn't supporting it, issue a warning once and disable further pinning attempts. Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: David Vrabel <david.vra...@citrix.com> --- V5: less wordy messages as requested by David Vrabel --- arch/x86/xen/enli

[PATCH v5 3/6] smp: add function to execute a function synchronously on a cpu

2016-04-06 Thread Juergen Gross
special measures in virtualized environments like Xen, too. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V5: rename and reshuffle parameters of smp_call_on_cpu() as requested by Peter Zijlstra test target cpu to be online as requested by Peter Zijlstra V4: change return value i

[PATCH v5 0/6] Support calling functions on dedicated physical cpu

2016-04-06 Thread Juergen Gross
code Juergen Gross (6): xen: sync xen header virt, sched: add generic vcpu pinning support smp: add function to execute a function synchronously on a cpu xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu dcdbas: make use of smp_call_on_cpu() hwmon: use

[PATCH v5 2/6] virt, sched: add generic vcpu pinning support

2016-04-06 Thread Juergen Gross
Add generic virtualization support for pinning the current vcpu to a specified physical cpu. As this operation isn't performance critical (a very limited set of operations like BIOS calls and SMIs is expected to need this) just add a hypervisor specific indirection. Signed-off-by: Juergen Gross

[PATCH v5 1/6] xen: sync xen header

2016-04-06 Thread Juergen Gross
Import the actual version of include/xen/interface/sched.h from Xen. Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: David Vrabel <david.vra...@citrix.com> --- include/xen/interface/sched.h | 100 ++ 1 file changed, 82 insertions(+),

[PATCH v5 6/6] hwmon: use smp_call_on_cpu() for dell-smm i8k

2016-04-06 Thread Juergen Gross
Use the smp_call_on_cpu() function to call system management mode on cpu 0. Make call secure by adding get_online_cpus() to avoid e.g. suspend resume cycles in between. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: add call to get_online_cpus() --- drivers/hwmon/dell-smm-hwmon.

[PATCH v5 5/6] dcdbas: make use of smp_call_on_cpu()

2016-04-06 Thread Juergen Gross
Use smp_call_on_cpu() to raise SMI on cpu 0. Make call secure by adding get_online_cpus() to avoid e.g. suspend resume cycles in between. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: add call to get_online_cpus() --- drivers/firmware/dcdbas.

Re: [PATCH v4 3/6] smp: add function to execute a function synchronously on a cpu

2016-04-05 Thread Juergen Gross
On 05/04/16 10:11, Peter Zijlstra wrote: > On Tue, Apr 05, 2016 at 07:10:04AM +0200, Juergen Gross wrote: >> +int smp_call_on_cpu(unsigned int cpu, bool pin, int (*func)(void *), void >> *par) > > Why .pin and not .phys? .pin does not (to me) reflect the > hypervisor/phys

Re: [Xen-devel] [PATCH v4 4/6] xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu

2016-04-05 Thread Juergen Gross
On 05/04/16 11:45, David Vrabel wrote: > On 05/04/16 06:10, Juergen Gross wrote: >> Some hardware models (e.g. Dell Studio 1555 laptops) require calls to >> the firmware to be issued on cpu 0 only. As Dom0 might have to use >> these calls, add xen_pin_vcpu() to achie

[PATCH v4 4/6] xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu

2016-04-04 Thread Juergen Gross
or the hypervisor isn't supporting it, issue a warning once and disable further pinning attempts. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/enlighten.c | 40 1 file changed, 40 insertions(+) diff --git a/arch/x86/xen/enlighten.c b/arch/x

[PATCH v4 1/6] xen: sync xen header

2016-04-04 Thread Juergen Gross
Import the actual version of include/xen/interface/sched.h from Xen. Signed-off-by: Juergen Gross <jgr...@suse.com> --- include/xen/interface/sched.h | 100 ++ 1 file changed, 82 insertions(+), 18 deletions(-) diff --git a/include/xen/interface/sch

[PATCH v4 2/6] virt, sched: add generic vcpu pinning support

2016-04-04 Thread Juergen Gross
Add generic virtualization support for pinning the current vcpu to a specified physical cpu. As this operation isn't performance critical (a very limited set of operations like BIOS calls and SMIs is expected to need this) just add a hypervisor specific indirection. Signed-off-by: Juergen Gross

[PATCH v4 6/6] hwmon: use smp_call_on_cpu() for dell-smm i8k

2016-04-04 Thread Juergen Gross
Use the smp_call_on_cpu() function to call system management mode on cpu 0. Make call secure by adding get_online_cpus() to avoid e.g. suspend resume cycles in between. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: add call to get_online_cpus() --- drivers/hwmon/dell-smm-hwmon.

[PATCH v4 3/6] smp: add function to execute a function synchronously on a cpu

2016-04-04 Thread Juergen Gross
special measures in virtualized environments like Xen, too. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: change return value in case of illegal cpu as requested by Peter Zijlstra make pinning of vcpu an option as suggested by Peter Zijlstra V2: instead of manipulating the allow

[PATCH v4 5/6] dcdbas: make use of smp_call_on_cpu()

2016-04-04 Thread Juergen Gross
Use smp_call_on_cpu() to raise SMI on cpu 0. Make call secure by adding get_online_cpus() to avoid e.g. suspend resume cycles in between. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V4: add call to get_online_cpus() --- drivers/firmware/dcdbas.

[PATCH v4 0/6] Support calling functions on dedicated physical cpu

2016-04-04 Thread Juergen Gross
to hide architecture specific stuff from generic kernel code Juergen Gross (6): xen: sync xen header virt, sched: add generic vcpu pinning support smp: add function to execute a function synchronously on a cpu xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu

Re: [PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-04-01 Thread Juergen Gross
On 01/04/16 11:15, Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 11:03:21AM +0200, Juergen Gross wrote: >>> Maybe just make the vpin thing an option like: >>> >>> smp_call_on_cpu(int (*func)(void *), int phys_cpu); > >>> Also; is something li

Re: [PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-04-01 Thread Juergen Gross
On 01/04/16 10:44, Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 10:28:46AM +0200, Juergen Gross wrote: >> On 01/04/16 09:43, Peter Zijlstra wrote: >>> On Fri, Apr 01, 2016 at 09:14:33AM +0200, Juergen Gross wrote: >>>> --- a/kernel/smp.c >>>&

Re: [PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-04-01 Thread Juergen Gross
On 01/04/16 09:43, Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 09:14:33AM +0200, Juergen Gross wrote: >> --- a/kernel/smp.c >> +++ b/kernel/smp.c >> @@ -14,6 +14,7 @@ >> #include >> #include >> #include >> +#include >> >>

Re: [PATCH v3 2/6] smp: add function to execute a function synchronously on a physical cpu

2016-04-01 Thread Juergen Gross
On 01/04/16 09:37, Peter Zijlstra wrote: > On Fri, Apr 01, 2016 at 09:14:30AM +0200, Juergen Gross wrote: >> +if (cpu >= nr_cpu_ids) >> +return -EINVAL; > >> +if (cpu != 0) >> +return -EINVAL; > > The other functions return -

[PATCH v3 1/6] xen: sync xen header

2016-04-01 Thread Juergen Gross
Import the actual version of include/xen/interface/sched.h from Xen. Signed-off-by: Juergen Gross <jgr...@suse.com> --- include/xen/interface/sched.h | 100 ++ 1 file changed, 82 insertions(+), 18 deletions(-) diff --git a/include/xen/interface/sch

[PATCH v3 6/6] xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu

2016-04-01 Thread Juergen Gross
or the hypervisor isn't supporting it, issue a warning once and disable further pinning attempts. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/enlighten.c | 40 1 file changed, 40 insertions(+) diff --git a/arch/x86/xen/enlighten.c b/arch/x

[PATCH v3 3/6] dcdbas: make use of smp_call_sync_on_phys_cpu()

2016-04-01 Thread Juergen Gross
Use smp_call_sync_on_phys_cpu() to raise SMI on cpu 0. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/firmware/dcdbas.c | 46 -- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/drivers/firmware/dcdbas.c b/drivers/fi

[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-04-01 Thread Juergen Gross
as short as possible as it might block sensible vcpu scheduling and maybe other hypervisor functions like suspending the system which rely on scheduling. To ensure this don't let the current thread be preempted while the vcpu is pinned in smp_call_sync_on_phys_cpu(). Signed-off-by: Juergen Gross <

[PATCH v3 2/6] smp: add function to execute a function synchronously on a physical cpu

2016-04-01 Thread Juergen Gross
special measures in virtualized environments like Xen, too. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V2: instead of manipulating the allowed set of cpus use cpu specific workqueue as requested by Peter Zijlstra --- include/linux/smp.h | 2 ++ kernel/smp.c

[PATCH v3 0/6] Support calling functions on dedicated physical cpu

2016-04-01 Thread Juergen Gross
() as suggested by David Vrabel Changes in V2: - instead of manipulating the allowed set of cpus use cpu specific workqueue as requested by Peter Zijlstra - add include/linux/hypervisor.h to hide architecture specific stuff from generic kernel code Juergen Gross (6): xen: sync xen header

[PATCH v3 4/6] hwmon: use smp_call_sync_on_phys_cpu() for dell-smm i8k

2016-04-01 Thread Juergen Gross
Use the smp_call_sync_on_phys_cpu() function to call system management mode on cpu 0. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/hwmon/dell-smm-hwmon.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/hwmon/dell-smm-h

Re: [Xen-devel] [PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-03-21 Thread Juergen Gross
On 21/03/16 14:42, Jan Beulich wrote: On 21.03.16 at 13:24, wrote: >> @@ -758,9 +759,14 @@ struct smp_sync_call_struct { >> static void smp_call_sync_callback(struct work_struct *work) >> { >> struct smp_sync_call_struct *sscs; >> +unsigned int cpu =

[PATCH v2 3/6] dcdbas: make use of smp_call_sync_on_phys_cpu()

2016-03-21 Thread Juergen Gross
Use smp_call_sync_on_phys_cpu() to raise SMI on cpu 0. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/firmware/dcdbas.c | 46 -- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/drivers/firmware/dcdbas.c b/drivers/fi

[PATCH v2 6/6] xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu

2016-03-21 Thread Juergen Gross
or the hypervisor isn't supporting it, issue a warning once and disable further pinning attempts. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/xen/enlighten.c | 40 1 file changed, 40 insertions(+) diff --git a/arch/x86/xen/enlighten.c b/arch/x

[PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()

2016-03-21 Thread Juergen Gross
as short as possible as it might block sensible vcpu scheduling and maybe other hypervisor functions like suspending the system which rely on scheduling. To ensure this don't let the current thread be preempted while the vcpu is pinned in smp_call_sync_on_phys_cpu(). Signed-off-by: Juergen Gross <

[PATCH v2 4/6] hwmon: use smp_call_sync_on_phys_cpu() for dell-smm i8k

2016-03-21 Thread Juergen Gross
Use the smp_call_sync_on_phys_cpu() function to call system management mode on cpu 0. Signed-off-by: Juergen Gross <jgr...@suse.com> --- drivers/hwmon/dell-smm-hwmon.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/hwmon/dell-smm-h

[PATCH v2 0/6] Support calling functions on dedicated physical cpu

2016-03-21 Thread Juergen Gross
of manipulating the allowed set of cpus use cpu specific workqueue as requested by Peter Zijlstra - add include/linux/hypervisor.h to hide architecture specific stuff from generic kernel cod Juergen Gross (6): xen: sync xen header smp: add function to execute a function synchronously on a physical

[PATCH v2 1/6] xen: sync xen header

2016-03-21 Thread Juergen Gross
Import the actual version of include/xen/interface/sched.h from Xen. Signed-off-by: Juergen Gross <jgr...@suse.com> --- include/xen/interface/sched.h | 100 ++ 1 file changed, 82 insertions(+), 18 deletions(-) diff --git a/include/xen/interface/sch

[PATCH v2 2/6] smp: add function to execute a function synchronously on a physical cpu

2016-03-21 Thread Juergen Gross
special measures in virtualized environments like Xen, too. Signed-off-by: Juergen Gross <jgr...@suse.com> --- V2: instead of manipulating the allowed set of cpus use cpu specific workqueue as requested by Peter Zijlstra --- include/linux/smp.h | 2 ++ kernel/smp.c

Re: [PATCH] paravirt: remove paravirt ops pmd_update[_defer] and pte_update_defer

2015-11-24 Thread Juergen Gross
Ping? On 17/11/15 15:51, Juergen Gross wrote: > pte_update_defer can be removed as it is always set to the same > function as pte_update. So any usage of pte_update_defer() can be > replaced by pte_update(). > > pmd_update and pmd_update_defer are always set to paravirt_nop, so

[PATCH] paravirt: remove unused pv_apic_ops structure

2015-11-17 Thread Juergen Gross
The only member of that structure is startup_ipi_hook which is always set to paravirt_nop. Signed-off-by: Juergen Gross <jgr...@suse.com> --- arch/x86/include/asm/paravirt.h | 9 - arch/x86/include/asm/paravirt_types.h | 10 -- arch/x86/include/asm/smp.h

Re: [PATCH] paravirt: remove paravirt ops pmd_update_defer and pte_update_defer

2015-11-17 Thread Juergen Gross
On 17/11/15 15:46, Juergen Gross wrote: > pte_update_defer can be removed as it is always set to the same > function as pte_update. So any usage of pte_update_defer() can be > replaced by pte_update(). > > pmd_update_defer is always set to paravirt_nop, so it can just be > nuke

[PATCH] paravirt: remove paravirt ops pmd_update_defer and pte_update_defer

2015-11-17 Thread Juergen Gross
pte_update_defer can be removed as it is always set to the same function as pte_update. So any usage of pte_update_defer() can be replaced by pte_update(). pmd_update_defer is always set to paravirt_nop, so it can just be nuked. Signed-off-by: Juergen Gross <jgr...@suse.com> --- ar

[PATCH] paravirt: remove paravirt ops pmd_update[_defer] and pte_update_defer

2015-11-17 Thread Juergen Gross
pte_update_defer can be removed as it is always set to the same function as pte_update. So any usage of pte_update_defer() can be replaced by pte_update(). pmd_update and pmd_update_defer are always set to paravirt_nop, so they can just be nuked. Signed-off-by: Juergen Gross <jgr...@suse.

Re: [RFC PATCH] x86/paravirt: Kill some unused patching functions

2015-11-05 Thread Juergen Gross
On 11/03/2015 10:18 AM, Borislav Petkov wrote: From: Borislav Petkov <b...@suse.de> paravirt_patch_ignore() is completely unused and paravirt_patch_nop() doesn't do a whole lot. Remove them both. Signed-off-by: Borislav Petkov <b...@suse.de> Reviewed-by: Juergen Gross <jgr...

[Patch RESEND] x86/paravirt: remove unused operation

2015-09-14 Thread Juergen Gross
Remove the paravirt operation "get_tsc_khz" as it is used nowhere. Signed-off-by: Juergen Gross <jgr...@suse.com> Acked-by: Rusty Russell <ru...@rustcorp.com.au> --- arch/x86/include/asm/paravirt_types.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/include/a

Re: [PATCH] x86/paravirt: remove unused operation

2015-09-10 Thread Juergen Gross
On 08/31/2015 02:05 AM, Rusty Russell wrote: Juergen Gross <jgr...@suse.com> writes: Ping? Acked-by: Rusty Russell <ru...@rustcorp.com.au> Anyone willing to take this patch? Juergen Cheers, Rusty. On 08/06/2015 01:55 PM, Juergen Gross wrote: Remove the paravi

maintainership of arch/x86/include/asm/paravirt_types.h

2015-08-06 Thread Juergen Gross
I just realized that according to MAINTAINERS the file arch/x86/include/asm/paravirt_types.h isn't part of the PARAVIRT_OPS INTERFACE, but of x86. Is this on purpose? I don't think so. Juergen ___ Virtualization mailing list

[PATCH] x86/paravirt: remove unused operation

2015-08-06 Thread Juergen Gross
Remove the paravirt operation get_tsc_khz as it is used nowhere. Signed-off-by: Juergen Gross jgr...@suse.com --- arch/x86/include/asm/paravirt_types.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index a6b8f9f

Re: [PATCH 0/6] x86: reduce paravirtualized spinlock overhead

2015-06-16 Thread Juergen Gross
AFAIK there are no outstanding questions for more than one month now. I'd appreciate some feedback or accepting these patches. Juergen On 04/30/2015 12:53 PM, Juergen Gross wrote: Paravirtualized spinlocks produce some overhead even if the kernel is running on bare metal. The main reason

Re: [PATCH 0/6] x86: reduce paravirtualized spinlock overhead

2015-06-07 Thread Juergen Gross
Ping? Anything missing from my side? On 04/30/2015 12:53 PM, Juergen Gross wrote: Paravirtualized spinlocks produce some overhead even if the kernel is running on bare metal. The main reason are the more complex locking and unlocking functions. Especially unlocking is no longer just one

Re: [PATCH 0/6] x86: reduce paravirtualized spinlock overhead

2015-05-18 Thread Juergen Gross
On 05/17/2015 07:30 AM, Ingo Molnar wrote: * Juergen Gross jgr...@suse.com wrote: On 05/05/2015 07:21 PM, Jeremy Fitzhardinge wrote: On 05/03/2015 10:55 PM, Juergen Gross wrote: I did a small measurement of the pure locking functions on bare metal without and with my patches. spin_lock

<    1   2   3   4   5   >