[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 03/15] kvm: set vcpu_id to APIC ID instead of CPU
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [RFC 03/15] kvm: set vcpu_id to APIC ID instead of CPU index |
Date: |
Mon, 13 Aug 2012 16:59:46 -0300 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Aug 13, 2012 at 09:16:52PM +0200, Igor Mammedov wrote:
> On 08/07/2012 09:56 PM, Eduardo Habkost wrote:
> >The CPU ID in KVM is supposed to be the APIC ID, so change the
> >KVM_CREATE_VCPU call to match it. It 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.
> What it would break if APIC ID != CPU index ?
It is not supposed to break anything, now that SeaBIOS was changed to
accept non-contiguous APIC IDs (and after applying patches 3-6 from this
series). If there is other code that expect APIC ID == CPU index, that
code also needs to be fixed.
>
> >
> >Signed-off-by: Eduardo Habkost <address@hidden>
> >---
> > kvm-all.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/kvm-all.c b/kvm-all.c
> >index 2148b20..38de992 100644
> >--- a/kvm-all.c
> >+++ b/kvm-all.c
> >@@ -213,7 +213,7 @@ int kvm_init_vcpu(CPUArchState *env)
> >
> > DPRINTF("kvm_init_vcpu\n");
> >
> >- ret = kvm_vm_ioctl(s, KVM_CREATE_VCPU, env->cpu_index);
> >+ ret = kvm_vm_ioctl(s, KVM_CREATE_VCPU, env->cpuid_apic_id);
> > if (ret < 0) {
> > DPRINTF("kvm_create_vcpu failed\n");
> > goto err;
> >
>
>
> --
> Regards,
> Igor
--
Eduardo
- [Qemu-devel] [RFC 00/15] attempt to fix CPU topology info on CPU APIC IDs, Eduardo Habkost, 2012/08/07
- [Qemu-devel] [RFC 05/15] remove FW_CFG_MAX_CPUS from fw_cfg_init(), Eduardo Habkost, 2012/08/07
- [Qemu-devel] [RFC 03/15] kvm: set vcpu_id to APIC ID instead of CPU index, Eduardo Habkost, 2012/08/07
- [Qemu-devel] [RFC 09/15] isolate qdev-independent parts of qdev_prop_set_globals(), Eduardo Habkost, 2012/08/07
- [Qemu-devel] [RFC 10/15] create object_prop_set_globals(), Eduardo Habkost, 2012/08/07
- [Qemu-devel] [RFC 11/15] rename qdev_prop_register_global_list to qemu_globals_register_list, Eduardo Habkost, 2012/08/07
- [Qemu-devel] [RFC 12/15] create qemu_global_get() function, Eduardo Habkost, 2012/08/07
- [Qemu-devel] [RFC 08/15] move global properties code to global-properties.c, Eduardo Habkost, 2012/08/07
- [Qemu-devel] [RFC 04/15] i386: create apic_id_for_cpu() function (v2), Eduardo Habkost, 2012/08/07
- [Qemu-devel] [RFC 06/15] pc: set FW_CFG data based on APIC ID calculation, Eduardo Habkost, 2012/08/07
- [Qemu-devel] [RFC 01/15] cpus.h: include cpu-common.h, Eduardo Habkost, 2012/08/07