From 96314073166e936a8bd2b42edb04bb7f4aa031ad Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Mon, 15 Dec 2008 13:48:27 +0100 Subject: [PATCH] kvm: external module: Remove obsolete special_reload_dr7 hack Host debug registers are now properly saved and restored before/after entering the guest. Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- kvm/kernel/x86/external-module-compat.h | 2 -- kvm/kernel/x86/hack-module.awk | 4 ---- kvm/kernel/x86/preempt.c | 6 ------ 3 files changed, 12 deletions(-) diff --git a/kvm/kernel/x86/external-module-compat.h b/kvm/kernel/x86/external-module-compat.h index 17cae879f9..7bb94d20e5 100644 --- a/kvm/kernel/x86/external-module-compat.h +++ b/kvm/kernel/x86/external-module-compat.h @@ -190,7 +190,6 @@ static inline void preempt_notifier_init(struct preempt_notifier *notifier, void start_special_insn(void); void end_special_insn(void); void in_special_section(void); -void special_reload_dr7(void); void preempt_notifier_sys_init(void); void preempt_notifier_sys_exit(void); @@ -200,7 +199,6 @@ void preempt_notifier_sys_exit(void); static inline void start_special_insn(void) {} static inline void end_special_insn(void) {} static inline void in_special_section(void) {} -static inline void special_reload_dr7(void) {} static inline void preempt_notifier_sys_init(void) {} static inline void preempt_notifier_sys_exit(void) {} diff --git a/kvm/kernel/x86/hack-module.awk b/kvm/kernel/x86/hack-module.awk index 2ad09514c5..f40c97276f 100644 --- a/kvm/kernel/x86/hack-module.awk +++ b/kvm/kernel/x86/hack-module.awk @@ -77,10 +77,6 @@ BEGIN { split("INIT_WORK tsc_khz desc_struct ldttss_desc64 desc_ptr " \ { print } -/kvm_x86_ops->run/ { - print "\tspecial_reload_dr7();" -} - /unsigned long flags;/ && vmx_load_host_state { print "\tunsigned long gsbase;" } diff --git a/kvm/kernel/x86/preempt.c b/kvm/kernel/x86/preempt.c index 9e4bd2c543..31128796a6 100644 --- a/kvm/kernel/x86/preempt.c +++ b/kvm/kernel/x86/preempt.c @@ -40,12 +40,6 @@ static void preempt_enable_sched_in_notifiers(void * addr) #endif } -void special_reload_dr7(void) -{ - asm volatile ("mov %0, %%db7" : : "r"(0x701ul)); -} -EXPORT_SYMBOL_GPL(special_reload_dr7); - static void __preempt_disable_notifiers(void) { asm volatile ("mov %0, %%db7" : : "r"(0ul)); -- 2.11.4.GIT