[Qemu-devel] [PATCH] iscsi: fix race between task completition and task abortion

2012-08-13 Thread Stefan Priebe
From: spriebe --- block/iscsi.c | 36 1 files changed, 20 insertions(+), 16 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 12ca76d..257f97f 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -76,6 +76,10 @@ static void iscsi_abort_task_cb(st

Re: [Qemu-devel] [PATCH 1/2] virtio-block: support auto-sensing of block sizes

2012-08-13 Thread Jens Freimann
On Mon, Aug 13, 2012 at 07:50:39PM +, Blue Swirl wrote: > On Mon, Aug 13, 2012 at 8:40 AM, Jens Freimann wrote: > > From: Einar Lueck > > > > Virtio-blk does not impose fixed block sizes for access to > > backing devices. This patch introduces support for auto > > lookup of the block sizes of

[Qemu-devel] [RFC v0] HACK: qom: object_property_set: abort on failure

2012-08-13 Thread Peter A. G. Crosthwaite
Hi All. A couple of times now ive had debug issues due to silent failure of object_property_set. This function silently fails if the requested property does not exist for the target object. To trap this error I applied the patch below to my tree, but I am assuming that this is not mergeable as is a

Re: [Qemu-devel] [PATCH 3/3] vfio: Enable vfio-pci and mark supported

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 17:19 -0500, Anthony Liguori wrote: > Jan Kiszka writes: > > > On 2012-08-01 07:18, Alex Williamson wrote: > >> Signed-off-by: Alex Williamson > >> --- > >> > >> MAINTAINERS |5 + > >> configure | 12 > >> hw/i386/Makefile.objs

Re: [Qemu-devel] [PATCH 2/3] vfio: vfio-pci device assignment driver

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 17:18 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > +static int vfio_load_rom(VFIODevice *vdev) > > +{ > > +uint64_t size = vdev->rom_size; > > +const VMStateDescription *vmsd; > > +char name[32]; > > +off_t off = 0, voff = vdev->rom_offset; > >

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-08-13 Thread Bharata B Rao
Kevin, Thanks for your review. I will address all of your comments in the next iteration, but have a few questions/comments on the others... On Mon, Aug 13, 2012 at 02:50:29PM +0200, Kevin Wolf wrote: > > +static int parse_server(GlusterURI *uri, char *server) > > +{ > > +int ret = -EINVAL; >

[Qemu-devel] [PATCH v6 1/3] Adding support for libseccomp in configure and Makefile

2012-08-13 Thread Eduardo Otubo
Adding basic options to the configure script to use libseccomp or not. The default is set to 'no'. If the flag --enable-libseccomp is used, the script will check for its existence using pkg-config. v2: * As I removed all the code related to seccomp from vl.c, I created qemu-seccomp.[ch]. * Al

[Qemu-devel] [PATCH v6 2/3] Adding qemu-seccomp.[ch]

2012-08-13 Thread Eduardo Otubo
v1: * I added a syscall struct using priority levels as described in the libseccomp man page. The priority numbers are based to the frequency they appear in a sample strace from a regular qemu guest run under libvirt. Libseccomp generates linear BPF code to filter system calls, those

[Qemu-devel] [PATCH v6 3/3] Adding seccomp calls to vl.c

2012-08-13 Thread Eduardo Otubo
v1: * Full seccomp calls and data included in vl.c v2: * Full seccomp calls and data removed from vl.c and put into separate qemu-seccomp.[ch] file. Signed-off-by: Eduardo Otubo --- vl.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index

[Qemu-devel] [PATCH v6 0/3] Sandboxing Qemu guests with Libseccomp

2012-08-13 Thread Eduardo Otubo
Hello all, This patch is an effort to sandbox Qemu guests using Libseccomp[0]. The patches that follows are pretty simple and straightforward. I added the correct options and checks to the configure script and the basic calls to libseccomp in the main loop at vl.c. Details of each one are in the e

Re: [Qemu-devel] [PATCH] json-parser: don't replicate tokens at each level of recursion

2012-08-13 Thread Michael Roth
On Mon, Aug 13, 2012 at 08:49:26PM +0200, Markus Armbruster wrote: > Michael Roth writes: > > > Currently, when parsing a stream of tokens we make a copy of the token > > list at the beginning of each level of recursion so that we do not > > modify the original list in cases where we need to fall

Re: [Qemu-devel] [PATCH] json-parser: don't replicate tokens at each level of recursion

2012-08-13 Thread Michael Roth
On Mon, Aug 13, 2012 at 03:01:56PM -0300, Luiz Capitulino wrote: > On Fri, 10 Aug 2012 18:24:10 -0500 > Michael Roth wrote: > > > Currently, when parsing a stream of tokens we make a copy of the token > > list at the beginning of each level of recursion so that we do not > > modify the original l

[Qemu-devel] [Bug 1035572] Re: Bug in Qemu User Mode

2012-08-13 Thread Dietmar Stölting
Hi, with this new syscall.c content above things are going in the right direction:-). I make a test with strace from the program testthread of the Qemu testsuite. When I understand the result right, threading works now with this new compiled qemu-i386. The child and the parents tidptr NOW have the

Re: [Qemu-devel] [SeaBIOS] [PULL 0/1] update qemu seabios / seabios release?

2012-08-13 Thread Kevin O'Connor
On Fri, Aug 10, 2012 at 08:42:11AM -0500, Anthony Liguori wrote: > Gerd Hoffmann writes: > > > Hi, > > > > This pull updates seabios in qemu to the latest bits from seabios > > master, so the upcoming 1.2 qemu release gets all the new shiny > > stuff added recently. I'd like to have a new seab

Re: [Qemu-devel] [PATCH 3/4] s390/kvm: Add a channel I/O based virtio transport driver.

2012-08-13 Thread Rusty Russell
On Mon, 13 Aug 2012 10:56:38 +0200, Cornelia Huck wrote: > On Wed, 08 Aug 2012 13:52:57 +0930 > Rusty Russell wrote: > > > On Tue, 7 Aug 2012 16:52:47 +0200, Cornelia Huck > > wrote: > > 1) Please don't limit yourself to 32 feature bits! If you look at how > >virtio_mmio does it, they u

Re: [Qemu-devel] [PULL for-1.2 00/10] arm-devs queue

2012-08-13 Thread Anthony Liguori
Peter Maydell writes: > This is the usual arm-devs pullreq, with the last set of patches > to go in before the 1.2 hardfreeze. Nothing particularly exciting > here, mostly just cleanup, plus a fix for that embarrassing > "v7m machines assert on startup" bug of mine. > > thanks > -- PMM > Pulled.

Re: [Qemu-devel] [PULL] Migration next 20120808

2012-08-13 Thread Anthony Liguori
Juan Quintela writes: > [Resent with PULL request instead of PATCH, sorry for the inconvenience] > > Hi > > This includes xbzrle series (v12) That were reviewed by Erik and Luiz. > > Anthony, please apply. Pulled. Thanks. Regards, Anthony Liguori > > Later, Juan. > > The following changes si

Re: [Qemu-devel] [PULL 00/48]: QMP queue

2012-08-13 Thread Anthony Liguori
Luiz Capitulino writes: > Contains my new error format series, a few fixes related to the WAKEUP event, > a new event and the new commands to avoid -help output parsing. > > The changes (since 33e95c6328a3149a52615176617997c4f8f7088b) are available > in the following repository: > > git://rep

[Qemu-devel] [Bug 1036363] Re: Major network performance problems on AMD hardware

2012-08-13 Thread Ziemowit Pierzycki
I would also like to add that a VM running Windows 2008 R2 is having the same identical problem too. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1036363 Title: Major network performance problems

[Qemu-devel] [Bug 1036363] [NEW] Major network performance problems on AMD hardware

2012-08-13 Thread Ziemowit Pierzycki
Public bug reported: Hi, I am experiencing some major performance problems with all of our beefy AMD Opteron 6274 servers running Fedora 17 (kernel 3.4.4-5.fc17.x86_64, qemu 1.0-17). The network performance between host and the virtual machine is terrible: # iperf -c 10.10.11.22 -r

Re: [Qemu-devel] [PATCH 3/3] vfio: Enable vfio-pci and mark supported

2012-08-13 Thread Anthony Liguori
Jan Kiszka writes: > On 2012-08-01 07:18, Alex Williamson wrote: >> Signed-off-by: Alex Williamson >> --- >> >> MAINTAINERS |5 + >> configure | 12 >> hw/i386/Makefile.objs |1 + >> 3 files changed, 18 insertions(+) >> >> diff --git a/MAINTAIN

Re: [Qemu-devel] [PATCH] qom: add style guide

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 03:57:41PM -0500, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > On Mon, Aug 13, 2012 at 01:46:46PM -0500, Anthony Liguori wrote: > >> +typedef struct MyType MyType; > >> + > >> +struct MyType > >> +{ > > > > This seems to violate our style:sho

Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-13 Thread Peter Maydell
On 13 August 2012 21:45, Marcelo Tosatti wrote: > On Sun, Aug 12, 2012 at 02:13:52PM +0100, Peter Maydell wrote: >> Ping? I don't think this one quite made it into Avi's pullreq... > > Please post this with the rest of the code to support the new > s->irqchip_inject_ioctl value. Er, which new irq

[Qemu-devel] [PATCH 44/48] qapi: add query-machines command

2012-08-13 Thread Luiz Capitulino
From: Anthony Liguori This provides the same output as -M ? but in a structured way. Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- qapi-schema.json | 28 qmp-commands.hx | 6 ++ vl.c | 31 +++ 3 fil

[Qemu-devel] [PATCH 45/48] compiler: add macro for GCC weak symbols

2012-08-13 Thread Luiz Capitulino
From: Anthony Liguori This lets us provide a default implementation of a symbol which targets can override. Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- compiler.h | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler.h b/compiler.h index 736e770..f76921e 100644 --

[Qemu-devel] [PATCH 06/48] qerror: avoid passing qerr pointer

2012-08-13 Thread Luiz Capitulino
Helps dropping/modifying qerror functions. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- qerror.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/qerror.c b/qerror.c index 7cb7c12..e717496 100644 --- a/qerror.c +++ b/qerror.c @@

[Qemu-devel] [PATCH 15/48] migration: don't rely on any QERR_SOCKET_*

2012-08-13 Thread Luiz Capitulino
Use the in_progress argument for QERR_SOCKET_CONNECT_IN_PROGRESS. The other errors are handled the same by checking if the error is set and then calling migrate_fd_error() if it's. It's also necessary to change inet_connect_opts() not to set QERR_SOCKET_CONNECT_IN_PROGRESS. This error is only used

[Qemu-devel] [PATCH 08/48] qerror: qerror_format(): return an allocated string

2012-08-13 Thread Luiz Capitulino
Simplifies current and future users. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- error.c | 5 + qerror.c | 10 -- qerror.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/error.c b/error.c index 58f55a0..3a62592 100644 --- a/error.c +

[Qemu-devel] [PATCH 32/48] error, qerror: pass desc string to error calls

2012-08-13 Thread Luiz Capitulino
This commit changes all QERR_ macros to contain a human message (ie. the desc string found in qerr_table[]) instead of a json dictionary in string format. Before this commit, error_set() and qerror_report() would receive a json dictionary in string format and build a qobject from it. Now, both fun

[Qemu-devel] [PATCH 40/48] qmp: qmp-events.txt: add missing doc for the SUSPEND event

2012-08-13 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino Reviewed-by: Eric Blake Acked-by: Gerd Hoffmann --- QMP/qmp-events.txt | 12 1 file changed, 12 insertions(+) diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt index 2389370..df190ac 100644 --- a/QMP/qmp-events.txt +++ b/QMP/qmp-events.txt @@ -240

[Qemu-devel] [PATCH 39/48] qmp: qmp-events.txt: put events in alphabetical order

2012-08-13 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino Reviewed-by: Eric Blake Acked-by: Gerd Hoffmann --- QMP/qmp-events.txt | 266 ++--- 1 file changed, 130 insertions(+), 136 deletions(-) diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt index 10f69d1..2389370 100

[Qemu-devel] [PATCH 35/48] docs: writing-qmp-commands.txt: update error section

2012-08-13 Thread Luiz Capitulino
Add information about the new error format and improve the text a bit. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- docs/writing-qmp-commands.txt | 47 +-- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/docs/writing-q

[Qemu-devel] [PATCH 36/48] scripts: qapi-commands.py: qmp-commands.h: include qdict.h

2012-08-13 Thread Luiz Capitulino
qmp-commands.h declares several functions that have arguments of type QDict. However, qdict.h is not included. This will cause a build breakage when a file includes qmp-commands.h but doesn't include qdict.h. Signed-off-by: Luiz Capitulino --- scripts/qapi-commands.py | 1 + 1 file changed, 1 in

[Qemu-devel] [PATCH 03/48] qerror: QERR_DEVICE_ENCRYPTED: change error message

2012-08-13 Thread Luiz Capitulino
Match what HMP commands print on DeviceEncrypted errors. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- qerror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qerror.c b/qerror.c index 082de98..de0a79e 100644 --- a/qerror.c +++ b/qerror.c @@ -81,7 +81,7

[Qemu-devel] [PATCH 43/48] qapi: mark QOM commands stable

2012-08-13 Thread Luiz Capitulino
From: Anthony Liguori We've had a cycle to tweak. It is time to commit to supporting them. Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- qapi-schema.json | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/qapi-schema.json b/qapi-schem

Re: [Qemu-devel] [PULL] kvm updates

2012-08-13 Thread Anthony Liguori
Avi Kivity writes: > Please pull from: > > git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Pulled. Thanks. Regards, Anthony Liguori > > This is mostly Peter's kvm_irqchip_in_kernel() decoupling work. > > > Dunrong

[Qemu-devel] [PATCH 46/48] qapi: add query-cpu-definitions command (v2)

2012-08-13 Thread Luiz Capitulino
From: Anthony Liguori This command attempts to map to the behavior of -cpu ?. Unfortunately, the output of this command differs wildly across targets. To accommodate this, we use a weak symbol to implement a default version of the command that fails with a QERR_NOT_SUPPORTED error code. Target

[Qemu-devel] [PATCH 16/48] qerror: drop QERR_SOCKET_CONNECT_IN_PROGRESS

2012-08-13 Thread Luiz Capitulino
Unused since last commit. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- qerror.c | 4 qerror.h | 3 --- 2 files changed, 7 deletions(-) diff --git a/qerror.c b/qerror.c index 5d38428..452ec69 100644 --- a/qerror.c +++ b/qerror.c @@ -309,10 +309,6 @@ static const QError

[Qemu-devel] [PATCH 20/48] qapi: generate correct enum names for camel case enums

2012-08-13 Thread Luiz Capitulino
An enum like GenericError in the schema, should generate GENERIC_ERROR and not GENERICERROR. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- scripts/qapi-types.py | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/qapi-types.py b/scripts/q

[Qemu-devel] [PATCH 12/48] hmp: hmp_cont(): don't rely on QERR_DEVICE_ENCRYPTED

2012-08-13 Thread Luiz Capitulino
This commit changes hmp_cont() to loop through all block devices and proactively set an encryption key for any encrypted device missing a key. This change is needed because QERR_DEVICE_ENCRYPTED is going to be dropped by a future commit. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbrus

[Qemu-devel] [PATCH 19/48] qapi: qapi-types.h: don't include qapi/qapi-types-core.h

2012-08-13 Thread Luiz Capitulino
qapi-types.h needs only qemu-common.h. Including qapi-types-core.h causes problems when qerror.h or error.h includes qapi-types.h. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- scripts/qapi-types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script

[Qemu-devel] [PATCH 13/48] hmp_change(): don't access DeviceEncrypted's data

2012-08-13 Thread Luiz Capitulino
It's not needed. As the device name is already known, we can replace the duplicated password prompting code by monitor_read_block_device_key(). This overly simplifies hmp_change(). Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- hmp.c | 29 ++--- 1 fil

[Qemu-devel] [PATCH 23/48] qerror: qerror_table: don't use C99 struct initializers

2012-08-13 Thread Luiz Capitulino
This allows for changing QERR_ macros to initialize two struct members at the same time. See next commit for more details. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- qerror.c | 276 +++ qerror.h | 2 +- 2 files

[Qemu-devel] [PATCH 41/48] qmp: add SUSPEND_DISK event

2012-08-13 Thread Luiz Capitulino
Emitted when the guest makes a request to enter S4 state. There are three possible ways of having this event, as described here: http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg02307.html I've decided to add a new event and make it indepedent of SHUTDOWN. This means that the SHUTDOWN ev

[Qemu-devel] [PATCH 22/48] qapi-schema: add ErrorClass enum

2012-08-13 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- qapi-schema.json | 30 ++ 1 file changed, 30 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index a62bf68..b513935 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3,6 +3,36 @@

[Qemu-devel] [PATCH 04/48] qerror: reduce public exposure

2012-08-13 Thread Luiz Capitulino
qerror will be dropped in a near future, let's reduce its public exposure by making functions only used in qerror.c static. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- qerror.c | 10 +- qerror.h | 5 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --

[Qemu-devel] [PATCH 30/48] qemu-ga: switch to the new error format on the wire

2012-08-13 Thread Luiz Capitulino
IMPORTANT: this BREAKS qemu-ga compatibility for the error response. Instead of returning something like: { "error": { "class": "InvalidParameterValue", "data": {"name": "mode", "expected": "halt|powerdown|reboot" } } } qemu-ga now returns: { "error": { "class": "GenericError",

[Qemu-devel] [PATCH 27/48] hmp: hmp_change(): use error_get_class()

2012-08-13 Thread Luiz Capitulino
The error_is_type() function is going to be dropped. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- hmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hmp.c b/hmp.c index 54c37d7..9b44dfc 100644 --- a/hmp.c +++ b/hmp.c @@ -793,7 +793,8 @@ void hmp_cha

[Qemu-devel] [PATCH 17/48] block: block_int: include qerror.h

2012-08-13 Thread Luiz Capitulino
Several block/ files are relying on qerror.h being provided by qapi-types.h. Fix this, as a future commit will change qapi-types.h not to provide qerror.h. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- block_int.h | 1 + 1 file changed, 1 insertion(+) diff --git a/block_int

[Qemu-devel] [PATCH 01/48] monitor: drop unused monitor debug code

2012-08-13 Thread Luiz Capitulino
In the old QMP days, this code was used to find out QMP commands that might be calling monitor_printf() down its call chain. This is almost impossible to happen today, because the qapi converted commands don't even have a monitor object. Besides, it's been more than a year since I used this last t

[Qemu-devel] [PATCH 38/48] qmp: emit the WAKEUP event when the guest is put to run

2012-08-13 Thread Luiz Capitulino
Today, the WAKEUP event is emitted when a wakeup _request_ is made. This could be the system_wakeup command, for example. A better semantic would be to emit the event when the guest is already running, as that's what matters in the end. This commit does that change. In theory, this could break co

[Qemu-devel] [PATCH 31/48] error: drop error_get_qobject()/error_set_qobject()

2012-08-13 Thread Luiz Capitulino
error_get_qobject() is unused since last commit, error_set_qobject() has never been used. Also drops error_int.h. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- error.c | 20 error_int.h | 28 qapi/qmp-disp

[Qemu-devel] [PATCH 05/48] qerror: drop qerror_abort()

2012-08-13 Thread Luiz Capitulino
qerror_abort() depends on the 'file', 'func' and 'linenr' members of QError. However, these members are going to be dropped by the next commit, so let's drop qerror_abort() in favor of printing an error message to stderr plus a call to abort(). Signed-off-by: Luiz Capitulino Reviewed-by: Markus A

[Qemu-devel] [PATCH 47/48] target-i386: add implementation of query-cpu-definitions (v2)

2012-08-13 Thread Luiz Capitulino
From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- target-i386/cpu.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 880cfea..6d5d0d6 100644 --- a/target-i386/cpu.c +++ b/target-i386/cp

[Qemu-devel] [PATCH 37/48] qmp: don't emit the RESET event on wakeup from S3

2012-08-13 Thread Luiz Capitulino
QEMU is basically using reset logic when waking up from S3. This causes the QMP RESET event to be emitted, which is wrong. Also, the runstate checks done in reset are not necessary for S3 wakeup. Fix this by untangling wakeup from reset logic and passing VMRESET_SILENT to qemu_system_reset() to av

[Qemu-devel] [PATCH 24/48] error, qerror: add ErrorClass argument to error functions

2012-08-13 Thread Luiz Capitulino
The new argument is added to functions qerror_report() and error_set(). It's stored in Error and QError. qerror_report_err() is also updated to take care of it. The QERR_ macros are changed to contain a place holder value for the new argument, so that the value is used on all current calls to qerr

Re: [Qemu-devel] [PATCH] qom: add style guide

2012-08-13 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Mon, Aug 13, 2012 at 01:46:46PM -0500, Anthony Liguori wrote: >> +typedef struct MyType MyType; >> + >> +struct MyType >> +{ > > This seems to violate our style:should be > >> +struct MyType { That's a bug in CODING_STYLE. Coding style only

Re: [Qemu-devel] [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 20:48 +, Blue Swirl wrote: > On Mon, Aug 13, 2012 at 7:33 PM, Anthony Liguori wrote: > > Alex Williamson writes: > > > >> On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: > >>> Alex Williamson writes: > >>> > >>> > VFIO kernel support was just merged into Linux

[Qemu-devel] [PATCH 48/48] target-ppc: add implementation of query-cpu-definitions (v2)

2012-08-13 Thread Luiz Capitulino
From: Anthony Liguori Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- target-ppc/translate_init.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 5742229..6fe4168 100644 --- a/targ

[Qemu-devel] VFIO: Call for reviewers (was Re: [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2)

2012-08-13 Thread Alex Williamson
On Mon, 2012-08-13 at 14:33 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > > On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: > >> Alex Williamson writes: > >> > >> > VFIO kernel support was just merged into Linux, so I'd like to > >> > formally propose inclusion of the QE

Re: [Qemu-devel] [PATCH] kvm-all.c: Move init of irqchip_inject_ioctl out of kvm_irqchip_create()

2012-08-13 Thread Marcelo Tosatti
On Sun, Aug 12, 2012 at 02:13:52PM +0100, Peter Maydell wrote: > Ping? I don't think this one quite made it into Avi's pullreq... Please post this with the rest of the code to support the new s->irqchip_inject_ioctl value. > thanks > -- PMM > > On 6 August 2012 18:05, Peter Maydell wrote: > > M

[Qemu-devel] [PATCH 28/48] error: drop unused functions

2012-08-13 Thread Luiz Capitulino
Besides being unused, they operate on the current error format, which is going to be replaced soon. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- error.c | 48 error.h | 16 error_int.h | 1 - 3 files

[Qemu-devel] [PATCH 10/48] error: don't delay error message construction

2012-08-13 Thread Luiz Capitulino
Today, the error message is only constructed when it's used. This commit changes that to construct the error message when the error object is built (ie. when the error is reported). This simplifies the Error object. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- error.c | 8

[Qemu-devel] [PATCH 33/48] qerror: drop qerror_table and qerror_format()

2012-08-13 Thread Luiz Capitulino
They are unused since last commit. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- qerror.c | 400 --- qerror.h | 7 -- 2 files changed, 407 deletions(-) diff --git a/qerror.c b/qerror.c index dda1427..ccc52be 1006

Re: [Qemu-devel] [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Blue Swirl
On Mon, Aug 13, 2012 at 7:33 PM, Anthony Liguori wrote: > Alex Williamson writes: > >> On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: >>> Alex Williamson writes: >>> >>> > VFIO kernel support was just merged into Linux, so I'd like to >>> > formally propose inclusion of the QEMU vfio-

Re: [Qemu-devel] [RFC 18/20] target-i386: use properties to set/unset user specified features on CPU

2012-08-13 Thread Eduardo Habkost
On Fri, Aug 10, 2012 at 01:22:34PM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > target-i386/cpu.c | 167 > +++--- > 1 file changed, 20 insertions(+), 147 deletions(-) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > i

[Qemu-devel] [PATCH 25/48] qerror: add proper ErrorClass value for QERR_ macros

2012-08-13 Thread Luiz Capitulino
This commit replaces the place holder value for the ErrorClass argument with a proper ErrorClass value for all QERR_ macros. All current errors are mapped to GenericError, except for errors CommandNotFound, DeviceEncrypted, DeviceNotActive, DeviceNotFound, KVMMissingCap and MigrationExpected, whic

Re: [Qemu-devel] Funny -m arguments can crash

2012-08-13 Thread Blue Swirl
On Mon, Aug 13, 2012 at 2:10 PM, Gleb Natapov wrote: > On Mon, Aug 13, 2012 at 05:04:30PM +0300, Avi Kivity wrote: >> On 08/13/2012 05:02 PM, Gleb Natapov wrote: >> >> >> IMO we need to fix CMOS reporting. >> >> >> >> (technically we shouldn't touch CMOS NVRAM at all; seabios should >> >> discover

[Qemu-devel] [PATCH 14/48] net: inet_connect(), inet_connect_opts(): add in_progress argument

2012-08-13 Thread Luiz Capitulino
It's used to indicate the special case where a valid file-descriptor is returned (ie. success) but the connection can't be completed w/o blocking. This is needed because QERR_SOCKET_CONNECT_IN_PROGRESS is not treated like an error and a future commit will drop it. Signed-off-by: Luiz Capitulino

[Qemu-devel] [PATCH 18/48] hmp: hmp.h: include qdict.h

2012-08-13 Thread Luiz Capitulino
hmp.h is relying on qdict.h being provided by qapi-types.h. Fix this, as a future commit will change qapi-types.h not to provide qdict.h. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- hmp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/hmp.h b/hmp.h index 8d2b0d7..3275

Re: [Qemu-devel] [PATCH 01/10] hw/armv7m_nvic: Fix incorrect default for num-irqs property

2012-08-13 Thread Meador Inge
On 08/13/2012 10:31 AM, Peter Maydell wrote: > Fix an incorrect default value for the num-irqs property (we were > attempting to override it from the default set by the parent class > but not succeeding, which meant that the lm3s6965evb model would > assert on startup attempting to wire up nonexis

[Qemu-devel] [PATCH 09/48] qerror: don't delay error message construction

2012-08-13 Thread Luiz Capitulino
Today, the error message is only constructed when it's used. This commit changes qerror to construct the error message when the error object is built (ie. when the error is reported). This eliminates the need of storing a pointer to qerror_table[], which will be dropped soon, and also simplifies t

[Qemu-devel] [PATCH 07/48] qerror: QError: drop file, linenr, func

2012-08-13 Thread Luiz Capitulino
They have never been fully used and conflict with future error improvements. Also makes qerror_report() a proper function, as there's no point in having it as a macro anymore. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- qerror.c | 20 +++- qerror.h | 8 +-

[Qemu-devel] [PATCH 02/48] qerror: QERR_AMBIGUOUS_PATH: drop %(object) from human msg

2012-08-13 Thread Luiz Capitulino
Actually, renames it to 'object'. This must be what the original author meant to write, as there's no 'object' in the error's data member. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- qerror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qerror.c b/qe

[Qemu-devel] [PATCH 21/48] qapi: don't convert enum strings to lowercase

2012-08-13 Thread Luiz Capitulino
Next commit will introduce enum strings in camel case. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- scripts/qapi-types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 9b7da96..cf601ae 100644 --- a/sc

[Qemu-devel] [PATCH 29/48] qmp: switch to the new error format on the wire

2012-08-13 Thread Luiz Capitulino
IMPORTANT: this BREAKS QMP's compatibility for the error response. This commit changes QMP's wire protocol to make use of the simpler error format introduced by previous commits. There are two important (and mostly incompatible) changes: 1. Almost all error classes have been replaced by Generic

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-13 Thread Marcelo Tosatti
On Mon, Aug 13, 2012 at 01:48:39PM -0600, Eric Blake wrote: > On 08/13/2012 12:21 PM, Marcelo Tosatti wrote: > > On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: > >> We can know the guest is panicked when the guest runs on xen. > >> But we do not have such feature on kvm. > >> > >> An

Re: [Qemu-devel] [PATCH v8] kvm: notify host when the guest is panicked

2012-08-13 Thread Eric Blake
On 08/13/2012 12:21 PM, Marcelo Tosatti wrote: > On Wed, Aug 08, 2012 at 10:43:01AM +0800, Wen Congyang wrote: >> We can know the guest is panicked when the guest runs on xen. >> But we do not have such feature on kvm. >> >> Another purpose of this feature is: management app(for example: >> libvirt

[Qemu-devel] [PATCH] trace/simple: Fix compiler warning for 32 bit hosts

2012-08-13 Thread Stefan Weil
gcc complains when a 32 bit pointer is casted to a 64 bit integer. Cc: Stefan Hajnoczi Signed-off-by: Stefan Weil --- scripts/tracetool/backend/simple.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/si

[Qemu-devel] [PATCH 11/48] qmp: query-block: add 'encryption_key_missing' field

2012-08-13 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- block.c | 1 + qapi-schema.json | 9 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 24323c1..016858b 100644 --- a/block.c +++ b/block.c @@ -2445,6 +2445,7 @@ BlockInfoList

[Qemu-devel] [PATCH] trace/simple: Replace asprintf by g_strdup_printf

2012-08-13 Thread Stefan Weil
asprintf is not available for all hosts. g_strdup_printf is more portable and simplifies the code because if does not need error handling. The static variable does not need an explicit assignment to be NULL. Cc: Stefan Hajnoczi Signed-off-by: Stefan Weil --- trace/simple.c | 14 -

Re: [Qemu-devel] [qemu-devel] [PATCH V2 0/3] [RFC] libqblock draft code v2

2012-08-13 Thread Blue Swirl
On Mon, Aug 13, 2012 at 11:27 AM, Wenchao Xia wrote: > 于 2012-8-11 20:18, Blue Swirl 写道: > >> On Fri, Aug 10, 2012 at 8:04 AM, Wenchao Xia >> wrote: >>> >>> Thanks for your review, sorry I have forgot some fixing you >>> mentioned before, will correct them this time. >>> >>> 于 2012-8-10 1:12,

Re: [Qemu-devel] [RFC 06/15] pc: set FW_CFG data based on APIC ID calculation

2012-08-13 Thread Eduardo Habkost
On Mon, Aug 13, 2012 at 09:52:43PM +0200, Igor Mammedov wrote: > On 08/07/2012 09:56 PM, Eduardo Habkost wrote: > >This changes FW_CFG_MAX_CPUS and FW_CFG_NUMA to use apic_id_for_cpu(), > >so the NUMA table can be based on the APIC IDs, instead of CPU index > >(SeaBIOS knows nothing about CPU index

Re: [Qemu-devel] [RFC 03/15] kvm: set vcpu_id to APIC ID instead of CPU index

2012-08-13 Thread Eduardo Habkost
On Mon, Aug 13, 2012 at 09:16:52PM +0200, Igor Mammedov wrote: > On 08/07/2012 09:56 PM, Eduardo Habkost wrote: > >The CPU ID in KVM is supposed to be the APIC ID, so change the > >KVM_CREATE_VCPU call to match it. It didn't break anything yet because > >today the APIC ID is assumed to be == the CP

[Qemu-devel] [PATCH 26/48] error: add error_get_class()

2012-08-13 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- error.c | 5 + error.h | 5 + 2 files changed, 10 insertions(+) diff --git a/error.c b/error.c index 648706a..2d34cde 100644 --- a/error.c +++ b/error.c @@ -64,6 +64,11 @@ bool error_is_set(Error **errp) return (errp

Re: [Qemu-devel] [PATCH] qom: add style guide

2012-08-13 Thread Michael S. Tsirkin
On Mon, Aug 13, 2012 at 01:46:46PM -0500, Anthony Liguori wrote: > +typedef struct MyType MyType; > + > +struct MyType > +{ This seems to violate our style:should be > +struct MyType { > +Object parent_obj; > + > +/*< private >*/ > +int foo; > +

Re: [Qemu-devel] [RFC 06/15] pc: set FW_CFG data based on APIC ID calculation

2012-08-13 Thread Igor Mammedov
On 08/07/2012 09:56 PM, Eduardo Habkost wrote: This changes FW_CFG_MAX_CPUS and FW_CFG_NUMA to use apic_id_for_cpu(), so the NUMA table can be based on the APIC IDs, instead of CPU index (SeaBIOS knows nothing about CPU indexes, just APIC IDs). Signed-off-by: Eduardo Habkost --- hw/pc.c

Re: [Qemu-devel] [PATCH 1/2] virtio-block: support auto-sensing of block sizes

2012-08-13 Thread Blue Swirl
On Mon, Aug 13, 2012 at 8:40 AM, Jens Freimann wrote: > From: Einar Lueck > > Virtio-blk does not impose fixed block sizes for access to > backing devices. This patch introduces support for auto > lookup of the block sizes of the backing block device. This > automatic lookup needs to be enabled e

[Qemu-devel] [PATCH 42/48] qmp: introduce device-list-properties command

2012-08-13 Thread Luiz Capitulino
From: Anthony Liguori This can be used in conjunction with qom-list-types to determine the supported set of devices and their parameters. Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- qapi-schema.json | 28 qmp-commands.hx | 7 +++ qmp.c

[Qemu-devel] [PATCH 34/48] error, qerror: drop QDict member

2012-08-13 Thread Luiz Capitulino
Used to store error information, but it's unused now. Signed-off-by: Luiz Capitulino Reviewed-by: Markus Armbruster --- error.c | 4 qerror.c | 4 qerror.h | 1 - 3 files changed, 9 deletions(-) diff --git a/error.c b/error.c index 0e10373..1f05fc4 100644 --- a/error.c +++ b/error.c

[Qemu-devel] [PULL 00/48]: QMP queue

2012-08-13 Thread Luiz Capitulino
Contains my new error format series, a few fixes related to the WAKEUP event, a new event and the new commands to avoid -help output parsing. The changes (since 33e95c6328a3149a52615176617997c4f8f7088b) are available in the following repository: git://repo.or.cz/qemu/qmp-unstable.git queue/qm

Re: [Qemu-devel] [RFC-v2 3/6] vhost-scsi: add -vhost-scsi host device for use with tcm-vhost

2012-08-13 Thread Blue Swirl
On Mon, Aug 13, 2012 at 8:35 AM, Nicholas A. Bellinger wrote: > From: Stefan Hajnoczi > > This patch adds a new type of host device that drives the vhost_scsi > device. The syntax to add vhost-scsi is: > > qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 > > The virtio-scsi emulated device wi

Re: [Qemu-devel] [RFC 0/7] Migration stats

2012-08-13 Thread Luiz Capitulino
On Mon, 13 Aug 2012 08:59:00 -0600 Eric Blake wrote: > On 08/13/2012 04:50 AM, Juan Quintela wrote: > > Hi > > > > This modifies the output of info migrate/qmp_query_migrate to add the > > stats that I got request for. > > > > - It moves total time to MigrationInfo instead of ram (luiz suggesti

Re: [Qemu-devel] [PATCH 06/13] Add spent time for migration

2012-08-13 Thread Eric Blake
On 08/13/2012 01:39 PM, Luiz Capitulino wrote: > On Fri, 29 Jun 2012 18:43:57 +0200 > Juan Quintela wrote: > >> We add time spent for migration to the output of "info migrate" >> command. 'total_time' means time since the start fo migration if >> migration is 'active', and total time of migratio

Re: [Qemu-devel] [PATCH 3/7] migration: print total downtime for final phase of migration

2012-08-13 Thread Luiz Capitulino
On Mon, 13 Aug 2012 12:50:53 +0200 Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > hmp.c| 4 > migration.c | 5 - > migration.h | 1 + > qapi-schema.json | 6 +- > 4 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/hmp.c b/hmp.c >

Re: [Qemu-devel] [PATCH v2 00/12] Portable thread-pool/AIO, Win32 emulated AIO

2012-08-13 Thread Stefan Weil
Am 11.08.2012 21:27, schrieb Stefan Weil: Am 07.08.2012 13:17, schrieb Paolo Bonzini: This patch series is part 2 in my EventNotifier/AIO improvements for QEMU 1.2. It extends use of EventNotifier to the main loop and AIO subsystems. A new API using EventNotifier is added to aio.c and a new po

Re: [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need (v2)

2012-08-13 Thread Anthony Liguori
Luiz Capitulino writes: > On Mon, 13 Aug 2012 14:16:58 -0300 > Luiz Capitulino wrote: > >> On Fri, 10 Aug 2012 11:04:08 -0500 >> Anthony Liguori wrote: >> >> > This series implements the necessary commands to implements danpb's idea to >> > remove -help parsing in libvirt. We would introduce

Re: [Qemu-devel] [RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection

2012-08-13 Thread Blue Swirl
On Mon, Aug 13, 2012 at 8:35 AM, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This is required to get past the following assert with: > > commit 1523ed9e1d46b0b54540049d491475ccac7e6421 > Author: Jan Kiszka > Date: Thu May 17 10:32:39 2012 -0300 > > virtio/vhost: Add support

Re: [Qemu-devel] [PATCH 06/13] Add spent time for migration

2012-08-13 Thread Luiz Capitulino
On Fri, 29 Jun 2012 18:43:57 +0200 Juan Quintela wrote: > We add time spent for migration to the output of "info migrate" > command. 'total_time' means time since the start fo migration if > migration is 'active', and total time of migration if migration is > completed. As we are also intereste

Re: [Qemu-devel] [PATCH 0/3] VFIO-based PCI device assignment for QEMU 1.2

2012-08-13 Thread Anthony Liguori
Alex Williamson writes: > On Mon, 2012-08-13 at 08:27 -0500, Anthony Liguori wrote: >> Alex Williamson writes: >> >> > VFIO kernel support was just merged into Linux, so I'd like to >> > formally propose inclusion of the QEMU vfio-pci driver for >> > QEMU 1.2. Included here is support for x86

  1   2   3   >