[Qemu-devel] [PATCH 19/19] migration: add a parser to accept FT migration incoming mode.

2011-01-27 Thread Yoshiaki Tamura
The option looks like, -incoming ::,ft_mode Signed-off-by: Yoshiaki Tamura --- migration.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c index 1752cf4..29d4fb1 100644 --- a/migration.c +++ b/migration.c @@ -45,6 +45,12 @@ int qemu_start_i

[Qemu-devel] [PATCH 16/19] migration: introduce migrate_ft_trans_{put, get}_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2011-01-27 Thread Yoshiaki Tamura
Introduce migrate_ft_trans_put_ready() which kicks the FT transaction cycle. When ft_mode is on, migrate_fd_put_ready() would open ft_trans_file and turn on event_tap. To end or cancel FT transaction, ft_mode and event_tap is turned off. migrate_ft_trans_get_ready() is called to receive ack from

[Qemu-devel] [PATCH 05/19] vl.c: add deleted flag for deleting the handler.

2011-01-27 Thread Yoshiaki Tamura
Make deleting handlers robust against deletion of any elements in a handler by using a deleted flag like in file descriptors. Signed-off-by: Yoshiaki Tamura --- vl.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 0292184..8bbb785 100644 ---

[Qemu-devel] [PATCH 17/19] migration-tcp: modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2011-01-27 Thread Yoshiaki Tamura
When ft_mode is set in the header, tcp_accept_incoming_migration() sets ft_trans_incoming() as a callback, and call qemu_file_get_notify() to receive FT transaction iteratively. We also need a hack no to close fd before moving to ft_transaction mode, so that we can reuse the fd for it. vm_change_

[Qemu-devel] [PATCH 01/19] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2011-01-27 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |2 ++ savevm.c | 20 +++- 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index dd993de..7f05830 100644 --- a/hw/

[Qemu-devel] [PATCH 02/19] Introduce read() to FdMigrationState.

2011-01-27 Thread Yoshiaki Tamura
Currently FdMigrationState doesn't support read(), and this patch introduces it to get response from the other side. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 15 +++ migration.c | 13 + migration.h |3 +++ 3 files changed, 31 insertions(+), 0 d

[Qemu-devel] [PATCH 13/19] net: insert event-tap to qemu_send_packet() and qemu_sendv_packet_async().

2011-01-27 Thread Yoshiaki Tamura
event-tap function is called only when it is on. Signed-off-by: Yoshiaki Tamura --- net.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 9ba5be2..1176124 100644 --- a/net.c +++ b/net.c @@ -36,6 +36,7 @@ #include "qemu-common.h" #include "qe

[Qemu-devel] [PATCH 10/19] Call init handler of event-tap at main() in vl.c.

2011-01-27 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 8bbb785..9faeb27 100644 --- a/vl.c +++ b/vl.c @@ -162,6 +162,7 @@ int main(int argc, char **argv) #include "qemu-queue.h" #include "cpus.h" #include "arch_init.h

Re: [Qemu-devel] [PING 0.14] fix crash when a read handler calls qemu_set_fd_handler2()

2011-01-27 Thread Anthony Liguori
On 01/27/2011 01:50 PM, Stefan Hajnoczi wrote: On Thu, Jan 27, 2011 at 5:14 PM, Anthony Liguori wrote: On 01/27/2011 10:44 AM, Rick Vernam wrote: 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 t

[Qemu-devel] [PATCH 03/19] Introduce skip_header parameter to qemu_loadvm_state().

2011-01-27 Thread Yoshiaki Tamura
Introduce skip_header parameter to qemu_loadvm_state() so that it can be called iteratively without reading the header. Signed-off-by: Yoshiaki Tamura --- migration.c |2 +- savevm.c| 24 +--- sysemu.h|2 +- 3 files changed, 15 insertions(+), 13 deletions(-)

[Qemu-devel] [PATCH 14/19] block: insert event-tap to bdrv_aio_writev(), bdrv_aio_flush() and bdrv_flush().

2011-01-27 Thread Yoshiaki Tamura
event-tap function is called only when it is on, and requests were sent from device emulators. Signed-off-by: Yoshiaki Tamura --- block.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index ff2795b..e4df9b6 100644 --- a/block.c +++ b/bl

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

2011-01-27 Thread Hannes Reinecke
On 01/27/2011 08:26 PM, Gerd Hoffmann wrote: > Hi, > >> } else if (!strcmp(buf, "scsi")) { >> type = IF_SCSI; >> -max_devs = MAX_SCSI_DEVS; >> +max_devs = 7; > >> That's very obviously not much more than a hack, but I don't think >> blockdev.c can

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

2011-01-27 Thread Stefan Hajnoczi
On Thu, Jan 27, 2011 at 5:31 PM, Anthony Liguori wrote: > Patchwork is a nice tool but I found a few issues with it that really > deterred me from using it: > > 1) it's all or nothing in terms of whether maintainers use it.  if everyone > isn't on top of keeping it clean, you end up with a terribl

Re: [Qemu-devel] [PATCH 2/7] ccid: add passthru card device

2011-01-27 Thread Alon Levy
On Tue, Jan 25, 2011 at 08:17:32AM -0600, Anthony Liguori wrote: > On 01/11/2011 02:42 AM, Alon Levy wrote: > >diff --git a/libcacard/vscard_common.h b/libcacard/vscard_common.h > >new file mode 100644 > >index 000..9ff1295 > >--- /dev/null > >+++ b/libcacard/vscard_common.h > > This file (and

[Qemu-devel] [Bug 697510] Re: Machine shut off after tons of lsi_scsi: error: MSG IN data too long

2011-01-27 Thread vrozenfe
Can you try viostor with sptd (scsi pass through direct) disabled? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/697510 Title: Machine shut off after tons of lsi_scsi: error: MSG IN data too long

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

2011-01-27 Thread Gerd Hoffmann
Hi, } else if (!strcmp(buf, "scsi")) { type = IF_SCSI; -max_devs = MAX_SCSI_DEVS; +max_devs = 7; That's very obviously not much more than a hack, but I don't think blockdev.c can get the real number easily (please prove me wrong). With this hac

[Qemu-devel] [PATCH] target-arm: Fix Neon VQ(R)DMULH.S16 instructions

2011-01-27 Thread Peter Maydell
From: Juha Riihimäki Correct an error in the implementation of the 16 bit forms of VQ(R)DMULH, bringing them into line with the 32 bit implementation. Signed-off-by: Juha Riihimäki Reviewed-by: Peter Maydell --- target-arm/neon_helper.c |3 ++- 1 files changed, 2 insertions(+), 1 deletion

[Qemu-devel] [PATCH] Sun4m / Sun4u : Uppercase RAM_size

2011-01-27 Thread Olivier DANET
Signed-off-by: Olivier Danet ---  hw/sun4m.c     6 +++---  hw/sun4u.c     4 ++--  2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/sun4m.c b/hw/sun4m.c index 30e8a21..8076f25 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -962,7 +962,7 @@ static void sun4m_hw_init(const struct sun4m

[Qemu-devel] [PATCH] ESP : Fix status register update

2011-01-27 Thread Olivier DANET
The Count to zero flag (STAT_TC) must not be cleared after an Interrupt Status register read. Signed-off-by: Olivier Danet --- hw/esp.c     2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/esp.c b/hw/esp.c index fa9d2a2..90bfdc6 100644 --- a/hw/esp.c +++ b/hw/esp.c @@ -52

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

2011-01-27 Thread Peter Maydell
On 27 January 2011 17:31, Anthony Liguori wrote: > Patchwork is a nice tool but I found a few issues with it that really > deterred me from using it: > 2) it doesn't understand patches series.  A 20 patch series gets applied all > at once, yet you have to update status for each patch.  That's ann

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

2011-01-27 Thread Michael S. Tsirkin
On Thu, Jan 27, 2011 at 09:29:36AM +0100, Paolo Bonzini wrote: > 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 "[PUL

Re: [Qemu-devel] [PATCH] qcow2: Add full image preallocation option

2011-01-27 Thread Anthony Liguori
On 01/27/2011 09:58 AM, Daniel P. Berrange wrote: On Thu, Jan 27, 2011 at 04:52:14PM +0100, Kevin Wolf wrote: This adds a preallocation=full mode to qcow2 image creation, which does not only allocate metadata for the whole image, but also writes zeros to it, creating a non-sparse image file.

Re: [Qemu-devel] [PATCH] qcow2: Add full image preallocation option

2011-01-27 Thread Anthony Liguori
On 01/27/2011 09:52 AM, Kevin Wolf wrote: This adds a preallocation=full mode to qcow2 image creation, which does not only allocate metadata for the whole image, but also writes zeros to it, creating a non-sparse image file. The writing zeros bit is in order to support physical devices? Wo

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

2011-01-27 Thread Anthony Liguori
On 01/27/2011 01:55 AM, 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. Patchwork is a nice tool but I found a few issues with it that really deterred

[Qemu-devel] Re: [PING 0.14] seabios virtio bug

2011-01-27 Thread Gleb Natapov
On Thu, Jan 27, 2011 at 06:12:31PM +0100, Paolo Bonzini wrote: > On 01/27/2011 05:51 PM, Rick Vernam wrote: > >The patch to seabios that fixed the bug was released with seabios-0.6.1, > >though > >I'm not sure if it was back-ported. > >http://www.seabios.org/pipermail/seabios/2010-September/000909

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

2011-01-27 Thread Anthony PERARD
On Wed, 26 Jan 2011, Anthony Liguori wrote: > On 01/25/2011 08:29 AM, anthony.per...@citrix.com wrote: > > From: Anthony PERARD > > > > Update the libxenctrl calls in Qemu to use the new interface, otherwise > > Qemu wouldn't be able to build against new versions of the library. > > > > We also ch

Re: [Qemu-devel] [PATCH V9 09/16] xen: add a 8259 Interrupt Controller

2011-01-27 Thread Anthony PERARD
On Wed, 26 Jan 2011, Anthony Liguori wrote: > On 01/25/2011 08:29 AM, anthony.per...@citrix.com wrote: > > From: Anthony PERARD > > > > Introduce a 8259 Interrupt Controller for target-xen; every set_irq > > call makes a Xen hypercall. > > > > Signed-off-by: Anthony PERARD > > Signed-off-by: Stefa

Re: [Qemu-devel] [PING 0.14] fix crash when a read handler calls qemu_set_fd_handler2()

2011-01-27 Thread Anthony Liguori
On 01/27/2011 10:44 AM, Rick Vernam wrote: 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 should also start having "[PATCH 0.14]", too. I am

[Qemu-devel] Re: [PING 0.14] seabios virtio bug

2011-01-27 Thread Paolo Bonzini
On 01/27/2011 05:51 PM, Rick Vernam wrote: The patch to seabios that fixed the bug was released with seabios-0.6.1, though I'm not sure if it was back-ported. http://www.seabios.org/pipermail/seabios/2010-September/000909.html Right now QEMU's seabios submodule points at 0.6.1. Should it be up

[Qemu-devel] [PING 0.14] seabios virtio bug

2011-01-27 Thread Rick Vernam
> > 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 should also start > > having "[PATCH 0.14]", too. I'm not sure how to tell which version of

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

2011-01-27 Thread Paolo Bonzini
On 01/27/2011 02:09 PM, Jan Kiszka wrote: 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 CC: Huang Ying CC: Alexander Graf CC: Paolo Bonz

[Qemu-devel] [PING 0.14] fix crash when a read handler calls qemu_set_fd_handler2()

2011-01-27 Thread Rick Vernam
> > 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 should also start > > having "[PATCH 0.14]", too. I am not the author of this patch, but it

[Qemu-devel] [PATCH] sheepdog: support creating images on remote hosts

2011-01-27 Thread MORITA Kazutaka
This patch parses the input filename in sd_create(), and enables us specifying a target server to create sheepdog images. Signed-off-by: MORITA Kazutaka --- block/sheepdog.c | 17 ++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdo

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

2011-01-27 Thread Diego Novillo
On Thu, Jan 27, 2011 at 11:26, Paolo Bonzini wrote: > - reviewers (and submitters discussing the issue) can either reply directly > to email, or use the web tool.  Diego said that either way can be used, but > the web tool is actually pretty addictive.  It produces basically the > equivalent of t

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

2011-01-27 Thread Anthony Liguori
On 01/27/2011 02:29 AM, Paolo Bonzini wrote: 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. Al

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

2011-01-27 Thread Paolo Bonzini
On 01/27/2011 11:23 AM, Paolo Bonzini 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 implemented in QEMU, this may be a mo

Re: [Qemu-devel] [PATCH] qcow2: Add full image preallocation option

2011-01-27 Thread Daniel P. Berrange
On Thu, Jan 27, 2011 at 04:52:14PM +0100, Kevin Wolf wrote: > This adds a preallocation=full mode to qcow2 image creation, which does not > only allocate metadata for the whole image, but also writes zeros to it, > creating a non-sparse image file. > > Signed-off-by: Kevin Wolf > --- > block/qco

[Qemu-devel] [PATCH] qcow2: Add full image preallocation option

2011-01-27 Thread Kevin Wolf
This adds a preallocation=full mode to qcow2 image creation, which does not only allocate metadata for the whole image, but also writes zeros to it, creating a non-sparse image file. Signed-off-by: Kevin Wolf --- block/qcow2.c | 45 - 1 files changed

[Qemu-devel] [PATCH] qcow2: Really use cache=unsafe for image creation

2011-01-27 Thread Kevin Wolf
For cache=unsafe we also need to set BDRV_O_CACHE_WB, otherwise we have some strange unsafe writethrough mode. Signed-off-by: Kevin Wolf --- block/qcow2.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index dbe4fdd..a1773e4 100644 --- a/

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

2011-01-27 Thread Alon Levy
On Thu, Jan 27, 2011 at 04:32:40PM +0100, Gerd Hoffmann wrote: > 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, w

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

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

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

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

2011-01-27 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini 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.

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

2011-01-27 Thread Markus Armbruster
Kevin Wolf 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] 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] [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 --- 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 8e8880a..05010bb 100644 ---

[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

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 th

[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 --- hw/virtio-console.c| 13 +++-- hw/virtio-serial-bus.c | 15

[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 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 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 --- 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 @@ -138,25 +138,26 @@ stati

[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 --- kvm-all.c |1 - 1 files change

[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 --- cpus.c | 88 --- 1 files changed, 50 insertions(+), 38 deleti

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

[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 --- cpu-defs.h |1 + cpus.c |6

[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 CC: Huang Ying CC: Alexander Graf CC: Paolo Bonzini --- cpus.c | 10 -

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

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

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

[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 --- cpus.c| 21 + qemu-common.h |1 + 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/cpus.c b/cpus.c index bba59e5..88bed

[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 --- Makefile.objs |2 +- cpus.c| 117 +++-- 2 files changed, 65 insertions(+), 54 deletions(-) diff --gi

[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 --- 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_mutex_lock(&qemu_global_mutex); q

[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 CC: Huang Ying CC: Hidetoshi Seto CC: Jin Dongming --- cpu

[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 --- 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 = kvm_ioctl(s, KVM_GET_VCPU_MM

[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 --- kvm-all.c | 17 - 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index d961697..cf54256 100644 --

[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 --- 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 +273,18 @@ void qemu_main_loo

[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 Reviewed-by: Paolo Bonzini --- cpu

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

[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 --- vl.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 completed.

[Qemu-devel] [PATCH 21/22] Refactor kvm&tcg 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 --- cpus.c | 16

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

[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 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 --- vl.c | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/vl.c b/vl

[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

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

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

[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 --- blockdev.c | 49 + 1 files changed, 21 insertions(+), 28 deletions(-) diff --git a/blockdev.c b/blockdev.c

[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 --- block/qcow2-cluster.c | 78 ++

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

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 moni

[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 --- 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 +++ b/qemu-io.c @@ -1465,7

[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 --- blockdev.c |8 +--- blockdev.h |5 + vl.c | 13 +++-- 3 files changed, 9 insertions(+),

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

2011-01-27 Thread Markus Armbruster
Paolo Bonzini 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. Also, I bel

[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 --- 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 blockdev_auto_del(BlockDriverState *bs)

[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 --- blockdev.c | 10 ++ blockdev.h |1

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

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

2011-01-27 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- 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 *drive_get(BlockInterfaceType

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

[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 --- 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 blockdev_auto_del(BlockDri

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

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

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

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" 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 first Xen release to h

[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: type=

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 c

  1   2   >