diff options
| author | Ingo Molnar <mingo@kernel.org> | 2021-05-12 19:59:37 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2021-05-12 19:59:37 +0200 |
| commit | 6f0d271d21c5dc12b78cc7d8b241a5acbca5589f (patch) | |
| tree | 1d8992505405f69d08bdc3d5e24f3ee200c30ffb /arch/x86/kernel/kvmclock.c | |
| parent | 1bc67873d401e6c2e6e30be7fef21337db07a042 (diff) | |
| parent | 88b06399c9c766c283e070b022b5ceafa4f63f19 (diff) | |
| download | linux-6f0d271d21c5dc12b78cc7d8b241a5acbca5589f.tar.gz linux-6f0d271d21c5dc12b78cc7d8b241a5acbca5589f.tar.bz2 linux-6f0d271d21c5dc12b78cc7d8b241a5acbca5589f.zip | |
Merge branch 'linus' into x86/cleanups, to pick up dependent commits
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/kvmclock.c')
| -rw-r--r-- | arch/x86/kernel/kvmclock.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index d37ed4e1d033..ad273e5861c1 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c @@ -20,7 +20,6 @@ #include <asm/hypervisor.h> #include <asm/mem_encrypt.h> #include <asm/x86_init.h> -#include <asm/reboot.h> #include <asm/kvmclock.h> static int kvmclock __initdata = 1; @@ -203,28 +202,9 @@ static void kvm_setup_secondary_clock(void) } #endif -/* - * After the clock is registered, the host will keep writing to the - * registered memory location. If the guest happens to shutdown, this memory - * won't be valid. In cases like kexec, in which you install a new kernel, this - * means a random memory location will be kept being written. So before any - * kind of shutdown from our side, we unregister the clock by writing anything - * that does not have the 'enable' bit set in the msr - */ -#ifdef CONFIG_KEXEC_CORE -static void kvm_crash_shutdown(struct pt_regs *regs) -{ - native_write_msr(msr_kvm_system_time, 0, 0); - kvm_disable_steal_time(); - native_machine_crash_shutdown(regs); -} -#endif - -static void kvm_shutdown(void) +void kvmclock_disable(void) { native_write_msr(msr_kvm_system_time, 0, 0); - kvm_disable_steal_time(); - native_machine_shutdown(); } static void __init kvmclock_init_mem(void) @@ -351,10 +331,6 @@ void __init kvmclock_init(void) #endif x86_platform.save_sched_clock_state = kvm_save_sched_clock_state; x86_platform.restore_sched_clock_state = kvm_restore_sched_clock_state; - machine_ops.shutdown = kvm_shutdown; -#ifdef CONFIG_KEXEC_CORE - machine_ops.crash_shutdown = kvm_crash_shutdown; -#endif kvm_get_preset_lpj(); /* |
