Skip to content

Commit 57cb845

Browse files
committed
Merge tag 'x86_paravirt_for_v7.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 paravirt updates from Borislav Petkov: - A nice cleanup to the paravirt code containing a unification of the paravirt clock interface, taming the include hell by splitting the pv_ops structure and removing of a bunch of obsolete code (Juergen Gross) * tag 'x86_paravirt_for_v7.0_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) x86/paravirt: Use XOR r32,r32 to clear register in pv_vcpu_is_preempted() x86/paravirt: Remove trailing semicolons from alternative asm templates x86/pvlocks: Move paravirt spinlock functions into own header x86/paravirt: Specify pv_ops array in paravirt macros x86/paravirt: Allow pv-calls outside paravirt.h objtool: Allow multiple pv_ops arrays x86/xen: Drop xen_mmu_ops x86/xen: Drop xen_cpu_ops x86/xen: Drop xen_irq_ops x86/paravirt: Move pv_native_*() prototypes to paravirt.c x86/paravirt: Introduce new paravirt-base.h header x86/paravirt: Move paravirt_sched_clock() related code into tsc.c x86/paravirt: Use common code for paravirt_steal_clock() riscv/paravirt: Use common code for paravirt_steal_clock() loongarch/paravirt: Use common code for paravirt_steal_clock() arm64/paravirt: Use common code for paravirt_steal_clock() arm/paravirt: Use common code for paravirt_steal_clock() sched: Move clock related paravirt code to kernel/sched paravirt: Remove asm/paravirt_api_clock.h x86/paravirt: Move thunk macros to paravirt_types.h ...
2 parents 8cbd0d2 + 31911d3 commit 57cb845

66 files changed

Lines changed: 668 additions & 833 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

arch/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,9 @@ config HAVE_IRQ_TIME_ACCOUNTING
10561056
Archs need to ensure they use a high enough resolution clock to
10571057
support irq time accounting and then call enable_sched_clock_irqtime().
10581058

1059+
config HAVE_PV_STEAL_CLOCK_GEN
1060+
bool
1061+
10591062
config HAVE_MOVE_PUD
10601063
bool
10611064
help

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,7 @@ config UACCESS_WITH_MEMCPY
13201320

13211321
config PARAVIRT
13221322
bool "Enable paravirtualization code"
1323+
select HAVE_PV_STEAL_CLOCK_GEN
13231324
help
13241325
This changes the kernel so it can modify itself when it is run
13251326
under a hypervisor, potentially improving performance significantly

arch/arm/include/asm/paravirt.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

arch/arm/include/asm/paravirt_api_clock.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/arm/kernel/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
8383
obj-$(CONFIG_ARM_CPU_TOPOLOGY) += topology.o
8484
obj-$(CONFIG_VDSO) += vdso.o
8585
obj-$(CONFIG_EFI) += efi.o
86-
obj-$(CONFIG_PARAVIRT) += paravirt.o
8786

8887
obj-y += head$(MMUEXT).o
8988
obj-$(CONFIG_DEBUG_LL) += debug.o

arch/arm/kernel/paravirt.c

Lines changed: 0 additions & 23 deletions
This file was deleted.

arch/arm64/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,6 +1580,7 @@ config CC_HAVE_SHADOW_CALL_STACK
15801580

15811581
config PARAVIRT
15821582
bool "Enable paravirtualization code"
1583+
select HAVE_PV_STEAL_CLOCK_GEN
15831584
help
15841585
This changes the kernel so it can modify itself when it is run
15851586
under a hypervisor, potentially improving performance significantly

arch/arm64/include/asm/paravirt.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,6 @@
33
#define _ASM_ARM64_PARAVIRT_H
44

55
#ifdef CONFIG_PARAVIRT
6-
#include <linux/static_call_types.h>
7-
8-
struct static_key;
9-
extern struct static_key paravirt_steal_enabled;
10-
extern struct static_key paravirt_steal_rq_enabled;
11-
12-
u64 dummy_steal_clock(int cpu);
13-
14-
DECLARE_STATIC_CALL(pv_steal_clock, dummy_steal_clock);
15-
16-
static inline u64 paravirt_steal_clock(int cpu)
17-
{
18-
return static_call(pv_steal_clock)(cpu);
19-
}
206

217
int __init pv_time_init(void);
228

arch/arm64/include/asm/paravirt_api_clock.h

Lines changed: 0 additions & 1 deletion
This file was deleted.

arch/arm64/kernel/paravirt.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,12 @@
1919
#include <linux/slab.h>
2020
#include <linux/types.h>
2121
#include <linux/static_call.h>
22+
#include <linux/sched/cputime.h>
2223

2324
#include <asm/paravirt.h>
2425
#include <asm/pvclock-abi.h>
2526
#include <asm/smp_plat.h>
2627

27-
struct static_key paravirt_steal_enabled;
28-
struct static_key paravirt_steal_rq_enabled;
29-
30-
static u64 native_steal_clock(int cpu)
31-
{
32-
return 0;
33-
}
34-
35-
DEFINE_STATIC_CALL(pv_steal_clock, native_steal_clock);
36-
3728
struct pv_time_stolen_time_region {
3829
struct pvclock_vcpu_stolen_time __rcu *kaddr;
3930
};

0 commit comments

Comments
 (0)