[PATCH 3/3] firmware: fw_cfg: create directory hierarchy for fw_cfg file names

2015-08-10 Thread Gabriel L. Somlo
From: "Gabriel Somlo" Each fw_cfg entry of type "file" has an associated 56-char, nul-terminated ASCII string which represents its name. While the fw_cfg device doesn't itself impose any specific naming convention, QEMU developers have traditionally used path name semantics (i.e. "etc/acpi/rsdp")

[PATCH 0/3] SysFS driver for QEMU firmware config device (fw_cfg)

2015-08-10 Thread Gabriel L. Somlo
From: "Gabriel Somlo" This patch set makes QEMU fw_cfg blobs available for viewing (read-only) via SysFS. Several different architectures supported by QEMU are set up with a "firmware configuration" (fw_cfg) device, used to pass configuration "blobs" into the guest by the host running QEMU. His

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

2015-08-10 Thread Gabriel L. Somlo
scan_dir(fw_cfg_register_file); + if (err) + goto err_scan; + + /* success */ + pr_debug("fw_cfg: loaded.\n"); + return 0; + +err_scan: + fw_cfg_sysfs_cache_cleanup(); + sysfs_remove_file(fw_cfg_top_ko, &fw_cfg_rev_attr.attr); +err_rev:

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

2015-08-10 Thread Gabriel L. Somlo
On Mon, Aug 10, 2015 at 11:30:54AM -0700, Greg KH wrote: > On Mon, Aug 10, 2015 at 12:31:18PM -0400, Gabriel L. Somlo wrote: > > From: "Gabriel Somlo" > > > > Make fw_cfg entries of type "file" available via sysfs. Entries > > are listed under /

Re: [PATCH 2/3] kobject: export kset_find_obj() to be used from modules

2015-08-10 Thread Gabriel L. Somlo
On Mon, Aug 10, 2015 at 11:54:00AM -0700, Greg KH wrote: > On Mon, Aug 10, 2015 at 02:43:10PM -0400, Gabriel L. Somlo wrote: > > On Mon, Aug 10, 2015 at 11:33:04AM -0700, Greg KH wrote: > > > On Mon, Aug 10, 2015 at 12:31:19PM -0400, Gabriel L. Somlo wrote: > >

Re: [PATCH 2/3] kobject: export kset_find_obj() to be used from modules

2015-08-10 Thread Gabriel L. Somlo
On Mon, Aug 10, 2015 at 11:33:04AM -0700, Greg KH wrote: > On Mon, Aug 10, 2015 at 12:31:19PM -0400, Gabriel L. Somlo wrote: > > From: "Gabriel Somlo" > > > > Signed-off-by: Gabriel Somlo > > --- > > lib/kobject.c | 1 + > > 1 file changed, 1 i

[PATCH v2 2/3] kobject: export kset_find_obj() to be used from modules

2015-08-11 Thread Gabriel L. Somlo
From: "Gabriel Somlo" Signed-off-by: Gabriel Somlo --- lib/kobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/kobject.c b/lib/kobject.c index 0554077..8f07202 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -847,6 +847,7 @@ struct kobject *kset_find_obj(struct kset *kset, const

[PATCH v2 3/3] firmware: fw_cfg: create directory hierarchy for fw_cfg file names

2015-08-11 Thread Gabriel L. Somlo
From: "Gabriel Somlo" Each fw_cfg entry of type "file" has an associated 56-char, nul-terminated ASCII string which represents its name. While the fw_cfg device doesn't itself impose any specific naming convention, QEMU developers have traditionally used path name semantics (i.e. "etc/acpi/rsdp")

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

2015-08-11 Thread Gabriel L. Somlo
t;fw_cfg: loaded.\n"); + return 0; + +err_scan: + fw_cfg_sysfs_cache_cleanup(); + sysfs_remove_file(fw_cfg_top_ko, &fw_cfg_rev_attr.attr); +err_rev: + fw_cfg_kobj_cleanup(fw_cfg_sel_ko); +err_sel: + fw_cfg_kobj_cleanup(fw_cfg_top_ko); +err_top: + fw_cfg_io

[PATCH v2 0/3] SysFS driver for QEMU fw_cfg device

2015-08-11 Thread Gabriel L. Somlo
From: "Gabriel Somlo" This patch set makes QEMU fw_cfg blobs available for viewing (read-only) via SysFS. New since v1: 1/3: - renamed sysfs path components: s/fw_cfg/qemu_fw_cfg/g, at Greg's suggestion s/by_select/by_key/g since it

[PATCH v8 2/4] kobject: export kset_find_obj() for module use

2016-01-28 Thread Gabriel L. Somlo
From: Gabriel Somlo Signed-off-by: Gabriel Somlo --- lib/kobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/kobject.c b/lib/kobject.c index 7cbccd2..90d1be6 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -861,6 +861,7 @@ struct kobject *kset_find_obj(struct kset *kset, const c

[PATCH v8 4/4] devicetree: update documentation for fw_cfg ARM bindings

2016-01-28 Thread Gabriel L. Somlo
From: Gabriel Somlo Remove fw_cfg hardware interface details from Documentation/devicetree/bindings/arm/fw-cfg.txt, and replace them with a pointer to the authoritative documentation in the QEMU source tree. Signed-off-by: Gabriel Somlo Cc: Laszlo Ersek Acked-by: Rob Herring Reviewed-by: Lasz

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

2016-01-28 Thread Gabriel L. Somlo
l) offset of data register + * + * e.g.: + * fw_cfg.ioport=2@0x510:0:1 (the default on x86) + * or + * fw_cfg.mmio=0xA@0x902:8:0 (the default on arm) + */ + +#include +#include +#include +#include +#include +#include + +MODULE_AUTHOR("Gabriel L. Somlo

[PATCH v8 0/4] SysFS driver for QEMU fw_cfg device

2016-01-28 Thread Gabriel L. Somlo
From: "Gabriel Somlo" Allow access to QEMU firmware blobs, passed into the guest VM via the fw_cfg device, through SysFS entries. Blob meta-data (e.g. name, size, and fw_cfg key), as well as the raw binary blob data may be accessed. The SysFS access location is /sys/firmware/qemu_fw_cfg/... and

[PATCH v8 3/4] firmware: create directory hierarchy for sysfs fw_cfg entries

2016-01-28 Thread Gabriel L. Somlo
From: Gabriel Somlo Each fw_cfg entry of type "file" has an associated 56-char, nul-terminated ASCII string which represents its name. While the fw_cfg device doesn't itself impose any specific naming convention, QEMU developers have traditionally used path name semantics (i.e. "etc/acpi/rsdp") t

Re: [PATCH v6 0/4] SysFS driver for QEMU fw_cfg device

2015-12-19 Thread Gabriel L. Somlo
Hi Pavel, On Sat, Dec 19, 2015 at 10:12:28AM +0100, Pavel Machek wrote: > On Thu 2015-12-17 11:09:23, Gabriel L. Somlo wrote: > > ping ? > > > > Also, for the corresponding patch set on the QEMU end of things, > > ping on http://thread.gmane.org/gmane.comp.emulato

Re: [PATCH v8 2/4] kobject: export kset_find_obj() for module use

2016-02-07 Thread Gabriel L. Somlo
On Sat, Feb 06, 2016 at 11:24:23PM -0800, Greg KH wrote: > On Thu, Jan 28, 2016 at 09:23:12AM -0500, Gabriel L. Somlo wrote: > > From: Gabriel Somlo > > > > Signed-off-by: Gabriel Somlo > > --- > > lib/kobject.c | 1 + > > 1 file changed, 1 insertion(+

[PATCH v7 2/4] kobject: export kset_find_obj() for module use

2016-01-27 Thread Gabriel L. Somlo
From: Gabriel Somlo Signed-off-by: Gabriel Somlo --- lib/kobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/kobject.c b/lib/kobject.c index 7cbccd2..90d1be6 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -861,6 +861,7 @@ struct kobject *kset_find_obj(struct kset *kset, const c

[PATCH v6 4/5] acpi: arm: add fw_cfg device node to dsdt

2016-01-27 Thread Gabriel L. Somlo
Add a fw_cfg device node to the ACPI DSDT. This is mostly informational, as the authoritative fw_cfg MMIO region(s) are listed in the Device Tree. However, since we are building ACPI tables, we might as well be thorough while at it... Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Tested

[PATCH v7 0/4] SysFS driver for QEMU fw_cfg device

2016-01-27 Thread Gabriel L. Somlo
From: "Gabriel Somlo" Allow access to QEMU firmware blobs, passed into the guest VM via the fw_cfg device, through SysFS entries. Blob meta-data (e.g. name, size, and fw_cfg key), as well as the raw binary blob data may be accessed. The SysFS access location is /sys/firmware/qemu_fw_cfg/... and

[PATCH v6 5/5] fw_cfg: document ACPI device node information

2016-01-27 Thread Gabriel L. Somlo
Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Reviewed-by: Marc Marí --- docs/specs/fw_cfg.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/specs/fw_cfg.txt b/docs/specs/fw_cfg.txt index 2099ad9..5414140 100644 --- a/docs/specs/fw_cfg.txt +++ b/docs/specs/fw_cfg.tx

[PATCH v6 1/5] fw_cfg: expose control register size in fw_cfg.h

2016-01-27 Thread Gabriel L. Somlo
Expose the size of the control register (FW_CFG_CTL_SIZE) in fw_cfg.h. Add comment to fw_cfg_io_realize() pointing out that since the 8-bit data register is always subsumed by the 16-bit control register in the port I/O case, we use the control register width as the *total* width of the (classic, n

[PATCH v6 0/5] add ACPI node for fw_cfg on pc and arm

2016-01-27 Thread Gabriel L. Somlo
tch 2/3. >>>>> >>>>> - Patch 2/3 adds a fw_cfg node to the pc SSDT. >>>>> >>>>> - Patch 3/3 adds a fw_cfg node to the arm DSDT. >>>>> >>>>> I made up some names - "FWCF" for the node name, and "FW

[PATCH v6 3/5] acpi: pc: add fw_cfg device node to ssdt

2016-01-27 Thread Gabriel L. Somlo
Add a fw_cfg device node to the ACPI SSDT. While the guest-side firmware can't utilize this information (since it has to access the hard-coded fw_cfg device to extract ACPI tables to begin with), having fw_cfg listed in ACPI will help the guest kernel keep a more accurate inventory of in-use IO por

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

2016-01-27 Thread Gabriel L. Somlo
cfg.ioport=2@0x510:0:1 (the default on x86) + * or + * fw_cfg.mmio=0xA@0x902:8:0 (the default on arm) + */ + +#include +#include +#include +#include +#include +#include + +MODULE_AUTHOR("Gabriel L. Somlo "); +MODULE_DESCRIPTION("QEMU fw

[PATCH v7 3/4] firmware: create directory hierarchy for sysfs fw_cfg entries

2016-01-27 Thread Gabriel L. Somlo
From: Gabriel Somlo Each fw_cfg entry of type "file" has an associated 56-char, nul-terminated ASCII string which represents its name. While the fw_cfg device doesn't itself impose any specific naming convention, QEMU developers have traditionally used path name semantics (i.e. "etc/acpi/rsdp") t

[PATCH v6 2/5] pc: fw_cfg: move ioport base constant to pc.h

2016-01-27 Thread Gabriel L. Somlo
Move BIOS_CFG_IOPORT define from pc.c to pc.h, and rename it to FW_CFG_IO_BASE. Cc: Marc Marí Signed-off-by: Gabriel Somlo Reviewed-by: Laszlo Ersek Reviewed-by: Marc Marí --- hw/i386/pc.c | 5 ++--- include/hw/i386/pc.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff -

[PATCH v7 4/4] devicetree: update documentation for fw_cfg ARM bindings

2016-01-27 Thread Gabriel L. Somlo
From: Gabriel Somlo Remove fw_cfg hardware interface details from Documentation/devicetree/bindings/arm/fw-cfg.txt, and replace them with a pointer to the authoritative documentation in the QEMU source tree. Signed-off-by: Gabriel Somlo Cc: Laszlo Ersek Acked-by: Rob Herring Reviewed-by: Lasz

[PATCH v6 0/5] add ACPI node for fw_cfg on pc and arm

2016-01-27 Thread Gabriel L. Somlo
tch 2/3. >>>>> >>>>> - Patch 2/3 adds a fw_cfg node to the pc SSDT. >>>>> >>>>> - Patch 3/3 adds a fw_cfg node to the arm DSDT. >>>>> >>>>> I made up some names - "FWCF" for the node name, and "FW

Re: [PATCH v11 3/5] drivers/soc/litex: add LiteX SoC Controller driver

2020-09-25 Thread Gabriel L. Somlo
Hi Geert, Mateusz, On Fri, Sep 25, 2020 at 03:16:02PM +0200, Geert Uytterhoeven wrote: > Hi Mateusz, > > On Wed, Sep 23, 2020 at 12:10 PM Mateusz Holenko > wrote: > > From: Pawel Czarnecki > > > > This commit adds driver for the FPGA-based LiteX SoC > > Controller from LiteX SoC builder. > > >

Re: [PATCH v6] kvm: better MWAIT emulation for guests

2017-04-11 Thread Gabriel L. Somlo
e consciously do *not* expose the feature in our CPUID bitmap, as most > people will want to benefit from sleeping vCPUs to allow for over commit. > > Reported-by: "Gabriel L. Somlo" That's maybe a bit inacurate, I didn't actually report anything *this* patch is t

Re: [PATCH v6] kvm: better MWAIT emulation for guests

2017-04-11 Thread Gabriel L. Somlo
On Tue, Apr 11, 2017 at 08:41:11AM -0400, Gabriel L. Somlo wrote: > On Tue, Apr 11, 2017 at 01:45:35PM +0200, Alexander Graf wrote: > > From: "Michael S. Tsirkin" > > > > Guests that are heavy on futexes end up IPI'ing each other a lot. That > > can

[PATCH] staging: typec: fix endianness mismatch identified by sparse

2017-12-18 Thread Gabriel L. Somlo
Eliminate the following sparse warnings: tcpci.c:291:38: warning: incorrect type in argument 1 (different base types) tcpci.c:291:38:expected unsigned short [unsigned] [usertype] header tcpci.c:291:38:got restricted __le16 const [usertype] header tcpci.c:296:16: warning: incorrect type in

[PATCH] staging: fsl-mc: fix misspelled comment identified by checkpatch

2017-06-12 Thread Gabriel L. Somlo
Signed-off-by: Gabriel Somlo --- drivers/staging/fsl-mc/bus/dpio/dpio-service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c b/drivers/staging/fsl-mc/bus/dpio/dpio-service.c index e5d6674..8c45f81 100644 --- a/drivers/staging/

Re: [PATCH 0/4] KVM: x86: kvm_mwait_in_guest() cleanup and fixes

2017-05-04 Thread Gabriel L. Somlo
Hi Radim, On Wed, May 03, 2017 at 09:37:29PM +0200, Radim Krčmář wrote: > kvm_mwait_in_guest() was overcomplicated and also missed one AMD bug > that should prevent MWAIT pass through. > > This series ignores errata that don't have any Linux bug defined; > I know of two minor (not affecting the h

Re: [PATCH 0/4] KVM: x86: kvm_mwait_in_guest() cleanup and fixes

2017-05-05 Thread Gabriel L. Somlo
On Thu, May 04, 2017 at 08:07:15PM +0200, Radim Krčmář wrote: > 2017-05-04 13:56-0400, Gabriel L. Somlo: > > If I wanted to test this (e.g. with OS X 10.8 guests on several of my older > > Mac boxes running Fedora), which git repo would you have me use? (The series > > won&#x

Re: [PATCH 0/4] KVM: x86: kvm_mwait_in_guest() cleanup and fixes

2017-05-06 Thread Gabriel L. Somlo
On Thu, May 04, 2017 at 08:07:15PM +0200, Radim Krčmář wrote: > 2017-05-04 13:56-0400, Gabriel L. Somlo: > > If I wanted to test this (e.g. with OS X 10.8 guests on several of my older > > Mac boxes running Fedora), which git repo would you have me use? (The series > > won&#x

[PATCH v2] staging: fsl-mc: fix typo in comment

2017-06-13 Thread Gabriel L. Somlo
Resolving checkpatch issue: CHECK: 'successfuly' may be misspelled - perhaps 'successfully'? Signed-off-by: Gabriel Somlo --- On Tue, Jun 13, 2017 at 02:57:40PM +0200, Greg KH wrote: > On Mon, Jun 12, 2017 at 03:43:35PM -0400, Gabriel L. Somlo wrote: > >

Re: [PATCH] firmware: Use PTR_ERR_OR_ZERO()

2017-11-29 Thread Gabriel L. Somlo
Acked-by: Gabriel Somlo On Tue, Nov 28, 2017 at 10:40:27PM +0100, Vasyl Gomonovych wrote: > Fix ptr_ret.cocci warnings: > drivers/firmware/efi/efi.c:610:8-14: WARNING: PTR_ERR_OR_ZERO can be used > > Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR > > Generated by: scripts/coccinelle/

<    1   2