RE: [PATCH] xhci: Fix memory leak in xhci_kick_epctx when poweroff GuestOS

2020-01-10 Thread Chenqun (kuhn)
>-Original Message- >From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com] >Sent: Friday, January 10, 2020 9:14 PM >To: Chenqun (kuhn) ; qemu- >de...@nongnu.org; kra...@redhat.com >Cc: qemu-triv...@nongnu.org; Pannengyuan ; >Zhanghailiang >Subject: Re: [PATCH] xhci: Fix memory leak in

Re: [PATCH v2] Implement the Screamer sound chip for the mac99 machine type

2020-01-10 Thread Programmingkid
> On Jan 10, 2020, at 7:32 PM, Zoltán Kővágó wrote: > > On 2020-01-05 02:58, Programmingkid wrote: >> I found the patch that breaks Screamer sound support for qemu-system-ppc. It >> is this: >> commit 2ceb8240fa4e4e30fb853565eb2bed3032d74f62 >> Author: Kővágó, Zoltán >> Date: Thu Sep 19

[Bug 1859254] [NEW] host window size does not change when guest video screen size changes while moving host window

2020-01-10 Thread Benjamin David Lunt
Public bug reported: When QEMU is emulating a legacy text mode, then switches to a VESA mode, if you happen to be moving the host window while the switch is made, the host window never changes size. The emulated size does, but the host window doesn't. For example, at Legacy boot up, the screen

Re: [PATCH v2] Implement the Screamer sound chip for the mac99 machine type

2020-01-10 Thread Zoltán Kővágó
On 2020-01-05 02:58, Programmingkid wrote: I found the patch that breaks Screamer sound support for qemu-system-ppc. It is this: commit 2ceb8240fa4e4e30fb853565eb2bed3032d74f62 Author: Kővágó, Zoltán Date: Thu Sep 19 23:24:11 2019 +0200 coreaudio: port to the new audio backend api

Re: [PATCH v1 20/36] target/riscv: Add support for virtual interrupt setting

2020-01-10 Thread Palmer Dabbelt
On Wed, 08 Jan 2020 18:33:40 PST (-0800), richard.hender...@linaro.org wrote: On 1/9/20 11:49 AM, Palmer Dabbelt wrote: +    irqs = (pending & ~env->mideleg & -mie) | (pending &  env->mideleg & -sie); Isn't "-unsigned" implementation defined?  I can't get GCC to throw a warning and it was

[Bug 1856834] Re: Virtio broken in qemu ppc in 4.2.0 and other versions

2020-01-10 Thread ecsdn
Sorry for the delay, I have sent you a private message/email with the actual kernel image. thx! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1856834 Title: Virtio broken in qemu ppc in 4.2.0 and

[PATCH] target/openrisc: Fix FPCSR mask to allow setting DZF

2020-01-10 Thread Stafford Horne
The mask used when setting FPCSR allows setting bits 10 to 1. However, OpenRISC has flags and config bits in 11 to 1, 11 being Divide by Zero Flag (DZF). This seems like an off-by-one bug. This was found when testing the GLIBC test suite which has test cases to set and clear all bits.

Re: [PATCH v3 02/17] hw/arm: add Xunlong Orange Pi PC machine

2020-01-10 Thread Niek Linnenbank
On Wed, Jan 8, 2020 at 11:44 PM Philippe Mathieu-Daudé wrote: > On 1/8/20 9:00 PM, Niek Linnenbank wrote: > > The Xunlong Orange Pi PC is an Allwinner H3 System on Chip > > based embedded computer with mainline support in both U-Boot > > and Linux. The board comes with a Quad Core Cortex A7 @

[PATCH 5/6] hw/char/exynos4210_uart: Add receive DMA support

2020-01-10 Thread Guenter Roeck
To support receive DMA, we need to inform the DMA controller if receive data is available. Otherwise the DMA controller keeps requesting data, causing receive errors. Implement this using an interrupt line. The instantiating code then needs to connect the interrupt with the matching DMA

[PATCH 6/6] hw/arm/exynos4210: Connect serial port DMA busy signals with pl330

2020-01-10 Thread Guenter Roeck
The Exynos4210 serial driver uses an interrupt line to signal if receive data is available. Connect that interrupt with the DMA controller's 'peripheral busy' gpio pin. Signed-off-by: Guenter Roeck --- hw/arm/exynos4210.c | 39 ++- 1 file changed, 26

[PATCH 3/6] hw/char/exynos4210_uart: Convert to support tracing

2020-01-10 Thread Guenter Roeck
Replace debug code with tracing to aid debugging. Signed-off-by: Guenter Roeck --- hw/char/exynos4210_uart.c | 96 --- hw/char/trace-events | 17 +++ 2 files changed, 47 insertions(+), 66 deletions(-) diff --git a/hw/char/exynos4210_uart.c

[PATCH 1/6] dma/pl330: Convert to support tracing

2020-01-10 Thread Guenter Roeck
Replace debug logging code with tracing. Signed-off-by: Guenter Roeck --- hw/dma/pl330.c | 88 +++-- hw/dma/trace-events | 24 + 2 files changed, 70 insertions(+), 42 deletions(-) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index

[PATCH 2/6] hw/arm/exynos4210: Fix DMA initialization

2020-01-10 Thread Guenter Roeck
First parameter to exynos4210_get_irq() is not the SPI port number, but the interrupt group number. Interrupt groups are 20 for mdma and 21 for pdma. Interrupts are not inverted. Controllers support 32 events (pdma) or 31 events (mdma). Events must all be routed to a single interrupt line. Set

[PATCH 4/6] hw/char/exynos4210_uart: Implement receive FIFO

2020-01-10 Thread Guenter Roeck
Signed-off-by: Guenter Roeck --- hw/char/exynos4210_uart.c | 120 ++ hw/char/trace-events | 3 +- 2 files changed, 97 insertions(+), 26 deletions(-) diff --git a/hw/char/exynos4210_uart.c b/hw/char/exynos4210_uart.c index fb7a3ebd09..61134a7bdc 100644

[PATCH 0/6] Fix Exynos4210 DMA support

2020-01-10 Thread Guenter Roeck
Commit 59520dc65e ("hw/arm/exynos4210: Add DMA support for the Exynos4210") introduced DMA support for Exynos4210. Unfortunately, it never really worked. DMA interrupt line and polarity was wrong, and the serial port needs extra code to support DMA. This patch series fixes the problem.

Re: [PATCH v1 00/59] trivial unneeded labels cleanup

2020-01-10 Thread Daniel Henrique Barboza
On 1/10/20 4:05 PM, Eric Blake wrote: On 1/6/20 12:23 PM, Daniel Henrique Barboza wrote: Hello, This is the type of cleanup I've contributed to Libvirt during the last year. Figured QEMU also deserves the same care. The idea here is remove unneeded labels. By 'unneeded' I mean labels that

Re: [Xen-devel] [PATCH v6 00/11] error: auto propagated local_err part I

2020-01-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200110194158.14190-1-vsement...@virtuozzo.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Xen-devel] [PATCH v6 00/11] error: auto propagated local_err part I Type: series Message-id:

Re: [PATCH 10/21] hw/core: Fix latent fit_load_fdt() error handling bug

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
06.12.2019 13:53, Vladimir Sementsov-Ogievskiy wrote: > 06.12.2019 10:46, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> 30.11.2019 22:42, Markus Armbruster wrote: fit_load_fdt() recovers from fit_image_addr() failing with ENOENT. Except it doesn't when its

Re: [PATCH v2 1/3] tests/acceptance: avocado_qemu: Introduce the 'accel' test parameter

2020-01-10 Thread Wainer dos Santos Moschetta
Hi Thomas, On 12/18/19 4:48 PM, Thomas Huth wrote: On 18/12/2019 18.00, Wainer dos Santos Moschetta wrote: The test case may need to boot the VM with an accelerator that isn't actually enabled on the QEMU binary and/or present in the host. In this case the test behavior is undefined, and the

Re: [Qemu-devel] What should a virtual board emulate?

2020-01-10 Thread Aleksandar Markovic
8:42 PM Pet, 10.01.2020. Aleksandar Markovic је написао/ла: > > 7:45 AM Pon, 06.01.2020. Gerd Hoffmann је написао/ла: > > > > Hi, > > > > > 78c37d88f1b8b0b3ebcc632c458f0c3779fe2951 is the first bad commit > > > commit 78c37d88f1b8b0b3ebcc632c458f0c3779fe2951 > > > Author: Paolo Bonzini > > >

[PATCH v6 03/11] scripts: add coccinelle script to use auto propagated errp

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- CC: Cornelia Huck CC: Eric Blake CC: Kevin Wolf CC: Max Reitz CC: Greg Kurz CC: Stefan Hajnoczi CC: Stefano Stabellini CC: Anthony Perard CC: Paul Durrant CC: "Philippe Mathieu-Daudé" CC: Laszlo Ersek CC: Gerd Hoffmann CC: Stefan Berger

[PATCH v6 00/11] error: auto propagated local_err part I

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
Hi all! Now, when preparations from [RFC v5 000/126] error: auto propagated local_err https://lists.gnu.org/archive/html/qemu-devel/2019-10/msg02771.html https://src.openvz.org/scm/~vsementsov/qemu.git #tag up-auto-local-err-v5 , after some iterations, are finally merged, let's proceed with

Re: [Qemu-devel] What should a virtual board emulate?

2020-01-10 Thread Aleksandar Markovic
7:45 AM Pon, 06.01.2020. Gerd Hoffmann је написао/ла: > > Hi, > > > 78c37d88f1b8b0b3ebcc632c458f0c3779fe2951 is the first bad commit > > commit 78c37d88f1b8b0b3ebcc632c458f0c3779fe2951 > > Author: Paolo Bonzini > > Date: Tue Mar 19 15:37:19 2019 +0100 > > > > mips-fulong2e: obey -vga

[PATCH v6 09/11] TPM: introduce ERRP_AUTO_PROPAGATE

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v6 11/11] xen: introduce ERRP_AUTO_PROPAGATE

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v6 07/11] fw_cfg: introduce ERRP_AUTO_PROPAGATE

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v6 08/11] virtio-9p: introduce ERRP_AUTO_PROPAGATE

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v6 10/11] nbd: introduce ERRP_AUTO_PROPAGATE

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v6 02/11] error: auto propagated local_err

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of functions with errp OUT parameter. It has three goals: 1. Fix issue with error_fatal & error_prepend/error_append_hint: user can't see this additional information, because exit() happens in error_setg earlier than information

[PATCH v6 05/11] SD (Secure Card): introduce ERRP_AUTO_PROPAGATE

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v6 01/11] qapi/error: add (Error **errp) cleaning APIs

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- CC: Cornelia Huck CC: Eric Blake CC: Kevin Wolf CC: Max Reitz CC: Greg Kurz CC: Stefan Hajnoczi CC: Stefano Stabellini CC: Anthony Perard CC: Paul Durrant CC: "Philippe Mathieu-Daudé" CC: Laszlo Ersek CC: Gerd Hoffmann CC: Stefan Berger

[PATCH v6 04/11] hw/sd/ssi-sd: fix error handling in ssi_sd_realize

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
It's wrong to use same err object as errp parameter for several function calls without intermediate checking for error: we'll crash if try to set err object twice. Fix that, using new ERRP_AUTO_PROPAGATE macro. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/sd/ssi-sd.c | 26

[PATCH v6 06/11] pflash: introduce ERRP_AUTO_PROPAGATE

2020-01-10 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

Re: [PATCH] block: Use a GString in bdrv_perm_names()

2020-01-10 Thread Eric Blake
On 1/10/20 11:15 AM, Alberto Garcia wrote: This is a bit more efficient than having to allocate and free memory for each new permission. The default size (30) is enough for "consistent read, write, resize". Signed-off-by: Alberto Garcia --- block.c | 11 ++- 1 file changed, 6

Re: [PATCH 18/26] object: return self in object_ref()

2020-01-10 Thread Philippe Mathieu-Daudé
On 1/10/20 4:30 PM, Marc-André Lureau wrote: This allow for simpler assignment with ref: foo = object_ref(bar) Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- include/qom/object.h | 3 ++- qom/object.c | 5 +++-- 2 files changed, 5 insertions(+), 3

Re: [PATCH] target/arm: adjust program counter for wfi exception in AArch32

2020-01-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200110180211.29025-1-jeff.kubas...@dornerworks.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] target/arm: adjust program counter for wfi exception in AArch32 Type: series

Re: [PATCH 04/15] hw/ppc/spapr_rtas: Restrict variables scope to single switch case

2020-01-10 Thread Eric Blake
On 1/10/20 3:50 AM, Greg Kurz wrote: I guess a decent compiler can be smart enough detect that the initialization isn't needed outside of the RTAS_SYSPARM_SPLPAR_CHARACTERISTICS branch... Anyway, reducing scope isn't bad. The only hitch I could see is that some people do prefer to have all

Re: [PATCH 04/26] qdev: move helper function to monitor/misc

2020-01-10 Thread Philippe Mathieu-Daudé
On 1/10/20 4:30 PM, Marc-André Lureau wrote: Move the one-user function to the place it is being used. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- include/hw/qdev-core.h | 2 -- hw/core/qdev.c | 26 -- monitor/misc.c

Re: [PATCH 01/26] object: add extra sanity checks

2020-01-10 Thread Philippe Mathieu-Daudé
On 1/10/20 4:30 PM, Marc-André Lureau wrote: Type system checked that children class_size >= parent class_size, but not instances. Fix that. Signed-off-by: Marc-André Lureau --- qom/object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qom/object.c b/qom/object.c index

[PATCH 0/1] travis.yml: Missing genisoimage package

2020-01-10 Thread Wainer dos Santos Moschetta
Let's install genisoimage package on Travis build environments so that the cdrom-test tests run (currently they skip due the missing dependency). As an example, on https://travis-ci.org/qemu/qemu/jobs/635375718: ``` MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))}

[PATCH 1/1] travis.yml: Install genisoimage package

2020-01-10 Thread Wainer dos Santos Moschetta
The genisoimage program is required for tests/cdrom-test tests, otherwise they are skipped. The current Travis environments do not provide it by default, so let's explicitly require the genisoimage package. Signed-off-by: Wainer dos Santos Moschetta --- .travis.yml | 8 1 file changed,

Re: [PATCH v1 00/59] trivial unneeded labels cleanup

2020-01-10 Thread Eric Blake
On 1/6/20 12:23 PM, Daniel Henrique Barboza wrote: Hello, This is the type of cleanup I've contributed to Libvirt during the last year. Figured QEMU also deserves the same care. The idea here is remove unneeded labels. By 'unneeded' I mean labels that does nothing but a 'return' call. One

Re: [PATCH 1/4] qapi: Add a 'coroutine' flag for commands

2020-01-10 Thread Eric Blake
On 1/9/20 12:35 PM, Kevin Wolf wrote: This patch adds a new 'coroutine' flag to QMP command definitions that tells the QMP dispatcher than the command handler is safe to be run in a s/than/that/ coroutine. Signed-off-by: Kevin Wolf --- tests/qapi-schema/qapi-schema-test.json | 1 +

Re: How to tell DMA controller in qemu to terminate transfer ?

2020-01-10 Thread Guenter Roeck
On Fri, Jan 10, 2020 at 10:36:20AM +, Peter Maydell wrote: > On Wed, 8 Jan 2020 at 18:36, Guenter Roeck wrote: > > > > Hi, > > > > I am trying to fix DMA support with Exynos4210. The original commit > > 59520dc65e ("hw/arm/exynos4210: Add DMA support for the Exynos4210") doesn't > > really

[PATCH] target/arm: adjust program counter for wfi exception in AArch32

2020-01-10 Thread Jeff Kubascik
The wfi instruction can be configured to be trapped by a higher exception level, such as the EL2 hypervisor. When the instruction is trapped, the program counter should contain the address of the wfi instruction that caused the exception. The program counter is adjusted for this in the wfi op

[PULL 28/28] apic: Use 32bit APIC ID for migration instance ID

2020-01-10 Thread Juan Quintela
From: Peter Xu Migration is silently broken now with x2apic config like this: -smp 200,maxcpus=288,sockets=2,cores=72,threads=2 \ -device intel-iommu,intremap=on,eim=on After migration, the guest kernel could hang at anything, due to x2apic bit not migrated correctly in

[PULL 24/28] migration/multifd: fix destroyed mutex access in terminating multifd threads

2020-01-10 Thread Juan Quintela
From: Jiahui Cen One multifd will lock all the other multifds' IOChannel mutex to inform them to quit by setting p->quit or shutting down p->c. In this senario, if some multifds had already been terminated and multifd_load_cleanup/multifd_save_cleanup had destroyed their mutex, it could cause

[PULL 22/28] migration/multifd: not use multifd during postcopy

2020-01-10 Thread Juan Quintela
From: Wei Yang We don't support multifd during postcopy, but user still could enable both multifd and postcopy. This leads to migration failure. Skip multifd during postcopy. Signed-off-by: Wei Yang Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 9 ++---

[PULL 27/28] migration: Change SaveStateEntry.instance_id into uint32_t

2020-01-10 Thread Juan Quintela
From: Peter Xu It was always used as 32bit, so define it as used to be clear. Instead of using -1 as the auto-gen magic value, we switch to UINT32_MAX. We also make sure that we don't auto-gen this value to avoid overflowed instance IDs without being noticed. Suggested-by: Juan Quintela

[PULL 18/28] migration/postcopy: set all_zero to true on the first target page

2020-01-10 Thread Juan Quintela
From: Wei Yang For the first target page, all_zero is set to true for this round check. After target_pages introduced, we could leverage this variable instead of checking the address offset. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

[PULL 26/28] migration: Define VMSTATE_INSTANCE_ID_ANY

2020-01-10 Thread Juan Quintela
From: Peter Xu Define the new macro VMSTATE_INSTANCE_ID_ANY for callers who wants to auto-generate the vmstate instance ID. Previously it was hard coded as -1 instead of this macro. It helps to change this default value in the follow up patches. No functional change. Signed-off-by: Peter Xu

[PULL 15/28] migration/postcopy: reduce memset when it is zero page and matches_target_page_size

2020-01-10 Thread Juan Quintela
From: Wei Yang In this case, page_buffer content would not be used. Skip this to save some time. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 8 +++- 1 file changed, 7 insertions(+), 1

[PULL 25/28] Bug #1829242 correction.

2020-01-10 Thread Juan Quintela
From: Alexey Romko Added type conversions to ram_addr_t before all left shifts of page indexes to TARGET_PAGE_BITS, to correct overflows when the page address was 4Gb and more. Signed-off-by: Alexey Romko Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Juan

[PULL 23/28] migration/multifd: fix nullptr access in terminating multifd threads

2020-01-10 Thread Juan Quintela
From: Jiahui Cen One multifd channel will shutdown all the other multifd's IOChannel when it fails to receive an IOChannel. In this senario, if some multifds had not received its IOChannel yet, it would try to shutdown its IOChannel which could cause nullptr access at qio_channel_shutdown. Here

[PULL 19/28] migration/postcopy: enable random order target page arrival

2020-01-10 Thread Juan Quintela
From: Wei Yang After using number of target page received to track one host page, we could have the capability to handle random order target page arrival in one host page. This is a preparation for enabling compress during postcopy. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert

[PULL 21/28] migration/multifd: clean pages after filling packet

2020-01-10 Thread Juan Quintela
From: Wei Yang This is a preparation for the next patch: not use multifd during postcopy. Without enabling postcopy, everything looks good. While after enabling postcopy, migration may fail even not use multifd during postcopy. The reason is the pages is not properly cleared and *old*

[PULL 20/28] migration/postcopy: enable compress during postcopy

2020-01-10 Thread Juan Quintela
From: Wei Yang postcopy requires to place a whole host page, while migration thread migrate memory in target page size. This makes postcopy need to collect all target pages in one host page before placing via userfaultfd. To enable compress during postcopy, there are two problems to solve:

[PULL 09/28] migration: Fix incorrect integer->float conversion caught by clang

2020-01-10 Thread Juan Quintela
From: Fangrui Song Clang does not like qmp_migrate_set_downtime()'s code to clamp double @value to 0..INT64_MAX: qemu/migration/migration.c:2038:24: error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808

[PULL 17/28] migration/postcopy: count target page number to decide the place_needed

2020-01-10 Thread Juan Quintela
From: Wei Yang In postcopy, it requires to place whole host page instead of target page. Currently, it relies on the page offset to decide whether this is the last target page. We also can count the target page number during the iteration. When the number of target page equals (host page size /

[PULL 16/28] migration/postcopy: wait for decompress thread in precopy

2020-01-10 Thread Juan Quintela
From: Wei Yang Compress is not supported with postcopy, it is safe to wait for decompress thread just in precopy. This is a preparation for later patch. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c

[PULL 10/28] migration: Fix the re-run check of the migrate-incoming command

2020-01-10 Thread Juan Quintela
From: Yury Kotov The current check sets an error but doesn't fail the command. This may cause a problem if new connection attempt by the same URI affects the first connection. Signed-off-by: Yury Kotov Reviewed-by: Juan Quintela Reviewed-by: Darren Kenny Signed-off-by: Juan Quintela ---

[PULL 08/28] migration: Support QLIST migration

2020-01-10 Thread Juan Quintela
From: Eric Auger Support QLIST migration using the same principle as QTAILQ: 94869d5c52 ("migration: migrate QTAILQ"). The VMSTATE_QLIST_V macro has the same proto as VMSTATE_QTAILQ_V. The change mainly resides in QLIST RAW macros: QLIST_RAW_INSERT_HEAD and QLIST_RAW_REVERSE. Tests also are

[PULL 14/28] migration/ram: Yield periodically to the main loop

2020-01-10 Thread Juan Quintela
From: Yury Kotov Usually, incoming migration coroutine yields to the main loop while its IO-channel is waiting for data to receive. But there is a case when RAM migration and data receive have the same speed: VM with huge zeroed RAM. In this case, IO-channel won't read and thus the main loop is

[PULL 11/28] misc: use QEMU_IS_ALIGNED

2020-01-10 Thread Juan Quintela
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Berger Reviewed-by: Paolo Bonzini Signed-off-by: Juan Quintela --- exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PULL 12/28] migration: add savevm_state_handler_remove()

2020-01-10 Thread Juan Quintela
From: Scott Cheloha Create a function to abstract common logic needed when removing a SaveStateEntry element from the savevm_state.handlers queue. For now we just remove the element. Soon it will involve additional cleanup. Signed-off-by: Scott Cheloha Reviewed-by: Dr. David Alan Gilbert

[PULL 06/28] ram.c: remove unneeded labels

2020-01-10 Thread Juan Quintela
From: Daniel Henrique Barboza ram_save_queue_pages() has an 'err' label that can be replaced by 'return -1' instead. Same thing with ram_discard_range(), and in this case we can also get rid of the 'ret' variable and return either '-1' on error or the result of ram_block_discard_range(). CC:

[PULL 13/28] migration: savevm_state_handler_insert: constant-time element insertion

2020-01-10 Thread Juan Quintela
From: Scott Cheloha savevm_state's SaveStateEntry TAILQ is a priority queue. Priority sorting is maintained by searching from head to tail for a suitable insertion spot. Insertion is thus an O(n) operation. If we instead keep track of the head of each priority's subqueue within that larger

[PULL 07/28] migration: Rate limit inside host pages

2020-01-10 Thread Juan Quintela
From: "Dr. David Alan Gilbert" When using hugepages, rate limiting is necessary within each huge page, since a 1G huge page can take a significant time to send, so you end up with bursty behaviour. Fixes: 4c011c37ecb3 ("postcopy: Send whole huge pages") Reported-by: Lin Ma Signed-off-by: Dr.

[PULL 02/28] migration: Make sure that we don't call write() in case of error

2020-01-10 Thread Juan Quintela
If we are exiting due to an error/finish/ Just don't try to even touch the channel with one IO operation. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 25 + 1 file changed, 25 insertions(+) diff --git a/migration/ram.c

[PULL 03/28] migration-test: introduce functions to handle string parameters

2020-01-10 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- tests/migration-test.c | 37 + 1 file changed, 37 insertions(+) diff --git a/tests/migration-test.c b/tests/migration-test.c index fb70214f44..b0580dd541 100644 --- a/tests/migration-test.c

[PULL 05/28] runstate: ignore finishmigrate -> prelaunch transition

2020-01-10 Thread Juan Quintela
From: Laurent Vivier Commit 1bd71dce4bf2 tries to prevent a finishmigrate -> prelaunch transition by exiting at the beginning of the main_loop_should_exit() function if the state is already finishmigrate. As the finishmigrate state is set in the migration thread it can happen concurrently to

[PULL 04/28] migration-test: ppc64: fix FORTH test program

2020-01-10 Thread Juan Quintela
From: Laurent Vivier Commit e51e711b1bef has moved the initialization of start_address and end_address after the definition of the command line argument, where the nvramrc is initialized, and thus the loop is between 0 and 0 rather than 1 MiB and 100 MiB. It doesn't affect the result of the

[PULL 01/28] migration-test: Add migration multifd test

2020-01-10 Thread Juan Quintela
We set multifd-channels. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Thomas Huth Tested-by: Wei Yang --- tests/migration-test.c | 56 ++ 1 file changed, 56 insertions(+) diff --git a/tests/migration-test.c

[PULL 00/28] Migration pull patches

2020-01-10 Thread Juan Quintela
The following changes since commit f38a71b01f839c7b65ea73ddd507903cb9489ed6: Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-and-semihosting-090120-2' into staging (2020-01-10 13:19:34 +) are available in the Git repository at: https://github.com/juanquintela/qemu.git

Re: [PULL 00/26] ppc-for-5.0 queue 20200108

2020-01-10 Thread Peter Maydell
On Wed, 8 Jan 2020 at 05:23, David Gibson wrote: > > The following changes since commit 035eed4c0d257c905a556fa0f4865a0c077b4e7f: > > Merge remote-tracking branch > 'remotes/vivier/tags/q800-for-5.0-pull-request' into staging (2020-01-07 > 17:08:21 +) > > are available in the Git

[PATCH] block: Use a GString in bdrv_perm_names()

2020-01-10 Thread Alberto Garcia
This is a bit more efficient than having to allocate and free memory for each new permission. The default size (30) is enough for "consistent read, write, resize". Signed-off-by: Alberto Garcia --- block.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/block.c

Re: [PATCH 66/86] ppc:ppc440_bamboo/sam460ex: drop RAM size fixup

2020-01-10 Thread Igor Mammedov
On Thu, 2 Jan 2020 16:52:50 +0100 (CET) BALATON Zoltan wrote: > On Thu, 2 Jan 2020, Igor Mammedov wrote: > > On Wed, 1 Jan 2020 12:54:37 +0100 (CET) > > BALATON Zoltan wrote: > >> On Tue, 31 Dec 2019, Igor Mammedov wrote: > >>> If user provided non-sense RAM size, board will complain and >

Re: [PATCH] virtio: Prevent double swap due to target pre 1.0 VirtIO

2020-01-10 Thread André Silva
> Unrelated, -enable-kvm isn't needed since... Thanks. > Could you try your patch against master with if=virtio and the > -global above ? There you go! I got the same error as you! This looks like the only case that makes slof complain. If I use virtio-blk without the -global option slof works

Re: [PULL 0/3] capstone update

2020-01-10 Thread Peter Maydell
On Fri, 10 Jan 2020 at 16:07, Peter Maydell wrote: > > On Wed, 8 Jan 2020 at 04:23, Richard Henderson > wrote: > > > > The following changes since commit 035eed4c0d257c905a556fa0f4865a0c077b4e7f: > > > > Merge remote-tracking branch > > 'remotes/vivier/tags/q800-for-5.0-pull-request' into

Re: [PATCH 0/4] buildsys: Build quicker (mostly tools and linux-user)

2020-01-10 Thread Philippe Mathieu-Daudé
On 1/10/20 3:03 PM, Laurent Vivier wrote: Le 10/01/2020 à 10:17, Philippe Mathieu-Daudé a écrit : Le ven. 10 janv. 2020 09:36, Laurent Vivier mailto:laur...@vivier.eu>> a écrit : Le 09/01/2020 à 16:39, Philippe Mathieu-Daudé a écrit : > In some configuration (linux-user, tools) we

Re: [PATCH v2 4/4] migration: Check in savevm_state_handler_insert for dups

2020-01-10 Thread Juan Quintela
Peter Xu wrote: > Before finally register one SaveStateEntry, we detect for duplicated > entries. This could be helpful to notify us asap instead of get > silent migration failures which could be hard to diagnose. > > For example, this patch will generate a message like this (if without >

[Bug 1859081] Re: Mouse way too fast when Qemu is on a Windows VM with a OS 9 Guest

2020-01-10 Thread Roman Bäriswyl
The command line I currently use is: ".\qemu-4.2.0-win64\qemu-system-ppc.exe" -L pc-bios -boot c -M mac99,via=pmu -m 512 ^ -prom-env "auto-boot?=true" -prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" ^ -drive file=c:\qemu\MacOS9.2.img,format=raw,media=disk ^ -drive

[PATCH v1 2/2] tests/tcg: add a vtimer test for aarch64

2020-01-10 Thread Alex Bennée
Bug: https://bugs.launchpad.net/bugs/1859021 Signed-off-by: Alex Bennée --- tests/tcg/aarch64/system/vtimer.c | 80 +++ tests/tcg/aarch64/Makefile.softmmu-target | 4 ++ 2 files changed, 84 insertions(+) create mode 100644 tests/tcg/aarch64/system/vtimer.c diff

[PATCH v1 1/2] target/arm: detect 64 bit overflow caused by high cval + voff

2020-01-10 Thread Alex Bennée
If we don't detect this we will be stuck in a busy loop as we schedule a timer for before now which will continually trigger gt_recalc_timer even though we haven't reached the state required to trigger the IRQ. Bug: https://bugs.launchpad.net/bugs/1859021 Cc: 1859...@bugs.launchpad.net

[PATCH v1 0/2] fix for bug 1859021

2020-01-10 Thread Alex Bennée
Hi, This is a fairly trivial fix for a uint64_t overflow however I spent some time making sure I understood why we got stuck in a busy loop and adding tests to both tcg and kvm-unit-tests. Alex Bennée (2): target/arm: detect 64 bit overflow caused by high cval + voff tests/tcg: add a vtimer

Re: [PULL 0/3] capstone update

2020-01-10 Thread Peter Maydell
On Wed, 8 Jan 2020 at 04:23, Richard Henderson wrote: > > The following changes since commit 035eed4c0d257c905a556fa0f4865a0c077b4e7f: > > Merge remote-tracking branch > 'remotes/vivier/tags/q800-for-5.0-pull-request' into staging (2020-01-07 > 17:08:21 +) > > are available in the Git

Re: [PATCH 014/104] virtiofsd: Add options for virtio

2020-01-10 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Dec 12, 2019 at 04:37:34PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Add options to specify parameters for virtio-fs paths, i.e. > > > >./virtiofsd -o vhost_user_socket=/tmp/vhostqemu > >

Re: [PATCH 068/104] virtiofsd: passthrough_ll: control readdirplus

2020-01-10 Thread Miklos Szeredi
On Fri, Jan 10, 2020 at 4:40 PM Vivek Goyal wrote: > > On Fri, Jan 10, 2020 at 04:30:01PM +0100, Miklos Szeredi wrote: > > On Fri, Jan 10, 2020 at 4:18 PM Daniel P. Berrangé > > wrote: > > > > > > On Fri, Jan 10, 2020 at 04:13:08PM +0100, Miklos Szeredi wrote: > > > > On Fri, Jan 10, 2020 at

Re: [PULL 00/41] tcg patch queue

2020-01-10 Thread Peter Maydell
On Wed, 8 Jan 2020 at 03:45, Richard Henderson wrote: > > The following changes since commit 035eed4c0d257c905a556fa0f4865a0c077b4e7f: > > Merge remote-tracking branch > 'remotes/vivier/tags/q800-for-5.0-pull-request' into staging (2020-01-07 > 17:08:21 +) > > are available in the Git

Re: [PATCH 00/26] Various qom & qdev enhancements

2020-01-10 Thread Marc-André Lureau
Hi Something went wrong with git-publish & "git branch --edit-description" interaction (which I started to play with - I think git-publish should make use of it). It seems it got the mail summary from git-publish and content from git description, fun :) On Fri, Jan 10, 2020 at 7:31 PM

[PATCH 26/26] qdev: use object_property_help()

2020-01-10 Thread Marc-André Lureau
Use the common function introduced earlier, and report default value. Signed-off-by: Marc-André Lureau --- qdev-monitor.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/qdev-monitor.c b/qdev-monitor.c index 3465a1e2d0..0f83770e02 100644 --- a/qdev-monitor.c

[PATCH 25/26] qapi/qmp: add ObjectPropertyInfo.default-value

2020-01-10 Thread Marc-André Lureau
Report the default value associated with a property. Signed-off-by: Marc-André Lureau --- qapi/qom.json | 7 ++- qom/qom-qmp-cmds.c | 4 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/qapi/qom.json b/qapi/qom.json index 32db96ffc4..471e4b484b 100644 ---

[PATCH 23/26] qom: simplify qmp_device_list_properties()

2020-01-10 Thread Marc-André Lureau
All qdev properties are object properties, no need for make_device_property_info() helper. Signed-off-by: Marc-André Lureau --- qom/qom-qmp-cmds.c | 52 +- 1 file changed, 5 insertions(+), 47 deletions(-) diff --git a/qom/qom-qmp-cmds.c

[PATCH 18/26] object: return self in object_ref()

2020-01-10 Thread Marc-André Lureau
This allow for simpler assignment with ref: foo = object_ref(bar) Signed-off-by: Marc-André Lureau --- include/qom/object.h | 3 ++- qom/object.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index

[PATCH 16/26] object: add object_class_property_add_link()

2020-01-10 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/qom/object.h | 9 + qom/object.c | 46 +++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/include/qom/object.h b/include/qom/object.h index 5b02be68ec..ead9129ac8 100644 ---

[PATCH 14/26] object: add direct link flag

2020-01-10 Thread Marc-André Lureau
Allow the link property to hold the pointer to the target, instead of indirectly through another variable. Signed-off-by: Marc-André Lureau --- include/qom/object.h | 3 +++ qom/object.c | 26 -- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 068/104] virtiofsd: passthrough_ll: control readdirplus

2020-01-10 Thread Vivek Goyal
On Fri, Jan 10, 2020 at 04:30:01PM +0100, Miklos Szeredi wrote: > On Fri, Jan 10, 2020 at 4:18 PM Daniel P. Berrangé > wrote: > > > > On Fri, Jan 10, 2020 at 04:13:08PM +0100, Miklos Szeredi wrote: > > > On Fri, Jan 10, 2020 at 4:04 PM Dr. David Alan Gilbert > > > wrote: > > > > > > > > *

[PATCH 13/26] object: rename link "child" to "target"

2020-01-10 Thread Marc-André Lureau
A child property is a different kind of property. Let's use "target" for the link target. Signed-off-by: Marc-André Lureau --- include/qom/object.h | 4 ++-- qom/object.c | 24 2 files changed, 14 insertions(+), 14 deletions(-) diff --git

Re: [PATCH 062/104] virtiofsd: Handle hard reboot

2020-01-10 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Dec 12, 2019 at 04:38:22PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Handle a > > mount > > hard reboot (without unmount) > > mount > > > > we get another 'init' which FUSE doesn't

[PATCH 22/26] vl: print default value in object help

2020-01-10 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- qom/object_interfaces.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c index 46cd6eab5c..edb4cc4a3d 100644 --- a/qom/object_interfaces.c +++ b/qom/object_interfaces.c @@ -185,6 +185,7 @@ bool

  1   2   3   >