Re: Questionable aspects of QEMU Error's design

2020-04-01 Thread Markus Armbruster
Peter Maydell writes: > On Wed, 1 Apr 2020 at 10:03, Markus Armbruster wrote: >> >> QEMU's Error was patterned after GLib's GError. Differences include: > > From my POV the major problem with Error as we have it today > is that it makes the simple process of writing code like > device realize

Re: [PATCH v3 0/3] hw/riscv: Add a serial property to sifive_u

2020-04-01 Thread Bin Meng
On Tue, Mar 24, 2020 at 10:08 AM Bin Meng wrote: > > Hi Palmer, > > On Sat, Mar 7, 2020 at 5:45 AM Alistair Francis > wrote: > > > > At present the board serial number is hard-coded to 1, and passed > > to OTP model during initialization. Firmware (FSBL, U-Boot) uses > > the serial number to

Re: Question about scsi device hotplug (e.g scsi-hd)

2020-04-01 Thread Markus Armbruster
Paolo Bonzini writes: > On 01/04/20 17:09, Stefan Hajnoczi wrote: >>> What do you think about it? >> >> Maybe aio_disable_external() is needed to postpone device emulation >> until after realize has finished? >> >> Virtqueue kick ioeventfds are marked "external" and won't be processed >> while

Re: Questionable aspects of QEMU Error's design

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
01.04.2020 23:15, Peter Maydell wrote: On Wed, 1 Apr 2020 at 10:03, Markus Armbruster wrote: QEMU's Error was patterned after GLib's GError. Differences include: From my POV the major problem with Error as we have it today is that it makes the simple process of writing code like device

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

2020-04-01 Thread teawater
> 2020年4月1日 17:48,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,

Re: [PATCH] util/async: Add memory barrier to aio_ctx_prepare

2020-04-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200402011803.1270-1-fangyi...@huawei.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] util/async: Add memory barrier to aio_ctx_prepare Message-id:

[PATCH v2] util/async: Add memory barrier to aio_ctx_prepare

2020-04-01 Thread Ying Fang
Qemu main thread is found to hang up in the mainloop when doing image format convert on aarch64 platform and it is highly reproduceable by executing test using: qemu-img convert -f qcow2 -O qcow2 origin.qcow2 converted.qcow2 This mysterious hang can be explained by a race condition between the

Re: [PATCH v2 1/4] target/ppc: Introduce ppc_radix64_xlate() for Radix tree translation

2020-04-01 Thread David Gibson
On Wed, Apr 01, 2020 at 06:28:07PM +0200, Cédric Le Goater wrote: > This is moving code under a new ppc_radix64_xlate() routine shared by > the MMU Radix page fault handler and the 'get_phys_page_debug' PPC > callback. The difference being that 'get_phys_page_debug' does not > generate exceptions.

[PATCH] util/async: Add memory barrier to aio_ctx_prepare

2020-04-01 Thread Ying Fang
Qemu main thread is found to hang up in the mainloop when doing image format convert on aarch64 platform and it is highly reproduceable by executing test using: qemu-img convert -f qcow2 -O qcow2 origin.qcow2 converted.qcow2 This mysterious hang can be explained by a race condition between the

Re: [PATCH] Add PAT, cr8 and EFER for 32-bit qemu to hax ioctl interface

2020-04-01 Thread Colin Xu
Sorry for missing this one. If I remembered correctly, this patch together with the HAXM patch in github will cause some regression in SMP case. So we'd like to fully understand the technique details to make proper change, not only for a very specific purpose, i.e. boot Windows on Windows.

RE: [PATCH for-5.1 00/31] target/arm: SVE2, part 1

2020-04-01 Thread Ana Pazos
Hello Richard, I want to introduce you to Stephen Long. He is our new hire who started this week. I want to know if you are available for a sync-up meeting to discuss how we can cooperate with qemu sve2 support. Thank you, Ana. -Original Message- From: Richard Henderson Sent:

Re: [PATCH] ppc/pnv: Introduce common PNV_SETFIELD() and PNV_GETFIELD() macros

2020-04-01 Thread David Gibson
On Wed, Apr 01, 2020 at 05:26:33PM +0200, Cédric Le Goater wrote: > Most of QEMU definitions of the register fields of the PowerNV machine > come from skiboot and the models duplicate a set of macros for this > purpose. Make them common under the pnv_utils.h file. > > Signed-off-by: Cédric Le

Re: [PATCH v2 13/22] intel_iommu: add PASID cache management infrastructure

2020-04-01 Thread Peter Xu
On Sun, Mar 29, 2020 at 09:24:52PM -0700, Liu Yi L wrote: > This patch adds a PASID cache management infrastructure based on > new added structure VTDPASIDAddressSpace, which is used to track > the PASID usage and future PASID tagged DMA address translation > support in vIOMMU. > > struct

Re: Question on dirty sync before kvm memslot removal

2020-04-01 Thread Peter Xu
On Wed, Apr 01, 2020 at 01:12:04AM +0200, Paolo Bonzini wrote: > On 31/03/20 18:51, Peter Xu wrote: > > On Tue, Mar 31, 2020 at 05:34:43PM +0200, Paolo Bonzini wrote: > >> On 31/03/20 17:23, Peter Xu wrote: > Or KVM_MEM_READONLY. > >>> Yeah, I used a new flag because I thought READONLY was a

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

2020-04-01 Thread Max Filippov
On Wed, Apr 1, 2020 at 2:48 AM Alex Bennée wrote: > > 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

[PATCH 1/1] target/i386: fix phadd* with identical destination and source register

2020-04-01 Thread Janne Grunau
Detected by asm test suite failures in dav1d (https://code.videolan.org/videolan/dav1d). Can be reproduced by `qemu-x86_64 -cpu core2duo ./tests/checkasm --test=mc_8bpc 1659890620`. Signed-off-by: Janne Grunau --- target/i386/ops_sse.h | 53 +++ 1 file

[PATCH for-5.0?] nbd: Attempt reconnect after server error of ESHUTDOWN

2020-04-01 Thread Eric Blake
I was trying to test qemu's reconnect-delay parameter by using nbdkit as a server that I could easily make disappear and resume. A bit of experimenting shows that when nbdkit is abruptly killed (SIGKILL), qemu detects EOF on the socket and manages to reconnect just fine; but when nbdkit is

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

2020-04-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200401180436.298613-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.0 1/7] tests/acceptance/machine_sparc_leon3: Disable HelenOS test

2020-04-01 Thread Philippe Mathieu-Daudé
On 4/1/20 10:30 PM, Willian Rampazzo wrote: On Wed, Apr 1, 2020 at 5:21 PM Philippe Mathieu-Daudé wrote: Odd, with avocado-framework==76.0 I get: https://travis-ci.org/github/philmd/qemu/jobs/669851870#L4908 Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line

Re: [PATCH 0/3] DirectSound fixes for 5.0

2020-04-01 Thread Volker Rümelin
Sorry, please ignore this patch series. Patch 1/3 "dsoundaudio: fix never-ending playback loop" is wrong. I'll send a version 2. With best regards, Volker

[PATCH for-5.0] configure: Add -Werror to PIE probe

2020-04-01 Thread Richard Henderson
Without -Werror, the probe may succeed, but then compilation fails later when -Werror is added for other reasons. Shows up on windows, where the compiler complains about -fPIC. Signed-off-by: Richard Henderson --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH-for-5.0 1/7] tests/acceptance/machine_sparc_leon3: Disable HelenOS test

2020-04-01 Thread Willian Rampazzo
On Wed, Apr 1, 2020 at 5:21 PM Philippe Mathieu-Daudé wrote: > Odd, with avocado-framework==76.0 I get: > > https://travis-ci.org/github/philmd/qemu/jobs/669851870#L4908 > > Traceback (most recent call last): >File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main >

Re: [PATCH-for-5.0 1/7] tests/acceptance/machine_sparc_leon3: Disable HelenOS test

2020-04-01 Thread Philippe Mathieu-Daudé
On 4/1/20 7:43 PM, Willian Rampazzo wrote: On Tue, Mar 31, 2020 at 5:07 PM Philippe Mathieu-Daudé wrote: First job failed by timeout, 2nd succeeded: https://travis-ci.org/github/philmd/qemu/jobs/669265466 However "Ran for 46 min 48 sec" From the log: Fetching asset from

Re: Questionable aspects of QEMU Error's design

2020-04-01 Thread Peter Maydell
On Wed, 1 Apr 2020 at 10:03, Markus Armbruster wrote: > > QEMU's Error was patterned after GLib's GError. Differences include: >From my POV the major problem with Error as we have it today is that it makes the simple process of writing code like device realize functions horrifically boilerplate

Re: [PATCH v16 QEMU 12/16] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled

2020-04-01 Thread Alex Williamson
On Wed, 1 Apr 2020 20:00:32 +0100 "Dr. David Alan Gilbert" wrote: > * Kirti Wankhede (kwankh...@nvidia.com) wrote: > > Signed-off-by: Kirti Wankhede > > --- > > memory.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/memory.c b/memory.c > > index

[PATCH] hw/core: properly terminate loading .hex on EOF record

2020-04-01 Thread Alex Bennée
The https://makecode.microbit.org/#editor generates slightly weird .hex files which work fine on a real microbit but causes QEMU to choke. The reason is extraneous data after the EOF record which causes the loader to attempt to write a bigger file than it should to the "rom". According to the HEX

Re: [PATCH v16 QEMU 14/16] vfio: Add vfio_listener_log_sync to mark dirty pages

2020-04-01 Thread Dr. David Alan Gilbert
* Alex Williamson (alex.william...@redhat.com) wrote: > On Wed, 25 Mar 2020 02:39:12 +0530 > Kirti Wankhede wrote: > > > vfio_listener_log_sync gets list of dirty pages from container using > > VFIO_IOMMU_GET_DIRTY_BITMAP ioctl and mark those pages dirty when all > > devices are stopped and

Re: [PATCH v16 QEMU 13/16] vfio: Add function to start and stop dirty pages tracking

2020-04-01 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > Call VFIO_IOMMU_DIRTY_PAGES ioctl to start and stop dirty pages tracking > for VFIO devices. > > Signed-off-by: Kirti Wankhede > --- > hw/vfio/migration.c | 36 > 1 file changed, 36 insertions(+) > > diff

[PATCH 2/3] dsoundaudio: fix "Could not lock capture buffer" warning

2020-04-01 Thread Volker Rümelin
IDirectSoundCaptureBuffer_Lock() fails on Windows when called with len = 0. Return early from dsound_get_buffer_in() in this case. To reproduce the warning start a linux guest. In the guest start Audacity and you will see a lot of "Could not lock capture buffer" warnings. Signed-off-by: Volker

[PATCH 1/3] dsoundaudio: fix never-ending playback loop

2020-04-01 Thread Volker Rümelin
Currently the DirectSound backend fails to stop audio playback in dsound_enable_out(). The call to IDirectSoundBuffer_GetStatus() in dsound_get_status_out() returns a status word with the flag DSERR_BUFFERLOST set (probably because of a buffer underrun). The function dsound_get_status_out()

Re: [PATCH v16 QEMU 12/16] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled

2020-04-01 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > Signed-off-by: Kirti Wankhede > --- > memory.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/memory.c b/memory.c > index acb7546971c3..285ca2ed6dd9 100644 > --- a/memory.c > +++ b/memory.c > @@ -1788,7 +1788,7 @@ bool

[PATCH 3/3] dsoundaudio: dsound_get_buffer_in should honor *size

2020-04-01 Thread Volker Rümelin
This patch prevents an underflow of variable samples in function audio_pcm_hw_run_in(). See commit 599eac4e5a "audio: audio_generic_get_buffer_in should honor *size". This time the while loop in audio_pcm_hw_run_in() will terminate nevertheless, because it seems the recording stream in Windows is

[PATCH 0/3] DirectSound fixes for 5.0

2020-04-01 Thread Volker Rümelin
Three audio fixes for DirectSound on Windows. They were tested on a Windows 10 Home system with HAXM accelerator. Volker Rümelin (3): dsoundaudio: fix never-ending playback loop dsoundaudio: fix "Could not lock capture buffer" warning dsoundaudio: dsound_get_buffer_in should honor *size

Re: [PATCH v16 QEMU 10/16] vfio: Add load state functions to SaveVMHandlers

2020-04-01 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > Sequence during _RESUMING device state: > While data for this device is available, repeat below steps: > a. read data_offset from where user application should write data. > b. write data of data_size to migration region from data_offset. > c.

Re: [PATCH] lockable: Replace locks with lock guard macros

2020-04-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200401162023.GA15912@simran-Inspiron-5558/ 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

Re: bdrv_drained_begin deadlock with io-threads

2020-04-01 Thread Kevin Wolf
Am 01.04.2020 um 20:28 hat Dietmar Maurer geschrieben: > > That's a pretty big change, and I'm not sure how it's related to > > completed requests hanging in the thread pool instead of reentering the > > file-posix coroutine. But I also tested it enough that I'm confident > > it's really the first

[PATCH v1] nvme: indicate CMB support through controller capabilities register

2020-04-01 Thread Andrzej Jakowski
This patch sets CMBS bit in controller capabilities register when user configures NVMe driver with CMB support, so capabilites are correctly reported to guest OS. Signed-off-by: Andrzej Jakowski --- hw/block/nvme.c | 2 ++ include/block/nvme.h | 4 2 files changed, 6 insertions(+)

Re: bdrv_drained_begin deadlock with io-threads

2020-04-01 Thread Kevin Wolf
Am 01.04.2020 um 20:12 hat Kevin Wolf geschrieben: > Am 01.04.2020 um 17:37 hat Dietmar Maurer geschrieben: > > > > I really nobody else able to reproduce this (somebody already tried to > > > > reproduce)? > > > > > > I can get hangs, but that's for job_completed(), not for starting the > > >

Re: [PATCH v16 QEMU 00/16] Add migration support for VFIO devices

2020-04-01 Thread Alex Williamson
On Wed, 1 Apr 2020 02:41:54 -0400 Yan Zhao wrote: > On Wed, Apr 01, 2020 at 02:34:24AM +0800, Alex Williamson wrote: > > On Wed, 25 Mar 2020 02:38:58 +0530 > > Kirti Wankhede wrote: > > > > > Hi, > > > > > > This Patch set adds migration support for VFIO devices in QEMU. > > > > Hi

Re: bdrv_drained_begin deadlock with io-threads

2020-04-01 Thread Dietmar Maurer
> That's a pretty big change, and I'm not sure how it's related to > completed requests hanging in the thread pool instead of reentering the > file-posix coroutine. But I also tested it enough that I'm confident > it's really the first bad commit. > > Maybe you want to try if your problem starts

Re: bdrv_drained_begin deadlock with io-threads

2020-04-01 Thread Kevin Wolf
Am 01.04.2020 um 17:37 hat Dietmar Maurer geschrieben: > > > I really nobody else able to reproduce this (somebody already tried to > > > reproduce)? > > > > I can get hangs, but that's for job_completed(), not for starting the > > job. Also, my hangs have a non-empty bs->tracked_requests, so it

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

2020-04-01 Thread Denis Plotnikov
On 01.04.2020 18:36, Vladimir Sementsov-Ogievskiy wrote: 01.04.2020 17:37, 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,

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

2020-04-01 Thread Eric Blake
Various qemu-img commands are inconsistent on whether they report status/errors in terms of bytes or sector offsets. The latter is confusing (especially as more places move to 4k block sizes), so let's switch everything to just use bytes everywhere. Signed-off-by: Eric Blake Reviewed-by:

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

Re: [PATCH v16 Kernel 5/7] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-04-01 Thread Kirti Wankhede
On 3/30/2020 7:45 AM, Yan Zhao wrote: On Fri, Mar 27, 2020 at 12:42:43PM +0800, Kirti Wankhede wrote: On 3/27/2020 5:34 AM, Yan Zhao wrote: On Fri, Mar 27, 2020 at 05:39:44AM +0800, Kirti Wankhede wrote: On 3/25/2020 7:48 AM, Yan Zhao wrote: On Wed, Mar 25, 2020 at 03:32:37AM +0800,

[PATCH v17 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 v17 0/4] qcow2: Implement zstd cluster compression method

2020-04-01 Thread Denis Plotnikov
v17: * 03: remove incorrect comment in zstd decompress [Vladimir] * 03: remove "paraniod" and rewrite the comment on decompress [Vladimir] * 03: fix dead assignment [Vladimir] * 04: add and remove quotes [Vladimir] * 04: replace long offset form with the short one [Vladimir] v16:

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

[PATCH v17 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 Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/287 | 162 + tests/qemu-iotests/287.out

Re: [PATCH v17 Kernel 6/7] vfio iommu: Adds flag to indicate dirty pages tracking capability support

2020-04-01 Thread Alex Williamson
On Wed, 1 Apr 2020 11:51:03 -0600 Alex Williamson wrote: > On Wed, 1 Apr 2020 22:55:57 +0530 > Kirti Wankhede wrote: > > > On 4/1/2020 12:45 AM, Alex Williamson wrote: > > > On Wed, 1 Apr 2020 00:38:49 +0530 > > > Kirti Wankhede wrote: > > > > > >> On 3/31/2020 2:28 AM, Alex Williamson

Re: [PATCH v17 Kernel 6/7] vfio iommu: Adds flag to indicate dirty pages tracking capability support

2020-04-01 Thread Alex Williamson
On Wed, 1 Apr 2020 22:55:57 +0530 Kirti Wankhede wrote: > On 4/1/2020 12:45 AM, Alex Williamson wrote: > > On Wed, 1 Apr 2020 00:38:49 +0530 > > Kirti Wankhede wrote: > > > >> On 3/31/2020 2:28 AM, Alex Williamson wrote: > >>> On Mon, 30 Mar 2020 22:20:43 +0530 > >>> Kirti Wankhede wrote:

Re: [PATCH-for-5.0 1/7] tests/acceptance/machine_sparc_leon3: Disable HelenOS test

2020-04-01 Thread Willian Rampazzo
On Tue, Mar 31, 2020 at 5:07 PM Philippe Mathieu-Daudé wrote: > > First job failed by timeout, 2nd succeeded: > https://travis-ci.org/github/philmd/qemu/jobs/669265466 > > However "Ran for 46 min 48 sec" > > From the log: > > Fetching asset from >

Re: [PATCH v16 QEMU 08/16] vfio: Register SaveVMHandlers for VFIO device

2020-04-01 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > Define flags to be used as delimeter in migration file stream. > Added .save_setup and .save_cleanup functions. Mapped & unmapped migration > region from these functions at source during saving or pre-copy phase. > Set VFIO device state depending on

Re: [PATCH v17 Kernel 6/7] vfio iommu: Adds flag to indicate dirty pages tracking capability support

2020-04-01 Thread Kirti Wankhede
On 4/1/2020 12:45 AM, Alex Williamson wrote: On Wed, 1 Apr 2020 00:38:49 +0530 Kirti Wankhede wrote: On 3/31/2020 2:28 AM, Alex Williamson wrote: On Mon, 30 Mar 2020 22:20:43 +0530 Kirti Wankhede wrote: Flag VFIO_IOMMU_INFO_DIRTY_PGS in VFIO_IOMMU_GET_INFO indicates that driver

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

2020-04-01 Thread Marc-André Lureau
Hi On Wed, Apr 1, 2020 at 5:51 PM Thanos Makatos wrote: > > > 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

[PATCH v2] 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: [PATCH v2 0/6] nbd: reduce max_block restrictions

2020-04-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200401150112.9557-1-vsement...@virtuozzo.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

[PATCH v2 0/2] ppc/xive: Add support for PQ state bits offload

2020-04-01 Thread Cédric Le Goater
Hello, When the XIVE router unit receives a trigger message coming from a HW source, it contains a special bit informing the XIVE interrupt controller that the PQ bits have been checked at the source or not. Depending on the value, the IC can perform the check and the state transition locally

[PATCH v2 2/2] ppc/xive: Add support for PQ state bits offload

2020-04-01 Thread Cédric Le Goater
The trigger message coming from a HW source contains a special bit informing the XIVE interrupt controller that the PQ bits have been checked at the source or not. Depending on the value, the IC can perform the check and the state transition locally using its own PQ state bits. The following

[PATCH v2 1/2] ppc/xive: export PQ routines

2020-04-01 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz --- include/hw/ppc/xive.h| 4 hw/intc/spapr_xive_kvm.c | 8 hw/intc/xive.c | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h index

Re: QEMU participation to Google Season of Docs

2020-04-01 Thread Paolo Bonzini
On 01/04/20 18:37, Philippe Mathieu-Daudé wrote: > > * Refactor the open source project's existing documentation to >   provide an improved user experience or a more accessible >   information architecture. This kind of project would be indeed very suitable to QEMU. Stefan, perhaps you could

Re: [PATCH 2/2] ppc/xive: Add support for PQ state bits offload

2020-04-01 Thread Cédric Le Goater
> static void pnv_xive_ic_notify_write(void *opaque, hwaddr addr, uint64_t val, > @@ -1939,6 +1968,8 @@ static void pnv_xive_class_init(ObjectClass *klass, > void *data) > device_class_set_props(dc, pnv_xive_properties); > > xrc->get_eas = pnv_xive_get_eas; > +xrc->get_pq =

QEMU participation to Google Season of Docs

2020-04-01 Thread Philippe Mathieu-Daudé
Hi, Google recently announced their 'Season of Docs' project: https://developers.google.com/season-of-docs QEMU project seems to fit all the requirements. Who is interested in [co-]mentoring? Relevant links: https://developers.google.com/season-of-docs/docs/admin-guide

Re: Question about scsi device hotplug (e.g scsi-hd)

2020-04-01 Thread Paolo Bonzini
On 01/04/20 17:09, Stefan Hajnoczi wrote: >> What do you think about it? > > Maybe aio_disable_external() is needed to postpone device emulation > until after realize has finished? > > Virtqueue kick ioeventfds are marked "external" and won't be processed > while external events are disabled.

Re: [PATCH] Compress lines for immediate return

2020-04-01 Thread Simran Singhal
On Wed, Apr 1, 2020 at 9:15 PM Eric Blake wrote: > On 4/1/20 9:49 AM, Simran Singhal wrote: > > 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

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

2020-04-01 Thread Igor Mammedov
On Wed, 1 Apr 2020 08:37:54 -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 v2 4/4] target/ppc: Add support for Radix partition-scoped translation

2020-04-01 Thread Cédric Le Goater
The Radix tree translation model currently supports process-scoped translation for the PowerNV machine (Hypervisor mode) and for the pSeries machine (Guest mode). Guests running under an emulated Hypervisor (PowerNV machine) require a new type of Radix translation, called partition-scoped, which

[PATCH v2 3/4] target/ppc: Rework ppc_radix64_walk_tree() for partition-scoped translation

2020-04-01 Thread Cédric Le Goater
The ppc_radix64_walk_tree() routine walks through the nested radix tables to look for a PTE. Split it in two and introduce a new routine ppc_radix64_next_level() which we will use for partition-scoped Radix translation when translating the process tree addresses. Use also a 'AddressSpace *as'

[PATCH v2 2/4] target/ppc: Extend ppc_radix64_check_prot() with a 'partition_scoped' bool

2020-04-01 Thread Cédric Le Goater
This prepares ground for partition-scoped Radix translation. Signed-off-by: Suraj Jitindar Singh Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz --- target/ppc/mmu-radix64.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/target/ppc/mmu-radix64.c

[PATCH v2 1/4] target/ppc: Introduce ppc_radix64_xlate() for Radix tree translation

2020-04-01 Thread Cédric Le Goater
This is moving code under a new ppc_radix64_xlate() routine shared by the MMU Radix page fault handler and the 'get_phys_page_debug' PPC callback. The difference being that 'get_phys_page_debug' does not generate exceptions. The specific part of process-scoped Radix translation is moved under

[PATCH v2 0/4] target/ppc: Add support for Radix partition-scoped translation

2020-04-01 Thread Cédric Le Goater
Hello, The Radix tree translation model currently supports process-scoped translation for the PowerNV machine (Hypervisor mode) and for the pSeries machine (Guest mode). Guests running under an emulated Hypervisor (PowerNV machine) require a new type of Radix translation, called partition-scoped,

Re: [PATCH 1/2] ppc/xive: export PQ routines

2020-04-01 Thread Greg Kurz
On Wed, 1 Apr 2020 17:45:35 +0200 Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater > --- > include/hw/ppc/xive.h| 4 > hw/intc/spapr_xive_kvm.c | 8 > hw/intc/xive.c | 6 +++--- > 3 files changed, 11 insertions(+), 7 deletions(-) > > diff --git

[PATCH] lockable: Replace locks with lock guard macros

2020-04-01 Thread Simran Singhal
Replace manual lock()/unlock() calls with lock guard macros (QEMU_LOCK_GUARD/WITH_QEMU_LOCK_GUARD). Signed-off-by: Simran Singhal --- hw/hyperv/hyperv.c | 15 ++--- hw/rdma/rdma_backend.c | 50 +- hw/rdma/rdma_rm.c | 3 +--

Re: bdrv_drained_begin deadlock with io-threads

2020-04-01 Thread Dietmar Maurer
> > I really nobody else able to reproduce this (somebody already tried to > > reproduce)? > > I can get hangs, but that's for job_completed(), not for starting the > job. Also, my hangs have a non-empty bs->tracked_requests, so it looks > like a different case to me. Please can you post the

Re: [Qemu-devel] [PULL 06/25] xen: create xenstore areas for XenDevice-s

2020-04-01 Thread Philippe Mathieu-Daudé
Hi Anthony, Paul. Cc'ing Markus too. On 1/14/19 2:51 PM, Anthony PERARD wrote: From: Paul Durrant This patch adds a new source module, xen-bus-helper.c, which builds on basic libxenstore primitives to provide functions to create (setting permissions appropriately) and destroy xenstore areas,

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

2020-04-01 Thread Peter Maydell
On Wed, 1 Apr 2020 at 15:44, Markus Armbruster wrote: > Peter Maydell writes: > > On Wed, 1 Apr 2020 at 06:07, Markus Armbruster wrote: > > But then as a coccinelle script author I need to know which of > > the options I needed are standard, which are for-this-script-only, > > and which are

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

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
01.04.2020 17:37, 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 | 162 +

Re: [PATCH] ppc/pnv: Introduce common PNV_SETFIELD() and PNV_GETFIELD() macros

2020-04-01 Thread Greg Kurz
On Wed, 1 Apr 2020 17:26:33 +0200 Cédric Le Goater wrote: > Most of QEMU definitions of the register fields of the PowerNV machine > come from skiboot and the models duplicate a set of macros for this > purpose. Make them common under the pnv_utils.h file. > > Signed-off-by: Cédric Le Goater

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

2020-04-01 Thread Jonathan Cameron
On Wed, 1 Apr 2020 11:45:22 +0100 Jonathan Cameron wrote: > 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

Re: bdrv_drained_begin deadlock with io-threads

2020-04-01 Thread Dietmar Maurer
> On April 1, 2020 5:37 PM Dietmar Maurer wrote: > > > > > I really nobody else able to reproduce this (somebody already tried to > > > reproduce)? > > > > I can get hangs, but that's for job_completed(), not for starting the > > job. Also, my hangs have a non-empty bs->tracked_requests,

Re: Questionable aspects of QEMU Error's design

2020-04-01 Thread Markus Armbruster
Alex Bennée writes: > Vladimir Sementsov-Ogievskiy writes: > >> Side question: >> >> Can we somehow implement a possibility to reliably identify file and line >> number >> where error is set by error message? >> >> It's where debug of error-bugs always starts: try to imagine which parts of >>

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

2020-04-01 Thread Thanos Makatos
> 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 > > > >

[PATCH 2/2] ppc/xive: Add support for PQ state bits offload

2020-04-01 Thread Cédric Le Goater
The trigger message coming from a HW source contains a special bit informing the XIVE interrupt controller that the PQ bits have been checked at the source or not. Depending on the value, the IC can perform the check and the state transition locally using its own PQ state bits. The following

[PATCH 0/2] ppc/xive: Add support for PQ state bits offload

2020-04-01 Thread Cédric Le Goater
Hello, When the XIVE router unit receives a trigger message coming from a HW source, it contains a special bit informing the XIVE interrupt controller that the PQ bits have been checked at the source or not. Depending on the value, the IC can perform the check and the state transition locally

[PATCH 1/2] ppc/xive: export PQ routines

2020-04-01 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- include/hw/ppc/xive.h| 4 hw/intc/spapr_xive_kvm.c | 8 hw/intc/xive.c | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/hw/ppc/xive.h b/include/hw/ppc/xive.h index 59ac075db080..d4e7c1f9217f 100644

Re: [PATCH] Compress lines for immediate return

2020-04-01 Thread Eric Blake
On 4/1/20 9:49 AM, Simran Singhal wrote: 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

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

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
01.04.2020 17:37, 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: Questionable aspects of QEMU Error's design

2020-04-01 Thread Markus Armbruster
Daniel P. Berrangé writes: > 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

[PATCH] ppc/pnv: Introduce common PNV_SETFIELD() and PNV_GETFIELD() macros

2020-04-01 Thread Cédric Le Goater
Most of QEMU definitions of the register fields of the PowerNV machine come from skiboot and the models duplicate a set of macros for this purpose. Make them common under the pnv_utils.h file. Signed-off-by: Cédric Le Goater --- include/hw/pci-host/pnv_phb3_regs.h | 16 --

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

2020-04-01 Thread Alex Bennée
** Tags added: tcg ** Tags removed: tcg ** Tags added: kvm -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1847525 Title: qemu-system-i386 eats a lot of cpu after just few hours, with sdl,gl=on

Re: Question about scsi device hotplug (e.g scsi-hd)

2020-04-01 Thread Stefan Hajnoczi
On Tue, Mar 31, 2020 at 07:16:23PM +0300, Maxim Levitsky wrote: > Hi! > > I recently investigated an interesting issue related to repeated scsi-hd > hotplug/hotunplug. > The bugzilla for it is here: > https://bugzilla.redhat.com/show_bug.cgi?id=1812399 > > In nutshell the issue that I think

[PATCH v2 3/6] block: add max_pwrite_zeroes_fast to BlockLimits

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
The NBD spec was recently updated to clarify that max_block doesn't relate to NBD_CMD_WRITE_ZEROES with NBD_CMD_FLAG_FAST_ZERO (which mirrors Qemu flag BDRV_REQ_NO_FALLBACK). To drop the restriction we need new max_pwrite_zeroes_fast. Default value of new max_pwrite_zeroes_fast is zero and it

Re: Questionable aspects of QEMU Error's design

2020-04-01 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Side question: > > Can we somehow implement a possibility to reliably identify file and line > number > where error is set by error message? > > It's where debug of error-bugs always starts: try to imagine which parts of > the error > message are "%s",

[PATCH v2 6/6] block/io: auto-no-fallback for write-zeroes

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
When BDRV_REQ_NO_FALLBACK is supported, the NBD driver supports a larger request size. Add code to try large zero requests with a NO_FALLBACK request prior to having to split a request into chunks according to max_pwrite_zeroes. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 18

[PATCH v2 2/6] block/nbd-client: drop max_block restriction from discard

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
NBD spec is updated, so that max_block doesn't relate to NBD_CMD_TRIM. So, drop the restriction. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/nbd.c b/block/nbd.c index d4d518a780..4ac23c8f62 100644 ---

[PATCH v2 5/6] block/io: refactor bdrv_co_do_pwrite_zeroes head calculation

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
It's wrong to update head using num in this place, as num may be reduced during the iteration (seems it doesn't, but it's not obvious), and we'll have wrong head value on next iteration. Instead update head at iteration end. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake

[PATCH v2 1/6] block/nbd-client: drop max_block restriction from block_status

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
NBD spec is updated, so that max_block doesn't relate to NBD_CMD_BLOCK_STATUS. So, drop the restriction. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/nbd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index

[PATCH v2 0/6] nbd: reduce max_block restrictions

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
Recent changes in NBD protocol allowed to use some commands without max_block restriction. Let's drop the restrictions. NBD change is here: https://github.com/NetworkBlockDevice/nbd/commit/9f30fedb8699f151e7ef4ccc07e624330be3316b#diff-762fb7c670348da69cc9050ef58fe3ae v2: 01: add Eric's r-b 02:

[PATCH v2 4/6] block/nbd: define new max_write_zero_fast limit

2020-04-01 Thread Vladimir Sementsov-Ogievskiy
The NBD spec was recently updated to clarify that max_block doesn't relate to NBD_CMD_WRITE_ZEROES with NBD_CMD_FLAG_FAST_ZERO (which mirrors Qemu flag BDRV_REQ_NO_FALLBACK). bs->bl.max_write_zero_fast is zero by default which means using max_pwrite_zeroes. Update nbd driver to allow larger

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

2020-04-01 Thread Keith Busch
On Wed, Apr 01, 2020 at 03:50:05PM +0100, Stefan Hajnoczi wrote: > 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

  1   2   3   >