Re: [PATCH v3 1/6] Add an "info pg" command that prints the current page tables

2024-06-11 Thread Don Porter
On 6/7/24 3:16 AM, Daniel P. Berrangé wrote: On Thu, Jun 06, 2024 at 10:02:48AM -0400, Don Porter wrote: Please don't add new HMP commands that don't have a QMP equivalent. This should be adding an 'x-query-pg' QMP command, which returns HumanReadableText, and then call that from the HMP There

Re: [RFC PATCH v2 0/2] ui/gtk: Introduce new param - Connectors

2024-06-11 Thread Kim, Dongwon
Hi Marc-André, On 6/5/2024 12:26 AM, Marc-André Lureau wrote: Hi On Tue, Jun 4, 2024 at 9:59 PM Kim, Dongwon > wrote: Hi Marc-André, On 6/4/2024 3:37 AM, Marc-André Lureau wrote: > Hi > > On Fri, May 31, 2024 at 11:00 PM

Re: [RFC PATCH v1 1/6] build-sys: Add rust feature option

2024-06-11 Thread Stefan Hajnoczi
On Tue, 11 Jun 2024 at 13:54, Manos Pitsidianakis wrote: > > On Tue, 11 Jun 2024 at 17:05, Stefan Hajnoczi wrote: > > > > On Mon, Jun 10, 2024 at 09:22:36PM +0300, Manos Pitsidianakis wrote: > > > Add options for Rust in meson_options.txt, meson.build, configure to > > > prepare for adding Rust

Re: [PATCH v4 2/4] vvfat: Fix usage of `info.file.offset`

2024-06-11 Thread Kevin Wolf
Am 11.06.2024 um 18:22 hat Amjad Alsharafi geschrieben: > On Tue, Jun 11, 2024 at 04:30:53PM +0200, Kevin Wolf wrote: > > Am 11.06.2024 um 14:31 hat Amjad Alsharafi geschrieben: > > > On Mon, Jun 10, 2024 at 06:49:43PM +0200, Kevin Wolf wrote: > > > > Am 05.06.2024 um 02:58 hat Amjad Alsharafi

Re: [RFC PATCH v1 1/6] build-sys: Add rust feature option

2024-06-11 Thread Manos Pitsidianakis
On Tue, 11 Jun 2024 at 17:05, Stefan Hajnoczi wrote: > > On Mon, Jun 10, 2024 at 09:22:36PM +0300, Manos Pitsidianakis wrote: > > Add options for Rust in meson_options.txt, meson.build, configure to > > prepare for adding Rust code in the followup commits. > > > > `rust` is a reserved meson name,

Re: [PATCH v4 5/5] iotests: add backup-discard-source

2024-06-11 Thread Kevin Wolf
Am 13.03.2024 um 16:28 hat Vladimir Sementsov-Ogievskiy geschrieben: > Add test for a new backup option: discard-source. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Fiona Ebner > Tested-by: Fiona Ebner This test fails for me, and it already does so after this commit that

Re: [PATCH v1] virtio-iommu: add error check before assert

2024-06-11 Thread Manos Pitsidianakis
On Tue, 11 Jun 2024 at 18:01, Philippe Mathieu-Daudé wrote: > > On 11/6/24 14:23, Manos Pitsidianakis wrote: > > A fuzzer case discovered by Zheyu Ma causes an assert failure. > > > > Add a check before the assert, and respond with an error before moving > > on to the next queue element. > > > >

[PULL 3/8] aio: warn about iohandler_ctx special casing

2024-06-11 Thread Kevin Wolf
From: Stefan Hajnoczi The main loop has two AioContexts: qemu_aio_context and iohandler_ctx. The main loop runs them both, but nested aio_poll() calls on qemu_aio_context exclude iohandler_ctx. Which one should qemu_get_current_aio_context() return when called from the main loop? Document that

[PULL 6/8] linux-aio: add IO_CMD_FDSYNC command support

2024-06-11 Thread Kevin Wolf
From: Prasad Pandit Libaio defines IO_CMD_FDSYNC command to sync all outstanding asynchronous I/O operations, by flushing out file data to the disk storage. Enable linux-aio to submit such aio request. When using aio=native without fdsync() support, QEMU creates pthreads, and destroying these

[PULL 0/8] Block layer patches

2024-06-11 Thread Kevin Wolf
The following changes since commit 80e8f0602168f451a93e71cbb1d59e93d745e62e: Merge tag 'bsd-user-misc-2024q2-pull-request' of gitlab.com:bsdimp/qemu into staging (2024-06-09 11:21:55 -0700) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[PULL 4/8] qemu-io: add cvtnum() error handling for zone commands

2024-06-11 Thread Kevin Wolf
From: Stefan Hajnoczi cvtnum() parses positive int64_t values and returns a negative errno on failure. Print errors and return early when cvtnum() fails. While we're at it, also reject nr_zones values greater or equal to 2^32 since they cannot be represented. Reported-by: Peter Maydell Cc:

[PULL 5/8] block/copy-before-write: use uint64_t for timeout in nanoseconds

2024-06-11 Thread Kevin Wolf
From: Fiona Ebner rather than the uint32_t for which the maximum is slightly more than 4 seconds and larger values would overflow. The QAPI interface allows specifying the number of seconds, so only values 0 to 4 are safe right now, other values lead to a much lower timeout than a user expects.

[PULL 8/8] crypto/block: drop qcrypto_block_open() n_threads argument

2024-06-11 Thread Kevin Wolf
From: Stefan Hajnoczi The n_threads argument is no longer used since the previous commit. Remove it. Signed-off-by: Stefan Hajnoczi Message-ID: <20240527155851.892885-3-stefa...@redhat.com> Reviewed-by: Kevin Wolf Acked-by: Daniel P. Berrangé Signed-off-by: Kevin Wolf ---

[PULL 2/8] Revert "monitor: use aio_co_reschedule_self()"

2024-06-11 Thread Kevin Wolf
From: Stefan Hajnoczi Commit 1f25c172f837 ("monitor: use aio_co_reschedule_self()") was a code cleanup that uses aio_co_reschedule_self() instead of open coding coroutine rescheduling. Bug RHEL-34618 was reported and Kevin Wolf identified the root cause. I missed that aio_co_reschedule_self()

[PULL 1/8] block: drop force_dup parameter of raw_reconfigure_getfd()

2024-06-11 Thread Kevin Wolf
From: "Denis V. Lunev via" Since commit 72373e40fbc, this parameter is always passed as 'false' from the caller. Signed-off-by: Denis V. Lunev CC: Andrey Zhadchenko CC: Kevin Wolf CC: Hanna Reitz Message-ID: <20240430170213.148558-1-...@openvz.org> Reviewed-by: Kevin Wolf Signed-off-by:

[PULL 7/8] block/crypto: create ciphers on demand

2024-06-11 Thread Kevin Wolf
From: Stefan Hajnoczi Ciphers are pre-allocated by qcrypto_block_init_cipher() depending on the given number of threads. The -device virtio-blk-pci,iothread-vq-mapping= feature allows users to assign multiple IOThreads to a virtio-blk device, but the association between the virtio-blk device and

[PATCH 0/1] i386/tcg fix for IRET as used in dotnet runtime

2024-06-11 Thread Robert R. Henry
This patch fixes the i386/tcg implementation of the IRET instruction so that IRET can return from user space to user space, as used by the dotnet runtime to switch threads. This fixes https://gitlab.com/qemu-project/qemu/-/issues/249 I debugged this issue 4+ years ago, and wrote this patch then.

[PATCH 1/1] i386/tcg: Allow IRET from user mode to user mode for dotnet runtime

2024-06-11 Thread Robert R. Henry
This fixes a bug wherein i386/tcg assumed an interrupt return using the IRET instruction was always returning from kernel mode to either kernel mode or user mode. This assumption is violated when IRET is used as a clever way to restore thread state, as for example in the dotnet runtime. There,

Re: [PATCH v4 2/4] vvfat: Fix usage of `info.file.offset`

2024-06-11 Thread Amjad Alsharafi
On Tue, Jun 11, 2024 at 04:30:53PM +0200, Kevin Wolf wrote: > Am 11.06.2024 um 14:31 hat Amjad Alsharafi geschrieben: > > On Mon, Jun 10, 2024 at 06:49:43PM +0200, Kevin Wolf wrote: > > > Am 05.06.2024 um 02:58 hat Amjad Alsharafi geschrieben: > > > > The field is marked as "the offset in the file

Re: [PATCH v3 03/13] hw/riscv: add RISC-V IOMMU base emulation

2024-06-11 Thread Jason Chien
Hi Daniel, On 2024/5/24 上午 01:39, Daniel Henrique Barboza wrote: From: Tomasz Jeznach The RISC-V IOMMU specification is now ratified as-per the RISC-V international process. The latest frozen specifcation can be found at:

Re: about QEMU TLS

2024-06-11 Thread Yu Zhang
Hello Daniel and all, When I was using TLS encryption for VM live-migration, I noticed one thing: the migration works regardless of the "endpoint" setting (that is: either "endpoint=server", or "endpoint=client") on the target server. The line I added is: "-object

Re: [PATCH v2 4/7] migration/multifd: Add UADK initialization

2024-06-11 Thread Zhangfei Gao
On Tue, 11 Jun 2024 at 02:35, Fabiano Rosas wrote: > > Shameer Kolothum via writes: > > > Initialize UADK session and allocate buffers required. The actual > > compression/decompression will only be done in a subsequent patch. > > > > Signed-off-by: Shameer Kolothum > > Reviewed-by: Fabiano

Re: [PATCH v2 6/7] migration/multifd: Switch to no compression when no hardware support

2024-06-11 Thread Zhangfei Gao
On Fri, 7 Jun 2024 at 21:54, Shameer Kolothum wrote: > > Send raw packets over if UADK hardware support is not available. This is to > satisfy Qemu qtest CI which may run on platforms that don't have UADK > hardware support. Subsequent patch will add support for uadk migration > qtest. > >

Re: [PATCH v2 5/7] migration/multifd: Add UADK based compression and decompression

2024-06-11 Thread Zhangfei Gao
On Fri, 7 Jun 2024 at 21:54, Shameer Kolothum wrote: > > Uses UADK wd_do_comp_sync() API to (de)compress a normal page using > hardware accelerator. > > Reviewed-by: Fabiano Rosas > Signed-off-by: Shameer Kolothum Reviewed-by: Zhangfei Gao

Re: [PATCH v2 3/7] migration/multifd: add uadk compression framework

2024-06-11 Thread Zhangfei Gao
On Fri, 7 Jun 2024 at 21:54, Shameer Kolothum wrote: > > Adds the skeleton to support uadk compression method. > Complete functionality will be added in subsequent patches. > > Acked-by: Markus Armbruster > Reviewed-by: Fabiano Rosas > Signed-off-by: Shameer Kolothum Reviewed-by: Zhangfei Gao

Re: [PATCH v2 2/7] configure: Add uadk option

2024-06-11 Thread Zhangfei Gao
On Fri, 7 Jun 2024 at 21:54, Shameer Kolothum wrote: > > Add --enable-uadk and --disable-uadk options to enable and disable > UADK compression accelerator. This is for using UADK based hardware > accelerators for live migration. > > Reviewed-by: Fabiano Rosas > Signed-off-by: Shameer Kolothum

Re: [PATCH v2 1/7] docs/migration: add uadk compression feature

2024-06-11 Thread Zhangfei Gao
On Fri, 7 Jun 2024 at 21:54, Shameer Kolothum wrote: > > Document UADK(User Space Accelerator Development Kit) library details > and how to use that for migration. > > Signed-off-by: Shameer Kolothum Good job, thanks Shameer Reviewed-by: Zhangfei Gao

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Pierrick Bouvier
On 6/11/24 02:21, Alex Bennée wrote: Pierrick Bouvier writes: On 6/10/24 13:29, Manos Pitsidianakis wrote: On Mon, 10 Jun 2024 22:37, Pierrick Bouvier wrote: Hello Manos, Excellent work, and thanks for posting this RFC! IMHO, having patches 2 and 5 splitted is a bit confusing, and

Re: Re: [PATCH v5 00/10] Support persistent reservation operations

2024-06-11 Thread Stefan Hajnoczi
On Mon, Jun 10, 2024 at 07:55:20PM -0700, 卢长奇 wrote: > Hi, > > Sorry, I explained it in patch2 and forgot to reply your email. > > The existing PRManager only works with local scsi devices. This series > will completely decouple devices and drivers. The device can not only be > scsi, but also

Re: [PATCH v1] virtio-iommu: add error check before assert

2024-06-11 Thread Philippe Mathieu-Daudé
On 11/6/24 14:23, Manos Pitsidianakis wrote: A fuzzer case discovered by Zheyu Ma causes an assert failure. Add a check before the assert, and respond with an error before moving on to the next queue element. To reproduce the failure: cat << EOF | \ qemu-system-x86_64 \ -display none -machine

Re: [PATCH v2 3/3] hw/arm/virt: allow creation of a second NonSecure UART

2024-06-11 Thread Philippe Mathieu-Daudé
On 10/6/24 18:23, Peter Maydell wrote: For some use-cases, it is helpful to have more than one UART available to the guest. If the second UART slot is not already used for a TrustZone Secure-World-only UART, create it as a NonSecure UART only when the user provides a serial backend (e.g. via a

Re: [PATCH v4 2/4] vvfat: Fix usage of `info.file.offset`

2024-06-11 Thread Kevin Wolf
Am 11.06.2024 um 14:31 hat Amjad Alsharafi geschrieben: > On Mon, Jun 10, 2024 at 06:49:43PM +0200, Kevin Wolf wrote: > > Am 05.06.2024 um 02:58 hat Amjad Alsharafi geschrieben: > > > The field is marked as "the offset in the file (in clusters)", but it > > > was being used like this > > >

[PULL 15/25] target/i386: finish converting 0F AE to the new decoder

2024-06-11 Thread Paolo Bonzini
This is already partly implemented due to VLDMXCSR and VSTMXCSR; finish the job. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 7 ++ target/i386/tcg/translate.c | 188 --- target/i386/tcg/decode-new.c.inc |

[PULL 18/25] target/i386: convert non-grouped, helper-based 2-byte opcodes

2024-06-11 Thread Paolo Bonzini
These have very simple generators and no need for complex group decoding. Apart from LAR/LSL which are simplified to use gen_op_deposit_reg_v and movcond, the code is generally lifted from translate.c into the generators. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini ---

[PULL 20/25] target/i386: adapt gen_shift_count for SHLD/SHRD

2024-06-11 Thread Paolo Bonzini
SHLD/SHRD can have 3 register operands - s->T0, s->T1 and either 1 or CL - and therefore decode->op[2] is taken by the low part of the register being shifted. Pass X86_OP_* to gen_shift_count from its current callers and hardcode cpu_regs[R_ECX] as the shift count. Reviewed-by: Richard Henderson

[PULL 13/25] target/i386: convert MOV from/to CR and DR to new decoder

2024-06-11 Thread Paolo Bonzini
Complete implementation of C and D operand types, then the operations are just MOVs. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 79 target/i386/tcg/decode-new.c.inc | 53 +++--

[PULL 08/25] target/i386: put BLS* input in T1, use generic flag writeback

2024-06-11 Thread Paolo Bonzini
This makes for easier cpu_cc_* setup, and not using set_cc_op() should come in handy if QEMU ever implements APX. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.c.inc | 4 ++-- target/i386/tcg/emit.c.inc | 24 +--- 2 files

[PULL 07/25] target/i386: rewrite flags writeback for ADCX/ADOX

2024-06-11 Thread Paolo Bonzini
Avoid using set_cc_op() in preparation for implementing APX; treat CC_OP_EFLAGS similar to the case where we have the "opposite" cc_op (CC_OP_ADOX for ADCX and CC_OP_ADCX for ADOX), except the resulting cc_op is not CC_OP_ADCOX. This is written easily as two "if"s, whose conditions are both false

[PULL 01/25] scsi-disk: Fix crash for VM configured with USB CDROM after live migration

2024-06-11 Thread Paolo Bonzini
From: Hyman Huang For VMs configured with the USB CDROM device: -drive file=/path/to/local/file,id=drive-usb-disk0,media=cdrom,readonly=on... -device usb-storage,drive=drive-usb-disk0,id=usb-disk0... QEMU process may crash after live migration, to reproduce the issue, configure VM (Guest OS

[PULL 10/25] target/i386: change X86_ENTRYwr to use T0, use it for moves

2024-06-11 Thread Paolo Bonzini
Just like X86_ENTRYr, X86_ENTRYwr is easily changed to use only T0. In this case, the motivation is to use it for the MOV instruction family. The case when you need to preserve the input value is the odd one, as it is used basically only for BLS* instructions. Reviewed-by: Richard Henderson

[PULL 06/25] target/i386: remove CPUX86State argument from generator functions

2024-06-11 Thread Paolo Bonzini
CPUX86State argument would only be used to fetch bytes, but that has to be done before the generator function is called. So remove it, and all temptation together with it. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 2 +-

[PULL 09/25] target/i386: change X86_ENTRYr to use T0

2024-06-11 Thread Paolo Bonzini
I am not sure why I made it use T1. It is a bit more symmetric with respect to X86_ENTRYwr (which uses T0 for the "w"ritten operand and T1 for the "r"ead operand), but it is also less flexible because it does not let you apply zextT0/sextT0. Reviewed-by: Richard Henderson Signed-off-by: Paolo

[PULL 00/25] target/i386, SCSI changes for 2024-06-11

2024-06-11 Thread Paolo Bonzini
The following changes since commit 80e8f0602168f451a93e71cbb1d59e93d745e62e: Merge tag 'bsd-user-misc-2024q2-pull-request' of gitlab.com:bsdimp/qemu into staging (2024-06-09 11:21:55 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for

[PULL 25/25] target/i386: SEV: do not assume machine->cgs is SEV

2024-06-11 Thread Paolo Bonzini
There can be other confidential computing classes that are not derived from sev-common. Avoid aborting when encountering them. Signed-off-by: Paolo Bonzini --- target/i386/sev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index

[PULL 11/25] target/i386: replace NoSeg special with NoLoadEA

2024-06-11 Thread Paolo Bonzini
This is a bit more generic, as it can be applied to MPX as well. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 5 +++-- target/i386/tcg/decode-new.c.inc | 12 target/i386/tcg/emit.c.inc | 3 ++- 3 files changed, 9

[PULL 24/25] target/i386: convert CMPXCHG to new decoder

2024-06-11 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 79 target/i386/tcg/decode-new.c.inc | 3 +- target/i386/tcg/emit.c.inc | 51 + 3 files changed, 53 insertions(+), 80 deletions(-) diff

[PULL 12/25] target/i386: fix processing of intercept 0 (read CR0)

2024-06-11 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 1 + target/i386/tcg/decode-new.c.inc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/target/i386/tcg/decode-new.h b/target/i386/tcg/decode-new.h index

[PULL 21/25] target/i386: convert SHLD/SHRD to new decoder

2024-06-11 Thread Paolo Bonzini
Use the same flag generation code as SHL and SHR, but use the existing gen_shiftd_rm_T1 function to compute the result as well as CC_SRC. Decoding-wise, SHLD/SHRD by immediate count as a 4 operand instruction because s->T0 and s->T1 actually occupy three op slots. The infrastructure used by

[PULL 19/25] target/i386: pull load/writeback out of gen_shiftd_rm_T1

2024-06-11 Thread Paolo Bonzini
Use gen_ld_modrm/gen_st_modrm, moving them and gen_shift_flags to the caller. This way, gen_shiftd_rm_T1 becomes something that the new decoder can call. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 55 ++--- 1

[PULL 14/25] target/i386: fix bad sorting of entries in the 0F table

2024-06-11 Thread Paolo Bonzini
Aesthetic change only. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.c.inc | 93 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc

[PULL 22/25] target/i386: convert LZCNT/TZCNT/BSF/BSR/POPCNT to new decoder

2024-06-11 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 1 + target/i386/tcg/translate.c | 74 target/i386/tcg/decode-new.c.inc | 52 +++- target/i386/tcg/emit.c.inc | 82

[PULL 17/25] target/i386: split X86_CHECK_prot into PE and VM86 checks

2024-06-11 Thread Paolo Bonzini
SYSENTER is allowed in VM86 mode, but not in real mode. Split the check so that PE and !VM86 are covered by separate bits. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/decode-new.h | 8 ++-- target/i386/tcg/decode-new.c.inc | 9 +++-- 2 files

[PULL 23/25] target/i386: convert XADD to new decoder

2024-06-11 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/tcg/translate.c | 35 target/i386/tcg/decode-new.c.inc | 3 ++- target/i386/tcg/emit.c.inc | 24 ++ 3 files changed, 26 insertions(+), 36 deletions(-)

[PULL 05/25] i386/sev: Return when sev_common is null

2024-06-11 Thread Paolo Bonzini
From: Pankaj Gupta Fixes Coverity CID 1546885. Fixes: 16dcf200dc ("i386/sev: Introduce "sev-common" type to encapsulate common SEV state") Signed-off-by: Pankaj Gupta Message-ID: <20240607183611.100-4-pankaj.gu...@amd.com> Signed-off-by: Paolo Bonzini --- target/i386/sev.c | 1 + 1 file

[PULL 16/25] target/i386: replace read_crN helper with read_cr8

2024-06-11 Thread Paolo Bonzini
All other control registers are stored plainly in CPUX86State. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- target/i386/helper.h | 2 +- target/i386/tcg/sysemu/misc_helper.c | 20 +--- target/i386/tcg/emit.c.inc | 2 +- 3 files

[PULL 04/25] i386/sev: Move SEV_COMMON null check before dereferencing

2024-06-11 Thread Paolo Bonzini
From: Pankaj Gupta Fixes Coverity CID 1546886. Fixes: 9861405a8f ("i386/sev: Invoke launch_updata_data() for SEV class") Signed-off-by: Pankaj Gupta Message-ID: <20240607183611.100-3-pankaj.gu...@amd.com> Signed-off-by: Paolo Bonzini --- target/i386/sev.c | 3 ++- 1 file changed, 2

[PULL 02/25] i386/cpu: fixup number of addressable IDs for processor cores in the physical package

2024-06-11 Thread Paolo Bonzini
From: Chuang Xu When QEMU is started with: -cpu host,host-cache-info=on,l3-cache=off \ -smp 2,sockets=1,dies=1,cores=1,threads=2 Guest can't acquire maximum number of addressable IDs for processor cores in the physical package from CPUID[04H]. When creating a CPU topology of 1 core per package,

[PULL 03/25] i386/sev: fix unreachable code coverity issue

2024-06-11 Thread Paolo Bonzini
From: Pankaj Gupta Set 'finish->id_block_en' early, so that it is properly reset. Fixes coverity CID 1546887. Fixes: 7b34df4426 ("i386/sev: Introduce 'sev-snp-guest' object") Signed-off-by: Pankaj Gupta Message-ID: <20240607183611.100-2-pankaj.gu...@amd.com> Signed-off-by: Paolo Bonzini

Re: [RFC PATCH v1 1/6] build-sys: Add rust feature option

2024-06-11 Thread Alex Bennée
Stefan Hajnoczi writes: > On Mon, Jun 10, 2024 at 09:22:36PM +0300, Manos Pitsidianakis wrote: >> Add options for Rust in meson_options.txt, meson.build, configure to >> prepare for adding Rust code in the followup commits. >> >> `rust` is a reserved meson name, so we have to use an

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Zhao Liu
On Tue, Jun 11, 2024 at 01:41:57PM +0300, Manos Pitsidianakis wrote: > Date: Tue, 11 Jun 2024 13:41:57 +0300 > From: Manos Pitsidianakis > Subject: Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust > > > Currently, pl011 exclusively occupies a cargo as a package. In the > > future, will other

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Daniel P . Berrangé
On Tue, Jun 11, 2024 at 03:16:19PM +0200, Paolo Bonzini wrote: > On Tue, Jun 11, 2024 at 10:22 AM Daniel P. Berrangé > wrote: > > > > On Mon, Jun 10, 2024 at 09:22:35PM +0300, Manos Pitsidianakis wrote: > > > Hello everyone, > > > > > > This is an early draft of my work on implementing a very

Re: [PATCH v2] qapi: clarify that the default is backend dependent

2024-06-11 Thread Markus Armbruster
Stefano Garzarella writes: > The default value of the @share option of the @MemoryBackendProperties > really depends on the backend type, so let's document the default > values in the same place where we define the option to avoid > dispersing the information. > > Cc: David Hildenbrand >

Re: [PATCH] hw/net/virtio-net.c: fix crash in iov_copy()

2024-06-11 Thread Alex Bennée
Дмитрий Фролов writes: > ping > > https://patchew.org/QEMU/20240527133140.218300-2-fro...@swemel.ru/ > > On 27.05.2024 16:31, Dmitry Frolov wrote: >> A crash found while fuzzing device virtio-net-socket-check-used. >> Assertion "offset == 0" in iov_copy() fails if less than guest_hdr_len bytes

Re: [RFC PATCH v1 1/6] build-sys: Add rust feature option

2024-06-11 Thread Stefan Hajnoczi
On Mon, Jun 10, 2024 at 09:22:36PM +0300, Manos Pitsidianakis wrote: > Add options for Rust in meson_options.txt, meson.build, configure to > prepare for adding Rust code in the followup commits. > > `rust` is a reserved meson name, so we have to use an alternative. > `with_rust` was chosen. > >

Re: [RFC PATCH] migration/savevm: do not schedule snapshot_save_job_bh in qemu_aio_context

2024-06-11 Thread Stefan Hajnoczi
On Tue, Jun 11, 2024 at 02:08:49PM +0200, Fiona Ebner wrote: > Am 06.06.24 um 20:36 schrieb Stefan Hajnoczi: > > On Wed, Jun 05, 2024 at 02:08:48PM +0200, Fiona Ebner wrote: > >> The fact that the snapshot_save_job_bh() is scheduled in the main > >> loop's qemu_aio_context AioContext means that it

Re: [PATCH 08/20] qga: conditionalize schema for commands unsupported on Windows

2024-06-11 Thread Daniel P . Berrangé
On Tue, Jun 11, 2024 at 03:55:37PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > Rather than creating stubs for every command that just return > > QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to > > fully exclude generation of the commands on Windows. > > > > The

Re: [PATCH 08/20] qga: conditionalize schema for commands unsupported on Windows

2024-06-11 Thread Markus Armbruster
Daniel P. Berrangé writes: > Rather than creating stubs for every command that just return > QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to > fully exclude generation of the commands on Windows. > > The command will be rejected at QMP dispatch time instead, > avoiding reimplementing

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Paolo Bonzini
On Tue, Jun 11, 2024 at 10:22 AM Daniel P. Berrangé wrote: > > On Mon, Jun 10, 2024 at 09:22:35PM +0300, Manos Pitsidianakis wrote: > > Hello everyone, > > > > This is an early draft of my work on implementing a very simple device, > > in this case the ARM PL011 (which in C code resides in

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Paolo Bonzini
On Mon, Jun 10, 2024 at 10:47 PM Stefan Hajnoczi wrote: > On Mon, 10 Jun 2024 at 16:27, Manos Pitsidianakis > wrote: > > > > On Mon, 10 Jun 2024 22:59, Stefan Hajnoczi wrote: > > >> What are the issues with not using the compiler, rustc, directly? > > >>

[PATCH v2] qapi: clarify that the default is backend dependent

2024-06-11 Thread Stefano Garzarella
The default value of the @share option of the @MemoryBackendProperties really depends on the backend type, so let's document the default values in the same place where we define the option to avoid dispersing the information. Cc: David Hildenbrand Suggested-by: Markus Armbruster Signed-off-by:

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Daniel P . Berrangé
On Tue, Jun 11, 2024 at 01:51:13PM +0100, Alex Bennée wrote: > Daniel P. Berrangé writes: > > > On Tue, Jun 11, 2024 at 01:58:10PM +0300, Manos Pitsidianakis wrote: > >> On Tue, 11 Jun 2024 13:57, "Daniel P. Berrangé" > >> wrote: > >> > On Mon, Jun 10, 2024 at 11:29:36PM +0300, Manos

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Manos Pitsidianakis
Hello Antonio! On Tue, 11 Jun 2024 15:45, Antonio Caggiano wrote: Hi there :) On 11/06/2024 12:58, Manos Pitsidianakis wrote: On Tue, 11 Jun 2024 13:57, "Daniel P. Berrangé" wrote: On Mon, Jun 10, 2024 at 11:29:36PM +0300, Manos Pitsidianakis wrote: On Mon, 10 Jun 2024 22:37, Pierrick

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Alex Bennée
Daniel P. Berrangé writes: > On Tue, Jun 11, 2024 at 01:58:10PM +0300, Manos Pitsidianakis wrote: >> On Tue, 11 Jun 2024 13:57, "Daniel P. Berrangé" wrote: >> > On Mon, Jun 10, 2024 at 11:29:36PM +0300, Manos Pitsidianakis wrote: >> > > On Mon, 10 Jun 2024 22:37, Pierrick Bouvier >> > >

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Antonio Caggiano
Hi there :) On 11/06/2024 12:58, Manos Pitsidianakis wrote: On Tue, 11 Jun 2024 13:57, "Daniel P. Berrangé" wrote: On Mon, Jun 10, 2024 at 11:29:36PM +0300, Manos Pitsidianakis wrote: On Mon, 10 Jun 2024 22:37, Pierrick Bouvier wrote: > Hello Manos, > > On 6/10/24 11:22, Manos

Re: [PATCH] hw/net/virtio-net.c: fix crash in iov_copy()

2024-06-11 Thread Дмитрий Фролов
ping https://patchew.org/QEMU/20240527133140.218300-2-fro...@swemel.ru/ On 27.05.2024 16:31, Dmitry Frolov wrote: A crash found while fuzzing device virtio-net-socket-check-used. Assertion "offset == 0" in iov_copy() fails if less than guest_hdr_len bytes were transmited. Signed-off-by:

Re: [PATCH] tests/qtest/fuzz/virtio_net_fuzz.c: fix virtio_net_fuzz_multi

2024-06-11 Thread Дмитрий Фролов
ping https://patchew.org/QEMU/20240523102813.396750-2-fro...@swemel.ru/ On 23.05.2024 13:28, Dmitry Frolov wrote: If QTestState was already CLOSED due to error, calling qtest_clock_step() afterwards makes no sense and only raises false-crash with message: "assertion timer != NULL failed".

Re: [PATCH v4 2/4] vvfat: Fix usage of `info.file.offset`

2024-06-11 Thread Amjad Alsharafi
On Mon, Jun 10, 2024 at 06:49:43PM +0200, Kevin Wolf wrote: > Am 05.06.2024 um 02:58 hat Amjad Alsharafi geschrieben: > > The field is marked as "the offset in the file (in clusters)", but it > > was being used like this > > `cluster_size*(nums)+mapping->info.file.offset`, which is incorrect. > >

Re: [PATCH] tests/qtest/fuzz: fix memleak in qos_fuzz.c

2024-06-11 Thread Дмитрий Фролов
ping https://patchew.org/QEMU/20240521103106.119021-3-fro...@swemel.ru/ On 21.05.2024 13:31, Dmitry Frolov wrote: Found with fuzzing for qemu-8.2, but also relevant for master Signed-off-by: Dmitry Frolov --- tests/qtest/fuzz/qos_fuzz.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v2 3/3] monitor: Remove monitor_register_hmp()

2024-06-11 Thread Daniel P . Berrangé
On Tue, Jun 11, 2024 at 12:23:05PM +0200, Philippe Mathieu-Daudé wrote: > Previous commit removed the last use of monitor_register_hmp(), > remove it so new commands are implemented using > monitor_register_hmp_info_hrt(). > > Signed-off-by: Philippe Mathieu-Daudé > --- >

Re: [PATCH v2 2/3] hw/usb: Introduce x-query-usbhost QMP command

2024-06-11 Thread Daniel P . Berrangé
On Tue, Jun 11, 2024 at 12:23:04PM +0200, Philippe Mathieu-Daudé wrote: > This is a counterpart to the HMP "info usbhost" command. It is being > added with an "x-" prefix because this QMP command is intended as an > adhoc debugging tool and will thus not be modelled in QAPI as fully > structured

Re: [PATCH 0/3] snp: fix coverity reported issues

2024-06-11 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2 1/3] hw/usb: Remove unused 'host.h' header

2024-06-11 Thread Daniel P . Berrangé
On Tue, Jun 11, 2024 at 12:23:03PM +0200, Philippe Mathieu-Daudé wrote: > Since commit 99761176ee ("usb: Remove legacy -usbdevice options > (host, serial, disk and net)") hw/usb/host.h is not used, remove > it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Cc: Thomas Huth > --- >

Re: [PATCH v3] i386/cpu: fixup number of addressable IDs for processor cores in the physical package

2024-06-11 Thread Paolo Bonzini
Queued, thanks. Paolo

[PATCH v1] virtio-iommu: add error check before assert

2024-06-11 Thread Manos Pitsidianakis
A fuzzer case discovered by Zheyu Ma causes an assert failure. Add a check before the assert, and respond with an error before moving on to the next queue element. To reproduce the failure: cat << EOF | \ qemu-system-x86_64 \ -display none -machine accel=qtest -m 512M -machine q35 -nodefaults \

Re: Examining device state via monitor for debugging (was: [PATCH 0/2] hw/misc/mos6522: Do not open-code hmp_info_human_readable_text())

2024-06-11 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Tue, 11 Jun 2024 at 06:50, Markus Armbruster wrote: > > > > Philippe Mathieu-Daudé writes: > > > > > Officialise the QMP command, use the existing > > > hmp_info_human_readable_text() helper. > > > > I'm not sure "officialise" is a word :) >

Re: [PATCH v4] hw/audio/virtio-snd: Always use little endian audio format

2024-06-11 Thread Philippe Mathieu-Daudé
On 11/6/24 09:15, Michael Tokarev wrote: 23.04.2024 00:18, Philippe Mathieu-Daudé wrote: The VIRTIO Sound Device conforms with the Virtio spec v1.2, thus only use little endianness. Remove the suspicious target_words_bigendian() noticed during code review. Cc: qemu-sta...@nongnu.org Fixes:

Re: [PATCH v2] hw/arm/virt: Avoid unexpected warning from Linux guest on host with Fujitsu CPUs

2024-06-11 Thread Peter Maydell
On Tue, 11 Jun 2024 at 13:12, Zhenyu Zhang wrote: > > Multiple warning messages and corresponding backtraces are observed when Linux > guest is booted on the host with Fujitsu CPUs. One of them is shown as below. > > [0.032443] [ cut here ] > [0.032446] uart-pl011

[PATCH v2] hw/arm/virt: Avoid unexpected warning from Linux guest on host with Fujitsu CPUs

2024-06-11 Thread Zhenyu Zhang
Multiple warning messages and corresponding backtraces are observed when Linux guest is booted on the host with Fujitsu CPUs. One of them is shown as below. [0.032443] [ cut here ] [0.032446] uart-pl011 900.pl011: ARCH_DMA_MINALIGN smaller than CTR_EL0.CWG (128

Re: [RFC PATCH] migration/savevm: do not schedule snapshot_save_job_bh in qemu_aio_context

2024-06-11 Thread Fiona Ebner
Am 06.06.24 um 20:36 schrieb Stefan Hajnoczi: > On Wed, Jun 05, 2024 at 02:08:48PM +0200, Fiona Ebner wrote: >> The fact that the snapshot_save_job_bh() is scheduled in the main >> loop's qemu_aio_context AioContext means that it might get executed >> during a vCPU thread's aio_poll(). But saving

Re: [PATCH v3 0/2] meson: Remove libibumad dependence

2024-06-11 Thread Philippe Mathieu-Daudé
On 11/6/24 12:54, zhenwei pi wrote: Zhenwei Pi (2): meson: Remove libibumad dependence test: Remove libibumad dependence Series: Reviewed-by: Philippe Mathieu-Daudé Thanks!

Re: [PATCH] qtest/x86/numa-test: do not use the obsolete 'pentium' cpu

2024-06-11 Thread Mario Casquero
This patch has been successfully tested. After running the numa-test binary, now -cpu max is being used instead of the obsolete 'pentium' one. # starting QEMU: exec /home/qemu/build/qemu-system-x86_64 -qtest unix:/tmp/qtest-16915.sock -qtest-log /dev/null -chardev

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Manos Pitsidianakis
On Tue, 11 Jun 2024 14:09, "Daniel P. Berrangé" wrote: On Tue, Jun 11, 2024 at 01:58:10PM +0300, Manos Pitsidianakis wrote: On Tue, 11 Jun 2024 13:57, "Daniel P. Berrangé" wrote: > On Mon, Jun 10, 2024 at 11:29:36PM +0300, Manos Pitsidianakis wrote: > > On Mon, 10 Jun 2024 22:37, Pierrick

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Daniel P . Berrangé
On Tue, Jun 11, 2024 at 01:58:10PM +0300, Manos Pitsidianakis wrote: > On Tue, 11 Jun 2024 13:57, "Daniel P. Berrangé" wrote: > > On Mon, Jun 10, 2024 at 11:29:36PM +0300, Manos Pitsidianakis wrote: > > > On Mon, 10 Jun 2024 22:37, Pierrick Bouvier > > > wrote: > > > > Hello Manos, > > > > > On

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Manos Pitsidianakis
On Tue, 11 Jun 2024 13:57, "Daniel P. Berrangé" wrote: On Mon, Jun 10, 2024 at 11:29:36PM +0300, Manos Pitsidianakis wrote: On Mon, 10 Jun 2024 22:37, Pierrick Bouvier wrote: > Hello Manos, > > On 6/10/24 11:22, Manos Pitsidianakis wrote: > > Hello everyone, > > > > This is an early draft

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Daniel P . Berrangé
On Mon, Jun 10, 2024 at 11:29:36PM +0300, Manos Pitsidianakis wrote: > On Mon, 10 Jun 2024 22:37, Pierrick Bouvier > wrote: > > Hello Manos, > > > > On 6/10/24 11:22, Manos Pitsidianakis wrote: > > > Hello everyone, > > > > > > This is an early draft of my work on implementing a very simple

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Manos Pitsidianakis
On Tue, 11 Jun 2024 11:18, "Daniel P. Berrangé" wrote: On Mon, Jun 10, 2024 at 09:22:35PM +0300, Manos Pitsidianakis wrote: What are the issues with not using the compiler, rustc, directly? - [whataretheissueswith] Back to [TOC]

[PATCH v3 2/2] test: Remove libibumad dependence

2024-06-11 Thread zhenwei pi
Remove libibumad dependence from the test environment. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: zhenwei pi --- scripts/ci/setup/ubuntu/ubuntu-2204-aarch64.yaml | 1 - scripts/ci/setup/ubuntu/ubuntu-2204-s390x.yaml| 1 - tests/docker/dockerfiles/debian-amd64-cross.docker

[PATCH v3 1/2] meson: Remove libibumad dependence

2024-06-11 Thread zhenwei pi
RDMA based migration has no dependence on libumad. libibverbs and librdmacm are enough. libumad was used by rdmacm-mux which has been already removed. It's remained mistakenly. Fixes: 1dfd42c4264b ("hw/rdma: Remove deprecated pvrdma device and rdmacm-mux helper") Cc: Philippe Mathieu-Daudé

[PATCH v3 0/2] meson: Remove libibumad dependence

2024-06-11 Thread zhenwei pi
v2 -> v3: - refresh lcitool after removing libibumad v1 -> v2: - remove libibumad from tests/lcitool/projects/qemu.yml v1: - remove libibumad dependence Zhenwei Pi (2): meson: Remove libibumad dependence test: Remove libibumad dependence meson.build

Re: [RFC PATCH v1 0/6] Implement ARM PL011 in Rust

2024-06-11 Thread Manos Pitsidianakis
On Tue, 11 Jun 2024 12:45, Zhao Liu wrote: On Tue, Jun 11, 2024 at 09:22:44AM +0100, Daniel P. Berrangé wrote: On Mon, Jun 10, 2024 at 09:22:35PM +0300, Manos Pitsidianakis wrote: > Hello everyone, > > This is an early draft of my work on implementing a very simple device, > in this case the

  1   2   3   4   5   6   7   8   9   10   >