From: Igor Mammedov <imammedo@redhat.com>
To: li guang <lig.fnst@cn.fujitsu.com>
Cc: "Stefan Berger" <stefanb@linux.vnet.ibm.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, "Bruce Rogers" <brogers@suse.com>,
"Joel Schopp" <jschopp@linux.vnet.ibm.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Anthony Liguori" <anthony@codemonkey.ws>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Andreas Färber" <afaerber@suse.de>,
"Isaku Yamahata" <yamahata@valinux.co.jp>
Subject: Re: [Qemu-devel] [PATCH 0/4] add ACPI Embedded Controller
Date: Tue, 28 May 2013 11:38:11 +0200 [thread overview]
Message-ID: <20130528113811.4e28aead@nial.usersys.redhat.com> (raw)
In-Reply-To: <1369730082.19028.89.camel@liguang.fnst.cn.fujitsu.com>
On Tue, 28 May 2013 16:34:42 +0800
li guang <lig.fnst@cn.fujitsu.com> wrote:
> 在 2013-05-28二的 10:16 +0200,Igor Mammedov写道:
> > On Tue, 28 May 2013 08:28:09 +0800
> > li guang <lig.fnst@cn.fujitsu.com> wrote:
> >
> > > 在 2013-05-27一的 13:45 +0200,Igor Mammedov写道:
> > > > On Mon, 27 May 2013 09:22:59 +0800
> > > > li guang <lig.fnst@cn.fujitsu.com> wrote:
> > > >
> > > > > 在 2013-05-26日的 19:51 -0500,Anthony Liguori写道:
> > > > > > li guang <lig.fnst@cn.fujitsu.com> writes:
> > > > > >
> > > > > > > 在 2013-05-24五的 14:45 +0300,Michael S. Tsirkin写道:
> > > > > > >> On Wed, May 22, 2013 at 11:46:33AM +0800, liguang wrote:
> > > > > > >> > These patches try to add ACPI Embedded Controller (EC),
> > > > > > >> > refer-to:
> > > > > > >> > ACPI SPEC v5 chapter 5
> > > > > > >> > "ACPI Embedded Controller Interface Specification"
> > > > > > >> >
> > > > > > >> > EC is a standard ACPI device, it plays flexible roles,
> > > > > > >> > e.g.
> > > > > > >> > power controller, it can control power sequence for
> > > > > > >> > platform to enter or leave system state(0,1,3,4,5),
> > > > > > >> > it can controller CPU fan by the temperature of sensor.
> > > > > > >> > event carrier, it can pass events between platform
> > > > > > >> > and OS, so OS can execute _Qxx method which defined
> > > > > > >> > by yourself.
> > > > > > >> >
> > > > > > >> > So, 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'.
> > > > > > >> >
> > > > > > >> > patches for online/offline event handler of QEUM and
> > > > > > >> > linux kernel are writing, and will send once finished.
> > > > > > >> >
> > > > > > >> > since EC is a common device, so I send pathes separately.
> > > > > > >>
> > > > > > >> Do any non-linux guests support this device?
> > > > > > >>
> > > > > > >
> > > > > > > In fact, any OSes support ACPI will support this device.
> > > > > > > so, windows will.
> > > > > >
> > > > > > When you say "any OSes supporting ACPI" I think what you really mean is
> > > > > > that we can provide bytecode that interacts with the embedded
> > > > > > controller.
> > > > > >
> > > > > > There is not explicit driver in Linux or Windows AFAIK.
> > > > >
> > > > > Hmm, yep, mostly there's no special driver for EC,
> > > > > because it is directly embedded in code for ACPI
> > > > > for linux kernel, it's drivers/acpi/ec.c
> > > > >
> > > > > >
> > > > > > I still don't get the point of this. We can make ACPI hotplug work
> > > > > > without introducing a new device like this.
> > > > > >
> > > > >
> > > > > when you 'cpu-add' a cpu, acpi driver for cpu will not
> > > > > trigger 'cpu_up' for linux kernel AFAIK, unless you add
> > > > > a user space program to listen it's uevent and tigger 'cpu_up'.
> > > > it is up to guest OS policy to decide if CPU should be onlined or not,
> > >
> > > Yep, but I think it's a favor to do cpu online.
> > Then you have to teach kernel driver (EC) to do cpu_up on _Q02 event,
>
> I think it's not necessary to do this.
> we can also add another platform driver to listen cpu plug/unplug event
> and query EC's ACPI space to decide what to do next.
>
> > the question is why would you do this when there is ACPI processor driver
> > already that handles CPU hotplug in kernel.
> > You can try add cpu_up() there and perhaps with good enough reasoning it
> > would be accepted.
>
> it's not so convenient to trigger cpu_up/down process for ACPI processor
> driver as far as I can see, it seems like informal or hack there.
> so I'd like to make a bridge between them.
>
> but, anyway, it's a good point to think about or even try to do.
>
> >
> > >
> > > > at least I've seen this rationale on LKML when topic was discussed and
> > > > automatic cpu_up on hotplug was rejected.
> > >
> > > Oh, and the reason is?
> > Reason was to let guest decide whether online new CPU or nor instead of
> > doing it unconditionally.
> >
>
> can this be a Kconfig option?
> or it's strongly recommended to let guest decide?
Probably there is no harm in trying to post patch to LKML and get feedback.
next prev parent reply other threads:[~2013-05-28 9:38 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-22 3:46 [Qemu-devel] [PATCH 0/4] add ACPI Embedded Controller liguang
2013-05-22 3:46 ` [Qemu-devel] [PATCH 1/4] acpi: add ACPI Embedded Controller support liguang
2013-05-22 3:46 ` [Qemu-devel] [PATCH 2/4] acpi/gpe: expand bits of gpe register liguang
2013-05-22 5:28 ` Isaku Yamahata
2013-05-22 5:37 ` li guang
2013-05-24 1:24 ` Isaku Yamahata
2013-05-24 2:02 ` li guang
2013-05-27 9:00 ` Gerd Hoffmann
2013-05-28 0:32 ` li guang
2013-05-27 9:06 ` Gerd Hoffmann
2013-05-22 3:46 ` [Qemu-devel] [PATCH 3/4] ich9: add notifer for ec to generate sci liguang
2013-05-27 20:21 ` Michael S. Tsirkin
2013-05-28 0:23 ` li guang
2013-05-28 6:40 ` Michael S. Tsirkin
2013-05-28 6:44 ` li guang
2013-05-22 3:46 ` [Qemu-devel] [PATCH 4/4][seabios] ec: add ASL for ACPI Embedded Controller liguang
2013-05-23 3:03 ` li guang
2013-05-24 0:34 ` [Qemu-devel] [PATCH 0/4] add " li guang
2013-05-24 11:45 ` Michael S. Tsirkin
2013-05-27 0:20 ` li guang
2013-05-27 0:51 ` Anthony Liguori
2013-05-27 1:22 ` li guang
2013-05-27 11:45 ` Igor Mammedov
2013-05-28 0:28 ` li guang
2013-05-28 8:16 ` Igor Mammedov
2013-05-28 8:34 ` li guang
2013-05-28 9:38 ` Igor Mammedov [this message]
2013-05-29 0:23 ` li guang
2013-05-27 20:23 ` Michael S. Tsirkin
2013-05-28 0:21 ` li guang
2013-05-28 6:31 ` Michael S. Tsirkin
2013-05-28 6:40 ` li guang
2013-05-28 6:48 ` Michael S. Tsirkin
2013-05-28 8:26 ` Igor Mammedov
2013-05-28 8:40 ` 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=20130528113811.4e28aead@nial.usersys.redhat.com \
--to=imammedo@redhat.com \
--cc=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=brogers@suse.com \
--cc=jschopp@linux.vnet.ibm.com \
--cc=kraxel@redhat.com \
--cc=lig.fnst@cn.fujitsu.com \
--cc=mst@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.