Re: [Qemu-devel] winXP "Standard PC" HAL and qemu-kvm >= 0.15

2011-12-06 Thread Michael Tokarev
On 07.12.2011 01:12, Jan Kiszka wrote: > On 2011-12-06 21:58, Jan Kiszka wrote: [] >> How embarrassing. Messed something up, maybe during rebase, and forgot >> to retest non-irqchip mode. Will fix and repost. > > Was even worse, a simple -ENOTTESTED case. Pushed an update at the same > location.

Re: [Qemu-devel] [PATCH v4 2/3] Extract code to nbd_setup function to be used for many purposes

2011-12-06 Thread Chunyan Liu
Add -f option to qemu-nbd. New implementation. Do not need nbd_setup. Tested and worked. Signed-off-by: Chunyan Liu --- qemu-nbd.c | 71 +-- 1 files changed, 49 insertions(+), 22 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 29

[Qemu-devel] [PATCH 2/2] guest agent: add supported command list to guest-info RPC

2011-12-06 Thread Michael Roth
Not that there is blacklisting functionality we can no longer infer the agent's capabilities via version. This patch extends the current guest-info RPC to also return a list of dictionaries containing the name of each supported RPC, along with a boolean indicating whether or not the command has bee

[Qemu-devel] [PATCH 1/2] guest agent: add RPC blacklist command-line option

2011-12-06 Thread Michael Roth
This adds a command-line option, -b/--blacklist, that accepts a comma-seperated list of RPCs to disable, or prints a list of available RPCs if passed "?". In consequence this also adds general blacklisting and RPC listing facilities to the new QMP dispatch/registry facilities, should the QMP monit

[Qemu-devel] [PATCH] rbd: always set out parameter in qemu_rbd_snap_list

2011-12-06 Thread Josh Durgin
The caller expects psn_tab to be NULL when there are no snapshots or an error occurs. This results in calling g_free on an invalid address. Reported-by: Oliver Francke Signed-off-by: Josh Durgin --- block/rbd.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/block/rbd

[Qemu-devel] x86 mmu emulation in qemu

2011-12-06 Thread Xin Tong
I am looking at how INVLPGA is emulated in target-i386. it calls gen_helper_invlpga. tracing down where gen_helper_invlpga is, I found that it calls helper_invlpg which calls tlb_flush_page. This tlb_flush_page flushes the env->INVLPGA, I think this tlb is the x86 tlb. also qemu has another tlb w

Re: [Qemu-devel] [PATCH v2 0/5] backdoor: lightweight guest-to-QEMU backdoor channel

2011-12-06 Thread Anthony Liguori
On 12/05/2011 04:22 PM, Lluís Vilanova wrote: Provides the ability for the guest to communicate with user-provided code inside QEMU itself, using a lightweight mechanism. See first commit for a full description. Signed-off-by: Lluís Vilanova This whole series: Nacked-by: Anthony Liguori If

Re: [Qemu-devel] [PATCH v2 1/5] backdoor: Add documentation

2011-12-06 Thread Anthony Liguori
On 12/06/2011 04:36 PM, Peter Maydell wrote: 2011/12/5 Lluís Vilanova: +3. Build QEMU with the backdoor feature: + +/path/to/qemu/configure --with-backdoor=/tmp/my-backdoor-qemu If we want to do this wouldn't it make more sense to do it by having qemu dynamically load a plugin DLL with a s

Re: [Qemu-devel] [PATCH v2 1/5] backdoor: Add documentation

2011-12-06 Thread Anthony Liguori
On 12/05/2011 04:22 PM, Lluís Vilanova wrote: Signed-off-by: Lluís Vilanova --- docs/backdoor.txt | 167 + 1 files changed, 167 insertions(+), 0 deletions(-) create mode 100644 docs/backdoor.txt diff --git a/docs/backdoor.txt b/docs/backd

Re: [Qemu-devel] [PATCH v2 4/5] backdoor: [softmmu] Add QEMU-side proxy to "libbackdoor.a"

2011-12-06 Thread Lluís Vilanova
Lluís Vilanova writes: > Anthony Liguori writes: >> I really worry about us introducing so many of these one-off paravirtual >> devices. >> I would much prefer that you look at doing this as an extension to the >> ivshmem >> device as it already has this sort of scope. You should be able to do

Re: [Qemu-devel] [PATCH v2 4/5] backdoor: [softmmu] Add QEMU-side proxy to "libbackdoor.a"

2011-12-06 Thread Peter Maydell
2011/12/6 Anthony Liguori : > It's bad enough we already have two "backdoor" mechanisms, adding a third > seems insane to me. Isn't there yet another one out-of-tree in the android emulator? -- PMM

Re: [Qemu-devel] [PATCH v2 1/5] backdoor: Add documentation

2011-12-06 Thread Peter Maydell
2011/12/5 Lluís Vilanova : > +3. Build QEMU with the backdoor feature: > + > +    /path/to/qemu/configure --with-backdoor=/tmp/my-backdoor-qemu If we want to do this wouldn't it make more sense to do it by having qemu dynamically load a plugin DLL with a specified ABI rather than having to compile

Re: [Qemu-devel] [PATCH v2 4/5] backdoor: [softmmu] Add QEMU-side proxy to "libbackdoor.a"

2011-12-06 Thread Anthony Liguori
On 12/06/2011 04:30 PM, Lluís Vilanova wrote: Anthony Liguori writes: I really worry about us introducing so many of these one-off paravirtual devices. I would much prefer that you look at doing this as an extension to the ivshmem device as it already has this sort of scope. You should be abl

Re: [Qemu-devel] [PATCH v2 4/5] backdoor: [softmmu] Add QEMU-side proxy to "libbackdoor.a"

2011-12-06 Thread Lluís Vilanova
Anthony Liguori writes: > I really worry about us introducing so many of these one-off paravirtual > devices. > I would much prefer that you look at doing this as an extension to the ivshmem > device as it already has this sort of scope. You should be able to do this by > just extending the size

Re: [Qemu-devel] winXP "Standard PC" HAL and qemu-kvm >= 0.15

2011-12-06 Thread Jan Kiszka
On 2011-12-06 21:58, Jan Kiszka wrote: > On 2011-12-06 20:38, Michael Tokarev wrote: >> [Removed some people from the Cc list] >> >> On 06.12.2011 22:45, Michael Tokarev wrote: >> [] git://git.kiszka.org/qemu-kvm.git queues/kvm-irqchip >>> >>> This tree does not boot for me at all (on regular

Re: [Qemu-devel] winXP "Standard PC" HAL and qemu-kvm >= 0.15

2011-12-06 Thread Jan Kiszka
On 2011-12-06 20:38, Michael Tokarev wrote: > [Removed some people from the Cc list] > > On 06.12.2011 22:45, Michael Tokarev wrote: > [] >>> git://git.kiszka.org/qemu-kvm.git queues/kvm-irqchip >> >> This tree does not boot for me at all (on regular x86-64 setup) - >> it stays in bios after "Boot

Re: [Qemu-devel] [PATCH v2 4/5] backdoor: [softmmu] Add QEMU-side proxy to "libbackdoor.a"

2011-12-06 Thread Anthony Liguori
I really worry about us introducing so many of these one-off paravirtual devices. I would much prefer that you look at doing this as an extension to the ivshmem device as it already has this sort of scope. You should be able to do this by just extending the size of bar 1 and using a well know

Re: [Qemu-devel] [PATCH v3 0/6] Remove libqemu related stuff from QEMU source tree

2011-12-06 Thread Stuart Brady
On Tue, Nov 15, 2011 at 08:47:06PM +0800, Chen Wei-Ren (陳韋任) wrote: > From: Chen Wei-Ren > > According to [1], libqemu is not available anymore. Remove libqemu > related stuff from QEMU source tree. > > [1] http://www.mail-archive.com/address@hidden/msg49809.html Since I've just gone looking

[Qemu-devel] [PATCH 02/22] qmp: add test tool for QMP

2011-12-06 Thread Luiz Capitulino
From: Mark Wu Anthony wrote this quickly to aid in testing. It's similar to qmp-shell with a few important differences: 1) It is not interactive. That makes it useful for scripting. 2) qmp-shell: (QEMU) set_password protocol=vnc password=foo 3) qmp: $ qmp set_password --protocol=vnc --pass

[Qemu-devel] [PATCH 05/22] Introduce test-qmp-input-visitor

2011-12-06 Thread Luiz Capitulino
Contains unit-tests for the QMP input visitor implementation. Signed-off-by: Luiz Capitulino --- Makefile |5 +- configure|2 +- test-qmp-input-visitor.c | 270 ++ 3 files changed, 275 insertions(+), 2 deletions

[Qemu-devel] [PATCH 08/22] console: Drop unused prototypes

2011-12-06 Thread Luiz Capitulino
Commit e235cec3762d2aa20b548114ea7b172113690463 converted the query-mice command to the QAPI but forgot to remove two prototypes used by the old QAPI. Drop them. Signed-off-by: Luiz Capitulino --- console.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/console.h b/con

[Qemu-devel] [PATCH 06/22] Drop test-visitor

2011-12-06 Thread Luiz Capitulino
It has been superseded by the two previous commits, which introduced the test-qmp-output-visitor and test-qmp-input-visitor tests. Signed-off-by: Luiz Capitulino --- Makefile |5 +- test-visitor.c | 338 2 files changed, 1 inser

Re: [Qemu-devel] winXP "Standard PC" HAL and qemu-kvm >= 0.15

2011-12-06 Thread Michael Tokarev
[Removed some people from the Cc list] On 06.12.2011 22:45, Michael Tokarev wrote: [] >> git://git.kiszka.org/qemu-kvm.git queues/kvm-irqchip > > This tree does not boot for me at all (on regular x86-64 setup) - > it stays in bios after "Booting from hard disk" with 100% CPU > usage. This happen

Re: [Qemu-devel] RFC: raw device support for block device targets

2011-12-06 Thread Alex Bligh
--On 6 December 2011 19:42:26 +0100 Christoph Hellwig wrote: Is it therefore worth skipping the ftruncate() if the block device is large enough, and at least attempting to proceed further? Something like the following (not-even compile tested) patch? It probably should share the code with r

[Qemu-devel] [PULL 00/22]: QMP queue

2011-12-06 Thread Luiz Capitulino
Anthony, This pull request contains my round 3 QAPI conversion patches, the new QMP visitor tests, some documentation and the qmp test tool. The changes (since 217bfb445b54db618a30f3a39170bebd9fd9dbf2) are available in the following repository: git://repo.or.cz/qemu/qmp-unstable.git queue/qm

[Qemu-devel] [PATCH 21/22] qapi: Convert migrate_set_downtime

2011-12-06 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- hmp-commands.hx |3 +-- hmp.c|6 ++ hmp.h|1 + migration.c | 13 - migration.h |3 --- qapi-schema.json | 13 + qmp-commands.hx |5 + 7 files changed, 26 insertions(+), 1

[Qemu-devel] [PATCH 04/22] Introduce test-qmp-output-visitor

2011-12-06 Thread Luiz Capitulino
Contains unit-tests for the QMP output visitor implementation. Signed-off-by: Luiz Capitulino --- Makefile |5 +- configure |2 +- qapi-schema-test.json |6 + test-qmp-output-visitor.c | 423 + 4 files

[Qemu-devel] [PATCH 20/22] qapi: Convert migrate_cancel

2011-12-06 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- hmp-commands.hx |3 +-- hmp.c|5 + hmp.h|1 + migration.c |3 +-- migration.h |2 -- qapi-schema.json | 13 + qmp-commands.hx |5 + 7 files changed, 22 insertions(+), 10 deletions(

[Qemu-devel] [PATCH 17/22] qapi: Convert block_resize

2011-12-06 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- blockdev.c | 18 +++--- blockdev.h |1 - hmp-commands.hx |3 +-- hmp.c| 10 ++ hmp.h|1 + qapi-schema.json | 18 ++ qmp-commands.hx |5 + 7 files changed, 38 inse

[Qemu-devel] [PATCH 11/22] qapi: Convert pmemsave

2011-12-06 Thread Luiz Capitulino
Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- cpus.c | 30 ++ hmp-commands.hx |3 +-- hmp.c| 11 +++ hmp.h|1 + monitor.c| 37 - qapi-schema.json |

[Qemu-devel] [PATCH 10/22] qapi: Convert memsave

2011-12-06 Thread Luiz Capitulino
Please, note that the QMP command has a new 'cpu-index' parameter. Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- cpus.c | 47 +++ hmp-commands.hx |3 +-- hmp.c| 19 +++ hmp.h

[Qemu-devel] [PATCH 07/22] qapi: Complete system_powerdown conversion

2011-12-06 Thread Luiz Capitulino
Commit 5bc465e4b1b6f4582a400c0a7033a1c841744278 converted only the HMP part of the system_powerdown command to the QAPI, this commit completes it by converting the QMP part too. Signed-off-by: Luiz Capitulino --- monitor.c | 10 -- qmp-commands.hx |5 + 2 files changed, 1

[Qemu-devel] [PATCH 03/22] configure: Don't mix glib and libcheck tests

2011-12-06 Thread Luiz Capitulino
test-coroutine is listed as a libcheck test in the 'checks' variable. This is not right because 'make check' won't run test-coroutine if libcheck tests are not enabled (either because libcheck isn't detected or because --disable-check-utests is passed). Tests using the glib test framework are inde

[Qemu-devel] [PATCH 16/22] qapi: Convert balloon

2011-12-06 Thread Luiz Capitulino
Note that the command being dropped uses the deprecated MONITOR_CMD_ASYNC API, but the new command is a regular synchronous command. There shouldn't be visible differences though, as MONITOR_CMD_ASYNC is internal only. Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- balloon.c

[Qemu-devel] [PATCH 01/22] docs: Add writing-qmp-commands.txt

2011-12-06 Thread Luiz Capitulino
Explains how to write QMP commands using the QAPI. Signed-off-by: Luiz Capitulino --- docs/writing-qmp-commands.txt | 642 + 1 files changed, 642 insertions(+), 0 deletions(-) create mode 100644 docs/writing-qmp-commands.txt diff --git a/docs/writing-qm

[Qemu-devel] [PATCH 09/22] QError: Introduce QERR_IO_ERROR

2011-12-06 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 656efc2..b544ced 100644 --- a/qerror.c +++ b/qerror.c @@ -149,6 +149,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH 14/22] qapi: Convert set_link

2011-12-06 Thread Luiz Capitulino
Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- hmp-commands.hx |3 +-- hmp.c| 10 ++ hmp.h|1 + net.c| 10 -- net.h|1 - qapi-schema.json | 20 qmp-commands.hx |5 +

[Qemu-devel] [PATCH 12/22] qapi: Convert cont

2011-12-06 Thread Luiz Capitulino
Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- hmp-commands.hx |3 +- hmp.c| 32 +++ hmp.h|1 + monitor.c| 74 +++--- monitor.h|3 ++ qapi-schema.json |

[Qemu-devel] [PATCH 18/22] qapi: Convert blockdev_snapshot_sync

2011-12-06 Thread Luiz Capitulino
Unfortunately, this conversion required an additional change. In the old QMP command, the 'snapshot-file' argument is specified as optional. The idea is to take the snapshot internally if 'snapshot-file' is not passed. However, internal snapshots are not supported yet so the command returns a Miss

[Qemu-devel] [PATCH 13/22] qapi: Convert inject-nmi

2011-12-06 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- cpus.c | 13 + hmp-commands.hx |3 +-- hmp.c|8 hmp.h|1 + monitor.c| 19 --- qapi-schema.json | 13 + qmp-commands.hx |5 + 7 files changed, 3

[Qemu-devel] [PATCH 22/22] qapi: Convert migrate_set_speed

2011-12-06 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- hmp-commands.hx |3 +-- hmp.c|6 ++ hmp.h|1 + migration.c | 12 migration.h |2 -- qapi-schema.json | 15 +++ qmp-commands.hx |5 + 7 files changed, 28 insertions(+), 1

[Qemu-devel] [PATCH 15/22] qapi: Convert block_passwd

2011-12-06 Thread Luiz Capitulino
Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- blockdev.c | 22 ++ blockdev.h |1 - hmp-commands.hx |3 +-- hmp.c| 10 ++ hmp.h|1 + qapi-schema.json | 33 + qmp-

[Qemu-devel] [PATCH 19/22] qapi: Convert human-monitor-command

2011-12-06 Thread Luiz Capitulino
Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- monitor.c| 23 ++- qapi-schema.json | 28 qmp-commands.hx |5 + 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/monitor.c b/monitor.c index 62b

Re: [Qemu-devel] winXP "Standard PC" HAL and qemu-kvm >= 0.15

2011-12-06 Thread Michael Tokarev
On 06.12.2011 22:21, Jan Kiszka wrote: [] >> For the 0.15 .. 1.0 change, the first commit which restores the (broken >> in 0.15) functionality is this one: >> >> commit 86fbf97ceb4a9c46a609dd4ae053ba4262b68fe8 >> Author: Jan Kiszka >> Date: Fri Oct 7 09:19:45 2011 +0200 >> >> i8259: Clear EL

Re: [Qemu-devel] RFC: raw device support for block device targets

2011-12-06 Thread Christoph Hellwig
On Tue, Dec 06, 2011 at 04:20:56PM +, Alex Bligh wrote: > qemu-img convert appears to support block devices as input, but not > as output. That is irritating, as when using qemu-img convert to > convert qcow to raw on a block partition, an intermediate file has > to be used, which slows things

Re: [Qemu-devel] winXP "Standard PC" HAL and qemu-kvm >= 0.15

2011-12-06 Thread Jan Kiszka
On 2011-12-06 19:13, Michael Tokarev wrote: > On 06.12.2011 20:57, Michael Tokarev wrote: >> On 06.12.2011 20:38, Jan Kiszka wrote: >>> On 2011-12-06 17:29, Michael Tokarev wrote: >> [] It appears there are two issues here, one is fixed by 09de0f469c3c2a277c7874f6c60992c8b94719a9 and is 3

Re: [Qemu-devel] winXP "Standard PC" HAL and qemu-kvm >= 0.15

2011-12-06 Thread Michael Tokarev
On 06.12.2011 20:57, Michael Tokarev wrote: > On 06.12.2011 20:38, Jan Kiszka wrote: >> On 2011-12-06 17:29, Michael Tokarev wrote: > [] >>> It appears there are two issues here, one is fixed by >>> 09de0f469c3c2a277c7874f6c60992c8b94719a9 and is 32bit-only, and >>> another bisect leads to this com

Re: [Qemu-devel] [PATCH 3/4] qemu-thread: implement joinable threads for Win32

2011-12-06 Thread Paolo Bonzini
On 12/06/2011 06:39 PM, Jan Kiszka wrote: > diff --git a/roms/seabios b/roms/seabios > index 8e30147..cc97564 16 > --- a/roms/seabios > +++ b/roms/seabios > @@ -1 +1 @@ > -Subproject commit 8e301472e324b6d6496d8b4ffc66863e99d7a505 > +Subproject commit cc975646af69f279396d4d5e1379ac6af8

Re: [Qemu-devel] winXP "Standard PC" HAL and qemu-kvm >= 0.15

2011-12-06 Thread Jan Kiszka
On 2011-12-06 17:57, Michael Tokarev wrote: > On 06.12.2011 20:38, Jan Kiszka wrote: >> On 2011-12-06 17:29, Michael Tokarev wrote: > [] >>> It appears there are two issues here, one is fixed by >>> 09de0f469c3c2a277c7874f6c60992c8b94719a9 and is 32bit-only, and >>> another bisect leads to this com

Re: [Qemu-devel] [PATCH 1/4] qemu-thread: add API for joinable threads

2011-12-06 Thread Jan Kiszka
On 2011-12-06 18:05, Paolo Bonzini wrote: > From: Jan Kiszka > > Split from Jan's original qemu-thread-posix.c patch. No semantic change, > just introduce the new API that POSIX and Win32 implementations will > conform to. > > Signed-off-by: Jan Kiszka > Signed-off-by: Paolo Bonzini > --- >

Re: [Qemu-devel] [PATCH 3/4] qemu-thread: implement joinable threads for Win32

2011-12-06 Thread Jan Kiszka
On 2011-12-06 18:05, Paolo Bonzini wrote: > Rewrite the handshaking between qemu_thread_create and the > win32_start_routine, so that the thread can be joined without races. > Similar handshaking is done now between qemu_thread_exit and > qemu_thread_join. > > This also simplifies how QemuThreads

Re: [Qemu-devel] [PATCH 2/4] qemu-thread: implement joinable threads for POSIX

2011-12-06 Thread Jan Kiszka
On 2011-12-06 18:05, Paolo Bonzini wrote: > From: Jan Kiszka > > Allow to control if a QEMU thread is created joinable or not. Make it > not joinable by default to avoid that we keep the associated resources > around when terminating a thread without joining it (what we couldn't do > so far for o

Re: [Qemu-devel] [PATCH 0/4] add qemu_thread_join, use it to fix bug in ccid

2011-12-06 Thread Jan Kiszka
On 2011-12-06 18:05, Paolo Bonzini wrote: > Patches introducing qemu_thread_join have floated around multiple times. > Now I found a bug that requires it to be fixed, so perhaps this time > it will be more successful. > > For the actual bug, see patch 4. > > Jan Kiszka (2): > qemu-thread: add A

[Qemu-devel] [PATCH 1/2] ptimer: move declarations to ptimer.h

2011-12-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/arm_timer.c|1 + hw/etraxfs_timer.c|1 + hw/grlib_apbuart.c|1 + hw/grlib_gptimer.c|1 + hw/lan9118.c |1 + hw/leon3.c|1 + hw/lm32_timer.c |1 + hw/mcf5206.c |1 + hw/mcf52

[Qemu-devel] [PATCH 0/2] split hw/hw.h

2011-12-06 Thread Paolo Bonzini
Extract qemu-file.h and vmstate.h from it. Last for this week, promised. Paolo Bonzini (2): ptimer: move declarations to ptimer.h vmstate: extract declarations out of hw/hw.h hw/arm_timer.c|1 + hw/etraxfs_timer.c|1 + hw/grlib_apbuart.c|1 + hw/grlib_gptimer.c

[Qemu-devel] [PATCH] migration: vectorize is_dup_page

2011-12-06 Thread Paolo Bonzini
is_dup_page is already proceeding in 32-bit chunks. Changing it to 16 bytes using Altivec or SSE is easy, and provides a noticeable improvement. Pierre Riteau measured 30->25 seconds on a 16GB guest, I measured 4.6->3.9 seconds on a 6GB guest (best of three times for me; dunno for Pierre). Both of

[Qemu-devel] [PATCH 4/4] ccid: make threads joinable

2011-12-06 Thread Paolo Bonzini
Destroying a mutex that another thread might have just unlocked is racy. It usually works, but you cannot do that in general and can lead to deadlocks or segfaults. Change ccid to use joinable threads instead. (Also, qemu_mutex_init/qemu_cond_init were missing). Signed-off-by: Paolo Bonzini --

[Qemu-devel] [PATCH 2/4] qemu-thread: implement joinable threads for POSIX

2011-12-06 Thread Paolo Bonzini
From: Jan Kiszka Allow to control if a QEMU thread is created joinable or not. Make it not joinable by default to avoid that we keep the associated resources around when terminating a thread without joining it (what we couldn't do so far for obvious reasons). The audio subsystem will need the jo

[Qemu-devel] [PATCH 1/4] qemu-thread: add API for joinable threads

2011-12-06 Thread Paolo Bonzini
From: Jan Kiszka Split from Jan's original qemu-thread-posix.c patch. No semantic change, just introduce the new API that POSIX and Win32 implementations will conform to. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- cpus.c |6 -- hw/ccid-card-emulated.c

[Qemu-devel] [PATCH 3/4] qemu-thread: implement joinable threads for Win32

2011-12-06 Thread Paolo Bonzini
Rewrite the handshaking between qemu_thread_create and the win32_start_routine, so that the thread can be joined without races. Similar handshaking is done now between qemu_thread_exit and qemu_thread_join. This also simplifies how QemuThreads are initialized. Signed-off-by: Paolo Bonzini --- q

[Qemu-devel] [PATCH 0/4] add qemu_thread_join, use it to fix bug in ccid

2011-12-06 Thread Paolo Bonzini
Patches introducing qemu_thread_join have floated around multiple times. Now I found a bug that requires it to be fixed, so perhaps this time it will be more successful. For the actual bug, see patch 4. Jan Kiszka (2): qemu-thread: add API for joinable threads qemu-thread: implement joinable

Re: [Qemu-devel] winXP "Standard PC" HAL and qemu-kvm >= 0.15

2011-12-06 Thread Michael Tokarev
On 06.12.2011 20:38, Jan Kiszka wrote: > On 2011-12-06 17:29, Michael Tokarev wrote: [] >> It appears there are two issues here, one is fixed by >> 09de0f469c3c2a277c7874f6c60992c8b94719a9 and is 32bit-only, and >> another bisect leads to this commit: Or 3... :) >> commit 59539c913383fdd335068130

[Qemu-devel] [PATCH 22/25] qemu-nbd: move client handling to nbd.c

2011-12-06 Thread Paolo Bonzini
This patch sets up the fd handler in nbd.c instead of qemu-nbd.c. It introduces NBDClient, which wraps the arguments to nbd_trip in a single structure, so that we can add a notifier to it. This way, qemu-nbd can know about disconnections. Signed-off-by: Paolo Bonzini --- nbd.c | 62

[Qemu-devel] [PATCH 14/25] qemu-nbd: simplify nbd_trip

2011-12-06 Thread Paolo Bonzini
Use TCP_CORK to remove a violation of encapsulation, that would later require nbd_trip to know too much about an NBD reply. We could also switch to sendmsg (qemu_co_sendv) later, it is even easier once coroutines are in. Signed-off-by: Paolo Bonzini --- nbd.c | 25 - 1

[Qemu-devel] [PATCH 06/25] nbd: fix error handling in the server

2011-12-06 Thread Paolo Bonzini
bdrv_read and bdrv_write return negative errno values, not -1. Signed-off-by: Paolo Bonzini --- nbd.c | 21 - 1 files changed, 12 insertions(+), 9 deletions(-) diff --git a/nbd.c b/nbd.c index 3f82db3..9353438 100644 --- a/nbd.c +++ b/nbd.c @@ -595,6 +595,7 @@ int nbd_trip

[Qemu-devel] [PATCH 25/25] qemu-nbd: throttle requests

2011-12-06 Thread Paolo Bonzini
Limiting the number of in-flight requests is implemented very simply with a can_read callback. It does not require a semaphore, unlike the client side in block/nbd.c, because we can throttle directly the creation of coroutines. The client side can have a coroutine created at any time when an I/O

[Qemu-devel] [PATCH 12/25] qemu-nbd: remove data_size argument to nbd_trip

2011-12-06 Thread Paolo Bonzini
The size of the buffer is in practice part of the protocol. Signed-off-by: Paolo Bonzini --- nbd.c |6 +++--- nbd.h |4 +++- qemu-nbd.c |4 +--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nbd.c b/nbd.c index f93a927..2380960 100644 --- a/nbd.c +++ b/nbd.

Re: [Qemu-devel] [PATCH 0/2] [RFC] qemu-ga: add support for guest command execution

2011-12-06 Thread Michael Roth
On 12/06/2011 08:44 AM, Daniel P. Berrange wrote: On Tue, Dec 06, 2011 at 08:34:06AM -0600, Michael Roth wrote: The code is still in rough shape, but while we're on the topic of guest agents I wanted to put out a working example of how exec functionality can be added to qemu-ga to provide a mech

[Qemu-devel] [PATCH 24/25] qemu-nbd: asynchronous operation

2011-12-06 Thread Paolo Bonzini
Using coroutines enable asynchronous operation on both the network and the block side. Network can be owned by two coroutines at the same time, one writing and one reading. On the send side, mutual exclusion is guaranteed by a CoMutex. On the receive side, mutual exclusion is guaranteed because

[Qemu-devel] [PATCH 15/25] qemu-nbd: introduce nbd_do_send_reply

2011-12-06 Thread Paolo Bonzini
Group the sending of a reply and the associated data into a new function. Without corking, the caller would be forced to leave 12 free bytes at the beginning of the data pointer. Not too ugly, but still ugly. :) Using nbd_do_send_reply everywhere will help when the routine will set up the write h

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-06 Thread Marcelo Tosatti
On Tue, Dec 06, 2011 at 02:35:03PM -0200, Marcelo Tosatti wrote: > > Right, we can probably generalise the qcow2 code and make it available > > for other drivers as well. > > Hum, generalising sounds overly complicated (and there is a time > constraint to this). IMHO a cache internal to add-cow.c

[Qemu-devel] [PATCH 04/25] nbd: split requests

2011-12-06 Thread Paolo Bonzini
qemu-nbd has a limit of slightly less than 1M per request. Work around this in the nbd block driver. Signed-off-by: Paolo Bonzini --- block/nbd.c | 52 ++-- 1 files changed, 46 insertions(+), 6 deletions(-) diff --git a/block/nbd.c b/block/nbd.

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-06 Thread Kevin Wolf
Am 06.12.2011 17:35, schrieb Marcelo Tosatti: > On Tue, Dec 06, 2011 at 04:20:55PM +0100, Kevin Wolf wrote: >> Am 06.12.2011 16:06, schrieb Marcelo Tosatti: >>> On Tue, Dec 06, 2011 at 12:53:16PM -0200, Marcelo Tosatti wrote: On Tue, Dec 06, 2011 at 01:59:48PM +0100, Kevin Wolf wrote: >>>

Re: [Qemu-devel] winXP "Standard PC" HAL and qemu-kvm >= 0.15

2011-12-06 Thread Jan Kiszka
On 2011-12-06 17:29, Michael Tokarev wrote: > [Added Jan Kiszka to Cc] > > On 06.12.2011 18:45, Michael Tokarev wrote: > [complete thread: > http://thread.gmane.org/gmane.comp.emulators.kvm.devel/82705] > >> More data points (all against qemu-kvm-0.15.0). >> >> First, as Avi pointed out, this pa

[Qemu-devel] [PATCH v2] trace: Provide a per-event status define for conditional compilation

2011-12-06 Thread Lluís Vilanova
Adds a 'TRACE_${NAME}_ENABLED' preprocessor define for each tracing event in "trace.h". This lets the user conditionally compile code with a relatively high execution cost that is only necessary when producing the tracing information for an event that is enabled. Note that events using this defin

[Qemu-devel] [PATCH 09/25] nbd: add support for NBD_CMD_TRIM

2011-12-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/nbd.c | 25 + nbd.c | 15 +-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index ece8e7b..bfcda65 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -435,6 +435,30 @@ stati

[Qemu-devel] [PATCH 16/25] qemu-nbd: more robust handling of invalid requests

2011-12-06 Thread Paolo Bonzini
Fail invalid requests with EINVAL instead of dropping them into the void. Signed-off-by: Paolo Bonzini --- nbd.c | 57 ++--- 1 files changed, 30 insertions(+), 27 deletions(-) diff --git a/nbd.c b/nbd.c index fb074ef..64e4ef2 100644 --- a/nb

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-06 Thread Marcelo Tosatti
On Tue, Dec 06, 2011 at 04:20:55PM +0100, Kevin Wolf wrote: > Am 06.12.2011 16:06, schrieb Marcelo Tosatti: > > On Tue, Dec 06, 2011 at 12:53:16PM -0200, Marcelo Tosatti wrote: > >> On Tue, Dec 06, 2011 at 01:59:48PM +0100, Kevin Wolf wrote: > > + > > +ret = bdrv_pread(bs->file, sizeof(

[Qemu-devel] [PATCH 10/25] Update ioctl order in nbd_init() to detect EBUSY

2011-12-06 Thread Paolo Bonzini
From: Chunyan Liu Update ioctl(s) in nbd_init() to detect device busy early. Current nbd_init() issues NBD_CLEAR_SOCKET before NBD_SET_SOCKET, if issuing "qemu-nbd -c /dev/nbd0 disk.img" twice, the second time won't detect EBUSY in nbd_init(), but in nbd_client will report EBUSY and do clear soc

Re: [Qemu-devel] winXP "Standard PC" HAL and qemu-kvm >= 0.15

2011-12-06 Thread Michael Tokarev
[Added Jan Kiszka to Cc] On 06.12.2011 18:45, Michael Tokarev wrote: [complete thread: http://thread.gmane.org/gmane.comp.emulators.kvm.devel/82705] > More data points (all against qemu-kvm-0.15.0). > > First, as Avi pointed out, this patch references PIC which is > used by standardPC HAL and no

[Qemu-devel] [PATCH 21/25] qemu-nbd: use common main loop

2011-12-06 Thread Paolo Bonzini
Using a single main loop for sockets will help yielding from the socket coroutine back to the main loop, and later reentering it. Signed-off-by: Paolo Bonzini --- qemu-nbd.c | 112 1 files changed, 45 insertions(+), 67 deletions(-) d

[Qemu-devel] [PATCH 08/25] nbd: add support for NBD_CMD_FLUSH

2011-12-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/nbd.c | 45 + nbd.c | 15 ++- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 69fa990..ece8e7b 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -40

[Qemu-devel] [PATCH 17/25] qemu-nbd: introduce nbd_do_receive_request

2011-12-06 Thread Paolo Bonzini
Group the receiving of a response and the associated data into a new function. Signed-off-by: Paolo Bonzini --- nbd.c | 68 1 files changed, 47 insertions(+), 21 deletions(-) diff --git a/nbd.c b/nbd.c index 64e4ef2..e2868a2 100

[Qemu-devel] [PATCH 13/25] move corking functions to osdep.c

2011-12-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/sheepdog.c | 20 ++-- osdep.c |9 + qemu_socket.h|1 + 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 00ea5a0..17a79be 100644 --- a/block/sheepdog.c ++

[Qemu-devel] RFC: raw device support for block device targets

2011-12-06 Thread Alex Bligh
qemu-img convert appears to support block devices as input, but not as output. That is irritating, as when using qemu-img convert to convert qcow to raw on a block partition, an intermediate file has to be used, which slows things down and pointlessly uses disk space. The problem is that ftruncat

[Qemu-devel] [PATCH 07/25] nbd: add support for NBD_CMD_FLAG_FUA

2011-12-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/nbd.c |4 nbd.c | 13 +++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 93f5d16..69fa990 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -352,6 +352,10 @@ static int nbd_co_writev_1(B

[Qemu-devel] [PATCH 18/25] qemu-nbd: introduce NBDExport

2011-12-06 Thread Paolo Bonzini
Wrap the common parameters of nbd_trip and nbd_negotiate in a single opaque struct. Signed-off-by: Paolo Bonzini --- nbd.c | 64 +--- nbd.h | 11 +++-- qemu-nbd.c | 15 - 3 files changed, 61 insertions(+), 29

Re: [Qemu-devel] [PATCH v3 0/6] Remove libqemu related stuff from QEMU source tree

2011-12-06 Thread Peter Maydell
On 15 November 2011 12:47, Chen Wei-Ren (陳韋任) wrote: > From: Chen Wei-Ren > >  According to [1], libqemu is not available anymore. Remove libqemu > related stuff from QEMU source tree. Whole series: Reviewed-by: Peter Maydell (and tested it still applies to current master.) Can we call this a

[Qemu-devel] [PATCH 03/25] nbd: switch to asynchronous operation

2011-12-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/nbd.c | 188 ++ nbd.c |8 +++ 2 files changed, 131 insertions(+), 65 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 882b2dc..9af939d 100644 --- a/block/nbd.c +++ b/block/nbd.c @@

[Qemu-devel] [PATCH 02/25] sheepdog: move coroutine send/recv function to generic code

2011-12-06 Thread Paolo Bonzini
Outside coroutines, avoid busy waiting on EAGAIN by temporarily making the socket blocking. The API of qemu_recvv/qemu_sendv is slightly different from do_readv/do_writev because they do not handle coroutines. It returns the number of bytes written before encountering an EAGAIN. The specificity

[Qemu-devel] [PATCH 11/25] qemu-nbd: remove offset argument to nbd_trip

2011-12-06 Thread Paolo Bonzini
The argument is write-only. Signed-off-by: Paolo Bonzini --- nbd.c |8 +++- nbd.h |2 +- qemu-nbd.c |3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/nbd.c b/nbd.c index 06064c2..f93a927 100644 --- a/nbd.c +++ b/nbd.c @@ -583,8 +583,9 @@ static int

Re: [Qemu-devel] [PATCH v3 1/3] Make 'qemu_init_vcpu' a function (instead of a macro)

2011-12-06 Thread Lluís Vilanova
Lluís Vilanova writes: > Implementation with 'CONFIG_USER_ONLY' is moved into new file 'cpus-user.c'. Ping > Signed-off-by: Lluís Vilanova > --- > Makefile.objs |1 + > cpus-user.c | 15 +++ > qemu-common.h |4 > 3 files changed, 16 insertions(+), 4 deletions(-) >

[Qemu-devel] [PATCH 00/25] nbd asynchronous operation

2011-12-06 Thread Paolo Bonzini
Here is my NBD asynchronous operation series, including asynchronous server. Patches 1-5 add asynchronous operation to the client. Patches 6-9 add new features for flush/FUA and discard (trim). Patches 10-25 add asynchronous operation to the server. Chunyan Liu (1): Update ioctl order in nbd_

[Qemu-devel] [PATCH 19/25] qemu-nbd: introduce NBDRequest

2011-12-06 Thread Paolo Bonzini
Move the buffer from NBDExport to a new structure, so that it will be possible to have multiple in-flight requests for the same export (and for the same client too---we get that for free). Signed-off-by: Paolo Bonzini --- nbd.c | 65 +++--

[Qemu-devel] [PATCH 20/25] link the main loop and its dependencies into the tools

2011-12-06 Thread Paolo Bonzini
Using the main loop code from QEMU enables tools to operate fully asynchronously. Advantages include better Windows portability (for some definition of portability) over glib's. Signed-off-by: Paolo Bonzini --- Makefile |5 +++-- main-loop.h |6 ++ os-posix.c| 42 --

Re: [Qemu-devel] About the snapshot

2011-12-06 Thread Stefan Hajnoczi
2011/12/6 Zhi Hui Li : > > > 2011/12/6 Stefan Hajnoczi >> >> On Tue, Dec 6, 2011 at 10:01 AM, Zhi Hui Li >> wrote: >> > On 2011年12月06日 17:40, Stefan Hajnoczi wrote: >> >> >> >> On Tue, Dec 6, 2011 at 9:07 AM, Zhi Hui Li >> >> wrote: >> >>> >> >>> >> >>> 1) : >> >>> >> >>> for example: >> >>> >>

[Qemu-devel] [PATCH 23/25] qemu-nbd: add client pointer to NBDRequest

2011-12-06 Thread Paolo Bonzini
By attaching a client to an NBDRequest, we can avoid passing around the socket descriptor and data buffer. Also, we can now manage the reference count for the client in nbd_request_get/put request instead of having to do it ourselved in nbd_read. This simplifies things when coroutines are used.

[Qemu-devel] [PATCH 05/25] nbd: allow multiple in-flight requests

2011-12-06 Thread Paolo Bonzini
Allow sending up to 16 requests, and drive the replies to the coroutine that did the request. The code is written to be exactly the same as before this patch when MAX_NBD_REQUESTS == 1 (modulo the extra mutex and state). Signed-off-by: Paolo Bonzini --- block/nbd.c | 69 ++

[Qemu-devel] [PATCH 01/25] add qemu_send_full and qemu_recv_full

2011-12-06 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- osdep.c | 67 + qemu-common.h |4 +++ 2 files changed, 71 insertions(+), 0 deletions(-) diff --git a/osdep.c b/osdep.c index 56e6963..70bad27 100644 --- a/osdep.c +++ b/osdep.c @@ -166,3 +166,70

Re: [Qemu-devel] [PATCH v5] block:add-cow file format

2011-12-06 Thread Kevin Wolf
Am 06.12.2011 16:06, schrieb Marcelo Tosatti: > On Tue, Dec 06, 2011 at 12:53:16PM -0200, Marcelo Tosatti wrote: >> On Tue, Dec 06, 2011 at 01:59:48PM +0100, Kevin Wolf wrote: > + > +ret = bdrv_pread(bs->file, sizeof(header), state->bitmap, > +state->bitmap_size); >

  1   2   >