Re: [Qemu-devel] [PATCH][v7] megasas: LSI Megaraid SAS emulation

2011-07-19 Thread Alexander Graf
On 19.07.2011, at 18:08, Christoph Hellwig wrote: > I've mentioned this a few times before, but just to make sure it's not > lost: > > This is a really bad idea for adding to qemu. It's not a controller that > actually speaks a plain SCSI protocol to disks, but a RAID controller, that > has it'

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-19 Thread Jan Kiszka
On 2011-07-19 15:56, Michael S. Tsirkin wrote: > On Sun, Jul 17, 2011 at 02:13:27PM +0300, Avi Kivity wrote: >> New in this version: >> MemoryRegionOps gained .old_mmio and .old_portio members, which allow >> reusing old-style callbacks with the new API. All uses were converted, >> except fo

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-19 Thread Jan Kiszka
On 2011-07-19 19:14, Avi Kivity wrote: > On 07/19/2011 08:01 PM, Jan Kiszka wrote: >> On 2011-07-19 15:56, Michael S. Tsirkin wrote: >>> On Sun, Jul 17, 2011 at 02:13:27PM +0300, Avi Kivity wrote: New in this version: MemoryRegionOps gained .old_mmio and .old_portio members, which al

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-19 Thread Avi Kivity
On 07/19/2011 08:01 PM, Jan Kiszka wrote: On 2011-07-19 15:56, Michael S. Tsirkin wrote: > On Sun, Jul 17, 2011 at 02:13:27PM +0300, Avi Kivity wrote: >> New in this version: >>MemoryRegionOps gained .old_mmio and .old_portio members, which allow >>reusing old-style callbacks with the n

Re: [Qemu-devel] Updated 0.15 release schedule

2011-07-19 Thread Jan Kiszka
On 2011-07-19 16:20, Anthony Liguori wrote: > Here's my proposal for an updated 0.15 schedule. Please not that > stable-0.15 will fork off this Friday. > > | 2011-02-01 > | Begin of 0.15 development phase > |- > | 2011-05-16 > | Soft feature freeze. Major features should have initial code > comm

Re: [Qemu-devel] [PATCH 0/2] netdev fixes

2011-07-19 Thread Jan Kiszka
On 2011-07-19 14:10, Michael S. Tsirkin wrote: > On Thu, Jun 16, 2011 at 06:45:35PM +0200, Markus Armbruster wrote: >> Markus Armbruster (2): >> Fix automatically assigned network names for netdev >> Fix netdev name lookup in -device, device_add, netdev_del >> >> net.c | 19 +++--

Re: [Qemu-devel] qemu FreeBSD/sparc64 host - a bit of debugging

2011-07-19 Thread Juergen Lock
On Mon, Jul 18, 2011 at 10:58:58PM -0400, Super Bisquit wrote: > On Mon, Jul 18, 2011 at 2:22 PM, Juergen Lock wrote: > > > Hi! > > > > I'm the FreeBSD qemu port maintainer and don't have a sparc64 box > > myself, but Jashank Jeremy (Cc'd) now was so kind to test qemu 0.14.1 > > on a FreeBSD/spar

[Qemu-devel] [PATCH 1/1] Remove debugging messages.

2011-07-19 Thread Richard W.M. Jones
qemu probably needs some sort of --verbose or --debug option for when you really want to see everything that's going on. In the meantime, this patch removes some debugging messages when KVM is not available. Rich.

[Qemu-devel] [PATCH] Remove debugging messages.

2011-07-19 Thread Richard W.M. Jones
From: "Richard W.M. Jones" When using qemu -machine accel=kvm:tcg, if KVM is not available you get a load of debugging output: Could not access KVM kernel module: No such file or directory failed to initialize KVM: No such file or directory Back to tcg accelerator. Signed-off-by: Richard

Re: [Qemu-devel] [PATCH] Remove debugging messages.

2011-07-19 Thread Jan Kiszka
On 2011-07-19 21:23, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > When using qemu -machine accel=kvm:tcg, if KVM is not available you > get a load of debugging output: > > Could not access KVM kernel module: No such file or directory > failed to initialize KVM: No such file or

Re: [Qemu-devel] [PATCH] Remove debugging messages.

2011-07-19 Thread Michael Tokarev
19.07.2011 23:23, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > When using qemu -machine accel=kvm:tcg, if KVM is not available you > get a load of debugging output: > > Could not access KVM kernel module: No such file or directory > failed to initialize KVM: No such file or dir

[Qemu-devel] [PATCH v7 03/18] qapi: add module init types for qapi

2011-07-19 Thread Michael Roth
Signed-off-by: Michael Roth --- module.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/module.h b/module.h index 9263f1c..ef66730 100644 --- a/module.h +++ b/module.h @@ -24,12 +24,14 @@ typedef enum { MODULE_INIT_BLOCK, MODULE_INIT_DEVICE, MODULE_INIT_

[Qemu-devel] [QAPI+QGA 2/3] QAPI code generation infrastructure v7

2011-07-19 Thread Michael Roth
This is Set 2/3 of the QAPI+QGA patchsets. These patches apply on top of master (set1 merged), and can also be obtained from: git://repo.or.cz/qemu/mdroth.git qapi-backport-set2-v7 (Set1+2 are a backport of some of the QAPI-related work from Anthony's glib tree. The main goal is to get the basic

[Qemu-devel] [PATCH v7 01/18] Add hard build dependency on glib

2011-07-19 Thread Michael Roth
From: Anthony Liguori GLib is an extremely common library that has a portable thread implementation along with tons of other goodies. GLib and GObject have a fantastic amount of infrastructure we can leverage in QEMU including an object oriented programming infrastructure. Short term, it has a

[Qemu-devel] [PATCH v7 04/18] qapi: add QAPI visitor core

2011-07-19 Thread Michael Roth
Base definitions/includes for Visiter interface used by generated visiter/marshalling code. Includes a GenericList type. Our lists require an embedded element. Since these types are generated, if you want to use them in a different type of data structure, there's no easy way to add another embedde

[Qemu-devel] [PATCH v7 06/18] qapi: add QMP output visitor

2011-07-19 Thread Michael Roth
Type of Visiter class that serves as the inverse of the input visitor: it takes a series of native C types and uses their values to construct a corresponding QObject. The command marshaling/dispatcher functions will use this to convert the output of QMP functions into a QObject that can be sent ove

[Qemu-devel] [PATCH v7 09/18] qapi: add QMP dispatch functions

2011-07-19 Thread Michael Roth
Given an object recieved via QMP, this code uses the dispatch table provided by qmp_registry.c to call the corresponding marshalling/dispatch function and format return values/errors for delivery to the QMP. Currently only synchronous QMP functions are supported, but this will also be used for asyn

[Qemu-devel] [PATCH v7 05/18] qapi: add QMP input visitor

2011-07-19 Thread Michael Roth
A type of Visiter class that is used to walk a qobject's structure and assign each entry to the corresponding native C type. Command marshaling function will use this to pull out QMP command parameters recieved over the wire and pass them as native arguments to the corresponding C functions. Signe

[Qemu-devel] [PATCH v7 11/18] qapi: add qapi.py helper libraries

2011-07-19 Thread Michael Roth
Signed-off-by: Michael Roth --- scripts/qapi.py | 203 +++ 1 files changed, 203 insertions(+), 0 deletions(-) create mode 100644 scripts/qapi.py diff --git a/scripts/qapi.py b/scripts/qapi.py new file mode 100644 index 000..56af232 --- /

[Qemu-devel] [PATCH v7 07/18] qapi: add QAPI dealloc visitor

2011-07-19 Thread Michael Roth
Type of Visitor class that can be passed into a qapi-generated C type's visitor function to free() any heap-allocated data types. Signed-off-by: Michael Roth --- Makefile.objs |2 +- qapi/qapi-dealloc-visitor.c | 147 +++ qapi/qapi-deall

[Qemu-devel] [PATCH v7 15/18] qapi: test schema used for unit tests

2011-07-19 Thread Michael Roth
This is how QMP commands/parameters/types would be defined. We use a subset of that functionality here to implement functions/types for unit testing. Signed-off-by: Michael Roth --- qapi-schema-test.json | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) create mod

[Qemu-devel] [PATCH v7 08/18] qapi: add QMP command registration/lookup functions

2011-07-19 Thread Michael Roth
Registration/lookup functions for that provide a lookup table for dispatching QMP commands. Signed-off-by: Michael Roth --- Makefile.objs |1 + qapi/qmp-core.h | 40 qapi/qmp-registry.c | 40 3 fi

[Qemu-devel] [PATCH v7 13/18] qapi: add qapi-visit.py code generator

2011-07-19 Thread Michael Roth
This is the code generator for qapi visiter functions used to marshal/unmarshal/dealloc qapi types. It generates the following 2 files: $(prefix)qapi-visit.c: visiter function for a particular c type, used to automagically convert qobjects into the

[Qemu-devel] [PATCH v7 14/18] qapi: add qapi-commands.py code generator

2011-07-19 Thread Michael Roth
This is the code generator for qapi command marshaling/dispatch. Currently only generators for synchronous qapi/qmp functions are supported. This script generates the following files: $(prefix)qmp-marshal.c: command marshal/dispatch functions for each QMP command define

[Qemu-devel] [PATCH v7 17/18] qapi: add test-qmp-commands, tests for gen. marshalling/dispatch code

2011-07-19 Thread Michael Roth
Signed-off-by: Michael Roth --- Makefile|8 +++- test-qmp-commands.c | 113 +++ 2 files changed, 120 insertions(+), 1 deletions(-) create mode 100644 test-qmp-commands.c diff --git a/Makefile b/Makefile index 5d2cf5b..d7c8567 100

[Qemu-devel] [PATCH v7 10/18] qapi: add ordereddict.py helper library

2011-07-19 Thread Michael Roth
We need this to parse dictionaries with schema ordering intact so that C prototypes can be generated deterministically. Signed-off-by: Michael Roth --- scripts/ordereddict.py | 128 1 files changed, 128 insertions(+), 0 deletions(-) create mode

[Qemu-devel] [PATCH v7 18/18] qapi: add QAPI code generation documentation

2011-07-19 Thread Michael Roth
Signed-off-by: Michael Roth --- docs/qapi-code-gen.txt | 316 1 files changed, 316 insertions(+), 0 deletions(-) create mode 100644 docs/qapi-code-gen.txt diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt new file mode 100644 index 0

[Qemu-devel] [PATCH v7 12/18] qapi: add qapi-types.py code generator

2011-07-19 Thread Michael Roth
This is the code generator for qapi types. It will generation the following files: $(prefix)qapi-types.h - C types corresponding to types defined in the schema you pass in $(prefix)qapi-types.c - Cleanup functions for the above C types The $(prefix) is used to as a n

[Qemu-devel] [PATCH v8 1/4] qerror: add QERR_JSON_PARSE_ERROR to qerror.c

2011-07-19 Thread Michael Roth
Missing from previous addition of error to qerror.h. Needed for qerror_format() and friends. Signed-off-by: Michael Roth --- qerror.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index d7fcd93..c92adfc 100644 --- a/qerror.c +++ b/qerror.c @@ -1

[Qemu-devel] [PATCH v7 02/18] qlist: add qlist_first()/qlist_next()

2011-07-19 Thread Michael Roth
Signed-off-by: Michael Roth --- qlist.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/qlist.h b/qlist.h index dbe7b92..d426bd4 100644 --- a/qlist.h +++ b/qlist.h @@ -16,6 +16,7 @@ #include "qobject.h" #include "qemu-queue.h" #include "qemu-common.h" +#inc

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-19 Thread Anthony Liguori
On 07/19/2011 11:10 AM, Avi Kivity wrote: On 07/19/2011 07:05 PM, Avi Kivity wrote: On 07/19/2011 05:50 PM, Anthony Liguori wrote: There's bits I don't like about the interface Which bits are these? Nothing I haven't already commented on. I think there's too much in the generic level. I

[Qemu-devel] [PATCH v7 16/18] qapi: add test-visitor, tests for gen. visitor code

2011-07-19 Thread Michael Roth
Signed-off-by: Michael Roth --- Makefile | 19 +++- test-visitor.c | 306 2 files changed, 323 insertions(+), 2 deletions(-) create mode 100644 test-visitor.c diff --git a/Makefile b/Makefile index 42ae4e5..5d2cf5b 100644 --- a/

[Qemu-devel] [QAPI+QGA 3/3] QEMU Guest Agent (virtagent) v8

2011-07-19 Thread Michael Roth
This is Set 3/3 of the QAPI+QGA patchsets. These patches apply on top of qapi-backport-set2-v7, and can also be obtained from: git://repo.or.cz/qemu/mdroth.git qapi-backport-set3-v8 (Set1+2 are a backport of some of the QAPI-related work from Anthony's glib tree. The main goal is to get the basi

Re: [Qemu-devel] [PATCH] Remove debugging messages.

2011-07-19 Thread Anthony Liguori
On 07/19/2011 02:23 PM, Richard W.M. Jones wrote: From: "Richard W.M. Jones" When using qemu -machine accel=kvm:tcg, if KVM is not available you get a load of debugging output: Could not access KVM kernel module: No such file or directory failed to initialize KVM: No such file or director

[Qemu-devel] [PATCH v8 2/4] guest agent: command state class

2011-07-19 Thread Michael Roth
Signed-off-by: Michael Roth --- Makefile|4 ++- configure |1 + qga/guest-agent-command-state.c | 73 +++ qga/guest-agent-core.h | 25 + 4 files changed, 102 insertions(+), 1 deleti

[Qemu-devel] [PATCH v8 3/4] guest agent: qemu-ga daemon

2011-07-19 Thread Michael Roth
This is the actual guest daemon, it listens for requests over a virtio-serial/isa-serial/unix socket channel and routes them through to dispatch routines, and writes the results back to the channel in a manner similar to QMP. A shorthand invocation: qemu-ga -d Is equivalent to: qemu-ga -m v

Re: [Qemu-devel] [PATCH] Remove debugging messages.

2011-07-19 Thread Richard W.M. Jones
On Tue, Jul 19, 2011 at 11:49:22PM +0400, Michael Tokarev wrote: > 19.07.2011 23:23, Richard W.M. Jones wrote: > > From: "Richard W.M. Jones" > > > > When using qemu -machine accel=kvm:tcg, if KVM is not available you > > get a load of debugging output: > > > > Could not access KVM kernel modu

[Qemu-devel] [PATCH v8 4/4] guest agent: add guest agent RPCs/commands

2011-07-19 Thread Michael Roth
This adds the initial set of QMP/QAPI commands provided by the guest agent: guest-sync guest-ping guest-info guest-shutdown guest-file-open guest-file-read guest-file-write guest-file-seek guest-file-flush guest-file-close guest-fsfreeze-freeze guest-fsfreeze-thaw guest-fsfreeze-status The input/

Re: [Qemu-devel] [PATCH] Remove debugging messages.

2011-07-19 Thread Richard W.M. Jones
On Tue, Jul 19, 2011 at 03:04:22PM -0500, Anthony Liguori wrote: > On 07/19/2011 02:23 PM, Richard W.M. Jones wrote: > >From: "Richard W.M. Jones" > > > >When using qemu -machine accel=kvm:tcg, if KVM is not available you > >get a load of debugging output: > > > > Could not access KVM kernel modu

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-19 Thread Sasha Levin
On Tue, Jul 19, 2011 at 11:51 PM, Anthony Liguori wrote: > On 07/19/2011 11:10 AM, Avi Kivity wrote: >> >> On 07/19/2011 07:05 PM, Avi Kivity wrote: >>> >>> On 07/19/2011 05:50 PM, Anthony Liguori wrote: >> >> There's bits I don't like about the interface > > Which bits are th

Re: [Qemu-devel] [PATCH] do not call monitor_resume() from migrate_fd_put_buffer() error path

2011-07-19 Thread Jan Kiszka
On 2011-07-19 13:46, Michael Tokarev wrote: > If we do, it results in double monitor_resume() (second being called > from migrate_fd_cleanup() anyway) and monitor suspend count becoming > negative. > > Cc'ing people from `git blame' list for the lines in question: the > change fixes the problem bu

[Qemu-devel] [PATCH] pci: Length-align config space accesses

2011-07-19 Thread Jan Kiszka
From: Jan Kiszka Introduce pci_config_read/write helpers to split up config space accesses that are not length-aligned. This particularly avoids that each and every device needs to check for config space overruns. Also move the access length assertion to the new helpers. Signed-off-by: Jan Kiszk

Re: [Qemu-devel] [PATCH] Remove debugging messages.

2011-07-19 Thread Anthony Liguori
On 07/19/2011 03:59 PM, Richard W.M. Jones wrote: On Tue, Jul 19, 2011 at 03:04:22PM -0500, Anthony Liguori wrote: On 07/19/2011 02:23 PM, Richard W.M. Jones wrote: From: "Richard W.M. Jones" When using qemu -machine accel=kvm:tcg, if KVM is not available you get a load of debugging output:

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-19 Thread Anthony Liguori
On 07/19/2011 04:03 PM, Sasha Levin wrote: On Tue, Jul 19, 2011 at 11:51 PM, Anthony Liguori wrote: The e1000 is not performance competitive with virtio-net though so it certainly is reasonable to assume that noone would notice if we removed coalesced I/O from the e1000. The point is, it's so

[Qemu-devel] [PATCH] Makefile: Minor cscope fixups

2011-07-19 Thread Alexandre Raymond
-Create cscope symbols for assembly files in addition to .c/.h files. -Create cscope database with full path instead of relative path so cscope can be used with CSCOPE_DB in any directory. Signed-off-by: Alexandre Raymond --- Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

[Qemu-devel] [RFC 1/4] A separate thread for the VM migration

2011-07-19 Thread Umesh Deshpande
This patch creates a migration bitmap, which is periodically kept in sync with the qemu bitmap. This allows us to have a separate thread for VM migration. A separate copy of the dirty bitmap for the migration avoids concurrent access to the qemu bitmap from iohandlers and migration thread. Sign

[Qemu-devel] [RFC 2/4] A separate thread for the VM migration

2011-07-19 Thread Umesh Deshpande
This patch implements a migration clock, whose implementation is similar to the existing rt_clock. This allows the migration timer to run in parallel to other timers in the rt_clock. In the next patch, this clock is used to create a new timer from the migration thread that calls the VM migration

[Qemu-devel] [RFC 4/4] A separate thread for the VM migration

2011-07-19 Thread Umesh Deshpande
This patch creates a separate thread for the guest migration on the target side. Signed-off-by: Umesh Deshpande --- migration-exec.c |7 +++ migration-fd.c |4 ++-- migration-tcp.c |9 + migration-unix.c | 10 ++ migration.c | 32 +

[Qemu-devel] [RFC 3/4] A separate thread for the VM migration

2011-07-19 Thread Umesh Deshpande
This patch creates a separate thread for the guest migration on the source side. The migration routine is called from the migration clock. Signed-off-by: Umesh Deshpande --- arch_init.c |8 +++ buffered_file.c | 10 - migration-tcp.c | 18 - migration-

[Qemu-devel] [RFC PATCH 0/2] Signal fixes for OSX

2011-07-19 Thread Alexandre Raymond
This series fixes a race condition that occurs under OS X. It also reworks the signal initialization to make it simpler for later maintenance/additions. Note that although it _appears_ to fix this race condition, I have not been able to pinpoint exactly how it is triggered. Does anyone know if t

[Qemu-devel] [RFC PATCH 1/2] Signals: fix race condition with aio-compat

2011-07-19 Thread Alexandre Raymond
There appears to be a race condition when SIGUSR2 is not handled synchronously by the signalfd thread. This caused random freezes/segfaults under OS X. This fix also appears to fix most of the I/O errors that occur when the io-thread is enabled on OS X. Signed-off-by: Alexandre Raymond --- cpu

[Qemu-devel] [RFC PATCH 2/2] Signals: rework initial signal setup

2011-07-19 Thread Alexandre Raymond
-Restructure the signal setup by creating two groups: * blocked_set, which contains signals that are ignored by QEMU or caught directly by a specific thread (e.g.: SIG_IPI). * handled_set, which contains signals handled synchronously via signalfd. Signed-off-by: Alexandre Raym

Re: [Qemu-devel] [PATCH 05/21] scsi: Add 'hba_private' to SCSIRequest

2011-07-19 Thread David Gibson
On Tue, Jul 19, 2011 at 11:20:22PM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2011-07-19 at 07:43 -0500, Anthony Liguori wrote: > > > > This breaks the build: > > > > make[1]: Nothing to be done for `all'. > >CCppc64-softmmu/spapr_vscsi.o > > /home/anthony/git/qemu/hw/spapr_vscsi.c: I

Re: [Qemu-devel] [RFC v4 00/58] Memory API

2011-07-19 Thread Sasha Levin
On Tue, 2011-07-19 at 21:53 -0500, Anthony Liguori wrote: > QEMU does use it and it's quite important. Coalesced MMIO is really > about write caching MMIO exits. It only works with devices that have > registers where writing has no side effects. Moreover, it only really > works well when ther

[Qemu-devel] [PATCH] virtio-9p: Fix syntax error in debug code

2011-07-19 Thread Stefan Weil
This error was reported by cppcheck: qemu/hw/9pfs/virtio-9p-debug.c:342: error: Invalid number of character ({) when these macros are defined: 'DEBUG_DATA'. Cc: Aneesh Kumar K.V Signed-off-by: Stefan Weil --- hw/9pfs/virtio-9p-debug.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

Re: [Qemu-devel] [PATCH][v7] megasas: LSI Megaraid SAS emulation

2011-07-19 Thread Hannes Reinecke
On 07/19/2011 06:08 PM, Christoph Hellwig wrote: I've mentioned this a few times before, but just to make sure it's not lost: This is a really bad idea for adding to qemu. It's not a controller that actually speaks a plain SCSI protocol to disks, but a RAID controller, that has it's own command

<    1   2