RE: [PATCH v3 5/5] intel_iommu: Optimize out some unnecessary UNMAP calls

2023-06-08 Thread Duan, Zhenzhong
>-Original Message- >From: Peter Xu >Sent: Friday, June 9, 2023 3:53 AM >To: Jason Gunthorpe >Cc: Liu, Yi L ; Duan, Zhenzhong >; qemu-devel@nongnu.org; m...@redhat.com; >jasow...@redhat.com; pbonz...@redhat.com; >richard.hender...@linaro.org; edua...@habkost.net;

Re: [RFC v2 6/6] linux-user: Add '-native-bypass' option

2023-06-08 Thread Manos Pitsidianakis
On Wed, 07 Jun 2023 19:47, Yeqi Fu wrote: --- a/linux-user/main.c +++ b/linux-user/main.c +/* Set the library for native bypass */ +if (native_lib != NULL) { +char *token = malloc(strlen(native_lib) + 12); malloc() can fail (in rare circumstances). Check for the return value

Re: [RFC v2 1/6] build: Add configure options for native calls

2023-06-08 Thread Manos Pitsidianakis
On Wed, 07 Jun 2023 19:47, Yeqi Fu wrote: +have_user_native_call = get_option('user_native_call') \ +.require(have_user, error_message: 'user_native_call requires user') \ +.require(targetos == 'linux', error_message: 'user_native_call requires Linux') \ +.allowed() Is there a

RE: [PATCH v3 5/5] intel_iommu: Optimize out some unnecessary UNMAP calls

2023-06-08 Thread Duan, Zhenzhong
>-Original Message- >From: Peter Xu >Sent: Thursday, June 8, 2023 11:41 PM >To: Jason Gunthorpe ; Liu, Yi L ; Duan, >Zhenzhong >Cc: Duan, Zhenzhong ; qemu- >de...@nongnu.org; m...@redhat.com; jasow...@redhat.com; >pbonz...@redhat.com; richard.hender...@linaro.org; edua...@habkost.net;

RE: [PATCH v3 5/5] intel_iommu: Optimize out some unnecessary UNMAP calls

2023-06-08 Thread Duan, Zhenzhong
>-Original Message- >From: Peter Xu >Sent: Friday, June 9, 2023 4:34 AM >To: Duan, Zhenzhong >Cc: qemu-devel@nongnu.org; m...@redhat.com; jasow...@redhat.com; >pbonz...@redhat.com; richard.hender...@linaro.org; edua...@habkost.net; >marcel.apfelb...@gmail.com;

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-08 Thread Chen, Jiqian
On 2023/6/9 00:41, Robert Beckett wrote: > > On 08/06/2023 03:56, Jiqian Chen wrote: >> After suspending and resuming guest VM, you will get >> a black screen, and the display can't come back. >> >> This is because when guest did suspending, it called >> into qemu to call virtio_gpu_gl_reset. In

RE: [PATCH v3 5/5] intel_iommu: Optimize out some unnecessary UNMAP calls

2023-06-08 Thread Duan, Zhenzhong
>-Original Message- >From: Peter Xu >Sent: Thursday, June 8, 2023 10:05 PM >To: Duan, Zhenzhong ; Jason Gunthorpe > >Cc: qemu-devel@nongnu.org; m...@redhat.com; jasow...@redhat.com; >pbonz...@redhat.com; richard.hender...@linaro.org; edua...@habkost.net; >marcel.apfelb...@gmail.com;

RE: [PATCH v3 0/5] Optimize UNMAP call and bug fix

2023-06-08 Thread Duan, Zhenzhong
>-Original Message- >From: Peter Xu >Sent: Thursday, June 8, 2023 11:54 PM >To: Duan, Zhenzhong >Cc: qemu-devel@nongnu.org; m...@redhat.com; jasow...@redhat.com; >pbonz...@redhat.com; richard.hender...@linaro.org; edua...@habkost.net; >marcel.apfelb...@gmail.com;

RE: [PATCH v3 4/5] intel_iommu: Fix address space unmap

2023-06-08 Thread Duan, Zhenzhong
>-Original Message- >From: Peter Xu >Sent: Thursday, June 8, 2023 9:48 PM >To: Duan, Zhenzhong >Cc: qemu-devel@nongnu.org; m...@redhat.com; jasow...@redhat.com; >pbonz...@redhat.com; richard.hender...@linaro.org; edua...@habkost.net; >marcel.apfelb...@gmail.com;

Re: Reducing vdpa migration downtime because of memory pin / maps

2023-06-08 Thread Jason Wang
On Fri, Jun 9, 2023 at 6:39 AM Si-Wei Liu wrote: > > > On 6/7/23 01:08, Eugenio Perez Martin wrote: > > On Wed, Jun 7, 2023 at 12:43 AM Si-Wei Liu wrote: > >> Sorry for reviving this old thread, I lost the best timing to follow up > >> on this while I was on vacation. I have been working on this

Re: [PATCH] vdpa: dont check vhost_vdpa->suspended when unsupported

2023-06-08 Thread Jason Wang
On Wed, Jun 7, 2023 at 11:37 PM Eugenio Perez Martin wrote: > > On Wed, Jun 7, 2023 at 11:09 AM Zhu Lingshan wrote: > > > > When read the state of a virtqueue, vhost_vdpa need > > to check whether the device is suspended. > > > > This commit verifies whether VHOST_BACKEND_F_SUSPEND is > >

Re: [PATCH v3 5/5] gitlab: support disabling job auto-run in upstream

2023-06-08 Thread Richard Henderson
On 6/8/23 09:40, Daniel P. Berrangé wrote: In forks QEMU_CI=1 can be used to create a pipeline but not auto-run any jobs. In upstream jobs always auto-run, which is equiv of QEMU_CI=2. This supports setting QEMU_CI=1 in upstream, to disable job auto-run. This can be used to preserve CI minutes

[PATCH v2 03/38] tests/multiarch: Add test-aes

2023-06-08 Thread Richard Henderson
Use a shared driver and backends for i386, aarch64, ppc64, riscv64. Signed-off-by: Richard Henderson --- tests/tcg/aarch64/test-aes.c| 58 tests/tcg/i386/test-aes.c | 68 + tests/tcg/ppc64/test-aes.c | 116 +++

[PATCH v2 32/38] crypto: Remove AES_shifts, AES_ishifts

2023-06-08 Thread Richard Henderson
These arrays are no longer used, replaced by AES_SH_*, AES_ISH_*. Signed-off-by: Richard Henderson --- include/crypto/aes.h | 4 crypto/aes.c | 14 -- 2 files changed, 18 deletions(-) diff --git a/include/crypto/aes.h b/include/crypto/aes.h index

[PATCH v2 04/38] target/arm: Move aesmc and aesimc tables to crypto/aes.c

2023-06-08 Thread Richard Henderson
We do not currently have a table in crypto/ for just MixColumns. Move both tables for consistency. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/crypto/aes.h | 6 ++ crypto/aes.c | 140

[PATCH v2 08/38] target/arm: Demultiplex AESE and AESMC

2023-06-08 Thread Richard Henderson
Split these helpers so that we are not passing 'decrypt' within the simd descriptor. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/helper.h | 2 ++ target/arm/tcg/sve.decode | 4 ++-- target/arm/tcg/crypto_helper.c | 37

[PATCH v2 31/38] target/ppc: Use aesdec_ISB_ISR_AK_IMC

2023-06-08 Thread Richard Henderson
This implements the VNCIPHER instruction. Signed-off-by: Richard Henderson --- target/ppc/int_helper.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 1e477924b7..834da80fe3 100644 ---

[PATCH v2 12/38] crypto: Add aesdec_ISB_ISR_AK

2023-06-08 Thread Richard Henderson
Add a primitive for InvSubBytes + InvShiftRows + AddRoundKey. Signed-off-by: Richard Henderson --- host/include/generic/host/aes-round.h | 4 +++ include/crypto/aes-round.h| 21 + crypto/aes.c | 43 +++ 3 files changed,

[PATCH v2 07/38] target/i386: Use aesenc_SB_SR_AK

2023-06-08 Thread Richard Henderson
This implements the AESENCLAST instruction. Signed-off-by: Richard Henderson --- target/i386/ops_sse.h | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h index fb63af7afa..63fdecbe03 100644 --- a/target/i386/ops_sse.h

[PATCH v2 21/38] target/arm: Use aesdec_IMC

2023-06-08 Thread Richard Henderson
This implements the AESIMC instruction. We have converted everything to crypto/aes-round.h; crypto/aes.h is no longer needed. Signed-off-by: Richard Henderson --- target/arm/tcg/crypto_helper.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff

[PATCH v2 29/38] target/riscv: Use aesdec_ISB_ISR_IMC_AK

2023-06-08 Thread Richard Henderson
This implements the AES64DSM instruction. This was the last use of aes64_operation and its support macros, so remove them all. Signed-off-by: Richard Henderson --- target/riscv/crypto_helper.c | 101 --- 1 file changed, 10 insertions(+), 91 deletions(-) diff

[PATCH v2 35/38] crypto: Unexport AES_*_rot, AES_TeN, AES_TdN

2023-06-08 Thread Richard Henderson
These arrays are no longer used outside of aes.c. Signed-off-by: Richard Henderson --- include/crypto/aes.h | 25 - crypto/aes.c | 33 + 2 files changed, 21 insertions(+), 37 deletions(-) diff --git a/include/crypto/aes.h

[PATCH v2 09/38] target/arm: Use aesenc_SB_SR_AK

2023-06-08 Thread Richard Henderson
This implements the AESE instruction. Signed-off-by: Richard Henderson --- target/arm/tcg/crypto_helper.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/target/arm/tcg/crypto_helper.c b/target/arm/tcg/crypto_helper.c index 75882d9ea3..00f3b21507

[PATCH v2 33/38] crypto: Implement aesdec_IMC with AES_imc_rot

2023-06-08 Thread Richard Henderson
This method uses one uint32_t * 256 table instead of 4, which means its data cache overhead is less. Signed-off-by: Richard Henderson --- crypto/aes.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/crypto/aes.c b/crypto/aes.c

[PATCH v2 11/38] target/riscv: Use aesenc_SB_SR_AK

2023-06-08 Thread Richard Henderson
This implements the AES64ES instruction. Signed-off-by: Richard Henderson --- target/riscv/crypto_helper.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/riscv/crypto_helper.c b/target/riscv/crypto_helper.c index 2ef30281b1..b072fed3e2 100644 ---

[PATCH v2 15/38] target/ppc: Use aesdec_ISB_ISR_AK

2023-06-08 Thread Richard Henderson
This implements the VNCIPHERLAST instruction. Signed-off-by: Richard Henderson --- target/ppc/int_helper.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 34257e9d76..15f07fca2b 100644 ---

[PATCH v2 19/38] crypto: Add aesdec_IMC

2023-06-08 Thread Richard Henderson
Add a primitive for InvMixColumns. Signed-off-by: Richard Henderson --- host/include/generic/host/aes-round.h | 2 + include/crypto/aes-round.h| 18 + crypto/aes.c | 57 +++ 3 files changed, 77 insertions(+) diff --git

[PATCH v2 14/38] target/arm: Use aesdec_ISB_ISR_AK

2023-06-08 Thread Richard Henderson
This implements the AESD instruction. Signed-off-by: Richard Henderson --- target/arm/tcg/crypto_helper.c | 37 +++--- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/target/arm/tcg/crypto_helper.c b/target/arm/tcg/crypto_helper.c index

[PATCH v2 22/38] target/riscv: Use aesdec_IMC

2023-06-08 Thread Richard Henderson
This implements the AES64IM instruction. Signed-off-by: Richard Henderson --- target/riscv/crypto_helper.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/target/riscv/crypto_helper.c b/target/riscv/crypto_helper.c index e61f7fe1e5..505166ce5a 100644 ---

[PATCH v2 34/38] crypto: Remove AES_imc

2023-06-08 Thread Richard Henderson
This array is no longer used. Signed-off-by: Richard Henderson --- include/crypto/aes.h | 7 -- crypto/aes.c | 264 --- 2 files changed, 271 deletions(-) diff --git a/include/crypto/aes.h b/include/crypto/aes.h index aa8b54065d..99209f51b9

[PATCH v2 38/38] host/include/ppc: Implement aes-round.h

2023-06-08 Thread Richard Henderson
Detect CRYPTO in cpuinfo; implement the accel hooks. Signed-off-by: Richard Henderson --- host/include/ppc/host/aes-round.h | 181 host/include/ppc/host/cpuinfo.h | 1 + host/include/ppc64/host/aes-round.h | 1 + util/cpuinfo-ppc.c | 8

[PATCH v2 06/38] crypto: Add aesenc_SB_SR_AK

2023-06-08 Thread Richard Henderson
Start adding infrastructure for accelerating guest AES. Begin with a SubBytes + ShiftRows + AddRoundKey primitive. Signed-off-by: Richard Henderson --- host/include/generic/host/aes-round.h | 16 ++ include/crypto/aes-round.h| 44 +++ crypto/aes.c

[PATCH v2 01/38] tcg/ppc: Define _CALL_AIX for clang on ppc64(be)

2023-06-08 Thread Richard Henderson
Restructure the ifdef ladder, separating 64-bit from 32-bit, and ensure _CALL_AIX is set for ELF v1. Fixes the build for ppc64 big-endian host with clang. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 23 --- 1 file changed, 16 insertions(+), 7

[PATCH v2 26/38] target/riscv: Use aesenc_SB_SR_MC_AK

2023-06-08 Thread Richard Henderson
This implements the AES64ESM instruction. Signed-off-by: Richard Henderson --- target/riscv/crypto_helper.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/riscv/crypto_helper.c b/target/riscv/crypto_helper.c index 505166ce5a..c036fe8632 100644 ---

[PATCH v2 24/38] target/i386: Use aesenc_SB_SR_MC_AK

2023-06-08 Thread Richard Henderson
This implements the AESENC instruction. Signed-off-by: Richard Henderson --- target/i386/ops_sse.h | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h index 893913ebf8..93a4e0cf16 100644 --- a/target/i386/ops_sse.h +++

[PATCH v2 28/38] target/i386: Use aesdec_ISB_ISR_IMC_AK

2023-06-08 Thread Richard Henderson
This implements the AESDEC instruction. Signed-off-by: Richard Henderson --- target/i386/ops_sse.h | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h index 93a4e0cf16..a0e425733f 100644 --- a/target/i386/ops_sse.h +++

[PATCH v2 23/38] crypto: Add aesenc_SB_SR_MC_AK

2023-06-08 Thread Richard Henderson
Add a primitive for SubBytes + ShiftRows + MixColumns + AddRoundKey. Signed-off-by: Richard Henderson --- host/include/generic/host/aes-round.h | 3 ++ include/crypto/aes-round.h| 21 ++ crypto/aes.c | 56 +++ 3 files

[PATCH v2 27/38] crypto: Add aesdec_ISB_ISR_IMC_AK

2023-06-08 Thread Richard Henderson
Add a primitive for InvSubBytes + InvShiftRows + InvMixColumns + AddRoundKey. Signed-off-by: Richard Henderson --- host/include/generic/host/aes-round.h | 3 ++ include/crypto/aes-round.h| 21 ++ crypto/aes.c | 56 +++ 3

[PATCH v2 30/38] crypto: Add aesdec_ISB_ISR_AK_IMC

2023-06-08 Thread Richard Henderson
Add a primitive for InvSubBytes + InvShiftRows + AddRoundKey + InvMixColumns. Signed-off-by: Richard Henderson --- host/include/generic/host/aes-round.h | 3 +++ include/crypto/aes-round.h| 21 + crypto/aes.c | 14 ++ 3 files

[PATCH v2 18/38] target/arm: Use aesenc_MC

2023-06-08 Thread Richard Henderson
This implements the AESMC instruction. Signed-off-by: Richard Henderson --- target/arm/tcg/crypto_helper.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/target/arm/tcg/crypto_helper.c b/target/arm/tcg/crypto_helper.c index d2cb74e7fc..1952aaac58 100644 ---

[PATCH v2 36/38] host/include/i386: Implement aes-round.h

2023-06-08 Thread Richard Henderson
Detect AES in cpuinfo; implement the accel hooks. Signed-off-by: Richard Henderson --- host/include/i386/host/aes-round.h | 152 +++ host/include/i386/host/cpuinfo.h | 1 + host/include/x86_64/host/aes-round.h | 1 + util/cpuinfo-i386.c | 3 +

[PATCH v2 16/38] target/riscv: Use aesdec_ISB_ISR_AK

2023-06-08 Thread Richard Henderson
This implements the AES64DS instruction. Signed-off-by: Richard Henderson --- target/riscv/crypto_helper.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/riscv/crypto_helper.c b/target/riscv/crypto_helper.c index b072fed3e2..e61f7fe1e5 100644 ---

[PATCH v2 37/38] host/include/aarch64: Implement aes-round.h

2023-06-08 Thread Richard Henderson
Detect AES in cpuinfo; implement the accel hooks. Signed-off-by: Richard Henderson --- meson.build | 9 ++ host/include/aarch64/host/aes-round.h | 205 ++ host/include/aarch64/host/cpuinfo.h | 1 + util/cpuinfo-aarch64.c|

[PATCH v2 17/38] crypto: Add aesenc_MC

2023-06-08 Thread Richard Henderson
Add a primitive for MixColumns. Signed-off-by: Richard Henderson --- host/include/generic/host/aes-round.h | 2 + include/crypto/aes-round.h| 18 crypto/aes.c | 59 +++ 3 files changed, 79 insertions(+) diff --git

[PATCH v2 10/38] target/ppc: Use aesenc_SB_SR_AK

2023-06-08 Thread Richard Henderson
This implements the VCIPHERLAST instruction. Signed-off-by: Richard Henderson --- target/ppc/int_helper.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index d97a7f1f28..34257e9d76 100644 ---

[PATCH v2 20/38] target/i386: Use aesdec_IMC

2023-06-08 Thread Richard Henderson
This implements the AESIMC instruction. Signed-off-by: Richard Henderson --- target/i386/ops_sse.h | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h index 0a37bde595..893913ebf8 100644 --- a/target/i386/ops_sse.h +++

[PATCH v2 25/38] target/ppc: Use aesenc_SB_SR_MC_AK

2023-06-08 Thread Richard Henderson
This implements the VCIPHER instruction. Signed-off-by: Richard Henderson --- target/ppc/int_helper.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/target/ppc/int_helper.c b/target/ppc/int_helper.c index 15f07fca2b..1e477924b7 100644 ---

[PATCH v2 13/38] target/i386: Use aesdec_ISB_ISR_AK

2023-06-08 Thread Richard Henderson
This implements the AESDECLAST instruction. Signed-off-by: Richard Henderson --- target/i386/ops_sse.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h index 63fdecbe03..0a37bde595 100644 --- a/target/i386/ops_sse.h +++

[PATCH v2 00/38] crypto: Provide aes-round.h and host accel

2023-06-08 Thread Richard Henderson
Inspired by Ard Biesheuvel's RFC patches for accelerating AES under emulation, provide a set of primitives that maps between the guest and host fragments. There is a small guest correctness test case. I think the end result is quite a bit cleaner, since the logic is now centralized, rather than

[PATCH v2 02/38] util: Add cpuinfo-ppc.c

2023-06-08 Thread Richard Henderson
Move the code from tcg/. Fix a bug in that PPC_FEATURE2_ARCH_3_10 is actually spelled PPC_FEATURE2_ARCH_3_1. Signed-off-by: Richard Henderson --- host/include/ppc/host/cpuinfo.h | 29 host/include/ppc64/host/cpuinfo.h | 1 + tcg/ppc/tcg-target.h | 16 -

[PATCH v2 05/38] crypto/aes: Add constants for ShiftRows, InvShiftRows

2023-06-08 Thread Richard Henderson
These symbols will avoid the indirection through memory when fully unrolling some new primitives. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- crypto/aes.c | 50 -- 1 file changed, 48 insertions(+), 2 deletions(-)

Re: [PATCH 3/9] disas/riscv: Move types/constants to new header file

2023-06-08 Thread LIU Zhiwei
On 2023/5/30 21:18, Christoph Muellner wrote: From: Christoph Müllner In order to enable vendor disassembler support, we need to move types and constants into a header file so that other compilation units can use them as well. This patch does not introduce any functional changes.

Fwd: QEMU AVR Patch - Correct handling of AVR interrupts

2023-06-08 Thread Adecy
-- Forwarded message - De : Adecy Date: jeu. 1 juin 2023 à 21:34 Subject: QEMU AVR Patch - Correct handling of AVR interrupts To: Hello, I would like to submit the attached patch. Best regards From c872c0f164a5ab595cf347d098430301e628b741 Mon Sep 17 00:00:00 2001 From: Lucas

Re: [PATCH v3 5/5] intel_iommu: Optimize out some unnecessary UNMAP calls

2023-06-08 Thread Jason Gunthorpe
On Thu, Jun 08, 2023 at 03:53:23PM -0400, Peter Xu wrote: > Though that does look slightly special, because the whole empty UNMAP > region can be seen as a hole too; not sure when that -ENOENT will be useful > if qemu should always bypass it anyway. Indeed not a problem to qemu. It sounds like

Re: [PATCH v4 0/7] Resolve TYPE_PIIX3_XEN_DEVICE

2023-06-08 Thread Stefano Stabellini
On Thu, 8 Jun 2023, Stefano Stabellini wrote: > On Mon, 5 Jun 2023, Bernhard Beschow wrote: > > Am 22. Mai 2023 15:42:03 UTC schrieb Bernhard Beschow : > > > > > > > > >Am 15. Mai 2023 20:52:40 UTC schrieb Stefano Stabellini > > >: > > >>On Sat, 13 May 2023, Bernhard Beschow wrote: > > >>> Am 21.

Re: [EXT] Re: Concept of LD-ID in QEMU

2023-06-08 Thread Shesha Bhushan Sreenivasamurthy
Hi, Thinking a bit more, LD in CXL are PCIe endpoint functions. Therefore 1-1 mapping of cxl-i2c device per PCIe device is sufficient, and we use function number in BDF as the LD-ID. Does it makes sense ? From: Jonathan Cameron Sent: Thursday, June 8, 2023 3:36 AM To: Shesha Bhushan

Re: [QEMU][PATCH v6 4/4] tests/qtest: Introduce tests for Xilinx VERSAL CANFD controller

2023-06-08 Thread Vikram Garhwal
Hi Peter, Thanks for sharing the details. I will fix these and send a follow up patch soon. On 6/8/23 2:42 AM, Peter Maydell wrote: On Tue, 30 May 2023 at 22:23, Vikram Garhwal wrote: The QTests perform three tests on the Xilinx VERSAL CANFD controller: Tests the CANFD controllers in

[PATCH 27/42] migration-test: Create guest_extra_opts()

2023-06-08 Thread Juan Quintela
If a guest has extra command line options, add it with this. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index

[PATCH 25/42] migration-test: We were not waiting for "target" to finish

2023-06-08 Thread Juan Quintela
This could create the problem that we start the "second" target before the first one has removed the serial socket. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c

[PATCH 26/42] migration-test: create guest_use_shmem()

2023-06-08 Thread Juan Quintela
So now this is the same that everything else. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 46 +--- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index

[PATCH 19/42] migration-test: Create guest before calling test_precopy_common()

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 122 +-- 1 file changed, 89 insertions(+), 33 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 14f4fd579b..528dc571ef 100644 ---

[PATCH 33/42] migration-test: Remove connect_uri

2023-06-08 Thread Juan Quintela
We are using to->uri in everywhere know. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 52 +--- 1 file changed, 13 insertions(+), 39 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index

[PATCH 03/42] migration-test: simplify shmem_opts handling

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 73b2f01427..95ccc9bce7 100644 --- a/tests/qtest/migration-test.c +++

[PATCH 41/42] migration-test: Move functions to migration-helpers.c

2023-06-08 Thread Juan Quintela
This will help on next patch to split vcpu-dirty-limit-test.c Signed-off-by: Juan Quintela --- tests/qtest/migration-helpers.h | 39 + tests/qtest/migration-helpers.c | 242 + tests/qtest/migration-test.c| 260 3 files

[PATCH 13/42] migration-test: Check for shared memory like for everything else

2023-06-08 Thread Juan Quintela
Makes things easier and cleaner. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index daaf5cd71a..5837060138 100644 ---

[PATCH 21/42] migration-test: Move common guest code to guest_create()

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 104 ++- 1 file changed, 55 insertions(+), 49 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index a18b3ce1e2..9671c4c6e5 100644 ---

[PATCH 36/42] migration-test: Remove unused listen_uri

2023-06-08 Thread Juan Quintela
Only remaining use was to transfer "defer". But we make "defer" the default if no uri is given. Once there Remove the uri parameter to test_migrate_start(). Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 34 ++ 1 file changed, 10 insertions(+),

[PATCH 12/42] migration-test: Enable back ignore-shared test

2023-06-08 Thread Juan Quintela
It failed on aarch64 tcg, lets see if that is still the case. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 7178c8e679..daaf5cd71a 100644 ---

[PATCH 40/42] migration-test: Create migrate_incoming() function

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 1a03077166..d8479abb4a 100644 --- a/tests/qtest/migration-test.c +++

[PATCH 39/42] migration-test: Unfold test_migrate_end() into three functions

2023-06-08 Thread Juan Quintela
guest_destroy(from) test_migrate_check(from, to): depending of test value guest_destroy(to); This mimics previous change that split test_migrate_start() Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 63 1 file changed, 35 insertions(+), 28

[PATCH 22/42] migration-test: Create guest_use_dirty_log()

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 9671c4c6e5..69a3728e4b 100644 --- a/tests/qtest/migration-test.c +++

[PATCH 07/42] migration-test: Create kvm_opts

2023-06-08 Thread Juan Quintela
So arch_dirty_ring option becomes one option like the others. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index cd49c249d3..1fa815fa66

[PATCH 28/42] migration-test: Create guest_hide_stderr()

2023-06-08 Thread Juan Quintela
So we can handle in a single place all the error output handling. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 115 --- 1 file changed, 54 insertions(+), 61 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c

[PATCH 11/42] migration-test: Update test_ignore_shared to use args

2023-06-08 Thread Juan Quintela
It missed this treatment: commit 11f1a4ce14803f15d59cff42a4cfb7ac50d36bd0 Author: Juan Quintela Date: Mon Nov 29 18:57:51 2021 +0100 migration-test: Check for shared memory like for everything else Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 5 - 1 file changed,

[PATCH 16/42] migration-test: Create do_migrate()

2023-06-08 Thread Juan Quintela
We called migrate_qmp() in lot of places. And there are tricks like changing tcp address with the right port. Only two callers remaining: - postcopy resume: It needs to play with the qmp. - baddest: We want to do a unvalid URI. For that we need to do it by hand. Signed-off-by: Juan Quintela

[PATCH 15/42] migration-test: migrate_postcopy_prepare() always return 0

2023-06-08 Thread Juan Quintela
So make it return void. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index b57811da75..e623c43957 100644 ---

[PATCH 30/42] migration-test: Hooks also need GuestState

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 198 +++ 1 file changed, 86 insertions(+), 112 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index a0ed8eb05a..6438379dcf 100644 ---

[PATCH 10/42] migration-test: dirtylimit checks for x86_64 arch before

2023-06-08 Thread Juan Quintela
So no need to assert we are in x86_64. Once there, refactor the function to remove useless variables. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c

[PATCH 29/42] migration-test: Create the migration unix socket by guest

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 50 +++- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index c70b08e7db..a0ed8eb05a 100644 ---

[PATCH 09/42] migration-test: Add bootfile_create/delete() functions

2023-06-08 Thread Juan Quintela
The bootsector code is read only from the guest (otherwise we are going to have problems with it being read from both source and destination). Create a single copy for all the tests. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 50 ++-- 1 file

[PATCH 08/42] migration-test: bootpath is the same for all tests and for all archs

2023-06-08 Thread Juan Quintela
So just make it a global variable. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 1fa815fa66..6453216e4e 100644 ---

[PATCH 35/42] migration-test: Set uri for tcp tests with guest_set_uri()

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 76a5f8d353..8d497d0940 100644 --- a/tests/qtest/migration-test.c +++

[PATCH 37/42] migration-test: Create get_event GuestState variable

2023-06-08 Thread Juan Quintela
So we don't use a global variable for events. We use one by guest. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 48 +--- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/tests/qtest/migration-test.c

[PATCH 23/42] migration-test: Move serial to GuestState

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 65 1 file changed, 37 insertions(+), 28 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 69a3728e4b..01ab51a391 100644 ---

[PATCH 34/42] migration-test: Use new schema for all tests that use unix sockets

2023-06-08 Thread Juan Quintela
Once there we can remove the now unused cleanup() function. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 39 ++-- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index

[PATCH 24/42] migration-test: Re-enable multifd_cancel test

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 01ab51a391..9f86d9bc80 100644 --- a/tests/qtest/migration-test.c +++

[PATCH 32/42] migration-test: Create guest_set_uri()

2023-06-08 Thread Juan Quintela
We need this for migration-incoming cases. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 0afe871cfb..f029258f67 100644 ---

[PATCH 17/42] migration-test: Introduce GuestState

2023-06-08 Thread Juan Quintela
It will contain all the information that we need for a guest. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 330 +++ 1 file changed, 180 insertions(+), 150 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c

[PATCH 38/42] migration-test: Create guest_realize()

2023-06-08 Thread Juan Quintela
So we can get rid of the duplication in test_migrate_start(). - unfold test_migrate_start() because it is just two calls to guest_realize(). - make dirty_limit test use guest_realize() - get rid of MigrateStart as now it is empty. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c

[PATCH 31/42] migration-test: Preffer to->uri to uri parameter for migration

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 6438379dcf..0afe871cfb 100644 --- a/tests/qtest/migration-test.c +++

[PATCH 42/42] migration-test: Split vcpu-dirty-limit-test

2023-06-08 Thread Juan Quintela
It is not really a migration test, it just happens that migration infrastructure is useful to it. Once there, put migration-helpers.* as maintained. Signed-off-by: Juan Quintela --- MAINTAINERS | 3 +- tests/qtest/migration-test.c| 246 --

[PATCH 14/42] migration-test: test_migrate_start() always return 0

2023-06-08 Thread Juan Quintela
So make it return void instead and adjust all callers. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 38 ++-- 1 file changed, 10 insertions(+), 28 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index

[PATCH 04/42] migration-test: Make machine_opts regular with other options

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 95ccc9bce7..2490035569 100644 --- a/tests/qtest/migration-test.c +++

[PATCH 05/42] migration-test: Create arch_opts

2023-06-08 Thread Juan Quintela
This will contain the options needed for both source and target. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index

[PATCH 20/42] migration-test: Create guest before calling test_postcopy_common()

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 26 +- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 528dc571ef..a18b3ce1e2 100644 --- a/tests/qtest/migration-test.c +++

[PATCH 18/42] migration-test: Create guest before calling do_test_validate_uuid()

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 5cfc7a6ebc..14f4fd579b 100644 --- a/tests/qtest/migration-test.c +++

[PATCH 00/42] Migration test refactoring

2023-06-08 Thread Juan Quintela
Hi This series do a lot of much neededs cleanups and fixes to migration-test: - We make source and target machines coherent/constent - We make all command line options consistent - We split test_migrate_start() and test_migrate_end() into: * guest_start() from from and to. It is the same

[PATCH 06/42] migration-test: machine_opts is really arch specific

2023-06-08 Thread Juan Quintela
And it needs to be in both source and target, so put it on arch_opts. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index

[PATCH 01/42] migration-test: Be consistent for ppc

2023-06-08 Thread Juan Quintela
It makes no sense that we don't have the same configuration on both sides. Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index b0c355bbd9..c5e0c69c6b

[PATCH 02/42] migration-test: Make ignore_stderr regular with other options

2023-06-08 Thread Juan Quintela
Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index c5e0c69c6b..73b2f01427 100644 --- a/tests/qtest/migration-test.c +++

  1   2   3   4   >