[PATCH] applesmc: add sysfs file to report OSK

2012-12-10 Thread Gabriel L. Somlo
string, to help emulators (such as QEMU) load OS X when running on genuine Apple hardware. Signed-off-by: Gabriel L. Somlo so...@cmu.edu --- For extra context: To boot OS X as a guest, QEMU must (among others) emulate the AppleSMC. To boot successfully, OS X insists on querying the (emulated) SMC

[PATCH v2] applesmc: add sysfs file to report OSK

2012-12-10 Thread Gabriel L. Somlo
string, to help emulators (such as QEMU) load OS X when running on genuine Apple hardware. Signed-off-by: Gabriel L. Somlo so...@cmu.edu --- Henrik, On Mon, Dec 10, 2012 at 09:19:51PM +0100, Alexander Graf wrote: On Mon, Dec 10, 2012 at 08:54:14PM +0100, Henrik Rydberg wrote: The OSK string

Re: [PATCH v2] applesmc: add sysfs file to report OSK

2012-12-12 Thread Gabriel L. Somlo
Henrik, I agree with you that it's silly to poke the hardware for a string we KNOW will NEVER change :) That being said, I too would love to live in a world where technical common sense prevailed over bullshit lawyerly tactics, corporate strategies, and the ensuing FUD. The way things stand

Re: [PATCH v2] applesmc: add sysfs file to report OSK

2012-12-13 Thread Gabriel L. Somlo
On Thu, Dec 13, 2012 at 08:20:11AM +0100, Henrik Rydberg wrote: The only viable (from a legal CYA standpoint) thing I can think of is to make it easy to acquire the OSK automatically, on demand, directly from the hardware. Right now, the logical place for that is applesmc.ko. It already

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Gabriel L. Somlo
17 00:00:00 2001 From: Gabriel L. Somlo so...@cmu.edu Date: Wed, 18 Jun 2014 14:39:15 -0400 Subject: [PATCH] kvm: x86: revert emulate monitor and mwait instructions as nop This reverts commit 87c00572ba05aa8c9db118da75c608f47eb10b9e. OS X = 10.7.* are the only known guests which realistically

Re: [PATCH 3/3] KVM: x86: correct mwait and monitor emulation

2014-06-18 Thread Gabriel L. Somlo
On Wed, Jun 18, 2014 at 11:30:07AM -0700, Eric Northup wrote: Quoting Gabriel's post http://www.spinics.net/lists/kvm/msg103792.html : [...] E.g., OS X 10.5 *does* check CPUID, and panics if it doesn't find it. It needs the MONITOR cpuid flag to be on, *and* the actual instructions to

[PATCH] Revert kvm: x86: emulate monitor and mwait instructions as nop

2014-06-19 Thread Gabriel L. Somlo
this hack from KVM altogether, at least for now. Signed-off-by: Gabriel L. Somlo so...@cmu.edu Acked-by: Michael S. Tsirkin m...@redhat.com --- OK, here's the formal proposal to revert my original monitor/mwait hack... I wish I knew about the idlehalt=0 before I submitted it, but such is life. Depending

Ping: Re: [PATCH] Revert kvm: x86: emulate monitor and mwait instructions as nop

2014-07-08 Thread Gabriel L. Somlo
Any decision on this ? If we're going to revert monitor/mwait as nop, it's hopefully not too late to avoid having it show up in an official (3.16 ?) kernel release... Thanks, --Gabriel On Thu, Jun 19, 2014 at 09:59:35AM -0400, Gabriel L. Somlo wrote: This reverts commit

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

2015-08-19 Thread Gabriel L. Somlo
Hi Ard, On Wed, Aug 19, 2015 at 11:42:02AM +0200, Ard Biesheuvel wrote: (missed some cc's) On 19 August 2015 at 11:38, Ard Biesheuvel ard.biesheu...@linaro.org wrote: From: Gabriel L. Somlo so...@cmu.edu Several different architectures supported by QEMU are set up with a firmware

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

2015-08-20 Thread Gabriel L. Somlo
On Thu, Aug 20, 2015 at 07:21:48AM +0200, Ard Biesheuvel wrote: On 19 August 2015 at 22:49, Gabriel L. Somlo so...@cmu.edu wrote: From: Gabriel L. Somlo so...@cmu.edu Several different architectures supported by QEMU are set up with a firmware configuration (fw_cfg) device, used to pass

[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 so...@cmu.edu 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.

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

2015-08-11 Thread Gabriel L. Somlo
(fw_cfg_sysfs_exit); +MODULE_AUTHOR(Gabriel L. Somlo so...@cmu.edu); +MODULE_DESCRIPTION(QEMU fw_cfg sysfs support); +MODULE_LICENSE(GPL); -- 2.4.3 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http

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

2015-08-11 Thread Gabriel L. Somlo
From: Gabriel Somlo so...@cmu.edu 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

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

2015-08-11 Thread Gabriel L. Somlo
From: Gabriel Somlo so...@cmu.edu Signed-off-by: Gabriel Somlo so...@cmu.edu --- 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

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

2015-08-10 Thread Gabriel L. Somlo
From: Gabriel Somlo so...@cmu.edu Signed-off-by: Gabriel Somlo so...@cmu.edu --- lib/kobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/kobject.c b/lib/kobject.c index 3e3a5c3..f9754a0 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -1058,3 +1058,4 @@ EXPORT_SYMBOL(kobject_del);

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

2015-08-10 Thread Gabriel L. Somlo
From: Gabriel Somlo so...@cmu.edu 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

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

2015-08-10 Thread Gabriel L. Somlo
From: Gabriel Somlo so...@cmu.edu 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.

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

2015-08-10 Thread Gabriel L. Somlo
); + fw_cfg_kobj_cleanup(fw_cfg_top_ko); + fw_cfg_io_cleanup(); +} + +module_init(fw_cfg_sysfs_init); +module_exit(fw_cfg_sysfs_exit); +MODULE_AUTHOR(Gabriel L. Somlo so...@cmu.edu); +MODULE_DESCRIPTION(QEMU fw_cfg sysfs support); +MODULE_LICENSE(GPL); -- 2.4.3 -- To unsubscribe from this list

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: From: Gabriel Somlo so...@cmu.edu

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 so...@cmu.edu Signed-off-by: Gabriel Somlo so...@cmu.edu --- lib/kobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib

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 so...@cmu.edu Make fw_cfg entries of type file available via sysfs. Entries are listed under /sys/firmware/fw_cfg/by_select, in folders named

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

2015-11-13 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

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

2015-11-13 Thread Gabriel L. Somlo
ptional) offset of control register + * := (optional) 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

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

2015-11-13 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.

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

2015-11-13 Thread Gabriel L. Somlo
From: Gabriel Somlo Remove redundant details from Documentation/devicetree/bindings/arm/fw-cfg.txt, and replace them with a pointer to the more comprehensive fw_cfg documentation privided by Documentation/ABI/testing/sysfs-firmware-qemu_fw_cfg, leaving the specific ARM DTB node

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

2015-11-13 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

Re: [Qemu-devel] [PATCH v4 4/4] devicetree: update documentation for fw_cfg ARM bindings

2015-11-16 Thread Gabriel L. Somlo
On Mon, Nov 16, 2015 at 09:38:18AM +0100, Paolo Bonzini wrote: > On 15/11/2015 03:07, Rob Herring wrote: > > We generally don't want DT docs to depend on other kernel documentation. > > DT docs do not contain a copy of the data sheets, either. There is no > reason to say how to use the device

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

2015-11-04 Thread Gabriel L. Somlo
On Mon, Oct 05, 2015 at 03:18:05PM +0200, Paolo Bonzini wrote: > > > On 05/10/2015 14:50, Peter Maydell wrote: > > If you want to try to support "firmware might also be reading > > fw_cfg at the same time as the kernel" this is a (painful) > > problem regardless of how the kernel figures out

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

2015-10-06 Thread Gabriel L. Somlo
On Tue, Oct 06, 2015 at 10:54:42AM -0700, Andy Lutomirski wrote: > On Sat, Oct 3, 2015 at 4:28 PM, Gabriel L. Somlo <so...@cmu.edu> wrote: > > From: Gabriel Somlo <so...@cmu.edu> > > > > Make fw_cfg entries of type "file" available via sysfs. Entries >

Re: [Qemu-devel] [PATCH v4 4/4] devicetree: update documentation for fw_cfg ARM bindings

2015-11-17 Thread Gabriel L. Somlo
On Tue, Nov 17, 2015 at 04:14:42PM -0600, Rob Herring wrote: > On Mon, Nov 16, 2015 at 2:38 AM, Paolo Bonzini wrote: > > > > > > On 15/11/2015 03:07, Rob Herring wrote: > >> We generally don't want DT docs to depend on other kernel documentation. > > > > DT docs do not

Re: Re: [Qemu-devel] [PATCH v4 4/4] devicetree: update documentation for fw_cfg ARM bindings

2015-11-18 Thread Gabriel L. Somlo
On Wed, Nov 18, 2015 at 02:04:24PM +0100, François Revol wrote: > On 17/11/2015 23:14, Rob Herring wrote: > > On Mon, Nov 16, 2015 at 2:38 AM, Paolo Bonzini wrote: > >> > >> > >> On 15/11/2015 03:07, Rob Herring wrote: > >>> We generally don't want DT docs to depend on other

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

2015-09-01 Thread Gabriel L. Somlo
Hi Christopher, On Wed, Aug 26, 2015 at 02:15:03PM -0400, Christopher Covington wrote: > On 08/19/2015 04:49 PM, Gabriel L. Somlo wrote: > > On Wed, Aug 19, 2015 at 11:42:02AM +0200, Ard Biesheuvel wrote: > >> On 19 August 2015 at 11:38, Ard Biesheuvel <ard.biesheu...@li

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

2015-10-03 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

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

2015-10-03 Thread Gabriel L. Somlo
iguration (fw_cfg) device in + * sysfs (read-only, under "/sys/firmware/qemu_fw_cfg/..."). + * + * Copyright 2015 Carnegie Mellon University + */ + +#include +#include +#include +#include + +MODULE_AUTHOR("Gabriel L. Somlo <so...@cmu.edu>"); +MODULE_DESCRIPTION("QEMU f

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

2015-10-03 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.

[PATCH v3 3/4] kobject: export kset_find_obj() for module use

2015-10-03 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 3e3a5c3..bea2c9b 100644 --- a/lib/kobject.c +++ b/lib/kobject.c @@ -842,6 +842,7 @@ struct kobject

[PATCH v3 2/4] firmware: use acpi to detect QEMU fw_cfg device for sysfs fw_cfg driver

2015-10-03 Thread Gabriel L. Somlo
From: Gabriel Somlo Instead of blindly probing fw_cfg registers at known IOport and MMIO locations, use the ACPI subsystem to determine whether a QEMU fw_cfg device is present, and, if found, to initialize it. This limits portability to architectures which support ACPI (x86 and

Re: [PATCH v3 2/4] firmware: use acpi to detect QEMU fw_cfg device for sysfs fw_cfg driver

2015-10-04 Thread Gabriel L. Somlo
On Sun, Oct 04, 2015 at 04:24:00PM -0400, Gabriel L. Somlo wrote: > On Sun, Oct 04, 2015 at 10:54:57AM +0300, Michael S. Tsirkin wrote: > > On Sat, Oct 03, 2015 at 07:28:07PM -0400, Gabriel L. Somlo wrote: > > > > > > Instead of blindly probing fw_cfg registe

Re: [PATCH v3 2/4] firmware: use acpi to detect QEMU fw_cfg device for sysfs fw_cfg driver

2015-10-04 Thread Gabriel L. Somlo
On Sun, Oct 04, 2015 at 10:54:57AM +0300, Michael S. Tsirkin wrote: > On Sat, Oct 03, 2015 at 07:28:07PM -0400, Gabriel L. Somlo wrote: > > From: Gabriel Somlo <so...@cmu.edu> > > > > Instead of blindly probing fw_cfg registers at known IOport and MMIO > >

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

2015-10-05 Thread Gabriel L. Somlo
On Mon, Oct 05, 2015 at 11:00:36AM +0100, Mark Rutland wrote: > On Sat, Oct 03, 2015 at 07:28:05PM -0400, Gabriel L. Somlo wrote: > > From: "Gabriel Somlo" <so...@cmu.edu> > > > > Allow access to QEMU firmware blobs, passed into the guest VM via > > the

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

2015-10-05 Thread Gabriel L. Somlo
On Mon, Oct 05, 2015 at 01:50:47PM +0100, Peter Maydell wrote: > On 5 October 2015 at 13:40, Gabriel L. Somlo <so...@cmu.edu> wrote: > > In addition, Michael's comment earlier in the thread suggests that > > even my current acpi version isn't sufficiently "orthodox"

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

2015-10-05 Thread Gabriel L. Somlo
On Mon, Oct 05, 2015 at 01:23:33PM +0100, Mark Rutland wrote: > On Mon, Oct 05, 2015 at 01:48:52PM +0200, Paolo Bonzini wrote: > > > > > > On 05/10/2015 12:00, Mark Rutland wrote: > > > Some of the keys in the example look like they'd come from other sources > > > (e.g. the *-tables entries),

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

2015-10-05 Thread Gabriel L. Somlo
On Mon, Oct 05, 2015 at 01:56:47PM +0100, Mark Rutland wrote: > On Mon, Oct 05, 2015 at 08:43:46AM -0400, Gabriel L. Somlo wrote: > > On Mon, Oct 05, 2015 at 01:23:33PM +0100, Mark Rutland wrote: > > > On Mon, Oct 05, 2015 at 01:48:52PM +0200, Paolo Bonzini wrote: > > >

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

2015-12-04 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

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

2015-12-04 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

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

2015-12-04 Thread Gabriel L. Somlo
gister + * + * 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 <so...@cmu.edu&

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

2015-12-04 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.

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

2015-12-04 Thread Gabriel L. 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 was selected based on

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

2015-12-17 Thread Gabriel L. Somlo
ping ? Also, for the corresponding patch set on the QEMU end of things, ping on http://thread.gmane.org/gmane.comp.emulators.qemu/376321 Thanks, --Gabriel On Fri, Dec 04, 2015 at 10:29:02AM -0500, Gabriel L. Somlo wrote: > Allow access to QEMU firmware blobs, passed into the guest VM

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: [Qemu-devel] [PATCH v5 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device

2015-11-24 Thread Gabriel L. Somlo
On Tue, Nov 24, 2015 at 10:38:18AM -0700, Eric Blake wrote: > On 11/24/2015 09:55 AM, Gabriel L. Somlo wrote: > > On Tue, Nov 24, 2015 at 04:14:50AM +0800, kbuild test robot wrote: > > >> > >>drivers/firmware/qemu_fw_cfg.c: In function 'fw_cfg_cmdline

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

2015-11-24 Thread Gabriel L. Somlo
On Tue, Nov 24, 2015 at 04:14:50AM +0800, kbuild test robot wrote: > Hi Gabriel, > > [auto build test WARNING on v4.4-rc2] > [also build test WARNING on next-20151123] > [cannot apply to robh/for-next] > > url: > https://github.com/0day-ci/linux/commits/Gabriel-L-Som

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

2015-11-23 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.

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

2015-11-23 Thread Gabriel L. Somlo
gister + * + * 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 <so...@cmu.edu&

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

2015-11-23 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

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

2015-11-23 Thread Gabriel L. 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 was selected based on

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

2015-11-23 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

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

2015-11-23 Thread Gabriel L. Somlo
On Mon, Nov 23, 2015 at 05:35:51PM +0100, Laszlo Ersek wrote: > On 11/23/15 16:57, Gabriel L. Somlo wrote: > > From: Gabriel Somlo <so...@cmu.edu> > > > > Remove fw_cfg hardware interface details from > > Documentation/devicetree/bindings/arm/fw-cfg.txt, &g

Re: [PATCH] KVM: Handle MSR_IA32_PERF_CTL

2016-05-26 Thread Gabriel L. Somlo
On Thu, May 26, 2016 at 10:39:31PM +0200, Radim Krčmář wrote: > 2016-05-26 10:32+0300, km...@yandex-team.ru: > > From: Dmitry Bilunov > > > > Intel CPUs having Turbo Boost feature implement an MSR to provide a > > control interface via rdmsr/wrmsr instructions. One could

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 <so...@cmu.edu> > > > > Signed-off-by: Gabriel Somlo <so...@cmu.edu> > > --- > > lib/kob

Re: [PATCH] firmware: qemu config needs I/O ports

2016-02-11 Thread Gabriel L. Somlo
On Thu, Feb 11, 2016 at 03:23:51PM +0100, Arnd Bergmann wrote: > Not all machines have PCI style I/O port memory, or they do not allow > mapping it using the ioport_map() function, whcih results in a > build error with the newly added qemu firmware code: > > drivers/firmware/built-in.o: In

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

2016-01-27 Thread Gabriel L. Somlo
>>> >>>>> - 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 "FWCF0001" >>

[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

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

2016-01-27 Thread Gabriel L. Somlo
gister + * + * 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 <so...@cmu.edu&

[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

[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

[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.

[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,

[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 ++---

[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

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

2016-01-27 Thread Gabriel L. Somlo
>>> >>>>> - 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 "FWCF0001" >>

[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

[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:

[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

[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

[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

[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.

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

2016-01-28 Thread Gabriel L. Somlo
ol register + * := (optional) 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 + +M

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

2016-02-22 Thread Gabriel L. Somlo
On Mon, Feb 22, 2016 at 10:14:50PM +0200, Michael S. Tsirkin wrote: > On Sun, Feb 21, 2016 at 08:06:17AM -0500, Gabriel L. Somlo wrote: > > > > +static void fw_cfg_io_cleanup(void) > > > > +{ > > > > + if (fw_cfg_is_mmio) { > >

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

2016-02-23 Thread Gabriel L. Somlo
On Tue, Feb 23, 2016 at 04:14:46PM +0200, Michael S. Tsirkin wrote: > On Tue, Feb 23, 2016 at 08:47:00AM -0500, Gabriel L. Somlo wrote: > > On Tue, Feb 23, 2016 at 07:07:36AM +0200, Michael S. Tsirkin wrote: > > > On Mon, Feb 22, 2016 at 03:26:23PM -0500, Gabriel L. Somlo wro

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

2016-02-23 Thread Gabriel L. Somlo
On Tue, Feb 23, 2016 at 07:07:36AM +0200, Michael S. Tsirkin wrote: > On Mon, Feb 22, 2016 at 03:26:23PM -0500, Gabriel L. Somlo wrote: > > On Mon, Feb 22, 2016 at 10:14:50PM +0200, Michael S. Tsirkin wrote: > > > On Sun, Feb 21, 2016 at 08:06:17AM -0500, Gabr

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

2016-02-21 Thread Gabriel L. Somlo
On Sun, Feb 21, 2016 at 03:10:30PM +0200, Michael S. Tsirkin wrote: > On Sun, Feb 21, 2016 at 08:06:17AM -0500, Gabriel L. Somlo wrote: > > > > > > > > > +#if !(defined(FW_CFG_CTRL_OFF) && defined(FW_CTRL_DATA_OFF)) > > > > +# if (defined(CONFIG

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

2016-02-21 Thread Gabriel L. Somlo
On Sun, Feb 21, 2016 at 10:30:26AM +0200, Michael S. Tsirkin wrote: > On Thu, Jan 28, 2016 at 09:23:11AM -0500, Gabriel L. Somlo wrote: > > From: Gabriel Somlo <so...@cmu.edu> > > > > Make fw_cfg entries of type "file" available via sysfs. Entries > >

Re: [PATCH v2] firmware: qemu_fw_cfg.c: fix typo FW_CFG_DATA_OFF

2016-02-11 Thread Gabriel L. Somlo
On Thu, Feb 11, 2016 at 12:19:03PM +0100, Valentin Rothberg wrote: > s/FW_CTRL_DATA_OFF/FW_CFG_DATA_OFF/ Thanks for catching that ! Acked-by: Gabriel Somlo > > Signed-off-by: Valentin Rothberg > Signed-off-by: Andreas Ziegler

Re: [PATCH v2] firmware: qemu_fw_cfg.c: hold ACPI global lock during device access

2016-03-19 Thread Gabriel L. Somlo
On Wed, Mar 16, 2016 at 06:57:01PM +0200, Michael S. Tsirkin wrote: > On Tue, Mar 08, 2016 at 01:30:50PM -0500, Gabriel Somlo wrote: > > Allowing for the future possibility of implementing AML-based > > (i.e., firmware-triggered) access to the QEMU fw_cfg device, > > acquire the global ACPI lock

Re: [PATCH] qemu_fw_cfg: don't leak kobj on init error

2016-04-06 Thread Gabriel L. Somlo
On Sun, Apr 03, 2016 at 03:23:19PM +0300, Michael S. Tsirkin wrote: > If platform_driver_register fails, we should > cleanup fw_cfg_top_ko before exiting. > > Signed-off-by: Michael S. Tsirkin Acked-by: Gabriel Somlo Thanks, --Gabriel > --- >

Re: [PATCH] MAINTAINERS: add entry for QEMU

2016-04-06 Thread Gabriel L. Somlo
On Tue, Apr 05, 2016 at 11:31:27AM +0300, Michael S. Tsirkin wrote: > Gabriel merged support for QEMU FW CFG interface, but there's apparently > no official maintainer. It's also possible that this will grow more > interfaces in future. I'll happily co-maintain it and handle pull > requests

Re: [PATCH v2] firmware: qemu_fw_cfg.c: hold ACPI global lock during device access

2016-04-11 Thread Gabriel L. Somlo
On Tue, Apr 05, 2016 at 11:54:19AM +0300, Michael S. Tsirkin wrote: > On Thu, Mar 17, 2016 at 09:33:40AM -0400, Gabriel L. Somlo wrote: > > On Wed, Mar 16, 2016 at 06:57:01PM +0200, Michael S. Tsirkin wrote: > > > On Tue, Mar 08, 2016 at 01:30:50PM -0500, Gabriel Somlo wrote

Re: [patch] firmware: qemu_fw_cfg.c: potential unintialized variable

2016-04-14 Thread Gabriel L. Somlo
On Thu, Apr 14, 2016 at 12:33:37PM +0300, Dan Carpenter wrote: > It acpi_acquire_global_lock() return AE_NOT_CONFIGURED then "glk" isn't ^ ^ Ifreturns > initialized, which, if you got very unlucky, could cause a bug. In principle I'm

Re: [patch] firmware: qemu_fw_cfg.c: potential unintialized variable

2016-04-14 Thread Gabriel L. Somlo
On Thu, Apr 14, 2016 at 12:33:37PM +0300, Dan Carpenter wrote: > It acpi_acquire_global_lock() return AE_NOT_CONFIGURED then "glk" isn't > initialized, which, if you got very unlucky, could cause a bug. > > Signed-off-by: Dan Carpenter > > diff --git

Re: [patch] firmware: qemu_fw_cfg.c: potential unintialized variable

2016-04-14 Thread Gabriel L. Somlo
On Thu, Apr 14, 2016 at 10:12:53PM +0300, Dan Carpenter wrote: > On Thu, Apr 14, 2016 at 02:40:06PM -0400, Gabriel L. Somlo wrote: > > On Thu, Apr 14, 2016 at 12:33:37PM +0300, Dan Carpenter wrote: > > > It acpi_acquire_global_lock() return AE_NOT_CONFIGURE

Re: [PATCH 0/6] firmware-qemu_fw_cfg: Fine-tuning for four function implementations

2016-09-20 Thread Gabriel L. Somlo
On Sun, Sep 18, 2016 at 02:48:30PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 18 Sep 2016 14:43:21 +0200 > > Some update suggestions were taken into account > from static source code analysis. > > Markus Elfring (6): > Use

Re: [PATCH v5 untested] kvm: better MWAIT emulation for guests

2017-03-22 Thread Gabriel L. Somlo
On Wed, Mar 22, 2017 at 03:35:18PM +0200, Michael S. Tsirkin wrote: > On Tue, Mar 21, 2017 at 05:02:25PM -0700, Nadav Amit wrote: > > > > > On Mar 21, 2017, at 3:51 PM, Gabriel Somlo wrote: > > > > > > And I get the exact same results on the MacBookAir4,2 (which exhibits > > >

Re: [PATCH v5 untested] kvm: better MWAIT emulation for guests

2017-03-16 Thread Gabriel L. Somlo
On Thu, Mar 16, 2017 at 01:41:28AM +0200, Michael S. Tsirkin wrote: > On Wed, Mar 15, 2017 at 07:35:34PM -0400, Gabriel L. Somlo wrote: > > On Wed, Mar 15, 2017 at 11:22:18PM +0200, Michael S. Tsirkin wrote: > > > Guests running Mac OS 5, 6, and 7 (Leopard through Li

Re: [PATCH v5 untested] kvm: better MWAIT emulation for guests

2017-03-16 Thread Gabriel L. Somlo
On Thu, Mar 16, 2017 at 04:04:12PM +0200, Michael S. Tsirkin wrote: > On Thu, Mar 16, 2017 at 09:24:27AM -0400, Gabriel L. Somlo wrote: > > After studying your patch a bit more carefully (sorry, it's crazy > > around here right now :) ) I realized you're simply trying to > >

Re: [PATCH v5 untested] kvm: better MWAIT emulation for guests

2017-03-16 Thread Gabriel L. Somlo
On Thu, Mar 16, 2017 at 06:22:44PM +0100, Radim Krčmář wrote: > 2017-03-16 12:47-0400, Gabriel L. Somlo: > > On Thu, Mar 16, 2017 at 05:01:58PM +0100, Radim Krčmář wrote: > > > 2017-03-16 16:35+0100, Radim Krčmář: > > > > 2017-03-16 10:58-0400, Gabriel L. Somlo:

Re: [PATCH v5 untested] kvm: better MWAIT emulation for guests

2017-03-16 Thread Gabriel L. Somlo
On Thu, Mar 16, 2017 at 12:52:32PM -0400, Gabriel L. Somlo wrote: > On Thu, Mar 16, 2017 at 06:45:02PM +0200, Michael S. Tsirkin wrote: > > On Thu, Mar 16, 2017 at 12:16:13PM -0400, Gabriel L. Somlo wrote: > > > On Thu, Mar 16, 2017 at 04:35:18PM +0100, Radim Krčmář wrote: > &

Re: [PATCH v5 untested] kvm: better MWAIT emulation for guests

2017-03-16 Thread Gabriel L. Somlo
On Thu, Mar 16, 2017 at 07:27:34PM +0200, Michael S. Tsirkin wrote: > On Thu, Mar 16, 2017 at 12:47:50PM -0400, Gabriel L. Somlo wrote: > > On Thu, Mar 16, 2017 at 05:01:58PM +0100, Radim Krčmář wrote: > > > 2017-03-16 16:35+0100, Radim Krčmář: > > > > 2017-03-1

Re: [PATCH v5 untested] kvm: better MWAIT emulation for guests

2017-03-16 Thread Gabriel L. Somlo
On Thu, Mar 16, 2017 at 05:01:58PM +0100, Radim Krčmář wrote: > 2017-03-16 16:35+0100, Radim Krčmář: > > 2017-03-16 10:58-0400, Gabriel L. Somlo: > >> The intel manual said the same thing back in 2010 as well. However, > >> regardless of how any flags were se

Re: [PATCH v5 untested] kvm: better MWAIT emulation for guests

2017-03-16 Thread Gabriel L. Somlo
On Thu, Mar 16, 2017 at 06:45:02PM +0200, Michael S. Tsirkin wrote: > On Thu, Mar 16, 2017 at 12:16:13PM -0400, Gabriel L. Somlo wrote: > > On Thu, Mar 16, 2017 at 04:35:18PM +0100, Radim Krčmář wrote: > > > 2017-03-16 10:58-0400, Gabriel L. Somlo: > > > > On Thu, Ma

  1   2   3   >