Re: [PATCH 8/8] block: drop unallocated_blocks_are_zero

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
06.05.2020 18:14, Eric Blake wrote: On 5/6/20 4:25 AM, Vladimir Sementsov-Ogievskiy wrote: Currently this field only set by qed and qcow2. Well, only after patches 1-6 (prior to then, it was also set in protocol drivers).  I think you might be able to hoist part of this patch earlier in the

Re: [PATCH 2/8] block/vpc: return ZERO block-status when appropriate

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
07.05.2020 0:18, Eric Blake wrote: On 5/6/20 4:25 AM, Vladimir Sementsov-Ogievskiy wrote: In case when get_image_offset() returns -1, we do zero out the corresponding chunk of qiov. So, this should be reported as ZERO. After block-status update, it never reports 0, so setting unallocated_blocks

[Bug 1805256] Re: qemu-img hangs on rcu_call_ready_event logic in Aarch64 when converting images

2020-05-07 Thread Ike Panhc
Tested debs in ppa:rafaeldtinoco/lp1805256 for focal and eoan and 1000 qemu-img convert passed. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1805256 Title: qemu-img hangs on rcu_call_ready_event l

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

2020-05-07 Thread Michael S. Tsirkin
On Wed, May 06, 2020 at 06:08:34PM -0400, Raphael Norwitz wrote: > As you correctly point out, this code needs to be looked at more > carefully so that > if the device does disconnect in the background we can handle the migration > path > gracefully. In particular, we need to decide whether a migr

Re: [PATCH 1/8] block/vdi: return ZERO block-status when appropriate

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
06.05.2020 16:57, Eric Blake wrote: On 5/6/20 4:25 AM, Vladimir Sementsov-Ogievskiy wrote: In case of !VDI_IS_ALLOCATED[], we do zero out the corresponding chunk of qiov. So, this should be reported as ZERO. This part makes sense outright, since vdi does not allow backing files, so all reads

[PATCH] ppc/spapr: add a POWER10 CPU model

2020-05-07 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/spapr_cpu_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index ac1c10942771..9c7e0d225a0a 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -410,6 +410,7 @@ static const Ty

Re: [PATCH] Fix stack corruption when handling PR_GETDEATHSIG

2020-05-07 Thread Laurent Vivier
Le 07/05/2020 à 01:47, Stephen Long a écrit : > From: Ana Pazos > > Signed-off-by: Ana Pazos > --- > Submitting this patch on behalf of Ana Pazos. The bug was triggered by > the following c file on aarch64-linux-user. > >> #include >> #include >> >> int main() { >> int PDeachSig = 0; >> i

Re: [PATCH 8/8] block: drop unallocated_blocks_are_zero

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
07.05.2020 10:05, Vladimir Sementsov-Ogievskiy wrote: 06.05.2020 18:14, Eric Blake wrote: On 5/6/20 4:25 AM, Vladimir Sementsov-Ogievskiy wrote: Currently this field only set by qed and qcow2. Well, only after patches 1-6 (prior to then, it was also set in protocol drivers).  I think you mig

[PATCH v24 4/4] iotests: 287: add qcow2 compression type test

2020-05-07 Thread Denis Plotnikov
The test checks fulfilling qcow2 requirements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Tested-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/287 | 152 +

[PATCH v24 2/4] qcow2: rework the cluster compression routine

2020-05-07 Thread Denis Plotnikov
The patch enables processing the image compression type defined for the image and chooses an appropriate method for image clusters (de)compression. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz --- block/qcow2-threa

[PATCH v24 0/4] implement zstd cluster compression method

2020-05-07 Thread Denis Plotnikov
v24: 01: add "compression_type" to the tests output [Max] hopefully, I've found them all. v23: Undecided: whether to add zstd(zlib) compression details to the qcow2 spec 03: tighten assertion on zstd decompression [Eric] 04: use _rm_test_img appropriately [Max] v2

[PATCH v24 1/4] qcow2: introduce compression type feature

2020-05-07 Thread Denis Plotnikov
The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image creation and can be changed only later by image conversion, thus c

[PATCH v24 3/4] qcow2: add zstd cluster compression

2020-05-07 Thread Denis Plotnikov
zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in comparison with zlib, which, at the moment, is the only compression method available. The performance test results: Test compresses and decompresse

Re: [PATCH 8/8] block: drop unallocated_blocks_are_zero

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
06.05.2020 18:14, Eric Blake wrote: On 5/6/20 4:25 AM, Vladimir Sementsov-Ogievskiy wrote: Currently this field only set by qed and qcow2. Well, only after patches 1-6 (prior to then, it was also set in protocol drivers).  I think you might be able to hoist part of this patch earlier in the

Re: [PATCH] qcow2: Fix preallocation on block devices

2020-05-07 Thread Kevin Wolf
Am 05.05.2020 um 16:18 hat Max Reitz geschrieben: > Calling bdrv_getlength() to get the pre-truncate file size will not > really work on block devices, because they have always the same length, > and trying to write beyond it will fail with a rather cryptic error > message. > > Instead, we should

Re: [PULL v1 0/3] Merge tpm 2020/05/06 v1

2020-05-07 Thread Peter Maydell
On Wed, 6 May 2020 at 15:27, Stefan Berger wrote: > > Hello! > This PR provides PPI changes for TPM support on ARM and compat > machines for QEMU 5.1 > > Regards, >Stefan > > The following changes since commit ea1329bb3a8d5cd25b70e3dbf73e7ded4d5ad756: > > Merge remote-tracking branch 're

[PATCH v2 1/9] qemu-img: convert: don't use unallocated_blocks_are_zero

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
qemu-img convert wants to distinguish ZERO which comes from short backing files. unallocated_blocks_are_zero field of bdi is unrelated: space after EOF is always considered to be zero anyway. So, just make post_backing_zero true in case of short backing file. Signed-off-by: Vladimir Sementsov-Ogie

[PATCH v2 4/9] block/vpc: return ZERO block-status when appropriate

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
In case when get_image_offset() returns -1, we do zero out the corresponding chunk of qiov. So, this should be reported as ZERO. Note that this changes visible output of "qemu-img map --output=json" and "qemu-io -c map" commands. For qemu-img map, the change is obvious: we just mark as zero what i

[PATCH v2 3/9] block/vdi: return ZERO block-status when appropriate

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
In case of !VDI_IS_ALLOCATED[], we do zero out the corresponding chunk of qiov. So, this should be reported as ZERO. Note that this changes visible output of "qemu-img map --output=json" and "qemu-io -c map" commands. For qemu-img map, the change is obvious: we just mark as zero what is really zer

[PATCH v2 0/9] drop unallocated_blocks_are_zero

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
Hi all! v2 (by Eric's review): 01: moved to the start of the series, add Eric's r-b 02: new 03-04: improve commit message 05: add Eric's r-b 06-08: improve commit message a bit, add Eric's r-b 09: typos and wording, rebase on 02 This is first step to block-status refactoring, and solves most si

[PATCH v2 5/9] block/crypto: drop unallocated_blocks_are_zero

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
It's false by default, no needs to set it. We are going to drop this variable at all, so drop it now here, it doesn't hurt. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/crypto.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/crypto.c b/block/crypto.c i

[PATCH v2 2/9] block: inline bdrv_unallocated_blocks_are_zero()

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
The function has the only user: bdrv_co_block_status(). Inline it to simplify reviewing of the following patches, which will finally drop unallocated_blocks_are_zero field too. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 1 - block.c | 15 --

[PATCH v2 7/9] block/file-posix: drop unallocated_blocks_are_zero

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
raw_co_block_status() in block/file-posix.c never returns 0, so unallocated_blocks_are_zero is useless (it doesn't affect the only user of the field: bdrv_co_block_status()). Drop it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/file-posix.c | 3 --- 1 file chan

[PATCH v2 6/9] block/iscsi: drop unallocated_blocks_are_zero

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
We set bdi->unallocated_blocks_are_zero = iscsilun->lbprz, but iscsi_co_block_status doesn't return 0 in case of iscsilun->lbprz, it returns ZERO when appropriate. So actually unallocated_blocks_are_zero is useless (it doesn't affect the only user of the field: bdrv_co_block_status()). Drop it now.

[PATCH v2 9/9] block: drop unallocated_blocks_are_zero

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
Currently this field only set by qed and qcow2. But in fact, all backing-supporting formats (parallels, qcow, qcow2, qed, vmdk) share these semantics: on unallocated blocks, if there is no backing file they just memset the buffer with zeroes. So, document this behavior for .supports_backing and dr

[PATCH v2 8/9] block/vhdx: drop unallocated_blocks_are_zero

2020-05-07 Thread Vladimir Sementsov-Ogievskiy
vhdx doesn't have .bdrv_co_block_status handler, so DATA|ALLOCATED is always assumed for it in bdrv_co_block_status(). unallocated_blocks_are_zero is useless (it doesn't affect the only user of the field: bdrv_co_block_status()), drop it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: E

Re: [PATCH v3 09/33] block: Add generic bdrv_inherited_options()

2020-05-07 Thread Max Reitz
On 06.05.20 12:37, Kevin Wolf wrote: > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: >> After the series this patch belongs to, we want to have a common >> BdrvChildClass that encompasses all of child_file, child_format, and >> child_backing. Such a single class needs a single .inherit_options

Re: [PATCH 3/6] sysemu/block-backend: Document blk_read()/blk_pwrite()

2020-05-07 Thread Stefan Hajnoczi
On Mon, May 04, 2020 at 11:46:38AM +0200, Philippe Mathieu-Daudé wrote: > + > +/** > + * blk_pread: > + * > + * @blk - the block backend where the buffer content is going to be read from s/ - /: / > + > +/** > + * blk_pwrite: > + * > + * @blk - the block backend where the buffer content is going

Re: [PATCH 2/6] qemu/bitmap: Document bitmap_new() returned pointer

2020-05-07 Thread Stefan Hajnoczi
On Mon, May 04, 2020 at 11:46:37AM +0200, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > include/qemu/bitmap.h | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 4/6] block/block: Document BlockSizes fields

2020-05-07 Thread Stefan Hajnoczi
On Mon, May 04, 2020 at 11:46:39AM +0200, Philippe Mathieu-Daudé wrote: > As it is not obvious for a block neophyte what means > the 'log' value, document it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/block/block.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Revi

Re: [PATCH 1/6] qemu/osdep: Document qemu_memalign() and friends

2020-05-07 Thread Stefan Hajnoczi
On Mon, May 04, 2020 at 11:46:36AM +0200, Philippe Mathieu-Daudé wrote: > Document allocator functions that require a specific > de-allocator call. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/block/block.h | 4 > include/qemu/osdep.h | 3 +++ > include/sysem

Re: [PATCH v3 12/33] block: Unify bdrv_child_cb_detach()

2020-05-07 Thread Max Reitz
On 06.05.20 14:41, Kevin Wolf wrote: > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: >> Make bdrv_child_cb_detach() call bdrv_backing_detach() for children with >> a COW role (and drop the reverse call from bdrv_backing_detach()), so it >> can be used for any child (with a proper role set). >>

Re: [PATCH v3 09/33] block: Add generic bdrv_inherited_options()

2020-05-07 Thread Max Reitz
On 06.05.20 15:11, Kevin Wolf wrote: > Am 06.05.2020 um 12:37 hat Kevin Wolf geschrieben: >> Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: >>> After the series this patch belongs to, we want to have a common >>> BdrvChildClass that encompasses all of child_file, child_format, and >>> child_back

Re: [PATCH v3 15/33] block: Pull out bdrv_default_perms_for_backing()

2020-05-07 Thread Max Reitz
On 06.05.20 15:21, Kevin Wolf wrote: > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: >> Right now, bdrv_format_default_perms() is used by format parents >> (generally). We want to switch to a model where most parents use a >> single BdrvChildClass, which then decides the permissions based on th

Re: [PATCH v3 18/33] block: Add bdrv_default_perms()

2020-05-07 Thread Max Reitz
On 06.05.20 15:47, Kevin Wolf wrote: > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: >> This callback can be used by BDSs that use child_of_bds with the >> appropriate BdrvChildRole for their children. >> >> Also, make bdrv_format_default_perms() use it for child_of_bds children >> (just a temp

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-05-07 Thread Daniel P . Berrangé
On Wed, May 06, 2020 at 08:16:14PM +0100, Dr. David Alan Gilbert wrote: > * Colin Walters (walt...@verbum.org) wrote: > > I'd like to make use of virtiofs as part of our tooling in > > https://github.com/coreos/coreos-assembler > > Most of the code runs as non-root today; qemu also runs as non-root

Re: [PATCH v3 22/33] block: Make backing files child_of_bds children

2020-05-07 Thread Max Reitz
On 06.05.20 18:37, Kevin Wolf wrote: > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: >> Make all parents of backing files pass the appropriate BdrvChildRole. >> By doing so, we can switch their BdrvChildClass over to the generic >> child_of_bds, which will do the right thing when given a correc

Re: [PATCH v2 1/2] chardev: enable distinct input for -chardev file

2020-05-07 Thread Darren Kenny
On Thursday, 2020-05-07 at 02:24:41 -04, Alexander Bulekov wrote: > char-file already supports distinct paths for input/output but it was > only possible to specify a distinct input through QMP. With this change, > we can also specify a distinct input with the -chardev file argument: > qemu -ch

Re: [PATCH v3 26/33] block: Use child_of_bds in remaining places

2020-05-07 Thread Max Reitz
On 06.05.20 19:04, Kevin Wolf wrote: > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: >> Replace child_file by child_of_bds in all remaining places (excluding >> tests). >> >> Signed-off-by: Max Reitz >> Reviewed-by: Eric Blake > >> diff --git a/block/blkreplay.c b/block/blkreplay.c >> index

Re: [PATCH v3 32/33] block: Pass BdrvChildRole in remaining cases

2020-05-07 Thread Max Reitz
On 06.05.20 19:13, Kevin Wolf wrote: > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: >> These calls have no real use for the child role yet, but it will not >> harm to give one. >> >> Notably, the bdrv_root_attach_child() call in blockjob.c is left >> unmodified because there is not much the ge

Re: [PATCH v2 2/2] char-file: add test for distinct path= and pathin=

2020-05-07 Thread Darren Kenny
Hi Alex, For the most part this looks fine, but I wonder if maybe there should be a couple more assertions to be certain that things are set up correctly at first, as well as maybe being sure to confirm that things weren't modified using stat(). See below... On Thursday, 2020-05-07 at 02:24:42 -

Re: [PATCH v1 7/7] translate-all: include guest address in out_asm output

2020-05-07 Thread Alex Bennée
Alex Bennée writes: > diff --git a/tcg/tcg.c b/tcg/tcg.c > index a2268d9db0..f5e4529df2 100644 > --- a/tcg/tcg.c > +++ b/tcg/tcg.c > @@ -4211,6 +4211,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) > } > tcg_debug_assert(num_insns >= 0); > s->gen_insn_end_off[num_insn

Re: [PULL 00/10] tcg patch queue

2020-05-07 Thread Peter Maydell
On Wed, 6 May 2020 at 19:30, Richard Henderson wrote: > > The following changes since commit a36d64f43325fa503075cc9408ddabb69b32f829: > > Merge remote-tracking branch > 'remotes/stsquad/tags/pull-testing-and-gdbstub-060520-1' into staging > (2020-05-06 14:06:00 +0100) > > are available in the

Re: tst-arm-mte bug: PSTATE.TCO is cleared on exceptions

2020-05-07 Thread Szabolcs Nagy
The 05/06/2020 13:57, Szabolcs Nagy wrote: > However later on during testing malloc with PROT_MTE > i got a qemu assert failure: > > Bail out! ERROR:/S/target/arm/mte_helper.c:97:allocation_tag_mem: assertion > failed: (tag_size <= in_page) > > i can reproduce it, but i don't know how to debug i

Re: [RFC PATCH 6/6] hw/block/nvme: Make device target agnostic

2020-05-07 Thread Stefan Hajnoczi
On Mon, May 04, 2020 at 05:36:22PM +0200, Philippe Mathieu-Daudé wrote: > +Keith new email > > On 5/4/20 11:46 AM, Philippe Mathieu-Daudé wrote: > > The NVMe device should not use target specific API. > > Use memory_region_do_writeback() (which was introduced > > in commit 61c490e25e0, after the N

Re: [PATCH 0/9] More truncate improvements

2020-05-07 Thread Kevin Wolf
Am 28.04.2020 um 22:28 hat Eric Blake geschrieben: > Based-on: <20200424125448.63318-1-kw...@redhat.com> > [PATCH v7 00/10] block: Fix resize (extending) of short overlays > > After reviewing Kevin's work, I questioned if we had a redundancy with > bdrv_has_zero_init_truncate. It turns out we do,

Re: [PATCH v3] migration/throttle: Add cpu-throttle-tailslow migration parameter

2020-05-07 Thread zhukeqian
Hi Dr.David, Sorry for the reply delay, just come back from holiday. On 2020/4/30 22:12, Dr. David Alan Gilbert wrote: > * Keqian Zhu (zhukeqi...@huawei.com) wrote: >> At the tail stage of throttling, the Guest is very sensitive to >> CPU percentage while the @cpu-throttle-increment is excessive

RE: [PATCH v4 3/6] net/colo-compare.c: Fix deadlock in compare_chr_send

2020-05-07 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Monday, May 4, 2020 6:28 PM > To: qemu-devel > Cc: Zhang, Chen ; Li Zhijian > ; Jason Wang ; Marc- > André Lureau ; Paolo Bonzini > > Subject: [PATCH v4 3/6] net/colo-compare.c: Fix deadlock in > compare_chr_send > > The chr_out c

[PATCH 2/2] megasas: use unsigned type for positive numeric fields

2020-05-07 Thread P J P
From: Prasad J Pandit Use unsigned type for the MegasasState fields which hold positive numeric values. Signed-off-by: Prasad J Pandit --- hw/scsi/megasas.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/

[PATCH 0/2] use unsigned type for MegasasState fields

2020-05-07 Thread P J P
From: Prasad J Pandit Hello, * This series fixes an OOB access issue which may occur when a guest user sets 's->reply_queue_head' field to a negative(or large positive) value, via 'struct mfi_init_qinfo' object in megasas_init_firmware(). * Second patch updates other numeric fields of Megas

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

2020-05-07 Thread Daniel P . Berrangé
On Tue, May 05, 2020 at 11:08:07PM +0300, Maxim Levitsky wrote: > Next few patches will expose that functionality > to the user. > > Signed-off-by: Maxim Levitsky > --- > crypto/block-luks.c | 395 +++- > qapi/crypto.json| 61 ++- > 2 files change

[PATCH 1/2] megasas: use unsigned type for reply_queue_head

2020-05-07 Thread P J P
From: Prasad J Pandit A guest user may set 's->reply_queue_head' MegasasState field to a negative value. Later in 'megasas_lookup_frame' it is used to index into s->frames[] array. Use unsigned type to avoid OOB access issue. Reported-by: Ren Ding Signed-off-by: Prasad J Pandit --- hw/scsi/me

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

2020-05-07 Thread Maxim Levitsky
On Thu, 2020-05-07 at 12:02 +0100, Daniel P. Berrangé wrote: > On Tue, May 05, 2020 at 11:08:07PM +0300, Maxim Levitsky wrote: > > Next few patches will expose that functionality > > to the user. > > > > Signed-off-by: Maxim Levitsky > > --- > > crypto/block-luks.c | 395

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

2020-05-07 Thread Maxim Levitsky
On Thu, 2020-05-07 at 12:02 +0100, Daniel P. Berrangé wrote: > On Tue, May 05, 2020 at 11:08:07PM +0300, Maxim Levitsky wrote: > > Next few patches will expose that functionality > > to the user. > > > > Signed-off-by: Maxim Levitsky > > --- > > crypto/block-luks.c | 395

Re: [PATCH 7/9] parallels: Rework truncation logic

2020-05-07 Thread Denis V. Lunev
On 4/28/20 11:29 PM, Eric Blake wrote: > The parallels driver tries to use truncation for image growth, but can > only do so when reads are guaranteed as zero. Now that we have a way > to request zero contents from truncation, we can defer the decision to > actual allocation attempts rather than u

Re: [PATCH v3 09/33] block: Add generic bdrv_inherited_options()

2020-05-07 Thread Kevin Wolf
Am 07.05.2020 um 10:49 hat Max Reitz geschrieben: > On 06.05.20 12:37, Kevin Wolf wrote: > > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: > >> +if (role & BDRV_CHILD_COW) { > >> +/* backing files are always opened read-only */ > > > > Not "always", just by default. > > OK. I jus

Re: [PATCH v24 0/4] implement zstd cluster compression method

2020-05-07 Thread Max Reitz
On 07.05.20 10:25, Denis Plotnikov wrote: > v24: >01: add "compression_type" to the tests output [Max] >hopefully, I've found them all. Looks like it from what I can tell. :) Thanks, applied to my block branch: https://git.xanclic.moe/XanClic/qemu/commits/branch/block Max signatu

Re: [PATCH v3 26/33] block: Use child_of_bds in remaining places

2020-05-07 Thread Kevin Wolf
Am 07.05.2020 um 11:33 hat Max Reitz geschrieben: > On 06.05.20 19:04, Kevin Wolf wrote: > > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: > >> Replace child_file by child_of_bds in all remaining places (excluding > >> tests). > >> > >> Signed-off-by: Max Reitz > >> Reviewed-by: Eric Blake >

Re: [PATCH v3 09/33] block: Add generic bdrv_inherited_options()

2020-05-07 Thread Max Reitz
On 07.05.20 13:19, Kevin Wolf wrote: > Am 07.05.2020 um 10:49 hat Max Reitz geschrieben: >> On 06.05.20 12:37, Kevin Wolf wrote: >>> Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: +if (role & BDRV_CHILD_COW) { +/* backing files are always opened read-only */ >>> >>> Not "al

Re: [PATCH] 9pfs: Fix potential deadlock of QEMU mainloop

2020-05-07 Thread Christian Schoenebeck
On Mittwoch, 6. Mai 2020 19:49:10 CEST Greg Kurz wrote: > > Ok, but why not both? Moving locks to worker thread and QemuMutex -> > > CoMutex? > Using CoMutex would be mandatory if we leave the locking where it sits > today, so that the main thread can switch to other coroutines instead > of blockin

RE: [PATCH v4 5/6] net/colo-compare.c, softmmu/vl.c: Check that colo-compare is active

2020-05-07 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Monday, May 4, 2020 6:28 PM > To: qemu-devel > Cc: Zhang, Chen ; Li Zhijian > ; Jason Wang ; Marc- > André Lureau ; Paolo Bonzini > > Subject: [PATCH v4 5/6] net/colo-compare.c, softmmu/vl.c: Check that colo- > compare is active > > I

Re: [PATCH v3 32/33] block: Pass BdrvChildRole in remaining cases

2020-05-07 Thread Kevin Wolf
Am 07.05.2020 um 11:36 hat Max Reitz geschrieben: > On 06.05.20 19:13, Kevin Wolf wrote: > > Am 18.02.2020 um 13:42 hat Max Reitz geschrieben: > >> These calls have no real use for the child role yet, but it will not > >> harm to give one. > >> > >> Notably, the bdrv_root_attach_child() call in blo

Re: [PATCH] 9pfs: Fix potential deadlock of QEMU mainloop

2020-05-07 Thread Christian Schoenebeck
On Mittwoch, 6. Mai 2020 19:54:15 CEST Greg Kurz wrote: > On Wed, 06 May 2020 15:36:16 +0200 > > Christian Schoenebeck wrote: > > On Mittwoch, 6. Mai 2020 15:05:23 CEST Christian Schoenebeck wrote: > > > > diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c > > > > index 9e046f7acb51..ac84ae804496 100644 >

[PATCH] ppc/pnv: Fix NMI system reset SRR1 value

2020-05-07 Thread Nicholas Piggin
Commit a77fed5bd926 ("ppc/pnv: Add support for NMI interface") got the SRR1 setting wrong for sresets that hit outside of power-save states. Fix this, better documenting the source for the bit definitions. Fixes: a77fed5bd926 ("ppc/pnv: Add support for NMI interface") got the Cc: Cédric Le Goater

Re: [Qemu-devel] [PATCH V2 4/4] hw/tpm: fix usage of bool in tpm-tis.c

2020-05-07 Thread Daniel P . Berrangé
ping, again, for either qemu-trivial or TPM maintainers to take this patch. The other three in this series are merged, but this TPM patch is still pending. On Tue, Mar 26, 2019 at 09:55:24AM -0400, Stefan Berger wrote: > On 3/24/19 3:41 PM, Thomas Huth wrote: > > On 23/03/2019 15.26, Jafar Abdi w

[PATCH] target/ppc: Add support for scv and rfscv instructions

2020-05-07 Thread Nicholas Piggin
POWER9 adds scv and rfscv instructions and the system call vectored interrupt. Linux does not support this instruction yet but it has been tested with a modified kernel that runs on real hardware. Signed-off-by: Nicholas Piggin --- This was tested with out-of-tree Linux patches and seems to work

[PULL 1/5] crypto: fix getter of a QCryptoSecret's property

2020-05-07 Thread Daniel P . Berrangé
From: Tong Ho This fixes the condition-check done by the "loaded" property getter, such that the property returns true even when the secret is loaded by the 'file' option. Signed-off-by: Tong Ho Signed-off-by: Daniel P. Berrangé --- crypto/secret.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PULL 0/5] Misc crypto subsystem fixes

2020-05-07 Thread Daniel P . Berrangé
The following changes since commit 609dd53df540edd72faee705205aceca9c42fea5: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20200506' into stag= ing (2020-05-07 09:45:54 +0100) are available in the Git repository at: https://github.com/berrange/qemu tags/qcrypto-next-pull-request f

[PULL 2/5] crypto/secret: fix inconsequential errors.

2020-05-07 Thread Daniel P . Berrangé
From: Alexey Krasikov Change condition from QCRYPTO_SECRET_FORMAT_RAW to QCRYPTO_SECRET_FORMAT_BASE64 in if-operator, because this is potential error if you add another format value. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alexey Krasikov Signed-off-by: Daniel P. Berrangé --- cryp

[PULL 4/5] block: luks: better error message when creating too large files

2020-05-07 Thread Daniel P . Berrangé
From: Maxim Levitsky Currently if you attampt to create too large file with luks you get the following error message: Formatting 'test.luks', fmt=luks size=17592186044416 key-secret=sec0 qemu-img: test.luks: Could not resize file: File too large While for raw format the error message is qemu-im

[PULL 5/5] crypto: extend hash benchmark to cover more algorithms

2020-05-07 Thread Daniel P . Berrangé
Extend the hash benchmark so that it can validate all algorithms supported by QEMU instead of being limited to sha256. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrangé --- tests/benchmark-crypto-hash.c | 73 --- 1 file changed, 59 insertions(+), 14 delet

[PULL 3/5] crypto: Redundant type conversion for AES_KEY pointer

2020-05-07 Thread Daniel P . Berrangé
From: Chen Qun We can delete the redundant type conversion if we set the the AES_KEY parameter with 'const' in qcrypto_cipher_aes_ecb_(en|de)crypt() function. Reported-by: Euler Robot Signed-off-by: Chen Qun Signed-off-by: Daniel P. Berrangé --- crypto/cipher-builtin.c | 10 -- 1 fil

[PATCH 1/2] block/block-copy: Fix uninitialized variable in block_copy_task_entry

2020-05-07 Thread Philippe Mathieu-Daudé
Fix when building with -Os: CC block/block-copy.o block/block-copy.c: In function ‘block_copy_task_entry’: block/block-copy.c:428:38: error: ‘error_is_read’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 428 | t->call_state->error_is_read = error

qemu-devel@nongnu.org

2020-05-07 Thread Aleksandar Markovic
чет, 7. мај 2020. у 01:43 Sasha Levin је написао/ла: > > Hi > > [This is an automated email] > > This commit has been processed because it contains a -stable tag. > The stable tag indicates that it's relevant for the following trees: all > > The bot has tested the following trees: v5.6.10, v5.4.38

[PATCH 0/2] block/block-copy: Fix uninitialized variable in block_copy_task_entry

2020-05-07 Thread Philippe Mathieu-Daudé
block_copy_task_entry() might be written differently to avoid the initialization. This silents the warning and let me build. Philippe Mathieu-Daudé (2): block/block-copy: Fix uninitialized variable in block_copy_task_entry block/block-copy: Simplify block_copy_do_copy() block/block-copy.c |

[PATCH 2/2] block/block-copy: Simplify block_copy_do_copy()

2020-05-07 Thread Philippe Mathieu-Daudé
block_copy_do_copy() is static, only used in block_copy_task_entry with the error_is_read argument set. No need to check for it, simplify. Signed-off-by: Philippe Mathieu-Daudé --- block/block-copy.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/block/block-cop

Re: [PATCH v6 3/5] 9pfs: add new function v9fs_co_readdir_many()

2020-05-07 Thread Christian Schoenebeck
On Montag, 4. Mai 2020 11:18:34 CEST Greg Kurz wrote: > On Fri, 01 May 2020 16:04:41 +0200 > > Christian Schoenebeck wrote: > > On Donnerstag, 30. April 2020 15:30:49 CEST Greg Kurz wrote: > > > > > I agree that a client that issues concurrent readdir requests on the > > > > > same fid is probabl

Re: [PATCH for-5.1 V3 0/7] mips: Add Loongson-3 machine support (with KVM)

2020-05-07 Thread Aleksandar Markovic
сре, 6. мај 2020. у 03:43 Huacai Chen је написао/ла: > > Hi, Aleksandar, > > On Tue, May 5, 2020 at 6:12 PM Aleksandar Markovic > wrote: > > > > > > > > уторак, 05. мај 2020., chen huacai је написао/ла: > >> > >> Hi, Aleksandar, > >> > >> On Sun, May 3, 2020 at 6:50 PM Aleksandar Markovic > >>

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-07 Thread Heiko Sieger
Hello Babu, Thanks for the reply and the QEMU command line. I will try to implement it in the XML. So essentially what you do is to define each group of cpus and associate them with a numa node: -numa node,nodeid=0,cpus=0-5 -numa node,nodeid=1,cpus=6-11 -numa node,nodeid=2,cpus=12-17 -numa node,

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

2020-05-07 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 v5 00/14] LUKS: encryption slot management using amend interface

2020-05-07 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 v5 01/14] qcrypto/core: add generic infrastructure for crypto options amendment

2020-05-07 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 v5 09/14] iotests: filter few more luks specific create options

2020-05-07 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 v5 05/14] block/amend: refactor qcow2 amend options

2020-05-07 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 v5 10/14] iotests: qemu-img tests for luks key management

2020-05-07 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 v5 02/14] qcrypto/luks: implement encryption key management

2020-05-07 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

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

2020-05-07 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 v5 13/14] block/qcow2: implement blockdev-amend

2020-05-07 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 v5 07/14] block/crypto: implement the encryption key management

2020-05-07 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 v5 04/14] block/amend: separate amend and create options for qemu-img

2020-05-07 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 v5 08/14] block/qcow2: extend qemu-img amend interface with crypto options

2020-05-07 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 v5 12/14] block/crypto: implement blockdev-amend

2020-05-07 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 dbc3ab25f4..86b621

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

2020-05-07 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 v5 14/14] iotests: add tests for blockdev-amend

2020-05-07 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 v2] Fix stack smashing when handling PR_GET_PDEATHSIG

2020-05-07 Thread Stephen Long
The bug was triggered by the following code on aarch64-linux-user: #include #include int main(void) { int PDeathSig = 0; if (prctl(PR_GET_PDEATHSIG, &PDeathSig) == 0 && PDeathSig == SIGKILL) prctl(PR_GET_PDEATHSIG, 0); return (PDeathSig == SIGKILL); } Signed-off-by: Stephen Long Sig

Re: backing chain & block status & filters

2020-05-07 Thread Max Reitz
On 28.04.20 16:51, Vladimir Sementsov-Ogievskiy wrote: > 28.04.2020 14:08, Max Reitz wrote: >> On 28.04.20 10:55, Vladimir Sementsov-Ogievskiy wrote: >>> Hi! >>> >>> I wanted to resend my "[PATCH 0/4] fix & merge block_status_above and >>> is_allocated_above", and returned to all the inconsistencie

[PATCH v5 09/15] acpi: move aml builder code for i8042 (kbd+mouse) device

2020-05-07 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Igor Mammedov --- hw/i386/acpi-build.c | 39 --- hw/input/pckbd.c | 31 +++ 2 files changed, 31 insertions(+), 39 deletions(-) diff --git a/hw/i386/

[PATCH v5 03/15] acpi: rtc: use a single crs range

2020-05-07 Thread Gerd Hoffmann
Use a single io range for _CRS instead of two, following what real hardware does. Signed-off-by: Gerd Hoffmann --- hw/rtc/mc146818rtc.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c index 2104e0aa3b14..ab0cc59973b3 100644

[PATCH v5 01/15] qtest: allow DSDT acpi table changes

2020-05-07 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- tests/qtest/bios-tables-test-allowed-diff.h | 17 + 1 file changed, 17 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8bf4..6a052c50447a 100644 --- a/tests/qtest/

[PATCH v5 04/15] acpi: serial: don't use _STA method

2020-05-07 Thread Gerd Hoffmann
The _STA method dates back to the days where we had a static DSDT. The device is listed in the DSDT table unconditionally and the _STA method checks a bit in the isa bridge pci config space to figure whenever a given is isa device is present or not, then evaluates to 0x0f (present) or 0x00 (absent

  1   2   3   4   >