[Qemu-devel] Re: [PATCH v2][qemu-iotests] test bdrv_truncate()

2010-05-05 Thread Christoph Hellwig
On Mon, Apr 26, 2010 at 11:13:31AM +0100, Stefan Hajnoczi wrote: This patch adds an image resize grow test to ensure that existing data is not lost during grow and new space is zeroed. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Thanks, applied.

[Qemu-devel] Re: [PATCH] qemu-iotests: Improve rebase test

2010-05-05 Thread Christoph Hellwig
On Thu, Apr 29, 2010 at 02:47:17PM +0200, Kevin Wolf wrote: The old test didn't consider cases in which the COW files contains some unallocated clusters and after them allocated ones again. Signed-off-by: Kevin Wolf kw...@redhat.com Thanks, applied.

Re: [Qemu-devel] Qemu-KVM 0.12.3 and Multipath - Assertion

2010-05-05 Thread Christoph Hellwig
On Tue, May 04, 2010 at 04:01:35PM +0200, Kevin Wolf wrote: Great, I'm going to submit it as a proper patch then. Christoph, by now I'm pretty sure it's right, but can you have another look if this is correct, anyway? It looks correct to me - we really shouldn't update the the fields until

[Qemu-devel] [PATCH v6 0/6] char: non-blocking writes, virtio-console flow control

2010-05-05 Thread Amit Shah
Hello, This series lets interested callers ask for an -EAGAIN return from the chardev backends (only unix and tcp sockets as of now) to implement their own flow control. A new call, qemu_chr_write_nb() is added, that will fallback to qemu_chr_write() if the backend file isn't non-blocking or if

[Qemu-devel] [PATCH v6 1/6] virtio-console: Factor out common init between console and generic ports

2010-05-05 Thread Amit Shah
The initialisation for generic ports and console ports is similar. Factor out the parts that are the same in a different function that can be called from each of the initfns. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 31 ++- 1 files

[Qemu-devel] [PATCH v6 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Amit Shah
Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shah amit.s...@redhat.com --- gdbstub.c|9 +++-- hw/debugcon.c|2 +- hw/escc.c|9

[Qemu-devel] [PATCH v6 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Amit Shah
On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return the error (on a subsequent call to qemu_chr_write()). Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 12 +++- 1 files

[Qemu-devel] [PATCH v6 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Amit Shah
For char devices whose backing files are open in non-blocking mode, non-blocking writes can now be made using qemu_chr_write_nb(). For non-blocking chardevs, we can return -EAGAIN to callers of qemu_chr_write_nb(). When the backend is ready to accept more data, we can let the caller know via a

[Qemu-devel] [PATCH v6 5/6] char: unix/tcp: Add a non-blocking write handler

2010-05-05 Thread Amit Shah
Add a non-blocking write handler that can return with -EAGAIN to the caller and also callback when the socket becomes writable. Non-blocking writes are only enabled for sockets that are opened in non-blocking mode and only for callers that have registered a callback handler for resuming writes.

[Qemu-devel] [PATCH v6 6/6] virtio-console: Throttle virtio-serial-bus if we can't consume any more guest data

2010-05-05 Thread Amit Shah
If the char device we're connected to is overwhelmed with data and it can't accept any more, signal to the virtio-serial-bus to stop sending us more data till we tell otherwise. If the current buffer being processed hasn't been completely written out to the char device, we have to keep it around

[Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Christoph Hellwig
On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph, could you look over this please? I note that the interface seems full of warts to me, this might be a first step to cleaning them. The

Re: [Qemu-devel] [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Christoph Hellwig
On Tue, Apr 20, 2010 at 02:46:35AM +0100, Jamie Lokier wrote: Does this mean that virtio-blk supports all three combinations? 1. FLUSH that isn't a barrier 2. FLUSH that is also a barrier 3. Barrier that is not a flush 1 is good for fsync-like operations; 2 is good for

[Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Michael S. Tsirkin
On Tue, May 04, 2010 at 08:54:59PM +0200, Christoph Hellwig wrote: On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph, could you look over this please? I note that the interface seems

[Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Michael S. Tsirkin
On Tue, May 04, 2010 at 09:56:18PM +0300, Michael S. Tsirkin wrote: On Tue, May 04, 2010 at 08:54:59PM +0200, Christoph Hellwig wrote: On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph,

Re: [Qemu-devel] [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Michael S. Tsirkin
On Tue, May 04, 2010 at 08:56:14PM +0200, Christoph Hellwig wrote: On Tue, Apr 20, 2010 at 02:46:35AM +0100, Jamie Lokier wrote: Does this mean that virtio-blk supports all three combinations? 1. FLUSH that isn't a barrier 2. FLUSH that is also a barrier 3. Barrier that is not

[Qemu-devel] [PATCH] sparc64: implement global translation table entries

2010-05-05 Thread Igor V. Kovalenko
From: Igor V. Kovalenko igor.v.kovale...@gmail.com - match global tte against any context - show global tte in MMU dump v0-v1: added default case to switch statement in demap_tlb - should fix gcc warning about uninitialized context variable Signed-off-by: Igor V. Kovalenko

Re: [Qemu-devel] [PATCH 2/3] sparc64: implement global translation table entries

2010-05-05 Thread Igor Kovalenko
On Tue, May 4, 2010 at 12:29 AM, Blue Swirl blauwir...@gmail.com wrote: On 5/3/10, Igor Kovalenko igor.v.kovale...@gmail.com wrote: On Tue, May 4, 2010 at 12:06 AM, Blue Swirl blauwir...@gmail.com wrote:   On 5/3/10, Igor V. Kovalenko igor.v.kovale...@gmail.com wrote:   From: Igor V. Kovalenko

[Qemu-devel] [PATCH] sparc64: implement global translation table entries v1

2010-05-05 Thread Igor V. Kovalenko
From: Igor V. Kovalenko igor.v.kovale...@gmail.com - match global tte against any context - show global tte in MMU dump v0-v1: added default case to switch statement in demap_tlb - should fix gcc warning about uninitialized context variable Signed-off-by: Igor V. Kovalenko

[Qemu-devel] Re: [PATCH v6 0/6] char: non-blocking writes, virtio-console flow control

2010-05-05 Thread Gerd Hoffmann
On 05/04/10 20:23, Amit Shah wrote: Hello, This series lets interested callers ask for an -EAGAIN return from the chardev backends (only unix and tcp sockets as of now) to implement their own flow control. A new call, qemu_chr_write_nb() is added, that will fallback to qemu_chr_write() if the

[Qemu-devel] Re: [PATCH v6 5/6] char: unix/tcp: Add a non-blocking write handler

2010-05-05 Thread Juan Quintela
Amit Shah amit.s...@redhat.com wrote: Add a non-blocking write handler that can return with -EAGAIN to the caller and also callback when the socket becomes writable. Non-blocking writes are only enabled for sockets that are opened in non-blocking mode and only for callers that have registered

Re: [Qemu-devel] [PATCH 2/3] Compile vl.c once

2010-05-05 Thread Blue Swirl
On 5/4/10, TeLeMan gele...@gmail.com wrote: This patch breaks cpu list(-cpu ?). Thanks for reporting. Fixed in HEAD.

Re: [Qemu-devel] [PATCH v5 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Blue Swirl
On 5/4/10, Amit Shah amit.s...@redhat.com wrote: Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shah amit.s...@redhat.com --- gdbstub.c|9 +++--

[Qemu-devel] Re: [PATCH v6 5/6] char: unix/tcp: Add a non-blocking write handler

2010-05-05 Thread Amit Shah
On (Tue) May 04 2010 [21:54:09], Juan Quintela wrote: static void tcp_chr_connect(void *opaque) { CharDriverState *chr = opaque; TCPCharDriver *s = chr-opaque; +IOHandler *write_cb; +int flags; +bool nonblock; + +flags = fcntl(s-fd, F_GETFL); +if

[Qemu-devel] Re: sparc64 lazy conditional codes evaluation

2010-05-05 Thread Blue Swirl
On 5/3/10, Igor Kovalenko igor.v.kovale...@gmail.com wrote: On Mon, May 3, 2010 at 11:54 PM, Blue Swirl blauwir...@gmail.com wrote: On 5/3/10, Igor Kovalenko igor.v.kovale...@gmail.com wrote: On Mon, May 3, 2010 at 11:24 PM, Blue Swirl blauwir...@gmail.com wrote: On 5/3/10, Igor

Re: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Jamie Lokier
Jens Axboe wrote: On Tue, May 04 2010, Rusty Russell wrote: ISTR someone mentioning a desire for such an API years ago, so CC'ing the usual I/O suspects... It would be nice to have a more fuller API for this, but the reality is that only the flush approach is really workable. Even just

[Qemu-devel] Re: [PATCH v6 6/6] virtio-console: Throttle virtio-serial-bus if we can't consume any more guest data

2010-05-05 Thread Juan Quintela
Amit Shah amit.s...@redhat.com wrote: If the char device we're connected to is overwhelmed with data and it can't accept any more, signal to the virtio-serial-bus to stop sending us more data till we tell otherwise. If the current buffer being processed hasn't been completely written out to

Re: [Qemu-devel] [PATCH 1/2] qemu-error: Introduce get_errno_name()

2010-05-05 Thread Luiz Capitulino
On Tue, 04 May 2010 09:03:47 -0500 Anthony Liguori anth...@codemonkey.ws wrote: On 05/04/2010 08:56 AM, Luiz Capitulino wrote: On Mon, 03 May 2010 08:16:35 -0500 Anthony Liguorianth...@codemonkey.ws wrote: On 05/03/2010 08:06 AM, Markus Armbruster wrote: Luiz

Re: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Jamie Lokier
Rusty Russell wrote: On Fri, 19 Feb 2010 08:52:20 am Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph, could you look over this please? I note that the interface seems full of warts to me, this might be a first step to

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Reinhard Max
Hi, On Tue, 4 May 2010 at 11:23, Anthony Liguori wrote: 0.11.0 is pretty old. Please update your patch against the latest git. Ok, will do. I'm not sure we're doing the wrong thing right now. Well, I think it just can't be correct, that an IPv6-enabled process running on a dual-stack

Re: [Qemu-devel] Re: [RFC] [PATCH] add ahci support into qemu

2010-05-05 Thread Sebastian Herbszt
乔崇 wrote: I add Sebastian Herbsz's patch,add WIN_WIN_STANDBYNOW1 support to fix hw_error on linux shut down etc. I am not familiar with git send-email,I am studying it now :). [snip] From e94912b03ed33080d550eb5764fc99911498101b Mon Sep 17 00:00:00 2001 From: QiaoChong

Re: [Qemu-devel] [PATCH, RFC] block: separate raw images from the file protocol

2010-05-05 Thread Stefan Weil
Am 08.04.2010 11:50, schrieb Kevin Wolf: Am 07.04.2010 22:30, schrieb Christoph Hellwig: We're running into various problems because the raw file access, which is used internally by the various image formats is entangled with the raw image format, which maps the VM view 1:1 to a file

[Qemu-devel] Re: [RFC] [PATCH] add ahci support into qemu

2010-05-05 Thread Sebastian Herbszt
Elek Roland wrote: On v, 2010-05-02 at 17:56 +0200, Elek Roland wrote: I'm going to try the patch in practice as soon as I finish my university project. (It's due today.) I've tried the patch, and I can confirm that it does provide an AHCI device and a SATA disk. It shows up in qemu as an

[Qemu-devel] Problem with QEMU / KVM

2010-05-05 Thread K D
Hi I built 2.6.27.10 kernel with KVM configured as built-in. CONFIG_HAVE_KVM=y CONFIG_VIRTUALIZATION=y CONFIG_KVM=y CONFIG_KVM_INTEL=y I built qemu-kvm 0.12.2 from sources pointing to above kernel. When I spawn a VM, it hangs at boot. Pl see below. I copied qemu-kvm binary and bios, vga etc

[Qemu-devel] [PATCH v7 0/6]

2010-05-05 Thread Amit Shah
Hello, This series lets interested callers ask for an -EAGAIN return from the chardev backends (only unix and tcp sockets as of now) to implement their own flow control. A new call, qemu_chr_write_nb() is added, that will fallback to qemu_chr_write() if the backend file isn't non-blocking or if

[Qemu-devel] [PATCH v7 1/6] virtio-console: Factor out common init between console and generic ports

2010-05-05 Thread Amit Shah
The initialisation for generic ports and console ports is similar. Factor out the parts that are the same in a different function that can be called from each of the initfns. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/virtio-console.c | 31 ++- 1 files

[Qemu-devel] [PATCH v7 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Amit Shah
Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shah amit.s...@redhat.com --- gdbstub.c|9 +++-- hw/debugcon.c|2 +- hw/escc.c|9

[Qemu-devel] [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Amit Shah
On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return the error (on a subsequent call to qemu_chr_write()). Signed-off-by: Amit Shah amit.s...@redhat.com --- qemu-char.c | 12 +++- 1 files

[Qemu-devel] [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Amit Shah
For char devices whose backing files are open in non-blocking mode, non-blocking writes can now be made using qemu_chr_write_nb(). For non-blocking chardevs, we can return -EAGAIN to callers of qemu_chr_write_nb(). When the backend is ready to accept more data, we can let the caller know via a

[Qemu-devel] [PATCH v7 5/6] char: unix/tcp: Add a non-blocking write handler

2010-05-05 Thread Amit Shah
Add a non-blocking write handler that can return with -EAGAIN to the caller and also callback when the socket becomes writable. Non-blocking writes are only enabled for sockets that are opened in non-blocking mode and only for callers that have registered a callback handler for resuming writes.

[Qemu-devel] [PATCH v7 6/6] virtio-console: Throttle virtio-serial-bus if we can't consume any more guest data

2010-05-05 Thread Amit Shah
If the char device we're connected to is overwhelmed with data and it can't accept any more, signal to the virtio-serial-bus to stop sending us more data till we tell otherwise. If the current buffer being processed hasn't been completely written out to the char device, we have to keep it around

[Qemu-devel] Re: [PATCH v7 0/6] char: non-blocking writes, virtio-console flow control

2010-05-05 Thread Amit Shah
[Fix subject] Amit

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Anthony Liguori
On 05/04/2010 03:44 PM, Reinhard Max wrote: Hi, On Tue, 4 May 2010 at 11:23, Anthony Liguori wrote: 0.11.0 is pretty old. Please update your patch against the latest git. Ok, will do. I'm not sure we're doing the wrong thing right now. Well, I think it just can't be correct, that an

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Gerd Hoffmann
On 05/04/10 18:23, Anthony Liguori wrote: On 05/04/2010 08:49 AM, Reinhard Max wrote: Hi, I am maintaining the tightvnc package for openSUSE and was recently confronted with an alleged vnc problem with QWMU that turned out to be a shortcoming in QEMU's code for handling TCP server sockets,

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Anthony Liguori
On 05/04/2010 04:47 PM, Gerd Hoffmann wrote: On 05/04/10 18:23, Anthony Liguori wrote: On 05/04/2010 08:49 AM, Reinhard Max wrote: Hi, I am maintaining the tightvnc package for openSUSE and was recently confronted with an alleged vnc problem with QWMU that turned out to be a shortcoming in

Re: [Qemu-devel] [PATCH 1/2] qemu-error: Introduce get_errno_name()

2010-05-05 Thread Anthony Liguori
On 05/04/2010 03:30 PM, Luiz Capitulino wrote: StateVmSaveFailed is not like CommandFailed, there are five errors in do_savevm() and StateVmSaveFailed happens to be one of them. But I understand what you mean and I have considered doing something like it, one of the problems though is that

Re: [Qemu-devel] [PATCH 1/2] QMP: Introduce commands doc

2010-05-05 Thread Luiz Capitulino
On Mon, 03 May 2010 18:24:11 +0200 Markus Armbruster arm...@redhat.com wrote: + +Example: + +{ execute: migrate, arguments: { uri: tcp:0:4446 } } + +Notes: + +(1) The 'query-migrate' command should be used to check migration's progress +and final result (this information

[Qemu-devel] Re: [PATCH] pflash_cfi01: add device ID read command

2010-05-05 Thread Michael Walle
Ping for this patch. Anything wrong with it? Am Saturday 01 May 2010 19:34:06 schrieb Michael Walle: Add support to read manufacturer and device ID. For everything else (eg. lock bits) 0 is returned. Signed-off-by: Michael Walle mich...@walle.cc --- hw/pflash_cfi01.c | 20

[Qemu-devel] VNC heap corruption when display width is not a multiple of 16

2010-05-05 Thread Andrew Lutomirski
Hi all- qemu-kvm quite reliably crashes when running with a VNC viewer connected at 1400x1050. (The crash happens when changing resolution *from* 1400x1050 or disconnecting and reconnecting a client.) The problem is that vnc_refresh_server_surface overruns server-data and corrupts heap

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Reinhard Max
On Tue, 4 May 2010 at 23:47, Gerd Hoffmann wrote: My tigervnc (tightvnc successor) has IPv6 support and handles this just fine. Well, as I wrote, the code is not just used for vnc, but also for server sockets that (if I got that right) could be connected from telnet or netcat

[Qemu-devel] [PATCH 0/2] Release modifier keys (including Meta) on loss of focus

2010-05-05 Thread Brad Jorsch
I got tired of my guests thinking that the logo key was being constantly held down whenever I used Meta-Tab to switch away from the qemu window. It turns out that both the clear modifiers on focus loss feature in the SDL front-end was broken and Meta (i.e. the logo keys) wasn't being considered a

[Qemu-devel] [PATCH 2/2] Count logo keys as modifier keys

2010-05-05 Thread Brad Jorsch
These are often mapped to Meta on Linux. And I for one use Meta-Tab as the equivalent of Windows's Alt-Tab, so not having it marked as a modifier leaves the guest thinking it's permanently pressed. Signed-off-by: Brad Jorsch ano...@users.sourceforge.net --- sdl.c |2 ++ 1 files changed, 2

Re: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Rusty Russell
On Wed, 5 May 2010 05:47:05 am Jamie Lokier wrote: Jens Axboe wrote: On Tue, May 04 2010, Rusty Russell wrote: ISTR someone mentioning a desire for such an API years ago, so CC'ing the usual I/O suspects... It would be nice to have a more fuller API for this, but the reality is

[Qemu-devel] Re: [PATCH] [RESEND] Make char muxer more robust wrt small FIFOs

2010-05-05 Thread Jan Kiszka
Jan Kiszka wrote: Anthony Liguori wrote: On 05/04/2010 11:01 AM, Alexander Graf wrote: Am 04.05.2010 um 16:34 schrieb Anthony Liguori anth...@codemonkey.ws: On 05/04/2010 09:30 AM, Alexander Graf wrote: Am 04.05.2010 um 15:44 schrieb Anthony Liguori anth...@codemonkey.ws: On 04/20/2010

[Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-05 Thread Rusty Russell
On Wed, 5 May 2010 04:24:59 am Christoph Hellwig wrote: On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph, could you look over this please? I note that the interface seems full of warts

[Qemu-devel] Re: [PATCH] [RESEND] Make char muxer more robust wrt small FIFOs

2010-05-05 Thread Jan Kiszka
Jan Kiszka wrote: Alex, does this help as well? diff --git a/qemu-char.c b/qemu-char.c index ac65a1c..2b115a4 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -404,6 +404,8 @@ static int mux_chr_can_read(void *opaque) MuxDriver *d = chr-opaque; int m = d-focus; +

[Qemu-devel] [Commit 20d97356] Fix OpenBSD build

2010-05-05 Thread Kevin Wolf
Hi Blue Swirl, did I miss the patch posted for this commit? I can't find it on the mailing list. I think the BlockDriver declarations should really stay at the end of the source file of each driver. What about using a different way to get rid of the static forward declaration, namely using

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Daniel P. Berrange
On Tue, May 04, 2010 at 03:49:50PM +0200, Reinhard Max wrote: Hi, I am maintaining the tightvnc package for openSUSE and was recently confronted with an alleged vnc problem with QWMU that turned out to be a shortcoming in QEMU's code for handling TCP server sockets, which is used by the

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Gerd Hoffmann
Hi, When going for multiple listening sockets in qemu we have to figure how we'll handle this in a number of places as there is no single listening address any more. Well, that's what my patch is about. Sure. Did you take a look at it? Briefly, yes. Overall it looks sensible to me.

[Qemu-devel] [PATCH] block: Avoid unchecked casts for AIOCBs

2010-05-05 Thread Kevin Wolf
Use container_of for one direction and acb-common for the other one. Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c |3 ++- block/blkdebug.c |4 ++-- block/qcow.c |2 +- block/qcow2.c|2 +- block/vdi.c |2 +- 5 files changed, 7 insertions(+), 6

[Qemu-devel] [PATCH] ide: Fix ide_dma_cancel

2010-05-05 Thread Kevin Wolf
When cancelling a request, bdrv_aio_cancel may decide that it waits for completion of a request rather than for cancellation. IDE therefore can't abandon its DMA status before calling bdrv_aio_cancel; otherwise the callback of a completed request would use invalid data. Signed-off-by: Kevin Wolf

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Reinhard Max
Hi, On Wed, 5 May 2010 at 10:53, Gerd Hoffmann wrote: Noticed that it probably should get a few helper functions to handle FdLists to avoid the quite simliar open-coded loop-over-all-fds loops all over the place. indeed, thanks for the hint. I now have functions to create a new list

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Gerd Hoffmann
Hi, You'll run into qmp for sure when forward-porting the patches to the latest qemu bits. It is the machine-readable version of the monitor protocol (in qemu 0.12+). I guess that's the qemu_opt_set() calls at the end of inet_listen_opts()? See docs in QMP/*, the changes in monitor.c and

[Qemu-devel] question on virtio

2010-05-05 Thread Michael S. Tsirkin
Hi! I see this in virtio_ring.c: /* Put entry in available array (but don't update avail-idx * until they do sync). */ Why is it done this way? It seems that updating the index straight away would be simpler, while this might allow the host to specilatively look up the buffer

[Qemu-devel] Re: [PATCH v7 0/6]

2010-05-05 Thread Juan Quintela
Amit Shah amit.s...@redhat.com wrote: Hello, This series lets interested callers ask for an -EAGAIN return from the chardev backends (only unix and tcp sockets as of now) to implement their own flow control. A new call, qemu_chr_write_nb() is added, that will fallback to qemu_chr_write()

Re: [Qemu-devel] [PATCH, RFC] block: separate raw images from the file protocol

2010-05-05 Thread Kevin Wolf
Am 04.05.2010 22:58, schrieb Stefan Weil: Am 08.04.2010 11:50, schrieb Kevin Wolf: Am 07.04.2010 22:30, schrieb Christoph Hellwig: We're running into various problems because the raw file access, which is used internally by the various image formats is entangled with the raw image

[Qemu-devel] [PATCH 0/3] local cursor patches.

2010-05-05 Thread Gerd Hoffmann
Hi, Local cursor bits, rehashed after discussions with anthony. cheers, Gerd

[Qemu-devel] [PATCH 2/3] use new cursor struct + functions for vmware vga and sdl.

2010-05-05 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/vmware_vga.c | 40 +++- sdl.c | 52 +--- 2 files changed, 48 insertions(+), 44 deletions(-) diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c

[Qemu-devel] [PATCH 1/3] cursor: add cursor functions.

2010-05-05 Thread Gerd Hoffmann
Add a new cursor type to console.h and a bunch of functions to deal with cursors the (new) cursor.c file. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- Makefile.objs |3 +- console.h | 24 ++- cursor.c | 208 + 3

[Qemu-devel] [PATCH 3/3] vnc: rich cursor support.

2010-05-05 Thread Gerd Hoffmann
Uses VNC_ENCODING_RICH_CURSOR. Adding XCURSOR support should be possible without much trouble. Shouldn't be needed though as RICH_CURSOR is a superset of XCURSOR. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- vnc.c| 67 +++---

[Qemu-devel] Re: [PATCH v7 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Anthony Liguori
On 05/04/2010 04:39 PM, Amit Shah wrote: Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shahamit.s...@redhat.com --- gdbstub.c|9 +++-- hw/debugcon.c|

[Qemu-devel] Re: [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Anthony Liguori
On 05/04/2010 04:39 PM, Amit Shah wrote: On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return the error (on a subsequent call to qemu_chr_write()). Signed-off-by: Amit Shahamit.s...@redhat.com ---

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Anthony Liguori
On 05/04/2010 04:39 PM, Amit Shah wrote: For char devices whose backing files are open in non-blocking mode, non-blocking writes can now be made using qemu_chr_write_nb(). For non-blocking chardevs, we can return -EAGAIN to callers of qemu_chr_write_nb(). When the backend is ready to accept

Re: [Qemu-devel] [PATCH 1/6] bochs: use pread

2010-05-05 Thread Anthony Liguori
On 05/04/2010 05:44 AM, Christoph Hellwig wrote: Use pread instead of lseek + read in preparation of using the qemu block API. Signed-off-by: Christoph Hellwigh...@lst.de Looks good to me. Reviewed-by: Anthony Liguori aligu...@us.ibm.com Regards, Anthony Liguori Index:

[Qemu-devel] Re: [PATCH] [RESEND] Make char muxer more robust wrt small FIFOs

2010-05-05 Thread Alexander Graf
Am 05.05.2010 um 10:08 schrieb Jan Kiszka jan.kis...@web.de: Jan Kiszka wrote: Alex, does this help as well? diff --git a/qemu-char.c b/qemu-char.c index ac65a1c..2b115a4 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -404,6 +404,8 @@ static int mux_chr_can_read(void *opaque) MuxDriver *d

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:16:37], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: For char devices whose backing files are open in non-blocking mode, non-blocking writes can now be made using qemu_chr_write_nb(). For non-blocking chardevs, we can return -EAGAIN to callers of

[Qemu-devel] Re: [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:15:19], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return the error (on a subsequent call to

[Qemu-devel] Re: [PATCH v7 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:13:58], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead. Signed-off-by: Amit Shahamit.s...@redhat.com -

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Paul Brook
I really dislike the idea of adding another function for this. Can you explain why you need this functionality for virtio-console and why this functionality isn't needed for everything else? This functionality should (in principle) be used by all serial port implementations. Physical serial

[Qemu-devel] vgabios + qemu: issues and plans.

2010-05-05 Thread Gerd Hoffmann
Hi, Today we have two vgabios versions in qemu: The standard one (vgabios.bin) and the cirrus one (vgabios-cirrus.bin). The cirrus vgabios is a PCI ROM. We can (and do) load it into the ROM PCI bar. The vgabios checks the pci config space to figure where the linear framebuffer (for

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Anthony Liguori
On 05/05/2010 08:34 AM, Paul Brook wrote: I really dislike the idea of adding another function for this. Can you explain why you need this functionality for virtio-console and why this functionality isn't needed for everything else? This functionality should (in principle) be used by all

[Qemu-devel] Re: [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Anthony Liguori
On 05/05/2010 08:23 AM, Amit Shah wrote: On (Wed) May 05 2010 [08:15:19], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: On writing errors, we just returned -1 even if some bytes were already written out. Ensure we return the number of bytes written before we return

[Qemu-devel] Re: [PATCH v7 2/6] char: Add a QemuChrHandlers struct to initialise chardev handlers

2010-05-05 Thread Anthony Liguori
On 05/05/2010 08:25 AM, Amit Shah wrote: On (Wed) May 05 2010 [08:13:58], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: Instead of passing each handler in the qemu_add_handlers() function, create a struct of handlers that can be passed to the function instead.

[Qemu-devel] [PATCH v2 5/5] lsi: Handle removal of selected devices

2010-05-05 Thread Jan Kiszka
We must not store references to selected devices as they may be hot-removed. Instead, look up the device based on its tag right before using it. If the device disappeared, throw an interrupt and disconnect. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Changes in v2: - Fixed incorrect

[Qemu-devel] Re: [PATCH v7 3/6] char: Let writers know how much data was written in case of errors

2010-05-05 Thread Amit Shah
On (Wed) May 05 2010 [08:54:48], Anthony Liguori wrote: On 05/05/2010 08:23 AM, Amit Shah wrote: On (Wed) May 05 2010 [08:15:19], Anthony Liguori wrote: On 05/04/2010 04:39 PM, Amit Shah wrote: On writing errors, we just returned -1 even if some bytes were already written out.

[Qemu-devel] Re: [PATCH v7 4/6] char: Add qemu_chr_write_nb() for nonblocking writes

2010-05-05 Thread Paul Brook
On 05/05/2010 08:34 AM, Paul Brook wrote: I really dislike the idea of adding another function for this. Can you explain why you need this functionality for virtio-console and why this functionality isn't needed for everything else? This functionality should (in principle) be used by

Re: [Qemu-devel] [PATCH 5/6] parallels: use pread

2010-05-05 Thread Kevin Wolf
Am 04.05.2010 12:45, schrieb Christoph Hellwig: Use pread instead of lseek + read in preparation of using the qemu block API. Signed-off-by: Christoph Hellwig h...@lst.de Index: qemu-kevin/block/parallels.c === ---

Re: [Qemu-devel] simple block driver cleanups

2010-05-05 Thread Kevin Wolf
Am 04.05.2010 15:22, schrieb Christoph Hellwig: On Tue, May 04, 2010 at 02:38:07PM +0200, Kevin Wolf wrote: Am 04.05.2010 12:43, schrieb Christoph Hellwig: This series cleans up the simple read-only block drivers to use the qemu block device API to access their backing devices, making the code

Re: [Qemu-devel] [PATCH 1/2] qemu-error: Introduce get_errno_name()

2010-05-05 Thread Luiz Capitulino
On Tue, 04 May 2010 16:56:19 -0500 Anthony Liguori anth...@codemonkey.ws wrote: On 05/04/2010 03:30 PM, Luiz Capitulino wrote: StateVmSaveFailed is not like CommandFailed, there are five errors in do_savevm() and StateVmSaveFailed happens to be one of them. But I understand what

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Daniel P. Berrange
On Tue, May 04, 2010 at 04:50:34PM -0500, Anthony Liguori wrote: On 05/04/2010 04:47 PM, Gerd Hoffmann wrote: On 05/04/10 18:23, Anthony Liguori wrote: On 05/04/2010 08:49 AM, Reinhard Max wrote: Hi, I am maintaining the tightvnc package for openSUSE and was recently confronted with an

[Qemu-devel] [PATCH] char: Flush read buffer in mux_chr_can_read

2010-05-05 Thread Jan Kiszka
Move the buffer flush from mux_chr_read to mux_chr_can_read. While the latter is called periodically, the former will only be invoked when new characters arrive at the back-end. This caused problems to front-end drivers whenever they were unable to read data immediately, e.g. virtio-console

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Daniel P. Berrange
On Wed, May 05, 2010 at 10:53:00AM +0200, Gerd Hoffmann wrote: Hi, When going for multiple listening sockets in qemu we have to figure how we'll handle this in a number of places as there is no single listening address any more. Well, that's what my patch is about. Sure. Did you

[Qemu-devel] [PATCH 00/12] Cleanup linux-user/elfload.c, v2

2010-05-05 Thread Richard Henderson
Changes v1-v2: * Drop VDSO loading for the moment; let's concentrate on getting the basic elf loading in shape first. * Fix SH4-EB ELF_DATA definition * Re-base after pbrook's guest_base changes for the main executable. r~ Richard Henderson (12): linux-user: Handle filesz memsz

[Qemu-devel] [PATCH 02/12] Add more DT_* and AT_* constants to qemu's copy of elf.h.

2010-05-05 Thread Richard Henderson
Moving some PPC AT_* constants from elfload.c at the same time. Signed-off-by: Richard Henderson r...@twiddle.net --- elf.h| 44 linux-user/elfload.c |9 - 2 files changed, 44 insertions(+), 9 deletions(-) diff --git

[Qemu-devel] [PATCH 10/12] linux-user: Remove partial support for a.out interpreters.

2010-05-05 Thread Richard Henderson
At the bottom of the a.out support was the unimplemented load_aout_interp function. There were other portions of the support that didn't look right; when I went to look in the Linux kernel for clarification, I found that the support for such interpreters has been removed from binfmt_elf. There

Re: [Qemu-devel] simple block driver cleanups

2010-05-05 Thread Christoph Hellwig
On Wed, May 05, 2010 at 04:28:08PM +0200, Kevin Wolf wrote: For cloop I trust your test, and for bochs I did a very basic test myself (however, I doubt that anyone uses this driver, considering how hard it is to create such an image...). For parallels I still need to find out how to create an

[Qemu-devel] [PATCH 12/12] linux-user: Re-use load_elf_image for the main binary.

2010-05-05 Thread Richard Henderson
This requires moving the PT_INTERP extraction and GUEST_BASE handling into load_elf_image. Key this off a non-null pointer argument to receive the interpreter name. Signed-off-by: Richard Henderson r...@twiddle.net --- linux-user/elfload.c | 380

[Qemu-devel] [PATCH 05/12] linux-user: Define ELF_DATA generically.

2010-05-05 Thread Richard Henderson
The only consideration on this value is the target endianness. The existing defines were incorrect for alpha and sh4eb. Signed-off-by: Richard Henderson r...@twiddle.net --- linux-user/elfload.c | 30 ++ 1 files changed, 6 insertions(+), 24 deletions(-) diff --git

[Qemu-devel] [PATCH 07/12] linux-user: Load symbols from the interpreter.

2010-05-05 Thread Richard Henderson
First, adjust load_symbols to accept a load_bias parameter. At the same time, read the entire section header table in one go, use pread instead f lseek+read for the symbol and string tables, and properly free allocated structures on error exit paths. Second, adjust load_elf_interp to compute

Re: [Qemu-devel] Patch to improve handling of server sockets

2010-05-05 Thread Reinhard Max
Hi, I've attached a revised version of the patch against git as of this morning. It has even more FIXMEs in it than the previous version, because of the changes that went into QEMU since 0.11.0 and I think I'll have to leave those to you guys who are more familiar with QEMUs internals than

[Qemu-devel] [PATCH v5 4/5] RESEND: Inter-VM shared memory PCI device

2010-05-05 Thread Cam Macdonell
For completeness, just a one-line change to use the merged version of kvm_set_irqfd() --- Makefile.target |3 + hw/ivshmem.c| 727 +++ qemu-char.c |6 + qemu-char.h |3 + qemu-doc.texi | 25 ++ 5 files changed, 764

  1   2   >