Re: [Qemu-devel] [RFC PATCH 00/34] Multi Architecture System Emulation

2015-05-15 Thread Peter Crosthwaite
On Sun, May 10, 2015 at 11:29 PM, Peter Crosthwaite wrote: > Hi All, > > This is target-multi, a system-mode build that can support multiple > cpu-types. Patches 1-3 are the main infrastructure. The hard part > is the per-target changes needed to get each arch into an includable > state. > > Two a

Re: [Qemu-devel] [PATCH v2] block: Let bdrv_drain_all() to call aio_poll() for each AioContext

2015-05-15 Thread Christian Borntraeger
Am 14.05.2015 um 18:03 schrieb Alexander Yarygin: > After the commit 9b536adc ("block: acquire AioContext in > bdrv_drain_all()") the aio_poll() function got called for every > BlockDriverState, in assumption that every device may have its own > AioContext. The bdrv_drain_all() function is called i

Re: [Qemu-devel] [PATCH v2] block: Let bdrv_drain_all() to call aio_poll() for each AioContext

2015-05-15 Thread Christian Borntraeger
Am 15.05.2015 um 08:59 schrieb Christian Borntraeger: > PS: There is another independent issue now in the kernel when exiting QEMU > caused by Linux kernel commit 6098b45b32e6baeacc04790773ced9340601d511 > Author: Gu Zheng > AuthorDate: Wed Sep 3 17:45:44 2014 +0800 > Commit: Benjamin LaHa

Re: [Qemu-devel] [PATCH v3 12/12] virtio-scsi-dataplane: Add "device IO" op blocker listener

2015-05-15 Thread Fam Zheng
On Fri, 05/15 08:50, Paolo Bonzini wrote: > > > On 15/05/2015 08:04, Fam Zheng wrote: > > @@ -111,6 +111,10 @@ static void > > virtio_scsi_iothread_handle_ctrl(EventNotifier *notifier) > > VirtIOSCSI *s = VIRTIO_SCSI(vring->parent); > > VirtIOSCSIReq *req; > > > > +if (s->pause_c

Re: [Qemu-devel] [PATCH v3 01/12] block: Add op blocker type "device IO"

2015-05-15 Thread Fam Zheng
On Fri, 05/15 14:22, Wen Congyang wrote: > On 05/15/2015 02:04 PM, Fam Zheng wrote: > > It blocks device IO. > > I am reading mirror codes recently, and have a question: > When block job mirror is finished, the source and target is synced. But we > call bdrv_swap() later(in bh context). Can the gu

Re: [Qemu-devel] [PATCH RFC 1/1] virtio: migrate config_vector

2015-05-15 Thread Christian Borntraeger
Am 14.05.2015 um 19:00 schrieb Dr. David Alan Gilbert: > * Christian Borntraeger (borntrae...@de.ibm.com) wrote: >> Am 14.05.2015 um 11:36 schrieb Michael S. Tsirkin: >>> On Thu, May 14, 2015 at 11:22:13AM +0200, Christian Borntraeger wrote: Am 13.05.2015 um 23:47 schrieb Michael S. Tsirkin: >

Re: [Qemu-devel] [PATCH RFC 1/1] virtio: migrate config_vector

2015-05-15 Thread Michael S. Tsirkin
On Fri, May 15, 2015 at 09:08:07AM +0200, Christian Borntraeger wrote: > Am 14.05.2015 um 19:00 schrieb Dr. David Alan Gilbert: > > * Christian Borntraeger (borntrae...@de.ibm.com) wrote: > >> Am 14.05.2015 um 11:36 schrieb Michael S. Tsirkin: > >>> On Thu, May 14, 2015 at 11:22:13AM +0200, Christi

Re: [Qemu-devel] [PATCH v3] mirror: correct buf_size

2015-05-15 Thread Paolo Bonzini
On 15/05/2015 08:53, Wen Congyang wrote: > On 05/15/2015 02:45 PM, Paolo Bonzini wrote: >> >> >> On 15/05/2015 03:37, Wen Congyang wrote: >>> If bus_size is less than 0, the command fails. >>> If buf_size % granularity is not 0, mirror_free_init() will >>> do dangerous things. >>> >>> Signed-off-

Re: [Qemu-devel] [PATCH v3 12/12] virtio-scsi-dataplane: Add "device IO" op blocker listener

2015-05-15 Thread Paolo Bonzini
On 15/05/2015 09:03, Fam Zheng wrote: > On Fri, 05/15 08:50, Paolo Bonzini wrote: >> >> >> On 15/05/2015 08:04, Fam Zheng wrote: >>> @@ -111,6 +111,10 @@ static void >>> virtio_scsi_iothread_handle_ctrl(EventNotifier *notifier) >>> VirtIOSCSI *s = VIRTIO_SCSI(vring->parent); >>> VirtIO

Re: [Qemu-devel] Kernel Panic on Yum update

2015-05-15 Thread Gerhard Wiesinger
On 15.05.2015 08:51, Paolo Bonzini wrote: On 15/05/2015 08:34, Gerhard Wiesinger wrote: Helllo, I'm using latest qemu-kvm-2.3.0-3.fc21.x86_64 from libvirt repository (updated afterwards). Running yum regularly crashes the VM like below. VM is stripped down to minimum memory requirements (256MB

[Qemu-devel] [PATCH v5] mirror: correct buf_size

2015-05-15 Thread Wen Congyang
If bus_size is less than 0, the command fails. If buf_size is 0, use DEFAULT_MIRROR_BUF_SIZE. If buf_size % granularity is not 0, mirror_free_init() will do dangerous things. Signed-off-by: Wen Congyang Reviewed-by: Fam Zheng --- block/mirror.c | 11 ++- blockdev.c | 4 +--- 2 file

Re: [Qemu-devel] [PATCH] Do not emulate a floppy drive when -nodefaults

2015-05-15 Thread Markus Armbruster
John Snow writes: > On 05/14/2015 10:07 AM, Michael S. Tsirkin wrote: >> On Thu, May 14, 2015 at 02:02:04PM +0200, Markus Armbruster wrote: >>> Correct. >>> >>> Here's how I think it should be done: >>> >>> * Create a machine option to control the FDC >>> >>> This is a machine-specific option.

[Qemu-devel] PING: [PATCH v3 0/3] virtio-mmio: introduce eventfd support

2015-05-15 Thread Pavel Fedin
Hello! I have published v3 3 days ago, and got no single reply. Was it lost? I've (hopefully) done everything you asked for, and sent it using git send-email from the command line. So should work. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia

Re: [Qemu-devel] [PATCH v3 12/12] virtio-scsi-dataplane: Add "device IO" op blocker listener

2015-05-15 Thread Fam Zheng
On Fri, 05/15 09:26, Paolo Bonzini wrote: > > > On 15/05/2015 09:03, Fam Zheng wrote: > > On Fri, 05/15 08:50, Paolo Bonzini wrote: > >> > >> > >> On 15/05/2015 08:04, Fam Zheng wrote: > >>> @@ -111,6 +111,10 @@ static void > >>> virtio_scsi_iothread_handle_ctrl(EventNotifier *notifier) > >>>

Re: [Qemu-devel] [PATCH 0/3] scripts/qemu-gdb: Add event tracing support

2015-05-15 Thread Markus Armbruster
Since you're touching qemu-gdb.py anyway, could you stick in a brief comment explaining how to put it to use?

Re: [Qemu-devel] [PATCH] pci: Fix compiler warning (MinGW-w64 gcc 4.9)

2015-05-15 Thread Markus Armbruster
Stefan Weil writes: > i686-w64-mingw32-gcc 4.9.1 from Debian Jessie complains: > > hw/pci/pci.c:938:29: warning: > array subscript is above array bounds [-Warray-bounds] > > Using g_assert instead of assert fixes this warning. > > Signed-off-by: Stefan Weil > --- > hw/pci/pci.c | 4 ++-- > 1 f

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] block: Detect multiplication overflow in bdrv_getlength

2015-05-15 Thread Alberto Garcia
On Fri 15 May 2015 03:39:10 AM CEST, Fam Zheng wrote: > int64_t ret = bdrv_nb_sectors(bs); > > +ret = (int64_t)(ret * BDRV_SECTOR_SIZE) < 0 ? -EFBIG : ret; > return ret < 0 ? ret : ret * BDRV_SECTOR_SIZE; Maybe in this case you're safe, but in general there's no guarantee that if

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] qemu-iotests: qemu-img info on afl VMDK image with a huge capacity

2015-05-15 Thread Alberto Garcia
On Fri 15 May 2015 03:39:11 AM CEST, Fam Zheng wrote: > The image is contributed by Richard W.M. Jones. > > Cc: Richard W.M. Jones > Signed-off-by: Fam Zheng Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] Kernel Panic on Yum update

2015-05-15 Thread Paolo Bonzini
On 15/05/2015 09:37, Gerhard Wiesinger wrote: >> > > Yes, yum takes memory. But there is ~2.2 GB virt memory available. That > should be enough. Therefore I think it is a kernel problem. As in > previous crashes on the mailing list there is a lot of swap available > (2GB) which isn't touched in

Re: [Qemu-devel] [PATCH 1/2] block: Detect multiplication overflow in bdrv_getlength

2015-05-15 Thread Markus Armbruster
Fam Zheng writes: > Bogus image may have a large total_sectors that will overflow the > multiplication. For cleanness, fix the return code so the error message > will be meaningful. > > Reported-by: Richard W.M. Jones > Signed-off-by: Fam Zheng > --- > block.c | 1 + > 1 file changed, 1 insert

Re: [Qemu-devel] [PATCH v2] block: Let bdrv_drain_all() to call aio_poll() for each AioContext

2015-05-15 Thread Christian Borntraeger
Am 15.05.2015 um 08:59 schrieb Christian Borntraeger: > Am 14.05.2015 um 18:03 schrieb Alexander Yarygin: >> After the commit 9b536adc ("block: acquire AioContext in >> bdrv_drain_all()") the aio_poll() function got called for every >> BlockDriverState, in assumption that every device may have its

Re: [Qemu-devel] [PATCH] Do not emulate a floppy drive when -nodefaults

2015-05-15 Thread Paolo Bonzini
On 15/05/2015 09:50, Markus Armbruster wrote: > --nodefaults must continue to disable all optional parts of the board. > > What exactly is optional is for the board / machine type to define. It > can't be changed once the machine type is released. > > When in doubt, make it optional. I agree

[Qemu-devel] [PULL 00/26] qapi: Fix qapi mangling of downstream names, and more

2015-05-15 Thread Markus Armbruster
The following changes since commit 1eeace9c237a729d11c7acd7c0338ab4562af637: Merge remote-tracking branch 'remotes/agraf/tags/signed-s390-for-upstream' into staging (2015-05-13 16:06:07 +0100) are available in the git repository at: git://repo.or.cz/qemu/armbru.git qapi-next for you to fe

[Qemu-devel] [PULL 08/26] qapi: Use c_enum_const() in generate_alternate_qtypes()

2015-05-15 Thread Markus Armbruster
Missed in commit b0b5819. Signed-off-by: Markus Armbruster Signed-off-by: Eric Blake --- scripts/qapi-types.py | 6 ++ scripts/qapi.py | 11 --- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index 6ca48c1..9eb08a

[Qemu-devel] [PULL 01/26] qmp: Add qom_path field to query-cpus command

2015-05-15 Thread Markus Armbruster
From: Eduardo Habkost This will allow clients to query additional information directly using qom-get on the CPU objects. Reviewed-by: David Gibson Reviewed-by: Andreas Färber Signed-off-by: Eduardo Habkost Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- cpus.c | 1 +

[Qemu-devel] [PULL 02/26] doc: fix qmp event type

2015-05-15 Thread Markus Armbruster
From: "Michael S. Tsirkin" Event name for hot unplug errors was wrong. Make doc match code. Cc: Zhu Guihua Reported-by: Eric Blake Signed-off-by: Michael S. Tsirkin Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- docs/qmp/qmp-events.txt | 4 ++-- 1 file changed, 2 insertions(+

[Qemu-devel] [PULL 07/26] qapi: Simplify c_enum_const()

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Signed-off-by: Eric Blake --- scripts/qapi.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 1258f76..b917cad 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -961,6 +961,4 @@ def camel_to_upper

[Qemu-devel] [PULL 05/26] qapi: Rename _generate_enum_string() to camel_to_upper()

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Signed-off-by: Eric Blake --- scripts/qapi.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index a4701ca..7330f7c 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -538,7 +538,7 @@ def chec

[Qemu-devel] [PULL 26/26] qapi: Inline gen_command_decl_prologue(), gen_command_def_prologue()

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi-commands.py | 58 1 file changed, 24 insertions(+), 34 deletions(-) diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index c3e420e..1c1d3aa 100644 --- a/scr

[Qemu-devel] [PULL 20/26] qapi: qapi-commands.py option --type is unused, drop it

2015-05-15 Thread Markus Armbruster
Anything but --type sync (which is the default) suppresses output entirely, which makes no sense. Dates back to the initial commit c17d990. Commit message says "Currently only generators for synchronous qapi/qmp functions are supported", so maybe output other than "synchronous qapi/qmp" was plann

[Qemu-devel] [PULL 04/26] qapi: Rename identical c_fun()/c_var() into c_name()

2015-05-15 Thread Markus Armbruster
From: Eric Blake Now that the two functions are identical, we only need one of them, and we might as well give it a more descriptive name. Basically, the function serves as the translation from a QAPI name into a (portion of a) C identifier, without regards to whether it is a variable or functio

[Qemu-devel] [PULL 14/26] qapi: Support downstream simple unions

2015-05-15 Thread Markus Armbruster
From: Eric Blake Enhance the testsuite to cover downstream simple unions, including when a union branch is a downstream name. Update the generator to mangle the union names in the appropriate places. Signed-off-by: Eric Blake Signed-off-by: Markus Armbruster --- scripts/qapi-types.py

[Qemu-devel] [PULL 13/26] qapi: Support downstream structs

2015-05-15 Thread Markus Armbruster
From: Eric Blake Enhance the testsuite to cover downstream structs, including struct members and base structs. Update the generator to mangle the struct names in the appropriate places. Signed-off-by: Eric Blake Signed-off-by: Markus Armbruster --- scripts/qapi-types.py |

[Qemu-devel] [PULL 06/26] qapi: Rename generate_enum_full_value() to c_enum_const()

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Signed-off-by: Eric Blake --- scripts/qapi-event.py | 5 ++--- scripts/qapi-types.py | 6 +++--- scripts/qapi-visit.py | 4 ++-- scripts/qapi.py | 6 +++--- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/scripts/qapi-event.py b/scripts/qap

[Qemu-devel] [PULL 19/26] qapi: qapi-event.py option -b does nothing, drop it

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- Makefile | 2 +- scripts/qapi-event.py | 7 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index f032158..bfa5dab 100644 --- a/Makefile +++ b/Makefile @@ -273,7 +273,7 @@ $(qapi-

[Qemu-devel] [PULL 10/26] qapi: Tidy c_type() logic

2015-05-15 Thread Markus Armbruster
From: Eric Blake c_type() is designed to be called on both string names and on array designations, so 'name' is a bit misleading because it operates on more than strings. Also, no caller ever passes an empty string. Finally, + notation is a bit nicer to read than '%s' % value for string concate

[Qemu-devel] [PULL 18/26] tests: Add missing dependencies on $(qapi-py)

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 666aee2..6d2f2e5 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -301,22 +301,22 @@ tests/test-vmstate

[Qemu-devel] [PULL 03/26] qapi: Fix C identifiers generated for names containing '.'

2015-05-15 Thread Markus Armbruster
c_fun() maps '.' to '_', c_var() doesn't. Nothing prevents '.' in QAPI names that get passed to c_var(). Which QAPI names get passed to c_fun(), to c_var(), or to both is not obvious. Names of command parameters and struct type members get passed to c_var(). c_var() strips a leading '*', but th

[Qemu-devel] [PULL 11/26] qapi: Make c_type() consistently convert qapi names

2015-05-15 Thread Markus Armbruster
From: Eric Blake Continuing the string of cleanups for supporting downstream names containing '.', this patch focuses on ensuring c_type() can handle a downstream name. This patch alone does not fix the places where generator output should be calling this function but was open-coding things inst

[Qemu-devel] [PULL 17/26] qapi: Support downstream events and commands

2015-05-15 Thread Markus Armbruster
From: Eric Blake Enhance the testsuite to cover downstream events and commands. Events worked without more tweaks, but commands needed a few final updates in the generator to mangle names in the appropriate places. In making those tweaks, it was easier to drop type_visitor() and inline its action

[Qemu-devel] [PULL 23/26] qapi: Turn generators' mandatory option -i into an argument

2015-05-15 Thread Markus Armbruster
Mandatory option is silly, and the error handling is missing: the programs crash when -i isn't supplied. Make it an argument, and check it properly. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- Makefile | 14 +++--- docs/qapi-code-gen.txt | 10 +-

[Qemu-devel] [PULL 25/26] qapi: Drop pointless flush() before close()

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi.py | 4 1 file changed, 4 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index fbfe050..f96a777 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -1064,9 +1064,5 @@ def close_output(fdef, fdecl):

[Qemu-devel] [PULL 12/26] qapi: Support downstream enums

2015-05-15 Thread Markus Armbruster
From: Eric Blake Enhance the testsuite to cover a downstream enum type and enum string. Update the generator to mangle the enum name in the appropriate places. Signed-off-by: Eric Blake Signed-off-by: Markus Armbruster --- scripts/qapi-types.py | 15 --- scripts

[Qemu-devel] [PULL 15/26] qapi: Support downstream flat unions

2015-05-15 Thread Markus Armbruster
From: Eric Blake Enhance the testsuite to cover downstream flat unions, including the base type, discriminator name and type, and branch name and type. Update the generator to mangle the union names in the appropriate places. Signed-off-by: Eric Blake Signed-off-by: Markus Armbruster --- scr

[Qemu-devel] [PULL 16/26] qapi: Support downstream alternates

2015-05-15 Thread Markus Armbruster
From: Eric Blake Enhance the testsuite to cover downstream alternates, including whether the branch name or type is downstream. Update the generator to mangle alternate names in the appropriate places. Signed-off-by: Eric Blake Signed-off-by: Markus Armbruster --- scripts/qapi-types.py

[Qemu-devel] [PULL 24/26] qapi: Factor open_output(), close_output() out of generators

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi-commands.py | 101 +-- scripts/qapi-event.py| 85 --- scripts/qapi-types.py| 81 - scripts/qapi-

[Qemu-devel] [PULL 09/26] qapi: Move camel_to_upper(), c_enum_const() to closely related code

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Signed-off-by: Eric Blake --- scripts/qapi.py | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index 3757a91..cc33355 100644 --- a/scripts/qapi.py +++ b/scri

[Qemu-devel] [PULL 22/26] qapi: Fix generators to report command line errors decently

2015-05-15 Thread Markus Armbruster
Report to stderr, prefix with the program name. Also reject extra arguments. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/qapi.py b/scripts/qapi.py index b97dd0b..df6e5aa 100644 ---

Re: [Qemu-devel] [PATCH 1/2] block: Detect multiplication overflow in bdrv_getlength

2015-05-15 Thread Fam Zheng
On Fri, 05/15 10:10, Markus Armbruster wrote: > Fam Zheng writes: > > > Bogus image may have a large total_sectors that will overflow the > > multiplication. For cleanness, fix the return code so the error message > > will be meaningful. > > > > Reported-by: Richard W.M. Jones > > Signed-off-by:

[Qemu-devel] [PULL 21/26] qapi: Factor parse_command_line() out of the generators

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- scripts/qapi-commands.py | 34 +++--- scripts/qapi-event.py| 32 +--- scripts/qapi-types.py| 36 scripts/qapi-visit.py| 35 ---

[Qemu-devel] [PATCH v2 1/2] block: Detect multiplication overflow in bdrv_getlength

2015-05-15 Thread Fam Zheng
Bogus image may have a large total_sectors that will overflow the multiplication. For cleanness, fix the return code so the error message will be meaningful. Reported-by: Richard W.M. Jones Signed-off-by: Fam Zheng --- block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block.c b/block.

[Qemu-devel] [PATCH v2 2/2] qemu-iotests: qemu-img info on afl VMDK image with a huge capacity

2015-05-15 Thread Fam Zheng
The image is contributed by Richard W.M. Jones. Cc: Richard W.M. Jones Signed-off-by: Fam Zheng Reviewed-by: Alberto Garcia --- tests/qemu-iotests/059 | 5 + tests/qemu-iotests/059.out | 3 +++ tests/qemu-iotests/sample_images/afl9.vmdk.bz2 |

[Qemu-devel] [PATCH v2 0/2] block: Fix error code for bdrv_getlength when the image is too big

2015-05-15 Thread Fam Zheng
v2: Correct detection of overflow. [Markus, Berto] If the image has a huge enough virtual size, $ qemu-img info afl9.img qemu-img: Can't get size of device 'image': Unknown error -512 It's because of the multiplication overflow in the return statement in bdrv_getlength (the big nagetive valu

Re: [Qemu-devel] [PATCH 05/15] tap: net_tap_fd_init() can't fail, drop dead error handling

2015-05-15 Thread Markus Armbruster
Eric Blake writes: > On 05/12/2015 06:02 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> net/tap.c | 14 +- >> 1 file changed, 1 insertion(+), 13 deletions(-) >> > >> @@ -552,14 +551,8 @@ int net_init_bridge(const NetClientOptions *opts, const >> char *n

Re: [Qemu-devel] [PATCH 03/15] net: Improve -net nic error reporting

2015-05-15 Thread Markus Armbruster
Eric Blake writes: > On 05/12/2015 06:02 AM, Markus Armbruster wrote: >> When -net nic fails, it first reports a specific error, then a generic >> one, like this: >> >> $ qemu-system-x86_64 -net nic,netdev=nonexistant >> qemu-system-x86_64: -net nic,netdev=nonexistant: netdev >> nonexist

Re: [Qemu-devel] [PATCH 12/15] tap-bsd: Convert tap_open() to Error

2015-05-15 Thread Markus Armbruster
Eric Blake writes: > On 05/12/2015 06:03 AM, Markus Armbruster wrote: >> Fixes inappropriate use of stderr in monitor command handler. >> >> While there, improve some of the messages a bit. >> >> Signed-off-by: Markus Armbruster >> --- >> net/tap-bsd.c | 33 ++--- >

Re: [Qemu-devel] [PATCH v2 1/2] block: Detect multiplication overflow in bdrv_getlength

2015-05-15 Thread Alberto Garcia
On Fri 15 May 2015 10:36:05 AM CEST, Fam Zheng wrote: > Bogus image may have a large total_sectors that will overflow the > multiplication. For cleanness, fix the return code so the error message > will be meaningful. > > Reported-by: Richard W.M. Jones > Signed-off-by: Fam Zheng Reviewed-by: Al

Re: [Qemu-devel] [PATCH 13/15] tap-solaris: Convert tap_open() to Error

2015-05-15 Thread Markus Armbruster
Eric Blake writes: > On 05/12/2015 06:03 AM, Markus Armbruster wrote: >> Fixes inappropriate use of syslog(). >> >> Not fixed: leaks on error paths, suspicious non-fatal errors. FIXMEs >> added instead. > > At least you're admitting where the code is still bad. Actually, git-rm felt pretty tem

Re: [Qemu-devel] [PATCH 15/15] tap: Improve -netdev/netdev_add/-net/... tap error reporting

2015-05-15 Thread Markus Armbruster
Eric Blake writes: > On 05/12/2015 06:03 AM, Markus Armbruster wrote: >> When -netdev tap fails, it first reports a specific error, then a >> generic one, like this: >> >> $ qemu-system-x86_64 -netdev tap,id=foo >> qemu-system-x86_64: -netdev tap,id=foo: could not configure >> /dev/net/t

Re: [Qemu-devel] [PATCH 11/11] qemu-iotests: test overlapping block-stream operations

2015-05-15 Thread Alberto Garcia
On Fri 15 May 2015 04:56:09 AM CEST, Fam Zheng wrote: >> +# If node4 is the active node, the id of the block job is drive0 >> +if self.num_imgs == 5: > > Isn't self.num_imgs a constant (9) ? Yes, but the number is arbitrary. The idea is to let users change it if they want to, so t

Re: [Qemu-devel] [RFC/RFT PATCH v2 0/3] KVM: Introduce KVM_MEM_UNCACHED

2015-05-15 Thread Ard Biesheuvel
On 14 May 2015 at 16:41, Michael S. Tsirkin wrote: > On Thu, May 14, 2015 at 04:19:23PM +0200, Laszlo Ersek wrote: >> On 05/14/15 15:48, Michael S. Tsirkin wrote: >> > On Thu, May 14, 2015 at 03:32:10PM +0200, Laszlo Ersek wrote: >> >> On 05/14/15 15:00, Andrew Jones wrote: >> >>> On Thu, May 14,

Re: [Qemu-devel] [PATCH 04/11] block: Support streaming to an intermediate layer

2015-05-15 Thread Alberto Garcia
On Fri 15 May 2015 04:33:19 AM CEST, Fam Zheng wrote: >> +/* Make sure that the image is opened in read-write mode */ >> +orig_bs_flags = bdrv_get_flags(bs); >> +if (!(orig_bs_flags & BDRV_O_RDWR)) { >> +if (bdrv_reopen(bs, orig_bs_flags | BDRV_O_RDWR, errp) != 0) { > > I don't

Re: [Qemu-devel] [PATCH 0/3] scripts/qemu-gdb: Add event tracing support

2015-05-15 Thread Peter Maydell
On 15 May 2015 at 08:58, Markus Armbruster wrote: > Since you're touching qemu-gdb.py anyway, could you stick in a brief > comment explaining how to put it to use? Good idea. It turns out the answer is just "source it from gdb", but it took me a little while to find that out, so worth commenting.

Re: [Qemu-devel] [PATCH 04/11] block: Support streaming to an intermediate layer

2015-05-15 Thread Fam Zheng
On Fri, 05/15 11:04, Alberto Garcia wrote: > On Fri 15 May 2015 04:33:19 AM CEST, Fam Zheng wrote: > > >> +/* Make sure that the image is opened in read-write mode */ > >> +orig_bs_flags = bdrv_get_flags(bs); > >> +if (!(orig_bs_flags & BDRV_O_RDWR)) { > >> +if (bdrv_reopen(bs,

Re: [Qemu-devel] [PATCH 11/11] qemu-iotests: test overlapping block-stream operations

2015-05-15 Thread Fam Zheng
On Fri, 05/15 10:58, Alberto Garcia wrote: > On Fri 15 May 2015 04:56:09 AM CEST, Fam Zheng wrote: > > >> +# If node4 is the active node, the id of the block job is drive0 > >> +if self.num_imgs == 5: > > > > Isn't self.num_imgs a constant (9) ? > > Yes, but the number is arbitrar

[Qemu-devel] [PATCH v2] util: socket: Add missing localaddr and localport option for DGRAM socket

2015-05-15 Thread Peter Krempa
The 'socket_optslist' structure does not contain the 'localaddr' and 'localport' options that are parsed in case you are creating a 'connect' type UDP character device. I've noticed it happening after commit f43e47dbf6de24db20ec9b588bb6cc762 made qemu abort() after seeing the invalid option. A mi

Re: [Qemu-devel] [PATCH] Do not emulate a floppy drive when -nodefaults

2015-05-15 Thread Stefano Stabellini
On Fri, 15 May 2015, Paolo Bonzini wrote: > On 15/05/2015 09:50, Markus Armbruster wrote: > > > --nodefaults must continue to disable all optional parts of the board. > > > > What exactly is optional is for the board / machine type to define. It > > can't be changed once the machine type is rele

Re: [Qemu-devel] Regression: qemu crash of hvm domUs with spice (backtrace included)

2015-05-15 Thread Stefano Stabellini
On Wed, 13 May 2015, Fabio Fantoni wrote: > Il 12/05/2015 16:44, Stefano Stabellini ha scritto: > > On Tue, 12 May 2015, Stefano Stabellini wrote: > > > On Tue, 12 May 2015, Fabio Fantoni wrote: > > > > Il 12/05/2015 12:26, Fabio Fantoni ha scritto: > > > > > Il 12/05/2015 11:23, Fabio Fantoni ha s

Re: [Qemu-devel] [PATCH v6 03/47] qemu_ram_foreach_block: pass up error value, and down the ramblock name

2015-05-15 Thread Amit Shah
On (Tue) 14 Apr 2015 [18:03:29], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > check the return value of the function it calls and error if it's non-0 > Fixup qemu_rdma_init_one_block that is the only current caller, > and rdma_add_block the only function it calls usi

Re: [Qemu-devel] [RFC PATCH 21/34] arm: Rename all exceptions

2015-05-15 Thread Andreas Färber
Am 15.05.2015 um 07:43 schrieb Peter Crosthwaite: > On Sun, May 10, 2015 at 11:29 PM, Peter Crosthwaite > wrote: >> These are architecture specific, and via cpu.h visibile in common >> and global namespaces. Preface them with "ARMAR_" to avoid namespace >> collisions. Prepares support for multi-ar

Re: [Qemu-devel] [RFC PATCH 00/34] Multi Architecture System Emulation

2015-05-15 Thread Andreas Färber
Am 15.05.2015 um 08:47 schrieb Peter Crosthwaite: > On Mon, May 11, 2015 at 3:27 AM, Andreas Färber wrote: >> Hi, >> >> Am 11.05.2015 um 08:29 schrieb Peter Crosthwaite: >>> Microblaze translation needs a change pattern to allow conversion to 64-bit >>> TARGET_LONG. Uses of TCGv need to be removed

Re: [Qemu-devel] [RFC v1 3/3] target-microblaze: Convert use-fpu to a CPU property

2015-05-15 Thread Andreas Färber
Am 15.05.2015 um 08:36 schrieb Alistair Francis: > On Fri, May 15, 2015 at 4:32 PM, Peter Crosthwaite > wrote: >> On Thu, May 14, 2015 at 10:56 PM, Alistair Francis >> wrote: >>> On Fri, May 15, 2015 at 3:52 PM, Peter Crosthwaite >>> wrote: On Thu, May 14, 2015 at 10:48 PM, Alistair Francis

Re: [Qemu-devel] [RFC PATCH v4 07/28] COLO: Add a new RunState RUN_STATE_COLO

2015-05-15 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > Guest will enter this state when paused to save/restore VM state > under colo checkpoint. > > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > Signed-off-by: Lai Jiangshan Reviewed-by: Dr. David Alan Gilbert (Do suspend and wa

Re: [Qemu-devel] [PATCH] monitor: suggest running "help" for command errors

2015-05-15 Thread Markus Armbruster
Bandan Das writes: > Markus Armbruster writes: > >> Bandan Das writes: >> > ... >>> -static void user_async_cmd_handler(Monitor *mon, const mon_cmd_t *cmd, >>> +static int user_async_cmd_handler(Monitor *mon, const mon_cmd_t *cmd, >>> const QDict *params) >>>

Re: [Qemu-devel] [RFC PATCH 00/34] Multi Architecture System Emulation

2015-05-15 Thread Andreas Färber
Am 15.05.2015 um 08:59 schrieb Peter Crosthwaite: > On Sun, May 10, 2015 at 11:29 PM, Peter Crosthwaite > wrote: >> The helper function namespace is going to be tricky. I haven't tackled the >> problem just yet, but looking for ideas on how we can avoid prefacing all >> helpers with arch prefixes

Re: [Qemu-devel] [RFC PATCH v4 03/28] COLO: migrate colo related info to slave

2015-05-15 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > We can know if VM in destination should go into COLO mode by refer to > the info that has been migrated from PVM. > > Signed-off-by: zhanghailiang > Signed-off-by: Yang Hongyang > Signed-off-by: Lai Jiangshan > Signed-off-by: Gonglei >

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-15 Thread Laszlo Ersek
On 05/07/15 19:01, Paolo Bonzini wrote: > > > On 07/05/2015 18:56, Jérémy Fanguède wrote: >> USB devices fail with a timeout error, as if the communication between >> the kernel and the devices fail at a certain point: >> usb 1-1: device not accepting address 5, error -110 >> usb usb1-port1: unab

[Qemu-devel] [PATCH][RFC] libxl: use new qemu parameters for emulated qemuu disks

2015-05-15 Thread Fabio Fantoni
NOTES: This patch is a only a fast draft for testing. Some tests result: At xl create cdrom empty or not are both working, xl cd-insert is working, xl cd-eject seems working but on xl command in linux hvm domU return qmp error of "Device 'ide-N' is locked", in windows 7 instead don't show the err

Re: [Qemu-devel] [RFC PATCH v4 08/28] QEMUSizedBuffer: Introduce two help functions for qsb

2015-05-15 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > Introduce two new QEMUSizedBuffer APIs which will be used by COLO to buffer > VM state: > One is qsb_put_buffer(), which put the content of a given QEMUSizedBuffer > into QEMUFile, this is used to send buffered VM state to secondary. > Anoth

[Qemu-devel] [PATCH v2 14/15] tap: Finish conversion of tap_open() to Error

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- net/tap.c | 4 1 file changed, 4 deletions(-) diff --git a/net/tap.c b/net/tap.c index 348b786..f7db9dc 100644 --- a/net/tap.c +++ b/net/tap.c @@ -597,10 +597,6 @@ static int net_tap_init(const NetdevTapOptions *tap, int *vnet_h

[Qemu-devel] [PATCH v2 01/15] net: Improve error message for -net hubport a bit

2015-05-15 Thread Markus Armbruster
Type "hubport" is valid only with -netdev. Unfortunately, that's detected late and the error message doesn't explain why: $ qemu-system-i386 -net hubport,id=foo,hubid=0 qemu-system-i386: -net hubport,id=foo,hubid=0: Device 'hubport' could not be initialized Improve the error message to

[Qemu-devel] [PATCH v2 06/15] tap: Improve -netdev/netdev_add/-net/... bridge error reporting

2015-05-15 Thread Markus Armbruster
When -netdev bridge fails, it first reports a specific error, then a generic one, like this: $ qemu-system-x86_64 -netdev bridge,id=foo failed to launch bridge helper qemu-system-x86_64: -netdev bridge,id=foo: Device 'bridge' could not be initialized The first message goes to stderr.

[Qemu-devel] [PATCH v2 00/15] net: Improve error reporting

2015-05-15 Thread Markus Armbruster
v2: - Touch up a few commit messages [Eric] - Touch up a an error message in PATCH 03+15 [Eric] - Don't report possibly bogus errno in PATCH 12 [Eric] Markus Armbruster (15): net: Improve error message for -net hubport a bit net: Permit incremental conversion of init functions to Error net:

[Qemu-devel] [PATCH v2 07/15] tap: Convert tap_set_sndbuf() to Error

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- net/tap-aix.c | 3 +-- net/tap-bsd.c | 3 +-- net/tap-haiku.c | 3 +-- net/tap-linux.c | 6 ++ net/tap-solaris.c | 3 +-- net/tap.c | 4 +++- net/tap_int.h | 2 +- 7 files changed, 10 insertions(+), 14 delet

[Qemu-devel] [PATCH v2 09/15] tap: Convert launch_script() to Error

2015-05-15 Thread Markus Armbruster
Fixes inappropriate use of stderr in monitor command handler. While there, improve the messages some. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- net/tap.c | 40 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/net/tap.c

[Qemu-devel] [PATCH v2 02/15] net: Permit incremental conversion of init functions to Error

2015-05-15 Thread Markus Armbruster
Error reporting for netdev_add is broken: the net_client_init_fun[] report the actual errors with (at best) error_report(), and their caller net_client_init1() makes up a generic error on top. For command line and HMP, this produces an mildly ugly error cascade. In QMP, the actual errors go to st

[Qemu-devel] [PATCH v2 05/15] tap: net_tap_fd_init() can't fail, drop dead error handling

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- net/tap.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/net/tap.c b/net/tap.c index 8f06cb7..adb1022 100644 --- a/net/tap.c +++ b/net/tap.c @@ -536,7 +536,6 @@ int net_init_bridge(const NetClientOpt

[Qemu-devel] [PATCH v2 03/15] net: Improve -net nic error reporting

2015-05-15 Thread Markus Armbruster
When -net nic fails, it first reports a specific error, then a generic one, like this: $ qemu-system-x86_64 -net nic,netdev=nonexistent qemu-system-x86_64: -net nic,netdev=nonexistent: netdev 'nonexistent' not found qemu-system-x86_64: -net nic,netdev=nonexistent: Device 'nic' could n

[Qemu-devel] [PATCH v2 08/15] tap: Convert net_init_tap_one() to Error

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- net/tap.c | 70 ++- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/net/tap.c b/net/tap.c index d54222d..d1f5644 100644 --- a/net/tap.c +++ b/net/tap.c @@ -600

[Qemu-devel] [PATCH v2 10/15] tap: Permit incremental conversion of tap_open() to Error

2015-05-15 Thread Markus Armbruster
Convert the trivial ones immediately: tap-aix and tap-haiku. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- net/tap-aix.c | 4 ++-- net/tap-bsd.c | 6 -- net/tap-haiku.c | 4 ++-- net/tap-linux.c | 3 ++- net/tap-solaris.c | 3 ++- net/tap.c | 13 +

[Qemu-devel] [PATCH v2 04/15] net/dump: Improve -net/host_net_add dump error reporting

2015-05-15 Thread Markus Armbruster
When -net dump fails, it first reports a specific error, then a generic one, like this: $ qemu-system-x86_64 -net dump,id=foo,file=/eperm qemu-system-x86_64: -net dump,id=foo,file=/eperm: -net dump: can't open /eperm qemu-system-x86_64: -net dump,id=foo,file=/eperm: Device 'dump' coul

[Qemu-devel] [PATCH v2 11/15] tap-linux: Convert tap_open() to Error

2015-05-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- net/tap-linux.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/net/tap-linux.c b/net/tap-linux.c index be18382..6c3caef 100644 --- a/net/tap-linux.c +++ b/net/tap-linux.c @@ -39,7 +39,6 @@ int ta

[Qemu-devel] [PATCH v2 13/15] tap-solaris: Convert tap_open() to Error

2015-05-15 Thread Markus Armbruster
Fixes inappropriate use of syslog(). Not fixed: leaks on error paths, suspicious non-fatal errors. FIXMEs added instead. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- net/tap-solaris.c | 59 --- 1 file changed, 30 insertions(+

[Qemu-devel] [PATCH v2 12/15] tap-bsd: Convert tap_open() to Error

2015-05-15 Thread Markus Armbruster
Fixes inappropriate use of stderr in monitor command handler. While there, improve some of the messages a bit. Signed-off-by: Markus Armbruster --- net/tap-bsd.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/net/tap-bsd.c b/net/tap-bsd.c

[Qemu-devel] [PATCH v2 15/15] tap: Improve -netdev/netdev_add/-net/... tap error reporting

2015-05-15 Thread Markus Armbruster
When -netdev tap fails, it first reports a specific error, then a generic one, like this: $ qemu-system-x86_64 -netdev tap,id=foo qemu-system-x86_64: -netdev tap,id=foo: could not configure /dev/net/tun: Operation not permitted qemu-system-x86_64: -netdev tap,id=foo: Device 'tap' coul

Re: [Qemu-devel] [PATCH v3 2/2] target-mips: Misaligned memory accesses for MSA

2015-05-15 Thread Leon Alrae
On 14/05/2015 20:12, Richard Henderson wrote: > /* We know both pages are present and writable. */ > if (eaddr == baddr + 15) { > /* Consecutive pages in RAM. */ > memcpy(baddr, register, 16); > } else { > /* Someone's doing an MSA store to device memory. */ > for (

Re: [Qemu-devel] [RFC PATCH v4 09/28] COLO: Save VM state to slave when do checkpoint

2015-05-15 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > We should save PVM's RAM/device to slave when needed. > > For VM state, we will cache them in slave, we use QEMUSizedBuffer > to store the data, we need know the data size of VM state, so in master, > we use qsb to store VM state temporari

Re: [Qemu-devel] [PATCH v6 05/22] hw/acpi/aml-build: Add aml_interrupt() term

2015-05-15 Thread Igor Mammedov
On Thu, 7 May 2015 16:51:31 +0100 Peter Maydell wrote: > On 7 May 2015 at 10:29, Shannon Zhao wrote: > > From: Shannon Zhao > > > > Add aml_interrupt() for describing device interrupt in resource template. > > These can be used to generating DSDT table for ACPI on ARM. > > > +/* Interrupt

Re: [Qemu-devel] [PATCH 0/3] scripts/qemu-gdb: Add event tracing support

2015-05-15 Thread Markus Armbruster
Peter Maydell writes: > On 15 May 2015 at 08:58, Markus Armbruster wrote: >> Since you're touching qemu-gdb.py anyway, could you stick in a brief >> comment explaining how to put it to use? > > Good idea. It turns out the answer is just "source it from gdb", > but it took me a little while to fi

[Qemu-devel] [Bug 1455475] [NEW] Block Commit: [100 %]error: failed to pivot job for disk vda

2015-05-15 Thread Tim Rohde
Public bug reported: Hi, i´ve a Problem with committing a snapshot. The problem was discussed on the libvirt mailing list earlier this year. https://www.redhat.com/archives/libvirt-users/2015-January/msg00029.html Iam running gentoo and: Compiled against library: libvirt 1.2.14 Using library:

  1   2   3   >