Re: [PULL 0/2] Net patches

2022-11-08 Thread Laurent Vivier
On 11/8/22 17:32, Stefan Hajnoczi wrote: On Mon, 7 Nov 2022 at 23:20, Jason Wang wrote: The following changes since commit 524fc737431d240f9d9f10aaf381003092868bac: util/log: Ignore per-thread flag if global file already there (2022-11-07 16:00:02 -0500) are available in the git reposito

Re: [PATCH trivial for 7.2] hw/ssi/sifive_spi.c: spelling: reigster

2022-11-08 Thread Philippe Mathieu-Daudé
On 8/11/22 23:11, Palmer Dabbelt wrote: On Sat, 05 Nov 2022 04:53:29 PDT (-0700), m...@tls.msk.ru wrote: Fixes: 0694dabe9763847f3010b54ab3ec7d367d2f0ff0 Not sure if I missed something in QEMU land, but those are usually listed more like Fixes: 0694dabe97 ("hw/ssi: Add SiFive SPI controller

Re: [PULL 0/3] Memory/SDHCI/ParallelFlash patches for v7.2.0-rc0

2022-11-08 Thread Philippe Mathieu-Daudé
On 8/11/22 21:57, Stefan Hajnoczi wrote: I've dropped the SDHCI CVE fix due to the CI failure. The rest of the commits are still in the staging tree and I plan to include them in v7.2.0-rc0. Thank you Stefan, sorry for not catching that failure sooner.

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Xuan Zhuo
On Wed, 9 Nov 2022 02:04:17 -0500, "Michael S. Tsirkin" wrote: > On Wed, Nov 09, 2022 at 02:56:01PM +0800, Xuan Zhuo wrote: > > On Wed, 9 Nov 2022 14:55:03 +0800, Jason Wang wrote: > > > > > > 在 2022/11/9 14:51, Michael S. Tsirkin 写道: > > > > On Wed, Nov 09, 2022 at 11:31:23AM +0800, Jason Wang w

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Xuan Zhuo
On Wed, 9 Nov 2022 02:01:38 -0500, "Michael S. Tsirkin" wrote: > On Wed, Nov 09, 2022 at 02:48:29PM +0800, Xuan Zhuo wrote: > > On Wed, 9 Nov 2022 01:39:32 -0500, "Michael S. Tsirkin" > > wrote: > > > On Wed, Nov 09, 2022 at 11:31:23AM +0800, Jason Wang wrote: > > > > On Wed, Nov 9, 2022 at 3:43

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Michael S. Tsirkin
On Wed, Nov 09, 2022 at 02:56:01PM +0800, Xuan Zhuo wrote: > On Wed, 9 Nov 2022 14:55:03 +0800, Jason Wang wrote: > > > > 在 2022/11/9 14:51, Michael S. Tsirkin 写道: > > > On Wed, Nov 09, 2022 at 11:31:23AM +0800, Jason Wang wrote: > > >> On Wed, Nov 9, 2022 at 3:43 AM Stefan Hajnoczi > > >> wrote

[PULL 1/2] tcg: Move TCG_TARGET_HAS_direct_jump init to tb_gen_code

2022-11-08 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 10 -- tcg/tcg.c | 12 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 921944a5ab

[PULL for-7.2 0/2] tcg patch queue

2022-11-08 Thread Richard Henderson
The following changes since commit 60ab36907ded2918d33683f2b66f603b7400d8f3: Update VERSION for v7.2.0-rc0 (2022-11-08 15:53:41 -0500) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20221109 for you to fetch changes up to 344b63b380541a63c02ef7a8a6

[PULL 2/2] accel/tcg: Split out setjmp_gen_code

2022-11-08 Thread Richard Henderson
Isolate the code protected by setjmp. Fixes: translate-all.c: In function ‘tb_gen_code’: translate-all.c:748:51: error: argument ‘cflags’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/translat

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Michael S. Tsirkin
On Wed, Nov 09, 2022 at 02:48:29PM +0800, Xuan Zhuo wrote: > On Wed, 9 Nov 2022 01:39:32 -0500, "Michael S. Tsirkin" > wrote: > > On Wed, Nov 09, 2022 at 11:31:23AM +0800, Jason Wang wrote: > > > On Wed, Nov 9, 2022 at 3:43 AM Stefan Hajnoczi wrote: > > > > > > > > On Mon, 7 Nov 2022 at 18:10, M

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Michael S. Tsirkin
On Wed, Nov 09, 2022 at 01:52:01AM -0500, Michael S. Tsirkin wrote: > On Wed, Nov 09, 2022 at 11:31:23AM +0800, Jason Wang wrote: > > On Wed, Nov 9, 2022 at 3:43 AM Stefan Hajnoczi wrote: > > > > > > On Mon, 7 Nov 2022 at 18:10, Michael S. Tsirkin wrote: > > > > > > > > From: Kangjie Xu > > > >

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Xuan Zhuo
On Wed, 9 Nov 2022 14:55:03 +0800, Jason Wang wrote: > > 在 2022/11/9 14:51, Michael S. Tsirkin 写道: > > On Wed, Nov 09, 2022 at 11:31:23AM +0800, Jason Wang wrote: > >> On Wed, Nov 9, 2022 at 3:43 AM Stefan Hajnoczi wrote: > >>> On Mon, 7 Nov 2022 at 18:10, Michael S. Tsirkin wrote: > From:

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Jason Wang
在 2022/11/9 14:51, Michael S. Tsirkin 写道: On Wed, Nov 09, 2022 at 11:31:23AM +0800, Jason Wang wrote: On Wed, Nov 9, 2022 at 3:43 AM Stefan Hajnoczi wrote: On Mon, 7 Nov 2022 at 18:10, Michael S. Tsirkin wrote: From: Kangjie Xu Introduce the interface queue_enable() in VirtioDeviceClass

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Michael S. Tsirkin
On Wed, Nov 09, 2022 at 11:31:23AM +0800, Jason Wang wrote: > On Wed, Nov 9, 2022 at 3:43 AM Stefan Hajnoczi wrote: > > > > On Mon, 7 Nov 2022 at 18:10, Michael S. Tsirkin wrote: > > > > > > From: Kangjie Xu > > > > > > Introduce the interface queue_enable() in VirtioDeviceClass and the > > > fu

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Xuan Zhuo
On Wed, 9 Nov 2022 01:39:32 -0500, "Michael S. Tsirkin" wrote: > On Wed, Nov 09, 2022 at 11:31:23AM +0800, Jason Wang wrote: > > On Wed, Nov 9, 2022 at 3:43 AM Stefan Hajnoczi wrote: > > > > > > On Mon, 7 Nov 2022 at 18:10, Michael S. Tsirkin wrote: > > > > > > > > From: Kangjie Xu > > > > > >

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Michael S. Tsirkin
On Wed, Nov 09, 2022 at 11:31:23AM +0800, Jason Wang wrote: > On Wed, Nov 9, 2022 at 3:43 AM Stefan Hajnoczi wrote: > > > > On Mon, 7 Nov 2022 at 18:10, Michael S. Tsirkin wrote: > > > > > > From: Kangjie Xu > > > > > > Introduce the interface queue_enable() in VirtioDeviceClass and the > > > fu

Re: [PATCH] KVM: Add system call KVM_VERIFY_MSI to verify MSI vector

2022-11-08 Thread chenxiang (M)
Hi Marc, 在 2022/11/8 20:47, Marc Zyngier 写道: On Tue, 08 Nov 2022 08:08:57 +, chenxiang wrote: From: Xiang Chen Currently the numbers of MSI vectors come from register PCI_MSI_FLAGS which should be power-of-2, but in some scenaries it is not the same as the number that driver requires in

[PATCH v1 1/1] migration: Fix yank on postcopy multifd crashing guest after migration

2022-11-08 Thread Leonardo Bras
When multifd and postcopy-ram capabilities are enabled, if a migrate-start-postcopy is attempted, the migration will finish sending the memory pages and then crash with the following error: qemu-system-x86_64: ../util/yank.c:107: yank_unregister_instance: Assertion `QLIST_EMPTY(&entry->yankfns)' f

Re: [PATCH v9 5/8] KVM: Register/unregister the guest private memory regions

2022-11-08 Thread Yuan Yao
On Tue, Nov 08, 2022 at 05:41:41PM +0800, Chao Peng wrote: > On Tue, Nov 08, 2022 at 09:35:06AM +0800, Yuan Yao wrote: > > On Tue, Oct 25, 2022 at 11:13:41PM +0800, Chao Peng wrote: > > > Introduce generic private memory register/unregister by reusing existing > > > SEV ioctls KVM_MEMORY_ENCRYPT_{U

Re: [PATCH v3 4/4] hw/nvme: add polling support

2022-11-08 Thread Jinhao Fan
at 10:11 PM, Klaus Jensen wrote: > On Nov 8 12:39, John Levon wrote: >> On Fri, Nov 04, 2022 at 07:32:12AM +0100, Klaus Jensen wrote: >> >>> On Nov 3 21:19, Jinhao Fan wrote: On 11/3/2022 8:10 PM, Klaus Jensen wrote: > I agree that the spec is a little unclear on this point. In any ca

Re: [PATCH v9 6/8] KVM: Update lpage info when private/shared memory are mixed

2022-11-08 Thread Chao Peng
On Tue, Nov 08, 2022 at 08:08:05PM +0800, Yuan Yao wrote: > On Tue, Oct 25, 2022 at 11:13:42PM +0800, Chao Peng wrote: > > When private/shared memory are mixed in a large page, the lpage_info may > > not be accurate and should be updated with this mixed info. A large page > > has mixed pages can't

Re: [PULL 0/2] Net patches

2022-11-08 Thread Jason Wang
On Wed, Nov 9, 2022 at 12:33 AM Stefan Hajnoczi wrote: > > On Mon, 7 Nov 2022 at 23:20, Jason Wang wrote: > > > > The following changes since commit 524fc737431d240f9d9f10aaf381003092868bac: > > > > util/log: Ignore per-thread flag if global file already there (2022-11-07 > > 16:00:02 -0500) >

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Jason Wang
On Wed, Nov 9, 2022 at 3:43 AM Stefan Hajnoczi wrote: > > On Mon, 7 Nov 2022 at 18:10, Michael S. Tsirkin wrote: > > > > From: Kangjie Xu > > > > Introduce the interface queue_enable() in VirtioDeviceClass and the > > fucntion virtio_queue_enable() in virtio, it can be called when > > VIRTIO_PCI

[PATCH] vhost: set mem table before device start

2022-11-08 Thread Yajun Wu
Today guest memory information (through VHOST_USER_SET_MEM_TABLE) is sent out during vhost device start. Due to this delay, memory pinning is delayed. For 4G guest memory, a VFIO driver usually takes around 400+msec to pin the memory. This time is accounted towards the VM downtime. When live migra

[PATCH] target/i386: Add SGX aex-notify and EDECCSSA support

2022-11-08 Thread Kai Huang
The new SGX Asynchronous Exit (AEX) notification mechanism (AEX-notify) allows one enclave to receive a notification in the ERESUME after the enclave exit due to an AEX. EDECCSSA is a new SGX user leaf function (ENCLU[EDECCSSA]) to facilitate the AEX notification handling. Whether the hardware su

Re: [PATCH v2] target/loongarch: Fix loongarch fdt addr confict

2022-11-08 Thread Richard Henderson
On 11/9/22 13:04, Song Gao wrote: Fix LoongArch check-tcg error: TESThello on loongarch64 qemu-system-loongarch64: Some ROM regions are overlapping These ROM regions might have been loaded by direct user request or by default. They could be BIOS/firmware images, a guest kernel, initrd or

Re: [PATCH v3 2/2] util/log: Always send errors to logfile when daemonized

2022-11-08 Thread Richard Henderson
On 11/9/22 01:00, Greg Kurz wrote: When QEMU is started with `-daemonize`, all stdio descriptors get redirected to `/dev/null`. This basically means that anything printed with error_report() and friends is lost. Current logging code allows to redirect to a file with `-D` but this requires to ena

[PATCH v2] target/loongarch: Fix loongarch fdt addr confict

2022-11-08 Thread Song Gao
Fix LoongArch check-tcg error: TESThello on loongarch64 qemu-system-loongarch64: Some ROM regions are overlapping These ROM regions might have been loaded by direct user request or by default. They could be BIOS/firmware images, a guest kernel, initrd or some other file loaded into guest me

Re: [PATCH v5 03/11] Hexagon (target/hexagon) Add overrides for S2_asr_r_r_sat/S2_asl_r_r_sat

2022-11-08 Thread Richard Henderson
On 11/9/22 03:28, Taylor Simpson wrote: These instructions will not be generated by idef-parser, so we override them manually. Test cases added to tests/tcg/hexagon/usr.c Co-authored-by: Matheus Tavares Bernardino Signed-off-by: Matheus Tavares Bernardino Signed-off-by: Taylor Simpson --- tar

Questions about QEMU exception

2022-11-08 Thread Li, Kevin
Hi qemu community, We are working on some open source project which uses qemu on mac, and we have some signing process to sign qemu-system-x86_64. If qemu-system-x86_64 is not signed, we don’t see any problem, but after sign it, we got the following error: qemu-system-x86_64 -M none -netdev hel

Re: [PATCH v4 10/11] Hexagon (target/hexagon) Use direct block chaining for direct jump/branch

2022-11-08 Thread Richard Henderson
On 11/9/22 02:41, Taylor Simpson wrote: -Original Message- From: Richard Henderson Sent: Tuesday, November 8, 2022 1:24 AM To: Taylor Simpson ; qemu-devel@nongnu.org Cc: phi...@linaro.org; a...@rev.ng; a...@rev.ng; Brian Cain ; Matheus Bernardino (QUIC) Subject: Re: [PATCH v4 10/11]

[PATCH v1 05/24] vfio-user: add device IO ops vector

2022-11-08 Thread John Johnson
Used for communication with VFIO driver (prep work for vfio-user, which will communicate over a socket) Signed-off-by: John G Johnson --- hw/vfio/ap.c | 1 + hw/vfio/ccw.c | 1 + hw/vfio/common.c | 107 +++- hw/vfio/pc

[PATCH v1 10/24] vfio-user: get device info

2022-11-08 Thread John Johnson
Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 15 ++ hw/vfio/user-protocol.h | 13 hw/vfio/user.c | 55 + hw/vfio/user.h | 2

[PATCH v1 11/24] vfio-user: get region info

2022-11-08 Thread John Johnson
Add per-region FD to support mmap() of remote device regions Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/common.c | 32 --- hw/vfio/user-protocol.h | 14 ++ hw/vfio/user.c

[PATCH v1 20/24] vfio-user: dma read/write operations

2022-11-08 Thread John Johnson
Messages from server to client that peform device DMA. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 110 hw/vfio/user-protocol.h | 11 + hw/vfio/user.c

[PATCH v1 21/24] vfio-user: pci reset

2022-11-08 Thread John Johnson
Message to tell the server to reset the device. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 15 +++ hw/vfio/user.c | 12 hw/vfio/user.h | 1 + 3 files changed, 28 insertions(+) diff --git a/hw/vfi

[PATCH v1 15/24] vfio-user: forward msix BAR accesses to server

2022-11-08 Thread John Johnson
Server holds device current device pending state Use irq masking commands in socket case Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/ccw.c | 1 + hw/vfio/common.c | 26 + hw/vfio/pci.c

[PATCH v1 17/24] vfio-user: dma map/unmap operations

2022-11-08 Thread John Johnson
Add ability to do async operations during memory transactions Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson --- hw/vfio/common.c | 63 +--- hw/vfio/user-protocol.h | 32 ++ hw/vfio/user.c| 220

[PATCH v1 14/24] vfio-user: get and set IRQs

2022-11-08 Thread John Johnson
Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 7 ++- hw/vfio/user-protocol.h | 25 + hw/vfio/user.c | 135 3 files changed, 166 insertions(+), 1 del

[PATCH v1 13/24] vfio-user: pci_user_realize PCI setup

2022-11-08 Thread John Johnson
PCI BARs read from remote device PCI config reads/writes sent to remote server Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 277 -- 1 file changed, 174 insertions(+), 10

[PATCH v1 24/24] vfio-user: add trace points

2022-11-08 Thread John Johnson
Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/trace-events | 15 +++ hw/vfio/user.c | 26 ++ 2 files changed, 41 insertions(+) diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events index 73

[PATCH v1 03/24] vfio-user: add container IO ops vector

2022-11-08 Thread John Johnson
Used for communication with VFIO driver (prep work for vfio-user, which will communicate over a socket) Signed-off-by: John G Johnson --- hw/vfio/common.c | 126 -- include/hw/vfio/vfio-common.h | 33 +++ 2 files changed, 117 insertio

[PATCH v1 01/24] vfio-user: introduce vfio-user protocol specification

2022-11-08 Thread John Johnson
From: Thanos Makatos This patch introduces the vfio-user protocol specification (formerly known as VFIO-over-socket), which is designed to allow devices to be emulated outside QEMU, in a separate process. vfio-user reuses the existing VFIO defines, structs and concepts. It has been earlier discu

[PATCH v1 18/24] vfio-user: add dma_unmap_all

2022-11-08 Thread John Johnson
Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/common.c | 45 ++- hw/vfio/user.c| 24 +++ include/hw/vfio/vfio-common.h | 3 +++ 3 files changed,

[PATCH v1 07/24] vfio-user: connect vfio proxy to remote server

2022-11-08 Thread John Johnson
add user.c & user.h files for vfio-user code add proxy struct to handle comms with remote server Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- MAINTAINERS | 4 + hw/vfio/meson.build | 1 + hw/vfio/pci.c

[PATCH v1 16/24] vfio-user: proxy container connect/disconnect

2022-11-08 Thread John Johnson
Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/common.c | 207 +- hw/vfio/pci.c | 18 +++- hw/vfio/user.c| 3 + hw/vfio/user.h| 1

[PATCH v1 08/24] vfio-user: define socket receive functions

2022-11-08 Thread John Johnson
Add infrastructure needed to receive incoming messages Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- MAINTAINERS | 1 + hw/vfio/pci.c | 11 ++ hw/vfio/user-protocol.h | 54 +++ hw/vfio/user.c | 399 +

[PATCH v1 23/24] vfio-user: add coalesced posted writes

2022-11-08 Thread John Johnson
Add new message to send multiple writes to server Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/user-protocol.h | 21 hw/vfio/user.c | 128 +++- hw/vfio/user.h |

[PATCH v1 04/24] vfio-user: add region cache

2022-11-08 Thread John Johnson
cache VFIO_DEVICE_GET_REGION_INFO results to reduce memory alloc/free cycles and as prep work for vfio-user Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/ccw.c | 5 - hw/vfio/common.c | 41 +++

[PATCH v1 06/24] vfio-user: Define type vfio_user_pci_dev_info

2022-11-08 Thread John Johnson
New class for vfio-user with its class and instance constructors and destructors, and its pci ops. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/Kconfig | 10 +++ hw/vfio/common.c | 5 hw/vfio/pci.c| 89

[PATCH v1 09/24] vfio-user: define socket send functions

2022-11-08 Thread John Johnson
Also negotiate protocol version with remote server Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson --- hw/vfio/pci.c | 15 ++ hw/vfio/pci.h | 1 + hw/vfio/user-protocol.h | 62 ++ hw/vfio/user.c | 508 ++

[PATCH v1 00/24] vfio-user client

2022-11-08 Thread John Johnson
Hello, This is the 6th revision of the vfio-user client implementation. It is the first patch series (the previous revisions were RFCs) First of all, thank you for your time reviewing the RFC versions. The vfio-user framework consists of 3 parts: 1) The VFIO user protocol specification. 2) A

[PATCH v1 02/24] vfio-user: add VFIO base abstract class

2022-11-08 Thread John Johnson
Add an abstract base class both the kernel driver and user socket implementations can use to share code. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 106 +++--- hw/vfio/pci

[PATCH v1 12/24] vfio-user: region read/write

2022-11-08 Thread John Johnson
Add support for posted writes on remote devices Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/common.c | 10 +++- hw/vfio/pci.c | 9 +++- hw/vfio/pci.h | 1 + hw/vfio/user-protocol.h

[PATCH v1 19/24] vfio-user: secure DMA support

2022-11-08 Thread John Johnson
Secure DMA forces the remote process to use DMA r/w messages instead of directly mapping guest memeory. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 4 hw/vfio/pci.h | 1 + hw/vfio/user.c | 2 +- hw/vfio/user.h | 1 +

[PATCH v1 22/24] vfio-user: add 'x-msg-timeout' option that specifies msg wait times

2022-11-08 Thread John Johnson
Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 4 hw/vfio/pci.h | 1 + hw/vfio/user.c | 7 +-- hw/vfio/user.h | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

Re: [PATCH trivial for 7.2] hw/ssi/sifive_spi.c: spelling: reigster

2022-11-08 Thread Palmer Dabbelt
On Sat, 05 Nov 2022 04:53:29 PDT (-0700), m...@tls.msk.ru wrote: Fixes: 0694dabe9763847f3010b54ab3ec7d367d2f0ff0 Not sure if I missed something in QEMU land, but those are usually listed more like Fixes: 0694dabe97 ("hw/ssi: Add SiFive SPI controller support") Checkpatch isn't failing, thou

Re: [PULL v3 49/81] acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors

2022-11-08 Thread B
Am 7. November 2022 22:28:31 UTC schrieb "Michael S. Tsirkin" : >On Mon, Nov 07, 2022 at 10:07:52PM +, Bernhard Beschow wrote: >> Am 7. November 2022 13:00:36 UTC schrieb "Michael S. Tsirkin" >> : >> >On Mon, Nov 07, 2022 at 06:16:25PM +0530, Ani Sinha wrote: >> >> On Mon, Nov 7, 2022 at 6:

[PATCH 6/8] virtio-blk: remove unnecessary AioContext lock from function already safe

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito AioContext lock was introduced in b9e413dd375 and in this instance it is used to protect these 3 functions: - virtio_blk_handle_rw_error - virtio_blk_req_complete - block_acct_done Now that all three of the above functions are protected with their own locks, we c

[PATCH 4/8] virtio-blk: mark GLOBAL_STATE_CODE functions

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito Just as done in the block API, mark functions in virtio-blk that are always called in the main loop with BQL held. We know such functions are GS because they all are callbacks from virtio.c API that has already classified them as GS. Signed-off-by: Emanuele Gius

[PATCH 3/8] virtio: categorize callbacks in GS

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito All the callbacks below are always running in the main loop. The callbacks are the following: - start/stop_ioeventfd: these are the callbacks where blk_set_aio_context(iothread) is done, so they are called in the main loop. - save and load: called during mig

[PATCH 8/8] virtio-blk: minimize virtio_blk_reset() AioContext lock region

2022-11-08 Thread Stefan Hajnoczi
blk_drain() needs the lock because it calls AIO_WAIT_WHILE(). The s->rq loop doesn't need the lock because dataplane has been stopped when virtio_blk_reset() is called. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH 5/8] virtio-blk: mark IO_CODE functions

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito Just as done in the block API, mark functions in virtio-blk that are called also from iothread(s). We know such functions are IO because many are blk_* callbacks, running always in the device iothread, and remaining are propagated from the leaf IO functions (if a

[PATCH 2/8] block-backend: enable_write_cache should be atomic

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito It is read from IO_CODE and written with BQL held, so setting it as atomic should be enough. Also remove the aiocontext lock that was sporadically taken around the set. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefa

[PATCH 7/8] virtio-blk: don't acquire AioContext in virtio_blk_handle_vq()

2022-11-08 Thread Stefan Hajnoczi
There is no need to acquire AioContext in virtio_blk_handle_vq() because no APIs used in the function require it and nothing else in the virtio-blk code requires mutual exclusion anymore. Signed-off-by: Stefan Hajnoczi --- hw/block/virtio-blk.c | 2 -- 1 file changed, 2 deletions(-) diff --git

Re: [PATCH v1 2/9] tests/avocado: improve behaviour waiting for login prompts

2022-11-08 Thread John Snow
On Tue, Nov 8, 2022 at 4:26 AM Alex Bennée wrote: > > This attempts to deal with the problem of login prompts not being > guaranteed to be terminated with a newline. The solution to this is to > peek at the incoming data looking to see if we see an up-coming match > before we fall back to the old

[PATCH 0/8] virtio-blk: remove AioContext lock

2022-11-08 Thread Stefan Hajnoczi
This is a continuation of Emanuele Esposito's work to remove the AioContext lock in virtio-blk. In the past it was necessary to acquire the AioContext lock in order to do I/O. Paolo Bonzini and Emanuele have removed the need for the AioContext in the core block layer code, with a few exceptions lik

[PATCH 1/8] virtio_queue_aio_attach_host_notifier: remove AioContext lock

2022-11-08 Thread Stefan Hajnoczi
From: Emanuele Giuseppe Esposito virtio_queue_aio_attach_host_notifier() and virtio_queue_aio_attach_host_notifier_nopoll() run always in the main loop, so there is no need to protect them with AioContext lock. On the other side, virtio_queue_aio_detach_host_notifier() runs in a bh in the iothre

Re: [PATCH v3 4/4] scripts: add script to compare compatible properties

2022-11-08 Thread John Snow
On Thu, Nov 3, 2022 at 6:29 AM Maksim Davydov wrote: > > This script run QEMU to obtain compat_props of machines and default > values of different types and produce appropriate table. This table > can be used to compare machine types to choose the most suitable > machine. Also this table in json o

Re: [PULL 0/3] Memory/SDHCI/ParallelFlash patches for v7.2.0-rc0

2022-11-08 Thread Stefan Hajnoczi
I've dropped the SDHCI CVE fix due to the CI failure. The rest of the commits are still in the staging tree and I plan to include them in v7.2.0-rc0. Stefan

Re: [PULL 0/3] Memory/SDHCI/ParallelFlash patches for v7.2.0-rc0

2022-11-08 Thread Stefan Hajnoczi
; > are available in the Git repository at: > > https://github.com/philmd/qemu.git tags/memflash-20221108 > > for you to fetch changes up to cf9b3efd816518f9f210f50a0fa3e46a00b33c27: > > Revert "hw/block/pflash_cfi: Error out if dev

Re: [PATCH v3 2/4] python/qmp: increase read buffer size

2022-11-08 Thread John Snow
On Thu, Nov 3, 2022 at 6:29 AM Maksim Davydov wrote: > > After modification of "query-machines" command the buffer size should be > more than 452kB to contain output with compat-props. > > Signed-off-by: Maksim Davydov > Reviewed-by: Vladimir Sementsov-Ogievskiy > --- > python/qemu/qmp/qmp_clie

Re: [PATCH v3 08/17] migration/qemu-file: Add qemu_file_get_to_fd()

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: Add new function qemu_file_get_to_fd() that allows reading data from QEMUFile and writing it straight into a given fd. This will be used later in VFIO migration code. Signed-off-by: Avihai Horon Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards,

Re: [PULL v4 29/83] virtio: introduce virtio_queue_enable()

2022-11-08 Thread Stefan Hajnoczi
On Mon, 7 Nov 2022 at 18:10, Michael S. Tsirkin wrote: > > From: Kangjie Xu > > Introduce the interface queue_enable() in VirtioDeviceClass and the > fucntion virtio_queue_enable() in virtio, it can be called when > VIRTIO_PCI_COMMON_Q_ENABLE is written and related virtqueue can be > started. It

Re: [PATCH-for-7.2 1/2] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-08 Thread Alexander Bulekov
On 221108 1225, Alexander Bulekov wrote: > On 221107 2312, Philippe Mathieu-Daudé wrote: > > When sdhci_write_block_to_card() is called to transfer data from > > the FIFO to the SD bus, the data is already present in the buffer > > and we have to consume it directly. > > > > See the description of

Re: [PATCH v3 06/17] vfio/migration: Fix NULL pointer dereference bug

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: As part of its error flow, vfio_vmstate_change() accesses MigrationState->to_dst_file without any checks. This can cause a NULL pointer dereference if the error flow is taken and MigrationState->to_dst_file is not set. For example, this can happen if VM is s

Re: [PATCH v3 05/17] vfio/migration: Fix wrong enum usage

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: vfio_migration_init() initializes VFIOMigration->device_state using enum of VFIO migration protocol v2. Current implemented protocol is v1 so v1 enum should be used. Fix it. Fixes: 429c72800654 ("vfio/migration: Fix incorrect initialization value for parame

Re: [PULL 0/5] s390x fix and white space cleanup

2022-11-08 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/14] MIPS patches for 2022-11-08

2022-11-08 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v3 04/17] migration: Simplify migration_iteration_run()

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: From: Juan Quintela Signed-off-by: Juan Quintela Signed-off-by: Avihai Horon --- migration/migration.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index f

Re: [PULL 00/55] MIPS patches for 2022-10-30

2022-11-08 Thread Paolo Bonzini
Il mar 8 nov 2022, 16:09 Thomas Huth ha scritto: > >> If it is the last thing, we should put in the "Build Dependencies" > >> part of the release notes that a C++ compiler is no longer required > >> and mention that the configure options to specify it will go away in > >> a future release. > > >

Re: [PATCH v3 03/17] migration: Block migration comment or code is wrong

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/8/22 21:36, Vladimir Sementsov-Ogievskiy wrote: On 11/3/22 19:16, Avihai Horon wrote: From: Juan Quintela And it appears that what is wrong is the code. During bulk stage we need to make sure that some block is dirty, but no games with max_size at all. :) That made me interested in, wh

Re: [PATCH v3 03/17] migration: Block migration comment or code is wrong

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: From: Juan Quintela And it appears that what is wrong is the code. During bulk stage we need to make sure that some block is dirty, but no games with max_size at all. :) That made me interested in, why we need this one block, so I decided to search throu

[PULL 3/3] Revert "hw/block/pflash_cfi: Error out if dev length isn't power of 2"

2022-11-08 Thread Philippe Mathieu-Daudé
From: Daniel Henrique Barboza Commit 334c388f25 ("pflash_cfi: Error out if device length isn't a power of two") aimed to finish the effort started by commit 06f1521795 ("pflash: Require backend size to match device, improve errors"), but unfortunately we are not quite there since various machines

[PULL 1/3] memory: Fix wrong end address dump

2022-11-08 Thread Philippe Mathieu-Daudé
From: Zhenzhong Duan The end address of memory region section isn't correctly calculated which leads to overflowed mtree dump: Dispatch Physical sections .. #70 @2000..00011fff io [ROOT] #71 @5000..5fff (noname) #72 @0

[PULL 2/3] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-08 Thread Philippe Mathieu-Daudé
When sdhci_write_block_to_card() is called to transfer data from the FIFO to the SD bus, the data is already present in the buffer and we have to consume it directly. See the description of the 'Buffer Write Enable' bit from the 'Present State' register (prnsts::SDHC_SPACE_AVAILABLE) in Table 2.14

[PULL 0/3] Memory/SDHCI/ParallelFlash patches for v7.2.0-rc0

2022-11-08 Thread Philippe Mathieu-Daudé
The following changes since commit ade760a2f63804b7ab1839fbc3e5ddbf30538718: Merge tag 'pull-request-2022-11-08' of https://gitlab.com/thuth/qemu into staging (2022-11-08 11:34:06 -0500) are available in the Git repository at: https://github.com/philmd/qemu.git tags/memflash-202

Re: [PULL 0/2] Net patches

2022-11-08 Thread Stefan Hajnoczi
On Mon, 7 Nov 2022 at 23:20, Jason Wang wrote: > Si-Wei Liu (1): > vhost-vdpa: fix assert !virtio_net_get_subqueue(nc)->async_tx.elem in > virtio_net_reset I have applied just this patch to the staging tree. Thanks, Stefan

Re: [PATCH-for-7.2 0/2] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-08 Thread Stefan Hajnoczi
Applied to the staging tree. Thanks! Stefan

Re: [PATCH-for-7.2] Revert "hw/block/pflash_cfi: Error out if dev length isn't power of 2"

2022-11-08 Thread Stefan Hajnoczi
Applied to staging. Thanks! Stefan

Re: [PATCH] Revert "hw/block/pflash_cfi0{1, 2}: Error out if device length isn't a power of two"

2022-11-08 Thread Stefan Hajnoczi
On Tue, 8 Nov 2022 at 13:10, Philippe Mathieu-Daudé wrote: > > On 8/11/22 18:26, Daniel Henrique Barboza wrote: > > This commit caused a regression [1] that prevents machines that uses > > Open Virtual Machine Firmware (OVMF) to boot. > > > > This is a long standing behavior with how pflash handle

Re: [PATCH] Revert "hw/block/pflash_cfi0{1, 2}: Error out if device length isn't a power of two"

2022-11-08 Thread Philippe Mathieu-Daudé
On 8/11/22 18:26, Daniel Henrique Barboza wrote: This commit caused a regression [1] that prevents machines that uses Open Virtual Machine Firmware (OVMF) to boot. This is a long standing behavior with how pflash handles images. More information about why this happens can be found in [2] and com

Re: [PATCH v3 02/17] migration: No save_live_pending() method uses the QEMUFile parameter

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: From: Juan Quintela So remove it everywhere. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH-for-7.2] Revert "hw/block/pflash_cfi: Error out if dev length isn't power of 2"

2022-11-08 Thread Philippe Mathieu-Daudé
Commit 334c388f25 ("pflash_cfi: Error out if device length isn't a power of two") aimed to finish the effort started by commit 06f1521795 ("pflash: Require backend size to match device, improve errors"), but unfortunately we are not quite there since various machines are still ready to accept incom

Re: [PULL 00/55] MIPS patches for 2022-10-30

2022-11-08 Thread Konstantin Kostiuk
On Tue, Nov 8, 2022 at 5:23 PM Philippe Mathieu-Daudé wrote: > On 8/11/22 16:09, Thomas Huth wrote: > > On 08/11/2022 15.23, Philippe Mathieu-Daudé wrote: > >> On 8/11/22 14:59, Peter Maydell wrote: > > >>> Was this the last use of C++ in the tree, or am I forgetting > >>> some other part that st

Re: QOM: should you be able to cast from an interface class to the concrete class?

2022-11-08 Thread Daniel P . Berrangé
On Tue, Nov 08, 2022 at 04:01:56PM +, Peter Maydell wrote: > Hi; in the QOM model, are you supposed to be able to cast from > an interface class to the concrete class that is implementing it? > > To give a specific example, if I have a ResettableClass *rc > should I be able to do DeviceClass *

Re: [PATCH v3 01/17] migration: Remove res_compatible parameter

2022-11-08 Thread Vladimir Sementsov-Ogievskiy
On 11/3/22 19:16, Avihai Horon wrote: From: Juan Quintela It was only used for RAM, and in that case, it means that this amount of data was sent for memory. Not clear for me, what means "this amount of data was sent for memory"... That amount of data was not yet sent, actually. Just delet

Re: [PATCH v3 4/4] scripts: add script to compare compatible properties

2022-11-08 Thread Maksim Davydov
On 11/8/22 18:37, Vladimir Sementsov-Ogievskiy wrote: On 11/3/22 13:27, Maksim Davydov wrote: This script run QEMU to obtain compat_props of machines and default values of different types and produce appropriate table. This table can be used to compare machine types to choose the most suitable

Re: [PULL 59/62] hw/block/pflash_cfi0{1, 2}: Error out if device length isn't a power of two

2022-11-08 Thread Daniel Henrique Barboza
Phil, On 11/1/22 19:49, Philippe Mathieu-Daudé wrote: On 1/11/22 23:23, Stefan Hajnoczi wrote: There is a report that this commit breaks an existing OVMF setup: https://gitlab.com/qemu-project/qemu/-/issues/1290#note_1156507334 I'm not familiar with pflash. Please find a way to avoid a regress

Re: [PATCH-for-7.2 1/2] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-08 Thread Alexander Bulekov
On 221107 2312, Philippe Mathieu-Daudé wrote: > When sdhci_write_block_to_card() is called to transfer data from > the FIFO to the SD bus, the data is already present in the buffer > and we have to consume it directly. > > See the description of the 'Buffer Write Enable' bit from the > 'Present St

  1   2   3   >