Re: [Qemu-devel] [RESEND PATCH v3 5/8] pc-dimm: Add pc_dimm_unrealize() for memory hot unplug support.

2014-09-24 Thread Tang Chen
Hi Igor, Zhang, On 09/12/2014 09:17 PM, Igor Mammedov wrote: .. Actually, this patch also fix the bug *when hotplug memory failing in the place where after pc_dimm_plug but before the end of device_set_realized, it does not clear the work done by pc_dimm_plug*. For there is no callback like

[Qemu-devel] [PATCH v4 01/14] virtio-scsi: Split virtio_scsi_handle_cmd_req from virtio_scsi_handle_cmd

2014-09-24 Thread Fam Zheng
This is the "common part" to handle one cmd request. Refactor out for later usage of dataplane iothread code. Signed-off-by: Fam Zheng Signed-off-by: Paolo Bonzini --- hw/scsi/virtio-scsi.c | 117 +++- include/hw/virtio/virtio-scsi.h | 36 +

[Qemu-devel] [PATCH v4 03/14] virtio-scsi: Add VirtIOSCSIVring in VirtIOSCSIReq

2014-09-24 Thread Fam Zheng
Move VirtIOSCSIReq to header and add one field "vring" as a wrapper structure of Vring, VirtIOSCSIVring. This is necessary for coming dataplane code that runs uses vring on iothread. Signed-off-by: Fam Zheng Signed-off-by: Paolo Bonzini --- include/hw/virtio/virtio-scsi.h | 13 + 1

[Qemu-devel] [PATCH v4 00/14] virtio-scsi: Dataplane on single iothread

2014-09-24 Thread Fam Zheng
This series is only a rebase (onto scsi-next^14) and resend, because one updated patch was overlooked in v3 by me, as a result Paolo's scsi-next branch is broken: qemu-system-x86_64: /home/fam/qemu/hw/scsi/virtio-scsi.c:74: virtio_scsi_complete_req: Assertion `req->vq == ((void *)0)' failed. Beca

[Qemu-devel] [PATCH v4 02/14] virtio-scsi: Split virtio_scsi_handle_ctrl_req from virtio_scsi_handle_ctrl

2014-09-24 Thread Fam Zheng
To share with dataplane code. Signed-off-by: Fam Zheng Signed-off-by: Paolo Bonzini --- hw/scsi/virtio-scsi.c | 60 ++--- include/hw/virtio/virtio-scsi.h | 1 + 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/hw/scsi/virtio-scsi.c

[Qemu-devel] [PATCH v4 09/14] virtio-scsi: Hook up with dataplane

2014-09-24 Thread Fam Zheng
This enables the virtio-scsi-dataplane code by setting the iothread in virtio-scsi device, and makes any function that is called by back from dataplane to cooperate with the caller: they need to be vring/iothread aware when handling the requests and using scsi devices on the bus. Signed-off-by: Fa

[Qemu-devel] [PATCH v4 04/14] virtio-scsi: Make virtio_scsi_init_req public

2014-09-24 Thread Fam Zheng
To share with datplane code later. Signed-off-by: Fam Zheng Signed-off-by: Paolo Bonzini --- hw/scsi/virtio-scsi.c | 2 +- include/hw/virtio/virtio-scsi.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 5f3c0c1..

[Qemu-devel] [PATCH v4 06/14] virtio-scsi: Make virtio_scsi_push_event public

2014-09-24 Thread Fam Zheng
Later this will be called by dataplane code. Signed-off-by: Fam Zheng Signed-off-by: Paolo Bonzini --- hw/scsi/virtio-scsi.c | 4 ++-- include/hw/virtio/virtio-scsi.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c i

[Qemu-devel] [PATCH v4 13/14] virtio-scsi: Call bdrv_io_plug/bdrv_io_unplug in cmd request handling

2014-09-24 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 395178e..09a39cb 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -488,6 +488,8 @@ bool virtio_scsi_handle_cmd_req_prepar

[Qemu-devel] [PATCH v4 10/14] virtio-scsi: Add migration state notifier for dataplane code

2014-09-24 Thread Fam Zheng
Similar to virtio-blk-dataplane, we stop the iothread while migration starts and restart it when migration finishes. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 35 --- include/hw/virtio/virtio-scsi.h | 2 ++ 2 files changed, 34 insertions(+),

[Qemu-devel] [PATCH v4 05/14] virtio-scsi: Make virtio_scsi_free_req public

2014-09-24 Thread Fam Zheng
To share with dataplane code later. Signed-off-by: Fam Zheng Signed-off-by: Paolo Bonzini --- hw/scsi/virtio-scsi.c | 2 +- include/hw/virtio/virtio-scsi.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 8cab75b.

[Qemu-devel] [PATCH v4 07/14] virtio-scsi: Add 'iothread' property to virtio-scsi-pci

2014-09-24 Thread Fam Zheng
Similar to this property in virtio-blk for dataplane, add it as a QOM link in virtio-scsi and an alias in virtio-scsi-pci, in order to assign an iothread to the device. Other bus types can be added later. Signed-off-by: Fam Zheng Signed-off-by: Paolo Bonzini --- hw/scsi/virtio-scsi.c

[Qemu-devel] [PATCH v4 11/14] virtio-scsi: Two stages processing of cmd request

2014-09-24 Thread Fam Zheng
Mechanical change, in preparation for bdrv_io_plug/bdrv_io_unplug. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi-dataplane.c | 4 +++- hw/scsi/virtio-scsi.c | 20 include/hw/virtio/virtio-scsi.h | 3 ++- 3 files changed, 17 insertions(+), 10 deletions(-) diff

[Qemu-devel] [PATCH v4 12/14] virtio-scsi: Batched prepare for cmd reqs

2014-09-24 Thread Fam Zheng
Queue the popped requests while calling virtio_scsi_handle_cmd_req_prepare(), then submit them after all prepared. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi-dataplane.c | 9 +++-- hw/scsi/virtio-scsi.c | 9 +++-- include/hw/virtio/virtio-scsi.h | 3 +++ 3 files changed,

[Qemu-devel] [PATCH v4 08/14] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-09-24 Thread Fam Zheng
This implements the core part of dataplane feature of virtio-scsi. A few fields are added in VirtIOSCSICommon to maintain the dataplane status. These fields are managed by a new source file: virtio-scsi-dataplane.c. Most code in this file will run on an iothread, unless otherwise commented as in

Re: [Qemu-devel] [RFC PATCH] qcow2: Fix race in cache invalidation

2014-09-24 Thread Alexey Kardashevskiy
On 09/23/2014 06:47 PM, Alexey Kardashevskiy wrote: > On 09/19/2014 06:47 PM, Kevin Wolf wrote:> Am 16.09.2014 um 14:59 hat Paolo > Bonzini geschrieben: >>> Il 16/09/2014 14:52, Kevin Wolf ha scritto: Yes, that's true. We can't fix this problem in qcow2, though, because it's a more gener

Re: [Qemu-devel] [PATCH v4 06/19] qapi: Better error messages for bad enums

2014-09-24 Thread Markus Armbruster
Eric Blake writes: > On 09/23/2014 08:23 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> The previous commit demonstrated that the generator had several >>> flaws with less-than-perfect enums: >>> - an enum that listed the same string twice (or two variant >>> strings that map to the

Re: [Qemu-devel] [PATCH] virtio: Fix wrong type cast from pointer to long

2014-09-24 Thread Markus Armbruster
Stefan Weil writes: > Compiler warning (w32, w64): > > include/hw/virtio/virtio_ring.h:142:26: warning: > cast from pointer to integer of different size [-Wpointer-to-int-cast] > > When sizeof(long) < sizeof(void *), this is not only a warning but a > real program error. > > Add also missing bla

Re: [Qemu-devel] [Qemu-trivial] [PATCH] qemu-char: Do not disconnect when there's data for reading

2014-09-24 Thread Michael Tokarev
16.09.2014 09:31, Zifei Tong wrote: > Friendly ping. > > Also CC to qemu-trivial. There was at least 2 subsequent versions of this down the line, a v2 and a v3. (Just to show why I haven't applied it to -trivial). Thanks, /mjt > On Sun, Sep 7, 2014 at 8:24 PM, Zifei Tong wrote: >> After comm

Re: [Qemu-devel] [Qemu-trivial] [PATCH] tests: avoid running duplicate qom-tests

2014-09-24 Thread Michael Tokarev
Applied to -trivial, I overlooked it initially, not reading Peter's comments thinkfully. Thank you! /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] disas/arm: Remove redefinition of ATTRIBUTE_UNUSED

2014-09-24 Thread Michael Tokarev
18.09.2014 21:25, Tobias Klauser wrote: > ATTRIBUTE_UNUSED is already defined in disas/bfd.h, which is included. > Thus, there is no need to redefine it. Is there any harm in keeping it here? While it really is a redifinition, I'm not sure what's the right thing here. This whole code is not from

Re: [Qemu-devel] [PATCH v4] Add machine parameter qemu-kvm-migration for live migrate compatibility with qemu-kvm

2014-09-24 Thread Markus Armbruster
Alex Bligh writes: > This patch series adds inbound migrate capability from qemu-kvm version > 1.0. The main ideas are those set out in Cole Robinson's patch here: > http://pkgs.fedoraproject.org/cgit/qemu.git/tree/0001-Fix-migration-from-qemu-kvm.patch?h=f20 > however, rather than patching stati

[Qemu-devel] [PATCH v4 14/14] virtio-scsi: Process ".iothread" property

2014-09-24 Thread Fam Zheng
We are ready, now let's effectively enable dataplane. Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 09a39cb..fa36e23 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@

Re: [Qemu-devel] [PATCH v4 08/19] qapi: Better error messages for bad expressions

2014-09-24 Thread Markus Armbruster
Eric Blake writes: > On 09/23/2014 08:56 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> The previous commit demonstrated that the generator overlooked some >>> fairly basic broken expressions: >>> - missing metataype >>> - metatype key has a non-string value >>> - unknown key in rela

Re: [Qemu-devel] [PULL 09/11] tcg-aarch64: Use 32-bit loads for qemu_ld_i32

2014-09-24 Thread Claudio Fontana
As I mentioned before, I just have one nit with this, functionally it is fine (and I tested it with multiple targets, so you can add my Tested-by: Claudio Fontana I describe my nit below: On 22.09.2014 22:57, Richard Henderson wrote: > The "old" qemu_ld opcode did not specify the size of the r

[Qemu-devel] [PATCH v2 0/7] virtio-scsi: Asynchronous cancellation

2014-09-24 Thread Fam Zheng
v2: Address Paolo's comments: - Drop scsi_req_abort. - Split patch 1. - Use NotifierList. - Track the number of cancelled requests in virtio-scsi. This series changes VIRTIO_SCSI_T_TMF_ABORT_TASK and VIRTIO_SCSI_T_TMF_ABORT_TASK_SET emulation to asynchronous by making use of bdrv_a

[Qemu-devel] [PATCH v2 4/7] scsi: Drop SCSIReqOps.cancel_io

2014-09-24 Thread Fam Zheng
The only two implementations are identical to each other, with nothing specific to device: they only call bdrv_aio_cancel with the SCSIRequest.aiocb. Let's move it to scsi-bus. Signed-off-by: Fam Zheng --- hw/scsi/scsi-bus.c | 4 ++-- hw/scsi/scsi-disk.c| 14 -- hw/scsi/scs

[Qemu-devel] [PATCH v2 2/7] scsi-generic: Handle canceled request in scsi_command_complete

2014-09-24 Thread Fam Zheng
Now that we always called the cb in bdrv_aio_cancel, let's make scsi-generic callbacks check io_canceled flag similarly to scsi-disk. Signed-off-by: Fam Zheng --- hw/scsi/scsi-generic.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/scsi/scsi-generic.c b/hw/scs

[Qemu-devel] [PATCH v2 3/7] scsi-bus: Unify request unref in scsi_req_cancel

2014-09-24 Thread Fam Zheng
Before, scsi_req_cancel will take ownership of the canceled request and unref it. We did this because we didn't know whether AIO CB will be called or not during the cancelling, so we set the io_canceled flag before calling it, and skip unref in the potentially called callbacks, which is not very ni

Re: [Qemu-devel] [PATCH v4] Add machine parameter qemu-kvm-migration for live migrate compatibility with qemu-kvm

2014-09-24 Thread Alex Bligh
Markus, On 24 Sep 2014, at 09:05, Markus Armbruster wrote: > Alex Bligh writes: > >> This patch series adds inbound migrate capability from qemu-kvm version >> 1.0. The main ideas are those set out in Cole Robinson's patch here: >> http://pkgs.fedoraproject.org/cgit/qemu.git/tree/0001-Fix-migr

[Qemu-devel] [PATCH v2 1/7] scsi: Drop scsi_req_abort

2014-09-24 Thread Fam Zheng
The only user of this function is spapr_vscsi.c. We can convert to scsi_req_cancel plus adding a check in vscsi_request_cancelled. Suggested-by: Paolo Bonzini Signed-off-by: Fam Zheng --- hw/scsi/scsi-bus.c| 15 --- hw/scsi/spapr_vscsi.c | 11 --- 2 files changed, 8 inse

[Qemu-devel] [PATCH v2 6/7] scsi: Introduce scsi_req_cancel_async

2014-09-24 Thread Fam Zheng
Devices will call this function to start an asynchronous cancellation. The bus->info->cancel will be called after the request is canceled. Devices will probably need to track a separate TMF request that triggers this cancellation, and wait until the cancellation is done before completing it. So we

[Qemu-devel] [PATCH v2 5/7] scsi: Introduce scsi_req_canceled

2014-09-24 Thread Fam Zheng
Let the aio cb do the clean up and notification job after scsi_req_cancel, in preparation for asynchronous cancellation. Signed-off-by: Fam Zheng --- hw/scsi/scsi-bus.c | 14 ++ hw/scsi/scsi-disk.c| 8 hw/scsi/scsi-generic.c | 1 + include/hw/scsi/scsi.h | 1 + 4

[Qemu-devel] [PATCH v2 7/7] virtio-scsi: Handle TMF request cancellation asynchronously

2014-09-24 Thread Fam Zheng
For VIRTIO_SCSI_T_TMF_ABORT_TASK and VIRTIO_SCSI_T_TMF_ABORT_TASK_SET, use scsi_req_cancel_async to start the cancellation. Because each tmf command may cancel multiple requests, we need to use a counter to track the number of remaining requests we still need to wait for. Signed-off-by: Fam Zheng

Re: [Qemu-devel] [PATCH 5/7] qdev: set the object property's description to the qdev property's.

2014-09-24 Thread Gonglei (Arei)
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Wednesday, September 24, 2014 2:54 PM > Subject: Re: [PATCH 5/7] qdev: set the object property's description to the > qdev > property's. > > Il 24/09/2014 02:42, Gonglei (Arei) ha scritto: > > OK. > > > >

Re: [Qemu-devel] [PATCH v4] Add machine parameter qemu-kvm-migration for live migrate compatibility with qemu-kvm

2014-09-24 Thread Michael Tokarev
22.09.2014 23:34, Alex Bligh wrote: > This patch series adds inbound migrate capability from qemu-kvm version > 1.0. [...] Isn't it quite a bit too late already? That's an old version by now, and supporting migration from it is interesting for long-term support distributions - like redhat for exa

Re: [Qemu-devel] [PATCH] virtio: Fix wrong type cast from pointer to long

2014-09-24 Thread Fam Zheng
On Wed, 09/24 07:20, Stefan Weil wrote: > Compiler warning (w32, w64): > > include/hw/virtio/virtio_ring.h:142:26: warning: > cast from pointer to integer of different size [-Wpointer-to-int-cast] > > When sizeof(long) < sizeof(void *), this is not only a warning but a > real program error. > >

Re: [Qemu-devel] [RFC patch 0/6] vfio based pci pass-through for qemu/KVM on s390

2014-09-24 Thread Frank Blaschka
On Mon, Sep 22, 2014 at 02:47:31PM -0600, Alex Williamson wrote: > On Fri, 2014-09-19 at 13:54 +0200, frank.blasc...@de.ibm.com wrote: > > This set of patches implements a vfio based solution for pci > > pass-through on the s390 platform. The kernel stuff is pretty > > much straight forward, but qe

Re: [Qemu-devel] Microcheckpointing: Memory-VCPU / Disk State consistency

2014-09-24 Thread Stefan Hajnoczi
On Tue, Sep 23, 2014 at 06:36:42PM +0200, Walid Nouri wrote: > Am 18.09.2014 15:56, schrieb Stefan Hajnoczi: > >There is the issue of request ordering (using write cache flushes). The > >secondary probably needs to perform requests in the same order and > >interleave cache flushes in the same way

Re: [Qemu-devel] qemu process stuck in Rl state

2014-09-24 Thread Stefan Hajnoczi
On Thu, Sep 18, 2014 at 03:21:08PM +0400, Andrey Korolyov wrote: > On Thu, Sep 18, 2014 at 2:49 PM, Stefan Hajnoczi wrote: > > On Wed, Sep 17, 2014 at 11:56:57PM +0400, Andrey Korolyov wrote: > >> I`ve faced an issue with qemu VMs with very large uptime spans - half > >> of year or so. They are ha

Re: [Qemu-devel] [PATCH] po: fix conflict with %.mo rule in rules.mak

2014-09-24 Thread Stefan Hajnoczi
On Mon, Sep 22, 2014 at 04:19:54PM +0200, Paolo Bonzini wrote: > po/Makefile includes rules.mak to use the nice quiet-command macro. > However, this also brings in a %.mo rule that breaks "make build". > Put our own rule before the include, so that it has precedence. > > Reported-by: Christian Bor

Re: [Qemu-devel] [PATCH 5/7] qdev: set the object property's description to the qdev property's.

2014-09-24 Thread Gonglei (Arei)
Hi, > > > > Il 24/09/2014 02:42, Gonglei (Arei) ha scritto: > > > OK. > > > > > > This way I have to add a description string parametet to > > > object_property_add_alias function. Will do in the next version. :) > > > > No, just take it from the original property. So if you alias A.X to > > B.Y,

Re: [Qemu-devel] [PATCH] qemu-iotests: Fail test if explict test case number is unknown

2014-09-24 Thread Stefan Hajnoczi
On Tue, Sep 23, 2014 at 10:26:26AM +0800, Fam Zheng wrote: > When we expand a number range, we just print "$id - unknown test, > ignored", this is convenient if we want to run a range of tests. > > When we designate a test case number explicitly, we shouldn't just > ignore it if the case script do

Re: [Qemu-devel] [Qemu-trivial] [PATCH] disas/arm: Remove redefinition of ATTRIBUTE_UNUSED

2014-09-24 Thread Peter Maydell
On 24 September 2014 00:58, Michael Tokarev wrote: > 18.09.2014 21:25, Tobias Klauser wrote: >> ATTRIBUTE_UNUSED is already defined in disas/bfd.h, which is included. >> Thus, there is no need to redefine it. > > Is there any harm in keeping it here? > > While it really is a redifinition, I'm not

Re: [Qemu-devel] [PATCH v4 08/19] qapi: Better error messages for bad expressions

2014-09-24 Thread Kevin Wolf
Am 24.09.2014 um 09:34 hat Markus Armbruster geschrieben: > Eric Blake writes: > > > On 09/23/2014 08:56 AM, Markus Armbruster wrote: > >> Eric Blake writes: > >>> Add check_keys to cover these situations, and update testcases to > >>> match. A couple other tests (enum-missing-data, indented-ex

[Qemu-devel] [Bug 1370585] Re: qemu-img cannot create fixed vhdx

2014-09-24 Thread Stefan Hajnoczi
Works for me on 07e2863d0271ac6c05206d8ce9e4f4c39b25d3ea: $ uname -a Linux 3.16.2-200.fc20.x86_64 #1 SMP Mon Sep 8 11:54:45 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux $ ./qemu-img create -f vhdx -o subformat=fixed test.vhdx 10G Formatting 'test.vhdx', fmt=vhdx size=10737418240 log_size=1048576 bloc

Re: [Qemu-devel] [PATCH v2] docs: add blkdebug block driver documentation

2014-09-24 Thread Stefan Hajnoczi
On Tue, Sep 23, 2014 at 11:12:52AM -0600, Eric Blake wrote: > On 09/23/2014 04:09 AM, Stefan Hajnoczi wrote: > > +Rules support the following attributes: > > + > > + event - which type of operation to match (e.g. read_aio, write_aio, > > + flush_to_os, flush_to_disk). See the "Events" section

[Qemu-devel] [PATCH v3] docs: add blkdebug block driver documentation

2014-09-24 Thread Stefan Hajnoczi
The blkdebug block driver is undocumented. Documenting it is worthwhile since it offers powerful error injection features that are used by qemu-iotests test cases. This document will make it easier for people to learn about and use blkdebug. Signed-off-by: Stefan Hajnoczi --- v3: * Fix tab spa

[Qemu-devel] [Bug 1370585] Re: qemu-img cannot create fixed vhdx

2014-09-24 Thread Michael Tokarev
This has been fixed by a011898d25b8a26a311d56dfe37e8d3a4374ec65. ** Changed in: qemu Status: Incomplete => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1370585 Title: qemu-im

Re: [Qemu-devel] [PATCH] ohci: Fix compile errors without --enable-trace-backend

2014-09-24 Thread Stefan Hajnoczi
On Tue, Sep 23, 2014 at 08:19:41PM +1000, Alexey Kardashevskiy wrote: > This adds a stub for ohci_td_pkt() function (which traces packets) > when configured without --enable-trace-backend > > Signed-off-by: Alexey Kardashevskiy > --- > > It should probably be squashed to > [PATCH] ohci: Convert

Re: [Qemu-devel] [RFC PATCH] qcow2: Fix race in cache invalidation

2014-09-24 Thread Kevin Wolf
Am 23.09.2014 um 10:47 hat Alexey Kardashevskiy geschrieben: > On 09/19/2014 06:47 PM, Kevin Wolf wrote:> Am 16.09.2014 um 14:59 hat Paolo > Bonzini geschrieben: > >> Il 16/09/2014 14:52, Kevin Wolf ha scritto: > >>> Yes, that's true. We can't fix this problem in qcow2, though, because > >>> it's

Re: [Qemu-devel] [PATCH] virtio: Fix wrong type cast from pointer to long

2014-09-24 Thread Stefan Hajnoczi
On Wed, Sep 24, 2014 at 07:20:02AM +0200, Stefan Weil wrote: > Compiler warning (w32, w64): > > include/hw/virtio/virtio_ring.h:142:26: warning: > cast from pointer to integer of different size [-Wpointer-to-int-cast] > > When sizeof(long) < sizeof(void *), this is not only a warning but a > rea

[Qemu-devel] [PATCH v2 3/4] .travis.yml: pre-seed sub-modules for speed

2014-09-24 Thread Alex Bennée
A significant portion of the build time is spent initialising all the sub-modules we use in the source tree. Often this is almost as long as the build itself. By pre-seeding the .git/modules tree this will hopefully improve things. Signed-off-by: Alex Bennée Reviewed-by: Alexander Graf --- v2

[Qemu-devel] [PATCH v2 2/4] .travis.yml: make the make slightly more parallel

2014-09-24 Thread Alex Bennée
The Travis VMs have 1.5 cores so we might as well make some use of the paralellism. Signed-off-by: Alex Bennée Reviewed-by: Alexander Graf diff --git a/.travis.yml b/.travis.yml index 72cfc9f..f113339 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,10 @@ before_install: - git submodu

[Qemu-devel] [PATCH v2 0/4] A number of Travis CI tweaks

2014-09-24 Thread Alex Bennée
Hi, The patches I posted last week have been reviewed and I've given them a good test on my tree. My last test failed but only because master has introduced a regression. This was found by the tests in master but missed due to the noise of GTester hangs which are mitigated by reducing the times we

[Qemu-devel] [PATCH v2 4/4] .travis.yml: remove "make check" from main matrix

2014-09-24 Thread Alex Bennée
There are problems with unreliability in "make check" which still need to be tracked down. As the tests are broadly the same for all targets if added one explicit target to the matrix to run it. However this does build all softmmu targets to ensure they at least "run" Signed-off-by: Alex Bennée R

[Qemu-devel] [PATCH v2 1/4] .travis.yml: add more linux-user to the build matrix

2014-09-24 Thread Alex Bennée
At the same time I've grouped the $ARCH-linux-user and $ARCH-softmmu builds together (hoping FS cache helps) and grouped all $ARCH-softmmu only builds into one target. This reduces the build matrix slightly which will hopefully help with build times. Signed-off-by: Alex Bennée Reviewed-by: Alexan

Re: [Qemu-devel] [PATCH v2] slirp: udp: fix NULL pointer dereference because of uninitialized socket

2014-09-24 Thread Peter Maydell
On 23 September 2014 09:50, Michael Tokarev wrote: > 18.09.2014 10:35, Petr Matousek wrote: >> When guest sends udp packet with source port and source addr 0, >> uninitialized socket is picked up when looking for matching and already >> created udp sockets, and later passed to sosendto() where NUL

[Qemu-devel] [Bug 1373362] [NEW] qemu-2.1.1 i386-softmmu compile error: q35_dsdt_applesmc_sta undeclared

2014-09-24 Thread Thomas Eschenbacher
Public bug reported: I try to compile qemu-2.1.1 (Gentoo/x86), but the i386-softmmu fails to compile: CPP i386-softmmu/q35-acpi-dsdt.dsl.i.orig ACPI_PREPROCESS i386-softmmu/q35-acpi-dsdt.dsl.i IASL i386-softmmu/q35-acpi-dsdt.dsl.i ACPI_EXTRACT i386-softmmu/q35-acpi-dsdt.off CAT i386-sof

Re: [Qemu-devel] [PATCH v3 00/21] target-mips: add MIPS64R6 Instruction Set support

2014-09-24 Thread Leon Alrae
ping - would anyone help me and review the remaining patches in this series? On 22/08/2014 12:26, Leon Alrae wrote: > ping > > Anybody? There hasn't been any feedback on this patchset for almost 2 > months now... > > On 12/08/2014 12:36, Leon Alrae wrote: >> ping >> >> On 05/08/2014 10:26, Leon

Re: [Qemu-devel] [PATCH 5/7] qdev: set the object property's description to the qdev property's.

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 11:12, Gonglei (Arei) ha scritto: >> > But the description of B.Y wasn't set. Only qdev_alias_all_properties() >> > call object_property_set_description() to set the description filed of >> > ObjectProerty at present. >> > > I should set description at qdev_property_add_static(), the

Re: [Qemu-devel] [PATCH v2 0/7] virtio-scsi: Asynchronous cancellation

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 10:27, Fam Zheng ha scritto: > v2: Address Paolo's comments: > - Drop scsi_req_abort. > - Split patch 1. > - Use NotifierList. > - Track the number of cancelled requests in virtio-scsi. > > This series changes VIRTIO_SCSI_T_TMF_ABORT_TASK and > VIRTIO_SCSI_T_TMF_ABORT

Re: [Qemu-devel] [PATCH v4 08/19] qapi: Better error messages for bad expressions

2014-09-24 Thread Markus Armbruster
Kevin Wolf writes: > Am 24.09.2014 um 09:34 hat Markus Armbruster geschrieben: >> Eric Blake writes: >> >> > On 09/23/2014 08:56 AM, Markus Armbruster wrote: >> >> Eric Blake writes: >> >>> Add check_keys to cover these situations, and update testcases to >> >>> match. A couple other tests (e

Re: [Qemu-devel] [PATCH v2 6/7] scsi: Introduce scsi_req_cancel_async

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 10:27, Fam Zheng ha scritto: > Devices will call this function to start an asynchronous cancellation. The > bus->info->cancel will be called after the request is canceled. > > Devices will probably need to track a separate TMF request that triggers this > cancellation, and wait until

Re: [Qemu-devel] [PATCH v2 5/7] scsi: Introduce scsi_req_canceled

2014-09-24 Thread Paolo Bonzini
Il 24/09/2014 10:27, Fam Zheng ha scritto: > Let the aio cb do the clean up and notification job after scsi_req_cancel, in > preparation for asynchronous cancellation. What about renaming it to scsi_req_cancel_complete? Paolo > Signed-off-by: Fam Zheng > --- > hw/scsi/scsi-bus.c | 14 +

Re: [Qemu-devel] [PATCH v4 09/19] qapi: Add tests of redefined expressions

2014-09-24 Thread Markus Armbruster
Eric Blake writes: > Demonstrate that the qapi generator doesn't deal very well with > redefined expressions. At the parse level, they are silently > accepted; I'm not sure what would happen if we tried to go > further and use it in generated code, but the end result can't > be good. A later pa

Re: [Qemu-devel] [Qemu-trivial] [PATCH] disas/arm: Remove redefinition of ATTRIBUTE_UNUSED

2014-09-24 Thread Tobias Klauser
On 2014-09-24 at 09:58:45 +0200, Michael Tokarev wrote: > 18.09.2014 21:25, Tobias Klauser wrote: > > ATTRIBUTE_UNUSED is already defined in disas/bfd.h, which is included. > > Thus, there is no need to redefine it. > > Is there any harm in keeping it here? No. > While it really is a redifiniti

Re: [Qemu-devel] [Qemu-trivial] [PATCH] disas/arm: Remove redefinition of ATTRIBUTE_UNUSED

2014-09-24 Thread Tobias Klauser
On 2014-09-24 at 11:09:42 +0200, Peter Maydell wrote: > On 24 September 2014 00:58, Michael Tokarev wrote: > > 18.09.2014 21:25, Tobias Klauser wrote: > >> ATTRIBUTE_UNUSED is already defined in disas/bfd.h, which is included. > >> Thus, there is no need to redefine it. > > > > Is there any harm

[Qemu-devel] [PATCH 00/30] complete conversion to hotplug-handler API

2014-09-24 Thread Igor Mammedov
Series unifies different hotplug mechanisms to a recent hotplug-handler API and does shallow conversion of devices that still use legacy qdev hotplug to it dropping not used after that legacy hotplug path [29/30]. It also relaces SCSI's own way to do hotplug/unplug with hotplug-handler callbacks le

[Qemu-devel] [PATCH 01/30] test: virtio-scsi: check if hot-plug/unplug works

2014-09-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/virtio-scsi-test.c | 29 + 1 file changed, 29 insertions(+) diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c index 3230908..41f9602 100644 --- a/tests/virtio-scsi-test.c +++ b/tests/virtio-scsi-test.c @@ -17,14 +1

[Qemu-devel] [PATCH 08/30] test: usb: usb-storage hotplug test

2014-09-24 Thread Igor Mammedov
usb-storage is different from usual usb devices in that it uses child SCSI bus for underlying storage. That patch checks that SCSI bus is hotpluggable for hotplug operation wouldn't succeed without it. Signed-off-by: Igor Mammedov --- tests/usb-hcd-uhci-test.c | 30 ++

[Qemu-devel] [PATCH 14/30] target-i386: ICC bus: replace BusState.allow_hotplug with hotplug_handler

2014-09-24 Thread Igor Mammedov
it will allow to drop BusState.allow_hotplug field and still keep ICC bus hotluggable for CPU/APIC devices. Signed-off-by: Igor Mammedov --- hw/cpu/icc_bus.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/cpu/icc_bus.c b/hw/cpu/icc_bus.c index 7f44c5

[Qemu-devel] [PATCH 07/30] test: usb: generic usb device hotplug

2014-09-24 Thread Igor Mammedov
use usb-tablet as a hotplugged usb device. Signed-off-by: Igor Mammedov --- Since I'm not familiar with internals of USB, for OHCI/XHCI test doesn't verify that usb device has been hotplugged except of checking for error after hotplug. So port checks similar to that of ehci/uhci, left as excercis

[Qemu-devel] [PATCH 02/30] test: virtio-serial: check if hot-plug/unplug works

2014-09-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/virtio-serial-test.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tests/virtio-serial-test.c b/tests/virtio-serial-test.c index e743875..bf030a6 100644 --- a/tests/virtio-serial-test.c +++ b/tests/virtio-serial-test.c @@ -

[Qemu-devel] [PATCH 12/30] qdev: add simple/generic unplug callback for HotplugHandler

2014-09-24 Thread Igor Mammedov
it will be used in shallow conversion from legacy hotplug mechanism and eventually replace all the uses of old mechanism DeviceClass->unplug = qdev_simple_unplug_cb() Signed-off-by: Igor Mammedov --- hw/core/qdev.c | 5 + include/hw/qdev-core.h | 2 ++ 2 files changed, 7 insertions(+

[Qemu-devel] [PATCH 22/30] scsi: convert pvscsi HBA to hotplug hander API

2014-09-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- not tested since it's broken, i.e. QEMU hangs in BIOS with pvscsi device present on CLI --- hw/scsi/vmw_pvscsi.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c index 5734d19

[Qemu-devel] [PATCH 09/30] access BusState.allow_hotplug using wraper qbus_is_hotpluggable()

2014-09-24 Thread Igor Mammedov
it would allow transparently switch detection if Bus is hotpluggable from allow_hotplug field to hotplug_handler link and drop allow_hotplug field once all users are converted to hotplug handler API. Signed-off-by: Igor Mammedov --- hw/core/qdev.c | 6 +++--- hw/i386/acpi-build.c |

[Qemu-devel] [PATCH 10/30] qdev: HotplugHandler: rename unplug callback to unplug_request

2014-09-24 Thread Igor Mammedov
'HotplugHandler.unplug' callback is currently used as async call to issue unplug request for device that implements it. Renaming 'unplug' callback to 'unplug_request' should help to avoid confusion about what callback does and would allow to introduce 'unplug' callback that would perform actual dev

[Qemu-devel] [PATCH 18/30] s390x: drop not used allow_hotplug in event-facility

2014-09-24 Thread Igor Mammedov
s390-sclp-event-facility creates s390-sclp-events-bus and immeadiatly sets its allow_hotplug field to 0, which is NOP since it's already 0 by default. Also since BUS is not hotpluggable, it's not possible to call SCLP_EVENT{ DeviceClass.unplug } callback from qdev_unplug() making this unreachable

[Qemu-devel] [PATCH 24/30] scsi: cleanup not used anymore SCSIBusInfo{hotplug, hot_unplug} fields

2014-09-24 Thread Igor Mammedov
SCSI subsytem was converted to hotplug handler API and doesn't use SCSIBusInfo{hotplug, hot_unplug} fields and related callbacks anymore. Signed-off-by: Igor Mammedov --- hw/scsi/scsi-bus.c | 16 include/hw/scsi/scsi.h | 2 -- 2 files changed, 18 deletions(-) diff --git a/

[Qemu-devel] [PATCH 13/30] qdev: hotplug: set handler only if HOTPLUG_HANDLER interface is supported

2014-09-24 Thread Igor Mammedov
Check if 'handler' implements HOTPLUG_HANDLER interface before setting it, if it's not then do nothing and leave bus not hotpluggable. That would allow to reuse the same code for creating bus for example 'scsi_bus_new()' for both hotpluggable and not hotpluggable controllers. Signed-off-by: Igor

[Qemu-devel] [PATCH 17/30] virtio-mmio: drop useless bus->allow_hotplug = 0

2014-09-24 Thread Igor Mammedov
Bus by default is not hotpluggable. virtio-mmio-bus and its parent types do not set allow_hotplug anywhere explicitly, so remove not needed field access and wrapper along with it. Signed-off-by: Igor Mammedov --- hw/virtio/virtio-mmio.c | 17 ++--- 1 file changed, 2 insertions(+), 15

[Qemu-devel] [PATCH 20/30] s390x: convert virtio-ccw to hotplug handler API

2014-09-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/s390x/virtio-ccw.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 33a1d86..ccd6046 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -230,7 +230,7

[Qemu-devel] [PATCH 25/30] usb-bot: drop not needed "allow_hotplug = 0"

2014-09-24 Thread Igor Mammedov
usb-bot creates SCSI bus and immediately makes it non hotpluggable which makes not possible to add anything to it after machine is created. Taking in account that ubs-bot doesn't implement HOTPLUG_HANDLER interface, SCSI will be created as non hotpluggable, so there is not need to reset allow_hotp

[Qemu-devel] [PATCH 15/30] virtio-pci: replace BusState.allow_hotplug with hotplug_handler

2014-09-24 Thread Igor Mammedov
Although virtio-pci-bus is internal object of composite virtio-pci device and it doesn't participate in -device/device_add hotplug flow, it's required by bus_add_child() that bus must be hotpluggable to be able to add child at runtime. Set parent of virtio-pci-bus as NOP hotplug controller, so that

[Qemu-devel] [PATCH 23/30] scsi: convert virtio-scsi HBA to hotplug handler API

2014-09-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/scsi/virtio-scsi.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 86aba88..aeda1cf 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -649,26

[Qemu-devel] [PATCH 19/30] s390x: convert s390-virtio to hotplug handler API

2014-09-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/s390x/s390-virtio-bus.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c index 6b6fb61..97a907c 100644 --- a/hw/s390x/s390-virtio-bus.c +++ b/hw/s390x/s390-virtio-bu

Re: [Qemu-devel] [PULL 0/2] VFIO endian updates

2014-09-24 Thread Peter Maydell
On 23 September 2014 10:14, Alex Williamson wrote: > The following changes since commit 07e2863d0271ac6c05206d8ce9e4f4c39b25d3ea: > > exec.c: fix setting 1-byte-long watchpoints (2014-09-19 17:42:16 +0100) > > are available in the git repository at: > > git://github.com/awilliam/qemu-vfio.git

[Qemu-devel] [PATCH 26/30] usb-storage: make its storage SCSI bus hotpluggable explicitly

2014-09-24 Thread Igor Mammedov
usb-storage uses SCSI bus to provide underling storage (i.e. scsi-disk) and it's hotpluggable. In addition during usb-storage hotplug bus_add_child() won't allow to add scsi-disk to SCSI bus owned by usb-storage if bus is not hotpluggable. By default SCSI bus was alway hotpluggable even if an owne

[Qemu-devel] [PATCH 21/30] scsi: make scsi_bus_new() assign hotplug controller

2014-09-24 Thread Igor Mammedov
it will allow incrementally convert every controller that creates SCSI bus and supports hotplug to hotplug controller API Signed-off-by: Igor Mammedov --- hw/scsi/scsi-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 954c607.

[Qemu-devel] [PATCH 06/30] test: usb: add port test to uhci unit test

2014-09-24 Thread Igor Mammedov
along with it move common code fro ehci test to a separate file to avoid duplication. Later this code will be used for hotplug test. Signed-off-by: Igor Mammedov --- tests/Makefile | 5 +++-- tests/test-usb-hcd-common.c | 37 + tests/test-usb-hcd

[Qemu-devel] [PATCH 29/30] qdev: drop legacy hotplug fields/methods

2014-09-24 Thread Igor Mammedov
It removes not needed anymore BusState.allow_hotplug field and DeviceClass.unplug callback. Signed-off-by: Igor Mammedov --- hw/core/qdev.c | 15 +++ include/hw/qdev-core.h | 7 +-- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/

[Qemu-devel] [PATCH 30/30] qdev: HotplugHandler: add support for unplugging BUS-less devices

2014-09-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/core/qdev.c | 46 +++--- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 4182cc3..e309b0e 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -209,9 +209,27 @@ void qd

[Qemu-devel] [PATCH 16/30] virtio-serial: convert to hotplug-handler API

2014-09-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/char/virtio-serial-bus.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 3931085..c6870f1 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-ser

[Qemu-devel] [PATCH 11/30] qdev: HotplugHandler: provide unplug callback

2014-09-24 Thread Igor Mammedov
it to be called for actual device removal and will allow to separate request and removal handling phases of x86-CPU devices and also it's a handler to be called for synchronously removable devices. Signed-off-by: Igor Mammedov --- unplug handling for bus-less devices will be added later in this s

[Qemu-devel] [PATCH 27/30] usb-storage: drop not needed "allow_hotplug = 0"

2014-09-24 Thread Igor Mammedov
Drop useless hack that disables hotplug on bus, after backend storage was added to it, by setting "allow_hotplug = 0". Even if bus is hotpluggable, It won't be possible to add another SCSI device to bus since its realize will fail early with error "no free target" in scsi_qdev_realize() method. Si

[Qemu-devel] [PATCH 28/30] usb: convert to hotplug handler API

2014-09-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/usb/bus.c | 3 +-- hw/usb/dev-smartcard-reader.c | 8 +++- hw/usb/hcd-ehci-pci.c | 6 ++ hw/usb/hcd-ehci-sysbus.c | 6 ++ hw/usb/hcd-ohci.c | 12 hw/usb/hcd-uhci.c | 6 ++ h

[Qemu-devel] [PATCH 05/30] test: virtio-blk: check if hot-plug/unplug works

2014-09-24 Thread Igor Mammedov
since virtio-blk-pci is a PCI device, its unplug is async and handled by ACPI. So simultate device's ACPI _EJ0 method to trigger actual device removal. Signed-off-by: Igor Mammedov --- tests/virtio-blk-test.c | 75 + 1 file changed, 64 insertions(+

[Qemu-devel] [PATCH 03/30] test: virtio-rng: check if hot-plug/unplug works

2014-09-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/virtio-rng-test.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/tests/virtio-rng-test.c b/tests/virtio-rng-test.c index 402c206..7f62f84 100644 --- a/tests/virtio-rng-test.c +++ b/tests/virtio-rng-test.c @@ -12,1

Re: [Qemu-devel] [PATCH v4 10/19] qapi: Better error messages for duplicated expressions

2014-09-24 Thread Markus Armbruster
Eric Blake writes: > The previous commit demonstrated that the generator overlooked > duplicate expressions: > - a complex type reusing a built-in type name > - redeclaration of a type name, whether by the same or different > metatype > - redeclaration of a command or event > - lack of tracking o

  1   2   3   >