Re: [Qemu-devel] [PATCH 2/3] Move threadlets infrastructure to qemu-threadlets.c

2010-11-11 Thread Arun R Bharadwaj
* Stefan Hajnoczi [2010-11-10 13:47:22]: > On Wed, Nov 10, 2010 at 1:19 PM, Arun R Bharadwaj > wrote: > > The reason for creating this generic infrastructure is so that other > > subsystems, > > such as virtio-9p could make use of it for offloading tasks that could > > block. > > > > Signed-of

[Qemu-devel] Re: [PATCH 1/3] Make paio subsystem use threadlets infrastructure

2010-11-11 Thread Paolo Bonzini
On 11/10/2010 02:45 PM, Stefan Hajnoczi wrote: I wonder if the condition variable has a measurable performance overhead. We unconditionally broadcast on paiocb completion. One idea would be to keep a counter of waiters (should only ever be 0 or 1) protected by aiocb_mutex and broadcast only whe

[Qemu-devel] Re: [patch 0/3] block migration fixes

2010-11-11 Thread Yoshiaki Tamura
Marcelo Tosatti wrote: On Tue, Nov 09, 2010 at 03:02:12PM +0900, Yoshiaki Tamura wrote: Marcelo Tosatti wrote: Following patchset fixes block migration corruption issues. Hi Marcelo, Thanks for looking into this issue. Although we tried your patches, we're still seeing the corruption. If w

[Qemu-devel] Re: [PATCH 1/3] Make paio subsystem use threadlets infrastructure

2010-11-11 Thread Stefan Hajnoczi
On Thu, Nov 11, 2010 at 8:41 AM, Paolo Bonzini wrote: > On 11/10/2010 02:45 PM, Stefan Hajnoczi wrote: >> >> I wonder if the condition variable has a measurable performance >> overhead.  We unconditionally broadcast on paiocb completion.  One >> idea would be to keep a counter of waiters (should o

Re: [Qemu-devel] [PATCH v2 3/3] trace: enable all events by default

2010-11-11 Thread Stefan Hajnoczi
On Wed, Nov 10, 2010 at 9:20 PM, Lluís wrote: > Blue Swirl writes: > >> On Wed, Nov 10, 2010 at 7:57 PM, Lluís wrote: >>> Blue Swirl writes: >>> On Wed, Nov 10, 2010 at 5:59 PM, Lluís wrote: > So, my patch is just a matter of having all events available _only_ when > you use a backe

[Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus.

2010-11-11 Thread Gerd Hoffmann
On 11/10/10 18:34, Michael S. Tsirkin wrote: On Wed, Nov 10, 2010 at 07:14:15PM +0200, Gleb Natapov wrote: Signed-off-by: Gleb Natapov Good stuff. We should also consider using this for CLI and monitor. Some comments below. Oh, we already have a table to map pci classes to descriptions for

[Qemu-devel] Re: [PATCHv3 03/14] Keep track of ISA ports ISA device is using in qdev.

2010-11-11 Thread Gerd Hoffmann
Hi, register_ioport_write (s->port, 1, 1, gus_writeb, s); register_ioport_write (s->port, 1, 2, gus_writew, s); +isa_init_ioport_range(dev, s->port, 2); register_ioport_read ((s->port + 0x100)& 0xf00, 1, 1, gus_readb, s); register_ioport_read ((s->port + 0x100)&

[Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus.

2010-11-11 Thread Gleb Natapov
On Thu, Nov 11, 2010 at 11:07:01AM +0100, Gerd Hoffmann wrote: > On 11/10/10 18:34, Michael S. Tsirkin wrote: > >On Wed, Nov 10, 2010 at 07:14:15PM +0200, Gleb Natapov wrote: > >> > >>Signed-off-by: Gleb Natapov > > > >Good stuff. We should also consider using this for > >CLI and monitor. Some comm

[Qemu-devel] Re: [PATCHv3 00/14] boot order specification

2010-11-11 Thread Gerd Hoffmann
On 11/10/10 18:14, Gleb Natapov wrote: This is current sate of the patch series for people to comment on. I am using open firmware naming scheme to specify device path names. Names look like this on pci machine: /p...@i0cf8/i...@1,1/dr...@1/d...@0 /p...@i0cf8/i...@1/f...@03f1/flo...@1 /p...@i0cf

[Qemu-devel] Re: [PATCHv3 03/14] Keep track of ISA ports ISA device is using in qdev.

2010-11-11 Thread Gleb Natapov
On Thu, Nov 11, 2010 at 11:14:42AM +0100, Gerd Hoffmann wrote: > Hi, > > > register_ioport_write (s->port, 1, 1, gus_writeb, s); > > register_ioport_write (s->port, 1, 2, gus_writew, s); > >+isa_init_ioport_range(dev, s->port, 2); > > > > register_ioport_read ((s->port + 0x100

Re: [Qemu-devel] [PATCH 0/3] add usb_detach and usb_attach (v3)

2010-11-11 Thread Markus Armbruster
Alon Levy writes: > On Wed, Nov 10, 2010 at 04:49:38PM +0100, Markus Armbruster wrote: >> Sorry for coming so late to this thread... >> >> Alon Levy writes: >> >> > On Thu, Oct 21, 2010 at 08:13:19AM -0500, Anthony Liguori wrote: >> >> On 10/21/2010 08:03 AM, Gerd Hoffmann wrote: >> >> >On 10/

Re: [Qemu-devel] [PATCH 1/2] Fix Block Hotplug race with drive_del()

2010-11-11 Thread Markus Armbruster
Ryan Harper writes: > * Markus Armbruster [2010-11-10 11:40]: >> Ryan Harper writes: >> >> > * Markus Armbruster [2010-11-10 06:48]: >> >> One real question, and a couple of nits. >> >> >> >> Ryan Harper writes: >> >> >> >> > Block hot unplug is racy since the guest is required to acknowle

[Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus.

2010-11-11 Thread Gerd Hoffmann
Oh, we already have a table to map pci classes to descriptions for 'info pci'. I'd strongly suggest to just add the fw names to that table instead of creating a second one ... Do you mean pci_class_descriptions? Exactly. For some classes open firmware spec defines single name for all subcla

Re: [Qemu-devel] [PATCH 2/3] vnc: support password expire

2010-11-11 Thread Gerd Hoffmann
Hi, If anything goes wrong in the mgmt tool at step 2 though, then it may never to step 3, leaving the VNC server accessible. I think the point is that you can expire the password by just changing it through the monitor. Well, you can't really expire it, you can only set it to $randomvalue

[Qemu-devel] [PATCH 0/2] msi support for virtfs

2010-11-11 Thread Gerd Hoffmann
Hi, This tiny patch series adds msi support for virtfs. It's two patches only because we need a compat property to stay compatible with -stable and we don't have a pc-0.14 machine type yet, so this is added first. please apply, Gerd Gerd Hoffmann (2): pc: add 0.13 pc machine type virtfs

[Qemu-devel] [PATCH 1/2] pc: add 0.13 pc machine type

2010-11-11 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/pc_piix.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index e82bfd1..af01cfb 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -213,7 +213,7 @@ static void pc_init_isa(ram_addr_t ram_size, } st

[Qemu-devel] [PATCH 2/2] virtfs: enable MSI-X

2010-11-11 Thread Gerd Hoffmann
This patch enables MSI-X for virtfs-9p-pci. It also adds a compat property to pc-0.13 which turns it of there to stay compatible to 0.13-stable. Signed-off-by: Gerd Hoffmann --- hw/pc_piix.c|8 hw/virtio-pci.c |5 - 2 files changed, 12 insertions(+), 1 deletions(-) dif

[Qemu-devel] [PATCH] add copyright to spiceaudio

2010-11-11 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- audio/spiceaudio.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c index 51ba53a..373e4c4 100644 --- a/audio/spiceaudio.c +++ b/audio/spiceaudio.c @@ -1,3 +1,22 @@ +/* + * Copyrigh

[Qemu-devel] [RfC PATCH] spice: qmp windup: connection events & info command.

2010-11-11 Thread Gerd Hoffmann
Hi, Looking for comments especially from Luiz and Daniel (aka qmp and libvirt masters) ... This patch adds support for connection events to spice. The events are quite simliar to the vnc events. Unlike vnc spice uses multiple tcp channels though. qemu will report every single tcp connection

Re: [Qemu-devel] [PATCH 0/3] add usb_detach and usb_attach (v3)

2010-11-11 Thread Alon Levy
On Thu, Nov 11, 2010 at 11:29:36AM +0100, Markus Armbruster wrote: > Alon Levy writes: > > > On Wed, Nov 10, 2010 at 04:49:38PM +0100, Markus Armbruster wrote: > >> Sorry for coming so late to this thread... > >> > >> Alon Levy writes: > >> > >> > On Thu, Oct 21, 2010 at 08:13:19AM -0500, Anth

Re: [Qemu-devel] [PATCH 1/2] Fix Block Hotplug race with drive_del()

2010-11-11 Thread Ryan Harper
* Markus Armbruster [2010-11-11 04:48]: > Ryan Harper writes: > > > * Markus Armbruster [2010-11-10 11:40]: > >> Ryan Harper writes: > >> > >> > * Markus Armbruster [2010-11-10 06:48]: > >> >> One real question, and a couple of nits. > >> >> > >> >> Ryan Harper writes: > >> >> > >> >> > B

[Qemu-devel] [PATCH v2 0/3] virtio: Use ioeventfd for virtqueue notify

2010-11-11 Thread Stefan Hajnoczi
This is a rewrite of the virtio-ioeventfd patchset to work at the virtio-pci.c level instead of virtio.c. This results in better integration with the host/guest notifier code and makes the code simpler (no more state machine). Virtqueue notify is currently handled synchronously in userspace virti

[Qemu-devel] [PATCH 1/3] virtio-pci: Rename bugs field to flags

2010-11-11 Thread Stefan Hajnoczi
The VirtIOPCIProxy bugs field is currently used to enable workarounds for older guests. Rename it to flags so that other per-device behavior can be tracked. A later patch uses the flags field to remember whether ioeventfd should be used for virtqueue host notification. Signed-off-by: Stefan Hajn

[Qemu-devel] [PATCH 3/3] virtio-pci: Don't use ioeventfd on old kernels

2010-11-11 Thread Stefan Hajnoczi
There used to be a limit of 6 KVM io bus devices inside the kernel. On such a kernel, don't use ioeventfd for virtqueue host notification since the limit is reached too easily. This ensures that existing vhost-net setups (which always use ioeventfd) have ioeventfds available so they can continue

[Qemu-devel] [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-11 Thread Stefan Hajnoczi
Virtqueue notify is currently handled synchronously in userspace virtio. This prevents the vcpu from executing guest code while hardware emulation code handles the notify. On systems that support KVM, the ioeventfd mechanism can be used to make virtqueue notify a lightweight exit by deferring har

[Qemu-devel] [PATCH v2] ioport: Fix duplicated code

2010-11-11 Thread Luiz Capitulino
Functions register_ioport_read() and register_ioport_write() are almost identical, the only difference is that they write to different arrays. Introduce register_ioport_rw() to handle this difference and change both functions to use it instead of duplicating code. Signed-off-by: Luiz Capitulino

Re: [Qemu-devel] [Bug 671831] Re: Sparc guest assert error

2010-11-11 Thread Stefan Hajnoczi
Thanks for providing the kernel and initrd. Unfortunately I wasn't able to get them far enough to trigger the assert. More on that at the bottom of this message but in the meantime I looked over the relevant commits and spotted an issue with the assert. Please try this branch: http://repo.or.cz/

Re: [Qemu-devel] [PATCH 1/2] Fix Block Hotplug race with drive_del()

2010-11-11 Thread Markus Armbruster
Ryan Harper writes: > * Markus Armbruster [2010-11-11 04:48]: >> Ryan Harper writes: >> >> > * Markus Armbruster [2010-11-10 11:40]: >> >> Ryan Harper writes: >> >> >> >> > * Markus Armbruster [2010-11-10 06:48]: >> >> >> One real question, and a couple of nits. >> >> >> >> >> >> Ryan Har

[Qemu-devel] Re: [PATCH] add copyright to spiceaudio

2010-11-11 Thread malc
On Thu, 11 Nov 2010, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > audio/spiceaudio.c | 19 +++ > 1 files changed, 19 insertions(+), 0 deletions(-) > > diff --git a/audio/spiceaudio.c b/audio/spiceaudio.c > index 51ba53a..373e4c4 100644 > --- a/audio/spiceaudio.c

Re: [Qemu-devel] [PATCH 0/3] add usb_detach and usb_attach (v3)

2010-11-11 Thread Markus Armbruster
Alon Levy writes: > On Thu, Nov 11, 2010 at 11:29:36AM +0100, Markus Armbruster wrote: >> Alon Levy writes: >> >> > On Wed, Nov 10, 2010 at 04:49:38PM +0100, Markus Armbruster wrote: >> >> Sorry for coming so late to this thread... >> >> >> >> Alon Levy writes: >> >> >> >> > On Thu, Oct 21,

[Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus.

2010-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2010 at 11:07:01AM +0100, Gerd Hoffmann wrote: > On 11/10/10 18:34, Michael S. Tsirkin wrote: > >On Wed, Nov 10, 2010 at 07:14:15PM +0200, Gleb Natapov wrote: > >> > >>Signed-off-by: Gleb Natapov > > > >Good stuff. We should also consider using this for > >CLI and monitor. Some comm

[Qemu-devel] [PATCH] Add missing braces

2010-11-11 Thread Jes . Sorensen
From: Jes Sorensen This patch adds missing braces around if/else statements that call macros which are likely to result in errors if the macro is changed. It also makes the code comply better with CODING_STYLE. Signed-off-by: Jes Sorensen --- hw/e1000.c | 13 - 1 files changed, 8

Re: [Qemu-devel] [PATCH 1/3] qemu-char: Introduce Memory driver

2010-11-11 Thread Markus Armbruster
Luiz Capitulino writes: > This driver handles in-memory chardev operations. That's, all writes > to this driver are stored in an internal buffer and it doesn't talk > to the external world in any way. > > Right now it's very simple: it supports only writes. But it can be > easily extended to supp

Re: [Qemu-devel] [PATCH 0/2] msi support for virtfs

2010-11-11 Thread Aneesh Kumar K. V
On Thu, 11 Nov 2010 12:59:24 +0100, Gerd Hoffmann wrote: > Hi, > > This tiny patch series adds msi support for virtfs. It's two patches > only because we need a compat property to stay compatible with -stable > and we don't have a pc-0.14 machine type yet, so this is added first. > Sorry for

Re: [Qemu-devel] [PATCH 0/2] msi support for virtfs

2010-11-11 Thread Aneesh Kumar K. V
On Thu, 11 Nov 2010 12:59:24 +0100, Gerd Hoffmann wrote: > Hi, > > This tiny patch series adds msi support for virtfs. It's two patches > only because we need a compat property to stay compatible with -stable > and we don't have a pc-0.14 machine type yet, so this is added first. > Sorry for

Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Markus Armbruster
Luiz Capitulino writes: > On Wed, 10 Nov 2010 14:20:12 +0100 > Markus Armbruster wrote: > >> Luiz Capitulino writes: [...] >> > diff --git a/qmp-commands.hx b/qmp-commands.hx >> > index 793cf1c..b344096 100644 >> > --- a/qmp-commands.hx >> > +++ b/qmp-commands.hx >> > @@ -761,6 +761,51 @@ Examp

Re: [Qemu-devel] [PATCH 1/3] qemu-char: Introduce Memory driver

2010-11-11 Thread Luiz Capitulino
On Thu, 11 Nov 2010 16:30:26 +0100 Markus Armbruster wrote: > Luiz Capitulino writes: > > > This driver handles in-memory chardev operations. That's, all writes > > to this driver are stored in an internal buffer and it doesn't talk > > to the external world in any way. > > > > Right now it's v

Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Markus Armbruster
Luiz Capitulino writes: > This command allows QMP clients to execute HMP commands. > > Please, check the documentation added to the qmp-commands.hx file > for additional details about the interface and its limitations. > > Signed-off-by: Luiz Capitulino > --- > monitor.c | 39 ++

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2010 at 01:47:21PM +, Stefan Hajnoczi wrote: > Virtqueue notify is currently handled synchronously in userspace virtio. This > prevents the vcpu from executing guest code while hardware emulation code > handles the notify. > > On systems that support KVM, the ioeventfd mechani

Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Daniel P. Berrange
On Thu, Nov 11, 2010 at 04:47:41PM +0100, Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Wed, 10 Nov 2010 14:20:12 +0100 > > Markus Armbruster wrote: > > > >> Luiz Capitulino writes: > [...] > >> > diff --git a/qmp-commands.hx b/qmp-commands.hx > >> > index 793cf1c..b344096 100644

[Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus.

2010-11-11 Thread Gleb Natapov
On Thu, Nov 11, 2010 at 05:05:11PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 11, 2010 at 11:07:01AM +0100, Gerd Hoffmann wrote: > > On 11/10/10 18:34, Michael S. Tsirkin wrote: > > >On Wed, Nov 10, 2010 at 07:14:15PM +0200, Gleb Natapov wrote: > > >> > > >>Signed-off-by: Gleb Natapov > > > > >

Re: [Qemu-devel] [PATCH v1 0/3]: QMP: Human Monitor passthrough

2010-11-11 Thread Avi Kivity
On 10/29/2010 04:28 PM, Luiz Capitulino wrote: Simple example: -> { "execute": "hmp_passthrough", "arguments": { "command-line": "print /i 10+25" } } <- { "return": "35\r\n" } Why are the names so cryptic? -> { "execute": "human-monitor-command", ... } <- { "return": "42\r\n" } -- error c

Re: [Qemu-devel] [PATCH v1 0/3]: QMP: Human Monitor passthrough

2010-11-11 Thread Luiz Capitulino
On Thu, 11 Nov 2010 18:22:13 +0200 Avi Kivity wrote: > On 10/29/2010 04:28 PM, Luiz Capitulino wrote: > > Simple example: > > > > -> { "execute": "hmp_passthrough", "arguments": { "command-line": "print > > /i 10+25" } } > > <- { "return": "35\r\n" } > > > > Why are the names so cryptic? > >

Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Anthony Liguori
On 11/11/2010 09:55 AM, Daniel P. Berrange wrote: On Thu, Nov 11, 2010 at 04:47:41PM +0100, Markus Armbruster wrote: Luiz Capitulino writes: On Wed, 10 Nov 2010 14:20:12 +0100 Markus Armbruster wrote: Luiz Capitulino writes: [...] diff --git a/qmp-comma

Re: [Qemu-devel] [PATCH 1/3] qemu-char: Introduce Memory driver

2010-11-11 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 11 Nov 2010 16:30:26 +0100 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > This driver handles in-memory chardev operations. That's, all writes >> > to this driver are stored in an internal buffer and it doesn't talk >> > to the external world

Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Daniel P. Berrange
On Thu, Nov 11, 2010 at 10:30:47AM -0600, Anthony Liguori wrote: > On 11/11/2010 09:55 AM, Daniel P. Berrange wrote: > >On Thu, Nov 11, 2010 at 04:47:41PM +0100, Markus Armbruster wrote: > > 3. Query Commands > > = > > > In the real human monitor, cpu-in

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-11 Thread Christoph Hellwig
On Thu, Nov 11, 2010 at 01:47:21PM +, Stefan Hajnoczi wrote: > Some virtio devices are known to have guest drivers which expect a notify to > be > processed synchronously and spin waiting for completion. Only enable > ioeventfd > for virtio-blk and virtio-net for now. Who guarantees that le

Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Luiz Capitulino
On Thu, 11 Nov 2010 16:39:52 + "Daniel P. Berrange" wrote: > On Thu, Nov 11, 2010 at 10:30:47AM -0600, Anthony Liguori wrote: > > On 11/11/2010 09:55 AM, Daniel P. Berrange wrote: > > >On Thu, Nov 11, 2010 at 04:47:41PM +0100, Markus Armbruster wrote: > > > 3. Query Commands > > > =

Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Luiz Capitulino
On Thu, 11 Nov 2010 16:47:41 +0100 Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Wed, 10 Nov 2010 14:20:12 +0100 > > Markus Armbruster wrote: > > > >> Luiz Capitulino writes: > [...] > >> > diff --git a/qmp-commands.hx b/qmp-commands.hx > >> > index 793cf1c..b344096 100644 > >>

[Qemu-devel] [PATCH v2 00/15] vnc: adapative tight, zrle, zywrle, and bitmap module

2010-11-11 Thread Corentin Chary
Hi, I rebased the series against current master, it contains: - Adaptive Tight Encoding: send lossy or lossless updates depending on the update frequency of the screen region. If a lossy update is forced, then it will be refreshed with a lossless update as soon as the update frequency goes ba

[Qemu-devel] [PATCH v2 07/15] vnc: palette: and fill and color calls.

2010-11-11 Thread Corentin Chary
These two helpers are needed for zrle and zywrle. Signed-off-by: Corentin Chary --- ui/vnc-palette.c | 33 + ui/vnc-palette.h |3 +++ 2 files changed, 36 insertions(+), 0 deletions(-) diff --git a/ui/vnc-palette.c b/ui/vnc-palette.c index f93250b..d691a0c 1

[Qemu-devel] [PATCH v2 10/15] vnc: fix lossy rect refreshing

2010-11-11 Thread Corentin Chary
The for loop in send_lossy_rect was totally wrong, and we can't call vnc_set_bits() because it does not really do what it should. Use vnc_set_bit() directly instead. Signed-off-by: Corentin Chary --- ui/vnc.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ui/

[Qemu-devel] [PATCH v2 01/15] vnc: don't set the quality if lossy encoding are disabled

2010-11-11 Thread Corentin Chary
This should not change the current behavior, but if any new encoding try to use the tight quality, it will always be set to -1 when lossy encodings are disabled. Signed-off-by: Corentin Chary --- ui/vnc.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/ui/vnc.c b/ui/v

[Qemu-devel] [PATCH v2 03/15] vnc: refresh lossy rect after a given timeout

2010-11-11 Thread Corentin Chary
If an adaptive encoding has choosen to send a lossy update based on the result of vnc_update_freq(), then it should advertise it with vnc_sent_lossy_rect(). This will allow to automatically refresh this rect once it's static again. Signed-off-by: Corentin Chary --- ui/vnc-jobs-async.c |2 +

[Qemu-devel] [PATCH v2 12/15] vnc: use the new generic bitmap functions

2010-11-11 Thread Corentin Chary
Switch to bitmap.h and bitops.h instead of redefining our own bitmap helpers. Signed-off-by: Corentin Chary --- ui/vnc.c | 91 ++--- ui/vnc.h |7 +++-- 2 files changed, 25 insertions(+), 73 deletions(-) diff --git a/ui/vnc.c b/ui/vnc

[Qemu-devel] [PATCH v2 05/15] vnc: palette: use a pool to reduce memory allocations

2010-11-11 Thread Corentin Chary
We now that the palette will never have more than 256 elements. Let's use a pool to reduce malloc calls. Signed-off-by: Corentin Chary --- ui/vnc-palette.c | 18 ++ ui/vnc-palette.h |3 ++- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/ui/vnc-palette.c b/u

[Qemu-devel] [PATCH v2 14/15] vnc: tight: tweak adaptive tight settings

2010-11-11 Thread Corentin Chary
The force_jpeg threshold was too low. Signed-off-by: Corentin Chary --- ui/vnc-enc-tight.c | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index 81024d5..82c1e96 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc

Re: [Qemu-devel] Log Console Output to File

2010-11-11 Thread Mulyadi Santosa
On Thu, Nov 11, 2010 at 12:50, wrote: > Hi, > > Is there a way to log / copy the console output (like the Linux boot info, if > booting QEMU to Linux) to a file? I think you could consider booting Linux in serial console...then start Qemu with -nographic. From there, everything will be spilled

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-11 Thread Avi Kivity
On 11/11/2010 03:47 PM, Stefan Hajnoczi wrote: Some virtio devices are known to have guest drivers which expect a notify to be processed synchronously and spin waiting for completion. Only enable ioeventfd for virtio-blk and virtio-net for now. Which drivers are these? I only know of the virt

[Qemu-devel] [PATCH v2 02/15] vnc: add a way to get the update frequency for a given region

2010-11-11 Thread Corentin Chary
This patch compute the update frequency (in Hz) for each 64x64 rects. Any adaptive encoding can get this value using vnc_update_freq(), and switch to a lossy encoding if the value is too high. The frequency is pre-calculated every 500ms, based on the last 10 updates per 64x64 rect. If a 64x64 rec

[Qemu-devel] [PATCH v2 04/15] vnc: tight: use the update frequency to choose between lossy and lossless

2010-11-11 Thread Corentin Chary
Use the new update frequency infrastructure to use jpeg for regions with high update frequency. Signed-off-by: Corentin Chary --- ui/vnc-enc-tight.c | 75 +++- 1 files changed, 62 insertions(+), 13 deletions(-) diff --git a/ui/vnc-enc-tight.c b/

[Qemu-devel] [PATCH v2 13/15] vnc: don't try to send bigger updates that client height

2010-11-11 Thread Corentin Chary
Respect client size if it doesn't not support desktop resizing. Signed-off-by: Corentin Chary --- ui/vnc.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 600ea75..9189014 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -795,12 +795,11 @@ stati

[Qemu-devel] Re: [PATCH v2 00/15] vnc: adapative tight, zrle, zywrle, and bitmap module

2010-11-11 Thread Alexander Graf
Corentin Chary wrote: > Hi, > > I rebased the series against current master, it contains: > > - Adaptive Tight Encoding: send lossy or lossless updates depending on the > update frequency of the screen region. If a lossy update is forced, then > it will be refreshed with a lossless update as soo

Re: [Qemu-devel] Log Console Output to File

2010-11-11 Thread David S. Ahern
On 11/11/10 09:57, Mulyadi Santosa wrote: > On Thu, Nov 11, 2010 at 12:50, wrote: >> Hi, >> >> Is there a way to log / copy the console output (like the Linux boot info, >> if booting QEMU to Linux) to a file? > > I think you could consider booting Linux in serial console...then > start Qemu

Re: [Qemu-devel] No Virtual Console

2010-11-11 Thread Mulyadi Santosa
On Thu, Nov 11, 2010 at 12:49, wrote: > Hi, My apologies up front for the dumb question, but ... I am running qemu > (actually, qemu-system-arm), and when I launch it I do not get a new virtual > console to open. I have had this in the past (older Linux install), but > inside OpenSuSE 11.3, with

[Qemu-devel] [PATCH v2 06/15] vnc: palette: add palette_init calls

2010-11-11 Thread Corentin Chary
This allow to use palette on the stack instead of always allocating them. Signed-off-by: Corentin Chary --- ui/vnc-palette.c |8 +++- ui/vnc-palette.h |1 + 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/ui/vnc-palette.c b/ui/vnc-palette.c index c47420b..f93250b 10064

[Qemu-devel] [PATCH v2 15/15] vnc: add a non-adaptive option

2010-11-11 Thread Corentin Chary
This option allow to disable adaptive behaviors in some encodings. Signed-off-by: Corentin Chary --- qemu-options.hx|9 + ui/vnc-enc-tight.c |2 +- ui/vnc.c | 13 + ui/vnc.h |1 + 4 files changed, 20 insertions(+), 5 deletions(-) diff --

[Qemu-devel] [PATCH v2 09/15] vnc: fix uint8_t comparisons with negative values

2010-11-11 Thread Corentin Chary
Signed-off-by: Corentin Chary --- ui/vnc-enc-tight.c |4 ++-- ui/vnc-enc-zrle.c |3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index ad9a9a8..81024d5 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -1546,7 +1546,

Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Anthony Liguori
On 11/11/2010 10:55 AM, Luiz Capitulino wrote: On Thu, 11 Nov 2010 16:47:41 +0100 Markus Armbruster wrote: Luiz Capitulino writes: On Wed, 10 Nov 2010 14:20:12 +0100 Markus Armbruster wrote: Luiz Capitulino writes: [...] diff --git a/qmp-commands.hx b

Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Anthony Liguori
On 11/11/2010 10:39 AM, Daniel P. Berrange wrote: IIUC, the FDs sent/received via struct cmsghdr are in a strictly ordered array, so why not just define a placeholder syntax for the commands that maps to the array indexes. eg netdev_add tap,fd=$0,vhost_fd=$1,id=hostnet0 The '$' sign is not v

Re: [Qemu-devel] [PATCH 0/3] add usb_detach and usb_attach (v3)

2010-11-11 Thread Alon Levy
On Thu, Nov 11, 2010 at 04:03:14PM +0100, Markus Armbruster wrote: [snip] > Agree. > > Summary so far: > > 1. usb_{attach,detach} looks like yet another special-purpose command >where a general command would make sense, namely >device_{attach,detach}. We have a few of those, e.g. usb_add

[Qemu-devel] [PATCH v2 11/15] bitmap: add a generic bitmap and bitops library

2010-11-11 Thread Corentin Chary
Add most used bitmap and bitops functions into bitmap.c and bitops.c. Theses functions are mostly copied from Linux kernel source. Some of these functions are already redefined in the VNC server. Some of them could be used for some block stuff. The yet yo be submitted NUMA work also need bitmaps.

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-11 Thread Gleb Natapov
On Thu, Nov 11, 2010 at 07:12:40PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 11, 2010 at 06:59:29PM +0200, Avi Kivity wrote: > > On 11/11/2010 03:47 PM, Stefan Hajnoczi wrote: > > >Some virtio devices are known to have guest drivers which expect a notify > > >to be > > >processed synchronousl

Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Luiz Capitulino
On Thu, 11 Nov 2010 16:47:52 +0100 Markus Armbruster wrote: > Luiz Capitulino writes: > > > This command allows QMP clients to execute HMP commands. > > > > Please, check the documentation added to the qmp-commands.hx file > > for additional details about the interface and its limitations. > >

[Qemu-devel] Re: [PATCH 2/3] virtio-pci: Use ioeventfd for virtqueue notify

2010-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2010 at 06:59:29PM +0200, Avi Kivity wrote: > On 11/11/2010 03:47 PM, Stefan Hajnoczi wrote: > >Some virtio devices are known to have guest drivers which expect a notify to > >be > >processed synchronously and spin waiting for completion. Only enable > >ioeventfd > >for virtio-bl

[Qemu-devel] [PATCH 1/8] ARM: Fix decoding of VFP forms of VCVT between float and int/fixed

2010-11-11 Thread Peter Maydell
Correct the decoding of source and destination registers for the VFP forms of the VCVT instructions which convert between floating point and integer or fixed-point. Signed-off-by: Peter Maydell --- target-arm/translate.c | 19 --- 1 files changed, 12 insertions(+), 7 deletions(

[Qemu-devel] [PATCH 4/8] ARM: Return correct result for float-to-integer conversion of NaN

2010-11-11 Thread Peter Maydell
The ARM architecture mandates that converting a NaN value to integer gives zero. This isn't the behaviour of the SoftFloat library, so NaNs must be special-cased. Signed-off-by: Peter Maydell --- target-arm/helper.c | 44 1 files changed, 44 inserti

[Qemu-devel] [PATCH 7/8] softfloat: Add float/double to 16 bit integer conversion functions

2010-11-11 Thread Peter Maydell
The ARM architecture needs float/double to 16 bit integer conversions. (The 32 bit versions aren't sufficient because of the requirement to saturate at 16 bit MAXINT/MININT and to get the exception bits right.) Signed-off-by: Peter Maydell --- fpu/softfloat.c | 136 +

[Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus.

2010-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2010 at 06:07:53PM +0200, Gleb Natapov wrote: > On Thu, Nov 11, 2010 at 05:05:11PM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 11, 2010 at 11:07:01AM +0100, Gerd Hoffmann wrote: > > > On 11/10/10 18:34, Michael S. Tsirkin wrote: > > > >On Wed, Nov 10, 2010 at 07:14:15PM +0200,

[Qemu-devel] [PATCH 0/8] ARM: fix VCVT instructions

2010-11-11 Thread Peter Maydell
This patch series corrects a number of errors in the decoding and implementation of various forms of the ARM VCVT instruction. The resulting qemu has been tested by execution of 100,000 random variants of these instruction patterns with register values cross-checked against the results given by Cor

[Qemu-devel] [PATCH 6/8] ARM: Ignore top 16 bits when doing VCVT from 16 bit fixed point

2010-11-11 Thread Peter Maydell
VCVT of 16 bit fixed point to float should ignore the top 16 bits of the source register. Cast to int16_t and friends rather than int16 -- the former is guaranteed exactly 16 bits wide where the latter is merely at least 16 bits wide (and so is usually 32 bits). Signed-off-by: Peter Maydell ---

[Qemu-devel] [PATCH 8/8] ARM: Implement VCVT to 16 bit integer using new softfloat routines

2010-11-11 Thread Peter Maydell
Use the softfloat conversion routines for conversion to 16 bit integers, because just casting to a 16 bit type truncates the value rather than saturating it at 16-bit MAXINT/MININT. Signed-off-by: Peter Maydell --- target-arm/helper.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

[Qemu-devel] [PATCH 5/8] ARM: Return correct result for single<->double conversion of NaN

2010-11-11 Thread Peter Maydell
The ARM ARM defines that if the input to a single<->double conversion is a NaN then the output is always forced to be a quiet NaN by setting the most significant bit of the fraction part. Signed-off-by: Peter Maydell --- target-arm/helper.c | 20 ++-- 1 files changed, 18 insert

[Qemu-devel] [PATCH 2/8] ARM: Fix decoding of Neon forms of VCVT between float and fixed point

2010-11-11 Thread Peter Maydell
Fix errors in the decoding of the Neon forms of fixed-point VCVT: * fixed-point VCVT is op 14 and 15, not 15 and 16 * the fbits immediate field was being misinterpreted * the sense of the to_fixed bit was inverted Signed-off-by: Peter Maydell --- target-arm/translate.c |8 ++-- 1 file

[Qemu-devel] [PATCH 3/8] ARM: Fix sense of to_integer bit in Neon VCVT float/int conversion

2010-11-11 Thread Peter Maydell
Signed-off-by: Peter Maydell --- target-arm/translate.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target-arm/translate.c b/target-arm/translate.c index 696abf6..afb3872 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -5664,16 +5664,16 @@ s

[Qemu-devel] Re: [PATCH v2 0/3] virtio: Use ioeventfd for virtqueue notify

2010-11-11 Thread Michael S. Tsirkin
On Thu, Nov 11, 2010 at 01:47:19PM +, Stefan Hajnoczi wrote: > This is a rewrite of the virtio-ioeventfd patchset to work at the virtio-pci.c > level instead of virtio.c. This results in better integration with the > host/guest notifier code and makes the code simpler (no more state machine).

[Qemu-devel] Re: [PATCHv3 00/14] boot order specification

2010-11-11 Thread Blue Swirl
On Thu, Nov 11, 2010 at 10:21 AM, Gerd Hoffmann wrote: > On 11/10/10 18:14, Gleb Natapov wrote: >> >> This is current sate of the patch series for people to comment on. >> I am using open firmware naming scheme to specify device path names. >> >> Names look like this on pci machine: >> /p...@i0cf8

Re: [Qemu-devel] [PATCH 1/3] qemu-char: Introduce Memory driver

2010-11-11 Thread Luiz Capitulino
On Thu, 11 Nov 2010 17:32:06 +0100 Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Thu, 11 Nov 2010 16:30:26 +0100 > > Markus Armbruster wrote: > > > >> Luiz Capitulino writes: > >> > >> > This driver handles in-memory chardev operations. That's, all writes > >> > to this driver

Re: [Qemu-devel] [Bug 671831] Re: Sparc guest assert error

2010-11-11 Thread Nigel Horne
On 11/11/2010 09:17 AM, Stefan Hajnoczi wrote: > Thanks for providing the kernel and initrd. Unfortunately I wasn't > able to get them far enough to trigger the assert. More on that at > the bottom of this message but in the meantime I looked over the > relevant commits and spotted an issue with

Re: [Qemu-devel] [PATCH 0/2] msi support for virtfs

2010-11-11 Thread Gerd Hoffmann
On 11/11/10 16:37, Aneesh Kumar K. V wrote: On Thu, 11 Nov 2010 12:59:24 +0100, Gerd Hoffmann wrote: Hi, This tiny patch series adds msi support for virtfs. It's two patches only because we need a compat property to stay compatible with -stable and we don't have a pc-0.14 machine type yet,

Re: [Qemu-devel] [PATCH v2 03/15] vnc: refresh lossy rect after a given timeout

2010-11-11 Thread Blue Swirl
On Thu, Nov 11, 2010 at 4:56 PM, Corentin Chary wrote: > If an adaptive encoding has choosen to send a lossy update > based on the result of vnc_update_freq(), then it should advertise > it with vnc_sent_lossy_rect(). This will allow to automatically refresh > this rect once it's static again. > >

Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 11 Nov 2010 16:47:41 +0100 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > On Wed, 10 Nov 2010 14:20:12 +0100 >> > Markus Armbruster wrote: >> > >> >> Luiz Capitulino writes: >> [...] >> >> > diff --git a/qmp-commands.hx b/qmp-commands.hx >>

Re: [Qemu-devel] [PATCH v2 11/15] bitmap: add a generic bitmap and bitops library

2010-11-11 Thread Blue Swirl
On Thu, Nov 11, 2010 at 4:57 PM, Corentin Chary wrote: > Add most used bitmap and bitops functions into bitmap.c and bitops.c. > Theses functions are mostly copied from Linux kernel source. > > Some of these functions are already redefined in the VNC server. Some > of them could be used for some b

Re: [Qemu-devel] [PATCH 4/8] ARM: Return correct result for float-to-integer conversion of NaN

2010-11-11 Thread Nathan Froyd
On Thu, Nov 11, 2010 at 06:23:58PM +, Peter Maydell wrote: > The ARM architecture mandates that converting a NaN value to > integer gives zero. This isn't the behaviour of the SoftFloat > library, so NaNs must be special-cased. This is correct, but it's really only correct if FP traps are disa

[Qemu-devel] [PATCH v3 0/3]: QMP: Human Monitor passthrough

2010-11-11 Thread Luiz Capitulino
Simple example: -> { "execute": "human-monitor-command", "arguments": { "command-line": "print /i 10+25" } } <- { "return": "35\r\n" } Please, check individual patches for details. Also note that this series depends on the script improvements one. Also, Markus suggestion of having an assert() i

[Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command

2010-11-11 Thread Luiz Capitulino
This command allows QMP clients to execute HMP commands. Please, check the documentation added to the qmp-commands.hx file for additional details about the interface and its limitations. Signed-off-by: Luiz Capitulino --- monitor.c | 38 ++ qmp-comman

[Qemu-devel] [PATCH 1/3] qemu-char: Introduce Memory driver

2010-11-11 Thread Luiz Capitulino
This driver handles in-memory chardev operations. That's, all writes to this driver are stored in an internal buffer and it doesn't talk to the external world in any way. Right now it's very simple: it supports only writes. But it can be easily extended to support more operations. This is going t

[Qemu-devel] [PATCH 3/3] QMP/qmp-shell: Introduce HMP mode

2010-11-11 Thread Luiz Capitulino
In which qmp-shell will exclusively use the HMP passthrough feature, this is useful for testing. Example: # ./qmp-shell -H qmp-sock Welcome to the HMP shell! Connected to QEMU 0.13.50 (QEMU) info network VLAN 0 devices: user.0: net=10.0.2.0, restricted=n e1000.0

Re: [Qemu-devel] No Virtual Console

2010-11-11 Thread Russell Morris
Hi, Yes, I am in runlevel 5. I have to admit, I did check /etc/inittab, but I'm not sure what I'm looking for ... :-(. A bit lost here as to what you're saying, sorry! Can you clarify a bit? Yes, VNC works - I was trying to say that, just not very clearly. What I'm after though is to hav

Re: [Qemu-devel] Log Console Output to File

2010-11-11 Thread Russell Morris
Hi, Thanks for the pointer! I tried this, but I get an error message, as follows ... chardev: opening backent "stdio" failed qemu: could not open serial device 'stdio': Inappropriate ioctl for device. Thoughts? Thanks again! On Thu, Nov 11, 2010 11:22 AM, "David S. Ahern" wrote:

  1   2   >