[PATCH for-5.0 v5 05/23] ppc/pnv: Quiesce some XIVE errors

2019-11-15 Thread Cédric Le Goater
When dumping the END and NVT tables, the error logging is too noisy. Signed-off-by: Cédric Le Goater --- hw/intc/pnv_xive.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index 02faf4135e48..a394331ddd6a 100644 ---

[PATCH for-5.0 v5 10/23] ppc/pnv: Loop on the threads of the chip to find a matching NVT

2019-11-15 Thread Cédric Le Goater
CPU_FOREACH() loops on all the CPUs of the machine which is incorrect. Each XIVE Presenter should scan only the HW threads of the chip it belongs to. Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 2 ++ hw/intc/pnv_xive.c | 63 ++--

[PATCH for-5.0 v5 11/23] ppc/pnv: Introduce a pnv_xive_is_cpu_enabled() helper

2019-11-15 Thread Cédric Le Goater
and use this helper to exclude CPUs which are not enabled in the XIVE controller. Signed-off-by: Cédric Le Goater --- hw/intc/pnv_xive.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index 71ca4961b6b1..4c8c6e51c20f 100644 ---

Re: [PATCH 0/2] A pair of memory access problems

2019-11-15 Thread Alex Williamson
On Mon, 11 Nov 2019 11:37:40 +0100 Michal Privoznik wrote: > The first patch fixes a crasher, the second fixes a memleak. > > Michal Privoznik (2): > hw/vfio/pci: Fix double free of migration_blocker > vfio-helpers: Free QEMUVFIOState in qemu_vfio_close() > > hw/vfio/pci.c | 2 ++ >

[PATCH for-5.0 v5 16/23] ppc/xive: Extend the TIMA operation with a XivePresenter parameter

2019-11-15 Thread Cédric Le Goater
The TIMA operations are performed on behalf of the XIVE IVPE sub-engine (Presenter) on the thread interrupt context registers. The current operations supported by the model are simple and do not require access to the controller but more complex operations will need access to the controller NVT

Re: [RESEND PATCH v21 5/6] target-arm: kvm64: handle SIGBUS signal from kernel or KVM

2019-11-15 Thread Igor Mammedov
On Mon, 11 Nov 2019 09:40:47 +0800 Xiang Zheng wrote: > From: Dongjiu Geng > > Add a SIGBUS signal handler. In this handler, it checks the SIGBUS type, > translates the host VA delivered by host to guest PA, then fills this PA > to guest APEI GHES memory, then notifies guest according to the

Re: [PATCH 2/2] docs/microvm.rst: add instructions for shutting down the guest

2019-11-15 Thread Paolo Bonzini
On 15/11/19 17:13, Sergio Lopez wrote: > Add a new section explaining the particularities of the microvm > machine type for triggering a guest-initiated shut down. > > Signed-off-by: Sergio Lopez > --- > docs/microvm.rst | 21 + > 1 file changed, 21 insertions(+) > > diff

Re: [RFC 00/24] backup performance: block_status + async

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
15.11.2019 20:30, no-re...@patchew.org wrote: > Patchew URL: > https://patchew.org/QEMU/20191115141444.24155-1-vsement...@virtuozzo.com/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Subject: [RFC 00/24] backup performance:

Re: [PATCH] target/arm: Clean up arm_cpu_vq_map_next_smaller asserts

2019-11-15 Thread Alex Bennée
Richard Henderson writes: > Coverity reports, in sve_zcr_get_valid_len, > > "Subtract operation overflows on operands > arm_cpu_vq_map_next_smaller(cpu, start_vq + 1U) and 1U" > > First, fix the aarch32 stub version to not return 0, but to > simply assert unreachable. Because that nonsense

[PATCH v2 for-5.0 4/8] ppc/pnv: Link "psi" property to PnvLpc::psi pointer

2019-11-15 Thread Greg Kurz
The LPC object has both a pointer and a "psi" property pointing to the PSI object. Confusing bugs could arise if these ever go out of sync. Change the property definition so that it explicitely sets the pointer. Signed-off-by: Greg Kurz --- hw/ppc/pnv.c |8 hw/ppc/pnv_lpc.c |

[PATCH v2 for-5.0 3/8] xive: Link "xive" property to XiveEndSource::xrtr pointer

2019-11-15 Thread Greg Kurz
The END source object has both a pointer and a "xive" property pointing to the router object. Confusing bugs could arise if these ever go out of sync. Change the property definition so that it explicitely sets the pointer. The property isn't optional : not being able to set the link is a bug and

[PATCH v2 for-5.0 7/8] ppc/pnv: Link "chip" property to PnvCore::chip pointer

2019-11-15 Thread Greg Kurz
The core object has both a pointer and a "chip" property pointing to the chip object. Confusing bugs could arise if these ever go out of sync. Change the property definition so that it explicitely sets the pointer. Signed-off-by: Greg Kurz --- hw/ppc/pnv.c |4 ++-- hw/ppc/pnv_core.c |

[PATCH] display: xlnx_dp: Provide sufficient bytes for silent audio channel

2019-11-15 Thread Sai Pavan Boddu
Fill the audio channel with required number of bytes to cover the elapsed time. This prevents rate control reset, and avoids debug prints like below log: Resetting rate control (65692 samples) ... Resetting rate control (65721 samples) ... Signed-off-by: Sai Pavan

Re: [PATCH for-4.2] hw/i386: Fix compiler warning when CONFIG_IDE_ISA is disabled

2019-11-15 Thread Thomas Huth
On 15/11/2019 16.54, Peter Maydell wrote: > On Fri, 15 Nov 2019 at 15:10, Thomas Huth wrote: >> >> When CONFIG_IDE_ISA is disabled, compilation currently fails: >> >> hw/i386/pc_piix.c: In function ‘pc_init1’: >> hw/i386/pc_piix.c:81:9: error: unused variable ‘i’ [-Werror=unused-variable] >> >>

Re: [PATCH] target/arm: Clean up arm_cpu_vq_map_next_smaller asserts

2019-11-15 Thread Andrew Jones
On Fri, Nov 15, 2019 at 02:16:23PM +0100, Richard Henderson wrote: > Coverity reports, in sve_zcr_get_valid_len, > > "Subtract operation overflows on operands > arm_cpu_vq_map_next_smaller(cpu, start_vq + 1U) and 1U" > > First, fix the aarch32 stub version to not return 0, but to > simply assert

[PATCH for-5.0 v5 07/23] ppc/xive: Check V bit in TM_PULL_POOL_CTX

2019-11-15 Thread Cédric Le Goater
A context should be 'valid' when pulled from the thread interrupt context registers. Signed-off-by: Cédric Le Goater --- hw/intc/xive.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/intc/xive.c b/hw/intc/xive.c index 42e9a11ef731..511e1a936347 100644 --- a/hw/intc/xive.c +++

[PATCH for-5.0 v5 17/23] ppc/pnv: Clarify how the TIMA is accessed on a multichip system

2019-11-15 Thread Cédric Le Goater
The TIMA region gives access to the thread interrupt context registers of a CPU. It is mapped at the same address on all chips and can be accessed by any CPU of the system. To identify the chip from which the access is being done, the PowerBUS uses a 'chip' field in the load/store messages. QEMU

Re: [PATCH for-4.2] hw/i386: Fix compiler warning when CONFIG_IDE_ISA is disabled

2019-11-15 Thread Thomas Huth
On 15/11/2019 17.13, Paolo Bonzini wrote: > On 15/11/19 16:54, Thomas Huth wrote: >> On 15/11/2019 16.54, Peter Maydell wrote: >>> On Fri, 15 Nov 2019 at 15:10, Thomas Huth wrote: When CONFIG_IDE_ISA is disabled, compilation currently fails: hw/i386/pc_piix.c: In function

[PATCH for-5.0 v5 23/23] ppc/pnv: Extend XiveRouter with a get_block_id() handler

2019-11-15 Thread Cédric Le Goater
When doing CAM line compares, fetch the block id from the interrupt controller which can have set the PC_TCTXT_CHIPID field. Signed-off-by: Cédric Le Goater --- include/hw/ppc/xive.h | 2 +- hw/intc/pnv_xive.c| 6 ++ hw/intc/spapr_xive.c | 6 ++ hw/intc/xive.c| 21

Re: [PATCH v3 2/4] bitmap: Enforce maximum bitmap name length

2019-11-15 Thread Eric Blake
On 11/15/19 9:47 AM, Vladimir Sementsov-Ogievskiy wrote: 15.11.2019 18:03, Vladimir Sementsov-Ogievskiy wrote: 14.11.2019 5:46, Eric Blake wrote: We document that for qcow2 persistent bitmaps, the name cannot exceed 1023 bytes.  It is inconsistent if transient bitmaps do not have to abide by

Re: [PATCH v3 2/4] bitmap: Enforce maximum bitmap name length

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
15.11.2019 19:33, Eric Blake wrote: > On 11/15/19 9:47 AM, Vladimir Sementsov-Ogievskiy wrote: >> 15.11.2019 18:03, Vladimir Sementsov-Ogievskiy wrote: >>> 14.11.2019 5:46, Eric Blake wrote: We document that for qcow2 persistent bitmaps, the name cannot exceed 1023 bytes.  It is

[RFC PATCH 02/11] gdbstub: stop passing GDBState * around

2019-11-15 Thread Alex Bennée
We only have one GDBState which should be allocated at the time we process any commands. This will make further clean-up a bit easier. Signed-off-by: Alex Bennée --- gdbstub.c | 307 +++--- 1 file changed, 177 insertions(+), 130 deletions(-) diff

[RFC PATCH 05/11] gdbstub: add helper for 128 bit registers

2019-11-15 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/exec/gdbstub.h | 8 1 file changed, 8 insertions(+) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index 08363969c14..a898a2af990 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -102,6 +102,14 @@ static inline int

[RFC PATCH 08/11] gdbstub: extend GByteArray to read register helpers

2019-11-15 Thread Alex Bennée
Instead of passing a pointer to memory now just extend the GByteArray to all the read register helpers. They can then safely append their data through the normal way. We don't bother with this abstraction for write registers as we have already ensured the buffer being copied from is the correct

[PATCH 4/4] python/qemu: accel: Add tcg_available() method

2019-11-15 Thread Wainer dos Santos Moschetta
This adds a method to check if the tcg accelerator is enabled in the QEMU binary. Signed-off-by: Wainer dos Santos Moschetta --- python/qemu/accel.py | 8 1 file changed, 8 insertions(+) diff --git a/python/qemu/accel.py b/python/qemu/accel.py index 1978fbee4e..513904d46d 100644 ---

Re: [PATCH v1 0/1] hw/arm: versal: Add the CRP as unimplemented

2019-11-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191115154734.26449-1-edgar.igles...@gmail.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 for-5.0 2/8] xive: Link "xive" property to XiveSource::xive pointer

2019-11-15 Thread Greg Kurz
The source object has both a pointer and a "xive" property pointing to the notifier object. Confusing bugs could arise if these ever go out of sync. Change the property definition so that it explicitely sets the pointer. The property isn't optional : not being able to set the link is a bug and

[PATCH for-5.0 1/8] xive: Link "cpu" property to XiveTCTX::cs pointer

2019-11-15 Thread Greg Kurz
The TCTX object has both a pointer and a "cpu" property pointing to the vCPU object. Confusing bugs could arise if these ever go out of sync. Change the property definition so that it explicitely sets the pointer. Signed-off-by: Greg Kurz --- hw/intc/xive.c | 25 - 1

Re: [PATCH qemu-web] Add a blog post on "Micro-Optimizing KVM VM-Exits"

2019-11-15 Thread Thomas Huth
On 08/11/2019 10.22, Kashyap Chamarthy wrote: > This blog post summarizes the talk "Micro-Optimizing KVM VM-Exits"[1], > given by Andrea Arcangeli at the recently concluded KVM Forum 2019. > Hi Kashyap, first thanks for writing up this article! It's a really nice summary of the presentation, I

[PATCH v3 for 5.0 5/6] linux-user: Add support for get/set RTC PLL correction using ioctls

2019-11-15 Thread Filip Bozuta
This patch implements functionalities of following ioctls: RTC_PLL_GET - Get PLL correction Read the PLL correction for RTCs that support PLL. The PLL correction is returned in the following structure: struct rtc_pll_info { int pll_ctrl;/* placeholder for

[PATCH v3 for 5.0 4/6] linux-user: Add support for get/set RTC wakeup alarm using ioctls

2019-11-15 Thread Filip Bozuta
This patch implements functionalities of following ioctls: RTC_WKALM_SET, RTC_WKALM_GET - Get/Set wakeup alarm Some RTCs support a more powerful alarm interface, using these ioctls to read or write the RTC's alarm time (respectively) with this structure: struct rtc_wkalrm {

Re: [PATCH qemu-web] Add a blog post on "Micro-Optimizing KVM VM-Exits"

2019-11-15 Thread Laszlo Ersek
On 11/08/19 10:22, Kashyap Chamarthy wrote: > This blog post summarizes the talk "Micro-Optimizing KVM VM-Exits"[1], > given by Andrea Arcangeli at the recently concluded KVM Forum 2019. > > [1] >

Re: [PATCH for-5.0 8/8] ppc/pnv: Link "chip" property to PnvXive::chip pointer

2019-11-15 Thread Greg Kurz
On Fri, 15 Nov 2019 13:25:01 +0100 Cédric Le Goater wrote: > > diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h > > index 5ecd3ba6ed24..d82484ecf669 100644 > > --- a/include/hw/ppc/pnv.h > > +++ b/include/hw/ppc/pnv.h > > @@ -87,9 +87,9 @@ typedef struct Pnv8Chip { > > typedef struct

[RFC 01/24] block/block-copy: specialcase first copy_range request

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
In block_copy_do_copy we fallback to read+write if copy_range failed. In this case copy_size is larger than defined for buffered IO, and there is corresponding commit. Still, backup copies data cluster by cluster, and most of requests are limited to one cluster anyway, so the only source of this

[RFC 20/24] job: call job_enter from job_user_pause

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
If main job coroutine called job_yield (while some background process is in progress), we should give it a chance to call job_pause_point(). It will be used in backup, when moved on async block-copy. Signed-off-by: Vladimir Sementsov-Ogievskiy --- job.c | 1 + 1 file changed, 1 insertion(+)

[RFC 21/24] backup: move to block-copy

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
This brings async request handling and block-status driven chunk sizes to backup out of the box, which improves backup performance. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 9 +- include/block/block_int.h | 7 + block/backup.c | 159

[RFC 12/24] block/block-copy: move block_copy_task_create down

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
Simple movement without any change. It's needed for the following patch, as this function will need to use some staff which is currently below it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 64 +++--- 1 file changed, 32

Re: [PATCH qemu-web] Add a blog post on "Micro-Optimizing KVM VM-Exits"

2019-11-15 Thread Kashyap Chamarthy
On Fri, Nov 15, 2019 at 01:41:01PM +0100, Paolo Bonzini wrote: > On 15/11/19 13:37, Kashyap Chamarthy wrote: > >> Opinions? Ideas? > > Another _potential_ venue: Given the topic is kernel space-related, it > > is likely to fit in with the LWN audience. LWN itself says they > > generally look for

Re: [PATCH v1] s390x: kvm-unit-tests: a PONG device for Sub Channels tests

2019-11-15 Thread Cornelia Huck
On Thu, 14 Nov 2019 18:42:35 +0100 Pierre Morel wrote: > On 2019-11-14 14:19, Cornelia Huck wrote: > > On Thu, 14 Nov 2019 14:02:35 +0100 > > Halil Pasic wrote: > > > >> On Thu, 14 Nov 2019 11:38:23 +0100 > >> Cornelia Huck wrote: > >> > >>> On Wed, 13 Nov 2019 20:02:33 +0100 > >>> Pierre

Re: Invalid ARM instruction for clang-compiled Android code

2019-11-15 Thread Peter Maydell
On Fri, 15 Nov 2019 at 05:03, Michael Goffioul wrote: > When running QEMU user mode on some code compiled by clang (dynamic linker > from AOSP-10), the emulator chokes on this instruction: > >9aa92: e8c0 2277 strexd r7, r2, r2, [r0] I think that ought to be a valid insn... >

[PATCH for-5.0 5/8] ppc/pnv: Link "psi" property to PnvOCC::psi pointer

2019-11-15 Thread Greg Kurz
The OCC object has both a pointer and a "psi" property pointing to the PSI object. Confusing bugs could arise if these ever go out of sync. Change the property definition so that it explicitely sets the pointer. Signed-off-by: Greg Kurz --- hw/ppc/pnv.c |8 hw/ppc/pnv_occ.c |

Re: [PATCH v7 1/3] block: introduce compress filter driver

2019-11-15 Thread Max Reitz
On 15.11.19 11:55, Vladimir Sementsov-Ogievskiy wrote: > 15.11.2019 13:52, Vladimir Sementsov-Ogievskiy wrote: >> 15.11.2019 12:32, Max Reitz wrote: >>> On 14.11.19 12:59, Vladimir Sementsov-Ogievskiy wrote: 14.11.2019 14:27, Max Reitz wrote: > On 13.11.19 19:43, Andrey Shinkevich wrote:

Re: [PATCH v2 06/20] nvme: add support for the abort command

2019-11-15 Thread Beata Michalska
Hi Klaus, On Wed, 13 Nov 2019 at 06:12, Klaus Birkelund wrote: > > On Tue, Nov 12, 2019 at 03:04:38PM +, Beata Michalska wrote: > > Hi Klaus > > > > Hi Beata, > > Thank you very much for your thorough reviews! I'll start going through > them one by one :) You might have seen that I've posted

Re: [PATCH for-5.0 0/8] ppc: Consolidate QOM links and pointers to the same object

2019-11-15 Thread Cédric Le Goater
On 15/11/2019 12:53, Greg Kurz wrote: > There's a recurring pattern in the code where a const link is added to a > newly instanciated object and the link is then used in the object's realize > function to keep a pointer to the QOM entity which the link points to. > > void create_obj_B(Object

Re: [PATCH qemu-web] Add a blog post on "Micro-Optimizing KVM VM-Exits"

2019-11-15 Thread Paolo Bonzini
On 15/11/19 13:37, Kashyap Chamarthy wrote: >> Opinions? Ideas? > Another _potential_ venue: Given the topic is kernel space-related, it > is likely to fit in with the LWN audience. LWN itself says they > generally look for kernel-related articles. Although, I'm aware that > there's already a

[PATCH v2 6/6] Added tests for close and change of logfile.

2019-11-15 Thread Robert Foley
One test ensures that the logfile handle is still valid even if the logfile is changed during logging. The other test validates that the logfile handle remains valid under the logfile lock even if the logfile is closed. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v1 - Changes

Re: QEMU HTML documentation now on qemu.org

2019-11-15 Thread G 3
> You can now access the latest QEMU HTML documentation built from https://wiki.qemu.org/docs/qemu-doc.html This is a welcome start. Could we add version support to the URL? What I mean is add the version number to the path of the URL. Like this: https://wiki.qemu.org/docs/4.2/qemu-doc.html

RE: [PATCH] Modify tests to work with clang

2019-11-15 Thread Taylor Simpson
Without volatile, clang turns that statement into a call to abort. It is discussed here (Chris Lattner's blog from 2011) http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html Here is the relevant paragraph If you're using an LLVM-based compiler, you can dereference a "volatile"

[RFC 09/24] block/block-copy: alloc task on each iteration

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
We are going to use aio-task-pool API, so tasks will be handled in parallel. We need therefore separate allocated task on each iteration. Introduce this logic now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 18 +++--- 1 file changed, 11 insertions(+), 7

[RFC 05/24] block/block-copy: rename start to offset in interfaces

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
offset/bytes pair is more usual naming in block layer, let's use it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 2 +- block/block-copy.c | 80 +++--- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git

[RFC 18/24] block/block-copy: add block_copy_cancel

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
Add function to cancel running async block-copy call. It will be used in backup. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 7 +++ block/block-copy.c | 20 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git

[RFC 04/24] block/block-copy: refactor interfaces to use bytes instead of end

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
We have a lot of "chunk_end - start" invocations, let's switch to bytes/cur_bytes scheme instead. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 4 +-- block/block-copy.c | 68 -- 2 files changed, 37 insertions(+), 35

[RFC 24/24] python: benchmark new backup architecture

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
Benchmark test for the series. This patch is RFC, it would be strange to commit it as is.. On the other hand I feel that we should commit some example to show usage of simplebench and bench_block_job. May be I should add some simple example to compare backup and mirror.. Any ideas? Anyway, this

[RFC 13/24] block/block-copy: use aio-task-pool API

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
Run block_copy iterations in parallel in aio tasks. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 102 +++-- 1 file changed, 90 insertions(+), 12 deletions(-) diff --git a/block/block-copy.c b/block/block-copy.c index

[PATCH v6] ssi: xilinx_spips: Skip spi bus update for a few register writes

2019-11-15 Thread Sai Pavan Boddu
A few configuration register writes need not update the spi bus state, so just return after the register write. Signed-off-by: Sai Pavan Boddu Reviewed-by: Alistair Francis Reviewed-by: Francisco Iglesias Tested-by: Francisco Iglesias --- Changes for V2: Just skip update of spips cs

Re: [PATCH] hw: add compat machines for 5.0

2019-11-15 Thread David Gibson
On Tue, Nov 12, 2019 at 11:48:11AM +0100, Cornelia Huck wrote: > Add 5.0 machine types for arm/i440fx/q35/s390x/spapr. > > For i440fx and q35, unversioned cpu models are still translated > to -v1; I'll leave changing this (if desired) to the respective > maintainers. > > Signed-off-by: Cornelia

Re: [SeaBIOS] Re: [PATCH] ahci: zero-initialize port struct

2019-11-15 Thread Sam Eiderman
Looks great Sam On Fri, Nov 15, 2019 at 1:35 PM Gerd Hoffmann wrote: > > Hi, > > > > I am afraid it will be slightly unreadable when looking at file histories. > > > The only commit that didn't change was: > > > [SeaBIOS] [PATCH v4 2/5] boot: Reorder functions in boot.c > > > > Hmm, looks

[PATCH v3 for 5.0 1/6] linux-user: Add support for enable/disable RTC features using ioctls

2019-11-15 Thread Filip Bozuta
This patch implements functionalities of following ioctls: RTC_AIE_ON, RTC_AIE_OFF - Alarm interrupt enable on/off Enable or disable the alarm interrupt, for RTCs that support alarms. The third ioctl's argument is ignored. RTC_UIE_ON, RTC_UIE_OFF - Update interrupt enable on/off

Re: 9p: requests efficiency

2019-11-15 Thread Greg Kurz
On Fri, 15 Nov 2019 02:10:50 +0100 Christian Schoenebeck wrote: > I'm currently reading up on how client requests (T messages) are currently > dispatched in general by 9pfs, to understand where potential inefficiencies > are that I am encountering. > > I mean 9pfs is pretty fast on raw I/O

Re: [PATCH for-5.0 0/8] ppc: Consolidate QOM links and pointers to the same object

2019-11-15 Thread Greg Kurz
On Fri, 15 Nov 2019 13:16:22 +0100 Cédric Le Goater wrote: > On 15/11/2019 12:53, Greg Kurz wrote: > > There's a recurring pattern in the code where a const link is added to a > > newly instanciated object and the link is then used in the object's realize > > function to keep a pointer to the

Re: [PATCH] hw: add compat machines for 5.0

2019-11-15 Thread Michael S. Tsirkin
On Tue, Nov 12, 2019 at 11:48:11AM +0100, Cornelia Huck wrote: > Add 5.0 machine types for arm/i440fx/q35/s390x/spapr. > > For i440fx and q35, unversioned cpu models are still translated > to -v1; I'll leave changing this (if desired) to the respective > maintainers. > > Signed-off-by: Cornelia

[RFC 00/24] backup performance: block_status + async

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
Hi all! These series does the following things: 1. bring block_status to block-copy, for efficient chunk sizes and handling ZERO clusters. (mirror does it) 2. bring aio-task-pool to block-copy, for parallel copying loop iteration. (mirror does it its own way) 4. add speed limit and cancelling

[RFC 16/24] block/block-copy: add max_chunk and max_workers paramters

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
They will be used for backup. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 5 + block/block-copy.c | 9 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/block/block-copy.h b/include/block/block-copy.h index

[RFC 10/24] block/block-copy: add state pointer to BlockCopyTask

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
We are going to use aio-task-pool API, so we'll need state pointer in BlockCopyTask anyway. Add it now and use where possible. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git

[RFC 22/24] python: add simplebench.py

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
Add simple benchmark table creator. Signed-off-by: Vladimir Sementsov-Ogievskiy --- python/simplebench.py | 122 ++ 1 file changed, 122 insertions(+) create mode 100644 python/simplebench.py diff --git a/python/simplebench.py b/python/simplebench.py new

Re: [PATCH v3 1/4] nbd/server: Prefer heap over stack for parsing client names

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
14.11.2019 5:46, Eric Blake wrote: > As long as we limit NBD names to 256 bytes (the bare minimum permitted > by the standard), stack-allocation works for parsing a name received > from the client. But as mentioned in a comment, we eventually want to > permit up to the 4k maximum of the NBD

[PATCH v2] Add a blog post on "Micro-Optimizing KVM VM-Exits"

2019-11-15 Thread Kashyap Chamarthy
This blog post summarizes the talk "Micro-Optimizing KVM VM-Exits"[1], given by Andrea Arcangeli at the recently concluded KVM Forum 2019. [1] https://kvmforum2019.sched.com/event/Tmwr/micro-optimizing-kvm-vm-exits-andrea-arcangeli-red-hat-inc Signed-off-by: Kashyap Chamarthy --- v2: Address

Re: [PATCH v7 1/3] block: introduce compress filter driver

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
15.11.2019 12:32, Max Reitz wrote: > On 14.11.19 12:59, Vladimir Sementsov-Ogievskiy wrote: >> 14.11.2019 14:27, Max Reitz wrote: >>> On 13.11.19 19:43, Andrey Shinkevich wrote: Allow writing all the data compressed through the filter driver. The written data will be aligned by the

Re: [SeaBIOS] Re: [PATCH] ahci: zero-initialize port struct

2019-11-15 Thread Gerd Hoffmann
Hi, > > I am afraid it will be slightly unreadable when looking at file histories. > > The only commit that didn't change was: > > [SeaBIOS] [PATCH v4 2/5] boot: Reorder functions in boot.c > > Hmm, looks like there have been more changes than I remember. Yep, v3..v4 diff is pretty big, so

[PATCH for-5.0 8/8] ppc/pnv: Link "chip" property to PnvXive::chip pointer

2019-11-15 Thread Greg Kurz
The XIVE object has both a pointer and a "chip" property pointing to the chip object. Confusing bugs could arise if these ever go out of sync. Change the property definition so that it explicitely sets the pointer. While here, rename pnv_xive_init() to pnv_xive_instance_init() for clarity.

[PATCH for-5.0 7/8] ppc/pnv: Link "chip" property to PnvCore::chip pointer

2019-11-15 Thread Greg Kurz
The core object has both a pointer and a "chip" property pointing to the chip object. Confusing bugs could arise if these ever go out of sync. Change the property definition so that it explicitely sets the pointer. Signed-off-by: Greg Kurz --- hw/ppc/pnv.c |4 ++--

Re: [PATCH v16 03/14] util/cutils: refactor do_strtosz() to support suffixes list

2019-11-15 Thread Philippe Mathieu-Daudé
Cc'ing Markus & Stefan. On 11/15/19 8:53 AM, Tao Xu wrote: Add do_strtomul() to convert string according to different suffixes. Reviewed-by: Eduardo Habkost Signed-off-by: Tao Xu --- No changes in v16. Changes in v15: - Add a new patch to refactor do_strtosz() (Eduardo) ---

Re: [PATCH for-5.0 8/8] ppc/pnv: Link "chip" property to PnvXive::chip pointer

2019-11-15 Thread Cédric Le Goater
> diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h > index 5ecd3ba6ed24..d82484ecf669 100644 > --- a/include/hw/ppc/pnv.h > +++ b/include/hw/ppc/pnv.h > @@ -87,9 +87,9 @@ typedef struct Pnv8Chip { > typedef struct Pnv9Chip { > /*< private >*/ > PnvChip parent_obj; > +

Re: [PATCH for-5.0 7/8] ppc/pnv: Link "chip" property to PnvCore::chip pointer

2019-11-15 Thread Cédric Le Goater
> diff --git a/include/hw/ppc/pnv_core.h b/include/hw/ppc/pnv_core.h > index 55eee95104da..fce6d8d9b31b 100644 > --- a/include/hw/ppc/pnv_core.h > +++ b/include/hw/ppc/pnv_core.h > @@ -36,11 +36,11 @@ typedef struct PnvChip PnvChip; > typedef struct PnvCore { > /*< private >*/ > CPUCore

Re: [PATCH v3 2/4] bitmap: Enforce maximum bitmap name length

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
14.11.2019 5:46, Eric Blake wrote: > We document that for qcow2 persistent bitmaps, the name cannot exceed > 1023 bytes. It is inconsistent if transient bitmaps do not have to > abide by the same limit, and it is unlikely that any existing client > even cares about using bitmap names this long.

Re: [PATCH v1] s390x: kvm-unit-tests: a PONG device for Sub Channels tests

2019-11-15 Thread Pierre Morel
On 2019-11-15 11:35, Cornelia Huck wrote: On Thu, 14 Nov 2019 18:42:35 +0100 Pierre Morel wrote: On 2019-11-14 14:19, Cornelia Huck wrote: On Thu, 14 Nov 2019 14:02:35 +0100 Halil Pasic wrote: On Thu, 14 Nov 2019 11:38:23 +0100 Cornelia Huck wrote: On Wed, 13 Nov 2019 20:02:33

Re: [PATCH v3 1/4] nbd/server: Prefer heap over stack for parsing client names

2019-11-15 Thread Maxim Levitsky
On Thu, 2019-11-14 at 07:33 -0600, Eric Blake wrote: > On 11/14/19 4:04 AM, Maxim Levitsky wrote: > > On Wed, 2019-11-13 at 20:46 -0600, Eric Blake wrote: > > > As long as we limit NBD names to 256 bytes (the bare minimum permitted > > > by the standard), stack-allocation works for parsing a name

[PATCH for-5.0 6/8] ppc/pnv: Link "chip" property to PnvHomer::chip pointer

2019-11-15 Thread Greg Kurz
The homer object has both a pointer and a "chip" property pointing to the chip object. Confusing bugs could arise if these ever go out of sync. Change the property definition so that it explicitely sets the pointer. Signed-off-by: Greg Kurz --- hw/ppc/pnv.c |8

[PATCH for-5.0 3/8] xive: Link "xive" property to XiveEndSource::xrtr pointer

2019-11-15 Thread Greg Kurz
The END source object has both a pointer and a "xive" property pointing to the router object. Confusing bugs could arise if these ever go out of sync. Change the property definition so that it explicitely sets the pointer. The property isn't optional : not being able to set the link is a bug and

[PATCH v2 5/6] Add use of RCU for qemu_logfile.

2019-11-15 Thread Robert Foley
This now allows changing the logfile while logging is active, and also solves the issue of a seg fault while changing the logfile. Any read access to the qemu_logfile handle will use the rcu_read_lock()/unlock() around the use of the handle. To fetch the handle we will use atomic_rcu_read(). We

[PATCH v2 3/6] Add a mutex to guarantee single writer to qemu_logfile handle.

2019-11-15 Thread Robert Foley
Also added qemu_logfile_init() for initializing the logfile mutex. Signed-off-by: Robert Foley --- v2 - In qemu_set_log() moved location of mutex lock/unlock due to cleanup changes. --- v1 - changed qemu_logfile_init() to use __constructor__. --- util/log.c | 14 ++ 1

[PATCH v2 2/6] Cleaned up flow of code in qemu_set_log(), to simplify and clarify.

2019-11-15 Thread Robert Foley
Also added some explanation of the reasoning behind the branches. Signed-off-by: Robert Foley --- v2 - This is new in patch v2. --- util/log.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/util/log.c b/util/log.c index 4316fe74ee..417d16ec66

Re: [RFC PATCH v2 24/26] qcow2: Add the 'extended_l2' option and the QCOW2_INCOMPAT_EXTL2 bit

2019-11-15 Thread Alberto Garcia
On Tue 05 Nov 2019 01:47:58 PM CET, Max Reitz wrote: >> @@ -1347,6 +1347,12 @@ static int coroutine_fn >> qcow2_do_open(BlockDriverState *bs, QDict *options, >> s->subcluster_size = s->cluster_size / s->subclusters_per_cluster; >> s->subcluster_bits = ctz32(s->subcluster_size); >> >>

[RFC 11/24] block/block-copy: move task size initial calculation to _task_create

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
Comment "Called only on full-dirty region" without corresponding assertion is a very unsafe thing. Adding assertion means call bdrv_dirty_bitmap_next_zero twice. Instead, let's move bdrv_dirty_bitmap_next_zero call to block_copy_task_create. It also allows to drop cur_bytes variable which partly

[RFC 19/24] blockjob: add set_speed to BlockJobDriver

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
We are going to use async block-copy call in backup, so we'll need to passthrough setting backup speed to block-copy call. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/blockjob_int.h | 2 ++ blockjob.c | 6 ++ 2 files changed, 8 insertions(+) diff --git

[RFC 02/24] block/block-copy: use block_status

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
Use bdrv_block_status_above to chose effective chunk size and to handle zeroes effectively. This substitutes checking for just being allocated or not, and drops old code path for it. Assistance by backup job is dropped too, as caching block-status information is more difficult than just caching

Re: [RESEND PATCH v21 3/6] ACPI: Add APEI GHES table generation support

2019-11-15 Thread Igor Mammedov
On Fri, 15 Nov 2019 14:32:47 + gengdongjiu wrote: > > > + */ > > > +static void acpi_ghes_build_notify(GArray *table, const uint8_t type) > > > > typically format should be build_WHAT(), so > > build_ghes_hw_error_notification() > > > > And I'd move this out into its own patch. > > this

Re: [PATCH] Semihost SYS_READC implementation (v4)

2019-11-15 Thread Peter Maydell
On Thu, 14 Nov 2019 at 22:27, Keith Packard wrote: > > Richard Henderson writes: > > > For semi-hosting, it seems even better if the semi-hosting syscall > > instruction > > is not "real", because you're explicitly requesting services from "unreal" > > hardware. It should be specified to

Re: [PATCH v7 1/3] block: introduce compress filter driver

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
15.11.2019 13:52, Vladimir Sementsov-Ogievskiy wrote: > 15.11.2019 12:32, Max Reitz wrote: >> On 14.11.19 12:59, Vladimir Sementsov-Ogievskiy wrote: >>> 14.11.2019 14:27, Max Reitz wrote: On 13.11.19 19:43, Andrey Shinkevich wrote: > Allow writing all the data compressed through the

[PATCH for-5.0 4/8] ppc/pnv: Link "psi" property to PnvLpc::psi pointer

2019-11-15 Thread Greg Kurz
The LPC object has both a pointer and a "psi" property pointing to the PSI object. Confusing bugs could arise if these ever go out of sync. Change the property definition so that it explicitely sets the pointer. Signed-off-by: Greg Kurz --- hw/ppc/pnv.c |8 hw/ppc/pnv_lpc.c |

Re: [PATCH v2] Add a blog post on "Micro-Optimizing KVM VM-Exits"

2019-11-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191115102406.31316-1-kcham...@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

[PATCH for-5.0 0/8] ppc: Consolidate QOM links and pointers to the same object

2019-11-15 Thread Greg Kurz
There's a recurring pattern in the code where a const link is added to a newly instanciated object and the link is then used in the object's realize function to keep a pointer to the QOM entity which the link points to. void create_obj_B(Object *obj_a) { Object *obj_b; obj_b =

Re: [PATCH qemu-web] Add a blog post on "Micro-Optimizing KVM VM-Exits"

2019-11-15 Thread Paolo Bonzini
On 15/11/19 13:08, Thomas Huth wrote: > On 08/11/2019 10.22, Kashyap Chamarthy wrote: >> This blog post summarizes the talk "Micro-Optimizing KVM VM-Exits"[1], >> given by Andrea Arcangeli at the recently concluded KVM Forum 2019. >> > > Hi Kashyap, > > first thanks for writing up this article!

Re: [PATCH] Modify tests to work with clang

2019-11-15 Thread Alex Bennée
Taylor Simpson writes: > Signed-off-by: Taylor Simpson > --- > tests/tcg/multiarch/float_helpers.c | 13 - > tests/tcg/multiarch/linux-test.c| 2 +- > 2 files changed, 13 insertions(+), 2 deletions(-) > > diff --git a/tests/tcg/multiarch/float_helpers.c >

Re: [PATCH for-5.0 7/8] ppc/pnv: Link "chip" property to PnvCore::chip pointer

2019-11-15 Thread Greg Kurz
On Fri, 15 Nov 2019 13:24:50 +0100 Cédric Le Goater wrote: > > diff --git a/include/hw/ppc/pnv_core.h b/include/hw/ppc/pnv_core.h > > index 55eee95104da..fce6d8d9b31b 100644 > > --- a/include/hw/ppc/pnv_core.h > > +++ b/include/hw/ppc/pnv_core.h > > @@ -36,11 +36,11 @@ typedef struct PnvChip

[PATCH v2 4/6] qemu_log_lock/unlock now preserves the qemu_logfile handle.

2019-11-15 Thread Robert Foley
qemu_log_lock() now returns a handle and qemu_log_unlock() receives a handle to unlock. This allows for changing the handle during logging and ensures the lock() and unlock() are for the same file. Signed-off-by: Robert Foley Reviewed-by: Alex Bennée --- v1 - Moved this up in the patch

[PATCH] target/arm: Clean up arm_cpu_vq_map_next_smaller asserts

2019-11-15 Thread Richard Henderson
Coverity reports, in sve_zcr_get_valid_len, "Subtract operation overflows on operands arm_cpu_vq_map_next_smaller(cpu, start_vq + 1U) and 1U" First, fix the aarch32 stub version to not return 0, but to simply assert unreachable. Because that nonsense return value does exactly what Coverity

[RFC 14/24] block/block-copy: More explicit call_state

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
Refactor common path to use BlockCopyCallState pointer as parameter, to prepare it for use in asynchronous block-copy (at least, we'll need to run block-copy in a coroutine, passing the whole parameters as one pointer). Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/block-copy.c | 50

[RFC 06/24] block/block-copy: reduce intersecting request lock

2019-11-15 Thread Vladimir Sementsov-Ogievskiy
Currently, block_copy operation lock the whole requested region. But there is no reason to lock clusters, which are already copied, it will disturb other parallel block_copy requests for no reason. Let's instead do the following: Lock only sub-region, which we are going to operate on. Then,

Re: [RESEND PATCH v21 3/6] ACPI: Add APEI GHES table generation support

2019-11-15 Thread gengdongjiu
> > + */ > > +static void acpi_ghes_build_notify(GArray *table, const uint8_t type) > > typically format should be build_WHAT(), so > build_ghes_hw_error_notification() > > And I'd move this out into its own patch. > this applies to other trivial in-depended sub-tables, that take all data >

<    1   2   3   >