Re: [Qemu-devel] [PATCH 23/24] qcow2: add .bdrv_remove_persistent_dirty_bitmap

2017-02-11 Thread Max Reitz
On 03.02.2017 10:40, Vladimir Sementsov-Ogievskiy wrote: > Realize .bdrv_remove_persistent_dirty_bitmap interface. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2-bitmap.c | 41 + > block/qcow2.c| 1 +

Re: [Qemu-devel] [PATCH 24/24] qmp: block-dirty-bitmap-remove: remove persistent

2017-02-11 Thread Max Reitz
On 03.02.2017 10:40, Vladimir Sementsov-Ogievskiy wrote: > Remove persistent bitmap from the storage on block-dirty-bitmap-remove. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > blockdev.c | 10 ++ > 1 file changed, 10 insertions(+) Reviewed-by: Max

Re: [Qemu-devel] [PATCH 22/24] block/dirty-bitmap: add bdrv_remove_persistent_dirty_bitmap

2017-02-11 Thread Max Reitz
On 03.02.2017 10:40, Vladimir Sementsov-Ogievskiy wrote: > Interface for removing persistent bitmap from its storage. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/dirty-bitmap.c | 18 ++ > include/block/block_int.h| 3 +++ >

Re: [Qemu-devel] [PATCH 07/24] qcow2: add bitmaps extension

2017-02-11 Thread Max Reitz
On 03.02.2017 10:40, Vladimir Sementsov-Ogievskiy wrote: > Add bitmap extension as specified in docs/specs/qcow2.txt. > For now, just mirror extension header into Qcow2 state and check > constraints. > > For now, disable image resize if it has bitmaps. It will be fixed later. > > Signed-off-by:

Re: [Qemu-devel] [PATCH v4 18/18] block: pass option prefix down to crypto layer

2017-02-11 Thread Max Reitz
On 10.02.2017 18:09, Daniel P. Berrange wrote: > While the crypto layer uses a fixed option name "key-secret", > the upper block layer may have a prefix on the options. e.g. > "luks-key-secret", "aes-key-secret", in order to avoid clashes > between crypto option names & other block option names.

Re: [Qemu-devel] [PATCH v4 11/18] qcow2: convert QCow2 to use QCryptoBlock for encryption

2017-02-11 Thread Max Reitz
On 10.02.2017 18:09, Daniel P. Berrange wrote: > This converts the qcow2 driver to make use of the QCryptoBlock > APIs for encrypting image content, using the legacyy QCow2 AES > scheme. > > With this change it is now required to use the QCryptoSecret > object for providing passwords, instead of

Re: [Qemu-devel] [PATCH 15/17] iotests: add default node-name

2017-02-11 Thread Max Reitz
On 07.02.2017 16:05, Vladimir Sementsov-Ogievskiy wrote: > When testing migration, auto-generated by qemu node-names differs in > source and destination qemu and migration fails. After this patch, > auto-generated by iotest nodenames will be the same. > > Signed-off-by: Vladimir

Re: [Qemu-devel] [RFC][PATCH] qemu-img: make convert async

2017-02-11 Thread Max Reitz
On 02.02.2017 17:06, Peter Lieven wrote: > this is something I have been thinking about for almost 2 years now. > we heavily have the following two use cases when using qemu-img convert. > > a) reading from NFS and writing to iSCSI for deploying templates > b) reading from iSCSI and writing to

[Qemu-devel] [PULL 21/21] qemu-img: Avoid setting ret to unused value in img_convert()

2017-02-11 Thread Max Reitz
From: Peter Maydell Coverity points out that we assign the return value from bdrv_snapshot_load_tmp() to 'ret' in img_convert(), but then never use that variable. (We check for failure by looking at local_err instead.) Drop the unused assignment, bringing the call into

[Qemu-devel] [PATCH] block: Swap request limit definitions

2017-02-11 Thread Max Reitz
Defining BDRV_REQUEST_MAX_SECTORS based on BDRV_REQUEST_MAX_BYTES is simpler than the other way around. Signed-off-by: Max Reitz --- include/block/block.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/block/block.h b/include/block/block.h

[Qemu-devel] [PULL 20/21] qemu-img: Use qemu_strtoul() rather than raw strtoul()

2017-02-11 Thread Max Reitz
From: Peter Maydell Some of the argument parsing in qemu-img uses strtoul() to parse integer arguments. This is tricky to get correct and in fact the code does not get it right, because it assigns the result of strtoul() to an 'int' variable and then tries to check for

[Qemu-devel] [PULL 17/21] qemu-io: Add failure regression tests

2017-02-11 Thread Max Reitz
From: Nir Soffer Add regression tests checking that qemu-io fails with non-zero exit code when reading non-existing file or using the wrong image format. Signed-off-by: Nir Soffer Message-id: 20170201003120.23378-4-nir...@gmail.com Reviewed-by: Max Reitz

[Qemu-devel] [PULL 18/21] qcow2: Optimize the refcount-block overlap check

2017-02-11 Thread Max Reitz
From: Alberto Garcia The metadata overlap checks introduced in a40f1c2add help detect corruption in the qcow2 image by verifying that data writes don't overlap with existing metadata sections. The 'refcount-block' check in particular iterates over the refcount table in order

[Qemu-devel] [PULL 19/21] qemu-io: don't allow I/O operations larger than BDRV_REQUEST_MAX_BYTES

2017-02-11 Thread Max Reitz
From: Alberto Garcia Passing a request size larger than BDRV_REQUEST_MAX_BYTES to any of the I/O commands results in an error. While 'read' and 'write' handle the error correctly, 'aio_read' and 'aio_write' hit an assertion: blk_aio_read_entry: Assertion `rwco->qiov->size ==

[Qemu-devel] [PULL 13/21] block/nfs: fix NULL pointer dereference in URI parsing

2017-02-11 Thread Max Reitz
From: Peter Lieven parse_uint_full wants to put the parsed value into the variable passed via its second argument which is NULL. Fixes: 94d6a7a76e9df9919629428f6c598e2b97d9426c Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven Reviewed-by: Eric Blake

[Qemu-devel] [PULL 16/21] qemu-iotests: Add _unsupported_fmt helper

2017-02-11 Thread Max Reitz
From: Nir Soffer This helper allows adding tests supporting any format expect the specified formats. This may be useful to test that many formats behave in a common way. Signed-off-by: Nir Soffer Message-id: 20170201003120.23378-3-nir...@gmail.com

[Qemu-devel] [PULL 15/21] qemu-io: Return non-zero exit code on failure

2017-02-11 Thread Max Reitz
From: Nir Soffer The result of openfile was not checked, leading to failure deep in the actual command with confusing error message, and exiting with exit code 0. Here is a simple example - trying to read with the wrong format: $ touch file $ qemu-io -f qcow2 -c 'read

[Qemu-devel] [PULL 11/21] block/qapi: reduce the execution time of qmp_query_blockstats

2017-02-11 Thread Max Reitz
From: Dou Liyang In order to reduce the execution time, this patch optimize the qmp_query_blockstats(): Remove the next_query_bds function. Remove the bdrv_query_stats function. Remove some judgement sentence. The original qmp_query_blockstats calls next_query_bds to

[Qemu-devel] [PULL 06/21] block/vmdk: Fix the endian problem of buf_len and lba

2017-02-11 Thread Max Reitz
From: QingFeng Hao The problem was triggered by qemu-iotests case 055. It failed when it was comparing the compressed vmdk image with original test.img. The cause is that buf_len in vmdk_write_extent wasn't converted to little-endian before it was stored to disk. But

[Qemu-devel] [PULL 14/21] block/nfs: fix naming of runtime opts

2017-02-11 Thread Max Reitz
From: Peter Lieven commit 94d6a7a accidentally left the naming of runtime opts and QAPI scheme inconsistent. As one consequence passing of parameters in the URI is broken. Sync the naming of the runtime opts to the QAPI scheme. Please note that this is technically backwards

[Qemu-devel] [PULL 10/21] block/qapi: reduce the coupling between the bdrv_query_stats and bdrv_query_bds_stats

2017-02-11 Thread Max Reitz
From: Dou Liyang The bdrv_query_stats and bdrv_query_bds_stats functions need to call each other, that increases the coupling. it also makes the program complicated and makes some unnecessary tests. Remove the call from bdrv_query_bds_stats to bdrv_query_stats, just

[Qemu-devel] [PULL 12/21] block: bdrv_invalidate_cache: invalidate children first

2017-02-11 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Current implementation invalidates firstly parent bds and then its children. This leads to the following bug: after incoming migration, in bdrv_invalidate_cache_all: 1. invalidate parent bds - reopen it with BDRV_O_INACTIVE cleared 2.

[Qemu-devel] [PULL 08/21] qemu-iotests: Don't create fifos / pidfiles with protocol paths

2017-02-11 Thread Max Reitz
From: Jeff Cody Trying to create, use, and remove fifos and pidfiles on protocol paths (e.g. nfs://localhost/scratch/qemu-nbd.pid) is obviously broken. Use the local $TEST_DIR path before it is 'protocolized' for these files. Signed-off-by: Jeff Cody

[Qemu-devel] [PULL 09/21] qemu-iotest: test to lookup protocol-based image with relative backing

2017-02-11 Thread Max Reitz
From: Jeff Cody This test uses NFS and block-stream to force a lookup of a backing image that has a relative filename, but a full backing image name with the protocol path intact. Signed-off-by: Jeff Cody Message-id:

[Qemu-devel] [PULL 05/21] iotests: record separate timings per format, protocol pair

2017-02-11 Thread Max Reitz
From: "Daniel P. Berrange" The 'check' program records timings for each test that is run. These timings are only valid, however, for a particular format/protocol combination. So if frequently running 'check' with a variety of different formats or protocols, the times printed

[Qemu-devel] [PULL 00/21] Block patches

2017-02-11 Thread Max Reitz
The following changes since commit 98b2faeaee96ab084d0b1669918688d8895c155f: Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging (2017-02-10 18:07:02 +) are available in the git repository at: git://github.com/XanClic/qemu.git tags/pull-block-2017-02-12

[Qemu-devel] [PULL 07/21] block: check full backing filename when searching protocol filenames

2017-02-11 Thread Max Reitz
From: Jeff Cody In bdrv_find_backing_image(), if we are searching an image for a backing file that contains a protocol, we currently only compare unmodified paths. However, some management software will change the backing filename to be a relative filename in a path. QEMU is

[Qemu-devel] [PULL 04/21] iotests: Fix reference output for 059

2017-02-11 Thread Max Reitz
From: Fam Zheng It was broken by efaa7c4eeb7 when it dropped the device name "image" from BB API. Now this error message text is updated again, sync it up. Signed-off-by: Fam Zheng Message-id: 20170119130759.28319-3-f...@redhat.com Reviewed-by: Eric Blake

[Qemu-devel] [PULL 03/21] qapi: Tweak error message of bdrv_query_image_info

2017-02-11 Thread Max Reitz
From: Fam Zheng @bs doesn't always have a device name, such as when it comes from "qemu-img info". Report file name instead. Signed-off-by: Fam Zheng Message-id: 20170119130759.28319-2-f...@redhat.com Reviewed-by: Eric Blake Signed-off-by:

[Qemu-devel] [PULL 01/21] iotests: Fix a problem in common.filter

2017-02-11 Thread Max Reitz
From: QingFeng Hao If TEST_DIR is set to /tmp, test case 144 will fail. The reason is that TEST_DIR resembles 144's test image name tmp.qcow2. When 144 is testing $TEST_DIR/tmp.qcow2, it wants to replace $TEST_DIR/tmp.qcow2 to TEST_DIR/tmp.qcow2, but actually it will

[Qemu-devel] [PULL 02/21] qemu-img: Improve commit invalid base message

2017-02-11 Thread Max Reitz
When trying to invoke qemu-img commit with a base image file name that is not part of the top image's backing chain, the user receives a rather plain "Base not found" error message. This is not really helpful because it does not explain what "not found" means, potentially leaving the user

Re: [Qemu-devel] [PATCH v3 2/5] iotests: fix remainining tests to work with LUKS

2017-02-11 Thread Max Reitz
On 24.01.2017 12:57, Daniel P. Berrange wrote: > The tests 033, 120, 140, 145 and 157 were all broken > when run with LUKS, since they did not correctly use > the required image opts args syntax to specify the > decryption secret. > > Reviewed-by: Eric Blake > Signed-off-by:

Re: [Qemu-devel] [PATCH v3 1/5] iotests: skip 159 & 170 with luks format

2017-02-11 Thread Max Reitz
On 24.01.2017 12:57, Daniel P. Berrange wrote: > While the qemu-img dd command does accept --image-opts > this is not sufficient to make it work with the LUKS > image yet. This is because bdrv_create() still always > requires the non-image-opts syntax. > > Thus we must skip 159/170 with luks for

Re: [Qemu-devel] [PATCH 0/2] qemu-img: fix coverity nits

2017-02-11 Thread Max Reitz
On 10.02.2017 17:28, Peter Maydell wrote: > Coverity points out a couple of nits in qemu-img: > * misuse of strtoul() > * variable set but not used > > These patches fix the issues. > > Peter Maydell (2): > qemu-img: Use qemu_strtoul() rather than raw strtoul() > qemu-img: Avoid setting

[Qemu-devel] [PATCH v2] linux-user: Add FICLONE and FICLONERANGE ioctls

2017-02-11 Thread Helge Deller
Add missing FICLONE and FICLONERANGE ioctls. Changes to v1: - Added STRUCT_file_clone_range as suggested by Laurent Vivier Signed-off-by: Helge Deller diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 2f6e85b..e6997ff 100644 --- a/linux-user/ioctls.h +++

Re: [Qemu-devel] [PATCH v3] vl: Move the cpu_synchronize_all_post_init() after generic devices initialization

2017-02-11 Thread Eduardo Habkost
On Wed, Feb 01, 2017 at 10:29:38AM +0800, Dou Liyang wrote: > At the Qemu initialization, we call the cpu_synchronize_all_post_init() > to synchronize All CPU states to KVM in the ./vl.c::main(). > > Currently, it is called before we initialize the CPUs, which is created > by "-device" command

[Qemu-devel] [PATCH] linux-user: Add sockopts for IPv6 ping and IPv6 traceroute

2017-02-11 Thread Helge Deller
Add the neccessary sockopts for ping and traceroute on IPv6. This fixes the following qemu warnings with IPv6: Unsupported ancillary data: 0/2 Unsupported ancillary data: 0/11 Unsupported ancillary data: 41/25 Unsupported setsockopt level=0 optname=12 Unsupported setsockopt level=41 optname=16

Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts

2017-02-11 Thread Paolo Bonzini
> > > On 10/02/2017 10:31, Gonglei (Arei) wrote: > > > But We tested the same cases on Xen platform and VMware, and > > > the guest booted successfully. > > > > Were these two also tested with enlightenments enabled? TCG surely isn't. > > About TCG, I just remove ' accel=kvm,' and

[Qemu-devel] [PATCH v3 1/4] sd: sdhci: check transfer mode register in multi block transfer

2017-02-11 Thread P J P
From: Prasad J Pandit In the SDHCI protocol, the transfer mode register value is used during multi block transfer to check if block count register is enabled and should be updated. Transfer mode register could be set such that, block count register would not be updated,

[Qemu-devel] [PATCH v3 4/4] sd: sdhci: Remove block count enable check in single block transfers

2017-02-11 Thread P J P
From: Prasad J Pandit In SDHCI protocol, the 'Block count enable' bit of the Transfer Mode register is relevant only in multi block transfers. We need not check it in single block transfers. Signed-off-by: Prasad J Pandit --- hw/sd/sdhci.c | 6

[Qemu-devel] [PATCH v3 0/4] sd: sdhci: correct transfer mode register usage

2017-02-11 Thread P J P
From: Prasad J Pandit Hello, In SDHCI protocol, the 'Block Count Enable' bit of the Transfer Mode register is used to control 's->blkcnt' value. This bit is not relevant in single block transfers. Also, Transfer Mode register value could be set such that 's->blkcnt'

[Qemu-devel] [PATCH v3 2/4] sd: sdhci: mask transfer mode register value

2017-02-11 Thread P J P
From: Prasad J Pandit In SDHCI protocol, the transfer mode register is defined to be of 6 bits. Mask its value with '0x0037' so that an invalid value couldn't be assigned. Signed-off-by: Prasad J Pandit --- hw/sd/sdhci.c | 2 +- 1 file changed,

[Qemu-devel] [PATCH v3 3/4] sd: sdhci: conditionally invoke multi block transfer

2017-02-11 Thread P J P
From: Prasad J Pandit In sdhci_write invoke multi block transfer if it is enabled in the transfer mode register 's->trnmod'. Signed-off-by: Prasad J Pandit --- hw/sd/sdhci.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Update:

Re: [Qemu-devel] [Qemu-arm] [PATCH v2] target-arm: Implement BCM2835 hardware RNG

2017-02-11 Thread Peter Maydell
On 11 February 2017 at 11:34, Alex Bennée wrote: > I know we are running under emulation but is rand() the right call to > feed data to the guest? There is the virtio rng and PPC spar RNG which > both use rng_backend_request_entropy() to collect random data. We should >

Re: [Qemu-devel] [Qemu-arm] [PATCH v2] target-arm: Implement BCM2835 hardware RNG

2017-02-11 Thread Alex Bennée
Marcin Chojnacki writes: > Recent vanilla Raspberry Pi kernels started to make use of > the hardware random number generator in BCM2835 SoC. As a > result, those kernels wouldn't work anymore under QEMU > but rather just freeze during the boot process. > > This patch

Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts

2017-02-11 Thread Gonglei (Arei)
Hi Paolo, > > > On 10/02/2017 10:31, Gonglei (Arei) wrote: > > But We tested the same cases on Xen platform and VMware, and > > the guest booted successfully. > > Were these two also tested with enlightenments enabled? TCG surely isn't. > About TCG, I just remove ' accel=kvm,' and

Re: [Qemu-devel] [PATCH] 9pfs: proxy: assert if unmarshal fails

2017-02-11 Thread Greg Kurz
On Sat, 11 Feb 2017 01:25:17 -0300 Philippe Mathieu-Daudé wrote: > Hi Greg, > Hi Philippe, > On 02/06/2017 02:20 PM, Greg Kurz wrote: > > Replies from the virtfs proxy are made up of a fixed-size header (8 bytes) > > and a payload of variable size (maximum 64kb). When