Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1204498

Re: [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device
Date 2015-08-10 21:20 +0200
Message-ID <pW0M2-73c-17@gated-at.bofh.it> (permalink)
References <pVYTT-4mq-3@gated-at.bofh.it> <pVYTT-4mq-1@gated-at.bofh.it> <pW09k-643-13@gated-at.bofh.it> <pW0Cn-6RM-63@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 10, 2015 at 03:02:22PM -0400, Gabriel L. Somlo wrote:
> Mainly, qemu's fw_cfg is a read-only "device", so one wouldn't ever
> care to try writing anything to it. /sys/firmware/... feels like a fit
> because fw_cfg contains binary blobs originally meant to be used by
> the bios (it's how SeaBIOS and OVMF pull smbios and acpi tables out of
> the host and set them up in guest memory before booting the guest kernel,
> as one of the many examples).
> 
> The most similar example (and the existing driver I used as an example
> during implementation) is dmi-sysfs.c, which also exposes all the
> metadata for each smbios table as numeric (or string) read-only attributes,
> and has a "raw" attribute which allows dumping each table in its
> entirety. Same thing here -- I want to expose the name, size, and
> select key for each blob, but also allow access to the "payload", i.e.
> the blob itself.

That's great, and you can have these "blobs" be an attribute for a
struct device.  Just using a "raw" kobject as you are is hard, as you
have seen, and messy.  Making it a "real" device makes this all much
easier and simpler.

Now if you want to keep things in /sys/firmware/ that's another issue,
and would have to stay as a kobject.  so maybe it does need to remain,
need to think about that...

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] SysFS driver for QEMU firmware config device (fw_cfg) "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 19:20 +0200
  [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg device "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 19:20 +0200
    Re: [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg  device Greg KH <gregkh@linuxfoundation.org> - 2015-08-10 20:40 +0200
      Re: [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg  device "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 21:10 +0200
        Re: [PATCH 1/3] firmware: introduce sysfs driver for QEMU's fw_cfg  device Greg KH <gregkh@linuxfoundation.org> - 2015-08-10 21:20 +0200
  [PATCH 2/3] kobject: export kset_find_obj() to be used from modules "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 19:20 +0200
    Re: [PATCH 2/3] kobject: export kset_find_obj() to be used from  modules Greg KH <gregkh@linuxfoundation.org> - 2015-08-10 20:40 +0200
      Re: [PATCH 2/3] kobject: export kset_find_obj() to be used from  modules Greg KH <gregkh@linuxfoundation.org> - 2015-08-10 21:00 +0200
        Re: [PATCH 2/3] kobject: export kset_find_obj() to be used from  modules "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 21:10 +0200
      Re: [PATCH 2/3] kobject: export kset_find_obj() to be used from  modules "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 21:10 +0200
  [PATCH 3/3] firmware: fw_cfg: create directory hierarchy for fw_cfg file names "Gabriel L. Somlo" <somlo@cmu.edu> - 2015-08-10 19:20 +0200
    Re: [PATCH 3/3] firmware: fw_cfg: create directory hierarchy for  fw_cfg file names Greg KH <gregkh@linuxfoundation.org> - 2015-08-10 20:40 +0200

csiph-web