qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: liguang <lig.fnst@cn.fujitsu.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>, "Alexander Graf" <agraf@suse.de>,
	"Anthony Liguori" <aliguori@us.ibm.com>,
	"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org,
	"Christian Borntraeger" <borntraeger@de.ibm.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Joel Schopp" <jschopp@linux.vnet.ibm.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Luiz Capitulino" <lcapitulino@redhat.com>,
	"Laszlo Ersek" <lersek@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Isaku Yamahata" <yamahata@valinux.co.jp>
Subject: Re: [Qemu-devel] [PATCH RFC v2 0/7] coordinate cpu hotplug/unplug bewteen QEMU and kernel by EC
Date: Thu, 6 Jun 2013 11:13:29 +0300	[thread overview]
Message-ID: <20130606081329.GA5756@redhat.com> (raw)
In-Reply-To: <1370488621-6915-1-git-send-email-lig.fnst@cn.fujitsu.com>

On Thu, Jun 06, 2013 at 11:16:53AM +0800, liguang wrote:
> v2: 
> 1.remove PIIX4_PROC_BASE operations for cpu hotplug
> 2.fix wrong description fo cpu-del
> 
> patch 1 adds ACPI Embedded Controller (EC),
> refer-to:
> ACPI SPEC v5 chapter 12
> "ACPI Embedded Controller Interface Specification"
> 
> EC is a standard ACPI device, it plays flexible roles,
> especially be event carrier, it can pass events between platform
> and OS, so OS can execute _Qxx method which defined
> by yourself and query EC's ACPI space which can be a buffer for
> many purposes
> 
> here, I want to deliver CPU online/offline event between
> OS and QEMU for CPU hotplug feature, then we will don't
> need to "echo 1 > /sys/devices/system/cpu/cpu1/online"
> again after 'cpu-add' and also for offline to do real cpu
> removal.

So, it's another channel to the guest.
Can't qemu-ga do this in userspace, using the existing channel?

> what I am trying to do is emulated physical addition/removal
> (like described by linux kernel document for cpu hotplug --
> linux-2.6/Documentation/cpu-hotplug.txt) for QEMU.
> 
> these RFC patches are sent for demo what I am trying to do.
> 
> the design process simply like following:
> 
> hotplug
> qemu::ec::sci -> kernel::ec::gpe::notifier->
> kernel::cpu_physic_hotplug::handler->kernel::cpu_up
> 
> unplug
> kernel::cpu_down::kernel::cpu_physic_hotplug::handler->
> kernel::ec::ec_write->qemu::ec::->qemu::cpu-unplug
> 
> sorry, I should poll cpu-unplug cmd sent from kernel,
> but, it's a little trivial, I want do it later.
> 
> for kernel patches:
> http://comments.gmane.org/gmane.linux.kernel/1503460
> 
> 
> Li Guang (8)
> 	 acpi: add ACPI Embedded Controller support
> 	 ich9: add notifer for ec to generate sci
> 	 ec: add operations for _Qxx events
> 	 piix4: add notifer for ec to generate sci
> 	 piix4: add events for cpu hotplug
> 	 qmp: add 'cpu-del' command
> 	 pc: add EC qdev init for piix & q35
> 	 cpu-hotplug: remove memory regison for cpu hotplug
> 
> default-configs/x86_64-softmmu.mak |   1 +
> hw/acpi/Makefile.objs              |   1 +
> hw/acpi/ec.c                       | 225 ++++++++++++++++++++++++++++++++++++
> hw/acpi/ich9.c                     |  15 +++++++++++++++
> hw/acpi/piix4.c                    |  68 ++++++++++++++
> hw/i386/pc.c                       |  46 ++++++++++++++++++++++++++++--
> hw/i386/pc_piix.c                  |   7 +
> hw/i386/pc_q35.c                   |   6 +
> include/hw/acpi/ec.h               |  44 ++++++
> include/hw/acpi/ich9.h             |   1 +
> include/hw/boards.h                |   5 +++--
> include/hw/i386/pc.h               |   1 +
> qapi-schema.json                   |  13 +++++++++++++
> qmp-commands.hx                    |  23 +++++++++++++++++++++++
> qmp.c                              |   9 +++++++++
> 15 files changed, 411 insertions(+), 54 deletions(-)
>  create mode 100644 hw/acpi/ec.c
>  create mode 100644 include/hw/acpi/ec.h

  parent reply	other threads:[~2013-06-06  8:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06  3:16 [Qemu-devel] [PATCH RFC v2 0/7] coordinate cpu hotplug/unplug bewteen QEMU and kernel by EC liguang
2013-06-06  3:16 ` [Qemu-devel] [PATCH RFC v2 1/8] acpi: add ACPI Embedded Controller support liguang
2013-06-06  3:16 ` [Qemu-devel] [PATCH RFC v2 2/8] ich9: add notifer for ec to generate sci liguang
2013-06-06  3:16 ` [Qemu-devel] [PATCH RFC v2 3/8] ec: add operations for _Qxx events liguang
2013-06-06  3:16 ` [Qemu-devel] [PATCH RFC v2 4/8] piix4: add notifer for ec to generate sci liguang
2013-06-06  3:16 ` [Qemu-devel] [PATCH RFC v2 5/8] piix4: add events for cpu hotplug liguang
2013-06-06  3:16 ` [Qemu-devel] [PATCH RFC v2 6/8] qmp: add 'cpu-del' command liguang
2013-06-06  3:17 ` [Qemu-devel] [PATCH RFC v2 7/8] pc: add EC qdev init for piix & q35 liguang
2013-06-06  3:17 ` [Qemu-devel] [PATCH RFC v2 8/8] cpu-hotplug: remove memory regison for cpu hotplug liguang
2013-06-06  8:13 ` Michael S. Tsirkin [this message]
2013-06-06  8:33   ` [Qemu-devel] [PATCH RFC v2 0/7] coordinate cpu hotplug/unplug bewteen QEMU and kernel by EC li guang
2013-06-18  2:47     ` li guang
2013-06-18  9:14       ` Igor Mammedov
2013-06-19  0:39         ` li guang
2013-06-06  8:48   ` Igor Mammedov
2013-06-06  8:58     ` li guang

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=20130606081329.GA5756@redhat.com \
    --to=mst@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=armbru@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=imammedo@redhat.com \
    --cc=jschopp@linux.vnet.ibm.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=lersek@redhat.com \
    --cc=lig.fnst@cn.fujitsu.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=yamahata@valinux.co.jp \
    /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).