Re: [PATCH 1/1] hw/ide/core: terminate in-flight DMA on IDE bus reset

2023-10-02 Thread John Snow
On Mon, Oct 2, 2023 at 5:09 AM Simon Rowe wrote: > > On Thursday, 28 September 2023 Fiona Ebner wrote: > > > > > AFAICT, yes, because the DMA callback is invoked before resetting the > > state now. But not 100% sure if it can't be triggered in some other way, > > maybe Simon knows more? I don't

Re: [PULL 00/13] Migration 20231002 patches

2023-10-02 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: Automatic block overlay creation with freeing the write lock

2023-10-02 Thread Rafael Pizarro Solar
The issue has been solved. The solution of waiting for QEMU to load the base image passed as argument, then create the overlay with `qmp_blockdev_snapshot_sync` didn't work. Instead, we first create a new overlay with `bdrv_image_create`, with backing file the original base image passed as

Re: [PATCH 3/3] hw/nvme: Add SPDM over DOE support

2023-10-02 Thread Lukas Wunner
On Mon, Oct 02, 2023 at 11:36:25AM +, Yao, Jiewen wrote: > Comment on subjectAltName. > > PCI-SIG realized that it may cause problem for certain device > and decided to remove such requirement in future ECN. > I don't think that is absolutely needed. We have to follow what's in the spec. We

Re: [PATCH 3/3] hw/nvme: Add SPDM over DOE support

2023-10-02 Thread Lukas Wunner
On Fri, Sep 15, 2023 at 09:27:23PM +1000, Alistair Francis wrote: > --- /dev/null > +++ b/docs/specs/spdm.rst > @@ -0,0 +1,56 @@ > +== > +QEMU Security Protocols and Data Models (SPDM) Support >

RE: [PATCH 3/3] hw/nvme: Add SPDM over DOE support

2023-10-02 Thread Yao, Jiewen
Comment on subjectAltName. PCI-SIG realized that it may cause problem for certain device and decided to remove such requirement in future ECN. I don't think that is absolutely needed. > -Original Message- > From: Lukas Wunner > Sent: Monday, October 2, 2023 4:48 PM > To: Alistair

[PULL 08/13] migration: Don't abuse qemu_file transferred for RDMA

2023-10-02 Thread Juan Quintela
Just create a variable for it, the same way that multifd does. This way it is safe to use for other thread, etc, etc. Reviewed-by: Leonardo Bras Signed-off-by: Juan Quintela Message-Id: <20230515195709.63843-11-quint...@redhat.com> --- migration/migration-stats.h | 4

[PULL 05/13] migration-test: simplify shmem_opts handling

2023-10-02 Thread Juan Quintela
Reviewed-by: Peter Xu Message-ID: <20230608224943.3877-4-quint...@redhat.com> Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index

[PULL 13/13] migration/rdma: Simplify the function that saves a page

2023-10-02 Thread Juan Quintela
When we sent a page through QEMUFile hooks (RDMA) there are three posiblities: - We are not using RDMA. return RAM_SAVE_CONTROL_DELAYED and control_save_page() returns false to let anything else to proceed. - There is one error but we are using RDMA. Then we return a negative value,

[PULL 11/13] migration/rdma: Don't use imaginary transfers

2023-10-02 Thread Juan Quintela
RDMA protocol is completely asynchronous, so in qemu_rdma_save_page() they "invent" that a byte has been transferred. And then they call qemu_file_credit_transfer() and ram_transferred_add() with that byte. Just remove that calls as nothing has been sent. Reviewed-by: Leonardo Bras

[PULL 12/13] migration: Remove unused qemu_file_credit_transfer()

2023-10-02 Thread Juan Quintela
After this change, nothing abuses QEMUFile to account for data transferrefd during migration. Reviewed-by: Leonardo Bras Signed-off-by: Juan Quintela Message-Id: <20230515195709.63843-15-quint...@redhat.com> --- migration/qemu-file.h | 8 migration/qemu-file.c | 5 - 2 files

[PULL 07/13] migration: Use qemu_file_transferred_noflush() for block migration.

2023-10-02 Thread Juan Quintela
We only care about the amount of bytes transferred. Flushing is done by the system somewhere else. Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20230530183941.7223-4-quint...@redhat.com> Signed-off-by: Juan Quintela --- migration/block.c | 4 ++-- 1 file changed, 2

[PULL 09/13] migration/RDMA: It is accounting for zero/normal pages in two places

2023-10-02 Thread Juan Quintela
Remove the one in control_save_page(). Reviewed-by: Leonardo Bras Signed-off-by: Juan Quintela Message-Id: <20230515195709.63843-12-quint...@redhat.com> --- migration/ram.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 9040d66e61..f2c5b07919

[PULL 01/13] migration-test: Create kvm_opts

2023-10-02 Thread Juan Quintela
So arch_dirty_ring option becomes one option like the others. Reviewed-by: Peter Xu Message-ID: <20230608224943.3877-8-quint...@redhat.com> Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git

[PULL 06/13] migration: Refactor repeated call of yank_unregister_instance

2023-10-02 Thread Juan Quintela
From: Tejus GK In the function qmp_migrate(), yank_unregister_instance() gets called twice which isn't required. Hence, refactoring it so that it gets called during the local_error cleanup. Reviewed-by: Daniel P. Berrangé Reviewed-by: Juan Quintela Acked-by: Peter Xu Signed-off-by: Tejus GK

[PULL 02/13] migration-test: bootpath is the same for all tests and for all archs

2023-10-02 Thread Juan Quintela
So just make it a global variable. Reviewed-by: Peter Xu Message-ID: <20230608224943.3877-9-quint...@redhat.com> Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/qtest/migration-test.c

[PULL 03/13] migration-test: Add bootfile_create/delete() functions

2023-10-02 Thread Juan Quintela
The bootsector code is read only from the guest (otherwise we are going to have problems with it being read from both source and destination). Create a single copy for all the tests. Reviewed-by: Peter Xu Message-ID: <20230608224943.3877-10-quint...@redhat.com> Signed-off-by: Juan Quintela ---

[PULL 10/13] migration/rdma: Remove QEMUFile parameter when not used

2023-10-02 Thread Juan Quintela
Reviewed-by: Leonardo Bras Signed-off-by: Juan Quintela Message-Id: <20230515195709.63843-13-quint...@redhat.com> --- migration/rdma.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 2a3c784328..9007261b5c

[PULL 04/13] migration-test: dirtylimit checks for x86_64 arch before

2023-10-02 Thread Juan Quintela
So no need to assert we are in x86_64. Once there, refactor the function to remove useless variables. Reviewed-by: Peter Xu Message-ID: <20230608224943.3877-11-quint...@redhat.com> Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 5 + 1 file changed, 1 insertion(+), 4

[PULL 00/13] Migration 20231002 patches

2023-10-02 Thread Juan Quintela
The following changes since commit 36e9aab3c569d4c9ad780473596e18479838d1aa: migration: Move return path cleanup to main migration thread (2023-09-27 13:58:02 -0400) are available in the Git repository at: https://gitlab.com/juan.quintela/qemu.git tags/migration-20231002-pull-request

Re: [PATCH 1/1] hw/ide/core: terminate in-flight DMA on IDE bus reset

2023-10-02 Thread Simon Rowe
On Thursday, 28 September 2023 Fiona Ebner wrote: > AFAICT, yes, because the DMA callback is invoked before resetting the > state now. But not 100% sure if it can't be triggered in some other way, > maybe Simon knows more? I don't have a reproducer for the CVE either, > but the second patch

[PATCH 07/19] parallels: Create used bitmap even if checks needed

2023-10-02 Thread Alexander Ivanov
All the checks were fixed to work with used bitmap. Create used bitmap in parallels_open() even if need_check is true. Signed-off-by: Alexander Ivanov --- block/parallels.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH 14/19] parallels: Truncate images on the last used cluster

2023-10-02 Thread Alexander Ivanov
On an image closing there can be unused clusters in the end of the image. Truncate these clusters and update data_end field. Signed-off-by: Alexander Ivanov --- block/parallels.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/block/parallels.c

[PATCH 08/19] parallels: Make mark_used() and mark_unused() global functions

2023-10-02 Thread Alexander Ivanov
We will need these functions in parallels-ext.c too. Let them be global functions parallels_mark_used() and parallels_mark_unused(). Signed-off-by: Alexander Ivanov --- block/parallels.c | 22 -- block/parallels.h | 5 + 2 files changed, 17 insertions(+), 10

[PATCH 09/19] parallels: Add dirty bitmaps saving

2023-10-02 Thread Alexander Ivanov
Now dirty bitmaps can be loaded but there is no their saving. Add code for dirty bitmap storage. Signed-off-by: Alexander Ivanov --- block/parallels-ext.c | 167 ++ block/parallels.c | 16 +++- block/parallels.h | 5 ++ 3 files changed, 186

[PATCH 03/19] parallels: Move host clusters allocation to a separate function

2023-10-02 Thread Alexander Ivanov
For parallels images extensions we need to allocate host clusters without any connection to BAT. Move host clusters allocation code to allocate_host_clusters(). Signed-off-by: Alexander Ivanov --- block/parallels.c | 124 -- block/parallels.h | 4 ++

[PATCH 17/19] tests: Add parallels images support to test 165

2023-10-02 Thread Alexander Ivanov
Use a different bitmap name for parallels images because their has own ID format, and can't contain an arbitrary string. Replace image reopen by shutdown/launch VM because parallels images doesn't support reopen. Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/165 | 42

[PATCH 19/19] tests: Add parallels format support to image-fleecing

2023-10-02 Thread Alexander Ivanov
Use a different bitmap name for parallels images because their has own ID format, and can't contain an arbitrary string. Replace hardcoded 'qcow2' format to iotests.imgfmt. Add 'parallels' to supported formats. Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/tests/image-fleecing | 13

[PATCH 15/19] parallels: Remove unnecessary data_end field

2023-10-02 Thread Alexander Ivanov
Since we have used bitmap, field data_end in BDRVParallelsState is redundant and can be removed. Add parallels_data_end() helper and remove data_end handling. Signed-off-by: Alexander Ivanov --- block/parallels.c | 33 + block/parallels.h | 1 - 2 files

[PATCH 00/19] parallels: Add full dirty bitmap support

2023-10-02 Thread Alexander Ivanov
Parallels format driver: * make some preparation * add dirty bitmap saving * make dirty bitmap RW * fix broken checks * refactor leak check * add parallels format support to several tests Alexander Ivanov (19): parallels: Move inactivation code to a separate function parallels: Add

[PATCH 11/19] parallels: Handle L1 entries equal to one

2023-10-02 Thread Alexander Ivanov
If all the bits in a dirty bitmap cluster are ones, the cluster shouldn't be written. Instead the corresponding L1 entry should be set to 1. Check if all bits in a memory region are ones and set 1 to L1 entries corresponding clusters filled with ones. Signed-off-by: Alexander Ivanov ---

[PATCH 18/19] tests: Turned on 256, 299, 304 and block-status-cache for parallels format

2023-10-02 Thread Alexander Ivanov
These tests pass with parallels format. Add parallels to supporting formats for these tests. Signed-off-by: Alexander Ivanov --- tests/qemu-iotests/256 | 2 +- tests/qemu-iotests/299 | 2 +- tests/qemu-iotests/304 | 2 +-

[PATCH 06/19] parallels: Add a note about used bitmap in parallels_check_duplicate()

2023-10-02 Thread Alexander Ivanov
In parallels_check_duplicate() We use a bitmap for duplication detection. This bitmap is not related to used_bmap field in BDRVParallelsState. Add a comment about it to avoid confusion. Signed-off-by: Alexander Ivanov --- block/parallels.c | 5 - 1 file changed, 4 insertions(+), 1

[PATCH 16/19] parallels: Check unused clusters in parallels_check_leak()

2023-10-02 Thread Alexander Ivanov
Since we have used bitmap, leak check is useless. Transform parallels_truncate_unused_clusters() to parallels_check_unused_clusters() helper and use it in leak check. Signed-off-by: Alexander Ivanov --- block/parallels.c | 112 ++ 1 file changed, 63

[PATCH 10/19] parallels: Let image extensions work in RW mode

2023-10-02 Thread Alexander Ivanov
Now we support extensions saving and can let to work with them in read-write mode. Signed-off-by: Alexander Ivanov --- block/parallels-ext.c | 4 block/parallels.c | 17 - 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/block/parallels-ext.c

[PATCH 12/19] parallels: Make a loaded dirty bitmap persistent

2023-10-02 Thread Alexander Ivanov
After bitmap loading the bitmap is not persistent and is removed on image saving. Set bitmap persistence to true. Signed-off-by: Alexander Ivanov --- block/parallels-ext.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels-ext.c b/block/parallels-ext.c index

[PATCH 01/19] parallels: Move inactivation code to a separate function

2023-10-02 Thread Alexander Ivanov
We are going to add parallels image extensions storage and need a separate function for inactivation code. Signed-off-by: Alexander Ivanov --- block/parallels.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/block/parallels.c b/block/parallels.c

[PATCH 02/19] parallels: Add mark_unused() helper

2023-10-02 Thread Alexander Ivanov
Add a helper to set unused areas in used bitmap. Signed-off-by: Alexander Ivanov --- block/parallels.c | 17 + 1 file changed, 17 insertions(+) diff --git a/block/parallels.c b/block/parallels.c index d5b333d5a4..b5e19ff921 100644 --- a/block/parallels.c +++ b/block/parallels.c

[PATCH 05/19] parallels: Recreate used bitmap in parallels_check_leak()

2023-10-02 Thread Alexander Ivanov
In parallels_check_leak() file can be truncated. In this case the used bitmap would not comply to the file. Recreate the bitmap after file truncation. Signed-off-by: Alexander Ivanov --- block/parallels.c | 8 1 file changed, 8 insertions(+) diff --git a/block/parallels.c

[PATCH 04/19] parallels: Set data_end value in parallels_check_leak()

2023-10-02 Thread Alexander Ivanov
In parallels_check_leak() we change file size but don't correct data_end field of BDRVParallelsState structure. Fix it. Signed-off-by: Alexander Ivanov --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c index 3c69afa04b..e8d6d30fa5

[PATCH 13/19] parallels: Reverse a conditional in parallels_check_leak() to reduce indents

2023-10-02 Thread Alexander Ivanov
Let the function return a success code if a file size is not bigger than image_end_offset. Thus we can decrease indents in the next code block. Signed-off-by: Alexander Ivanov --- block/parallels.c | 72 +++ 1 file changed, 36 insertions(+), 36

Re: [PATCH 3/3] hw/nvme: Add SPDM over DOE support

2023-10-02 Thread Jonathan Cameron via
On Mon, 2 Oct 2023 09:15:58 +0200 Klaus Jensen wrote: > On Sep 15 21:27, Alistair Francis wrote: > > From: Wilfred Mallawa > > > > Setup Data Object Exchance (DOE) as an extended capability for the NVME > > controller and connect SPDM to it (CMA) to it. > > > > Signed-off-by: Wilfred Mallawa

Re: [PATCH 1/1] block: improve alignment detection and fix 271 test

2023-10-02 Thread Denis V. Lunev
On 9/7/23 23:53, Denis V. Lunev wrote: Unfortunately 271 IO test is broken if started in non-cached mode. Commits commit a6b257a08e3d72219f03e461a52152672fec0612 Author: Nir Soffer Date: Tue Aug 13 21:21:03 2019 +0300 file-posix: Handle undetectable alignment and

Re: [PATCH 3/3] hw/nvme: Add SPDM over DOE support

2023-10-02 Thread Klaus Jensen
On Sep 15 21:27, Alistair Francis wrote: > From: Wilfred Mallawa > > Setup Data Object Exchance (DOE) as an extended capability for the NVME > controller and connect SPDM to it (CMA) to it. > > Signed-off-by: Wilfred Mallawa > Signed-off-by: Alistair Francis > --- > docs/specs/index.rst

Re: [PATCH v3 0/8] qemu-img: rebase: add compression support

2023-10-02 Thread Andrey Drobyshev
On 9/19/23 20:57, Andrey Drobyshev wrote: > v2 --> v3: > * Patch 3/8: fixed logic in the if statement, so that we align on blk >when blk_old_backing == NULL; > * Patch 4/8: comment fix; > * Patch 5/8: comment fix; dropped redundant "if (blk_new_backing)" >statements. > > v2: