[PATCH] migration: Simplify initial conditionals in migration for better readability

2023-12-05 Thread Het Gala
The inital conditional statements in qmp migration functions is harder to understand than necessary. It is better to get all errors out of the way in the beginning itself to have better readability and error handling. Signed-off-by: Het Gala Suggested-by: Markus Armbruster --- migration/migrati

Re: [PATCH] migration: Simplify initial conditionals in migration for better readability

2023-12-05 Thread Het Gala
On 05/12/23 1:30 pm, Het Gala wrote: The inital conditional statements in qmp migration functions is harder to understand than necessary. It is better to get all errors out of the way in the beginning itself to have better readability and error handling. Signed-off-by: Het Gala Suggested-by: Ma

Re: [PATCH v2] qemu: send stop event after bdrv_flush_all

2023-12-05 Thread Daniel P . Berrangé
On Tue, Dec 05, 2023 at 01:48:26AM -0500, tian...@smartx.com wrote: > From: Tianren Zhang > > The stop process is not finished until bdrv_flush_all > is done. Some users (e.g., libvirt) detect the STOP > event and invokes some lock release logic to revoke > the disk lock held by current qemu when

Re: [PATCH v5] accel/kvm: Turn DPRINTF macro use into tracepoints

2023-12-05 Thread Peter Maydell
On Tue, 5 Dec 2023 at 04:05, JAI ARORA wrote: > > Hello maintainers, > > This is a friendly ping. > Are there any other review comments for this patch? Hi; the patch looks good and it's been reviewed; but we're in the middle of codefreeze for the upcoming 8.2 release at the moment, so the patch w

[PATCH v3] qemu: send stop event after bdrv_flush_all

2023-12-05 Thread tianren
From: Tianren Zhang The stop process is not finished until bdrv_flush_all is done. Some users (e.g., libvirt) detect the STOP event and invokes some lock release logic to revoke the disk lock held by current qemu when such event is emitted. In such case, if the bdrv_flush_all is after the stop ev

Re: [PATCH v2] qemu: send stop event after bdrv_flush_all

2023-12-05 Thread Tianren Zhang
Thanks for the update. I have sent the v3 removing the irrelevant information: https://patchew.org/QEMU/20231205091903.3640-1-tian...@smartx.com/ Best, Tianren Zhang On Tue, Dec 5, 2023 at 4:14 PM Daniel P. Berrangé wrote: > On Tue, Dec 05, 2023 at 01:48:26AM -0500, tian...@smartx.com wrote: >

Re: [PATCH v3] qemu: send stop event after bdrv_flush_all

2023-12-05 Thread Daniel P . Berrangé
On Tue, Dec 05, 2023 at 04:19:03AM -0500, tian...@smartx.com wrote: > From: Tianren Zhang > > The stop process is not finished until bdrv_flush_all > is done. Some users (e.g., libvirt) detect the STOP > event and invokes some lock release logic to revoke > the disk lock held by current qemu when

Re: [RFC PATCH 01/11] acpi: hmp/qmp: Add hmp/qmp support for system_sleep

2023-12-05 Thread Philippe Mathieu-Daudé
Hi Annie, On 5/12/23 01:23, Annie Li wrote: Following hmp/qmp commands are implemented for pressing virtual sleep button, hmp: system_sleep qmp: { "execute": "system_sleep" } These commands put the guest into suspend or other power states depending on the power settings inside the guest. Sign

[PATCH 1/1] xlnx-versal-ospi: disable reentrancy detection for iomem_dac

2023-12-05 Thread Sai Pavan Boddu
The OSPI DMA reads flash data through the OSPI linear address space (the iomem_dac region), because of this the reentrancy guard introduced in commit a2e1753b ("memory: prevent dma-reentracy issues") is disabled for the memory region. Signed-off-by: Sai Pavan Boddu --- hw/ssi/xlnx-versal-ospi.c

[PATCH 0/2] OSPI updates

2023-12-05 Thread Sai Pavan Boddu
Add a new 2Gib octal flash mt35xu02gbba. Add an interface for versal virt board to swap the default flash. Sai Pavan Boddu (2): block: m25p80: Add support of mt35xu02gbba arm: xlnx-versal-virt: Add machine property ospi-flash hw/block/m25p80_sfdp.h| 1 + hw/arm/xlnx-versal-virt.c | 31 +

[PATCH 2/2] arm: xlnx-versal-virt: Add machine property ospi-flash

2023-12-05 Thread Sai Pavan Boddu
This property allows users to change flash model on command line as below. ex: "-M xlnx-versal-virt,ospi-flash=mt35xu02gbba" Signed-off-by: Sai Pavan Boddu --- hw/arm/xlnx-versal-virt.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/hw/arm

"Instant clone" with Qemu?

2023-12-05 Thread Philipp Hahn
Hello, by accident I stumbled over "VMware Instant Clone" ¹, which allows cloning of running VMs by copy-on-write-sharing the disk images and memory content; the network MAC address gets changed (or a different bridge is used?). I wonder if something similar can also be done with Qemu? My curr

[PATCH 1/2] block: m25p80: Add support of mt35xu02gbba

2023-12-05 Thread Sai Pavan Boddu
Add Micro 2Gb OSPI flash part with sfdp data. Signed-off-by: Sai Pavan Boddu --- hw/block/m25p80_sfdp.h | 1 + hw/block/m25p80.c | 3 +++ hw/block/m25p80_sfdp.c | 36 3 files changed, 40 insertions(+) diff --git a/hw/block/m25p80_sfdp.h b/hw/block/m25

[PATCH 0/1] versal-ospi fix

2023-12-05 Thread Sai Pavan Boddu
Disable reentrancy on iomem_dac memory-region. Sai Pavan Boddu (1): xlnx-versal-ospi: disable reentrancy detection for iomem_dac hw/ssi/xlnx-versal-ospi.c | 1 + 1 file changed, 1 insertion(+) -- 2.25.1

Re: [PATCH 1/4] scsi: only access SCSIDevice->requests from one thread

2023-12-05 Thread Kevin Wolf
Am 04.12.2023 um 17:30 hat Stefan Hajnoczi geschrieben: > On Fri, Dec 01, 2023 at 05:03:13PM +0100, Kevin Wolf wrote: > > Am 23.11.2023 um 20:49 hat Stefan Hajnoczi geschrieben: > > > Stop depending on the AioContext lock and instead access > > > SCSIDevice->requests from only one thread at a time:

[PATCH 0/1] versal-ospi fix

2023-12-05 Thread Sai Pavan Boddu
Disable reentrancy on iomem_dac memory-region. Sai Pavan Boddu (1): xlnx-versal-ospi: disable reentrancy detection for iomem_dac hw/ssi/xlnx-versal-ospi.c | 1 + 1 file changed, 1 insertion(+) -- 2.25.1

[PATCH 1/1] xlnx-versal-ospi: disable reentrancy detection for iomem_dac

2023-12-05 Thread Sai Pavan Boddu
The OSPI DMA reads flash data through the OSPI linear address space (the iomem_dac region), because of this the reentrancy guard introduced in commit a2e1753b ("memory: prevent dma-reentracy issues") is disabled for the memory region. Signed-off-by: Sai Pavan Boddu --- hw/ssi/xlnx-versal-ospi.c

Re: [RFC PATCH-for-8.2?] accel/tcg: Implement tcg_unregister_thread()

2023-12-05 Thread Michal Suchánek
On Mon, Dec 04, 2023 at 03:02:45PM -0800, Richard Henderson wrote: > On 12/4/23 12:09, Michal Suchánek wrote: > > On Mon, Dec 04, 2023 at 02:50:17PM -0500, Stefan Hajnoczi wrote: > > > On Mon, 4 Dec 2023 at 14:40, Philippe Mathieu-Daudé > > > wrote: > > > > +void tcg_unregister_thread(void) > > >

Re: [PATCH v3 2/2] vhost-scsi: Add support for a worker thread per virtqueue

2023-12-05 Thread Stefano Garzarella
On Mon, Dec 04, 2023 at 05:16:18PM -0600, Mike Christie wrote: This adds support for vhost-scsi to be able to create a worker thread per virtqueue. Right now for vhost-net we get a worker thread per tx/rx virtqueue pair which scales nicely as we add more virtqueues and CPUs, but for scsi we get t

Re: [RFC 0/8] Support generic Luks encryption

2023-12-05 Thread Kevin Wolf
Am 04.12.2023 um 18:43 hat Daniel P. Berrangé geschrieben: > On Tue, Dec 05, 2023 at 01:32:51AM +0800, Yong Huang wrote: > > On Tue, Dec 5, 2023 at 12:51 AM Daniel P. Berrangé > > wrote: > > > > > On Tue, Dec 05, 2023 at 12:41:16AM +0800, Yong Huang wrote: > > > > On Tue, Dec 5, 2023 at 12:24 AM

Re: [RFC 0/8] Support generic Luks encryption

2023-12-05 Thread Daniel P . Berrangé
On Tue, Dec 05, 2023 at 09:51:21AM +0800, Yong Huang wrote: > Let me make a conclusion about our discussion, if i > misunderstand something, > point that out please: > > 1. To achieve the generic encryption, extending the pre-existing LUKS QEMU >block driver is suggested in practice. yes >

[RFC PATCH] replay: stop us hanging in rr_wait_io_event

2023-12-05 Thread Alex Bennée
A lot of the hang I see are when we end up spinning in rr_wait_io_event for an event that will never come in playback. As a new check functions which can see if we are in PLAY mode and kick us us the wait function so the event can be processed. This fixes most of the failures in replay_kernel.py

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-05 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Dec 04, 2023 at 06:09:16PM -0300, Fabiano Rosas wrote: >> Right, I got your point. I just think we could avoid designing this new >> string format by creating new fields with the extra space: >> >> typedef struct QEMU_PACKED { >> uint32_t size; >> uint8_t runst

Re: [PATCH] migration: Simplify initial conditionals in migration for better readability

2023-12-05 Thread Fabiano Rosas
Het Gala writes: > The inital conditional statements in qmp migration functions is harder > to understand than necessary. It is better to get all errors out of > the way in the beginning itself to have better readability and error > handling. > > Signed-off-by: Het Gala > Suggested-by: Markus Ar

QEMU developers fortnightly conference call for agenda for 2023-12-12

2023-12-05 Thread Juan Quintela
Hi If you have any topics for the last qemu conference call of the year, feel free to answer to this email. Later, Juan. QEMU developers fortnightly conference call Tuesday 2023-12-12 ⋅ 15:00 – 16:00 Central European Time - Madrid Location https://meet.jit.si/kvmcallmeeting https://www.g

Re: [RFC PATCH] replay: stop us hanging in rr_wait_io_event

2023-12-05 Thread Peter Maydell
On Tue, 5 Dec 2023 at 12:15, Alex Bennée wrote: > > A lot of the hang I see are when we end up spinning in > rr_wait_io_event for an event that will never come in playback. As a > new check functions which can see if we are in PLAY mode and kick us > us the wait function so the event can be proces

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-05 Thread Steven Sistare
On 12/5/2023 7:44 AM, Fabiano Rosas wrote: > Peter Xu writes: > >> On Mon, Dec 04, 2023 at 06:09:16PM -0300, Fabiano Rosas wrote: >>> Right, I got your point. I just think we could avoid designing this new >>> string format by creating new fields with the extra space: >>> >>> typedef struct QEMU_

Re: [PULL 0/3] Misc patches for QEMU 8.2-rc3

2023-12-05 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: [PULL 0/1] target-arm queue

2023-12-05 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: [PULL 0/4] Misc fixes for 2023-12-04

2023-12-05 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: [RFC PATCH 00/18] Map memory at destination .load_setup in vDPA-net migration

2023-12-05 Thread Eugenio Perez Martin
On Fri, Nov 3, 2023 at 9:19 PM Si-Wei Liu wrote: > > > > On 11/2/2023 5:37 AM, Eugenio Perez Martin wrote: > > On Thu, Nov 2, 2023 at 11:13 AM Si-Wei Liu wrote: > >> > >> > >> On 10/19/2023 7:34 AM, Eugenio Pérez wrote: > >>> Current memory operations like pinning may take a lot of time at the >

Re: "Instant clone" with Qemu?

2023-12-05 Thread Stefan Hajnoczi
On Tue, 5 Dec 2023 at 04:53, Philipp Hahn wrote: > > Hello, > > by accident I stumbled over "VMware Instant Clone" ¹, which allows > cloning of running VMs by copy-on-write-sharing the disk images and > memory content; the network MAC address gets changed (or a different > bridge is used?). > I wo

Re: [RFC PATCH 01/11] acpi: hmp/qmp: Add hmp/qmp support for system_sleep

2023-12-05 Thread Annie.li
Hi Philippe, On 12/5/2023 4:44 AM, Philippe Mathieu-Daudé wrote: Hi Annie, On 5/12/23 01:23, Annie Li wrote: Following hmp/qmp commands are implemented for pressing virtual sleep button, hmp: system_sleep qmp: { "execute": "system_sleep" } These commands put the guest into suspend or other p

Re: QEMU developers fortnightly conference call for agenda for 2023-12-12

2023-12-05 Thread Het Gala
Hi, I wanted to know - plans for the project of "Configuration migration" ref : https://lists.gnu.org/archive/html/qemu-devel/2023-11/msg00488.html. Reason being, I am planning to soon post 2nd patchset series for 'adding multiple interface on top of multifd' - which would cover the addition

Re: [RFC PATCH] replay: stop us hanging in rr_wait_io_event

2023-12-05 Thread Alex Bennée
Peter Maydell writes: > On Tue, 5 Dec 2023 at 12:15, Alex Bennée wrote: >> >> A lot of the hang I see are when we end up spinning in >> rr_wait_io_event for an event that will never come in playback. As a >> new check functions which can see if we are in PLAY mode and kick us >> us the wait func

Re: [PATCH V6 11/14] tests/qtest: precopy migration with suspend

2023-12-05 Thread Steven Sistare
On 12/4/2023 3:49 PM, Peter Xu wrote: > On Thu, Nov 30, 2023 at 01:37:24PM -0800, Steve Sistare wrote: >> Add a test case to verify that the suspended state is handled correctly >> during live migration precopy. The test suspends the src, migrates, then >> wakes the dest. >> >> Signed-off-by: Stev

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-05 Thread Peter Xu
On Tue, Dec 05, 2023 at 09:44:12AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Dec 04, 2023 at 06:09:16PM -0300, Fabiano Rosas wrote: > >> Right, I got your point. I just think we could avoid designing this new > >> string format by creating new fields with the extra space: > >>

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-05 Thread Peter Xu
On Mon, Dec 04, 2023 at 05:23:57PM -0500, Steven Sistare wrote: > The V6 code does not pass a state to vm_start, and knowledge of > vm_was_suspended > is confined to the global_state and cpus functions. IMO this is a more > modular > and robust solution, as multiple sites may call vm_start(), an

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-05 Thread Fabiano Rosas
Peter Xu writes: > On Tue, Dec 05, 2023 at 09:44:12AM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Mon, Dec 04, 2023 at 06:09:16PM -0300, Fabiano Rosas wrote: >> >> Right, I got your point. I just think we could avoid designing this new >> >> string format by creating new fields w

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-05 Thread Steven Sistare
On 12/5/2023 11:52 AM, Fabiano Rosas wrote: > Peter Xu writes: > >> On Tue, Dec 05, 2023 at 09:44:12AM -0300, Fabiano Rosas wrote: >>> Peter Xu writes: >>> On Mon, Dec 04, 2023 at 06:09:16PM -0300, Fabiano Rosas wrote: > Right, I got your point. I just think we could avoid designing thi

RE: [PATCH 3/9] Hexagon (target/hexagon) Make generators object oriented - gen_helper_protos

2023-12-05 Thread ltaylorsimpson
> -Original Message- > From: Brian Cain > Sent: Monday, December 4, 2023 9:46 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: Matheus Bernardino (QUIC) ; Sid > Manning ; Marco Liebel (QUIC) > ; richard.hender...@linaro.org; > phi...@linaro.org; a...@rev.ng; a...@rev.ng > Subject:

[PATCH v3 0/2] block: commit/stream: Allow users to request only format driver names in backing file format

2023-12-05 Thread Peter Krempa
Please see patches for rationale. Libvirt patches using this new flag will be posted soon-ish (after cleanup). v3: - changed name of flag to 'backing-mask-protocol' (Eric) - decided to keep Vladimir's R-b as he requested shorter name too v2: - fixed mistaken argument order in 'hmp_block_strea

[PATCH v3 1/2] block: commit: Allow users to request only format driver names in backing file format

2023-12-05 Thread Peter Krempa
Introduce a new flag 'backing-mask-protocol' for the block-commit QMP command which instructs the internals to use 'raw' instead of the protocol driver in case when a image is used without a dummy 'raw' wrapper. The flag is designed such that it can be always asserted by management tools even when

[PATCH v3 2/2] block: stream: Allow users to request only format driver names in backing file format

2023-12-05 Thread Peter Krempa
Introduce a new flag 'backing-mask-protocol' for the block-stream QMP command which instructs the internals to use 'raw' instead of the protocol driver in case when a image is used without a dummy 'raw' wrapper. The flag is designed such that it can be always asserted by management tools even when

Re: [PATCH v1] target/i386/host-cpu: Use IOMMU addr width for passthrough devices on Intel platforms

2023-12-05 Thread Cédric Le Goater
On 11/13/23 08:32, Vivek Kasireddy wrote: A recent OVMF update has resulted in MMIO regions being placed at the upper end of the physical address space. As a result, when a Host device is passthrough'd to the Guest via VFIO, the following mapping failures occur when VFIO tries to map the MMIO reg

Re: [PATCH v3 0/2] block: commit/stream: Allow users to request only format driver names in backing file format

2023-12-05 Thread Peter Krempa
On Tue, Dec 05, 2023 at 18:14:40 +0100, Peter Krempa wrote: > Please see patches for rationale. > > Libvirt patches using this new flag will be posted soon-ish (after > cleanup). https://lists.libvirt.org/archives/list/de...@lists.libvirt.org/message/GCCZP5ANYTPVXCIEYGSM5NWYCGDL23V6/

Re: [PATCH V6 05/14] migration: propagate suspended runstate

2023-12-05 Thread Steven Sistare
On 12/5/2023 11:50 AM, Peter Xu wrote: > On Mon, Dec 04, 2023 at 05:23:57PM -0500, Steven Sistare wrote: >> The V6 code does not pass a state to vm_start, and knowledge of >> vm_was_suspended >> is confined to the global_state and cpus functions. IMO this is a more >> modular >> and robust solut

Re: [PATCH v5 00/11] Implementation of NPI Mailbox and GMAC Networking Module

2023-12-05 Thread Nabih Estefan
Hello, Since all patches for this change have been reviewed, is it possible to apply it to the current branch so it can be fully upstreamed? Thank you! Nabih Estefan (he/him) | Software Engineer | nabiheste...@google.com | 857-308-9574 Nabih Estefan (he/him) | Software Engineer | nabiheste...

[PATCH v2 03/14] tests: remove aio_context_acquire() tests

2023-12-05 Thread Stefan Hajnoczi
The aio_context_acquire() API is being removed. Drop the test case that calls the API. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- tests/unit/test-aio.c | 67 +-- 1 file changed, 1 insertion(+), 66 deletions(-) dif

[PATCH v2 04/14] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-12-05 Thread Stefan Hajnoczi
aio_context_acquire()/aio_context_release() has been replaced by fine-grained locking to protect state shared by multiple threads. The AioContext lock still plays the role of balancing locking in AIO_WAIT_WHILE() and many functions in QEMU either require that the AioContext lock is held or not held

[PATCH v2 01/14] virtio-scsi: replace AioContext lock with tmf_bh_lock

2023-12-05 Thread Stefan Hajnoczi
Protect the Task Management Function BH state with a lock. The TMF BH runs in the main loop thread. An IOThread might process a TMF at the same time as the TMF BH is running. Therefore tmf_bh_list and tmf_bh must be protected by a lock. Run TMF request completion in the IOThread using aio_wait_bh_

[PATCH v2 00/14] aio: remove AioContext lock

2023-12-05 Thread Stefan Hajnoczi
v2: - Add Patch 2 "scsi: assert that callbacks run in the correct AioContext" [Kevin] - Add Patch 7 "block: remove bdrv_co_lock()" [Eric and Kevin] - Remove stray goto label in Patch 8 [Kevin] - Fix "eeked" -> "eked" typo in Patch 10 [Eric] This series removes the AioContext locking APIs from QEM

[PATCH v2 10/14] aio: remove aio_context_acquire()/aio_context_release() API

2023-12-05 Thread Stefan Hajnoczi
Delete these functions because nothing calls these functions anymore. I introduced these APIs in commit 98563fc3ec44 ("aio: add aio_context_acquire() and aio_context_release()") in 2014. It's with a sigh of relief that I delete these APIs almost 10 years later. Thanks to Paolo Bonzini's vision fo

[PATCH v2 05/14] graph-lock: remove AioContext locking

2023-12-05 Thread Stefan Hajnoczi
Stop acquiring/releasing the AioContext lock in bdrv_graph_wrlock()/bdrv_graph_unlock() since the lock no longer has any effect. The distinction between bdrv_graph_wrunlock() and bdrv_graph_wrunlock_ctx() becomes meaningless and they can be collapsed into one function. Signed-off-by: Stefan Hajno

[PATCH v2 08/14] scsi: remove AioContext locking

2023-12-05 Thread Stefan Hajnoczi
The AioContext lock no longer has any effect. Remove it. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- include/hw/virtio/virtio-scsi.h | 14 -- hw/scsi/scsi-bus.c | 2 -- hw/scsi/scsi-disk.c | 31 +-- hw/scsi/virtio-

[PATCH v2 13/14] job: remove outdated AioContext locking comments

2023-12-05 Thread Stefan Hajnoczi
The AioContext lock no longer exists. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- include/qemu/job.h | 20 1 file changed, 20 deletions(-) diff --git a/include/qemu/job.h b/include/qemu/job.h index e502787dd8..9ea98b5927 100644 --- a/include/qemu/job.h +++ b

[PATCH v2 12/14] scsi: remove outdated AioContext lock comment

2023-12-05 Thread Stefan Hajnoczi
The SCSI subsystem no longer uses the AioContext lock. Request processing runs exclusively in the BlockBackend's AioContext since "scsi: only access SCSIDevice->requests from one thread" and hence the lock is unnecessary. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- hw/scsi/scsi-d

[PATCH v2 11/14] docs: remove AioContext lock from IOThread docs

2023-12-05 Thread Stefan Hajnoczi
Encourage the use of locking primitives and stop mentioning the AioContext lock since it is being removed. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- docs/devel/multiple-iothreads.txt | 45 +++ 1 file changed, 15 insertions(+), 30 deletions(-) diff -

[PATCH v2 09/14] aio-wait: draw equivalence between AIO_WAIT_WHILE() and AIO_WAIT_WHILE_UNLOCKED()

2023-12-05 Thread Stefan Hajnoczi
Now that the AioContext lock no longer exists, AIO_WAIT_WHILE() and AIO_WAIT_WHILE_UNLOCKED() are equivalent. A future patch will get rid of AIO_WAIT_WHILE_UNLOCKED(). Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake --- include/block/aio-wait.h | 16 1 file changed, 4 i

[PATCH v2 07/14] block: remove bdrv_co_lock()

2023-12-05 Thread Stefan Hajnoczi
The bdrv_co_lock() and bdrv_co_unlock() functions are already no-ops. Remove them. Signed-off-by: Stefan Hajnoczi --- include/block/block-global-state.h | 14 -- block.c| 10 -- blockdev.c | 4 3 files changed, 28 dele

[PATCH v2 02/14] scsi: assert that callbacks run in the correct AioContext

2023-12-05 Thread Stefan Hajnoczi
Since the removal of AioContext locking, the correctness of the code relies on running requests from a single AioContext at any given time. Add assertions that verify that callbacks are invoked in the correct AioContext. Signed-off-by: Stefan Hajnoczi --- hw/scsi/scsi-disk.c | 14 +

[PATCH v2 14/14] block: remove outdated AioContext locking comments

2023-12-05 Thread Stefan Hajnoczi
The AioContext lock no longer exists. There is one noteworthy change: - * More specifically, these functions use BDRV_POLL_WHILE(bs), which - * requires the caller to be either in the main thread and hold - * the BlockdriverState (bs) AioContext lock, or directly in the - * home thread th

Re: [PATCH v3 0/2] vhost-scsi: Support worker ioctls

2023-12-05 Thread Stefan Hajnoczi
On Mon, Dec 04, 2023 at 05:16:16PM -0600, Mike Christie wrote: > The following patches allow users to configure the vhost worker threads > for vhost-scsi. With vhost-net we get a worker thread per rx/tx virtqueue > pair, but for vhost-scsi we get one worker for all workqueues. This > becomes a bott

Re: [PATCH V6 13/14] tests/qtest: bootfile per vm

2023-12-05 Thread Steven Sistare
On 12/4/2023 5:37 PM, Peter Xu wrote: > On Mon, Dec 04, 2023 at 06:13:36PM -0300, Fabiano Rosas wrote: >> Steve Sistare writes: >> >>> Create a separate bootfile for the outgoing and incoming vm, so the block >>> layer can lock the file during the background migration test. Otherwise, >>> the tes

Re: [PATCH V6 00/14] fix migration of suspended runstate

2023-12-05 Thread Steven Sistare
Hi Peter and Fabiano, Any comments on these patches, before I send V7? They are not affected by the other changes we have discussed, except for renaming runstate_is_started to runstate_is_live. [PATCH V6 04/14] cpus: vm_resume [PATCH V6 06/14] migration: preserve suspended runstate [PATCH

Re: [PATCH 1/1] hw/i2c: add pca9543 i2c-mux switch

2023-12-05 Thread Patrick Venture
On Tue, Nov 14, 2023 at 3:30 PM Corey Minyard wrote: > On Mon, Nov 13, 2023 at 02:31:56PM +0800, Potin Lai wrote: > > Add pca9543 2-channel i2c-mux switch support. > > > > Signed-off-by: Potin Lai > > Looks good to me. > > Acked-by: Corey Minyard > > > --- > > hw/i2c/i2c_mux_pca954x.c

Re: [PATCH V6 00/14] fix migration of suspended runstate

2023-12-05 Thread Fabiano Rosas
Steven Sistare writes: > Hi Peter and Fabiano, > > Any comments on these patches, before I send V7? They are not affected by > the other changes we have discussed, except for renaming runstate_is_started > to runstate_is_live. > > [PATCH V6 04/14] cpus: vm_resume > [PATCH V6 06/14] migration

Re: [PATCH 1/1] xlnx-versal-ospi: disable reentrancy detection for iomem_dac

2023-12-05 Thread Francisco Iglesias
On [2023 Dec 05] Tue 15:18:02, Sai Pavan Boddu wrote: > The OSPI DMA reads flash data through the OSPI linear address space (the > iomem_dac region), because of this the reentrancy guard introduced in > commit a2e1753b ("memory: prevent dma-reentracy issues") is disabled for > the memory region. >

Re: [RFC PATCH 01/11] acpi: hmp/qmp: Add hmp/qmp support for system_sleep

2023-12-05 Thread Markus Armbruster
You neglected to cc: QAPI schema maintainers. I found it by chance. Next time :) Annie Li writes: > Following hmp/qmp commands are implemented for pressing virtual > sleep button, > > hmp: system_sleep > qmp: { "execute": "system_sleep" } > > These commands put the guest into suspend or other p

[PATCH 09/11] replay: stop us hanging in rr_wait_io_event

2023-12-05 Thread Alex Bennée
A lot of the hang I see are when we end up spinning in rr_wait_io_event for an event that will never come in playback. As a new check functions which can see if we are in PLAY mode and kick us us the wait function so the event can be processed. This fixes most of the failures in replay_kernel.py

[PATCH 06/11] replay: add proper kdoc for ReplayState

2023-12-05 Thread Alex Bennée
Remove the non-standard comment formatting and move the descriptions into a proper kdoc comment. Signed-off-by: Alex Bennée --- replay/replay-internal.h | 27 -- roms/SLOF | 2 +- tests/tcg/i386/Makefile.softmmu-target | 19

[PATCH 07/11] replay: make has_unread_data a bool

2023-12-05 Thread Alex Bennée
For clarity given it only has two states. Signed-off-by: Alex Bennée --- replay/replay-internal.h | 4 ++-- replay/replay-internal.c | 4 ++-- replay/replay-snapshot.c | 6 +++--- replay/replay.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/replay/replay-intern

[PATCH 05/11] replay: remove host_clock_last

2023-12-05 Thread Alex Bennée
Fixes: a02fe2ca70 (replay: Remove host_clock_last) Signed-off-by: Alex Bennée --- replay/replay-internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/replay/replay-internal.h b/replay/replay-internal.h index b6836354ac..516147ddbc 100644 --- a/replay/replay-internal.h +++ b/replay/repla

[PATCH 01/11] tests/avocado: add a simple i386 replay kernel test

2023-12-05 Thread Alex Bennée
There are a number of bugs against 32 bit x86 on the tracker. Lets at least establish a baseline pure kernel boot can do record/replay before we start looking at the devices. Signed-off-by: Alex Bennée --- tests/avocado/replay_kernel.py | 16 1 file changed, 16 insertions(+) di

[PATCH 08/11] replay: introduce a central report point for sync errors

2023-12-05 Thread Alex Bennée
Figuring out why replay has failed is tricky at the best of times. Lets centralise the reporting of a replay sync error and add a little bit of extra information to help with debugging. Signed-off-by: Alex Bennée --- replay/replay-internal.h | 12 replay/replay-char.c | 6 ++---

[PATCH 00/11] record/replay fixes, maybe for 8.2 or for post release stable?

2023-12-05 Thread Alex Bennée
As I'm a glutton for punishment I thought I'd have a go at fixing the slowly growing number of record/replay bugs. The two fixes are: replay: stop us hanging in rr_wait_io_event chardev: force write all when recording replay logs And the rest is various clean-ups and debugging aids. I don't kno

[PATCH 11/11] tests/avocado: remove skips from replay_kernel

2023-12-05 Thread Alex Bennée
With the latest fixes for #2010 and #2013 these tests look pretty stable now. Of course the only way to be really sure is to run it in the CI infrastructure and see what breaks. Signed-off-by: Alex Bennée --- tests/avocado/replay_kernel.py | 9 - 1 file changed, 9 deletions(-) diff --gi

[PATCH 02/11] tests/avocado: fix typo in replay_linux

2023-12-05 Thread Alex Bennée
Signed-off-by: Alex Bennée --- tests/avocado/replay_linux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 270ccc1eae..e95bff3299 100644 --- a/tests/avocado/replay_linux.py +++ b/tests/avocado/replay_linux.p

[PATCH 10/11] chardev: force write all when recording replay logs

2023-12-05 Thread Alex Bennée
This is mostly a problem within avocado as serial generally isn't busy enough to overfill pipes. However the consequences of recording a failed write will haunt us on replay when causing the log to go out of sync. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2010 Signed-off-by: Alex Bennée

[PATCH 03/11] scripts/replay-dump: update to latest format

2023-12-05 Thread Alex Bennée
To help debugging replay logs I've implemented decode_plain and decode_char_write as well as put in a new table for the current format of log. Signed-off-by: Alex Bennée --- scripts/replay-dump.py | 70 ++ 1 file changed, 64 insertions(+), 6 deletions(-)

[PATCH 04/11] scripts/replay_dump: track total number of instructions

2023-12-05 Thread Alex Bennée
This will help in tracking where we are in the stream when debugging. Signed-off-by: Alex Bennée --- scripts/replay-dump.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py index 8b9f914534..2212b09322 100755 --- a/scripts/re

Re: [PATCH V6 11/14] tests/qtest: precopy migration with suspend

2023-12-05 Thread Peter Xu
On Tue, Dec 05, 2023 at 11:14:43AM -0500, Steven Sistare wrote: > Calling migrate_wait_for_dirty_mem proves that a source write is propagated > to the dest, even for the suspended case. We fully expect that, but a good > test verifies our expectations. That is done in the first loop of > migrat

Re: [PATCH 2/2] arm: xlnx-versal-virt: Add machine property ospi-flash

2023-12-05 Thread Francisco Iglesias
On [2023 Dec 05] Tue 15:22:26, Sai Pavan Boddu wrote: > This property allows users to change flash model on command line as > below. > >ex: "-M xlnx-versal-virt,ospi-flash=mt35xu02gbba" > > Signed-off-by: Sai Pavan Boddu Reviewed-by: Francisco Iglesias > --- > hw/arm/xlnx-versal-virt.c |

Re: [PATCH 1/2] block: m25p80: Add support of mt35xu02gbba

2023-12-05 Thread Francisco Iglesias
On [2023 Dec 05] Tue 15:22:25, Sai Pavan Boddu wrote: > Add Micro 2Gb OSPI flash part with sfdp data. > > Signed-off-by: Sai Pavan Boddu Reviewed-by: Francisco Iglesias > --- > hw/block/m25p80_sfdp.h | 1 + > hw/block/m25p80.c | 3 +++ > hw/block/m25p80_sfdp.c | 36 +++

Re: [PULL 0/1] ufs fix for 2023-12-05

2023-12-05 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 V6 06/14] migration: preserve suspended runstate

2023-12-05 Thread Peter Xu
On Thu, Nov 30, 2023 at 01:37:19PM -0800, Steve Sistare wrote: > A guest that is migrated in the suspended state automaticaly wakes and > continues execution. This is wrong; the guest should end migration in > the same state it started. The root cause is that the outgoing migration > code automat

Re: [PATCH V6 08/14] migration: preserve suspended for bg_migration

2023-12-05 Thread Peter Xu
On Thu, Nov 30, 2023 at 01:37:21PM -0800, Steve Sistare wrote: > Do not wake a suspended guest during bg_migration, and restore the prior > state at finish rather than unconditionally running. Allow the additional > state transitions that occur. > > Signed-off-by: Steve Sistare > Reviewed-by: Fa

Re: [PATCH V6 07/14] migration: preserve suspended for snapshot

2023-12-05 Thread Peter Xu
On Thu, Nov 30, 2023 at 01:37:20PM -0800, Steve Sistare wrote: > Restoring a snapshot can break a suspended guest. Snapshots suffer from > the same suspended-state issues that affect live migration, plus they must > handle an additional problematic scenario, which is that a running vm must > remai

Re: [PATCH V6 04/14] cpus: vm_resume

2023-12-05 Thread Peter Xu
On Thu, Nov 30, 2023 at 01:37:17PM -0800, Steve Sistare wrote: > Define the vm_resume helper, for use in subsequent patches. > > Signed-off-by: Steve Sistare Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH V6 00/14] fix migration of suspended runstate

2023-12-05 Thread Peter Xu
On Tue, Dec 05, 2023 at 01:52:23PM -0500, Steven Sistare wrote: > Hi Peter and Fabiano, > > Any comments on these patches, before I send V7? They are not affected by > the other changes we have discussed, except for renaming runstate_is_started > to runstate_is_live. > > [PATCH V6 04/14] cpus:

Re: [RFC PATCH 01/11] acpi: hmp/qmp: Add hmp/qmp support for system_sleep

2023-12-05 Thread Annie.li
Hi Markus, On 12/5/2023 3:34 PM, Markus Armbruster wrote: You neglected to cc: QAPI schema maintainers. I found it by chance. Next time :) Yep, should have cc to the maintainers. Annie Li writes: Following hmp/qmp commands are implemented for pressing virtual sleep button, hmp: system_sl

Re: [PATCH v5 00/11] Implementation of NPI Mailbox and GMAC Networking Module

2023-12-05 Thread Peter Maydell
On Tue, 5 Dec 2023 at 17:54, Nabih Estefan wrote: > > Hello, > > Since all patches for this change have been reviewed, is it possible > to apply it to the current branch so it can be fully upstreamed? Thanks for the ping; this is on my list of patchseries to look at, but it won't go upstream unti

RE: [PATCH] ui/gtk: flush display pipeline before saving vmstate when blob=true

2023-12-05 Thread Kim, Dongwon
Hi Marc-André, > -Original Message- > From: Marc-André Lureau > Sent: Monday, December 4, 2023 11:15 PM > To: Kim, Dongwon > Cc: qemu-devel@nongnu.org; Kasireddy, Vivek > Subject: Re: [PATCH] ui/gtk: flush display pipeline before saving vmstate when > blob=true > > Hi > > On Tue, Dec

[PATCH for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-05 Thread Michael Roth
Commit 7191f24c7fcf ("accel/kvm/kvm-all: Handle register access errors") added error checking for KVM_SET_SREGS/KVM_SET_SREGS2. In doing so, it exposed a long-running bug in current KVM support for SEV-ES where the kernel assumes that MSR_EFER_LMA will be set explicitly by the guest kernel, in whic

Re: [PATCH for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-05 Thread Stefan Hajnoczi
On Tue, 5 Dec 2023 at 17:12, Michael Roth wrote: > > Commit 7191f24c7fcf ("accel/kvm/kvm-all: Handle register access errors") > added error checking for KVM_SET_SREGS/KVM_SET_SREGS2. In doing so, it > exposed a long-running bug in current KVM support for SEV-ES where the > kernel assumes that MSR_

[PATCH v2 for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-05 Thread Michael Roth
Commit 7191f24c7fcf ("accel/kvm/kvm-all: Handle register access errors") added error checking for KVM_SET_SREGS/KVM_SET_SREGS2. In doing so, it exposed a long-running bug in current KVM support for SEV-ES where the kernel assumes that MSR_EFER_LMA will be set explicitly by the guest kernel, in whic

Re: [PATCH for-8.2?] i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit

2023-12-05 Thread Michael Roth
Quoting Stefan Hajnoczi (2023-12-05 16:27:51) > On Tue, 5 Dec 2023 at 17:12, Michael Roth wrote: > > > > Commit 7191f24c7fcf ("accel/kvm/kvm-all: Handle register access errors") > > added error checking for KVM_SET_SREGS/KVM_SET_SREGS2. In doing so, it > > exposed a long-running bug in current KVM

RE: [PATCH 3/9] Hexagon (target/hexagon) Make generators object oriented - gen_helper_protos

2023-12-05 Thread ltaylorsimpson
> -Original Message- > From: ltaylorsimp...@gmail.com > Sent: Tuesday, December 5, 2023 11:08 AM > To: 'Brian Cain' ; qemu-devel@nongnu.org > Cc: 'Matheus Bernardino (QUIC)' ; 'Sid > Manning' ; 'Marco Liebel (QUIC)' > ; richard.hender...@linaro.org; > phi...@linaro.org; a...@rev.ng; a..

Re: [PATCH-for-8.2? v2 2/4] hw/arm/stm32f405: Report error when incorrect CPU is used

2023-12-05 Thread Alistair Francis
On Fri, Nov 17, 2023 at 5:18 PM Philippe Mathieu-Daudé wrote: > > Both 'netduinoplus2' and 'olimex-stm32-h405' machines ignore the > CPU type requested by the command line. This might confuse users, > since the following will create a machine with a Cortex-M4 CPU: > > $ qemu-system-aarch64 -M ne

Re: [PATCH v1 1/3] hw/ssi/xilinx_spips: fix an out of bound access

2023-12-05 Thread Alistair Francis
On Sat, Nov 25, 2023 at 12:38 AM Frederic Konrad wrote: > > The spips, qspips, and zynqmp-qspips share the same realize function > (xilinx_spips_realize) and initialize their io memory region with different > mmio_ops passed through the class. The size of the memory region is set to > the largest

  1   2   >