qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
To: Eduardo Habkost <ehabkost@redhat.com>, qemu-devel@nongnu.org
Cc: "Igor Mammedov" <imammedo@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH v2 0/3] prebuild cpu QOM tree /machine/node/socket/core ->link-cpu
Date: Thu, 20 Mar 2014 14:33:23 +0800	[thread overview]
Message-ID: <cover.1395296803.git.chen.fan.fnst@cn.fujitsu.com> (raw)

at present, after hotplug a discontinuous cpu id on source, then done migration,
on target, it will fail to add the unoccupied cpu id which was skipped at source,
this cause is on target Qemu prebuild CPU with continuous cpu_index. so after
migration, the cpu infrastructure bewteen source and target are different.
 
I suppose we could use apic_id as instance_id which was used at registering vmstate
when create cpu. on target, we prebuild the specified cpu topology using comand line:
  -device /machine/node[]/socket[]/core[]/cpu[], then migration, we could keep the same
cpu infrastructure on both side.

 v1-v2: squash patch 2/4 and 3/4 together.

RFC:
 V4: rename CpuTopoInfo to X86CPUTopoInfo. and move cpu_exsit() to pc_new_cpu().

 V3: get rid of thread object and tie link<cpu> to <core> directly. and prebuild full
  core[] and thread[] as init socket[] according to smp_cores and smp_threads.

 TODO:
  1. add cpu "path" property which used for specifying the QOM path.
  2. add -device cpu-foo.path supported.
  3. then we could introduce hot-remove cpu probably.

 I don't know wether this way is right or not. pls tell me. :)

Chen Fan (3):
  cpu: introduce CpuTopoInfo structure for argument simplification
  i386: use CpuTopoInfo instead apic_id as argument for pc_new_cpu()
  i386: introduce cpu QOM hierarchy tree

 hw/i386/pc.c               |  25 +++---
 target-i386/Makefile.objs  |   2 +-
 target-i386/cpu-topology.c | 199 +++++++++++++++++++++++++++++++++++++++++++++
 target-i386/cpu-topology.h |  71 ++++++++++++++++
 target-i386/cpu.c          |  55 +++++++++----
 target-i386/cpu.h          |   8 ++
 target-i386/topology.h     |  53 +++++++-----
 tests/test-x86-cpuid.c     | 165 +++++++++++++++++++++++++++++--------
 8 files changed, 494 insertions(+), 84 deletions(-)
 create mode 100644 target-i386/cpu-topology.c
 create mode 100644 target-i386/cpu-topology.h

-- 
1.8.1.4

             reply	other threads:[~2014-03-20  6:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20  6:33 Chen Fan [this message]
2014-03-20  6:33 ` [Qemu-devel] [PATCH v2 1/3] cpu: introduce CpuTopoInfo structure for argument simplification Chen Fan
2014-03-20  6:33 ` [Qemu-devel] [PATCH v2 2/3] i386: use CpuTopoInfo instead apic_id as argument for pc_new_cpu() Chen Fan
2014-03-20  6:33 ` [Qemu-devel] [PATCH v2 3/3] i386: introduce cpu QOM hierarchy tree Chen Fan
2014-04-01  8:00 ` [Qemu-devel] [PATCH v2 0/3] prebuild cpu QOM tree /machine/node/socket/core ->link-cpu chen.fan.fnst

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1395296803.git.chen.fan.fnst@cn.fujitsu.com \
    --to=chen.fan.fnst@cn.fujitsu.com \
    --cc=afaerber@suse.de \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).