[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 --- 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 allowed set of cpus use cpu

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 achieve this fu

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

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

2016-04-06 Thread Juergen Gross
r the hypervisor isn't supporting it, issue a warning once and disable further pinning attempts. Signed-off-by: Juergen Gross Acked-by: David Vrabel --- V5: less wordy messages as requested by David Vrabel --- arch/x86/xen/enlighten.c | 40 1 file c

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

2016-04-06 Thread Juergen Gross
ric 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 use of smp_call_on_cpu()

[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 --- 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 in case of illegal cpu as

[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

[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 --- V4: add call to get_online_cpus() --- drivers/firmware/dcdbas.c | 51 --- 1 file

[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 Acked-by: David Vrabel --- include/xen/interface/sched.h | 100 ++ 1 file changed, 82 insertions(+), 18 deletions(-) diff --git a/include/xen/interface

[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 --- V4: add call to get_online_cpus() --- drivers/hwmon/dell-smm-hwmon.c | 35

Re: [PATCH 41/42] block: do not use REQ_FLUSH for tracking flush support

2016-04-17 Thread Juergen Gross
patches and modified patch to check feature_flush/fua bits. > > Signed-off-by: Mike Christie > Reviewed-by: Hannes Reinecke > Cc: Juergen Gross Acked-by: Juergen Gross Juergen

[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 --- drivers/firmware/dcdbas.c | 46 -- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/drivers/firmware/dcdbas.c b/drivers/firmware/dcdbas.c index

[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 --- 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| 44

[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 --- drivers/hwmon/dell-smm-hwmon.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon

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

2016-04-01 Thread Juergen Gross
t_cpu() 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 h

[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 --- include/xen/interface/sched.h | 100 ++ 1 file changed, 82 insertions(+), 18 deletions(-) diff --git a/include/xen/interface/sched.h b/include/xen

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

2016-04-01 Thread Juergen Gross
st 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: Jue

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

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

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 -

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 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 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 like

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 pinning)

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 paravirt_patch_ignore() is completely unused and paravirt_patch_nop() doesn't do a whole lot. Remove them both. Signed-off-by: Borislav Petkov Reviewed-by: Juergen Gross Cc: Andrew Morton Cc: Andy Lutomirsk

Re: Hibernate resume bug around 3,18-rc2 - Full PAT support

2015-11-22 Thread Juergen Gross
On 21/11/15 12:49, Vassilis Virvilis wrote: > On 11/20/2015 02:23 PM, Juergen Gross wrote: >> On 20/11/15 11:04, vas...@iit.demokritos.gr wrote: >>>> I've just found a potential issue: In case MTRR is disabled by the BIOS >>>> the PAT register of the boot pr

lapic_suspend/lapic_resume wrong?

2015-11-22 Thread Juergen Gross
Hi, while trying to find the reason for a hanging kernel during resume handling I found a strange inconsistency in arch/x86/kernel/apic/apic.c regarding usage of config options. Attached patch addresses this, no test done as I'm not sure whether this is a correct approach. Can you have a look at

Re: lapic_suspend/lapic_resume wrong?

2015-11-23 Thread Juergen Gross
On 23/11/15 09:01, Ingo Molnar wrote: > > * Juergen Gross wrote: > >> Hi, >> >> while trying to find the reason for a hanging kernel during resume >> handling I found a strange inconsistency in arch/x86/kernel/apic/apic.c >> regarding usage of config optio

Re: lapic_suspend/lapic_resume wrong?

2015-11-23 Thread Juergen Gross
On 23/11/15 10:50, Borislav Petkov wrote: > On Mon, Nov 23, 2015 at 10:32:35AM +0100, Juergen Gross wrote: >> I don't know. I was more concerned what might happen in a kernel >> configured with CONFIG_X86_MCE_INTEL but not CONFIG_X86_THERMAL_VECTOR. > > How can you eve

[PATCH] x86: correct saving and restoring of lapic vectors in suspend/resume

2015-11-23 Thread Juergen Gross
ll be set via mce resume handling, the wrong config option used for restoring the thmr vector can't be configured differently than the one which should be used. Nevertheless correct the thmr vector restore and add cmci vector handling. Signed-off-by: Juergen Gross --- arch/x86/kernel/apic/a

Re: Hibernate resume bug around 3,18-rc2 - Full PAT support

2015-11-23 Thread Juergen Gross
On 23/11/15 15:11, vas...@iit.demokritos.gr wrote: > Ok I will send the .config when I get back home. I have all kernels I > build in .deb archive. The problem is that the debian kernel build > procedure does not hold somewhere in the deb file the git commit hash. > > Fow which kernel would you ca

Re: crash tool - problem with new Xen linear virtual mapped sparse p2m list

2015-11-23 Thread Juergen Gross
On 23/11/15 21:18, Daniel Kiper wrote: > Hi all, > > Some time ago Linux kernel commit 054954eb051f35e74b75a566a96fe756015352c8 > (xen: switch to linear virtual mapped sparse p2m list) introduced linear > virtual mapped sparse p2m list. It fixed some issues, however, it broke > crash tool too. I t

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

Re: [PATCH] xen: use correct type for HYPERVISOR_memory_op()

2015-09-14 Thread Juergen Gross
Ping? On 09/04/2015 02:50 PM, Juergen Gross wrote: HYPERVISOR_memory_op() is defined to return an "int" value. This is wrong, as the Xen hypervisor will return "long". The sub-function XENMEM_maximum_reservation returns the maximum number of pages for the current domain.

[Patch V2] xen: use correct type for HYPERVISOR_memory_op()

2015-09-14 Thread Juergen Gross
TB of memory or more. Correct this by using the correct type. Signed-off-by: Juergen Gross --- V2: change arm header as well to keep it in sync with x86 (requested by Julien Grall) --- arch/arm/include/asm/xen/hypercall.h | 2 +- arch/x86/include/asm/xen/hypercall.h | 4 ++-- arch/x86/xen/setup.c

[PATCH] xen/arm: correct comment in enlighten.c

2015-09-14 Thread Juergen Gross
Correct a comment in arch/arm/xen/enlighten.c referencing a wrong source file. Signed-off-by: Juergen Gross --- arch/arm/xen/enlighten.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c index eeeab07..5421706 100644 --- a

[PATCH] x86: remove unused function cpu_has_ht_siblings()

2015-11-17 Thread Juergen Gross
It is used nowhere. Signed-off-by: Juergen Gross --- arch/x86/include/asm/smp.h | 9 - 1 file changed, 9 deletions(-) diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index 222a6a3..a438c55 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h

kernel 4.4-rc1 BUG when booting as Xen dom0

2015-11-17 Thread Juergen Gross
Trying to boot a 4.4 kernel as Xen dom0 crashes the system: [9.949589] ACPI: Added _OSI(Module Device) [9.957803] ACPI: Added _OSI(Processor Device) [9.966814] ACPI: Added _OSI(3.0 _SCP Extensions) [9.976346] ACPI: Added _OSI(Processor Aggregator Device) [9.988715] BUG: unable

Re: kernel 4.4-rc1 BUG when booting as Xen dom0

2015-11-17 Thread Juergen Gross
On 17/11/15 14:40, Boris Ostrovsky wrote: > On 11/17/2015 08:38 AM, Juergen Gross wrote: >> Trying to boot a 4.4 kernel as Xen dom0 crashes the system: >> >> [9.949589] ACPI: Added _OSI(Module Device) >> [9.957803] ACPI: Added _OSI(Processor Device) >> [

[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 --- arch/x86/include/asm/paravirt.h | 9 - arch/x86/include/asm/paravirt_types.h | 10 -- arch/x86/include/asm/smp.h| 3 --- arch/x86

[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 --- arch/x86/include/asm/paravirt.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 and pmd_update_defer are always set to paravirt_nop, so they can just be nuked. Signed-off-by: Juergen Gross --- arch/x86

Re: [PATCH] xen/events: Always allocate legacy interrupts on PV guests

2015-11-17 Thread Juergen Gross
re we need to allocate those descriptors for PV guests > ourselves. > > Signed-off-by: Boris Ostrovsky > Suggested-by: Thomas Gleixner Tested-by: Juergen Gross Juergen -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majo

Re: [PATCH] x86: make set_pmd_at() paravirt aware

2019-02-10 Thread Juergen Gross
On 10/02/2019 19:14, Linus Torvalds wrote: > On Sat, Feb 9, 2019 at 11:41 PM Juergen Gross wrote: >> >> Make set_pmd_at() paravirt aware by just letting it use set_pmd(). > > Well, that was simpler than I worried. > > Just checking: Is this purely an x86 issue

Re: [Xen-devel] [PATCH v2 1/2] x86: respect memory size limiting via mem= parameter

2019-02-11 Thread Juergen Gross
On 11/02/2019 13:06, Ingo Molnar wrote: > > * Juergen Gross wrote: > >> When limiting memory size via kernel parameter "mem=" this should be >> respected even in case of memory made accessible via a PCI card. >> >> Today this kind of memory won't

Re: [Xen-devel] [PATCH v2 1/2] x86: respect memory size limiting via mem= parameter

2019-02-11 Thread Juergen Gross
On 11/02/2019 13:23, Ingo Molnar wrote: > > * Juergen Gross wrote: > >>> If PCI devices had physical mmio memory areas above this range, we'd >>> still expect them to work - the option was really only meant to limit >>> RAM. >> >> No, in

Re: [PATCH 2/3] xen/ballon: Avoid calling dummy function __online_page_set_limits()

2019-09-07 Thread Juergen Gross
On 07.09.19 23:47, Souptick Joarder wrote: __online_page_set_limits() is a dummy function and an extra call to this function can be avoided. Signed-off-by: Souptick Joarder Reviewed-by: Juergen Gross Juergen

Re: [RFC PATCH v2 1/3] x86/mm/tlb: Change __flush_tlb_one_user interface

2019-08-26 Thread Juergen Gross
On 26.08.19 18:38, Nadav Amit wrote: On Aug 26, 2019, at 12:51 AM, Juergen Gross wrote: On 24.08.19 00:52, Nadav Amit wrote: __flush_tlb_one_user() currently flushes a single entry, and flushes it both in the kernel and user page-tables, when PTI is enabled. Change __flush_tlb_one_user() and

Re: [RFC PATCH v2 1/3] x86/mm/tlb: Change __flush_tlb_one_user interface

2019-08-26 Thread Juergen Gross
avoid this redundant flush. Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-de...@lists.xenproject.org Signed-off-by: Nadav Amit --- arch/x86/include/asm/paravirt.h | 5 ++-- arch/x86/include/asm/paravirt_types.h | 3 ++- arch/x86/include/asm/tlbflush.h | 24

[GIT PULL] xen: fixes and cleanups for 5.4-rc2

2019-10-03 Thread Juergen Gross
David Hildenbrand (4): xen/balloon: Set pages PageOffline() in balloon_add_region() xen/balloon: Drop __balloon_append() xen/balloon: Mark pages PG_offline in balloon_append() xen/balloon: Clear PG_offline in balloon_retrieve() Juergen Gross (2): xen/efi: have a common runtime

[PATCH] xen/efi: have a common runtime setup function

2019-10-01 Thread Juergen Gross
make the single functions global visible. Signed-off-by: Juergen Gross --- arch/arm/include/asm/xen/xen-ops.h | 6 --- arch/arm/xen/Makefile| 1 - arch/arm/xen/efi.c | 30 - arch/arm/xen/enlighten.c | 1 - arch/arm64/include/asm/xen

[PATCH] xen/xenbus: fix self-deadlock after killing user process

2019-10-01 Thread Juergen Gross
cleanup via a workqueue instead. Reported-by: James Dingwall Fixes: fd8aa9095a95c ("xen: optimize xenbus driver for multiple concurrent xenstore accesses") Cc: # 4.11 Signed-off-by: Juergen Gross --- drivers/xen/xenbus/xenbus_dev_frontend.c | 20 ++-- 1 file changed, 18 ins

[GIT PULL] xen: features for 5.4-rc1

2019-09-26 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-5.4-rc1-tag xen: features for 5.4-rc1 It contains only two small patches this time: - a small cleanup for swiotlb-xen - a fix for PCI initialization for some platforms Thanks. Juerg

Re: [PATCH] x86/paravirt: Drop {read,write}_cr8() hooks

2019-07-15 Thread Juergen Gross
On 15.07.19 16:26, Andy Lutomirski wrote: On Mon, Jul 15, 2019 at 6:23 AM Juergen Gross wrote: On 15.07.19 15:00, Andrew Cooper wrote: There is a lot of infrastructure for functionality which is used exclusively in __{save,restore}_processor_state() on the suspend/resume path. cr8 is an

Re: [PATCH 0/2] Remove 32-bit Xen PV guest support

2019-07-15 Thread Juergen Gross
On 15.07.19 19:28, Andy Lutomirski wrote: On Mon, Jul 15, 2019 at 9:34 AM Andi Kleen wrote: Juergen Gross writes: The long term plan has been to replace Xen PV guests by PVH. The first victim of that plan are now 32-bit PV guests, as those are used only rather seldom these days. Xen on x86

Re: [PATCH 1/2] x86/xen: remove 32-bit Xen PV guest support

2019-07-15 Thread Juergen Gross
On 15.07.19 17:44, Boris Ostrovsky wrote: diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index 084de77a109e..d42737f31304 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -OBJECT_FILES_NON_STANDARD_xen-asm_$(BITS).o

Re: [Xen-devel] [PATCH 0/2] Remove 32-bit Xen PV guest support

2019-07-15 Thread Juergen Gross
On 15.07.19 19:39, Andrew Cooper wrote: On 15/07/2019 18:28, Andy Lutomirski wrote: On Mon, Jul 15, 2019 at 9:34 AM Andi Kleen wrote: Juergen Gross writes: The long term plan has been to replace Xen PV guests by PVH. The first victim of that plan are now 32-bit PV guests, as those are used

Re: [PATCH v2] x86/paravirt: Drop {read,write}_cr8() hooks

2019-07-15 Thread Juergen Gross
restoring cr8 independently of the rest of the Local APIC state isn't a clever thing to be doing. Delete the suspend/resume cr8 handling, which shrinks the size of struct saved_context, and allows for the removal of both PVOPS. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Juergen

Re: [PATCH v7 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable

2019-07-16 Thread Juergen Gross
On 11.07.19 14:02, Zhenzhong Duan wrote: .. as "nopv" support needs it to be changeable at boot up stage. Checkpatch report warning, so move variable declarations from hypervisor.c to hypervisor.h Signed-off-by: Zhenzhong Duan Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stab

Re: [PATCH v7 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable

2019-07-16 Thread Juergen Gross
On 17.07.19 04:09, Zhenzhong Duan wrote: On 2019/7/16 18:57, Juergen Gross wrote: On 11.07.19 14:02, Zhenzhong Duan wrote: .. as "nopv" support needs it to be changeable at boot up stage. Checkpatch report warning, so move variable declarations from hypervisor.c to hypervisor.h

Re: [Xen-devel][PATCH v3] xen/pv: Fix a boot up hang revealed by int3 self test

2019-07-16 Thread Juergen Gross
s xenint3 and int3 entry code are same except xenint3 doesn't generate a gap, we can fix it by using int3 and drop useless xenint3. Signed-off-by: Zhenzhong Duan Reviewed-by: Juergen Gross Juergen

Re: [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable

2019-07-16 Thread Juergen Gross
On 16.07.19 06:26, Zhenzhong Duan wrote: .. as "nopv" support needs it to be changeable at boot up stage. Checkpatch reports warning, so move variable declarations from hypervisor.c to hypervisor.h Signed-off-by: Zhenzhong Duan Reviewed-by: Juergen Gross ... and complete series

Re: [Xen-devel][PATCH v3] xen/pv: Fix a boot up hang revealed by int3 self test

2019-07-16 Thread Juergen Gross
On 14.07.19 11:15, Zhenzhong Duan wrote: Commit 7457c0da024b ("x86/alternatives: Add int3_emulate_call() selftest") is used to ensure there is a gap setup in int3 exception stack which could be used for inserting call return address. This gap is missed in XEN PV int3 exception entry path, then b

Re: [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable

2019-07-16 Thread Juergen Gross
On 17.07.19 08:46, Joe Perches wrote: On Tue, 2019-07-16 at 12:26 +0800, Zhenzhong Duan wrote: .. as "nopv" support needs it to be changeable at boot up stage. Checkpatch reports warning, so move variable declarations from hypervisor.c to hypervisor.h [] diff --git a/arch/x86/xen/enlighten_hv

Re: [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable

2019-07-17 Thread Juergen Gross
On 17.07.19 19:22, Joe Perches wrote: On Wed, 2019-07-17 at 08:49 +0200, Juergen Gross wrote: On 17.07.19 08:46, Joe Perches wrote: On Tue, 2019-07-16 at 12:26 +0800, Zhenzhong Duan wrote: .. as "nopv" support needs it to be changeable at boot up stage. Checkpatch reports warnin

[PATCH 2/2] xen/gntdev: switch from kcalloc() to kvcalloc()

2019-07-17 Thread Juergen Gross
With sufficient many pages to map gntdev can reach order 9 allocation sizes. As there is no need to have physically contiguous buffers switch to kvcalloc() in order to avoid failing allocations. Signed-off-by: Juergen Gross --- drivers/xen/gntdev.c | 30 +++--- 1 file

[PATCH 0/2] xen/gntdev: sanitize user interface handling

2019-07-17 Thread Juergen Gross
The Xen gntdev driver's checking of the number of allowed mapped pages is in need of some sanitizing work. Juergen Gross (2): xen/gntdev: replace global limit of mapped pages by limit per call xen/gntdev: switch from kcalloc() to kvcalloc() drivers/xen/gntdev-common.h | 2 +- driver

[PATCH 1/2] xen/gntdev: replace global limit of mapped pages by limit per call

2019-07-17 Thread Juergen Gross
introduce per call limit instead. Signed-off-by: Juergen Gross --- drivers/xen/gntdev-common.h | 2 +- drivers/xen/gntdev-dmabuf.c | 11 +++ drivers/xen/gntdev.c| 22 ++ 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/drivers/xen/gntdev-common.h

[GIT PULL] xen: fixes for 5.4-rc3

2019-10-12 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-5.4-rc3-tag xen: fixes for 5.4-rc3 It contains the following patches: - a patch to correct panic handling when running as a Xen guest - a cleanup in the Xen grant driver to remove pr

[PATCH 0/2] xen/netback: bug fix and cleanup

2019-10-14 Thread Juergen Gross
One bugfix (patch 1) I stumbled over while doing a cleanup (patch 2) of the xen-netback init/deinit code. Juergen Gross (2): xen/netback: fix error path of xenvif_connect_data() xen/netback: cleanup init and deinit code drivers/net/xen-netback/interface.c | 115

[PATCH 1/2] xen/netback: fix error path of xenvif_connect_data()

2019-10-14 Thread Juergen Gross
xenvif_connect_data() calls module_put() in case of error. This is wrong as there is no related module_get(). Remove the superfluous module_put(). Fixes: 279f438e36c0a7 ("xen-netback: Don't destroy the netdev until the vif is shut down") Cc: # 3.12 Signed-off-by: Juergen Gros

[PATCH 2/2] xen/netback: cleanup init and deinit code

2019-10-14 Thread Juergen Gross
) - there is no need to use get_task_struct() after creating a kthread and using put_task_struct() again after having stopped it. - use kthread_run() instead of kthread_create() to spare the call of wake_up_process(). Signed-off-by: Juergen Gross --- drivers/net/xen-netback/interface.c | 114

[PATCH] xen/netback: fix error path of xenvif_connect_data()

2019-10-18 Thread Juergen Gross
xenvif_connect_data() calls module_put() in case of error. This is wrong as there is no related module_get(). Remove the superfluous module_put(). Fixes: 279f438e36c0a7 ("xen-netback: Don't destroy the netdev until the vif is shut down") Cc: # 3.12 Signed-off-by: Juergen Gro

[PATCH] xen/netback: cleanup init and deinit code

2019-10-20 Thread Juergen Gross
) - there is no need to use get_task_struct() after creating a kthread and using put_task_struct() again after having stopped it. - use kthread_run() instead of kthread_create() to spare the call of wake_up_process(). Signed-off-by: Juergen Gross --- drivers/net/xen-netback/interface.c | 114

[PATCH] xen/netback: cleanup init and deinit code

2019-10-20 Thread Juergen Gross
) - there is no need to use get_task_struct() after creating a kthread and using put_task_struct() again after having stopped it. - use kthread_run() instead of kthread_create() to spare the call of wake_up_process(). Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant --- drivers/net/xen

[PATCH] ia64: remove stale paravirt leftovers

2019-10-21 Thread Juergen Gross
Remove the last leftovers from IA64 Xen pv-guest support. PARAVIRT is long gone from IA64 Kconfig and Xen IA64 support, too. Due to lack of infrastructure no testing done. Signed-off-by: Juergen Gross --- arch/ia64/include/asm/irqflags.h | 4 --- arch/ia64/include/uapi/asm

Re: [patch 11/12] hrtimer: Prepare support for PREEMPT_RT

2019-07-28 Thread Juergen Gross
On 26.07.19 20:30, Thomas Gleixner wrote: From: Anna-Maria Gleixner When PREEMPT_RT is enabled, the soft interrupt thread can be preempted. If the soft interrupt thread is preempted in the middle of a timer callback, then calling hrtimer_cancel() can lead to two issues: - If the caller is

[PATCH v3 0/2] x86: respect memory size limits

2019-02-14 Thread Juergen Gross
owed size to U64_MAX instead -1 - patch 2: set initial allowed size to end of E820 RAM Juergen Gross (2): x86: respect memory size limiting via mem= parameter x86/xen: dont add memory above max allowed allocation arch/x86/kernel/e820.c | 5 + arch/x86/xen/setup.c | 13 ++

[PATCH v3 1/2] x86: respect memory size limiting via mem= parameter

2019-02-14 Thread Juergen Gross
n adding PCI devices due to corresponding ACPI table entries. Not respecting "mem=" can be corrected by adding a global max_mem_size variable set by parse_memopt() which will result in rejecting adding memory areas resulting in a memory size above the allowed limit. Signed-off-by: Juerge

[PATCH v3 2/2] x86/xen: dont add memory above max allowed allocation

2019-02-14 Thread Juergen Gross
75241] [] phys_pmd_init+0x210/0x255 [ 584.681587] [] phys_pud_init+0x1da/0x247 [ 584.687931] [] kernel_physical_mapping_init+0xf5/0x1d4 [ 584.695682] [] init_memory_mapping+0x18d/0x380 [ 584.702631] [] arch_add_memory+0x59/0xf0 Signed-off-by: Juergen Gross --- arch/x86/xen/setup.c

Re: [Xen-devel][PATCH 1/2] xen/gntdev: Do not destroy context while dma-bufs are in use

2019-02-15 Thread Juergen Gross
On 15/02/2019 16:35, Oleksandr Andrushchenko wrote: > On 2/15/19 5:28 PM, Boris Ostrovsky wrote: >> On 2/15/19 10:07 AM, Oleksandr Andrushchenko wrote: >>> On 2/15/19 5:03 PM, Boris Ostrovsky wrote: On 2/14/19 9:23 AM, Oleksandr Andrushchenko wrote: >      /* DMA buffer export support. */

Re: [Xen-devel] [PATCH RFC 00/39] x86/KVM: Xen HVM guest support

2019-02-20 Thread Juergen Gross
On 21/02/2019 00:39, Marek Marczykowski-Górecki wrote: > On Wed, Feb 20, 2019 at 08:15:30PM +, Joao Martins wrote: >> 2. PV Driver support (patches 17 - 39) >> >> We start by redirecting hypercalls from the backend to routines >> which emulate the behaviour that PV backends expect i.e. grant

Re: xen/evtchn and forced threaded irq

2019-02-21 Thread Juergen Gross
On 19/02/2019 18:31, Julien Grall wrote: > Hi all, > > I have been looking at using Linux RT in Dom0. Once the guest is started, > the console is ending to have a lot of warning (see trace below). > > After some investigation, this is because the irq handler will now be > threaded. > I can repro

Re: [Xen-devel] xen/evtchn and forced threaded irq

2019-02-21 Thread Juergen Gross
On 21/02/2019 09:38, Julien Grall wrote: > Hi Roger, > > On Thu, 21 Feb 2019, 08:08 Roger Pau Monné, > wrote: > > FWIW, you can also mask the interrupt while waiting for the thread to > execute the interrupt handler. Ie: > > > Thank you for providing steps,

[GIT PULL] xen: fixes for 5.0-rc6

2019-02-09 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-5.0-rc6-tag xen: fixes for 5.0-rc6 It contains two very minor fixes: one remove of a #include for an unused header and a fix of the xen ML address in MAINTAINERS. Thanks. Juergen M

Re: Linux 5.0 regression: BUG: unable to handle kernel paging request at ffff888023e26778 RIP: e030:move_page_tables+0x7c1/0xae0

2019-02-09 Thread Juergen Gross
On 09/02/2019 19:45, Sander Eikelenboom wrote: > On 09/02/2019 09:26, Sander Eikelenboom wrote: >> L.S., >> >> >> While testing a Linux 5.0-rc5-ish kernel (pull of yesterday) with some >> additional patches for >> already reported other issues i came across the issue below which i haven't >> seen

Re: Linux 5.0 regression: BUG: unable to handle kernel paging request at ffff888023e26778 RIP: e030:move_page_tables+0x7c1/0xae0

2019-02-09 Thread Juergen Gross
On 09/02/2019 19:51, Sander Eikelenboom wrote: > On 09/02/2019 19:48, Juergen Gross wrote: >> On 09/02/2019 19:45, Sander Eikelenboom wrote: >>> On 09/02/2019 09:26, Sander Eikelenboom wrote: >>>> L.S., >>>> >>>> >>>> Whil

[PATCH] x86: make set_pmd_at() paravirt aware

2019-02-09 Thread Juergen Gross
x on large regions") Reported-by: Sander Eikelenboom Signed-off-by: Juergen Gross --- arch/x86/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 40616e805292..2779ace16d23 100644

[PATCH 1/2] x86: respect memory size limiting via mem= parameter

2019-01-22 Thread Juergen Gross
n adding PCI devices due to corresponding ACPI table entries. Not respecting "mem=" can be corrected by adding a global max_mem_size variable set by parse_memopt() which will result in rejecting adding memory areas resulting in a memory size above the allowed limit. Signed-off-by: Juerg

[PATCH 0/2] x86: respect memory size limits

2019-01-22 Thread Juergen Gross
s problems (e.g. avoiding to add only parts of a 128MB memory bar which might be difficult to remove later). Juergen Gross (2): x86: respect memory size limiting via mem= parameter x86/xen: dont add memory above max allowed allocation arch/x86/kernel/e820.c | 5 + arch/x86/xen/setup.

[PATCH 2/2] x86/xen: dont add memory above max allowed allocation

2019-01-22 Thread Juergen Gross
75241] [] phys_pmd_init+0x210/0x255 [ 584.681587] [] phys_pud_init+0x1da/0x247 [ 584.687931] [] kernel_physical_mapping_init+0xf5/0x1d4 [ 584.695682] [] init_memory_mapping+0x18d/0x380 [ 584.702631] [] arch_add_memory+0x59/0xf0 Signed-off-by: Juergen Gross --- arch/x86/xen/setup.c | 5 + 1

Re: [Xen-devel] [PATCH 2/2] x86/xen: dont add memory above max allowed allocation

2019-01-22 Thread Juergen Gross
On 22/01/2019 09:52, Jan Beulich wrote: On 22.01.19 at 09:06, wrote: >> Don't allow memory to be added above the allowed maximum allocation >> limit set by Xen. > > This reads as if the hypervisor was imposing a limit here, but looking at > xen_get_max_pages(), xen_foreach_remap_area(), and

Re: [PATCH 6/6] x86: xen: no need to check return value of debugfs_create functions

2019-01-23 Thread Juergen Gross
On 22/01/2019 15:35, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > > Cc: Boris Ostrovsky > Cc: Juergen Gr

[PATCH v2 1/2] x86: respect memory size limiting via mem= parameter

2019-01-30 Thread Juergen Gross
n adding PCI devices due to corresponding ACPI table entries. Not respecting "mem=" can be corrected by adding a global max_mem_size variable set by parse_memopt() which will result in rejecting adding memory areas resulting in a memory size above the allowed limit. Signed-off-by: Juerg

[PATCH v2 0/2] x86: respect memory size limits

2019-01-30 Thread Juergen Gross
s problems (e.g. avoiding to add only parts of a 128MB memory bar which might be difficult to remove later). Changes in V2: - patch 1: set initial allowed size to U64_MAX instead -1 - patch 2: set initial allowed size to end of E820 RAM Juergen Gross (2): x86: respect memory size limiting via mem= para

[PATCH v2 2/2] x86/xen: dont add memory above max allowed allocation

2019-01-30 Thread Juergen Gross
75241] [] phys_pmd_init+0x210/0x255 [ 584.681587] [] phys_pud_init+0x1da/0x247 [ 584.687931] [] kernel_physical_mapping_init+0xf5/0x1d4 [ 584.695682] [] init_memory_mapping+0x18d/0x380 [ 584.702631] [] arch_add_memory+0x59/0xf0 Signed-off-by: Juergen Gross --- arch/x86/xen/setup.c

Re: [PATCH v3] xen: Fix x86 sched_clock() interface for xen

2019-01-15 Thread Juergen Gross
On 16/01/2019 01:24, Hans van Kranenburg wrote: > Hi, > > On 1/14/19 1:44 PM, Juergen Gross wrote: >> Commit f94c8d11699759 ("sched/clock, x86/tsc: Rework the x86 'unstable' >> sched_clock() interface") broke Xen guest time handling across >> migr

Re: [PATCH v3] x86-64/Xen: fix stack switching

2019-01-16 Thread Juergen Gross
y() and nmi(), as > those code paths are unreachable afaict when running PV Xen guests. > > Fixes: 7f2590a110b837af5679d08fc25c6227c5a8c497 > Signed-off-by: Jan Beulich > Cc: sta...@kernel.org Reviewed-by: Juergen Gross Juergen

Re: [Xen-devel] [PATCH 19/21] treewide: add checks for the return value of memblock_alloc*()

2019-01-16 Thread Juergen Gross
u bytes align=0x%lx\n", __func__, > size, align); > > Signed-off-by: Mike Rapoport For the Xen part: Reviewed-by: Juergen Gross Juergen

Re: [PATCH v3] xen: Fix x86 sched_clock() interface for xen

2019-01-16 Thread Juergen Gross
On 16/01/2019 14:17, Boris Ostrovsky wrote: > On Wed, Jan 16, 2019 at 08:50:13AM +0100, Juergen Gross wrote: > >> @@ -1650,13 +1650,14 @@ void xen_callback_vector(void) >> xen_have_vector_callback = 0; >>

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