[Qemu-devel] [PULL v2 17/50] iotests: Add test for eject under NBD server

2016-02-02 Thread Max Reitz
This patch adds a test for ejecting the BlockBackend an NBD server is connected to (the NBD server is supposed to stop). Signed-off-by: Max Reitz Reviewed-by: Fam Zheng Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/qemu-iotests/140 | 92 ++

[Qemu-devel] [PULL v2 08/50] iotests: Rename filter_nbd to _filter_nbd in 083

2016-02-02 Thread Max Reitz
In the patch after the next, this function is moved to common.filter. Therefore, its name should be preceded by an underscore to signify its global availability. To keep the code motion patch clean, we cannot rename it in the same patch, so we need to choose some order of renaming vs. motion. It i

[Qemu-devel] [PULL v2 23/50] block: Use blk_remove_bs() in blk_delete()

2016-02-02 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/block-backend.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 621787c..7f5ad59 100644 --- a/block/block-b

[Qemu-devel] [PULL v2 18/50] block: Add BB-BDS remove/insert notifiers

2016-02-02 Thread Max Reitz
bdrv_close() no longer signifies ejection of a medium, this is now done by removing the BDS from the BB. Therefore, we want to have a notifier for that in the BB instead of a close notifier in the BDS. The former is added now, the latter is removed later. Symmetrically, another notifier list is ad

[Qemu-devel] [PULL v2 29/50] block: Rewrite bdrv_close_all()

2016-02-02 Thread Max Reitz
This patch rewrites bdrv_close_all(): Until now, all root BDSs have been force-closed. This is bad because it can lead to cached data not being flushed to disk. Instead, try to make all reference holders relinquish their reference voluntarily: 1. All BlockBackend users are handled by making all B

[Qemu-devel] [PULL v2 09/50] iotests: Change coding style of _filter_nbd in 083

2016-02-02 Thread Max Reitz
In order to be able to move _filter_nbd to common.filter in the next patch, its coding style needs to be adapted to that of common.filter. That means, we have to convert tabs to four spaces, adjust the alignment of the last line (done with spaces already, assuming one tab equals eight spaces), fix

[Qemu-devel] [PULL v2 30/50] iotests: Add test for multiple BB on BDS tree

2016-02-02 Thread Max Reitz
This adds a test for having multiple BlockBackends in one BDS tree. In this case, there is one BB for the protocol BDS and one BB for the format BDS in a simple two-BDS tree (with the protocol BDS and BB added first). When bdrv_close_all() is executed, no cached data from any BDS should be lost; t

[Qemu-devel] [PULL v2 35/50] qcow2: Assign bs->file->bs to file in qcow2_co_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-4-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qcow2.c index d4ea6b4..8babecd 100644 --- a/

[Qemu-devel] [PULL v2 10/50] iotests: Move _filter_nbd into common.filter

2016-02-02 Thread Max Reitz
_filter_nbd can be useful for other NBD tests, too, therefore it should reside in common.filter. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/083 | 12 tests/qemu-iotests/common.filter | 12 2 files change

[Qemu-devel] [PULL v2 20/50] virtio-scsi: Catch BDS-BB removal/insertion

2016-02-02 Thread Max Reitz
Make use of the BDS-BB removal and insertion notifiers to remove or set up, respectively, virtio-scsi's op blockers. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- hw/scsi/virtio-scsi.c | 55 + include/hw/virtio/virtio-scsi.h | 10 ++

[Qemu-devel] [PULL v2 13/50] iotests: Make redirecting qemu's stderr optional

2016-02-02 Thread Max Reitz
Redirecting qemu's stderr to stdout makes working with the stderr output difficult due to the other file descriptor magic performed in _launch_qemu ("ambiguous redirect"). Add an option which specifies whether stderr should be redirected to stdout or not (allowing for other modes to be added in th

[Qemu-devel] [PULL v2 36/50] raw: Assign bs to file in raw_co_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Message-id: 1453780743-16806-5-git-send-email-f...@redhat.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- block/raw-posix.c | 1 + block/raw_bsd.c | 1 + 2 files changed, 2 insertions(+) diff --git a/block/raw-posix.c b/block/raw-posix.c ind

[Qemu-devel] [PULL v2 33/50] block: Add "file" output parameter to block status query functions

2016-02-02 Thread Max Reitz
From: Fam Zheng The added parameter can be used to return the BDS pointer which the valid offset is referring to. Its value should be ignored unless BDRV_BLOCK_OFFSET_VALID in ret is set. Until block drivers fill in the right value, let's clear it explicitly right before calling .bdrv_get_block_

[Qemu-devel] [PULL v2 21/50] nbd: Switch from close to eject notifier

2016-02-02 Thread Max Reitz
The NBD code uses the BDS close notifier to determine when a medium is ejected. However, now it should use the BB's BDS removal notifier for that instead of the BDS's close notifier. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- blockdev

[Qemu-devel] [PULL v2 37/50] iscsi: Assign bs to file in iscsi_co_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-6-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- block/iscsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index e1

[Qemu-devel] [PULL v2 47/50] qemu-img: Make MapEntry a QAPI struct

2016-02-02 Thread Max Reitz
From: Fam Zheng The "flags" bit mask is expanded to two booleans, "data" and "zero"; "bs" is replaced with "filename" string. Refactor the merge conditions in img_map() into entry_mergeable(). Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 145378074

[Qemu-devel] [PULL v2 14/50] iotests: Add test for a nonexistent NBD export

2016-02-02 Thread Max Reitz
Trying to connect to a nonexistent NBD export should not crash the server. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/143 | 73 ++ tests/qemu-iotests/143.out | 7 + tests/qemu-iotests/gr

[Qemu-devel] [PULL v2 22/50] block: Remove BDS close notifier

2016-02-02 Thread Max Reitz
It is unused now, so we can remove it. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c| 8 block/block-backend.c | 7 --- include/block/block.h | 1 - include/block/block_int.h

Re: [Qemu-devel] [PATCH] qapi: Fix compilation failure on MIPS

2016-02-02 Thread Eric Blake
On 02/02/2016 10:26 AM, Peter Maydell wrote: > On 2 February 2016 at 14:51, Eric Blake wrote: >> Commit 86f4b687 broke compilation on MIPS, which has a preprocessor >> pollution of '#define mips 1'. Treat it the same way as we do for >> the pollution with 'unix', so that QMP remains backwards com

[Qemu-devel] [PULL v2 25/50] block: Make bdrv_close() static

2016-02-02 Thread Max Reitz
There are no users of bdrv_close() left, except for one of bdrv_open()'s failure paths, bdrv_close_all() and bdrv_delete(), and that is good. Make bdrv_close() static so nobody makes the mistake of directly using bdrv_close() again. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: A

[Qemu-devel] [PULL v2 16/50] block: Release named dirty bitmaps in bdrv_close()

2016-02-02 Thread Max Reitz
bdrv_delete() is not very happy about deleting BlockDriverStates with dirty bitmaps still attached to them. In the past, we got around that very easily by relying on bdrv_close_all() bypassing bdrv_delete(), and bdrv_close() simply ignoring that condition. We should fix that by releasing all named

[Qemu-devel] [PULL v2 15/50] block: Remove unused struct definition BlockFinishData

2016-02-02 Thread Max Reitz
From: Fam Zheng Unused since 94db6d2d3. Signed-off-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf Signed-off-by: Max Reitz --- blockjob.c | 8 1 file changed, 8 deletions(-) diff --git a/blockjob.c b/blockjob.c index 80adb9d..a692142 100644 --- a/blockjob.c +

[Qemu-devel] [PULL v2 39/50] qed: Assign bs->file->bs to file in bdrv_qed_co_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-8-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- block/qed.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/qed.c b/block/qed.c index 8f6f841.

[Qemu-devel] [PULL v2 19/50] virtio-blk: Functions for op blocker management

2016-02-02 Thread Max Reitz
Put the code for setting up and removing op blockers into an own function, respectively. Then, we can invoke those functions whenever a BDS is removed from an virtio-blk BB or inserted into it. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --

Re: [Qemu-devel] [PATCH] dimm: Correct type of MemoryHotplugState->base

2016-02-02 Thread Eduardo Habkost
On Mon, Feb 01, 2016 at 01:33:09PM +1100, David Gibson wrote: > On Fri, Jan 22, 2016 at 03:32:52PM +0100, Igor Mammedov wrote: > > On Fri, 22 Jan 2016 15:21:05 +0100 > > Paolo Bonzini wrote: > > > > > On 22/01/2016 11:02, Igor Mammedov wrote: > > > > On Thu, 21 Jan 2016 12:37:51 +1100 > > > > Dav

[Qemu-devel] [PULL v2 24/50] blockdev: Use blk_remove_bs() in do_drive_del()

2016-02-02 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 1044a6a..09d4621 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2792,7 +2792,7 @@ voi

[Qemu-devel] [PULL v2 42/50] vpc: Assign bs->file->bs to file in vpc_co_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-11-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- block/vpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/vpc.c b/block/vpc.c index a070307..f504536 100644 --- a/blo

[Qemu-devel] [PULL v2 26/50] block: Add list of all BlockDriverStates

2016-02-02 Thread Max Reitz
We need this list so that bdrv_close_all() can keep track of which BDSs are still open after having removed the BDSs from all of the BBs and having released all monitor BDS references. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Reviewed-by: Fam Zheng Signed-off-by: Kevin Wolf --- block.

[Qemu-devel] [PULL v2 27/50] blockdev: Keep track of monitor-owned BDS

2016-02-02 Thread Max Reitz
As a side effect, we can now make x-blockdev-del's check whether a BDS is actually owned by the monitor explicit. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 28 +++- include/block/block_int.h | 4 st

[Qemu-devel] [PULL v2 43/50] vmdk: Fix calculation of block status's offset

2016-02-02 Thread Max Reitz
From: Fam Zheng "offset" is the offset of cluster and sector_num doesn't necessarily refer to the start of it, it should add index_in_cluster. Signed-off-by: Fam Zheng Message-id: 1453780743-16806-12-git-send-email-f...@redhat.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- block/vmd

[Qemu-devel] [PULL v2 28/50] block: Add blk_remove_all_bs()

2016-02-02 Thread Max Reitz
When bdrv_close_all() is called, instead of force-closing all root BlockDriverStates, it is better to just drop the reference from all BlockBackends and let them be closed automatically. This prevents BDS from getting closed that are still referenced by other BDS, which may result in loss of cached

[Qemu-devel] [PULL v2 44/50] vmdk: Return extent's file in bdrv_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Message-id: 1453780743-16806-13-git-send-email-f...@redhat.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- block/vmdk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 9d5a18a..a8db5d9 1

[Qemu-devel] [PULL v2 32/50] block: acquire in bdrv_query_image_info

2016-02-02 Thread Max Reitz
From: Paolo Bonzini NFS calls aio_poll inside bdrv_get_allocated_size. This requires acquiring the AioContext. Signed-off-by: Paolo Bonzini Message-id: 1450867706-19860-1-git-send-email-pbonz...@redhat.com Reviewed-by: Fam Zheng Signed-off-by: Max Reitz --- block/qapi.c | 9 +++-- 1 fil

[Qemu-devel] [PULL v2 46/50] qemu-img: In "map", use the returned "file" from bdrv_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Now all drivers should return a correct "file", we can make use of it, even with the recursion into backing chain above. Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-15-git-send-email-f...@redhat.com Signed-off-by:

[Qemu-devel] [PULL v2 45/50] block: Use returned *file in bdrv_co_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Now that all drivers return the right "file" pointer, we can use it. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1453780743-16806-14-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- block/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

[Qemu-devel] [PULL v2 31/50] iotests: Add test for block jobs and BDS ejection

2016-02-02 Thread Max Reitz
Suggested-by: Paolo Bonzini Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/qemu-iotests/141 | 186 + tests/qemu-iotests/141.out | 59 ++ tests/qemu-iotests/group | 1 + 3 files changed, 246 i

[Qemu-devel] [PULL v2 49/50] block: set device_list.tqe_prev to NULL on BDS removal

2016-02-02 Thread Max Reitz
From: Jeff Cody This fixes a regression introduced with commit 3f09bfbc7. Multiple bugs arise in conjunction with live snapshots and mirroring operations (which include active layer commit). After a live snapshot occurs, the active layer and the base layer both have a non-NULL tqe_prev field in

[Qemu-devel] [PULL v2 34/50] qcow: Assign bs->file->bs to file in qcow_co_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-3-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- block/qcow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow.c b/block/qcow.c index 4202797.

[Qemu-devel] [PULL v2 50/50] block: qemu-iotests - add test for snapshot, commit, snapshot bug

2016-02-02 Thread Max Reitz
From: Jeff Cody Signed-off-by: Jeff Cody Message-id: 2dbc05efba2f683cb3aaf71aaa9b776ebf7ec57c.1454376655.git.jc...@redhat.com Reviewed-by: Max Reitz [Moved test number from 143 to 144] Signed-off-by: Max Reitz --- tests/qemu-iotests/144 | 114 +

[Qemu-devel] [PULL v2 38/50] parallels: Assign bs->file->bs to file in parallels_co_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-7-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c

Re: [Qemu-devel] [PATCH v1 09/22] migration: convert unix socket protocol to use QIOChannel

2016-02-02 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > Convert the unix socket migration protocol driver to use > QIOChannel and QEMUFileChannel, instead of plain sockets > APIs. It can be unconditionally built, since the socket > impl of QIOChannel will report a suitable error on platforms > where UN

Re: [Qemu-devel] [PULL 0/2] usb: two ehci fixes.

2016-02-02 Thread Peter Maydell
s/dgibson/tags/ppc-for-2.6-20160201' > into staging (2016-02-02 09:13:10 +) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-usb-20160202-1 > > for you to fetch changes up to 5a8660741a8aa19fbf8a5e8a2b3aac88664f

[Qemu-devel] [PULL v2 40/50] sheepdog: Assign bs to file in sd_co_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-9-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- block/sheepdog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/sheepdog.c b/block/sheepdog.c index 2ea05a6..a0098c1 1

[Qemu-devel] [PULL v2 48/50] iotests: Add "qemu-img map" test for VMDK extents

2016-02-02 Thread Max Reitz
From: Fam Zheng Signed-off-by: Fam Zheng Message-id: 1453780743-16806-17-git-send-email-f...@redhat.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- tests/qemu-iotests/059 | 10 ++ tests/qemu-iotests/059.out | 25 + 2 files changed, 35 insertions(+)

[Qemu-devel] [PULL v2 41/50] vdi: Assign bs->file->bs to file in vdi_co_get_block_status

2016-02-02 Thread Max Reitz
From: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Fam Zheng Message-id: 1453780743-16806-10-git-send-email-f...@redhat.com Signed-off-by: Max Reitz --- block/vdi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/vdi.c b/block/vdi.c index 294c438..b403243 100644 --- a/block

Re: [Qemu-devel] [PATCH] qapi: Fix compilation failure on MIPS

2016-02-02 Thread Peter Maydell
On 2 February 2016 at 17:45, Eric Blake wrote: > On 02/02/2016 10:26 AM, Peter Maydell wrote: >> On 2 February 2016 at 14:51, Eric Blake wrote: >>> Commit 86f4b687 broke compilation on MIPS, which has a preprocessor >>> pollution of '#define mips 1'. Treat it the same way as we do for >>> the po

Re: [Qemu-devel] [PATCH 3/4] usb-bot: hotplug support

2016-02-02 Thread Andreas Färber
Am 02.02.2016 um 14:36 schrieb Markus Armbruster: > Gerd Hoffmann writes: > >> This patch marks usb-bot as hot-pluggable device, makes attached >> property settable and turns off auto-attach in case the device >> was hotplugged. >> >> Hot-plugging a usb-bot device with one or more scsi devices ca

Re: [Qemu-devel] [PATCH v1 10/22] migration: convert tcp socket protocol to use QIOChannel

2016-02-02 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > Convert the tcp socket migration protocol driver to use > QIOChannel and QEMUFileChannel, instead of plain sockets > APIs. > > While this now looks pretty similar to the migration/unix.c > file from the previous patch, it was decided not to merge

[Qemu-devel] [PATCH] target-arm: Don't report presence of EL2 if it doesn't exist

2016-02-02 Thread Peter Maydell
We already modify the processor feature bits to not report EL3 support to the guest if EL3 isn't enabled for the CPU we're emulating. Add similar support for not reporting EL2 unless it is enabled. This is necessary because real world guest code running at EL3 (trusted firmware or bootloaders) will

Re: [Qemu-devel] CPU hotplug

2016-02-02 Thread Eduardo Habkost
On Mon, Feb 01, 2016 at 04:35:17PM +1100, David Gibson wrote: > Hi, > > It seems to me we're getting rather bogged down in how to proceed with > an improved CPU hotplug (and hot unplug) interface, both generically > and for ppc in particular. > > So here's a somewhat more concrete suggestion of a

Re: [Qemu-devel] [PATCH v1 11/22] migration: convert fd socket protocol to use QIOChannel

2016-02-02 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > Convert the fd socket migration protocol driver to use > QIOChannel and QEMUFileChannel, instead of plain sockets > APIs. It can be unconditionally built because the > QIOChannel APIs it uses will take care to report suitable > error messages if n

Re: [Qemu-devel] [PATCH v6 1/5] util: Introduce error reporting functions with fatal/abort

2016-02-02 Thread Markus Armbruster
I'm struggling with my review queue, and have had to resort to subsystem batching to increase throughput. Because of that, v3-v5 have flown by without a peep from me. My sincere apologies. Lluís Vilanova writes: > Provide two lean functions to report error messages that fatal/abort > QEMU. > >

Re: [Qemu-devel] [PATCH v1 12/22] migration: convert exec socket protocol to use QIOChannel

2016-02-02 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > Convert the exec socket migration protocol driver to use > QIOChannel and QEMUFileChannel, instead of the stdio > popen APIs. It can be unconditionally built because the > QIOChannelCommand class can report suitable error messages > on platforms w

[Qemu-devel] [PATCH] qapi: Fix compilation failure on sparc

2016-02-02 Thread Eric Blake
Commit 86f4b687 broke compilation on sparc, which has a preprocessor pollution of '#define sparc 1'. Treat it the same way as we do for the pollution with 'unix', so that QMP remains backwards compatible and only the C code needs to use the alternative 'q_sparc' spelling. CC: Peter Maydell Signe

Re: [Qemu-devel] ping: [PATCH v13] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-02-02 Thread Programmingkid
On Feb 2, 2016, at 12:31 PM, Daniel P. Berrange wrote: > On Tue, Feb 02, 2016 at 12:28:24PM -0500, Programmingkid wrote: >> >> On Feb 2, 2016, at 12:16 PM, Daniel P. Berrange wrote: >> >>> On Tue, Feb 02, 2016 at 12:08:31PM -0500, Programmingkid wrote: https://patchwork.ozlabs.org/patch/57

Re: [Qemu-devel] [PATCH v6 5/5] doc: Introduce coding style for errors

2016-02-02 Thread Markus Armbruster
Lluís Vilanova writes: > Gives some general guidelines for reporting errors in QEMU. > > Signed-off-by: Lluís Vilanova > --- > HACKING | 37 + > 1 file changed, 37 insertions(+) > > diff --git a/HACKING b/HACKING > index 12fbc8a..b738bce 100644 > --- a/HACK

Re: [Qemu-devel] [iGVT-g] [vfio-users] [PATCH v3 00/11] igd passthrough chipset tweaks

2016-02-02 Thread Kay, Allen M
> -Original Message- > From: Tian, Kevin > Sent: Monday, February 01, 2016 11:08 PM > To: Kay, Allen M; Alex Williamson; Gerd Hoffmann; qemu-devel@nongnu.org > Cc: igv...@ml01.01.org; xen-de...@lists.xensource.com; Eduardo Habkost; > Stefano Stabellini; Cao jin; vfio-us...@redhat.com > Su

Re: [Qemu-devel] ping: [PATCH v13] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-02-02 Thread Eric Blake
On 02/02/2016 12:10 PM, Programmingkid wrote: >> There was/is no leak because it qdict_get_str() returns 'const char *' and >> so nothing needs freeing. So your change is still a backwards steps IMHO. > > char filename[MAXPATHLEN]; > snprintf(filename, MAXPATHLEN, "%s", qdict_get_str(options, "fi

Re: [Qemu-devel] ping: [PATCH v13] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-02-02 Thread Eric Blake
On 02/02/2016 10:28 AM, Programmingkid wrote: >> Whats the rationale here ? Using pre-allocated fixed >> length arrays is pretty bad practice in general, but >> especially so for filenames > > With an automatic variable there is no worry about when to release it. Yeah, but it comes with the dow

Re: [Qemu-devel] [PATCH v6 4/5] util: [ppc] Use new error_report_abort() instead of abort()

2016-02-02 Thread Eric Blake
On 02/02/2016 09:14 AM, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > target-ppc/kvm.c|4 ++-- > target-ppc/kvm_ppc.h| 15 +-- > target-ppc/mmu-hash32.c |5 +++-- > target-ppc/mmu_helper.c |3 +-- > 4 files changed, 15 insertions(+), 12 deleti

Re: [Qemu-devel] [iGVT-g] [vfio-users] [PATCH v3 00/11] igd passthrough chipset tweaks

2016-02-02 Thread Alex Williamson
On Tue, 2016-02-02 at 19:10 +, Kay, Allen M wrote: >  > > -Original Message- > > From: Tian, Kevin > > Sent: Monday, February 01, 2016 11:08 PM > > To: Kay, Allen M; Alex Williamson; Gerd Hoffmann; qemu-devel@nongnu.org > > Cc: igv...@ml01.01.org; xen-de...@lists.xensource.com; Eduardo

Re: [Qemu-devel] ping: [PATCH v13] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-02-02 Thread Programmingkid
On Feb 2, 2016, at 2:24 PM, Eric Blake wrote: > On 02/02/2016 12:10 PM, Programmingkid wrote: > >>> There was/is no leak because it qdict_get_str() returns 'const char *' and >>> so nothing needs freeing. So your change is still a backwards steps IMHO. >> >> char filename[MAXPATHLEN]; >> snprin

Re: [Qemu-devel] [PATCH v1 13/22] migration: convert RDMA to use QIOChannel interface

2016-02-02 Thread Dr. David Alan Gilbert
* Daniel P. Berrange (berra...@redhat.com) wrote: > This converts the RDMA code to provide a subclass of > QIOChannel that uses RDMA for the data transport. > > The RDMA code would be much better off it it could > be split up in a generic RDMA layer, a QIOChannel > impl based on RMDA, and then the

[Qemu-devel] iotest 013 failure under clang -fsanitize=undefined

2016-02-02 Thread John Snow
Recently, qemu iotest 013 has started to fail for me: Fedora release 22 (Twenty Two) 3.5.0-9.fc22 clang version 3.5.0 (tags/RELEASE_350/final) Target: x86_64-redhat-linux-gnu Thread model: posix +4 KiB/home/jsnow/src/qemu/qemu-io-cmds.c:230:18: runtime error: division by zero The problem is t

Re: [Qemu-devel] [PATCH] qapi: Fix compilation failure on sparc

2016-02-02 Thread Markus Armbruster
Eric Blake writes: > Commit 86f4b687 broke compilation on sparc, which has a preprocessor > pollution of '#define sparc 1'. Treat it the same way as we do for > the pollution with 'unix', so that QMP remains backwards compatible > and only the C code needs to use the alternative 'q_sparc' spelli

[Qemu-devel] [RFC PATCH v2 7/7] vfio/pci: Find and expose Intel IGD OpRegion

2016-02-02 Thread Alex Williamson
This is provided via a device specific region, look for it on Intel VGA class devices. Our default mechanism to expose this to the BIOS is via fw_cfg where it's expected that the BIOS will copy the data into a reserved RAM area and update the ASL Storage register to reference the GPA of that buffe

[Qemu-devel] [RFC PATCH v2] fw/pci: Add support for mapping Intel IGD OpRegion via QEMU

2016-02-02 Thread Alex Williamson
When assigning Intel IGD graphics via QEMU/vfio, the OpRegion for the device may be exposed as a fw_cfg file. Allocate space for this, copy the contents and write the ASL Storage register (0xFC) to point to this buffer. NB, it's possible for QEMU to use the write to the ASL Storage register to ma

qemu-devel@nongnu.org

2016-02-02 Thread John Snow
On 02/02/2016 11:14 AM, Lluís Vilanova wrote: > Replaces all direct uses of 'error_setg(&error_fatal/abort)' with > 'error_report_fatal/abort'. Also reimplements the former on top of the > latter. > > Signed-off-by: Lluís Vilanova > --- > hw/block/fdc.c |6 +++--- > hw/ppc/spapr.c

Re: [Qemu-devel] [iGVT-g] [vfio-users] [PATCH v3 00/11] igd passthrough chipset tweaks

2016-02-02 Thread Alex Williamson
On Tue, 2016-02-02 at 11:31 -0500, Kevin O'Connor wrote: > On Tue, Feb 02, 2016 at 09:56:20AM +0100, Gerd Hoffmann wrote: > >   Hi, > >  > > > > I'd have qemu copy the data on 0xfc write then, so things continue to > > > > work without updating seabios.  So, the firmware has to allocate space, > >

Re: [Qemu-devel] [PATCH v2 0/5] block: reduce reliance on bs->job pointer

2016-02-02 Thread John Snow
ping, I think this one is up to you, jtc? On 01/26/2016 06:54 PM, John Snow wrote: > This is a small collection of patches to reduce our use of the bs->job > pointer where possible. There are still more usages in the code, but > this cuts down on a few. > > The goal is to eventually eliminate all

Re: [Qemu-devel] [PULL v2 00/50] Block patches

2016-02-02 Thread Peter Maydell
On 2 February 2016 at 17:34, Max Reitz wrote: > This pull request supersedes Kevin's pull request from Friday > (http://lists.nongnu.org/archive/html/qemu-devel/2016-01/msg06026.html). > > > The following changes since commit d2ea854c382d4d080de1f149167e60290108f79b: > > Merge remote-tracking br

Re: [Qemu-devel] [PATCH v3] vfio/common: Check iova with limit not with size

2016-02-02 Thread Bandan Das
Pierre Morel writes: > In vfio_listener_region_add(), we try to validate that the region is not > zero sized and hasn't overflowed the addresses space. > > But the calculation uses the size of the region instead of > using the region's limit (size - 1). > > This leads to Int128 overflow when the

Re: [Qemu-devel] [RFC 09/14] Implement remaining PMU functionality

2016-02-02 Thread Alistair Francis
On Wed, Aug 5, 2015 at 9:51 AM, Christopher Covington wrote: > This adds logic to increment PMEVCNTR's based on different event inputs, > implements all remaining CP registers, and triggers an interrupt on > event overflow. We (Xilinx) need parts of this patch to avoid kernel panics when booting

Re: [Qemu-devel] ping: [PATCH v13] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-02-02 Thread Programmingkid
On Feb 2, 2016, at 2:24 PM, Eric Blake wrote: > On 02/02/2016 12:10 PM, Programmingkid wrote: > >>> There was/is no leak because it qdict_get_str() returns 'const char *' and >>> so nothing needs freeing. So your change is still a backwards steps IMHO. >> >> char filename[MAXPATHLEN]; >> snprin

Re: [Qemu-devel] [PATCH v6 1/5] util: Introduce error reporting functions with fatal/abort

2016-02-02 Thread Thomas Huth
On 02.02.2016 19:53, Markus Armbruster wrote: > Lluís Vilanova writes: ... >> diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h >> index 7ab2355..6c2f142 100644 >> --- a/include/qemu/error-report.h >> +++ b/include/qemu/error-report.h >> @@ -43,4 +43,23 @@ void error_report(c

Re: [Qemu-devel] iotest 013 failure under clang -fsanitize=undefined

2016-02-02 Thread Laszlo Ersek
On 02/02/16 21:03, John Snow wrote: > Recently, qemu iotest 013 has started to fail for me: > > Fedora release 22 (Twenty Two) > > 3.5.0-9.fc22 > clang version 3.5.0 (tags/RELEASE_350/final) > Target: x86_64-redhat-linux-gnu > Thread model: posix > > > +4 KiB/home/jsnow/src/qemu/qemu-io-cmds.c:

Re: [Qemu-devel] iotest 013 failure under clang -fsanitize=undefined

2016-02-02 Thread Eric Blake
On 02/02/2016 01:03 PM, John Snow wrote: > The problem is that in the print report for read_f, t2 and t1 can > actually be the same exact timestamp, and tdiv will try to divide by 0.0. > > Normally this is not a problem as this is defined to be INFINITY in C99 > Annex F. > > Clang, however, has

Re: [Qemu-devel] [PATCH] qapi: Fix compilation failure on sparc

2016-02-02 Thread Eric Blake
On 02/02/2016 01:04 PM, Markus Armbruster wrote: > Eric Blake writes: > >> Commit 86f4b687 broke compilation on sparc, which has a preprocessor >> pollution of '#define sparc 1'. Treat it the same way as we do for >> the pollution with 'unix', so that QMP remains backwards compatible >> and only

Re: [Qemu-devel] iotest 013 failure under clang -fsanitize=undefined

2016-02-02 Thread John Snow
On 02/02/2016 04:47 PM, Laszlo Ersek wrote: > On 02/02/16 21:03, John Snow wrote: >> Recently, qemu iotest 013 has started to fail for me: >> >> Fedora release 22 (Twenty Two) >> >> 3.5.0-9.fc22 >> clang version 3.5.0 (tags/RELEASE_350/final) >> Target: x86_64-redhat-linux-gnu >> Thread model: po

Re: [Qemu-devel] ping: [PATCH v13] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-02-02 Thread Eric Blake
On 02/02/2016 02:23 PM, Programmingkid wrote: >> And why isn't bsd_path usable for that purpose? > > After trying it out, I found out why bsd_path isn't usable for that purpose. > It is because the user might try to use a flash drive as the the cdrom. Say a > flash drive is set to /dev/disk2s9.

Re: [Qemu-devel] [PATCH 2/3] pcdimm: add 'type' field to PCDIMMDeviceInfo

2016-02-02 Thread Eric Blake
On 01/27/2016 11:51 PM, Vladimir Sementsov-Ogievskiy wrote: > The field is needed to distinguish pc-dimm and nvdimm. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Denis V. Lunev > CC: Stefan Hajnoczi > CC: Xiao Guangrong > CC: "Michael S. Tsirkin" > CC: Igor Mammedov > CC:

Re: [Qemu-devel] [PATCH 3/3] balloon: don't use NVDIMM for ballooning

2016-02-02 Thread Eric Blake
On 01/27/2016 11:51 PM, Vladimir Sementsov-Ogievskiy wrote: > NVDIMM for now is planned to use as a backing store for DAX filesystem > in the guest and thus this memory is excluded from guest memory > management and LRUs. > > In this case libvirt running QEMU along with configured balloon almost >

Re: [Qemu-devel] iotest 013 failure under clang -fsanitize=undefined

2016-02-02 Thread Laszlo Ersek
On 02/02/16 23:00, John Snow wrote: > > > On 02/02/2016 04:47 PM, Laszlo Ersek wrote: >> On 02/02/16 21:03, John Snow wrote: >>> Recently, qemu iotest 013 has started to fail for me: >>> >>> Fedora release 22 (Twenty Two) >>> >>> 3.5.0-9.fc22 >>> clang version 3.5.0 (tags/RELEASE_350/final) >>> T

[Qemu-devel] [PATCH] Added code for synchronzing the internal simulation clock with an external simulation clock

2016-02-02 Thread James Nutaro
This patch adds an interface via UNIX shared memory for pacing the execution of QEMU to match an external simulation clock. The aim is to allow QEMU to be used as a module inside of a larger simulation system. The body of the patch is below. Signed-off-by: Jim Nutaro (nut...@gmail.com) >From 0e0

Re: [Qemu-devel] iotest 013 failure under clang -fsanitize=undefined

2016-02-02 Thread Paolo Bonzini
On 02/02/2016 22:59, Eric Blake wrote: > I'd be okay with this patch, if you want to make it a formal > submission, and if no one else chimes in with any opinion other > than disgust at clang's shenanigans. I'm not okay with the patch. What's wrong with -fno-sanitize=float-divide-by-zero? GCC

Re: [Qemu-devel] [PATCH 2/6] i.MX: simplify CCM to only handle clock required by timers.

2016-02-02 Thread Jean-Christophe DUBOIS
Le 02/02/2016 17:22, Peter Maydell a écrit : On 26 January 2016 at 21:44, Jean-Christophe Dubois wrote: Various i.MX timers (GPT, EPIT, PWM, ...) are only requesting 4 clocks from the system. * CLK_NONE, * CLK_IPG, * CLK_IPG_HIGH, * CLK_32k Other "clocks" are not required by the qemu framewor

Re: [Qemu-devel] [RFC 09/14] Implement remaining PMU functionality

2016-02-02 Thread Christopher Covington
Hi Alistair, On 02/02/2016 04:22 PM, Alistair Francis wrote: > On Wed, Aug 5, 2015 at 9:51 AM, Christopher Covington > wrote: >> This adds logic to increment PMEVCNTR's based on different event inputs, >> implements all remaining CP registers, and triggers an interrupt on >> event overflow. > >

Re: [Qemu-devel] [RFC 09/14] Implement remaining PMU functionality

2016-02-02 Thread Alistair Francis
On Tue, Feb 2, 2016 at 3:01 PM, Christopher Covington wrote: > Hi Alistair, > > On 02/02/2016 04:22 PM, Alistair Francis wrote: >> On Wed, Aug 5, 2015 at 9:51 AM, Christopher Covington >> wrote: >>> This adds logic to increment PMEVCNTR's based on different event inputs, >>> implements all remain

Re: [Qemu-devel] [PATCH] Added code for synchronzing the internal simulation clock with an external simulation clock

2016-02-02 Thread Eric Blake
On 02/02/2016 01:49 PM, James Nutaro wrote: It looks like you are a first-time contributor. First, welcome to the community. What I say below may sound like a lot, but it's meant to help you be more successful in your contribution, not to scare you off. Subject line is too long. I'd suggest so

Re: [Qemu-devel] [iGVT-g] [vfio-users] [PATCH v3 00/11] igd passthrough chipset tweaks

2016-02-02 Thread Kay, Allen M
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, February 02, 2016 11:37 AM > To: Kay, Allen M; Tian, Kevin; Gerd Hoffmann; qemu-devel@nongnu.org > Cc: igv...@ml01.01.org; xen-de...@lists.xensource.com; Eduardo Habkost; > Stefano Stabellini

Re: [Qemu-devel] [PATCH v5 01/10] qom: add helpers for UserCreatable object types

2016-02-02 Thread Eric Blake
On 02/02/2016 05:57 AM, Daniel P. Berrange wrote: > The QMP monitor code has two helper methods object_add > and qmp_object_del that are called from several places > in the code (QMP, HMP and main emulator startup). > > The HMP and main emulator startup code also share > further logic that extract

Re: [Qemu-devel] [PATCH v5 01/10] qom: add helpers for UserCreatable object types

2016-02-02 Thread Andreas Färber
Am 03.02.2016 um 00:38 schrieb Eric Blake: > On 02/02/2016 05:57 AM, Daniel P. Berrange wrote: >> The QMP monitor code has two helper methods object_add >> and qmp_object_del that are called from several places >> in the code (QMP, HMP and main emulator startup). >> >> The HMP and main emulator sta

Re: [Qemu-devel] Migrating decrementer

2016-02-02 Thread Mark Cave-Ayland
On 01/02/16 00:52, David Gibson wrote: >> Thanks for more pointers - I think I'm slowly getting there. My current >> thoughts are that the basic migration algorithm is doing the right thing >> in that it works out the number of host ticks different between source >> and destination. > > Sorry, I'

Re: [Qemu-devel] [PATCH v5 01/10] qom: add helpers for UserCreatable object types

2016-02-02 Thread Eric Blake
On 02/02/2016 04:41 PM, Andreas Färber wrote: > Am 03.02.2016 um 00:38 schrieb Eric Blake: >> On 02/02/2016 05:57 AM, Daniel P. Berrange wrote: >>> The QMP monitor code has two helper methods object_add >>> and qmp_object_del that are called from several places >>> in the code (QMP, HMP and main em

Re: [Qemu-devel] [PATCH v5 02/10] qemu-img: add support for --object command line arg

2016-02-02 Thread Eric Blake
On 02/02/2016 05:57 AM, Daniel P. Berrange wrote: > Allow creation of user creatable object types with qemu-img > via a new --object command line arg. This will be used to supply > passwords and/or encryption keys to the various block driver > backends via the recently added 'secret' object type. >

Re: [Qemu-devel] ping: [PATCH v13] block/raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2016-02-02 Thread Programmingkid
On Feb 2, 2016, at 5:04 PM, Eric Blake wrote: > On 02/02/2016 02:23 PM, Programmingkid wrote: > >>> And why isn't bsd_path usable for that purpose? >> >> After trying it out, I found out why bsd_path isn't usable for that purpose. >> It is because the user might try to use a flash drive as the

Re: [Qemu-devel] [PATCH v14 7/8] Implement new driver for block replication

2016-02-02 Thread Wen Congyang
On 02/02/2016 10:34 PM, Stefan Hajnoczi wrote: > On Mon, Feb 01, 2016 at 09:13:36AM +0800, Wen Congyang wrote: >> On 01/29/2016 11:46 PM, Stefan Hajnoczi wrote: >>> On Fri, Jan 29, 2016 at 11:13:42AM +0800, Changlong Xie wrote: On 01/28/2016 11:15 PM, Stefan Hajnoczi wrote: > On Thu, Jan 2

Re: [Qemu-devel] [PATCH v10 1/2] mirror: Rewrite mirror_iteration

2016-02-02 Thread Fam Zheng
On Tue, 02/02 18:20, Max Reitz wrote: > On 13.01.2016 03:50, Fam Zheng wrote: > > The "pnum < nb_sectors" condition in deciding whether to actually copy > > data is unnecessarily strict, and the qiov initialization is > > unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. > > > > Rewrit

[Qemu-devel] [PATCH v11 0/2] mirror: Improve zero write and discard

2016-02-02 Thread Fam Zheng
v11: Rebase. The only difference is the "file" parameter of bdrv_get_block_status_above. Patch 1 rewrites mirror_iteration. Patch 2 is a small DRY cleaning up. The main benefit is copying unallocated sectors (both zeroed and discarded) doesn't go through the iov setup loop, as they don't nee

[Qemu-devel] [PATCH v11 2/2] mirror: Add mirror_wait_for_io

2016-02-02 Thread Fam Zheng
The three lines are duplicated a number of times now, refactor a function. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- block/mirror.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 8b06a31..219decd 100

<    1   2   3   4   >