From: "Landge, Sudan" <sudanl@amazon.co.uk>
To: David Woodhouse <dwmw2@infradead.org>, Rob Herring <robh@kernel.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Sudan Landge <sudanl@amazon.com>, <tytso@mit.edu>,
<Jason@zx2c4.com>, <krzysztof.kozlowski+dt@linaro.org>,
<conor+dt@kernel.org>,
<sathyanarayanan.kuppuswamy@linux.intel.com>,
<thomas.lendacky@amd.com>, <dan.j.williams@intel.com>,
<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<graf@amazon.de>, <bchalios@amazon.es>, <xmarcalx@amazon.co.uk>,
<ardb@kernel.org>, benh <benh@kernel.crashing.org>
Subject: Re: [PATCH v1 0/4] virt: vmgenid: Add devicetree bindings support
Date: Fri, 22 Mar 2024 16:39:07 +0000 [thread overview]
Message-ID: <d790d5cc-a116-4d5b-97a4-da0d073ff3e3@amazon.co.uk> (raw)
In-Reply-To: <0a83e174db16e15cb0f0d3ac37d6717c918ee78d.camel@infradead.org>
On 22/03/2024 14:27, David Woodhouse wrote:
> On Fri, 2024-03-22 at 08:22 -0500, Rob Herring wrote:
>>
>>>> What stops you from passing fw_cfg not to UEFI FW? BTW, no actual VM
>>>> name was used in your posting, but now suddenly it is a talk about QEMU.
>
> (Forgot to address the second part of that last time. No specific VMM
> was mentioned in the first place because this isn't VMM-specific)
>
QEMU is referenced to explain `vmgenid` which they are also using and
have more documentation on it. We mentioned the hypervisor we tested the
changes with in the cover letter which is
https://github.com/firecracker-microvm/firecracker but this change isn't
VMM specific.
>>> That would be possible. But not ideal.
>>
>> Why not ideal?
>>
>> To rephrase the question, why is it fine for UEFI to read the vmgenid
>> from fw_cfg, but the kernel can't use the same mechanism?
>
> Because fw_cfg an incestuous way to get data from the VMM into the BIOS
> (both SeaBIOS and UEFI). It's the way we pass the ACPI tables and
> things like that.
>
> It *isn't* designed as a general-purpose way of doing device discovery
> for use by various operating systems.
>
> I'm also not sure Firecracker, which is the VMM Sudan is working on,
> even *has* fw_cfg. Especially on ARM. If we're going to be forced to
> add some complicated device with MMIO and DMA just to be able to
> advertise the existence of a simple memory region, that's just as bad
> as being forced to expose it as an emulated PCI device.
>
> This is what DT is *for*.
>
>
>> The response
>> that you'd have to use UEFI to use fw_cfg makes no sense to me. The
>> only reason I can think of is just being lazy and wanting to have
>> minimal changes to some existing driver. It looks to me like you could
>> implement this entirely in userspace already with zero kernel or
>> binding changes. From a quick look, we already have a fw_cfg driver
>> exposing UUID (that's the same thing as vmgenid AIUI) to userspace,
>> and you can feed that back into the random pool.
>>
>> I am concerned that we already have a mechanism and you want to add a
>> second way. When do we ever think that's a good idea? What happens
>> on the next piece of fw_cfg data? We add yet another binding?
>
> No, because fw_cfg is a way for the VMM to give configuration
> information to the firmware. There's a clue in the name. The firmware
> then sets up ACPI tables or DT to pass information in a more coherent
> and structured fashion to general-purpose operating systems.
>
> And some VMMs *don't* use fw_cfg at all because for the minimal microvm
> case it's overkill.
>
The hypervisor we work on
(https://github.com/firecracker-microvm/firecracker) does not have
fw_cfg, it loads kernel directly without the need for UEFI or any
intermediate firmware. It is, as said, an overkill to enable UEFI and
fw_cfg just to support `vmgenid` specially when there is an alternative
available which could keep things simple for the vmm and for the linux
driver.
next prev parent reply other threads:[~2024-03-22 16:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 14:32 Sudan Landge
2024-03-19 14:32 ` [PATCH v1 1/4] virt: vmgenid: rearrange code to make review easier Sudan Landge
2024-03-19 14:32 ` [PATCH v1 2/4] virt: vmgenid: change implementation to use a platform driver Sudan Landge
2024-03-19 14:32 ` [PATCH v1 3/4] dt-bindings: Add bindings for vmgenid Sudan Landge
2024-03-19 15:28 ` Krzysztof Kozlowski
[not found] ` <f221da06-2a7c-4db3-a0de-870156865631@amazon.co.uk>
2024-03-20 10:24 ` Krzysztof Kozlowski
2024-03-20 12:16 ` Landge, Sudan
2024-03-19 14:32 ` [PATCH v1 4/4] virt: vmgenid: add support for devicetree bindings Sudan Landge
2024-03-19 15:30 ` Krzysztof Kozlowski
2024-03-20 8:14 ` kernel test robot
2024-03-20 13:35 ` kernel test robot
2024-03-20 16:54 ` kernel test robot
2024-03-21 1:10 ` kernel test robot
2024-03-19 15:24 ` [PATCH v1 0/4] virt: vmgenid: Add devicetree bindings support Krzysztof Kozlowski
2024-03-20 13:50 ` David Woodhouse
2024-03-20 16:15 ` Rob Herring
2024-03-20 16:55 ` David Woodhouse
2024-03-21 13:32 ` Rob Herring
2024-03-21 17:39 ` Landge, Sudan
2024-03-22 5:40 ` Krzysztof Kozlowski
2024-03-22 8:21 ` David Woodhouse
2024-03-22 13:22 ` Rob Herring
2024-03-22 14:27 ` David Woodhouse
2024-03-22 16:39 ` Landge, Sudan [this message]
2024-03-19 15:32 ` Krzysztof Kozlowski
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=d790d5cc-a116-4d5b-97a4-da0d073ff3e3@amazon.co.uk \
--to=sudanl@amazon.co.uk \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=bchalios@amazon.es \
--cc=benh@kernel.crashing.org \
--cc=conor+dt@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=graf@amazon.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@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®