[PATCH v2 1/2] vnc: fix VNC artifacts

2020-01-20 Thread Cameron Esfahani via
Patch de3f7de7f4e257ce44cdabb90f5f17ee99624557 was too simplistic in its implementation: it didn't account for the ZLIB z_stream mutating with each compression. Because of the mutation, simply resetting the output buffer's offset wasn't sufficient to "rewind" the operation. The mutated z_stream

Re: [PATCH qemu v5] spapr: Kill SLOF

2020-01-20 Thread David Gibson
On Fri, Jan 10, 2020 at 01:09:25PM +1100, Alexey Kardashevskiy wrote: > The Petitboot bootloader is way more advanced than SLOF is ever going to > be as Petitboot comes with the full-featured Linux kernel with all > the drivers, and initramdisk with quite user friendly interface. > The problem

[PATCH v2 2/2] vnc: prioritize ZRLE compression over ZLIB

2020-01-20 Thread Cameron Esfahani via
In my investigation, ZRLE always compresses better than ZLIB so prioritize ZRLE over ZLIB, even if the client hints that ZLIB is preferred. zlib buffer is always reset in zrle_compress_data(), so using offset to calculate next_out and avail_out is useless. Signed-off-by: Cameron Esfahani ---

[PATCH v2 0/2] vnc: fix VNC artifacts

2020-01-20 Thread Cameron Esfahani via
Remove VNC optimization to reencode framebuffer update as raw if it's smaller than the default encoding. QEMU's implementation was naive and didn't account for the ZLIB z_stream mutating with each compression. Just saving and restoring the output buffer offset wasn't sufficient to "rewind" the

Re: Making QEMU easier for management tools and applications

2020-01-20 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Wed, Jan 15, 2020 at 01:15:17PM +0100, Markus Armbruster wrote: >> Christophe de Dinechin writes: >> >> On 15 Jan 2020, at 10:20, Markus Armbruster wrote: >> * qemuMonitorJSONSetIOThread() uses it to control iothread's properties >> poll-max-ns, poll-grow,

[PATCH v1 1/1] target/riscv: Correctly implement TSR trap

2020-01-20 Thread Alistair Francis
As reported in: https://bugs.launchpad.net/qemu/+bug/1851939 we weren't correctly handling illegal instructions based on the value of MSTATUS_TSR and the current privledge level. This patch fixes the issue raised in the bug by raising an illegal instruction if TSR is set and we are in S-Mode.

Re: [RFC PATCH] qapi: Incorrect attempt to fix building with MC146818RTC=n

2020-01-20 Thread Markus Armbruster
Paolo Bonzini writes: > On 13/01/20 15:01, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> When configured with --without-default-devices and setting >>> MC146818RTC=n, the build fails: >>> >>> LINKx86_64-softmmu/qemu-system-x86_64 >>> /usr/bin/ld:

Re: [PATCH 3/3] hw/display/qxl.c: Use trace_event_get_state_backends()

2020-01-20 Thread Gerd Hoffmann
On Mon, Jan 20, 2020 at 03:11:42PM +, Peter Maydell wrote: > The preferred way to test whether a trace event is enabled is to > use trace_event_get_state_backends(), because this will give the > correct answer (allowing expensive computations to be skipped) > whether the trace event is

Re: [PATCH v4 15/18] tests/boot-serial-test: Test some Arduino boards (AVR based)

2020-01-20 Thread Thomas Huth
On 20/01/2020 23.01, Philippe Mathieu-Daudé wrote: > The Arduino Duemilanove is based on a AVR5 CPU, while the > Arduino MEGA2560 on a AVR6 CPU. > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/qtest/boot-serial-test.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git

[virtio-dev] [PATCH v2 0/5] virtio-mmio enhancement

2020-01-20 Thread Jing Liu
The current virtio over MMIO has some limitations that impact the performance. It only supports single legacy, dedicated interrupt and one virtqueue notification register for all virtqueues which cause performance penalties. To address such limitations, we proposed to update virtio-mmio spec with

[virtio-dev] [PATCH v2 1/5] virtio-mmio: Add feature bit for MMIO notification

2020-01-20 Thread Jing Liu
All the queues notifications use the same register on MMIO transport layer. Add a feature bit (39) for enhancing the notification capability. The detailed mechanism would be in next patch. Co-developed-by: Chao Peng Signed-off-by: Chao Peng Co-developed-by: Liu Jiang Signed-off-by: Liu Jiang

[virtio-dev] [PATCH v2 3/5] virtio-mmio: Add feature bit for MMIO MSI

2020-01-20 Thread Jing Liu
The current MMIO transport layer uses a single, dedicated interrupt signal, which brings performance penalty. Add a feature bit (40) for introducing MSI capability. Co-developed-by: Chao Peng Signed-off-by: Chao Peng Co-developed-by: Liu Jiang Signed-off-by: Liu Jiang Co-developed-by: Zha Bin

[virtio-dev] [PATCH v2 2/5] virtio-mmio: Enhance queue notification support

2020-01-20 Thread Jing Liu
With VIRTIO_F_MMIO_NOTIFICATION feature bit offered, the notification mechanism is enhanced. Driver reads QueueNotify register to get notification structure and calculate notification addresses of each virtqueue. Co-developed-by: Chao Peng Signed-off-by: Chao Peng Co-developed-by: Liu Jiang

[virtio-dev] [PATCH v2 5/5] virtio-mmio: MSI vector and event mapping

2020-01-20 Thread Jing Liu
Bit 1 msi_sharing reported in the MsiState register indicates the mapping mode device uses. Bit 1 is 0 - device uses MSI non-sharing mode. This indicates vector per event and fixed static vectors and events relationship. This fits for devices with a high interrupt rate and best performance; Bit

[virtio-dev] [PATCH v2 4/5] virtio-mmio: Introduce MSI details

2020-01-20 Thread Jing Liu
With VIRTIO_F_MMIO_MSI feature bit offered, the Message Signal Interrupts (MSI) is supported as first priority. For any reason it fails to use MSI, it need use the single dedicated interrupt as before. For MSI vectors and events mapping relationship, introduce in next patch. Co-developed-by:

Re: [PATCH v2 1/2] vnc: fix VNC artifacts

2020-01-20 Thread Gerd Hoffmann
On Mon, Jan 20, 2020 at 09:00:51PM -0800, Cameron Esfahani wrote: > Patch de3f7de7f4e257ce44cdabb90f5f17ee99624557 was too simplistic in its > implementation: it didn't account for the ZLIB z_stream mutating with > each compression. Because of the mutation, simply resetting the output > buffer's

Re: [PATCH] ui/console: Display the 'none' backend in '-display help'

2020-01-20 Thread Gerd Hoffmann
On Mon, Jan 20, 2020 at 08:29:47PM +0100, Philippe Mathieu-Daudé wrote: > Commit c388f408b5 added the possibility to list the display > backends using '-display help'. Since the 'none' backend is > is not implemented as a DisplayChangeListenerOps, it is not > registered to the dpys[] array with

Re: [PATCH 1/2] arm/virt/acpi: remove meaningless sub device "PR0" from PCI0

2020-01-20 Thread Michael S. Tsirkin
On Mon, Jan 13, 2020 at 01:37:02PM +0100, Igor Mammedov wrote: > On Thu, 19 Dec 2019 14:47:58 +0800 > Heyi Guo wrote: > > > The sub device "PR0" under PCI0 in ACPI/DSDT does not make any sense, > > so simply remote it. > Could you make commit message more concrete so it would say > why it

Re: Proposal for handling .hx files with Sphinx

2020-01-20 Thread Markus Armbruster
John Snow writes: > On 1/17/20 12:30 PM, Peter Maydell wrote: >> Currently our manual creation includes some .texi files which >> are autogenerated from .hx files by running scripts/hxtool. >> .hx files are a simple format, where where a line is either a >> directive or literal text to be

Re: [PATCH 016/104] virtiofsd: Open vhost connection instead of mounting

2020-01-20 Thread Misono Tomohiro
> From: "Dr. David Alan Gilbert" > > When run with vhost-user options we conect to the QEMU instead > via a socket. Start this off by creating the socket. > > Signed-off-by: Dr. David Alan Gilbert > --- > +/* > + * Poison the fuse FD so we spot if we accidentally use it; > + *

Re: [PATCH v4 5/7] tests/boot_linux_console: Test booting U-Boot on the Raspberry Pi 2

2020-01-20 Thread Gerd Hoffmann
On Tue, Jan 21, 2020 at 12:51:57AM +0100, Philippe Mathieu-Daudé wrote: > This test runs U-Boot on the Raspberry Pi 2. > U-Boot is built by the Debian project, see: > https://wiki.debian.org/InstallingDebianOn/Allwinner#Creating_a_bootable_SD_Card_with_u-boot We already have a u-boot submodule

Re: [PATCH] spapr: Migrate CAS reboot flag

2020-01-20 Thread Cédric Le Goater
On 1/21/20 4:41 AM, David Gibson wrote: > On Wed, Jan 15, 2020 at 07:10:47PM +0100, Cédric Le Goater wrote: >> On 1/15/20 6:48 PM, Greg Kurz wrote: >>> Migration can potentially race with CAS reboot. If the migration thread >>> completes migration after CAS has set spapr->cas_reboot but before the

Re: [PATCH 2/2] aspeed/scu: Implement chip ID register

2020-01-20 Thread Cédric Le Goater
On 1/21/20 2:33 AM, Joel Stanley wrote: > This returns a fixed but non-zero value for the chip id. > > Signed-off-by: Joel Stanley Reviewed-by: Cédric Le Goater > --- > hw/misc/aspeed_scu.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/hw/misc/aspeed_scu.c

Re: [PATCH 0/2] aspeed/scu: Implement chip id register

2020-01-20 Thread Cédric Le Goater
On 1/21/20 2:33 AM, Joel Stanley wrote: > This implements the chip id register in the SCU for the ast2500 and > ast2600. The first patch is a cleanup to separate out ast2400 and > ast2500 functionality. These patches apply cleanly on top of : [v3,0/5] aspeed: extensions and fixes

Re: [PATCH 1/2] aspeed/scu: Create separate write callbacks

2020-01-20 Thread Cédric Le Goater
On 1/21/20 2:33 AM, Joel Stanley wrote: > This splits the common write callback into separate ast2400 and ast2500 > implementations. This makes it clearer when implementing differing > behaviour. > > Signed-off-by: Joel Stanley Reviewed-by: Cédric Le Goater > --- > hw/misc/aspeed_scu.c | 80

Re: [PATCH qemu v5] spapr: Kill SLOF

2020-01-20 Thread Alexey Kardashevskiy
On 21/01/2020 16:11, David Gibson wrote: > On Fri, Jan 10, 2020 at 01:09:25PM +1100, Alexey Kardashevskiy wrote: >> The Petitboot bootloader is way more advanced than SLOF is ever going to >> be as Petitboot comes with the full-featured Linux kernel with all >> the drivers, and initramdisk with

Re: [PATCH 1/2] qdev: Introduce qdev_get_bus_device

2020-01-20 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Julia, > > Cc'ing Markus for the qdev/qbus analysis. > > On 1/15/20 11:40 PM, Julia Suvorova wrote: >> For bus devices, it is useful to be able to handle the parent device. >> >> Signed-off-by: Julia Suvorova >> --- >> hw/core/qdev.c |

Re: [PATCH] spapr: Migrate CAS reboot flag

2020-01-20 Thread Greg Kurz
On Tue, 21 Jan 2020 14:41:26 +1100 David Gibson wrote: > On Wed, Jan 15, 2020 at 07:10:47PM +0100, Cédric Le Goater wrote: > > On 1/15/20 6:48 PM, Greg Kurz wrote: > > > Migration can potentially race with CAS reboot. If the migration thread > > > completes migration after CAS has set

Re: [PATCH 02/13] qcrypto-luks: implement encryption key management

2020-01-20 Thread Markus Armbruster
Reviewing just the QAPI schema. Maxim Levitsky writes: > Next few patches will expose that functionality > to the user. > > Signed-off-by: Maxim Levitsky > --- > crypto/block-luks.c | 374 +++- > qapi/crypto.json| 50 +- > 2 files changed, 421

Re: [PATCH] spapr: Migrate CAS reboot flag

2020-01-20 Thread Greg Kurz
On Fri, 17 Jan 2020 16:44:27 +0100 Greg Kurz wrote: > On Fri, 17 Jan 2020 19:16:08 +1000 > David Gibson wrote: > > > On Thu, Jan 16, 2020 at 07:29:02PM +0100, Greg Kurz wrote: > > > On Thu, 16 Jan 2020 13:14:35 +0100 > > > Greg Kurz wrote: > > > > > > > On Thu, 16 Jan 2020 11:37:24 +0100 > >

Re: [PATCH] riscv: Fix defination of TW bits in mstatus CSR

2020-01-20 Thread Alistair Francis
On Mon, Jan 20, 2020 at 6:59 PM Ian Jiang wrote: > > The origin defination of TW bits in mstatus is not correct. > This patch fixes the problem. > > Signed-off-by: Ian Jiang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu_bits.h | 2 +- > 1 file changed, 1 insertion(+), 1

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

2020-01-20 Thread Markus Armbruster
Paolo Bonzini writes: > On 04/01/20 22:16, Philippe Mathieu-Daudé wrote: >> 1/ the Radeon chip is soldered on the motherboard, >> >> 2/ the default BIOS expects the Radeon chip to be >>    unconditionally present, >> >> I insist this patch is incorrect for the particular case of the >>

Re: [PATCH] python: Treat None-return of greeting cmd

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/20/20 8:12 AM, Lukáš Doktor wrote: In case qemu process dies the "monitor.cmd" returns None which gets passed to the "__negotiate_capabilities" and leads to unhandled exception. Let's only check the resp in case it has a value. Signed-off-by: Lukáš Doktor --- python/qemu/qmp.py | 2

Re: [PATCH] qom/object: Display more helpful message when an interface is missing

2020-01-20 Thread Cornelia Huck
On Sat, 18 Jan 2020 17:23:48 +0100 Philippe Mathieu-Daudé wrote: > When adding new devices implementing QOM interfaces, we might > forgot to add the Kconfig dependency that pulls the required > objects in when building. > > Since QOM dependencies are resolved at runtime, we don't get any >

Re: [RFC PATCH v2 3/5] target/arm/kvm: Implement virtual time adjustment

2020-01-20 Thread Andrew Jones
On Thu, Dec 19, 2019 at 03:30:12PM +0100, Andrew Jones wrote: > On Mon, Dec 16, 2019 at 06:06:30PM +, Peter Maydell wrote: > > Your approach in this patchset reads and writes on vm-paused, > > so it won't have the pre-2015 problems. > > > > It still feels odd that we're storing this bit of

Re: qemu-4.0.1: vhost_region_add_section:Section rounded to 0 prior to previous a0000

2020-01-20 Thread Dr. David Alan Gilbert
* Peter Lieven (p...@kamp.de) wrote: > Am 17.01.20 um 16:59 schrieb Dr. David Alan Gilbert: > > * Peter Lieven (p...@kamp.de) wrote: > > > Am 16.01.20 um 21:26 schrieb Dr. David Alan Gilbert: > > > > * Peter Lieven (p...@kamp.de) wrote: > > > > > Am 16.01.20 um 13:47 schrieb Peter Lieven: > > > >

[PATCH] audio/oss: fix buffer pos calculation

2020-01-20 Thread Gerd Hoffmann
Fixes: 3ba4066d085f ("ossaudio: port to the new audio backend api") Reported-by: ziming zhang Signed-off-by: Gerd Hoffmann --- audio/ossaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/ossaudio.c b/audio/ossaudio.c index c43faeeea4aa..94564916fbf0 100644 ---

[PULL 02/29] migration-test: Add migration multifd test

2020-01-20 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 Signed-off-by: Juan Quintela --- tests/qtest/migration-test.c | 56 1 file changed, 56 insertions(+) diff --git

[PULL 00/29] Migration pull patches

2020-01-20 Thread Juan Quintela
The following changes since commit 7fb38daf256bd1bcbcb5ea556422283d0d55a1b1: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200117-1' into staging (2020-01-17 17:27:20 +) are available in the Git repository at: https://github.com/juanquintela/qemu.git

[PULL 10/29] misc: use QEMU_IS_ALIGNED

2020-01-20 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 13/29] migration/ram: Yield periodically to the main loop

2020-01-20 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 17/29] migration/postcopy: set all_zero to true on the first target page

2020-01-20 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 27/29] apic: Use 32bit APIC ID for migration instance ID

2020-01-20 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

Re: [PATCH v2 6/6] hw/core/Makefile: Group generic objects versus system-mode objects

2020-01-20 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > To ease review/modifications of this Makefile, group generic > objects first, then system-mode specific ones, and finally > peripherals (which are only used in system-mode). > > No logical changes introduced here. > > Signed-off-by: Philippe Mathieu-Daudé >

Re: [PATCH] audio/oss: fix buffer pos calculation

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/20/20 11:18 AM, Gerd Hoffmann wrote: Fixes: 3ba4066d085f ("ossaudio: port to the new audio backend api") Reported-by: ziming zhang Signed-off-by: Gerd Hoffmann --- audio/ossaudio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audio/ossaudio.c b/audio/ossaudio.c

Re: [PATCH v3 03/10] hbitmap: unpublish hbitmap_iter_skip_words

2020-01-20 Thread Max Reitz
On 19.12.19 11:03, Vladimir Sementsov-Ogievskiy wrote: > Function is internal and even commented as internal. Drop its > definition from .h file. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/qemu/hbitmap.h | 7 --- > util/hbitmap.c | 2 +- > 2 files changed, 1

Re: [PATCH 0/4] migration: Replace gemu_log with qemu_log

2020-01-20 Thread Alex Bennée
Josh Kunz writes: > On Tue, Jan 14, 2020 at 3:02 AM Alex Bennée wrote: > >> >> Josh Kunz writes: >> >> >> > >> > Not tested: >> > * Build/logging with bsd-user. I do not have easy access to a BSD >> > system. >> >> If you have the time we have vm-build-netbsd: >> >> make vm-build-netbsd

Re: [PATCH v2 3/5] linux-user/i386: Emulate x86_64 vsyscalls

2020-01-20 Thread Alex Bennée
Richard Henderson writes: > Notice the magic page during translate, much like we already > do for the arm32 commpage. At runtime, raise an exception to > return cpu_loop for emulation. > > Reviewed-by: Paolo Bonzini > Signed-off-by: Richard Henderson > --- > target/i386/cpu.h |

Re: [PATCH 100/104] virtiofsd: process requests in a thread pool

2020-01-20 Thread Misono Tomohiro
> From: Stefan Hajnoczi > > Introduce a thread pool so that fv_queue_thread() just pops > VuVirtqElements and hands them to the thread pool. For the time being > only one worker thread is allowed since passthrough_ll.c is not > thread-safe yet. Future patches will lift this restriction so that

Re: [PATCH 2/9] cputlb: Make tlb_n_entries private to cputlb.c

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/9/20 3:49 AM, Richard Henderson wrote: There are no users of this function outside cputlb.c, and its interface will change in the next patch. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- include/exec/cpu_ldst.h | 5 - accel/tcg/cputlb.c | 5

Re: [PATCH RFC 12/12] migration/rdma: only register the virt-ram block for MultiRDMA

2020-01-20 Thread Dr. David Alan Gilbert
* fengzhimin (fengzhim...@huawei.com) wrote: > OK, I will modify it. > > Due to the mach-virt.ram is sent by the multiRDMA channels instead of the > main channel, it don't to register on the main channel. You might be OK if instead of using the name, you use a size threshold; e.g. you use the

Re: [PATCH v2 0/5] fix migration with bitmaps and mirror

2020-01-20 Thread Vladimir Sementsov-Ogievskiy
John, I don't quite follow discussion in bugzilla. Do we need these series as at least temporary workaround, or not? Should I resend? 19.12.2019 11:51, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > It's a continuation for > "bitmap migration bug with -drive while block mirror runs" >

Re: [PATCH v7 03/11] hw/core: create Resettable QOM interface

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/20/20 10:08 AM, Damien Hedde wrote: On 1/18/20 7:42 AM, Philippe Mathieu-Daudé wrote: On 1/15/20 1:36 PM, Damien Hedde wrote: This commit defines an interface allowing multi-phase reset. This aims to solve a problem of the actual single-phase reset (built in DeviceClass and BusClass):

[PULL 01/29] multifd: Initialize local variable

2020-01-20 Thread Juan Quintela
Fill everything with zero, so the padding fields are also initialized. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 96feb4062c..b9147bcca3 100644 ---

Re: [PATCH] block/backup: fix memory leak in bdrv_backup_top_append()

2020-01-20 Thread Kevin Wolf
Am 23.12.2019 um 10:06 hat Eiichi Tsukata geschrieben: > bdrv_open_driver() allocates bs->opaque according to drv->instance_size. > There is no need to allocate it and overwrite opaque in > bdrv_backup_top_append(). > > Reproducer: > > $ QTEST_QEMU_BINARY=./x86_64-softmmu/qemu-system-x86_64

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

2020-01-20 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 Signed-off-by: Juan Quintela --- migration/ram.c | 25 + 1 file changed, 25 insertions(+)

[PULL 28/29] migration: Support QLIST migration

2020-01-20 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 19/29] migration/postcopy: enable compress during postcopy

2020-01-20 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 20/29] migration/multifd: clean pages after filling packet

2020-01-20 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 14/29] migration/postcopy: reduce memset when it is zero page and matches_target_page_size

2020-01-20 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

Re: [PATCH] block/backup: fix memory leak in bdrv_backup_top_append()

2020-01-20 Thread Kevin Wolf
Am 23.12.2019 um 14:40 hat Eiichi Tsukata geschrieben: > > > On 2019/12/23 21:40, Vladimir Sementsov-Ogievskiy wrote: > > 23.12.2019 12:06, Eiichi Tsukata wrote: > >> bdrv_open_driver() allocates bs->opaque according to drv->instance_size. > >> There is no need to allocate it and overwrite

[PATCH v2 2/2] target/ppc: add support for Hypervisor Facility Unavailable Exception

2020-01-20 Thread Cédric Le Goater
The privileged message send and clear instructions (msgsndp & msgclrp) are privileged, but will generate a hypervisor facility unavailable exception if not enabled in the HFSCR and executed in privileged non-hypervisor state. Add checks when accessing the DPDES register and when using the msgsndp

Re: [PATCH v2] vhost-vsock: delete vqs in vhost_vsock_unrealize to avoid memleaks

2020-01-20 Thread Stefan Hajnoczi
On Wed, Jan 15, 2020 at 02:25:35PM +0800, pannengy...@huawei.com wrote: > From: Pan Nengyuan > > Receive/transmit/event vqs forgot to cleanup in vhost_vsock_unrealize. This > patch save receive/transmit vq pointer in realize() and cleanup vqs > through those vq pointers in unrealize(). The leak

Re: [PATCH] qapi: Fix code generation with Python 3.5

2020-01-20 Thread Alex Bennée
Markus Armbruster writes: > Recent commit 3e7fb5811b "qapi: Fix code generation for empty modules" > modules" switched QAPISchema.visit() from > > for entity in self._entity_list: > > effectively to > > for mod in self._module_dict.values(): > for entity in mod._entity_list: >

Re: [PATCH v2 2/6] Makefile: Clarify all the codebase requires qom/ objects

2020-01-20 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > QEMU user-mode also requires the qom/ objects, it is not only > used by "system emulation and qemu-img". As we will use a big > if() block, move it upper in the "Common libraries for tools > and emulators" section. > > Reviewed-by: Thomas Huth > Signed-off-by:

Re: [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode

2020-01-20 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > The user-mode code does not use this API, restrict it > to the system-mode. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/core/Makefile.objs | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/core/Makefile.objs

Re: audio: audio input with new backend makes qemu to freeze

2020-01-20 Thread Michael Tokarev
20.01.2020 14:27, Michael Tokarev wrote: > Hello. > > There's a bugreport about audio subsystem being unable to use microphone > (audio input) with new backend, since 286a5d201e432ed2963e5d860f239bb276edffeb > See full details with stack traces at http://bugs.debian.org/948658 Hmm. I wonder if

Re: [PATCH v3 05/10] block/dirty-bitmap: switch _next_dirty_area and _next_zero to int64_t

2020-01-20 Thread Max Reitz
On 19.12.19 11:03, Vladimir Sementsov-Ogievskiy wrote: > We are going to introduce bdrv_dirty_bitmap_next_dirty so that same > variable may be used to store its return value and to be its parameter, > so it would int64_t. > > Similarly, we are going to refactor hbitmap_next_dirty_area to use >

Re: [PATCH v3 0/7] gpio: Add GPIO Aggregator/Repeater

2020-01-20 Thread Eugeniu Rosca
Hi Geert, On Mon, Jan 20, 2020 at 10:33:53AM +0100, Geert Uytterhoeven wrote: > On Sat, Jan 18, 2020 at 2:46 AM Eugeniu Rosca wrote: > > The only unexpected thing is seeing below messages (where gpiochip99 and > > gpiochip22 are inexisting gpiochip names, mistakenly provided on command > > line

Re: [PATCH v22 8/9] target-arm: kvm64: handle SIGBUS signal from kernel or KVM

2020-01-20 Thread Peter Maydell
On Fri, 17 Jan 2020 at 10:05, gengdongjiu wrote: > > On 2020/1/17 0:28, Peter Maydell wrote: > > On Wed, 8 Jan 2020 at 11:33, Dongjiu Geng wrote: > > > >> +void kvm_arch_on_sigbus_vcpu(CPUState *c, int code, void *addr) > >> +{ > >> +ram_addr_t ram_addr; > >> +hwaddr paddr; > >> + > >> +

Re: [PATCH v7 03/11] hw/core: create Resettable QOM interface

2020-01-20 Thread Damien Hedde
On 1/18/20 7:35 AM, Philippe Mathieu-Daudé wrote: > On 1/15/20 1:36 PM, Damien Hedde wrote: >> This commit defines an interface allowing multi-phase reset. This aims >> to solve a problem of the actual single-phase reset (built in >> DeviceClass and BusClass): reset behavior is dependent on the

ping Re: [PATCH for-5.0 v2 0/3] benchmark util

2020-01-20 Thread Vladimir Sementsov-Ogievskiy
ping 26.11.2019 18:48, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > Here is simple benchmarking utility, to generate performance > comparison tables, like the following: > > -- - - - > backup-1 backup-2 mirror > ssd ->

Re: Making QEMU easier for management tools and applications

2020-01-20 Thread Stefan Hajnoczi
On Thu, Jan 16, 2020 at 12:03:14PM +0100, Kashyap Chamarthy wrote: > On Thu, Jan 02, 2020 at 02:47:22PM +, Stefan Hajnoczi wrote: > > On Sat, Dec 21, 2019 at 10:02:23AM +0100, Markus Armbruster wrote: > > > Stefan Hajnoczi writes: > > [...] > > > > > 2. scripts/qmp/ contains command-line

Re: [PATCH 070/104] virtiofsd: fail when parent inode isn't known in lo_do_lookup()

2020-01-20 Thread Sergio Lopez
Dr. David Alan Gilbert (git) writes: > From: Miklos Szeredi > > The Linux file handle APIs (struct export_operations) can access inodes > that are not attached to parents because path name traversal is not > performed. Refuse if there is no parent in lo_do_lookup(). > > Also clean up

Re: Making QEMU easier for management tools and applications

2020-01-20 Thread Stefan Hajnoczi
On Wed, Jan 15, 2020 at 01:15:17PM +0100, Markus Armbruster wrote: > Christophe de Dinechin writes: > >> On 15 Jan 2020, at 10:20, Markus Armbruster wrote: > * qemuMonitorJSONSetIOThread() uses it to control iothread's properties > poll-max-ns, poll-grow, poll-shrink. Their use with -object

[RFC PATCH v3 0/6] target/arm/kvm: Adjust virtual time

2020-01-20 Thread Andrew Jones
v3: - Added a target/arm/kvm_arm.h comment cleanup patch (1/6) - Minor refactoring of assert_has_feature_enabled/disabled in 4/6, kept Richard's r-b. - Rewrote kvm-no-adjvtime documentation in 6/6. - Reworked approach in 5/6 to properly deal with migration and to track running vs.

[RFC PATCH v3 5/6] target/arm/kvm: Implement virtual time adjustment

2020-01-20 Thread Andrew Jones
When a VM is stopped (such as when it's paused) guest virtual time should stop counting. Otherwise, when the VM is resumed it will experience time jumps and its kernel may report soft lockups. Not counting virtual time while the VM is stopped has the side effect of making the guest's time appear

Re: [PATCH v3 01/10] hbitmap: assert that we don't create bitmap larger than INT64_MAX

2020-01-20 Thread Max Reitz
On 19.12.19 11:03, Vladimir Sementsov-Ogievskiy wrote: > We have APIs which returns signed int64_t, to be able to return error. > Therefore we can't handle bitmaps with absolute size larger than > (INT64_MAX+1). Still, keep maximum to be INT64_MAX which is a bit > safer. > > Note, that bitmaps

Re: Feedback on multi-process QEMU muser prototype

2020-01-20 Thread Stefan Hajnoczi
On Wed, Jan 15, 2020 at 10:58:38AM +, Felipe Franciosi wrote: > > On Jan 14, 2020, at 3:22 PM, Stefan Hajnoczi wrote: > > > > I haven't seen the link to the muser prototype shared on the list yet, > > so I'm taking the liberty of posting it for discussion: > >

Re: [PATCH v2 4/6] Makefile: Remove unhelpful comment

2020-01-20 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > It is pointless to keep qapi/ object separate from the other > common-objects. Drop the comment. > > Reviewed-by: Thomas Huth > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée > --- > Makefile.objs | 6 ++ > 1 file changed, 2

[PATCH v2 0/2] ppc: add support for Directed Privileged Doorbell (non-hypervisor)

2020-01-20 Thread Cédric Le Goater
Hello, The Processor Control facility for POWER8 processors and later provides a mechanism for the hypervisor to send messages to other threads in the system (msgsnd instruction) and cause hypervisor-level exceptions. Privileged non-hypervisor programs can also send messages (msgsndp

Re: [PATCH] target/arm: add PMU feature to cortex-r5 and cortex-r5f

2020-01-20 Thread Peter Maydell
On Tue, 14 Jan 2020 at 12:44, Philippe Mathieu-Daudé wrote: > > On 1/14/20 11:59 AM, Clement Deschamps wrote: > > Maybe describe here: > > The PMU is not optional on cortex-r5 and cortex-r5f (see > the "Features" chapter of the Technical Reference Manual). > > > Signed-off-by: Clement Deschamps

Re: [PATCH 105/104] virtiofsd: Unref old/new inodes with the same mutex lock in lo_rename()

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/19/20 9:35 AM, Xiao Yang wrote: On 2020/1/17 21:32, Philippe Mathieu-Daudé wrote: We can unref both old/new inodes with the same mutex lock. Signed-off-by: Philippe Mathieu-Daudé --- Based-on:<20191212163904.159893-1-dgilb...@redhat.com> "virtiofs daemon"

Re: [PATCH 6/9] cputlb: Split out tlb_mmu_flush_locked

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/9/20 3:49 AM, Richard Henderson wrote: We will want to be able to flush a tlb without resizing. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- accel/tcg/cputlb.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git

Re: [PATCH 5/9] cputlb: Hoist tlb portions in tlb_flush_one_mmuidx_locked

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/9/20 3:49 AM, Richard Henderson wrote: No functional change, but the smaller expressions make the code easier to read. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- accel/tcg/cputlb.c | 19 ++- 1 file changed, 10 insertions(+), 9

Re: [PATCH v3 00/10] Further bitmaps improvements

2020-01-20 Thread Vladimir Sementsov-Ogievskiy
ping 19.12.2019 13:03, Vladimir Sementsov-Ogievskiy wrote: > Hi! > > The main feature here is improvement of _next_dirty_area API, which I'm > going to use then for backup / block-copy. > > v3: rebase on current master. Mirror don't use _next_dirty_area any > more, so mirror chunks dropped

Re: [PATCH v3 0/7] gpio: Add GPIO Aggregator/Repeater

2020-01-20 Thread Geert Uytterhoeven
Hi Eugeniu, On Sat, Jan 18, 2020 at 2:46 AM Eugeniu Rosca wrote: > On Wed, Nov 27, 2019 at 09:42:46AM +0100, Geert Uytterhoeven wrote: > > - Create aggregators: > > > > $ echo e6052000.gpio 19,20 \ > > > /sys/bus/platform/drivers/gpio-aggregator/new_device > The only unexpected

[RFC PATCH v3 6/6] target/arm/cpu: Add the kvm-no-adjvtime CPU property

2020-01-20 Thread Andrew Jones
kvm-no-adjvtime is a KVM specific CPU property and a first of its kind. To accommodate it we also add kvm_arm_add_vcpu_properties() and a KVM specific CPU properties description to the CPU features document. Signed-off-by: Andrew Jones --- docs/arm-cpu-features.rst | 37

[RFC PATCH v3 4/6] tests/arm-cpu-features: Check feature default values

2020-01-20 Thread Andrew Jones
If we know what the default value should be then we can test for that as well as the feature existence. Signed-off-by: Andrew Jones Reviewed-by: Richard Henderson --- tests/qtest/arm-cpu-features.c | 37 +- 1 file changed, 28 insertions(+), 9 deletions(-) diff

Re: [RFC PATCH v2 5/5] target/arm/cpu: Add the kvm-no-adjvtime CPU property

2020-01-20 Thread Andrew Jones
On Mon, Dec 16, 2019 at 03:06:57PM +, Peter Maydell wrote: > Incidentally, if I understand things correctly, for TCG the > behaviour is (and has always been) that VM-stopped time is > not counted, because we run the emulated versions of these counters > off QEMU_CLOCK_VIRTUAL. So having the

Re: [PATCH v2] target/s390x/kvm: Enable adapter interruption suppression again

2020-01-20 Thread Cornelia Huck
On Mon, 20 Jan 2020 10:49:01 +0100 Thomas Huth wrote: > The AIS feature has been disabled late in the v2.10 development cycle since > there were some issues with migration (see commit 3f2d07b3b01ea61126b - > "s390x/ais: for 2.10 stable: disable ais facility"). We originally wanted > to enable it

[PULL 21/29] migration/multifd: not use multifd during postcopy

2020-01-20 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 23/29] migration/multifd: fix destroyed mutex access in terminating multifd threads

2020-01-20 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

Re: [PATCH REPOST v3] target/arm/arch_dump: Add SVE notes

2020-01-20 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200120101832.18781-1-drjo...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200120101832.18781-1-drjo...@redhat.com Type: series Subject: [PATCH REPOST v3] target/arm/arch_dump:

Re: [PATCH v3 4/8] hw/avr: Add some Arduino boards

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/20/20 11:09 AM, Igor Mammedov wrote: On Mon, 20 Jan 2020 10:21:52 +0100 Philippe Mathieu-Daudé wrote: On 1/20/20 10:03 AM, Igor Mammedov wrote: On Sun, 29 Dec 2019 23:45:01 +0100 Philippe Mathieu-Daudé wrote: Arduino boards are build with AVR chipsets. Add some of the popular

Re: [PATCH v3 02/10] hbitmap: move hbitmap_iter_next_word to hbitmap.c

2020-01-20 Thread Max Reitz
On 19.12.19 11:03, Vladimir Sementsov-Ogievskiy wrote: > The function is definitely internal (it's not used by third party and > it has complicated interface). Move it to .c file. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/qemu/hbitmap.h | 30 --

Re: [PATCH 4/9] cputlb: Hoist tlb portions in tlb_mmu_resize_locked

2020-01-20 Thread Alistair Francis
On Thu, Jan 9, 2020 at 12:52 PM Richard Henderson wrote: > > No functional change, but the smaller expressions make > the code easier to read. > > Signed-off-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > accel/tcg/cputlb.c | 35 +-- > 1

Re: [PATCH 026/104] virtiofsd: Fast path for virtio read

2020-01-20 Thread Dr. David Alan Gilbert
* Masayoshi Mizuma (msys.miz...@gmail.com) wrote: > On Thu, Dec 12, 2019 at 04:37:46PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Readv the data straight into the guests buffer. > > > > Signed-off-by: Dr. David Alan Gilbert > > With fix by: > >

Re: [PATCH 040/104] virtiofsd: Pass write iov's all the way through

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/19/20 9:08 AM, Xiao Yang wrote: On 2019/12/13 0:38, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Pass the write iov pointing to guest RAM all the way through rather than copying the data. Signed-off-by: Dr. David Alan Gilbert ---   tools/virtiofsd/fuse_virtio.c | 79

Re: [PATCH v7 03/11] hw/core: create Resettable QOM interface

2020-01-20 Thread Damien Hedde
On 1/18/20 7:42 AM, Philippe Mathieu-Daudé wrote: > On 1/15/20 1:36 PM, Damien Hedde wrote: >> This commit defines an interface allowing multi-phase reset. This aims >> to solve a problem of the actual single-phase reset (built in >> DeviceClass and BusClass): reset behavior is dependent on the

  1   2   3   4   >