[tip: locking/core] locking/csd_lock: Add more data to CSD lock debugging

2021-03-01 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the locking/core branch of tip: Commit-ID: 6bf3195fdbab92b57f3167101a0b651b93dbeae7 Gitweb: https://git.kernel.org/tip/6bf3195fdbab92b57f3167101a0b651b93dbeae7 Author:Juergen Gross AuthorDate:Mon, 01 Mar 2021 11:13:36 +01:00

[tip: locking/core] locking/csd_lock: Prepare more CSD lock debugging

2021-03-01 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the locking/core branch of tip: Commit-ID: b3e3bc34b1e938c6447fa8b646010c4016be7fad Gitweb: https://git.kernel.org/tip/b3e3bc34b1e938c6447fa8b646010c4016be7fad Author:Juergen Gross AuthorDate:Mon, 01 Mar 2021 11:13:35 +01:00

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

2021-03-01 Thread Juergen Gross
s 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 automatic data deciphering a

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

2021-03-01 Thread Juergen Gross
a 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

[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

[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

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

2021-02-26 Thread Juergen Gross
a 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 3/3] kernel/smp: add more data to CSD lock debugging

2021-02-26 Thread Juergen Gross
hen 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-parameters.txt b/Doc

[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 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 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 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 3/8] xen/events: avoid handling the same event on two cpus at the same time

2021-02-19 Thread Juergen Gross
. 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 1/8] xen/events: reset affinity of 2-level event when tearing it down

2021-02-19 Thread Juergen Gross
-by: 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/netback

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

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

2021-02-16 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.12-rc1-tag xen: branch for v5.12-rc1 This batch contains a series of Xen related security fixes, all related to limited error handling in Xen backend drivers. Thanks. Juergen

[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 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 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 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 1/8] xen/events: reset affinity of 2-level event when tearing it down

2021-02-11 Thread Juergen Gross
-by: 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 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 3/8] xen/events: avoid handling the same event on two cpus at the same time

2021-02-11 Thread Juergen Gross
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 e157e7506830..f7

[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 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/netback

[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

[tip: x86/paravirt] x86/xen: Drop USERGS_SYSRET64 paravirt call

2021-02-10 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/paravirt branch of tip: Commit-ID: afd30525a659ac0ae0904f0cb4a2ca75522c3123 Gitweb: https://git.kernel.org/tip/afd30525a659ac0ae0904f0cb4a2ca75522c3123 Author:Juergen Gross AuthorDate:Wed, 20 Jan 2021 14:55:45 +01:00

[tip: x86/paravirt] x86/pv: Switch SWAPGS to ALTERNATIVE

2021-02-10 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/paravirt branch of tip: Commit-ID: 53c9d9240944088274aadbbbafc6138ca462db4f Gitweb: https://git.kernel.org/tip/53c9d9240944088274aadbbbafc6138ca462db4f Author:Juergen Gross AuthorDate:Wed, 20 Jan 2021 14:55:44 +01:00

[tip: x86/paravirt] x86/xen: Use specific Xen pv interrupt entry for MCE

2021-02-10 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/paravirt branch of tip: Commit-ID: c3d7fa6684b5b3a07a48fc379d27bfb8a96661d9 Gitweb: https://git.kernel.org/tip/c3d7fa6684b5b3a07a48fc379d27bfb8a96661d9 Author:Juergen Gross AuthorDate:Wed, 20 Jan 2021 14:55:42 +01:00

[tip: x86/paravirt] x86/xen: Use specific Xen pv interrupt entry for DF

2021-02-10 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/paravirt branch of tip: Commit-ID: 5b4c6d65019bff65757f61adbbad5e45a333b800 Gitweb: https://git.kernel.org/tip/5b4c6d65019bff65757f61adbbad5e45a333b800 Author:Juergen Gross AuthorDate:Wed, 20 Jan 2021 14:55:43 +01:00

[tip: x86/paravirt] x86/pv: Rework arch_local_irq_restore() to not use popf

2021-02-10 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/paravirt branch of tip: Commit-ID: ab234a260b1f625b26cbefa93ca365b0ae66df33 Gitweb: https://git.kernel.org/tip/ab234a260b1f625b26cbefa93ca365b0ae66df33 Author:Juergen Gross AuthorDate:Wed, 20 Jan 2021 14:55:46 +01:00

[PATCH 4/7] xen/events: link interdomain events to associated xenbus device

2021-02-06 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 --- drivers/block/xen-blkback/xenbus.c | 2 +- drivers/net/xen-netback/interface.c | 16 +-- drivers/xen/events/events_base.c| 41

[PATCH 7/7] xen/evtchn: read producer index only once

2021-02-06 Thread Juergen Gross
In evtchn_read() use READ_ONCE() for reading the producer index in order to avoid the compiler generating multiple accesses. Signed-off-by: Juergen Gross --- drivers/xen/evtchn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/evtchn.c b/drivers/xen/evtchn.c

[PATCH 5/7] xen/events: add per-xenbus device event statistics and settings

2021-02-06 Thread Juergen Gross
Add sysfs 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 6/7] xen/evtch: use smp barriers for user event ring

2021-02-06 Thread Juergen Gross
The ring buffer for user events is used in the local system only, so smp barriers are fine for ensuring consistency. Reported-by: Andrew Cooper Signed-off-by: Juergen Gross --- drivers/xen/evtchn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/xen/evtchn.c b

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

2021-02-06 Thread Juergen Gross
/unmasking. The event channel should only be able to generate an interrupt if both 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 --- drivers/xen/event

[PATCH 1/7] xen/events: reset affinity of 2-level event initially

2021-02-06 Thread Juergen Gross
. As percpu events get initialized before the percpu event channel hook is called, resetting of the affinities happens after offlining a vcpu (this is working, as initial percpu memory is zeroed out). Cc: sta...@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross --- drivers/xen

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

2021-02-06 Thread Juergen Gross
control. Patches 6 and 7 are minor fixes I had lying around. Juergen Gross (7): xen/events: reset affinity of 2-level event initially xen/events: don't unmask an event channel when an eoi is pending xen/events: fix lateeoi irq acknowledgement xen/events: link interdomain events to associated

[PATCH 3/7] xen/events: fix lateeoi irq acknowledgment

2021-02-06 Thread Juergen Gross
kernel.org Signed-off-by: Juergen Gross --- drivers/xen/events/events_base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index 6a836d131e73..7b26ef817f8b 100644 --- a/drivers/xen/events/events_base.c +++ b/drivers/

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

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

2021-01-28 Thread Juergen Gross
+++ 5 files changed, 54 insertions(+), 14 deletions(-) David Woodhouse (1): xen: Fix XenStore initialisation for XS_LOCAL Juergen Gross (1): x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled Roger Pau Monne (1): xen-blkfront: allow discard-* nodes

[PATCH v2] x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled

2021-01-27 Thread Juergen Gross
andler, which will just panic the system in case such a trap will ever happen. Fixes: 0786138c78e793 ("x86/sev-es: Add a Runtime #VC Exception Handler") Cc: # v5.10 Signed-off-by: Juergen Gross --- V2: - use generic handler for unknown traps (Andrew Cooper) --- arch/x86/include/asm

[PATCH] x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled

2021-01-25 Thread Juergen Gross
Runtime #VC Exception Handler") Cc: # v5.10 Signed-off-by: Juergen Gross --- arch/x86/include/asm/idtentry.h | 3 +++ arch/x86/xen/enlighten_pv.c | 11 +++ arch/x86/xen/xen-asm.S | 3 +++ 3 files changed, 17 insertions(+) diff --git a/arch/x86/include/asm/idtentry.h b/

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

2021-01-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 --- V3: - drop PVOP_ALT_VCALL() macro --- arch/x86/include/asm/paravirt_types.h | 49 ++- 1 file

[PATCH v4 01/15] static_call: Pull some static_call declarations to the type headers

2021-01-20 Thread Juergen Gross
-by: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Mel Gorman Cc: Ingo Molnar Cc: Michal Hocko Cc: Paul E. McKenney Signed-off-by: Juergen Gross --- include/linux/static_call.h | 20 -- include/linux/static_call_types.h | 27 + tools

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

2021-01-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) Reviewed-by: Thomas Gleixner --- V2: - fix typo (Andy Lutomirski) --- arch/x86/include/asm

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

2021-01-20 Thread Juergen Gross
as objtool patches are in tip now - added patch 1 for making usage of static_call easier - even more cleanup 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 sp

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

2021-01-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) Reviewed-by: Thomas Gleixner --- arch/x86/include/asm/idtentry.h | 3 +++ arch/x86/xen/enlighten_pv.c | 16

[PATCH v4 04/15] x86/pv: switch SWAPGS to ALTERNATIVE

2021-01-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) Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner --- arch/x86/entry

[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 06/15] x86: rework arch_local_irq_restore() to not use popf

2021-01-20 Thread Juergen Gross
-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/paravi

[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 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 08/15] x86/alternative: support "not feature" and ALTERNATIVE_TERNARY

2021-01-20 Thread Juergen Gross
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 "feature_off_ins

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

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

2021-01-20 Thread Juergen Gross
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/x86/in

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

2021-01-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 --- V3: - drop PVOP_ALT_VCALL() macro --- arch/x86/include/asm/paravirt_types.h | 49 ++- 1 file

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

2021-01-20 Thread Juergen Gross
the 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 +- 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

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

2021-01-20 Thread Juergen Gross
The time pvops functions are the only ones left which might be used in 32-bit mode and which return a 64-bit value. Switch them to use the static_call() mechanism instead of pvops, as this allows quite some simplification of the pvops implementation. Signed-off-by: Juergen Gross --- V4: - drop

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

2021-01-20 Thread Juergen Gross
The time pvops functions are the only ones left which might be used in 32-bit mode and which return a 64-bit value. Switch them to use the static_call() mechanism instead of pvops, as this allows quite some simplification of the pvops implementation. Signed-off-by: Juergen Gross --- V4: - drop

[PATCH v4 08/15] x86/alternative: support "not feature" and ALTERNATIVE_TERNARY

2021-01-20 Thread Juergen Gross
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 "feature_off_ins

[PATCH v4 04/15] x86/pv: switch SWAPGS to ALTERNATIVE

2021-01-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) Reviewed-by: Borislav Petkov Reviewed-by: Thomas Gleixner --- arch/x86/entry

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

2021-01-20 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-rc5-tag xen: branch for v5.11-rc5 It contains a fix for build failure showing up in some configurations. Thanks. Juergen arch/x86/xen/smp_hvm.c | 2 ++ 1 file changed, 2

[PATCH v4 01/15] static_call: Pull some static_call declarations to the type headers

2021-01-20 Thread Juergen Gross
-by: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Mel Gorman Cc: Ingo Molnar Cc: Michal Hocko Cc: Paul E. McKenney Signed-off-by: Juergen Gross --- include/linux/static_call.h | 20 -- include/linux/static_call_types.h | 27 + tools

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

2021-01-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) Reviewed-by: Thomas Gleixner --- arch/x86/include/asm/idtentry.h | 3 +++ arch/x86/xen/enlighten_pv.c | 16

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

2021-01-20 Thread Juergen Gross
ed patch 1 for making usage of static_call easier - even more cleanup 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 D

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

2021-01-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) Reviewed-by: Thomas Gleixner --- V2: - fix typo (Andy Lutomirski) --- arch/x86/include/asm

[PATCH v4 06/15] x86: rework arch_local_irq_restore() to not use popf

2021-01-20 Thread Juergen Gross
-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/paravi

[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

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

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

2021-01-20 Thread Juergen Gross
the 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 +- arch/x86

[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 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 10/15] x86/paravirt: remove no longer needed 32-bit pvops cruft

2021-01-20 Thread Juergen Gross
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/x86/in

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

2021-01-15 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-rc4-tag xen: branch for v5.11-rc4 It contains: - A series for fixing a regression when running as a fully virtualized guest on an old Xen hypervisor not supporting PV

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

2021-01-15 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-rc4-tag xen: branch for v5.11-rc4 It contains: - A series for fixing a regression when running as a fully virtualized guest on an old Xen hypervisor not supporting PV

[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

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

2020-12-17 Thread Juergen Gross
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 insertions(+), 74 deletion

[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 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 09/15] x86/paravirt: remove no longer needed 32-bit pvops cruft

2020-12-17 Thread Juergen Gross
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/x86/in

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

[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 14/15] x86/paravirt: switch functions with custom code to ALTERNATIVE

2020-12-17 Thread Juergen Gross
-by: 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 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 05/15] x86: rework arch_local_irq_restore() to not use popf

2020-12-17 Thread Juergen Gross
-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/paravi

[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

[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/include/asm

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

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