summaryrefslogtreecommitdiffstats
path: root/drivers/kvm
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-11-07 12:57:23 +0200
committerAvi Kivity <avi@qumranet.com>2007-11-08 12:05:36 +0200
commit70433389ccfe2719ef5cd539d04172260294f0f5 (patch)
tree3e09b11482284749b85f3c360533df7b9b86a0a5 /drivers/kvm
parent1e35d3c4a7a9682256c887a1388cf3faefdf53df (diff)
downloadlinux-stable-70433389ccfe2719ef5cd539d04172260294f0f5.tar.gz
linux-stable-70433389ccfe2719ef5cd539d04172260294f0f5.tar.bz2
linux-stable-70433389ccfe2719ef5cd539d04172260294f0f5.zip
KVM: SVM: Fix SMP with kernel apic
AP processor needs to reset to the SIPI vector, not normal INIT. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm')
-rw-r--r--drivers/kvm/svm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 729f1cd93606..3910358db79d 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -561,6 +561,12 @@ static void svm_vcpu_reset(struct kvm_vcpu *vcpu)
struct vcpu_svm *svm = to_svm(vcpu);
init_vmcb(svm->vmcb);
+
+ if (vcpu->vcpu_id != 0) {
+ svm->vmcb->save.rip = 0;
+ svm->vmcb->save.cs.base = svm->vcpu.sipi_vector << 12;
+ svm->vmcb->save.cs.selector = svm->vcpu.sipi_vector << 8;
+ }
}
static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id)