aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2008-05-13 09:29:20 -0400
committerAvi Kivity <avi@qumranet.com>2008-07-20 05:42:25 -0400
commit7cc8883074b040aa8c1ebd3a17463b0ea3a9ef16 (patch)
tree79feae8f0093534317d75f1776bd9f115d62dd91
parent543e42436643d68ad007d0bae2f485caac9c8a02 (diff)
KVM: Remove decache_vcpus_on_cpu() and related callbacks
Obsoleted by the vmx-specific per-cpu list. Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--arch/ia64/kvm/kvm-ia64.c8
-rw-r--r--arch/powerpc/kvm/powerpc.c4
-rw-r--r--arch/s390/kvm/kvm-s390.c4
-rw-r--r--arch/x86/kvm/svm.c5
-rw-r--r--arch/x86/kvm/vmx.c6
-rw-r--r--arch/x86/kvm/x86.c8
-rw-r--r--include/asm-x86/kvm_host.h1
-rw-r--r--include/linux/kvm_host.h3
-rw-r--r--virt/kvm/kvm_main.c1
9 files changed, 0 insertions, 40 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
index 68c978be9a5..7c504be5797 100644
--- a/arch/ia64/kvm/kvm-ia64.c
+++ b/arch/ia64/kvm/kvm-ia64.c
@@ -1035,14 +1035,6 @@ static void kvm_free_vmm_area(void)
1035 } 1035 }
1036} 1036}
1037 1037
1038/*
1039 * Make sure that a cpu that is being hot-unplugged does not have any vcpus
1040 * cached on it. Leave it as blank for IA64.
1041 */
1042void decache_vcpus_on_cpu(int cpu)
1043{
1044}
1045
1046static void vti_vcpu_load(struct kvm_vcpu *vcpu, int cpu) 1038static void vti_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
1047{ 1039{
1048} 1040}
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 777e0f34e0e..0513b359851 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -240,10 +240,6 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
240{ 240{
241} 241}
242 242
243void decache_vcpus_on_cpu(int cpu)
244{
245}
246
247int kvm_arch_vcpu_ioctl_debug_guest(struct kvm_vcpu *vcpu, 243int kvm_arch_vcpu_ioctl_debug_guest(struct kvm_vcpu *vcpu,
248 struct kvm_debug_guest *dbg) 244 struct kvm_debug_guest *dbg)
249{ 245{
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 6558b09ff57..4585c8ac2b0 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -79,10 +79,6 @@ void kvm_arch_hardware_disable(void *garbage)
79{ 79{
80} 80}
81 81
82void decache_vcpus_on_cpu(int cpu)
83{
84}
85
86int kvm_arch_hardware_setup(void) 82int kvm_arch_hardware_setup(void)
87{ 83{
88 return 0; 84 return 0;
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 9390a31c06f..238e8f3afaf 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -709,10 +709,6 @@ static void svm_vcpu_put(struct kvm_vcpu *vcpu)
709 rdtscll(vcpu->arch.host_tsc); 709 rdtscll(vcpu->arch.host_tsc);
710} 710}
711 711
712static void svm_vcpu_decache(struct kvm_vcpu *vcpu)
713{
714}
715
716static void svm_cache_regs(struct kvm_vcpu *vcpu) 712static void svm_cache_regs(struct kvm_vcpu *vcpu)
717{ 713{
718 struct vcpu_svm *svm = to_svm(vcpu); 714 struct vcpu_svm *svm = to_svm(vcpu);
@@ -1933,7 +1929,6 @@ static struct kvm_x86_ops svm_x86_ops = {
1933 .prepare_guest_switch = svm_prepare_guest_switch, 1929 .prepare_guest_switch = svm_prepare_guest_switch,
1934 .vcpu_load = svm_vcpu_load, 1930 .vcpu_load = svm_vcpu_load,
1935 .vcpu_put = svm_vcpu_put, 1931 .vcpu_put = svm_vcpu_put,
1936 .vcpu_decache = svm_vcpu_decache,
1937 1932
1938 .set_guest_debug = svm_guest_debug, 1933 .set_guest_debug = svm_guest_debug,
1939 .get_msr = svm_get_msr, 1934 .get_msr = svm_get_msr,
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4d179d10637..b99bb37e5de 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -692,11 +692,6 @@ static void vmx_fpu_deactivate(struct kvm_vcpu *vcpu)
692 update_exception_bitmap(vcpu); 692 update_exception_bitmap(vcpu);
693} 693}
694 694
695static void vmx_vcpu_decache(struct kvm_vcpu *vcpu)
696{
697 vcpu_clear(to_vmx(vcpu));
698}
699
700static unsigned long vmx_get_rflags(struct kvm_vcpu *vcpu) 695static unsigned long vmx_get_rflags(struct kvm_vcpu *vcpu)
701{ 696{
702 return vmcs_readl(GUEST_RFLAGS); 697 return vmcs_readl(GUEST_RFLAGS);
@@ -3114,7 +3109,6 @@ static struct kvm_x86_ops vmx_x86_ops = {
3114 .prepare_guest_switch = vmx_save_host_state, 3109 .prepare_guest_switch = vmx_save_host_state,
3115 .vcpu_load = vmx_vcpu_load, 3110 .vcpu_load = vmx_vcpu_load,
3116 .vcpu_put = vmx_vcpu_put, 3111 .vcpu_put = vmx_vcpu_put,
3117 .vcpu_decache = vmx_vcpu_decache,
3118 3112
3119 .set_guest_debug = set_guest_debug, 3113 .set_guest_debug = set_guest_debug,
3120 .guest_debug_pre = kvm_guest_debug_pre, 3114 .guest_debug_pre = kvm_guest_debug_pre,
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8c14ddcaba7..fd03b4465bc 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -817,14 +817,6 @@ out:
817 return r; 817 return r;
818} 818}
819 819
820/*
821 * Make sure that a cpu that is being hot-unplugged does not have any vcpus
822 * cached on it.
823 */
824void decache_vcpus_on_cpu(int cpu)
825{
826}
827
828int kvm_dev_ioctl_check_extension(long ext) 820int kvm_dev_ioctl_check_extension(long ext)
829{ 821{
830 int r; 822 int r;
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
index 0df9d5fa281..4bcdc7de07b 100644
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@ -380,7 +380,6 @@ struct kvm_x86_ops {
380 void (*prepare_guest_switch)(struct kvm_vcpu *vcpu); 380 void (*prepare_guest_switch)(struct kvm_vcpu *vcpu);
381 void (*vcpu_load)(struct kvm_vcpu *vcpu, int cpu); 381 void (*vcpu_load)(struct kvm_vcpu *vcpu, int cpu);
382 void (*vcpu_put)(struct kvm_vcpu *vcpu); 382 void (*vcpu_put)(struct kvm_vcpu *vcpu);
383 void (*vcpu_decache)(struct kvm_vcpu *vcpu);
384 383
385 int (*set_guest_debug)(struct kvm_vcpu *vcpu, 384 int (*set_guest_debug)(struct kvm_vcpu *vcpu,
386 struct kvm_debug_guest *dbg); 385 struct kvm_debug_guest *dbg);
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index de9d1df4bba..865dcbcb891 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -135,9 +135,6 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu);
135void vcpu_load(struct kvm_vcpu *vcpu); 135void vcpu_load(struct kvm_vcpu *vcpu);
136void vcpu_put(struct kvm_vcpu *vcpu); 136void vcpu_put(struct kvm_vcpu *vcpu);
137 137
138void decache_vcpus_on_cpu(int cpu);
139
140
141int kvm_init(void *opaque, unsigned int vcpu_size, 138int kvm_init(void *opaque, unsigned int vcpu_size,
142 struct module *module); 139 struct module *module);
143void kvm_exit(void); 140void kvm_exit(void);
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index e4bf88a9ee4..83a0e5ce603 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1273,7 +1273,6 @@ static void hardware_disable(void *junk)
1273 if (!cpu_isset(cpu, cpus_hardware_enabled)) 1273 if (!cpu_isset(cpu, cpus_hardware_enabled))
1274 return; 1274 return;
1275 cpu_clear(cpu, cpus_hardware_enabled); 1275 cpu_clear(cpu, cpus_hardware_enabled);
1276 decache_vcpus_on_cpu(cpu);
1277 kvm_arch_hardware_disable(NULL); 1276 kvm_arch_hardware_disable(NULL);
1278} 1277}
1279 1278