Re: [PATCH 4/7] block/dirty-bitmap: Clean up local variable shadowing

2023-09-18 Thread Markus Armbruster
Kevin Wolf writes: > Am 31.08.2023 um 15:25 hat Markus Armbruster geschrieben: >> Local variables shadowing other local variables or parameters make the >> code needlessly hard to understand. Tracked down with -Wshadow=local. >> Clean up: delete inner declarations when they are actually

Re: [PATCH v3] target/riscv: update checks on writing pmpcfg for Smepmp

2023-09-18 Thread Himanshu Chauhan
> On 19-Sep-2023, at 10:51 AM, Alistair Francis wrote: > > On Tue, Sep 19, 2023 at 3:08 PM Chang Alvin wrote: >> >>> -Original Message- >> >>> From: Alistair Francis >> >>> Sent: Tuesday, September 19, 2023 12:42 PM >> >>> To: Alvin Che-Chia Chang(張哲嘉) >> >>> Cc:

Re: [PATCH 1/7] migration/rdma: Fix save_page method to fail on polling error

2023-09-18 Thread Markus Armbruster
Eric Blake writes: > On Thu, Aug 31, 2023 at 03:25:40PM +0200, Markus Armbruster wrote: >> qemu_rdma_save_page() reports polling error with error_report(), then >> succeeds anyway. This is because the variable holding the polling >> status *shadows* the variable the function returns. The

Re: [PATCH 05/52] migration/rdma: Consistently use uint64_t for work request IDs

2023-09-18 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > We use int instead of uint64_t in a few places. Change them to > uint64_t. > > This cleans up a comparison of signed qemu_rdma_block_for_wrid() > parameter @wrid_requested with unsigned @wr_id. Harmless, because the > actual arguments are

Re: [PATCH v3] target/riscv: update checks on writing pmpcfg for Smepmp

2023-09-18 Thread Alistair Francis
On Tue, Sep 19, 2023 at 3:08 PM Chang Alvin wrote: > > > -Original Message- > > > From: Alistair Francis > > > Sent: Tuesday, September 19, 2023 12:42 PM > > > To: Alvin Che-Chia Chang(張哲嘉) > > > Cc: qemu-ri...@nongnu.org; qemu-devel@nongnu.org; > > > alistair.fran...@wdc.com;

Re: [PATCH v3] target/riscv: update checks on writing pmpcfg for Smepmp

2023-09-18 Thread Chang Alvin
> -Original Message- > From: Alistair Francis > Sent: Tuesday, September 19, 2023 12:42 PM > To: Alvin Che-Chia Chang(張哲嘉) > Cc: qemu-ri...@nongnu.org; qemu-devel@nongnu.org; > alistair.fran...@wdc.com; ajo...@ventanamicro.com > Subject: Re: [PATCH v3] target/riscv: update checks

Re: [PATCH v5 16/20] linux-user/riscv: Add vdso

2023-09-18 Thread Alistair Francis
On Wed, Aug 30, 2023 at 9:17 AM Richard Henderson wrote: > > Signed-off-by: Richard Henderson Acked-by: Alistair Francis Alistair > --- > linux-user/riscv/vdso-asmoffset.h | 9 ++ > linux-user/elfload.c | 4 + > linux-user/riscv/signal.c | 8 ++ >

Re: Call for agenda for 2023-09-19 QEMU developers call

2023-09-18 Thread Elena Ufimtseva
On Tue, Sep 19, 2023 at 02:02:49AM +0200, Juan Quintela wrote: > Elena Ufimtseva wrote: > > Hello Juan, > > > > Not sure if this is worth its own topic, would be it possible to hear > > the community thoughts on the live migration series review/pull > > progress (atomics, zero page multifd etc..

Re: [PATCH v3] target/riscv: update checks on writing pmpcfg for Smepmp to version 1.0

2023-09-18 Thread Alistair Francis
On Fri, Sep 15, 2023 at 6:32 PM Alvin Chang wrote: > > Current checks on writing pmpcfg for Smepmp follows Smepmp version > 0.9.1. However, Smepmp specification has already been ratified, and > there are some differences between version 0.9.1 and 1.0. In this > commit we update the checks of

Re: [PATCH] target/riscv: pmp: Clear pmp/smepmp bits on reset

2023-09-18 Thread Alistair Francis
On Thu, Sep 7, 2023 at 4:25 PM Mayuresh Chitale wrote: > > As per the Priv and Smepmp specifications, certain bits such as the 'L' > bit of pmp entries and mseccfg.MML can only be cleared upon reset and it > is necessary to do so to allow 'M' mode firmware to correctly reinitialize > the

Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems

2023-09-18 Thread Ani Sinha
On Tue, Sep 19, 2023 at 9:20 AM Ani Sinha wrote: > > On Mon, Sep 18, 2023 at 9:28 PM David Hildenbrand wrote: > > > > On 18.09.23 17:56, Ani Sinha wrote: > > > On Mon, Sep 18, 2023 at 8:59 PM David Hildenbrand > > > wrote: > > >> > > >> On 18.09.23 17:22, Ani Sinha wrote: > > >>> On Mon, Sep

Re: [PATCH] disas/riscv: Fix the typo of inverted order of pmpaddr13 and pmpaddr14

2023-09-18 Thread Alistair Francis
On Thu, Sep 7, 2023 at 6:47 PM Alvin Chang wrote: > > Fix the inverted order of pmpaddr13 and pmpaddr14 in csr_name(). > > Signed-off-by: Alvin Chang Reviewed-by: Alistair Francis Alistair > --- > disas/riscv.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH v4] target/riscv: Clearing the CSR values at reset and syncing the MPSTATE with the host

2023-09-18 Thread Alistair Francis
On Wed, Sep 13, 2023 at 7:14 PM liguang.zhang <18622748...@163.com> wrote: > > From: "liguang.zhang" > > Fix the guest reboot error when using KVM > There are two issues when rebooting a guest using KVM > 1. When the guest initiates a reboot the host is unable to stop the vcpu > 2. When running a

Re: [PATCH v4] target/riscv: Clearing the CSR values at reset and syncing the MPSTATE with the host

2023-09-18 Thread Alistair Francis
On Wed, Sep 13, 2023 at 7:14 PM liguang.zhang <18622748...@163.com> wrote: > > From: "liguang.zhang" > > Fix the guest reboot error when using KVM > There are two issues when rebooting a guest using KVM > 1. When the guest initiates a reboot the host is unable to stop the vcpu > 2. When running a

Re: [PATCH v4] target/riscv: Clearing the CSR values at reset and syncing the MPSTATE with the host

2023-09-18 Thread Alistair Francis
On Wed, Sep 13, 2023 at 7:14 PM liguang.zhang <18622748...@163.com> wrote: > > From: "liguang.zhang" > > Fix the guest reboot error when using KVM > There are two issues when rebooting a guest using KVM > 1. When the guest initiates a reboot the host is unable to stop the vcpu > 2. When running a

Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems

2023-09-18 Thread Ani Sinha
On Mon, Sep 18, 2023 at 9:28 PM David Hildenbrand wrote: > > On 18.09.23 17:56, Ani Sinha wrote: > > On Mon, Sep 18, 2023 at 8:59 PM David Hildenbrand wrote: > >> > >> On 18.09.23 17:22, Ani Sinha wrote: > >>> On Mon, Sep 18, 2023 at 7:25 PM Ani Sinha wrote: > > 32-bit systems do not

Re: Call for agenda for 2023-09-19 QEMU developers call

2023-09-18 Thread Juan Quintela
Elena Ufimtseva wrote: > Hello Juan, > > Not sure if this is worth its own topic, would be it possible to hear > the community thoughts on the live migration series review/pull > progress (atomics, zero page multifd etc.. )? Seems like there are few > outstanding relevant patches. Hi If

Re: Call for agenda for 2023-09-19 QEMU developers call

2023-09-18 Thread Juan Quintela
Mark Burton wrote: > Seems like we’ve had a bit of a ’slower’ time in recent weeks - > presumably “summer time” - If I understand correctly, Linaro are not > going toe preset this week? > Maybe we should re-group in the next meeting, > > So I’m happy to have the meeting tomorrow if Linaro can

[PATCH v3 qemu 3/3] dump: Add command interface for kdump-raw formats

2023-09-18 Thread Stephen Brennan
The QMP dump API represents the dump format as an enumeration. Add three new enumerators, one for each supported kdump compression, each named "kdump-raw-*". For the HMP command line, rather than adding a new flag corresponding to each format, it seems more human-friendly to add a single flag

[PATCH v3 qemu 1/3] dump: Pass DumpState to write_ functions

2023-09-18 Thread Stephen Brennan
For the next patch, we need a reference to DumpState when writing data. Signed-off-by: Stephen Brennan --- dump/dump.c | 40 include/sysemu/dump.h | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dump/dump.c

[PATCH v3 qemu 0/3] Allow dump-guest-memory to output standard kdump format

2023-09-18 Thread Stephen Brennan
Hello all, This is the third version of the kdump patch series, the first and second revisions being visible at [1] and [2] respectively. You can see the history and motivation for the patch series described in the cover letter of [2]. Thank you for your continued feedback and review. Stephen

[PATCH v3 qemu 2/3] dump: Allow directly outputting raw kdump format

2023-09-18 Thread Stephen Brennan
The flattened format (currently output by QEMU) is used by makedumpfile only when it is outputting a vmcore to a file which is not seekable. The flattened format functions essentially as a set of instructions of the form "seek to the given offset, then write the given bytes out". The flattened

Re: [PATCH v4 2/3] i386: Explicitly ignore unsupported BUS_MCEERR_AO MCE on AMD guest

2023-09-18 Thread William Roche
Hi John, I'd like to put the emphasis on the fact that ignoring the SRAO error for a VM is a real problem at least for a specific (rare) case I'm currently working on: The VM migration. Context: - In the case of a poisoned page in the VM address space, the migration can't read it and will skip

Re: [PATCH 2/3] hw/mem/cxl_type3: Add missing copyright and license notice

2023-09-18 Thread Warner Losh
On Mon, Sep 18, 2023 at 4:04 PM Jonathan Cameron via wrote: > This has been missing from the start. Assume it should match > with cxl/cxl-component-utils.c as both were part of early > postings from Ben. > > Suggested-by: Philippe Mathieu-Daudé > Signed-off-by: Jonathan Cameron > --- >

Re: [PATCH 2/3] hw/mem/cxl_type3: Add missing copyright and license notice

2023-09-18 Thread Ira Weiny
Jonathan Cameron wrote: > On Mon, 18 Sep 2023 17:31:38 +0100 > Peter Maydell wrote: > > > On Mon, 18 Sept 2023 at 16:04, Jonathan Cameron > > wrote: > > > > > > This has been missing from the start. Assume it should match > > > with cxl/cxl-component-utils.c as both were part of early > > >

Re: Call for agenda for 2023-09-19 QEMU developers call

2023-09-18 Thread Elena Ufimtseva
Hello Juan, Not sure if this is worth its own topic, would be it possible to hear the community thoughts on the live migration series review/pull progress (atomics, zero page multifd etc.. )? Seems like there are few outstanding relevant patches. Thank you!

Re: [PULL 00/17] Net patches

2023-09-18 Thread Ilya Maximets
On 9/14/23 10:13, Daniel P. Berrangé wrote: > On Wed, Sep 13, 2023 at 08:46:42PM +0200, Ilya Maximets wrote: >> On 9/8/23 16:15, Daniel P. Berrangé wrote: >>> On Fri, Sep 08, 2023 at 04:06:35PM +0200, Ilya Maximets wrote: On 9/8/23 14:15, Daniel P. Berrangé wrote: > On Fri, Sep 08, 2023

Re: [PATCH 18/52] migration/rdma: Fix qemu_rdma_broken_ipv6_kernel() to set error

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > qemu_rdma_resolve_host() and qemu_rdma_dest_init() try addresses until > they find on that works. If none works, they return the first Error > set by qemu_rdma_broken_ipv6_kernel(), or else return a generic one. > > qemu_rdma_broken_ipv6_kernel() neglects to set an

Re: [PATCH 16/52] migration/rdma: Fix io_writev(), io_readv() methods to obey contract

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > QIOChannelClass methods qio_channel_rdma_readv() and > qio_channel_rdma_writev() violate their method contract when > rdma->error_state is non-zero: > > 1. They return whatever is in rdma->error_state then. Only -1 will be >fine. -2 will be misinterpreted as

Re: [PATCH 17/52] migration/rdma: Replace dangerous macro CHECK_ERROR_STATE()

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > Hiding return statements in macros is a bad idea. Use a function > instead, and open code the return part. > > Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas

Re: [PULL 00/28] Block layer patches

2023-09-18 Thread Stefan Hajnoczi
Hi Kevin, I believe that my own commit "block-coroutine-wrapper: use qemu_get_current_aio_context()" breaks this test. The failure is non-deterministic (happens about 1 out of 4 runs). It seems the job hangs and the test times out in vm.run_job('job1', wait=5.0). I haven't debugged it yet but

Re: [PATCH 15/52] migration/rdma: Ditch useless numeric error codes in error messages

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > Several error messages include numeric error codes returned by failed > functions: > > * ibv_poll_cq() returns an unspecified negative value. Useless. > > * rdma_accept and rmda_get_cm_event() return -1. Useless. > > * qemu_rdma_poll() returns either -1 or an

Re: [PATCH 2/3] hw/mem/cxl_type3: Add missing copyright and license notice

2023-09-18 Thread Dave Jiang
On 9/18/23 10:00, Jonathan Cameron wrote: > On Mon, 18 Sep 2023 17:31:38 +0100 > Peter Maydell wrote: > >> On Mon, 18 Sept 2023 at 16:04, Jonathan Cameron >> wrote: >>> >>> This has been missing from the start. Assume it should match >>> with cxl/cxl-component-utils.c as both were part of

[PATCH 12/22] parallels: collect bitmap of used clusters at open

2023-09-18 Thread Denis V. Lunev
If the operation is failed, we need to check image consistency if the problem is not about memory allocation. Bitmap adjustments in allocate_cluster are not performed yet. They worth to be separate. This was proven useful during debug of this series. Kept as is for future bissecting. It should

Re: [PATCH 3/3] tests: extend test 131 to cover availability of the write-zeroes

2023-09-18 Thread Denis V. Lunev
On 9/18/23 20:00, Denis V. Lunev wrote: This patch contains test which minimally tests write-zeroes on top of working discard. The following checks are added: * write 2 clusters, write-zero to the first allocated cluster * write 2 cluster, write-zero to the half the first allocated cluster

[PATCH 16/22] parallels: update used bitmap in allocate_cluster

2023-09-18 Thread Denis V. Lunev
We should extend the bitmap if the file is extended and set the bit in the image used bitmap once the cluster is allocated. Sanity check at that moment also looks like a good idea. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 14 ++ 1 file

[PATCH 09/22] tests: ensure that image validation will not cure the corruption

2023-09-18 Thread Denis V. Lunev
Since commit cfce1091d55322789582480798a891cbaf66924e Author: Alexander Ivanov Date: Tue Jul 18 12:44:29 2023 +0200 parallels: Image repairing in parallels_open() there is a potential pit fall with calling qemu-io -c "read" The image is opened in read-write mode and thus

[PATCH 22/22] tests: extend test 131 to cover availability of the write-zeroes

2023-09-18 Thread Denis V. Lunev
This patch contains test which minimally tests write-zeroes on top of working discard. The following checks are added: * write 2 clusters, write-zero to the first allocated cluster * write 2 cluster, write-zero to the half the first allocated cluster Signed-off-by: Denis V. Lunev Reviewed-by:

[PATCH 02/22] parallels: mark driver as supporting CBT

2023-09-18 Thread Denis V. Lunev
Parallels driver indeed support Parallels Dirty Bitmap Feature in read-only mode. The patch adds bdrv_supports_persistent_dirty_bitmap() callback which always return 1 to indicate that. This will allow to copy CBT from Parallels image with qemu-img. Note: read-write support is signalled through

[PATCH 13/22] tests: fix broken deduplication check in parallels format test

2023-09-18 Thread Denis V. Lunev
Original check is broken as supposed reading from 2 different clusters results in read from the same file offset twice. This is definitely wrong. We should be sure that * the content of both clusters is correct after repair * clusters are at the different offsets after repair In order to check

[PATCH 04/22] parallels: invent parallels_opts_prealloc() helper to parse prealloc opts

2023-09-18 Thread Denis V. Lunev
This patch creates above mentioned helper and moves its usage to the beginning of parallels_open(). This simplifies parallels_open() a bit. The patch also ensures that we store prealloc_size on block driver state always in sectors. This makes code cleaner and avoids wrong opinion at the

[PATCH 01/22] parallels: fix formatting in bdrv_parallels initialization

2023-09-18 Thread Denis V. Lunev
Old code is ugly and contains tabulations. There are no functional changes in this patch. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git

[PATCH 10/22] parallels: fix broken parallels_check_data_off()

2023-09-18 Thread Denis V. Lunev
Once we have repaired data_off field in the header we should update s->data_start which is calculated on the base of it. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c

[PATCH 06/22] parallels: return earlier from parallels_open() function on error

2023-09-18 Thread Denis V. Lunev
At the beginning of the function we can return immediately until we really allocate s->header. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/block/parallels.c

[PATCH 03/22] parallels: fix memory leak in parallels_open()

2023-09-18 Thread Denis V. Lunev
We should free opts allocated through qemu_opts_create() at the end. Signed-off-by: Denis V. Lunev --- block/parallels.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/parallels.c b/block/parallels.c index 428f72de1c..af7be427c9 100644 --- a/block/parallels.c +++ b/block/parallels.c

[PATCH 07/22] parallels: refactor path when we need to re-check image in parallels_open

2023-09-18 Thread Denis V. Lunev
More conditions follows thus the check should be more scalable. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH 14/22] tests: test self-cure of parallels image with duplicated clusters

2023-09-18 Thread Denis V. Lunev
The test is quite similar with the original one for duplicated clusters. There is the only difference in the operation which should fix the image. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- tests/qemu-iotests/tests/parallels-checks | 36 +++

[PATCH 21/22] parallels: naive implementation of parallels_co_pwrite_zeroes

2023-09-18 Thread Denis V. Lunev
The zero flag is missed in the Parallels format specification. We can resort to discard if we have no backing file. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/parallels.c

[PATCH 19/22] parallels: naive implementation of parallels_co_pdiscard

2023-09-18 Thread Denis V. Lunev
* Discarding with backing stores is not supported by the format. * There is no buffering/queueing of the discard operation. * Only operations aligned to the cluster are supported. Signed-off-by: Denis V. Lunev --- block/parallels.c | 46 ++ 1 file

[PATCH 17/22] parallels: naive implementation of allocate_clusters with used bitmap

2023-09-18 Thread Denis V. Lunev
The access to the bitmap is not optimized completely. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 51 --- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/block/parallels.c b/block/parallels.c

[PATCH 11/22] parallels: add test which will validate data_off fixes through repair

2023-09-18 Thread Denis V. Lunev
We have only check through self-repair and that proven to be not enough. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- tests/qemu-iotests/tests/parallels-checks | 17 + tests/qemu-iotests/tests/parallels-checks.out | 18 ++ 2 files changed,

[PATCH 15/22] parallels: accept multiple clusters in mark_used()

2023-09-18 Thread Denis V. Lunev
This would be useful in the next patch in allocate_clusters(). This change would not imply serious performance drawbacks as usually image is full of data or are at the end of the bitmap. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 18 ++

[PATCH 05/22] parallels: return earler in fail_format branch in parallels_open()

2023-09-18 Thread Denis V. Lunev
We do not need to perform any deallocation/cleanup if wrong format is detected. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index

[PATCH 08/22] parallels: create mark_used() helper which sets bit in used bitmap

2023-09-18 Thread Denis V. Lunev
This functionality is used twice already and next patch will add more code with it. Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/block/parallels.c

[PATCH 18/22] parallels: improve readability of allocate_clusters

2023-09-18 Thread Denis V. Lunev
Replace 'space' representing the amount of data to preallocate with 'bytes'. Rationale: * 'space' at each place is converted to bytes * the unit is more close to the variable name Signed-off-by: Denis V. Lunev Reviewed-by: Alexander Ivanov --- block/parallels.c | 13 + 1 file

[PATCH 20/22] tests: extend test 131 to cover availability of the discard operation

2023-09-18 Thread Denis V. Lunev
This patch contains test which minimally tests discard and new cluster allocation logic. The following checks are added: * write 2 clusters, discard the first allocated * write another cluster, check that the hole is filled * write 2 clusters, discard the first allocated, write 1 cluster at

[PATCH v2 00/22] implement discard operation for Parallels images

2023-09-18 Thread Denis V. Lunev
This series introduces new block allocator scheme into unused data blocks inside the image first and only after that extends the file. On top of that naive implementation of discard and write-zeroes (through the discard) is added. There are also a bunch of bugs revealed in the code during the

[PATCH 3/3] tests: extend test 131 to cover availability of the write-zeroes

2023-09-18 Thread Denis V. Lunev
This patch contains test which minimally tests write-zeroes on top of working discard. The following checks are added: * write 2 clusters, write-zero to the first allocated cluster * write 2 cluster, write-zero to the half the first allocated cluster Signed-off-by: Denis V. Lunev Reviewed-by:

Re: [PATCH v2 16/18] hw/sm501: allow compiling without PIXMAN

2023-09-18 Thread BALATON Zoltan
On Mon, 18 Sep 2023, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Drop the "x-pixman" property and use fallback path in such case. Signed-off-by: Marc-André Lureau --- hw/display/sm501.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v1 00/22] vfio: Adopt iommufd

2023-09-18 Thread Jason Gunthorpe
On Mon, Sep 18, 2023 at 02:23:48PM +0200, Cédric Le Goater wrote: > On 9/18/23 13:51, Jason Gunthorpe wrote: > > On Fri, Sep 15, 2023 at 02:42:48PM +0200, Cédric Le Goater wrote: > > > On 8/30/23 12:37, Zhenzhong Duan wrote: > > > > Hi All, > > > > > > > > As the kernel side iommufd cdev and hot

Re: [PULL 00/19] crypto: Provide clmul.h and host accel

2023-09-18 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: [PATCH v2 qemu 3/3] dump: Add qmp argument "reassembled"

2023-09-18 Thread Daniel P . Berrangé
On Mon, Sep 18, 2023 at 10:34:30AM -0700, Stephen Brennan wrote: > Daniel P. Berrangé writes: > > # > > # @DumpGuestMemoryFormat: > > # > > # An enumeration of guest-memory-dump's format. > > # > > # @elf: elf format > > # > > # @kdump-zlib: makedumpfile flattened, kdump-compressed format with >

Re: [PATCH 2/3] hw/mem/cxl_type3: Add missing copyright and license notice

2023-09-18 Thread Peter Maydell
On Mon, 18 Sept 2023 at 18:26, Dave Jiang wrote: > > > > On 9/18/23 10:00, Jonathan Cameron wrote: > > On Mon, 18 Sep 2023 17:31:38 +0100 > > Peter Maydell wrote: > > > >> On Mon, 18 Sept 2023 at 16:04, Jonathan Cameron > >> wrote: > >>> > >>> This has been missing from the start. Assume it

Re: [PATCH 14/52] migration/rdma: Use bool for two RDMAContext flags

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > @error_reported and @received_error are flags. The latter is even > assigned bool true. Change them from int to bool. > > Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas

[PATCH v4 1/1] cxl/vendor: SK hynix Niagara Multi-Headed SLD Device

2023-09-18 Thread Gregory Price
Create a new device to emulate the SK hynix Niagara MHSLD platform. This device has custom CCI commands that allow for applying isolation to each memory block between hosts. This enables an early form of dynamic capacity, whereby the NUMA node maps the entire region, but the host is responsible

[PATCH v4 0/1] Niagara MHSLD

2023-09-18 Thread Gregory Price
v4 update: Kconfig and meson fixes Since Niagara uses , it presently can only be built for linux. Also addings missing Kconfig files and options to turn it off, and turns it off by default if VENDOR or CXL_MEM_DEVICE are turned off. Gregory Price (1): cxl/vendor: SK hynix Niagara Multi-Headed

Re: [PATCH 13/52] migration/rdma: Make qemu_rdma_buffer_mergable() return bool

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > qemu_rdma_buffer_mergable() is semantically a predicate. It returns > int 0 or 1. Return bool instead. > > Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas

Re: [PATCH 12/52] migration/rdma: Drop qemu_rdma_search_ram_block() error handling

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > qemu_rdma_search_ram_block() can't fail. Return void, and drop the > unreachable error handling. > > Signed-off-by: Markus Armbruster > --- > migration/rdma.c | 22 -- > 1 file changed, 8 insertions(+), 14 deletions(-) > > diff --git

Re: [PATCH v2 qemu 3/3] dump: Add qmp argument "reassembled"

2023-09-18 Thread Stephen Brennan
Daniel P. Berrangé writes: > On Wed, Sep 13, 2023 at 06:03:15PM -0700, Stephen Brennan wrote: >> This can be used from QMP command line as "-R" to mirror the >> corresponding flag for makedumpfile. This enables the kdump_reassembled >> flag introduced in the previous patch. >> >> Signed-off-by:

Re: [PATCH 11/52] migration/rdma: Drop rdma_add_block() error handling

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > rdma_add_block() can't fail. Return void, and drop the unreachable > error handling. > > Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas

[PATCH 2/8] migration: Fix possible race when setting rp_state.error

2023-09-18 Thread Fabiano Rosas
We don't need to set the rp_state.error right after a shutdown because qemu_file_shutdown() always sets the QEMUFile error, so the return path thread would have seen it and set the rp error itself. Setting the error outside of the thread is also racy because the thread could clear it after we set

[PATCH 4/8] migration: Fix possible race when shutting down to_dst_file

2023-09-18 Thread Fabiano Rosas
It's not safe to call qemu_file_shutdown() on the to_dst_file without first checking for the file's presence under the lock. The cleanup of this file happens at postcopy_pause() and migrate_fd_cleanup() which are not necessarily running in the same thread as migrate_fd_cancel(). Reviewed-by:

[PATCH 6/8] migration: Consolidate return path closing code

2023-09-18 Thread Fabiano Rosas
We'll start calling the await_return_path_close_on_source() function from other parts of the code, so move all of the related checks and tracepoints into it. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration.c | 29 ++--- 1 file changed, 14

[PATCH 8/8] migration: Move return path cleanup to main migration thread

2023-09-18 Thread Fabiano Rosas
Now that the return path thread is allowed to finish during a paused migration, we can move the cleanup of the QEMUFiles to the main migration thread. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-)

[PATCH 0/8] migration fixes

2023-09-18 Thread Fabiano Rosas
This series contains fixes for the two currently know failures that show up in migration tests plus a set of fixes for some theoretical race conditions around QEMUFile handling. Patch 1 addresses the issue found in the postcopy/preempt/plain test:

[PATCH 1/8] migration: Fix race that dest preempt thread close too early

2023-09-18 Thread Fabiano Rosas
From: Peter Xu We hit intermit CI issue on failing at migration-test over the unit test preempt/plain: qemu-system-x86_64: Unable to read from socket: Connection reset by peer Memory content inconsistency at 5b43000 first_byte = bd last_byte = bc current = 4f hit_edge = 1 **

[PATCH 7/8] migration: Replace the return path retry logic

2023-09-18 Thread Fabiano Rosas
Replace the return path retry logic with finishing and restarting the thread. This fixes a race when resuming the migration that leads to a segfault. Currently when doing postcopy we consider that an IO error on the return path file could be due to a network intermittency. We then keep the thread

Deadlock with SATA CD I/O and eject

2023-09-18 Thread John Levon
Observed with base of qemu 6.2.0, but from code inspection it looks to me like it's still current in upstream master. Apologies if I have missed a fix in this area. Symptom: run a UEFI-booted SATA CD Windows installer. When it hits "Loading files.." screen, run an eject e.g. virsh

[PATCH 5/8] migration: Remove redundant cleanup of postcopy_qemufile_src

2023-09-18 Thread Fabiano Rosas
This file is owned by the return path thread which is already doing cleanup. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas --- migration/migration.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 6e09463466..4372b0fbbf 100644

[PATCH 3/8] migration: Fix possible races when shutting down the return path

2023-09-18 Thread Fabiano Rosas
We cannot call qemu_file_shutdown() on the return path file without taking the file lock. The return path thread could be running it's cleanup code and have just cleared the from_dst_file pointer. Checking ms->to_dst_file for errors could also race with migrate_fd_cleanup() which clears the

Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems

2023-09-18 Thread Michael S. Tsirkin
On Mon, Sep 18, 2023 at 07:40:45PM +0530, Ani Sinha wrote: > On Mon, Sep 18, 2023 at 7:31 PM Michael S. Tsirkin wrote: > > > > On Mon, Sep 18, 2023 at 07:24:48PM +0530, Ani Sinha wrote: > > > 32-bit systems do not have a reserved memory for hole64 but they may have > > > a > > > reserved memory

Re: [PATCH 2/3] hw/mem/cxl_type3: Add missing copyright and license notice

2023-09-18 Thread Dave Jiang
On 9/18/23 10:00, Jonathan Cameron wrote: > On Mon, 18 Sep 2023 17:31:38 +0100 > Peter Maydell wrote: > >> On Mon, 18 Sept 2023 at 16:04, Jonathan Cameron >> wrote: >>> >>> This has been missing from the start. Assume it should match >>> with cxl/cxl-component-utils.c as both were part of

Re: [PATCH 10/52] migration/rdma: Eliminate error_propagate()

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > When all we do with an Error we receive into a local variable is > propagating to somewhere else, we can just as well receive it there > right away. > > Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas

Re: [PATCH 2/3] qga: Add optional stream-output argument to guest-exec

2023-09-18 Thread Daniel Xu
Hi Daniel, On Mon, Sep 18, 2023 at 04:14:47PM +0100, Daniel P. Berrangé wrote: > On Mon, Sep 18, 2023 at 04:54:22AM -0600, Daniel Xu wrote: > > Currently, commands run through guest-exec are "silent" until they > > finish running. This is fine for short lived commands. But for commands > > that

Re: [PATCH 09/52] migration/rdma: Put @errp parameter last

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > include/qapi/error.h demands: > > * - Functions that use Error to report errors have an Error **errp > * parameter. It should be the last parameter, except for functions > * taking variable arguments. > > qemu_rdma_connect() does not conform. Clean it up. > >

Re: [PATCH 08/52] migration/rdma: Fix qemu_rdma_accept() to return failure on errors

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > qemu_rdma_accept() returns 0 in some cases even when it didn't > complete its job due to errors. Impact is not obvious. I figure the > caller will soon fail again with a misleading error message. > > Fix it to return -1 on any failure. > > Signed-off-by: Markus

Re: [PATCH 07/52] migration/rdma: Give qio_channel_rdma_source_funcs internal linkage

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas

Re: [PATCH 06/52] migration/rdma: Clean up two more harmless signed vs. unsigned issues

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > qemu_rdma_exchange_get_response() compares int parameter @expecting > with uint32_t head->type. Actual arguments are non-negative > enumeration constants, RDMAControlHeader uint32_t member type, or > qemu_rdma_exchange_recv() int parameter expecting. Actual

Re: [PATCH 05/52] migration/rdma: Consistently use uint64_t for work request IDs

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > We use int instead of uint64_t in a few places. Change them to > uint64_t. > > This cleans up a comparison of signed qemu_rdma_block_for_wrid() > parameter @wrid_requested with unsigned @wr_id. Harmless, because the > actual arguments are non-negative enumeration

Re: [PATCH 04/52] migration/rdma: Drop fragile wr_id formatting

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > wrid_desc[] uses 4001 pointers to map four integer values to strings. > > print_wrid() accesses wrid_desc[] out of bounds when passed a negative > argument. It returns null for values 2..1999 and 2001..3999. > > qemu_rdma_poll() and qemu_rdma_block_for_wrid() print

Re: [PATCH 2/3] hw/mem/cxl_type3: Add missing copyright and license notice

2023-09-18 Thread Jonathan Cameron via
On Mon, 18 Sep 2023 17:31:38 +0100 Peter Maydell wrote: > On Mon, 18 Sept 2023 at 16:04, Jonathan Cameron > wrote: > > > > This has been missing from the start. Assume it should match > > with cxl/cxl-component-utils.c as both were part of early > > postings from Ben. > > Sounds plausible --

Re: [PATCH 2/3] qga: Add optional stream-output argument to guest-exec

2023-09-18 Thread Daniel Xu
On Mon, Sep 18, 2023 at 05:05:03PM +0200, Markus Armbruster wrote: > Daniel Xu writes: > > > Currently, commands run through guest-exec are "silent" until they > > finish running. This is fine for short lived commands. But for commands > > that take a while, this is a bad user experience. > > >

Re: [PATCH 03/52] migration/rdma: Clean up rdma_delete_block()'s return type

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > rdma_delete_block() always returns 0, which its only caller ignores. > Return void instead. > > Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas

Re: [PATCH 02/52] migration/rdma: Clean up qemu_rdma_data_init()'s return type

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > qemu_rdma_data_init() return type is void *. It actually returns > RDMAContext *, and all its callers assign the value to an > RDMAContext *. Unclean. > > Return RDMAContext * instead. > > Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas

Re: [PATCH 01/52] migration/rdma: Clean up qemu_rdma_poll()'s return type

2023-09-18 Thread Fabiano Rosas
Markus Armbruster writes: > qemu_rdma_poll()'s return type is uint64_t, even though it returns 0, > -1, or @ret, which is int. Its callers assign the return value to int > variables, then check whether it's negative. Unclean. > > Return int instead. > > Signed-off-by: Markus Armbruster

Re: [PATCH v2 4/4] hw/cxl: Line length reductions

2023-09-18 Thread Fan Ni
On Fri, Sep 15, 2023 at 06:04:18PM +0100, Jonathan Cameron wrote: > Michael Tsirkin observed that there were some unnecessarily > long lines in the CXL code in a recent review. > This patch is intended to rectify that where it does not > hurt readability. > > Reviewed-by: Michael Tokarev >

Re: [PATCH 3/3] docs/cxl: Cleanout some more aarch64 examples.

2023-09-18 Thread Peter Maydell
On Mon, 18 Sept 2023 at 16:04, Jonathan Cameron wrote: > > These crossed with the previous fix to get rid of examples > using aarch64 for which support is not yet upstream. > > Signed-off-by: Jonathan Cameron Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1892 thanks -- PMM

Re: [PATCH v2 3/4] hw/cxl: CXLDVSECPortExtensions renamed to CXLDVSECPortExt

2023-09-18 Thread Fan Ni
On Fri, Sep 15, 2023 at 06:04:17PM +0100, Jonathan Cameron wrote: > Done to reduce line lengths where this is used. > Ext seems sufficiently obvious that it need not be spelt out > fully. > > Signed-off-by: Jonathan Cameron > Reviewed-by: Philippe Mathieu-Daudé > --- Reviewed-by: Fan Ni >

Re: [PATCH 18/22] target/s390x: Call s390_cpu_realize_sysemu from s390_realize_cpu_model

2023-09-18 Thread David Hildenbrand
On 18.09.23 18:02, Philippe Mathieu-Daudé wrote: s390_cpu_realize_sysemu() runs some checks for the TCG accelerator, previous to creating the vCPU. s390_realize_cpu_model() also does run some checks for KVM. Move the sysemu call to s390_realize_cpu_model(). Having a single call before

Re: [PATCH 2/3] hw/mem/cxl_type3: Add missing copyright and license notice

2023-09-18 Thread Peter Maydell
On Mon, 18 Sept 2023 at 16:04, Jonathan Cameron wrote: > > This has been missing from the start. Assume it should match > with cxl/cxl-component-utils.c as both were part of early > postings from Ben. Sounds plausible -- is there an Intel person who could give us an acked-by for this? (Ideally

  1   2   3   4   >