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
rts 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

[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 --- default-configs/pci.mak |1 + hw/Makefile.objs|3 +

[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 --- hw/Makefile.objs |2 +- hw/ipoctal.c | 662

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 a

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

2012-12-05 Thread Alberto Garcia
ems that I described back 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 Ad

[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 --- 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 --- default-configs/pci.mak |1 + hw/Makefile.objs|3 +

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

[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 --- default-configs/pci.mak |1 + hw/Makefile.objs|3 +

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/ http://pat

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

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 DEVICE_LITTL

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; > >

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 objec

[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: http://patchwork.ozlabs.org/patch/1

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

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

2013-08-06 Thread Alberto Garcia
(6): > ipack: Convert 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 Berto

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 > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Andreas Färber > --- > tests/Makefile | 7 +++ > tests/ipoctal232-test.c | 33 + > 2 files c

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 > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Andreas Färber > --- > tests/Makefile | 3 +++ > tests/tpci200-test.c | 33 + > 2 files c

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

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:

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

2015-02-13 Thread Alberto Garcia
From: Benoît Canet Signed-off-by: Benoit Canet Signed-off-by: Alberto Garcia --- include/qemu/throttle.h | 4 ++-- tests/test-throttle.c | 4 ++-- util/throttle.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu

[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 --- block.c | 2 +- block/qapi.c| 5 + block/throttle-groups.c | 14 -- hmp.c | 6 -- include

[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 This will be needed by the group throttling algorithm. Signed-off-by: Benoit Canet Signed-off-by: Alberto Garcia --- include/qemu/throttle.h | 2 ++ util/throttle.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/include/qemu/throttle.h b/include

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

2015-02-13 Thread Alberto Garcia
From: Benoît Canet This patch transform the timer_pending call into two boolean values in the ThrottleState structure. This way we are sure that when multiple timers will be used only one can be armed at a time. Signed-off-by: Benoit Canet Signed-off-by: Alberto Garcia --- block.c

[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 This will be needed by the group throttling patches for the algorithm to be accurate. Signed-off-by: Benoit Canet Signed-off-by: Alberto Garcia --- block.c | 7 +-- include/qemu/throttle.h | 3 ++- util/throttle.c | 12 +++- 3 files

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

2015-02-13 Thread Alberto Garcia
From: Benoît Canet Signed-off-by: Benoit Canet Signed-off-by: Alberto Garcia --- tests/test-throttle.c | 56 +++ 1 file changed, 56 insertions(+) diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 458f577..0b649b1 100644 --- a

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

2015-02-13 Thread Alberto Garcia
ttle group 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 Block

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

2015-02-13 Thread Alberto Garcia
From: Benoît Canet The throttle_group_incref increment the refcount of a throttle group given it's name and return the associated throttle state. The throttle_group_unref is the mirror function for cleaning up. Signed-off-by: Benoit Canet Signed-off-by: Alberto Garcia ---

[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 --- block.c | 212 +++--- block/qapi.c | 7 +- block/throttle-groups.c | 2 +- blockdev.c| 19 - hmp.c

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

2015-02-13 Thread Alberto Garcia
common ThrottleState to have its own timer. Signed-off-by: Benoit Canet Signed-off-by: Alberto Garcia --- block.c | 35 include/block/block_int.h | 1 + include/qemu/throttle.h | 38 ++ tests/test-throttle.c | 82

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

2015-02-20 Thread Alberto Garcia
/Snapshots#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

[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 --- 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/live-block-ops.txt

[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 --- blockdev.c| 19 +++ hmp.c | 2 +- include/qa

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

[Qemu-devel] [PATCH] qerror.h: Swap definitions that were not in alphabetical order

2015-02-20 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- include/qapi/qmp/qerror.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 986260f..57a62d4 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -37,12

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

2015-02-20 Thread Alberto Garcia
On Fri, Feb 20, 2015 at 10:34:58AM -0700, Eric Blake wrote: > > I followed the proposed API from the wiki, which simply adds an > > additional 'top' parameter to block-stream specifying the image > > that data is written to: > > How does one learn whether qemu is new enough to support this > mode

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

2015-02-22 Thread Alberto Garcia
On Fri, Feb 20, 2015 at 03:49:05PM -0700, Eric Blake wrote: Hello and thanks for your comments. > 1. implement QAPI introspection (we've been dreaming about this > since qemu 1.5 days), then the caller just queries to see if the > version of QMP has the optional 'top' parameter. This sounds like

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

2015-02-23 Thread Alberto Garcia
On Fri, Feb 20, 2015 at 03:38:04PM -0700, Eric Blake wrote: > > +if (has_top) { > > +top_bs = bdrv_find_backing_image(bs, top); > > +if (top_bs == NULL) { > > +error_set(errp, QERR_TOP_NOT_FOUND, top); > > +goto out; > > +} > > If I understand c

[Qemu-devel] [PATCH] qmp-commands.hx: Fix several typos

2015-02-23 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- qmp-commands.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx index a85d847..52741ed 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1,5 +1,5 @@ HXCOMM QMP dispatch table and documentation

Re: [Qemu-devel] [PATCH] qmp-commands.hx: Fix several typos

2015-02-23 Thread Alberto Garcia
On Mon, Feb 23, 2015 at 02:26:28PM -0700, Eric Blake wrote: > > -- "tls": whevener the channel is encrypted (json-bool) > > +- "tls": whenever the channel is encrypted (json-bool) > > Might be nicer as 'whether' rather than 'whenever'. Oh, you're right. Feel free to change it, or do you want me

[Qemu-devel] [PATCH 1/1] qmp: Add support for requesting the list of arguments from a command

2015-02-24 Thread Alberto Garcia
turns a list of all supported arguments from a particular command. Additionally, 'query-commands' has a new, optional, 'query-args' argument that makes the return value include the arguments for all commands. Signed-off-by: Alberto Garcia --- monitor.c| 53 +++

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

2015-02-24 Thread Alberto Garcia
ata': {'name': 'str', 'args': ['CommandArgumentInfo'] } } I added both alternatives in this patch since I don't know what's the most convenient one for libvirt, but of course either of them can be removed

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

2015-02-25 Thread Alberto Garcia
On Tue, Feb 24, 2015 at 09:54:13AM -0700, Eric Blake wrote: > Questions - with this series in place, is it ever possible to have > throttling parameters without a throttle group name? Yes, and it will work the same as before. If the throttling parameters are set but no group name is specified the

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

2015-02-26 Thread Alberto Garcia
On Wed, Feb 25, 2015 at 08:23:10AM -0700, Eric Blake wrote: > How about query-block-throttle, returning an array of dicts. > > => { "execute":"query-block-throttle" } > <= { "return": [ > { "name": "throttle1", "bps_max": 10, >"nodes": [ "block0", "block1" ] }, > { "name": "

[Qemu-devel] [PATCH] block: Ensure correct order when dropping intermediate images

2015-02-27 Thread Alberto Garcia
s would undo those changes, since [B] would still be connected to [A]. This would result in a situation where the backing image [A] has all its operations unblocked. Signed-off-by: Alberto Garcia --- block.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c i

Re: [Qemu-devel] [PATCH] block: Ensure correct order when dropping intermediate images

2015-02-27 Thread Alberto Garcia
On Fri, Feb 27, 2015 at 11:21:10AM +, Stefan Hajnoczi wrote: > Op blockers are linked to a unique Error object. When B's > backing_hd is set to NULL only B->backing_blocker is unblocked > but new_top_bs->backing_blocker is still in place. This means > operations are still blocked. You're ac

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

2015-02-05 Thread Alberto Garcia
0 again, unused entries will always have priority. Signed-off-by: Alberto Garcia --- 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/block/qcow2

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 actua

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 acc

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 acc

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 mig

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 n

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 re

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 > > +S: Supported > > +F: block/quorum.c > > I'd like to also add the qemu-bl...@nongnu.org mailing list to your > MAINTAINERS stanza beca

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 devic

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

2015-03-19 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 --- block.c | 5 + block/quorum.c| 5 + include/block/block.h | 1 + 3 files changed, 7 insertions(+), 4 deletions

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

2015-03-19 Thread Alberto Garcia
l calls to bdrv_get_device_name() where it makes sense: several error messages and the BLOCK_IMAGE_CORRUPTED event. I wrote this thinking on the case where any arbitrary node will be able to own a block job, but I think it's useful already for the reasons explained above. Berto Alberto Garcia (3

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

2015-03-19 Thread Alberto Garcia
Since this event can occur in nodes that don't have a device name associated, use the node name as fallback in those cases. Signed-off-by: Alberto Garcia --- block/qcow2.c | 5 +++-- docs/qmp/qmp-events.txt | 2 +- qapi/block-core.json| 2 +- 3 files changed, 5 insertions(

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

2015-03-19 Thread Alberto Garcia
ngful message. Signed-off-by: Alberto Garcia --- block.c | 13 +++-- block/qcow.c | 4 ++-- block/qcow2.c | 2 +- block/qed.c | 2 +- block/vdi.c | 2 +- block/vhdx.c | 2 +- block/vmdk.c | 4 ++-- block/vpc.c | 2 +- block/vvfat.c | 3 ++- 9 files changed, 18 inser

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 QM

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.

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 o

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

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 ca

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 th

[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 --- block/qcow2.c | 8 ++-- docs/qmp/qmp-events.txt | 16 +--- qapi/block-core.json| 13 - 3 files

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

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

[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' fi

[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 --- block.c | 9 + block/quorum.c| 5 + include/block/block.h | 1 + 3 files changed, 11 insertions(+), 4

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

2015-03-20 Thread Alberto Garcia
_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 Garcia (3): bloc

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

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

[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 --- block/qcow2.c | 8 ++-- docs/qmp/qmp-events.txt | 16 +--- qapi/block-core.json| 13 - 3 files

[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 --- block.c | 9 + block/quorum.c| 5 + include/block/block.h | 1 + 3 files changed, 11 insertions(+), 4

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

2015-03-23 Thread Alberto Garcia
terministic. > > Signed-off-by: Fam Zheng Reviewed-by: Alberto Garcia Berto

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

2015-03-23 Thread Alberto Garcia
On Mon, Mar 23, 2015 at 10:20:31AM +0100, Markus Armbruster wrote: > > +- "device":Device name (json-string) > > +- "node-name": Node name, if it's present (json-string) > > By convention, we mark optional members like this: > > - "node-name": Node name (json-string, optional) You're right,

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

2015-03-23 Thread Alberto Garcia
: Alberto Garcia --- block.c| 4 +++- block/stream.c | 36 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 737ab68..6d9cfca 100644 --- a/block.c +++ b/block.c @@ -1240,9 +1240,11 @@ void bdrv_set_backing_hd

[Qemu-devel] [PATCH 2/5] block: never cancel a streaming job without running stream_complete()

2015-03-23 Thread Alberto Garcia
rmediate node. Signed-off-by: Alberto Garcia --- block/stream.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/block/stream.c b/block/stream.c index a628901..37bfd8b 100644 --- a/block/stream.c +++ b/block/stream.c @@ -114,21 +114,21 @@ static void coroutine_fn st

[Qemu-devel] [PATCH 1/5] block: allow block jobs in any arbitrary node

2015-03-23 Thread Alberto Garcia
for that job. - When querying the list of existing block jobs, all nodes are searched, not just the ones at the root. Signed-off-by: Alberto Garcia --- block/mirror.c| 5 +++-- blockdev.c| 27 +++ blockjob.c| 17 +---

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

2015-03-23 Thread Alberto Garcia
not just by the ones at the root. query-block-jobs is updated to reflect that change. - The 'device' parameter of all 'block-job-*' commands can now take a node name. - The BlockJobInfo type and all BLOCK_JOB_* events report the node name in the 'device' fiel

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

2015-03-23 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- docs/live-block-ops.txt | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/docs/live-block-ops.txt b/docs/live-block-ops.txt index a257087..5e969fd 100644 --- a/docs/live-block-ops.txt +++ b/docs/live-block

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

2015-03-23 Thread Alberto Garcia
This patch makes the 'device' paramater of the 'block-stream' command allow a node name as well as a device name. In addition to that, operation blockers will be checked in all intermediate nodes between the top and the base node. Signed-off-by: Alberto Garcia --- block

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 thi

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

2015-03-24 Thread Alberto Garcia
On Tue, Mar 24, 2015 at 04:31:45PM +, Stefan Hajnoczi wrote: > > +/* get next bs round in round robin style */ > > +token = throttle_group_next_bs(token); > > +while (token != start && > > + qemu_co_queue_empty(&token->throttled_reqs[is_write])) { > > It's not safe to a

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 bloc

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

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

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

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

2015-03-26 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- 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/throttle.h +++ b

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

2015-03-26 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- 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/qapi.c @@ -91,6

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

2015-03-26 Thread Alberto Garcia
not crash without locking the group. - throttle_group_co_io_limits_intercept() is now marked as a coroutine function. - Documentation updates. Regards, Berto Alberto Garcia (6): throttle: Add throttle group infrastructure throttle: Add throttle group infrastructure tests throttle: Add throttl

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

2015-03-26 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- 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..4f151ec 100644 --- a/tests/test-throttle.c +++ b/tests/test-throttle.c

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

2015-03-26 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- block/Makefile.objs | 1 + block/throttle-groups.c | 254 include/block/block_int.h | 1 + include/block/throttle-groups.h | 39 ++ 4 files changed, 295 insertions(+) create mode 100644

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

2015-03-26 Thread Alberto Garcia
common ThrottleState to have its own timer. Signed-off-by: Benoit Canet Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi --- block.c | 35 include/block/block_int.h | 1 + include/qemu/throttle.h | 38 ++ tests/test-throttle.c

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

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

Re: [Qemu-devel] [PATCH v4 0/7] Block Throttle Group Support

2015-03-26 Thread Alberto Garcia
On Thu, Mar 26, 2015 at 07:24:54PM +0200, Alberto Garcia wrote: > - The creation/destruction of ThrottleTimers is now handled internally > when a BlockDriverState is added/removed from a group, since > there's not much point on keeping them separate. This also hides > th

Re: [Qemu-devel] [PATCH v4 0/7] Block Throttle Group Support

2015-03-27 Thread Alberto Garcia
On Fri, Mar 27, 2015 at 09:11:19AM +0800, Fam Zheng wrote: > > Hmm... this actually breaks the new test because now BDS are > > required to have an AioContext attached when they're added to a > > group, which doesn't happen in qtest: > > > > bdrv = bdrv_new(); > > throttle_group_register_

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

2015-03-30 Thread Alberto Garcia
tine function. - 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

  1   2   3   4   5   6   7   8   9   10   >