[Qemu-devel] [PATCH v2] Add interface to traverse the qmp command list by QmpCommand

2013-10-08 Thread Mark Wu
In the original code, qmp_get_command_list is used to construct a list of all commands' name. To get the information of all qga commands, it traverses the name list and search the command info with its name. So it can cause O(n^2) in the number of commands. This patch adds an interface to

[Qemu-devel] [PATCH v4] Extend qemu-ga's 'guest-info' command to expose flag 'success-response'

2013-10-08 Thread Mark Wu
Now we have several qemu-ga commands not returning response on success. It has been documented in qga/qapi-schema.json already. This patch exposes the 'success-response' flag by extending 'guest-info' command. With this change, the clients can handle the command response more flexibly.

Re: [Qemu-devel] [PATCHv3 00/20] block: logical block provisioning enhancements

2013-10-08 Thread Stefan Hajnoczi
On Mon, Oct 7, 2013 at 11:42 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 07/10/2013 10:42, Stefan Hajnoczi ha scritto: Could you make bdrv_co_write_zeroes() always use UNMAP, if possible, and avoid adding the new BDRV_REQ_MAY_UNMAP flag? While reading the first few patches in this series

Re: [Qemu-devel] [PATCH v5 0/4] timers thread-safe stuff

2013-10-08 Thread Stefan Hajnoczi
On Mon, Oct 07, 2013 at 02:24:26PM +0200, Paolo Bonzini wrote: Stefan, will you pick this up next week or shall I? I have patches for thread-safe icount almost ready to post, and I am not sure through whom they are going to go. Please include it in your pull request. Kevin is merging block

Re: [Qemu-devel] [patch 0/2] force -mem-path RAM allocation

2013-10-08 Thread Markus Armbruster
We have -mem-path FILE provide backing storage for guest RAM -mem-prealloc preallocate guest memory (use with -mem-path) PATCH 2/2 adds -mem-path-forcefail if unable to allocate RAM as specified by -mem-path Looks like it's time to consolidate the options related to guest

Re: [Qemu-devel] [PATCHv3 00/20] block: logical block provisioning enhancements

2013-10-08 Thread Peter Lieven
On 08.10.2013 09:02, Stefan Hajnoczi wrote: On Mon, Oct 7, 2013 at 11:42 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 07/10/2013 10:42, Stefan Hajnoczi ha scritto: Could you make bdrv_co_write_zeroes() always use UNMAP, if possible, and avoid adding the new BDRV_REQ_MAY_UNMAP flag? While

Re: [Qemu-devel] [patch 0/2] force -mem-path RAM allocation

2013-10-08 Thread Paolo Bonzini
Il 08/10/2013 09:32, Markus Armbruster ha scritto: We have -mem-path FILE provide backing storage for guest RAM -mem-prealloc preallocate guest memory (use with -mem-path) PATCH 2/2 adds -mem-path-forcefail if unable to allocate RAM as specified by -mem-path

Re: [Qemu-devel] [patch 1/2] qemu: mempath: prefault pages manually

2013-10-08 Thread Paolo Bonzini
Il 08/10/2013 02:41, Marcelo Tosatti ha scritto: +/* unblock SIGBUS */ +pthread_sigmask(SIG_BLOCK, NULL, oldset); +sigemptyset(set); +sigaddset(set, SIGBUS); +pthread_sigmask(SIG_UNBLOCK, set, NULL); Please instead modify qemu-thread-posix.c to unblock

Re: [Qemu-devel] [PATCH v4 2/7] qmp: add internal sync mode common to mirror_start

2013-10-08 Thread Fam Zheng
On Mon, 09/30 08:49, Eric Blake wrote: On 09/30/2013 06:02 AM, Fam Zheng wrote: This adds a new sync mode common which only copies data that is above the common ancestor of source and target. In general, this could be useful in cases like: base_bs --- common_ancestor --- foo ---

Re: [Qemu-devel] [PATCH v4 4/7] mirror: Add commit_job_type to perform commit with mirror code

2013-10-08 Thread Fam Zheng
On Tue, 10/01 11:13, Eric Blake wrote: On 09/30/2013 06:02 AM, Fam Zheng wrote: Commit active layer will be implemented in block/mirror.c, prepare a new job type to let it have a right type name for the user. Signed-off-by: Fam Zheng f...@redhat.com --- block/mirror.c|

Re: [Qemu-devel] [PATCH qom-next 0/2] qdev-monitor: Reference counting follow-ups

2013-10-08 Thread Igor Mammedov
On Mon, 7 Oct 2013 18:43:59 +0200 Andreas Färber afaer...@suse.de wrote: Hello, I have queued bug fixes by Igor and Stefan for device_add on qom-next and am rearranging the following changes of mine on top. 1) Further naming cleanups, now rebased on the bugfixes for easier backporting.

[Qemu-devel] savevm/loadvm

2013-10-08 Thread Alexey Kardashevskiy
Hi! I need the community help with savevm/loadvm. I run QEMU like this: ./qemu-system-ppc64 \ -drive file=virtimg/fc19_16GB.qcow2 \ -nodefaults \ -m 2048 \ -machine pseries \ -nographic \ -vga none \ -enable-kvm The disk image is an 16GB qcow2 image. Now I start the guest and do

[Qemu-devel] [PATCH] scsi: Allocate SCSITargetReq r-buf dynamically

2013-10-08 Thread Asias He
r-buf is hardcoded to 2056 which is (256 + 1) * 8, allowing 256 luns at most. If more than 256 luns are specified by user, we have buffer overflow in scsi_target_emulate_report_luns. To fix, we allocate the buffer dynamically. Signed-off-by: Asias He as...@redhat.com --- hw/scsi/scsi-bus.c

[Qemu-devel] [PATCH 2/8] timers: add timer_mod_anticipate and timer_mod_anticipate_ns

2013-10-08 Thread Paolo Bonzini
These let a user anticipate the deadline of a timer, atomically with other sites that call the function. This helps avoiding complicated lock hierarchies. It is useful whenever the timer does work based on the current value of the clock (rather than doing something periodically on every tick).

[Qemu-devel] [PATCH 0/8] Make icount thread-safe

2013-10-08 Thread Paolo Bonzini
This series moves the icount state under the same seqlock as the normal vm_clock implementation. It is not yet 100% thread-safe, because the CPU list should be moved under RCU protection (due to the call to !all_cpu_threads_idle() in qemu_clock_warp). However it is a substantial step forward,

[Qemu-devel] [PATCH 4/8] timers: reorganize icount_warp_rt

2013-10-08 Thread Paolo Bonzini
To prepare for future code changes, move the increment of qemu_icount_bias outside the if statement. Also, hoist outside the if the check for timers that expired due to the warping. The check is redundant when !runstate_is_running(), but doing it this way helps because the code that increments

[Qemu-devel] [PATCH 1/8] timers: extract timer_mod_ns_locked and timerlist_rearm

2013-10-08 Thread Paolo Bonzini
These will be reused in timer_mod_anticipate functions. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-timer.c | 51 --- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 6b62e88..95fc6eb

[Qemu-devel] [PATCH 3/8] timers: use cpu_get_icount() directly

2013-10-08 Thread Paolo Bonzini
This will help later when we will have to place these calls in a critical section, and thus call a version of cpu_get_icount() that does not take the lock. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH 8/8] timers: make icount thread-safe

2013-10-08 Thread Paolo Bonzini
This lets threads other than the I/O thread use vm_clock even in -icount mode. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c | 42 ++ 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/cpus.c b/cpus.c index bc675a4..1e5cba4 100644

[Qemu-devel] [PATCH 5/8] timers: prepare the code for future races in calling qemu_clock_warp

2013-10-08 Thread Paolo Bonzini
Computing the deadline of all vm_clocks is somewhat expensive and calls out to qemu-timer.c; two reasons not to do it in the seqlock's write-side critical section. This however opens the door for races in setting and reading vm_clock_warp_start. To plug them, we need to cover the case where a

[Qemu-devel] [PATCH 6/8] timers: introduce cpu_get_clock_locked

2013-10-08 Thread Paolo Bonzini
This fixes a deadlock in cpu_disable_ticks. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- Should be squashed in Ping Fan's patches. cpus.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/cpus.c b/cpus.c index 08eaf23..01acce2 100644 ---

[Qemu-devel] [PATCH 7/8] timers: document (future) locking rules for icount

2013-10-08 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cpus.c b/cpus.c index 01acce2..bc675a4 100644 --- a/cpus.c +++ b/cpus.c @@ -98,17 +98,22 @@ static bool all_cpu_threads_idle(void)

Re: [Qemu-devel] [PATCHv3 00/20] block: logical block provisioning enhancements

2013-10-08 Thread Stefan Hajnoczi
On Tue, Oct 8, 2013 at 10:01 AM, Peter Lieven p...@kamp.de wrote: On 08.10.2013 09:02, Stefan Hajnoczi wrote: On Mon, Oct 7, 2013 at 11:42 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 07/10/2013 10:42, Stefan Hajnoczi ha scritto: Could you make bdrv_co_write_zeroes() always use UNMAP,

Re: [Qemu-devel] savevm/loadvm

2013-10-08 Thread Paolo Bonzini
Il 08/10/2013 10:40, Alexey Kardashevskiy ha scritto: However qcow2_save_vmstate() sets bs-growable to 1 for a short time (commit 178e08a58f40dd5aef2ce774fe0850f5d0e56918 from 2009) and this triggers a branch in bdrv_co_do_writev() which changes bs-total_sectors. So when QEMU writes snapshots

Re: [Qemu-devel] [PATCH 1/8] timers: extract timer_mod_ns_locked and timerlist_rearm

2013-10-08 Thread Alex Bligh
On 8 Oct 2013, at 09:47, Paolo Bonzini wrote: These will be reused in timer_mod_anticipate functions. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Alex Bligh a...@alex.org.uk --- qemu-timer.c | 51 --- 1 file changed, 32

Re: [Qemu-devel] KVM Guest keymap issue

2013-10-08 Thread Matej Mailing
Hi, the strange thing is that all other keys and combinations work except those ccaron, Ccaron, scaron and Scaron, zcaron and ZCaron don't. In our language there are many words containing those chars and I really need to have them working. When looking at the sl keymap file, those codes, even

Re: [Qemu-devel] [PATCHv3 00/20] block: logical block provisioning enhancements

2013-10-08 Thread Peter Lieven
On 08.10.2013 10:59, Stefan Hajnoczi wrote: On Tue, Oct 8, 2013 at 10:01 AM, Peter Lieven p...@kamp.de wrote: On 08.10.2013 09:02, Stefan Hajnoczi wrote: On Mon, Oct 7, 2013 at 11:42 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 07/10/2013 10:42, Stefan Hajnoczi ha scritto: Could you make

Re: [Qemu-devel] [PATCH 2/8] timers: add timer_mod_anticipate and timer_mod_anticipate_ns

2013-10-08 Thread Alex Bligh
Paolo, On 8 Oct 2013, at 09:47, Paolo Bonzini wrote: --- a/qemu-timer.c +++ b/qemu-timer.c @@ -393,11 +393,40 @@ void timer_mod_ns(QEMUTimer *ts, int64_t expire_time) } } +/* modify the current timer so that it will be fired when current_time + = expire_time or the current

Re: [Qemu-devel] savevm/loadvm

2013-10-08 Thread Kevin Wolf
Am 08.10.2013 um 11:04 hat Paolo Bonzini geschrieben: Il 08/10/2013 10:40, Alexey Kardashevskiy ha scritto: However qcow2_save_vmstate() sets bs-growable to 1 for a short time (commit 178e08a58f40dd5aef2ce774fe0850f5d0e56918 from 2009) and this triggers a branch in bdrv_co_do_writev() which

Re: [Qemu-devel] [PATCH 2/8] timers: add timer_mod_anticipate and timer_mod_anticipate_ns

2013-10-08 Thread Paolo Bonzini
Il 08/10/2013 11:15, Alex Bligh ha scritto: So if we want to alter it ... +if (ts-expire_time != -1) { +timer_del_locked(timer_list, ts); +} What's this bit for? Surely you've calculated whether you are shortening the expiry time (above), so all you need do

Re: [Qemu-devel] [PATCHv3 00/20] block: logical block provisioning enhancements

2013-10-08 Thread Stefan Hajnoczi
On Tue, Oct 8, 2013 at 11:12 AM, Peter Lieven p...@kamp.de wrote: On 08.10.2013 10:59, Stefan Hajnoczi wrote: On Tue, Oct 8, 2013 at 10:01 AM, Peter Lieven p...@kamp.de wrote: On 08.10.2013 09:02, Stefan Hajnoczi wrote: On Mon, Oct 7, 2013 at 11:42 AM, Paolo Bonzini pbonz...@redhat.com

[Qemu-devel] [PATCH 0/3] qapi: introduce BlockJobType enum

2013-10-08 Thread Fam Zheng
Currently, block job type is hard coded string and could be repeated in different places in the code base. Introduce a enum type in QAPI to make it better for maintenance and introspection. The old BlockJobType struct is renamed to BlockJobDriver and its field job_type becomes a BlockJobType enum.

[Qemu-devel] [PATCH 1/3] blockjob: rename BlockJobType to BlockJobDriver

2013-10-08 Thread Fam Zheng
We will use BlockJobType as the enum type name of block jobs in QAPI, rename current BlockJobType to BlockJobDriver, which will eventually become a set of operations, similar to block drivers. Signed-off-by: Fam Zheng f...@redhat.com --- block/backup.c | 4 ++-- block/commit.c

[Qemu-devel] [PATCH 2/3] qapi: Introduce enum BlockJobType

2013-10-08 Thread Fam Zheng
This will replace the open coded block job type string for mirror, commit and backup. Signed-off-by: Fam Zheng f...@redhat.com --- qapi-schema.json | 18 ++ 1 file changed, 18 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index 145eca8..381ffbf 100644 ---

[Qemu-devel] [PATCH 3/3] qapi: make use of new BlockJobType

2013-10-08 Thread Fam Zheng
Switch the string to enum type BlockJobType in BlockJobDriver. Signed-off-by: Fam Zheng f...@redhat.com --- block/backup.c | 2 +- block/commit.c | 2 +- block/mirror.c | 2 +- block/stream.c | 2 +- blockjob.c | 4 ++--

Re: [Qemu-devel] [PATCH v4 6/7] commit: remove unused check

2013-10-08 Thread Fam Zheng
On Mon, 09/30 14:17, Paolo Bonzini wrote: Il 30/09/2013 14:02, Fam Zheng ha scritto: We support top == active for commit now, remove the check which is dead code now. Signed-off-by: Fam Zheng f...@redhat.com --- block/commit.c | 7 --- 1 file changed, 7 deletions(-) diff

Re: [Qemu-devel] savevm/loadvm

2013-10-08 Thread Paolo Bonzini
Il 08/10/2013 11:23, Kevin Wolf ha scritto: I think you need to modify qcow2_save_vmstate to save and restore bs-total_sectors. Can you test that and if so post the patch? It's a regression introduced by commit df2a6f29, right? Yes, that's what introduced the if. What you suggest probably

Re: [Qemu-devel] BUG: RTC issue when Windows guest is idle

2013-10-08 Thread Xiexiangyou
Hi: I have met the same bug that windows2008 guest stop receive the RTC ticks when it in idle status by fortuitous. When vnc connect, guest will resume to receive RTC ticks and the time run fast because of the coalesced timer HPET is diabled, and RTC is set catchup, as following:

Re: [Qemu-devel] [PATCH v2 14/17] qemu-iotests: Check autodel behaviour for device_del

2013-10-08 Thread Kevin Wolf
Am 01.10.2013 um 19:06 hat Eric Blake geschrieben: On 10/01/2013 07:20 AM, Kevin Wolf wrote: Block devices creates with -drive and drive_add should automatically disappear if the guest device is unplugged. blockdev-add ones shouldn't. Signed-off-by: Kevin Wolf kw...@redhat.com

Re: [Qemu-devel] [RFC] qapi/error: Optional error propagation backtrace

2013-10-08 Thread Max Reitz
On 2013-09-09 15:53, Max Reitz wrote: Add a configure switch which enables an error propagation backtrace. This results in the error_set function prepending every message by the source file name, function and line in which it was called, as well as error_propagate appending this information to

[Qemu-devel] [PATCH] osdep: initialize glib threads in all QEMU tools

2013-10-08 Thread Stefan Hajnoczi
glib versions prior to 2.31.0 require an explicit g_thread_init() call to enable multi-threading. Failure to initialize threading causes glib to take single-threaded code paths without synchronization. For example, the g_slice allocator will crash due to race conditions. Fix this for all QEMU

[Qemu-devel] [Bug 1233225] Re: mips/mipsel linux user float division problem

2013-10-08 Thread Petar Jovanovic
This is a known issue. There was a fix proposal by Thomas Schwinge back in June http://patchwork.ozlabs.org/patch/250161/ but he has not updated the patch per suggestion ever since, though the patch as is was much closer to correct behaviour than what it is now in the source. If anyone is in

Re: [Qemu-devel] [PATCH v2 2/2] KVM: s390: add floating irq controller

2013-10-08 Thread Jens Freimann
On Sat, Oct 05, 2013 at 01:53:33AM +0200, Alexander Graf wrote: On 06.09.2013, at 14:19, Jens Freimann wrote: [snip] -int kvm_s390_inject_vm(struct kvm *kvm, - struct kvm_s390_interrupt *s390int) +static void __inject_vm(struct kvm *kvm, struct kvm_s390_interrupt_info

Re: [Qemu-devel] [PATCHv5] block/get_block_status: avoid redundant callouts on raw devices

2013-10-08 Thread Stefan Hajnoczi
On Mon, Oct 7, 2013 at 10:25 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 07/10/2013 07:59, Peter Lieven ha scritto: if a raw device like an iscsi target or host device is used the current implementation makes a second call out to get the block status of bs-file. Signed-off-by: Peter

[Qemu-devel] centos5 32bit and debian6 32bit problem with virtio-serial (guest-agent)

2013-10-08 Thread Hamed Afshar
Hi, I've enabled qemu-guest-agent for a VM. When the guest is centos6, I can properly find /dev/virtio-ports/org.qemu.guest_agent.0. But when the guest is either centos5 32bit or debian6 32bit (these are the OSes I've checked so far), I cannot find the device in /dev. The command 'lspci'

[Qemu-devel] [PATCHv4 03/17] block: introduce BDRV_REQ_MAY_UNMAP request flag

2013-10-08 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block-migration.c |3 ++- block.c |4 block/backup.c|2 +- include/block/block.h |7 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCHv4 05/17] block/raw: add bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes

2013-10-08 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block/raw_bsd.c | 56 +-- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index d5ab295..8dc7bba 100644

[Qemu-devel] [PATCHv4 01/17] block: make BdrvRequestFlags public

2013-10-08 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block.c |5 - include/block/block.h |5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index 93e113a..08cba1e 100644 --- a/block.c +++ b/block.c

[Qemu-devel] [PATCHv4 06/17] block: add BlockLimits structure to BlockDriverState

2013-10-08 Thread Peter Lieven
this patch adds BlockLimits which introduces discard and write_zeroes limits and alignment information to the BlockDriverState. Signed-off-by: Peter Lieven p...@kamp.de --- include/block/block_int.h | 17 + 1 file changed, 17 insertions(+) diff --git

[Qemu-devel] [PATCHv4 14/17] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-10-08 Thread Peter Lieven
this patch does 2 things: a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. b) use the newly introduced bdrv_has_discard_zeroes() to return the zero state of an unallocated block. the used callout to bdrv_has_zero_init() is only valid right after bdrv_create.

[Qemu-devel] [PATCHv4 02/17] block: add flags to bdrv_*_write_zeroes

2013-10-08 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block-migration.c |2 +- block.c | 20 +++- block/backup.c|3 ++- block/qcow2-cluster.c |2 +- block/qcow2.c |2 +-

[Qemu-devel] [PATCHv4 07/17] block: honour BlockLimits in bdrv_co_do_write_zeroes

2013-10-08 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block.c | 65 +++ 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/block.c b/block.c index 6a46bc2..7551751 100644 --- a/block.c +++

[Qemu-devel] [PATCHv4 16/17] qemu-img: conditionally zero out target on convert

2013-10-08 Thread Peter Lieven
If the target has_zero_init = 0, but supports efficiently writing zeroes by unmapping we call bdrv_zeroize to avoid fully allocating the target. This currently is designed especially for iscsi. Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- qemu-img.c |

[Qemu-devel] [PATCHv4 00/17] block: logical block provisioning enhancements

2013-10-08 Thread Peter Lieven
this patch adds the ability for targets to stay sparse during block migration (if the zero_blocks capability is set) and qemu-img convert even if the target does not have has_zero_init = 1. the series was especially developed for iSCSI, but it should also work with other drivers with little or no

[Qemu-devel] [PATCHv4 04/17] block: introduce bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes

2013-10-08 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block.c | 29 + include/block/block.h |2 ++ include/block/block_int.h | 13 + 3 files changed, 44 insertions(+) diff --git a/block.c

[Qemu-devel] [PATCHv4 11/17] iscsi: add bdrv_has_discard_zeroes and bdrv_has_discard_write_zeroes

2013-10-08 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/block/iscsi.c b/block/iscsi.c index 8ed2274..f0ac620 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@

[Qemu-devel] [PATCHv4 10/17] iscsi: set limits in BlockDriverState

2013-10-08 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index be70ced..8ed2274 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1367,6 +1367,20 @@

[Qemu-devel] [PATCHv4 08/17] block: honour BlockLimits in bdrv_co_discard

2013-10-08 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 7551751..43d5f46 100644 --- a/block.c +++ b/block.c @@ -4209,6

[Qemu-devel] [PATCHv4 09/17] iscsi: simplify iscsi_co_discard

2013-10-08 Thread Peter Lieven
now that bdrv_co_discard can handle limits we do not need the request split logic here anymore. Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 67 + 1 file changed, 25 insertions(+),

[Qemu-devel] [PATCHv4 12/17] iscsi: add bdrv_co_write_zeroes

2013-10-08 Thread Peter Lieven
Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 59 + 1 file changed, 59 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index f0ac620..16510c2 100644 --- a/block/iscsi.c +++

[Qemu-devel] [PATCHv4 13/17] block: introduce bdrv_make_zero

2013-10-08 Thread Peter Lieven
this patch adds a call to completely zero out a block device. the operation is sped up by checking the block status and only writing zeroes to the device if they currently do not return zeroes. optionally the zero writing can be sped up by setting the flag BDRV_REQ_MAY_UNMAP to emulate the zero

Re: [Qemu-devel] [PATCHv5] block/get_block_status: avoid redundant callouts on raw devices

2013-10-08 Thread Peter Lieven
On 07.10.2013 10:25, Paolo Bonzini wrote: Il 07/10/2013 07:59, Peter Lieven ha scritto: if a raw device like an iscsi target or host device is used the current implementation makes a second call out to get the block status of bs-file. Signed-off-by: Peter Lieven p...@kamp.de --- v5: add a

[Qemu-devel] [PATCH v3 01/17] qapi-types/visit.py: Pass whole expr dict for structs

2013-10-08 Thread Kevin Wolf
Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- scripts/qapi-types.py | 11 --- scripts/qapi-visit.py | 8 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index

[Qemu-devel] [PATCH v3 04/17] blockdev: 'blockdev-add' QMP command

2013-10-08 Thread Kevin Wolf
For examples see the changes to qmp-commands.hx. Signed-off-by: Kevin Wolf kw...@redhat.com --- blockdev.c | 57 ++ qapi-schema.json | 236 +++ qmp-commands.hx | 55 + 3 files changed, 348 insertions(+) diff

[Qemu-devel] [PATCH v3 05/17] blockdev: Separate ID generation from DriveInfo creation

2013-10-08 Thread Kevin Wolf
blockdev-add shouldn't automatically generate IDs, but will keep most of the DriveInfo creation code. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Eric Blake ebl...@redhat.com --- blockdev.c

[Qemu-devel] [PATCH v3 02/17] qapi-types/visit.py: Inheritance for structs

2013-10-08 Thread Kevin Wolf
This introduces a new 'base' key for struct definitions that refers to another struct type. On the JSON level, the fields of the base type are included directly into the same namespace as the fields of the defined type, like with unions. On the C level, a pointer to a struct of the base type is

[Qemu-devel] [PATCH v3 12/17] blockdev: Move virtio-blk device creation to drive_init

2013-10-08 Thread Kevin Wolf
Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- blockdev.c | 54 +++--- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/blockdev.c b/blockdev.c index

[Qemu-devel] [PATCH v3 07/17] blockdev: Move parsing of 'media' option to drive_init

2013-10-08 Thread Kevin Wolf
This moves as much as possible of the processing of the 'media' option to drive_init so that it can only be accessed using legacy functions, but never with anything blockdev-add related. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Benoit Canet ben...@irqsave.net Reviewed-by: Eric

[Qemu-devel] [PATCH v3 09/17] blockdev: Moving parsing of geometry options to drive_init

2013-10-08 Thread Kevin Wolf
This moves all of the geometry options (cyls/heads/secs/trans) to drive_init so that they can only be accessed using legacy functions, but never with anything blockdev-add related. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- blockdev.c | 136

[Qemu-devel] [PATCH v3 15/17] blockdev: Remove 'media' parameter from blockdev_init()

2013-10-08 Thread Kevin Wolf
The remaining users shouldn't be there with blockdev-add and are easy to move to drive_init(). Bonus bug fix: As a side effect, CD-ROM drives can now use block drivers on the read-only whitelist without explicitly specifying read-only=on, even if a format is explicitly specified. Signed-off-by:

[Qemu-devel] [PATCH v3 03/17] blockdev: Introduce DriveInfo.enable_auto_del

2013-10-08 Thread Kevin Wolf
BlockDriverStates shouldn't be affected by an unplugged guest device, except if created with the legacy -drive command line option or the drive_add HMP command. Make the automatic deletion as well as cancelling of jobs conditional on an enable_auto_del boolean that is only set in drive_init().

[Qemu-devel] [PATCH v3 10/17] blockdev: Move parsing of 'boot' option to drive_init

2013-10-08 Thread Kevin Wolf
It's already ignored and only prints a deprecation message. No use in making it available in new interfaces. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- blockdev.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff

[Qemu-devel] [PATCH v3 11/17] blockdev: Move bus/unit/index processing to drive_init

2013-10-08 Thread Kevin Wolf
This requires moving the automatic ID generation at the same time, so let's do that as well. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- blockdev.c | 157

[Qemu-devel] [PATCH v3 06/17] blockdev: Pass QDict to blockdev_init()

2013-10-08 Thread Kevin Wolf
Working on a QDict instead of a QemuOpts that accepts anything is more in line with bdrv_open(). A QDict is what qmp_blockdev_add() already has anyway, so this saves additional conversions. And last, but not least, it allows later patches to easily extract legacy options into a separate, typed

[Qemu-devel] [PATCH v3 17/17] blockdev: blockdev_init() error conversion

2013-10-08 Thread Kevin Wolf
This gives us meaningful error messages for the blockdev-add QMP command. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- blockdev.c | 59 +-- 1 file changed,

[Qemu-devel] [PATCH v3 08/17] blockdev: Move parsing of 'if' option to drive_init

2013-10-08 Thread Kevin Wolf
It's always IF_NONE for blockdev-add. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Benoit Canet ben...@irqsave.net Reviewed-by: Eric Blake ebl...@redhat.com --- blockdev.c | 40 ++-- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git

[Qemu-devel] [PATCHv4 15/17] qemu-img: add support for fully allocated images

2013-10-08 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- qemu-img.c|8 +--- qemu-img.texi |5 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 926f0a0..c6eff15 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -100,8 +100,10 @@ static void

[Qemu-devel] [PATCH v3 13/17] blockdev: Remove IF_* check for read-only blockdev_init

2013-10-08 Thread Kevin Wolf
IF_NONE allows read-only, which makes forbidding it in this place for other types pretty much pointless. Instead, make sure that all devices for which the check would have errored out check in their init function that they don't get a read-only BlockDriverState. This catches even cases where

Re: [Qemu-devel] [PATCH] osdep: initialize glib threads in all QEMU tools

2013-10-08 Thread Kevin Wolf
Am 08.10.2013 um 11:58 hat Stefan Hajnoczi geschrieben: glib versions prior to 2.31.0 require an explicit g_thread_init() call to enable multi-threading. Failure to initialize threading causes glib to take single-threaded code paths without synchronization. For example, the g_slice

[Qemu-devel] [PATCH v3 14/17] qemu-iotests: Check autodel behaviour for device_del

2013-10-08 Thread Kevin Wolf
Block devices creates with -drive and drive_add should automatically disappear if the guest device is unplugged. blockdev-add ones shouldn't. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com --- tests/qemu-iotests/064

[Qemu-devel] [PATCH v3 16/17] blockdev: Don't disable COR automatically with blockdev-add

2013-10-08 Thread Kevin Wolf
If a read-only device is configured with copy-on-read=on, the old code only prints a warning and automatically disables copy on read. Make it a real error for blockdev-add. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com Reviewed-by: Eric Blake

Re: [Qemu-devel] [PATCH] block/iscsi: introduce bdrv_co_{readv, writev, flush_to_disk}

2013-10-08 Thread Kevin Wolf
Am 02.10.2013 um 17:46 hat Paolo Bonzini geschrieben: Il 02/10/2013 17:41, Peter Lieven ha scritto: this converts read, write and flush functions from aio to coroutines. I'm not sure it's already the time for this... Cancellation sucks in QEMU, and this is going to make things even worse.

Re: [Qemu-devel] [PATCH] block/iscsi: introduce bdrv_co_{readv, writev, flush_to_disk}

2013-10-08 Thread Paolo Bonzini
Il 08/10/2013 14:33, Kevin Wolf ha scritto: this converts read, write and flush functions from aio to coroutines. I'm not sure it's already the time for this... Cancellation sucks in QEMU, and this is going to make things even worse. Not sure what you're referring to. If you mean

Re: [Qemu-devel] [PATCHv5] block/get_block_status: avoid redundant callouts on raw devices

2013-10-08 Thread Paolo Bonzini
Il 08/10/2013 14:05, Peter Lieven ha scritto: Strictly speaking, this should probably do something like this: assert(ret BDRV_BLOCK_OFFSET_VALID); return bdrv_get_block_status(bs-file, ret BDRV_SECTOR_BITS, nb_sectors, pnum); shouldn't the last line

Re: [Qemu-devel] [PATCH] qemu-iotests: Correct 026 output

2013-10-08 Thread Kevin Wolf
Am 02.10.2013 um 16:45 hat Max Reitz geschrieben: Because l2_allocate now frees the unused L2 cluster on error, the according test cases in 026 don't result in one leaked cluster anymore. Signed-off-by: Max Reitz mre...@redhat.com --- This patch depends on and is a follow-up to qcow2: Free

Re: [Qemu-devel] [PATCH] block/iscsi: introduce bdrv_co_{readv, writev, flush_to_disk}

2013-10-08 Thread Kevin Wolf
Am 08.10.2013 um 14:35 hat Paolo Bonzini geschrieben: Il 08/10/2013 14:33, Kevin Wolf ha scritto: this converts read, write and flush functions from aio to coroutines. I'm not sure it's already the time for this... Cancellation sucks in QEMU, and this is going to make things even

[Qemu-devel] [PATCHv6] block/get_block_status: avoid redundant callouts on raw devices

2013-10-08 Thread Peter Lieven
if a raw device like an iscsi target or host device is used the current implementation makes a second call out to get the block status of bs-file. Signed-off-by: Peter Lieven p...@kamp.de --- v6: made the result of raw_co_get_block_status valid by adding BDRV_BLOCK_DATA and setting *pnum to

[Qemu-devel] [PATCHv4 17/17] block/raw: copy BlockLimits on raw_open

2013-10-08 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/raw_bsd.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index 8dc7bba..2c26b79 100644 --- a/block/raw_bsd.c +++ b/block/raw_bsd.c @@ -159,6 +159,7 @@ static int raw_open(BlockDriverState *bs, QDict

Re: [Qemu-devel] [PATCH 0/3] qapi: introduce BlockJobType enum

2013-10-08 Thread Kevin Wolf
Am 08.10.2013 um 11:29 hat Fam Zheng geschrieben: Currently, block job type is hard coded string and could be repeated in different places in the code base. Introduce a enum type in QAPI to make it better for maintenance and introspection. The old BlockJobType struct is renamed to

Re: [Qemu-devel] [Xen-devel] Hvmloader: Add _STA for PCI hotplug slots

2013-10-08 Thread Fabio Fantoni
Il 29/09/2013 02:30, Gonglei (Arei) ha scritto: -Original Message- From: Konrad Rzeszutek Wilk [mailto:konrad.w...@oracle.com] Sent: Saturday, September 28, 2013 5:43 AM To: Gonglei (Arei); anthony.per...@citrix.com; Stefano Stabellini Cc: xen-de...@lists.xen.org; Hanweidong (Randy);

Re: [Qemu-devel] [PATCH 3/3] qapi: make use of new BlockJobType

2013-10-08 Thread Eric Blake
On 10/08/2013 03:29 AM, Fam Zheng wrote: Switch the string to enum type BlockJobType in BlockJobDriver. Signed-off-by: Fam Zheng f...@redhat.com --- +++ b/include/block/blockjob.h @@ -37,7 +37,7 @@ typedef struct BlockJobDriver { size_t instance_size; /** String describing

Re: [Qemu-devel] [PATCH] osdep: initialize glib threads in all QEMU tools

2013-10-08 Thread Paolo Bonzini
Il 08/10/2013 14:25, Kevin Wolf ha scritto: The glib documentation says: Since version 2.24, calling g_thread_init() multiple times is allowed, but nothing happens except for the first call. I take that this means previously it wasn't allowed. qemu's configure checks for a minimum

Re: [Qemu-devel] [PATCH v4] Extend qemu-ga's 'guest-info' command to expose flag 'success-response'

2013-10-08 Thread Eric Blake
On 10/08/2013 12:23 AM, Mark Wu wrote: Now we have several qemu-ga commands not returning response on success. It has been documented in qga/qapi-schema.json already. This patch exposes the 'success-response' flag by extending 'guest-info' command. With this change, the clients can handle the

Re: [Qemu-devel] [PATCH v2] Add interface to traverse the qmp command list by QmpCommand

2013-10-08 Thread Eric Blake
On 10/08/2013 12:23 AM, Mark Wu wrote: In the original code, qmp_get_command_list is used to construct a list of all commands' name. To get the information of all qga commands, it traverses the name list and search the command info with its name. So it can cause O(n^2) in the number of

Re: [Qemu-devel] [PATCH 0/8] Make icount thread-safe

2013-10-08 Thread Andreas Färber
Am 08.10.2013 10:47, schrieb Paolo Bonzini: This series moves the icount state under the same seqlock as the normal vm_clock implementation. It is not yet 100% thread-safe, because the CPU list should be moved under RCU protection (due to the call to !all_cpu_threads_idle() in

Re: [Qemu-devel] [PATCH v5 0/3] pci: partially implement master abort protocol

2013-10-08 Thread Michael S. Tsirkin
On Mon, Sep 16, 2013 at 11:21:13AM +0300, Marcel Apfelbaum wrote: PCI spec requires that a transaction that has not been claimed by any PCI bus devices will be terminated by the initiator with master abort. For read transactions -1() is returned and writes are silently dropped. OK

Re: [Qemu-devel] [PATCH 0/8] Make icount thread-safe

2013-10-08 Thread Paolo Bonzini
Il 08/10/2013 15:47, Andreas Färber ha scritto: Am 08.10.2013 10:47, schrieb Paolo Bonzini: This series moves the icount state under the same seqlock as the normal vm_clock implementation. It is not yet 100% thread-safe, because the CPU list should be moved under RCU protection (due to the

Re: [Qemu-devel] [PATCH v7 4/6] qcow2: Add support for ImageInfoSpecific

2013-10-08 Thread Kevin Wolf
Am 02.10.2013 um 10:39 hat Max Reitz geschrieben: Add a new ImageInfoSpecificQCow2 type as a subtype of ImageInfoSpecific. This contains the compatibility level as a string and an optional lazy_refcounts boolean (optional means mandatory for compat = 1.1 and not available for compat == 0.10).

Re: [Qemu-devel] [PATCH] osdep: initialize glib threads in all QEMU tools

2013-10-08 Thread Kevin Wolf
Am 08.10.2013 um 15:08 hat Paolo Bonzini geschrieben: Il 08/10/2013 14:25, Kevin Wolf ha scritto: The glib documentation says: Since version 2.24, calling g_thread_init() multiple times is allowed, but nothing happens except for the first call. I take that this means

[Qemu-devel] Current qemu-master hangs when used with qxl + linux guest

2013-10-08 Thread Hans de Goede
Hi All, I'm having this weird problem with qemu master + spice/qxl using guests. As soon as the guest starts Xorg, I get the following message from qemu: main-loop: WARNING: I/O thread spun for 1000 iterations And from then on the guest hangs and qemu consumes 100% cpu. The qemu console still

  1   2   3   >