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

2011-01-22 Thread Peter Maydell
On 20 January 2011 17:08, Stefan Weil wrote: > Yes, that's a problem with some parts of the old code. > For files which you want to modify, you could remove > the spaces with your script before applying your other > modifications and create a separate patch which only > removes the superfluous spa

[Qemu-devel] [RFC][PATCH 07/12] coroutine: Add coroutine_is_leader()

2011-01-22 Thread Stefan Hajnoczi
Make it possible to check whether a coroutine is the default main coroutine (the "leader") or not. Signed-off-by: Stefan Hajnoczi --- coroutine.h |2 ++ coroutine_ucontext.c |5 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/coroutine.h b/coroutine.h index

[Qemu-devel] [RFC][PATCH 04/12] coroutine: Use thread-local leader and current variables

2011-01-22 Thread Stefan Hajnoczi
Each pthread should have its own current coroutine. This ensures coroutines are thread-safe. Signed-off-by: Stefan Hajnoczi --- coroutine_ucontext.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/coroutine_ucontext.c b/coroutine_ucontext.c index f76da94..289e5bd 10

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

2011-01-22 Thread Stefan Hajnoczi
This patch series prototypes making QCOW2 fully asynchronous to eliminate the timing jitter and poor performance that has been observed. QCOW2 has asynchronous I/O code paths for some of the read/write common cases but metadata access is always synchronous. One solution is to rewrite QCOW2 to be

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

2011-01-22 Thread Stefan Hajnoczi
Add functions to create coroutines and transfer control into a coroutine and back out again. Signed-off-by: Stefan Hajnoczi --- Makefile.objs|2 +- qemu-coroutine.c | 40 qemu-coroutine.h | 76 ++ 3 file

[Qemu-devel] [RFC][PATCH 09/12] block: Add bdrv_co_readv() and bdrv_co_writev()

2011-01-22 Thread Stefan Hajnoczi
Add coroutine versions of the bdrv_aio_readv() and bdrv_aio_writev() functions. The coroutine version doesn't take a callback and simply returns the error value. Behind the scenes they are implemented using bdrv_aio_readv() and bdrv_aio_writev(). Signed-off-by: Stefan Hajnoczi --- block.c |

[Qemu-devel] [RFC][PATCH 08/12] coroutine: Add qemu_in_coroutine()

2011-01-22 Thread Stefan Hajnoczi
The qemu_in_coroutine() function checks whether or not we are currently in a user coroutine. This can be used to distinguish between executing normal vcpu or iothread code from executing a coroutine. Signed-off-by: Stefan Hajnoczi --- qemu-coroutine.c |5 + qemu-coroutine.h |7 +

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

2011-01-22 Thread Stefan Hajnoczi
Converting qcow2 to use coroutines is fairly simple since most of qcow2 is synchronous. The synchronous I/O functions likes bdrv_pread() now transparently work when called from a coroutine, so all the synchronous code just works. The explicitly asynchronous code is adjusted to repeatedly call qco

[Qemu-devel] [RFC][PATCH 10/12] block: Add coroutine support to synchronous I/O functions

2011-01-22 Thread Stefan Hajnoczi
Implement transparent support for the following synchronous I/O functions to be called from coroutines: bdrv_read() bdrv_write() bdrv_pread() bdrv_pwrite() bdrv_pwrite_sync() bdrv_write_sync() bdrv_flush() These functions will use asynchronous I/O behind the scenes but otherwise behave the same a

[Qemu-devel] [RFC][PATCH 06/12] coroutine: Add qemu_coroutine_self()

2011-01-22 Thread Stefan Hajnoczi
Add a function to get the current coroutine. There is always a current coroutine, either the "leader" (default main coroutine) or a specific coroutine created with qemu_coroutine_create(). Signed-off-by: Stefan Hajnoczi --- qemu-coroutine.c |5 + qemu-coroutine.h |5 + 2 files c

[Qemu-devel] [RFC][PATCH 12/12] qcow2: Serialize all requests

2011-01-22 Thread Stefan Hajnoczi
QCOW2 with coroutines is not safe because synchronous code paths are no longer guaranteed to execute without interference from pending requests. A blocking call like bdrv_pread() causes the coroutine to yield and another request can be processed during that time, causing to race conditions or inter

[Qemu-devel] [RFC][PATCH 01/12] coroutine: Add gtk-vnc coroutines library

2011-01-22 Thread Stefan Hajnoczi
Asynchronous image format code is becoming very complex. Let's try using coroutines to write sequential code without callbacks but use coroutines to switch stacks under the hood. Signed-off-by: Stefan Hajnoczi --- Makefile.objs|2 +- continuation.c | 87 +

[Qemu-devel] [PATCH KQEMU] Make kqemu compile with kernel 2.6.37

2011-01-22 Thread xtof pernod
Hello, For those who still use kqemu (not all cpu's support kvm;), here is a small patch that re-enable the init_MUTEX() macro, whose removal was planed in 2009: see https://lkml.org/lkml/2009/7/26/10 Signed-off-by: christophe pernod --- diff -up kqemu/kqemu-linux.c.ORG kqemu/kqemu-linux.c ---

[Qemu-devel] [PATCH 3/3] s390: Fix memory leak

2011-01-22 Thread Stefan Weil
Signed-off-by: Stefan Weil --- hw/s390-virtio.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index f29b624..850422f 100644 --- a/hw/s390-virtio.c +++ b/hw/s390-virtio.c @@ -204,6 +204,7 @@ static void s390_init(ram_addr_t ram_size,

[Qemu-devel] [PATCH 1/3] pci: Fix memory leak

2011-01-22 Thread Stefan Weil
Signed-off-by: Stefan Weil --- hw/pci.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 63f476a..38a60ae 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1877,6 +1877,7 @@ static int pci_add_option_rom(PCIDevice *pdev, bool is_default_rom) if (size

[Qemu-devel] [PATCH 2/3] ppc405: Fix memory leak

2011-01-22 Thread Stefan Weil
Signed-off-by: Stefan Weil --- hw/ppc405_boards.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/ppc405_boards.c b/hw/ppc405_boards.c index b1d2b94..912757b 100644 --- a/hw/ppc405_boards.c +++ b/hw/ppc405_boards.c @@ -560,6 +560,7 @@ static void taihu_405ep_init(ram_a

[Qemu-devel] [RFC][PATCH 03/12] Make sure to release allocated stack when coroutine is released.

2011-01-22 Thread Stefan Hajnoczi
Copied from a fix to the original code by Anthony Liguori . Signed-off-by: Stefan Hajnoczi --- coroutine_ucontext.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/coroutine_ucontext.c b/coroutine_ucontext.c index 25e8687..f76da94 100644 --- a/coroutine_ucontext.c +++ b/

[Qemu-devel] [RFC][PATCH 02/12] continuation: Fix container_of() redefinition

2011-01-22 Thread Stefan Hajnoczi
QEMU already has a visible container_of() macro definition. Avoid the compiler error. Signed-off-by: Stefan Hajnoczi --- continuation.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/continuation.h b/continuation.h index 585788e..112df65 100644 --- a/continuation.h ++

[Qemu-devel] [PATCH] qemu-char: Check for missing backend name

2011-01-22 Thread Stefan Hajnoczi
Check if the backend option is missing before searching the backend table. This fixes a NULL pointer dereference when QEMU is invoked with the following invalid command-line: $ qemu -chardev id=foo,path=/tmp/socket Previously QEMU would segfault, now it produces this error message: chardev:

Re: [Qemu-devel] Re: [PATCH 8/8] ahci: fix !msi interrupts

2011-01-22 Thread Aurelien Jarno
On Tue, Jan 18, 2011 at 01:58:25PM +0100, Jan Kiszka wrote: > On 2011-01-18 13:05, Alexander Graf wrote: > > > > On 18.01.2011, at 10:08, Gerd Hoffmann wrote: > > > >> Hi, > >> > Worse might also be that unknown issue that force you to inject an IRQ > here. We don't know. That's probab

Re: [Qemu-devel] Re: [PATCH 8/8] ahci: fix !msi interrupts

2011-01-22 Thread Edgar E. Iglesias
On Sat, Jan 22, 2011 at 02:13:03PM +0100, Aurelien Jarno wrote: > On Tue, Jan 18, 2011 at 01:58:25PM +0100, Jan Kiszka wrote: > > On 2011-01-18 13:05, Alexander Graf wrote: > > > > > > On 18.01.2011, at 10:08, Gerd Hoffmann wrote: > > > > > >> Hi, > > >> > > Worse might also be that unknown

Re: [Qemu-devel] [ARM] Contributing tests for Neon

2011-01-22 Thread Edgar E. Iglesias
On Fri, Jan 21, 2011 at 11:25:05PM +, Peter Maydell wrote: > On 21 January 2011 10:07, Christophe Lyon wrote: > > I have developed some tests for ARM-Neon in the form of C sources files > > calling ARM Neon intrinsics, and comparing the results of the resulting > > program with a known referen

Re: [Qemu-devel] Re: [PATCH 8/8] ahci: fix !msi interrupts

2011-01-22 Thread Alexander Graf
On 22.01.2011, at 14:13, Aurelien Jarno wrote: > On Tue, Jan 18, 2011 at 01:58:25PM +0100, Jan Kiszka wrote: >> On 2011-01-18 13:05, Alexander Graf wrote: >>> >>> On 18.01.2011, at 10:08, Gerd Hoffmann wrote: >>> Hi, >> Worse might also be that unknown issue that force you to inj

Re: [Qemu-devel] Re: [PATCH 8/8] ahci: fix !msi interrupts

2011-01-22 Thread Alexander Graf
On 22.01.2011, at 15:14, Edgar E. Iglesias wrote: > On Sat, Jan 22, 2011 at 02:13:03PM +0100, Aurelien Jarno wrote: >> On Tue, Jan 18, 2011 at 01:58:25PM +0100, Jan Kiszka wrote: >>> On 2011-01-18 13:05, Alexander Graf wrote: On 18.01.2011, at 10:08, Gerd Hoffmann wrote: > Hi

Re: [Qemu-devel] Re: [PATCH 8/8] ahci: fix !msi interrupts

2011-01-22 Thread Aurelien Jarno
On Sat, Jan 22, 2011 at 03:28:06PM +0100, Alexander Graf wrote: > > On 22.01.2011, at 14:13, Aurelien Jarno wrote: > > > On Tue, Jan 18, 2011 at 01:58:25PM +0100, Jan Kiszka wrote: > >> On 2011-01-18 13:05, Alexander Graf wrote: > >>> > >>> On 18.01.2011, at 10:08, Gerd Hoffmann wrote: > >>> >

RE: [Qemu-devel] [PATCH] target-arm: Fix loading of scalar valueforNeon multiply-by-scalar

2011-01-22 Thread Schildbach, Wolfgang
> From: qemu-devel-bounces+wschi=dolby@nongnu.org > [mailto:qemu-devel-bounces+wschi=dolby@nongnu.org] On > Behalf Of Schildbach, Wolfgang > > > -Original Message- > > From: qemu-devel-bounces+wschi=dolby@nongnu.org > > [mailto:qemu-devel-bounces+wschi=dolby@nongnu.org] O

Re: [Qemu-devel] Re: [PATCH 8/8] ahci: fix !msi interrupts

2011-01-22 Thread Aurelien Jarno
On Sat, Jan 22, 2011 at 03:32:36PM +0100, Alexander Graf wrote: > > On 22.01.2011, at 15:14, Edgar E. Iglesias wrote: > > > On Sat, Jan 22, 2011 at 02:13:03PM +0100, Aurelien Jarno wrote: > >> On Tue, Jan 18, 2011 at 01:58:25PM +0100, Jan Kiszka wrote: > >>> On 2011-01-18 13:05, Alexander Graf wr

[Qemu-devel] microblaze: unused variable

2011-01-22 Thread Blue Swirl
helper_addkc() in op_helper.c looks buggy, GCC 4.6.0 complains: CCmicroblaze-softmmu/op_helper.o /src/qemu/target-microblaze/op_helper.c: In function 'helper_addkc': /src/qemu/target-microblaze/op_helper.c:133:14: error: variable 'd' set but not used [-Werror=unused-but-set-variable]

Re: [Qemu-devel] [sparc] Floating point exception issue

2011-01-22 Thread Mateusz Loskot
On 18/01/11 21:51, Blue Swirl wrote: > On Tue, Jan 18, 2011 at 6:00 PM, Mateusz Loskot wrote: >> On 18/01/11 17:36, Blue Swirl wrote: >>> >>> On Tue, Jan 18, 2011 at 3:27 PM, Mateusz Loskot >>> wrote: Hi, Recently, I have reported mysterious issues on NetBSD 5.1 emulated

Re: [Qemu-devel] [sparc] Floating point exception issue

2011-01-22 Thread Blue Swirl
On Sat, Jan 22, 2011 at 3:30 PM, Mateusz Loskot wrote: > On 18/01/11 21:51, Blue Swirl wrote: >> On Tue, Jan 18, 2011 at 6:00 PM, Mateusz Loskot wrote: >>> On 18/01/11 17:36, Blue Swirl wrote: On Tue, Jan 18, 2011 at 3:27 PM, Mateusz Loskot  wrote: > > Hi, > > Recen

Re: [Qemu-devel] [sparc] Floating point exception issue

2011-01-22 Thread Robert Reif
Blue Swirl wrote: On Sat, Jan 22, 2011 at 3:30 PM, Mateusz Loskot wrote: On 18/01/11 21:51, Blue Swirl wrote: On Tue, Jan 18, 2011 at 6:00 PM, Mateusz Loskot wrote: On 18/01/11 17:36, Blue Swirl wrote: On Tue, Jan 18, 2011 at 3:27 PM, Mateusz Loskot wrote:

Re: [Qemu-devel] Changing the content of target cpu registers

2011-01-22 Thread Blue Swirl
2011/1/21 Raphaël Lefèvre : > On Wed, Jan 19, 2011 at 2:13 AM, Stefano Bonifazi > wrote: >> On 01/18/2011 06:17 PM, Blue Swirl wrote: >>> >>> On Tue, Jan 18, 2011 at 9:29 AM, Stefano Bonifazi >>>  wrote: Hi all!  I am working on qemu-user (qemu-ppc). I'd like to edit the value

[Qemu-devel] Re: microblaze: unused variable

2011-01-22 Thread Edgar E. Iglesias
Thanks ble, The addk. Helper is now there only there to compute carry. I Feel free to remove the unused statement and unusrd vars. Otherwise ill do when im back again. Cheers On Jan 22, 2011 3:43 PM, "Blue Swirl" wrote: > > helper_addkc() in op_helper.c looks buggy, GCC 4.6.0 complains: > CC

Re: [Qemu-devel] [sparc] Floating point exception issue

2011-01-22 Thread Artyom Tarasenko
On Sat, Jan 22, 2011 at 5:45 PM, Robert Reif wrote: > Blue Swirl wrote: >> >> On Sat, Jan 22, 2011 at 3:30 PM, Mateusz Loskot >>  wrote: >> >>> >>> On 18/01/11 21:51, Blue Swirl wrote: >>> On Tue, Jan 18, 2011 at 6:00 PM, Mateusz Loskot  wrote: > > On 18/01/11 17:36, Bl

[Qemu-devel] Re: microblaze: unused variable

2011-01-22 Thread Edgar E. Iglesias
On Sat, Jan 22, 2011 at 02:43:36PM +, Blue Swirl wrote: > helper_addkc() in op_helper.c looks buggy, GCC 4.6.0 complains: > CCmicroblaze-softmmu/op_helper.o > /src/qemu/target-microblaze/op_helper.c: In function 'helper_addkc': > /src/qemu/target-microblaze/op_helper.c:133:14: error: vari

Re: [Qemu-devel] Re: [PATCH 8/8] ahci: fix !msi interrupts

2011-01-22 Thread Edgar E. Iglesias
On Sat, Jan 22, 2011 at 03:40:34PM +0100, Aurelien Jarno wrote: > On Sat, Jan 22, 2011 at 03:32:36PM +0100, Alexander Graf wrote: > > > > On 22.01.2011, at 15:14, Edgar E. Iglesias wrote: > > > > > On Sat, Jan 22, 2011 at 02:13:03PM +0100, Aurelien Jarno wrote: > > >> On Tue, Jan 18, 2011 at 01:5

[Qemu-devel] Re: MIPS, io-thread, icount and wfi

2011-01-22 Thread Edgar E. Iglesias
On Wed, Jan 19, 2011 at 08:02:28PM +0100, Edgar E. Iglesias wrote: > On Wed, Jan 19, 2011 at 03:02:26PM -0200, Marcelo Tosatti wrote: > > On Tue, Jan 18, 2011 at 11:00:57AM +0100, Jan Kiszka wrote: > > > On 2011-01-18 01:19, Edgar E. Iglesias wrote: > > > > On Mon, Jan 17, 2011 at 11:03:08AM +0100,