Re: [PATCH 2/6] qemu/main-loop: rename QEMU_IOTHREAD_LOCK_GUARD to QEMU_BQL_LOCK_GUARD

2023-11-30 Thread Harsh Prateek Bora
On 12/1/23 01:57, Stefan Hajnoczi wrote: On Thu, Nov 30, 2023 at 10:14:47AM +0100, Ilya Leoshkevich wrote: On Wed, 2023-11-29 at 16:26 -0500, Stefan Hajnoczi wrote: The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL) instead, it is already widely used and unambiguous. Signed

Re: [PATCH 9.0 00/13] Consolidate common vdpa members in VhostVDPAShared

2023-11-30 Thread Jason Wang
On Sat, Nov 25, 2023 at 1:14 AM Eugenio Pérez wrote: > > Current memory operations like pinning may take a lot of time at the > destination. Currently they are done after the source of the migration is > stopped, and before the workload is resumed at the destination. This is a > period where nei

Re: [PATCH 9.0 01/13] vdpa: add VhostVDPAShared

2023-11-30 Thread Eugenio Perez Martin
On Fri, Dec 1, 2023 at 6:35 AM Jason Wang wrote: > > On Sat, Nov 25, 2023 at 1:14 AM Eugenio Pérez wrote: > > > > It will hold properties shared among all vhost_vdpa instances associated > > with of the same device. For example, we just need one iova_tree or one > > memory listener for the entir

Re: [PATCH v4] migration: Plug memory leak with migration URIs

2023-11-30 Thread Markus Armbruster
Peter Xu writes: > On Thu, Nov 30, 2023 at 07:35:43PM +0100, Markus Armbruster wrote: >> Peter Xu writes: >> >> > On Wed, Nov 29, 2023 at 08:43:01PM +, Het Gala wrote: >> >> migrate_uri_parse() allocates memory to 'channel' if the user >> >> opts for old syntax - uri, which is leaked becaus

Re: [PATCH v3] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2023-11-30 Thread Gavin Shan
Hi Shaoqin, On 11/29/23 14:08, Shaoqin Huang wrote: The KVM_ARM_VCPU_PMU_V3_FILTER provide the ability to let the VMM decide which PMU events are provided to the guest. Add a new option `pmu-filter` as -accel sub-option to set the PMU Event Filtering. Without the filter, the KVM will expose all

Re: [PATCH 9.0 01/13] vdpa: add VhostVDPAShared

2023-11-30 Thread Jason Wang
On Sat, Nov 25, 2023 at 1:14 AM Eugenio Pérez wrote: > > It will hold properties shared among all vhost_vdpa instances associated > with of the same device. For example, we just need one iova_tree or one > memory listener for the entire device. > > Next patches will register the vhost_vdpa memory

Re: [PATCH 1/6] system/cpus: rename qemu_mutex_lock_iothread() to qemu_bql_lock()

2023-11-30 Thread Harsh Prateek Bora
Hi Stefan, On 11/30/23 02:56, Stefan Hajnoczi wrote: The Big QEMU Lock (BQL) has many names and they are confusing. The actual QemuMutex variable is called qemu_global_mutex but it's commonly referred to as the BQL in discussions and some code comments. The locking APIs, however, are called qemu

Re: [PATCH v2 04/14] spapr: nested: Introduce cap-nested-papr for Nested PAPR API

2023-11-30 Thread Harsh Prateek Bora
On 11/30/23 16:41, Nicholas Piggin wrote: On Thu Nov 30, 2023 at 4:19 PM AEST, Harsh Prateek Bora wrote: On 11/29/23 09:31, Nicholas Piggin wrote: On Thu Oct 12, 2023 at 8:49 PM AEST, Harsh Prateek Bora wrote: Introduce a SPAPR capability cap-nested-papr which provides a nested HV facilit

Re: [PATCH v8 1/9] machine: Use error handling when CPU type is checked

2023-11-30 Thread Gavin Shan
Hi Markus, On 11/29/23 19:20, Markus Armbruster wrote: Gavin Shan writes: QEMU will be terminated if the specified CPU type isn't supported in machine_run_board_init(). The list of supported CPU type names is tracked by mc->valid_cpu_types. Suggest to drop the second sentence. Indeed, it

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

2023-11-30 Thread Shu-Chun Weng
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), though, has a side effect that it reads the symlinks along the way, and thu

[PATCH 1/2] linux-user: Define TARGET_O_LARGEFILE for aarch64

2023-11-30 Thread Shu-Chun Weng
In 050a1ba, when moving the macros from preprocessor-guarding to file-based definition, TARGET_O_LARGEFILE appeared to have been accidentally left off. This may have correctness implication, but so far I was only confused by strace's output. Signed-off-by: Shu-Chun Weng --- linux-user/aarch64/t

[PATCH 0/2] linux-user: openat() fixes

2023-11-30 Thread Shu-Chun Weng
Shu-Chun Weng (2): linux-user: Define TARGET_O_LARGEFILE for aarch64 linux-user: Fix openat() emulation to not modify atime linux-user/aarch64/target_fcntl.h | 1 + linux-user/syscall.c | 42 --- 2 files changed, 34 insertions(+), 9 deletions(-)

[PATCH v5] accel/kvm: Turn DPRINTF macro use into tracepoints

2023-11-30 Thread Jai Arora
Patch removes DRPINTF macro and adds multiple tracepoints to capture different kvm events. We also drop the DPRINTFs that don't add any additional information than trace_kvm_run_exit already does. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1827 Signed-off-by: Jai Arora Reviewed-by:

Re: [RFC PATCH v2 17/19] heki: x86: Update permissions counters during text patching

2023-11-30 Thread Edgecombe, Rick P
On Wed, 2023-11-29 at 15:07 -0600, Madhavan T. Venkataraman wrote: > Threat Model > > > In the threat model in Heki, the attacker is a user space attacker > who exploits > a kernel vulnerability to gain more privileges or bypass the kernel's > access > control and self-protection mech

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

2023-11-30 Thread Peter Xu
On Thu, Nov 30, 2023 at 01:37:18PM -0800, Steve Sistare wrote: > If the outgoing machine was previously suspended, propagate that to the > incoming side via global_state, so a subsequent vm_start restores the > suspended state. To maintain backward and forward compatibility, define > the new field

Re: [PATCH 10/12] scsi: remove outdated AioContext lock comment

2023-11-30 Thread Eric Blake
On Wed, Nov 29, 2023 at 02:55:51PM -0500, Stefan Hajnoczi wrote: > The SCSI subsystem no longer uses the AioContext lock. Request > processing runs exclusively in the BlockBackend's AioContext since > "scsi: only access SCSIDevice->requests from one thread" and hence the > lock is unnecessary. > >

Re: [PATCH 09/12] docs: remove AioContext lock from IOThread docs

2023-11-30 Thread Eric Blake
On Wed, Nov 29, 2023 at 02:55:50PM -0500, Stefan Hajnoczi wrote: > Encourage the use of locking primitives and stop mentioning the > AioContext lock since it is being removed. > > Signed-off-by: Stefan Hajnoczi > --- > docs/devel/multiple-iothreads.txt | 45 +++ > 1 f

Re: [PATCH-for-9.0] accel/tcg: Remove unused tb_invalidate_phys_addr()

2023-11-30 Thread Richard Henderson
On 11/30/23 14:32, Philippe Mathieu-Daudé wrote: Commit e3f7c801f1 introduced the TCGCPUOps::debug_check_breakpoint() handler, and commit 10c37828b2 "moved breakpoint recognition outside of translation", so "we no longer need to flush any TBs when changing BPs". The last target using tb_invalida

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

2023-11-30 Thread Peter Xu
On Thu, Nov 30, 2023 at 01:37:16PM -0800, Steve Sistare wrote: > Currently, a vm in the suspended state is not completely stopped. The VCPUs > have been paused, but the cpu clock still runs, and runstate notifiers for > the transition to stopped have not been called. This causes problems for > li

Re: [PATCH V6 02/14] cpus: vm_was_suspended

2023-11-30 Thread Peter Xu
On Thu, Nov 30, 2023 at 01:37:15PM -0800, Steve Sistare wrote: > Add a state variable to remember if a vm previously transitioned into a > suspended state. > > Signed-off-by: Steve Sistare I'd even consider squashing this small patch into the next, the reasoning to have it resides there, but not

Re: [PATCH 1/6] system/cpus: rename qemu_mutex_lock_iothread() to qemu_bql_lock()

2023-11-30 Thread Eric Farman
On Wed, 2023-11-29 at 16:26 -0500, Stefan Hajnoczi wrote: > The Big QEMU Lock (BQL) has many names and they are confusing. The > actual QemuMutex variable is called qemu_global_mutex but it's > commonly > referred to as the BQL in discussions and some code comments. The > locking APIs, however, are

Re: [PATCH 08/12] aio: remove aio_context_acquire()/aio_context_release() API

2023-11-30 Thread Eric Blake
On Wed, Nov 29, 2023 at 02:55:49PM -0500, Stefan Hajnoczi wrote: > Delete these functions because nothing calls these functions anymore. > > I introduced these APIs in commit 98563fc3ec44 ("aio: add > aio_context_acquire() and aio_context_release()") in 2014. It's with a > sigh of relief that I de

Re: [PATCH 1/6] system/cpus: rename qemu_mutex_lock_iothread() to qemu_bql_lock()

2023-11-30 Thread BALATON Zoltan
On Thu, 30 Nov 2023, Stefan Hajnoczi wrote: On Thu, Nov 30, 2023 at 03:08:49PM -0500, Peter Xu wrote: On Wed, Nov 29, 2023 at 04:26:20PM -0500, Stefan Hajnoczi wrote: The Big QEMU Lock (BQL) has many names and they are confusing. The actual QemuMutex variable is called qemu_global_mutex but it

Re: [PATCH 07/12] aio-wait: draw equivalence between AIO_WAIT_WHILE() and AIO_WAIT_WHILE_UNLOCKED()

2023-11-30 Thread Eric Blake
On Wed, Nov 29, 2023 at 02:55:48PM -0500, Stefan Hajnoczi wrote: > Now that the AioContext lock no longer exists, AIO_WAIT_WHILE() and > AIO_WAIT_WHILE_UNLOCKED() are equivalent. > > A future patch will get rid of AIO_WAIT_WHILE_UNLOCKED(). > > Signed-off-by: Stefan Hajnoczi > --- > include/blo

[PATCH V6 00/14] fix migration of suspended runstate

2023-11-30 Thread Steve Sistare
Migration of a guest in the suspended runstate is broken. The incoming migration code automatically tries to wake the guest, which is wrong; the guest should end migration in the same runstate it started. Further, after saving a snapshot in the suspended state and loading it, the vm_start fails.

[PATCH V6 06/14] migration: preserve suspended runstate

2023-11-30 Thread Steve Sistare
A guest that is migrated in the suspended state automaticaly wakes and continues execution. This is wrong; the guest should end migration in the same state it started. The root cause is that the outgoing migration code automatically wakes the guest, then saves the RUNNING runstate in global_state

[PATCH V6 11/14] tests/qtest: precopy migration with suspend

2023-11-30 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly during live migration precopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-helpers.c | 3 ++ tests/qtest/migration-helpers.h | 2 ++ tests/qtest/migrati

[PATCH V6 10/14] tests/qtest: option to suspend during migration

2023-11-30 Thread Steve Sistare
Add an option to suspend the src in a-b-bootblock.S, which puts the guest in S3 state after one round of writing to memory. The option is enabled by poking a 1 into the suspend_me word in the boot block prior to starting the src vm. Generate symbol offsets in a-b-bootblock.h so that the suspend_m

[PATCH V6 08/14] migration: preserve suspended for bg_migration

2023-11-30 Thread Steve Sistare
Do not wake a suspended guest during bg_migration, and restore the prior state at finish rather than unconditionally running. Allow the additional state transitions that occur. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas --- migration/migration.c | 7 +-- system/runstate.c

[PATCH V6 12/14] tests/qtest: postcopy migration with suspend

2023-11-30 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly by live migration postcopy. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-test.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-

[PATCH V6 09/14] tests/qtest: migration events

2023-11-30 Thread Steve Sistare
Define a state object to capture events seen by migration tests, to allow more events to be captured in a subsequent patch, and simplify event checking in wait_for_migration_pass. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Fabiano Rosas Reviewed-by: Daniel P. Berrangé ---

[PATCH V6 13/14] tests/qtest: bootfile per vm

2023-11-30 Thread Steve Sistare
Create a separate bootfile for the outgoing and incoming vm, so the block layer can lock the file during the background migration test. Otherwise, the test fails with: "Failed to get "write" lock. Is another process using the image [/tmp/migration-test-WAKPD2/bootsect]?" Signed-off-by: Stev

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

2023-11-30 Thread Steve Sistare
Currently, a vm in the suspended state is not completely stopped. The VCPUs have been paused, but the cpu clock still runs, and runstate notifiers for the transition to stopped have not been called. This causes problems for live migration. Stale cpu timers_state is saved to the migration stream,

[PATCH V6 01/14] cpus: pass runstate to vm_prepare_start

2023-11-30 Thread Steve Sistare
When a vm in the suspended state is migrated, we must call vm_prepare_start on the destination, so a later system_wakeup properly resumes the guest, when main_loop_should_exit calls resume_all_vcpus. However, the runstate should remain suspended until system_wakeup is called, so allow the caller t

[PATCH V6 07/14] migration: preserve suspended for snapshot

2023-11-30 Thread Steve Sistare
Restoring a snapshot can break a suspended guest. Snapshots suffer from the same suspended-state issues that affect live migration, plus they must handle an additional problematic scenario, which is that a running vm must remain running if it loads a suspended snapshot. Currently, after loading s

[PATCH V6 14/14] tests/qtest: background migration with suspend

2023-11-30 Thread Steve Sistare
Add a test case to verify that the suspended state is handled correctly by a background migration. The test suspends the src, migrates, then wakes the dest. Signed-off-by: Steve Sistare --- tests/qtest/migration-test.c | 21 + 1 file changed, 21 insertions(+) diff --git a/t

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

2023-11-30 Thread Steve Sistare
If the outgoing machine was previously suspended, propagate that to the incoming side via global_state, so a subsequent vm_start restores the suspended state. To maintain backward and forward compatibility, define the new field in a zero'd hole in the GlobalState struct. Signed-off-by: Steve Sist

[PATCH V6 04/14] cpus: vm_resume

2023-11-30 Thread Steve Sistare
Define the vm_resume helper, for use in subsequent patches. Signed-off-by: Steve Sistare --- include/sysemu/runstate.h | 8 system/cpus.c | 9 + 2 files changed, 17 insertions(+) diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h index 1d6828f..a900c

[PATCH V6 02/14] cpus: vm_was_suspended

2023-11-30 Thread Steve Sistare
Add a state variable to remember if a vm previously transitioned into a suspended state. Signed-off-by: Steve Sistare --- include/sysemu/runstate.h | 2 ++ system/cpus.c | 15 +++ 2 files changed, 17 insertions(+) diff --git a/include/sysemu/runstate.h b/include/sysemu/

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

2023-11-30 Thread Eric Blake
On Wed, Nov 29, 2023 at 02:55:47PM -0500, Stefan Hajnoczi wrote: > 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

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

2023-11-30 Thread Eric Blake
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 way to split this patch and the reviewers are likely > the same group o

Re: [PATCH v4] accel/kvm: Turn DPRINTF macro use into tracepoints

2023-11-30 Thread Alex Bennée
Jai Arora writes: > Patch removes DRPINTF macro and adds multiple tracepoints > to capture different kvm events. > > We also drop the DPRINTFs that don't add any additional > information than trace_kvm_run_exit already does. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1827 > > Sig

Re: [PATCH 1/6] system/cpus: rename qemu_mutex_lock_iothread() to qemu_bql_lock()

2023-11-30 Thread Peter Xu
On Thu, Nov 30, 2023 at 03:43:25PM -0500, Stefan Hajnoczi wrote: > On Thu, Nov 30, 2023 at 03:08:49PM -0500, Peter Xu wrote: > > On Wed, Nov 29, 2023 at 04:26:20PM -0500, Stefan Hajnoczi wrote: > > > The Big QEMU Lock (BQL) has many names and they are confusing. The > > > actual QemuMutex variable

[PATCH-for-9.0] accel/tcg: Remove tb_invalidate_phys_page() from system emulation

2023-11-30 Thread Philippe Mathieu-Daudé
Since previous commit, tb_invalidate_phys_page() is not used anymore in system emulation. Make it static for user emulation and remove its public declaration in "exec/translate-all.h". Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20231130203241.31099-1-phi...@linaro.org> --- include/exec

Re: [PATCH 1/6] system/cpus: rename qemu_mutex_lock_iothread() to qemu_bql_lock()

2023-11-30 Thread Stefan Hajnoczi
On Thu, Nov 30, 2023 at 03:08:49PM -0500, Peter Xu wrote: > On Wed, Nov 29, 2023 at 04:26:20PM -0500, Stefan Hajnoczi wrote: > > The Big QEMU Lock (BQL) has many names and they are confusing. The > > actual QemuMutex variable is called qemu_global_mutex but it's commonly > > referred to as the BQL

RE: [PATCH] Hexagon (target/hexagon) Fix shadow variable when idef-parser is off

2023-11-30 Thread Brian Cain
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: Thursday, November 30, 2023 2:17 PM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: Brian Cain ; Matheus Bernardino (QUIC) > ; Sid Manning ; Marco > Liebel (QUIC) ; richard.hender...@linaro.org; > a...@rev.ng; a...@rev.ng > S

Re: [PATCH 6/6] Rename "QEMU global mutex" to "BQL" in comments and docs

2023-11-30 Thread Stefan Hajnoczi
On Thu, Nov 30, 2023 at 02:49:48PM +0100, Philippe Mathieu-Daudé wrote: > On 29/11/23 22:26, Stefan Hajnoczi wrote: > > The term "QEMU global mutex" is identical to the more widely used Big > > QEMU Lock ("BQL"). Update the code comments and documentation to use > > "BQL" instead of "QEMU global mu

Re: [PATCH 5/6] Replace "iothread lock" with "BQL" in comments

2023-11-30 Thread Stefan Hajnoczi
On Thu, Nov 30, 2023 at 02:47:49PM +0100, Philippe Mathieu-Daudé wrote: > Hi Stefan, > > On 29/11/23 22:26, Stefan Hajnoczi wrote: > > The term "iothread lock" is obsolete. The APIs use Big QEMU Lock (BQL) > > in their names. Update the code comments to use "BQL" instead of > > "iothread lock". >

[PATCH-for-9.0] accel/tcg: Remove unused tb_invalidate_phys_addr()

2023-11-30 Thread Philippe Mathieu-Daudé
Commit e3f7c801f1 introduced the TCGCPUOps::debug_check_breakpoint() handler, and commit 10c37828b2 "moved breakpoint recognition outside of translation", so "we no longer need to flush any TBs when changing BPs". The last target using tb_invalidate_phys_addr() was converted to the debug_check_bre

Re: [PATCH 4/6] system/cpus: rename qemu_global_mutex to qemu_bql

2023-11-30 Thread Stefan Hajnoczi
On Thu, Nov 30, 2023 at 02:44:07PM +0100, Philippe Mathieu-Daudé wrote: > Hi Stefan, > > On 29/11/23 22:26, Stefan Hajnoczi wrote: > > The APIs using qemu_global_mutex now follow the Big QEMU Lock (BQL) > > nomenclature. It's a little strange that the actual QemuMutex variable > > that embodies th

Re: [PATCH 2/6] qemu/main-loop: rename QEMU_IOTHREAD_LOCK_GUARD to QEMU_BQL_LOCK_GUARD

2023-11-30 Thread Stefan Hajnoczi
On Thu, Nov 30, 2023 at 10:14:47AM +0100, Ilya Leoshkevich wrote: > On Wed, 2023-11-29 at 16:26 -0500, Stefan Hajnoczi wrote: > > The name "iothread" is overloaded. Use the term Big QEMU Lock (BQL) > > instead, it is already widely used and unambiguous. > > > > Signed-off-by: Stefan Hajnoczi > >

Re: [PATCH] Hexagon (target/hexagon) Fix shadow variable when idef-parser is off

2023-11-30 Thread Philippe Mathieu-Daudé
On 30/11/23 19:39, Taylor Simpson wrote: Adding -Werror=shadow=compatible-local causes Hexagon not to build when idef-parser is off. The "label" variable in CHECK_NOSHUF_PRED shadows a variable in the surrounding code. Signed-off-by: Taylor Simpson --- target/hexagon/macros.h | 6 +++--- 1

Re: [PATCH v2 1/2] block: commit: Allow users to request only format driver names in backing file format

2023-11-30 Thread Peter Krempa
On Thu, Nov 30, 2023 at 13:24:18 -0600, Eric Blake wrote: > On Thu, Nov 30, 2023 at 05:06:03PM +0100, Peter Krempa wrote: > > Introduce a new flag 'backing_file_format_no_protocol' for the > > block-commit QMP command which instructs the internals to use 'raw' > > instead of the protocol driver in

Re: [PATCH 1/6] system/cpus: rename qemu_mutex_lock_iothread() to qemu_bql_lock()

2023-11-30 Thread Peter Xu
On Wed, Nov 29, 2023 at 04:26:20PM -0500, Stefan Hajnoczi wrote: > The Big QEMU Lock (BQL) has many names and they are confusing. The > actual QemuMutex variable is called qemu_global_mutex but it's commonly > referred to as the BQL in discussions and some code comments. The > locking APIs, however

[PATCH v4] accel/kvm: Turn DPRINTF macro use into tracepoints

2023-11-30 Thread Jai Arora
Patch removes DRPINTF macro and adds multiple tracepoints to capture different kvm events. We also drop the DPRINTFs that don't add any additional information than trace_kvm_run_exit already does. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1827 Signed-off-by: Jai Arora --- v4: Adds

Re: [PATCH v3] accel/kvm: Turn DPRINTF macro use into tracepoints

2023-11-30 Thread Alex Bennée
Jai Arora writes: > Patch removes DRPINTF macro and adds multiple tracepoints > to capture different kvm events. maybe add "We drop the DPRINTFs that don't add any additional information than trace_kvm_run_exit already does." Otherwise: Reviewed-by: Alex Bennée p.s. It is helpful to add a m

Re: [PATCH v3 03/70] RAMBlock/guest_memfd: Enable KVM_GUEST_MEMFD_ALLOW_HUGEPAGE

2023-11-30 Thread David Hildenbrand
On 30.11.23 18:51, Daniel P. Berrangé wrote: On Thu, Nov 30, 2023 at 05:54:26PM +0100, David Hildenbrand wrote: On 30.11.23 17:01, Sean Christopherson wrote: On Thu, Nov 30, 2023, David Hildenbrand wrote: On 30.11.23 08:32, Xiaoyao Li wrote: On 11/20/2023 5:26 PM, David Hildenbrand wrote:

Re: [PATCH v2 2/2] block: stream: Allow users to request only format driver names in backing file format

2023-11-30 Thread Eric Blake
On Thu, Nov 30, 2023 at 05:06:04PM +0100, Peter Krempa wrote: > Introduce a new flag 'backing_file_format_no_protocol' for the > block-commit QMP command which instructs the internals to use 'raw' > instead of the protocol driver in case when a image is used without a > dummy 'raw' wrapper. Same l

Re: [PATCH v3 03/70] RAMBlock/guest_memfd: Enable KVM_GUEST_MEMFD_ALLOW_HUGEPAGE

2023-11-30 Thread David Hildenbrand
On 30.11.23 18:46, Peter Xu wrote: On Thu, Nov 30, 2023 at 05:54:26PM +0100, David Hildenbrand wrote: But likely we want THP support here. Because for hugetlb, one would actually have to instruct the kernel which size to use, like we do for memfd with hugetlb. I doubt it, as VM can still lever

Re: [PATCH v2 1/2] block: commit: Allow users to request only format driver names in backing file format

2023-11-30 Thread Eric Blake
On Thu, Nov 30, 2023 at 05:06:03PM +0100, Peter Krempa wrote: > Introduce a new flag 'backing_file_format_no_protocol' for the > block-commit QMP command which instructs the internals to use 'raw' > instead of the protocol driver in case when a image is used without a > dummy 'raw' wrapper. > > Th

Re: [PATCH v3 03/70] RAMBlock/guest_memfd: Enable KVM_GUEST_MEMFD_ALLOW_HUGEPAGE

2023-11-30 Thread David Hildenbrand
On 30.11.23 18:57, David Hildenbrand wrote: On 30.11.23 18:46, Peter Xu wrote: On Thu, Nov 30, 2023 at 05:54:26PM +0100, David Hildenbrand wrote: But likely we want THP support here. Because for hugetlb, one would actually have to instruct the kernel which size to use, like we do for memfd with

RE: [PATCH] Hexagon (target/hexagon) Fix shadow variable when idef-parser is off

2023-11-30 Thread Brian Cain
> -Original Message- > From: Taylor Simpson > Sent: Thursday, November 30, 2023 12:40 PM > To: qemu-devel@nongnu.org > Cc: Brian Cain ; Matheus Bernardino (QUIC) > ; Sid Manning ; Marco > Liebel (QUIC) ; richard.hender...@linaro.org; > phi...@linaro.org; a...@rev.ng; a...@rev.ng; ltaylorsi

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

2023-11-30 Thread Eric Blake
On Wed, Nov 29, 2023 at 02:55:45PM -0500, Stefan Hajnoczi wrote: > 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 meaningl

Re: [PATCH v4] migration: Plug memory leak with migration URIs

2023-11-30 Thread Peter Xu
On Thu, Nov 30, 2023 at 07:35:43PM +0100, Markus Armbruster wrote: > Peter Xu writes: > > > On Wed, Nov 29, 2023 at 08:43:01PM +, Het Gala wrote: > >> migrate_uri_parse() allocates memory to 'channel' if the user > >> opts for old syntax - uri, which is leaked because there is no > >> code fo

[PATCH] Hexagon (target/hexagon) Fix shadow variable when idef-parser is off

2023-11-30 Thread Taylor Simpson
Adding -Werror=shadow=compatible-local causes Hexagon not to build when idef-parser is off. The "label" variable in CHECK_NOSHUF_PRED shadows a variable in the surrounding code. Signed-off-by: Taylor Simpson --- target/hexagon/macros.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [PATCH v4] migration: Plug memory leak with migration URIs

2023-11-30 Thread Markus Armbruster
Peter Xu writes: > On Wed, Nov 29, 2023 at 08:43:01PM +, Het Gala wrote: >> migrate_uri_parse() allocates memory to 'channel' if the user >> opts for old syntax - uri, which is leaked because there is no >> code for freeing 'channel'. >> So, free channel to avoid memory leak in case where 'ch

[PATCH for-9.0 2/4] linux-headers: riscv: add ptrace.h

2023-11-30 Thread Daniel Henrique Barboza
KVM vector support for RISC-V requires the linux-header ptrace.h. Signed-off-by: Daniel Henrique Barboza --- linux-headers/asm-riscv/ptrace.h | 132 +++ scripts/update-linux-headers.sh | 3 + 2 files changed, 135 insertions(+) create mode 100644 linux-headers/asm-

[PATCH for-9.0 1/4] linux-headers: Update to Linux v6.7-rc3

2023-11-30 Thread Daniel Henrique Barboza
We'll add a new RISC-V linux-header file, but first let's update all headers. Headers for 'asm-loongarch' were added in this update. old commit msg: add asm-riscv/ptrace.h KVM Vector support for RISC-V requires import linux-header arch/riscv/include/uapi/asm/ptrace.h. Signed-off-by: Daniel H

[PATCH for-9.0 0/4] target/riscv: add RVV CSRs

2023-11-30 Thread Daniel Henrique Barboza
Hi, This series adds RVV, vstart, vl and vtype regs to the KVM driver. But first we need a couple of things done. We need 'ptrace.h' RISC-V linux-header to be able to read/write RVV CSRs. This is done in patch 2. Patch 1 is the usual linux-header bump for all archs. Patch 3 is adding a realize()

[PATCH for-9.0 4/4] target/riscv/kvm: add RVV and Vector CSR regs

2023-11-30 Thread Daniel Henrique Barboza
Add support for RVV and Vector CSR KVM regs vstart, vl and vtype. Support for vregs[] requires KVM side changes and an extra reg (vlenb) and will be added later. Signed-off-by: Daniel Henrique Barboza --- target/riscv/kvm/kvm-cpu.c | 74 ++ 1 file changed, 74

[PATCH for-9.0 3/4] target/riscv/kvm: do PR_RISCV_V_SET_CONTROL during realize()

2023-11-30 Thread Daniel Henrique Barboza
Linux RISC-V vector documentation (Document/arch/riscv/vector.rst) mandates a prctl() in order to allow an userspace thread to use the Vector extension from the host. This is something to be done in realize() time, after init(), when we already decided whether we're using RVV or not. We don't have

Re: [PATCH 2/2] tests/tcg/xtensa: add icount/ibreak priority test

2023-11-30 Thread Richard Henderson
On 11/30/23 11:19, Max Filippov wrote: When icount and ibreak exceptions are due to happen on the same address icount has higher precedence. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_break.S | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) Acked-

Re: [PATCH 1/2] target/xtensa: use generic instruction breakpoint infrastructure

2023-11-30 Thread Richard Henderson
On 11/30/23 11:19, Max Filippov wrote: Don't embed ibreak exception generation into TB and don't invalidate TB on ibreak address change. Add CPUBreakpoint pointers to xtensa CPUArchState, use cpu_breakpoint_insert/cpu_breakpoint_remove_by_ref to manage ibreak breakpoints and provide TCGCPUOps::de

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

2023-11-30 Thread Eric Blake
On Wed, Nov 29, 2023 at 02:55:44PM -0500, Stefan Hajnoczi wrote: > 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 func

Re: [PATCH v3 03/70] RAMBlock/guest_memfd: Enable KVM_GUEST_MEMFD_ALLOW_HUGEPAGE

2023-11-30 Thread Daniel P . Berrangé
On Thu, Nov 30, 2023 at 05:54:26PM +0100, David Hildenbrand wrote: > On 30.11.23 17:01, Sean Christopherson wrote: > > On Thu, Nov 30, 2023, David Hildenbrand wrote: > > > On 30.11.23 08:32, Xiaoyao Li wrote: > > > > On 11/20/2023 5:26 PM, David Hildenbrand wrote: > > > > > > > > > > > > ... did y

Re: [PATCH v3 03/70] RAMBlock/guest_memfd: Enable KVM_GUEST_MEMFD_ALLOW_HUGEPAGE

2023-11-30 Thread Peter Xu
On Thu, Nov 30, 2023 at 05:54:26PM +0100, David Hildenbrand wrote: > But likely we want THP support here. Because for hugetlb, one would actually > have to instruct the kernel which size to use, like we do for memfd with > hugetlb. I doubt it, as VM can still leverage larger sizes if possible? II

Re: [PATCH v4] migration: Plug memory leak with migration URIs

2023-11-30 Thread Peter Xu
On Wed, Nov 29, 2023 at 08:43:01PM +, Het Gala wrote: > migrate_uri_parse() allocates memory to 'channel' if the user > opts for old syntax - uri, which is leaked because there is no > code for freeing 'channel'. > So, free channel to avoid memory leak in case where 'channels' > is empty and ur

[PATCH 1/2] target/xtensa: use generic instruction breakpoint infrastructure

2023-11-30 Thread Max Filippov
Don't embed ibreak exception generation into TB and don't invalidate TB on ibreak address change. Add CPUBreakpoint pointers to xtensa CPUArchState, use cpu_breakpoint_insert/cpu_breakpoint_remove_by_ref to manage ibreak breakpoints and provide TCGCPUOps::debug_check_breakpoint callback that recogn

[PATCH 2/2] tests/tcg/xtensa: add icount/ibreak priority test

2023-11-30 Thread Max Filippov
When icount and ibreak exceptions are due to happen on the same address icount has higher precedence. Signed-off-by: Max Filippov --- tests/tcg/xtensa/test_break.S | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/tcg/xtensa/test_break.S b/tests/

[PATCH 0/2] target/xtensa: use generic instruction breakpoint infrastructure

2023-11-30 Thread Max Filippov
Hello, this series makes target/xtensa use generic instruction breakpoint infrastructure removing its use of tb_invalidate_phys_addr. It also adds a new TCG test checking relative priority of icount and ibreak exceptions for target/xtensa. Max Filippov (2): target/xtensa: use generic instructio

Re: [PATCH 2/3] docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS

2023-11-30 Thread Alex Bennée
Peter Maydell writes: > On Thu, 30 Nov 2023 at 15:33, Alex Bennée wrote: >> >> It doesn't make sense to have two classes of flaky tests. While it may >> take the constrained environment of CI to trigger failures easily it >> doesn't mean they don't occasionally happen on developer machines. As >

Re: [PATCH v3 03/70] RAMBlock/guest_memfd: Enable KVM_GUEST_MEMFD_ALLOW_HUGEPAGE

2023-11-30 Thread David Hildenbrand
On 30.11.23 17:01, Sean Christopherson wrote: On Thu, Nov 30, 2023, David Hildenbrand wrote: On 30.11.23 08:32, Xiaoyao Li wrote: On 11/20/2023 5:26 PM, David Hildenbrand wrote: ... did you shamelessly copy that from hw/virtio/virtio-mem.c ? ;) Get caught. This should be factored out int

Re: [PATCH v3] arm/kvm: Enable support for KVM_ARM_VCPU_PMU_V3_FILTER

2023-11-30 Thread Sebastian Ott
On Tue, 28 Nov 2023, Shaoqin Huang wrote: +static void kvm_arm_pmu_filter_init(CPUState *cs) +{ +static bool pmu_filter_init = false; +struct kvm_pmu_event_filter filter; +struct kvm_device_attr attr = { +.group = KVM_ARM_VCPU_PMU_V3_CTRL, +.attr = KVM_ARM_V

Re: [PATCH 2/3] docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS

2023-11-30 Thread Peter Maydell
On Thu, 30 Nov 2023 at 15:33, Alex Bennée wrote: > > It doesn't make sense to have two classes of flaky tests. While it may > take the constrained environment of CI to trigger failures easily it > doesn't mean they don't occasionally happen on developer machines. As > CI is the gating factor to pa

Re: [PATCH v1 1/2] hw/cxl/device: read from register values in mdev_reg_read()

2023-11-30 Thread Jonathan Cameron via
On Mon, 27 Nov 2023 12:27:02 -0800 Davidlohr Bueso wrote: > On Mon, 27 Nov 2023, Hyeonggon Yoo wrote: > > >In the current mdev_reg_read() implementation, it consistently returns > >that the Media Status is Ready (01b). This was fine until commit > >25a52959f99d ("hw/cxl: Add support for device s

Re: [PATCH 2/3] docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS

2023-11-30 Thread Philippe Mathieu-Daudé
On 30/11/23 16:33, Alex Bennée wrote: It doesn't make sense to have two classes of flaky tests. While it may take the constrained environment of CI to trigger failures easily it doesn't mean they don't occasionally happen on developer machines. As CI is the gating factor to passing there is no po

Re: [PATCH v7 00/10] Introduce model for IBM's FSI

2023-11-30 Thread Ninad Palsule
Hello Cedric, On 11/29/23 15:29, Cédric Le Goater wrote: On 11/29/23 15:56, Ninad Palsule wrote: Hello Cedric, On 11/27/23 10:31, Cédric Le Goater wrote: Hello Ninad, On 10/26/23 18:47, Ninad Palsule wrote: Hello, Please review the patch-set version 7. I have incorporated review comments f

Re: [PATCH] pcie_sriov: Remove g_new assertion

2023-11-30 Thread Michael S. Tsirkin
On Thu, Nov 30, 2023 at 04:37:43PM +0100, Cédric Le Goater wrote: > On 11/30/23 10:52, YangHang Liu wrote: > > After applying this patch, the VM with a igbvf will not crash during reboot. > > > > Tested-by: Yanghang Liumailto:yangh...@redhat.com>> > > Michael, do you have plans to send a PR for -

[PATCH v2 2/2] block: stream: Allow users to request only format driver names in backing file format

2023-11-30 Thread Peter Krempa
Introduce a new flag 'backing_file_format_no_protocol' for the block-commit QMP command which instructs the internals to use 'raw' instead of the protocol driver in case when a image is used without a dummy 'raw' wrapper. The flag is designed such that it can be always asserted by management tools

Re: [PATCH 2/3] docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS

2023-11-30 Thread Cédric Le Goater
On 11/30/23 16:33, Alex Bennée wrote: It doesn't make sense to have two classes of flaky tests. While it may take the constrained environment of CI to trigger failures easily it doesn't mean they don't occasionally happen on developer machines. As CI is the gating factor to passing there is no po

[PATCH v2 0/2] block: commit/stream: Allow users to request only format driver names in backing file format

2023-11-30 Thread Peter Krempa
Please see patches for rationale. Libvirt patches using this new flag will be posted soon-ish (after cleanup). v2: - fixed mistaken argument order in 'hmp_block_stream' - changed version in docs to 9.0 as getting this into RC 3 probably isn't realistic Peter Krempa (2): block: commit: All

[PATCH v2 1/2] block: commit: Allow users to request only format driver names in backing file format

2023-11-30 Thread Peter Krempa
Introduce a new flag 'backing_file_format_no_protocol' for the block-commit QMP command which instructs the internals to use 'raw' instead of the protocol driver in case when a image is used without a dummy 'raw' wrapper. The flag is designed such that it can be always asserted by management tools

Re: [PATCH 0/3] final fixes for 8.2

2023-11-30 Thread Richard Henderson
On 11/30/23 09:33, Alex Bennée wrote: Alex Bennée (3): gdbstub: use a better signal when we halt for IO reasons docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS gitlab: add optional job to run flaky avocado tests Reviewed-by: Richard Henderson r~

Re: [PATCH v3 03/70] RAMBlock/guest_memfd: Enable KVM_GUEST_MEMFD_ALLOW_HUGEPAGE

2023-11-30 Thread Sean Christopherson
On Thu, Nov 30, 2023, David Hildenbrand wrote: > On 30.11.23 08:32, Xiaoyao Li wrote: > > On 11/20/2023 5:26 PM, David Hildenbrand wrote: > > > > > > > > ... did you shamelessly copy that from hw/virtio/virtio-mem.c ? ;) > > > > > > > > Get caught. > > > > > > > > > This should be factored out i

[PATCH v3] accel/kvm: Turn DPRINTF macro use into tracepoints

2023-11-30 Thread Jai Arora
Patch removes DRPINTF macro and adds multiple tracepoints to capture different kvm events. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1827 Signed-off-by: Jai Arora --- Notes: v3: Addresses review comments by Alex Benn??e Removes trace events kvm_run_exit_reason, kvm_ex

Re: [PATCH 0/3] Virtio dmabuf improvements

2023-11-30 Thread Albert Esteve
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 object from the table. > - Properly cleanup shared resources if a vhost device > object gets

Re: [PATCH] pcie_sriov: Remove g_new assertion

2023-11-30 Thread Cédric Le Goater
On 11/30/23 10:52, YangHang Liu wrote: After applying this patch, the VM with a igbvf will not crash during reboot. Tested-by: Yanghang Liumailto:yangh...@redhat.com>> Michael, do you have plans to send a PR for -rc3 ? Thanks, C. On Mon, Nov 27, 2023 at 5:12 PM Cédric Le Goater mailto:c

[PATCH 2/3] docs/devel: rationalise unstable gitlab tests under FLAKY_TESTS

2023-11-30 Thread Alex Bennée
It doesn't make sense to have two classes of flaky tests. While it may take the constrained environment of CI to trigger failures easily it doesn't mean they don't occasionally happen on developer machines. As CI is the gating factor to passing there is no point developers running the tests locally

[PATCH 0/3] final fixes for 8.2

2023-11-30 Thread Alex Bennée
8.2 is looking fairly stable but I do have one bug fix for gdbstub which I came across while debugging something else. The changes for avocado rationalise all flaky tests under the QEMU_TEST_FLAKY_TESTS environment variable. The final patch re-adds the flaky tests to the CI as a manually run allow_

[PATCH 1/3] gdbstub: use a better signal when we halt for IO reasons

2023-11-30 Thread Alex Bennée
The gdb description GDB_SIGNAL_IO is "I/O possible" and by default gdb will try and restart the guest, getting us nowhere. Report GDB_SIGNAL_STOP instead which should at least halt the session at the failure point. Signed-off-by: Alex Bennée Cc: Luis Machado Message-Id: <20231123131905.2640498-1

  1   2   3   >