On Do, 2015-09-17 at 17:01 -0400, Gabriel L. Somlo wrote: > > What I'm still missing is the motivation for the change. > > > > Went through old threads, still can't find it. > > I've been working on a sysfs driver to allow viewing fw_cfg file > metadata (size, name, etc) and content (e.g. 'raw') in something > like /sys/firmware/qemu-fw-cfg/by_key/... (similar to how e.g. > smbios tables can be accessed via /sys/firmware/dmi/entries/...). > > Motivation is that since we can insert user-defined blobs via the qemu > command line, wouldn't it be nice to be able to easily retrieve them > from the guest, and what's easier than "cp /sys/firmware/.../raw ..." ? > > One of the main requirements I got there was to avoid probing fw_cfg > registers during initialization of the sysfs driver, and instead use > device tree on arm (and acpi on i386) to first figure out whether > fw_cfg is even expected to be there. > > There's a DT entry for fw_cfg on arm, but no acpi entry for fw_cfg on > x86, so I decided why not add one ? It's a device, it occupies a mmio > or port-io region, why not tell the guest about it via ACPI ? > > That's about it, in a nutshell. Thanks for any further thoughts!
I think in general it would be good to notify the guest OS that there is something at port 0x510 (i.e. it is not free), even if the guest has no fw_cfg driver. cheers, Gerd