qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] i386: Add a Virtual Machine Generation ID d


From: Gal Hammer
Subject: Re: [Qemu-devel] [PATCH 2/2] i386: Add a Virtual Machine Generation ID device.
Date: Tue, 12 Aug 2014 11:02:42 +0300
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hi,

On 10/08/2014 20:22, Paolo Bonzini wrote:

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 <address@hidden>
---
  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.

There is a problem with this request. I don't want to use ISA because it is obsolete, PCI is overkill for such a device and a SYSBUS (like HPET) device doesn't effect the command line options.

Did I miss something in SYSBUS and that's was the reason it didn't appear in the "-device ?" list?


+    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.

I'm not sure I understand this comment. I've put the new device in the SSDT table (like pvpanic) and add a _STA method which disable the device if no GUID's address is set (VGIA). The device doesn't show in the Device Manager if it was not added using the command line.

    Gal.

Thanks,

Paolo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]