[PATCH v3] target/riscv: Clearing the CSR values at reset and syncing the MPSTATE with the host

2023-07-24 Thread liguang.zhang
From: "liguang.zhang" Fix the guest reboot error when using KVM There are two issues when rebooting a guest using KVM 1. When the guest initiates a reboot the host is unable to stop the vcpu 2. When running a SMP guest the qemu monitor system_reset causes a vcpu crash This can be fixed by

Re: [PATCH] hw/sd/sdhci: Do not force sdhci_mmio_*_ops onto all SD controllers

2023-07-24 Thread Bernhard Beschow
Am 16. Juli 2023 19:53:37 UTC schrieb Bernhard Beschow : > > >Am 10. Juli 2023 16:01:46 UTC schrieb Bernhard Beschow : >> >> >>Am 10. Juli 2023 10:16:35 UTC schrieb "Philippe Mathieu-Daudé" >>: >>>On 9/7/23 10:09, Bernhard Beschow wrote: Since commit c0a55a0c9da2 "hw/sd/sdhci: Support big

[PULL 1/7] tcg/ppc: Fix race in goto_tb implementation

2023-07-24 Thread Richard Henderson
From: Jordan Niethe Commit 20b6643324 ("tcg/ppc: Reorg goto_tb implementation") modified goto_tb to ensure only a single instruction was patched to prevent incorrect behavior if a thread was in the middle of multiple instructions when they were replaced. However this introduced a race between

[PULL 7/7] accel/tcg: Fix type of 'last' for pageflags_{find,next}

2023-07-24 Thread Richard Henderson
From: Luca Bonissi These should match 'start' as target_ulong, not target_long. On 32bit targets, the parameter was sign-extended to uint64_t, so only the first mmap within the upper 2GB memory can succeed. Signed-off-by: Luca Bonissi Message-Id:

[PULL for-8.1-rc1 0/7] tcg patch queue

2023-07-24 Thread Richard Henderson
The following changes since commit d1181d29370a4318a9f11ea92065bea6bb159f83: Merge tag 'pull-nbd-2023-07-19' of https://repo.or.cz/qemu/ericb into staging (2023-07-20 09:54:07 +0100) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20230724 for you

[PULL 6/7] accel/tcg: Zero-pad vaddr in tlb_debug output

2023-07-24 Thread Richard Henderson
From: Anton Johansson In replacing target_ulong with vaddr and TARGET_FMT_lx with VADDR_PRIx, the zero-padding of TARGET_FMT_lx got lost. Readd 16-wide zero-padding for logging consistency. Suggested-by: Peter Maydell Signed-off-by: Anton Johansson Message-Id:

[PULL 3/7] accel/tcg: Fix sense of read-only probes in ldst_atomicity

2023-07-24 Thread Richard Henderson
In the initial commit, cdfac37be0d, the sense of the test is incorrect, as the -1/0 return was confusing. In bef6f008b981, we mechanically invert all callers while changing to false/true return, preserving the incorrectness of the test. Now that the return sense is sane, it's easy to see that if

[PULL 2/7] include/exec: Add WITH_MMAP_LOCK_GUARD

2023-07-24 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 10 ++ bsd-user/mmap.c | 1 + linux-user/mmap.c | 1 + 3 files changed, 12 insertions(+) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 5fa0687cd2..d02517e95f

Re: [PATCH for-8.1 v2 2/4] util/interval-tree: Use qatomic_set_mb in rb_link_node

2023-07-24 Thread Peter Maydell
On Sat, 22 Jul 2023 at 22:44, Richard Henderson wrote: > > Ensure that the stores to rb_left and rb_right are complete before > inserting the new node into the tree. Otherwise a concurrent reader > could see garbage in the new leaf. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Richard

Re: [PATCH for-8.1 v2 1/4] util/interval-tree: Use qatomic_read for left/right while searching

2023-07-24 Thread Peter Maydell
On Sat, 22 Jul 2023 at 22:44, Richard Henderson wrote: > > Fixes a race condition (generally without optimization) in which > the subtree is re-read after the protecting if condition. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks --

[PATCH 03/26] softmmu/dirtylimit: Add parameter check for hmp "set_vcpu_dirty_limit"

2023-07-24 Thread Juan Quintela
From: Hyman Huang(黄勇) dirty_rate paraemter of hmp command "set_vcpu_dirty_limit" is invalid if less than 0, so add parameter check for it. Note that this patch also delete the unsolicited help message and clean up the code. Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Markus Armbruster

[PATCH 01/26] migration/multifd: Rename threadinfo.c functions

2023-07-24 Thread Juan Quintela
From: Fabiano Rosas We're about to add more functions to this file so make it use the same coding style as the rest of the code. Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu Message-Id:

Re: [PATCH] tests/decode: Suppress "error: " string for expected-failure tests

2023-07-24 Thread Peter Maydell
On Thu, 20 Jul 2023 at 14:15, Peter Maydell wrote: > > The "expected failure" tests for decodetree result in the > error messages from decodetree ending up in logs and in > V=1 output: > I'll put this in my arm pullreq since it makes pullreq handling easier and I see you've just sent a tcg

Re: [PATCH 00/26] Migration PULL 2023-07-24

2023-07-24 Thread Thomas Huth
On 24/07/2023 15.06, Juan Quintela wrote: Hi This is the migration PULL request. Maybe it would better to use "PULL" instead of "PATCH" in the subject? Now a not on CI, thas has been really bad. After too many problems with last PULLS, I decided to learn to use qemu CI. On one hand, it is

Re: [PATCH] Allow UNIX socket option for VNC websocket

2023-07-24 Thread Marc-André Lureau
On Mon, Jul 24, 2023 at 2:04 PM Sergii Zasenko wrote: > - Remove unix socket option limitation for VNC websocket > - Reflect websocket option changes in documentation > > Signed-off-by: Sergii Zasenko > Reviewed-by: Marc-André Lureau > --- > qemu-options.hx | 4 > ui/vnc.c| 5

[PATCH] Allow UNIX socket option for VNC websocket

2023-07-24 Thread Sergii Zasenko
- Remove unix socket option limitation for VNC websocket - Reflect websocket option changes in documentation Signed-off-by: Sergii Zasenko --- qemu-options.hx | 4 ui/vnc.c| 5 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx

Re: [PATCH v21 01/20] s390x/cpu topology: add s390 specifics to CPU topology

2023-07-24 Thread Nina Schoetterl-Glausch
On Fri, 2023-07-21 at 13:24 +0200, Pierre Morel wrote: > > On 7/18/23 18:31, Nina Schoetterl-Glausch wrote: > > Reviewed-by: Nina Schoetterl-Glausch > > > > Some notes below. > > > > The s390x/ prefix in the title might suggest that this patch > > is s390 specific, but it touches common files.

Re: [PULL 0/2] xen-virtio-1-tag

2023-07-24 Thread Peter Maydell
On Sat, 22 Jul 2023 at 02:10, Stefano Stabellini wrote: > > The following changes since commit d1181d29370a4318a9f11ea92065bea6bb159f83: > > Merge tag 'pull-nbd-2023-07-19' of https://repo.or.cz/qemu/ericb into > staging (2023-07-20 09:54:07 +0100) > > are available in the Git repository at: >

Re: [PATCH v3 1/2] kvm: Introduce kvm_arch_get_default_type hook

2023-07-24 Thread Philippe Mathieu-Daudé
On 22/7/23 08:22, Akihiko Odaki wrote: kvm_arch_get_default_type() returns the default KVM type. This hook is particularly useful to derive a KVM type that is valid for "none" machine model, which is used by libvirt to probe the availability of KVM. For MIPS, the existing mips_kvm_type() is

Re: [PATCH v4 01/14] target/s390x: Make CKSM raise an exception if R2 is odd

2023-07-24 Thread David Hildenbrand
On 24.07.23 10:15, Ilya Leoshkevich wrote: R2 designates an even-odd register pair; the instruction should raise a specification exception when R2 is not even. Cc: qemu-sta...@nongnu.org Fixes: e023e832d0ac ("s390x: translate engine for s390x CPU") Signed-off-by: Ilya Leoshkevich ---

Re: [PATCH] kvm: Remove KVM_CREATE_IRQCHIP support assumption

2023-07-24 Thread Thomas Huth
On 22/07/2023 08.21, Andrew Jones wrote: Since Linux commit 00f918f61c56 ("RISC-V: KVM: Skeletal in-kernel AIA irqchip support") checking KVM_CAP_IRQCHIP returns non-zero when the RISC-V platform has AIA. The cap indicates KVM supports at least one of the following ioctls: KVM_CREATE_IRQCHIP

[PATCH v4 9/9] block/throttle-groups: Use ThrottleDirection instread of bool is_write

2023-07-24 Thread zhenwei pi
'bool is_write' style is obsolete from throttle framework, adapt block throttle groups to the new style. Use a simple python script to test the new style: #!/usr/bin/python3 import subprocess import random import time commands = ['virsh blkdeviotune jammy vda --write-bytes-sec ', \

[PATCH v4 5/9] cryptodev: use NULL throttle timer cb for read direction

2023-07-24 Thread zhenwei pi
Operations on a cryptodev are considered as *write* only, the callback of read direction is never invoked. Use NULL instead of an unreachable path(cryptodev_backend_throttle_timer_cb on read direction). The dummy read timer(never invoked) is already removed here, it means that the 'FIXME' tag is

[PATCH v4 1/9] throttle: introduce enum ThrottleDirection

2023-07-24 Thread zhenwei pi
Use enum ThrottleDirection instead of number index. Reviewed-by: Alberto Garcia Reviewed-by: Hanna Czenczek Signed-off-by: zhenwei pi --- include/qemu/throttle.h | 11 --- util/throttle.c | 16 +--- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git

[PATCH v4 6/9] throttle: use enum ThrottleDirection instead of bool is_write

2023-07-24 Thread zhenwei pi
enum ThrottleDirection is already there, use ThrottleDirection instead of 'bool is_write' for throttle API, also modify related codes from block, fsdev, cryptodev and tests. Signed-off-by: zhenwei pi --- backends/cryptodev.c| 9 + block/throttle-groups.c | 6 --

[PATCH v4 7/9] throttle: use THROTTLE_MAX/ARRAY_SIZE for hard code

2023-07-24 Thread zhenwei pi
The first dimension of both to_check and bucket_types_size/bucket_types_units is used as throttle direction, use THROTTLE_MAX instead of hard coded number. Also use ARRAY_SIZE() to avoid hard coded number for the second dimension. Hanna noticed that the two array should be static. Yes, turn them

[PATCH v4 0/9] Misc fixes for throttle

2023-07-24 Thread zhenwei pi
v3 -> v4: - Hanna pointed out that 'throttle type' is not clear enough, 'throttle direction' would be better in the v3. Use 'ThrottleDirection' instead, also rename 'ThrottleType throttle' to 'ThrottleDirection direction'. - For patch 'throttle: support read-only and write-only', reduce

[PATCH v4 2/9] test-throttle: use enum ThrottleDirection

2023-07-24 Thread zhenwei pi
Use enum ThrottleDirection instead in the throttle test codes. Reviewed-by: Alberto Garcia Reviewed-by: Hanna Czenczek Signed-off-by: zhenwei pi --- tests/unit/test-throttle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/test-throttle.c

[PATCH 15/26] migration.json: Don't use space before colon

2023-07-24 Thread Juan Quintela
So all the file is consistent. Reviewed-by: Markus Armbruster Message-ID: <20230612191604.2219-1-quint...@redhat.com> Signed-off-by: Juan Quintela --- qapi/migration.json | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/qapi/migration.json

[PATCH 00/26] Migration PULL 2023-07-24

2023-07-24 Thread Juan Quintela
Hi This is the migration PULL request. It has: - Fabiano rosas trheadinfo cleanups - Hyman Huang dirtylimit changes - Part of my changes - Peter Xu documentation - Tejus updato to migration descriptions - Wei want improvements for postocpy and multifd setup Please apply. Now a not on CI, thas

Re: [PATCH v2 0/3] qemu-img: map: implement support for compressed clusters

2023-07-24 Thread Andrey Drobyshev
On 7/6/23 19:30, Andrey Drobyshev wrote: > v1 --> v2: > * Add vmdk format to the 1st commit. Tweak commit message accordingly; > * Make "compressed" field in MapEntry optional. > > v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00184.html > > Andrey Drobyshev (3): >

[PATCH 20/26] qtest/migration-tests.c: use "-incoming defer" for postcopy tests

2023-07-24 Thread Juan Quintela
From: Wei Wang The Postcopy preempt capability is expected to be set before incoming starts, so change the postcopy tests to start with deferred incoming and call migrate-incoming after the cap has been set. Why the existing tests (without this patch) didn't fail? There could be two reasons: 1)

Re: [PATCH 0/6] qemu-img: rebase: add compression support

2023-07-24 Thread Andrey Drobyshev
On 6/30/23 13:54, Denis V. Lunev wrote: > On 6/1/23 21:28, Andrey Drobyshev wrote: >> This series is adding [-c | --compress] option to "qemu-img rebase" >> command, which might prove useful for saving some disk space when, for >> instance, manipulating chains of backup images.  Along the way I

[PATCH 12/26] migration-test: Make machine_opts regular with other options

2023-07-24 Thread Juan Quintela
Reviewed-by: Peter Xu Signed-off-by: Juan Quintela Message-ID: <20230608224943.3877-5-quint...@redhat.com> --- tests/qtest/migration-test.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index

[PATCH 23/26] qemu_file: Make qemu_file_is_writable() static

2023-07-24 Thread Juan Quintela
It is not used outside of qemu_file, and it shouldn't. Signed-off-by: Juan Quintela Message-ID: <20230530183941.7223-19-quint...@redhat.com> Signed-off-by: Juan Quintela --- migration/qemu-file.h | 1 - migration/qemu-file.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 11/26] migration-test: Be consistent for ppc

2023-07-24 Thread Juan Quintela
It makes no sense that we don't have the same configuration on both sides. Reviewed-by: Laurent Vivier Message-ID: <20230608224943.3877-2-quint...@redhat.com> Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] tests/avocado/machine_s390_ccw_virtio: Skip the flaky virtio-gpu test by default

2023-07-24 Thread Cédric Le Goater
On 7/24/23 10:48, Thomas Huth wrote: The virtio-gpu test is known to be flaky - that's why we also did not enable the test_s390x_fedora in the gitlab CI. However, a flaky test can also be annoying when testing locally, so let's rather skip this subtest by default and start running the

Re: [PATCH] hw: Add compat machines for 8.2

2023-07-24 Thread Cédric Le Goater
On 7/18/23 16:22, Cornelia Huck wrote: Add 8.2 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 16

Re: [PATCH for-8.2? v2 4/4] util/interval-tree: Use qatomic_read/set for rb_parent_color

2023-07-24 Thread Peter Maydell
On Sat, 22 Jul 2023 at 22:44, Richard Henderson wrote: > > While less susceptible to optimization problems than left and right, > interval_tree_iter_next also reads rb_parent(), so make sure that > stores and loads are atomic. > > This goes further than technically required, changing all loads to

[PATCH 04/26] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter

2023-07-24 Thread Juan Quintela
From: Hyman Huang(黄勇) Introduce "x-vcpu-dirty-limit-period" migration experimental parameter, which is in the range of 1 to 1000ms and used to make dirtyrate calculation period configurable. Currently with the "x-vcpu-dirty-limit-period" varies, the total time of live migration changes, test

[PATCH 13/26] migration-test: Create arch_opts

2023-07-24 Thread Juan Quintela
This will contain the options needed for both source and target. Reviewed-by: Peter Xu Message-ID: <20230608224943.3877-6-quint...@redhat.com> Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-)

[PATCH 05/26] qapi/migration: Introduce vcpu-dirty-limit parameters

2023-07-24 Thread Juan Quintela
From: Hyman Huang(黄勇) Introduce "vcpu-dirty-limit" migration parameter used to limit dirty page rate during live migration. "vcpu-dirty-limit" and "x-vcpu-dirty-limit-period" are two dirty-limit-related migration parameters, which can be set before and during live migration by qmp

[PATCH 02/26] migration/multifd: Protect accesses to migration_threads

2023-07-24 Thread Juan Quintela
From: Fabiano Rosas This doubly linked list is common for all the multifd and migration threads so we need to avoid concurrent access. Add a mutex to protect the data from concurrent access. This fixes a crash when removing two MigrationThread objects from the list at the same time during

[PATCH 21/26] qemu-file: Rename qemu_file_transferred_ fast -> noflush

2023-07-24 Thread Juan Quintela
Fast don't say much. Noflush indicates more clearly that it is like qemu_file_transferred but without the flush. Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20230530183941.7223-2-quint...@redhat.com> Signed-off-by: Juan Quintela --- migration/qemu-file.h | 11 +--

[PATCH 26/26] migration/rdma: Split qemu_fopen_rdma() into input/output functions

2023-07-24 Thread Juan Quintela
This is how everything else in QEMUFile is structured. As a bonus they are three less lines of code. Reviewed-by: Peter Xu Message-ID: <20230530183941.7223-17-quint...@redhat.com> Signed-off-by: Juan Quintela --- migration/qemu-file.h | 1 - migration/qemu-file.c | 12

Re: [PULL 0/1] riscv-to-apply queue

2023-07-24 Thread Peter Maydell
On Sun, 23 Jul 2023 at 10:35, Alistair Francis wrote: > > The following changes since commit d1181d29370a4318a9f11ea92065bea6bb159f83: > > Merge tag 'pull-nbd-2023-07-19' of https://repo.or.cz/qemu/ericb into > staging (2023-07-20 09:54:07 +0100) > > are available in the Git repository at: > >

Re: [PULL for-8.1-rc1 0/7] tcg patch queue

2023-07-24 Thread Peter Maydell
in the Git repository at: > > https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20230724 > > for you to fetch changes up to 32b120394c578bc824f1db4835b3bffbeca88fae: > > accel/tcg: Fix type of 'last' for pageflags_{f

Re: [PULL for-8.1 0/1] revert "linux-user: Fix qemu-arm to run static armhf binaries"

2023-07-24 Thread Peter Maydell
On Sat, 22 Jul 2023 at 17:59, Michael Tokarev wrote: > > The following changes since commit 4ea3fa99bebe8f153e74cf625980183cfd2238f6: > > Revert "linux-user: Fix qemu-arm to run static armhf binaries" (2023-07-22 > 19:54:22 +0300) > > are available in the Git repository at: > >

Re: [PATCH 02/26] migration/multifd: Protect accesses to migration_threads

2023-07-24 Thread Fabiano Rosas
Juan Quintela writes: > From: Fabiano Rosas > > This doubly linked list is common for all the multifd and migration > threads so we need to avoid concurrent access. > > Add a mutex to protect the data from concurrent access. This fixes a > crash when removing two MigrationThread objects from

Re: [PATCH v1 0/9] gfxstream + rutabaga_gfx

2023-07-24 Thread Alyssa Ross
Gurchetan Singh writes: > In terms of API stability/versioning/packaging, once this series is > reviewed, the plan is to cut a "gfxstream upstream release branch". We > will have the same API guarantees as any other QEMU project then, i.e no > breaking API changes for 5 years. What about

Re: [PATCH] hw: Add compat machines for 8.2

2023-07-24 Thread Thomas Huth
On 18/07/2023 16.22, Cornelia Huck wrote: Add 8.2 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 16

Re: [PATCH QEMU v9 2/9] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter

2023-07-24 Thread Markus Armbruster
I missed something... ~hyman writes: > From: Hyman Huang(黄勇) > > Introduce "x-vcpu-dirty-limit-period" migration experimental > parameter, which is in the range of 1 to 1000ms and used to > make dirty page rate calculation period configurable. > > Currently with the "x-vcpu-dirty-limit-period"

Re: [PATCH v6 4/6] qapi: Add HvBalloonDeviceInfo sub-type to MemoryDeviceInfo

2023-07-24 Thread Markus Armbruster
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > Used by the hv-balloon driver to report its provided memory state > information. > > Co-developed-by: David Hildenbrand > Signed-off-by: Maciej S. Szmigiero > --- > hw/core/machine-hmp-cmds.c | 15 +++ >

Re: [PATCH] For curses display, recognize a few more control keys

2023-07-24 Thread Peter Maydell
On Sat, 15 Jul 2023 at 14:31, Sean Estabrooks wrote: > > The curses display handles most control-X keys, and translates > them into their corresponding keycode. Here we recognize > a few that are missing, Ctrl-@ (null), Ctrl-\ (backslash), > Ctrl-] (right bracket), Ctrl-^ (caret), Ctrl-_

[PATCH 17/26] docs/migration: Update postcopy bits

2023-07-24 Thread Juan Quintela
From: Peter Xu We have postcopy recovery but not reflected in the document, do an update for that. Add a very small section on postcopy preempt. Touch up the pagemap section, dropping the unsent map because it's already been dropped in the source code in commit 1e7cf8c323 ("migration/postcopy:

[PATCH 07/26] migration: Refactor auto-converge capability logic

2023-07-24 Thread Juan Quintela
From: Hyman Huang(黄勇) Check if block migration is running before throttling guest down in auto-converge way. Note that this modification is kind of like code clean, because block migration does not depend on auto-converge capability, so the order of checks can be adjusted. Signed-off-by: Hyman

[PATCH 22/26] migration: Change qemu_file_transferred to noflush

2023-07-24 Thread Juan Quintela
We do a qemu_fclose() just after that, that also does a qemu_fflush(), so remove one qemu_fflush(). Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20230530183941.7223-3-quint...@redhat.com> Signed-off-by: Juan Quintela --- migration/savevm.c | 2 +- 1 file changed, 1 insertion(+), 1

[RFC] risc-v vector (RVV) emulation performance issues

2023-07-24 Thread Daniel Henrique Barboza
Hi, As some of you are already aware the current RVV emulation could be faster. We have at least one commit (bc0ec52eb2, "target/riscv/vector_helper.c: skip set tail when vta is zero") that tried to address at least part of the problem. Running a simple program like this: --- #define SZ

[PATCH v4 8/9] fsdev: Use ThrottleDirection instread of bool is_write

2023-07-24 Thread zhenwei pi
'bool is_write' style is obsolete from throttle framework, adapt fsdev to the new style. Cc: Greg Kurz Signed-off-by: zhenwei pi --- fsdev/qemu-fsdev-throttle.c | 14 +++--- fsdev/qemu-fsdev-throttle.h | 4 ++-- hw/9pfs/cofile.c| 4 ++-- 3 files changed, 11 insertions(+),

[PATCH v4 3/9] throttle: support read-only and write-only

2023-07-24 Thread zhenwei pi
Only one direction is necessary in several scenarios: - a read-only disk - operations on a device are considered as *write* only. For example, encrypt/decrypt/sign/verify operations on a cryptodev use a single *write* timer(read timer callback is defined, but never invoked). Allow a single

[PATCH v4 4/9] test-throttle: test read only and write only

2023-07-24 Thread zhenwei pi
Reviewed-by: Alberto Garcia Reviewed-by: Hanna Czenczek Signed-off-by: zhenwei pi --- tests/unit/test-throttle.c | 66 ++ 1 file changed, 66 insertions(+) diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c index a60b5fe22e..5547837a58

Re: [PULL 0/2] QAPI patches patches for 2023-07-10

2023-07-24 Thread Markus Armbruster
Markus Armbruster writes: > Did this fall through the cracks? Hmm, looks like Peter is taking care of merging right now.

Re: [PATCH v6 0/6] Hyper-V Dynamic Memory Protocol driver (hv-balloon ️)

2023-07-24 Thread Markus Armbruster
Doesn't apply to master. Care to rebase?

Re: [PATCH] tests/avocado/machine_s390_ccw_virtio: Skip the flaky virtio-gpu test by default

2023-07-24 Thread Philippe Mathieu-Daudé
On 24/7/23 10:48, Thomas Huth wrote: The virtio-gpu test is known to be flaky - that's why we also did not enable the test_s390x_fedora in the gitlab CI. However, a flaky test can also be annoying when testing locally, so let's rather skip this subtest by default and start running the

Re: [PATCH v6 0/6] Hyper-V Dynamic Memory Protocol driver (hv-balloon ️)

2023-07-24 Thread Maciej S. Szmigiero
On 24.07.2023 12:56, Markus Armbruster wrote: Doesn't apply to master. Care to rebase? The series is now based on David's virtio-mem-memslots patches (specifically, commit 6769107d1a4f from [1]) since it depends on support for exposing device memory via multiple memslots provided by that

Re: [PATCH for-8.2? v2 3/4] util/interval-tree: Introduce pc_parent

2023-07-24 Thread Peter Maydell
On Sat, 22 Jul 2023 at 22:44, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > util/interval-tree.c | 13 + > 1 file changed, 9 insertions(+), 4 deletions(-) Reviewed-by: Peter Maydell thanks -- PMM

[PATCH 25/26] qemu-file: Make qemu_file_get_error_obj() static

2023-07-24 Thread Juan Quintela
It was not used outside of qemu_file.c anyways. Reviewed-by: Peter Xu Message-ID: <20230530183941.7223-21-quint...@redhat.com> Signed-off-by: Juan Quintela --- migration/qemu-file.h | 1 - migration/qemu-file.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 19/26] migration: enforce multifd and postcopy preempt to be set before incoming

2023-07-24 Thread Juan Quintela
From: Wei Wang qemu_start_incoming_migration needs to check the number of multifd channels or postcopy ram channels to configure the backlog parameter (i.e. the maximum length to which the queue of pending connections for sockfd may grow) of listen(). So enforce the usage of postcopy-preempt and

[PATCH 18/26] migration: Update error description whenever migration fails

2023-07-24 Thread Juan Quintela
From: Tejus GK There are places in migration.c where the migration is marked failed with MIGRATION_STATUS_FAILED, but the failure reason is never updated. Hence libvirt doesn't know why the migration failed when it queries for it. Reviewed-by: Daniel P. Berrangé Signed-off-by: Tejus GK

[PATCH 10/26] migration: Extend query-migrate to provide dirty page limit info

2023-07-24 Thread Juan Quintela
From: Hyman Huang(黄勇) Extend query-migrate to provide throttle time and estimated ring full time with dirty-limit capability enabled, through which we can observe if dirty limit take effect during live migration. Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Markus Armbruster Reviewed-by: Juan

[PATCH 24/26] qemu-file: Simplify qemu_file_shutdown()

2023-07-24 Thread Juan Quintela
Reviewed-by: Peter Xu Message-ID: <20230530183941.7223-20-quint...@redhat.com> Signed-off-by: Juan Quintela --- migration/qemu-file.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/migration/qemu-file.c b/migration/qemu-file.c index 9a89e17924..4c577bdff8 100644 ---

Re: [PATCH v2 0/3] block: align CoR requests to subclusters

2023-07-24 Thread Andrey Drobyshev
On 7/11/23 20:25, Andrey Drobyshev wrote: > v1 --> v2: > * Fixed line indentation; > * Fixed wording in a comment; > * Added R-b. > > v1: https://lists.nongnu.org/archive/html/qemu-block/2023-06/msg00606.html > > Andrey Drobyshev (3): > block: add subcluster_size field to BlockDriverInfo >

[PATCH 14/26] migration-test: machine_opts is really arch specific

2023-07-24 Thread Juan Quintela
And it needs to be in both source and target, so put it on arch_opts. Reviewed-by: Peter Xu Message-ID: <20230608224943.3877-7-quint...@redhat.com> Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git

Re: [PATCH 06/14] target/arm/ptw: Pass an ARMSecuritySpace to arm_hcr_el2_eff_secstate()

2023-07-24 Thread Peter Maydell
On Sun, 23 Jul 2023 at 16:24, Richard Henderson wrote: > > On 7/14/23 16:46, Peter Maydell wrote: > > arm_hcr_el2_eff_secstate() takes a bool secure, which it uses to > > determine whether EL2 is enabled in the current security state. > > With the advent of FEAT_RME this is no longer sufficient,

Re: [PATCH v6 0/6] Hyper-V Dynamic Memory Protocol driver (hv-balloon ️)

2023-07-24 Thread Markus Armbruster
"Maciej S. Szmigiero" writes: > On 24.07.2023 12:56, Markus Armbruster wrote: >> Doesn't apply to master. Care to rebase? >> > > The series is now based on David's virtio-mem-memslots patches > (specifically, commit 6769107d1a4f from [1]) since it depends > on support for exposing device

Re: [PATCH v6 4/6] qapi: Add HvBalloonDeviceInfo sub-type to MemoryDeviceInfo

2023-07-24 Thread Maciej S. Szmigiero
On 24.07.2023 13:37, Markus Armbruster wrote: "Maciej S. Szmigiero" writes: From: "Maciej S. Szmigiero" Used by the hv-balloon driver to report its provided memory state information. Co-developed-by: David Hildenbrand Signed-off-by: Maciej S. Szmigiero --- hw/core/machine-hmp-cmds.c |

Re: [PATCH v6 0/6] Hyper-V Dynamic Memory Protocol driver (hv-balloon ️)

2023-07-24 Thread Maciej S. Szmigiero
On 24.07.2023 13:39, Markus Armbruster wrote: "Maciej S. Szmigiero" writes: On 24.07.2023 12:56, Markus Armbruster wrote: Doesn't apply to master. Care to rebase? The series is now based on David's virtio-mem-memslots patches (specifically, commit 6769107d1a4f from [1]) since it depends

Re: [PATCH 0/2] target/riscv: add missing riscv,isa strings

2023-07-24 Thread Daniel Henrique Barboza
On 7/23/23 23:51, Alistair Francis wrote: On Thu, Jul 20, 2023 at 11:25 PM Daniel Henrique Barboza wrote: Hi, Found these 2 instances while working in more 8.2 material. I believe both are safe for freeze but I won't lose my sleep if we decide to postpone it. I wasn't going to squeeze

Re: 8.1-rc0 testfloat fails to compile

2023-07-24 Thread Olaf Hering
Sat, 22 Jul 2023 13:49:40 +0100 Richard Henderson : > If this is with optimization enabled, the bug should be reported to gcc > bugzilla. > The compiler should easily prove the default case is unreachable. This happens also with -O0 or without any -On, or without -Wall.

[PATCH 09/26] migration: Implement dirty-limit convergence algo

2023-07-24 Thread Juan Quintela
From: Hyman Huang(黄勇) Implement dirty-limit convergence algo for live migration, which is kind of like auto-converge algo but using dirty-limit instead of cpu throttle to make migration convergent. Enable dirty page limit if dirty_rate_high_cnt greater than 2 when dirty-limit capability

[PATCH 06/26] migration: Introduce dirty-limit capability

2023-07-24 Thread Juan Quintela
From: Hyman Huang(黄勇) Introduce migration dirty-limit capability, which can be turned on before live migration and limit dirty page rate durty live migration. Introduce migrate_dirty_limit function to help check if dirty-limit capability enabled during live migration. Meanwhile, refactor

[PATCH 08/26] migration: Put the detection logic before auto-converge checking

2023-07-24 Thread Juan Quintela
From: Hyman Huang(黄勇) This commit is prepared for the implementation of dirty-limit convergence algo. The detection logic of throttling condition can apply to both auto-converge and dirty-limit algo, putting it's position before the checking logic for auto-converge feature. Signed-off-by:

[PATCH 16/26] migration: skipped field is really obsolete.

2023-07-24 Thread Juan Quintela
Has return zero for more than 10 years. Specifically we introduced the field in 1.5.0 commit f1c72795af573b24a7da5eb52375c9aba8a37972 Author: Peter Lieven Date: Tue Mar 26 10:58:37 2013 +0100 migration: do not sent zero pages in bulk stage during bulk stage of ram migration if a

Re: [PATCH] hw/sd/sdhci: Do not force sdhci_mmio_*_ops onto all SD controllers

2023-07-24 Thread Guenter Roeck
On 7/24/23 00:18, Bernhard Beschow wrote: Am 16. Juli 2023 19:53:37 UTC schrieb Bernhard Beschow : Am 10. Juli 2023 16:01:46 UTC schrieb Bernhard Beschow : Am 10. Juli 2023 10:16:35 UTC schrieb "Philippe Mathieu-Daudé" : On 9/7/23 10:09, Bernhard Beschow wrote: Since commit

[PATCH v4 02/14] target/s390x: Fix CLM with M3=0

2023-07-24 Thread Ilya Leoshkevich
When the mask is zero, access exceptions should still be recognized for 1 byte at the second-operand address. CC should be set to 0. Cc: qemu-sta...@nongnu.org Fixes: defb0e3157af ("s390x: Implement opcode helpers") Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson Signed-off-by:

[PATCH v4 11/14] tests/tcg/s390x: Test ICM

2023-07-24 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Tested-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/icm.S | 32 + 2 files changed, 33 insertions(+) create mode 100644

[PULL 5/7] tcg/{i386, s390x}: Add earlyclobber to the op_add2's first output

2023-07-24 Thread Richard Henderson
From: Ilya Leoshkevich i386 and s390x implementations of op_add2 require an earlyclobber, which is currently missing. This breaks VCKSM in s390x guests. E.g., on x86_64 the following op: add2_i32 tmp2,tmp3,tmp2,tmp3,tmp3,tmp2 dead: 0 2 3 4 5 pref=none,0x is translated to: addl

[PULL 4/7] accel/tcg: Take mmap_lock in load_atomic*_or_exit

2023-07-24 Thread Richard Henderson
For user-only, the probe for page writability may race with another thread's mprotect. Take the mmap_lock around the operation. This is still faster than the start/end_exclusive fallback. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- accel/tcg/ldst_atomicity.c.inc | 32

2023-07-25 QEMU developers fortnightly conference call for agenda

2023-07-24 Thread juan . quintela
Hi If you have topics for this week call, please let's us now. Later, Juan. QEMU developers fortnightly conference call Tuesday 2023-07-25 ⋅ 15:00 – 16:00 Central European Time - Madrid Location https://meet.jit.si/kvmcallmeeting

Re: [PATCH] Allow UNIX socket for VNC websocket

2023-07-24 Thread Marc-André Lureau
Hi Daniel, in commit 275e0d616b ("ui: refactor code for populating SocketAddress from vnc_display_open"), you said "This refactoring also removes the restriction that prevents enabling websockets when the plain VNC server is listening on a UNIX socket.". But you didn't remove the condition. I

Re: [PATCH for-8.2 1/2] arm/kvm: convert to kvm_set_one_reg

2023-07-24 Thread Cornelia Huck
On Mon, Jul 24 2023, Gavin Shan wrote: > Hi Connie, > > On 7/18/23 21:14, Cornelia Huck wrote: >> We can neaten the code by switching to the kvm_set_one_reg function. >> >> Signed-off-by: Cornelia Huck >> --- >> target/arm/kvm.c | 13 +++-- >> target/arm/kvm64.c | 66

Re: [Qemu PATCH 0/9] Enabling DCD emulation support in Qemu

2023-07-24 Thread Jonathan Cameron via
On Sat, 22 Jul 2023 21:52:06 -0700 Ira Weiny wrote: > nifan@ wrote: > > From: Fan Ni > > > > The patch series provides dynamic capacity device (DCD) emulation in Qemu. > > I don't the patches on the list. > >

[PATCH v2] target/riscv: Clearing the CSR values at reset and syncing the MPSTATE with the host

2023-07-24 Thread liguang.zhang
From: "liguang.zhang" There are two issues when rebooting a guest using KVM 1. When the guest initiates a reboot the host is unable to stop the vcpu 2. When running a SMP guest the qemu monitor system_reset causes a vcpu crash This can be fixed by clearing the CSR values at reset and syncing

Re: [PATCH] Allow UNIX socket for VNC websocket

2023-07-24 Thread Daniel P . Berrangé
On Mon, Jul 24, 2023 at 12:08:26PM +0400, Marc-André Lureau wrote: > Hi > > Daniel, in commit 275e0d616b ("ui: refactor code for populating > SocketAddress from vnc_display_open"), you said "This refactoring also > removes the restriction that prevents enabling websockets when the plain > VNC

Re: [PATCH] Allow UNIX socket for VNC websocket

2023-07-24 Thread Daniel P . Berrangé
On Mon, Jul 24, 2023 at 12:03:56AM +0300, Sergii Zasenko wrote: > Signed-off-by: Sergii Zasenko > --- > ui/vnc.c | 5 - > 1 file changed, 5 deletions(-) > > diff --git a/ui/vnc.c b/ui/vnc.c > index 92964dc..dea1414 100644 > --- a/ui/vnc.c > +++ b/ui/vnc.c > @@ -3715,11 +3715,6 @@ static int

Re: [PATCH for-8.2 2/2] arm/kvm: convert to kvm_get_one_reg

2023-07-24 Thread Cornelia Huck
On Mon, Jul 24 2023, Gavin Shan wrote: > Hi Connie, > > On 7/18/23 21:14, Cornelia Huck wrote: >> We can neaten the code by switching the callers that work on a >> CPUstate to the kvm_get_one_reg function. >> >> Signed-off-by: Cornelia Huck >> --- >> target/arm/kvm.c | 15 +++- >>

[PATCH] tests/avocado/machine_s390_ccw_virtio: Skip the flaky virtio-gpu test by default

2023-07-24 Thread Thomas Huth
The virtio-gpu test is known to be flaky - that's why we also did not enable the test_s390x_fedora in the gitlab CI. However, a flaky test can also be annoying when testing locally, so let's rather skip this subtest by default and start running the test_s390x_fedora test in the gitlab CI again

Re: [PATCH v4 01/14] target/s390x: Make CKSM raise an exception if R2 is odd

2023-07-24 Thread Richard Henderson
On 7/24/23 09:15, Ilya Leoshkevich wrote: R2 designates an even-odd register pair; the instruction should raise a specification exception when R2 is not even. Cc:qemu-sta...@nongnu.org Fixes: e023e832d0ac ("s390x: translate engine for s390x CPU") Signed-off-by: Ilya Leoshkevich ---

Re: [PATCH] tests/avocado/migration: Remove the malfunctioning s390x tests

2023-07-24 Thread Juan Quintela
Thomas Huth wrote: > The tests from tests/avocado/migration.py do not work at all > on s390x - the bios shuts down immediately when it cannot find > a boot disk, so there is nothing left to migrate here. For doing > a proper migration test, we would need a proper payload, but we > already do such

Re: [PATCH QEMU v9 2/9] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter

2023-07-24 Thread Markus Armbruster
~hyman writes: > From: Hyman Huang(黄勇) > > Introduce "x-vcpu-dirty-limit-period" migration experimental > parameter, which is in the range of 1 to 1000ms and used to > make dirty page rate calculation period configurable. > > Currently with the "x-vcpu-dirty-limit-period" varies, the

  1   2   3   >