Re: [PATCH 07/11] mips/malta: Fix create_cps() error handling

2020-04-28 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 4/24/20 9:20 PM, Markus Armbruster wrote: >> The Error ** argument must be NULL, _abort, _fatal, or a >> pointer to a variable containing NULL. Passing an argument of the >> latter kind twice without clearing it in between is wrong: if the >> first call sets

Re: [PATCH 03/11] s390x/cpumodel: Fix harmless misuse of visit_check_struct()

2020-04-28 Thread Markus Armbruster
David Hildenbrand writes: > On 24.04.20 21:20, Markus Armbruster wrote: >> Commit e47970f51d "s390x/cpumodel: Fix query-cpu-model-FOO error API >> violations" neglected to change visit_end_struct()'s Error ** argument >> along with the others. If visit_end_struct() failed, we'd take the > >

Re: [PATCH 02/11] xen: Fix and improve handling of device_add usb-host errors

2020-04-28 Thread Markus Armbruster
Paul Durrant writes: >> -Original Message- >> From: Markus Armbruster >> Sent: 24 April 2020 20:20 >> To: qemu-devel@nongnu.org >> Cc: Stefano Stabellini ; Anthony Perard >> ; Paul >> Durrant ; Gerd Hoffmann ; >> xen-de...@lists.xenproject.org >> Subject: [PATCH 02/11] xen: Fix and

Re: [PATCH 2/4] smbus: Fix spd_data_generate() error API violation

2020-04-28 Thread Markus Armbruster
BALATON Zoltan writes: > On Fri, 24 Apr 2020, Markus Armbruster wrote: >> BALATON Zoltan writes: >>> On Tue, 21 Apr 2020, Markus Armbruster wrote: BALATON Zoltan writes: > On Mon, 20 Apr 2020, Markus Armbruster wrote: >> The Error ** argument must be NULL, _abort, _fatal, or a

Re: [PATCH v4 00/18] nvme: factor out cmb/pmr setup

2020-04-28 Thread Klaus Jensen
On Apr 22 13:01, Klaus Jensen wrote: > From: Klaus Jensen > > Changes since v3 > > * Remove the addition of a new PROPERTIES macro in "nvme: move device > parameters to separate struct" (Philippe) > > * Add NVME_PMR_BIR constant and use it in PMR setup. > > * Split "nvme:

RE: [PATCH v3 3/6] net/colo-compare.c: Fix deadlock in compare_chr_send

2020-04-28 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Monday, April 27, 2020 3:22 PM > To: Zhang, Chen > Cc: qemu-devel ; Li Zhijian > ; Jason Wang ; Marc- > André Lureau ; Paolo Bonzini > > Subject: Re: [PATCH v3 3/6] net/colo-compare.c: Fix deadlock in > compare_chr_send > > On Mon, 27

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-28 Thread Michael S. Tsirkin
On Wed, Apr 29, 2020 at 06:28:46AM +0530, Ani Sinha wrote: > Well there were several discussions in the other thread around how PCIE > behaves > and how we can't change the slot features without a HW reset. Those were > useful > inputs. OK so I'd expect these to be addressed in some way. If we

Re: [PATCH v2 00/17] 64bit block-layer

2020-04-28 Thread Vladimir Sementsov-Ogievskiy
29.04.2020 0:33, Eric Blake wrote: On 4/27/20 3:23 AM, Vladimir Sementsov-Ogievskiy wrote: Hi all! v1 was "[RFC 0/3] 64bit block-layer part I", please refer to initial cover-letter   https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg08723.html for motivation. v2: patch 02 is unchanged,

Re: [PATCH 1/4] sam460ex: Revert change to SPD memory type for <= 128 MiB

2020-04-28 Thread Markus Armbruster
BALATON Zoltan writes: > On Tue, 21 Apr 2020, Markus Armbruster wrote: >> BALATON Zoltan writes: >>> On Mon, 20 Apr 2020, Markus Armbruster wrote: Requesting 32 or 64 MiB of RAM with the sam460ex machine type produces a useless warning: qemu-system-ppc: warning: Memory

[Bug 1875139] Re: Domain fails to start when 'readonly' device not writable

2020-04-28 Thread Peter Krempa
This was indeed caused by libvirt starting to use -blockdev. The issue is that qemu's 'auto-read-only' property which is used by libvirt for the backing files doesn't properly work if the 'host_device' backend encounters a read-only LV. The above situation also happens if you have an read-only LV

Re: [PATCH v2 01/17] block/throttle-groups: throttle_group_co_io_limits_intercept(): 64bit bytes

2020-04-28 Thread Vladimir Sementsov-Ogievskiy
29.04.2020 1:09, Eric Blake wrote: On 4/27/20 3:23 AM, Vladimir Sementsov-Ogievskiy wrote: The function is called from 64bit io handlers, and bytes is just passed to throttle_account() which is 64bit too (unsigned though). So, let's convert intermediate argument to 64bit too. My audit for

Re: [PATCH] qemu-option: pass NULL rather than 0 to the id of qemu_opts_set()

2020-04-28 Thread Markus Armbruster
Masahiro Yamada writes: > The second argument 'id' is a pointer. Pass NULL rather than 0. > > Signed-off-by: Masahiro Yamada Reviewed-by: Markus Armbruster and queued, thanks!

Re: [RFC][PATCH v2 1/3] hw/misc: Add implementation of ivshmem revision 2 device

2020-04-28 Thread Liang Yan
A quick check by checkpatch.pl, pretty straightforward to fix. ERROR: return is not a function, parentheses are not required #211: FILE: hw/misc/ivshmem2.c:138: +return (ivs->features & (1 << feature)); ERROR: memory barrier without comment #255: FILE: hw/misc/ivshmem2.c:182: +smp_mb();

[Bug 1862986] Re: qemu-s390x crashes when run on aarch64

2020-04-28 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1862986 Title: qemu-s390x

Re: [RFC][PATCH v2 3/3] contrib: Add server for ivshmem revision 2

2020-04-28 Thread Liang Yan
A quick check by checkpatch.pl, pretty straightforward to fix. ERROR: memory barrier without comment #205: FILE: contrib/ivshmem2-server/ivshmem2-server.c:106: +smp_mb(); ERROR: spaces required around that '*' (ctx:VxV) #753: FILE: contrib/ivshmem2-server/main.c:22: +#define

Re: [RFC][PATCH v2 0/3] IVSHMEM version 2 device for QEMU

2020-04-28 Thread Liang Yan
Hi, All, Did a test for these patches, all looked fine. Test environment: Host: opensuse tumbleweed + latest upstream qemu + these three patches Guest: opensuse tumbleweed root fs + custom kernel(5.5) + related uio-ivshmem driver + ivshmem-console/ivshmem-block tools 1. lspci show 00:04.0

Re: [PATCH for-5.1 4/7] target/mips: Add Loongson-3 CPU definition

2020-04-28 Thread Huacai Chen
Hi, Aleksandar, I've tried translate.google.com, and documents are available here: Loongson-3A R1 (Loongson-3A1000) User Manual Part 1: http://ftp.godson.ac.cn/lemote/3A1000_p1.pdf http://ftp.godson.ac.cn/lemote/Loongson3A1000_processor_user_manual_P1.pdf (Chinese Version) User Manual Part 2:

[PATCH v2 2/2] Improve legacy vbios handling

2020-04-28 Thread Grzegorz Uriasz
The current method of getting the vbios is broken - it just isn't working on any device I've tested - the reason for this is explained in the previous patch. The vbios is polymorphic and getting a proper unmodified copy is often not possible without reverse engineering the firmware. We don't

[PATCH v2 1/2] Fix undefined behaviour

2020-04-28 Thread Grzegorz Uriasz
This patch fixes qemu crashes when passing through an IGD device to HVM guests under XEN. The problem is that on almost every laptop reading the IGD ROM from SYSFS will fail, the reason for it is that the IGD rom is polymorphic and it modifies itself during bootup - this results in an invalid

[PATCH v2 0/2] Fix QEMU crashes when passing IGD to a guest VM under XEN

2020-04-28 Thread Grzegorz Uriasz
This is the v1 cover letter - the patches now include a detailed description of the changes. Hi, This patch series is a small subset of a bigger patch set spanning few projects aiming to isolate the GPU in QUBES OS to a dedicated security domain. I'm doing this together with 3 colleagues as

Re: [PATCH 0/9] More truncate improvements

2020-04-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200428202905.770727-1-ebl...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [PATCH 0/9] More truncate improvements

2020-04-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200428202905.770727-1-ebl...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [PATCH for-5.1 3/7] hw/mips: Add CPU IRQ3 delivery for KVM

2020-04-28 Thread Huacai Chen
Hi, Philippe and Aleksandar, I'm not refusing to change my patch, but I have two questions: 1, Why we should identify Loongson-3 to deliver IP3? It seems that deliver all IPs (IP2~IP7) unconditionally is harmless as well. 2, How to identify Loongson-3 by Config6/Config7? Loongson-3 is not the

Re: [PATCH 16/17] spapr_pci: Drop some dead error handling

2020-04-28 Thread David Gibson
On Tue, Apr 28, 2020 at 06:34:18PM +0200, Markus Armbruster wrote: > chassis_from_bus() uses object_property_get_uint() to get property > "chassis_nr" of the bridge device. Failure would be a programming > error. Pass _abort, and simplify its callers. > > Cc: David Gibson > Cc:

Re: [PATCH for-5.1 6/7] hw/mips: Add Loongson-3 machine support (with KVM)

2020-04-28 Thread Huacai Chen
Hi, Aleksandr, On Wed, Apr 29, 2020 at 3:23 AM Aleksandar Markovic wrote: > > Hi. Huacei. > > Please expand commit message with the description of the machine > internal organization (several paragraphs). > > Also, please include command line for starting the machine. More than > one example is

Re: [PATCH for-5.1 5/7] target/mips: Add more CP0 register for save/restore

2020-04-28 Thread Huacai Chen
Hi, Aleksandar, On Wed, Apr 29, 2020 at 3:10 AM Aleksandar Markovic wrote: > > пон, 27. апр 2020. у 11:36 Huacai Chen је написао/ла: > > > > Add more CP0 register for save/restore, including: EBase, XContext, > > PageGrain, PWBase, PWSize, PWField, PWCtl, Config*, KScratch1~KScratch6. > > > >

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-28 Thread Ani Sinha
On Wed, Apr 29, 2020 at 2:15 AM Michael S. Tsirkin wrote: > On Tue, Apr 28, 2020 at 10:10:18PM +0530, Ani Sinha wrote: > > > > > > On Tue, Apr 28, 2020 at 9:51 PM Michael S. Tsirkin > wrote: > > > > On Tue, Apr 28, 2020 at 09:39:16PM +0530, Ani Sinha wrote: > > > > > > Ani > > >

Re: [PATCH v2] migration/xbzrle: add encoding rate

2020-04-28 Thread Wei Wang
On 04/28/2020 10:51 PM, Dr. David Alan Gilbert wrote: * Wei Wang (wei.w.w...@intel.com) wrote: Users may need to check the xbzrle encoding rate to know if the guest memory is xbzrle encoding-friendly, and dynamically turn off the encoding if the encoding rate is low. Signed-off-by: Yi Sun

Re: [PATCH 00/17] qom: Spring cleaning

2020-04-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200428163419.4483-1-arm...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH 00/17] qom: Spring cleaning Message-id: 20200428163419.4483-1-arm...@redhat.com Type: series ===

[Bug 1875762] [NEW] Poor disk performance on sparse VMDKs

2020-04-28 Thread Alan Murtagh
Public bug reported: Found in QEMU 4.1, and reproduced on master. QEMU appears to suffer from remarkably poor disk performance when writing to sparse-extent VMDKs. Of course it's to be expected that allocation takes time and sparse VMDKs peform worse than allocated VMDKs, but surely not on the

Re: [PATCH] block: Comment cleanups

2020-04-28 Thread Alberto Garcia
On Tue 28 Apr 2020 11:38:07 PM CEST, Eric Blake wrote: > It's been a while since we got rid of the sector-based bdrv_read and > bdrv_write (commit 2e11d756); let's finish the job on a few remaining > comments. > > Signed-off-by: Eric Blake Reviewed-by: Alberto Garcia Berto

Re: [PATCH v2 01/17] block/throttle-groups: throttle_group_co_io_limits_intercept(): 64bit bytes

2020-04-28 Thread Eric Blake
On 4/27/20 3:23 AM, Vladimir Sementsov-Ogievskiy wrote: The function is called from 64bit io handlers, and bytes is just passed to throttle_account() which is 64bit too (unsigned though). So, let's convert intermediate argument to 64bit too. My audit for this patch: Caller has 32-bit, this

[ANNOUNCE] QEMU 5.0.0 is now available

2020-04-28 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the QEMU 5.0.0 release. This release contains 2800+ commits from 232 authors. You can grab the tarball from our download page here: https://www.qemu.org/download/#source The full list of changes are available at:

[PATCH] block: Comment cleanups

2020-04-28 Thread Eric Blake
It's been a while since we got rid of the sector-based bdrv_read and bdrv_write (commit 2e11d756); let's finish the job on a few remaining comments. Signed-off-by: Eric Blake --- Hmm - I started this in Nov 2018, and just barely noticed that it has been sitting in a stale tree on my disk for a

Re: [PATCH v2 00/17] 64bit block-layer

2020-04-28 Thread Eric Blake
On 4/27/20 3:23 AM, Vladimir Sementsov-Ogievskiy wrote: Hi all! v1 was "[RFC 0/3] 64bit block-layer part I", please refer to initial cover-letter https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg08723.html for motivation. v2: patch 02 is unchanged, add Stefan's r-b. Everything other

Re: [PATCH v22 4/4] iotests: 287: add qcow2 compression type test

2020-04-28 Thread Eric Blake
On 4/28/20 3:00 PM, Denis Plotnikov wrote: The test checks fulfilling qcow2 requirements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Tested-by: Vladimir Sementsov-Ogievskiy --- Reviewed-by:

Re: [PATCH v22 3/4] qcow2: add zstd cluster compression

2020-04-28 Thread Eric Blake
On 4/28/20 3:00 PM, Denis Plotnikov wrote: zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in comparison with zlib, which, at the moment, is the only compression method available. The performance

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-28 Thread Michael S. Tsirkin
On Tue, Apr 28, 2020 at 05:33:08PM +0100, Daniel P. Berrangé wrote: > On Tue, Apr 28, 2020 at 12:30:53PM -0400, Michael S. Tsirkin wrote: > > On Tue, Apr 28, 2020 at 05:28:36PM +0100, Daniel P. Berrangé wrote: > > > On Tue, Apr 28, 2020 at 12:05:47PM -0400, Michael S. Tsirkin wrote: > > > > On

Re: [PATCH V2] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-28 Thread Michael S. Tsirkin
On Tue, Apr 28, 2020 at 10:10:18PM +0530, Ani Sinha wrote: > > > On Tue, Apr 28, 2020 at 9:51 PM Michael S. Tsirkin wrote: > > On Tue, Apr 28, 2020 at 09:39:16PM +0530, Ani Sinha wrote: > > > > Ani > > On Apr 28, 2020, 21:35 +0530, Michael S. Tsirkin , > wrote: > > > > 

[PATCH 9/9] block: Drop unused .bdrv_has_zero_init_truncate

2020-04-28 Thread Eric Blake
Now that there are no clients of bdrv_has_zero_init_truncate, none of the drivers need to worry about providing it. What's more, this eliminates a source of some confusion: a literal reading of the documentation as written in ceaca56f and implemented in commit 1dcaf527 claims that a driver which

Re: [RFC PATCH] plugins: new lockstep plugin for debugging TCG changes

2020-04-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200428171633.17487-1-alex.ben...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [RFC PATCH] plugins: new lockstep plugin for debugging TCG changes Message-id:

[PATCH 7/9] parallels: Rework truncation logic

2020-04-28 Thread Eric Blake
The parallels driver tries to use truncation for image growth, but can only do so when reads are guaranteed as zero. Now that we have a way to request zero contents from truncation, we can defer the decision to actual allocation attempts rather than up front, reducing the number of places that

[PATCH 6/9] ssh: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-28 Thread Eric Blake
Our .bdrv_has_zero_init_truncate can detect when the remote side always zero fills; we can reuse that same knowledge to implement BDRV_REQ_ZERO_WRITE by ignoring it when the server gives it to us for free. Signed-off-by: Eric Blake --- block/ssh.c | 4 1 file changed, 4 insertions(+) diff

[PATCH 8/9] vhdx: Rework truncation logic

2020-04-28 Thread Eric Blake
The vhdx driver uses truncation for image growth, with a special case for blocks that already read as zero but which are only being partially written. But with a bit of rearranging, it's just as easy to defer the decision on whether truncation resulted in zeroes to the actual allocation attempt,

[PATCH 3/9] nfs: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-28 Thread Eric Blake
Our .bdrv_has_zero_init_truncate returns 1 if we detect that the OS always 0-fills; we can use that same knowledge to implement BDRV_REQ_ZERO_WRITE by ignoring it when the OS gives it to us for free. Signed-off-by: Eric Blake --- block/nfs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 4/9] rbd: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-28 Thread Eric Blake
Our .bdrv_has_zero_init_truncate always returns 1 because rbd always 0-fills; we can use that same knowledge to implement BDRV_REQ_ZERO_WRITE by ignoring it. Signed-off-by: Eric Blake --- block/rbd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/rbd.c b/block/rbd.c index

[PATCH 1/9] gluster: Drop useless has_zero_init callback

2020-04-28 Thread Eric Blake
block.c already defaults to 0 if we don't provide a callback; there's no need to write a callback that always fails. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- block/gluster.c | 14 -- 1 file changed, 14 deletions(-) diff

[PATCH 5/9] sheepdog: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-28 Thread Eric Blake
Our .bdrv_has_zero_init_truncate always returns 1 because sheepdog always 0-fills; we can use that same knowledge to implement BDRV_REQ_ZERO_WRITE by ignoring it. Signed-off-by: Eric Blake --- block/sheepdog.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/sheepdog.c

[PATCH 2/9] file-win32: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-28 Thread Eric Blake
When using bdrv_file, .bdrv_has_zero_init_truncate always returns 1; therefore, we can behave just like file-posix, and always implement BDRV_REQ_ZERO_WRITE by ignoring it since the OS gives it to us for free (note that file-posix.c had to use an 'if' because it shared code between regular files

[PATCH 0/9] More truncate improvements

2020-04-28 Thread Eric Blake
Based-on: <20200424125448.63318-1-kw...@redhat.com> [PATCH v7 00/10] block: Fix resize (extending) of short overlays After reviewing Kevin's work, I questioned if we had a redundancy with bdrv_has_zero_init_truncate. It turns out we do, and this is the result. Patch 1 has been previously posted

Re: [RFC patch v1 2/3] qemu-file: add buffered mode

2020-04-28 Thread Denis Plotnikov
On 28.04.2020 20:54, Dr. David Alan Gilbert wrote: * Denis Plotnikov (dplotni...@virtuozzo.com) wrote: On 27.04.2020 15:14, Dr. David Alan Gilbert wrote: * Denis Plotnikov (dplotni...@virtuozzo.com) wrote: The patch adds ability to qemu-file to write the data asynchronously to improve the

Re: [PATCH 1/2] tpm: tpm-tis-device: set PPI to false by default

2020-04-28 Thread Stefan Berger
On 4/28/20 6:34 AM, Cornelia Huck wrote: On Mon, 27 Apr 2020 16:31:44 +0200 Eric Auger wrote: The tpm-tis-device device does not support PPI. Let's change the default value for the corresponding property instead of tricking this latter in the mach-virt machine. Signed-off-by: Eric Auger ---

Re: [PATCH 2/2] hw/arm/virt: Remove the compat forcing tpm-tis-device PPI to off

2020-04-28 Thread Stefan Berger
On 4/28/20 6:36 AM, Cornelia Huck wrote: On Mon, 27 Apr 2020 16:31:45 +0200 Eric Auger wrote: Now that the tpm-tis-device device PPI property is off by default, we can remove the compat used for the same goal. Signed-off-by: Eric Auger --- hw/arm/virt.c | 5 - 1 file changed, 5

Re: [PATCH RFC v2 9/9] KVM: Dirty ring support

2020-04-28 Thread Peter Xu
On Tue, Apr 28, 2020 at 04:05:09PM -0400, Peter Xu wrote: > +/* > + * Flush all the existing dirty pages to the KVM slot buffers. When > + * this call returns, we guarantee that all the touched dirty pages > + * before calling this function have been put into the per-kvmslot > + * dirty bitmap. >

Re: [PATCH 0/2] virt: Set tpm-tis-device ppi property to off by default

2020-04-28 Thread Stefan Berger
On 4/28/20 6:38 AM, Cornelia Huck wrote: On Mon, 27 Apr 2020 16:31:43 +0200 Eric Auger wrote: Instead of using a compat in the mach-virt machine to force PPI off for all virt machines (PPI not supported by the tpm-tis-device device), let's simply change the default value in the sysbus device.

[PATCH RFC v2 7/9] KVM: Cache kvm slot dirty bitmap size

2020-04-28 Thread Peter Xu
Cache it too because we'll reference it more frequently in the future. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- accel/kvm/kvm-all.c | 1 + include/sysemu/kvm_int.h | 1 + 2 files changed, 2 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index

[PATCH RFC v2 6/9] KVM: Provide helper to sync dirty bitmap from slot to ramblock

2020-04-28 Thread Peter Xu
kvm_physical_sync_dirty_bitmap() calculates the ramblock offset in an awkward way from the MemoryRegionSection that passed in from the caller. The truth is for each KVMSlot the ramblock offset never change for the lifecycle. Cache the ramblock offset for each KVMSlot into the structure when the

[PATCH RFC v2 5/9] KVM: Provide helper to get kvm dirty log

2020-04-28 Thread Peter Xu
Provide a helper kvm_slot_get_dirty_log() to make the function kvm_physical_sync_dirty_bitmap() clearer. We can even cache the as_id into KVMSlot when it is created, so that we don't even need to pass it down every time. Since at it, remove return value of kvm_physical_sync_dirty_bitmap()

[PATCH RFC v2 9/9] KVM: Dirty ring support

2020-04-28 Thread Peter Xu
KVM dirty ring is a new interface to pass over dirty bits from kernel to the userspace. Instead of using a bitmap for each memory region, the dirty ring contains an array of dirtied GPAs to fetch (in the form of offset in slots). For each vcpu there will be one dirty ring that binds to it.

[PATCH RFC v2 8/9] KVM: Add dirty-gfn-count property

2020-04-28 Thread Peter Xu
Add a parameter for dirty gfn count for dirty rings. If zero, dirty ring is disabled. Otherwise dirty ring will be enabled with the per-vcpu gfn count as specified. If dirty ring cannot be enabled due to unsupported kernel or illegal parameter, it'll fallback to dirty logging. By default,

[PATCH RFC v2 3/9] memory: Introduce log_sync_global() to memory listener

2020-04-28 Thread Peter Xu
Some of the memory listener may want to do log synchronization without being able to specify a range of memory to sync but always globally. Such a memory listener should provide this new method instead of the log_sync() method. Obviously we can also achieve similar thing when we put the global

[PATCH RFC v2 4/9] KVM: Create the KVMSlot dirty bitmap on flag changes

2020-04-28 Thread Peter Xu
Previously we have two places that will create the per KVMSlot dirty bitmap: 1. When a newly created KVMSlot has dirty logging enabled, 2. When the first log_sync() happens for a memory slot. The 2nd case is lazy-init, while the 1st case is not (which is a fix of what the 2nd case missed).

[PATCH v22 4/4] iotests: 287: add qcow2 compression type test

2020-04-28 Thread Denis Plotnikov
The test checks fulfilling qcow2 requirements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Tested-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/287 | 152

[PATCH v22 0/4] implement zstd cluster compression method

2020-04-28 Thread Denis Plotnikov
v22: 03: remove assignemnt in if condition v21: 03: * remove the loop on compression [Max] * use designated initializers [Max] 04: * don't erase user's options [Max] * use _rm_test_img [Max] * add unsupported qcow2 options [Max] v20: 04: fix a

[PATCH v22 1/4] qcow2: introduce compression type feature

2020-04-28 Thread Denis Plotnikov
The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image creation and can be changed only later by image conversion, thus

[PATCH v22 2/4] qcow2: rework the cluster compression routine

2020-04-28 Thread Denis Plotnikov
The patch enables processing the image compression type defined for the image and chooses an appropriate method for image clusters (de)compression. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- block/qcow2-threads.c | 71

[PATCH v22 3/4] qcow2: add zstd cluster compression

2020-04-28 Thread Denis Plotnikov
zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in comparison with zlib, which, at the moment, is the only compression method available. The performance test results: Test compresses and

[PATCH RFC v2 1/9] KVM: Fixup kvm_log_clear_one_slot() ioctl return check

2020-04-28 Thread Peter Xu
kvm_vm_ioctl() handles the errno trick already for ioctl() on returning -1 for errors. Fix this. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- accel/kvm/kvm-all.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/accel/kvm/kvm-all.c

[PATCH RFC v2 2/9] linux-headers: Update

2020-04-28 Thread Peter Xu
Signed-off-by: Peter Xu --- include/standard-headers/linux/ethtool.h | 10 +- .../linux/input-event-codes.h | 5 +- include/standard-headers/linux/pci_regs.h | 2 + .../standard-headers/linux/virtio_balloon.h | 1 + include/standard-headers/linux/virtio_ids.h

[PATCH RFC v2 0/9] KVM: Dirty ring support (QEMU part)

2020-04-28 Thread Peter Xu
Still RFC. Firstly, the kernel series is mostly stall recently... Secondly, we still haven't settled on how we should handle the dirty sync in kvm mem removal. This version is based on the other QEMU series: "vl: Sync dirty bitmap when system resets" Another major change of this series is

[PATCH RFC 3/4] vl: Sync dirty bits for system resets during precopy

2020-04-28 Thread Peter Xu
System resets will also reset system memory layout. Although the memory layout after the reset should probably the same as before the reset, we still need to do frequent memory section removals and additions during the reset process. Those operations could accidentally lose per-mem-section

Re: backing chain & block status & filters

2020-04-28 Thread Vladimir Sementsov-Ogievskiy
28.04.2020 19:46, Vladimir Sementsov-Ogievskiy wrote: 28.04.2020 19:18, Eric Blake wrote: On 4/28/20 10:13 AM, Vladimir Sementsov-Ogievskiy wrote: Hm.  I could imagine that there are formats that have non-zero holes (e.g. 0xff or just garbage).  It would be a bit wrong for them to return ZERO

[PATCH RFC 2/4] migration: Introduce migrate_is_precopy()

2020-04-28 Thread Peter Xu
Export a helper globally to check whether we're during a precopy. Signed-off-by: Peter Xu --- include/migration/misc.h | 1 + migration/migration.c| 7 +++ 2 files changed, 8 insertions(+) diff --git a/include/migration/misc.h b/include/migration/misc.h index e338be8c30..b4f6bf7842

[PATCH RFC 4/4] kvm: No need to sync dirty bitmap before memslot removal any more

2020-04-28 Thread Peter Xu
With the system reset dirty sync in qemu_system_reset(), we should be able to drop this operation now. After all it doesn't really fix the problem cleanly because logically we could still have a race [1]. [1] https://lore.kernel.org/qemu-devel/20200327150425.GJ422390@xz-x1/ Signed-off-by: Peter

[PATCH RFC 1/4] migration: Export migration_bitmap_sync_precopy()

2020-04-28 Thread Peter Xu
Make it usable outside migration. To make it easier to use, remove the RAMState parameter since after all ram.c has the reference of ram_state directly from its context. Signed-off-by: Peter Xu --- include/migration/misc.h | 1 + migration/ram.c | 10 +- 2 files changed, 6

[PATCH RFC 0/4] vl: Sync dirty bitmap when system resets

2020-04-28 Thread Peter Xu
This RFC series starts from the fact that we will sync dirty bitmap when removing a memslot for KVM. IIUC that was majorly to maintain the dirty bitmap even across a system reboot. This series wants to move that sync from kvm memslot removal to system reset. (I still don't know why the reset

[PATCH v4 3/3] qcow2: Tweak comment about bitmaps vs. resize

2020-04-28 Thread Eric Blake
Our comment did not actually match the code. Rewrite the comment to be less sensitive to any future changes to qcow2-bitmap.c that might implement scenarios that we currently reject. Signed-off-by: Eric Blake Reviewed-by: Max Reitz --- block/qcow2.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v4 1/3] block: Add blk_new_with_bs() helper

2020-04-28 Thread Eric Blake
There are several callers that need to create a new block backend from an existing BDS; make the task slightly easier with a common helper routine. Suggested-by: Max Reitz Signed-off-by: Eric Blake Message-Id: <20200424190903.522087-2-ebl...@redhat.com> [mreitz: Set @ret only in error paths,

[PATCH v4 2/3] qcow2: Allow resize of images with internal snapshots

2020-04-28 Thread Eric Blake
We originally refused to allow resize of images with internal snapshots because the v2 image format did not require the tracking of snapshot size, making it impossible to safely revert to a snapshot with a different size than the current view of the image. But the snapshot size tracking was

[PATCH v4 0/3] qcow2: Allow resize of images with internal snapshots

2020-04-28 Thread Eric Blake
Re-posting this to make Max' life easier when rebasing on top of Kevin's work. Based-on: <20200424125448.63318-1-kw...@redhat.com> [PATCH v7 00/10] block: Fix resize (extending) of short overlays In v4: - patch 1: fold in Max's touchups to my v3 - patch 1: resolve merge conflict on top of

Re: [PATCH for-5.1 6/7] hw/mips: Add Loongson-3 machine support (with KVM)

2020-04-28 Thread Aleksandar Markovic
Hi. Huacei. Please expand commit message with the description of the machine internal organization (several paragraphs). Also, please include command line for starting the machine. More than one example is better than only one. Specifically, can you explicitly say what is your KVM setup, so

Re: [PATCH v3 1/4] hw/net/can: Introduce Xilinx ZynqMP CAN controller

2020-04-28 Thread Francisco Iglesias
Hi Vikram, A couple of more comments here also. On [2020 Apr 22] Wed 17:56:06, Vikram Garhwal wrote: > XlnxCAN is developed based on SocketCAN, QEMU CAN bus implementation. > Bus connection and socketCAN connection for each CAN module can be set > through command lines. > > Signed-off-by:

Re: [PATCH for-5.1 1/7] configure: Add KVM target support for MIPS64

2020-04-28 Thread Aleksandar Markovic
пон, 27. апр 2020. у 11:33 Huacai Chen је написао/ла: > > Preparing for Loongson-3 virtualization, add KVM target support for > MIPS64 in configure script. > > Signed-off-by: Huacai Chen > Co-developed-by: Jiaxun Yang > --- Huacai, hi. I am really glad this series arrived, and salute your

Re: [Virtio-fs] [PATCH] virtiofsd: Show submounts

2020-04-28 Thread Dr. David Alan Gilbert
* Miklos Szeredi (mszer...@redhat.com) wrote: > On Tue, Apr 28, 2020 at 4:52 PM Stefan Hajnoczi wrote: > > > > On Mon, Apr 27, 2020 at 06:59:02PM +0100, Dr. David Alan Gilbert wrote: > > > * Max Reitz (mre...@redhat.com) wrote: > > > > Currently, setup_mounts() bind-mounts the shared directory

Re: [PATCH for-5.1 5/7] target/mips: Add more CP0 register for save/restore

2020-04-28 Thread Aleksandar Markovic
пон, 27. апр 2020. у 11:36 Huacai Chen је написао/ла: > > Add more CP0 register for save/restore, including: EBase, XContext, > PageGrain, PWBase, PWSize, PWField, PWCtl, Config*, KScratch1~KScratch6. > > Signed-off-by: Huacai Chen > Co-developed-by: Jiaxun Yang > --- > target/mips/kvm.c |

Re: [Virtio-fs] [PATCH] virtiofsd: Show submounts

2020-04-28 Thread Miklos Szeredi
On Tue, Apr 28, 2020 at 4:52 PM Stefan Hajnoczi wrote: > > On Mon, Apr 27, 2020 at 06:59:02PM +0100, Dr. David Alan Gilbert wrote: > > * Max Reitz (mre...@redhat.com) wrote: > > > Currently, setup_mounts() bind-mounts the shared directory without > > > MS_REC. This makes all submounts disappear.

Re: [PATCH v7 04/10] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-28 Thread Eric Blake
On 4/28/20 1:45 PM, Kevin Wolf wrote: Am 28.04.2020 um 18:28 hat Eric Blake geschrieben: On 4/24/20 7:54 AM, Kevin Wolf wrote: If BDRV_REQ_ZERO_WRITE is set and we're extending the image, calling qcow2_cluster_zeroize() with flags=0 does the right thing: It doesn't undo any previous

Re: [PATCH RESEND v6 08/36] multi-process: Add stub functions to facilitate build of multi-process

2020-04-28 Thread Jag Raman
> On Apr 28, 2020, at 12:29 PM, Stefan Hajnoczi wrote: > > On Fri, Apr 24, 2020 at 09:47:56AM -0400, Jag Raman wrote: >>> On Apr 24, 2020, at 9:12 AM, Stefan Hajnoczi wrote: >>> On Wed, Apr 22, 2020 at 09:13:43PM -0700, elena.ufimts...@oracle.com wrote: diff --git a/stubs/Makefile.objs

Re: [PATCH for-5.1 3/7] hw/mips: Add CPU IRQ3 delivery for KVM

2020-04-28 Thread Aleksandar Markovic
уто, 28. апр 2020. у 10:21 chen huacai је написао/ла: > > Hi, Philippe, > > On Mon, Apr 27, 2020 at 5:57 PM Philippe Mathieu-Daudé > wrote: > > > > On 4/27/20 11:33 AM, Huacai Chen wrote: > > > Currently, KVM/MIPS only deliver I/O interrupt via IP2, this patch add > > > IP2 delivery as well,

Re: [PATCH v3 2/4] xlnx-zynqmp: Connect Xilinx ZynqMP CAN controller

2020-04-28 Thread Francisco Iglesias
Hi Vikram, A couple of more comments: On the git summary: s/controller/controllers/ On [2020 Apr 22] Wed 17:56:07, Vikram Garhwal wrote: > Connect CAN0 and CAN1 to ZCU102 board. Perhaps also: s/to ZCU102 board/on the ZynqMP/ (even though zcu102 is the only board using it at the moment). Best

Re: [PATCH 17/17] qom: Drop @errp parameter of object_property_del()

2020-04-28 Thread Eric Blake
On 4/28/20 11:34 AM, Markus Armbruster wrote: Same story as for object_property_add(): the only way object_property_del() can fail is when the property with this name does not exist. Since our property names are all hardcoded, failure is a programming error, and the appropriate way to handle it

Re: [PATCH v7 04/10] qcow2: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-28 Thread Kevin Wolf
Am 28.04.2020 um 18:28 hat Eric Blake geschrieben: > On 4/24/20 7:54 AM, Kevin Wolf wrote: > > If BDRV_REQ_ZERO_WRITE is set and we're extending the image, calling > > qcow2_cluster_zeroize() with flags=0 does the right thing: It doesn't > > undo any previous preallocation, but just adds the zero

Re: [PATCH 1/2] softfloat: m68k: infinity is a valid encoding

2020-04-28 Thread Alex Bennée
KONRAD Frederic writes: > The MC68881 say about infinities (3.2.4): > > "*For the extended precision format, the most significant bit of the > mantissa (the integer bit) is a don't care." > > https://www.nxp.com/docs/en/reference-manual/MC68881UM.pdf > > The m68k extended format is implemented

Re: [PATCH 14/17] Drop more @errp parameters after previous commit

2020-04-28 Thread Eric Blake
On 4/28/20 11:34 AM, Markus Armbruster wrote: Several functions can't fail anymore: ich9_pm_add_properties(), device_add_bootindex_property(), ppc_compat_add_property(), spapr_caps_add_properties(), PropertyInfo.create(). Drop their @errp parameter. Signed-off-by: Markus Armbruster ---

Re: [PATCH 13/17] qom: Drop parameter @errp of object_property_add() & friends

2020-04-28 Thread Eric Blake
On 4/28/20 11:34 AM, Markus Armbruster wrote: The only way object_property_add() can fail is when a property with the same name already exists. Since our property names are all hardcoded, failure is a programming error, and the appropriate way to handle it is passing _abort. Same for its

Re: backing chain & block status & filters

2020-04-28 Thread Kevin Wolf
Am 28.04.2020 um 18:46 hat Vladimir Sementsov-Ogievskiy geschrieben: > 28.04.2020 19:18, Eric Blake wrote: > > On 4/28/20 10:13 AM, Vladimir Sementsov-Ogievskiy wrote: > > > > > > > Hm.  I could imagine that there are formats that have non-zero holes > > > > > (e.g. 0xff or just garbage).  It

Re: [PATCH for-5.1 4/7] target/mips: Add Loongson-3 CPU definition

2020-04-28 Thread Aleksandar Markovic
Huacai, Can you please do machine translation of the document? It can be done via translate.google.com (it accepts pdf files, but does not have download feature, and workaround is to "print to pdf"... Thanks in advance! Aleksandar уто, 28. апр 2020. у 10:26 chen huacai је написао/ла: > > Hi,

[PATCH] s390x/kvm: help valgrind in several places

2020-04-28 Thread Christian Borntraeger
We need some little help in the code to reduce the valgrind noise. - some designated initializers for the cpu model features and subfunctions - mark memory as defined for sida memory reads Signed-off-by: Christian Borntraeger --- target/s390x/kvm.c | 15 +-- 1 file changed, 13

Re: [PATCH 07/17] tests/check-qom-proplist: Improve iterator coverage

2020-04-28 Thread Eric Blake
On 4/28/20 11:34 AM, Markus Armbruster wrote: The tests' "qemu-dummy" device has only class properties. Turn one of them into an instance property. test_dummy_class_iterator() expects one fewer property than test_dummy_iterator(). Rewrite test_dummy_prop_iterator() to take expected properties

Re: [PATCH v3 0/3] qcow2: Allow resize of images with internal snapshots

2020-04-28 Thread Eric Blake
On 4/28/20 7:59 AM, Max Reitz wrote: On 24.04.20 21:09, Eric Blake wrote: In v3: - patch 1: fix error returns [patchew, Max], R-b dropped - patch 2,3: unchanged, so add R-b Eric Blake (3): block: Add blk_new_with_bs() helper qcow2: Allow resize of images with internal snapshots qcow2:

  1   2   3   4   >