Re: [PATCH v3 13/70] i386: Introduce tdx-guest object

2023-12-04 Thread Xiaoyao Li
On 12/1/2023 6:52 PM, Markus Armbruster wrote: Xiaoyao Li writes: Introduce tdx-guest object which implements the interface of CONFIDENTIAL_GUEST_SUPPORT, and will be used to create TDX VMs (TDs) by qemu -machine ...,confidential-guest-support=tdx0\ -object tdx-guest,id=tdx0 I

Re: [PATCH 2/3] hw/virtio: cleanup shared resources

2023-12-04 Thread Marc-André Lureau
Hi On Tue, Nov 7, 2023 at 1:37 PM Albert Esteve wrote: > > Ensure that we cleanup all virtio shared > resources when the vhost devices is cleaned > up (after a hot unplug, or a crash). > > To track all owned uuids of a device, add > a GSList to the vhost_dev struct. This way > we can avoid traver

Re: [PATCH for 8.2] hw/audio/virtio-sound: mark the device as unmigratable

2023-12-04 Thread Marc-André Lureau
Hi On Mon, Dec 4, 2023 at 11:30 AM Volker Rümelin wrote: > > The virtio-sound device is currently not migratable. QEMU crashes > on the source machine at some point during the migration with a > segmentation fault. > > Even with this bug fixed, the virtio-sound device doesn't migrate > the state

Re: [PATCH for 8.2] hw/audio/virtio-sound: mark the device as unmigratable

2023-12-04 Thread Manos Pitsidianakis
On Mon, 4 Dec 2023 at 09:29, Volker Rümelin wrote: > > The virtio-sound device is currently not migratable. QEMU crashes > on the source machine at some point during the migration with a > segmentation fault. > > Even with this bug fixed, the virtio-sound device doesn't migrate > the state of the

[PULL 0/3] UI patches

2023-12-04 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit 29b5d70cb70574b499517ec9e9f80dea496a3cc0: Merge tag 'pull-ppc-for-8.2-20231130' of https://gitlab.com/npiggin/qemu into staging (2023-12-01 07:29:52 -0500) are available in the Git repository at: https://gitlab.com/marcandre.lurea

[PULL 2/3] ui/vnc-clipboard: fix inflate_buffer

2023-12-04 Thread marcandre . lureau
From: Fiona Ebner Commit d921fea338 ("ui/vnc-clipboard: fix infinite loop in inflate_buffer (CVE-2023-3255)") removed this hunk, but it is still required, because it can happen that stream.avail_in becomes zero before coming across a return value of Z_STREAM_END in the loop. This fixes the host-

[PULL 3/3] hw/audio/virtio-sound: mark the device as unmigratable

2023-12-04 Thread marcandre . lureau
From: Volker Rümelin The virtio-sound device is currently not migratable. QEMU crashes on the source machine at some point during the migration with a segmentation fault. Even with this bug fixed, the virtio-sound device doesn't migrate the state of the audio streams. For example, running stream

[PULL 1/3] ui/gtk-egl: move function calls back to regular code path

2023-12-04 Thread marcandre . lureau
From: Volker Rümelin Commit 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing scanout") introduced a regression when QEMU is running with a virtio-gpu-gl-device on a host under X11. After the guest has initialized the virtio-gpu-gl-device, the guest screen only shows "Display output is not a

[RFC 0/3] scripts/checkpatch: Add code spelling check

2023-12-04 Thread Zhao Liu
From: Zhao Liu Inspired by Linux's spelling check, QEMU could also add the similar support in checkpatch.pl to help ease the burden on trivial's maintainers ;-). QEMU's checkpatch.pl is mainly based on an older version of Linux's checkpatch.pl, so this RFC ports Linux's codespell-related functio

[RFC 2/3] scripts/checkpatch: Add --codespell and --codespellfile options

2023-12-04 Thread Zhao Liu
From: Zhao Liu Add two spelling check options (--codespell and --codespellfile) to enhance spelling check through dictionary, which copied the Linux kernel's implementation in checkpatch.pl. Signed-off-by: Zhao Liu --- scripts/checkpatch.pl | 66 ++- 1 f

[RFC 3/3] scripts/spelling: Add common spelling mistakes in default spelling.txt

2023-12-04 Thread Zhao Liu
From: Zhao Liu Select the typos in commits from 7.0.0 to 8.2.0-rc2 that were typed more than three times to add to the default dictionary selling.txt. The typos were counted by (Referenced Kees' command in Linux kernel's commit 66b47b4a9dad00): $ git log --format='%H' v7.0.0..v8.2.0-rc2 | \

[RFC 1/3] scripts/checkpatch: Check common spelling be default

2023-12-04 Thread Zhao Liu
From: Zhao Liu Add the check for common spelling mistakes for QEMU, which stole selling.txt from Linux kernel and referenced the Linux kernel's implementation in checkpatch.pl. This check covers common spelling mistakes, and can be updated/ extended as per QEMU's realities. Signed-off-by: Zhao

Re: [PATCH for 8.2] hw/audio/virtio-sound: mark the device as unmigratable

2023-12-04 Thread Michael S. Tsirkin
On Mon, Dec 04, 2023 at 08:28:37AM +0100, Volker Rümelin wrote: > The virtio-sound device is currently not migratable. QEMU crashes > on the source machine at some point during the migration with a > segmentation fault. > > Even with this bug fixed, the virtio-sound device doesn't migrate > the st

Re: [PATCH v3 26/70] i386/tdx: Initialize TDX before creating TD vcpus

2023-12-04 Thread Xiaoyao Li
On 11/15/2023 7:01 PM, Daniel P. Berrangé wrote: On Wed, Nov 15, 2023 at 02:14:35AM -0500, Xiaoyao Li wrote: Invoke KVM_TDX_INIT in kvm_arch_pre_create_vcpu() that KVM_TDX_INIT configures global TD configurations, e.g. the canonical CPUID config, and must be executed prior to creating vCPUs. Us

Re: [PATCH 0/3] Virtio dmabuf improvements

2023-12-04 Thread Michael S. Tsirkin
On Thu, Nov 30, 2023 at 04:49:35PM +0100, Albert Esteve wrote: > > > > On Tue, Nov 7, 2023 at 10:37 AM Albert Esteve wrote: > > Various improvements for the virtio-dmabuf module. > This patch includes: > > - Check for ownership before allowing a vhost device >   to remove an o

Re: [PATCH 00/14] virtio-net: add support for SR-IOV emulation

2023-12-04 Thread Yui Washizu
On 2023/12/02 17:08, Akihiko Odaki wrote: On 2023/12/02 17:00, Akihiko Odaki wrote: Introduction This series is based on the RFC series submitted by Yui Washizu[1]. See also [2] for the context. This series enables SR-IOV emulation for virtio-net. It is useful to test SR-IOV sup

Re: [RFC 1/3] scripts/checkpatch: Check common spelling be default

2023-12-04 Thread Thomas Huth
On 04/12/2023 09.29, Zhao Liu wrote: From: Zhao Liu Add the check for common spelling mistakes for QEMU, which stole selling.txt from Linux kernel and referenced the Linux kernel's You need to sellcheck^Wspellcheck the above line ;-) implementation in checkpatch.pl. This check covers commo

Re: [PATCH 0/3] Virtio dmabuf improvements

2023-12-04 Thread Albert Esteve
On Mon, Dec 4, 2023 at 9:50 AM Michael S. Tsirkin wrote: > On Thu, Nov 30, 2023 at 04:49:35PM +0100, Albert Esteve wrote: > > > > > > > > On Tue, Nov 7, 2023 at 10:37 AM Albert Esteve > wrote: > > > > Various improvements for the virtio-dmabuf module. > > This patch includes: > > > >

Re: [PATCH] hostmem: Round up memory size for qemu_madvise() in host_memory_backend_memory_complete()

2023-12-04 Thread David Hildenbrand
On 01.12.23 10:07, Michal Prívozník wrote: On 11/27/23 14:55, David Hildenbrand wrote: On 27.11.23 14:37, David Hildenbrand wrote: On 27.11.23 13:32, Michal Privoznik wrote: Simple reproducer: qemu.git $ ./build/qemu-system-x86_64 \ -m size=8389632k,slots=16,maxmem=2560k \ -object '{"qom-t

RE: [PATCH v2 2/4] multifd: Implement multifd compression accelerator

2023-12-04 Thread Liu, Yuan1
> -Original Message- > From: Fabiano Rosas > Sent: Saturday, December 2, 2023 2:01 AM > To: Liu, Yuan1 ; quint...@redhat.com; > pet...@redhat.com; leob...@redhat.com > Cc: qemu-devel@nongnu.org; Liu, Yuan1 ; Zou, Nanhai > > Subject: Re: [PATCH v2 2/4] multifd: Implement multifd compressio

RE: [PATCH v2 1/4] migration: Introduce multifd-compression-accel parameter

2023-12-04 Thread Liu, Yuan1
> -Original Message- > From: Markus Armbruster > Sent: Friday, December 1, 2023 5:17 PM > To: Liu, Yuan1 > Cc: quint...@redhat.com; pet...@redhat.com; faro...@suse.de; > leob...@redhat.com; qemu-devel@nongnu.org; Zou, Nanhai > > Subject: Re: [PATCH v2 1/4] migration: Introduce multifd-co

Re: [PATCH v3 08/70] physmem: replace function name with __func__ in ram_block_discard_range()

2023-12-04 Thread David Hildenbrand
On 04.12.23 08:40, Xiaoyao Li wrote: On 11/16/2023 2:21 AM, David Hildenbrand wrote: On 15.11.23 08:14, Xiaoyao Li wrote: Use __func__ to avoid hard-coded function name. Signed-off-by: Xiaoyao Li --- That can be queued independently. Will you queue it for 9.0? for someone else? Do I need

Re: [PATCH v3 07/70] physmem: Relax the alignment check of host_startaddr in ram_block_discard_range()

2023-12-04 Thread David Hildenbrand
On 04.12.23 08:53, Xiaoyao Li wrote: On 12/4/2023 3:35 PM, Xiaoyao Li wrote: On 11/20/2023 5:56 PM, David Hildenbrand wrote: On 16.11.23 03:56, Xiaoyao Li wrote: On 11/16/2023 2:20 AM, David Hildenbrand wrote: On 15.11.23 08:14, Xiaoyao Li wrote: Commit d3a5038c461 ("exec: ram_block_discard_

Re: [PATCH v2] system/memory: use ldn_he_p/stn_he_p

2023-12-04 Thread Philippe Mathieu-Daudé
Hi Patrick, On 3/12/23 16:42, Patrick Venture wrote: Friendly ping? Is this going to be applied or do I need to add another CC or?  I do think it should go into stable. I'll send a PR with this patch included. Regards, Phil.

Re: [PATCH 06/12] scsi: remove AioContext locking

2023-12-04 Thread Kevin Wolf
Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben: > The AioContext lock no longer has any effect. Remove it. > > Signed-off-by: Stefan Hajnoczi > --- > include/hw/virtio/virtio-scsi.h | 14 -- > hw/scsi/scsi-bus.c | 2 -- > hw/scsi/scsi-disk.c | 28 +++

RE: [PATCH v2 3/4] configure: add qpl option

2023-12-04 Thread Fabiano Rosas
"Liu, Yuan1" writes: >> -Original Message- >> From: Fabiano Rosas >> Sent: Saturday, December 2, 2023 1:45 AM >> To: Liu, Yuan1 ; quint...@redhat.com; >> pet...@redhat.com; leob...@redhat.com >> Cc: qemu-devel@nongnu.org; Liu, Yuan1 ; Zou, Nanhai >> >> Subject: Re: [PATCH v2 3/4] config

Re: [PATCH 01/12] virtio-scsi: replace AioContext lock with tmf_bh_lock

2023-12-04 Thread Kevin Wolf
Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben: > Protect the Task Management Function BH state with a lock. The TMF BH > runs in the main loop thread. An IOThread might process a TMF at the > same time as the TMF BH is running. Therefore tmf_bh_list and tmf_bh > must be protected by a lock

Re: [PATCH v2 6/7] gitlab: build the correct microblaze target

2023-12-04 Thread Alex Bennée
Thomas Huth writes: > On 01/12/2023 10.36, Alex Bennée wrote: >> We inadvertently built the LE target for BE tests. >> Fixes: 78ebc00b06 (gitlab: shuffle some targets and reduce avocado >> noise) >> Signed-off-by: Alex Bennée >> --- >> .gitlab-ci.d/buildtest.yml | 2 +- >> 1 file changed, 1 i

RE: [PATCH v2 3/4] configure: add qpl option

2023-12-04 Thread Liu, Yuan1
> -Original Message- > From: Fabiano Rosas > Sent: Monday, December 4, 2023 8:30 PM > To: Liu, Yuan1 ; quint...@redhat.com; > pet...@redhat.com; leob...@redhat.com > Cc: qemu-devel@nongnu.org; Zou, Nanhai > Subject: RE: [PATCH v2 3/4] configure: add qpl option > > "Liu, Yuan1" writes: >

Re: [PATCH v2 6/7] gitlab: build the correct microblaze target

2023-12-04 Thread Thomas Huth
On 04/12/2023 13.40, Alex Bennée wrote: Thomas Huth writes: On 01/12/2023 10.36, Alex Bennée wrote: We inadvertently built the LE target for BE tests. Fixes: 78ebc00b06 (gitlab: shuffle some targets and reduce avocado noise) Signed-off-by: Alex Bennée --- .gitlab-ci.d/buildtest.yml | 2 +-

Re: [PATCH v2 6/7] gitlab: build the correct microblaze target

2023-12-04 Thread Cédric Le Goater
On 12/4/23 13:43, Thomas Huth wrote: On 04/12/2023 13.40, Alex Bennée wrote: Thomas Huth writes: On 01/12/2023 10.36, Alex Bennée wrote: We inadvertently built the LE target for BE tests. Fixes: 78ebc00b06 (gitlab: shuffle some targets and reduce avocado noise) Signed-off-by: Alex Bennée --

Re: [PATCH 01/12] virtio-scsi: replace AioContext lock with tmf_bh_lock

2023-12-04 Thread Kevin Wolf
Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben: > Protect the Task Management Function BH state with a lock. The TMF BH > runs in the main loop thread. An IOThread might process a TMF at the > same time as the TMF BH is running. Therefore tmf_bh_list and tmf_bh > must be protected by a lock

Re: [PATCH 02/12] tests: remove aio_context_acquire() tests

2023-12-04 Thread Kevin Wolf
Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben: > The aio_context_acquire() API is being removed. Drop the test case that > calls the API. > > Signed-off-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf

Re: [PATCH 03/12] aio: make aio_context_acquire()/aio_context_release() a no-op

2023-12-04 Thread Kevin Wolf
Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben: > aio_context_acquire()/aio_context_release() has been replaced by > fine-grained locking to protect state shared by multiple threads. The > AioContext lock still plays the role of balancing locking in > AIO_WAIT_WHILE() and many functions in

Re: [PATCH 04/12] graph-lock: remove AioContext locking

2023-12-04 Thread Kevin Wolf
Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben: > Stop acquiring/releasing the AioContext lock in > bdrv_graph_wrlock()/bdrv_graph_unlock() since the lock no longer has any > effect. > > The distinction between bdrv_graph_wrunlock() and > bdrv_graph_wrunlock_ctx() becomes meaningless and t

Re: [PATCH v2 6/7] gitlab: build the correct microblaze target

2023-12-04 Thread Thomas Huth
On 04/12/2023 13.48, Cédric Le Goater wrote: On 12/4/23 13:43, Thomas Huth wrote: On 04/12/2023 13.40, Alex Bennée wrote: Thomas Huth writes: On 01/12/2023 10.36, Alex Bennée wrote: We inadvertently built the LE target for BE tests. Fixes: 78ebc00b06 (gitlab: shuffle some targets and reduce

Re: [PATCH 2/2] linux-user: Fix openat() emulation to not modify atime

2023-12-04 Thread Philippe Mathieu-Daudé
Hi Laurent, Helge, Richard, On 1/12/23 19:51, Shu-Chun Weng wrote: On Fri, Dec 1, 2023 at 4:42 AM Philippe Mathieu-Daudé > wrote: Hi Shu-Chun, On 1/12/23 04:21, Shu-Chun Weng wrote: > Commit b8002058 strengthened openat()'s /proc detection by calling

Re: [PATCH-for-8.2 v2] tests/avocado: Update yamon-bin-02.22.zip URL

2023-12-04 Thread Thomas Huth
On 01/12/2023 21.56, Philippe Mathieu-Daudé wrote: http://www.imgtec.com/tools/mips-tools/downloads/ redirects to https://mips.com/downloads/yamon-version-02-22/ then points to an invalid path to a s3 bucket. Use the correct path. The site will eventually be fixed. Signed-off-by: Philippe Mathie

Re: [PATCH] hostmem: Round up memory size for qemu_madvise() in host_memory_backend_memory_complete()

2023-12-04 Thread Michal Prívozník
On 12/4/23 10:21, David Hildenbrand wrote: > On 01.12.23 10:07, Michal Prívozník wrote: >> On 11/27/23 14:55, David Hildenbrand wrote: >>> On 27.11.23 14:37, David Hildenbrand wrote: On 27.11.23 13:32, Michal Privoznik wrote: > Simple reproducer: > qemu.git $ ./build/qemu-system-x86_64

[PULL 1/3] tests/qemu-iotests/149: Use more inclusive language in this test

2023-12-04 Thread Thomas Huth
Let's use 'unsupported_configs' and 'tested_configs' here instead of non-inclusive words. Message-ID: <20231122084000.809696-1-th...@redhat.com> Reviewed-by: "Daniel P. Berrangé" Signed-off-by: Thomas Huth --- tests/qemu-iotests/149 | 16 +--- tests/qemu-iotests/149.out | 8 +++

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

2023-12-04 Thread Thomas Huth
The following changes since commit 29b5d70cb70574b499517ec9e9f80dea496a3cc0: Merge tag 'pull-ppc-for-8.2-20231130' of https://gitlab.com/npiggin/qemu into staging (2023-12-01 07:29:52 -0500) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2023-12-

[PULL 3/3] tests/qtest: check the return value

2023-12-04 Thread Thomas Huth
From: Zhu Jun These variables "ret" are never referenced in the code, thus add check logic for the "ret" Signed-off-by: Zhu Jun Reviewed-by: Thomas Huth Message-ID: <20231121080802.4500-1-zhuj...@cmss.chinamobile.com> Signed-off-by: Thomas Huth --- tests/qtest/test-filter-mirror.c | 1 +

[PULL 2/3] sh4: Coding style: Remove tabs

2023-12-04 Thread Thomas Huth
From: Yihuan Pan Replaces TABS with spaces to ensure have a consistent coding style with an indentation of 4 spaces in the SH4 subsystem. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/376 Signed-off-by: Yihuan Pan Reviewed-by: Thomas Huth Message-ID: <20231124044554.513752-1-xun...@g

[PATCH] qemu: send stop event after bdrv_flush_all

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

[PULL 0/1] target-arm queue

2023-12-04 Thread Peter Maydell
ommit 29b5d70cb70574b499517ec9e9f80dea496a3cc0: Merge tag 'pull-ppc-for-8.2-20231130' of https://gitlab.com/npiggin/qemu into staging (2023-12-01 07:29:52 -0500) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20231204-1 for you to fetc

[PULL 1/1] target/arm: Disable SME if SVE is disabled

2023-12-04 Thread Peter Maydell
There is no architectural requirement that SME implies SVE, but our implementation currently assumes it. (FEAT_SME_FA64 does imply SVE.) So if you try to run a CPU with eg "-cpu max,sve=off" you quickly run into an assert when the guest tries to write to SMCR_EL1: #6 0x74b38e96 in __GI___

Re: [PATCH 05/12] block: remove AioContext locking

2023-12-04 Thread Kevin Wolf
Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben: > This is the big patch that removes > aio_context_acquire()/aio_context_release() from the block layer and > affected block layer users. > > There isn't a clean way to split this patch and the reviewers are likely > the same group of people,

Re: [PULL 0/1] Migration 20231201 patches

2023-12-04 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 00/15] virtio,pc,pci: fixes

2023-12-04 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/3] UI patches

2023-12-04 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL v2 0/5] gdbstub, avocado and gitlab updates

2023-12-04 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH-for-8.2 v2] tests/avocado: Update yamon-bin-02.22.zip URL

2023-12-04 Thread Stefan Hajnoczi
On Fri, 1 Dec 2023 at 15:56, Philippe Mathieu-Daudé wrote: > > http://www.imgtec.com/tools/mips-tools/downloads/ redirects > to https://mips.com/downloads/yamon-version-02-22/ then points > to an invalid path to a s3 bucket. Use the correct path. The > site will eventually be fixed. > > Signed-off

Re: [PATCH 01/12] virtio-scsi: replace AioContext lock with tmf_bh_lock

2023-12-04 Thread Stefan Hajnoczi
On Thu, Nov 30, 2023 at 09:25:52AM -0600, Eric Blake wrote: > On Wed, Nov 29, 2023 at 02:55:42PM -0500, Stefan Hajnoczi wrote: > > Protect the Task Management Function BH state with a lock. The TMF BH > > runs in the main loop thread. An IOThread might process a TMF at the > > same time as the TMF

Re: [PATCH v4 3/6] xen: decouple generic xen code from legacy backends codebase

2023-12-04 Thread Paul Durrant
On 02/12/2023 01:41, Volodymyr Babchuk wrote: In xen-all.c there are unneeded dependencies on xen-legacy-backend.c: - xen_init() uses xen_pv_printf() to report errors, but it does not provide a pointer to the struct XenLegacyDevice, so it is kind of useless, we can use standard error_repor

Re: [PATCH 01/12] virtio-scsi: replace AioContext lock with tmf_bh_lock

2023-12-04 Thread Stefan Hajnoczi
On Mon, Dec 04, 2023 at 01:46:13PM +0100, Kevin Wolf wrote: > Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben: > > Protect the Task Management Function BH state with a lock. The TMF BH > > runs in the main loop thread. An IOThread might process a TMF at the > > same time as the TMF BH is run

Re: [PATCH 05/12] block: remove AioContext locking

2023-12-04 Thread Stefan Hajnoczi
On Mon, Dec 04, 2023 at 03:33:57PM +0100, Kevin Wolf wrote: > Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben: > > This is the big patch that removes > > aio_context_acquire()/aio_context_release() from the block layer and > > affected block layer users. > > > > There isn't a clean way to s

[PULL 0/4] Misc fixes for 2023-12-04

2023-12-04 Thread Philippe Mathieu-Daudé
misc-fixes-20231204 for you to fetch changes up to 2e8ed6a970e1842528f34aeb36b387834205c53a: tests/avocado: mark ReplayKernelNormal.test_mips64el_malta as flaky (2023-12-04 16:21:00 +0100) Misc fixes for 8.2 - memory: Avoid unaligne

[PULL 2/4] target/riscv/kvm: fix shadowing in kvm_riscv_(get|put)_regs_csr

2023-12-04 Thread Philippe Mathieu-Daudé
From: Daniel Henrique Barboza KVM_RISCV_GET_CSR() and KVM_RISCV_SET_CSR() use an 'int ret' variable that is used to do an early 'return' if ret > 0. Both are being called in functions that are also declaring a 'ret' integer, initialized with '0', and this integer is used as return of the function

[PULL 3/4] tests/avocado: Update yamon-bin-02.22.zip URL

2023-12-04 Thread Philippe Mathieu-Daudé
http://www.imgtec.com/tools/mips-tools/downloads/ redirects to https://mips.com/downloads/yamon-version-02-22/ then points to an invalid path to a s3 bucket. Use the correct path. The site will eventually be fixed. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20231

Re: [RFC PATCH] tests/avocado: mark ReplayKernelNormal.test_mips64el_malta as flaky

2023-12-04 Thread Philippe Mathieu-Daudé
On 1/12/23 21:10, Alex Bennée wrote: I missed this when going through the recent failure logs. I can run the test 30 times without failure locally but it seems to hang pretty reliably on GitLab's CI infra-structure. Signed-off-by: Alex Bennée Cc: Philippe Mathieu-Daudé --- tests/avocado/repl

[PULL 4/4] tests/avocado: mark ReplayKernelNormal.test_mips64el_malta as flaky

2023-12-04 Thread Philippe Mathieu-Daudé
From: Alex Bennée I missed this when going through the recent failure logs. I can run the test 30 times without failure locally but it seems to hang pretty reliably on GitLab's CI infra-structure. Cc: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Messag

[PULL 1/4] system/memory: use ldn_he_p/stn_he_p

2023-12-04 Thread Philippe Mathieu-Daudé
From: Patrick Venture Using direct pointer dereferencing can allow for unaligned accesses, which was seen during execution with sanitizers enabled. Cc: qemu-sta...@nongnu.org Reviewed-by: Chris Rauer Reviewed-by: Peter Foley Signed-off-by: Patrick Venture Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 05/12] block: remove AioContext locking

2023-12-04 Thread Stefan Hajnoczi
On Thu, Nov 30, 2023 at 03:31:37PM -0600, Eric Blake wrote: > On Wed, Nov 29, 2023 at 02:55:46PM -0500, Stefan Hajnoczi wrote: > > This is the big patch that removes > > aio_context_acquire()/aio_context_release() from the block layer and > > affected block layer users. > > > > There isn't a clean

Re: [PATCH 06/12] scsi: remove AioContext locking

2023-12-04 Thread Stefan Hajnoczi
On Mon, Dec 04, 2023 at 01:23:09PM +0100, Kevin Wolf wrote: > Am 29.11.2023 um 20:55 hat Stefan Hajnoczi geschrieben: > > The AioContext lock no longer has any effect. Remove it. > > > > Signed-off-by: Stefan Hajnoczi > > --- > > include/hw/virtio/virtio-scsi.h | 14 -- > > hw/scsi/s

Re: [PATCH 2/2] linux-user: Fix openat() emulation to not modify atime

2023-12-04 Thread Stefan Hajnoczi
On Mon, Dec 04, 2023 at 02:39:24PM +0100, Philippe Mathieu-Daudé wrote: > Hi Laurent, Helge, Richard, > > On 1/12/23 19:51, Shu-Chun Weng wrote: > > On Fri, Dec 1, 2023 at 4:42 AM Philippe Mathieu-Daudé > > wrote: > > > > Hi Shu-Chun, > > > > On 1/12/23 04:21,

Re: [PATCH 2/4] virtio-scsi: don't lock AioContext around virtio_queue_aio_attach_host_notifier()

2023-12-04 Thread Stefan Hajnoczi
On Mon, Nov 27, 2023 at 09:21:08AM -0600, Eric Blake wrote: > On Thu, Nov 23, 2023 at 02:49:29PM -0500, Stefan Hajnoczi wrote: > > virtio_queue_aio_attach_host_notifier() does not require the AioContext > > lock. Stop taking the lock and remember add an explicit smp_wmb() > > s/remember// ? Will

[RFC 0/8] Support generic Luks encryption

2023-12-04 Thread Hyman Huang
This functionality was motivated by the following to-do list seen in crypto documents: https://wiki.qemu.org/Features/Block/Crypto The last chapter says we should "separate header volume": The LUKS format has ability to store the header in a separate volume from the payload. We should extend th

[RFC 7/8] Gluks: Implement the fundamental block layer driver hooks

2023-12-04 Thread Hyman Huang
Signed-off-by: Hyman Huang --- block/generic-luks.c | 104 ++- 1 file changed, 102 insertions(+), 2 deletions(-) diff --git a/block/generic-luks.c b/block/generic-luks.c index ebc0365d40..32cbedc86f 100644 --- a/block/generic-luks.c +++ b/block/generic-luk

[RFC 3/8] Gluks: Add the basic framework

2023-12-04 Thread Hyman Huang
Gluks would be a built-in format in the QEMU block layer. Signed-off-by: Hyman Huang --- block/generic-luks.c | 81 block/generic-luks.h | 26 ++ block/meson.build| 1 + 3 files changed, 108 insertions(+) create mode 100644 block/gen

[RFC 8/8] block: Support Gluks format image creation using qemu-img

2023-12-04 Thread Hyman Huang
To create a Gluks header image, use the command as follows: $ qemu-img create --object secret,id=sec0,data=abc123 -f gluks > -o cipher-alg=aes-256,cipher-mode=xts -o key-secret=sec0 > cipher.gluks Signed-off-by: Hyman Huang --- block.c | 5 + block/generic-luks.c | 53 +

[RFC 2/8] crypto: Introduce payload offset set function

2023-12-04 Thread Hyman Huang
Implement the payload offset set function for Gluks. Signed-off-by: Hyman Huang --- crypto/block.c | 4 include/crypto/block.h | 1 + 2 files changed, 5 insertions(+) diff --git a/crypto/block.c b/crypto/block.c index 7bb4b74a37..3dcf22a69f 100644 --- a/crypto/block.c +++ b/crypto/

[RFC 1/8] crypto: Export util functions and structures

2023-12-04 Thread Hyman Huang
Luks driver logic is primarily reused by Gluk, which, therefore, exports several pre-existing functions and structures. Signed-off-by: Hyman Huang --- block/crypto.c | 16 block/crypto.h | 23 +++ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git

[RFC 5/8] qapi: Introduce Gluks types to qapi

2023-12-04 Thread Hyman Huang
Primarily using the Luks types again, Gluks adds an extra option called "header", which points to the Luks header node's description. Signed-off-by: Hyman Huang --- qapi/block-core.json | 22 +- qapi/crypto.json | 10 +++--- 2 files changed, 28 insertions(+), 4 deleti

[PATCH] hw/ufs: avoid generating the same ID string for different LU devices

2023-12-04 Thread Akinobu Mita
QEMU would not start when trying to create two UFS host controllers and a UFS logical unit for each with the following options: -device ufs,id=bus0 \ -device ufs-lu,drive=drive1,bus=bus0,lun=0 \ -device ufs,id=bus1 \ -device ufs-lu,drive=drive2,bus=bus1,lun=0 \ This is because the same ID string

[RFC 6/8] crypto: Provide the Luks crypto driver to Gluks

2023-12-04 Thread Hyman Huang
Hooks up the Luks crypto driver for Gluks. Signed-off-by: Hyman Huang --- crypto/block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/block.c b/crypto/block.c index 3dcf22a69f..7e695c0a04 100644 --- a/crypto/block.c +++ b/crypto/block.c @@ -27,6 +27,7 @@ static const QCryptoBlockD

[RFC 4/8] Gluks: Introduce Gluks options

2023-12-04 Thread Hyman Huang
Similar to Luks, the Gluks format primarily recycles the Luks choices with the exception of the "size" option. Signed-off-by: Hyman Huang --- block/crypto.c | 4 ++-- block/generic-luks.c | 18 ++ block/generic-luks.h | 3 +++ 3 files changed, 23 insertions(+), 2 deletion

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

2023-12-04 Thread Daniel P . Berrangé
On Tue, Dec 05, 2023 at 12:06:17AM +0800, Hyman Huang wrote: > This functionality was motivated by the following to-do list seen > in crypto documents: > https://wiki.qemu.org/Features/Block/Crypto > > The last chapter says we should "separate header volume": > > The LUKS format has ability to

[PATCH] Revert "test/qga: use G_TEST_DIR to locate os-release test file"

2023-12-04 Thread Andrey Drobyshev
Since the commit a85d09269b QGA_OS_RELEASE variable points to the path relative to the build dir. Then on qemu-ga startup this path can't be found as qemu-ga cwd is somewhere else, which leads to the test failure: # ./tests/unit/test-qga -p /qga/guest-get-osinfo # random seed: R02S3a90c22d77f

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

2023-12-04 Thread Yong Huang
On Tue, Dec 5, 2023 at 12:24 AM Daniel P. Berrangé wrote: > On Tue, Dec 05, 2023 at 12:06:17AM +0800, Hyman Huang wrote: > > This functionality was motivated by the following to-do list seen > > in crypto documents: > > https://wiki.qemu.org/Features/Block/Crypto > > > > The last chapter says we

Re: [PATCH V6 03/14] cpus: stop vm in suspended runstate

2023-12-04 Thread Peter Xu
On Fri, Dec 01, 2023 at 12:11:32PM -0500, Steven Sistare wrote: > >> diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h > >> index f6a337b..1d6828f 100644 > >> --- a/include/sysemu/runstate.h > >> +++ b/include/sysemu/runstate.h > >> @@ -40,6 +40,11 @@ static inline bool > >> shutd

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

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

Re: [PATCH V6 03/14] cpus: stop vm in suspended runstate

2023-12-04 Thread Steven Sistare
On 12/4/2023 11:35 AM, Peter Xu wrote: > On Fri, Dec 01, 2023 at 12:11:32PM -0500, Steven Sistare wrote: diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h index f6a337b..1d6828f 100644 --- a/include/sysemu/runstate.h +++ b/include/sysemu/runstate.h @@ -40,6

[PATCH v2 3/4] scsi: don't lock AioContext in I/O code path

2023-12-04 Thread Stefan Hajnoczi
blk_aio_*() doesn't require the AioContext lock and the SCSI subsystem's internal state also does not anymore. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Acked-by: Kevin Wolf --- hw/scsi/scsi-disk.c| 23 --- hw/scsi/scsi-generic.c | 20 +++-

[PATCH v2 4/4] dma-helpers: don't lock AioContext in dma_blk_cb()

2023-12-04 Thread Stefan Hajnoczi
Commit abfcd2760b3e ("dma-helpers: prevent dma_blk_cb() vs dma_aio_cancel() race") acquired the AioContext lock inside dma_blk_cb() to avoid a race with scsi_device_purge_requests() running in the main loop thread. The SCSI code no longer calls dma_aio_cancel() from the main loop thread while I/O

[PATCH v2 2/4] virtio-scsi: don't lock AioContext around virtio_queue_aio_attach_host_notifier()

2023-12-04 Thread Stefan Hajnoczi
virtio_queue_aio_attach_host_notifier() does not require the AioContext lock. Stop taking the lock and add an explicit smp_wmb() because we were relying on the implicit barrier in the AioContext lock before. Signed-off-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- hw/

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

2023-12-04 Thread Stefan Hajnoczi
Stop depending on the AioContext lock and instead access SCSIDevice->requests from only one thread at a time: - When the VM is running only the BlockBackend's AioContext may access the requests list. - When the VM is stopped only the main loop may access the requests list. These constraints pr

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

2023-12-04 Thread Yong Huang
On Tue, Dec 5, 2023 at 12:24 AM Daniel P. Berrangé wrote: > On Tue, Dec 05, 2023 at 12:06:17AM +0800, Hyman Huang wrote: > > This functionality was motivated by the following to-do list seen > > in crypto documents: > > https://wiki.qemu.org/Features/Block/Crypto > > > > The last chapter says we

[PATCH v2 0/4] scsi: eliminate AioContext lock

2023-12-04 Thread Stefan Hajnoczi
v2: - Reschedule BH in new AioContext if change is detected [Kevin] - Drop stray "remember" in Patch 2's commit description [Eric] The SCSI subsystem uses the AioContext lock to protect internal state. This is necessary because the main loop and the IOThread can access SCSI state in parallel. This

Re: [PATCH-for-8.2?] hw/ufs: avoid generating the same ID string for different LU devices

2023-12-04 Thread Philippe Mathieu-Daudé
On 4/12/23 16:05, Akinobu Mita wrote: QEMU would not start when trying to create two UFS host controllers and a UFS logical unit for each with the following options: -device ufs,id=bus0 \ -device ufs-lu,drive=drive1,bus=bus0,lun=0 \ -device ufs,id=bus1 \ -device ufs-lu,drive=drive2,bus=bus1,lun=

Re: [PATCH] Revert "test/qga: use G_TEST_DIR to locate os-release test file"

2023-12-04 Thread Marc-André Lureau
Hi On Mon, Dec 4, 2023 at 8:33 PM Andrey Drobyshev wrote: > > Since the commit a85d09269b QGA_OS_RELEASE variable points to the path > relative to the build dir. Then on qemu-ga startup this path can't be > found as qemu-ga cwd is somewhere else, which leads to the test failure: > > # ./tests/

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

2023-12-04 Thread Daniel P . Berrangé
On Tue, Dec 05, 2023 at 12:41:16AM +0800, Yong Huang wrote: > On Tue, Dec 5, 2023 at 12:24 AM Daniel P. Berrangé > wrote: > > > On Tue, Dec 05, 2023 at 12:06:17AM +0800, Hyman Huang wrote: > > > This functionality was motivated by the following to-do list seen > > > in crypto documents: > > > htt

Re: [PATCH 2/2] linux-user: Fix openat() emulation to not modify atime

2023-12-04 Thread Daniel P . Berrangé
On Thu, Nov 30, 2023 at 07:21:40PM -0800, Shu-Chun Weng wrote: > Commit b8002058 strengthened openat()'s /proc detection by calling > realpath(3) on the given path, which allows various paths and symlinks > that points to the /proc file system to be intercepted correctly. > > Using realpath(3), th

Re: [PATCH] Revert "test/qga: use G_TEST_DIR to locate os-release test file"

2023-12-04 Thread Andrey Drobyshev
On 12/4/23 18:51, Marc-André Lureau wrote: > Hi > > On Mon, Dec 4, 2023 at 8:33 PM Andrey Drobyshev > wrote: >> >> Since the commit a85d09269b QGA_OS_RELEASE variable points to the path >> relative to the build dir. Then on qemu-ga startup this path can't be >> found as qemu-ga cwd is somewhere

Re: [PATCH] Revert "test/qga: use G_TEST_DIR to locate os-release test file"

2023-12-04 Thread Marc-André Lureau
Hi On Mon, Dec 4, 2023 at 9:01 PM Andrey Drobyshev wrote: > > On 12/4/23 18:51, Marc-André Lureau wrote: > > Hi > > > > On Mon, Dec 4, 2023 at 8:33 PM Andrey Drobyshev > > wrote: > >> > >> Since the commit a85d09269b QGA_OS_RELEASE variable points to the path > >> relative to the build dir. The

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

2023-12-04 Thread Peter Xu
On Fri, Dec 01, 2023 at 11:23:33AM -0500, Steven Sistare wrote: > >> @@ -109,6 +117,7 @@ static int global_state_post_load(void *opaque, int > >> version_id) > >> return -EINVAL; > >> } > >> s->state = r; > >> +vm_set_suspended(s->vm_was_suspended || r == RUN_STATE_SUSPENDED

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

2023-12-04 Thread Yong Huang
On Tue, Dec 5, 2023 at 12:51 AM Daniel P. Berrangé wrote: > On Tue, Dec 05, 2023 at 12:41:16AM +0800, Yong Huang wrote: > > On Tue, Dec 5, 2023 at 12:24 AM Daniel P. Berrangé > > wrote: > > > > > On Tue, Dec 05, 2023 at 12:06:17AM +0800, Hyman Huang wrote: > > > > This functionality was motivate

Re: [PATCH v2] system/memory: use ldn_he_p/stn_he_p

2023-12-04 Thread Patrick Venture
On Mon, Dec 4, 2023 at 3:24 AM Philippe Mathieu-Daudé wrote: > Hi Patrick, > > On 3/12/23 16:42, Patrick Venture wrote: > > > Friendly ping? Is this going to be applied or do I need to add another > > CC or? I do think it should go into stable. > > I'll send a PR with this patch included. > Tha

Re: [PATCH] Revert "test/qga: use G_TEST_DIR to locate os-release test file"

2023-12-04 Thread Andrey Drobyshev
On 12/4/23 19:09, Marc-André Lureau wrote: > Hi > > On Mon, Dec 4, 2023 at 9:01 PM Andrey Drobyshev > wrote: >> >> On 12/4/23 18:51, Marc-André Lureau wrote: >>> Hi >>> >>> On Mon, Dec 4, 2023 at 8:33 PM Andrey Drobyshev >>> wrote: Since the commit a85d09269b QGA_OS_RELEASE variable po

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

2023-12-04 Thread Daniel P . Berrangé
On Tue, Dec 05, 2023 at 01:32:51AM +0800, Yong Huang wrote: > On Tue, Dec 5, 2023 at 12:51 AM Daniel P. Berrangé > wrote: > > > On Tue, Dec 05, 2023 at 12:41:16AM +0800, Yong Huang wrote: > > > On Tue, Dec 5, 2023 at 12:24 AM Daniel P. Berrangé > > > wrote: > > > > > > > On Tue, Dec 05, 2023 at

qemu ppc64 crash when adding CPU

2023-12-04 Thread Michal Suchánek
Hello, When running a VM with libvirt I get: /usr/bin/qemu-system-ppc64 --version QEMU emulator version 8.1.3 (Virtualization / 15.5) Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers /usr/bin/qemu-system-ppc64 -name guest=sles12sp5-ppc64le,debug-threads=on -S -object {"qom

  1   2   >