[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 6/6] x86: Extend validity of bsp_to_cpu
From: |
Marcelo Tosatti |
Subject: |
[Qemu-devel] [PATCH 6/6] x86: Extend validity of bsp_to_cpu |
Date: |
Thu, 4 Mar 2010 12:05:16 -0300 |
From: Jan Kiszka <address@hidden>
As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals
cpu_index, bsp_to_cpu can also be based on the latter directly. This
will help an early user of it: KVM while initializing mp_state.
Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Marcelo Tosatti <address@hidden>
---
hw/pc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index bdc297f..e50a488 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -760,7 +760,8 @@ static void pc_init_ne2k_isa(NICInfo *nd)
int cpu_is_bsp(CPUState *env)
{
- return env->cpuid_apic_id == 0;
+ /* We hard-wire the BSP to the first CPU. */
+ return env->cpu_index == 0;
}
static CPUState *pc_new_cpu(const char *cpu_model)
--
1.6.6.1
- [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue, Marcelo Tosatti, 2010/03/04
- [Qemu-devel] [PATCH 1/6] Allocate memory below 4GB as one chunk, Marcelo Tosatti, 2010/03/04
- [Qemu-devel] [PATCH 2/6] Add option to use file backed guest memory, Marcelo Tosatti, 2010/03/04
- [Qemu-devel] [PATCH 4/6] KVM: Rework VCPU state writeback API, Marcelo Tosatti, 2010/03/04
- [Qemu-devel] [PATCH 6/6] x86: Extend validity of bsp_to_cpu,
Marcelo Tosatti <=
- [Qemu-devel] [PATCH 5/6] KVM: x86: Restrict writeback of VCPU state, Marcelo Tosatti, 2010/03/04
- [Qemu-devel] [PATCH 3/6] KVM: Rework of guest debug state writing, Marcelo Tosatti, 2010/03/04
- Re: [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue, Anthony Liguori, 2010/03/04