Re: [PATCH -next] fw_cfg: Constify struct kobj_type

2024-09-18 Thread Gabriel L. Somlo
038944 96 7078 1ba6drivers/firmware/qemu_fw_cfg.o > ``` > > Signed-off-by: Hongbo Li Acked-by: Gabriel L. Somlo Thanks, --Gabriel > --- > drivers/firmware/qemu_fw_cfg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/f

Re: [PATCH] firmware: qemu_fw_cfg: make kobj_type structure constant

2023-03-03 Thread Gabriel L. Somlo
atic struct kobj_type fw_cfg_sysfs_entry_ktype = { > +static const struct kobj_type fw_cfg_sysfs_entry_ktype = { Reviewed-by: Gabriel L. Somlo Thanks, --Gabriel > .default_groups = fw_cfg_sysfs_entry_groups, > .sysfs_ops = &fw_cfg_sysfs_attr_ops, > .release = fw_

Re: [PATCH] hw/misc: applesmc: use host osk as default on macs

2021-10-11 Thread Gabriel L. Somlo
On Mon, 11 Oct 2021 15:40:07 +0200, bala...@eik.bme.hu wrote: > I guess a frequent use case for running macOS guests with keys from host > would be on hosts running macOS too so a solution that works both on macOS > and Linux might be better than a Linux specific one which then needs > another w

Re: [PATCH] hw/misc: applesmc: use host osk as default on macs

2021-10-11 Thread Gabriel L. Somlo
FWIW, there's an applesmc driver in the Linux kernel, and it exposes many of the keys and values stored on the chip under /sys/devices/platform/applesmc.768 (or at least it *used* to back when I last checked). My idea at the time was to get this driver to also expose the value of OSK0,1, so that u

Re: [Qemu-devel] [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/

Re: [Qemu-devel] [PATCH v4 3/5] fw_cfg: do DMA read operation

2017-11-12 Thread Gabriel L. Somlo
g.c > > > index 1f3e8545dab7..8ce5e49b7c62 100644 > > > --- a/drivers/firmware/qemu_fw_cfg.c > > > +++ b/drivers/firmware/qemu_fw_cfg.c > > > @@ -33,6 +33,8 @@ > > > #include > > > #include > > > #include > > > +

Re: [Qemu-devel] [PATCH v4 5/5] fw_cfg: write vmcoreinfo details

2017-11-12 Thread Gabriel L. Somlo
bd9bb134900 100644 > --- a/drivers/firmware/qemu_fw_cfg.c > +++ b/drivers/firmware/qemu_fw_cfg.c > @@ -35,6 +35,8 @@ > #include > #include > #include > +#include > +#include > > MODULE_AUTHOR("Gabriel L. Somlo "); > MODULE_DESCRIPTION("QEMU fw_

Re: [Qemu-devel] [PATCH v4 4/5] crash: export paddr_vmcoreinfo_note()

2017-11-12 Thread Gabriel L. Somlo
On Tue, Oct 31, 2017 at 04:19:37PM +0100, Marc-André Lureau wrote: > The following patch is going to use the symbol from the fw_cfg module. > > Signed-off-by: Marc-André Lureau Acked-by: Gabriel Somlo > --- > kernel/crash_core.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/kernel

Re: [Qemu-devel] [PATCH v4 3/5] fw_cfg: do DMA read operation

2017-11-12 Thread Gabriel L. Somlo
- a/drivers/firmware/qemu_fw_cfg.c > +++ b/drivers/firmware/qemu_fw_cfg.c > @@ -33,6 +33,8 @@ > #include > #include > #include > +#include > +#include > > MODULE_AUTHOR("Gabriel L. Somlo "); > MODULE_DESCRIPTION("QEMU fw_cfg sysfs support"); >

Re: [Qemu-devel] [PATCH v4 2/5] fw_cfg: add DMA register

2017-11-12 Thread Gabriel L. Somlo
On Tue, Oct 31, 2017 at 04:19:35PM +0100, Marc-André Lureau wrote: > Add an optional kernel module (or command line) parameter > using the following syntax: > > [qemu_fw_cfg.]ioport=@[::[:]] > or > [qemu_fw_cfg.]mmio=@[::[:]] > > and initializes the register address using given or d

Re: [Qemu-devel] [PATCH v4 1/5] fw_cfg: fix the command line module name

2017-11-12 Thread Gabriel L. Somlo
On Tue, Oct 31, 2017 at 04:19:34PM +0100, Marc-André Lureau wrote: > Signed-off-by: Marc-André Lureau Acked-by: Gabriel Somlo > --- > drivers/firmware/qemu_fw_cfg.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmwa

Re: [Qemu-devel] [PATCH v4 0/5] fw_cfg: add DMA operations & etc/vmcoreinfo support

2017-11-12 Thread Gabriel L. Somlo
On Tue, Oct 31, 2017 at 04:19:33PM +0100, Marc-André Lureau wrote: > Hi, > > This series adds DMA operations support to the qemu fw_cfg kernel > module and populates "etc/vmcoreinfo" with vmcoreinfo location > details. > > Note: the support for this entry handling has been merged for next > qemu

Re: [Qemu-devel] [PATCH 54/88] KVM: use g_new() family of functions

2017-10-09 Thread Gabriel L. Somlo
Reviewed-by: Gabriel Somlo On Fri, Oct 06, 2017 at 08:49:49PM -0300, Philippe Mathieu-Daudé wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Signed-off-by: Philippe Mathieu-Daudé > [PMD: more changes] > --- > accel/kvm/kvm-all.c | 8 > 1 file changed, 4 insert

Re: [Qemu-devel] [PATCH 49/88] hw/misc: use g_new() family of functions

2017-10-09 Thread Gabriel L. Somlo
Reviewed-by: Gabriel Somlo On Fri, Oct 06, 2017 at 08:49:44PM -0300, Philippe Mathieu-Daudé wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Signed-off-by: Philippe Mathieu-Daudé > [PMD: added hw/misc/pvpanic.c] > --- > hw/misc/applesmc.c | 2 +- > hw/misc/pvpanic.c |

Re: [Qemu-devel] [PATCHv7 0/6] fw_cfg: qdev-related tidy-ups

2017-06-29 Thread Gabriel L. Somlo
On Thu, Jun 29, 2017 at 03:07:14PM +0100, Mark Cave-Ayland wrote: > As part of some ongoing sun4u work, I need to be able to wire the fw_cfg > IO interface to a separate IO space by instantiating the qdev device instead > of calling fw_cfg_init_io(). This patchset brings FW_CFG_IO in line with > FW

Re: [Qemu-devel] Commit 77af8a2b9 breaks (mac)OS X 10.11.6

2017-06-19 Thread Gabriel L. Somlo
Zoltan, Phil: On Sun, Jun 18, 2017 at 11:25:15PM +0200, BALATON Zoltan wrote: > After 77af8a2b9 (hw/i386: Use Rev3 FADT (ACPI 2.0) instead of Rev1 to > improve guest OS support.) OS X 10.11.6 hangs during boot near detecting > IOAPIC. (Gabriel's latest v3 applesmc patch series does not fix this.)

[Qemu-devel] [PATCH v3 2/3] applesmc: implement error status port

2017-06-16 Thread Gabriel L. Somlo
As of release 10.12.4, OS X (Sierra) refuses to boot unless the AppleSMC supports an additional I/O port, expected to provide an error status code. Update the [cmd|data]_write() and data_read() methods to implement the required state machine, and add I/O region & methods to handle access to the er

[Qemu-devel] [PATCH v3 1/3] applesmc: cosmetic whitespace and indentation cleanup

2017-06-16 Thread Gabriel L. Somlo
Signed-off-by: Gabriel Somlo Reviewed-by: Alexander Graf Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Phil Dennis-Jordan --- hw/misc/applesmc.c | 98 -- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/hw/misc/applesmc.c b/

[Qemu-devel] [PATCH v3 3/3] applesmc: fix port i/o access width

2017-06-16 Thread Gabriel L. Somlo
Set access width of all AppleSMC i/o regions to 1 byte, since they all represent 8-bit-wide ports. Signed-off-by: Gabriel Somlo Reviewed-by: Alexander Graf --- hw/misc/applesmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c inde

[Qemu-devel] [PATCH v3 0/3] Update AppleSMC for OS X 10.12.4+ guests

2017-06-16 Thread Gabriel L. Somlo
appropriate read/write methods based on the offset being >> accessed >> >> - 3/3: implement read-only error/status port, and update >> data and command read/write methods to correctly >> maintain the state machin

Re: [Qemu-devel] [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

Re: [Qemu-devel] [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: [Qemu-devel] [PATCH v2 0/3] Update AppleSMC for OS X Sierra 10.12.4 guests

2017-04-04 Thread Gabriel L. Somlo
On Tue, Apr 04, 2017 at 09:35:00PM +0200, Alexander Graf wrote: > On 04/04/2017 07:01 PM, Gabriel L. Somlo wrote: > > As of 10.12.4 (currently the latest Sierra update), OS X refuses to boot > > unless the AppleSMC supports a third I/O port, which provides the current > > e

[Qemu-devel] [PATCH v2 2/3] applesmc: implement error status port

2017-04-04 Thread Gabriel L. Somlo
As of release 10.12.4, OS X (Sierra) refuses to boot unless the AppleSMC supports an additional I/O port, expected to provide an error status code. Update the [cmd|data]_write() and data_read() methods to implement the required state machine, and add I/O region & methods to handle access to the er

[Qemu-devel] [PATCH v2 1/3] applesmc: cosmetic whitespace and indentation cleanup

2017-04-04 Thread Gabriel L. Somlo
Signed-off-by: Gabriel Somlo Reviewed-by: Alexander Graf Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/applesmc.c | 98 -- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c index 77fab5b.

[Qemu-devel] [PATCH v2 0/3] Update AppleSMC for OS X Sierra 10.12.4 guests

2017-04-04 Thread Gabriel L. Somlo
3/3: implement read-only error/status port, and update > data and command read/write methods to correctly > maintain the state machine for keeping the status_1e > value up to date. Gabriel L. Somlo (3): applesmc: cosmetic whitespace and in

[Qemu-devel] [PATCH v2 3/3] applesmc: fix port i/o access width

2017-04-04 Thread Gabriel L. Somlo
Set width of the two i/o regions dedicated to the AppleSMC's 8-bit data and command ports to 1 byte. Signed-off-by: Gabriel Somlo --- Setting these to 1-byte width works fine on any OS X version I could find to test on: 10.(6-12), inclusive. On linux, the applesmc kernel module tries *hard* to

Re: [Qemu-devel] [PATCH v1 2/3] applesmc: consolidate port i/o into single contiguous region

2017-04-04 Thread Gabriel L. Somlo
On Tue, Apr 04, 2017 at 11:44:29AM +0200, Alexander Graf wrote: > On 04/04/2017 02:04 AM, Gabriel L. Somlo wrote: > > On Mon, Apr 03, 2017 at 12:27:15PM +0200, Paolo Bonzini wrote: > > > > > > On 03/04/2017 11:32, Alexander Graf wrote: > > > > > Newer

Re: [Qemu-devel] [PATCH v1 2/3] applesmc: consolidate port i/o into single contiguous region

2017-04-03 Thread Gabriel L. Somlo
On Mon, Apr 03, 2017 at 12:27:15PM +0200, Paolo Bonzini wrote: > > > On 03/04/2017 11:32, Alexander Graf wrote: > > > >> Newer AppleSMC revisions support an error status (read) port > >> in addition to the data and command ports currently supported. > >> > >> Register the full 32-bit region at o

Re: [Qemu-devel] [PATCH v1 1/3] applesmc: cosmetic whitespace and indentation cleanup

2017-04-03 Thread Gabriel L. Somlo
On Mon, Apr 03, 2017 at 10:34:09AM -0300, Philippe Mathieu-Daudé wrote: > Hi Gabriel, > > On 03/31/2017 01:48 PM, Gabriel L. Somlo wrote: > > Signed-off-by: Gabriel Somlo > > --- > > hw/misc/applesmc.c | 100 > > +++-

[Qemu-devel] [PATCH v1 1/3] applesmc: cosmetic whitespace and indentation cleanup

2017-03-31 Thread Gabriel L. Somlo
Signed-off-by: Gabriel Somlo --- hw/misc/applesmc.c | 100 +++-- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c index 77fab5b..986f2ac 100644 --- a/hw/misc/applesmc.c +++ b/hw/misc/applesmc.c

[Qemu-devel] [PATCH v1 2/3] applesmc: consolidate port i/o into single contiguous region

2017-03-31 Thread Gabriel L. Somlo
Newer AppleSMC revisions support an error status (read) port in addition to the data and command ports currently supported. Register the full 32-bit region at once, and handle individual ports at various offsets within the region from the top-level applesmc_io_[write|read]() methods (ctual support

[Qemu-devel] [PATCH v1 0/3] Update AppleSMC for OS X Sierra 10.12.4 guests

2017-03-31 Thread Gabriel L. Somlo
- 3/3: implement read-only error/status port, and update data and command read/write methods to correctly maintain the state machine for keeping the status_1e value up to date. Thanks, --Gabriel Gabriel L. Somlo (3): applesmc: cosmetic

[Qemu-devel] [PATCH v1 3/3] applesmc: implement error status port

2017-03-31 Thread Gabriel L. Somlo
As of release 10.12.4, OS X (Sierra) refuses to boot unless the AppleSMC supports an additional I/O port, expected to provide an error status code. Update the [cmd|data]_write() and data_read() methods to implement the required state machine, and add an err_read() method to provide the error statu

Re: [Qemu-devel] [PATCH v2 0/2] hw/usb/dev-hid: Make usb-tablet work with OS X/macOS guests

2017-01-20 Thread Gabriel L. Somlo
On Fri, Jan 20, 2017 at 13:30:15 +0100, p...@philjordan.eu wrote: > This series makes the Qemu usb-tablet work correctly with OS X/macOS guests > without the need for a special guest driver. > > * The usb-tablet should not have a boot protocol of 2. Other OSes seem to > ignore this, but the IOH

Re: [Qemu-devel] [PATCH v5 wave 1 0/4] fw-cfg: support writeable blobs and more files

2017-01-11 Thread Gabriel L. Somlo
list of CC's, it's due to the fact > that fw_cfg is quite widely used (see patch #4). > > Cc: "Gabriel L. Somlo" Whole series: Acked-by: Gabriel Somlo Data passed in via the "-fw_cfg" qemu command still shows up fine in /sys/firmware/qemu-fw-cfg on the gue

Re: [Qemu-devel] [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 kmalloc_array() in fw_cfg_register_dir_entries

Re: [Qemu-devel] [PATCH for-2.6] fw_cfg: Adopt /opt/RFQDN convention

2016-04-19 Thread Gabriel L. Somlo
n, however, to guide safe sharing > >> among different such users. > >> > >> Fix that, losely following QMP precedence: names should start with > >> opt/RFQDN/, where RFQDN is a reverse fully qualified domain name you > >> control. > >> &g

Re: [Qemu-devel] [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 a/drivers/firmware/qemu_fw_cfg.c b/drivers/fi

Re: [Qemu-devel] [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: [Qemu-devel] [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: [Qemu-devel] [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: &g

Re: [Qemu-devel] [PATCH v2] fw_cfg: RFQDN rules, documentation

2016-04-07 Thread Gabriel L. Somlo
gt; > allows that, while making sure users are aware it's unsupported. > > > > > > Cc: Gerd Hoffmann > > > Cc: Gabriel L. Somlo > > > Cc: Laszlo Ersek > > > Cc: Markus Armbruster > > > Signed-off-by: Michael S. Tsirkin > > > --- > &

[Qemu-devel] commit 084a85e breaks build

2016-03-19 Thread Gabriel L. Somlo
Hi Daniel, I get the error below when I try to build QEMU, and bisect claims it started with commit 084a85e (crypto: add support for the cast5-128 cipher algorithm). Sorry if this is already a known issue. Let me know if there's anything you'd like me to test. My command line is: ~/KVM-OSX/SCRAT

Re: [Qemu-devel] [PATCH v1 0/2] Fix build problems with nettle < 3.0.0

2016-03-19 Thread Gabriel L. Somlo
On Fri, Mar 18, 2016 at 01:21:54PM +, Daniel P. Berrange wrote: > This series fixes two build problems identified by people using > 2.x series of nettle > > https://lists.gnu.org/archive/html/qemu-devel/2016-03/msg04420.html Builds and works fine now on F22 with nettle 2.7.1. Thanks again f

Re: [Qemu-devel] [PATCH v2] vl.c: disallow command line fw cfg without opt/

2016-03-19 Thread Gabriel L. Somlo
On Wed, 16 Mar 2016 at 18:50:57 +0200, Michael S. Tsirkin wrote: > On Wed, Mar 16, 2016 at 05:29:45PM +0100, Markus Armbruster wrote: > > "Michael S. Tsirkin" writes: > > > > > Allowing arbitary file names on command line is setting us up for > > > failure: future guests will look for a specific

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

2016-03-18 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 wh

Re: [Qemu-devel] [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: [Qemu-devel] [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: [Qemu-devel] [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: [Qemu-devel] [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: [Qemu-devel] [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 > > > > Make fw_cfg entries of type "file" available via sysfs. Entries > > are listed under

[Qemu-devel] [PATCH v9 0/5] add ACPI node for fw_cfg on pc and arm

2016-02-19 Thread Gabriel L. Somlo
1/3 moves (and renames) the BIOS_CFG_IOPORT (0x510) >>>>>>>> define from pc.c to pc.h, so that it could be used from >>>>>>>> acpi-build.c in patch 2/3. >>>>>>>> >>>>>>>>-

[Qemu-devel] [PATCH v9 3/5] acpi: pc: add fw_cfg device node to dsdt

2016-02-19 Thread Gabriel L. Somlo
Add a fw_cfg device node to the ACPI DSDT. 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

[Qemu-devel] [PATCH v9 2/5] pc: fw_cfg: move ioport base constant to pc.h

2016-02-19 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 -

[Qemu-devel] [PATCH v9 1/5] fw_cfg: expose control register size in fw_cfg.h

2016-02-19 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

[Qemu-devel] [PATCH v9 5/5] fw_cfg: document ACPI device node information

2016-02-19 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

[Qemu-devel] [PATCH v9 4/5] acpi: arm: add fw_cfg device node to dsdt

2016-02-19 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

Re: [Qemu-devel] [PATCH v8 3/5] acpi: pc: add fw_cfg device node to dsdt

2016-02-19 Thread Gabriel L. Somlo
On Fri, Feb 19, 2016 at 02:49:53PM +0100, Igor Mammedov wrote: > On Thu, 11 Feb 2016 17:06:03 -0500 > "Gabriel L. Somlo" wrote: > > > Add a fw_cfg device node to the ACPI DSDT. While the guest-side > > firmware can't utilize this information (since it has

Re: [Qemu-devel] [PATCH v8 0/5] add ACPI node for fw_cfg on pc and arm

2016-02-16 Thread Gabriel L. Somlo
On Thu, Feb 11, 2016 at 05:06:00PM -0500, Gabriel L. Somlo wrote: > Generate an ACPI DSDT node for fw_cfg on pc and arm guests. > > New since v7: > > - edited commit blurb on 3/5 to match updated content, i.e. that > the ACPI node is now inserted into the DSDT (

[Qemu-devel] [PATCH v8 0/5] add ACPI node for fw_cfg on pc and arm

2016-02-11 Thread Gabriel L. Somlo
t;>>>> DSDT (on arm). >>>>>>> >>>>>>> - Patch 1/3 moves (and renames) the BIOS_CFG_IOPORT (0x510) >>>>>>> define from pc.c to pc.h, so that it could be used from >>>>>>> acpi-b

[Qemu-devel] [PATCH v8 5/5] fw_cfg: document ACPI device node information

2016-02-11 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

[Qemu-devel] [PATCH v8 4/5] acpi: arm: add fw_cfg device node to dsdt

2016-02-11 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

[Qemu-devel] [PATCH v8 2/5] pc: fw_cfg: move ioport base constant to pc.h

2016-02-11 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 -

[Qemu-devel] [PATCH v8 1/5] fw_cfg: expose control register size in fw_cfg.h

2016-02-11 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

[Qemu-devel] [PATCH v8 3/5] acpi: pc: add fw_cfg device node to dsdt

2016-02-11 Thread Gabriel L. Somlo
Add a fw_cfg device node to the ACPI DSDT. 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

Re: [Qemu-devel] [PATCH v7 3/5] acpi: pc: add fw_cfg device node to ssdt

2016-02-11 Thread Gabriel L. Somlo
On Thu, Feb 11, 2016 at 04:19:59PM +0100, Igor Mammedov wrote: > On Wed, 10 Feb 2016 15:41:38 -0500 > "Gabriel L. Somlo" wrote: > > > Add a fw_cfg device node to the ACPI SSDT. While the guest-side > > firmware can't utilize this information (since it has

[Qemu-devel] [PATCH v7 1/5] fw_cfg: expose control register size in fw_cfg.h

2016-02-10 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

[Qemu-devel] [PATCH v7 4/5] acpi: arm: add fw_cfg device node to dsdt

2016-02-10 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

[Qemu-devel] [PATCH v7 3/5] acpi: pc: add fw_cfg device node to ssdt

2016-02-10 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

[Qemu-devel] [PATCH v7 2/5] pc: fw_cfg: move ioport base constant to pc.h

2016-02-10 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 -

[Qemu-devel] [PATCH v7 0/5] add ACPI node for fw_cfg on pc and arm

2016-02-10 Thread Gabriel L. Somlo
d renames) the BIOS_CFG_IOPORT (0x510) >>>>>>define from pc.c to pc.h, so that it could be used from >>>>>>acpi-build.c in patch 2/3. >>>>>> >>>>>> - Patch 2/3 adds a fw_cfg node to the pc SSDT. >>>>>>

[Qemu-devel] [PATCH v7 5/5] fw_cfg: document ACPI device node information

2016-02-10 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

[Qemu-devel] commit 5b82b70 boot problems

2016-02-10 Thread Gabriel L. Somlo
Hi Stefan, After pulling from upstream this morning, my guest VMs were no longer able to boot. For instance, running something like bin/qemu-system-x86_64 -machine q35,accel=kvm -m 2048 -monitor stdio \ -device ide-drive,bus=ide.2,drive=CD \ -drive id=CD,if=none,snapshot=on,file=Fedora-Live-W

Re: [Qemu-devel] [PATCH v6 0/5] add ACPI node for fw_cfg on pc and arm

2016-02-10 Thread Gabriel L. Somlo
On Wed, Feb 10, 2016 at 11:16:57AM -0500, Gabriel L. Somlo wrote: > Ping. > > Now that the kernel side seems to have been accepted (Thanks again > Laszlo and Matt for all the help and advice!!!), is there anything > left to clean up before this series could be applied to QEMU ? A

Re: [Qemu-devel] [PATCH v6 0/5] add ACPI node for fw_cfg on pc and arm

2016-02-10 Thread Gabriel L. Somlo
, Jan 27, 2016 at 10:00:52PM -0500, Gabriel L. Somlo wrote: > New since v5: > > - rebased on top of latest QEMU git master > > Thanks, > --Gabriel > > >New since v4: > > > > - rebased on top of Marc's DMA series > > - drop mac

Re: [Qemu-devel] [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(+

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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 -

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

[Qemu-devel] [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

Re: [Qemu-devel] [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 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 via &g

[Qemu-devel] [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 ov

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

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

[Qemu-devel] [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. "etc/acpi/rsdp") t

[Qemu-devel] [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 Acked-by: Rob Herring Reviewed-by: Lasz

  1   2   3   4   5   6   7   8   >