Re: [PATCH 4/5] LoongArch: Add paravirt interface for guest kernel

2024-01-03 Thread Juergen Gross
On 03.01.24 09:00, maobibo wrote: On 2024/1/3 下午3:40, Jürgen Groß wrote: On 03.01.24 08:16, Bibo Mao wrote: The patch add paravirt interface for guest kernel, it checks whether system runs on VM mode. If it is, it will detect hypervisor type. And returns true it is KVM hypervisor, else

[PATCH v6 5/5] x86/paravirt: remove no longer needed paravirt patching code

2023-12-09 Thread Juergen Gross
Now that paravirt is using the alternatives patching infrastructure, remove the paravirt patching code. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/paravirt.h | 13 -- arch/x86/include/asm/paravirt_types.h | 38 --- arch/x86

[PATCH v6 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-12-09 Thread Juergen Gross
Instead of stacking alternative and paravirt patching, use the new ALT_FLAG_CALL flag to switch those mixed calls to pure alternative handling. This eliminates the need to be careful regarding the sequence of alternative and paravirt patching. Signed-off-by: Juergen Gross Acked-by: Peter

[PATCH v6 2/5] x86/paravirt: move some functions and defines to alternative

2023-12-09 Thread Juergen Gross
As a preparation for replacing paravirt patching completely by alternative patching, move some backend functions and #defines to alternative code and header. Signed-off-by: Juergen Gross --- V4: - rename x86_nop() to nop_func() and x86_BUG() to BUG_func() (Boris Petkov) --- arch/x86/include

[PATCH v6 1/5] x86/paravirt: introduce ALT_NOT_XEN

2023-12-09 Thread Juergen Gross
Introduce the macro ALT_NOT_XEN as a short form of ALT_NOT(X86_FEATURE_XENPV). Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Juergen Gross --- V3: - split off from next patch V5: - move patch to the start of the series (Boris Petkov) --- arch/x86/include/asm/paravirt.h | 42

[PATCH v6 0/5] 86/paravirt: Get rid of paravirt patching

2023-12-09 Thread Juergen Gross
- rebase of patch 2 as suggested by Peter - addressed Peter's comments for patch 3 Juergen Gross (5): x86/paravirt: introduce ALT_NOT_XEN x86/paravirt: move some functions and defines to alternative x86/alternative: add indirect call patching x86/paravirt: switch mixed paravirt/alternative calls

Re: [PATCH v5 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-12-08 Thread Juergen Gross
On 08.12.23 13:57, Borislav Petkov wrote: On Fri, Dec 08, 2023 at 12:53:47PM +0100, Juergen Gross wrote: Took me a while to find it. Patch 5 was repairing the issue again Can't have that. Any patch in any set must build and boot successfully for bisection reasons. Of course. The problem

Re: [PATCH v5 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-12-08 Thread Juergen Gross
On 06.12.23 12:08, Borislav Petkov wrote: On Wed, Nov 29, 2023 at 02:33:31PM +0100, Juergen Gross wrote: Instead of stacking alternative and paravirt patching, use the new ALT_FLAG_CALL flag to switch those mixed calls to pure alternative handling. This eliminates the need to be careful

[PATCH v5 1/5] x86/paravirt: introduce ALT_NOT_XEN

2023-11-29 Thread Juergen Gross
Introduce the macro ALT_NOT_XEN as a short form of ALT_NOT(X86_FEATURE_XENPV). Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Juergen Gross --- V3: - split off from next patch V5: - move patch to the start of the series (Boris Petkov) --- arch/x86/include/asm/paravirt.h | 42

Re: [PATCH v4 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-11-29 Thread Juergen Gross
On 21.11.23 19:45, Borislav Petkov wrote: On Mon, Oct 30, 2023 at 03:25:07PM +0100, Juergen Gross wrote: Instead of stacking alternative and paravirt patching, use the new ALT_FLAG_CALL flag to switch those mixed calls to pure alternative handling. This eliminates the need to be careful

Re: [PATCH v4 3/5] x86/paravirt: introduce ALT_NOT_XEN

2023-11-14 Thread Juergen Gross
On 14.11.23 16:09, Borislav Petkov wrote: On Mon, Oct 30, 2023 at 03:25:06PM +0100, Juergen Gross wrote: Introduce the macro ALT_NOT_XEN as a short form of ALT_NOT(X86_FEATURE_XENPV). Not crazy about adding yet another macro indirection - at least with the X86_FEATURE_ it is clear what

Re: [PATCH 2/3] x86/xen: move paravirt lazy code

2023-09-13 Thread Juergen Gross
On 13.09.23 15:26, Steven Rostedt wrote: On Wed, 13 Sep 2023 13:38:27 +0200 Juergen Gross wrote: diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h index 44a3f565264d..0577f0cdd231 100644 --- a/include/trace/events/xen.h +++ b/include/trace/events/xen.h @@ -6,26 +6,26

[PATCH 2/3] x86/xen: move paravirt lazy code

2023-09-13 Thread Juergen Gross
change. Signed-off-by: Juergen Gross --- arch/x86/include/asm/paravirt_types.h | 15 -- arch/x86/include/asm/xen/hypervisor.h | 26 +++ arch/x86/kernel/paravirt.c| 67 --- arch/x86/xen/enlighten_pv.c | 39 +--- a

[PATCH 0/3] xen: cleanup and fix lazy mode handling

2023-09-13 Thread Juergen Gross
This small series is cleaning up Xen lazy mode handling by removing unused stuff and moving purely Xen-specific code away from general kernel code. The last patch is fixing a regression which was introduced in the 6.6 merge window. Juergen Gross (3): arm/xen: remove lazy mode related

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

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

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

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

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

2021-04-08 Thread Juergen Gross
erage latency reported by sysbench is well below 1 msec, but at least once per hour I get latencies in the minute range. With this patch I don't see these high latencies any longer (test is running for more than 20 hours now). So you can add my: Tested-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628

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

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

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

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

[tip: irq/core] irq: Simplify condition in irq_matrix_reserve()

2021-03-17 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the irq/core branch of tip: Commit-ID: 2c6b02185cc608c19a22691fadc6ca2cd114c286 Gitweb: https://git.kernel.org/tip/2c6b02185cc608c19a22691fadc6ca2cd114c286 Author:Juergen Gross AuthorDate:Thu, 11 Feb 2021 08:09:53 +01:00 Committer

[tip: x86/alternatives] x86/alternative: Support not-feature

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: dda7bb76484978316bb412a353789ebc5901de36 Gitweb: https://git.kernel.org/tip/dda7bb76484978316bb412a353789ebc5901de36 Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:10 +01:00

[tip: x86/alternatives] x86/alternative: Merge include files

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: 5e21a3ecad1500e35b46701e7f3f232e15d78e69 Gitweb: https://git.kernel.org/tip/5e21a3ecad1500e35b46701e7f3f232e15d78e69 Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:06 +01:00

[tip: x86/alternatives] static_call: Add function to query current function

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: 6ea312d95e0226b306bb4b8ee3a0727d880378cb Gitweb: https://git.kernel.org/tip/6ea312d95e0226b306bb4b8ee3a0727d880378cb Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:08 +01:00

[tip: x86/alternatives] static_call: Move struct static_call_key definition to static_call_types.h

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: b046664872dd78a8bebe3d5f3bb9da9baa93f5ca Gitweb: https://git.kernel.org/tip/b046664872dd78a8bebe3d5f3bb9da9baa93f5ca Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:07 +01:00

[tip: x86/alternatives] x86/alternative: Support ALTERNATIVE_TERNARY

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: e208b3c4a9748b2c17aa09ba663b5096ccf82dce Gitweb: https://git.kernel.org/tip/e208b3c4a9748b2c17aa09ba663b5096ccf82dce Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:11 +01:00

[tip: x86/alternatives] x86/paravirt: Switch time pvops functions to use static_call()

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: a0e2bf7cb7006b5a58ee81f4da4fe575875f2781 Gitweb: https://git.kernel.org/tip/a0e2bf7cb7006b5a58ee81f4da4fe575875f2781 Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:09 +01:00

[tip: x86/alternatives] x86/paravirt: Remove no longer needed 32-bit pvops cruft

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: 33634e42e38be61f320183dfc264b9caba292d4e Gitweb: https://git.kernel.org/tip/33634e42e38be61f320183dfc264b9caba292d4e Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:14 +01:00

[tip: x86/alternatives] x86/alternative: Use ALTERNATIVE_TERNARY() in _static_cpu_has()

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: 2fe2a2c7a97c9bc32acc79154b75e754280f7867 Gitweb: https://git.kernel.org/tip/2fe2a2c7a97c9bc32acc79154b75e754280f7867 Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:12 +01:00

[tip: x86/alternatives] x86/paravirt: Add new features for paravirt patching

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: 4e6292114c741221479046515b1aa8145cf1e3f6 Gitweb: https://git.kernel.org/tip/4e6292114c741221479046515b1aa8145cf1e3f6 Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:13 +01:00

[tip: x86/alternatives] x86/paravirt: Add new PVOP_ALT* macros to support pvops in ALTERNATIVEs

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: 00aa3193ab7a04b25bb8c68e377815696eb5bf56 Gitweb: https://git.kernel.org/tip/00aa3193ab7a04b25bb8c68e377815696eb5bf56 Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:17 +01:00

[tip: x86/alternatives] x86/paravirt: Switch iret pvops to ALTERNATIVE

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: ae755b5a45482b5de4d96d6f35823076af77445e Gitweb: https://git.kernel.org/tip/ae755b5a45482b5de4d96d6f35823076af77445e Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:16 +01:00

[tip: x86/alternatives] x86/paravirt: Simplify paravirt macros

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: 0b8d366a942fd48a83dfa728e9f8a8d8b20e735f Gitweb: https://git.kernel.org/tip/0b8d366a942fd48a83dfa728e9f8a8d8b20e735f Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:15 +01:00

[tip: x86/alternatives] x86/paravirt: Switch functions with custom code to ALTERNATIVE

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: fafe5e74229fd3f425e3cbfc68b90e615aa6d62f Gitweb: https://git.kernel.org/tip/fafe5e74229fd3f425e3cbfc68b90e615aa6d62f Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:18 +01:00

[tip: x86/alternatives] x86/paravirt: Have only one paravirt patch function

2021-03-12 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: 054ac8ad5ebe4a69e1f0e842483821ddbe560121 Gitweb: https://git.kernel.org/tip/054ac8ad5ebe4a69e1f0e842483821ddbe560121 Author:Juergen Gross AuthorDate:Thu, 11 Mar 2021 15:23:19 +01:00

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

2021-03-12 Thread Juergen Gross
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 xen/events: avoi

[PATCH v7 06/14] x86/alternative: support ALTERNATIVE_TERNARY

2021-03-11 Thread Juergen Gross
ot;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_instr". Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- V3: - new patch V4: - use X86_FEATURE_ALWAYS instead

[PATCH v7 05/14] x86/alternative: support not-feature

2021-03-11 Thread Juergen Gross
Add support for alternative patching for the case a feature is not present on the current cpu. For users of ALTERNATIVE() and friends an inverted feature is specified by applying the ALT_NOT() macro to it, e.g.: ALTERNATIVE(old, new, ALT_NOT(feature)) Signed-off-by: Juergen Gross --- V5

[PATCH v7 00/14] x86: major paravirt cleanup

2021-03-11 Thread Juergen Gross
e 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/alternative: merge include files static_call: move struct static_call_key definition to static_call_types.h static_call:

[PATCH v7 04/14] x86/paravirt: switch time pvops functions to use static_call()

2021-03-11 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 Acked-by: Peter

[PATCH v7 14/14] x86/paravirt: have only one paravirt patch function

2021-03-11 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 Acked-by: Peter Zijlstra (Intel) --- V3: - remove paravirt_patch_insns() (kernel test robot

[PATCH v7 13/14] x86/paravirt: switch functions with custom code to ALTERNATIVE

2021-03-11 Thread Juergen Gross
the register defines for assembler paravirt calling, as there isn't much usage left. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- V4: - fixed SAVE_FLAGS() (kernel test robot) - added assembler paravirt cleanup --- arch/x86/entry/entry_64.S | 2 +- arch/x86/include/asm

[PATCH v7 10/14] x86/paravirt: simplify paravirt macros

2021-03-11 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 Acked-by: Peter Zijlstra (Intel) --- V3: - new patch V4: - fix build warnings

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

2021-03-11 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 Acked-by: Peter Zijlstra (Intel) --- arch/x86/entry/entry_32.S | 4 +- arch/x86/include/asm/ir

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

2021-03-11 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 Acked-by: Peter Zijlstra (Intel) --- V3: - drop PVOP_ALT_VCALL() macro --- arch/x86/include/asm/paravirt_types.h | 49

[PATCH v7 11/14] x86/paravirt: switch iret pvops to ALTERNATIVE

2021-03-11 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 Acked-by: Peter Zijlstra (Intel) --- V3: - use ALTERNATIVE_TERNARY --- arch/x86/include/asm/paravirt.h | 6 +++--- arch/x86/include/asm

[PATCH v7 07/14] x86/alternative: don't open code ALTERNATIVE_TERNARY() in _static_cpu_has()

2021-03-11 Thread Juergen Gross
_static_cpu_has() contains a completely open coded version of ALTERNATIVE_TERNARY(). Replace that with the macro instead. Signed-off-by: Juergen Gross --- V6: - new patch V7: - moved patch earlier in series (Boris Petkov) --- arch/x86/include/asm/cpufeature.h | 41

[PATCH v7 03/14] static_call: add function to query current function

2021-03-11 Thread Juergen Gross
(). Signed-off-by: Juergen Gross --- V7: - new patch --- include/linux/static_call.h | 8 1 file changed, 8 insertions(+) diff --git a/include/linux/static_call.h b/include/linux/static_call.h index 76b881259144..e01b61ab86b1 100644 --- a/include/linux/static_call.h +++ b/include/linux

[PATCH v7 01/14] x86/alternative: merge include files

2021-03-11 Thread Juergen Gross
Merge arch/x86/include/asm/alternative-asm.h into arch/x86/include/asm/alternative.h in order to make it easier to use common definitions later. Signed-off-by: Juergen Gross --- V6: - new patch V7: - moved to begin of series (Boris Petkov) --- arch/x86/entry/entry_32.S| 2

[PATCH v7 08/14] x86: add new features for paravirt patching

2021-03-11 Thread Juergen Gross
patching later. Make sure paravirt patching is performed before alternative patching. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- V3: - add comment (Boris Petkov) - no negative features (Boris Petkov) V4: - move paravirt_set_cap() to paravirt-spinlocks.c --- arch/x86

[PATCH v7 02/14] static_call: move struct static_call_key definition to static_call_types.h

2021-03-11 Thread Juergen Gross
-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- V5: - new patch --- include/linux/static_call.h | 18 -- include/linux/static_call_types.h | 18 ++ tools/include/linux/static_call_types.h | 18 ++ 3 files changed, 36 insertions

[tip: x86/alternatives] x86/alternative: Drop unused feature parameter from ALTINSTR_REPLACEMENT()

2021-03-09 Thread tip-bot2 for Juergen Gross
The following commit has been merged into the x86/alternatives branch of tip: Commit-ID: db16e07269c2b4346e4332e43f04e447ef14fd2f Gitweb: https://git.kernel.org/tip/db16e07269c2b4346e4332e43f04e447ef14fd2f Author:Juergen Gross AuthorDate:Tue, 09 Mar 2021 14:48:04 +01:00

[PATCH v6 13/12] x86/alternative: merge include files

2021-03-09 Thread Juergen Gross
Merge arch/x86/include/asm/alternative-asm.h into arch/x86/include/asm/alternative.h in order to make it easier to use common definitions later. Signed-off-by: Juergen Gross --- arch/x86/entry/entry_32.S| 2 +- arch/x86/entry/vdso/vdso32/system_call.S | 2 +- arch/x86

[PATCH v6 14/12] x86/alternative: don't open code ALTERNATIVE_TERNARY() in _static_cpu_has()

2021-03-09 Thread Juergen Gross
_static_cpu_has() contains a completely open coded version of ALTERNATIVE_TERNARY(). Replace that with the macro instead. Signed-off-by: Juergen Gross --- arch/x86/include/asm/cpufeature.h | 41 +++ 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/arch

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

2021-03-09 Thread Juergen Gross
the register defines for assembler paravirt calling, as there isn't much usage left. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- V4: - fixed SAVE_FLAGS() (kernel test robot) - added assembler paravirt cleanup --- arch/x86/entry/entry_64.S | 2 +- arch/x86/include/asm

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

2021-03-09 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 Acked-by: Peter Zijlstra (Intel) --- V3: - drop PVOP_ALT_VCALL() macro --- arch/x86/include/asm/paravirt_types.h | 49

[PATCH v6 05/12] x86/alternative: support ALTERNATIVE_TERNARY

2021-03-09 Thread Juergen Gross
ot;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_instr". Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- V3: - new patch V4: - use X86_FEATURE_ALWAYS instead

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

2021-03-09 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 Acked-by: Peter Zijlstra (Intel) --- arch/x86/entry/entry_32.S | 4 +- arch/x86/include/asm/ir

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

2021-03-09 Thread Juergen Gross
" Changes in V4: - fixed several build failures - removed objtool patch, 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 G

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

2021-03-09 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 Acked-by: Peter Zijlstra (Intel) --- V3: - use ALTERNATIVE_TERNARY --- arch/x86/include/asm/paravirt.h | 6 +++--- arch/x86/include/asm

[PATCH v6 06/12] x86: add new features for paravirt patching

2021-03-09 Thread Juergen Gross
patching later. Make sure paravirt patching is performed before alternative patching. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- V3: - add comment (Boris Petkov) - no negative features (Boris Petkov) V4: - move paravirt_set_cap() to paravirt-spinlocks.c --- arch/x86

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

2021-03-09 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 Acked-by: Peter Zijlstra (Intel) --- V3: - remove paravirt_patch_insns() (kernel test robot

[PATCH v6 04/12] x86/alternative: support not-feature

2021-03-09 Thread Juergen Gross
Add support for alternative patching for the case a feature is not present on the current cpu. For users of ALTERNATIVE() and friends an inverted feature is specified by applying the ALT_NOT() macro to it, e.g.: ALTERNATIVE(old, new, ALT_NOT(feature)) Signed-off-by: Juergen Gross --- V5

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

2021-03-09 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 Acked-by: Peter

[PATCH v6 08/12] x86/paravirt: simplify paravirt macros

2021-03-09 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 Acked-by: Peter Zijlstra (Intel) --- V3: - new patch V4: - fix build warnings

[PATCH v6 03/12] x86/alternative: drop feature parameter from ALTINSTR_REPLACEMENT()

2021-03-09 Thread Juergen Gross
The macro ALTINSTR_REPLACEMENT() doesn't make use of the feature parameter, so drop it. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- V5: - new patch --- arch/x86/include/asm/alternative.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH v6 01/12] static_call: move struct static_call_key definition to static_call_types.h

2021-03-09 Thread Juergen Gross
-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- V5: - new patch --- include/linux/static_call.h | 18 -- include/linux/static_call_types.h | 18 ++ tools/include/linux/static_call_types.h | 18 ++ 3 files changed, 36 insertions

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

2021-03-08 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 v5 12/12] x86/paravirt: have only one paravirt patch function

2021-03-08 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 v5 11/12] x86/paravirt: switch functions with custom code to ALTERNATIVE

2021-03-08 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 v5 08/12] x86/paravirt: simplify paravirt macros

2021-03-08 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 v5 00/12] x86: major paravirt cleanup

2021-03-08 Thread Juergen Gross
king 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 (12): staticcall: move struct static_call_key definition to static_call_types.h x86/paravirt: switch time pvops functi

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

2021-03-08 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 v5 09/12] x86/paravirt: switch iret pvops to ALTERNATIVE

2021-03-08 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 v5 05/12] x86/alternative: support ALTERNATIVE_TERNARY

2021-03-08 Thread Juergen Gross
ot;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_instr". Signed-off-by: Juergen Gross --- V3: - new patch V4: - use X86_FEATURE_ALWAYS instead of negated feature (Boris Petkov) - un

[PATCH v5 06/12] x86: add new features for paravirt patching

2021-03-08 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 v5 02/12] x86/paravirt: switch time pvops functions to use static_call()

2021-03-08 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 v5 04/12] x86/alternative: support not-feature

2021-03-08 Thread Juergen Gross
it, e.g.: ALTERNATIVE(old, new, ~feature) This requires adapting the objtool information for struct alt_instr. Signed-off-by: Juergen Gross --- V5: - split off from next patch - reworked to use flag byte (Boris Petkov) --- arch/x86/include/asm/alternative-asm.h| 6 ++ arch/x86

[PATCH v5 01/12] staticcall: move struct static_call_key definition to static_call_types.h

2021-03-08 Thread Juergen Gross
-by: Juergen Gross --- V5: - new patch --- include/linux/static_call.h | 18 -- include/linux/static_call_types.h | 18 ++ tools/include/linux/static_call_types.h | 18 ++ 3 files changed, 36 insertions(+), 18 deletions(-) diff --git

[PATCH v5 03/12] x86/alternative: drop feature parameter from ALTINSTR_REPLACEMENT()

2021-03-08 Thread Juergen Gross
The macro ALTINSTR_REPLACEMENT() doesn't make use of the feature parameter, so drop it. Signed-off-by: Juergen Gross --- V5: - new patch --- arch/x86/include/asm/alternative.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/include/asm/alternative.h

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

2021-03-06 Thread Juergen Gross
Those are fixes for XSA-332. The rest of the V3 patches have been applied already. There is one additional fix in patch 2 which addresses network outages when a guest is doing reboot loops. Juergen Gross (3): xen/events: reset affinity of 2-level event when tearing it down xen/events: don't

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

2021-03-06 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 Revie

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

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

2021-03-06 Thread Juergen Gross
. Cc: sta...@vger.kernel.org Reported-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Julien Grall --- 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_b

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

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

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

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

[tip: locking/core] locking/csd_lock: Add boot parameter for controlling CSD lock debugging

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

[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

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

2021-03-02 Thread Juergen Gross
the hanging request, and receiver side events for the target cpu), and 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-

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

2021-03-02 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 (4): kernel/smp: add boot parameter for controlling CSD lock debugging kernel/smp: prepare more CSD lock debugging kernel/smp: add

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

2021-03-02 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 1/4] kernel/smp: add boot parameter for controlling CSD lock debugging

2021-03-02 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 v3 4/4] kernel/smp: fix flush_smp_call_function_queue() cpu offline detection

2021-03-02 Thread Juergen Gross
The warnings for flushing a logically offline cpu's call_single_queue are gated by a wrong if statement. It should trigger when there have been new requests before dequeueing them, not afterwards. Signed-off-by: Juergen Gross --- V3: - new patch --- kernel/smp.c | 2 +- 1 file changed, 1

[tip: locking/core] locking/csd_lock: Add boot parameter for controlling 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: 4b816578c16b92b68fb9842dcec0bc2fdc2b36d8 Gitweb: https://git.kernel.org/tip/4b816578c16b92b68fb9842dcec0bc2fdc2b36d8 Author:Juergen Gross AuthorDate:Mon, 01 Mar 2021 11:13:34 +01:00

[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

  1   2   3   4   5   6   7   8   9   10   >