Re: [PATCH v4 2/6] block: Allow changing bs->file on reopen

2021-05-07 Thread Vladimir Sementsov-Ogievskiy
17.03.2021 20:15, Alberto Garcia wrote: When the x-blockdev-reopen was added it allowed reconfiguring the graph by replacing backing files, but changing the 'file' option was forbidden. Because of this restriction some operations are not possible, notably inserting and removing block filters.

[PATCH v4 1/2] target/i386: Trivial code motion

2021-05-07 Thread Ziqiao Kong
Move the float translation case to a new block by a new pair of braces. Fix some coding style problem for the old code. Signed-off-by: Ziqiao Kong --- VERSION | 2 +- target/i386/tcg/translate.c | 953 ++-- 2 files changed, 481 insertions(+)

[PATCH v4 2/2] target/i386: Correct implementation for FCS, FIP, FDS and FDP

2021-05-07 Thread Ziqiao Kong
Changes since v3: - Split the long patches to series to make review easier. - Fix the coding style problems in v3. Changes since v2: - Change the sequence of fpcs, fpds, fpip and fpdp in CPUX86State. - Use stl instead of stw in do_fstenv. - Move variables to floats instruction case block. -

Re: [PATCH 16/22] qapi/parser: add docstrings

2021-05-07 Thread Markus Armbruster
John Snow writes: > On 4/25/21 9:27 AM, Markus Armbruster wrote: >> Another ignorant doc string markup question... how am I supposed to see >> that exprs and docs are attributes, and not global variables? >> > > The syntax is apparently supposed to be :py:attr:`MyClass.attr`. Though, > it does

[Bug 1889421] Re: VVFAT is not writable from Windows NT 3.5, 3.51 and 4.0

2021-05-07 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1889945] Re: virtiofsd exits when iommu_platform is enabled after virtiofs driver is loaded

2021-05-07 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1888964] Re: Segfault using GTK display with dmabuf (iGVT-g) on Wayland

2021-05-07 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1889943] Re: Improper TCP/IP packet splitting on e1000e/vmxnet3

2021-05-07 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1888818] Re: Multi-queue vhost-user fails to reconnect with qemu version >=4.2

2021-05-07 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1889033] Re: qemu-img permission denied on vmdk creation on CIFS share

2021-05-07 Thread Thomas Huth
The QEMU project is currently moving its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting the bug state to "Incomplete" now. If the bug has already been fixed in the latest upstream version of QEMU, then plea

[Bug 1873339] Re: Qemu DOS Quake - 640x480 and above resolutions - Unable to load VESA palette in dos prompt and game crashing are not working

2021-05-07 Thread ruthan
** Changed in: qemu Status: Incomplete => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1873339 Title: Qemu DOS Quake - 640x480 and above resolutions - Unable to load VESA palette in d

Re: [PATCH v11 5/6] KVM: arm64: ioctl to fetch/store tags in a guest

2021-05-07 Thread Steven Price
On 04/05/2021 18:44, Catalin Marinas wrote: On Thu, Apr 29, 2021 at 05:06:07PM +0100, Steven Price wrote: On 27/04/2021 18:58, Catalin Marinas wrote: On Fri, Apr 16, 2021 at 04:43:08PM +0100, Steven Price wrote: diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.

Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches

2021-05-07 Thread Thomas Huth
On 06/05/2021 09.38, Peter Maydell wrote: On Thu, 6 May 2021 at 08:01, Thomas Huth wrote: On 05/05/2021 20.06, Peter Maydell wrote: On Mon, 3 May 2021 at 11:45, Thomas Huth wrote: Hi Peter, the following changes since commit 53c5433e84e8935abed8e91d4a2eb813168a0ecf: Merge remote-t

Re: [question] The source cannot recover, if the destination fails in the last round of live migration

2021-05-07 Thread Kunkun Jiang
Hi Dave, On 2021/5/6 21:05, Dr. David Alan Gilbert wrote: * Kunkun Jiang (jiangkun...@huawei.com) wrote: Hi all, Hi, Recently I am learning about the part of live migration. I have a question about the last round. When the pending_size is less than the threshold, it will enter the last roun

Re: [PATCH] hw/virtio: enable ioeventfd configuring for mmio

2021-05-07 Thread Pavel Dovgalyuk
ping On 06.04.2021 13:02, Michael S. Tsirkin wrote: i tagged it for 6.1 pls remind me after release so it's not lost On Mon, Apr 05, 2021 at 08:50:31AM +0300, Pavel Dovgalyuk wrote: ping On 29.03.2021 10:43, Pavel Dovgalyuk wrote: This patch adds ioeventfd flag for virtio-mmio configuration

Re: [PATCH] hw/arm/xlnx: Fix PHY address for xilinx-zynq-a9

2021-05-07 Thread Edgar E. Iglesias
On Tue, May 04, 2021 at 05:41:40AM -0700, Guenter Roeck wrote: > Commit dfc388797cc4 ("hw/arm: xlnx: Set all boards' GEM 'phy-addr' > property value to 23") configured the PHY address for xilinx-zynq-a9 > to 23. When trying to boot xilinx-zynq-a9 with zynq-zc702.dtb or > zynq-zc706.dtb, this result

[RESEND v5 3/4] target/ppc: turned SPR R/W callbacks not static

2021-05-07 Thread Bruno Larsen (billionai)
To be able to compile translate_init.c.inc as a standalone file, we have to make the callbacks accessible outside of translate.c; This patch does exactly that Signed-off-by: Bruno Larsen (billionai) --- target/ppc/spr_tcg.h | 134 ++ target/ppc/translate.c | 210 +++

[RESEND v5 4/4] target/ppc: isolated cpu init from translation logic

2021-05-07 Thread Bruno Larsen (billionai)
finished isolation of CPU initialization logic from translation logic. CPU initialization now only has common code and may or may not call accelerator-specific code, as the build options require. Signed-off-by: Bruno Larsen (billionai) Reviewed-by: David Gibson --- target/ppc/{translate_init.c.

[Bug 1880066] Re: Microphone input dies in guest when switching evdev input

2021-05-07 Thread Justin Cichra
Was fixed when moving to QEMU 5.x in Ubuntu 20.10. ** Changed in: qemu Status: Incomplete => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1880066 Title: Microphone input dies

[Bug 1880066] Re: Microphone input dies in guest when switching evdev input

2021-05-07 Thread Justin Cichra
Was fixed when moving to QEMU 5.x in Ubuntu 20.10. ** Changed in: qemu (Fedora) Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1880066 Title: Microphone input die

[PATCH V3 00/22] Live Update

2021-05-07 Thread Steve Sistare
Provide the cprsave and cprload commands for live update. These save and restore VM state, with minimal guest pause time, so that qemu may be updated to a new version in between. cprsave stops the VM and saves vmstate to an ordinary file. It supports two modes: restart and reboot. For restart,

[PATCH V3 05/22] machine: memfd-alloc option

2021-05-07 Thread Steve Sistare
Allocate anonymous memory using memfd_create if the memfd-alloc machine option is set. Signed-off-by: Steve Sistare --- hw/core/machine.c | 19 +++ include/hw/boards.h | 1 + qemu-options.hx | 5 + softmmu/physmem.c | 41 - tr

[PATCH V3 04/22] util: env var helpers

2021-05-07 Thread Steve Sistare
Add functions for saving fd's and other values in the environment via setenv, and for reading them back via getenv. Signed-off-by: Steve Sistare --- include/qemu/env.h | 23 + util/env.c | 99 ++ util/meson.build | 1 + 3

[PATCH V3 06/22] vl: add helper to request re-exec

2021-05-07 Thread Steve Sistare
Add a qemu_exec_requested() hook that causes the main loop to exit and re-exec qemu using the same initial arguments. If /usr/bin/qemu-exec exists, exec that instead. This is an optional site-specific trampoline that may alter the environment before exec'ing the qemu binary. Signed-off-by: Steve

[PATCH V3 03/22] oslib: qemu_clr_cloexec

2021-05-07 Thread Steve Sistare
Define qemu_clr_cloexec, analogous to qemu_set_cloexec. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Steve Sistare --- include/qemu/osdep.h | 1 + util/oslib-posix.c | 9 + util/oslib-win32.c | 4 3 files changed, 14 insertions(+) diff --git a/include/qemu/osdep.h b/incl

[PATCH V3 11/22] vfio-pci: refactor for cpr

2021-05-07 Thread Steve Sistare
Export vfio_address_spaces and vfio_listener_skipped_section. Add optional eventfd arg to vfio_add_kvm_msi_virq. Refactor vector use into a helper vfio_vector_init. All for use by cpr in a subsequent patch. No functional change. Signed-off-by: Steve Sistare --- hw/vfio/common.c |

[PATCH V3 15/22] hostmem-memfd: cpr support

2021-05-07 Thread Steve Sistare
Preserve memory-backend-memfd memory objects during cpr. Signed-off-by: Steve Sistare --- backends/hostmem-memfd.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c index 69b0ae3..3503c89 100644 --- a/ba

[PATCH V3 02/22] qemu_ram_volatile

2021-05-07 Thread Steve Sistare
Add a function that returns true if any ram_list block represents volatile memory. Signed-off-by: Steve Sistare --- include/exec/memory.h | 8 softmmu/memory.c | 30 ++ 2 files changed, 38 insertions(+) diff --git a/include/exec/memory.h b/include/exec

[PATCH V3 01/22] as_flat_walk

2021-05-07 Thread Steve Sistare
Add an iterator over the sections of a flattened address space. Signed-off-by: Steve Sistare --- include/exec/memory.h | 17 + softmmu/memory.c | 18 ++ 2 files changed, 35 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index 5728a6

[PATCH V3 12/22] vfio-pci: cpr part 1

2021-05-07 Thread Steve Sistare
Enable vfio-pci devices to be saved and restored across an exec restart of qemu. At vfio creation time, save the value of vfio container, group, and device descriptors in the environment. In cprsave, suspend the use of virtual addresses in DMA mappings with VFIO_DMA_UNMAP_FLAG_VADDR, because gues

[PATCH V3 07/22] cpr

2021-05-07 Thread Steve Sistare
Provide the cprsave and cprload functions for live update. These save and restore VM state, with minimal guest pause time, so that qemu may be updated to a new version in between. cprsave stops the VM and saves vmstate to an ordinary file. It supports two modes: restart and reboot. For restart,

[PATCH V3 08/22] cpr: QMP interfaces

2021-05-07 Thread Steve Sistare
cprsave calls cprsave(). Syntax: { 'enum': 'CprMode', 'data': [ 'reboot', 'restart' ] } { 'command': 'cprsave', 'data': { 'file': 'str', 'mode': 'CprMode' } } cprload calls cprload(). Syntax: { 'command': 'cprload', 'data': { 'file': 'str' } } cprinfo returns a list of supported modes. S

[PATCH V3 10/22] pci: export functions for cpr

2021-05-07 Thread Steve Sistare
Export msix_is_pending and msix_init_vector_notifiers for use by cpr. No functional change. Signed-off-by: Steve Sistare --- hw/pci/msix.c | 20 ++-- hw/pci/pci.c | 3 +-- include/hw/pci/msix.h | 5 + include/hw/pci/pci.h | 1 + 4 files changed, 21 insert

[PATCH V3 19/22] chardev: cpr for sockets

2021-05-07 Thread Steve Sistare
Save accepted socket fds in the environment before cprsave, and look for fds in the environment after cprload. Reject cprsave if a socket enables the TLS or websocket option. Allow a monitor socket by closing it on exec. Signed-off-by: Mark Kanda Signed-off-by: Steve Sistare --- chardev/char-

[PATCH V3 14/22] vhost: reset vhost devices upon cprsave

2021-05-07 Thread Steve Sistare
A vhost device is implicitly preserved across re-exec because its fd is not closed, and the value of the fd is specified on the command line for the new qemu to find. However, new qemu issues an VHOST_RESET_OWNER ioctl, which fails because the device already has an owner. To fix, reset the owner

[PATCH V3 20/22] cpr: only-cpr-capable option

2021-05-07 Thread Steve Sistare
Add the only-cpr-capable option, which causes qemu to exit with an error if any devices that are not capable of cpr are added. This guarantees that a cprsave operation will not fail with an unsupported device error. Signed-off-by: Steve Sistare --- chardev/char-socket.c | 4 hw/vfio/com

[PATCH V3 16/22] chardev: cpr framework

2021-05-07 Thread Steve Sistare
Add QEMU_CHAR_FEATURE_CPR for devices that support cpr. Add the chardev close_on_cpr option for devices that can be closed on cpr and reopened after exec. cpr is allowed only if either QEMU_CHAR_FEATURE_CPR or close_on_cpr is set for all chardevs in the configuration. Signed-off-by: Steve Sistare

[PATCH V3 13/22] vfio-pci: cpr part 2

2021-05-07 Thread Steve Sistare
Finish cpr for vfio-pci by preserving eventfd's and vector state. Signed-off-by: Steve Sistare --- hw/vfio/pci.c | 110 -- 1 file changed, 108 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index f7ac9f03..e983db4

[PATCH V3 21/22] cpr: maintainers

2021-05-07 Thread Steve Sistare
Add the maintainers for cpr related files. Signed-off-by: Steve Sistare --- MAINTAINERS | 11 +++ 1 file changed, 11 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 36055f1..b69bbf5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2843,6 +2843,17 @@ F: net/colo* F: net/filter-

[PATCH V3 18/22] chardev: cpr for pty

2021-05-07 Thread Steve Sistare
Save and restore pty descriptors across cprsave and cprload. Signed-off-by: Steve Sistare --- chardev/char-pty.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/chardev/char-pty.c b/chardev/char-pty.c index a2d1e7c..c91151d 100644 --- a/chardev/char-pty.c +++

[Bug 1884831] Re: qemu-nbd fails to discard bigger chunks

2021-05-07 Thread Eric Blake
Commit 890cbccb0 included in upstream release 5.1.0. ** Changed in: qemu Status: Incomplete => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1884831 Title: qemu-nbd fails to di

[PATCH V3 17/22] chardev: cpr for simple devices

2021-05-07 Thread Steve Sistare
Set QEMU_CHAR_FEATURE_CPR for devices that trivially support cpr. char-stdio is slightly less trivial. Allow the gdb server by closing it on exec. Signed-off-by: Steve Sistare --- chardev/char-mux.c | 1 + chardev/char-null.c| 1 + chardev/char-serial.c | 1 + chardev/char-stdio.c |

[PATCH V3 22/22] simplify savevm

2021-05-07 Thread Steve Sistare
Use qf_file_open to simplify a few functions in savevm.c. No functional change. Signed-off-by: Steve Sistare --- migration/savevm.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 52e2d72..d02bce2 100644 ---

Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches

2021-05-07 Thread Eric Blake
On 5/6/21 2:00 AM, Thomas Huth wrote: > D'oh! I think I can work-around the problem with a patch like > this on top: > > diff a/configure b/configure > --- a/configure > +++ b/configure > @@ -1686,6 +1686,11 @@ fi >   >  for config in $mak_wilds; do > target="$(basename "$config" .mak)" > + 

[PATCH V3 09/22] cpr: HMP interfaces

2021-05-07 Thread Steve Sistare
cprsave Call cprsave(). Arguments: file : save vmstate to this file name mode: "reboot" or "restart" cprload Call cprload(). Arguments: file : load vmstate from this file name cprinfo Print to stdout a space-delimited list of modes supported by cprsave. Arguments: none

Re: [PULL 00/10] Gitlab-CI, qtest, moxie removal and misc patches

2021-05-07 Thread Paolo Bonzini
On 07/05/21 11:45, Thomas Huth wrote: diff --git a/Makefile b/Makefile index bcbbec71a1..3088502329 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,8 @@ x := $(shell rm -rf meson-private meson-info meson-logs)  endif  # 1. ensure config-host.mak is up-to-date -config-host.mak: $(SRC_PATH)/

Re: [RESEND PATCH 01/32] memory: Add RAM_PROTECTED flag to skip IOMMU mappings

2021-05-07 Thread Paolo Bonzini
On 07/05/21 07:24, Yang Zhong wrote: Paolo, i will revert this patch, but in order to disable sgx epc memory region as DMA target, we still need to skip this memory region while adding this memory region. So, my plan is to revert this patch, and then add one new bool variable in t

Re: [PATCH V3 00/22] Live Update

2021-05-07 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1620390320-301716-1-git-send-email-steven.sist...@oracle.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1620390320-301716-1-git-send-email-steven.sist...@oracle.com Subject: [

[RFC PATCH 0/5] RISC-V:support Nuclei FPGA Evaluation Kit

2021-05-07 Thread wangjunqiang
This patch series provides an implementation of Nuclei FPGA Machine[1]. At present, only MCU mode support is included. In mcu mode, We will use eclic[2] as interrupt controller. It is compatible with clic in Machine mode. But It contains some customized csr[3] that will take up part of the csr code

[RFC PATCH 2/5] hw/intc: Add Nuclei ECLIC device

2021-05-07 Thread wangjunqiang
This patch provides an implementation of Nuclei ECLIC Device. Nuclei processor core have been equipped with an Enhanced Core Local Interrupt Controller (ECLIC), which is optimized based on the RISC-V standard CLIC, to manage all interrupt sources. https://doc.nucleisys.com/nuclei_spec/isa/eclic.ht

[RFC PATCH 4/5] hw/char: Add Nuclei Uart

2021-05-07 Thread wangjunqiang
This patch provides the initial implementation of Nuclei Uart which is opensource in Nuclei's Hummingbird Project. Signed-off-by: Wang Junqiang --- hw/char/Kconfig | 3 + hw/char/meson.build | 1 + hw/char/nuclei_uart.c | 208 ++

[RFC PATCH 1/5] target/riscv: Add Nuclei CSR and Update interrupt handling

2021-05-07 Thread wangjunqiang
This patch adds Nuclei CSR support for ECLIC and update the related interrupt handling. https://doc.nucleisys.com/nuclei_spec/isa/core_csr.html --- target/riscv/cpu.c | 25 +- target/riscv/cpu.h | 42 ++- target/riscv/cpu_bits.h | 37 ++

[RFC PATCH 5/5] Nuclei FPGA Evaluation Kit MCU Machine

2021-05-07 Thread wangjunqiang
This patch provides an implementation of Nuclei FPGA Evaluation Kit Board as MCU mode. The Machine based on Nuclei's specification which has Customized register. The following machine is implemented: -"Nuclei 100T": SYSTIMER, ECLIC, UART ... Signed-off-by: Wang Junqiang --- default-configs/d

RE: [PATCH v11 5/6] KVM: arm64: ioctl to fetch/store tags in a guest

2021-05-07 Thread David Laight
From: Steven Price > Sent: 07 May 2021 10:45 > > On 04/05/2021 18:44, Catalin Marinas wrote: > > On Thu, Apr 29, 2021 at 05:06:07PM +0100, Steven Price wrote: > >> On 27/04/2021 18:58, Catalin Marinas wrote: > >>> On Fri, Apr 16, 2021 at 04:43:08PM +0100, Steven Price wrote: > diff --git a/a

[RFC PATCH 3/5] hw/intc: Add Nuclei Systimer

2021-05-07 Thread wangjunqiang
This patch provides an implementation of Nuclei Systimer, which like clint. In MCU mode, It only work for hart-0. MultiCore support will run on 200t board for Linux. https://doc.nucleisys.com/nuclei_spec/isa/timer.html Signed-off-by: Wang Junqiang --- hw/intc/Kconfig | 3 +

Re: [RFC PATCH 0/5] RISC-V:support Nuclei FPGA Evaluation Kit

2021-05-07 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210507081654.11056-1-wangjunqi...@iscas.ac.cn/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210507081654.11056-1-wangjunqi...@iscas.ac.cn Subject: [RFC PATCH 0/5] RISC-V:supp

[PATCH 1/2] i386: use better matching family/model/stepping for 'qemu64' CPU

2021-05-07 Thread Daniel P . Berrangé
The 'qemu64' CPUID currently reports a family/model/stepping that approximately corresponds to an AMD K7 vintage architecture. The K7 series predates the introduction of 64-bit support by AMD in the K8 series. This has been reported to lead to LLVM complaints about generating 64-bit code for a 32-b

[PATCH 2/2] i386: use better matching family/model/stepping for 'max' CPU

2021-05-07 Thread Daniel P . Berrangé
The 'max' CPU under TCG currently reports a family/model/stepping that approximately corresponds to an AMD K7 vintage architecture. The K7 series predates the introduction of 64-bit support by AMD in the K8 series. This has been reported to lead to LLVM complaints about generating 64-bit code for a

[PATCH 0/2] i386: use better matching family/model/stepping for generic CPUs

2021-05-07 Thread Daniel P . Berrangé
This is in response to this bug report: https://gitlab.com/qemu-project/qemu/-/issues/191 The generic 'qemu64' and 'max' CPUs currently defined to report a family/model/stepping that approximately corresponds to an AMD K7 vintage architecture. The K7 series predates the introduction of 64-bit

Re: [PATCH v3 5/8] block/write-threshold: don't use aio context lock

2021-05-07 Thread Paolo Bonzini
On 06/05/21 11:06, Vladimir Sementsov-Ogievskiy wrote: void bdrv_write_threshold_check_write(BlockDriverState *bs, int64_t offset, int64_t bytes) { int64_t end = offset + bytes; -uint64_t wtr = bs->write_threshold_offset; +uint64_t wtr;

question regarding QEMU adding overlapping memory regions to VFIO

2021-05-07 Thread Thanos Makatos
I've noticed that QEMU adds overlapping memory regions to VFIO, e.g.: vfio_listener_region_add_ram region_add [ram] 0xc - 0xc0fff [0x7f6702c0] vfio_listener_region_del region_del 0xc4000 - 0xd vfio_listener_region_add_ram region_add [ram] 0xc1000 - 0xc3fff [0x7f66406c1000] vfio_listene

Re: [PATCH v4 2/6] block: Allow changing bs->file on reopen

2021-05-07 Thread Kevin Wolf
Am 07.05.2021 um 09:11 hat Vladimir Sementsov-Ogievskiy geschrieben: > 17.03.2021 20:15, Alberto Garcia wrote: > > When the x-blockdev-reopen was added it allowed reconfiguring the > > graph by replacing backing files, but changing the 'file' option was > > forbidden. Because of this restriction so

[Bug 1884684] Re: QEMU 5.0: Guest VM hangs/freeze when unplugging USB device

2021-05-07 Thread TheCatFelix
Issue does not occur in latest version of QEMU anymore. ** Changed in: qemu Status: Incomplete => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1884684 Title: QEMU 5.0: Guest V

Re: [PATCH v3 1/8] block/write-threshold: don't use write notifiers

2021-05-07 Thread Eric Blake
On 5/6/21 4:06 AM, Vladimir Sementsov-Ogievskiy wrote: > write-notifiers are used only for write-threshold. New code for such > purpose should create filters. > > Let's better special-case write-threshold and drop write notifiers at > all. (Actually, write-threshold is special-cased anyway, as the

Re: [PATCH v3 4/8] block/write-threshold: drop extra APIs

2021-05-07 Thread Eric Blake
On 5/6/21 4:06 AM, Vladimir Sementsov-Ogievskiy wrote: > bdrv_write_threshold_exceeded() is unused at all. either: s/unused/not used/ or: s/ at all// > > bdrv_write_threshold_is_set() is used only to double check the value of > bs->write_threshold_offset in tests. No real sense in it (both tests

Re: [PATCH V3 06/22] vl: add helper to request re-exec

2021-05-07 Thread Eric Blake
On 5/7/21 7:25 AM, Steve Sistare wrote: > Add a qemu_exec_requested() hook that causes the main loop to exit and > re-exec qemu using the same initial arguments. If /usr/bin/qemu-exec > exists, exec that instead. This is an optional site-specific trampoline > that may alter the environment before

Re: [PATCH V3 16/22] chardev: cpr framework

2021-05-07 Thread Eric Blake
On 5/7/21 7:25 AM, Steve Sistare wrote: > Add QEMU_CHAR_FEATURE_CPR for devices that support cpr. > Add the chardev close_on_cpr option for devices that can be closed on cpr > and reopened after exec. > cpr is allowed only if either QEMU_CHAR_FEATURE_CPR or close_on_cpr is set > for all chardevs in

[PATCH v3 01/17] bsd-user/syscall: Replace alloca() by g_try_new()

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Use autofree heap allocation instead (returning ENOMEM on failure). Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- bsd-user/syscall.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bsd-

[PATCH v3 00/17] misc: Replace alloca() by g_malloc()

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Replace few calls by equivalent GLib malloc(). Since v2: - linux-user calls converted - bsd-user returns ENOMEM (Peter) - built on PPC+KVM host (David) - removed tpm mutex cleanup (Christophe) - included Alex gdbstub patch - added R-b tags

[PATCH v3 03/17] linux-user/syscall: Replace alloca() by g_try_new()

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Use autofree heap allocation instead (returning ENOMEM on failure). Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- linux-user/syscall.c | 25 + 1 file changed, 17 insertions(+), 8 deletions

[PATCH v3 02/17] linux-user/elfload: Replace alloca() by g_try_malloc()

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Use autofree heap allocation instead (returning ENOMEM on failure). Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- linux-user/elfload.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff -

[PATCH v3 04/17] linux-user/syscall: Replace alloca() by g_try_malloc()

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Use autofree heap allocation instead (returning ENOMEM on failure). Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- linux-user/syscall.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff

[PATCH v3 06/17] linux-user: Replace alloca() by g_try_malloc() in setsockopt() syscall

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Use autofree heap allocation instead (returning ENOMEM on failure). Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- linux-user/syscall.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) d

[PATCH v3 07/17] linux-user: Replace alloca() by g_try_malloc() in various socket syscall

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Use autofree heap allocation instead (returning ENOMEM on failure). Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- linux-user/syscall.c | 50 +++- 1 file changed, 35 inserti

[PATCH v3 05/17] linux-user: Replace alloca() by g_try_new() in ppoll() syscall

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Use autofree heap allocation instead (returning ENOMEM on failure). Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- linux-user/syscall.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/l

[PATCH v3 09/17] linux-user/syscall: Replace alloca() by GLib alloc() in sendrecvmsg

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Use autofree heap allocation instead (returning ENOMEM on failure). Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- linux-user/syscall.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH v3 15/17] target/ppc/kvm: Replace alloca() by g_malloc()

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Use autofree heap allocation instead, replacing it by a g_malloc call. Reviewed-by: Greg Kurz Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/

[PATCH v3 08/17] linux-user/syscall: Move code around in do_sendrecvmsg_locked()

2021-05-07 Thread Philippe Mathieu-Daudé
Avoid initializing variables too early, since there is 2 possible failure points before they get used. Move them after the lock_iovec() call. Signed-off-by: Philippe Mathieu-Daudé --- linux-user/syscall.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/linux-use

[PATCH v3 10/17] audio/alsaaudio: Replace ALSA alloca() by malloc() equivalent

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Define the cleanup functions for the snd_pcm_[hw/sw]_params_t types, and replace the ALSA alloca() calls by equivalent ALSA malloc(). Signed-off-by: Philippe Mathieu-Daudé --- audio/alsaaudio.c | 11 +++ 1 file changed, 7 inserti

[PATCH v3 14/17] hw/misc/pca9552: Replace g_newa() by g_new()

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Use autofree heap allocation instead, replacing g_newa() by g_new(). Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/pca9552.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/pca9552.c b/hw/misc/pca9552.c in

[PATCH v3 16/17] configure: Prohibit alloca() by using -Walloca CPPFLAG

2021-05-07 Thread Philippe Mathieu-Daudé
Now that we removed all alloca() calls in the repository, add the -Walloca CPPFLAG to trigger a build failure if such stack allocation is used. Rationale: The ALLOCA(3) man-page mentions its "use is discouraged". Signed-off-by: Philippe Mathieu-Daudé --- As there is an alloca() call in libslirp,

[PATCH v3 11/17] backends/tpm: Replace g_alloca() by g_malloc()

2021-05-07 Thread Philippe Mathieu-Daudé
The ALLOCA(3) man-page mentions its "use is discouraged". Replace a g_alloca() call by a autofree g_malloc() one, moving the allocation before the MUTEX guarded block. Reviewed-by: Stefan Berger Signed-off-by: Philippe Mathieu-Daudé --- backends/tpm/tpm_emulator.c | 3 +-- 1 file changed, 1 in

[PATCH v3 12/17] gdbstub: Constify GdbCmdParseEntry

2021-05-07 Thread Philippe Mathieu-Daudé
Reviewed-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé --- gdbstub.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 9103ffc9028..83d47c67325 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1981,7 +1981,7 @@ static void handle_v_kill(Gdb

[NOTFORMERGE PATCH v3 17/17] configure: libSLiRP buildsys kludge

2021-05-07 Thread Philippe Mathieu-Daudé
Only enable -Walloca when libSLiRP is not built. Signed-off-by: Philippe Mathieu-Daudé --- configure | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 67cb6d5421c..ab5b6248253 100755 --- a/configure +++ b/configure @@ -552,7 +552,7 @@ ARFLA

[PATCH v3 13/17] gdbstub: Replace GdbCmdContext with plain g_array()

2021-05-07 Thread Philippe Mathieu-Daudé
From: Alex Bennée Instead of jumping through hoops let glib deal with both tracking the number of elements and auto freeing the memory once we are done. This allows is to drop the usage of ALLOCA(3) which the man-page mentions its "use is discouraged". Signed-off-by: Alex Bennée Reviewed-by: Ph

Re: [question] The source cannot recover, if the destination fails in the last round of live migration

2021-05-07 Thread Peter Xu
On Fri, May 07, 2021 at 05:46:44PM +0800, Kunkun Jiang wrote: > Hi Dave, > > On 2021/5/6 21:05, Dr. David Alan Gilbert wrote: > > * Kunkun Jiang (jiangkun...@huawei.com) wrote: > > > Hi all, > > Hi, > > > > > Recently I am learning about the part of live migration. > > > I have a question about t

[PATCH v2 0/5] blkdebug: fix racing condition when iterating on

2021-05-07 Thread Emanuele Giuseppe Esposito
When qemu_coroutine_enter is executed in a loop (even QEMU_FOREACH_SAFE), the new routine can modify the list, for example removing an element, causing problem when control is given back to the caller that continues iterating on the same list. Patch 1 solves the issue in blkdebug_debug_resume by

[PATCH v2 1/5] blkdebug: refactor removal of a suspended request

2021-05-07 Thread Emanuele Giuseppe Esposito
Extract to a separate function. Do not rely on FOREACH_SAFE, which is only "safe" if the *current* node is removed---not if another node is removed. Instead, just walk the entire list from the beginning when asked to resume all suspended requests with a given tag. Co-developed-by: Paolo Bonzini

[PATCH v2 2/5] blkdebug: move post-resume handling to resume_req_by_tag

2021-05-07 Thread Emanuele Giuseppe Esposito
We want to move qemu_coroutine_yield() after the loop on rules, because QLIST_FOREACH_SAFE is wrong if the rule list is modified while the coroutine has yielded. Therefore move the suspended request to the heap and clean it up from the remove side. All that is left is for blkdebug_debug_event to h

[PATCH v2 3/5] blkdebug: track all actions

2021-05-07 Thread Emanuele Giuseppe Esposito
Add a counter for each action that a rule can trigger. This is mainly used to keep track of how many coroutine_yeld() we need to perform after processing all rules in the list. Co-developed-by: Paolo Bonzini Signed-off-by: Emanuele Giuseppe Esposito --- block/blkdebug.c | 17 -

[PATCH v2 4/5] blkdebug: do not suspend in the middle of QLIST_FOREACH_SAFE

2021-05-07 Thread Emanuele Giuseppe Esposito
That would be unsafe in case a rule other than the current one is removed while the coroutine has yielded. Keep FOREACH_SAFE because suspend_request deletes the current rule. After this patch, *all* matching rules are deleted before suspending the coroutine, rather than just one. This doesn't affe

[PATCH v2 5/5] blkdebug: protect rules and suspended_reqs with a lock

2021-05-07 Thread Emanuele Giuseppe Esposito
Co-developed-by: Paolo Bonzini Signed-off-by: Emanuele Giuseppe Esposito --- block/blkdebug.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index dffd869b32..e92a35ccbb 100644 --- a/block/blkdebug.c +++ b/

Re: [PATCH v6 1/4] slirp: Advance libslirp submodule to add ipv6 host-forward support

2021-05-07 Thread Marc-André Lureau
Hi On Thu, Apr 15, 2021 at 7:41 AM Doug Evans wrote: > 5eraph (2): > disable_dns option > limit vnameserver_addr to port 53 > > Akihiro Suda (1): > libslirp.h: fix SlirpConfig v3 documentation > > Doug Evans (11): > Add ipv6 host forward support > tcpx_listen: Pass

Re: [PATCH v6 2/4] util/qemu-sockets.c: Split host:port parsing out of inet_parse

2021-05-07 Thread Marc-André Lureau
On Thu, Apr 15, 2021 at 7:40 AM Doug Evans wrote: > The parsing is moved into new function inet_parse_host_port. > Also split out is ipv4=flag, ipv6=flag processing into inet_parse_ipv46. > This is done in preparation for using these functions in net/slirp.c. > > Signed-off-by: Doug Evans > Rev

Re: [PATCH v2 3/5] blkdebug: track all actions

2021-05-07 Thread Eric Blake
On 5/7/21 10:12 AM, Emanuele Giuseppe Esposito wrote: > Add a counter for each action that a rule can trigger. > This is mainly used to keep track of how many coroutine_yeld() yield > we need to perform after processing all rules in the list. > > Co-developed-by: Paolo Bonzini > Signed-off-by:

Re: [PATCH v2 4/5] blkdebug: do not suspend in the middle of QLIST_FOREACH_SAFE

2021-05-07 Thread Eric Blake
On 5/7/21 10:12 AM, Emanuele Giuseppe Esposito wrote: > That would be unsafe in case a rule other than the current one > is removed while the coroutine has yielded. > Keep FOREACH_SAFE because suspend_request deletes the current rule. > > After this patch, *all* matching rules are deleted before s

Re: [PATCH v3] Document qemu-img options data_file and data_file_raw

2021-05-07 Thread Max Reitz
On 05.05.21 21:55, Connor Kuehl wrote: The contents of this patch were initially developed and posted by Han Han[1], however, it appears the original patch was not applied. Since then, the relevant documentation has been moved and adapted to a new format. I've taken most of the original wording

Re: [PATCH v6 3/4] net/slirp.c: Refactor address parsing

2021-05-07 Thread Marc-André Lureau
Hi On Thu, Apr 15, 2021 at 7:44 AM Doug Evans wrote: > ... in preparation for adding ipv6 host forwarding support. > > Tested: > avocado run tests/acceptance/hostfwd.py > > Signed-off-by: Doug Evans > --- > > Changes from v5: > > Use InetSocketAddress and getaddrinfo(). > Use new libslirp calls

Re: [PATCH v2 5/5] blkdebug: protect rules and suspended_reqs with a lock

2021-05-07 Thread Eric Blake
On 5/7/21 10:12 AM, Emanuele Giuseppe Esposito wrote: > Co-developed-by: Paolo Bonzini > Signed-off-by: Emanuele Giuseppe Esposito > --- > block/blkdebug.c | 32 +++- > 1 file changed, 31 insertions(+), 1 deletion(-) > > @@ -929,11 +956,14 @@ static bool > blkdebug

Re: [PATCH] qemu-iotests: fix pylint 2.8 consider-using-with error

2021-05-07 Thread Max Reitz
On 06.05.21 10:48, Emanuele Giuseppe Esposito wrote: pylint 2.8 introduces consider-using-with error, suggesting to use the 'with' block statement when possible. http://pylint.pycqa.org/en/latest/whatsnew/2.8.html Modify all subprocess.Popen calls to use the 'with' statement, except one in __ini

  1   2   3   >