[PATCH v3] disas: recognize either or

2022-11-21 Thread Michael Tokarev
Historically, capstone varies in requiring either or include depending on version and the way how it has been installed. This has already been an issue before, and will likely become an issue again with capstone 5.0 which seem to have changed this aspect once again. Recognize both ways in the

Re: [PATCH v5 7/9] target/riscv: add support for Zcmt extension

2022-11-21 Thread Alistair Francis
On Fri, Nov 18, 2022 at 10:46 PM Weiwei Li wrote: > > Add encode, trans* functions and helper functions support for Zcmt > instrutions > Add support for jvt csr > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.h

Re: [PATCH v5 6/9] target/riscv: add support for Zcmp extension

2022-11-21 Thread Alistair Francis
On Fri, Nov 18, 2022 at 10:51 PM Weiwei Li wrote: > > Add encode, trans* functions for Zcmp instructions > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/insn16.decode|

Re: [PATCH v2] hw/riscv: virt: Remove the redundant ipi-id property

2022-11-21 Thread Alistair Francis
On Sun, Nov 13, 2022 at 7:52 PM Atish Patra wrote: > > The imsic DT binding[1] has changed and no longer require an ipi-id. > The latest IMSIC driver dynamically allocates ipi id if slow-ipi > is not defined. > > Get rid of the unused dt property which may lead to confusion. > > [1] >

[PATCH] vhost-user: send set log base message only once

2022-11-21 Thread Yajun Wu
Vhost message VHOST_USER_SET_LOG_BASE is device wide. So only send it once with the first queue pair. Signed-off-by: Yajun Wu Acked-by: Parav Pandit --- hw/virtio/vhost-user.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index

Re: [PATCH] vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices

2022-11-21 Thread Raphael Norwitz
> On Nov 21, 2022, at 5:11 AM, Stefano Garzarella wrote: > > Commit 69e1c14aa2 ("virtio: core: vq reset feature negotation support") > enabled VIRTIO_F_RING_RESET by default for all virtio devices. > > This feature is not currently emulated by QEMU, so for vhost and > vhost-user devices we

Re: [PATCH for-8.0 12/29] tcg: Add 128-bit guest memory primitives

2022-11-21 Thread Richard Henderson
On 11/18/22 01:47, Richard Henderson wrote: +ret = do_ld16_beN(env, [0], 0, l.mmu_idx, l.memop, ra); +b = int128_getlo(ret); +ret = int128_lshift(ret, l.page[1].size * 8); +a = int128_gethi(ret); +b = do_ld_beN(env,

Re: [PATCH] vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices

2022-11-21 Thread Jason Wang
On Mon, Nov 21, 2022 at 6:11 PM Stefano Garzarella wrote: > > Commit 69e1c14aa2 ("virtio: core: vq reset feature negotation support") > enabled VIRTIO_F_RING_RESET by default for all virtio devices. > > This feature is not currently emulated by QEMU, so for vhost and > vhost-user devices we need

[PATCH for 7.2?] vhost: fix vq dirt bitmap syncing when vIOMMU is enabled

2022-11-21 Thread Jason Wang
When vIOMMU is enabled, the vq->used_phys is actually the IOVA not GPA. So we need to translate it to GPA before the syncing otherwise we may hit the following crash since IOVA could be out of the scope of the GPA log size. This could be noted when using virtio-IOMMU with vhost using 1G memory.

Re: Plugin Memory Callback Debugging

2022-11-21 Thread Richard Henderson
On 11/21/22 13:51, Alex Bennée wrote: Aaron Lindsay writes: On Nov 15 22:36, Alex Bennée wrote: Aaron Lindsay writes: I believe the code *should* always reset `cpu->plugin_mem_cbs` to NULL at the end of an instruction/TB's execution, so its not exactly clear to me how this is occurring.

Re: [PATCH v5 9/9] disas/riscv.c: add disasm support for Zc*

2022-11-21 Thread Alistair Francis
On Fri, Nov 18, 2022 at 10:45 PM Weiwei Li wrote: > > Zcmp/Zcmt instructions will override disasm for c.fld*/c.fsd* > instructions currently > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang Acked-by: Alistair Francis Alistair > --- > disas/riscv.c | 287

Re: [PATCH v5 5/9] target/riscv: add support for Zcb extension

2022-11-21 Thread Alistair Francis
On Fri, Nov 18, 2022 at 10:44 PM Weiwei Li wrote: > > Add encode and trans* functions support for Zcb instructions > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/insn16.decode

Re: [PATCH v2 0/5] Nested virtualization fixes for QEMU

2022-11-21 Thread Alistair Francis
On Tue, Nov 8, 2022 at 10:59 PM Anup Patel wrote: > > This series mainly includes fixes discovered while developing nested > virtualization running on QEMU. > > These patches can also be found in the riscv_nested_fixes_v2 branch at: > https://github.com/avpatel/qemu.git > > Changes since v1: > -

Re: [PATCH for-8.0 15/29] include/qemu/int128: Add vector type to Int128Alias

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: Adding a vector type will make it easier to handle i386 have_atomic16 via AVX. Signed-off-by: Richard Henderson --- include/qemu/int128.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH for-8.0 17/29] tcg/aarch64: Add have_lse, have_lse2

2022-11-21 Thread Philippe Mathieu-Daudé
On 22/11/22 00:10, Philippe Mathieu-Daudé wrote: On 18/11/22 10:47, Richard Henderson wrote: Notice when the host has additional atomic instructions. The new variables will also be used in generated code. Signed-off-by: Richard Henderson ---   tcg/aarch64/tcg-target.h |  3 +++  

Re: [PATCH v2 2/3] hw/mips/malta: Set PIIX4 IRQ routes in embedded bootloader

2022-11-21 Thread Bernhard Beschow
Am 21. November 2022 22:43:50 UTC schrieb "Philippe Mathieu-Daudé" : >On 21/11/22 16:34, Bernhard Beschow wrote: >> >> >> Am 27. Oktober 2022 20:47:19 UTC schrieb "Philippe Mathieu-Daudé" >> : >>> Linux kernel expects the northbridge & southbridge chipsets >>> configured by the BIOS

Re: [PATCH for-8.0 17/29] tcg/aarch64: Add have_lse, have_lse2

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: Notice when the host has additional atomic instructions. The new variables will also be used in generated code. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 3 +++ tcg/aarch64/tcg-target.c.inc | 10 ++ 2 files

Re: [PATCH for-8.0 20/29] tcg: Add INDEX_op_qemu_{ld,st}_i128

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: Add opcodes for backend support for 128-bit memory operations. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 8 + tcg/aarch64/tcg-target.h | 2 ++ tcg/arm/tcg-target.h | 2 ++ tcg/i386/tcg-target.h

Re: [PATCH for-8.0 1/1] target/ppc: Use tcg_gen_atomic_cmpxchg_i128 for STQCX

2022-11-21 Thread Richard Henderson
On 11/21/22 14:37, Daniel Henrique Barboza wrote: On 11/12/22 03:11, Richard Henderson wrote: Note that the previous direct reference to reserve_val, -   tcg_gen_ld_i64(t1, cpu_env, (ctx->le_mode -    ? offsetof(CPUPPCState, reserve_val2) - 

Re: [RFC PATCH] include/hw: attempt to document VirtIO feature variables (!DISCUSS!)

2022-11-21 Thread Michael S. Tsirkin
On Mon, Nov 21, 2022 at 04:51:40PM -0500, Stefan Hajnoczi wrote: > On Mon, 21 Nov 2022 at 14:25, Alex Bennée wrote: > > Stefan Hajnoczi writes: > > > > > On Mon, 21 Nov 2022 at 09:49, Alex Bennée wrote: > > >> > > >> We have a bunch of variables associated with the device and the vhost > > >>

Re: [PATCH for-8.0] MAINTAINERS: downgrade PPC KVM/TCG CPUs and pSeries to 'Odd Fixes'

2022-11-21 Thread Daniel Henrique Barboza
Thanks everyone! Queued for 8.0. Daniel On 11/17/22 12:32, Daniel Henrique Barboza wrote: The maintainer is no longer being paid to maintain these components. All maintainership work is being done in his personal time since the middle of the 7.2 development cycle. Change the status of PPC

Re: [PATCH v2 2/3] hw/mips/malta: Set PIIX4 IRQ routes in embedded bootloader

2022-11-21 Thread Philippe Mathieu-Daudé
On 21/11/22 16:34, Bernhard Beschow wrote: Am 27. Oktober 2022 20:47:19 UTC schrieb "Philippe Mathieu-Daudé" : Linux kernel expects the northbridge & southbridge chipsets configured by the BIOS firmware. We emulate that by writing a tiny bootloader code in write_bootloader(). Upon

Re: [PATCH v2] gtk: disable GTK Clipboard with a new meson option

2022-11-21 Thread Jim Fehlig
On 11/21/22 06:55, Claudio Fontana wrote: The GTK Clipboard implementation may cause guest hangs. Therefore implement new configure switch: --enable-gtk-clipboard, as a meson option disabled by default, which warns in the help text about the experimental nature of the feature. Regenerate the

Re: [PATCH v1 5/9] hw/virtio: introduce virtio_device_should_start

2022-11-21 Thread Michael S. Tsirkin
On Tue, Nov 15, 2022 at 05:46:58PM +0100, Christian Borntraeger wrote: > > > Am 15.11.22 um 17:40 schrieb Christian Borntraeger: > > > > > > Am 15.11.22 um 17:05 schrieb Alex Bennée: > > > > > > Christian Borntraeger writes: > > > > > > > Am 15.11.22 um 15:31 schrieb Alex Bennée: > > > > >

Re: UI layer threading and locking strategy; memory_region_snapshot_and_clear_dirty() races

2022-11-21 Thread Philippe Mathieu-Daudé
Cc'ing more UI/display contributors. On 17/11/22 14:05, Peter Maydell wrote: On Tue, 1 Nov 2022 at 14:17, Peter Maydell wrote: Hi; I'm trying to find out what the UI layer's threading and locking strategy is, at least as far as it applies to display device models. Ping! :-) I'm still

Re: [PATCH for-8.0 1/1] target/ppc: Use tcg_gen_atomic_cmpxchg_i128 for STQCX

2022-11-21 Thread Daniel Henrique Barboza
On 11/12/22 03:11, Richard Henderson wrote: Note that the previous direct reference to reserve_val, - tcg_gen_ld_i64(t1, cpu_env, (ctx->le_mode -? offsetof(CPUPPCState, reserve_val2) -: offsetof(CPUPPCState, reserve_val)));

Re: [PATCH for-7.2] block-backend: avoid bdrv_unregister_buf() NULL pointer deref

2022-11-21 Thread Philippe Mathieu-Daudé
On 21/11/22 22:19, Stefan Hajnoczi wrote: bdrv_*() APIs expect a valid BlockDriverState. Calling them with bs=NULL leads to undefined behavior. Jonathan Cameron reported this following NULL pointer dereference when a VM with a virtio-blk device and a memory-backend-file object is terminated: 1.

Re: [PATCH v5 14/20] hw/audio: explicitly set .requester_type for intel-hda

2022-11-21 Thread Philippe Mathieu-Daudé
On 21/11/22 19:39, Peter Maydell wrote: On Fri, 11 Nov 2022 at 18:35, Alex Bennée wrote: This is simulating a bus master writing data back into system memory. Mark it as such. Signed-off-by: Alex Bennée --- hw/audio/intel-hda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) I

Re: Plugin Memory Callback Debugging

2022-11-21 Thread Alex Bennée
Aaron Lindsay writes: > Sorry, left off the very end of my timeline: > > On Nov 18 16:58, Aaron Lindsay wrote: >> I have, so far, discovered the following timeline: >> 1. My plugin receives a instruction execution callback for a load >>instruction. At this time, cpu->plugin_mem_cbs points

Re: Plugin Memory Callback Debugging

2022-11-21 Thread Alex Bennée
Aaron Lindsay writes: > On Nov 15 22:36, Alex Bennée wrote: >> Aaron Lindsay writes: >> > I believe the code *should* always reset `cpu->plugin_mem_cbs` to NULL at >> > the >> > end of an instruction/TB's execution, so its not exactly clear to me how >> > this >> > is occurring. However, I

Re: [PATCH v3 2/2] migration: check magic value for deciding the mapping of channels

2022-11-21 Thread Peter Xu
On Sat, Nov 19, 2022 at 09:36:15AM +, manish.mishra wrote: > Current logic assumes that channel connections on the destination side are > always established in the same order as the source and the first one will > always be the main channel followed by the multifid or post-copy > preemption

Re: [RFC PATCH] include/hw: attempt to document VirtIO feature variables (!DISCUSS!)

2022-11-21 Thread Stefan Hajnoczi
On Mon, 21 Nov 2022 at 14:25, Alex Bennée wrote: > Stefan Hajnoczi writes: > > > On Mon, 21 Nov 2022 at 09:49, Alex Bennée wrote: > >> > >> We have a bunch of variables associated with the device and the vhost > >> backend which are used inconsistently throughout the code base. Lets > >> start

Re: [RFC PATCH] include/hw: attempt to document VirtIO feature variables (!DISCUSS!)

2022-11-21 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Mon, Nov 21, 2022 at 07:15:30PM +, Alex Bennée wrote: >> >> Stefan Hajnoczi writes: >> >> > On Mon, 21 Nov 2022 at 09:49, Alex Bennée wrote: >> >> >> >> We have a bunch of variables associated with the device and the vhost >> >> backend which are used

Re: [PATCH 3/3] target/i386/kvm: get and put AMD pmu registers

2022-11-21 Thread Dongli Zhang
Hi Liang, On 11/21/22 6:28 AM, Liang Yan wrote: > A little bit more information from kernel perspective. > > https://urldefense.com/v3/__https://lkml.org/lkml/2022/10/31/476__;!!ACWV5N9M2RV99hQ!NHxyuDAt7ZD4hlsoxPCIUSRsPzaii0kDx2DrS7umBMoKVD8Z6BH7IKvPu8p0EhBBTEqQkCMfTk1xoj-XzT0$ > > > I was

Re: [PATCH v3 12/13] tests/avocado/boot_linux.py: Bump aarch64 virt test timeout to 720s

2022-11-21 Thread Peter Maydell
On Thu, 17 Nov 2022 at 17:25, Alex Bennée wrote: > > From: Peter Maydell > > The two tests > tests/avocado/boot_linux.py:BootLinuxAarch64.test_virt_tcg_gicv2 > tests/avocado/boot_linux.py:BootLinuxAarch64.test_virt_tcg_gicv3 > > take quite a long time to run, and the current timeout of 240s > is

[PATCH for-7.2] target/arm: Don't do two-stage lookup if stage 2 is disabled

2022-11-21 Thread Peter Maydell
In get_phys_addr_with_struct(), we call get_phys_addr_twostage() if the CPU supports EL2. However, we don't check here that stage 2 is actually enabled. Instead we only check that inside get_phys_addr_twostage() to skip stage 2 translation. This means that even if stage 2 is disabled we still

Re: [PULL 0/5] target-arm queue

2022-11-21 Thread Stefan Hajnoczi
On Mon, 21 Nov 2022 at 16:11, Peter Maydell wrote: > > On Mon, 21 Nov 2022 at 15:54, Stefan Hajnoczi wrote: > > > > Applied, thanks. > > This doesn't seem to have reached https://gitlab.com/qemu-project/qemu.git: > did something go wrong? I forgot to push staging to master. Thanks for letting

[PATCH for-7.2] block-backend: avoid bdrv_unregister_buf() NULL pointer deref

2022-11-21 Thread Stefan Hajnoczi
bdrv_*() APIs expect a valid BlockDriverState. Calling them with bs=NULL leads to undefined behavior. Jonathan Cameron reported this following NULL pointer dereference when a VM with a virtio-blk device and a memory-backend-file object is terminated: 1. qemu_cleanup() closes all drives, setting

Re: [PATCH 2/3] i386: kvm: disable KVM_CAP_PMU_CAPABILITY if "pmu" is disabled

2022-11-21 Thread Dongli Zhang
Hi Greg and Liang, On 11/21/22 6:23 AM, Liang Yan wrote: > > On 11/21/22 06:03, Greg Kurz wrote: >> On Sat, 19 Nov 2022 04:29:00 -0800 >> Dongli Zhang wrote: >> >>> The "perf stat" at the VM side still works even we set "-cpu host,-pmu" in >>> the QEMU command line. That is, neither "-cpu

Re: [PULL 0/5] target-arm queue

2022-11-21 Thread Peter Maydell
On Mon, 21 Nov 2022 at 15:54, Stefan Hajnoczi wrote: > > Applied, thanks. This doesn't seem to have reached https://gitlab.com/qemu-project/qemu.git: did something go wrong? thanks -- PMM

Re: [PATCH] tests/qtest: Decrease the amount of output from the qom-test

2022-11-21 Thread Stefan Hajnoczi
On Mon, 21 Nov 2022 at 14:44, Thomas Huth wrote: > > The logs in the gitlab-CI have a size constraint, and sometimes > we already hit this limit. The biggest part of the log then seems > to be filled by the qom-test, so we should decrease the size of > the output - which can be done easily by not

Re: Null dereference in bdrv_unregister_buf() probably memory-backend-file related?

2022-11-21 Thread Stefan Hajnoczi
On Mon, 21 Nov 2022 at 12:29, Jonathan Cameron wrote: > > On Mon, 21 Nov 2022 11:47:48 -0500 > Stefan Hajnoczi wrote: > > > On Mon, 21 Nov 2022 at 11:22, Jonathan Cameron via > > wrote: > > > > > > First CC list is a guess as I haven't managed to root cause where things > > > are > > > going

[PATCH] accel/tcg/plugin: Fix op_rw

2022-11-21 Thread Richard Henderson
The value of op->args[2] is enum qemu_plugin_mem_rw, which is already 1-based. Adding 1 produces incorrect results for QEMU_PLUGIN_MEM_W and QEMU_PLUGIN_MEM_RW. Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

Re: Plugin Memory Callback Debugging

2022-11-21 Thread Aaron Lindsay via
On Nov 15 22:36, Alex Bennée wrote: > Aaron Lindsay writes: > > I believe the code *should* always reset `cpu->plugin_mem_cbs` to NULL at > > the > > end of an instruction/TB's execution, so its not exactly clear to me how > > this > > is occurring. However, I suspect it may be relevant that we

Re: [RFC PATCH] include/hw: attempt to document VirtIO feature variables (!DISCUSS!)

2022-11-21 Thread Michael S. Tsirkin
On Mon, Nov 21, 2022 at 07:15:30PM +, Alex Bennée wrote: > > Stefan Hajnoczi writes: > > > On Mon, 21 Nov 2022 at 09:49, Alex Bennée wrote: > >> > >> We have a bunch of variables associated with the device and the vhost > >> backend which are used inconsistently throughout the code base.

[PATCH] virtio: disable error for out of spec queue-enable

2022-11-21 Thread Michael S. Tsirkin
Virtio 1.0 is pretty clear that features have to be negotiated before enabling VQs. Unfortunately Seabios ignored this ever since gaining 1.0 support (UEFI is ok). Comment the error out for now, and add a TODO. Fixes: 3c37f8b8d1 ("virtio: introduce virtio_queue_enable()") Cc: "Kangjie Xu"

[PATCH] tests/qtest: Decrease the amount of output from the qom-test

2022-11-21 Thread Thomas Huth
The logs in the gitlab-CI have a size constraint, and sometimes we already hit this limit. The biggest part of the log then seems to be filled by the qom-test, so we should decrease the size of the output - which can be done easily by not printing the path for each property, since the path has

Re: [RFC PATCH] include/hw: attempt to document VirtIO feature variables (!DISCUSS!)

2022-11-21 Thread Alex Bennée
Stefan Hajnoczi writes: > On Mon, 21 Nov 2022 at 09:49, Alex Bennée wrote: >> >> We have a bunch of variables associated with the device and the vhost >> backend which are used inconsistently throughout the code base. Lets >> start trying to bring some order by agreeing what each variable is

Re: [PATCH] target/arm: Use signed quantity to represent VMSAv8-64 translation level

2022-11-21 Thread Ard Biesheuvel
On Mon, 21 Nov 2022 at 19:51, Peter Maydell wrote: > > On Mon, 21 Nov 2022 at 17:43, Ard Biesheuvel wrote: > > > > The LPA2 extension implements 52-bit virtual addressing for 4k and 16k > > translation granules, and for the former, this means an additional level > > of translation is needed.

Re: [PATCH] target/arm: Use signed quantity to represent VMSAv8-64 translation level

2022-11-21 Thread Peter Maydell
On Mon, 21 Nov 2022 at 17:43, Ard Biesheuvel wrote: > > The LPA2 extension implements 52-bit virtual addressing for 4k and 16k > translation granules, and for the former, this means an additional level > of translation is needed. This means we start counting at -1 instead of > 0 when doing a

Re: [PATCH v5 18/20] hw/i386: convert apic access to use MemTxAttrs

2022-11-21 Thread Peter Maydell
On Fri, 11 Nov 2022 at 18:36, Alex Bennée wrote: > > This allows us to correctly model invalid accesses to the interrupt > controller as well as avoiding the use of current_cpu hacks to find > the APIC structure. We have to ensure we check for MSI signals first > which shouldn't arrive from the

Re: [PATCH v5 14/20] hw/audio: explicitly set .requester_type for intel-hda

2022-11-21 Thread Peter Maydell
On Fri, 11 Nov 2022 at 18:35, Alex Bennée wrote: > > This is simulating a bus master writing data back into system memory. > Mark it as such. > > Signed-off-by: Alex Bennée > --- > hw/audio/intel-hda.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/audio/intel-hda.c

Re: [PATCH v5 01/20] hw: encode accessing CPU index in MemTxAttrs

2022-11-21 Thread Peter Maydell
On Fri, 11 Nov 2022 at 18:25, Alex Bennée wrote: > > We currently have hacks across the hw/ to reference current_cpu to > work out what the current accessing CPU is. This breaks in some cases > including using gdbstub to access HW state. As we have MemTxAttrs to > describe details about the

[PATCH] target/arm: Use signed quantity to represent VMSAv8-64 translation level

2022-11-21 Thread Ard Biesheuvel
The LPA2 extension implements 52-bit virtual addressing for 4k and 16k translation granules, and for the former, this means an additional level of translation is needed. This means we start counting at -1 instead of 0 when doing a walk, and so 'level' is now a signed quantity, and should be typed

Re: [PATCH qemu.git v2 3/9] hw/timer/imx_epit: simplify interrupt logic

2022-11-21 Thread Axel Heider
Having an "update interrupt" function is the more common convention in QEMU device models -- it means you have one function you can call from any point where you've updated any of the state that affects whether an interrupt is generated or not. Ok, will keept it. For instance there's

Re: [PATCH] gtk: disable GTK Clipboard with a new option 'gtk_clipboard'

2022-11-21 Thread Jim Fehlig
On 11/21/22 04:24, Claudio Fontana wrote: On 11/18/22 23:26, Jim Fehlig wrote: I should make myself useful around here on occasion when items are within my skill set. But I already struggle to find time for that in the libvirt community :-). Thanks for taking a look, On 11/8/22 09:23,

Re: Null dereference in bdrv_unregister_buf() probably memory-backend-file related?

2022-11-21 Thread Jonathan Cameron via
On Mon, 21 Nov 2022 11:47:48 -0500 Stefan Hajnoczi wrote: > On Mon, 21 Nov 2022 at 11:22, Jonathan Cameron via > wrote: > > > > First CC list is a guess as I haven't managed to root cause where things are > > going wrong yet. > > > > Originally hit this whilst rebasing some CXL patches on

Re: [PATCH v7 0/7] hw/arm/virt: Improve address assignment for high memory regions

2022-11-21 Thread Peter Maydell
On Sat, 29 Oct 2022 at 23:43, Gavin Shan wrote: > > There are three high memory regions, which are VIRT_HIGH_REDIST2, > VIRT_HIGH_PCIE_ECAM and VIRT_HIGH_PCIE_MMIO. Their base addresses > are floating on highest RAM address. However, they can be disabled > in several cases. > > (1) One specific

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-21 Thread Markus Armbruster
Max Filippov writes: > On Mon, Nov 21, 2022 at 6:01 AM Markus Armbruster wrote: >> .../xtensa/core-dsp3400/xtensa-modules.c.inc | 136 +- >> target/xtensa/core-lx106/xtensa-modules.c.inc | 16 +-- > > These files are generated and were imported from xtensa configuration >

Re: Null dereference in bdrv_unregister_buf() probably memory-backend-file related?

2022-11-21 Thread Stefan Hajnoczi
On Mon, 21 Nov 2022 at 11:22, Jonathan Cameron via wrote: > > First CC list is a guess as I haven't managed to root cause where things are > going wrong yet. > > Originally hit this whilst rebasing some CXL patches on v7.2.0-rc1. > CXL makes extensive use of memory-backends and most my tests

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-21 Thread Max Filippov
On Mon, Nov 21, 2022 at 6:01 AM Markus Armbruster wrote: > .../xtensa/core-dsp3400/xtensa-modules.c.inc | 136 +- > target/xtensa/core-lx106/xtensa-modules.c.inc | 16 +-- These files are generated and were imported from xtensa configuration overlays, they're not supposed to be

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-21 Thread Thomas Huth
On 21/11/2022 17.32, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 21/11/22 15:36, Peter Maydell wrote: On Mon, 21 Nov 2022 at 14:03, Markus Armbruster wrote: Tweak the semantic patch to drop redundant parenthesis around the return expression. Coccinelle drops comments in

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-21 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 21/11/22 15:36, Peter Maydell wrote: >> On Mon, 21 Nov 2022 at 14:03, Markus Armbruster wrote: >>> >>> Tweak the semantic patch to drop redundant parenthesis around the >>> return expression. >>> >>> Coccinelle drops comments in hw/rdma/vmw/pvrdma_cmd.c;

[PATCH v2 08/11] migration: Export dirty-limit time info

2022-11-21 Thread huangy81
From: Hyman Huang(黄勇) Export dirty limit throttle time and estimated ring full time, through which we can observe the process of dirty limit during live migration. Signed-off-by: Hyman Huang(黄勇) --- include/sysemu/dirtylimit.h | 2 ++ migration/migration.c | 10 ++

[PATCH v2 07/11] migration: Implement dirty-limit convergence algo

2022-11-21 Thread huangy81
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 v2 10/11] tests/migration: Introduce dirty-ring-size option into guestperf

2022-11-21 Thread huangy81
From: Hyman Huang(黄勇) Guestperf tool does not enable diry ring feature when test migration by default. To support dirty ring migration performance test, introduce dirty-ring-size option into guestperf tools, which ranges in [1024, 65536]. To set dirty ring size with 4096 during migration test:

[PATCH v2 03/11] kvm-all: Do not allow reap vcpu dirty ring buffer if not ready

2022-11-21 Thread huangy81
From: Hyman Huang(黄勇) When tested large vcpu size vm with dirtylimit feature, Qemu crashed due to the assertion in kvm_dirty_ring_reap_one, which assert that vcpu's kvm_dirty_gfns has been allocated and not NULL. Because dirty ring reaper thread races with Qemu main thread, reaper may reap

Re: [PATCH for-8.0 25/29] tcg/i386: Mark Win64 call-saved vector regs as reserved

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: While we do not include these in tcg_target_reg_alloc_order, and therefore they ought never be allocated, it seems safer to mark them reserved as well. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 13 + 1 file

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

2022-11-21 Thread huangy81
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 v2 04/11] qapi/migration: Introduce x-vcpu-dirty-limit-period parameter

2022-11-21 Thread huangy81
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. Signed-off-by: Hyman Huang(黄勇) --- migration/migration.c | 26 ++

[PATCH v2 09/11] tests: Add migration dirty-limit capability test

2022-11-21 Thread huangy81
From: Hyman Huang(黄勇) Add migration dirty-limit capability test if kernel support dirty ring. Migration dirty-limit capability introduce dirty limit capability, two parameters: x-vcpu-dirty-limit-period and x-vcpu-dirty-limit are introduced to implement the live migration with dirty limit. The

[PATCH v2 11/11] tests/migration: Introduce dirty-limit into guestperf

2022-11-21 Thread huangy81
From: Hyman Huang(黄勇) Guestperf tool does not cover the dirty-limit migration currently, support this feature. To enable dirty-limit, setting x-vcpu-dirty-limit-period as 500ms and x-vcpu-dirty-limit as 10MB/s: $ ./tests/migration/guestperf.py \ --dirty-limit --x-vcpu-dirty-limit-period 500

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

2022-11-21 Thread huangy81
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

Re: [PATCH for-8.0 24/29] tcg/i386: Replace is64 with type in qemu_ld/st routines

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: Prepare for TCG_TYPE_I128 by not using a boolean. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 54 ++- 1 file changed, 36 insertions(+), 18 deletions(-) @@ -2315,7 +2324,7 @@ static void

[PATCH v2 00/11] migration: introduce dirtylimit capability

2022-11-21 Thread huangy81
From: Hyman Huang(黄勇) v2: This version make a little bit modifications comparing with version 1 as following: 1. fix the overflow issue reported by Peter Maydell 2. add parameter check for hmp "set_vcpu_dirty_limit" command 3. fix the racing issue between dirty ring reaper thread and Qemu

[PATCH v2 01/11] dirtylimit: Fix overflow when computing MB

2022-11-21 Thread huangy81
From: Hyman Huang(黄勇) overity points out a overflow problem when computing MB, dirty_ring_size and TARGET_PAGE_SIZE are both 32 bits, multiplication will be done as a 32-bit operation, which could overflow. Simplify the formula. Meanwhile, fix spelling mistake of variable name. Reported-by:

[PATCH v2 02/11] softmmu/dirtylimit: Add parameter check for hmp "set_vcpu_dirty_limit"

2022-11-21 Thread huangy81
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. Signed-off-by: Hyman Huang(黄勇) --- softmmu/dirtylimit.c | 5 + 1 file changed, 5 insertions(+) diff --git a/softmmu/dirtylimit.c

Re: [PATCH for-8.0 22/29] tcg/i386: Introduce tcg_out_testi

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: Split out a helper for choosing testb vs testl. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Null dereference in bdrv_unregister_buf() probably memory-backend-file related?

2022-11-21 Thread Jonathan Cameron via
First CC list is a guess as I haven't managed to root cause where things are going wrong yet. Originally hit this whilst rebasing some CXL patches on v7.2.0-rc1. CXL makes extensive use of memory-backends and most my tests happen to use memory-backend-file Issue seen on arm64 and x86 though

Re: [PATCH for-8.0 21/29] tcg/i386: Introduce tcg_out_mov2

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: Create a helper for data movement minding register overlap. Use the more general xchg instruction, which consumes one extra byte, but simplifies the more general function. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 27

Re: [PATCH] vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices

2022-11-21 Thread Stefan Hajnoczi
On Mon, Nov 21, 2022 at 11:11:01AM +0100, Stefano Garzarella wrote: > Commit 69e1c14aa2 ("virtio: core: vq reset feature negotation support") > enabled VIRTIO_F_RING_RESET by default for all virtio devices. > > This feature is not currently emulated by QEMU, so for vhost and > vhost-user devices

Re: [PATCH 00/19] Migration patches for 8.8

2022-11-21 Thread Juan Quintela
Juan Quintela wrote: > Hi > > Based-on: <20221121125907.62469-1-quint...@redhat.com> The subject should put 8.0 not 8.8. Sorry, Juan. > > This are the patches that I had to drop form the last PULL request because > they werent fixes: > - AVX2 is dropped, intel posted a fix, I have to redo it

Re: [PATCH for-8.0 19/29] tcg: Introduce TCG_OPF_TYPE_MASK

2022-11-21 Thread Philippe Mathieu-Daudé
On 18/11/22 10:47, Richard Henderson wrote: Reorg TCG_OPF_64BIT and TCG_OPF_VECTOR into a two-bit field so that we can add TCG_OPF_128BIT without requiring another bit. Signed-off-by: Richard Henderson --- include/tcg/tcg.h| 22 -- tcg/optimize.c

Re: [PATCH RESEND v3 2/2] virtio: remove unnecessary host_features in ->get_features()

2022-11-21 Thread Cornelia Huck
On Mon, Nov 21 2022, Stefan Hajnoczi wrote: > Since at least commit 6b8f1020540c27246277377aa2c3331ad2bfb160 ("virtio: > move host_features") the ->get_features() function has been called with > host_features as an argument. > > Some devices manually add host_features in ->get_features()

Re: [PATCH RESEND v3 1/2] virtio: document ->host_features usage in vdc->get_features() callback

2022-11-21 Thread Cornelia Huck
On Mon, Nov 21 2022, Stefan Hajnoczi wrote: > Suggested-by: Cornelia Huck > Signed-off-by: Stefan Hajnoczi > --- > include/hw/virtio/virtio.h | 7 +++ > 1 file changed, 7 insertions(+) Reviewed-by: Cornelia Huck

Re: [PATCH v4 07/11] block/vmdk: add missing coroutine_fn annotations

2022-11-21 Thread Emanuele Giuseppe Esposito
Am 21/11/2022 um 17:01 schrieb Kevin Wolf: > Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: >> These functions end up calling bdrv_create() implemented as >> generated_co_wrapper >> functions. >> In addition, they also happen to be always called in coroutine context, >>

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-21 Thread Philippe Mathieu-Daudé
On 21/11/22 15:36, Peter Maydell wrote: On Mon, 21 Nov 2022 at 14:03, Markus Armbruster wrote: Tweak the semantic patch to drop redundant parenthesis around the return expression. Coccinelle drops comments in hw/rdma/vmw/pvrdma_cmd.c; restored manually. Coccinelle messes up

Re: [PATCH v4 07/11] block/vmdk: add missing coroutine_fn annotations

2022-11-21 Thread Kevin Wolf
Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: > These functions end up calling bdrv_create() implemented as > generated_co_wrapper > functions. > In addition, they also happen to be always called in coroutine context, > meaning all callers are coroutine_fn. > This means that

Re: [PATCH] cleanup: Tweak and re-run return_directly.cocci

2022-11-21 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 21 Nov 2022 at 14:03, Markus Armbruster wrote: >> >> Tweak the semantic patch to drop redundant parenthesis around the >> return expression. >> >> Coccinelle drops comments in hw/rdma/vmw/pvrdma_cmd.c; restored >> manually. >> >> Coccinelle messes up

Re: [PATCH for-7.2 v3 0/3] rtl8139: honor large send MSS value

2022-11-21 Thread Stefan Hajnoczi
On Thu, Nov 17, 2022 at 11:55:51AM -0500, Stefan Hajnoczi wrote: > v3: > - Add Patch 1 to avoid clobbering tx descriptor bits > - Add Patch 2 to avoid confusing tx command modes > - Exclude IP and TCP headers from large send MSS value > > The rtl8139 large send offload currently does not honor

Re: [PATCH v4 06/11] block-coroutine-wrapper.py: support also basic return types

2022-11-21 Thread Kevin Wolf
Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: > Extend the regex to cover also return type, pointers included. > This implies that the value returned by the function cannot be > a simple "int" anymore, but the custom return type. > Therefore remove poll_state->ret and instead

Re: [PULL 0/5] target-arm queue

2022-11-21 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/8] Next patches

2022-11-21 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/1] chardev patch for 7.2

2022-11-21 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v4 05/11] block-coroutine-wrapper.py: default to main loop aiocontext if function does not have a BlockDriverState parameter

2022-11-21 Thread Emanuele Giuseppe Esposito
Am 21/11/2022 um 16:30 schrieb Kevin Wolf: > Am 16.11.2022 um 13:22 hat Emanuele Giuseppe Esposito geschrieben: >> Basically BdrvPollCo->bs is only used by bdrv_poll_co(), and the >> functions that it uses are both using bdrv_get_aio_context, that >> defaults to qemu_get_aio_context() if bs is

[PATCH RESEND v3 0/2] virtio: remove unnecessary host_features in ->get_features()

2022-11-21 Thread Stefan Hajnoczi
v3 (resend): - On top of master instead of the qemu.git/staging tree :) v3: - Use an informal comment instead of a full doc comment [Cornelia] v2: - Document vdv->get_features() callback [Cornelia] The vdc->get_features() callbacks are a little inconsistent in how they use vdev->host_features.

[PATCH RESEND v3 2/2] virtio: remove unnecessary host_features in ->get_features()

2022-11-21 Thread Stefan Hajnoczi
Since at least commit 6b8f1020540c27246277377aa2c3331ad2bfb160 ("virtio: move host_features") the ->get_features() function has been called with host_features as an argument. Some devices manually add host_features in ->get_features() although the features argument already contains host_features.

[PATCH v3 2/3] virtio: document ->host_features usage in vdc->get_features() callback

2022-11-21 Thread Stefan Hajnoczi
Suggested-by: Cornelia Huck Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index a973811cbf..b6e09c6d4b 100644 --- a/include/hw/virtio/virtio.h +++

[PATCH v3 3/3] virtio: remove unnecessary host_features in ->get_features()

2022-11-21 Thread Stefan Hajnoczi
Since at least commit 6b8f1020540c27246277377aa2c3331ad2bfb160 ("virtio: move host_features") the ->get_features() function has been called with host_features as an argument. Some devices manually add host_features in ->get_features() although the features argument already contains host_features.

[PATCH RESEND v3 1/2] virtio: document ->host_features usage in vdc->get_features() callback

2022-11-21 Thread Stefan Hajnoczi
Suggested-by: Cornelia Huck Signed-off-by: Stefan Hajnoczi --- include/hw/virtio/virtio.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index a973811cbf..b6e09c6d4b 100644 --- a/include/hw/virtio/virtio.h +++

  1   2   3   >