Re: x86/paravirt: Detect over-sized patching bugs in paravirt_patch_call()

2019-04-25 Thread Juergen Gross
On 25/04/2019 13:30, Juergen Gross wrote: > On 25/04/2019 12:57, Ingo Molnar wrote: >> >> * Peter Zijlstra wrote: >> >>> On Thu, Apr 25, 2019 at 11:50:39AM +0200, Ingo Molnar wrote: >>>> >>>> * Peter Zijlstra wrote: >>>>

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

2019-02-06 Thread Juergen Gross
On 01/02/2019 19:46, Boris Ostrovsky wrote: > On 1/30/19 3:22 AM, Juergen Gross wrote: >> Don't allow memory to be added above the allowed maximum allocation >> limit set by Xen. >> >> Trying to do so would result in cases like the following: >> &g

Re: [PATCH 1/3] fs: stream_open - opener for stream-like files so that read and write can run simultaneously without deadlock

2019-03-27 Thread Juergen Gross
; Followup patches are: > > - apply the result of semantic patch; > - add FOPEN_STREAM to fs/fuse. > > Regarding semantic patch I've verified each generated change manually - that > it is > correct to convert - and each other nonseekable_open instance left - that

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

2019-04-08 Thread Juergen Gross
On 08/04/2019 12:36, Joao Martins wrote: > On 4/8/19 7:44 AM, Juergen Gross wrote: >> On 12/03/2019 18:14, Joao Martins wrote: >>> On 2/22/19 4:59 PM, Paolo Bonzini wrote: >>>> On 21/02/19 12:45, Joao Martins wrote: >>>>> On 2/20/19 9:09 PM, Paolo

Re: [Xen-devel][PATCH] xen/cameraif: add ABI for para-virtual camera

2019-04-09 Thread Juergen Gross
s > - frame rates > 2. Support basic camera controls: > - contrast > - brightness > - hue > - saturation > 3. Support streaming control > > Signed-off-by: Oleksandr Andrushchenko > Cc: Juergen Gross > Cc: Konrad Rzeszutek Wilk > Cc: Hans Verkuil I'

Re: [Xen-devel][PATCH] xen/cameraif: add ABI for para-virtual camera

2019-04-09 Thread Juergen Gross
On 09/04/2019 11:33, Oleksandr Andrushchenko wrote: > On 4/9/19 12:28 PM, Juergen Gross wrote: >> On 09/04/2019 11:15, Oleksandr Andrushchenko wrote: >>> From: Oleksandr Andrushchenko >>> >>> This is the ABI for the two halves of a para-virtualized >>

[GIT PULL] xen: branch for v5.11-rc8

2021-02-11 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.11-rc8-tag xen: branch for v5.11-rc8 It contains a single fix for an issue introduced in 5.11: when running as a Xen guest on Arm systems the kernel will hang during boot. Thanks.

[PATCH] irq: simplify condition in irq_matrix_reserve()

2021-02-10 Thread Juergen Gross
The if condition in irq_matrix_reserve() can be much simpler. While at it fix a typo in the comment. Signed-off-by: Juergen Gross --- kernel/irq/matrix.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/irq/matrix.c b/kernel/irq/matrix.c index 651a4ad6d711

[PATCH v2 0/8] xen/events: bug fixes and some diagnostic aids

2021-02-11 Thread Juergen Gross
control. Patches 7 and 8 are minor fixes I had lying around. Juergen Gross (8): xen/events: reset affinity of 2-level event when tearing it down xen/events: don't unmask an event channel when an eoi is pending xen/events: avoid handling the same event on two cpus at the same time xen/ne

[PATCH v2 3/8] xen/events: avoid handling the same event on two cpus at the same time

2021-02-11 Thread Juergen Gross
set. Reported-by: Julien Grall Signed-off-by: Juergen Gross --- V2: - new patch --- drivers/xen/events/events_base.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index e157e750683

[PATCH v2 4/8] xen/netback: fix spurious event detection for common event case

2021-02-11 Thread Juergen Gross
variables for rx/tx pending indicators in order to split function calls and if condition. Fixes: 23025393dbeb3b ("xen/netback: use lateeoi irq binding") Signed-off-by: Juergen Gross --- V2: - new patch, fixing FreeBSD performance issue --- drivers/net/xen-netback/interface.c | 8 +-

[PATCH v2 2/8] xen/events: don't unmask an event channel when an eoi is pending

2021-02-11 Thread Juergen Gross
/unmasking and temporary masking. The event channel should only be able to generate an interrupt if all flags are cleared. Cc: sta...@vger.kernel.org Fixes: 54c9de89895e0a36047 ("xen/events: add a new late EOI evtchn framework") Reported-by: Julien Grall Signed-off-by: Juergen Gross -

[PATCH v2 1/8] xen/events: reset affinity of 2-level event when tearing it down

2021-02-11 Thread Juergen Gross
: Julien Grall Signed-off-by: Juergen Gross --- V2: - reset affinity when tearing down the event (Julien Grall) --- drivers/xen/events/events_2l.c | 15 +++ drivers/xen/events/events_base.c | 1 + drivers/xen/events/events_internal.h | 8 3 files changed, 24 insertions

[PATCH v2 5/8] xen/events: link interdomain events to associated xenbus device

2021-02-11 Thread Juergen Gross
id of the other side. While at it remove the stale prototype of bind_evtchn_to_irq_lateeoi(). Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Reviewed-by: Wei Liu --- drivers/block/xen-blkback/xenbus.c | 2 +- drivers/net/xen-netback/interface.c | 16 +-- drivers/xen/events

[PATCH v2 6/8] xen/events: add per-xenbus device event statistics and settings

2021-02-11 Thread Juergen Gross
Add syfs nodes for each xenbus device showing event statistics (number of events and spurious events, number of associated event channels) and for setting a spurious event threshold in case a frontend is sending too many events without being rogue on purpose. Signed-off-by: Juergen Gross --- V2

[PATCH v2 8/8] xen/evtchn: use READ/WRITE_ONCE() for accessing ring indices

2021-02-11 Thread Juergen Gross
For avoiding read- and write-tearing by the compiler use READ_ONCE() and WRITE_ONCE() for accessing the ring indices in evtchn.c. Signed-off-by: Juergen Gross --- V2: - modify all accesses (Julien Grall) --- drivers/xen/evtchn.c | 25 - 1 file changed, 16 insertions

[PATCH v2 7/8] xen/evtch: use smp barriers for user event ring

2021-02-11 Thread Juergen Gross
The ring buffer for user events is local to the given kernel instance, so smp barriers are fine for ensuring consistency. Reported-by: Andrew Cooper Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- drivers/xen/evtchn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v3 4/8] xen/netback: fix spurious event detection for common event case

2021-02-19 Thread Juergen Gross
variables for rx/tx pending indicators in order to split function calls and if condition. Cc: sta...@vger.kernel.org Fixes: 23025393dbeb3b ("xen/netback: use lateeoi irq binding") Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich Reviewed-by: Paul Durrant Reviewed-by: Wei Liu ---

[PATCH v3 1/8] xen/events: reset affinity of 2-level event when tearing it down

2021-02-19 Thread Juergen Gross
: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- V2: - reset affinity when tearing down the event (Julien Grall) --- drivers/xen/events/events_2l.c | 15 +++ drivers/xen/events/events_base.c | 1 + drivers/xen/events/events_internal.h | 8 3

[PATCH v3 0/8] xen/events: bug fixes and some diagnostic aids

2021-02-19 Thread Juergen Gross
control. Patches 7 and 8 are minor fixes I had lying around. Juergen Gross (8): xen/events: reset affinity of 2-level event when tearing it down xen/events: don't unmask an event channel when an eoi is pending xen/events: avoid handling the same event on two cpus at the same time xen/ne

[PATCH v3 3/8] xen/events: avoid handling the same event on two cpus at the same time

2021-02-19 Thread Juergen Gross
t set. Cc: sta...@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross --- V2: - new patch V3: - use common helper for end of handler action (Julien Grall) - move setting is_active to 0 for lateeoi (Boris Ostrovsky) --- drivers/xen/events/events_base.c | 32

[PATCH v3 2/8] xen/events: don't unmask an event channel when an eoi is pending

2021-02-19 Thread Juergen Gross
/unmasking and temporary masking. The event channel should only be able to generate an interrupt if all flags are cleared. Cc: sta...@vger.kernel.org Fixes: 54c9de89895e0a36047 ("xen/events: add a new late EOI evtchn framework") Reported-by: Julien Grall Signed-off-by: Juergen Gross -

[PATCH v3 5/8] xen/events: link interdomain events to associated xenbus device

2021-02-19 Thread Juergen Gross
id of the other side. While at it remove the stale prototype of bind_evtchn_to_irq_lateeoi(). Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Reviewed-by: Wei Liu Reviewed-by: Paul Durrant --- drivers/block/xen-blkback/xenbus.c | 2 +- drivers/net/xen-netback/interface.c | 16

[PATCH v3 7/8] xen/evtchn: use smp barriers for user event ring

2021-02-19 Thread Juergen Gross
The ring buffer for user events is local to the given kernel instance, so smp barriers are fine for ensuring consistency. Reported-by: Andrew Cooper Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- drivers/xen/evtchn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v3 6/8] xen/events: add per-xenbus device event statistics and settings

2021-02-19 Thread Juergen Gross
Add syfs nodes for each xenbus device showing event statistics (number of events and spurious events, number of associated event channels) and for setting a spurious event threshold in case a frontend is sending too many events without being rogue on purpose. Signed-off-by: Juergen Gross

[PATCH v3 8/8] xen/evtchn: use READ/WRITE_ONCE() for accessing ring indices

2021-02-19 Thread Juergen Gross
For avoiding read- and write-tearing by the compiler use READ_ONCE() and WRITE_ONCE() for accessing the ring indices in evtchn.c. Signed-off-by: Juergen Gross --- V2: - modify all accesses (Julien Grall) V3: - fix incrementing producer index (Ross Lagerwall) --- drivers/xen/evtchn.c | 25

[PATCH] xen/netback: avoid race in xenvif_rx_ring_slots_available()

2021-02-01 Thread Juergen Gross
uot;xen/netback: use lateeoi irq binding") Cc: sta...@vger.kernel.org Signed-off-by: Juergen Gross --- drivers/net/xen-netback/rx.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/xen-netback/rx.c b/drivers/net/xen-netback/rx.c index b8febe1d1bfd..accc9

[PATCH 0/3] kernel/smp.c: add more CSD lock debugging

2021-02-26 Thread Juergen Gross
, but this option will have a larger impact on performance. I hope that the "ext" setting will help to find the root cause of the problem. Juergen Gross (3): kernel/smp: add boot parameter for controlling CSD lock debugging kernel/smp: prepare more CSD lock debugging kernel/smp: add

[PATCH 2/3] kernel/smp: prepare more CSD lock debugging

2021-02-26 Thread Juergen Gross
In order to be able to easily add more CSD lock debugging data to struct call_function_data->csd move the call_single_data_t element into a sub-structure. Signed-off-by: Juergen Gross --- kernel/smp.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ker

[PATCH 3/3] kernel/smp: add more data to CSD lock debugging

2021-02-26 Thread Juergen Gross
rinted out when a hang is detected. Signed-off-by: Juergen Gross --- .../admin-guide/kernel-parameters.txt | 4 + kernel/smp.c | 143 +- 2 files changed, 144 insertions(+), 3 deletions(-) diff --git a/Documentation/admin-guide/kernel-parame

[PATCH 1/3] kernel/smp: add boot parameter for controlling CSD lock debugging

2021-02-26 Thread Juergen Gross
boot parameter for switching the debug functionality on. This will reduce any performance impact of the debug coding to a bare minimum when not being used. Signed-off-by: Juergen Gross --- .../admin-guide/kernel-parameters.txt | 6 +++ kernel/smp.c | 38

[GIT PULL] xen: branch for v5.12-rc1

2021-02-26 Thread Juergen Gross
(+), 16 deletions(-) Jan Beulich (1): xen-front-pgdir-shbuf: don't record wrong grant handle upon error Juergen Gross (3): xen/events: add per-xenbus device event statistics and settings xen/evtchn: use smp barriers for user event ring xen/evtchn: use READ/WRITE_ONCE(

[GIT PULL] xen: branch for v5.9-rc1

2020-08-06 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.9-rc1-tag xen: branch for v5.9-rc1 It contains the following: - two trivial comment fixes - A small series for the Xen balloon driver fixing some issues - A series of the Xen privcm

[PATCH v3 6/7] x86/paravirt: use CONFIG_PARAVIRT_XXL instead of CONFIG_PARAVIRT

2020-08-07 Thread Juergen Gross
There are some code parts using CONFIG_PARAVIRT for Xen pvops related issues instead of the more stringent CONFIG_PARAVIRT_XXL. Signed-off-by: Juergen Gross --- arch/x86/entry/entry_64.S| 4 ++-- arch/x86/include/asm/fixmap.h| 2 +- arch/x86/include/asm/required

[PATCH v3 4/7] x86/paravirt: remove 32-bit support from PARAVIRT_XXL

2020-08-07 Thread Juergen Gross
The last 32-bit user of stuff under CONFIG_PARAVIRT_XXL is gone. Remove 32-bit specific parts. Signed-off-by: Juergen Gross --- arch/x86/entry/vdso/vdso32/vclock_gettime.c | 1 + arch/x86/include/asm/paravirt.h | 92 +++-- arch/x86/include/asm/paravirt_types.h

[PATCH v3 7/7] x86/entry/32: revert "Fix XEN_PV build dependency"

2020-08-07 Thread Juergen Gross
With 32-bit Xen PV support gone commit a4c0e91d1d65bc58 ("x86/entry/32: Fix XEN_PV build dependency") can be reverted again. Signed-off-by: Juergen Gross --- arch/x86/include/asm/idtentry.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/id

[PATCH v3 3/7] x86/xen: drop tests for highmem in pv code

2020-08-07 Thread Juergen Gross
With support for 32-bit pv guests gone pure pv-code no longer needs to test for highmem. Dropping those tests removes the need for flushing in some places. Signed-off-by: Juergen Gross --- arch/x86/xen/enlighten_pv.c | 11 ++- arch/x86/xen/mmu_pv.c | 138

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

2020-08-07 Thread Juergen Gross
support from the kernel. Signed-off-by: Juergen Gross --- arch/x86/entry/entry_32.S | 109 + arch/x86/entry/vdso/vdso32/note.S | 30 --- arch/x86/include/asm/proto.h | 2 +- arch/x86/include/asm/segment.h| 2 +- arch/x86/kernel/head_32.S | 31 --- arch/x86/xen

[PATCH v3 2/7] x86/xen: eliminate xen-asm_64.S

2020-08-07 Thread Juergen Gross
With 32-bit pv-guest support removed xen-asm_64.S can be merged with xen-asm.S Signed-off-by: Juergen Gross --- arch/x86/xen/Makefile | 3 +- arch/x86/xen/xen-asm.S| 179 +++ arch/x86/xen/xen-asm_64.S | 192 -- 3

[PATCH v3 0/7] Remove 32-bit Xen PV guest support

2020-08-07 Thread Juergen Gross
Changes in V2: - rebase to 5.8 kernel - addressed comments to V1 - new patches 3 and 4 Juergen Gross (7): x86/xen: remove 32-bit Xen PV guest support x86/xen: eliminate xen-asm_64.S x86/xen: drop tests for highmem in pv code x86/paravirt: remove 32-bit support from PARAVIRT_XXL x86

[PATCH v3 5/7] x86/paravirt: cleanup paravirt macros

2020-08-07 Thread Juergen Gross
Some paravirt macros are no longer used, delete them. Signed-off-by: Juergen Gross --- arch/x86/include/asm/paravirt.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index dedc89a07826..99da08852df0 100644

[GIT PULL] xen: branch for v5.10-rc8

2020-12-11 Thread Juergen Gross
+++--- drivers/xen/xen-scsiback.c | 60 -- include/xen/grant_table.h | 17 + 7 files changed, 182 insertions(+), 137 deletions(-) Juergen Gross (2): xen: add helpers for caching grant mapping pages xen: don't use page->lru for ZONE_DEVICE memory

[PATCH 0/2] xen: fix using ZONE_DEVICE memory for foreign mappings

2020-12-07 Thread Juergen Gross
Fix an issue found in dom0 when running on a host with NVMe. Juergen Gross (2): xen: add helpers for caching grant mapping pages xen: don't use page->lru for ZONE_DEVICE memory drivers/block/xen-blkback/blkback.c | 89 drivers/block/xen-blkback/common.

[PATCH 2/2] xen: don't use page->lru for ZONE_DEVICE memory

2020-12-07 Thread Juergen Gross
instead. Fixes: 9e2369c06c8a18 ("xen: add helpers to allocate unpopulated memory") Signed-off-by: Juergen Gross --- drivers/xen/grant-table.c | 65 + drivers/xen/unpopulated-alloc.c | 20 +- include/xen/grant_table.h | 4 ++ 3 files cha

[PATCH 1/2] xen: add helpers for caching grant mapping pages

2020-12-07 Thread Juergen Gross
Instead of having similar helpers in multiple backend drivers use common helpers for caching pages allocated via gnttab_alloc_pages(). Make use of those helpers in blkback and scsiback. Signed-off-by: Juergen Gross --- drivers/block/xen-blkback/blkback.c | 89

[GIT PULL] xen: branch for v5.12-rc2

2021-03-04 Thread Juergen Gross
(-) Jan Beulich (2): Xen/gnttab: handle p2m update errors on a per-slot basis xen-netback: respect gnttab_map_refs()'s return value Juergen Gross (1): xen: fix p2m size in dom0 for disabled memory hotplug case

[GIT PULL] xen: branch for v5.12-rc6

2021-03-30 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.12b-rc6-tag xen: branch for v5.12-rc6 It contains one Xen related security fix (XSA-371). Thanks. Juergen drivers/block/xen-blkback/blkback.c | 2 +- 1 file changed, 1 insertion

Re: [PATCH] xen/pciback: Fix incorrect type warnings

2021-03-29 Thread Juergen Gross
] state drivers/xen/xen-pciback/pci_stub.c:973:31:got int Signed-off-by: Muhammad Usama Anjum Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: application/pgp-keys OpenPGP_signature Description: OpenPGP digital signature

[GIT PULL] xen: branch for v5.12-rc5

2021-03-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.12b-rc5-tag xen: branch for v5.12-rc5 It contains a small series with a more elegant fix of a problem which was originally fixed in rc2. Thanks. Juergen arch/x86/include/asm/xen

Re: [PATCH net v3] net: sched: fix packet stuck problem for lockless qdisc

2021-04-12 Thread Juergen Gross
On 12.04.21 03:04, Yunsheng Lin wrote: On 2021/4/9 13:31, Juergen Gross wrote: On 25.03.21 04:13, Yunsheng Lin wrote: Lockless qdisc has below concurrent problem: cpu0 cpu1 . . q->enqu

Re: [PATCH 2/7] xen/gntdev,x86: Remove apply_to_page_range() use from module

2021-04-12 Thread Juergen Gross
On 12.04.21 10:26, Christoph Hellwig wrote: On Mon, Apr 12, 2021 at 10:00:14AM +0200, Peter Zijlstra wrote: Instead of relying on apply_to_page_range() being available to modules, move its use into core kernel code and export it's application. This doesn't exactly look great, but at least it c

Re: [PATCH net v3] net: sched: fix packet stuck problem for lockless qdisc

2021-04-13 Thread Juergen Gross
On 13.04.21 11:03, Yunsheng Lin wrote: On 2021/4/13 16:33, Hillf Danton wrote: On Tue, 13 Apr 2021 15:57:29 Yunsheng Lin wrote: On 2021/4/13 15:12, Hillf Danton wrote: On Tue, 13 Apr 2021 11:34:27 Yunsheng Lin wrote: On 2021/4/13 11:26, Hillf Danton wrote: On Tue, 13 Apr 2021 10:56:42 Yunsh

Re: Packet gets stuck in NOLOCK pfifo_fast qdisc

2021-04-06 Thread Juergen Gross
On 06.04.21 09:06, Michal Kubecek wrote: On Tue, Apr 06, 2021 at 08:55:41AM +0800, Yunsheng Lin wrote: Hi, Jiri Do you have a reproducer that can be shared here? With reproducer, I can debug and test it myself too. I'm afraid we are not aware of a simple reproducer. As mentioned in the origin

Re: [PATCH v3 3/4] kernel/smp: add more data to CSD lock debugging

2021-04-02 Thread Juergen Gross
On 30.03.21 19:33, Paul E. McKenney wrote: On Wed, Mar 24, 2021 at 11:18:03AM +0100, Jürgen Groß wrote: On 02.03.21 07:28, Juergen Gross wrote: In order to help identifying problems with IPI handling and remote function execution add some more data to IPI debugging code. There have been

[GIT PULL] xen: branch for v5.12-rc7

2021-04-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.12b-rc7-tag xen: branch for v5.12-rc7 It contains a single fix of a 5.12 patch for the rather uncommon problem of running as a Xen guest with a real time kernel config. Thanks. J

Re: [PATCH v3 3/4] kernel/smp: add more data to CSD lock debugging

2021-04-05 Thread Juergen Gross
On 02.04.21 18:11, Paul E. McKenney wrote: On Fri, Apr 02, 2021 at 05:46:52PM +0200, Juergen Gross wrote: On 30.03.21 19:33, Paul E. McKenney wrote: On Wed, Mar 24, 2021 at 11:18:03AM +0100, Jürgen Groß wrote: On 02.03.21 07:28, Juergen Gross wrote: In order to help identifying problems with

[PATCH] xen/xenbus: make xs_talkv() interruptible for SIGKILL

2020-12-09 Thread Juergen Gross
In case a process waits for any Xenstore action in the xenbus driver it should be interruptible via SIGKILL. Signed-off-by: Juergen Gross --- drivers/xen/xenbus/xenbus_xs.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen

[GIT PULL] xen: branch for v5.10-rc5

2020-11-19 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.10b-rc5-tag xen: branch for v5.10-rc5 It contains a single fix for avoiding WARN splats when booting a Xen guest with nosmt. Thanks. Juergen arch/x86/xen/spinlock.c | 12 +++

[PATCH v2 05/12] x86: rework arch_local_irq_restore() to not use popf

2020-11-20 Thread Juergen Gross
ested-by: Andy Lutomirski Signed-off-by: Juergen Gross --- arch/x86/include/asm/irqflags.h | 20 ++- arch/x86/include/asm/paravirt.h | 5 - arch/x86/include/asm/paravirt_types.h | 7 ++- arch/x86/kernel/irqflags.S| 11 --- arch/x86/kernel/p

[PATCH v2 00/12] x86: major paravirt cleanup

2020-11-20 Thread Juergen Gross
file disentangling. Note that an updated objtool is needed for this series, as otherwise lots of warnings due to alternative instructions modifying the stack will be issued during the build. Changes in V2: - added patches 5-12 Juergen Gross (12): x86/xen: use specific Xen pv interrupt entry for

[PATCH v2 04/12] x86/xen: drop USERGS_SYSRET64 paravirt call

2020-11-20 Thread Juergen Gross
in the kernel more than compensate for this drop (a kernel build in a Xen PV guest was slightly faster with this patch applied). While at it remove the stale sysret32 remnants. Signed-off-by: Juergen Gross Acked-by: Andy Lutomirski Acked-by: Peter Zijlstra (Intel) --- arch/x86/entry/entry_64

[PATCH v2 08/12] x86/paravirt: remove no longer needed 32-bit pvops cruft

2020-11-20 Thread Juergen Gross
code only, so it can just be replaced by cli. INTERRUPT_RETURN in 32-bit code can be replaced by iret. GET_CR2_INTO_AX and ENABLE_INTERRUPTS are used nowhere, so they can be removed. Signed-off-by: Juergen Gross --- arch/x86/entry/entry_32.S | 4 +- arch/x86/include/asm/irqflags.h

[PATCH v2 07/12] x86: add new features for paravirt patching

2020-11-20 Thread Juergen Gross
patching later. Make sure paravirt patching is performed before alternative patching. Signed-off-by: Juergen Gross --- arch/x86/include/asm/cpufeatures.h | 3 +++ arch/x86/kernel/alternative.c | 28 ++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git

[PATCH v2 12/12] x86/paravirt: have only one paravirt patch function

2020-11-20 Thread Juergen Gross
There is no need any longer to have different paravirt patch functions for native and Xen. Eliminate native_patch() and rename paravirt_patch_default() to paravirt_patch(). Signed-off-by: Juergen Gross --- arch/x86/include/asm/paravirt_types.h | 19 +-- arch/x86/kernel/Makefile

[PATCH v2 10/12] x86/paravirt: add new macros PVOP_ALT* supporting pvops in ALTERNATIVEs

2020-11-20 Thread Juergen Gross
Instead of using paravirt patching for custom code sequences add support for using ALTERNATIVE handling combined with paravirt call patching. Signed-off-by: Juergen Gross --- arch/x86/include/asm/paravirt_types.h | 62 +++ 1 file changed, 62 insertions(+) diff --git a

[PATCH v2 02/12] x86/xen: use specific Xen pv interrupt entry for DF

2020-11-20 Thread Juergen Gross
Xen PV guests don't use IST. For double fault interrupts switch to the same model as NMI. Correct a typo in a comment while copying it. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- V2: - fix typo (Andy Lutomirski) --- arch/x86/include/asm/idtentry.h | 3 +++ arch/x8

[PATCH v2 06/12] x86/paravirt: switch time pvops functions to use static_call()

2020-11-20 Thread Juergen Gross
out the time interfaces into a new header file. Signed-off-by: Juergen Gross --- arch/x86/Kconfig | 1 + arch/x86/include/asm/mshyperv.h | 11 arch/x86/include/asm/paravirt.h | 14 -- arch/x86/include/asm/paravirt_time.h | 38

[PATCH v2 01/12] x86/xen: use specific Xen pv interrupt entry for MCE

2020-11-20 Thread Juergen Gross
Xen PV guests don't use IST. For machine check interrupts switch to the same model as debug interrupts. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/idtentry.h | 3 +++ arch/x86/xen/enlighten_pv.c | 16 +++- arch/x86/xen/xen-

[PATCH v2 03/12] x86/pv: switch SWAPGS to ALTERNATIVE

2020-11-20 Thread Juergen Gross
are never executed in a Xen PV guest. Replace those with the plain swapgs instruction. For SWAPGS_UNSAFE_STACK the same applies. Signed-off-by: Juergen Gross Acked-by: Andy Lutomirski Acked-by: Peter Zijlstra (Intel) --- arch/x86/entry/entry_64.S | 10 +- arch/x86/include/asm

[PATCH v2 11/12] x86/paravirt: switch functions with custom code to ALTERNATIVE

2020-11-20 Thread Juergen Gross
: Juergen Gross --- arch/x86/include/asm/paravirt.h | 73 ++ arch/x86/include/asm/paravirt_types.h | 1 - arch/x86/kernel/paravirt.c| 16 ++--- arch/x86/kernel/paravirt_patch.c | 88 --- 4 files changed, 54 insertions(+), 124 deletions

[PATCH v2 09/12] x86/paravirt: switch iret pvops to ALTERNATIVE

2020-11-20 Thread Juergen Gross
The iret paravirt op is rather special as it is using a jmp instead of a call instruction. Switch it to ALTERNATIVE. Signed-off-by: Juergen Gross --- arch/x86/include/asm/paravirt.h | 7 --- arch/x86/include/asm/paravirt_types.h | 5 + arch/x86/kernel/asm-offsets.c | 5

[PATCH v3 00/15] x86: major paravirt cleanup

2020-12-17 Thread Juergen Gross
file disentangling. Changes in V3: - added patches 7 and 12 - addressed all comments Changes in V2: - added patches 5-12 Juergen Gross (14): x86/xen: use specific Xen pv interrupt entry for MCE x86/xen: use specific Xen pv interrupt entry for DF x86/pv: switch SWAPGS to ALTERNATIVE x86/xen

[PATCH v3 03/15] x86/pv: switch SWAPGS to ALTERNATIVE

2020-12-17 Thread Juergen Gross
are never executed in a Xen PV guest. Replace those with the plain swapgs instruction. For SWAPGS_UNSAFE_STACK the same applies. Signed-off-by: Juergen Gross Acked-by: Andy Lutomirski Acked-by: Peter Zijlstra (Intel) Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner --- arch/x86/entry

[PATCH v3 02/15] x86/xen: use specific Xen pv interrupt entry for DF

2020-12-17 Thread Juergen Gross
Xen PV guests don't use IST. For double fault interrupts switch to the same model as NMI. Correct a typo in a comment while copying it. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner --- V2: - fix typo (Andy Lutomirski) --- arch/x86/includ

[PATCH v3 01/15] x86/xen: use specific Xen pv interrupt entry for MCE

2020-12-17 Thread Juergen Gross
Xen PV guests don't use IST. For machine check interrupts switch to the same model as debug interrupts. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner --- arch/x86/include/asm/idtentry.h | 3 +++ arch/x86/xen/enlighten_pv.c

[PATCH v3 13/15] x86/paravirt: add new macros PVOP_ALT* supporting pvops in ALTERNATIVEs

2020-12-17 Thread Juergen Gross
Instead of using paravirt patching for custom code sequences add support for using ALTERNATIVE handling combined with paravirt call patching. Signed-off-by: Juergen Gross --- V3: - drop PVOP_ALT_VCALL() macro --- arch/x86/include/asm/paravirt_types.h | 49 +++ 1 file

[PATCH v3 07/15] x86/alternative: support "not feature" and ALTERNATIVE_TERNARY

2020-12-17 Thread Juergen Gross
TIVE_TERNARY "default_instr", FEATURE_NR, "feature_on_instr", "feature_off_instr" which will start with "default_instr" and at patch time will, depending on FEATURE_NR being set or not, patch that with either "feature_on_instr" or "f

[PATCH v3 10/15] x86/paravirt: simplify paravirt macros

2020-12-17 Thread Juergen Gross
)PVOP_CALL(long, ...). Note that it isn't easily possible to just redefine PVOP_VCALL() to use PVOP_CALL() instead, as this would require further hiding of commas in macro parameters. Signed-off-by: Juergen Gross --- V3: - new patch --- arch/x86/include/asm/paravirt_types.h

[PATCH v3 15/15] x86/paravirt: have only one paravirt patch function

2020-12-17 Thread Juergen Gross
There is no need any longer to have different paravirt patch functions for native and Xen. Eliminate native_patch() and rename paravirt_patch_default() to paravirt_patch(). Signed-off-by: Juergen Gross --- V3: - remove paravirt_patch_insns() (kernel test robot) --- arch/x86/include/asm

[PATCH v3 12/15] objtool: Alternatives vs ORC, the hard way

2020-12-17 Thread Juergen Gross
d in objtool for the following patches of the series. Signed-off-by: Juergen Gross --- tools/objtool/check.c | 180 tools/objtool/check.h | 5 ++ tools/objtool/orc_gen.c | 178 +-- 3 files changed, 289 insert

[PATCH v3 08/15] x86: add new features for paravirt patching

2020-12-17 Thread Juergen Gross
patching later. Make sure paravirt patching is performed before alternative patching. Signed-off-by: Juergen Gross --- V3: - add comment (Boris Petkov) - no negative features (Boris Petkov) --- arch/x86/include/asm/cpufeatures.h | 2 ++ arch/x86/kernel/alternative.c | 40

[PATCH v3 04/15] x86/xen: drop USERGS_SYSRET64 paravirt call

2020-12-17 Thread Juergen Gross
in the kernel more than compensate for this drop (a kernel build in a Xen PV guest was slightly faster with this patch applied). While at it remove the stale sysret32 remnants. Signed-off-by: Juergen Gross --- V3: - simplify ALTERNATIVE (Boris Petkov) --- arch/x86/entry/entry_64.S

[PATCH v3 06/15] x86/paravirt: switch time pvops functions to use static_call()

2020-12-17 Thread Juergen Gross
out the time interfaces into a new header file. Signed-off-by: Juergen Gross --- arch/x86/Kconfig | 1 + arch/x86/include/asm/mshyperv.h | 11 arch/x86/include/asm/paravirt.h | 14 -- arch/x86/include/asm/paravirt_time.h | 38

[PATCH v3 05/15] x86: rework arch_local_irq_restore() to not use popf

2020-12-17 Thread Juergen Gross
ested-by: Andy Lutomirski Signed-off-by: Juergen Gross --- arch/x86/include/asm/irqflags.h | 20 ++- arch/x86/include/asm/paravirt.h | 5 - arch/x86/include/asm/paravirt_types.h | 7 ++- arch/x86/kernel/irqflags.S| 11 --- arch/x86/kernel/p

[PATCH v3 14/15] x86/paravirt: switch functions with custom code to ALTERNATIVE

2020-12-17 Thread Juergen Gross
: Juergen Gross --- arch/x86/include/asm/paravirt.h | 72 ++ arch/x86/include/asm/paravirt_types.h | 1 - arch/x86/kernel/paravirt.c| 16 ++--- arch/x86/kernel/paravirt_patch.c | 88 --- 4 files changed, 53 insertions(+), 124 deletions

[PATCH v3 09/15] x86/paravirt: remove no longer needed 32-bit pvops cruft

2020-12-17 Thread Juergen Gross
code only, so it can just be replaced by cli. INTERRUPT_RETURN in 32-bit code can be replaced by iret. ENABLE_INTERRUPTS is used nowhere, so it can be removed. Signed-off-by: Juergen Gross --- arch/x86/entry/entry_32.S | 4 +- arch/x86/include/asm/irqflags.h | 5 -- arch/x

[PATCH v3 11/15] x86/paravirt: switch iret pvops to ALTERNATIVE

2020-12-17 Thread Juergen Gross
The iret paravirt op is rather special as it is using a jmp instead of a call instruction. Switch it to ALTERNATIVE. Signed-off-by: Juergen Gross --- V3: - use ALTERNATIVE_TERNARY --- arch/x86/include/asm/paravirt.h | 6 +++--- arch/x86/include/asm/paravirt_types.h | 5 + arch/x86

[GIT PULL] xen: branch for v5.11-rc1

2020-12-18 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.11-rc1b-tag xen: branch for v5.11-rc1 It contains some minor cleanup patches and a small series disentangling some Xen related Kconfig options. Thanks. Juergen arch/x86/include/

[PATCH v2 0/3] kernel/smp.c: add more CSD lock debugging

2021-03-01 Thread Juergen Gross
, but this option will have a larger impact on performance. I hope that the "ext" setting will help to find the root cause of the problem. Juergen Gross (3): kernel/smp: add boot parameter for controlling CSD lock debugging kernel/smp: prepare more CSD lock debugging kernel/smp: add

[PATCH v2 3/3] kernel/smp: add more data to CSD lock debugging

2021-03-01 Thread Juergen Gross
the related events just before those (for adding data needed to identify a possible race). Printing all available data would be possible, but this would add large amounts of data printed on larger configurations. Signed-off-by: Juergen Gross Tested-by: Paul E. McKenney --- V2: - add automati

[PATCH v2 1/3] kernel/smp: add boot parameter for controlling CSD lock debugging

2021-03-01 Thread Juergen Gross
boot parameter for switching the debug functionality on. This will reduce any performance impact of the debug coding to a bare minimum when not being used. Signed-off-by: Juergen Gross --- .../admin-guide/kernel-parameters.txt | 6 +++ kernel/smp.c | 38

[PATCH v2 2/3] kernel/smp: prepare more CSD lock debugging

2021-03-01 Thread Juergen Gross
In order to be able to easily add more CSD lock debugging data to struct call_function_data->csd move the call_single_data_t element into a sub-structure. Signed-off-by: Juergen Gross --- kernel/smp.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ker

[GIT PULL] xen: branch for v5.12-rc3

2021-03-12 Thread Juergen Gross
e k{,un}map_ops[] Xen/gnttab: introduce common INVALID_GRANT_{HANDLE,REF} Xen/gntdev: don't needlessly use kvcalloc() Juergen Gross (3): xen/events: reset affinity of 2-level event when tearing it down xen/events: don't unmask an event channel when an eoi is pending x

[PATCH v4 10/15] x86/paravirt: remove no longer needed 32-bit pvops cruft

2021-01-20 Thread Juergen Gross
code only, so it can just be replaced by cli. INTERRUPT_RETURN in 32-bit code can be replaced by iret. ENABLE_INTERRUPTS is used nowhere, so it can be removed. Signed-off-by: Juergen Gross --- arch/x86/entry/entry_32.S | 4 +- arch/x86/include/asm/irqflags.h | 5 -- arch/x

[PATCH v4 05/15] x86/xen: drop USERGS_SYSRET64 paravirt call

2021-01-20 Thread Juergen Gross
in the kernel more than compensate for this drop (a kernel build in a Xen PV guest was slightly faster with this patch applied). While at it remove the stale sysret32 remnants. Signed-off-by: Juergen Gross --- V3: - simplify ALTERNATIVE (Boris Petkov) --- arch/x86/entry/entry_64.S

[PATCH v4 09/15] x86: add new features for paravirt patching

2021-01-20 Thread Juergen Gross
patching later. Make sure paravirt patching is performed before alternative patching. Signed-off-by: Juergen Gross --- V3: - add comment (Boris Petkov) - no negative features (Boris Petkov) V4: - move paravirt_set_cap() to paravirt-spinlocks.c --- arch/x86/include/asm/cpufeatures.h | 2

[PATCH v4 14/15] x86/paravirt: switch functions with custom code to ALTERNATIVE

2021-01-20 Thread Juergen Gross
register defines for assembler paravirt calling, as there isn't much usage left. Signed-off-by: Juergen Gross --- V4: - fixed SAVE_FLAGS() (kernel test robot) - added assembler paravirt cleanup --- arch/x86/entry/entry_64.S | 2 +- arch/x86/include/asm/irqflags.h | 2 +- arc

[PATCH v4 11/15] x86/paravirt: simplify paravirt macros

2021-01-20 Thread Juergen Gross
)PVOP_CALL(long, ...). Note that it isn't easily possible to just redefine PVOP_VCALL() to use PVOP_CALL() instead, as this would require further hiding of commas in macro parameters. Signed-off-by: Juergen Gross --- V3: - new patch V4: - fix build warnings with clang (kernel test

[PATCH v4 12/15] x86/paravirt: switch iret pvops to ALTERNATIVE

2021-01-20 Thread Juergen Gross
The iret paravirt op is rather special as it is using a jmp instead of a call instruction. Switch it to ALTERNATIVE. Signed-off-by: Juergen Gross --- V3: - use ALTERNATIVE_TERNARY --- arch/x86/include/asm/paravirt.h | 6 +++--- arch/x86/include/asm/paravirt_types.h | 5 + arch/x86

[PATCH v4 15/15] x86/paravirt: have only one paravirt patch function

2021-01-20 Thread Juergen Gross
There is no need any longer to have different paravirt patch functions for native and Xen. Eliminate native_patch() and rename paravirt_patch_default() to paravirt_patch(). Signed-off-by: Juergen Gross --- V3: - remove paravirt_patch_insns() (kernel test robot) --- arch/x86/include/asm

<    1   2   3   4   5   6   7   8   9   10   >