[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 08/18] target-i386: kvm: set vcpu_id to APIC ID instea
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [RFC 08/18] target-i386: kvm: set vcpu_id to APIC ID instead of CPU index (v2) |
Date: |
Wed, 3 Oct 2012 10:29:04 -0300 |
The CPU ID in KVM is supposed to be the APIC ID, so change the
KVM_CREATE_VCPU call to match it. The current behavior didn't break
anything yet because today the APIC ID is assumed to be == the CPU
index, but this won't be true in the future.
Chagnes v1 -> v2:
- Change only i386 code (kvm_arch_vcpu_id())
Signed-off-by: Eduardo Habkost <address@hidden>
---
target-i386/kvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index bb972d8..45ebddc 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -355,7 +355,7 @@ static void cpu_update_state(void *opaque, int running,
RunState state)
unsigned long kvm_arch_vcpu_id(CPUArchState *env)
{
- return env->cpu_index;
+ return env->cpuid_apic_id;
}
int kvm_arch_init_vcpu(CPUX86State *env)
--
1.7.11.4
- Re: [Qemu-devel] [RFC 02/18] pc: create PC object on pc_init1(), (continued)
[Qemu-devel] [RFC 16/18] tests: support target-specific unit tests, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 11/18] target-i386: cpu_x86_init: allow APIC ID to be set by caller, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 07/18] kvm: create kvm_arch_vcpu_id() function, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 13/18] pc: set explicit APIC ID for CPUs, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 15/18] pc: set fw_cfg data based on APIC ID calculation (v2), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 14/18] pc: create apic_id_for_cpu() function (v3), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 18/18] pc: generate APIC IDs according to CPU topology (v3), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 08/18] target-i386: kvm: set vcpu_id to APIC ID instead of CPU index (v2),
Eduardo Habkost <=
[Qemu-devel] [RFC 17/18] target-i386: topology & APIC ID utility functions (v2), Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 03/18] pc: add PC object argument to some init functions, Eduardo Habkost, 2012/10/03
[Qemu-devel] [RFC 10/18] target-i386: cpu: add apic_id argument to cpu_x86_register(), Eduardo Habkost, 2012/10/03