From: Avi Kivity <avi@qumranet.com>
To: kvm-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, Avi Kivity <avi@qumranet.com>
Subject: [PATCH 2/5] KVM: SVM: Fix SMP with kernel apic
Date: Thu, 8 Nov 2007 12:35:27 +0200 [thread overview]
Message-ID: <11945181301284-git-send-email-avi@qumranet.com> (raw)
In-Reply-To: <11945181301744-git-send-email-avi@qumranet.com>
AP processor needs to reset to the SIPI vector, not normal INIT.
Signed-off-by: Avi Kivity <avi@qumranet.com>
---
drivers/kvm/svm.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 729f1cd..3910358 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)
--
1.5.3
next prev parent reply other threads:[~2007-11-08 10:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-08 10:35 [PATCH 0/5] KVM fixes for 2.6.24-rc2 Avi Kivity
2007-11-08 10:35 ` [PATCH 1/5] KVM: x86 emulator: fix 'push imm8' emulation Avi Kivity
2007-11-08 10:35 ` Avi Kivity [this message]
2007-11-08 10:35 ` [PATCH 3/5] KVM: SVM: Defer nmi processing until switch to host state is complete Avi Kivity
2007-11-08 10:35 ` [PATCH 4/5] KVM: x86 emulator: invd instruction Avi Kivity
2007-11-08 10:35 ` [PATCH 5/5] KVM: SVM: Intercept the 'invd' and 'wbinvd' instructions Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11945181301284-git-send-email-avi@qumranet.com \
--to=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®