Re: [PATCH v1 0/4] virt: vmgenid: Add devicetree bindings support

From: David Woodhouse
Date: Wed Mar 20 2024 - 09:51:07 EST


On Tue, 2024-03-19 at 16:24 +0100, Krzysztof Kozlowski wrote:
> On 19/03/2024 15:32, Sudan Landge wrote:
> > This small series of patches aims to add devicetree bindings support for
> > the Virtual Machine Generation ID (vmgenid) driver.
> >
> > 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.
> > We would like to extend vmgenid to support devicetree bindings because:
> > 1. A device should not be defined as an ACPI or DT only device.
>
> Virtual stuff is not a device, so your first assumption or rationale is
> not correct.
>
> Virtual stuff can be ACPI only, because DT is not for Virtual stuff.

I strongly disagree with this.

Discovering things is what the device-tree is *for*.

We don't want to add extra complexity and overhead on both host and
guest side to make things discoverable in a *less* efficient way.

The device-tree isn't just a last-resort for when we can't possibly do
things differently in a discoverable way. The device-tree is a first-
class citizen and perfectly valid choice as a way to discover things.

We shouldn't be forcing people to turn things into PCI devices just to
avoid adding DT bindings for them.

And we *certainly* shouldn't be directing people towards all the
awfulness of ACPI, and in-kernel bytecode interpreters, and all that
horridness, just because we don't want to use DT to... describe things.



Attachment: smime.p7s
Description: S/MIME cryptographic signature