From: Gleb Natapov <gleb@redhat.com>
To: avi@redhat.com
Cc: kvm@vger.kernel.org
Subject: [PATCH] Use cpu_is_bsp() to check for bsp cpu.
Date: Thu, 25 Jun 2009 15:20:59 +0300 [thread overview]
Message-ID: <1245932460-15616-2-git-send-email-gleb@redhat.com> (raw)
Signed-off-by: Gleb Natapov <gleb@redhat.com>
---
qemu-kvm-x86.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index 568df53..a78073e 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -23,6 +23,7 @@
#include <sys/ioctl.h>
#include "kvm.h"
+#include "hw/pc.h"
#define MSR_IA32_TSC 0x10
@@ -1349,7 +1350,7 @@ int handle_tpr_access(void *opaque, kvm_vcpu_context_t vcpu,
void kvm_arch_cpu_reset(CPUState *env)
{
kvm_arch_load_regs(env);
- if (env->cpu_index != 0) {
+ if (!cpu_is_bsp(env)) {
if (kvm_irqchip_in_kernel(kvm_context)) {
#ifdef KVM_CAP_MP_STATE
kvm_reset_mpstate(env->kvm_cpu_state.vcpu_ctx);
@@ -1583,7 +1584,7 @@ void kvm_update_after_sipi(CPUState *env)
void kvm_apic_init(CPUState *env)
{
- if (env->cpu_index != 0)
+ if (!cpu_is_bsp(env))
env->kvm_cpu_state.init = 1;
kvm_update_interrupt_request(env);
}
--
1.6.2.1
next reply other threads:[~2009-06-25 12:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-25 12:20 Gleb Natapov [this message]
2009-06-28 9:27 ` [PATCH] Use cpu_is_bsp() to check for bsp cpu 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=1245932460-15616-2-git-send-email-gleb@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@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