From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui3dS-0006rK-MM for qemu-devel@nongnu.org; Thu, 30 May 2013 10:15:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ui3dN-0004KB-Uy for qemu-devel@nongnu.org; Thu, 30 May 2013 10:15:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui3dN-0004K2-ME for qemu-devel@nongnu.org; Thu, 30 May 2013 10:15:17 -0400 Date: Thu, 30 May 2013 16:14:32 +0200 From: Igor Mammedov Message-ID: <20130530161432.0dfe6b84@nial.usersys.redhat.com> In-Reply-To: <1369792062-14269-1-git-send-email-lig.fnst@cn.fujitsu.com> References: <1369792062-14269-1-git-send-email-lig.fnst@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 0/7] pass cpu online/offline event bewteen QEMU and linux kernel by ACPI Embedded Controller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liguang Cc: Kevin Wolf , Alexander Graf , Anthony Liguori , Stefan Berger , Joel Schopp , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Markus Armbruster , Juan Quintela , Gerd Hoffmann , Andreas =?ISO-8859-1?B?RuRyYmVy?= , Paolo Bonzini , Luiz Capitulino , Christian Borntraeger , Isaku Yamahata On Wed, 29 May 2013 09:47:35 +0800 liguang wrote: > 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 _Qxx is defined in ACPI tables (i.e. firmware) and OS can just execute it. > 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. > 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: > > cpu-add/del --> EC space & sci setting --> kernel EC driver gpe handler > I > V > listen cpu hotplug event Does this and following parts mean that guest OS must have platform specific driver to handle custom event? Is there OS that can do it and below without a new driver? > I > V > query EC space for cpu status > I > V > trigger cpu online/offline process > > > Li Guang (7) > 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 > > 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 | 22 ++++++++++++++ > hw/i386/pc.c | 30 ++++++++++++++++++++++++++++-- > hw/i386/pc_piix.c | 7 + > hw/i386/pc_q35.c | 6 + > include/hw/acpi/ec.h | 39 ++++++ > 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, 390 insertions(+), 8 deletions(-) > create mode 100644 hw/acpi/ec.c > create mode 100644 include/hw/acpi/ec.h >