diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2014-08-21 12:08:05 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-08-21 12:45:21 -0400 |
commit | e790d9ef6405633b007339d746b709aed43a928d (patch) | |
tree | 27b3a05596ce329f299e481f301de21e75328704 /arch | |
parent | 6689fbe3cf65b8c0dbbc87c40c085452997ffd8b (diff) |
KVM: add kvm_arch_sched_in
Introduce preempt notifiers for architecture specific code.
Advantage over creating a new notifier in every arch is slightly simpler
code and guaranteed call order with respect to kvm_sched_in.
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kvm/arm.c | 4 | ||||
-rw-r--r-- | arch/mips/kvm/mips.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 4 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 4 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
5 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index a99e0cdf8ba2..9f788ebac55b 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c | |||
@@ -288,6 +288,10 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) | |||
288 | { | 288 | { |
289 | } | 289 | } |
290 | 290 | ||
291 | void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) | ||
292 | { | ||
293 | } | ||
294 | |||
291 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | 295 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) |
292 | { | 296 | { |
293 | vcpu->cpu = cpu; | 297 | vcpu->cpu = cpu; |
diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c index cd7114147ae7..2362df2a79f9 100644 --- a/arch/mips/kvm/mips.c +++ b/arch/mips/kvm/mips.c | |||
@@ -1002,6 +1002,10 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) | |||
1002 | { | 1002 | { |
1003 | } | 1003 | } |
1004 | 1004 | ||
1005 | void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) | ||
1006 | { | ||
1007 | } | ||
1008 | |||
1005 | int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu, | 1009 | int kvm_arch_vcpu_ioctl_translate(struct kvm_vcpu *vcpu, |
1006 | struct kvm_translation *tr) | 1010 | struct kvm_translation *tr) |
1007 | { | 1011 | { |
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 4c79284b58be..cbc432f4f0a6 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -720,6 +720,10 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) | |||
720 | kvmppc_subarch_vcpu_uninit(vcpu); | 720 | kvmppc_subarch_vcpu_uninit(vcpu); |
721 | } | 721 | } |
722 | 722 | ||
723 | void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) | ||
724 | { | ||
725 | } | ||
726 | |||
723 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | 727 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) |
724 | { | 728 | { |
725 | #ifdef CONFIG_BOOKE | 729 | #ifdef CONFIG_BOOKE |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index ce81eb2ab76a..a3c324ec4370 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -555,6 +555,10 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) | |||
555 | /* Nothing todo */ | 555 | /* Nothing todo */ |
556 | } | 556 | } |
557 | 557 | ||
558 | void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) | ||
559 | { | ||
560 | } | ||
561 | |||
558 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) | 562 | void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu) |
559 | { | 563 | { |
560 | save_fp_ctl(&vcpu->arch.host_fpregs.fpc); | 564 | save_fp_ctl(&vcpu->arch.host_fpregs.fpc); |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index cd718c01cdf1..7d43dc7bb906 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -7171,6 +7171,10 @@ void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) | |||
7171 | static_key_slow_dec(&kvm_no_apic_vcpu); | 7171 | static_key_slow_dec(&kvm_no_apic_vcpu); |
7172 | } | 7172 | } |
7173 | 7173 | ||
7174 | void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) | ||
7175 | { | ||
7176 | } | ||
7177 | |||
7174 | int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) | 7178 | int kvm_arch_init_vm(struct kvm *kvm, unsigned long type) |
7175 | { | 7179 | { |
7176 | if (type) | 7180 | if (type) |