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

[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 --- hw/virtio-console.c | 31 ++- 1 files changed, 14 insertions(+

[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 --- gdbstub.c|9 +++-- hw/debugcon.c|2 +- hw/escc.c|9 +++-- hw/etraxfs_ser.c

[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 --- qemu-char.c | 12 +++- 1 files changed, 11 insertions(+),

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

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

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

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

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 jo

[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

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

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 t

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

2010-05-05 Thread Igor V. Kovalenko
From: Igor V. Kovalenko - 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 --- target-sparc/cpu.h | 18 +

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 wrote: > On 5/3/10, Igor Kovalenko wrote: >> On Tue, May 4, 2010 at 12:06 AM, Blue Swirl wrote: >>  > On 5/3/10, Igor V. Kovalenko wrote: >>  >> From: Igor V. Kovalenko >>  >> >>  >>  - match global tte against any context >>  >>  - show global tte i

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

2010-05-05 Thread Igor V. Kovalenko
From: Igor V. Kovalenko - 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 --- target-sparc/cpu.h | 18 +

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

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

2010-05-05 Thread Juan Quintela
Amit Shah 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 a callback > ha

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

2010-05-05 Thread Blue Swirl
On 5/4/10, TeLeMan 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 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 > --- > gdbstub.c|9 +++-- > hw/debugcon.c|2 +- > hw/es

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

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

2010-05-05 Thread Blue Swirl
On 5/3/10, Igor Kovalenko wrote: > On Mon, May 3, 2010 at 11:54 PM, Blue Swirl wrote: > > On 5/3/10, Igor Kovalenko wrote: > >> On Mon, May 3, 2010 at 11:24 PM, Blue Swirl wrote: > >> > On 5/3/10, Igor Kovalenko wrote: > >> >> Hi! > >> >> > >> >> There is an issue with lazy conditio

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

[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 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 the char device

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 wrote: > On 05/04/2010 08:56 AM, Luiz Capitulino wrote: > > On Mon, 03 May 2010 08:16:35 -0500 > > Anthony Liguori wrote: > > > > > >> On 05/03/2010 08:06 AM, Markus Armbruster wrote: > >> > >>> Luiz Capitulino writes: > >>> > >>> >

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 ste

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 ma

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 Date: Tue, 4 May 2

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 sys

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

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

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

[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 --- hw/virtio-console.c | 31 ++- 1 files changed, 14 insertions(+

[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 --- gdbstub.c|9 +++-- hw/debugcon.c|2 +- hw/escc.c|9 +++-- hw/etraxfs_ser.c

[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 --- qemu-char.c | 12 +++- 1 files changed, 11 insertions(+),

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

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

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

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

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

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 QEM

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

[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 > --- > hw/pflash_cfi01.c | 20 > 1

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

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

2010-05-05 Thread Reinhard Max
On Tue, 4 May 2010 at 16:50, Anthony Liguori wrote: Personally, I'm inclined to agree that this is a client problem. That would be a violation of the "be liberal in what you accept and conservative in what you produce" principle and there are plenty of scenarios where even a client that Does

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 implementations

[Qemu-devel] [PATCH 1/2] Fix clearing modifiers on focus loss

2010-05-05 Thread Brad Jorsch
It seems there is an intention to clear all modifier keys (in the SDL front-end) when the window loses focus, but it seems that it doesn't work right. Let's just explicitly do it when we lose input focus. Signed-off-by: Brad Jorsch --- sdl.c |3 +++ 1 files changed, 3 insertions(+), 0 deleti

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

[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 --- sdl.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)

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 real

[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 : >>> On 05/04/2010 09:30 AM, Alexander Graf wrote: > Am 04.05.2010 um 15:44 schrieb Anthony Liguori : > >> On 04/20/2010 11:56 AM, Alexand

[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

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

2010-05-05 Thread Andrew Lutomirski
On Tue, May 4, 2010 at 6:12 PM, Andrew Lutomirski wrote: > Hi all- > > The patch below (obviously only for testing) demonstrates the problem > and prevents the crash, but it introduces a black line 8 pixels wide > on the right when running at 1400x1050.  I'm not sure what's going on > -- either I

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

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

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

[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 --- 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 deletions(-) di

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

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 q

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

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

[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 --- 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 index e709369..bf2a699

[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 --- Makefile.objs |3 +- console.h | 24 ++- cursor.c | 208 + 3 files changed, 232 i

[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 --- vnc.c| 67 +++--- vnc.h|

[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 Shah --- gdbstub.c|9 +++-- hw/debugcon.c|2 +- hw/escc.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 Shah --- qemu-char.c | 12 +

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

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 Hellwig Looks good to me. Reviewed-by: Anthony Liguori Regards, Anthony Liguori Index: qemu-kevin/block/bochs.c

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

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

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

[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 Shah >> -qemu_chr

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

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

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

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

[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 --- Changes in v2: - Fixed incorrect tag->id conversion (missi

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

[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

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 > > Index: qemu-kevin/block/parallels.c > === > --- qemu-kevin.or

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

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 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 you mean and

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

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

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

2010-05-05 Thread Stefan Weil
Am 05.05.2010 14:45, schrieb Kevin Wolf: Am 04.05.2010 22:58, schrieb Stefan Weil: This patch (commit 84a12e6648444f517055138a7d7f25a22d7e1029) breaks QEMU for Win32: QEMU can no longer access \\.\PhysicalDrive0 - a feature I use quite often. Found by git bisect, tested like this: qemu \\.\P

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

[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 --- elf.h| 44 linux-user/elfload.c |9 - 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/elf.h b/elf.h inde

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

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

[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 --- linux-user/elfload.c | 380 ++ 1 files chang

[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 --- linux-user/elfload.c | 30 ++ 1 files changed, 6 insertions(+), 24 deletions(-) diff --git a/linux-user/elfl

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

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

  1   2   >