[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

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]

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 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

[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 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

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

[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

[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

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

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: [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: [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 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

[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] 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

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 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 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 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 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 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

[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

[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 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

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

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 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 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: [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/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

<    1   2   3