[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 0/3] fix migration issues after hotplug a discontinuou
From: |
Chen Fan |
Subject: |
[Qemu-devel] [RFC 0/3] fix migration issues after hotplug a discontinuous cpuid |
Date: |
Tue, 14 Jan 2014 17:27:19 +0800 |
At present, after hotplug a discontinuous cpu id on source side, then done
migration, hotplug again will fail on destination side. for example:
on source side:
1) boot with -smp 1,maxcpus=4
2) cpu-add id=2
3) live-migration
on destination side:
1) boot with -smp 2,maxcpus=4
1) cpu-add id=1
the root cause is the generated apicid is sequential from 0 to smp_cpus when
initialize cpus at booting time on destination side, there apicid will be 0
and 1, but on source side the existed apicid after hotplug are 0 and 2.
so if add cpu with id=1, this will show error with this cpu alreay exists.
this patches added -smp X,apics=0x option to specify apic map. follow above
example:
on destination side:
1) boot with -smp 2,maxcpus=4,apics=0xA
this apics value is a hex number as existed apicid bitmap, 0xA is 1010B for
apicid are 0 and 2.
this patches will be helpful for arbitrary CPU hot-remove as well.
Chen Fan (3):
target-i386: moving registers of vmstate from cpu_exec_init() to
x86_cpu_realizefn()
target-i386: add -smp X,apics=0x option
target-i386: add qmp command 'query-cpus' to display apic_id
cpus.c | 1 +
exec.c | 5 ++++
hw/i386/pc.c | 9 +++++--
include/sysemu/sysemu.h | 4 ++++
qapi-schema.json | 4 +++-
qemu-options.hx | 15 +++++++++---
target-i386/cpu.c | 9 +++++++
vl.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++-
8 files changed, 102 insertions(+), 7 deletions(-)
--
1.8.1.4
- [Qemu-devel] [RFC 0/3] fix migration issues after hotplug a discontinuous cpuid,
Chen Fan <=
- [Qemu-devel] [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn(), Chen Fan, 2014/01/14
- Re: [Qemu-devel] [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn(), Igor Mammedov, 2014/01/14
- Re: [Qemu-devel] [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn(), Chen Fan, 2014/01/15
- Re: [Qemu-devel] [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn(), Igor Mammedov, 2014/01/15
- [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn()), Eduardo Habkost, 2014/01/17
- Re: [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn()), Igor Mammedov, 2014/01/20
- Re: [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn()), Chen Fan, 2014/01/21
- Re: [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn()), Igor Mammedov, 2014/01/21
- Re: [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn()), Chen Fan, 2014/01/21
- Re: [Qemu-devel] Exposing and calculating CPU APIC IDs (was Re: [RFC 1/3] target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn()), Andreas Färber, 2014/01/21