RFC fix migration issues after hotplug a discontinuous cpuid
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 17 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | target-i386: moving registers of vmstate from cpu_exec_init() to x86_cpu_realizefn()exec.c target-i386/ | +14 | 49 replies | |
| 2/3 | target-i386: add -smp X,apics=0x optionhw/ include/ qemu-options.hx +1 more | +84 | 2 replies | |
| 3/3 | target-i386: add qmp command 'query-cpus' to display apic_idcpus.c qapi-schema.json | +4 | 1 reply |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Eduardo Habkost |
|---|---|
| 1/3 | R-b R-b |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [RFC 0/3] fix migration issues after hotplug a discontinuous cpuid
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(-)
Signature · 1 line
1.8.1.4