From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG4Xb-0007wM-Nm for qemu-devel@nongnu.org; Thu, 14 Mar 2013 05:33:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UG4XS-0005EZ-CF for qemu-devel@nongnu.org; Thu, 14 Mar 2013 05:33:39 -0400 Received: from [222.73.24.84] (port=59404 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UG4XR-0005Dx-Vk for qemu-devel@nongnu.org; Thu, 14 Mar 2013 05:33:30 -0400 Date: Thu, 14 Mar 2013 17:33:19 +0800 From: Hu Tao Message-ID: <20130314093319.GD20796@localhost.localdomain> References: <1363250927-20298-1-git-send-email-hutao@cn.fujitsu.com> <20130314085718.GZ11223@redhat.com> MIME-Version: 1.0 In-Reply-To: <20130314085718.GZ11223@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Subject: Re: [Qemu-devel] [PATCH] Add pvevent device driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gleb Natapov Cc: Peter Maydell , "Michael S. Tsirkin" , Jan Kiszka , seabios@seabios.org, qemu-devel , Markus Armbruster , Blue Swirl , Orit Wasserman , Juan Quintela , Alexander Graf , Christian Borntraeger , Andrew Jones , Alex Williamson , Sasha Levin , Stefan Hajnoczi , Luiz Capitulino , KAMEZAWA Hiroyuki , Kevin Wolf , Anthony Liguori , Marcelo Tosatti , Paolo Bonzini On Thu, Mar 14, 2013 at 10:57:18AM +0200, Gleb Natapov wrote: > On Thu, Mar 14, 2013 at 04:48:47PM +0800, Hu Tao wrote: > > pvevent device is used to notify host(qemu) when guest panic > > happens. > > > > ref: http://lists.nongnu.org/archive/html/qemu-devel/2013-03/msg02293.html > > > > Signed-off-by: Hu Tao > > --- > > src/acpi-dsdt-isa.dsl | 30 ++++++++++++++++++++++++++++++ > > 1 file changed, 30 insertions(+) > > > > diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl > > index 23761db..d083245 100644 > > --- a/src/acpi-dsdt-isa.dsl > > +++ b/src/acpi-dsdt-isa.dsl > > @@ -99,4 +99,34 @@ Scope(\_SB.PCI0.ISA) { > > IRQNoFlags() { 3 } > > }) > > } > > + > > + Device(PEVT) { > > + Name(_HID, "MSFT0001") > We cannot use MSFT! OK, I see now, we have to use QEMU0001 or like. More question: if I request ACPI ID: QEMU from pnpid@microsoft.com, who should be CCed, Anthony, qemu-list or any others? > > > + OperationRegion(PEOR, SystemIO, 0x0505, 0x01) > IO port should be received form QEMU by fw_cfg and patched here at run time. If I'm right, io port can be passed to seabios through fw_cfg file interface, but I'm still figuring out how to patch DSDT here and below at run time. Maybe build_ssdt() is close to this. > > > + Field(PEOR, ByteAcc, NoLock, Preserve) { > > + PEPT, 8, > > + } > > + > > + Method(_STA, 0, NotSerialized) { > > + Store(PEPT, Local0) > > + If (LEqual(Local0, Zero)) { > > + Return (0x00) > > + } Else { > > + Return (0x0F) > > + } > > + } > No probing. If QEMU does not provide IO port function should be patched > to return zero. > > > + > > + Method(RDPT, 0, NotSerialized) { > > + Store(PEPT, Local0) > > + Return (Local0) > > + } > > + > > + Method(WRPT, 1, NotSerialized) { > > + Store(Arg0, PEPT) > > + } > > + > > + Name(_CRS, ResourceTemplate() { > > + IO(Decode16, 0x0505, 0x0505, 0x01, 0x01) > > + }) > > + } > > } > > -- > > 1.8.1.4 > > -- > Gleb.