qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gal Hammer <ghammer@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] i386: Add a Virtual Machine Generation ID device.
Date: Tue, 12 Aug 2014 11:02:42 +0300	[thread overview]
Message-ID: <53E9CA22.8090300@redhat.com> (raw)
In-Reply-To: <53E7AA72.6030204@redhat.com>

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 <ghammer@redhat.com>
>> ---
>>   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	other threads:[~2014-08-12  8:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-10 11:32 [Qemu-devel] [PATCH 0/2] Virtual Machine Generation ID Gal Hammer
2014-08-10 11:32 ` [Qemu-devel] [PATCH 1/2] i386: Add an ACPI_EXTRACT_NAME_BUFFER16 directive Gal Hammer
2014-08-10 11:32 ` [Qemu-devel] [PATCH 2/2] i386: Add a Virtual Machine Generation ID device Gal Hammer
2014-08-10 17:22   ` Paolo Bonzini
2014-08-12  8:02     ` Gal Hammer [this message]
2014-08-17  9:49       ` Paolo Bonzini
2014-08-18  8:47         ` Markus Armbruster
2014-09-01  7:20         ` Gal Hammer
2014-09-01  8:57           ` Paolo Bonzini
2014-09-02 13:02             ` Gal Hammer
  -- strict thread matches above, loose matches on Subject: below --
2014-09-02 12:53 [Qemu-devel] [PATCH 0/2 V2] Virtual Machine Generation ID Gal Hammer
2014-09-02 12:53 ` [Qemu-devel] [PATCH 2/2] i386: Add a Virtual Machine Generation ID device Gal Hammer
2014-09-14  6:25 [Qemu-devel] [PATCH RESEND 0/2 V2] Virtual Machine Generation ID Gal Hammer
2014-09-14  6:25 ` [Qemu-devel] [PATCH 2/2] i386: Add a Virtual Machine Generation ID device Gal Hammer
2014-09-15  7:27 [Qemu-devel] [PATCH 0/2 V3] Virtual Machine Generation ID Gal Hammer
2014-09-15  7:27 ` [Qemu-devel] [PATCH 2/2] i386: Add a Virtual Machine Generation ID device Gal Hammer
2014-09-15  8:46   ` Igor Mammedov
2014-09-15  9:15     ` Gal Hammer
2014-09-16 13:04 [Qemu-devel] [PATCH 0/2 V4] Virtual Machine Generation ID Gal Hammer
2014-09-16 13:04 ` [Qemu-devel] [PATCH 2/2] i386: Add a Virtual Machine Generation ID device Gal Hammer
2014-09-16 13:16   ` Paolo Bonzini
2014-09-16 14:54   ` Igor Mammedov
2014-09-17  7:36     ` Gal Hammer
2014-09-17  9:56       ` Igor Mammedov
2014-09-17 11:39 [Qemu-devel] [PATCH 0/2 V5] Virtual Machine Generation ID Gal Hammer
2014-09-17 11:39 ` [Qemu-devel] [PATCH 2/2] i386: Add a Virtual Machine Generation ID device Gal Hammer
2014-10-02 12:49   ` Michael S. Tsirkin
2014-10-02 13:14     ` Gal Hammer
2014-10-02 13:30       ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53E9CA22.8090300@redhat.com \
    --to=ghammer@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).