Re: [Qemu-devel] [PATCH 21/47] hw/char/Kconfig: Add Kconfig file

2013-09-15 Thread Alberto Garcia
On Fri, Sep 13, 2013 at 04:49:48PM +0200, Paolo Bonzini wrote: I'm not sure of the benefit of an hw/ipack directory if (a) there is only one class providing the bus and (b) all the classes using the bus (well, there is just one of them) are in the same directory. If any of the two

Re: [Qemu-devel] [PATCH qom-next for-next 1/6] ipack: Convert to QOM realize

2013-08-05 Thread Alberto Garcia
On Fri, Aug 02, 2013 at 11:16:56PM +0200, Andreas Färber wrote: +#define IPOCTAL_GET_PARENT_CLASS(obj) \ +OBJECT_GET_PARENT_CLASS(obj, TYPE_IPOCTAL) Hey, I cannot make it compile with the latest master: hw/char/ipoctal232.c: In function ‘ipoctal_realize’: hw/char/ipoctal232.c:544:5:

Re: [Qemu-devel] [PATCH qom-next for-next 0/6] QOM realize for IndustryPack

2013-08-06 Thread Alberto Garcia
to QOM realize ipack: QOM parent field cleanup for IPackBus ipack: QOM parent field cleanup for IPackDevice ipack: Simplify VMSTATE_IPACK_DEVICE() macro ipoctal232: QOM parent field cleanup ipack: Move IndustryPack out of hw/char/ Acked-by: Alberto Garcia agar...@igalia.com Berto

Re: [Qemu-devel] [PATCH] ivshmem, qdev-monitor: fix order of qerror parameters

2012-08-14 Thread Alberto Garcia
On Tue, Aug 14, 2012 at 10:42:30AM -0300, Luiz Capitulino wrote: Additionally, we should check all old QERR_ macros to see if anyone else swaps parameters like this and change them too. Yes, I also noticed the problem and checked all QERR_ macros, I only found the two that I corrected in the

[Qemu-devel] [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-08-23 Thread Alberto Garcia
in the ipoctal device can be redirected to a character device in the host using the functionality provided by QEMU. The 'serial0' to 'serial7' parameters can be used to specify each one of the redirections. Suggestions, comments, etc, will be appreciated. Alberto Garcia (2): Add TEWS TPCI200

[Qemu-devel] [PATCH 1/2] Add TEWS TPCI200 IndustryPack emulation

2012-08-23 Thread Alberto Garcia
The TPCI200 is a PCI board that supports up to 4 IndustryPack modules. A new bus type called 'IndustryPack' has been created so any compatible module can be attached to this board. Signed-off-by: Alberto Garcia agar...@igalia.com --- default-configs/pci.mak |1 + hw/Makefile.objs

[Qemu-devel] [PATCH 2/2] Add IP-Octal 232 IndustryPack emulation

2012-08-23 Thread Alberto Garcia
The IP-Octal 232 is an IndustryPack module that implements eight RS-232 serial ports, each one of which can be redirected to a character device in the host. Signed-off-by: Alberto Garcia agar...@igalia.com --- hw/Makefile.objs |2 +- hw/ipoctal.c | 662

[Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-08-31 Thread Alberto Garcia
Ping Patches here: http://patchwork.ozlabs.org/patch/179657/ http://patchwork.ozlabs.org/patch/179658/ Description: https://lists.gnu.org/archive/html/qemu-devel/2012-08/msg04173.html Berto

[Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-09-10 Thread Alberto Garcia
On Fri, Aug 31, 2012 at 06:09:11PM +0200, Andreas Färber wrote: We are currently in Hard Freeze, new devices will not get accepted before the release, and our review may focus on bug fixes. QEMU 1.2 has been released, so here's the new ping. Patches here:

Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-10-05 Thread Alberto Garcia
On Fri, Aug 31, 2012 at 06:09:11PM +0200, Andreas Färber wrote: Ping We are currently in Hard Freeze, new devices will not get accepted before the release, and our review may focus on bug fixes. http://wiki.qemu.org/Planning/1.2 I remember having had a brief look through your patches

Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-10-06 Thread Alberto Garcia
On Fri, Oct 05, 2012 at 04:24:08PM +, Blue Swirl wrote: Endianness looks buggy, there's no way to turn off big endian mode I double checked the documentation and I think you're right, I can update the patch. Thanks for pointing it out. DEVICE_NATIVE_ENDIAN should probably be

Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-10-08 Thread Alberto Garcia
On Sun, Oct 07, 2012 at 12:19:07PM +0200, Avi Kivity wrote: So you could easily have struct IPackDevice { DeviceState qdev; int32_t slot; /* IRQ objects for the IndustryPack INT0# and INT1# */ qemu_irq *irq; MemoryRegion io_space; MemoryRegion

Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-10-10 Thread Alberto Garcia
On Sun, Oct 07, 2012 at 12:13:53PM +0200, Avi Kivity wrote: Luckily the low-order bits are used for offsets, and the high-order bits are used for selecting the sub-device. So you could easily have struct IPackDevice { DeviceState qdev; int32_t slot; /* IRQ objects for

Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-10-10 Thread Alberto Garcia
On Wed, Oct 10, 2012 at 01:35:06PM +0200, Avi Kivity wrote: Hey, I finally found some time to look into this, the problem that I see is that the PCI carrier doesn't just map each space into its local address spaces, in addition to that: 1) it changes the data and addresses according

[Qemu-devel] [PATCH v4 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2013-01-07 Thread Alberto Garcia
Rebased (and tested) against the current master as requested. On Mon, Jan 07, 2013 at 02:32:41PM -0600, Anthony Liguori wrote: Alberto Garcia agar...@igalia.com writes: Ping, Here's a QEMU image (124 MB) of a Debian system with the tpci200 and ipoctal drivers, in case you want to try

[Qemu-devel] [PATCH v4 1/2] Add TEWS TPCI200 IndustryPack emulation

2013-01-07 Thread Alberto Garcia
The TPCI200 is a PCI board that supports up to 4 IndustryPack modules. A new bus type called 'IndustryPack' has been created so any compatible module can be attached to this board. Signed-off-by: Alberto Garcia agar...@igalia.com --- default-configs/pci.mak |1 + hw/Makefile.objs

[Qemu-devel] [PATCH v4 2/2] Add GE IP-Octal 232 IndustryPack emulation

2013-01-07 Thread Alberto Garcia
The GE IP-Octal 232 is an IndustryPack module that implements eight RS-232 serial ports, each one of which can be redirected to a character device in the host. Signed-off-by: Alberto Garcia agar...@igalia.com --- hw/Makefile.objs |2 +- hw/ipoctal.c | 614

Re: [Qemu-devel] [PATCH v4 1/2] Add TEWS TPCI200 IndustryPack emulation

2013-01-08 Thread Alberto Garcia
On Tue, Jan 08, 2013 at 02:55:56PM +0100, Andreas Färber wrote: IPACK_DEVICE() You have them defined in the header, please use them consistently. Also, please avoid accessing internals like s-bus.qbus (BUS(s-bus)) or s-dev.qdev (DEVICE(s-dev)). Ok, I'm using all the defined macros and

Re: [Qemu-devel] [PATCH v4 1/2] Add TEWS TPCI200 IndustryPack emulation

2013-01-08 Thread Alberto Garcia
On Tue, Jan 08, 2013 at 05:22:35PM +0100, Andreas Färber wrote: Tell me if there's anything else I should change, else I can post the new patches. Haven't looked at the latest 2/2 patch yet, same might apply there. Otherwise no issues spotted in 1/2. Yes, I updated both patches. Shall I

Re: [Qemu-devel] [PATCH v4 2/2] Add GE IP-Octal 232 IndustryPack emulation

2013-01-08 Thread Alberto Garcia
On Tue, Jan 08, 2013 at 07:08:57PM +0100, Andreas Färber wrote: On my suggestion you changed the type name from ipoctal to ipoctal232 - the file name should probably then be updated, too. For the function prefixes inside the file it shouldn't matter as long as they're consistent. The reason

Re: [Qemu-devel] [PATCH v4 1/2] Add TEWS TPCI200 IndustryPack emulation

2013-01-08 Thread Alberto Garcia
On Wed, Jan 09, 2013 at 01:36:50AM +0100, Andreas Färber wrote: I also removed all accesses to internals. qdev-parent_bus is not supposed to be accessed either, there is qdev_get_parent_bus() as accessor function. Yeah, that one I had also changed :) (I didn't find any accessor for

[Qemu-devel] [PATCH v5 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2013-01-11 Thread Alberto Garcia
with BUS(bus). * Replaced dev-qdev with DEVICE(dev). (*) I didn't rename everything in the code from ipoctal to ipoctal232 for the reasons I told Andreas: all devices from the IP-Octal family are almost identical from the emulation point of view. Regards, Berto Alberto Garcia (2): Add TEWS

[Qemu-devel] [PATCH v5 1/2] Add TEWS TPCI200 IndustryPack emulation

2013-01-11 Thread Alberto Garcia
The TPCI200 is a PCI board that supports up to 4 IndustryPack modules. A new bus type called 'IndustryPack' has been created so any compatible module can be attached to this board. Signed-off-by: Alberto Garcia agar...@igalia.com --- default-configs/pci.mak |1 + hw/Makefile.objs

[Qemu-devel] [PATCH v5 2/2] Add GE IP-Octal 232 IndustryPack emulation

2013-01-11 Thread Alberto Garcia
The GE IP-Octal 232 is an IndustryPack module that implements eight RS-232 serial ports, each one of which can be redirected to a character device in the host. Signed-off-by: Alberto Garcia agar...@igalia.com --- hw/Makefile.objs |2 +- hw/ipoctal232.c | 619

Re: [Qemu-devel] [PATCH v5 1/2] Add TEWS TPCI200 IndustryPack emulation

2013-01-14 Thread Alberto Garcia
On Fri, Jan 11, 2013 at 09:28:48PM +0100, Andreas Färber wrote: I do wonder if adjust_value() can be replaced by switching MemoryRegion endianness between DEVICE_LITTLE_ENDIAN and DEVICE_BIG_ENDIAN rather than having it as DEVICE_NATIVE_ENDIAN and doing a manual bswap16()? Avi had actually

Re: [Qemu-devel] [PATCH] hw/tpci200: Fix compiler warning (redefined symbol with MinGW)

2013-01-15 Thread Alberto Garcia
On Tue, Jan 15, 2013 at 11:23:23PM +0100, Stefan Weil wrote: STATUS_TIMEOUT is defined in winnt.h: Fix the compiler warning by adding a prefix. Hey, thanks. If it doesn't conflict with anything else in Windows we could also replace it with STATUS_TIME, which is the actual name of the status

[Qemu-devel] [PATCH v2 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-12-05 Thread Alberto Garcia
then. Here's the original thread for reference: https://lists.gnu.org/archive/html/qemu-devel/2012-10/msg01117.html I think that's all, if there's any questions please let me know. Thanks, Alberto Garcia (2): Add TEWS TPCI200 IndustryPack emulation Add GE IP-Octal 232 IndustryPack emulation

[Qemu-devel] [PATCH v2 2/2] Add GE IP-Octal 232 IndustryPack emulation

2012-12-05 Thread Alberto Garcia
The GE IP-Octal 232 is an IndustryPack module that implements eight RS-232 serial ports, each one of which can be redirected to a character device in the host. Signed-off-by: Alberto Garcia agar...@igalia.com --- hw/Makefile.objs |2 +- hw/ipoctal.c | 613

[Qemu-devel] [PATCH v2 1/2] Add TEWS TPCI200 IndustryPack emulation

2012-12-05 Thread Alberto Garcia
The TPCI200 is a PCI board that supports up to 4 IndustryPack modules. A new bus type called 'IndustryPack' has been created so any compatible module can be attached to this board. Signed-off-by: Alberto Garcia agar...@igalia.com --- default-configs/pci.mak |1 + hw/Makefile.objs

[Qemu-devel] [PATCH v3 2/2] Add GE IP-Octal 232 IndustryPack emulation

2012-12-05 Thread Alberto Garcia
The GE IP-Octal 232 is an IndustryPack module that implements eight RS-232 serial ports, each one of which can be redirected to a character device in the host. Signed-off-by: Alberto Garcia agar...@igalia.com --- hw/Makefile.objs |2 +- hw/ipoctal.c | 613

[Qemu-devel] [PATCH v3 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-12-05 Thread Alberto Garcia
As requested by Andreas, I'm sending them again as inline patches. I also changed the name of the VMStateDescription struct from ipoctal to ipoctal232. Otherwise they're the same. Regards, Alberto Garcia (2): Add TEWS TPCI200 IndustryPack emulation Add GE IP-Octal 232 IndustryPack emulation

[Qemu-devel] [PATCH v3 1/2] Add TEWS TPCI200 IndustryPack emulation

2012-12-05 Thread Alberto Garcia
The TPCI200 is a PCI board that supports up to 4 IndustryPack modules. A new bus type called 'IndustryPack' has been created so any compatible module can be attached to this board. Signed-off-by: Alberto Garcia agar...@igalia.com --- default-configs/pci.mak |1 + hw/Makefile.objs

Re: [Qemu-devel] Ping [PATCH v3 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation

2012-12-17 Thread Alberto Garcia
Ping, Here's a QEMU image (124 MB) of a Debian system with the tpci200 and ipoctal drivers, in case you want to try them out: http://dl.dropbox.com/u/1667385/qemu-ipoctal.qcow2 The root password is just 'root'. The patches for QEMU are here: http://patchwork.ozlabs.org/patch/203892/

Re: [Qemu-devel] [PATCH 3/3] ipoctal232: Convert to use chardev properties directly

2013-04-01 Thread Alberto Garcia
On Wed, Mar 27, 2013 at 08:29:41PM +0100, Hans de Goede wrote: Signed-off-by: Hans de Goede hdego...@redhat.com Cc: Alberto Garcia agar...@igalia.com Sorry for the delay, just came back from holidays :) I've just tested it and the change looks fine to me. Signed-off-by: Alberto Garcia agar

Re: [Qemu-devel] [PULL 28/48] tests: Add ipoctal232 qtest

2014-02-13 Thread Alberto Garcia
On Mon, Feb 10, 2014 at 07:36:45PM +0100, Andreas Färber wrote: Cc: Alberto Garcia agar...@igalia.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Andreas Färber afaer...@suse.de --- tests/Makefile | 7 +++ tests/ipoctal232-test.c | 33

Re: [Qemu-devel] [PULL 27/48] tests: Add tpci200 qtest

2014-02-13 Thread Alberto Garcia
On Mon, Feb 10, 2014 at 07:36:44PM +0100, Andreas Färber wrote: Cc: Alberto Garcia agar...@igalia.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Andreas Färber afaer...@suse.de --- tests/Makefile | 3 +++ tests/tpci200-test.c | 33

Re: [Qemu-devel] [PATCH qom-next for-next 0/6] QOM realize for IndustryPack

2014-02-09 Thread Alberto Garcia
On Sat, Feb 08, 2014 at 08:58:35PM +0100, Andreas Färber wrote: ipack: Move IndustryPack out of hw/char/ There were unresolved IRC discussions with Paolo where exactly to place which IndustryPack files, so that this series has been lying around. As I had explained some time ago I was

Re: [Qemu-devel] [PATCH qom-next for-next 0/6] QOM realize for IndustryPack

2014-02-09 Thread Alberto Garcia
On Sun, Feb 09, 2014 at 10:31:33PM +0100, Paolo Bonzini wrote: It's okay, but I think I asked what other IPack modules exist and I had no answer. I found more IPack here: http://www.acromag.com/catalog/84/Embedded_I_O_Boards/Industry_Pack_I_O_Modules so hw/ipack is fine. Also:

Re: [Qemu-devel] [PATCH qom v1 3/4] irq: Allocate IRQs individually

2014-06-02 Thread Alberto Garcia
/ipack/ipack.c | 2 +- include/hw/irq.h | 2 +- 5 files changed, 11 insertions(+), 17 deletions(-) Acked-by: Alberto Garcia agar...@igalia.com

[Qemu-devel] [PATCH] block: Give always priority to unused entries in the qcow2 L2 cache

2015-02-05 Thread Alberto Garcia
to 0 again, unused entries will always have priority. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2-cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index 904f6b1..b115549 100644 --- a/block/qcow2-cache.c +++ b

Re: [Qemu-devel] [PATCH] block: Give always priority to unused entries in the qcow2 L2 cache

2015-02-05 Thread Alberto Garcia
On Thu, Feb 05, 2015 at 08:48:30AM -0500, Max Reitz wrote: -c-entries[i].cache_hits /= 2; +if (c-entries[i].cache_hits 1) { +c-entries[i].cache_hits /= 2; +} } if (min_index == -1) { Hm, I can't see where the code is actually giving

Re: [Qemu-devel] [PATCH] block: Give always priority to unused entries in the qcow2 L2 cache

2015-02-05 Thread Alberto Garcia
On Thu, Feb 05, 2015 at 03:17:19PM +0100, Kevin Wolf wrote: By never allowing the hit count to go down to zero, we make sure that all unused entries are chosen first before a valid one is discarded. But does this actually improve a lot? cache_hits is only 0 for the first few accesses

Re: [Qemu-devel] [PATCH] block: Give always priority to unused entries in the qcow2 L2 cache

2015-02-06 Thread Alberto Garcia
On Thu, Feb 05, 2015 at 03:17:19PM +0100, Kevin Wolf wrote: By never allowing the hit count to go down to zero, we make sure that all unused entries are chosen first before a valid one is discarded. But does this actually improve a lot? cache_hits is only 0 for the first few accesses

Re: [Qemu-devel] [PATCH] block: Give always priority to unused entries in the qcow2 L2 cache

2015-02-06 Thread Alberto Garcia
On Fri, Feb 06, 2015 at 12:18:07PM +0100, Kevin Wolf wrote: I wanted to measure the actual impact of this, so I modified the current code to implement a quick and dirty LRU algorithm and made some numbers. Cool, thanks. I think switching to an LRU algorithm is an option that might make

[Qemu-devel] [PATCH 2/3] block: Add QMP support for streaming to an intermediate layer

2015-02-20 Thread Alberto Garcia
This adds the 'top' parameter to the 'block-stream' QMP command and checks that its value is valid before passing it to stream_start(). Signed-off-by: Alberto Garcia be...@igalia.com --- blockdev.c| 19 +++ hmp.c | 2 +- include/qapi/qmp

[Qemu-devel] [PATCH 3/3] docs: Document how to stream to an intermediate layer

2015-02-20 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- docs/live-block-ops.txt | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/docs/live-block-ops.txt b/docs/live-block-ops.txt index a257087..63530e8 100644 --- a/docs/live-block-ops.txt +++ b/docs

[Qemu-devel] [PATCH 0/3] Support streaming to an intermediate layer

2015-02-20 Thread Alberto Garcia
#Streaming_to_an_Intermediate_Layer_.5Bproposal.5D I split the work in three patches, I think the code is pretty straightforward and doesn't need much explanation, but feedback and questions are welcome. Regards, Berto Alberto Garcia (3): block: Support streaming to an intermediate layer block: Add QMP

[Qemu-devel] [PATCH 1/3] block: Support streaming to an intermediate layer

2015-02-20 Thread Alberto Garcia
This adds a new 'top' parameter to stream_start(), that specifies the block device where the data will be written. The image is changed to read-write mode during the streaming and back to read-only afterwards. This also unblocks the stream operation in backing files. Signed-off-by: Alberto

[Qemu-devel] [PATCH 8/9] throttle: Update throttle infrastructure copyright

2015-02-13 Thread Alberto Garcia
From: Benoît Canet benoit.ca...@nodalink.com Signed-off-by: Benoit Canet benoit.ca...@nodalink.com Signed-off-by: Alberto Garcia be...@igalia.com --- include/qemu/throttle.h | 4 ++-- tests/test-throttle.c | 4 ++-- util/throttle.c | 4 ++-- 3 files changed, 6 insertions(+), 6

[Qemu-devel] [PATCH 9/9] throttle: add name of ThrottleGroup to BlockDeviceInfo

2015-02-13 Thread Alberto Garcia
Replace also throttle_group_compare() with throttle_group_get_name() Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 2 +- block/qapi.c| 5 + block/throttle-groups.c | 14 -- hmp.c | 6

[Qemu-devel] [PATCH 3/9] throttle: Add throttle group infrastructure tests

2015-02-13 Thread Alberto Garcia
From: Benoît Canet benoit.ca...@nodalink.com Signed-off-by: Benoit Canet benoit.ca...@nodalink.com Signed-off-by: Alberto Garcia be...@igalia.com --- tests/test-throttle.c | 56 +++ 1 file changed, 56 insertions(+) diff --git a/tests/test

[Qemu-devel] [PATCH 5/9] throttle: Add a way to know if throttle_schedule_timer had armed a timer

2015-02-13 Thread Alberto Garcia
From: Benoît Canet benoit.ca...@nodalink.com This will be needed by the group throttling patches for the algorithm to be accurate. Signed-off-by: Benoit Canet benoit.ca...@nodalink.com Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 7 +-- include/qemu

[Qemu-devel] [PATCH 4/9] throttle: Prepare to have multiple timers for one ThrottleState

2015-02-13 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 2 ++ include/qemu/throttle.h | 3 +++ util/throttle.c | 16 +--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index b7469a7..fb45c6e 100644 --- a/block.c +++ b

[Qemu-devel] [PATCH 6/9] throttle: Add a way to fire one of the timers asap like a bottom half

2015-02-13 Thread Alberto Garcia
From: Benoît Canet benoit.ca...@nodalink.com This will be needed by the group throttling algorithm. Signed-off-by: Benoit Canet benoit.ca...@nodalink.com Signed-off-by: Alberto Garcia be...@igalia.com --- include/qemu/throttle.h | 2 ++ util/throttle.c | 11 +++ 2 files changed

[Qemu-devel] [PATCH 1/9] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure

2015-02-13 Thread Alberto Garcia
the way for each bs of a common ThrottleState to have its own timer. Signed-off-by: Benoit Canet benoit.ca...@nodalink.com Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 35 include/block/block_int.h | 1 + include/qemu/throttle.h | 38

[Qemu-devel] [PATCH 7/9] throttle: Add throttle group support

2015-02-13 Thread Alberto Garcia
timer will be armed so the token will become the next active BDS. Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 212 +++--- block/qapi.c | 7 +- block/throttle-groups.c | 2 +- blockdev.c| 19

[Qemu-devel] [PATCH 2/9] throttle: Add throttle group infrastructure

2015-02-13 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- block/Makefile.objs | 1 + block/throttle-groups.c | 212 include/block/block_int.h | 1 + include/block/throttle-groups.h | 45 + 4 files changed, 259 insertions

[Qemu-devel] [PATCH v2 0/9] Block Throttle Group Support

2015-02-13 Thread Alberto Garcia
to BlockDeviceInfo, so now it can be seen from the monitor. I kept the authorship of the original patches except the one that I had to modify substantially. Regards, Berto Alberto Garcia (2): throttle: Add throttle group support throttle: add name of ThrottleGroup to BlockDeviceInfo

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add myself as the maintainer of the Quorum driver

2015-03-18 Thread Alberto Garcia
On Tue, Mar 17, 2015 at 05:23:56PM +, Stefan Hajnoczi wrote: + +Quorum +M: Alberto Garcia be...@igalia.com +S: Supported +F: block/quorum.c I'd like to also add the qemu-bl...@nongnu.org mailing list to your MAINTAINERS stanza because patches should be CCed to the block list

Re: [Qemu-devel] [PATCH 2/3] block: Add QMP support for streaming to an intermediate layer

2015-03-18 Thread Alberto Garcia
On Thu, Mar 12, 2015 at 04:45:17PM +0100, Kevin Wolf wrote: One issue that I'm finding is that when we move the block-stream job to an intermediate node, where the device name is empty, we get messages like Device '' is busy. My first thought was then make it 'Source/Target device is

Re: [Qemu-devel] [PATCH 2/3] block: Add QMP support for streaming to an intermediate layer

2015-03-17 Thread Alberto Garcia
On Thu, Mar 12, 2015 at 04:45:17PM +0100, Kevin Wolf wrote: One issue that I'm finding is that when we move the block-stream job to an intermediate node, where the device name is empty, we get messages like Device '' is busy. I can use node names instead, but they are also not

Re: [Qemu-devel] [PATCH 2/3] block: Add QMP support for streaming to an intermediate layer

2015-03-17 Thread Alberto Garcia
On Tue, Mar 17, 2015 at 09:22:55AM -0600, Eric Blake wrote: The BlockJobInfo object returned by query-block-jobs identifies the owner of the job using the 'device' field. If jobs can be in any intermediate node then we cannot simply rely on the device name. We also cannot simply replace

[Qemu-devel] [PATCH] MAINTAINERS: Add myself as the maintainer of the Quorum driver

2015-03-16 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index d7e9ba2..1fcf1e0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1176,3 +1176,8 @@ Bootdevice M: Gonglei arei.gong...@huawei.com S: Maintained

Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-19 Thread Alberto Garcia
On Thu, Mar 19, 2015 at 04:15:49PM -0600, Eric Blake wrote: -# @device: device name +# @device: device name, or node name if not present I think just adding a @node-name field and keeping @device as it is should be good enough here. I was doing the same that we discussed for

Re: [Qemu-devel] [PATCH 1/3] block: add bdrv_get_device_or_node_name()

2015-03-20 Thread Alberto Garcia
On Fri, Mar 20, 2015 at 08:40:32AM +0100, Markus Armbruster wrote: +const char *bdrv_get_device_or_node_name(const BlockDriverState *bs) +{ +return bs-blk ? blk_name(bs-blk) : bs-node_name; +} + Does this have uses beyond identifying @bs to the user? None that I can think of,

Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-20 Thread Alberto Garcia
On Thu, Mar 19, 2015 at 05:14:24PM -0600, Eric Blake wrote: So the more I think about it, the more I'd like for this event to output both 'device' (mandatory, with an empty string if we can't easily tie the BDS to a single device) and 'node' (where 'node' can be optional, and omitted if the

[Qemu-devel] [PATCH 2/3] block: use bdrv_get_device_or_node_name() in error messages

2015-03-20 Thread Alberto Garcia
message. The messages are also updated to use the more generic term 'node' instead of 'device'. Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 21 +++-- block/qcow.c | 4 ++-- block/qcow2.c | 2 +- block/qed.c

[Qemu-devel] [PATCH 3/3] block: add 'node-name' field to BLOCK_IMAGE_CORRUPTED

2015-03-20 Thread Alberto Garcia
Since this event can occur in nodes that cannot have a device name associated, include also a field with the node name. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2.c | 8 ++-- docs/qmp/qmp-events.txt | 16 +--- qapi/block-core.json| 13

[Qemu-devel] [PATCH v2 0/3] Add bdrv_get_device_or_node_name()

2015-03-20 Thread Alberto Garcia
Second version of the series. v2: - bdrv_get_device_or_node_name() includes a comment explaining its usage. - The error messages have been updated to say 'node' instead of 'device' where appropriate. - The BLOCK_IMAGE_CORRUPTED event has a new 'node-name' field. Regards, Berto Alberto

[Qemu-devel] [PATCH 1/3] block: add bdrv_get_device_or_node_name()

2015-03-20 Thread Alberto Garcia
This function gets the device name associated with a BlockDriverState, or its node name if the device name is empty. Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 9 + block/quorum.c| 5 + include/block/block.h | 1 + 3 files changed, 11

Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-19 Thread Alberto Garcia
On Thu, Mar 19, 2015 at 05:52:52PM -0400, Max Reitz wrote: So in this case here I don't really see a benefit of reusing @device instead of just adding @node-name, whereas adding @node-name will have the benefit of not affecting anybody and (in my opinion) being more explicit. However, if

[Qemu-devel] [PATCH v3 0/3] Add bdrv_get_device_or_node_name()

2015-03-20 Thread Alberto Garcia
() includes a comment explaining its usage. - The error messages have been updated to say 'node' instead of 'device' where appropriate. - The BLOCK_IMAGE_CORRUPTED event has a new 'node-name' field. Regards, Berto Alberto Garcia (3): block: add bdrv_get_device_or_node_name() block: use

[Qemu-devel] [PATCH 2/3] block: use bdrv_get_device_or_node_name() in error messages

2015-03-20 Thread Alberto Garcia
message. The messages are also updated to use the more generic term 'node' instead of 'device'. Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 24 block/qcow.c | 8 block/qcow2.c | 2 +- block/qed.c

[Qemu-devel] [PATCH 1/3] block: add bdrv_get_device_or_node_name()

2015-03-20 Thread Alberto Garcia
This function gets the device name associated with a BlockDriverState, or its node name if the device name is empty. Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 9 + block/quorum.c| 5 + include/block/block.h | 1 + 3 files changed, 11

Re: [Qemu-devel] [PATCH 3/3] block: allow BLOCK_IMAGE_CORRUPTED to have a node name

2015-03-19 Thread Alberto Garcia
(I forgot to Cc Eric in this series, doing it now) On Thu, Mar 19, 2015 at 03:42:35PM -0400, Max Reitz wrote: # Emitted when a corruption has been detected in a disk image # -# @device: device name +# @device: device name, or node name if not present Normally, if a field in QMP is

Re: [Qemu-devel] [PATCH 0/3] Add bdrv_get_device_or_node_name()

2015-03-19 Thread Alberto Garcia
On Thu, Mar 19, 2015 at 03:37:13PM -0400, Max Reitz wrote: This series adds a new function bdrv_get_device_or_node_name(), that returns the node name if there is no device name for that node. Since both the device and the node name live in the same namespace, there's no ambiguity. And

[Qemu-devel] [PATCH 3/3] block: add 'node-name' field to BLOCK_IMAGE_CORRUPTED

2015-03-20 Thread Alberto Garcia
Since this event can occur in nodes that cannot have a device name associated, include also a field with the node name. Signed-off-by: Alberto Garcia be...@igalia.com --- block/qcow2.c | 8 ++-- docs/qmp/qmp-events.txt | 16 +--- qapi/block-core.json| 13

Re: [Qemu-devel] [PATCH 2/3] block: Add QMP support for streaming to an intermediate layer

2015-03-11 Thread Alberto Garcia
On Thu, Mar 05, 2015 at 03:09:58PM +0100, Kevin Wolf wrote: { 'command': 'block-stream', - 'data': { 'device': 'str', '*base': 'str', '*backing-file': 'str', -'*speed': 'int', '*on-error': 'BlockdevOnError' } } + 'data': { 'device': 'str', '*base': 'str', '*top': 'str', +

Re: [Qemu-devel] [PATCH 0/1] Get the list of arguments from a QMP command

2015-03-12 Thread Alberto Garcia
On Wed, Mar 11, 2015 at 11:21:43AM +0100, Markus Armbruster wrote: I can actually try to implement full introspection support, but I would like to know what API you would like. Something like this? 'query-commands' 'query-enums' 'query-events' 'query-types'

Re: [Qemu-devel] [PATCH 1/3] block: Support streaming to an intermediate layer

2015-03-12 Thread Alberto Garcia
(Ccing Markus and Jeff as suggested) On Thu, Mar 05, 2015 at 03:04:25PM +0100, Kevin Wolf wrote: My question is whether we can't simply call stream_start() with an intermediate node as bs instead of introducing a new parameter. I'm not completely sure about the consequences of 3., i.e. moving

[Qemu-devel] [PATCH 6/6] throttle: Update throttle infrastructure copyright

2015-03-10 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- include/qemu/throttle.h | 8 +--- util/throttle.c | 8 +--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 2c560db..5af76f0 100644 --- a/include/qemu

[Qemu-devel] [PATCH 2/6] throttle: Add throttle group infrastructure

2015-03-10 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- block/Makefile.objs | 1 + block/throttle-groups.c | 244 include/block/block_int.h | 1 + include/block/throttle-groups.h | 41 +++ 4 files changed, 287 insertions

[Qemu-devel] [PATCH 3/6] throttle: Add throttle group infrastructure tests

2015-03-10 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- tests/test-throttle.c | 37 +++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 458f577..995d41d 100644 --- a/tests/test-throttle.c +++ b/tests

[Qemu-devel] [PATCH 5/6] throttle: add the name of the ThrottleGroup to BlockDeviceInfo

2015-03-10 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- block/qapi.c | 3 +++ hmp.c| 6 -- qapi/block-core.json | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index abeeb38..a0c7e6e 100644 --- a/block/qapi.c +++ b/block

[Qemu-devel] [PATCH 1/6] throttle: Extract timers from ThrottleState into a separate structure

2015-03-10 Thread Alberto Garcia
the way for each bs of a common ThrottleState to have its own timer. Signed-off-by: Benoit Canet benoit.ca...@nodalink.com Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 35 include/block/block_int.h | 1 + include/qemu/throttle.h | 38

[Qemu-devel] [PATCH v3 0/6] Block Throttle Group Support

2015-03-10 Thread Alberto Garcia
, but since there is no consensus yet I haven't included it in this series. And I think that's all. As usual, comments and feedback are welcome. Berto Alberto Garcia (5): throttle: Add throttle group infrastructure throttle: Add throttle group infrastructure tests throttle: Add throttle group

Re: [Qemu-devel] [PATCH 0/1] Get the list of arguments from a QMP command

2015-03-11 Thread Alberto Garcia
On Fri, Mar 06, 2015 at 10:11:39AM -0700, Eric Blake wrote: I'm still thinking about the actual patch, and whether we want to commit to this or just bite the bullet and go for full introspection. At any rate, it's a bit late for 2.3, so we have the full 2.4 cycle to get it right. I

Re: [Qemu-devel] [PATCH] block/throttle: Use host clock type

2015-03-13 Thread Alberto Garcia
the throttling settings. But that's not related to these changes. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 2 +- tests/test-throttle.c | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) Reviewed-By: Alberto Garcia be...@igalia.com Berto

[Qemu-devel] [PATCH 4/6] throttle: Add throttle group support

2015-03-12 Thread Alberto Garcia
timer will be armed so the token will become the next active BDS. Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 65 ++-- block/qapi.c| 5 +- block/throttle-groups.c | 127

Re: [Qemu-devel] [PATCH 2/6] throttle: Add throttle group infrastructure

2015-03-24 Thread Alberto Garcia
On Tue, Mar 24, 2015 at 03:03:07PM +, Stefan Hajnoczi wrote: +typedef struct ThrottleGroup { +char *name; /* This is constant during the lifetime of the group */ Is this also protected by throttle_groups_lock? I guess throttle_groups_lock must be held in order to read this

Re: [Qemu-devel] [PATCH v3] block: Switch to host monotonic clock for IO throttling

2015-03-25 Thread Alberto Garcia
On Wed, Mar 25, 2015 at 10:42:32AM +0800, Fam Zheng wrote: Block jobs are confusingly inconsistent between with and without throttling: if user sets a bps limit, starts a block job, then stops vm, the block job will not make any progress; in contrary, if user unsets the bps limit, the block

Re: [Qemu-devel] [PATCH 2/6] throttle: Add throttle group infrastructure

2015-03-25 Thread Alberto Garcia
+typedef struct ThrottleGroup { +char *name; /* This is constant during the lifetime of the group */ Is this also protected by throttle_groups_lock? I guess throttle_groups_lock must be held in order to read this field - otherwise there is a risk that the object is

[Qemu-devel] [PATCH v5 0/7] Block Throttle Group Support

2015-03-30 Thread Alberto Garcia
. - Documentation updates. Regards, Berto Alberto Garcia (6): throttle: Add throttle group infrastructure throttle: Add throttle group infrastructure tests throttle: Add throttle group support throttle: acquire the ThrottleGroup lock in bdrv_swap() throttle: add the name

[Qemu-devel] [PATCH 3/7] throttle: Add throttle group infrastructure tests

2015-03-30 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- tests/test-throttle.c | 70 +-- 1 file changed, 68 insertions(+), 2 deletions(-) diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 458f577..e87e6ae 100644 --- a/tests/test-throttle.c

[Qemu-devel] [PATCH 5/7] throttle: acquire the ThrottleGroup lock in bdrv_swap()

2015-03-30 Thread Alberto Garcia
can try to use them. Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 15 +++ block/throttle-groups.c | 31 ++- include/block/throttle-groups.h | 3 +++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH 2/7] throttle: Add throttle group infrastructure

2015-03-30 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- block/Makefile.objs | 1 + block/throttle-groups.c | 261 include/block/block_int.h | 1 + include/block/throttle-groups.h | 39 ++ 4 files changed, 302 insertions

[Qemu-devel] [PATCH 7/7] throttle: Update throttle infrastructure copyright

2015-03-30 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- include/qemu/throttle.h | 8 +--- util/throttle.c | 8 +--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 2c560db..5af76f0 100644 --- a/include/qemu

[Qemu-devel] [PATCH 6/7] throttle: add the name of the ThrottleGroup to BlockDeviceInfo

2015-03-30 Thread Alberto Garcia
Signed-off-by: Alberto Garcia be...@igalia.com --- block/qapi.c | 3 +++ hmp.c| 6 -- qapi/block-core.json | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 65af057..ee823d1 100644 --- a/block/qapi.c +++ b/block

[Qemu-devel] [PATCH 1/7] throttle: Extract timers from ThrottleState into a separate structure

2015-03-30 Thread Alberto Garcia
the way for each bs of a common ThrottleState to have its own timer. Signed-off-by: Benoit Canet benoit.ca...@nodalink.com Signed-off-by: Alberto Garcia be...@igalia.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com --- block.c | 35 include/block/block_int.h

[Qemu-devel] [PATCH 4/7] throttle: Add throttle group support

2015-03-30 Thread Alberto Garcia
timer will be armed so the token will become the next active BDS. Signed-off-by: Alberto Garcia be...@igalia.com --- block.c | 83 +--- block/qapi.c| 5 +- block/throttle-groups.c | 207

  1   2   3   4   5   6   7   8   9   10   >