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] 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 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 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" https://www.mail-archive.com/qemu-

Re: [PATCH] backup-top: fix a memory leak in bdrv_backup_top_append()

2020-01-20 Thread Vladimir Sementsov-Ogievskiy
Hi Pan! Better is to drop extra allocation. Correct patch already posted here: https://lists.gnu.org/archive/html/qemu-devel/2019-12/msg05067.html 20.01.2020 10:47, pannengy...@huawei.com wrote: > From: Pan Nengyuan > > top->opaque is aleardy malloced in bdrv_new_open_driver(), and then change

Re: [PATCH] backup-top: fix a memory leak in bdrv_backup_top_append()

2020-01-20 Thread Pan Nengyuan
On 1/20/2020 4:38 PM, Vladimir Sementsov-Ogievskiy wrote: > Hi Pan! > > Better is to drop extra allocation. Correct patch already posted here: > https://lists.gnu.org/archive/html/qemu-devel/2019-12/msg05067.html > Yes, it's better. Thanks. > 20.01.2020 10:47, pannengy...@huawei.com wrote:

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

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 3/9] cputlb: Pass CPUTLBDescFast to tlb_n_entries and sizeof_tlb

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/9/20 3:49 AM, Richard Henderson wrote: We do not need the entire CPUArchState to compute these values. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- accel/tcg/cputlb.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/acc

[PATCH v2] qapi: Allow getting flat output from 'query-named-block-nodes'

2020-01-20 Thread Peter Krempa
When a management application manages node names there's no reason to recurse into backing images in the output of query-named-block-nodes. Add a parameter to the command which will return just the top level structs. Signed-off-by: Peter Krempa --- Diff to v1: - rewrote setting of 'return_flat

Re: [PATCH 4/9] cputlb: Hoist tlb portions in tlb_mmu_resize_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 | 35 +-- 1 file changed, 17 insertions

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 > link-

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

2020-01-20 Thread Ian Jiang
The origin defination of TW bits in mstatus is not correct. This patch fixes the problem. Signed-off-by: Ian Jiang --- target/riscv/cpu_bits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h index e99834856c..fb2e0b340e 100644

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 deletions

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 a/accel/tcg

Re: [PATCH 9/9] cputlb: Hoist timestamp outside of loops over tlbs

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/9/20 3:49 AM, Richard Henderson wrote: Do not call get_clock_realtime() in tlb_mmu_resize_locked, but hoist outside of any loop over a set of tlbs. This is only two (indirect) callers, tlb_flush_by_mmuidx_async_work and tlb_flush_page_locked, so not onerous. Signed-off-by: Richard Henderso

Re: [PATCH 7/9] cputlb: Partially merge tlb_dyn_init into tlb_init

2020-01-20 Thread Philippe Mathieu-Daudé
On 1/9/20 3:49 AM, Richard Henderson wrote: Merge into the only caller, but at the same time split out tlb_mmu_init to initialize a single tlb entry. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- accel/tcg/cputlb.c | 33 - 1 fil

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

2020-01-20 Thread Igor Mammedov
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 boards: > > - Arduino Duemilanove > - Arduino Uno > - Arduino Mega > > For more information: > https://www.arduino.cc/en/Main/Products > https://store.ard

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 m

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" > <315cff

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 (patc

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

Re: [PATCH v2 for-5.0 0/7] block-copy improvements: part I

2020-01-20 Thread Vladimir Sementsov-Ogievskiy
ping 19.12.2019 12:01, Vladimir Sementsov-Ogievskiy wrote: > ping. Series applies on current master > > 27.11.2019 21:08, Vladimir Sementsov-Ogievskiy wrote: >> Hi all! >> >> This is a first part of my >>    [RFC 00/24] backup performance: block_status + async >> >> Patches are mostly separate by

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: [RFC] migration: introduce failed-unrecovarable status

2020-01-20 Thread Vladimir Sementsov-Ogievskiy
ping 18.12.2019 15:55, Vladimir Sementsov-Ogievskiy wrote: > We should not start source vm automatically, if the error occured after > target accessed disks, or if we failed to invalidate nodes. > > Also, fix, that we need invalidate even if bdrv_inactivate_all() > failed, as in this case it stil

Re: [PATCH v9 0/2] qcow2: add zstd cluster compression

2020-01-20 Thread Vladimir Sementsov-Ogievskiy
ping 16.12.2019 15:17, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > Here is my proposal, about how to correctly update qcow2 specification > to introduce new field, keeping in mind currently existing images and > downstream Qemu instances. > > v9: Merge 01 and 02 > Change wordings >

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): rese

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

2020-01-20 Thread Philippe Mathieu-Daudé
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 boards: - Arduino Duemilanove - Arduino Uno - Arduino Mega For more information: https://www.arduino.cc/en/Main/Pr

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

2020-01-20 Thread Peter Lieven
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: Am 13.01.20 um 17:25 schrieb Peter Lieven: Am 09.01.20 um 19:44 schri

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 thi

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 gue

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 v2] target/s390x/kvm: Enable adapter interruption suppression again

2020-01-20 Thread Thomas Huth
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 again for newer machine types, but apparently we forgot to do th

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

2020-01-20 Thread David Hildenbrand
On 20.01.20 10:49, 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 again for newer ma

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 too

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 lo_do_loo

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 is

Re: [PATCH 071/104] virtiofsd: extract root inode init into setup_root()

2020-01-20 Thread Sergio Lopez
Dr. David Alan Gilbert (git) writes: > From: Miklos Szeredi > > Inititialize the root inode in a single place. > > Signed-off-by: Miklos Szeredi > Signed-off-by: Stefan Hajnoczi > --- > tools/virtiofsd/passthrough_ll.c | 26 -- > 1 file changed, 24 insertions(+), 2 de

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

2020-01-20 Thread Igor Mammedov
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 boards: > >> > >> - Arduino D

[RFC PATCH v3 3/6] target/arm/kvm64: kvm64 cpus have timer registers

2020-01-20 Thread Andrew Jones
Add the missing GENERIC_TIMER feature to kvm64 cpus. We don't currently use these registers when KVM is enabled, but it's probably best we add the feature flag for consistency and potential future use. There's also precedent, as we add the PMU feature flag to KVM enabled guests, even though we don

[RFC PATCH v3 1/6] target/arm/kvm: trivial: Clean up header documentation

2020-01-20 Thread Andrew Jones
Signed-off-by: Andrew Jones --- target/arm/kvm_arm.h | 46 ++-- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index 8e14d400e8ab..b48a9c95573b 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/k

[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 to

[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. !runnin

[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 -

[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

Re: [qemu-web PATCH] documentation: update links to readthedocs

2020-01-20 Thread Stefan Hajnoczi
On Wed, Jan 15, 2020 at 12:01:34PM +, Daniel P. Berrangé wrote: > On Wed, Jan 15, 2020 at 11:56:04AM +, Alex Bennée wrote: > > > > Stefan Hajnoczi writes: > > > > > On Tue, Jan 14, 2020 at 12:11:34PM +0100, Thomas Huth wrote: > > >> On 13/01/2020 11.35, Alex Bennée wrote: > > >> > ..and

[RFC PATCH v3 2/6] hw/arm/virt: Add missing 5.0 options call to 4.2 options

2020-01-20 Thread Andrew Jones
Signed-off-by: Andrew Jones --- hw/arm/virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 39ab5f47e0bd..27ca26b05e27 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2153,6 +2153,7 @@ DEFINE_VIRT_MACHINE_AS_LATEST(5, 0) static void virt_machine_4_2

Re: [PATCH 072/104] virtiofsd: passthrough_ll: fix refcounting on remove/rename

2020-01-20 Thread Sergio Lopez
Dr. David Alan Gilbert (git) writes: > From: Miklos Szeredi > > Signed-off-by: Miklos Szeredi > --- > tools/virtiofsd/passthrough_ll.c | 50 +++- > 1 file changed, 49 insertions(+), 1 deletion(-) This one is missing a commit message, and I think the patch isn't tr

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

2020-01-20 Thread Andrew Jones
When dumping a guest with dump-guest-memory also dump the SVE registers if they are in use. Signed-off-by: Andrew Jones Reviewed-by: Richard Henderson --- include/elf.h | 2 + target/arm/arch_dump.c | 124 - target/arm/cpu.h | 25 +++

[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 --- a/au

Re: [PATCH 084/104] Virtiofsd: fix memory leak on fuse queueinfo

2020-01-20 Thread Sergio Lopez
Dr. David Alan Gilbert (git) writes: > From: Liu Bo > > For fuse's queueinfo, both queueinfo array and queueinfos are allocated in > fv_queue_set_started() but not cleaned up when the daemon process quits. > > This fixes the leak in proper places. > > Signed-off-by: Liu Bo > Signed-off-by: Eri

Re: [PATCH 093/104] virtiofsd: introduce inode refcount to prevent use-after-free

2020-01-20 Thread Sergio Lopez
Dr. David Alan Gilbert (git) writes: > From: Stefan Hajnoczi > > If thread A is using an inode it must not be deleted by thread B when > processing a FUSE_FORGET request. > > The FUSE protocol itself already has a counter called nlookup that is > used in FUSE_FORGET messages. We cannot trust t

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 KVM

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

Re: [qemu-web PATCH] documentation: update links to readthedocs

2020-01-20 Thread Peter Maydell
On Wed, 15 Jan 2020 at 11:11, Stefan Hajnoczi wrote: > It's good that we got ownership of the readthedocs.org account for QEMU. > I don't know if rtd will be capable of building QEMU's hodgepodge of > different documentation systems. It supports Sphinx and Mkdocs but > that's not enough. I think

Re: [PATCH 094/104] virtiofsd: do not always set FUSE_FLOCK_LOCKS

2020-01-20 Thread Sergio Lopez
Dr. David Alan Gilbert (git) writes: > From: Peng Tao > > Right now we always enable it regardless of given commandlines. > Fix it by setting the flag relying on the lo->flock bit. > > Signed-off-by: Peng Tao > --- > tools/virtiofsd/passthrough_ll.c | 11 --- > 1 file changed, 8 inser

[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 --- a

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 val

[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(+) diff

[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 tags/migrat

[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 a/tests

[PULL 11/29] migration: add savevm_state_handler_remove()

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

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

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

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

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

[PULL 04/29] migration-test: introduce functions to handle string parameters

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

[PULL 18/29] migration/postcopy: enable random order target page arrival

2020-01-20 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 12/29] migration: savevm_state_handler_insert: constant-time element insertion

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

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

2020-01-20 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 [-Werror,-Wimplicit-int-floa

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

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

[PULL 16/29] migration/postcopy: count target page number to decide the place_needed

2020-01-20 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 25/29] migration: Define VMSTATE_INSTANCE_ID_ANY

2020-01-20 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 09/29] migration: Fix the re-run check of the migrate-incoming command

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

Re: [PATCH v4 00/15] io_uring: add Linux io_uring AIO engine

2020-01-20 Thread Stefan Hajnoczi
On Tue, Jan 14, 2020 at 10:59:06AM +, Stefan Hajnoczi wrote: > v13: > * Drop unnecessary changes in Patch 8 [Stefano] > > v12: > * Reword BlockdevAioOptions QAPI schema commit description [Markus] > * Increase QAPI "Since: 4.2" to "Since: 5.0" > * Explain rationale for io_uring stubs in co

[PULL 26/29] migration: Change SaveStateEntry.instance_id into uint32_t

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

[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 a/exec

[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 s

[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 Signed-off-by:

[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 IA32_APIC_BASE

[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 deletion

[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* targe

[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 pro

[PULL 15/29] migration/postcopy: wait for decompress thread in precopy

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

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

[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 de

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 are

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: > > https://github.com/oracle/qemu/t

[PULL 24/29] Bug #1829242 correction.

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

[PULL 29/29] multifd: Be consistent about using uint64_t

2020-01-20 Thread Juan Quintela
We transmit ram_addr_t always as uint64_t. Be consistent in its use (on 64bit system, it is always uint64_t problem is 32bits). Signed-off-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 13 - 1 file changed, 8 insert

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 opaque

[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 s

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] i386: pass CLZERO to guests with EPYC CPU model on AMD ZEN platform

2020-01-20 Thread Ani Sinha
Sorry Eduardo, it took a little while for me to get to this thread again. > On Dec 18, 2019, at 8:41 PM, Eduardo Habkost wrote: > > On Wed, Dec 18, 2019 at 12:53:45PM +0100, Paolo Bonzini wrote: >> On 18/12/19 10:05, Ani Sinha wrote: >>> CLZERO CPUID should be passed on to the guests that use EP

Re: [PATCH 084/104] Virtiofsd: fix memory leak on fuse queueinfo

2020-01-20 Thread Dr. David Alan Gilbert
* Sergio Lopez (s...@redhat.com) wrote: > > Dr. David Alan Gilbert (git) writes: > > > From: Liu Bo > > > > For fuse's queueinfo, both queueinfo array and queueinfos are allocated in > > fv_queue_set_started() but not cleaned up when the daemon process quits. > > > > This fixes the leak in prop

Re: [PATCH v2 1/6] configure: Do not build libfdt if not required

2020-01-20 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > We only require libfdt for system emulation, in a small set > of architecture: > > 4077 # fdt support is mandatory for at least some target architectures, > 4078 # so insist on it if we're building those system emulators. > 4079 fdt_required=no > 4080 for ta

Re: [PATCH 072/104] virtiofsd: passthrough_ll: fix refcounting on remove/rename

2020-01-20 Thread Dr. David Alan Gilbert
* Sergio Lopez (s...@redhat.com) wrote: > > Dr. David Alan Gilbert (git) writes: > > > From: Miklos Szeredi > > > > Signed-off-by: Miklos Szeredi > > --- > > tools/virtiofsd/passthrough_ll.c | 50 +++- > > 1 file changed, 49 insertions(+), 1 deletion(-) > > This o

Re: [PATCH v2 3/6] Makefile: Restrict system emulation and tools objects

2020-01-20 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Restrict all the system emulation and tools objects with a > Makefile IF (CONFIG_SOFTMMU OR CONFIG_TOOLS) check. > > Using the same description over and over is not very helpful. > Use it once, just before the if() block. > > Reviewed-by: Thomas Huth > Signed-o

[PATCH v2 1/2] target/ppc: Add privileged message send facilities

2020-01-20 Thread Cédric Le Goater
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 instruction) but are

  1   2   3   4   >