Re: regression: insmod module failed in VM with nvdimm on

2022-11-29 Thread Marc Zyngier
On Wed, 30 Nov 2022 02:52:35 +, "chenxiang (M)" wrote: > > Hi, > > We boot the VM using following commands (with nvdimm on) (qemu > version 6.1.50, kernel 6.0-r4): How relevant is the presence of the nvdimm? Do you observe the failure without this? > > qemu-system-aarch64 -machine >

[PATCH v8 8/9] target/riscv: expose properties for Zc* extension

2022-11-29 Thread Weiwei Li
Expose zca,zcb,zcf,zcd,zcmp,zcmt properties Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 3d06b57416..5f03698b3b 100644

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

2022-11-29 Thread Weiwei Li
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 --- target/riscv/insn16.decode| 18 +++ target/riscv/insn_trans/trans_rvzce.c.inc | 189

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

2022-11-29 Thread Weiwei Li
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: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.h| 4 ++

[PATCH v8 1/9] target/riscv: add cfg properties for Zc* extension

2022-11-29 Thread Weiwei Li
Add properties for Zca,Zcb,Zcf,Zcd,Zcmp,Zcmt extension Add check for these properties Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 43 +++ target/riscv/cpu.h

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

2022-11-29 Thread Weiwei Li
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 --- disas/riscv.c | 228 +- 1 file changed, 227 insertions(+), 1 deletion(-)

[PATCH v8 2/9] target/riscv: add support for Zca extension

2022-11-29 Thread Weiwei Li
Modify the check for C extension to Zca (C implies Zca) Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: Wilfred Mallawa --- target/riscv/insn_trans/trans_rvi.c.inc | 4 ++-- target/riscv/translate.c

[PATCH v8 3/9] target/riscv: add support for Zcf extension

2022-11-29 Thread Weiwei Li
Separate c_flw/c_fsw from flw/fsw to add check for Zcf extension Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode | 8 target/riscv/insn_trans/trans_rvf.c.inc | 18

[PATCH v8 0/9] support subsets of code size reduction extension

2022-11-29 Thread Weiwei Li
This patchset implements RISC-V Zc* extension v1.0.0.RC5.7 version instructions. Specification: https://github.com/riscv/riscv-code-size-reduction/tree/main/Zc-specification The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-zce-upstream-v8 To test Zc* implementation,

[PATCH v8 4/9] target/riscv: add support for Zcd extension

2022-11-29 Thread Weiwei Li
Separate c_fld/c_fsd from fld/fsd to add additional check for c.fld{sp}/c.fsd{sp} which is useful for zcmp/zcmt to reuse their encodings Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode

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

2022-11-29 Thread Weiwei Li
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 --- target/riscv/insn16.decode| 24 ++ target/riscv/insn_trans/trans_rvzce.c.inc | 100

Re: [PATCH for 8.0 v8 06/12] vdpa: extract vhost_vdpa_svq_allocate_iova_tree

2022-11-29 Thread Eugenio Perez Martin
On Wed, Nov 30, 2022 at 7:43 AM Jason Wang wrote: > > On Thu, Nov 24, 2022 at 11:52 PM Eugenio Pérez wrote: > > > > It can be allocated either if all virtqueues must be shadowed or if > > vdpa-net detects it can shadow only cvq. > > > > Extract in its own function so we can reuse it. > > > >

Re: [PATCH v2 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-11-29 Thread Eugenio Perez Martin
On Wed, Nov 30, 2022 at 8:10 AM Michael S. Tsirkin wrote: > > On Thu, Nov 24, 2022 at 06:33:13PM +0100, Eugenio Pérez wrote: > > Since this capability is emulated by qemu shadowed CVQ cannot forward it > > to the device. Process all that command within qemu. > > > > Signed-off-by: Eugenio Pérez

Re: [PATCH v2 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-11-29 Thread Michael S. Tsirkin
On Thu, Nov 24, 2022 at 06:33:13PM +0100, Eugenio Pérez wrote: > Since this capability is emulated by qemu shadowed CVQ cannot forward it > to the device. Process all that command within qemu. > > Signed-off-by: Eugenio Pérez > --- > net/vhost-vdpa.c | 15 --- > 1 file changed, 12

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

2022-11-29 Thread weiwei
On 2022/11/30 11:04, Shaobo Song wrote: At 2022-11-29 10:43:43, "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 >--- > disas/riscv.c | 287

Re: [PATCH v2 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-11-29 Thread Eugenio Perez Martin
On Wed, Nov 30, 2022 at 8:02 AM Jason Wang wrote: > > On Fri, Nov 25, 2022 at 1:33 AM Eugenio Pérez wrote: > > > > Since this capability is emulated by qemu shadowed CVQ cannot forward it > > to the device. Process all that command within qemu. > > > > Signed-off-by: Eugenio Pérez > > --- > >

Re: [PATCH v2 4/4] vdpa: do not handle VIRTIO_NET_F_GUEST_ANNOUNCE in vhost-vdpa

2022-11-29 Thread Jason Wang
On Fri, Nov 25, 2022 at 1:33 AM Eugenio Pérez wrote: > > So qemu emulates it even in case the device does not support it. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Thanks > --- > net/vhost-vdpa.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/net/vhost-vdpa.c

Re: [PATCH v2 3/4] vdpa: handle VIRTIO_NET_CTRL_ANNOUNCE in vhost_vdpa_net_handle_ctrl_avail

2022-11-29 Thread Jason Wang
On Fri, Nov 25, 2022 at 1:33 AM Eugenio Pérez wrote: > > Since this capability is emulated by qemu shadowed CVQ cannot forward it > to the device. Process all that command within qemu. > > Signed-off-by: Eugenio Pérez > --- > net/vhost-vdpa.c | 15 --- > 1 file changed, 12

Re: [PATCH v2 1/2] qga-win: add logging to Windows event log

2022-11-29 Thread Marc-André Lureau
Hi On Tue, Nov 29, 2022 at 9:37 PM Andrey Drobyshev wrote: > > This commit allows QGA to write to Windows event log using Win32 API's > ReportEvent() [1], much like syslog() under *nix guests. > > In order to generate log message definitions we use a very basic message > text file [2], so that

Re: [RESEND PATCH] virtio-pci: fix vector_irqfd leak in virtio_pci_set_guest_notifiers

2022-11-29 Thread Michael S. Tsirkin
On Wed, Nov 30, 2022 at 01:56:11PM +0800, leixiang wrote: > proxy->vector_irqfd did not free when set guest notifier failed. > > Signed-off-by: Lei Xiang > Tested-by: Zeng Chi > Suggested-by: Xie Ming Thanks a lot! Fixes tag? When was the leak introduced? > --- > hw/virtio/virtio-pci.c | 6

Re: [PATCH v2 2/4] virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has it

2022-11-29 Thread Jason Wang
On Fri, Nov 25, 2022 at 1:33 AM Eugenio Pérez wrote: > > Status part of the emulated feature. It will follow device model, so we > must copy it as long as NIC device model has it set. > > Signed-off-by: Eugenio Pérez > --- > hw/net/virtio-net.c | 1 + > 1 file changed, 1 insertion(+) > > diff

Re: [PATCH for 7.2-rc3 v3 0/7] fix vhost-user issues with CI

2022-11-29 Thread Michael S. Tsirkin
Patch 1 is good but inappropriate for 7.2 Patch 2 should be last in series. Patch 4 we are dropping. I thought hard about it, I think we should patch vhost user net too because of the risk introduced by patch 2 (which affects everyone). Can be a patch on top though. Besides this, for series:

Re: [PATCH v2 1/4] virtio_net: Modify virtio_net_get_config to early return

2022-11-29 Thread Jason Wang
On Fri, Nov 25, 2022 at 1:33 AM Eugenio Pérez wrote: > > Next patches introduce more code on vhost-vdpa branch, with already have > too much indentation. > > Signed-off-by: Eugenio Pérez > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Michael S. Tsirkin Acked-by: Jason Wang Thanks >

Re: [PATCH for 8.0 v8 12/12] vdpa: always start CVQ in SVQ mode if possible

2022-11-29 Thread Jason Wang
On Thu, Nov 24, 2022 at 11:52 PM Eugenio Pérez wrote: > > Isolate control virtqueue in its own group, allowing to intercept control > commands but letting dataplane run totally passthrough to the guest. > > Signed-off-by: Eugenio Pérez > --- > v8: > * Do not allocate iova_tree on

Re: [PATCH for 8.0 v8 06/12] vdpa: extract vhost_vdpa_svq_allocate_iova_tree

2022-11-29 Thread Jason Wang
On Thu, Nov 24, 2022 at 11:52 PM Eugenio Pérez wrote: > > It can be allocated either if all virtqueues must be shadowed or if > vdpa-net detects it can shadow only cvq. > > Extract in its own function so we can reuse it. > > Signed-off-by: Eugenio Pérez > --- > net/vhost-vdpa.c | 29

Re: [PATCH for 8.0 v8 04/12] vhost: move iova_tree set to vhost_svq_start

2022-11-29 Thread Jason Wang
On Thu, Nov 24, 2022 at 11:52 PM Eugenio Pérez wrote: > > Since we don't know if we will use SVQ at qemu initialization, let's > allocate iova_tree only if needed. To do so, accept it at SVQ start, not > at initialization. > > This will avoid to create it if the device does not support SVQ. > >

Re: [PATCH 3/3] intel-iommu: build iova tree during IOMMU translation

2022-11-29 Thread Jason Wang
On Tue, Nov 29, 2022 at 11:57 PM Peter Xu wrote: > > On Tue, Nov 29, 2022 at 04:10:37PM +0800, Jason Wang wrote: > > The IOVA tree is only built during page walk this breaks the device > > that tries to use UNMAP notifier only. One example is vhost-net, it > > tries to use UNMAP notifier when

Re: [PATCH 1/3] intel-iommu: fail MAP notifier without caching mode

2022-11-29 Thread Jason Wang
On Tue, Nov 29, 2022 at 11:35 PM Peter Xu wrote: > > On Tue, Nov 29, 2022 at 04:10:35PM +0800, Jason Wang wrote: > > Without caching mode, MAP notifier won't work correctly since guest > > won't send IOTLB update event when it establishes new mappings in the > > I/O page tables. Let's fail the

[RESEND PATCH] virtio-pci: fix vector_irqfd leak in virtio_pci_set_guest_notifiers

2022-11-29 Thread leixiang
proxy->vector_irqfd did not free when set guest notifier failed. Signed-off-by: Lei Xiang Tested-by: Zeng Chi Suggested-by: Xie Ming --- hw/virtio/virtio-pci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index c6b47a9c..4862f83b

[RESEND PATCH] virtio-pci: fix vector_irqfd leak in virtio_pci_set_guest_notifiers

2022-11-29 Thread leixiang
proxy->vector_irqfd did not free when set guest notifier failed. Signed-off-by: Lei Xiang Tested-by: Zeng Chi Suggested-by: Xie Ming --- hw/virtio/virtio-pci.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index c6b47a9c..4862f83b

[PATCH v11 0/2] vhost-vdpa: add support for vIOMMU

2022-11-29 Thread Cindy Lu
These patches are to support vIOMMU in vdpa device changes in V3 1. Move function vfio_get_xlat_addr to memory.c 2. Use the existing memory listener, while the MR is iommu MR then call the function iommu_region_add/ iommu_region_del changes in V4 1.make the comments in vfio_get_xlat_addr more

[PATCH v11 1/2] vhost-vdpa: Skip the range check while MR is IOMMU

2022-11-29 Thread Cindy Lu
Skip the check in vhost_vdpa_listener_skipped_section() while MR is IOMMU, Move this check to vhost_vdpa_iommu_map_notify() Signed-off-by: Cindy Lu --- hw/virtio/vhost-vdpa.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c

[PATCH v11 2/2] vhost-vdpa: add support for vIOMMU

2022-11-29 Thread Cindy Lu
Add support for vIOMMU. add the new function to deal with iommu MR. - during iommu_region_add register a specific IOMMU notifier, and store all notifiers in a list. - during iommu_region_del, compare and delete the IOMMU notifier from the list Verified in vp_vdpa and vdpa_sim_net driver

RE: [PATCH for-8.0 05/19] target/hexagon: Convert to 3-phase reset

2022-11-29 Thread Taylor Simpson
> -Original Message- > From: Peter Maydell > Sent: Thursday, November 24, 2022 5:50 AM > To: qemu-devel@nongnu.org > Cc: Peter Maydell ; Michael Rolnik > ; Edgar E. Iglesias ; Taylor > Simpson ; Song Gao ; > Xiaojuan Yang ; Laurent Vivier > ; Philippe Mathieu-Daudé ; > Aurelien Jarno ;

Re: [PATCH 0/2] Implement something

2022-11-29 Thread Evgeny Ermakov
Evgeny Ermakov writes: Oops, sorry. Ignore this, I sent it by mistake. > Hello! > > Evgeny Ermakov (2): > hw/char: Add STM32F7 peripheral: USART > hw/input: Add FT5336 touch controller > > include/hw/char/stm32f7xx_usart.h | 30 +++ > include/hw/input/ft5336.h | 14 ++ >

[PATCH 1/2] hw/char: Add STM32F7 peripheral: USART

2022-11-29 Thread Evgeny Ermakov
Signed-off-by: Evgeny Ermakov --- include/hw/char/stm32f7xx_usart.h | 30 +++ hw/char/stm32f7xx_usart.c | 361 ++ hw/arm/Kconfig| 1 + hw/char/Kconfig | 3 + hw/char/meson.build | 1 +

[PATCH 0/2] Implement something

2022-11-29 Thread Evgeny Ermakov
Hello! Evgeny Ermakov (2): hw/char: Add STM32F7 peripheral: USART hw/input: Add FT5336 touch controller include/hw/char/stm32f7xx_usart.h | 30 +++ include/hw/input/ft5336.h | 14 ++ hw/char/stm32f7xx_usart.c | 361 ++ hw/input/ft5336.c

[PATCH 2/2] hw/input: Add FT5336 touch controller

2022-11-29 Thread Evgeny Ermakov
Signed-off-by: Evgeny Ermakov --- include/hw/input/ft5336.h | 14 ++ hw/input/ft5336.c | 357 ++ hw/input/Kconfig | 4 + hw/input/meson.build | 2 + 4 files changed, 377 insertions(+) create mode 100644 include/hw/input/ft5336.h

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

2022-11-29 Thread Hyman Huang
在 2022/11/30 6:42, Peter Xu 写道: Hi, Yong, On Mon, Nov 21, 2022 at 11:26:35AM -0500, huang...@chinatelecom.cn wrote: 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

regression: insmod module failed in VM with nvdimm on

2022-11-29 Thread chenxiang (M)
Hi, We boot the VM using following commands (with nvdimm on) (qemu version 6.1.50, kernel 6.0-r4): qemu-system-aarch64 -machine virt,kernel_irqchip=on,gic-version=3,nvdimm=on -kernel /home/kernel/Image -initrd /home/mini-rootfs/rootfs.cpio.gz -bios /root/QEMU_EFI.FD -cpu host -enable-kvm

Re: [PATCH v13 0/8] Add support for zoned device

2022-11-29 Thread Sam Li
Stefan Hajnoczi 于2022年11月30日周三 10:04写道: > > On Thu, 27 Oct 2022 at 11:46, Sam Li wrote: > > v13: > > - add some tracing points for new zone APIs [Dmitry] > > - change error handling in zone_mgmt [Damien, Stefan] > > Hi Sam, > This looks very close! I sent comments. That's great! I'll fix them.

Re: [PATCH v13 3/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-11-29 Thread Sam Li
Stefan Hajnoczi 于2022年11月30日周三 10:01写道: > > On Thu, 27 Oct 2022 at 11:46, Sam Li wrote: > > > > Add a new zoned_host_device BlockDriver. The zoned_host_device option > > accepts only zoned host block devices. By adding zone management > > operations in this new BlockDriver, users can use the new

[PATCH v1 3/3] contrib/elf2dmp: add PE name check and Windows Server 2022 support

2022-11-29 Thread Viktor Prutyanov
Since its inception elf2dmp has checked MZ signatures within an address space above IDT[0] interrupt vector and took first PE image found as Windows Kernel. But in Windows Server 2022 memory dump this address space range is full of invalid PE fragments and the tool must check that PE image is

[PATCH v1 1/3] contrib/elf2dmp: fix code style

2022-11-29 Thread Viktor Prutyanov
Originally elf2dmp were added with some code style issues, especially in pe.h header, and some were introduced by 2d0fc797faaa73fbc1d30f5f9e90407bf3dd93f0. Fix them now. Signed-off-by: Viktor Prutyanov --- contrib/elf2dmp/addrspace.c | 1 + contrib/elf2dmp/main.c | 9 ++--

[PATCH v1 2/3] contrib/elf2dmp: move PE dir search to pe_get_data_dir_entry

2022-11-29 Thread Viktor Prutyanov
Move out PE directory search functionality to be reused not only for Debug Directory processing but for arbitrary PE directory. Signed-off-by: Viktor Prutyanov --- contrib/elf2dmp/main.c | 66 +++--- 1 file changed, 37 insertions(+), 29 deletions(-) diff

[PATCH 1/1] Fix some typos

2022-11-29 Thread Dongdong Zhang
Fix some typos in 'python' directory. Signed-off-by: Dongdong Zhang --- python/qemu/machine/console_socket.py | 2 +- python/qemu/machine/qtest.py | 2 +- python/qemu/qmp/protocol.py | 2 +- python/qemu/qmp/qmp_tui.py| 6 +++--- 4 files changed, 6 insertions(+), 6

[PATCH v1 0/3] contrib/elf2dmp: Windows Server 2022 support

2022-11-29 Thread Viktor Prutyanov
Hi, For now, elf2dmp is unable to convert ELF-dump to DMP-dump made of Windows Server 2022 guest. This patch series fixes it. v1: improve code-style fix Viktor Prutyanov (3): contrib/elf2dmp: fix code style contrib/elf2dmp: move PE dir search to pe_get_data_dir_entry contrib/elf2dmp: add

[PATCH 0/1] Fix some typos

2022-11-29 Thread Dongdong Zhang
This patch mainly fixes some typos in the 'python' directory. Dongdong Zhang (1): Fix some typos python/qemu/machine/console_socket.py | 2 +- python/qemu/machine/qtest.py | 2 +- python/qemu/qmp/protocol.py | 2 +- python/qemu/qmp/qmp_tui.py| 6 +++--- 4 files

Re: [PATCH v13 0/8] Add support for zoned device

2022-11-29 Thread Stefan Hajnoczi
On Thu, 27 Oct 2022 at 11:46, Sam Li wrote: > v13: > - add some tracing points for new zone APIs [Dmitry] > - change error handling in zone_mgmt [Damien, Stefan] Hi Sam, This looks very close! I sent comments. Stefan

Re: [PATCH v13 7/8] block: add some trace events for new block layer APIs

2022-11-29 Thread Stefan Hajnoczi
Reviewed-by: Stefan Hajnoczi On Thu, 27 Oct 2022 at 11:48, Sam Li wrote: > > Signed-off-by: Sam Li > --- > block/file-posix.c | 3 +++ > block/trace-events | 2 ++ > 2 files changed, 5 insertions(+) > > diff --git a/block/file-posix.c b/block/file-posix.c > index 02476c011e..fe52e91da4 100644

Re: [PATCH v13 3/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-11-29 Thread Stefan Hajnoczi
On Thu, 27 Oct 2022 at 11:46, Sam Li wrote: > > Add a new zoned_host_device BlockDriver. The zoned_host_device option > accepts only zoned host block devices. By adding zone management > operations in this new BlockDriver, users can use the new block > layer APIs including Report Zone and four

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

2022-11-29 Thread Tommy Wu
Add some simple tests of the watchdog timer in the always-on domain device of HiFive 1 rev b. Signed-off-by: Tommy Wu --- tests/qtest/meson.build | 3 + tests/qtest/sifive-e-aon-watchdog-test.c | 650 +++ 2 files changed, 653 insertions(+) create mode

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

2022-11-29 Thread Tommy Wu
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 functionality of the watchdog timer, not all the

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

2022-11-29 Thread Tommy Wu
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 --- hw/misc/Kconfig| 3 + hw/misc/meson.build

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

2022-11-29 Thread Tommy Wu
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 --- hw/riscv/Kconfig| 1 + hw/riscv/sifive_e.c | 13 +++--

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

2022-11-29 Thread Peter Xu
On Mon, Nov 21, 2022 at 11:26:40AM -0500, huang...@chinatelecom.cn wrote: > 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(黄勇) > --- >

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

2022-11-29 Thread Peter Xu
On Mon, Nov 21, 2022 at 11:26:38AM -0500, huang...@chinatelecom.cn wrote: > 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

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

2022-11-29 Thread Peter Xu
On Mon, Nov 21, 2022 at 11:26:37AM -0500, huang...@chinatelecom.cn wrote: > 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

Re: [PATCH v14 4/5] hw/riscv: virt: Add PMU DT node to the device tree

2022-11-29 Thread Conor.Dooley
+CC Rob, which I probably should've done earlier, so context all preserved On 29/11/2022 09:42, Conor Dooley wrote: > On 29/11/2022 09:27, Atish Kumar Patra wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the >> content is safe >> >> On Mon, Nov 28, 2022 at 11:32

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

2022-11-29 Thread Peter Xu
On Mon, Nov 21, 2022 at 11:26:33AM -0500, huang...@chinatelecom.cn wrote: > 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

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

2022-11-29 Thread Peter Xu
On Mon, Nov 21, 2022 at 11:26:34AM -0500, huang...@chinatelecom.cn wrote: > 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(黄勇) Reviewed-by: Peter Xu -- Peter Xu

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

2022-11-29 Thread Peter Xu
On Mon, Nov 21, 2022 at 11:26:39AM -0500, huang...@chinatelecom.cn wrote: > diff --git a/migration/migration.c b/migration/migration.c > index 86950a1..096b61a 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -240,6 +240,7 @@ void migration_cancel(const Error *error) >

Re: [PATCH v3 4/7] hw/virtio: ensure a valid host_feature set for virtio-user-gpio

2022-11-29 Thread Alex Bennée
Stefan Hajnoczi writes: > Hi Alex, > I'm waiting for a v4 or a confirmation that you've retested and I can > just drop this patch. I've re-ordered and I'll post the up to date series with the dropped patch tomorrow. I was hoping for r-b's for the other patches. > > Thanks! > > Stefan --

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

2022-11-29 Thread Peter Xu
On Mon, Nov 21, 2022 at 11:26:36AM -0500, huang...@chinatelecom.cn wrote: > 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:

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

2022-11-29 Thread Peter Xu
Hi, Yong, On Mon, Nov 21, 2022 at 11:26:35AM -0500, huang...@chinatelecom.cn wrote: > 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

Re: [PATCH qemu.git v2 9/9] hw/timer/imx_epit: fix compare timer handling

2022-11-29 Thread Axel Heider
Peter, If you're correcting behaviour of the timer use here, you should start by fixing the way the timers are currently created with PTIMER_POLICY_LEGACY. That setting is basically "bug-for-bug-compatibility with very old QEMU, for devices where nobody really knows what the hardware behaviour

QEMU 7.2 non-deterministic migration-test CI failure

2022-11-29 Thread Stefan Hajnoczi
Hi, The following cross-i386-tci migration-test failure was triggered by CI: >>> MALLOC_PERTURB_=133 >>> G_TEST_DBUS_DAEMON=/builds/qemu-project/qemu/tests/dbus-vmstate-daemon.sh >>> QTEST_QEMU_BINARY=./qemu-system-i386 >>> /builds/qemu-project/qemu/build/tests/qtest/migration-test --tap -k

Re: [PATCH for-7.2] target/arm: Set TCGCPUOps.restore_state_to_opc for v7m

2022-11-29 Thread Evgeny Ermakov
Signed-off-by: Evgeny Ermakov ---

Re: [PATCH v3 4/7] hw/virtio: ensure a valid host_feature set for virtio-user-gpio

2022-11-29 Thread Michael S. Tsirkin
On Tue, Nov 29, 2022 at 04:01:25PM -0500, Stefan Hajnoczi wrote: > Hi Alex, > I'm waiting for a v4 or a confirmation that you've retested and I can > just drop this patch. > > Thanks! > > Stefan Note things need to be reordered, patch 2 should come last. So I'd really like to see v4 if

Re: [PATCH v3 4/7] hw/virtio: ensure a valid host_feature set for virtio-user-gpio

2022-11-29 Thread Stefan Hajnoczi
Hi Alex, I'm waiting for a v4 or a confirmation that you've retested and I can just drop this patch. Thanks! Stefan

Re: [PATCH for-7.2] target/arm: Set TCGCPUOps.restore_state_to_opc for v7m

2022-11-29 Thread Stefan Hajnoczi
Waiting for Evgeny's Signed-off-by. It seems a -rc4 tag will be required anyway for vhost fixes so I'll wait. Stefan

Re: [PATCH v2 5/8] hw/arm/virt: Fix devicetree warnings about the GPIO node

2022-11-29 Thread Rob Herring
On Tue, Sep 27, 2022 at 6:25 AM Peter Maydell wrote: > > On Tue, 27 Sept 2022 at 11:12, Jean-Philippe Brucker > wrote: > > > > Since the pl061 device can be used as interrupt controller, its node > > should contain "interrupt-controller" and "#interrupt-cells" properties. > > It *can* be, but

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

2022-11-29 Thread Stefan Hajnoczi
On Tue, 22 Nov 2022 at 03:22, Kevin Wolf wrote: > > Am 21.11.2022 um 22:19 hat Stefan Hajnoczi geschrieben: > > bdrv_*() APIs expect a valid BlockDriverState. Calling them with bs=NULL > > leads to undefined behavior. > > > > Jonathan Cameron reported this following NULL pointer dereference when

Re: [PATCH v1 1/1] migration: Fix yank on postcopy multifd crashing guest after migration

2022-11-29 Thread Peter Xu
On Tue, Nov 29, 2022 at 05:28:26PM -0300, Leonardo Bras Soares Passos wrote: > Hello Peter, Leo, > > On Thu, Nov 24, 2022 at 1:04 PM Peter Xu wrote: > > > > On Wed, Nov 09, 2022 at 02:56:29AM -0300, Leonardo Bras wrote: > > > diff --git a/migration/savevm.c b/migration/savevm.c > > > index

Re: Plugin Memory Callback Debugging

2022-11-29 Thread Aaron Lindsay via
On Nov 22 10:57, Aaron Lindsay wrote: > On Nov 21 18:22, Richard Henderson wrote: > > 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

[PATCH for-7.2] target/arm: Set TCGCPUOps.restore_state_to_opc for v7m

2022-11-29 Thread Richard Henderson
This setting got missed, breaking v7m. Fixes: 56c6c98df85c ("target/arm: Convert to tcg_ops restore_state_to_opc") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1347 Signed-off-by: Richard Henderson --- The patch is unchanged from the correct suggestion in the issue. If Evgeny would

Re: [PATCH v1 1/1] migration: Fix yank on postcopy multifd crashing guest after migration

2022-11-29 Thread Leonardo Bras Soares Passos
Hello Peter, On Thu, Nov 24, 2022 at 1:04 PM Peter Xu wrote: > > On Wed, Nov 09, 2022 at 02:56:29AM -0300, Leonardo Bras wrote: > > diff --git a/migration/savevm.c b/migration/savevm.c > > index a0cdb714f7..250caff7f4 100644 > > --- a/migration/savevm.c > > +++ b/migration/savevm.c > > @@

Re: [PATCH 10/12] pci: Inline do_pcie_aer_inject_error() into its only caller

2022-11-29 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Signed-off-by: Markus Armbruster Yeh that seems to have simplified out; Reviewed-by: Dr. David Alan Gilbert > --- > hw/pci/pci-hmp-cmds.c | 41 ++--- > 1 file changed, 6 insertions(+), 35 deletions(-) > >

Re: [PATCH 12/12] pci: Improve do_pcie_aer_inject_error()'s error messages

2022-11-29 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Signed-off-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert > --- > hw/pci/pci-hmp-cmds.c | 30 +++--- > 1 file changed, 15 insertions(+), 15 deletions(-) > > diff --git a/hw/pci/pci-hmp-cmds.c

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-29 Thread Michael Roth
On Tue, Nov 29, 2022 at 01:06:58PM -0600, Michael Roth wrote: > On Tue, Nov 29, 2022 at 10:06:15PM +0800, Chao Peng wrote: > > On Mon, Nov 28, 2022 at 06:37:25PM -0600, Michael Roth wrote: > > > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: > > ... > > > > +static long

Re: [PULL 0/2] Seabios 1.16.1 20221128 patches

2022-11-29 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 for-7.2] replay: Fix declaration of replay_read_next_clock

2022-11-29 Thread Stefan Hajnoczi
Merged, thanks! Stefan

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-29 Thread Michael Roth
On Tue, Nov 29, 2022 at 10:06:15PM +0800, Chao Peng wrote: > On Mon, Nov 28, 2022 at 06:37:25PM -0600, Michael Roth wrote: > > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: > ... > > > +static long restrictedmem_fallocate(struct file *file, int mode, > > > +

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-29 Thread Vishal Annapurve
On Mon, Nov 28, 2022 at 4:37 PM Michael Roth wrote: > > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: > > From: "Kirill A. Shutemov" > > > > Introduce 'memfd_restricted' system call with the ability to create > > memory areas that are restricted from userspace access through

Re: [PATCH v3 1/1] hw/arm/boot: set initrd with #address-cells type in fdt

2022-11-29 Thread Peter Maydell
On Tue, 29 Nov 2022 at 16:07, Schspa Shi wrote: > > We use 32bit value for linux,initrd-[start/end], when we have > loader_start > 4GB, there will be a wrong initrd_start passed > to the kernel, and the kernel will report the following warning. > > [0.00] [ cut here

[PATCH v12 6/7] s390x/cpu_topology: activating CPU topology

2022-11-29 Thread Pierre Morel
The KVM capability, KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility for the guest in the case the topology is available in QEMU and in KVM. The feature is fenced for SE (secure execution). To allow smooth migration with old

Re: [PATCH for-7.2] replay: Fix declaration of replay_read_next_clock

2022-11-29 Thread Philippe Mathieu-Daudé
On 29/11/22 17:13, Stefan Hajnoczi wrote: On Tue, 29 Nov 2022 at 02:39, Philippe Mathieu-Daudé wrote: On 29/11/22 02:05, Richard Henderson wrote: Fixes the build with gcc 13: replay/replay-time.c:34:6: error: conflicting types for \ 'replay_read_next_clock' due to enum/integer

[PATCH v12 5/7] s390x/cpu_topology: interception of PTF instruction

2022-11-29 Thread Pierre Morel
When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervizor activates the interpretation by using the KVM_CAP_S390_CPU_TOPOLOGY KVM extension. The PTF instructions with function code 0 and 1 are

[PATCH v12 7/7] docs/s390x: document s390x cpu topology

2022-11-29 Thread Pierre Morel
Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- docs/system/s390x/cpu-topology.rst | 80 ++ 1 file changed, 80 insertions(+) create mode 100644 docs/system/s390x/cpu-topology.rst diff --git

[PATCH v12 2/7] s390x/cpu topology: reporting the CPU topology to the guest

2022-11-29 Thread Pierre Morel
The guest uses the STSI instruction to get information on the CPU topology. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel --- target/s390x/cpu.h | 77 +++ hw/s390x/s390-virtio-ccw.c | 12 +--

[PATCH v12 0/7] s390x: CPU Topology

2022-11-29 Thread Pierre Morel
Hi, The implementation of the CPU Topology in QEMU has been modified since the last patch series. - The two preliminary patches have been accepted and are no longer part of this series. - The topology machine property has been abandoned - the topology_capable QEMU capability has been

[PATCH v12 1/7] s390x/cpu topology: Creating CPU topology device

2022-11-29 Thread Pierre Morel
We will need a Topology device to transfer the topology during migration and to implement machine reset. The device creation is fenced by s390_has_topology(). Signed-off-by: Pierre Morel --- include/hw/s390x/cpu-topology.h| 44 +++ include/hw/s390x/s390-virtio-ccw.h | 1 +

[PATCH v12 3/7] s390x/cpu_topology: resetting the Topology-Change-Report

2022-11-29 Thread Pierre Morel
During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Nico Boehr Reviewed-by: Janis Schoetterl-Glausch ---

[PATCH v12 4/7] s390x/cpu_topology: CPU topology migration

2022-11-29 Thread Pierre Morel
The migration can only take place if both source and destination of the migration both use or both do not use the CPU topology facility. We indicate a change in topology during migration postload for the case the topology changed between source and destination. Signed-off-by: Pierre Morel ---

[PATCH v2 0/2] qga: improve "syslog" domain logging

2022-11-29 Thread Andrey Drobyshev via
These patches extend QGA logging interface, primarily under Windows guests. They enable QGA to write to Windows event log, much like syslog() on *nix. In addition we get rid of hardcoded log level used by ga_log(). v2: * Close event_log handle when doing cleanup_agent() * Fix switch cases

[PATCH v2 2/2] qga: map GLib log levels to system levels

2022-11-29 Thread Andrey Drobyshev via
This patch translates GLib-specific log levels to system ones, so that they may be used by both *nix syslog() (as a "priority" argument) and Windows ReportEvent() (as a "wType" argument). Currently the only codepath to write to "syslog" domain is slog() function. However, this patch allows the

[PATCH v2 1/2] qga-win: add logging to Windows event log

2022-11-29 Thread Andrey Drobyshev via
This commit allows QGA to write to Windows event log using Win32 API's ReportEvent() [1], much like syslog() under *nix guests. In order to generate log message definitions we use a very basic message text file [2], so that every QGA's message gets ID 1. The tools "windmc" and "windres"

Re: [PATCH for-7.2] replay: Fix declaration of replay_read_next_clock

2022-11-29 Thread Stefan Hajnoczi
On Tue, 29 Nov 2022 at 02:39, Philippe Mathieu-Daudé wrote: > > On 29/11/22 02:05, Richard Henderson wrote: > > Fixes the build with gcc 13: > > > > replay/replay-time.c:34:6: error: conflicting types for \ > >'replay_read_next_clock' due to enum/integer mismatch; \ > >have

Re: [PATCH v2 1/1] hw/arm/boot: set initrd with #[address/size]-cells type in fdt

2022-11-29 Thread Schspa Shi
Peter Maydell writes: > On Tue, 29 Nov 2022 at 10:48, Schspa Shi wrote: >> >> We use 32bit value for linux,initrd-[start/end], when we have >> loader_start > 4GB, there will be a wrong initrd_start passed >> to the kernel, and the kernel will report the following warning. >> >> [0.00]

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

2022-11-29 Thread Eric Auger
Hi Michael, On 11/29/22 16:44, Michael S. Tsirkin wrote: > On Tue, Nov 29, 2022 at 10:52:29AM +0100, Eric Auger wrote: >> Hi Jason, >> >> On 11/29/22 05:02, Jason Wang wrote: >>> When vIOMMU is enabled, the vq->used_phys is actually the IOVA not >>> GPA. So we need to translate it to GPA before

  1   2   >