Re: [Bug 1837049] Re: qemu-system-ppc segfaults with -display sdl

2020-04-01 Thread Alex Bennée
Andrew Randrianasulu <1837...@bugs.launchpad.net> writes: > I think this one is fixed, I can boot Lubuntu to desktop like this: > > qemu-system-ppc -cdrom /dev/shm/lubuntu-16.04-desktop-powerpc.iso -boot > d -display sdl,gl=on -g 1024x768x32 -M mac99,via=pmu -cpu G4 -device > ES1370 -m 2047

Re: [PATCH v10 10/14] iotests: add hmp helper with logging

2020-04-01 Thread Max Reitz
On 01.04.20 15:51, Kevin Wolf wrote: > Am 01.04.2020 um 14:28 hat Max Reitz geschrieben: >> On 31.03.20 16:00, Kevin Wolf wrote: >>> Am 31.03.2020 um 12:21 hat Max Reitz geschrieben: On 31.03.20 02:00, John Snow wrote: > Minor cleanup for HMP functions; helps with line length and

Re: [PATCH v4] block/nvme: introduce PMR support from NVMe 1.4 spec

2020-04-01 Thread Stefan Hajnoczi
On Tue, Mar 24, 2020 at 10:05:26AM -0700, Andrzej Jakowski wrote: > On 3/23/20 6:28 AM, Stefan Hajnoczi wrote: > > Excellent, thank you! > > > > Reviewed-by: Stefan Hajnoczi > > Awesome, thx! Not sure about process... > Is this patch now staged for inclusion in QEMU? Kevin or Max would

Re: [PATCH] Compress lines for immediate return

2020-04-01 Thread Simran Singhal
Hello Philippe On Wed, Apr 1, 2020 at 7:26 PM Philippe Mathieu-Daudé wrote: > Hi Simran, > > On 4/1/20 2:11 PM, Simran Singhal wrote: > > Compress two lines into a single line if immediate return statement is > found. > > How did you find these changes? Manual audit, some tool? > I wrote

Re: [PATCH 1/6] scripts/coccinelle: add error-use-after-free.cocci

2020-04-01 Thread Markus Armbruster
Peter Maydell writes: > On Wed, 1 Apr 2020 at 06:07, Markus Armbruster wrote: > >> Generic instructions for using .cocci scripts should go into README. >> Enough to get you started if you know nothing about Coccinelle. >> >> Options that should always be used with a certain script should be >>

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

2020-04-01 Thread Denis Plotnikov
The test checks fulfilling qcow2 requiriements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov --- tests/qemu-iotests/287 | 162 + tests/qemu-iotests/287.out | 70

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

2020-04-01 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 v16 3/4] qcow2: add zstd cluster compression

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

Re: [PATCH for-5.0, v1] target/mips: Fix loongson multimedia condition instructions

2020-04-01 Thread Aleksandar Markovic
13:23 Uto, 24.03.2020. Jiaxun Yang је написао/ла: > > Loongson multimedia condition instructions were previously implemented as > write 0 to rd due to lack of documentation. So I just confirmed with Loongson > about their encoding and implemented them correctly. > Hi, Jiaxun, Richard Henderson

[PATCH v16 0/4] qcow2: Implement zstd cluster compression method

2020-04-01 Thread Denis Plotnikov
v16: * 03: ssize_t for ret, size_t for zstd_ret [Vladimir] * 04: small fixes according to the comments [Vladimir] v15: * 01: aiming qemu 5.1 [Eric] * 03: change zstd_res definition place [Vladimir] * 04: add two new test cases [Eric] 1. test adjacent cluster compression

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

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

Re: [PATCH 5/5] block/io: auto-no-fallback for write-zeroes

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
14.03.2020 0:56, Eric Blake wrote: On 3/2/20 4:05 AM, Vladimir Sementsov-Ogievskiy wrote: NBD driver may has max_pwrite_zeroes but doesn't has max_pwrite_zeroes_no_fallback limit. This means, that (when BDRV_REQ_NO_FALLBACK is supported) it is beneficial to try send request with

Re: [PATCH] target/i386: do not set unsupported VMX secondary execution controls

2020-04-01 Thread Vitaly Kuznetsov
"Montes, Julio" writes: >> Does you kernel have 95c5c7c77c ("KVM: nVMX: list VMX MSRs in >> KVM_GET_MSR_INDEX_LIST")? > > I was using linux 5.0.0, now I have 5.3.0 and it's working, thanks for fixing > this > Thanks for the confirmation! I don't see any good solution for kernels without

Re: [PATCH] target/i386: do not set unsupported VMX secondary execution controls

2020-04-01 Thread Montes, Julio
> Does you kernel have 95c5c7c77c ("KVM: nVMX: list VMX MSRs in > KVM_GET_MSR_INDEX_LIST")? I was using linux 5.0.0, now I have 5.3.0 and it's working, thanks for fixing this From: Vitaly Kuznetsov Sent: Wednesday, April 1, 2020 1:05 AM To: Montes, Julio Cc:

Re: [PATCH 3/5] block: add max_pwrite_zeroes_no_fallback to BlockLimits

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
14.03.2020 0:07, Eric Blake wrote: On 3/2/20 4:05 AM, Vladimir Sementsov-Ogievskiy wrote: NBD spec is updated, so that max_block doesn't relate to Maybe: The NBD spec was recently updated to clarify that max_block... NBD_CMD_WRITE_ZEROES with NBD_CMD_FLAG_FAST_ZERO (which mirrors Qemu flag

Re: [PATCH for-5.0?] qemu-img: Report convert errors by bytes, not sectors

2020-04-01 Thread Eric Blake
On 4/1/20 3:33 AM, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20200331222442.273158-1-ebl...@redhat.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it

Re: Questionable aspects of QEMU Error's design

2020-04-01 Thread Alex Bennée
Vladimir Sementsov-Ogievskiy writes: > 01.04.2020 12:02, Markus Armbruster wrote: >> QEMU's Error was patterned after GLib's GError. Differences include: >> * _fatal, _abort for convenience >> * Error can optionally store hints >> * Pointlessly different names: error_prepend() vs.

Re: [PATCH] Compress lines for immediate return

2020-04-01 Thread Philippe Mathieu-Daudé
Hi Simran, On 4/1/20 2:11 PM, Simran Singhal wrote: Compress two lines into a single line if immediate return statement is found. How did you find these changes? Manual audit, some tool? It also remove variables progress, val, data, ret and sock as they are no longer needed. Remove space

Re: [PATCH v10 10/14] iotests: add hmp helper with logging

2020-04-01 Thread Kevin Wolf
Am 01.04.2020 um 14:28 hat Max Reitz geschrieben: > On 31.03.20 16:00, Kevin Wolf wrote: > > Am 31.03.2020 um 12:21 hat Max Reitz geschrieben: > >> On 31.03.20 02:00, John Snow wrote: > >>> Minor cleanup for HMP functions; helps with line length and consolidates > >>> HMP helpers through one

[Bug 1870098] Re: [block/vpc] cynamic disk header: off-by-one error for "num_bat_entries"

2020-04-01 Thread Kevin Wolf
Is there any actual bug resulting from this that you're observing? As I read the spec, having a longer BAT is merely unconventional, not strictly wrong. So if another application fails to deal with such images, it's probably a bug in that application. Of course, I can't see a reason for making

Re: [PATCH] Compress lines for immediate return

2020-04-01 Thread Dr. David Alan Gilbert
* Simran Singhal (singhalsimr...@gmail.com) wrote: > Compress two lines into a single line if immediate return statement is found. > > It also remove variables progress, val, data, ret and sock > as they are no longer needed. > > Remove space between function "mixer_load" and '(' to fix the >

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

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
01.04.2020 13:12, Denis Plotnikov wrote: The test checks fulfilling qcow2 requiriements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov --- tests/qemu-iotests/287 | 159 +

Re: [PATCH v3 1/1] vl/s390x: fixup ram sizes for compat machines

2020-04-01 Thread David Hildenbrand
On 01.04.20 14:37, Christian Borntraeger wrote: > Older QEMU versions did fixup the ram size to match what can be reported > via sclp. We need to mimic this behaviour for machine types 4.2 and > older to not fail on inbound migration for memory sizes that do not fit. > Old machines with proper

Re: [RFC 0/9] Add an interVM memory sharing device

2020-04-01 Thread Igor Kotrasiński
On 10.02.2020 14:01, Igor Kotrasiński wrote: > On 2/7/20 5:33 PM, Stefan Hajnoczi wrote: >> On Fri, Feb 07, 2020 at 11:04:03AM +0100, Igor Mammedov wrote: >>> On Fri, 7 Feb 2020 10:00:50 +0100 >>> Igor Kotrasiński wrote: >>> On 2/5/20 3:49 PM, Jan Kiszka wrote: > On 05.02.20 15:39,

Re: Questionable aspects of QEMU Error's design

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
01.04.2020 15:44, Daniel P. Berrangé wrote: On Wed, Apr 01, 2020 at 11:02:11AM +0200, Markus Armbruster wrote: QEMU's Error was patterned after GLib's GError. Differences include: * _fatal, _abort for convenience I think this doesn't really need to exist, and is an artifact of the later

Re: [PATCH v3 1/1] vl/s390x: fixup ram sizes for compat machines

2020-04-01 Thread Christian Borntraeger
On 01.04.20 14:37, Christian Borntraeger wrote: > +if (sz != newsz) { > +qemu_printf("Ram size %" PRIu64 "MB was fixed up to %" PRIu64 > +"MB to match machine restrictions. Consider updating " > +"the guest definition.i\n", sz / MiB, newsz /

Re: Questionable aspects of QEMU Error's design

2020-04-01 Thread Daniel P . Berrangé
On Wed, Apr 01, 2020 at 11:02:11AM +0200, Markus Armbruster wrote: > QEMU's Error was patterned after GLib's GError. Differences include: > > * _fatal, _abort for convenience I think this doesn't really need to exist, and is an artifact of the later point "return values" where we commonly make

Re: [PATCH v10 10/14] iotests: add hmp helper with logging

2020-04-01 Thread Max Reitz
On 01.04.20 14:28, Max Reitz wrote: > On 31.03.20 16:00, Kevin Wolf wrote: >> Am 31.03.2020 um 12:21 hat Max Reitz geschrieben: >>> On 31.03.20 02:00, John Snow wrote: Minor cleanup for HMP functions; helps with line length and consolidates HMP helpers through one implementation

Re: [PATCH v10 10/14] iotests: add hmp helper with logging

2020-04-01 Thread Max Reitz
On 31.03.20 19:39, Kevin Wolf wrote: > Am 31.03.2020 um 19:23 hat John Snow geschrieben: >> >> >> On 3/31/20 6:21 AM, Max Reitz wrote: >>> On 31.03.20 02:00, John Snow wrote: Minor cleanup for HMP functions; helps with line length and consolidates HMP helpers through one implementation

[PATCH v3 1/1] vl/s390x: fixup ram sizes for compat machines

2020-04-01 Thread Christian Borntraeger
Older QEMU versions did fixup the ram size to match what can be reported via sclp. We need to mimic this behaviour for machine types 4.2 and older to not fail on inbound migration for memory sizes that do not fit. Old machines with proper aligned memory sizes are not affected. Alignment table:

Re: [PATCH v10 10/14] iotests: add hmp helper with logging

2020-04-01 Thread Max Reitz
On 31.03.20 16:00, Kevin Wolf wrote: > Am 31.03.2020 um 12:21 hat Max Reitz geschrieben: >> On 31.03.20 02:00, John Snow wrote: >>> Minor cleanup for HMP functions; helps with line length and consolidates >>> HMP helpers through one implementation function. >>> >>> Although we are adding a

[Bug 1847525] Re: qemu-system-i386 eats a lot of cpu after just few hours, with sdl, gl=on

2020-04-01 Thread Andrew Randrianasulu
this one still with me. qemu-system-x86_64 --version QEMU emulator version 4.2.91 (v5.0.0-rc1-dirty) on 32-bit host (Slackware, but with 64-bit kernel) compiled with gcc 5.5.0 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

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

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
01.04.2020 13:12, 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

[Bug 1837049] Re: qemu-system-ppc segfaults with -display sdl

2020-04-01 Thread Andrew Randrianasulu
I think this one is fixed, I can boot Lubuntu to desktop like this: qemu-system-ppc -cdrom /dev/shm/lubuntu-16.04-desktop-powerpc.iso -boot d -display sdl,gl=on -g 1024x768x32 -M mac99,via=pmu -cpu G4 -device ES1370 -m 2047 -accel tcg,tb-size=384 -device usb-mouse without any crash, tried few

Re: Questionable aspects of QEMU Error's design

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
01.04.2020 15:10, Vladimir Sementsov-Ogievskiy wrote: 01.04.2020 12:02, Markus Armbruster wrote: QEMU's Error was patterned after GLib's GError.  Differences include: * _fatal, _abort for convenience * Error can optionally store hints * Pointlessly different names: error_prepend() vs.

[PATCH] Compress lines for immediate return

2020-04-01 Thread Simran Singhal
Compress two lines into a single line if immediate return statement is found. It also remove variables progress, val, data, ret and sock as they are no longer needed. Remove space between function "mixer_load" and '(' to fix the checkpatch.pl error:- ERROR: space prohibited between function name

Re: Questionable aspects of QEMU Error's design

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
01.04.2020 12:02, Markus Armbruster wrote: QEMU's Error was patterned after GLib's GError. Differences include: * _fatal, _abort for convenience * Error can optionally store hints * Pointlessly different names: error_prepend() vs. g_error_prefix() and so forth *shrug* * Propagating

Re: [PATCH v2] vl/s390: fixup ram sizes for compat machines

2020-04-01 Thread Cornelia Huck
On Wed, 1 Apr 2020 14:04:17 +0200 David Hildenbrand wrote: > > something like > > > > while ((sz >> increment_size) > MAX_STORAGE_INCREMENTS) { > > increment_size++; > > } > > newsz = sz >> increment_size << increment_size; > > > > if (sz != newsz) { > >

Re: [PATCH v2] vl/s390: fixup ram sizes for compat machines

2020-04-01 Thread David Hildenbrand
> something like > > while ((sz >> increment_size) > MAX_STORAGE_INCREMENTS) { > increment_size++; > } > newsz = sz >> increment_size << increment_size; > > if (sz != newsz) { > qemu_printf("Ram size %" PRIu64 "MB was fixed up to %" PRIu64 Maybe warn_report()

Re: [PATCH v2] vl/s390: fixup ram sizes for compat machines

2020-04-01 Thread Christian Borntraeger
On 01.04.20 10:58, David Hildenbrand wrote: > On 01.04.20 10:50, Christian Borntraeger wrote: >> Older QEMU versions did fixup the ram size to match what can be reported >> via sclp. We need to mimic this behaviour for machine types 4.2 and >> older to not fail on inbound migration for memory

[Bug 1868055] Re: cannot run golang app with docker, version 17.09.1-ce, disabling core 0 and qemu-arm, version 2.7.

2020-04-01 Thread Dongwhan Kim
Hello! Peter and Laurent, Thanks for your kind & rapid reply. It took long to merge the patch Peter mentioned. After applying the patch the problem is gone but I found new issue. When I had tried to test for the first time after making new docker container it took much longer time. bash-3.2#

Re: [PATCH v16 QEMU 07/16] vfio: Add migration state change notifier

2020-04-01 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > Added migration state change notifier to get notification on migration state > change. These states are translated to VFIO device state and conveyed to > vendor > driver. > > Signed-off-by: Kirti Wankhede > Reviewed-by: Neo Jia > --- >

Re: [PATCH v1] usb: Add read support for HCIVERSION register to XHCI

2020-04-01 Thread Cédric Le Goater
Hello, On 3/31/20 1:02 PM, Philippe Mathieu-Daudé wrote: > On 3/31/20 11:57 AM, Cameron Esfahani wrote: >> Philippe - >>  From what I've seen, access size has nothing to do with alignment. > > Yes, I was wondering if you were using unaligned accesses. > > I *think* the correct fix is in the

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-04-01 Thread David Hildenbrand
On 31.03.20 18:27, Nadav Amit wrote: >> On Mar 31, 2020, at 6:32 AM, David Hildenbrand wrote: >> >> On 31.03.20 15:24, Michael S. Tsirkin wrote: >>> On Tue, Mar 31, 2020 at 12:35:24PM +0200, David Hildenbrand wrote: On 26.03.20 10:49, Michael S. Tsirkin wrote: > On Thu, Mar 26, 2020 at

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

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
01.04.2020 10:02, Denis Plotnikov wrote: On 01.04.2020 08:49, Vladimir Sementsov-Ogievskiy wrote: 31.03.2020 20:44, Denis Plotnikov wrote: zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in

Re: [PATCH-for-5.1 7/7] target/sparc/int32_helper: Extract and use excp_name_str()

2020-04-01 Thread KONRAD Frederic
Le 3/31/20 à 12:50 PM, Philippe Mathieu-Daudé a écrit : Improve exception error report: Before: qemu: fatal: Trap 0x06 while interrupts disabled, Error state After: qemu: fatal: Trap 0x06 (Window Underflow) while interrupts disabled, Error state Signed-off-by: Philippe

Re: [PATCH v2] vl/s390: fixup ram sizes for compat machines

2020-04-01 Thread Cornelia Huck
On Wed, 1 Apr 2020 13:01:43 +0200 Christian Borntraeger wrote: > On 01.04.20 12:13, Cornelia Huck wrote: > > On Wed, 1 Apr 2020 04:50:14 -0400 > > Christian Borntraeger wrote: > > > >> Older QEMU versions did fixup the ram size to match what can be reported > >> via sclp. We need to mimic

Re: [PATCH-for-5.1 6/7] target/sparc/int32_helper: Remove DEBUG_PCALL definition

2020-04-01 Thread KONRAD Frederic
Le 3/31/20 à 12:50 PM, Philippe Mathieu-Daudé a écrit : We define DEBUG_PCALL since b884fc5e (2012-10-06). 7.5 years later it is safe to assume we can remove it :) Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/int32_helper.c | 5 - 1 file changed, 5 deletions(-) diff --git

Re: [PATCH 1/6] scripts/coccinelle: add error-use-after-free.cocci

2020-04-01 Thread Peter Maydell
On Wed, 1 Apr 2020 at 06:07, Markus Armbruster wrote: > Generic instructions for using .cocci scripts should go into README. > Enough to get you started if you know nothing about Coccinelle. > > Options that should always be used with a certain script should be > documented in that script. > >

Re: [PATCH v2] vl/s390: fixup ram sizes for compat machines

2020-04-01 Thread Christian Borntraeger
On 01.04.20 12:13, Cornelia Huck wrote: > On Wed, 1 Apr 2020 04:50:14 -0400 > Christian Borntraeger wrote: > >> Older QEMU versions did fixup the ram size to match what can be reported >> via sclp. We need to mimic this behaviour for machine types 4.2 and >> older to not fail on inbound

Re: [PATCH-for-5.1 5/7] hw/timer/grlib_gptimer: Display frequency in decimal

2020-04-01 Thread KONRAD Frederic
Le 3/31/20 à 12:50 PM, Philippe Mathieu-Daudé a écrit : Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/trace-events b/hw/timer/trace-events index 29fda7870e..96a6c9138c 100644 ---

Re: [PATCH-for-5.1 4/7] hw/misc/grlib_ahb_apb_pnp: Add trace events on read accesses

2020-04-01 Thread KONRAD Frederic
Le 3/31/20 à 12:50 PM, Philippe Mathieu-Daudé a écrit : Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/grlib_ahb_apb_pnp.c | 13 +++-- hw/misc/trace-events| 4 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/misc/grlib_ahb_apb_pnp.c

Re: [PATCH-for-5.0 3/7] hw/misc/grlib_ahb_apb_pnp: Fix AHB PnP 8-bit accesses

2020-04-01 Thread KONRAD Frederic
Le 3/31/20 à 12:50 PM, Philippe Mathieu-Daudé a écrit : The Plug & Play region of the AHB/APB bridge can be accessed by various word size, however the implementation is clearly restricted to 32-bit: static uint64_t grlib_ahb_pnp_read(void *opaque, hwaddr offset, unsigned size) {

Re: [PATCH-for-5.0 2/7] hw/misc/grlib_ahb_apb_pnp: Avoid crash when writing to AHB PnP registers

2020-04-01 Thread KONRAD Frederic
Le 3/31/20 à 12:50 PM, Philippe Mathieu-Daudé a écrit : Similarly to commit 158b659451 with the APB PnP registers, guests can crash QEMU when writting to the AHB PnP registers: $ echo 'writeb 0xf042 69' | qemu-system-sparc -M leon3_generic -S -bios /etc/magic -qtest stdio [I

Re: [PATCH v7 00/41] target/arm: Implement ARMv8.1-VHE

2020-04-01 Thread Jonathan Cameron
On Tue, 31 Mar 2020 11:59:13 -0700 Richard Henderson wrote: > On 3/31/20 8:33 AM, Jonathan Cameron wrote: > > Just wondering if there are any known issues with this? > > Nope. It works for me. > Can you give us any more details. > Unfortunately not a lot more to add. I ran some sanity

Re: bdrv_drained_begin deadlock with io-threads

2020-04-01 Thread Kevin Wolf
Am 31.03.2020 um 18:18 hat Dietmar Maurer geschrieben: > > > Looks bdrv_parent_drained_poll_single() calls > > > blk_root_drained_poll(), which return true in my case (in_flight > 5). > > > > Can you identify which BlockBackend is this? Specifically if it's the > > one attached to a guest device

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

2020-04-01 Thread Denis Plotnikov
The test checks fulfilling qcow2 requiriements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov --- tests/qemu-iotests/287 | 159 + tests/qemu-iotests/287.out | 70

Re: [PATCH v2] vl/s390: fixup ram sizes for compat machines

2020-04-01 Thread Cornelia Huck
On Wed, 1 Apr 2020 04:50:14 -0400 Christian Borntraeger wrote: > Older QEMU versions did fixup the ram size to match what can be reported > via sclp. We need to mimic this behaviour for machine types 4.2 and > older to not fail on inbound migration for memory sizes that do not fit. > Old

[PATCH v15 0/4] qcow2: Implement zstd cluster compression method

2020-04-01 Thread Denis Plotnikov
v15: * 01: aiming qemu 5.1 [Eric] * 03: change zstd_res definition place [Vladimir] * 04: add two new test cases [Eric] 1. test adjacent cluster compression with zstd 2. test incompressible cluster processing * 03, 04: many rewording and gramma fixing [Eric] v14:

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

2020-04-01 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 v15 3/4] qcow2: add zstd cluster compression

2020-04-01 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 v15 2/4] qcow2: rework the cluster compression routine

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

[Bug 1869426] Re: 5.0rc0->4.2 serial migraiton

2020-04-01 Thread Dr. David Alan Gilbert
Fix posted: https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg08803.html -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1869426 Title: 5.0rc0->4.2 serial migraiton Status in QEMU: New

[Bug 1870098] [NEW] [block/vpc] cynamic disk header: off-by-one error for "num_bat_entries"

2020-04-01 Thread Tobias Witek
Public bug reported: In current qemu versions (observed in 5.0.0-rc1 as well as 2833ad487cfff7dc33703e4731b75facde1c561e), disk headers for dynamic VPCs are written with an incorrect "block allocation table entries" value. https://www.microsoft.com/en-us/download/details.aspx?id=23850 (the

Re: [RFC for Linux] virtio_balloon: Add VIRTIO_BALLOON_F_THP_ORDER to handle THP spilt issue

2020-04-01 Thread David Hildenbrand
On 31.03.20 18:37, Nadav Amit wrote: >> On Mar 31, 2020, at 7:09 AM, David Hildenbrand wrote: >> >> On 31.03.20 16:07, Michael S. Tsirkin wrote: >>> On Tue, Mar 31, 2020 at 04:03:18PM +0200, David Hildenbrand wrote: On 31.03.20 15:37, Michael S. Tsirkin wrote: > On Tue, Mar 31, 2020 at

[PATCH v2 10/10] linux-user: completely re-write init_guest_space

2020-04-01 Thread Alex Bennée
This tries to simplify the init_guest_space code to be a little less convoluted and remove the brute force mapping algorithm that gets tripped up so badly by the sanitizers. We first try to do what is requested by the host. Failing that we try and satisfy the guest requested base address. If all

[PATCH v2 09/10] linux-user: clean-up padding on /proc/self/maps

2020-04-01 Thread Alex Bennée
Don't use magic spaces, calculate the justification for the file field like the kernel does with seq_pad. Signed-off-by: Alex Bennée --- linux-user/syscall.c | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/linux-user/syscall.c

[PATCH v2 06/10] gdbstub: fix compiler complaining

2020-04-01 Thread Alex Bennée
From: Denis Plotnikov ./gdbstub.c: In function ‘handle_query_thread_extra’: /usr/include/glib-2.0/glib/glib-autocleanups.h:28:10: error: ‘cpu_name’ may be used uninitialized in this function [-Werror=maybe-uninitialized] g_free (*pp); ^

[PATCH v2 07/10] softfloat: Fix BAD_SHIFT from normalizeFloatx80Subnormal

2020-04-01 Thread Alex Bennée
From: Richard Henderson All other calls to normalize*Subnormal detect zero input before the call -- this is the only outlier. This case can happen with +0.0 + +0.0 = +0.0 or -0.0 + -0.0 = -0.0, so return a zero of the correct sign. Reported-by: Coverity (CID 1421991) Signed-off-by: Richard

[PATCH v2 02/10] linux-user: protect fcntl64 with an #ifdef

2020-04-01 Thread Alex Bennée
Checking TARGET_ABI_BITS is sketchy - we should check for the presence of the define to be sure. Also clean up the white space while we are there. Signed-off-by: Alex Bennée Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson --- linux-user/syscall.c | 8 1 file changed, 4

[PATCH v2 04/10] linux-user: more debug for init_guest_space

2020-04-01 Thread Alex Bennée
Searching for memory space can cause problems so lets extend the CPU_LOG_PAGE output so you can watch init_guest_space fail to allocate memory. A more involved fix is actually required to make this function play nicely with the large guard pages the sanitiser likes to use. Signed-off-by: Alex

[PATCH v2 08/10] linux-user: factor out reading of /proc/self/maps

2020-04-01 Thread Alex Bennée
Unfortunately reading /proc/self/maps is still considered the gold standard for a process finding out about it's own memory layout. As we will want this data in other contexts soon factor out the code to read and parse the data. Rather than just blindly copying the existing sscanf based code we

[PATCH v2 05/10] target/xtensa: add FIXME for translation memory leak

2020-04-01 Thread Alex Bennée
Dynamically allocating a new structure within the DisasContext can potentially leak as we can longjmp out of the translation loop (see test_phys_mem). The proper fix would be to use static allocation within the DisasContext but as the Xtensa translator imports it's code from elsewhere I leave that

[PATCH v2 03/10] tests/tcg: remove extraneous pasting macros

2020-04-01 Thread Alex Bennée
We are not using them and they just get in the way. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- tests/tcg/x86_64/system/boot.S | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/tcg/x86_64/system/boot.S

[PATCH v2 01/10] elf-ops: bail out if we have no function symbols

2020-04-01 Thread Alex Bennée
It's perfectly possible to have no function symbols in your elf file and if we do the undefined behaviour sanitizer rightly complains about us passing NULL to qsort. Check nsyms before we go ahead. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson

[PATCH for 5.0 v2 00/10] A selection of sanitiser fixes

2020-04-01 Thread Alex Bennée
Hi, Here is version 2 of my random fixes series. I've swapped out my fix to softfloat for Richard's better targeted fix. I also did a re-factor to init_guest_space so we can use the sanitizer builds on more of the guests. Initial testing is showing up a few more issues but I didn't want to hold

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-01 Thread Stefan Hajnoczi
On Thu, Mar 26, 2020 at 09:47:38AM +, Thanos Makatos wrote: > Build MUSER with vfio-over-socket: > > git clone --single-branch --branch vfio-over-socket > g...@github.com:tmakatos/muser.git > cd muser/ > git submodule update --init > make > > Run device

Re: [PATCH] qemu-options.hx: 9p: clarify -virtfs vs. -fsdev

2020-04-01 Thread Christian Schoenebeck
On Dienstag, 31. März 2020 18:10:33 CEST Cornelia Huck wrote: > > >> Huh. This prompted me to try this on s390, and it actually creates a > > >> virtio-9p-pci device there as well, not a virtio-9p-ccw device. A bit > > >> surprising; but I don't see 9p used much (if at all) on s390 anyway. > > >

Questionable aspects of QEMU Error's design

2020-04-01 Thread Markus Armbruster
QEMU's Error was patterned after GLib's GError. Differences include: * _fatal, _abort for convenience * Error can optionally store hints * Pointlessly different names: error_prepend() vs. g_error_prefix() and so forth *shrug* * Propagating errors Thanks to Vladimir, we'll soon have "auto

Re: [PATCH v2] vl/s390: fixup ram sizes for compat machines

2020-04-01 Thread David Hildenbrand
On 01.04.20 10:50, Christian Borntraeger wrote: > Older QEMU versions did fixup the ram size to match what can be reported > via sclp. We need to mimic this behaviour for machine types 4.2 and > older to not fail on inbound migration for memory sizes that do not fit. > Old machines with proper

Re: [RFC PATCH v2 1/7] vfio-ccw: Return IOINST_CC_NOT_OPERATIONAL for EIO

2020-04-01 Thread Cornelia Huck
On Wed, 25 Mar 2020 03:24:28 +0100 Halil Pasic wrote: > On Tue, 24 Mar 2020 18:04:30 +0100 > Cornelia Huck wrote: > > > On Thu, 6 Feb 2020 22:45:03 +0100 > > Eric Farman wrote: > > > > > From: Farhan Ali > > > > > > EIO is returned by vfio-ccw mediated device when the backing > > > host

[PATCH v2] vl/s390: fixup ram sizes for compat machines

2020-04-01 Thread Christian Borntraeger
Older QEMU versions did fixup the ram size to match what can be reported via sclp. We need to mimic this behaviour for machine types 4.2 and older to not fail on inbound migration for memory sizes that do not fit. Old machines with proper aligned memory sizes are not affected. Alignment table:

Re: [PATCH for-5.0?] qemu-img: Report convert errors by bytes, not sectors

2020-04-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200331222442.273158-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 ===

[Bug 1811533] Re: Unstable Win10 guest with qemu 3.1 + huge pages + hv_stimer

2020-04-01 Thread Dr. David Alan Gilbert
** Changed in: qemu Status: Confirmed => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1811533 Title: Unstable Win10 guest with qemu 3.1 + huge pages + hv_stimer Status in

Re: [PATCH for-5.0?] qemu-img: Report convert errors by bytes, not sectors

2020-04-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200331222442.273158-1-ebl...@redhat.com/ Hi, This series failed the asan 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 === #!/bin/bash

[Bug 1811533] Re: Unstable Win10 guest with qemu 3.1 + huge pages + hv_stimer

2020-04-01 Thread Žilvinas Žaltiena
I have been using this patch https://patchwork.kernel.org/patch/11346881/ on qemu 4.2 as a fix since January without any ill effects. It is already included into qemu 5.0 rc0 and rc1, so it seems qemu 5.0 will be free from this bug. -- You received this bug notification because you are a member

[Bug 1870039] [NEW] windows qemu-img fails to convert vhdx, assertion failure

2020-04-01 Thread Rafael Rivera
Public bug reported: When attempting to convert Microsoft's 10X emulator image (19563) vhdx [1], qemu-img terminates abruptly with an assertion failure. (Newer versions of the vhdx exhibit the same issue.) > qemu-img.exe convert flash.vhdx flash.vhd ** ERROR:util/iov.c:335:qemu_iovec_concat_iov:

[PATCH v4 1/3] job: take each job's lock individually in job_txn_apply

2020-04-01 Thread Stefan Reiter
All callers of job_txn_apply hold a single job's lock, but different jobs within a transaction can have different contexts, thus we need to lock each one individually before applying the callback function. Similar to job_completed_txn_abort this also requires releasing the caller's context before

[PATCH v4 0/3] Fix some AIO context locking in jobs

2020-04-01 Thread Stefan Reiter
Contains three seperate but related patches cleaning up and fixing some issues regarding aio_context_acquire/aio_context_release for jobs. Mostly affects blockjobs running for devices that have IO threads enabled AFAICT. This is based on the discussions here:

[PATCH v4 3/3] backup: don't acquire aio_context in backup_clean

2020-04-01 Thread Stefan Reiter
All code-paths leading to backup_clean (via job_clean) have the job's context already acquired. The job's context is guaranteed to be the same as the one used by backup_top via backup_job_create. Since the previous logic effectively acquired the lock twice, this broke cleanup of backups for disks

[PATCH v4 2/3] replication: acquire aio context before calling job_cancel_sync

2020-04-01 Thread Stefan Reiter
job_cancel_sync requires the job's lock to be held, all other callers already do this (replication_stop, drive_backup_abort, blockdev_backup_abort, job_cancel_sync_all, cancel_common). Signed-off-by: Stefan Reiter --- block/replication.c | 8 +++- 1 file changed, 7 insertions(+), 1

Re: Qemu TCG Plugins - how to access guest registers?

2020-04-01 Thread Alex Bennée
Benjamin writes: >> >> You don't need the registers at that point because at run time QEMU will >> have already resolved the address and will pass it via the >> qemu_plugin_register_vcpu_mem_cb. The hotpages and mem plugin examples >> demonstrate the use of the API. >> > > The way you

Re: [PATCH v2 09/22] vfio/common: init HostIOMMUContext per-container

2020-04-01 Thread Auger Eric
Hi Yi, On 3/30/20 6:24 AM, Liu Yi L wrote: > In this patch, QEMU firstly gets iommu info from kernel to check the > supported capabilities by a VFIO_IOMMU_TYPE1_NESTING iommu. And inits > HostIOMMUContet instance. > > Cc: Kevin Tian > Cc: Jacob Pan > Cc: Peter Xu > Cc: Eric Auger > Cc: Yi

RE: [PATCH for-5.0 2/3] fw_cfg: Migrate ACPI table mr sizes separately

2020-04-01 Thread Shameerali Kolothum Thodi
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: 31 March 2020 16:03 > To: Shameerali Kolothum Thodi > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; > eric.au...@redhat.com; imamm...@redhat.com; peter.mayd...@linaro.org; > shannon.zha...@gmail.com;

RE: [PATCH for-5.0 2/3] fw_cfg: Migrate ACPI table mr sizes separately

2020-04-01 Thread Shameerali Kolothum Thodi
> -Original Message- > From: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com] > Sent: 31 March 2020 11:46 > To: Shameerali Kolothum Thodi > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; > eric.au...@redhat.com; imamm...@redhat.com; peter.mayd...@linaro.org; >

Re: [PATCH v2 3/3] migration: move the units of migrate parameters from milliseconds to ms

2020-04-01 Thread Stefano Garzarella
On Tue, Mar 31, 2020 at 04:22:07PM +0800, Mao Zhongyi wrote: > Signed-off-by: Mao Zhongyi > Reviewed-by: Juan Quintela > --- > migration/migration.c | 2 +- > monitor/hmp-cmds.c| 8 > 2 files changed, 5 insertions(+), 5 deletions(-) Thank you for these changes! Reviewed-by:

Re: [kvm-unit-tests PATCH v3] s390x: Add stsi 3.2.2 tests

2020-04-01 Thread Cornelia Huck
On Wed, 1 Apr 2020 09:20:49 +0200 Janosch Frank wrote: > On 3/31/20 7:24 PM, David Hildenbrand wrote: > > On 31.03.20 11:35, Cornelia Huck wrote: > >> On Tue, 31 Mar 2020 03:14:56 -0400 > >> Janosch Frank wrote: > >> > >>> Subcode 3.2.2 is handled by KVM/QEMU and should therefore be tested

Re: [kvm-unit-tests PATCH v3] s390x: Add stsi 3.2.2 tests

2020-04-01 Thread Janosch Frank
On 3/31/20 7:24 PM, David Hildenbrand wrote: > On 31.03.20 11:35, Cornelia Huck wrote: >> On Tue, 31 Mar 2020 03:14:56 -0400 >> Janosch Frank wrote: >> >>> Subcode 3.2.2 is handled by KVM/QEMU and should therefore be tested >>> a bit more thorough. >> >> s/thorough/thoroughly/ ? > > I fixed that

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

2020-04-01 Thread Denis Plotnikov
On 31.03.2020 21:43, Eric Blake wrote: On 3/31/20 12:44 PM, Denis Plotnikov wrote: The test checks fulfilling qcow2 requiriements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy ---  

Re: [PATCH] target/i386: do not set unsupported VMX secondary execution controls

2020-04-01 Thread Vitaly Kuznetsov
"Dr. David Alan Gilbert" writes: > So you would think that would tkae care of RDSEED exiting - but what > about VMCS shadowing? > SECONDARY_EXEC_SHADOW_VMCS is special, we are able to emulate it in KVM even when it is not supported by hardware, see nested_vmx_setup_ctls_msrs(): /*

<    1   2   3   >