From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZctF8-00066S-Mk for qemu-devel@nongnu.org; Fri, 18 Sep 2015 06:50:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZctF7-0003HE-R6 for qemu-devel@nongnu.org; Fri, 18 Sep 2015 06:50:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZctF7-0003Gr-LW for qemu-devel@nongnu.org; Fri, 18 Sep 2015 06:50:13 -0400 Message-ID: <1442573408.29362.4.camel@redhat.com> From: Gerd Hoffmann Date: Fri, 18 Sep 2015 12:50:08 +0200 In-Reply-To: <20150917210128.GA10294@HEDWIG.INI.CMU.EDU> References: <1442501794-27112-1-git-send-email-somlo@cmu.edu> <20150917232926-mutt-send-email-mst@redhat.com> <20150917210128.GA10294@HEDWIG.INI.CMU.EDU> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 0/5] add ACPI node for fw_cfg on pc and arm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gabriel L. Somlo" Cc: peter.maydell@linaro.org, drjones@redhat.com, matt.fleming@intel.com, ehabkost@redhat.com, "Michael S. Tsirkin" , ard.biesheuvel@linaro.org, qemu-devel@nongnu.org, leif.lindholm@linaro.org, kevin@koconnor.net, pbonzini@redhat.com, zhaoshenglong@huawei.com, imammedo@redhat.com, markmb@redhat.com, lersek@redhat.com, rth@twiddle.net 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