From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhDhX-0007Uu-Qz for qemu-devel@nongnu.org; Tue, 28 May 2013 02:48:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UhDhU-0002xH-Ta for qemu-devel@nongnu.org; Tue, 28 May 2013 02:48:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UhDhU-0002wT-Le for qemu-devel@nongnu.org; Tue, 28 May 2013 02:48:04 -0400 Date: Tue, 28 May 2013 09:48:18 +0300 From: "Michael S. Tsirkin" Message-ID: <20130528064818.GD21270@redhat.com> References: <1369194397-608-1-git-send-email-lig.fnst@cn.fujitsu.com> <20130524114528.GC7046@redhat.com> <1369614057.19028.2.camel@liguang.fnst.cn.fujitsu.com> <87wqql1bz5.fsf@codemonkey.ws> <1369617779.19028.16.camel@liguang.fnst.cn.fujitsu.com> <20130527202324.GB20680@redhat.com> <1369700484.19028.44.camel@liguang.fnst.cn.fujitsu.com> <20130528063113.GB21270@redhat.com> <1369723230.19028.66.camel@liguang.fnst.cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1369723230.19028.66.camel@liguang.fnst.cn.fujitsu.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 0/4] add ACPI Embedded Controller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: li guang Cc: Stefan Berger , qemu-devel@nongnu.org, Bruce Rogers , Joel Schopp , Gerd Hoffmann , Anthony Liguori , Paolo Bonzini , Andreas =?iso-8859-1?Q?F=E4rber?= , Isaku Yamahata On Tue, May 28, 2013 at 02:40:30PM +0800, li guang wrote: > Hi, Michael >=20 > =E5=9C=A8 2013-05-28=E4=BA=8C=E7=9A=84 09:31 +0300=EF=BC=8CMichael S. T= sirkin=E5=86=99=E9=81=93=EF=BC=9A > > On Tue, May 28, 2013 at 08:21:24AM +0800, li guang wrote: > > > =E5=9C=A8 2013-05-27=E4=B8=80=E7=9A=84 23:23 +0300=EF=BC=8CMichael = S. Tsirkin=E5=86=99=E9=81=93=EF=BC=9A > > > > On Mon, May 27, 2013 at 09:22:59AM +0800, li guang wrote: > > > > > =E5=9C=A8 2013-05-26=E6=97=A5=E7=9A=84 19:51 -0500=EF=BC=8CAnth= ony Liguori=E5=86=99=E9=81=93=EF=BC=9A > > > > > > li guang writes: > > > > > >=20 > > > > > > > =E5=9C=A8 2013-05-24=E4=BA=94=E7=9A=84 14:45 +0300=EF=BC=8C= Michael S. Tsirkin=E5=86=99=E9=81=93=EF=BC=9A > > > > > > >> 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=20 > > > > > > >> > "ACPI Embedded Controller Interface Specification" > > > > > > >> >=20 > > > > > > >> > EC is a standard ACPI device, it plays flexible roles, > > > > > > >> > e.g.=20 > > > > > > >> > 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. > > > > > > >> >=20 > > > > > > >> > 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'. > > > > > > >> >=20 > > > > > > >> > patches for online/offline event handler of QEUM and=20 > > > > > > >> > linux kernel are writing, and will send once finished. > > > > > > >> >=20 > > > > > > >> > since EC is a common device, so I send pathes separately. > > > > > > >>=20 > > > > > > >> Do any non-linux guests support this device? > > > > > > >>=20 > > > > > > > > > > > > > > In fact, any OSes support ACPI will support this device. > > > > > > > so, windows will. > > > > > >=20 > > > > > > When you say "any OSes supporting ACPI" I think what you real= ly mean is > > > > > > that we can provide bytecode that interacts with the embedded > > > > > > controller. > > > > > >=20 > > > > > > There is not explicit driver in Linux or Windows AFAIK. > > > > >=20 > > > > > 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 > > > > >=20 > > > > > >=20 > > > > > > I still don't get the point of this. We can make ACPI hotplu= g work > > > > > > without introducing a new device like this. > > > > > >=20 > > > > >=20 > > > > > 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'. > > > > >=20 > > > > > and EC is not only for ACPI hotplug > > > > > for example, the 'pvpanic', if there's a EC, > > > > > we can pass pvpanic event by EC's ACPI space or Q-event, > > > > > then we will not need this kind of special devices anymore. > > > > >=20 > > > > >=20 > > > >=20 > > > >=20 > > > > So just to clarify: this patchset doesn't do anything useful > > > > itself,=20 > > >=20 > > > the first patch is pure EC implementation which is useful. > >=20 > > Sorry, I didn't mean to imply that this is not useful, > > merely that it is not yet directly useful for users. >=20 > Yep, by now, of course, only 1 user, that's me. :-) >=20 > >=20 > > > > it's some infrastructure that you want to build on > > > > top of? > > >=20 > > > Yes, I'd like to use EC as infrastructure for my further developmen= t. > > >=20 > >=20 > > I (and apparently others in this thread) would like to know some more > > about planned use for this code before deciding on inclusion. > >=20 >=20 > OK,=20 > currently, I am using EC to pass cpu hotplug event between QEMU and > linux kernel, and I'll post these patches later. > then, I'll query usages like this in QEMU, and convert them to use > EC's acpi approach if possible. >=20 > Thanks! >=20 Okay, that needs an ack from Igor then I think :) --=20 MST