Re: [Qemu-devel] [PATCH] hw/qxl: another missing unlock

2011-01-27 Thread Gerd Hoffmann
On 01/25/11 15:42, Alon Levy wrote: We need to unlock the mutex before waiting on read via the worker call since the worker will try to lock and hang otherwise. Signed-off-by: Alon Levyal...@redhat.com --- hw/qxl.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH V6 2/4] nmi: make cpu-index argument optional

2011-01-27 Thread Lai Jiangshan
When the argument cpu-index is not given, then nmi command will inject NMI on all CPUs. This simulate the nmi button on physical machine. Note: it will allow non-argument nmi command and change the human monitor behavior. Thanks to Markus Armbruster for correcting the logic detecting

[Qemu-devel] [PATCH V6 1/4] nmi: convert cpu_index to cpu-index

2011-01-27 Thread Lai Jiangshan
cpu-index which uses hyphen is better name. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- diff --git a/hmp-commands.hx b/hmp-commands.hx index 5d4cb9e..e43ac7c 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -721,7 +721,7 @@ ETEXI #if defined(TARGET_I386) { .name

[Qemu-devel] [PATCH V6 3/4] qmp, nmi: convert do_inject_nmi() to QObject

2011-01-27 Thread Lai Jiangshan
Make we can inject NMI via qemu-monitor-protocol. We use inject-nmi for the qmp command name, the meaning is clearer. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- diff --git a/hmp-commands.hx b/hmp-commands.hx index ec1a4db..e763bf9 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@

[Qemu-devel] [PATCH V6 4/4] nmi: report error(QError) when the cpu-index is invalid

2011-01-27 Thread Lai Jiangshan
When cpu-index is found invalid in runtime, it will report QERR_INVALID_PARAMETER_VALUE. Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com --- diff --git a/monitor.c b/monitor.c index 1b1c0ba..82935f0 100644 --- a/monitor.c +++ b/monitor.c @@ -2563,6 +2563,7 @@ static int do_inject_nmi(Monitor

[Qemu-devel] [0.14] Queue of 0.14 patches/pull?

2011-01-27 Thread Paolo Bonzini
Before creating rc1 we need to make sure that all patches for 0.14 have been reviewed and applied. Please reply to this message with a subject starting with [PING 0.14] and a link to patchwork, gmane, or whatnot; or [PULL 0.14] for tree pulls. Also, I believe all patches meant for stable

[Qemu-devel] Re: [PATCH v2 0/5] pci/pcie: implement ARI enable bit correctly

2011-01-27 Thread Michael S. Tsirkin
On Thu, Jan 27, 2011 at 03:56:34PM +0900, Isaku Yamahata wrote: Changes v1 - v2: - dropped PCI_DEVFN_MAX - use uint8_t for devfn instead of int - move pcie_check_slot into pci.h and made it static inline - minor clean ups So I put this on the pci branch but we need to at least consider the

Re: [Qemu-devel] [PATCH v5 0/3] qcow2 metadata cache

2011-01-27 Thread Kevin Wolf
Am 27.01.2011 08:52, schrieb TeLeMan: These patches break booting Windows. Can you be a bit more specific? It certainly doesn't break my Windows images. Just to be sure that I didn't miss a last-minute regression, I just installed another Win 7 VM and it works just fine. Which Windows version

[Qemu-devel] [PATCH] Remove a detached device from qemu_device_opts.

2011-01-27 Thread Ken'ichi Ohmichi
Hi, When I tried to attach the interface after detaching the same interface, the virsh command output the following and it failed: # virsh detach-interface Domain01 network --mac 52:54:00:0d:78:92 Interface detached successfully # virsh attach-interface Domain01 network default --mac

[Qemu-devel] [PATCH v4] New trace-event backend: stderr

2011-01-27 Thread Fabien Chouteau
This backend sends trace events to standard error output during the emulation. Also add a --list-backends option to tracetool, so configure script can display the list of available backends. Signed-off-by: Fabien Chouteau chout...@adacore.com --- configure |3 +- docs/tracing.txt |

Re: [Qemu-devel] [RFC][PATCH 11/12] qcow2: Convert qcow2 to use coroutines for async I/O

2011-01-27 Thread Avi Kivity
On 01/26/2011 07:12 PM, Anthony Liguori wrote: What do you actually save? The longjmp() to the coroutine code, linking in to the mutex wait queue, and another switch back to the main coroutine? Given that we don't expect to block often, it seems hardly a cost worth optimizing. It's a

Re: [Qemu-devel] [RFC][PATCH 11/12] qcow2: Convert qcow2 to use coroutines for async I/O

2011-01-27 Thread Kevin Wolf
Am 26.01.2011 18:12, schrieb Anthony Liguori: On 01/26/2011 10:38 AM, Avi Kivity wrote: On 01/26/2011 06:28 PM, Anthony Liguori wrote: On 01/26/2011 10:13 AM, Avi Kivity wrote: Serializing against a global mutex has the advantage that it can be treated as a global lock that is decomposed

Re: [Qemu-devel] [RFC][PATCH 05/12] coroutine: Add coroutines

2011-01-27 Thread Stefan Hajnoczi
On Wed, Jan 26, 2011 at 05:29:23PM +0200, Avi Kivity wrote: On 01/22/2011 11:29 AM, Stefan Hajnoczi wrote: Add functions to create coroutines and transfer control into a coroutine and back out again. + +struct Coroutine { +struct coroutine co; +}; + +/** + * Coroutine entry

Re: [Qemu-devel] [RFC][PATCH 11/12] qcow2: Convert qcow2 to use coroutines for async I/O

2011-01-27 Thread Avi Kivity
On 01/27/2011 11:27 AM, Kevin Wolf wrote: Well, but in the case of qcow2, you don't want to have a big mutex around everything. We perfectly know which parts are asynchronous and which are synchronous, so we'd want to do it finer grained from the beginning. Yes we do. And the way I proposed

Re: [Qemu-devel] [RFC][PATCH 11/12] qcow2: Convert qcow2 to use coroutines for async I/O

2011-01-27 Thread Stefan Hajnoczi
On Wed, Jan 26, 2011 at 05:40:27PM +0200, Avi Kivity wrote: On 01/22/2011 11:29 AM, Stefan Hajnoczi wrote: Converting qcow2 to use coroutines is fairly simple since most of qcow2 is synchronous. The synchronous I/O functions likes bdrv_pread() now transparently work when called from a

[Qemu-devel] [PATCH 4/8] vnc/spice: fix never and now expire_time

2011-01-27 Thread Gerd Hoffmann
From: Marc-André Lureau marcandre.lur...@redhat.com --- monitor.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index 384d87b..aefbe92 100644 --- a/monitor.c +++ b/monitor.c @@ -1136,9 +1136,9 @@ static int expire_password(Monitor *mon, const

[Qemu-devel] [PATCH 1/8] add migration state change notifiers

2011-01-27 Thread Gerd Hoffmann
This patch adds functions to register and unregister notifiers for migration state changes and a function to query the migration state. The notifier is called on every state change. Once after establishing a new migration object (which is in active state then) and once when the state changes from

[Qemu-devel] [PATCH 3/8] spice: MAINTAINERS update

2011-01-27 Thread Gerd Hoffmann
--- MAINTAINERS |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index f20d390..ab48380 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -383,6 +383,14 @@ S: Odd Fixes F: gdbstub* F: gdb-xml/ +SPICE +M: Gerd Hoffmann kra...@redhat.com +S:

[Qemu-devel] [PATCH 5/8] spice/qxl: zap spice 0.4 migration compatibility bits

2011-01-27 Thread Gerd Hoffmann
Live migration from and to spice 0.4 qxl devices isn't going to work. Rip out the bits which attempt to support that. Zap the subsection logic which is obsolete now. Bumb the version to make a clean cut. This should obviously go in before 0.14 is released. Signed-off-by: Gerd Hoffmann

[Qemu-devel] [PATCH 6/8] qxl: locking fixes

2011-01-27 Thread Gerd Hoffmann
Two spice worker calls lack the unlock/relock calls, which may lead to deadlocks, add them. [ v2: add unlock/lock to one more place, found by Alon Levy ] Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/qxl.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH 2/8] spice/vnc: client migration.

2011-01-27 Thread Gerd Hoffmann
Handle spice client migration, i.e. inform a spice client connected about the new host and connection parameters, so it can move over the connection automatically. The monitor command has a not-yet used protocol argument simliar to set_password and expire_password commands. This allows to add a

[Qemu-devel] [PULL 0/8] spice patch queue

2011-01-27 Thread Gerd Hoffmann
Hi, This is the updated spice patch queue. Changes: * rebased against latest master, solved conflicts (trace-events). * added one more locking bugfix, found by Alon. please pull, Gerd The following changes since commit 0fad6efce5d3f18278b7239dece3c251b3e7c04d: target-arm: Fix

Re: [Qemu-devel] Fwd: Proposal: Improving patch tracking and review using Rietveld

2011-01-27 Thread Stefan Hajnoczi
On Thu, Jan 27, 2011 at 08:55:30AM +0100, Paolo Bonzini wrote: Forwarding this from the GCC mailing list. Since patchwork isn't more than a mail archive the way it's implemented in QEMU, this may be a more interesting possibility. What features are you looking for beyond archiving? It would

[Qemu-devel] [PATCH 8/8] spice: add chardev (v5)

2011-01-27 Thread Gerd Hoffmann
From: Alon Levy al...@redhat.com Adding a chardev backend for spice, where spice determines what to do with it based on the name attribute given during chardev creation. For usage by spice vdagent in conjunction with a properly named virtio-serial device, and future smartcard channel usage.

[Qemu-devel] [PATCH] Reorganize struct Qcow2Cache for better struct packing

2011-01-27 Thread Jes . Sorensen
From: Jes Sorensen jes.soren...@redhat.com Move size after the two pointers in struct Qcow2Cache to get better packing of struct elements on 64 bit architectures. Signed-off-by: Jes Sorensen jes.soren...@redhat.com --- block/qcow2-cache.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [Qemu-devel] Fwd: Proposal: Improving patch tracking and review using Rietveld

2011-01-27 Thread Paolo Bonzini
On 01/27/2011 11:19 AM, Stefan Hajnoczi wrote: On Thu, Jan 27, 2011 at 08:55:30AM +0100, Paolo Bonzini wrote: Forwarding this from the GCC mailing list. Since patchwork isn't more than a mail archive the way it's implemented in QEMU, this may be a more interesting possibility. What features

[Qemu-devel] Re: [PATCH v2 0/5] pci/pcie: implement ARI enable bit correctly

2011-01-27 Thread Isaku Yamahata
On Thu, Jan 27, 2011 at 10:42:53AM +0200, Michael S. Tsirkin wrote: On Thu, Jan 27, 2011 at 03:56:34PM +0900, Isaku Yamahata wrote: Changes v1 - v2: - dropped PCI_DEVFN_MAX - use uint8_t for devfn instead of int - move pcie_check_slot into pci.h and made it static inline - minor clean

[Qemu-devel] [PULL 0.14] spice + usb

2011-01-27 Thread Gerd Hoffmann
Hi, There are two outstanding pull requests: (1) usb patch queue git://anongit.freedesktop.org/spice/qemu usb.5 Brings event queuing for usb hid devices. Brings migration support for usb hub and usb hid devices. The latter is a quite important, it makes sure the recently

Re: [Qemu-devel] [RFC][PATCH 11/12] qcow2: Convert qcow2 to use coroutines for async I/O

2011-01-27 Thread Avi Kivity
On 01/27/2011 12:09 PM, Stefan Hajnoczi wrote: The way I thought of doing this is: qcow_aio_write(...) { execute_in_coroutine { co_mutex_lock(bs-mutex); do_qcow_aio_write(...); // original qcow code co_mutex_release(bs-mutex); } } I think

[Qemu-devel] [PATCH] use correct initial region_offset

2011-01-27 Thread Alex Rozenman
Hi, I found a bug in phys_page_find_alloc function causing initial region_offset field to be set to incorrect initial value. Usually, the pages are re-assigned afterwards, so the bug has very small effect on regular QEMU users. We use memory unassigned callback and this bug causes invalid

Re: [Qemu-devel] [RFC][PATCH 11/12] qcow2: Convert qcow2 to use coroutines for async I/O

2011-01-27 Thread Avi Kivity
On 01/27/2011 12:34 PM, Kevin Wolf wrote: Am 27.01.2011 10:49, schrieb Avi Kivity: On 01/27/2011 11:27 AM, Kevin Wolf wrote: Well, but in the case of qcow2, you don't want to have a big mutex around everything. We perfectly know which parts are asynchronous and which are synchronous, so

[Qemu-devel] [PATCH] SPARC: Fix Leon3 cache control

2011-01-27 Thread Fabien Chouteau
The leon3_cache_control_int (op_helper.c) function is called within leon3.c which leads to segfault error with the global env. Now cache control is a CPU feature and everything is handled in op_helper.c. Signed-off-by: Fabien Chouteau chout...@adacore.com --- hw/leon3.c |1 -

[Qemu-devel] [PATCH] Added ppc440x6 and ppc440x6f cores.

2011-01-27 Thread Alex Rozenman
Hi, Small patch adding ppc440x6 cores. Please push. -- Best regards, Alex Rozenman (rozen...@gmail.com). From 96f21d28bc9dc7404b664a890da299fdaaf86667 Mon Sep 17 00:00:00 2001 From: Alex Rozenman rozen...@gmail.com Date: Thu, 27 Jan 2011 13:06:32 +0200 Subject: [PATCH] Added ppc440x6 and

Re: [Qemu-devel] Fwd: Proposal: Improving patch tracking and review using Rietveld

2011-01-27 Thread Stefan Hajnoczi
On Thu, Jan 27, 2011 at 10:23 AM, Paolo Bonzini bonz...@gnu.org wrote: On 01/27/2011 11:19 AM, Stefan Hajnoczi wrote: On Thu, Jan 27, 2011 at 08:55:30AM +0100, Paolo Bonzini wrote: Forwarding this from the GCC mailing list.  Since patchwork isn't more than a mail archive the way it's

[Qemu-devel] Re: Proposal: Improving patch tracking and review using Rietveld

2011-01-27 Thread Paolo Bonzini
On 01/26/2011 08:56 PM, Diego Novillo wrote: At Google we use a code review tool which was open sourced a couple of years ago: Rietveld (http://code.google.com/appengine/articles/rietveld.html). The best way of thinking about it is bugzilla for patches. The system creates an entry for every

Re: [Qemu-devel] [RFC][PATCH 11/12] qcow2: Convert qcow2 to use coroutines for async I/O

2011-01-27 Thread Kevin Wolf
Am 27.01.2011 10:49, schrieb Avi Kivity: On 01/27/2011 11:27 AM, Kevin Wolf wrote: Well, but in the case of qcow2, you don't want to have a big mutex around everything. We perfectly know which parts are asynchronous and which are synchronous, so we'd want to do it finer grained from the

Re: [Qemu-devel] [RFC][PATCH 11/12] qcow2: Convert qcow2 to use coroutines for async I/O

2011-01-27 Thread Kevin Wolf
Am 27.01.2011 11:41, schrieb Avi Kivity: On 01/27/2011 12:34 PM, Kevin Wolf wrote: Am 27.01.2011 10:49, schrieb Avi Kivity: On 01/27/2011 11:27 AM, Kevin Wolf wrote: Well, but in the case of qcow2, you don't want to have a big mutex around everything. We perfectly know which parts are

[Qemu-devel] Re: [PATCH] Reorganize struct Qcow2Cache for better struct packing

2011-01-27 Thread Kevin Wolf
Am 27.01.2011 11:25, schrieb jes.soren...@redhat.com: From: Jes Sorensen jes.soren...@redhat.com Move size after the two pointers in struct Qcow2Cache to get better packing of struct elements on 64 bit architectures. Signed-off-by: Jes Sorensen jes.soren...@redhat.com Thanks, applied to

Re: [Qemu-devel] [PATCH V9 04/16] xen: Support new libxc calls from xen unstable.

2011-01-27 Thread Stefano Stabellini
On Wed, 26 Jan 2011, Anthony Liguori wrote: +xen_ctrl_version=410 +xen=yes + + # Xen 4.0.0 + elif ( + cat $TMPCEOF +#includexenctrl.h +#includexs.h +#includestdint.h +#includexen/hvm/hvm_info_table.h +#if !defined(HVM_MAX_VCPUS) +# error HVM_MAX_VCPUS not

Re: [Qemu-devel] [PATCH V9 10/16] xen: Introduce the Xen mapcache

2011-01-27 Thread Stefano Stabellini
On Wed, 26 Jan 2011, Anthony Liguori wrote: +#ifdef MAPCACHE_DEBUG +# define DPRINTF(fmt, ...) do { \ +fprintf(stderr, xen_mapcache: fmt, ## __VA_ARGS__); \ +} while (0) +#else +# define DPRINTF(fmt, ...) do { } while (0) +#endif + +#if defined(__i386__) +# define

Re: [Qemu-devel] [PATCH V9 05/16] xen: Add xen_machine_fv

2011-01-27 Thread Stefano Stabellini
On Wed, 26 Jan 2011, Anthony Liguori wrote: +static void xen_init_fv(ram_addr_t ram_size, +const char *boot_device, +const char *kernel_filename, +const char *kernel_cmdline, +const char

[Qemu-devel] Commit 622b520f changed -drive if=scsi, index=N, intentional?

2011-01-27 Thread Markus Armbruster
Consider -drive if=scsi,index=12,... Before the commit, index=12 meant bus=1,unit=5. Example: $ qemu-system-x86_64 -nodefaults -vnc :0 -S -monitor stdio -drive if=scsi,index=12,media=cdrom QEMU 0.13.50 monitor - type 'help' for more information (qemu) info block scsi1-cd5:

Re: [Xen-devel] Re: [Qemu-devel] [PATCH V9 04/16] xen: Support new libxc calls from xen unstable.

2011-01-27 Thread Keir Fraser
On 27/01/2011 12:03, Stefano Stabellini stefano.stabell...@eu.citrix.com wrote: Really? There's no VERSION #define? Can please fix this upstream so we don't have to do this forever. Yeah, it is a bit of a shame but there isn't an #define VERSION in xenctrl.h. If we introduce it now, the

Re: [Xen-devel] Re: [Qemu-devel] [PATCH V9 04/16] xen: Support new libxc calls from xen unstable.

2011-01-27 Thread Stefano Stabellini
On Thu, 27 Jan 2011, Keir Fraser wrote: On 27/01/2011 12:03, Stefano Stabellini stefano.stabell...@eu.citrix.com wrote: Really? There's no VERSION #define? Can please fix this upstream so we don't have to do this forever. Yeah, it is a bit of a shame but there isn't an #define

[Qemu-devel] Re: Commit 622b520f changed -drive if=scsi, index=N, intentional?

2011-01-27 Thread Kevin Wolf
Am 27.01.2011 13:10, schrieb Markus Armbruster: Consider -drive if=scsi,index=12,... Before the commit, index=12 meant bus=1,unit=5. Example: [...] Two scsi-buses, and scsi1-cd5 with scsi-id 5 is on the second one, i.e. bus=1, unit=5. After the commit, it means

Re: [Qemu-devel] [RFC][PATCH 11/12] qcow2: Convert qcow2 to use coroutines for async I/O

2011-01-27 Thread Avi Kivity
On 01/27/2011 01:27 PM, Kevin Wolf wrote: Am 27.01.2011 11:41, schrieb Avi Kivity: On 01/27/2011 12:34 PM, Kevin Wolf wrote: Am 27.01.2011 10:49, schrieb Avi Kivity: On 01/27/2011 11:27 AM, Kevin Wolf wrote: Well, but in the case of qcow2, you don't want to have a big mutex around

Re: [Qemu-devel] [PATCH 1/5] Fast Virtual Disk (FVD) Proposal Part 1

2011-01-27 Thread Jes Sorensen
On 01/24/11 15:50, Chunqiang Tang wrote: I think the root of the problem is that your series didn't maintain bisectability. IOW, each patch needs to be able to be applied one at a time such that at each point, the build doesn't break and functionality doesn't break. Otherwise, tools like

[Qemu-devel] [PATCH 03/10] blockdev: Move BlockInterfaceType from qemu-common.h to blockdev.h

2011-01-27 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- blockdev.h|6 ++ qemu-common.h |6 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/blockdev.h b/blockdev.h index 5c2144c..f616855 100644 --- a/blockdev.h +++ b/blockdev.h @@ -18,6 +18,12 @@ void

[Qemu-devel] [PATCH 01/10] scsi hotplug: Set DriveInfo member bus correctly

2011-01-27 Thread Markus Armbruster
drive_init() picks the first free bus and unit number, unless the user specifies them. This isn't a good fit for the drive_add monitor command, because there we specify the controller by PCI address instead of using bus number set by drive_init(). scsi_hot_add() takes care to replace the unit

[Qemu-devel] [PATCH 08/10] blockdev: New drive_get_by_index()

2011-01-27 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- blockdev.c |7 +++ blockdev.h |1 + 2 files changed, 8 insertions(+), 0 deletions(-) diff --git a/blockdev.c b/blockdev.c index 4d8bb3d..08c9d7e 100644 --- a/blockdev.c +++ b/blockdev.c @@ -116,6 +116,13 @@ DriveInfo

[Qemu-devel] [PATCH 00/10] -drive/drive_add fixes and cleanups

2011-01-27 Thread Markus Armbruster
Kevin found a bug in my recent [PATCH 3+5/5] -drive/drive_add fixes. This is a rework of those two patches, plus the odd bonus fix found on the way. Markus Armbruster (10): scsi hotplug: Set DriveInfo member bus correctly blockdev: New drive_get_next(), replacing qdev_init_bdrv() blockdev:

[Qemu-devel] [PATCH 09/10] blockdev: Reject multiple definitions for the same drive

2011-01-27 Thread Markus Armbruster
We silently ignore multiple definitions for the same drive: $ qemu-system-x86_64 -nodefaults -vnc :1 -S -monitor stdio -drive if=ide,index=1,file=tmp.qcow2 -drive if=ide,index=1,file=nonexistant QEMU 0.13.50 monitor - type 'help' for more information (qemu) info block ide0-hd1:

[Qemu-devel] [PATCH 02/10] blockdev: New drive_get_next(), replacing qdev_init_bdrv()

2011-01-27 Thread Markus Armbruster
qdev_init_bdrv() doesn't belong into qdev.c; it's about drives, not qdevs. Rename to drive_get_next, move to blockdev.c, drop the bogus DeviceState argument, and return DriveInfo instead of BlockDriverState. Signed-off-by: Markus Armbruster arm...@redhat.com --- blockdev.c | 10 ++

[Qemu-devel] [PATCH 07/10] blockdev: Factor drive_index_to_{bus, unit}_id out of drive_init()

2011-01-27 Thread Markus Armbruster
Signed-off-by: Markus Armbruster arm...@redhat.com --- blockdev.c | 22 ++ 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/blockdev.c b/blockdev.c index e67f93c..4d8bb3d 100644 --- a/blockdev.c +++ b/blockdev.c @@ -61,6 +61,18 @@ void

Re: [Qemu-devel] [0.14] Queue of 0.14 patches/pull?

2011-01-27 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Before creating rc1 we need to make sure that all patches for 0.14 have been reviewed and applied. Please reply to this message with a subject starting with [PING 0.14] and a link to patchwork, gmane, or whatnot; or [PULL 0.14] for tree pulls.

[Qemu-devel] [PATCH 06/10] blockdev: Replace drive_add()'s fmt, ... by optstr parameter

2011-01-27 Thread Markus Armbruster
Let the callers build the optstr. Only one wants to. All the others become simpler, because they don't have to worry about escaping '%'. Signed-off-by: Markus Armbruster arm...@redhat.com --- blockdev.c |8 +--- blockdev.h |5 + vl.c | 13 +++-- 3 files changed,

[Qemu-devel] [PATCH] qemu-io: Fix discard command

2011-01-27 Thread Kevin Wolf
qemu-io passed bytes where it's supposed to pass sectors, so discard requests were off. Signed-off-by: Kevin Wolf kw...@redhat.com --- qemu-io.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index 5b24c5e..4470e49 100644 --- a/qemu-io.c +++

Re: [Qemu-devel] Commit 622b520f changed -drive if=scsi, index=N, intentional?

2011-01-27 Thread Daniel P. Berrange
On Thu, Jan 27, 2011 at 01:10:50PM +0100, Markus Armbruster wrote: Consider -drive if=scsi,index=12,... Before the commit, index=12 meant bus=1,unit=5. Example: $ qemu-system-x86_64 -nodefaults -vnc :0 -S -monitor stdio -drive if=scsi,index=12,media=cdrom QEMU 0.13.50 monitor -

[Qemu-devel] [PATCH 05/10] blockdev: Make drive_add() take explicit type, index parameters

2011-01-27 Thread Markus Armbruster
Before, type index were hidden in printf-like fmt, ... parameters, which get expanded into an option string. Rather inconvenient for uses later in this series. New IF_DEFAULT to ask for the machine's default interface. Before, that was done by having no option if in the option string.

[Qemu-devel] [PATCH] qcow2: Add bdrv_discard support

2011-01-27 Thread Kevin Wolf
This adds a bdrv_discard function to qcow2 that frees the discarded clusters. It does not yet pass the discard on to the underlying file system driver, but the space can be reused by future writes to the image. Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-cluster.c | 78

[Qemu-devel] [PATCH 04/10] blockdev: Put BlockInterfaceType names and max_devs in tables

2011-01-27 Thread Markus Armbruster
Turns drive_init()'s lengthy conditional into a concise loop, and makes the data available elsewhere. Signed-off-by: Markus Armbruster arm...@redhat.com --- blockdev.c | 49 + 1 files changed, 21 insertions(+), 28 deletions(-) diff --git

Re: [Qemu-devel] [0.14] Queue of 0.14 patches/pull?

2011-01-27 Thread Kevin Wolf
Am 27.01.2011 13:34, schrieb Markus Armbruster: Paolo Bonzini pbonz...@redhat.com writes: Before creating rc1 we need to make sure that all patches for 0.14 have been reviewed and applied. Please reply to this message with a subject starting with [PING 0.14] and a link to patchwork,

[Qemu-devel] [RFC] hw/qxl: three more unlocks

2011-01-27 Thread Alon Levy
--- Basically, anything that does a: kvm_main_cpu io exit write to red_worker pipe wait on read from red_worker pipe should relingquish the lock during that wait, no? Anyway, I had a lockup, saw it was in this situation with gdb, didn't record which function exactly, and it was solved by

[Qemu-devel] Re: Commit 622b520f changed -drive if=scsi, index=N, intentional?

2011-01-27 Thread Paolo Bonzini
On 01/27/2011 01:10 PM, Markus Armbruster wrote: Consider -drive if=scsi,index=12,... Before the commit, index=12 meant bus=1,unit=5. Example: $ qemu-system-x86_64 -nodefaults -vnc :0 -S -monitor stdio -drive if=scsi,index=12,media=cdrom QEMU 0.13.50 monitor - type 'help' for

[Qemu-devel] [PATCH 03/22] Process vmstop requests in IO thread

2011-01-27 Thread Jan Kiszka
A pending vmstop request is also a reason to leave the inner main loop. So far we ignored it, and pending stop requests issued over VCPU threads were simply ignored. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- vl.c | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-)

[Qemu-devel] [PATCH 10/22] kvm: Set up signal mask also for !CONFIG_IOTHREAD

2011-01-27 Thread Jan Kiszka
Block SIG_IPI, unblock it during KVM_RUN, just like in io-thread mode. It's unused so far, but this infrastructure will be required for self-IPIs and to process SIGBUS plus, in KVM mode, SIGIO and SIGALRM. As Windows doesn't support signal services, we need to provide a stub for the init function.

[Qemu-devel] [PATCH 14/22] kvm: Fix race between timer signals and vcpu entry under !IOTHREAD

2011-01-27 Thread Jan Kiszka
Found by Stefan Hajnoczi: There is a race in kvm_cpu_exec between checking for exit_request on vcpu entry and timer signals arriving before KVM starts to catch them. Plug it by blocking both timer related signals also on !CONFIG_IOTHREAD and process those via signalfd. Signed-off-by: Jan Kiszka

[Qemu-devel] [PATCH 21/22] Refactor kvmtcg function names in cpus.c

2011-01-27 Thread Jan Kiszka
Pure interface cosmetics: Ensure that only kvm core services (as declared in kvm.h) start with kvm_. Prepend qemu_ to those that violate this rule in cpus.c. Also rename the corresponding tcg functions for the sake of consistency. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpus.c |

[Qemu-devel] [PATCH 18/22] kvm: Unconditionally reenter kernel after IO exits

2011-01-27 Thread Jan Kiszka
KVM requires to reenter the kernel after IO exits in order to complete instruction emulation. Failing to do so will leave the kernel state inconsistently behind. To ensure that we will get back ASAP, we issue a self-signal that will cause KVM_RUN to return once the pending operations are

[Qemu-devel] [PATCH 04/22] Leave inner main_loop faster on pending requests

2011-01-27 Thread Jan Kiszka
If there is any pending request that requires us to leave the inner loop if main_loop, makes sure we do this as soon as possible by enforcing non-blocking IO processing. At this change, move variable definitions out of the inner loop to improve readability. Signed-off-by: Jan Kiszka

[Qemu-devel] [PATCH 17/22] kvm: Move irqchip event processing out of inner loop

2011-01-27 Thread Jan Kiszka
Align with qemu-kvm and prepare for IO exit fix: There is no need to run kvm_arch_process_irqchip_events in the inner VCPU loop. Any state change this service processes will first cause an exit from kvm_cpu_exec anyway. And we will have to reenter the kernel on IO exits unconditionally, something

[Qemu-devel] [PATCH 11/22] kvm: Refactor qemu_kvm_eat_signals

2011-01-27 Thread Jan Kiszka
We do not use the timeout, so drop its logic. As we always poll our signals, we do not need to drop the global lock. Removing those calls allows some further simplifications. Also fix the error processing of sigpending at this chance. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Reviewed-by:

[Qemu-devel] [PATCH 07/22] kvm: Handle kvm_init_vcpu errors

2011-01-27 Thread Jan Kiszka
Do not ignore errors of kvm_init_vcpu, they are fatal. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpus.c | 19 +++ 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/cpus.c b/cpus.c index cd3f89b..f89826a 100644 --- a/cpus.c +++ b/cpus.c @@ -273,12

[Qemu-devel] [PATCH 19/22] kvm: Remove static return code of kvm_handle_io

2011-01-27 Thread Jan Kiszka
Improve the readability of the exit dispatcher by moving the static return value of kvm_handle_io to its caller. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c | 17 - 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index

[Qemu-devel] [PATCH 05/22] kvm: Report proper error on GET_VCPU_MMAP_SIZE failures

2011-01-27 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 9976762..1a55a10 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -219,6 +219,7 @@ int kvm_init_vcpu(CPUState *env) mmap_size =

[Qemu-devel] [PATCH 15/22] kvm: Add MCE signal support for !CONFIG_IOTHREAD

2011-01-27 Thread Jan Kiszka
Currently, we only configure and process MCE-related SIGBUS events if CONFIG_IOTHREAD is enabled. The groundwork is laid, we just need to factor out the required handler registration and system configuration. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Huang Ying ying.hu...@intel.com CC:

[Qemu-devel] [PATCH 06/22] kvm: Drop redundant kvm_enabled from kvm_cpu_thread_fn

2011-01-27 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpus.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index ceb3a83..cd3f89b 100644 --- a/cpus.c +++ b/cpus.c @@ -606,8 +606,8 @@ static void *kvm_cpu_thread_fn(void *arg)

[Qemu-devel] [PATCH 13/22] Set up signalfd under !CONFIG_IOTHREAD

2011-01-27 Thread Jan Kiszka
Will be required for SIGBUS handling. For obvious reasons, this will remain a nop on Windows hosts. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Makefile.objs |2 +- cpus.c| 117 +++-- 2 files changed, 65 insertions(+), 54

[Qemu-devel] [PATCH 16/22] Introduce VCPU self-signaling service

2011-01-27 Thread Jan Kiszka
Introduce qemu_cpu_kick_self to send SIG_IPI to the calling VCPU context. First user will be kvm. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpus.c| 21 + qemu-common.h |1 + 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/cpus.c

[Qemu-devel] [PATCH 02/22] Stop current VCPU on synchronous reset requests

2011-01-27 Thread Jan Kiszka
If some I/O operation ends up calling qemu_system_reset_request in VCPU context, we record this and inform the io-thread, but we do not terminate the VCPU loop. This can lead to fairly unexpected behavior if the triggering reset operation is supposed to work synchronously. Fix this for TCG (when

[Qemu-devel] [PATCH 00/22] [uq/master] Patch queue, part II

2011-01-27 Thread Jan Kiszka
This second round of patches focus on issues in cpus.c, primarily signal related. The highlights are - Add missing KVM_RUN continuation after I/O exits - Fix for timer signal race in KVM entry code under !CONFIG_IOTHREAD (based on Stefan's findings) - MCE signal processing under

[Qemu-devel] [PATCH 09/22] Refactor signal setup functions in cpus.c

2011-01-27 Thread Jan Kiszka
Move {tcg,kvm}_init_ipi and block_io_signals to avoid prototypes, rename the former two to clarify that they deal with more than SIG_IPI. No functional changes - except for the tiny fixup of strerror usage. The forward declaration of sigbus_handler is just temporarily, it will be moved in a

[Qemu-devel] [PATCH 08/22] kvm: Provide sigbus services arch-independently

2011-01-27 Thread Jan Kiszka
Provide arch-independent kvm_on_sigbus* stubs to remove the #ifdef'ery from cpus.c. This patch also fixes --disable-kvm build by providing the missing kvm_on_sigbus_vcpu kvm-stub. Signed-off-by: Jan Kiszka jan.kis...@siemens.com CC: Huang Ying ying.hu...@intel.com CC: Alexander Graf ag...@suse.de

[Qemu-devel] [PATCH 01/22] Prevent abortion on multiple VCPU kicks

2011-01-27 Thread Jan Kiszka
If we call qemu_cpu_kick more than once before the target was able to process the signal, pthread_kill will fail, and qemu will abort. Prevent this by avoiding the redundant signal. This logic can be found in qemu-kvm as well. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpu-defs.h |

[Qemu-devel] paravirtual mouse/tablet, v5

2011-01-27 Thread Gerd Hoffmann
Hi, Next revision the pvmouse protocol. It is quite different now, I've decided to move to a model with one message per updated value, simliar to the linux input layer. There isn't a mouse move message any more. A mouse move event will be three messages now: one to update X, one to

[Qemu-devel] [PATCH 12/22] kvm: Call qemu_kvm_eat_signals also under !CONFIG_IOTHREAD

2011-01-27 Thread Jan Kiszka
Move qemu_kvm_eat_signals around and call it also when the IO-thread is not used. Do not yet process SIGBUS, will be armed in a separate step. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpus.c | 88 --- 1 files changed, 50

[Qemu-devel] [PATCH 20/22] kvm: Leave kvm_cpu_exec directly after KVM_EXIT_SHUTDOWN

2011-01-27 Thread Jan Kiszka
The reset we issue on KVM_EXIT_SHUTDOWN implies that we should also leave the VCPU loop. As we now check for exit_request which is set by qemu_system_reset_request, this bug is no longer critical. Still it's an unneeded extra turn. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c |

[Qemu-devel] [PATCH 22/22] Fix a few coding style violations in cpus.c

2011-01-27 Thread Jan Kiszka
No functional changes. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- cpus.c | 97 ++- 1 files changed, 58 insertions(+), 39 deletions(-) diff --git a/cpus.c b/cpus.c index 559ec55..f4ec84e 100644 --- a/cpus.c +++ b/cpus.c @@

[Qemu-devel] [Bug 688085] Re: Guest kernel hang during boot when KVM is active on i386 host

2011-01-27 Thread Serge Hallyn
Hi Zhiyuan-lv, the fix is currently in maverick-proposed. You can use that kernel by adding something like deb http://archive.ubuntu.com/ubuntu/ maverick-proposed main to your /etc/apt/sources.list. I don't know how long it will take for this fix to move from maverick- proposed into maverick.

[Qemu-devel] [PATCH v2 14/22] kvm: Fix race between timer signals and vcpu entry under !IOTHREAD

2011-01-27 Thread Jan Kiszka
Found by Stefan Hajnoczi: There is a race in kvm_cpu_exec between checking for exit_request on vcpu entry and timer signals arriving before KVM starts to catch them. Plug it by blocking both timer related signals also on !CONFIG_IOTHREAD and process those via signalfd. Signed-off-by: Jan Kiszka

[Qemu-devel] [PATCH] kill VirtIOSerialDevice

2011-01-27 Thread Gerd Hoffmann
VirtIOSerialDevice is like VirtIOSerialPort with just the first two fields, which makes it pretty pointless. Using VirtIOSerialPort directly works equally well and is less confusing. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/virtio-console.c| 13 +++--

Re: [Qemu-devel] paravirtual mouse/tablet, v5

2011-01-27 Thread Anthony Liguori
On 01/27/2011 07:11 AM, Gerd Hoffmann wrote: Hi, Next revision the pvmouse protocol. It is quite different now, I've decided to move to a model with one message per updated value, simliar to the linux input layer. There isn't a mouse move message any more. A mouse move event will be

[Qemu-devel] [PATCH v3 14/22] kvm: Fix race between timer signals and vcpu entry under !IOTHREAD

2011-01-27 Thread Jan Kiszka
Found by Stefan Hajnoczi: There is a race in kvm_cpu_exec between checking for exit_request on vcpu entry and timer signals arriving before KVM starts to catch them. Plug it by blocking both timer related signals also on !CONFIG_IOTHREAD and process those via signalfd. As this fix depends on real

[Qemu-devel] [PATCH] kvm: x86: Fix build in absence of KVM_CAP_ASYNC_PF

2011-01-27 Thread Jan Kiszka
Reported by Stefan Hajnoczi. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Build regression of Only read/write MSR_KVM_ASYNC_PF_EN if supported. target-i386/kvm.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index

Re: [Qemu-devel] paravirtual mouse/tablet, v5

2011-01-27 Thread Gerd Hoffmann
On 01/27/11 15:27, Anthony Liguori wrote: On 01/27/2011 07:11 AM, Gerd Hoffmann wrote: Hi, Next revision the pvmouse protocol. It is quite different now, I've decided to move to a model with one message per updated value, simliar to the linux input layer. There isn't a mouse move message any

[Qemu-devel] Re: Commit 622b520f changed -drive if=scsi, index=N, intentional?

2011-01-27 Thread Markus Armbruster
Kevin Wolf kw...@redhat.com writes: Am 27.01.2011 13:10, schrieb Markus Armbruster: Consider -drive if=scsi,index=12,... Before the commit, index=12 meant bus=1,unit=5. Example: [...] Two scsi-buses, and scsi1-cd5 with scsi-id 5 is on the second one, i.e. bus=1, unit=5.

Re: [Qemu-devel] [0.14] Queue of 0.14 patches/pull?

2011-01-27 Thread Markus Armbruster
Markus Armbruster arm...@redhat.com writes: Paolo Bonzini pbonz...@redhat.com writes: Before creating rc1 we need to make sure that all patches for 0.14 have been reviewed and applied. Please reply to this message with a subject starting with [PING 0.14] and a link to patchwork, gmane,

Re: [Qemu-devel] paravirtual mouse/tablet, v5

2011-01-27 Thread Anthony Liguori
On 01/27/2011 08:53 AM, Gerd Hoffmann wrote: On 01/27/11 15:27, Anthony Liguori wrote: On 01/27/2011 07:11 AM, Gerd Hoffmann wrote: Hi, Next revision the pvmouse protocol. It is quite different now, I've decided to move to a model with one message per updated value, simliar to the linux input

[Qemu-devel] Re: [Spice-devel] paravirtual mouse/tablet, v5

2011-01-27 Thread Gerd Hoffmann
Hi, typedef struct qemu_pvmouse_ack { uint32_t features; /* qemu_pvtable_features */ Why does this comment say qemu_pvtable_features and the one above says qemu_pvmouse_features? Not intentional, will fix. Leftover because it is misspelled (t in table*t* missing), so the

[Qemu-devel] Re: [Spice-devel] paravirtual mouse/tablet, v5

2011-01-27 Thread Alon Levy
On Thu, Jan 27, 2011 at 02:11:35PM +0100, Gerd Hoffmann wrote: Hi, Next revision the pvmouse protocol. It is quite different now, I've decided to move to a model with one message per updated value, simliar to the linux input layer. There isn't a mouse move message any more. A mouse

  1   2   >