Re: [PATCH v5 00/18] nvme: refactoring and cleanups

2020-05-10 Thread Klaus Jensen
On May 5 07:48, Klaus Jensen wrote: > From: Klaus Jensen > > Changes since v5 > > No functional changes, just updated Reviewed-by tags. Also, I screwed up > the CC list when sending v4. > > Philippe and Keith, please add a Reviewed-by to > > * "nvme: factor out pmr setup" an

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: If vhost-user daemon is used as a backend for the vhost device, then we should consider a possibility of disconnect at any moment. If such disconnect happened in the vhost_migration_log() routine the vhost device structure will be clean up. At the start

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: Since disconnect can happen at any time during initialization not all vring buffers (for instance used vring) can be intialized successfully. If the buffer was not initialized then vhost_memory_unmap call will lead to SIGSEGV. Add checks for the vring a

Re: [PATCH v2 2/5] vhost: introduce wrappers to set guest notifiers for virtio device

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: Introduce new wrappers to set/reset guest notifiers for the virtio device in the vhost device module: vhost_dev_assign_guest_notifiers ->set_guest_notifiers(..., ..., true); vhost_dev_drop_guest_notifiers ->set_guest_notifiers(..., ...,

Re: [PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qemu-common.h'

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:39:53PM +0200, Philippe Mathieu-Daudé wrote: > Move these generic functions to a more common place, with other > functions related to host page size. Document a little. > > Cc: Alexey Kardashevskiy > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David Gibs

Re: [PATCH 07/10] exec: Move all RAMBlock functions to 'exec/ramblock.h'

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:39:55PM +0200, Philippe Mathieu-Daudé wrote: > The RAMBlock API was dispersed in 3 different headers. > One of these headers, "exec/ram_addr.h", is restricted > to target dependent code. However these functions are > not target specific. Move all functions into a single >

Re: [PATCH 10/10] exec: Move cpu_physical_memory_* functions to 'exec/memory-internal.h'

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:39:58PM +0200, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David Gibson > --- > include/exec/memory-internal.h | 305 - > include/exec/ram_addr.h| 303 +-

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-10 Thread Raphael Norwitz
On Thu, May 7, 2020 at 11:35 AM Dima Stepanov wrote: > > What do you think? > Apologies - I tripped over the if (dev->started && r < 0) check. Never-mind my point with race conditions and failing migrations. Rather than modifying vhost_dev_set_log(), it may be clearer to put a check after vhost_

Re: [PATCH v6 00/14] LUKS: encryption slot management using amend interface

2020-05-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200510134037.18487-1-mlevi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200510134037.18487-1-mlevi...@redhat.com Subject: [PATCH v6 00/14] LUKS: encryption slot management

Re: [PATCH v6 00/14] LUKS: encryption slot management using amend interface

2020-05-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200510134037.18487-1-mlevi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200510134037.18487-1-mlevi...@redhat.com Subject: [PATCH v6 00/14] LUKS: encryption slot management

[PATCH v6 14/14] iotests: add tests for blockdev-amend

2020-05-10 Thread Maxim Levitsky
This commit adds two tests that cover the new blockdev-amend functionality of luks and qcow2 driver Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/295 | 279 + tests/qemu-iotests/295.out | 40 ++ tests/qemu-iotes

[PATCH v6 12/14] block/crypto: implement blockdev-amend

2020-05-10 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/crypto.c | 72 qapi/block-core.json | 14 - 2 files changed, 66 insertions(+), 20 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index b14cb0ff06..61cbe4

[PATCH v6 07/14] block/crypto: implement the encryption key management

2020-05-10 Thread Maxim Levitsky
This implements the encryption key management using the generic code in qcrypto layer and exposes it to the user via qemu-img This code adds another 'write_func' because the initialization write_func works directly on the underlying file, and amend works on instance of luks device. This commit al

[PATCH v6 06/14] block/crypto: rename two functions

2020-05-10 Thread Maxim Levitsky
rename the write_func to create_write_func, and init_func to create_init_func. This is preparation for other write_func that will be used to update the encryption keys. No functional changes Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/crypto.c | 25

[PATCH v6 05/14] block/amend: refactor qcow2 amend options

2020-05-10 Thread Maxim Levitsky
Some qcow2 create options can't be used for amend. Remove them from the qcow2 create options and add generic logic to detect such options in qemu-img Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/qcow2.c | 108 ++--- qemu-img.c

[PATCH v6 09/14] iotests: filter few more luks specific create options

2020-05-10 Thread Maxim Levitsky
This allows more tests to be able to have same output on both qcow2 luks encrypted images and raw luks images Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/087.out | 6 ++--- tests/qemu-iotests/134.out | 2 +- tests/qemu-iotests/158.out

[PATCH v6 08/14] block/qcow2: extend qemu-img amend interface with crypto options

2020-05-10 Thread Maxim Levitsky
Now that we have all the infrastructure in place, wire it in the qcow2 driver and expose this to the user. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/qcow2.c | 72 +- tests/qemu-iotests/082.out | 45 ++

[PATCH v6 04/14] block/amend: separate amend and create options for qemu-img

2020-05-10 Thread Maxim Levitsky
Some options are only useful for creation (or hard to be amended, like cluster size for qcow2), while some other options are only useful for amend, like upcoming keyslot management options for luks Since currently only qcow2 supports amend, move all its options to a common macro and then include i

[PATCH v6 10/14] iotests: qemu-img tests for luks key management

2020-05-10 Thread Maxim Levitsky
This commit adds two tests, which test the new amend interface of both luks raw images and qcow2 luks encrypted images. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/293 | 207 + tests/qemu-iotests/293.out | 99

[PATCH v6 11/14] block/core: add generic infrastructure for x-blockdev-amend qmp command

2020-05-10 Thread Maxim Levitsky
blockdev-amend will be used similiar to blockdev-create to allow on the fly changes of the structure of the format based block devices. Current plan is to first support encryption keyslot management for luks based formats (raw and embedded in qcow2) Signed-off-by: Maxim Levitsky Reviewed-by: Dan

[PATCH v6 13/14] block/qcow2: implement blockdev-amend

2020-05-10 Thread Maxim Levitsky
Currently the implementation only supports amending the encryption options, unlike the qemu-img version Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/qcow2.c| 39 +++ qapi/block-core.json | 16 +++- 2 files change

[PATCH v6 00/14] LUKS: encryption slot management using amend interface

2020-05-10 Thread Maxim Levitsky
Hi! Here is the updated series of my patches, incorporating all the feedback I received. This implements the API interface that we agreed upon except that I merged the LUKSKeyslotActive/LUKSKeyslotInactive union into a struct because otherwise I need nested unions which are not supported currentl

[PATCH v6 03/14] block/amend: add 'force' option

2020-05-10 Thread Maxim Levitsky
'force' option will be used for some unsafe amend operations. This includes things like erasing last keyslot in luks based formats (which destroys the data, unless the master key is backed up by external means), but that _might_ be desired result. Signed-off-by: Maxim Levitsky Reviewed-by: Danie

[PATCH v6 01/14] qcrypto/core: add generic infrastructure for crypto options amendment

2020-05-10 Thread Maxim Levitsky
This will be used first to implement luks keyslot management. block_crypto_amend_opts_init will be used to convert qemu-img cmdline to QCryptoBlockAmendOptions Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/crypto.c | 17 + block/crypto.h

[PATCH v6 02/14] qcrypto/luks: implement encryption key management

2020-05-10 Thread Maxim Levitsky
Next few patches will expose that functionality to the user. Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- crypto/block-luks.c | 395 +++- qapi/crypto.json| 61 ++- 2 files changed, 452 insertions(+), 4 deletions(-) diff --gi