From: Rob Herring <robh@kernel.org>
To: Sudan Landge <sudanl@amazon.com>
Cc: graf@amazon.de, tytso@mit.edu, krzysztof.kozlowski+dt@linaro.org,
linux-kernel@vger.kernel.org, xmarcalx@amazon.co.uk,
robh+dt@kernel.org, Jason@zx2c4.com, bchalios@amazon.es,
thomas.lendacky@amd.com, dwmw@amazon.co.uk,
devicetree@vger.kernel.org,
sathyanarayanan.kuppuswamy@linux.intel.com, conor+dt@kernel.org,
dan.j.williams@intel.com
Subject: Re: [PATCH v4 4/5] dt-bindings: rng: Add vmgenid support
Date: Wed, 10 Apr 2024 15:09:32 -0500 [thread overview]
Message-ID: <171277976994.1266656.4960056294355072441.robh@kernel.org> (raw)
In-Reply-To: <20240409181154.9962-5-sudanl@amazon.com>
On Tue, 09 Apr 2024 19:11:53 +0100, Sudan Landge wrote:
> Virtual Machine Generation ID driver was introduced in commit af6b54e2b5ba
> ("virt: vmgenid: notify RNG of VM fork and supply generation ID"), as an
> ACPI only device.
>
> VMGenID specification http://go.microsoft.com/fwlink/?LinkId=260709 defines
> a mechanism for the BIOS/hypervisors to communicate to the virtual machine
> that it is executed with a different configuration (e.g. snapshot execution
> or creation from a template).
> The guest operating system can use the notification for various purposes
> such as re-initializing its random number generator etc.
>
> As per the specs, hypervisor should provide a globally unique identified,
> or GUID via ACPI.
>
> This patch tries to mimic the mechanism to provide the same functionality
> which is for a hypervisor/BIOS to notify the virtual machine when it is
> executed with a different configuration.
>
> As part of this support the devicetree bindings requires the hypervisors or
> BIOS to provide a memory address which holds the GUID and an IRQ which is
> used to notify when there is a change in the GUID.
> The memory exposed in the DT should follow the rules defined in the
> vmgenid spec mentioned above.
>
> *Reason for this change*:
> Chosing ACPI or devicetree is an intrinsic part of an hypervisor design.
> Without going into details of why a hypervisor would choose DT over ACPI,
> we would like to highlight that the hypervisors that have chose devicetree
> and now want to make use of the vmgenid functionality cannot do so today
> because vmgenid is an ACPI only device.
> This forces these hypervisors to change their design which could have
> undesirable impacts on their use-cases, test-scenarios etc.
>
> vmgenid exposes to the guest a 16-byte cryptographically random number,
> the value of which changes every time it starts executing from a new
> configuration (snapshot, backup, etc.). During initialization, the device
> exposes to the guest the address of the generation ID and
> an interrupt number, which the device will use to notify the guest when
> the generation ID changes.
> These attributes can be trivially communicated via device tree bindings.
>
> We believe that adding a devicetree binding for vmgenid is a simpler
> alternative way to expose the device to the guest than forcing the
> hypervisors to implement ACPI.
>
> More references to vmgenid specs:
> - https://www.qemu.org/docs/master/specs/vmgenid.html
> - https://learn.microsoft.com/en-us/windows/win32/hyperv_v2/virtual-
> machine-generation-identifier
>
> Signed-off-by: Sudan Landge <sudanl@amazon.com>
> ---
> .../bindings/rng/microsoft,vmgenid.yaml | 49 +++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 50 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/rng/microsoft,vmgenid.yaml
>
Reviewed-by: Rob Herring <robh@kernel.org>
next prev parent reply other threads:[~2024-04-10 20:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-09 18:11 [PATCH v4 0/5] virt: vmgenid: Add devicetree bindings support Sudan Landge
2024-04-09 18:11 ` [PATCH v4 1/5] virt: vmgenid: rearrange code to make review easier Sudan Landge
2024-04-09 18:11 ` [PATCH v4 2/5] virt: vmgenid: change implementation to use a platform driver Sudan Landge
2024-04-09 18:11 ` [PATCH v4 3/5] virt: vmgenid: enable driver regardless of ACPI config Sudan Landge
2024-04-09 18:11 ` [PATCH v4 4/5] dt-bindings: rng: Add vmgenid support Sudan Landge
2024-04-10 20:09 ` Rob Herring [this message]
2024-04-09 18:11 ` [PATCH v4 5/5] virt: vmgenid: add support for devicetree bindings Sudan Landge
2024-04-16 10:49 ` Alexander Graf
2024-04-16 15:49 ` Babis Chalios
-- strict thread matches above, loose matches on Subject: below --
2024-04-09 17:01 [PATCH v4 0/5] virt: vmgenid: Add devicetree bindings support Sudan Landge
2024-04-09 17:01 ` [PATCH v4 4/5] dt-bindings: rng: Add vmgenid support Sudan Landge
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=171277976994.1266656.4960056294355072441.robh@kernel.org \
--to=robh@kernel.org \
--cc=Jason@zx2c4.com \
--cc=bchalios@amazon.es \
--cc=conor+dt@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw@amazon.co.uk \
--cc=graf@amazon.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sathyanarayanan.kuppuswamy@linux.intel.com \
--cc=sudanl@amazon.com \
--cc=thomas.lendacky@amd.com \
--cc=tytso@mit.edu \
--cc=xmarcalx@amazon.co.uk \
/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
all inboxes | Powered by JetHome®