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

2021-03-11 Thread Jürgen Groß via Virtualization
On 11.03.21 13:51, Borislav Petkov wrote: On Thu, Mar 11, 2021 at 01:50:26PM +0100, Borislav Petkov wrote: and move the cleanups patches 13 and 14 to the beginning of the set? Yeah, 14 needs ALTERNATIVE_TERNARY so I guess after patch 5, that is. I'm putting 13 at the begin of the series and

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

2021-03-09 Thread Jürgen Groß via Virtualization
On 09.03.21 19:57, Borislav Petkov wrote: On Tue, Mar 09, 2021 at 02:48:03PM +0100, Juergen Gross wrote: @@ -167,6 +168,17 @@ static u64 native_steal_clock(int cpu) return 0; } +DEFINE_STATIC_CALL(pv_steal_clock, native_steal_clock); +DEFINE_STATIC_CALL(pv_sched_clock,

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

2021-03-08 Thread Jürgen Groß via Virtualization
On 08.03.21 19:30, Borislav Petkov wrote: On Mon, Mar 08, 2021 at 01:28:43PM +0100, Juergen Gross wrote: diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 36cd71fa097f..04b3067f31b5 100644 --- a/arch/x86/include/asm/paravirt.h +++

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

2021-03-08 Thread Jürgen Groß via Virtualization
On 08.03.21 18:00, Boris Ostrovsky wrote: On 3/8/21 7:28 AM, Juergen Gross wrote: --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c @@ -379,11 +379,6 @@ void xen_timer_resume(void) } } -static const struct pv_time_ops xen_time_ops __initconst = { - .sched_clock =

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

2021-01-19 Thread Jürgen Groß via Virtualization
On 17.12.20 18:31, Michael Kelley wrote: From: Juergen Gross Sent: Thursday, December 17, 2020 1:31 AM 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

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

2021-01-19 Thread Jürgen Groß via Virtualization
On 06.01.21 11:03, Borislav Petkov wrote: On Thu, Dec 17, 2020 at 10:31:24AM +0100, Juergen Gross wrote: 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

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

2020-12-15 Thread Jürgen Groß via Virtualization
On 15.12.20 15:54, Peter Zijlstra wrote: On Tue, Dec 15, 2020 at 03:18:34PM +0100, Peter Zijlstra wrote: Ah, I was waiting for Josh to have an opinion (and then sorta forgot about the whole thing again). Let me refresh and provide at least a Changelog. How's this then? Thanks, will add it

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

2020-12-15 Thread Jürgen Groß via Virtualization
Peter, On 23.11.20 14:43, Peter Zijlstra wrote: On Fri, Nov 20, 2020 at 01:53:42PM +0100, Peter Zijlstra wrote: On Fri, Nov 20, 2020 at 12:46:18PM +0100, Juergen Gross wrote: 30 files changed, 325 insertions(+), 598 deletions(-) Much awesome ! I'll try and get that objtool thing sorted.

Re: x86/ioapic: Cleanup the timer_works() irqflags mess

2020-12-10 Thread Jürgen Groß via Virtualization
On 10.12.20 21:15, Thomas Gleixner wrote: Mark tripped over the creative irqflags handling in the IO-APIC timer delivery check which ends up doing: local_irq_save(flags); local_irq_enable(); local_irq_restore(flags); which triggered a new consistency check he's

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

2020-12-09 Thread Jürgen Groß via Virtualization
On 09.12.20 15:02, Mark Rutland wrote: On Wed, Dec 09, 2020 at 01:27:10PM +, Mark Rutland wrote: On Sun, Nov 22, 2020 at 01:44:53PM -0800, Andy Lutomirski wrote: On Sat, Nov 21, 2020 at 10:55 PM Jürgen Groß wrote: On 20.11.20 12:59, Peter Zijlstra wrote: If someone were to write

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

2020-12-02 Thread Jürgen Groß via Virtualization
On 02.12.20 13:32, Borislav Petkov wrote: On Fri, Nov 20, 2020 at 12:46:22PM +0100, Juergen Gross wrote: @@ -123,12 +115,15 @@ SYM_INNER_LABEL(entry_SYSCALL_64_after_hwframe, SYM_L_GLOBAL) * Try to use SYSRET instead of IRET if we're returning to * a completely clean 64-bit

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

2020-11-22 Thread Jürgen Groß via Virtualization
On 22.11.20 22:44, Andy Lutomirski wrote: On Sat, Nov 21, 2020 at 10:55 PM Jürgen Groß wrote: On 20.11.20 12:59, Peter Zijlstra wrote: On Fri, Nov 20, 2020 at 12:46:23PM +0100, Juergen Gross wrote: +static __always_inline void arch_local_irq_restore(unsigned long flags) +{ +if

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

2020-11-21 Thread Jürgen Groß via Virtualization
On 20.11.20 12:59, Peter Zijlstra wrote: On Fri, Nov 20, 2020 at 12:46:23PM +0100, Juergen Gross wrote: +static __always_inline void arch_local_irq_restore(unsigned long flags) +{ + if (!arch_irqs_disabled_flags(flags)) + arch_local_irq_enable(); +} If someone were to

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

2020-11-20 Thread Jürgen Groß via Virtualization
On 20.11.20 13:08, Peter Zijlstra wrote: On Fri, Nov 20, 2020 at 12:46:26PM +0100, Juergen Gross wrote: +#define PVOP_CALL(rettype, op, clbr, call_clbr, extra_clbr, ...) \ ({ \ PVOP_CALL_ARGS;

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

2020-11-20 Thread Jürgen Groß via Virtualization
On 20.11.20 13:01, Peter Zijlstra wrote: On Fri, Nov 20, 2020 at 12:46:24PM +0100, Juergen Gross wrote: 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

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

2020-11-20 Thread Jürgen Groß via Virtualization
On 20.11.20 12:59, Peter Zijlstra wrote: On Fri, Nov 20, 2020 at 12:46:23PM +0100, Juergen Gross wrote: +static __always_inline void arch_local_irq_restore(unsigned long flags) +{ + if (!arch_irqs_disabled_flags(flags)) + arch_local_irq_enable(); +} If someone were to

Re: [PATCH 4/4] x86/xen: drop USERGS_SYSRET64 paravirt call

2020-11-17 Thread Jürgen Groß via Virtualization
On 16.11.20 17:28, Andy Lutomirski wrote: On Mon, Nov 16, 2020 at 7:23 AM Juergen Gross wrote: USERGS_SYSRET64 is used to return from a syscall via sysret, but a Xen PV guest will nevertheless use the iret hypercall, as there is no sysret PV hypercall defined. So instead of testing all the