From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGWqb-0004l1-PY for qemu-devel@nongnu.org; Sun, 10 Aug 2014 13:24:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGWqS-0002uo-N7 for qemu-devel@nongnu.org; Sun, 10 Aug 2014 13:23:57 -0400 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]:54079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGWqS-0002uh-Fh for qemu-devel@nongnu.org; Sun, 10 Aug 2014 13:23:48 -0400 Received: by mail-wi0-f181.google.com with SMTP id bs8so3160320wib.8 for ; Sun, 10 Aug 2014 10:23:47 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53E7AA72.6030204@redhat.com> Date: Sun, 10 Aug 2014 19:22:58 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1407670353-14971-1-git-send-email-ghammer@redhat.com> <1407670353-14971-3-git-send-email-ghammer@redhat.com> In-Reply-To: <1407670353-14971-3-git-send-email-ghammer@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] i386: Add a Virtual Machine Generation ID device. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gal Hammer , qemu-devel@nongnu.org Il 10/08/2014 13:32, Gal Hammer ha scritto: > Based on Microsoft's sepecifications (paper can be dowloaded from > http://go.microsoft.com/fwlink/?LinkId=260709), add a device > description to the SSDT ACPI table. > > The GUID is set using a new "-vmgenid" command line parameter. > > Signed-off-by: Gal Hammer > --- > hw/i386/acpi-build.c | 23 +++++++++++++++++++++++ > hw/i386/ssdt-misc.dsl | 33 +++++++++++++++++++++++++++++++++ > qemu-options.hx | 9 +++++++++ > vl.c | 11 +++++++++++ > 4 files changed, 76 insertions(+) Please make this a new device (like pvpanic), instead of adding a new command-line option. > > + Scope(\_SB) { > + > + Device(VMGI) { > + Name(_HID, "QEMU0002") > + Name(_CID, "VM_Gen_Counter") > + Name(_DDN, "VM_Gen_Counter") > + > + ACPI_EXTRACT_NAME_DWORD_CONST ssdt_acpi_vm_gid_addr > + Name(VGIA, 0x12345678) > + > + ACPI_EXTRACT_NAME_BUFFER16 ssdt_acpi_vm_gid > + Name(VGID, Buffer(16) { > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, > + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }) > + > + Method(_STA, 0, NotSerialized) { > + Store(VGIA, Local0) > + If (LEqual(Local0, Zero)) { > + Return (0x00) > + } Else { > + Return (0x0F) > + } > + } > + > + Method(ADDR, 0, Serialized) { > + Store(Package(2) { }, Local0) > + Store(VGIA, Index(Local0, 0)) > + Store(0x0000, Index(Local0, 1)) > + return (Local0) > + } > + } > + } > + Please either put this in the DSDT, or omit the Device altogether if you put it in the SSDT and there is no VMGID device. Thanks, Paolo