diff options
author | Avi Kivity <avi@qumranet.com> | 2007-02-12 03:54:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:41 -0500 |
commit | 774c47f1d78e373a6bd2964f4e278d1ce26c21cb (patch) | |
tree | 665fe9939425d7b4a16b97241e784f4183bd9558 /drivers/kvm/svm.c | |
parent | 8d0be2b3bf4a55606967d7d84e56c52521e94333 (diff) |
[PATCH] KVM: cpu hotplug support
On hotplug, we execute the hardware extension enable sequence. On unplug, we
decache any vcpus that last ran on the exiting cpu, and execute the hardware
extension disable sequence.
Signed-off-by: Avi Kivity <avi@qumranet.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r-- | drivers/kvm/svm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 4fa50bd0dceb..83da4ea150a3 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -609,6 +609,10 @@ static void svm_vcpu_put(struct kvm_vcpu *vcpu) | |||
609 | put_cpu(); | 609 | put_cpu(); |
610 | } | 610 | } |
611 | 611 | ||
612 | static void svm_vcpu_decache(struct kvm_vcpu *vcpu) | ||
613 | { | ||
614 | } | ||
615 | |||
612 | static void svm_cache_regs(struct kvm_vcpu *vcpu) | 616 | static void svm_cache_regs(struct kvm_vcpu *vcpu) |
613 | { | 617 | { |
614 | vcpu->regs[VCPU_REGS_RAX] = vcpu->svm->vmcb->save.rax; | 618 | vcpu->regs[VCPU_REGS_RAX] = vcpu->svm->vmcb->save.rax; |
@@ -1677,6 +1681,7 @@ static struct kvm_arch_ops svm_arch_ops = { | |||
1677 | 1681 | ||
1678 | .vcpu_load = svm_vcpu_load, | 1682 | .vcpu_load = svm_vcpu_load, |
1679 | .vcpu_put = svm_vcpu_put, | 1683 | .vcpu_put = svm_vcpu_put, |
1684 | .vcpu_decache = svm_vcpu_decache, | ||
1680 | 1685 | ||
1681 | .set_guest_debug = svm_guest_debug, | 1686 | .set_guest_debug = svm_guest_debug, |
1682 | .get_msr = svm_get_msr, | 1687 | .get_msr = svm_get_msr, |