Re: [PATCH v1 20/23] xen platform: unplug ahci object

2023-06-21 Thread Bernhard Beschow
Am 20. Juni 2023 17:24:54 UTC schrieb Joel Upham : >This will unplug the ahci device when the Xen driver calls for an unplug. >This has been tested to work in linux and Windows guests. >When q35 is detected, we will remove the ahci controller >with the hard disks. In the libxl config, cdrom dev

Re: [PULL 00/30] Next patches

2023-06-21 Thread Richard Henderson
On 6/22/23 04:12, Juan Quintela wrote: The following changes since commit 67fe6ae41da64368bc4936b196fee2bf61f8c720: Merge tag 'pull-tricore-20230621-1' ofhttps://github.com/bkoppelmann/qemu into staging (2023-06-21 20:08:48 +0200) are available in the Git repository at:

Re: [PATCH] ui/gtk: making dmabuf NULL when it's released.

2023-06-21 Thread Richard Henderson
On 6/22/23 00:11, Dongwon Kim wrote: static void gd_gl_release_dmabuf(DisplayChangeListener *dcl, QemuDmaBuf *dmabuf) { +VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl); #ifdef CONFIG_GBM egl_dmabuf_release_texture(dmabuf); +i

Re: [PATCH v3 00/37] crypto: Provide aes-round.h and host accel

2023-06-21 Thread Richard Henderson
On 6/20/23 13:07, Richard Henderson wrote: Patches missing r-b: 08-target-arm-Use-aesenc_SB_SR_AK.patch 10-target-riscv-Use-aesenc_SB_SR_AK.patch 13-target-arm-Use-aesdec_ISB_ISR_AK.patch 15-target-riscv-Use-aesdec_ISB_ISR_AK.patch 17-target-arm-Use-aesenc_MC.patch 19-target-i38

[PATCH RFC 1/3] vdpa: Restore MAC address filtering state

2023-06-21 Thread Hawkins Jiawei
This patch refactors vhost_vdpa_net_load_mac() to restore the MAC address filtering state at device's startup. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/net/vhost-vdpa.c b/net/vho

[PATCH RFC 3/3] vdpa: Allow VIRTIO_NET_F_CTRL_RX in SVQ

2023-06-21 Thread Hawkins Jiawei
Enable SVQ with VIRTIO_NET_F_CTRL_RX feature. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 355a6aef15..ca800f97e2 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -99,6 +99,7 @@ static cons

[PATCH RFC 0/3] Vhost-vdpa Shadow Virtqueue _F_CTRL_RX commands support

2023-06-21 Thread Hawkins Jiawei
This series enables shadowed CVQ to intercept rx commands related to VIRTIO_NET_F_CTRL_RX feature through shadowed CVQ, update the virtio NIC device model so qemu send it in a migration, and the restore of that rx state in the destination. Note that this patch should be based on [1], and conflicts

[PATCH RFC 2/3] vdpa: Restore packet receive filtering state relative with _F_CTRL_RX feature

2023-06-21 Thread Hawkins Jiawei
This patch introduces vhost_vdpa_net_load_rx_mode() and vhost_vdpa_net_load_rx() to restore the packet receive filtering state in relation to VIRTIO_NET_F_CTRL_RX feature at device's startup. Signed-off-by: Hawkins Jiawei --- net/vhost-vdpa.c | 74

Re: [PATCH] target/riscv/cpu.c: fix veyron-v1 CPU properties

2023-06-21 Thread Alistair Francis
On Wed, Jun 21, 2023 at 1:25 AM Daniel Henrique Barboza wrote: > > Commit 7f0bdfb5bfc2 ("target/riscv/cpu.c: remove cfg setup from > riscv_cpu_init()") removed code that was enabling mmu, pmp, ext_ifencei > and ext_icsr from riscv_cpu_init(), the init() function of > TYPE_RISCV_CPU, parent type of

Re: [RFC 4/6] migration: Deprecate -incoming

2023-06-21 Thread Juan Quintela
Thomas Huth wrote: > On 12/06/2023 21.33, Juan Quintela wrote: >> Only "defer" is recommended. After setting all migation parameters, >> start incoming migration with "migrate-incoming uri" command. >> Signed-off-by: Juan Quintela >> --- >> docs/about/deprecated.rst | 7 +++ >> softmmu/vl

[PULL 29/30] qemu-file: Make qemu_file_get_error_obj() static

2023-06-21 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 a/migration/qemu

[PULL 27/30] qemu_file: Make qemu_file_is_writable() static

2023-06-21 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 a/

[PULL 06/30] migration: Introduce dirty-limit capability

2023-06-21 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 vcpu_d

[PULL 23/30] qtest/migration-tests.c: use "-incoming defer" for postcopy tests

2023-06-21 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)

[PULL 20/30] migration: Update error description whenever migration fails

2023-06-21 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é Acked-by: Peter Xu Signed-off-b

[PULL 30/30] migration/rdma: Split qemu_fopen_rdma() into input/output functions

2023-06-21 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 migration/r

[PULL 25/30] migration: Change qemu_file_transferred to noflush

2023-06-21 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 deletion(

[PULL 22/30] migration: enforce multifd and postcopy preempt to be set before incoming

2023-06-21 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

[PULL 26/30] migration: Use qemu_file_transferred_noflush() for block migration.

2023-06-21 Thread Juan Quintela
We only care about the amount of bytes transferred. Flushing is done by the system somewhere else. Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20230530183941.7223-4-quint...@redhat.com> Signed-off-by: Juan Quintela --- migration/block.c | 4 ++-- 1 file changed, 2 ins

[PULL 13/30] migration-test: Create arch_opts

2023-06-21 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(-) di

[PULL 07/30] migration: Refactor auto-converge capability logic

2023-06-21 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

[PULL 14/30] migration-test: machine_opts is really arch specific

2023-06-21 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 a/te

[PULL 15/30] migration-test: Create kvm_opts

2023-06-21 Thread Juan Quintela
So arch_dirty_ring option becomes one option like the others. Reviewed-by: Peter Xu Message-ID: <20230608224943.3877-8-quint...@redhat.com> Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/qtest/m

[PULL 28/30] qemu-file: Simplify qemu_file_shutdown()

2023-06-21 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 --- a/

[PULL 21/30] migration: Refactor repeated call of yank_unregister_instance

2023-06-21 Thread Juan Quintela
From: Tejus GK In the function qmp_migrate(), yank_unregister_instance() gets called twice which isn't required. Hence, refactoring it so that it gets called during the local_error cleanup. Reviewed-by: Daniel P. Berrangé Reviewed-by: Juan Quintela Acked-by: Peter Xu Signed-off-by: Tejus GK

[PULL 16/30] migration-test: bootpath is the same for all tests and for all archs

2023-06-21 Thread Juan Quintela
So just make it a global variable. Reviewed-by: Peter Xu Message-ID: <20230608224943.3877-9-quint...@redhat.com> Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/tests/qtest/migration-test.c b

[PULL 17/30] migration-test: Add bootfile_create/delete() functions

2023-06-21 Thread Juan Quintela
The bootsector code is read only from the guest (otherwise we are going to have problems with it being read from both source and destination). Create a single copy for all the tests. Reviewed-by: Peter Xu Message-ID: <20230608224943.3877-10-quint...@redhat.com> Signed-off-by: Juan Quintela ---

[PULL 24/30] qemu-file: Rename qemu_file_transferred_ fast -> noflush

2023-06-21 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 +-- migration/qemu-f

[PULL 19/30] migration-test: simplify shmem_opts handling

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

[PULL 11/30] migration-test: Be consistent for ppc

2023-06-21 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 a/tests/

[PULL 05/30] qapi/migration: Introduce vcpu-dirty-limit parameters

2023-06-21 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 migrate-set-pa

[PULL 18/30] migration-test: dirtylimit checks for x86_64 arch before

2023-06-21 Thread Juan Quintela
So no need to assert we are in x86_64. Once there, refactor the function to remove useless variables. Reviewed-by: Peter Xu Message-ID: <20230608224943.3877-11-quint...@redhat.com> Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 5 + 1 file changed, 1 insertion(+), 4 deletio

[PULL 09/30] migration: Implement dirty-limit convergence algo

2023-06-21 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 enabled,

[PULL 12/30] migration-test: Make machine_opts regular with other options

2023-06-21 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 c5e0c69c6b.

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

2023-06-21 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 Q

[PULL 02/30] migration/multifd: Protect accesses to migration_threads

2023-06-21 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 cleanu

[PULL 08/30] migration: Put the detection logic before auto-converge checking

2023-06-21 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: Hyman

[PULL 04/30] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter

2023-06-21 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 res

[PULL 01/30] migration/multifd: Rename threadinfo.c functions

2023-06-21 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: <20230607161306.31425-2-faro...@suse.

[PULL 00/30] Next patches

2023-06-21 Thread Juan Quintela
The following changes since commit 67fe6ae41da64368bc4936b196fee2bf61f8c720: Merge tag 'pull-tricore-20230621-1' of https://github.com/bkoppelmann/qemu into staging (2023-06-21 20:08:48 +0200) are available in the Git repository at: https://gitlab.com/juan.quintela/qemu.git tags

[PULL 03/30] softmmu/dirtylimit: Add parameter check for hmp "set_vcpu_dirty_limit"

2023-06-21 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 Reviewe

Re: [PATCH v5 0/3] Implement the watchdog timer of HiFive 1 rev b.

2023-06-21 Thread Alistair Francis
On Fri, Jun 9, 2023 at 2:46 AM Tommy Wu wrote: > > The HiFive 1 rev b includes a watchdog module based on a 32-bit > counter. The watchdog timer is in the always-on domain device of > HiFive 1 rev b, so this patch added the AON device to the sifive_e > machine. This patch only implemented the func

Re: [PATCH v5 3/3] tests/qtest: sifive-e-aon-watchdog-test.c: Add QTest of watchdog of sifive_e

2023-06-21 Thread Alistair Francis
On Fri, Jun 9, 2023 at 2:46 AM Tommy Wu wrote: > > Add some simple tests of the watchdog timer in the always-on domain device > of HiFive 1 rev b. > > Signed-off-by: Tommy Wu > Reviewed-by: Frank Chang > Acked-by: Thomas Huth Acked-by: Alistair Francis Alistair > --- > tests/qtest/meson.bu

Re: [PATCH v5 2/3] hw/riscv: sifive_e: Support the watchdog timer of HiFive 1 rev b.

2023-06-21 Thread Alistair Francis
On Fri, Jun 9, 2023 at 2:46 AM Tommy Wu wrote: > > Create the AON device when we realize the sifive_e machine. > This patch only implemented the functionality of the watchdog timer, > not all the functionality of the AON device. > > Signed-off-by: Tommy Wu > Reviewed-by: Frank Chang Reviewed-by

Re: [PATCH v5 1/3] hw/misc: sifive_e_aon: Support the watchdog timer of HiFive 1 rev b.

2023-06-21 Thread Alistair Francis
On Fri, Jun 9, 2023 at 2:47 AM Tommy Wu wrote: > > The watchdog timer is in the always-on domain device of HiFive 1 rev b, > so this patch added the AON device to the sifive_e machine. This patch > only implemented the functionality of the watchdog timer. > > Signed-off-by: Tommy Wu > Reviewed-by

Re: [PATCH v2 0/3] target/riscv: Fix mstatus related problems

2023-06-21 Thread Alistair Francis
On Sat, Jun 3, 2023 at 11:43 PM Weiwei Li wrote: > > This patchset tries to fix some problems in the fields of mstatus, such as > make MPV only work when MPP != PRM. > > The port is available here: > https://github.com/plctlab/plct-qemu/tree/plct-mpv-upstream-v2 > > v2: > * Drop patch 3 (remove c

Re: [PATCH] hw/intc: If mmsiaddrcfgh.L == 1, smsiaddrcfg and smsiaddrcfgh are read-only.

2023-06-21 Thread Alistair Francis
On Mon, Jun 19, 2023 at 7:24 PM Peter Maydell wrote: > > On Mon, 12 Jun 2023 at 05:12, Alistair Francis wrote: > > > > On Fri, Jun 9, 2023 at 4:01 PM Tommy Wu wrote: > > > > > > According to the `The RISC-V Advanced Interrupt Architecture` > > > document, if register `mmsiaddrcfgh` of the domain

Re: [PATCH v2 10/18] target/riscv/kvm.c: init 'misa_ext_mask' with scratch CPU

2023-06-21 Thread Alistair Francis
On Wed, Jun 14, 2023 at 7:00 AM Daniel Henrique Barboza wrote: > > At this moment we're retrieving env->misa_ext during > kvm_arch_init_cpu(), leaving env->misa_ext_mask behind. > > We want to set env->misa_ext_mask, and we want to set it as early as > possible. The reason is that we're going to u

Re: [PATCH v2 09/18] linux-headers: Update to v6.4-rc1

2023-06-21 Thread Alistair Francis
On Wed, Jun 14, 2023 at 7:02 AM Daniel Henrique Barboza wrote: > > Update to commit ac9a78681b92 ("Linux 6.4-rc1"). > > Signed-off-by: Daniel Henrique Barboza Acked-by: Alistair Francis Alistair > --- > include/standard-headers/linux/const.h| 2 +- > include/standard-headers/linux/v

Re: [PATCH v2 08/18] target/riscv: handle mvendorid/marchid/mimpid for KVM CPUs

2023-06-21 Thread Alistair Francis
On Wed, Jun 14, 2023 at 7:00 AM Daniel Henrique Barboza wrote: > > After changing user validation for mvendorid/marchid/mimpid to guarantee > that the value is validated on user input time, coupled with the work in > fetching KVM default values for them by using a scratch CPU, we're > certain that

Re: [PATCH v2 05/18] target/riscv/cpu.c: restrict 'marchid' value

2023-06-21 Thread Alistair Francis
On Wed, Jun 14, 2023 at 7:03 AM Daniel Henrique Barboza wrote: > > 'marchid' shouldn't be set to a different value as previously set for > named CPUs. > > For all other CPUs it shouldn't be freely set either - the spec requires > that 'marchid' can't have the MSB (most significant bit) set and eve

Re: [PATCH v2 04/18] target/riscv/cpu.c: restrict 'mimpid' value

2023-06-21 Thread Alistair Francis
On Wed, Jun 14, 2023 at 7:01 AM Daniel Henrique Barboza wrote: > > Following the same logic used with 'mvendorid' let's also restrict > 'mimpid' for named CPUs. Generic CPUs keep setting the value freely. > > Note that we're getting rid of the default RISCV_CPU_MARCHID value. The > reason is that

Re: [PATCH v2 03/18] target/riscv/cpu.c: restrict 'mvendorid' value

2023-06-21 Thread Alistair Francis
On Wed, Jun 14, 2023 at 7:00 AM Daniel Henrique Barboza wrote: > > We're going to change the handling of mvendorid/marchid/mimpid by the > KVM driver. Since these are always present in all CPUs let's put the > same validation for everyone. > > It doesn't make sense to allow 'mvendorid' to be diffe

[PATCH] vdpa: Increase out buffer size for CVQ commands

2023-06-21 Thread Hawkins Jiawei
According to the VirtIO standard, "Since there are no guarantees, it can use a hash filter or silently switch to allmulti or promiscuous mode if it is given too many addresses." To achive this, QEMU ignores MAC addresses and marks `mac_table.x_overflow` in the device internal state in virtio_net_ha

Re: [PATCH v2 0/8] disas/riscv: Add vendor extension support

2023-06-21 Thread Alistair Francis
On Mon, Jun 12, 2023 at 9:11 PM Christoph Muellner wrote: > > From: Christoph Müllner > > This series adds vendor extension support to the QEMU disassembler > for RISC-V. The following vendor extensions are covered: > * XThead{Ba,Bb,Bs,Cmo,CondMov,FMemIdx,Fmv,Mac,MemIdx,MemPair,Sync} > * XVentana

[Bug 1617385] Re: No snapshot possible with virtio-gpu activated

2023-06-21 Thread Buo-ren, Lin
I also have this problem, with the 3D acceleration enabled, it would be great if the situation improves as the VM often not stable after the host restores from sleep state. ** Changed in: qemu Status: Expired => Confirmed -- You received this bug notification because you are a member of q

Re: [PATCH v2 06/20] qemu_file: total_transferred is not used anymore

2023-06-21 Thread Juan Quintela
Peter Xu wrote: > On Tue, May 30, 2023 at 08:39:27PM +0200, Juan Quintela wrote: >> Signed-off-by: Juan Quintela >> --- >> migration/qemu-file.c | 4 >> 1 file changed, 4 deletions(-) >> >> diff --git a/migration/qemu-file.c b/migration/qemu-file.c >> index eb0497e532..6b6deea19b 100644 >>

[PATCH] virtio-gpu-udmabuf: create udmabuf for blob even when iov_cnt == 1

2023-06-21 Thread Dongwon Kim
There were often cases where a scanout blob sometimes has just 1 entry that is linked to many pages in it. So just checking whether iov_cnt is 1 is not enough for screening small, non-scanout blobs. Therefore adding iov_len check as well to make sure it creates an udmabuf only for a scanout blob, w

[PATCH] ui/gtk: making dmabuf NULL when it's released.

2023-06-21 Thread Dongwon Kim
Set vc->gfx.guest_fb.dmabuf to NULL to prevent any further access to it after the dmabuf is released. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 4 1 file changed, 4 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index e50f950f2

Re: [PATCH v2 04/20] qemu-file: We only call qemu_file_transferred_* on the sending side

2023-06-21 Thread Juan Quintela
Peter Xu wrote: > On Tue, Jun 13, 2023 at 06:02:05PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > On Tue, May 30, 2023 at 08:39:25PM +0200, Juan Quintela wrote: >> >> Remove the increase in qemu_file_fill_buffer() and add asserts to >> >> qemu_file_transferred* functions. >> >> >> >> Sign

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

2023-06-21 Thread Juan Quintela
Peter Xu wrote: > On Wed, Jun 21, 2023 at 09:38:08PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > On Fri, Jun 09, 2023 at 12:49:13AM +0200, Juan Quintela wrote: >> >> It failed on aarch64 tcg, lets see if that is still the case. >> >> >> >> Signed-off-by: Juan Quintela >> > >> > Accordin

[PATCH] ui/gtk: set the area of the scanout texture correctly

2023-06-21 Thread Dongwon Kim
x and y offsets and width and height of the scanout texture is not correctly configured in case guest scanout frame is dmabuf. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 3 ++- ui/gtk-gl-area.c | 3 ++- 2 files changed, 4 inse

[PATCH] virtio-gpu: OUT_OF_MEMORY if failing to create udmabuf

2023-06-21 Thread Dongwon Kim
Respond with VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY if it fails to create an udmabuf for the blob resource. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/d

Re: [PATCH v1 1/1] Q35 Support

2023-06-21 Thread Bernhard Beschow
Hi Joel, Nice! I've been working on making the PIIX south bridge Xen agnostic, partly to show how Xen enablement in Q35 could look like. Not that I'd have any use case for it but great to see that you've actually done that! I know you didn't intend to send this patch but I'll give you some e

Re: [PULL 00/20] tricore queue

2023-06-21 Thread Richard Henderson
n/qemu.git tags/pull-tricore-20230621-1 for you to fetch changes up to a9c37abdff65a07d0191123a21d318c4d8cc7f33: target/tricore: Fix ICR.IE offset in RESTORE insn (2023-06-21 18:09:54 +0200) - Implement privilege levels for Tri

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

2023-06-21 Thread Juan Quintela
Peter Xu wrote: > On Wed, Jun 21, 2023 at 09:38:08PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > On Fri, Jun 09, 2023 at 12:49:13AM +0200, Juan Quintela wrote: >> >> It failed on aarch64 tcg, lets see if that is still the case. >> >> >> >> Signed-off-by: Juan Quintela >> > >> > Accordin

[PATCH v4 5/8] gdbstub: Report the actual qemu-user pid

2023-06-21 Thread Ilya Leoshkevich
Currently qemu-user reports pid 1 to GDB. Resolve the TODO and report the actual PID. Using getpid() relies on the assumption that there is only one GDBProcess. Add an assertion to make sure that future changes don't break it. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich --- gdbstub

[PATCH v4 8/8] tests/tcg: Add a test for info proc mappings

2023-06-21 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/Makefile.target | 9 ++- .../multiarch/gdbstub/test-proc-mappings.py | 65 +++ 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/multiarch/gd

[PATCH v4 0/8] gdbstub: Add support for info proc mappings

2023-06-21 Thread Ilya Leoshkevich
v3: https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg01311.html v3 -> v4: Fix the 32-bit build (Alex). Enable the test on all architectures and ignore certain expected failures (Alex). I tried this with the latest gdb-multiarch and it works. The only skip is on

[PATCH v4 7/8] docs: Document security implications of debugging

2023-06-21 Thread Ilya Leoshkevich
Now that the GDB stub explicitly implements reading host files (note that it was already possible by changing the emulated code to open and read those files), concerns may arise that it undermines security. Document the status quo, which is that the users are already responsible for securing the G

[PATCH v4 6/8] gdbstub: Add support for info proc mappings

2023-06-21 Thread Ilya Leoshkevich
Currently the GDB's generate-core-file command doesn't work well with qemu-user: the resulting dumps are huge [1] and at the same time incomplete (argv and envp are missing). The reason is that GDB has no access to proc mappings and therefore has to fall back to using heuristics for discovering the

[PATCH v4 4/8] gdbstub: Expose gdb_get_process() and gdb_get_first_cpu_in_process()

2023-06-21 Thread Ilya Leoshkevich
These functions will be needed by user-target.c in order to retrieve the name of the executable. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich --- gdbstub/gdbstub.c | 16 gdbstub/internals.h | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/g

[PATCH v4 1/8] linux-user: Expose do_guest_openat() and do_guest_readlink()

2023-06-21 Thread Ilya Leoshkevich
These functions will be required by the GDB stub in order to provide the guest view of /proc to GDB. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson --- linux-user/qemu.h| 3 +++ linux-user/syscall.c | 54

[PATCH v4 2/8] linux-user: Add "safe" parameter to do_guest_openat()

2023-06-21 Thread Ilya Leoshkevich
gdbstub cannot meaningfully handle QEMU_ERESTARTSYS, and it doesn't need to. Add a parameter to do_guest_openat() that makes it use openat() instead of safe_openat(), so that it becomes usable from gdbstub. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson --- linux-user/qemu.h

[PATCH v4 3/8] linux-user: Emulate /proc/self/smaps

2023-06-21 Thread Ilya Leoshkevich
/proc/self/smaps is an extension of /proc/self/maps: it provides the same lines, plus additional information about each range. GDB uses /proc/self/smaps when available, which means that generate-core-file tries it first before falling back to /proc/self/maps. This, in turn, causes it to dump the h

Re: [PATCH v2 1/2] migration: enfocre multifd and postcopy preempt to be set before incoming

2023-06-21 Thread Juan Quintela
Wei Wang wrote: > 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-pree

Re: [PATCH V1 2/3] migration: fix suspended runstate

2023-06-21 Thread Peter Xu
On Wed, Jun 21, 2023 at 03:15:42PM -0400, Steven Sistare wrote: > On 6/20/2023 5:46 PM, Peter Xu wrote: > > On Thu, Jun 15, 2023 at 01:26:39PM -0700, Steve Sistare wrote: > >> Migration of a guest in the suspended state is broken. The incoming > >> migration code automatically tries to wake the gu

Re: [PATCH v3 0/4] Virtio shared dma-buf

2023-06-21 Thread Michael S. Tsirkin
On Wed, Jun 21, 2023 at 10:20:25AM +0200, Albert Esteve wrote: > Hi! > > It has been a month since I sent this patch, so I'll give it a bump to get > some > attention back. > > @mst and @Fam any comments? What would be the next steps to take to move this > forward? > > BR, > Albert > > I'd r

Re: [PATCH V1 3/3] tests/qtest: live migration suspended state

2023-06-21 Thread Peter Xu
On Wed, Jun 21, 2023 at 03:39:44PM -0400, Steven Sistare wrote: > >> -jmp mainloop > >> +# should this test suspend? > >> +mov (suspend_me),%eax > >> +cmp $0,%eax > >> +je mainloop > >> + > >> +# are we waking after suspend? do not suspend again. > >

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

2023-06-21 Thread Peter Xu
On Wed, Jun 21, 2023 at 09:38:08PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Fri, Jun 09, 2023 at 12:49:13AM +0200, Juan Quintela wrote: > >> It failed on aarch64 tcg, lets see if that is still the case. > >> > >> Signed-off-by: Juan Quintela > > > > According to the history: > > > >

Re: [PATCH v2 04/11] multifd: Count the number of bytes sent correctly

2023-06-21 Thread Juan Quintela
Chuang Xu wrote: > Hi,Juan, > > On 2023/1/30 下午4:09, Juan Quintela wrote: >> Current code asumes that all pages are whole. That is not true for >> example for compression already. Fix it for creating a new field >> ->sent_bytes that includes it. >> >> All ram_counters are used only from the migr

Re: [PATCH v2 1/2] migration: enfocre multifd and postcopy preempt to be set before incoming

2023-06-21 Thread Juan Quintela
Wei Wang wrote: > 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-pree

Re: [PATCH V1 3/3] tests/qtest: live migration suspended state

2023-06-21 Thread Steven Sistare
On 6/21/2023 12:45 PM, Peter Xu wrote: > On Thu, Jun 15, 2023 at 01:26:40PM -0700, Steve Sistare wrote: >> Add a test case to verify that the suspended state is handled correctly in >> live migration. The test suspends the src, migrates, then wakes the dest. >> >> Add an option to suspend the src

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

2023-06-21 Thread Juan Quintela
Peter Xu wrote: > On Fri, Jun 09, 2023 at 12:49:13AM +0200, Juan Quintela wrote: >> It failed on aarch64 tcg, lets see if that is still the case. >> >> Signed-off-by: Juan Quintela > > According to the history: > > https://lore.kernel.org/all/20190305180635.GA3803@work-vm/ > > It's never enabled

Re: [PATCH 2/5] include/migration: mark vmstate_register() as a legacy function

2023-06-21 Thread Juan Quintela
Alex Bennée wrote: > Mention that QOM-ified devices already have support for registering > the description. > > Signed-off-by: Alex Bennée Reviewed-by: Juan Quintela I really remove that function in a future series (well, I substitute it with vmstate_register_id() and vmstate_register_any(), b

Re: [PATCH v6 0/8] migration: Add switchover ack capability and VFIO precopy support

2023-06-21 Thread Alex Williamson
On Wed, 21 Jun 2023 14:11:53 +0300 Avihai Horon wrote: > Hello everyone, > > The latest changes to migration qtest made the tests run non-live by > default. I am posting this v6 to change back the switchover-ack > migration test to run live as it used to (because the source VM needs to > be runn

Re: [PATCH v5 0/2] Update error description whenever migration fails

2023-06-21 Thread Juan Quintela
Tejus GK wrote: > Hi everyone, > > This is the v5 patchset which has been rebased on the current > master. Requesting this to be queued for merge as this has already been > reviewed. queued. thanks. > > Regards, > Tejus > > Tejus GK (2): > migration: Update error description whenever migrat

Re: 'make check-tcg' fails with an assert in qemu_plugin_vcpu_init_hook

2023-06-21 Thread Peter Maydell
On Wed, 21 Jun 2023 at 11:00, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Wed, 21 Jun 2023 at 09:05, Alex Bennée wrote: > >> - I suspect the plugin core stuff could be build once (or maybe twice, > >> system and user) > > > > It is already build-once, that's why it goes wrong..

Re: [PATCH 6/6] iotests: add test 314 for "qemu-img rebase" with compression

2023-06-21 Thread Denis V. Lunev
On 6/1/23 21:28, Andrey Drobyshev wrote: The test cases considered so far: 1. Check that compression mode isn't compatible with "-f raw" (raw format doesn't support compression). 2. Check that rebasing an image onto no backing file preserves the data and writes the copied clusters actual

Re: [PATCH V1 2/3] migration: fix suspended runstate

2023-06-21 Thread Steven Sistare
On 6/20/2023 5:46 PM, Peter Xu wrote: > On Thu, Jun 15, 2023 at 01:26:39PM -0700, Steve Sistare wrote: >> Migration of a guest in the suspended state is broken. The incoming >> migration code automatically tries to wake the guest, which IMO is >> wrong -- the guest should end migration in the same

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

2023-06-21 Thread Juan Quintela
Peter Xu wrote: > On Wed, Jun 21, 2023 at 12:07:20PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > On Fri, Jun 09, 2023 at 12:49:14AM +0200, Juan Quintela wrote: >> >> Makes things easier and cleaner. >> >> >> >> Signed-off-by: Juan Quintela >> >> --- >> >> tests/qtest/migration-test.c |

Re: [PATCH 4/6] qemu-img: rebase: avoid unnecessary COW operations

2023-06-21 Thread Denis V. Lunev
On 6/1/23 21:28, Andrey Drobyshev wrote: When rebasing an image from one backing file to another, we need to compare data from old and new backings. If the diff between that data happens to be unaligned to the target cluster size, we might end up doing partial writes, which would lead to copy-on

Re: [PATCH 2/6] qemu-iotests: 024: add rebasing test case for overlay_size > backing_size

2023-06-21 Thread Denis V. Lunev
On 6/1/23 21:28, Andrey Drobyshev wrote: Before previous commit, rebase was getting infitely stuck in case of rebasing within the same backing chain and when overlay_size > backing_size. Let's add this case to the rebasing test 024 to make sure it doesn't break again. Signed-off-by: Andrey Droby

Re: [PATCH 1/6] qemu-img: rebase: stop when reaching EOF of old backing file

2023-06-21 Thread Denis V. Lunev
On 6/1/23 21:28, Andrey Drobyshev wrote: In case when we're rebasing within one backing chain, and when target image is larger than old backing file, bdrv_is_allocated_above() ends up setting *pnum = 0. As a result, target offset isn't getting incremented, and we get stuck in an infinite for loo

Re: [PATCH 5/6] qemu-img: add compression option to rebase subcommand

2023-06-21 Thread Denis V. Lunev
On 6/1/23 21:28, Andrey Drobyshev wrote: If we rebase an image whose backing file has compressed clusters, we might end up wasting disk space since the copied clusters are now uncompressed. In order to have better control over this, let's add "--compress" option to the "qemu-img rebase" command.

Re: [PATCH][RESEND v5 3/3] Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon)

2023-06-21 Thread Maciej S. Szmigiero
On 21.06.2023 12:32, David Hildenbrand wrote: On 20.06.23 22:13, Maciej S. Szmigiero wrote: On 19.06.2023 17:58, David Hildenbrand wrote: [...] Sorry for the late reply! Still trying to make up my mind what the right way forward with this is. This usage is still problematic I suspect (well

Re: [PATCH 3/6] qemu-img: rebase: use backing files' BlockBackend for buffer alignment

2023-06-21 Thread Denis V. Lunev
On 6/1/23 21:28, Andrey Drobyshev wrote: Since commit bb1c05973cf ("qemu-img: Use qemu_blockalign"), buffers for the data read from the old and new backing files are aligned using BlockDriverState (or BlockBackend later on) referring to the target image. However, this isn't quite right, because t

Re: [PATCH v7] Emulate dip switch language layout settings on SUN keyboard

2023-06-21 Thread Henrik Carlqvist
On Wed, 21 Jun 2023 08:09:12 +0100 Daniel P. Berrangé wrote: > If you're using one of the common Linux distros, you'll find a list of > the full set of packages you need to enable QEMU feuatres in the > dockerfiles at tests/docker/dockerfiles/. Those all have enough to > enable the docs build. T

Re: [PATCH 2/3] qemu-img: map: report compressed data blocks

2023-06-21 Thread Denis V. Lunev
On 6/7/23 17:26, Andrey Drobyshev wrote: Right now "qemu-img map" reports compressed blocks as containing data but having no host offset. This is not very informative. Instead, let's add another boolean field named "compressed" in case JSON output mode is specified. This is achieved by utilizi

Re: [PATCH 1/3] block: add BDRV_BLOCK_COMPRESSED flag for bdrv_block_status()

2023-06-21 Thread Andrey Drobyshev
On 6/21/23 20:46, Denis V. Lunev wrote: > On 6/21/23 19:08, Denis V. Lunev wrote: >> On 6/7/23 17:26, Andrey Drobyshev wrote: >>> Functions qcow2_get_host_offset(), get_cluster_offset() explicitly >>> report compressed cluster types when data is compressed. However, this >>> information is never pa

  1   2   3   4   5   >