qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <graf@amazon.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Ard Biesheuvel <ardb@kernel.org>,  <adrian@parity.io>
Cc: "KVM list" <kvm@vger.kernel.org>,
	"Linux Crypto Mailing List" <linux-crypto@vger.kernel.org>,
	linux-hyperv@vger.kernel.org,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	ben@skyportsystems.com,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Colm MacCarthaigh" <colmmacc@amazon.com>,
	"Dexuan Cui" <decui@microsoft.com>,
	"Woodhouse, David" <dwmw@amazon.co.uk>,
	"Eric Biggers" <ebiggers@kernel.org>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Haiyang Zhang" <haiyangz@microsoft.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Jann Horn" <jannh@google.com>,
	"KY Srinivasan" <kys@microsoft.com>,
	"Laszlo Ersek" <lersek@redhat.com>,
	"Dominik Brodowski" <linux@dominikbrodowski.net>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Weiss, Radu" <raduweis@amazon.com>,
	"Stephen Hemminger" <sthemmin@microsoft.com>,
	"Theodore Y. Ts'o" <tytso@mit.edu>,
	"Wei Liu" <wei.liu@kernel.org>
Subject: Re: [PATCH v4] virt: vmgenid: introduce driver for reinitializing RNG on VM fork
Date: Fri, 25 Feb 2022 16:37:43 +0100	[thread overview]
Message-ID: <b6c5c4d4-88a5-1ac5-a4d4-2f6895065834@amazon.com> (raw)
In-Reply-To: <Yhj288aE5rW15Qpj@zx2c4.com>


On 25.02.22 16:34, Jason A. Donenfeld wrote:
> On Fri, Feb 25, 2022 at 04:16:27PM +0100, Ard Biesheuvel wrote:
>>>> I just booted up a Windows VM, and it looks like Hyper-V uses
>>>> "Hyper_V_Gen_Counter_V1", which is also quite long, so we can't really
>>>> HID match on that either.
>>>
>>> Yes, due to the same problem. I'd really prefer we sort out the ACPI
>>> matching before this goes mainline. Matching on _HID is explicitly
>>> discouraged in the VMGenID spec.
>>>
>> OK, this really sucks. Quoting the ACPI spec:
>>
>> """
>> A _HID object evaluates to either a numeric 32-bit compressed EISA
>> type ID or a string. If a string, the format must be an alphanumeric
>> PNP or ACPI ID with no asterisk or other leading characters.
>> A valid PNP ID must be of the form "AAA####" where A is an uppercase
>> letter and # is a hex digit.
>> A valid ACPI ID must be of the form "NNNN####" where N is an uppercase
>> letter or a digit ('0'-'9') and # is a hex digit. This specification
>> reserves the string "ACPI" for use only with devices defined herein.
>> It further reserves all strings representing 4 HEX digits for
>> exclusive use with PCI-assigned Vendor IDs.
>> """
>>
>> So now we have to implement Microsoft's fork of ACPI to be able to use
>> this device, even if we expose it from QEMU instead of Hyper-V? I
>> strongly object to that.
>>
>> Instead, we can match on _HID exposed by QEMU, and cordially invite
>> Microsoft to align their spec with the ACPI spec.
> I don't know about that... Seems a bit extreme. Hopefully Alex will be
> able to sort something out with the ACPI people, and this driver will
> work inside of Hyper-V.
>
> Here's what we currently have:
>
>    static const struct acpi_device_id vmgenid_ids[] = {
>      { "VMGENID", 0 },  <------------------------------------ ???
>      { "QEMUVGID", 0 }, <------------------------------------ QEMU
>      { },
>    };
>
> Adrian added "VMGENID" in last year's v4, so I copied that for this new
> driver here. But does anybody know which hypervisor it is for? Some
> internal Amazon thing? Firecracker? VMware? In case Alex does not
> succeed with the ACPI changes, it'd be nice to know which HIDs for
> which hypervisors we do and do not support.


I believe "VMGENID" was for the firecracker prototype that Adrian built 
back then, yeah. Matching on _HID for this is a rat hole unfortunately, 
so let's see what the ACPI patch gets us :).


Alex





Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879



  reply	other threads:[~2022-02-25 15:42 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24 13:39 [PATCH v3 0/2] VM fork detection for RNG Jason A. Donenfeld
2022-02-24 13:39 ` [PATCH v3 1/2] random: add mechanism for VM forks to reinitialize crng Jason A. Donenfeld
2022-02-25 11:26   ` Ard Biesheuvel
2022-02-25 11:43     ` Jason A. Donenfeld
2022-02-25 11:44       ` Ard Biesheuvel
2022-02-24 13:39 ` [PATCH v3 2/2] virt: vmgenid: introduce driver for reinitializing RNG on VM fork Jason A. Donenfeld
2022-02-25 10:37   ` Laszlo Ersek
2022-02-25 11:24   ` Ard Biesheuvel
2022-02-25 11:51     ` Michael S. Tsirkin
2022-02-25 12:01       ` Jason A. Donenfeld
2022-02-25 12:00     ` Jason A. Donenfeld
2022-02-25 12:48       ` [PATCH v4] " Jason A. Donenfeld
2022-02-25 12:52         ` Greg KH
2022-02-25 12:53         ` Greg KH
2022-02-25 12:56           ` Jason A. Donenfeld
2022-02-25 15:04           ` Ard Biesheuvel
2022-02-25 13:57         ` Alexander Graf
2022-02-25 14:12           ` Jason A. Donenfeld
2022-02-25 14:18             ` Jason A. Donenfeld
2022-02-25 14:18             ` Alexander Graf
2022-02-25 14:33               ` Jason A. Donenfeld
2022-02-25 15:11                 ` Alexander Graf
2022-02-25 15:16                   ` Ard Biesheuvel
2022-02-25 15:22                     ` Alexander Graf
2022-02-25 15:43                       ` Jason A. Donenfeld
2022-02-25 15:57                         ` Alexander Graf
2022-02-25 15:34                     ` Jason A. Donenfeld
2022-02-25 15:37                       ` Alexander Graf [this message]
2022-02-25 15:45                         ` Jason A. Donenfeld
2022-02-25 14:36           ` Greg KH
2022-02-25 15:31             ` Alexander Graf
2022-02-25 15:36               ` Jason A. Donenfeld
2022-02-25 14:54           ` Jason A. Donenfeld
2022-02-25 15:15             ` Alexander Graf
2022-02-25 15:28               ` Jason A. Donenfeld
2022-02-25 15:03           ` Ard Biesheuvel
2022-02-25 15:14             ` Alexander Graf

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=b6c5c4d4-88a5-1ac5-a4d4-2f6895065834@amazon.com \
    --to=graf@amazon.com \
    --cc=Jason@zx2c4.com \
    --cc=adrian@parity.io \
    --cc=ardb@kernel.org \
    --cc=ben@skyportsystems.com \
    --cc=berrange@redhat.com \
    --cc=colmmacc@amazon.com \
    --cc=decui@microsoft.com \
    --cc=dwmw@amazon.co.uk \
    --cc=ebiggers@kernel.org \
    --cc=ehabkost@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=haiyangz@microsoft.com \
    --cc=imammedo@redhat.com \
    --cc=jannh@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=kys@microsoft.com \
    --cc=lersek@redhat.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=raduweis@amazon.com \
    --cc=sthemmin@microsoft.com \
    --cc=tytso@mit.edu \
    --cc=wei.liu@kernel.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).