qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [RFC qom-cpu v4 00/10] i386: add cpu hot remove support
Date: Thu, 05 Dec 2013 09:08:28 +0800	[thread overview]
Message-ID: <1386205708.26863.1.camel@G08FNSTD131468> (raw)
In-Reply-To: <20131204164256.404897ad@nial.usersys.redhat.com>

On Wed, 2013-12-04 at 16:42 +0100, Igor Mammedov wrote:
> On Wed, 04 Dec 2013 10:15:16 +0800
> Chen Fan <chen.fan.fnst@cn.fujitsu.com> wrote:
> 
> > On Thu, 2013-11-28 at 15:41 +0100, Igor Mammedov wrote:
> > > On Wed, 9 Oct 2013 17:43:08 +0800
> > > Chen Fan <chen.fan.fnst@cn.fujitsu.com> wrote:
> > > 
> > > > Via implementing ACPI standard methods _EJ0 in bios, after Guest OS hot remove
> > > > one vCPU, it is able to send a signal to QEMU, then QEMU could notify
> > > > the assigned vCPU of exiting. meanwhile, and intruduce the QOM command 'cpu-del' to remove
> > > > vCPU from QEMU itself.
> > > 
> > > have you tried following sequence:
> > > cpu-add 1
> > > cpu-add 2
> > > cpu-del 1
> > > and then do migration?
> > Hi, Igor, Thanks for your test case. I had test the above sequence, when
> > I add two vcpu, then delete the first one, I found command 'lscpu' show:
> > CPU(s):                 1
> > On-line CPU(s) list:   0,2
> > off -line CPU(s) list:  
> > 
> > I know it is wrong, but I want to know which is expected to show, A or
> > B?
> > A:
> > CPU(s):               2
> > On-line CPU(s) list:   0,2
> > off -line CPU(s) list:
> > 
> > B:
> > CPU(s):               2
> > On-line CPU(s) list:   0,1
> > off -line CPU(s) list:
> > 
> 
> if you deleted #1 CPU than A is correct.
> 
> There is certain thing that depend on cpu_index in QEMU code base,
> migration is one of them. It should break if for arbitrary CPU removal/addition
> is introduced.

Thanks for your explaining.

Chen


> > Thanks,
> > Chen
> > 
> > > 
> > > > 
> > > > this work is based on Andreas Färber's qom-cpu branch tree.
> > > >     git://github.com/afaerber/qemu-cpu.git
> > > > 
> > > > this series patches must be used with seabios patch and KVM patch together.
> > > > 
> > > > for KVM patches:
> > > >     http://comments.gmane.org/gmane.comp.emulators.kvm.devel/114347
> > > > 
> > > > for seabios patches:
> > > >     http://comments.gmane.org/gmane.comp.emulators.qemu/230460
> > > > 
> > > > Chen Fan (10):
> > > >   x86: move apic_state field from CPUX86State to X86CPU
> > > >   apic: remove redundant variable 'apic_no' from apic_init_common()
> > > >   apic: remove local_apics array and using CPU_FOREACH instead
> > > >   x86: add x86_cpu_unrealizefn() for cpu apic remove
> > > >   qmp: add 'cpu-del' command support
> > > >   qom cpu: rename variable 'cpu_added_notifier' to
> > > >     'cpu_hotplug_notifier'
> > > >   qom cpu: add UNPLUG cpu notifier support
> > > >   i386: implement pc interface pc_hot_del_cpu()
> > > >   piix4: implement function cpu_status_write() for vcpu ejection
> > > >   cpus: reclaim allocated vCPU objects
> > > > 
> > > >  cpu-exec.c                      |  2 +-
> > > >  cpus.c                          | 51 +++++++++++++++++++++--
> > > >  hw/acpi/piix4.c                 | 66 ++++++++++++++++++++++++------
> > > >  hw/i386/kvm/apic.c              | 18 +++++++-
> > > >  hw/i386/kvmvapic.c              |  8 ++--
> > > >  hw/i386/pc.c                    | 51 ++++++++++++++++++-----
> > > >  hw/i386/pc_piix.c               |  3 +-
> > > >  hw/intc/apic.c                  | 91 ++++++++++++++++++++++-------------------
> > > >  hw/intc/apic_common.c           | 17 ++------
> > > >  include/hw/boards.h             |  2 +
> > > >  include/hw/i386/apic_internal.h |  6 +--
> > > >  include/hw/i386/pc.h            |  1 +
> > > >  include/qom/cpu.h               | 20 +++++++++
> > > >  include/sysemu/kvm.h            |  1 +
> > > >  include/sysemu/sysemu.h         |  2 +-
> > > >  kvm-all.c                       | 25 +++++++++++
> > > >  qapi-schema.json                | 12 ++++++
> > > >  qmp-commands.hx                 | 23 +++++++++++
> > > >  qmp.c                           |  9 ++++
> > > >  qom/cpu.c                       | 26 +++++++++---
> > > >  target-i386/cpu-qom.h           |  5 +++
> > > >  target-i386/cpu.c               | 57 ++++++++++++++++++++------
> > > >  target-i386/cpu.h               |  4 --
> > > >  target-i386/helper.c            |  9 ++--
> > > >  target-i386/kvm.c               | 23 +++++------
> > > >  target-i386/misc_helper.c       |  8 ++--
> > > >  26 files changed, 403 insertions(+), 137 deletions(-)
> > > > 
> > > 
> > 
> > 
> 

  reply	other threads:[~2013-12-05  1:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-09  9:43 [Qemu-devel] [RFC qom-cpu v4 00/10] i386: add cpu hot remove support Chen Fan
2013-10-09  9:43 ` [Qemu-devel] [RFC qom-cpu v4 01/10] x86: move apic_state field from CPUX86State to X86CPU Chen Fan
2013-10-09  9:43 ` [Qemu-devel] [RFC qom-cpu v4 02/10] apic: remove redundant variable 'apic_no' from apic_init_common() Chen Fan
2013-10-09  9:43 ` [Qemu-devel] [RFC qom-cpu v4 03/10] apic: remove local_apics array and using CPU_FOREACH instead Chen Fan
2013-10-09  9:43 ` [Qemu-devel] [RFC qom-cpu v4 04/10] x86: add x86_cpu_unrealizefn() for cpu apic remove Chen Fan
2013-10-09  9:43 ` [Qemu-devel] [RFC qom-cpu v4 05/10] qmp: add 'cpu-del' command support Chen Fan
2013-11-27 14:00   ` Eric Blake
2013-11-28  1:14     ` Chen Fan
2013-10-09  9:43 ` [Qemu-devel] [RFC qom-cpu v4 06/10] qom cpu: rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier' Chen Fan
2013-10-09  9:43 ` [Qemu-devel] [RFC qom-cpu v4 07/10] qom cpu: add UNPLUG cpu notifier support Chen Fan
2013-10-09  9:43 ` [Qemu-devel] [RFC qom-cpu v4 08/10] i386: implement pc interface pc_hot_del_cpu() Chen Fan
2013-10-09  9:43 ` [Qemu-devel] [RFC qom-cpu v4 09/10] piix4: implement function cpu_status_write() for vcpu ejection Chen Fan
2013-11-22  8:02   ` Vasilis Liaskovitis
2013-11-25 18:38     ` Vasilis Liaskovitis
2013-11-27 12:11       ` Chen Fan
2013-10-09  9:43 ` [Qemu-devel] [RFC qom-cpu v4 10/10] cpus: reclaim allocated vCPU objects Chen Fan
2013-11-28 14:48   ` Igor Mammedov
2013-12-04  2:28     ` Chen Fan
2013-11-28 14:41 ` [Qemu-devel] [RFC qom-cpu v4 00/10] i386: add cpu hot remove support Igor Mammedov
2013-12-04  2:15   ` Chen Fan
2013-12-04 15:42     ` Igor Mammedov
2013-12-05  1:08       ` Chen Fan [this message]
2013-12-19  8:10   ` Chen Fan

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=1386205708.26863.1.camel@G08FNSTD131468 \
    --to=chen.fan.fnst@cn.fujitsu.com \
    --cc=afaerber@suse.de \
    --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).