Re: [Qemu-devel] [PATCH v2] exec: fix address_space_get_iotlb_entry page mask

2017-05-31 Thread Peter Xu
On Tue, May 30, 2017 at 06:23:14PM +0200, Paolo Bonzini wrote: > > > On 29/05/2017 06:02, Peter Xu wrote: > > The IOTLB that it returned didn't guarantee that page_mask is indeed a > > so-called page mask. That won't affect current usage since now only > > vhost is using it (vhost API allows

Re: [Qemu-devel] [PATCH 2/2] hostmem-file: add an attribute 'align' to set its alignment

2017-05-31 Thread Haozhong Zhang
On 05/30/17 10:16 +0100, Stefan Hajnoczi wrote: > On Fri, May 26, 2017 at 10:24:38AM +0800, Haozhong Zhang wrote: > > file_ram_alloc() currently maps the backend file via mmap to a virtual > > address aligned to the value returned by qemu_fd_getpagesize(). When a > > DAX device (e.g. /dev/dax0.0)

Re: [Qemu-devel] [Qemu-ppc] [PULL 11/18] pseries: Split CAS PVR negotiation out into a separate function

2017-05-31 Thread David Gibson
On Mon, May 29, 2017 at 11:14:08PM +0200, Greg Kurz wrote: > On Thu, 25 May 2017 13:51:25 +1000 > David Gibson wrote: > > > Guests of the qemu machine type go through a feature negotiation process > > known as "client architecture support" (CAS) during early boot.

Re: [Qemu-devel] [RFC v4 1/5] hw/arm/smmu-common: smmu base class

2017-05-31 Thread Auger Eric
Hi Peter, On 30/05/2017 17:56, Peter Maydell wrote: > On 13 May 2017 at 18:43, Eric Auger wrote: >> Introduces the base device and class for the ARM smmu. >> Implements VMSAv8-64 table lookup and translation. VMSAv8-32 >> is not yet implemented. >> >> For VFIO integration

Re: [Qemu-devel] [PATCH 07/17] json: learn to parse uint64 numbers

2017-05-31 Thread Marc-André Lureau
Hi On Tue, May 30, 2017 at 6:22 PM Eric Blake wrote: > On 05/30/2017 06:35 AM, Marc-André Lureau wrote: > > Hi > > > > On Mon, May 15, 2017 at 6:00 PM Markus Armbruster > wrote: > > > >> Marc-André Lureau writes: > >> > >>>

[Qemu-devel] [PATCH] help: Add newline to end of thread option help text

2017-05-31 Thread Suraj Jitindar Singh
The help text for the thread sub option of the accel option is missing a newline at the end. This is annoying as it makes it hard to see the help text for the next option. Add the new line so that the following option help text (-smp) is displayed on a new line rather on the same line and

Re: [Qemu-devel] [PATCH 1/2] nvdimm: warn if the backend is not a DAX device

2017-05-31 Thread Haozhong Zhang
On 05/30/17 10:15 +0100, Stefan Hajnoczi wrote: > On Fri, May 26, 2017 at 10:24:37AM +0800, Haozhong Zhang wrote: > > Applications in Linux guest that use device-dax never trigger flush > > that can be trapped by KVM/QEMU. Meanwhile, if the host backend is not > > device-dax, QEMU cannot guarantee

[Qemu-devel] [PATCH v2 6/6] tcg: change tcg related file's compile definition

2017-05-31 Thread Yang Zhong
tcg: move tcg related compile definitions form Makefile.target to tcg/Makefile.objs Signed-off-by: Yang Zhong --- Makefile.target | 7 +-- tcg/Makefile.objs | 2 ++ 2 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 tcg/Makefile.objs diff --git

[Qemu-devel] [PATCH v2 5/6] tcg: move tci.c to tcg/ subdirectory

2017-05-31 Thread Yang Zhong
tcg: move tci.c to tcg/ subdirectory Signed-off-by: Yang Zhong --- Makefile.target| 2 +- tci.c => tcg/tci.c | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tci.c => tcg/tci.c (100%) diff --git a/Makefile.target b/Makefile.target index 648e61e..8561132

[Qemu-devel] [PATCH v2 2/6] tcg: move translate-all.c to tcg/ subdirectory

2017-05-31 Thread Yang Zhong
tcg: move translate-all.c to tcg/ subdirectory and also update related trace-events file. Signed-off-by: Yang Zhong --- Makefile.objs | 1 + Makefile.target| 3 ++- tcg/trace-events | 6 ++

[Qemu-devel] [PATCH] pci: Fix unreasonable return value check

2017-05-31 Thread Mao Zhongyi
The return value of pci_add_capability2() is only 2 cases, positive on success, nagetive on failure and set error message to Error. In other worlds, If Error is filled, the return value must be nagetive. There is no case where errp is set but the return value is a positive. But

Re: [Qemu-devel] [RFC v4 0/5] ARM SMMUv3 Emulation Support

2017-05-31 Thread Auger Eric
Hi Peter, On 30/05/2017 18:09, Peter Maydell wrote: > On 13 May 2017 at 18:43, Eric Auger wrote: >> This series introduces the emulation code for ARM SMMUv3. >> This is the continuation of Prem's work [1]. >> >> This v4 is yet another visibility step as many restrictions

Re: [Qemu-devel] [PATCH RFC 5/6] migration: let MigrationState be an QObject

2017-05-31 Thread Peter Xu
On Tue, May 30, 2017 at 05:57:44PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > Let the old man "MigrationState" join the object family. Direct benefit > > is that we can start to use all the property features derived from > > current QObject, like: HW_COMPAT_* bits,

Re: [Qemu-devel] [PATCH RFC 6/6] migration: enable return path for precopy

2017-05-31 Thread Juan Quintela
Peter Xu wrote: > On Tue, May 30, 2017 at 05:59:10PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > Let this be a flag, default to on. Turn it off for <=2.9 versions. >> > >> > After this patch, return path will be on even for pre-copy migration as >> >

Re: [Qemu-devel] [PATCH RFC 6/6] migration: enable return path for precopy

2017-05-31 Thread Peter Xu
On Wed, May 31, 2017 at 09:43:21AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Tue, May 30, 2017 at 05:59:10PM +0200, Juan Quintela wrote: > >> Peter Xu wrote: > >> > Let this be a flag, default to on. Turn it off for <=2.9 versions. > >> > > >> >

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/4] spapr: disable hotplugging without OS

2017-05-31 Thread David Gibson
On Tue, May 30, 2017 at 12:15:59PM -0500, Michael Roth wrote: > Quoting David Gibson (2017-05-24 22:16:26) > > On Wed, May 24, 2017 at 12:40:37PM -0500, Michael Roth wrote: > > > Quoting Laurent Vivier (2017-05-24 11:02:30) > > > > On 24/05/2017 17:54, Greg Kurz wrote: > > > > > On Wed, 24 May

Re: [Qemu-devel] [RFC v4 4/5] hw/arm/virt: Add 2.10 machine type

2017-05-31 Thread Auger Eric
Hi Peter, On 30/05/2017 18:04, Peter Maydell wrote: > On 13 May 2017 at 18:43, Eric Auger wrote: >> The new machine type allows smmuv3 instantiation. A new option >> is introduced to turn the feature on/off (off by default). > > Should we go for default-on, or would that

Re: [Qemu-devel] [PATCH RFC 4/6] migration: shut src return path unconditionally

2017-05-31 Thread Juan Quintela
Peter Xu wrote: > On Tue, May 30, 2017 at 05:50:27PM +0200, Juan Quintela wrote: >> Peter Xu wrote: >> > We were do the shutting off only for postcopy. Now we do this as long as >> > the source return path is there. >> > >> > Moving the cleanup of

Re: [Qemu-devel] [PATCH] msi: remove return code for msi_init()

2017-05-31 Thread Paolo Bonzini
> > >>I'd prefer to remove msi_nonbroken completely if we don't > > >> know where the problem is. > > > > > > So you're proposing to (1) remove msi_nonbroken, (2) see which boards > > > burst into flames, and (3) fix them, or perhaps add a less wrong stop > > > gap msi_broken just

Re: [Qemu-devel] [PATCH RFC 6/6] migration: enable return path for precopy

2017-05-31 Thread Peter Xu
On Tue, May 30, 2017 at 05:59:10PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > Let this be a flag, default to on. Turn it off for <=2.9 versions. > > > > After this patch, return path will be on even for pre-copy migration as > > long as the transport support, e.g., for

Re: [Qemu-devel] [PATCH v2 6/6] new script/analyse-tlb-flushes-simpletrace.py

2017-05-31 Thread Alex Bennée
Pranith Kumar writes: > Hi Alex, > > Please find some comments and questions below: > > On Wed, May 17, 2017 at 10:52 AM, Alex Bennée wrote: >> This is a simple helper script to extract TLB flush stats from the a >> simpletrace file and plot

Re: [Qemu-devel] [Qemu devel v5 PATCH 5/5] msf2: Add Emcraft's Smartfusion2 SOM kit.

2017-05-31 Thread Philippe Mathieu-Daudé
Hi Subbaraya, On 05/16/2017 12:38 PM, Subbaraya Sundeep wrote: Emulated Emcraft's Smartfusion2 System On Module starter kit. Signed-off-by: Subbaraya Sundeep --- hw/arm/Makefile.objs | 1 + hw/arm/msf2-som.c| 89

[Qemu-devel] [PATCH v2 0/6] tcg: move the tcg files into tcg/ subdirectory.

2017-05-31 Thread Yang Zhong
Move the tcg related files into tcg/ subdirectory, which will make the code more clean in qemu. Next step, we will base on those changes to disable tcg. Yang Zhong (6): tcg: move tcg-runtime.c to tcg/ subdirectory tcg: move translate-all.c to tcg/ subdirectory tcg: move tcg header file

[Qemu-devel] [PATCH v2 3/6] tcg: move tcg header file

2017-05-31 Thread Yang Zhong
tcg: move translate-all.h to tcg/ subdirectory Signed-off-by: Yang Zhong --- translate-all.h => tcg/translate-all.h | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translate-all.h => tcg/translate-all.h (100%) diff --git a/translate-all.h

[Qemu-devel] [PATCH v3] exec: fix address_space_get_iotlb_entry page mask

2017-05-31 Thread Peter Xu
The IOTLB that it returned didn't guarantee that page_mask is indeed a so-called page mask. That won't affect current usage since now only vhost is using it (vhost API allows arbitary IOTLB range). However we have IOTLB scemantic and we should best follow it. This patch fixes this issue to make

Re: [Qemu-devel] [PATCH] msi: remove return code for msi_init()

2017-05-31 Thread Peter Xu
On Tue, May 30, 2017 at 04:29:57PM +0200, Paolo Bonzini wrote: > > > On 30/05/2017 16:28, Markus Armbruster wrote: > > Paolo Bonzini writes: > > > >>> Note that a board that doesn't support MSI can take MSI-capable devices > >>> just fine. Only the broken boards can't. >

Re: [Qemu-devel] [PATCH] spapr: manage hotplugged devices while the VM is not started

2017-05-31 Thread Laurent Vivier
On 31/05/2017 06:35, David Gibson wrote: > On Tue, May 30, 2017 at 06:04:45PM +0200, Laurent Vivier wrote: >> For QEMU, a hotlugged device is a device added using the HMP/QMP >> interface. >> For SPAPR, a hotplugged device is a device added while the >> machine is running. In this case QEMU

Re: [Qemu-devel] [PATCH RFC 4/6] migration: shut src return path unconditionally

2017-05-31 Thread Peter Xu
On Tue, May 30, 2017 at 05:50:27PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > We were do the shutting off only for postcopy. Now we do this as long as > > the source return path is there. > > > > Moving the cleanup of from_src_file there too. > > > > Signed-off-by: Peter

[Qemu-devel] [PATCH v2] alpha-user: wire epoll_create, epoll_ctl, epoll_wait

2017-05-31 Thread Sergei Trofimovich
Noticed when ran GHC on alpha: $ qemu-alpha -L /usr/alpha-unknown-linux-gnu/ /tmp/a qemu: Unsupported syscall: 407 linux-user/syscall.c does have 'epoll_create' wiring, but under nondeprecated name. Instead of defining both TARGET_NR_sys_epoll_create and TARGET_NR_epoll_create

[Qemu-devel] [PATCH v2 1/6] tcg: move tcg-runtime.c to tcg/ subdirectory

2017-05-31 Thread Yang Zhong
tcg: move tcg-runtime.c to tcg/ subdirectory Signed-off-by: Yang Zhong --- Makefile.target| 2 +- tcg-runtime.c => tcg/tcg-runtime.c | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename tcg-runtime.c => tcg/tcg-runtime.c (100%) diff --git

[Qemu-devel] [PATCH v2 4/6] tcg: move translate-common.c to tcg/ subdirectory

2017-05-31 Thread Yang Zhong
tcg: move translate-common.c to tcg/ subdirectory Signed-off-by: Yang Zhong --- Makefile.target | 2 +- translate-common.c => tcg/translate-common.c | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename translate-common.c =>

Re: [Qemu-devel] [RFC v4 2/5] hw/arm/smmuv3: smmuv3 emulation model

2017-05-31 Thread Auger Eric
Hi Peter, On 30/05/2017 18:01, Peter Maydell wrote: > On 13 May 2017 at 18:43, Eric Auger wrote: >> From: Prem Mallappa >> >> Introduces the SMMUv3 derived model. This is based on >> System MMUv3 specification (v17). >> >> Signed-off-by: Prem

Re: [Qemu-devel] [PATCH RFC 6/6] migration: enable return path for precopy

2017-05-31 Thread Juan Quintela
Peter Xu wrote: ... >> > Here what I wanted to achieve is that: >> > >> > a. for postcopy, we should try to enable return path, and it must >> >succeed >> > >> > b. for the case when enable_return_path is set, we try to enable return >> >path, but even if it failed,

Re: [Qemu-devel] [PATCH] msi: remove return code for msi_init()

2017-05-31 Thread Peter Xu
On Wed, May 31, 2017 at 03:40:14AM -0400, Paolo Bonzini wrote: > > > > >>I'd prefer to remove msi_nonbroken completely if we don't > > > >> know where the problem is. > > > > > > > > So you're proposing to (1) remove msi_nonbroken, (2) see which boards > > > > burst into flames, and

Re: [Qemu-devel] [PATCH] msi: remove return code for msi_init()

2017-05-31 Thread Peter Xu
On Wed, May 31, 2017 at 04:28:47AM -0400, Paolo Bonzini wrote: > > > Ok before I move on let's see whether this is what we want... > > > > - firstly, find all machine types: > > > > pxdev:qemu [edu-fix]# grep -R ".parent = TYPE_MACHINE" * | wc > > 49 1962269 > > > > so now we

Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.

2017-05-31 Thread Richard W.M. Jones
On Tue, May 30, 2017 at 02:05:15PM -0500, Rob Landley wrote: > On 05/29/2017 05:14 AM, Richard W.M. Jones wrote: > > I see in the disassembly use of cmovne (new in Pentium Pro) and > > bswap (new in 486). > > [http://cse.unl.edu/~goddard/Courses/CSCE351/IntelArchitecture/InstructionSetSummary.pdf]

[Qemu-devel] [PULL 5/5] migration: use dirty_rate_high_cnt more aggressively

2017-05-31 Thread Juan Quintela
From: Felipe Franciosi The commit message from 070afca25 suggests that dirty_rate_high_cnt should be used more aggressively to start throttling after two iterations instead of four. The code, however, only changes the auto convergence behaviour to throttle after three

[Qemu-devel] [PULL 2/5] migration: keep bytes_xfer_prev init'd to zero

2017-05-31 Thread Juan Quintela
From: Felipe Franciosi The first time migration_bitmap_sync() is called, bytes_xfer_prev is set to ram_state.bytes_transferred which is, at this point, zero. The next time migration_bitmap_sync() is called, an iteration has happened and bytes_xfer_prev is set to 'x' bytes.

[Qemu-devel] [PULL 0/5] Migration pull request

2017-05-31 Thread Juan Quintela
14:15:15 +0100) are available in the git repository at: git://github.com/juanquintela/qemu.git tags/migration/20170531 for you to fetch changes up to b4a3c64b16856a018869bfd4a9ed3b2a74554541: migration: use dirty_rate_high_cnt more aggressively (2017-05-31 09:39:20 +0200

[Qemu-devel] [PULL 3/5] migration: set dirty_pages_rate before autoconverge logic

2017-05-31 Thread Juan Quintela
From: Felipe Franciosi Currently, a "period" in the RAM migration logic is at least a second long and accounts for what happened since the last period (or the beginning of the migration). The dirty_pages_rate counter is calculated at the end this logic. If the auto

[Qemu-devel] [PATCH v3 0/3] Remove of loadvm handlers

2017-05-31 Thread Juan Quintela
Hi Changes from v2 - also store load_section_id (dave found the problem) I think that we can remove it now, at least. Thanks, Juan. [v2] - store load_version_id field to SaveStateHandler - Adjust everything to use it Thanks to Laurent to point that to me. [v1] We just have a loadvm handlers

[Qemu-devel] [PATCH 07/11] qed: move tail of qed_aio_write_main to qed_aio_write_{cow, alloc}

2017-05-31 Thread Paolo Bonzini
This part is never called for in-place writes, move it away to avoid the "backwards" coding style typical of callback-based code. Signed-off-by: Paolo Bonzini --- block/qed.c | 68 - 1 file changed, 31

Re: [Qemu-devel] [Qemu-block] [PATCH v3 10/16] mirror: Do initial aio context move of target via BB interface

2017-05-31 Thread Stefan Hajnoczi
On Wed, May 24, 2017 at 10:52:29AM +0800, Fam Zheng wrote: > While blockdev-backup tried to verify before moving target's aio context, the > same is missing for blockdev-mirror. Now that we have the right interface, fix > this as well. > > As a bonus, the aio context move is now conditional,

Re: [Qemu-devel] [Qemu-block] [PATCH v3 00/16] block: Protect AIO context change with perm API

2017-05-31 Thread Stefan Hajnoczi
On Wed, May 24, 2017 at 10:52:19AM +0800, Fam Zheng wrote: > v3: Move blk_set_aio_context to the front of mirror_start_job to avoid > accessing target without acquiring its aio context. [Stefan] > Use error_free_or_abort in test code. [Stefan] Please include my Reviewed-bys from the

[Qemu-devel] [PATCH v3 2/4] migration: Inactivate images after .save_live_complete_precopy()

2017-05-31 Thread Kevin Wolf
Block migration may still access the image during its .save_live_complete_precopy() implementation, so we should only inactivate the image afterwards. Another reason for the change is that inactivating an image fails when there is still a non-device BlockBackend using it, which includes the BBs

Re: [Qemu-devel] [PATCH RFC 3/6] migration: fix leak of src file on dst

2017-05-31 Thread Juan Quintela
Peter Xu wrote: > The return path channel is possibly leaked. Fix it. > > Signed-off-by: Peter Xu > --- > migration/migration.c | 5 + > 1 file changed, 5 insertions(+) > Queued this one. Reviewed-by: Juan Quintela > diff

[Qemu-devel] [PATCH v3 3/4] migration/block: Clean up BBs in block_save_complete()

2017-05-31 Thread Kevin Wolf
We need to release any block migrations BlockBackends on the source before successfully completing the migration because otherwise inactivating the images will fail (inactivation only tolerates device BBs). Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 10/12] hmp: Add hmp_announce_self

2017-05-31 Thread Dr. David Alan Gilbert
* Vladislav Yasevich (vyase...@redhat.com) wrote: > Add an HMP command to trigger self annocements. > > Signend-off-by: Vladislav Yasevich ^^ > --- > hmp-commands.hx | 14 ++ > hmp.c | 5 + > hmp.h | 1 + > 3 files changed, 20

Re: [Qemu-devel] [PATCH v3 09/16] block/qcow2: Generalize preallocate()

2017-05-31 Thread Stefan Hajnoczi
On Fri, May 26, 2017 at 06:55:11PM +0200, Max Reitz wrote: > This patch adds two new parameters to the preallocate() function so we > will be able to use it not just for preallocating a new image but also > for preallocated image growth. > > The offset parameter allows the caller to specify a

Re: [Qemu-devel] [PATCH v2 0/6] vhost-user: Specify and implement device IOTLB support

2017-05-31 Thread Jason Wang
On 2017年05月31日 02:20, Michael S. Tsirkin wrote: On Fri, May 26, 2017 at 04:28:52PM +0200, Maxime Coquelin wrote: This series aims at specifying ans implementing the protocol update required to support device IOTLB with user backends. In this second non-RFC version, main changes are: - spec

Re: [Qemu-devel] [PATCH v2 3/6] vhost: extend ring information update for IOTLB to all rings

2017-05-31 Thread Jason Wang
On 2017年05月31日 02:12, Michael S. Tsirkin wrote: On Fri, May 26, 2017 at 04:28:55PM +0200, Maxime Coquelin wrote: Vhost-kernel backend need needs to receive IOTLB entry for used ring information early, which is done by triggering a miss event on its address. This patch extends this

Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.

2017-05-31 Thread Thomas Huth
On 30.05.2017 21:05, Rob Landley wrote: > On 05/29/2017 05:14 AM, Richard W.M. Jones wrote: >> I see in the disassembly use of cmovne (new in Pentium Pro) and >> bswap (new in 486). >> [http://cse.unl.edu/~goddard/Courses/CSCE351/IntelArchitecture/InstructionSetSummary.pdf] >> >> The cmovne

[Qemu-devel] [PULL 1/5] migration: Create savevm.h for functions exported from savevm.c

2017-05-31 Thread Juan Quintela
This removes last trace of migration functions from sysemu/sysemu.h. Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier --- include/sysemu/sysemu.h | 47 --- migration/colo.c | 1 +

[Qemu-devel] [PATCH v3 2/3] migration: loadvm handlers are not used

2017-05-31 Thread Juan Quintela
So we remove all traces of them. Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier Reviewed-by: Peter Xu --- include/migration/migration.h | 5 - include/migration/vmstate.h | 2 -- include/qemu/typedefs.h | 1 -

[Qemu-devel] [PULL 4/5] migration: set bytes_xfer_* outside of autoconverge logic

2017-05-31 Thread Juan Quintela
From: Felipe Franciosi The bytes_xfer_now/prev counters are only used by the auto convergence logic. However, they are used alongside the dirty_pages_rate counter, which is calculated (and required) outside of this logic. The problem with this approach is that if the auto

[Qemu-devel] [PATCH v2 2/2] msi: remove return code for msi_init()

2017-05-31 Thread Peter Xu
Ok now we only has one possible failure in msi_init(), which is pci_add_capability2(). However if that fails, it should really be a programming error. Assertion suites. Then, *errp is useless. Removing it altogether. Since msi_init() won't fail now after that, touch up all the callers to avoid

[Qemu-devel] [PATCH 02/11] coroutine-lock: add qemu_co_rwlock_downgrade and qemu_co_rwlock_upgrade

2017-05-31 Thread Paolo Bonzini
These functions are more efficient in the presence of contention. qemu_co_rwlock_downgrade also guarantees not to block, which may be useful in some algorithms too. Signed-off-by: Paolo Bonzini --- include/qemu/coroutine.h | 19 +++

[Qemu-devel] [PATCH 05/11] vvfat: make it thread-safe

2017-05-31 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/vvfat.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block/vvfat.c b/block/vvfat.c index 9c82371360..457b73a35c 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -2983,8 +2983,14 @@ static int coroutine_fn

[Qemu-devel] [PATCH 08/11] block: invoke .bdrv_drain callback in coroutine context and from AioContext

2017-05-31 Thread Paolo Bonzini
This will let the callback take a CoMutex in the next patch. Signed-off-by: Paolo Bonzini --- block/io.c| 42 +- block/qed.c | 6 +++--- include/block/block_int.h | 2 +- 3 files changed, 37

Re: [Qemu-devel] [Qemu-block] [PATCH v2 06/16] backup: Request BLK_PERM_AIO_CONTEXT_CHANGE on target

2017-05-31 Thread Fam Zheng
On Wed, 05/31 10:39, Stefan Hajnoczi wrote: > On Wed, May 24, 2017 at 10:18:44AM +0800, Fam Zheng wrote: > > On Thu, 05/11 15:41, Stefan Hajnoczi wrote: > > > On Wed, Apr 19, 2017 at 05:43:46PM +0800, Fam Zheng wrote: > > > > What's done in the source's context change notifier is moving the > > >

Re: [Qemu-devel] KVM call for 2017-06-06

2017-05-31 Thread Juan Quintela
Juan Quintela wrote: > Hi Hi folks Gentle reminder that call is on next Tuesday and there are still no agenda. Later, Juan. > Please, send any topic that you are interested in covering. > > At the end of Monday I will send an email with the agenda or the > cancellation of

Re: [Qemu-devel] [PATCH] msi: remove return code for msi_init()

2017-05-31 Thread Paolo Bonzini
> Ok before I move on let's see whether this is what we want... > > - firstly, find all machine types: > > pxdev:qemu [edu-fix]# grep -R ".parent = TYPE_MACHINE" * | wc > 49 1962269 > > so now we have 49 kinds of machines. > > - rename msi_nonbroken into msi_broken, then: >

Re: [Qemu-devel] [Qemu-ppc] [PULL 11/18] pseries: Split CAS PVR negotiation out into a separate function

2017-05-31 Thread Greg Kurz
On Wed, 31 May 2017 16:33:21 +1000 David Gibson wrote: > On Mon, May 29, 2017 at 11:14:08PM +0200, Greg Kurz wrote: > > On Thu, 25 May 2017 13:51:25 +1000 > > David Gibson wrote: > > > > > Guests of the qemu machine type go through a

Re: [Qemu-devel] [Qemu-block] [PATCH v2 4/4] qemu-iotests: Block migration test

2017-05-31 Thread Kevin Wolf
Am 30.05.2017 um 20:48 hat Jeff Cody geschrieben: > On Tue, May 30, 2017 at 06:57:05PM +0200, Kevin Wolf wrote: > > Seems you are right, but I fail to see why the other formats shouldn't > > work? Are these just bugs or do I make any assumption in the test script > > that is invalid for other

Re: [Qemu-devel] [PATCH] spapr: manage hotplugged devices while the VM is not started

2017-05-31 Thread Igor Mammedov
On Wed, 31 May 2017 14:35:57 +1000 David Gibson wrote: > On Tue, May 30, 2017 at 06:04:45PM +0200, Laurent Vivier wrote: > > For QEMU, a hotlugged device is a device added using the HMP/QMP > > interface. > > For SPAPR, a hotplugged device is a device added while the

[Qemu-devel] [PATCH v3 1/3] migration: Use savevm_handlers instead of loadvm copy

2017-05-31 Thread Juan Quintela
There is no reason for having the loadvm_handlers at all. There is only one use, and we can use the savevm handlers. We will remove the loadvm handlers on a following patch. Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier Reviewed-by: Peter Xu

[Qemu-devel] [PATCH v2] spapr: manage hotplugged devices while the VM is not started

2017-05-31 Thread Laurent Vivier
For QEMU, a hotlugged device is a device added using the HMP/QMP interface. For SPAPR, a hotplugged device is a device added while the machine is running. In this case QEMU doesn't update internal state but relies on the OS for this part In the case of migration, when we (libvirt) hotplug a

Re: [Qemu-devel] [PATCH] kvm: don't register smram_listener when smm is off

2017-05-31 Thread Gonglei (Arei)
Soft ping... :) Regards, -Gonglei > -Original Message- > From: Gonglei (Arei) > Sent: Saturday, May 27, 2017 2:10 PM > To: qemu-devel@nongnu.org > Cc: pbonz...@redhat.com; Yechuan; Gonglei (Arei) > Subject: [PATCH] kvm: don't register smram_listener when smm is off > > If the user

Re: [Qemu-devel] [Qemu-block] [PATCH v3 02/16] block-backend: Add blk_request_perm

2017-05-31 Thread Stefan Hajnoczi
On Wed, May 24, 2017 at 10:52:21AM +0800, Fam Zheng wrote: > This function tries to request, if not granted yet, for the given > permissions. > > Signed-off-by: Fam Zheng > --- > block/block-backend.c | 12 > include/sysemu/block-backend.h | 1 + > 2

[Qemu-devel] [PATCH 06/11] nbd: make it thread-safe

2017-05-31 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/nbd-client.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/block/nbd-client.c b/block/nbd-client.c index 1e2952fdae..43e0292ac1 100644 --- a/block/nbd-client.c +++

[Qemu-devel] [PATCH 01/11] qcow2: call CoQueue APIs under CoMutex

2017-05-31 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/qcow2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 1c2697732b..c9193603b9 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1696,8 +1696,6 @@ static coroutine_fn int

[Qemu-devel] [PATCH 09/11] qed: protect table cache with CoMutex

2017-05-31 Thread Paolo Bonzini
This makes the driver thread-safe. The CoMutex is dropped temporarily while accessing the data clusters or the backing file. Signed-off-by: Paolo Bonzini --- block/qed-cluster.c | 4 +- block/qed-l2-cache.c | 6 +++ block/qed-table.c| 24 +++--- block/qed.c

[Qemu-devel] [PATCH 04/11] vpc: make it thread-safe

2017-05-31 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/vpc.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index ecfee77149..d61754d4d5 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -496,12 +496,6 @@ static inline

[Qemu-devel] [PATCH v3 1/4] block: Fix anonymous BBs in blk_root_inactivate()

2017-05-31 Thread Kevin Wolf
blk->name isn't an array, but a pointer that can be NULL. Checking for an anonymous BB must involve a NULL check first, otherwise we get crashes. Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng Reviewed-by: Juan Quintela Reviewed-by:

Re: [Qemu-devel] [PATCH 11/12] tests/test-hmp: Add announce parameter tests

2017-05-31 Thread Dr. David Alan Gilbert
* Vladislav Yasevich (vyase...@redhat.com) wrote: > Add 2 new commands for announce parameters to the test. > > Signed-off-by: Vladislav Yasevich > --- > tests/test-hmp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tests/test-hmp.c b/tests/test-hmp.c > index

[Qemu-devel] [PATCH 10/11] sheepdog: add queue_lock

2017-05-31 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- block/sheepdog.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 5ebf5d9fbb..551db7cd17 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -391,6 +391,7

Re: [Qemu-devel] [PATCH v2 0/2] Edu leak fix series

2017-05-31 Thread Peter Xu
On Wed, May 31, 2017 at 05:42:34PM +0800, Peter Xu wrote: > A whitelist for it does not really makes sense. Let's remove it and > then we can introduce a blacklist when really needed, with msi_broken. > That's patch 1. Ok this paragraph does not make sense if not mentioning what's "it"... Please

Re: [Qemu-devel] [PATCH] live-block-ops.txt: Rewrite and improve it

2017-05-31 Thread Kashyap Chamarthy
On Tue, May 30, 2017 at 03:42:08PM -0500, Eric Blake wrote: > On 05/30/2017 03:24 PM, Kashyap Chamarthy wrote: [...] > > Eric, do you have an opinion: Now that I _do_ have the notes > > available[*], do you think it is worth spelling out the invocation for > > QMP `blockdev-{backup, mirror}`?

Re: [Qemu-devel] [Qemu-block] [PATCH v3 04/16] qemu-img: Expose PreallocMode for resizing

2017-05-31 Thread Stefan Hajnoczi
On Fri, May 26, 2017 at 06:55:06PM +0200, Max Reitz wrote: > Add a --preallocation command line option to qemu-img resize which can > be used to set the PreallocMode parameter of blk_truncate(). > > Signed-off-by: Max Reitz > --- > qemu-img.c| 33

Re: [Qemu-devel] [PATCH 07/17] json: learn to parse uint64 numbers

2017-05-31 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, May 15, 2017 at 6:00 PM Markus Armbruster wrote: > >> Marc-André Lureau writes: >> >> > Switch strtoll() usage to qemu_strtoi64() helper while at it. >> > >> > Replace

Re: [Qemu-devel] [Qemu-block] [PATCH v3 10/16] block/qcow2: Lock s->lock in preallocate()

2017-05-31 Thread Stefan Hajnoczi
On Fri, May 26, 2017 at 06:55:12PM +0200, Max Reitz wrote: > preallocate() is and will be called only from places that do not lock > s->lock: Currently that is qcow2_create2(), as of a future patch it will > be called from qcow2_truncate(), too. > > It therefore makes sense to move locking that

Re: [Qemu-devel] [PATCH v2] alpha-user: wire epoll_create, epoll_ctl, epoll_wait

2017-05-31 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20170531075814.4851-1-sly...@gentoo.org Subject: [Qemu-devel] [PATCH v2] alpha-user: wire epoll_create, epoll_ctl, epoll_wait === TEST SCRIPT BEGIN === #!/bin/bash

[Qemu-devel] [PATCH v3 3/3] migration: Remove section_id parameter from vmstate_load

2017-05-31 Thread Juan Quintela
Everything else assumes that we always load a device from its own savevm handler. Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier Reviewed-by: Peter Xu --- migration/savevm.c | 10 +- 1 file changed, 5 insertions(+),

Re: [Qemu-devel] [Qemu-block] [PATCH v2 06/16] backup: Request BLK_PERM_AIO_CONTEXT_CHANGE on target

2017-05-31 Thread Stefan Hajnoczi
On Wed, May 24, 2017 at 10:18:44AM +0800, Fam Zheng wrote: > On Thu, 05/11 15:41, Stefan Hajnoczi wrote: > > On Wed, Apr 19, 2017 at 05:43:46PM +0800, Fam Zheng wrote: > > > What's done in the source's context change notifier is moving the > > > target's context to follow the new one, so we

[Qemu-devel] [RFC PATCH 00/11] Block layer thread-safety, part 2

2017-05-31 Thread Paolo Bonzini
This part takes care of drivers and devices, making sure that they can accept concurrent I/O from multiple AioContext. Only RFC for now because it depends on Kevin's QED conversion to coroutines, which is still in flux. The following drivers are thread-safe without using any QemuMutex/CoMutex:

[Qemu-devel] [PATCH v2 1/2] msi: remove msi_nonbroken

2017-05-31 Thread Peter Xu
It was used before to know whether specific board has correct emulation support on MSI, and originally we set this to true when the board is not buggy with MSI. That's not really what we should do. For broken emulated boards, we should either blacklist it (using something like msi_broken, when

[Qemu-devel] [PATCH v2 0/2] Edu leak fix series

2017-05-31 Thread Peter Xu
A whitelist for it does not really makes sense. Let's remove it and then we can introduce a blacklist when really needed, with msi_broken. That's patch 1. Then, I let the msi_init() always success in patch 2, along with it I removed caller checks around it. The goal of this series is to fix the

[Qemu-devel] [PATCH 03/11] vdi: make it thread-safe

2017-05-31 Thread Paolo Bonzini
The VirtualBox driver is using a mutex to order all allocating writes, but it is not protecting accesses to the bitmap because they implicitly happen under the AioContext mutex. Change this to use a CoRwlock explicitly. Signed-off-by: Paolo Bonzini --- block/vdi.c | 48

[Qemu-devel] [PATCH 11/11] ssh: support I/O from any AioContext

2017-05-31 Thread Paolo Bonzini
The coroutine may run in a different AioContext, causing the fd handler to busy wait. Fix this by resetting the handler in restart_coroutine, before the coroutine is restarted. Signed-off-by: Paolo Bonzini --- block/ssh.c | 24 +--- 1 file changed, 17

[Qemu-devel] [PATCH v3 0/4] Block migration (migrate -b) fixes

2017-05-31 Thread Kevin Wolf
v3: - Restricted test to formats without migration blockers [Jeff] - Added timeout for migration completion in test [Jeff] - Removed remaining tabs copied from another test case [Eric] - Updated reference output (SHUTDOWN events) after rebase v2: - Detect when migrate -b is compiled out [Eric] -

[Qemu-devel] [PATCH v3 4/4] qemu-iotests: Block migration test

2017-05-31 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/183 | 140 + tests/qemu-iotests/183.out | 46 +++ tests/qemu-iotests/group | 1 + 3 files changed, 187 insertions(+) create mode 100755 tests/qemu-iotests/183

Re: [Qemu-devel] [PATCH v3 7/7] numa: cpu: calculate/set default node-ids after all -numa CLI options are parsed

2017-05-31 Thread Igor Mammedov
On Tue, 30 May 2017 17:03:32 -0300 Eduardo Habkost wrote: > On Tue, May 30, 2017 at 06:24:02PM +0200, Igor Mammedov wrote: [...] > > diff --git a/include/hw/boards.h b/include/hw/boards.h > > index 76ce021..063f329 100644 > > --- a/include/hw/boards.h > > +++

Re: [Qemu-devel] [PATCH v2 0/3] hw/arm/exynos: QOM-ify the SoC

2017-05-31 Thread Krzysztof Kozlowski
On Tue, May 30, 2017 at 3:00 PM, Peter Maydell wrote: > On 30 May 2017 at 13:07, Peter Maydell wrote: >> On 7 May 2017 at 19:19, Krzysztof Kozlowski wrote: >>> Hi, >>> >>> Changes since v1: >>> = >>> 1.

Re: [Qemu-devel] [PATCHv4 0/5] Clean up compatibility mode handling

2017-05-31 Thread Greg Kurz
On Wed, 31 May 2017 12:57:48 +1000 David Gibson wrote: > [...] > > All old non-pseries machine types already complain when started with > > a POWER7 or newer CPU. Providing the extra error message looks weird: > > > > qemu-system-ppc64 -machine ppce500 \ > >

Re: [Qemu-devel] [PATCH v3 00/11] hw: arm: exynos: Bring up secondary CPU, QOM-ify Soc, other improvements

2017-05-31 Thread Krzysztof Kozlowski
On Tue, May 30, 2017 at 2:04 PM, Peter Maydell wrote: > On 21 May 2017 at 16:29, Krzysztof Kozlowski wrote: >> This is a collection of three already sent patchsets [1] [2] [3]. >> >> >> Changes since previous versions (v2): >> 1. Patch 11/11: set BIT(8)

Re: [Qemu-devel] [Qemu-block] [PATCH 11/29] qed: Make qed_write_table() synchronous

2017-05-31 Thread Stefan Hajnoczi
On Fri, May 26, 2017 at 10:21:52PM +0200, Kevin Wolf wrote: > Note that this code is generally not running in coroutine context, so > this is an actual blocking synchronous operation. We'll fix this in a > moment. > > Signed-off-by: Kevin Wolf > --- > block/qed-table.c | 84 >

Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.

2017-05-31 Thread Paolo Bonzini
On 30/05/2017 21:05, Rob Landley wrote: > On 05/29/2017 05:14 AM, Richard W.M. Jones wrote: >> I see in the disassembly use of cmovne (new in Pentium Pro) and >> bswap (new in 486). >> [http://cse.unl.edu/~goddard/Courses/CSCE351/IntelArchitecture/InstructionSetSummary.pdf] >> >> The cmovne

Re: [Qemu-devel] [Qemu-block] [PATCH 14/29] qed: Make qed_aio_read_data() synchronous

2017-05-31 Thread Stefan Hajnoczi
On Fri, May 26, 2017 at 10:21:55PM +0200, Kevin Wolf wrote: > Note that this code is generally not running in coroutine context, so > this is an actual blocking synchronous operation. We'll fix this in a > moment. > > Signed-off-by: Kevin Wolf > --- > block/qed.c | 8 +---

Re: [Qemu-devel] [Qemu-block] [PATCH 13/29] qed: Remove callback from qed_write_table()

2017-05-31 Thread Stefan Hajnoczi
On Fri, May 26, 2017 at 10:21:54PM +0200, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/qed-table.c | 47 --- > block/qed.c | 12 +++- > block/qed.h | 8 +++- > 3 files changed, 22 insertions(+),

Re: [Qemu-devel] [Qemu-block] [PATCH 15/29] qed: Make qed_aio_write_main() synchronous

2017-05-31 Thread Stefan Hajnoczi
On Fri, May 26, 2017 at 10:21:56PM +0200, Kevin Wolf wrote: > Note that this code is generally not running in coroutine context, so > this is an actual blocking synchronous operation. We'll fix this in a > moment. > > Signed-off-by: Kevin Wolf > --- > block/qed.c | 61 >

  1   2   3   4   5   >