[Qemu-devel] [PULL 5/6] cirrus: fix patterncopy checks

2017-02-13 Thread Gerd Hoffmann
The blit_region_is_unsafe checks don't work correctly for the patterncopy source. It's a fixed-sized region, which doesn't depend on cirrus_blt_{width,height}. So go do the check in cirrus_bitblt_common_patterncopy instead, then tell blit_is_unsafe that it doesn't need to verify the source. Also

[Qemu-devel] [PULL 1/6] virtio-gpu: fix memory leak in set scanout

2017-02-13 Thread Gerd Hoffmann
From: Li Qiang In virtio_gpu_set_scanout function, when creating the 'rect' its refcount is set to 2, by pixman_image_create_bits and qemu_create_displaysurface_pixman function. This can lead a memory leak issues. This patch avoid this issue. Signed-off-by: Li Qiang Reviewed-by: Marc-André Lure

[Qemu-devel] [PULL 0/6] vga patch queue

2017-02-13 Thread Gerd Hoffmann
0 15:05:37 +) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-vga-20170213-1 for you to fetch changes up to 12e97ec39931e5321645fd483ab761319d48bf16: Revert "cirrus: allow zero source pitch in pattern fill rops" (2017-0

[Qemu-devel] [PULL 3/6] vga: replace debug printf with trace points

2017-02-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-id: 1486561893-26470-1-git-send-email-kra...@redhat.com --- hw/display/trace-events | 6 ++ hw/display/vga.c| 27 --- 2 files changed, 10 insertions(+), 23 d

[Qemu-devel] [PULL 2/6] virtio-gpu: fix resource leak in virgl_cmd_resource_unref

2017-02-13 Thread Gerd Hoffmann
When the guest sends VIRTIO_GPU_CMD_RESOURCE_UNREF without detaching the backing storage beforehand (VIRTIO_GPU_CMD_RESOURCE_DETACH_BACKING) we'll leak memory. This patch fixes it for 3d mode, simliar to the 2d mode fix in commit "b8e2392 virtio-gpu: call cleanup mapping function in resource destr

[Qemu-devel] [PULL 6/6] Revert "cirrus: allow zero source pitch in pattern fill rops"

2017-02-13 Thread Gerd Hoffmann
This reverts commit 5858dd1801883309bdd208d72ddb81c4e9fee30c. Conflicts: hw/display/cirrus_vga.c Cc: Wolfgang Bumiller Cc: Dr. David Alan Gilbert Signed-off-by: Gerd Hoffmann Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Laurent Vivier Message-id: 1486645341-5010-2-git-send-email-

[Qemu-devel] [PULL 4/6] cirrus: replace debug printf with trace points

2017-02-13 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Message-id: 1486561893-26470-2-git-send-email-kra...@redhat.com --- hw/display/cirrus_vga.c | 11 +-- hw/display/trace-events | 6 ++ 2 files changed, 11 insertions(+), 6 deletions(-) diff

Re: [Qemu-devel] [PATCH] spice: allow to specify drm rendernode

2017-02-13 Thread Marc-André Lureau
Hi Gerd, Rendernode are not stable across reboots, it depends on module order. I have further patches to specify a pci address instead: rendernode=. Does that seem fine? Do you want me to squash and resend? The current branch: https://github.com/elmarco/qemu/commits/spice thanks On Sun, Feb 1

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Swap request limit definitions

2017-02-13 Thread Alberto Garcia
On Sun 12 Feb 2017 02:47:24 AM CET, Max Reitz wrote: > -#define BDRV_REQUEST_MAX_SECTORS MIN(SIZE_MAX >> BDRV_SECTOR_BITS, \ > - INT_MAX >> BDRV_SECTOR_BITS) > -#define BDRV_REQUEST_MAX_BYTES (BDRV_REQUEST_MAX_SECTORS << BDRV_SECTOR_BITS) > +#define BDRV_REQUES

Re: [Qemu-devel] [PATCH 0/3] COLO: fix some bugs

2017-02-13 Thread Hailiang Zhang
On 2017/2/10 23:44, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Hi, This series fix three bugs of COLO. patch 1 fix one usage case which users want to change checkpoint-delay with an extream big value set before, the new value may not take effect until

[Qemu-devel] [PATCH v2] mem-prealloc: reduce large guest start-up and migration time.

2017-02-13 Thread Jitendra Kolhe
Using "-mem-prealloc" option for a large guest leads to higher guest start-up and migration time. This is because with "-mem-prealloc" option qemu tries to map every guest page (create address translations), and make sure the pages are available during runtime. virsh/libvirt by default, seems to us

[Qemu-devel] [PATCH 2/2] risu_ppc64le: distinguish real illegal instruction

2017-02-13 Thread Nikunj A Dadhania
While executing qemu_ppc64le, found an issue that the real illegal instructions are handled as risu_op which results in wrong info at the master end. Even the master needs to distinguish real illegal instructions versus risu_op. Signed-off-by: Nikunj A Dadhania --- risu_ppc64le.c | 12 ++

[Qemu-devel] [PATCH 1/2] risu_ppc64le: fix the typo nb => rb

2017-02-13 Thread Nikunj A Dadhania
Signed-off-by: Nikunj A Dadhania --- ppc64.risu | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ppc64.risu b/ppc64.risu index f7fa3f4..28df9da 100644 --- a/ppc64.risu +++ b/ppc64.risu @@ -1029,12 +1029,12 @@ LQ PPC64LE 111000 rtp:5 ra:5 imm:12 \ !memory { reg_plus_

Re: [Qemu-devel] [Qemu-block] [PATCH v3 1/1] block/vmdk: Fix the endian problem of buf_len and lba

2017-02-13 Thread Hao QingFeng
在 2017-01-26 0:25, Max Reitz 写道: On 16.12.2016 06:20, QingFeng Hao wrote: The problem was triggered by qemu-iotests case 055. It failed when it was comparing the compressed vmdk image with original test.img. The cause is that buf_len in vmdk_write_extent wasn't converted to little-endian befo

[Qemu-devel] [PATCH] trace: fix trace-events-all dependencies in Makefile.objs

2017-02-13 Thread Lin Ma
It causes that file trace-events-all isn't generated during build, make install reports 'No such file or directory'. The patch fixes it. Signed-off-by: Lin Ma --- trace/Makefile.objs | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trace/Makefile.objs b/trace/Makefile.

Re: [Qemu-devel] [PULL 00/12] target-arm queue

2017-02-13 Thread Peter Maydell
On 10 February 2017 at 18:07, Peter Maydell wrote: > ARM queue: nothing particularly exciting here, but no > reason to sit on them for another week. > > thanks > -- PMM > > The following changes since commit 61eedf7aec0e2395aabd628cc055096909a3ea15: > > tests/prom-env: Ease time-out problems on

[Qemu-devel] [PATCH] ppc/xics: fix XICSStateClass parent class

2017-02-13 Thread Cédric Le Goater
XICSState inherits from SysBusDevice and so the object class should inherit from SysBusDeviceClass. Signed-off-by: Cédric Le Goater --- include/hw/ppc/xics.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 3f0c31610aa4..e879

Re: [Qemu-devel] [PATCH] trace: fix trace-events-all dependencies in Makefile.objs

2017-02-13 Thread Daniel P. Berrange
On Mon, Feb 13, 2017 at 05:27:09PM +0800, Lin Ma wrote: > It causes that file trace-events-all isn't generated during build, make > install reports 'No such file or directory'. The patch fixes it. > > Signed-off-by: Lin Ma > --- > trace/Makefile.objs | 8 > 1 file changed, 4 insertions(

[Qemu-devel] 答复: [PATCH] trace: fix trace-events-all dependencies in Makefile.objs

2017-02-13 Thread Lin Ma
Oops, I didn't notice that the issue was fixed already, Sorry about that. Lin >>> Lin Ma 2017/2/13 星期一 下午 5:27 >>> It causes that file trace-events-all isn't generated during build, make install reports 'No such file or directory'. The patch fixes it. Signed-off-by: Lin Ma --- trace/Makefile.ob

[Qemu-devel] [PATCH v2 RESEND] Makefile: Fix owner and group for qemu-version.h.tmp

2017-02-13 Thread Lin Ma
By commit 67a1de0d, When we perform 'git pull && make && sudo make install', In 'make' stage a qemu-version.h.tmp will be generated. If the content of qemu-version.h.tmp and qemu-version.h aren't consistent, The qemu-version.h.tmp will be renamed to qemu-version.h. Because of the target FORCE, The

[Qemu-devel] [PATCH 02/17] migration: fix ram_save_pending

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Fill postcopy-able pending only if ram postcopy is enabled. It is necessary because of there will be other postcopy-able states and when ram postcopy is disabled, it should not spoil common postcopy related pending. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH 05/17] block: add bdrv_next_dirty_bitmap()

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Like bdrv_next() - bdrv_next_dirty_bitmap() is a function to provide access to private dirty bitmaps list. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- block/dirty-bitmap.c | 10 ++ include/block/dirty-bitmap.h | 3 +++ 2 files changed, 13 insertions(

[Qemu-devel] [PATCH 15/17] iotests: add default node-name

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
When testing migration, auto-generated by qemu node-names differs in source and destination qemu and migration fails. After this patch, auto-generated by iotest nodenames will be the same. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 2 +

[Qemu-devel] [PATCH 07/17] qapi: add dirty-bitmaps migration capability

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Juan Quintela --- include/migration/migration.h | 1 + migration/migration.c | 9 + qapi-schema.json | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-)

[Qemu-devel] [PATCH 06/17] block: add bdrv_dirty_bitmap_enable_successor()

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Enabling bitmap successor is necessary to enable successors of bitmaps being migrated before target vm start. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/dirty-bitmap.c | 5 + include/block/dirty-bitmap.h | 1 + 2 files changed, 6 insertions(+) diff

[Qemu-devel] [PATCH 16/17] iotests: add dirty bitmap migration test

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
The test starts two vms (vm_a, vm_b), create dirty bitmap in the first one, do several writes to corresponding device and then migrate vm_a to vm_b with dirty bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- tests/qemu-iotests/169 | 86

[Qemu-devel] [PATCH 13/17] iotests: add add_incoming_migration to VM class

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow --- tests/qemu-iotests/iotests.py | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index bec8eb4..f5ca4b8 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tes

[Qemu-devel] [PATCH 10/17] migration/qemu-file: add qemu_put_counted_string()

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Add function opposite to qemu_get_counted_string. qemu_put_counted_string puts one-byte length of the string (string should not be longer than 255 characters), and then it puts the string, without last zero byte. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Jua

[Qemu-devel] [PATCH 14/17] qmp: add x-debug-block-dirty-bitmap-sha256

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/dirty-bitmap.c | 5 + blockdev.c | 29 + include/block/dirty-bitmap.h | 2 ++ include/qemu/hbitmap.h | 8 qapi/block-core.json | 27 +++

[Qemu-devel] [PATCH 11/17] migration: add is_active_iterate handler

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Only-postcopy savevm states (dirty-bitmap) don't need live iteration, so to disable them and stop transporting empty sections there is a new savevm handler. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela --- include/migration/vmstate.h | 1 + migration/savevm.c

[Qemu-devel] [PATCH 08/17] block/dirty-bitmap: add bdrv_dirty_bitmap_release_successor

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
To just release successor and unfreeze bitmap without any additional work. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz --- block/dirty-bitmap.c | 10 ++ include/block/dirty-bitmap.h | 2 ++ 2 files changed, 12 insertions(+)

[Qemu-devel] [PATCH 09/17] migration: include migrate_dirty_bitmaps in migrate_postcopy

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Enable postcopy if dirty bitmap migration is endabled. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 0f0c3e8..179bd04 100644

[Qemu-devel] [PATCH 01/17] migration: add has_postcopy savevm handler

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Now postcopy-able states are recognized by not NULL save_live_complete_postcopy handler. But when we have several different postcopy-able states, it is not convenient. Ram postcopy may be disabled, while some other postcopy enabled, in this case Ram state should behave as it is not postcopy-able.

[Qemu-devel] [PATCH 12/17] migration: add postcopy migration of dirty bitmaps

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Postcopy migration of dirty bitmaps. Only named dirty bitmaps, associated with root nodes and non-root named nodes are migrated. If destination qemu is already containing a dirty bitmap with the same name as a migrated bitmap (for the same node), than, if their granularities are the same the migra

[Qemu-devel] 答复: Re: [PATCH] trace: fix trace-events-all dependencies in Makefile.objs

2017-02-13 Thread Lin Ma
Yeah, I just noticed, Thank you. >>> "Daniel P. Berrange" 2017/2/13 星期一 下午 5:38 >>> On Mon, Feb 13, 2017 at 05:27:09PM +0800, Lin Ma wrote: > It causes that file trace-events-all isn't generated during build, make > install reports 'No such file or directory'. The patch fixes it. > > Signed-off-

Re: [Qemu-devel] [Help] Windows2012 as Guest 64+cores on KVM Halts

2017-02-13 Thread Vadim Rozenfeld
On Sat, 2017-02-11 at 10:39 -0500, Paolo Bonzini wrote: > > > > > > > > > > On 10/02/2017 10:31, Gonglei (Arei) wrote: > > > > > > > > But We tested the same cases on Xen platform and VMware, and > > > > the guest booted successfully. > > > > > > Were these two also tested with enlightenments

[Qemu-devel] [PATCH 03/17] migration: split common postcopy out of ram postcopy

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Split common postcopy staff from ram postcopy staff. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela --- include/migration/migration.h | 1 + migration/migration.c | 39 --- migration/postcopy-ram.c | 4 +++- migration/savevm

[Qemu-devel] [PATCH v6 00/17] Dirty bitmaps postcopy migration

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Hi all! There is a new version of dirty bitmap postcopy migration series. v6: clone: tag postcopy-v6 from https://src.openvz.org/scm/~vsementsov/qemu.git online: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=postcopy-v6 rebase on master. 03 - tiny contextual change 12 - little

Re: [Qemu-devel] [PATCH v2 RESEND] Makefile: Fix owner and group for qemu-version.h.tmp

2017-02-13 Thread Paolo Bonzini
On 13/02/2017 10:51, Lin Ma wrote: > By commit 67a1de0d, When we perform 'git pull && make && sudo make install', > In 'make' stage a qemu-version.h.tmp will be generated. If the content of > qemu-version.h.tmp and qemu-version.h aren't consistent, The > qemu-version.h.tmp > will be renamed to q

[Qemu-devel] [PATCH 03/18] block-backend: allow blk_prw from coroutine context

2017-02-13 Thread Paolo Bonzini
qcow2_create2 calls this. Do not run a nested event loop, as that breaks when aio_co_wake tries to queue the coroutine on the co_queue_wakeup list of the currently running one. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/block-backend.c | 12 1 file changed

[Qemu-devel] [PATCH 17/17] iotests: add dirty bitmap postcopy test

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
Test - start two vms (vm_a, vm_b) - in a - do writes from set A - do writes from set B - fix bitmap sha256 - clear bitmap - do writes from set A - start migration - than, in b - wait vm start (postcopy should start) - do writes from set B - check bitmap sha256

[Qemu-devel] [PATCH 10/18] qed: introduce qed_aio_start_io and qed_aio_next_io_cb

2017-02-13 Thread Paolo Bonzini
qed_aio_start_io and qed_aio_next_io will not have to acquire/release the AioContext, while qed_aio_next_io_cb will. Split the functionality and gain a little type-safety in the process. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/qed.c | 39 +---

[Qemu-devel] [PATCH 04/18] test-thread-pool: use generic AioContext infrastructure

2017-02-13 Thread Paolo Bonzini
Once the thread pool starts using aio_co_wake, it will also need qemu_get_current_aio_context(). Make test-thread-pool create an AioContext with qemu_init_main_loop, so that stubs/iothread.c and tests/iothread.c can provide the rest. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [PATCH 07/18] nbd: convert to use qio_channel_yield

2017-02-13 Thread Paolo Bonzini
In the client, read the reply headers from a coroutine, switching the read side between the "read header" coroutine and the I/O coroutine that reads the body of the reply. In the server, if the server can read more requests it will create a new "read request" coroutine as soon as a request has bee

[Qemu-devel] [PATCH 04/17] migration: introduce postcopy-only pending

2017-02-13 Thread Vladimir Sementsov-Ogievskiy
There would be savevm states (dirty-bitmap) which can migrate only in postcopy stage. The corresponding pending is introduced here. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela --- include/migration/vmstate.h | 17 +++-- include/sysemu/sysemu.h | 5 +++

[Qemu-devel] [PATCH 14/18] block: explicitly acquire aiocontext in bottom halves that need it

2017-02-13 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/archipelago.c | 3 +++ block/blkreplay.c | 2 +- block/block-backend.c | 6 ++ block/curl.c | 26 ++ block/gluster.c | 9 + block/io.c| 6 +- block/is

[Qemu-devel] [PATCH 06/18] io: make qio_channel_yield aware of AioContexts

2017-02-13 Thread Paolo Bonzini
Support separate coroutines for reading and writing, and place the read/write handlers on the AioContext that the QIOChannel is registered with. Reviewed-by: Daniel P. Berrange Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- include/io/channel.h | 47 ++--

[Qemu-devel] [PATCH 11/18] aio: push aio_context_acquire/release down to dispatching

2017-02-13 Thread Paolo Bonzini
The AioContext data structures are now protected by list_lock and/or they are walked with FOREACH_RCU primitives. There is no need anymore to acquire the AioContext for the entire duration of aio_dispatch. Instead, just acquire it before and after invoking the callbacks. The next step is then to p

Re: [Qemu-devel] Converting qcow2 image to raw thin lv

2017-02-13 Thread Kevin Wolf
Am 12.02.2017 um 01:58 hat Nir Soffer geschrieben: > On Sat, Feb 11, 2017 at 12:23 AM, Nir Soffer wrote: > > Hi all, > > > > I'm trying to convert images (mostly qcow2) to raw format on thin lv, > > hoping to write only the allocated blocks on the thin lv, but > > it seems that qemu-img cannot wri

[Qemu-devel] [PATCH 09/18] blkdebug: reschedule coroutine on the AioContext it is running on

2017-02-13 Thread Paolo Bonzini
Keep the coroutine on the same AioContext. Without this change, there would be a race between yielding the coroutine and reentering it. While the race cannot happen now, because the code only runs from a single AioContext, this will change with multiqueue support in the block layer. While doing t

[Qemu-devel] [PATCH 16/18] aio-posix: partially inline aio_dispatch into aio_poll

2017-02-13 Thread Paolo Bonzini
This patch prepares for the removal of unnecessary lockcnt inc/dec pairs. Extract the dispatching loop for file descriptor handlers into a new function aio_dispatch_handlers, and then inline aio_dispatch into aio_poll. aio_dispatch can now become void. Reviewed-by: Stefan Hajnoczi Signed-off-by:

[Qemu-devel] [PATCH v4 00/18] aio_context_acquire/release pushdown, part 2

2017-02-13 Thread Paolo Bonzini
Same as v3 except for tests/Makefile.include rebase in patch 1. The next part is CoMutex thread-safety, which is relatively small (10 patches). Paolo Paolo Bonzini (18): block: move AioContext, QEMUTimer, main-loop to libqemuutil aio: introduce aio_co_schedule and aio_co_wake block-backend

[Qemu-devel] [PATCH 08/18] coroutine-lock: reschedule coroutine on the AioContext it was running on

2017-02-13 Thread Paolo Bonzini
As a small step towards the introduction of multiqueue, we want coroutines to remain on the same AioContext that started them, unless they are moved explicitly with e.g. aio_co_schedule. This patch avoids that coroutines switch AioContext when they use a CoMutex. For now it does not make much of a

[Qemu-devel] [PATCH 17/18] async: remove unnecessary inc/dec pairs

2017-02-13 Thread Paolo Bonzini
Pull the increment/decrement pair out of aio_bh_poll and into the callers. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- util/aio-posix.c | 8 +++- util/aio-win32.c | 8 util/async.c | 12 ++-- 3 files changed, 13 insertions(+), 15 deletions(-) diff -

[Qemu-devel] [PATCH 01/18] block: move AioContext, QEMUTimer, main-loop to libqemuutil

2017-02-13 Thread Paolo Bonzini
AioContext is fairly self contained, the only dependency is QEMUTimer but that in turn doesn't need anything else. So move them out of block-obj-y to avoid introducing a dependency from io/ to block-obj-y. main-loop and its dependency iohandler also need to be moved, because later in this series

[Qemu-devel] [PATCH 15/18] block: explicitly acquire aiocontext in aio callbacks that need it

2017-02-13 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/archipelago.c| 3 --- block/block-backend.c | 7 --- block/curl.c | 2 +- block/io.c | 6 +- block/iscsi.c | 3 --- block/linux-aio.c | 5 + block/mirror.c | 12

Re: [Qemu-devel] [RFC] virtio-pci: Allow PCIe virtio devices on root bus

2017-02-13 Thread Marcel Apfelbaum
On 02/13/2017 06:33 AM, David Gibson wrote: On Sun, Feb 12, 2017 at 09:05:46PM +0200, Marcel Apfelbaum wrote: On 02/10/2017 02:37 AM, David Gibson wrote: On Thu, Feb 09, 2017 at 10:04:47AM +0100, Laszlo Ersek wrote: On 02/09/17 05:16, David Gibson wrote: On Wed, Feb 08, 2017 at 11:40:50AM +01

[Qemu-devel] [PATCH 02/18] aio: introduce aio_co_schedule and aio_co_wake

2017-02-13 Thread Paolo Bonzini
aio_co_wake provides the infrastructure to start a coroutine on a "home" AioContext. It will be used by CoMutex and CoQueue, so that coroutines don't jump from one context to another when they go to sleep on a mutex or waitqueue. However, it can also be used as a more efficient alternative to one

[Qemu-devel] [PATCH 05/18] io: add methods to set I/O handlers on AioContext

2017-02-13 Thread Paolo Bonzini
This is in preparation for making qio_channel_yield work on AioContexts other than the main one. Reviewed-by: Daniel P. Berrange Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- include/io/channel.h | 25 + io/channel-command.c | 13 + io/channe

[Qemu-devel] [PATCH 12/18] block: explicitly acquire aiocontext in timers that need it

2017-02-13 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/curl.c| 2 ++ block/io.c | 5 + block/iscsi.c | 8 ++-- block/null.c| 4 block/qed.c | 12 block/qed.h

Re: [Qemu-devel] [PATCH v2] mem-prealloc: reduce large guest start-up and migration time.

2017-02-13 Thread Igor Mammedov
On Mon, 13 Feb 2017 14:30:56 +0530 Jitendra Kolhe wrote: > Using "-mem-prealloc" option for a large guest leads to higher guest > start-up and migration time. This is because with "-mem-prealloc" option > qemu tries to map every guest page (create address translations), and > make sure the pages

Re: [Qemu-devel] [RFC][PATCH] qemu-img: make convert async

2017-02-13 Thread Peter Lieven
Am 12.02.2017 um 03:06 schrieb Max Reitz: On 02.02.2017 17:06, Peter Lieven wrote: this is something I have been thinking about for almost 2 years now. we heavily have the following two use cases when using qemu-img convert. a) reading from NFS and writing to iSCSI for deploying templates b) r

[Qemu-devel] [PATCH 13/18] block: explicitly acquire aiocontext in callbacks that need it

2017-02-13 Thread Paolo Bonzini
This covers both file descriptor callbacks and polling callbacks, since they execute related code. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- block/curl.c | 16 +--- block/iscsi.c | 4 block/linux-aio.c | 4 block/nfs.c |

Re: [Qemu-devel] [PATCH v4 08/18] qcow: make encrypt_sectors encrypt in place

2017-02-13 Thread Alberto Garcia
On Fri 10 Feb 2017 06:09:00 PM CET, Daniel P. Berrange wrote: > Instead of requiring separate input/output buffers for > encrypting data, change encrypt_sectors() to assume > use of a single buffer, encrypting in place. One current > caller uses the same buffer for input/output already > and the ot

[Qemu-devel] [PATCH 18/18] block: document fields protected by AioContext lock

2017-02-13 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- include/block/block_int.h | 64 +- include/sysemu/block-backend.h | 14 ++--- 2 files changed, 49 insertions(+), 29 deletions(-) diff --git a/include/block/block_int.h b/include/block/

Re: [Qemu-devel] [PULL 0/3] VFIO updates 2017-02-10

2017-02-13 Thread Peter Maydell
On 10 February 2017 at 21:42, Alex Williamson wrote: > The following changes since commit 98b2faeaee96ab084d0b1669918688d8895c155f: > > Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into > staging (2017-02-10 18:07:02 +) > > are available in the git repository at: > > >

Re: [Qemu-devel] [PULL 00/21] Block patches

2017-02-13 Thread Peter Maydell
On 12 February 2017 at 01:34, Max Reitz wrote: > The following changes since commit 98b2faeaee96ab084d0b1669918688d8895c155f: > > Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into > staging (2017-02-10 18:07:02 +) > > are available in the git repository at: > > git:

Re: [Qemu-devel] libslirp and QEMU slirp

2017-02-13 Thread Thomas Huth
On 12.02.2017 08:30, Renzo Davoli wrote: > Hi, > > On Wed, Feb 08, 2017 at 11:10:50PM +0100, Samuel Thibault wrote: >> Hello, >> >> Stefan Hajnoczi, on Mon 06 Feb 2017 11:55:05 +, wrote: >>> I'm proposing this topic for discussion because there might be common >>> ground for Samuel from QEMU a

Re: [Qemu-devel] [PATCH v4 00/18] aio_context_acquire/release pushdown, part 2

2017-02-13 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Subject: [Qemu-devel] [PATCH v4 00/18] aio_context_acquire/release pushdown, part 2 Message-id: 20170213100906.23486-1-pbonz.

Re: [Qemu-devel] [PATCH 0/3] COLO: fix some bugs

2017-02-13 Thread Dr. David Alan Gilbert
* Hailiang Zhang (zhang.zhanghaili...@huawei.com) wrote: > On 2017/2/10 23:44, Dr. David Alan Gilbert wrote: > > * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > > > Hi, > > > > > > This series fix three bugs of COLO. > > > patch 1 fix one usage case which users want to change checkpoint-

Re: [Qemu-devel] [PATCH v5 00/10] Add support for VM Generation ID

2017-02-13 Thread Igor Mammedov
On Fri, 10 Feb 2017 19:27:21 +0100 Andreas Färber wrote: > Am 10.02.2017 um 19:18 schrieb Andrew Jones: > > On Fri, Feb 10, 2017 at 05:16:59PM +0100, Igor Mammedov wrote: > >> On Fri, 10 Feb 2017 17:31:33 +0200 > >> "Michael S. Tsirkin" wrote: > >> > >>> On Fri, Feb 10, 2017 at 11:12:13AM +0

Re: [Qemu-devel] libslirp and QEMU slirp

2017-02-13 Thread Renzo Davoli
Hi Thomas, > FWIW, I know that WinUAE is using QEMU's slirp code, too. thank you! I'll have a look of it. > > I've got a question: Is there already a project page and public > repository for libslirp available somewhere? I did not find anything > useful with Google yet... Sure: https://github.co

Re: [Qemu-devel] [PATCH v2] mem-prealloc: reduce large guest start-up and migration time.

2017-02-13 Thread Daniel P. Berrange
On Mon, Feb 13, 2017 at 11:45:46AM +0100, Igor Mammedov wrote: > On Mon, 13 Feb 2017 14:30:56 +0530 > Jitendra Kolhe wrote: > > > Using "-mem-prealloc" option for a large guest leads to higher guest > > start-up and migration time. This is because with "-mem-prealloc" option > > qemu tries to map

Re: [Qemu-devel] [PULL 0/6] vga patch queue

2017-02-13 Thread Peter Maydell
e remote-tracking branch 'remotes/stsquad/tags/pull-travis-10022017-1' > into staging (2017-02-10 15:05:37 +) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-vga-20170213-1 > > for you to fetch changes up to 12e97ec39931e5

[Qemu-devel] 答复: Re: [PATCH v2 RESEND] Makefile: Fix owner and group for qemu-version.h.tmp

2017-02-13 Thread Lin Ma
>>> Paolo Bonzini 2017/2/13 星期一 下午 6:07 >>> > > >On 13/02/2017 10:51, Lin Ma wrote: >> By commit 67a1de0d, When we perform 'git pull && make && sudo make install', >> In 'make' stage a qemu-version.h.tmp will be generated. If the content of >> qemu-version.h.tmp and qemu-version.h aren't consist

Re: [Qemu-devel] 答复: Re: [PATCH v2 RESEND] Makefile: Fix owner and group for qemu-version.h.tmp

2017-02-13 Thread Paolo Bonzini
On 13/02/2017 12:53, Lin Ma wrote: > > The content of qemu-version.h recorded the git head info of last build. > After 'git pull && make ', Because the content of qemu-version.h.tmp is > generated > based on the lastest git describe, Now this .h.tmp and the old .h aren't > consistent, > So this

Re: [Qemu-devel] [PATCH v4 00/18] aio_context_acquire/release pushdown, part 2

2017-02-13 Thread Paolo Bonzini
On 13/02/2017 11:08, Paolo Bonzini wrote: > Same as v3 except for tests/Makefile.include rebase in patch 1. Nope, this one was about a week old so it needs yet another rebase. Paolo > The next part is CoMutex thread-safety, which is relatively > small (10 patches). > > Paolo > > Paolo Bonzin

Re: [Qemu-devel] [PATCH 1/8] migration: extend VMStateInfo

2017-02-13 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: Jianjun Duan > > Current migration code cannot handle some data structures such as > QTAILQ in qemu/queue.h. Here we extend the signatures of put/get > in VMStateInfo so that customized handling is supported. > > Signed-off-by: Jianjun Duan Reviewed

Re: [Qemu-devel] [PATCH 2/8] add QEMU_BUILD_BUG_EXPR

2017-02-13 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Glib's GLIB_STATIC_ASSERT_EXPR can't be used in an array initialisation > where as this rune can. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 3/8] migration: Add VMSTATE_WITH_TMP

2017-02-13 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > VMSTATE_WITH_TMP is for handling structures where some calculation > or rearrangement of the data needs to be performed before the data > hits the wire. > For example, where the value on the wire is an offset from a > non

Re: [Qemu-devel] [PATCH v2] mem-prealloc: reduce large guest start-up and migration time.

2017-02-13 Thread Igor Mammedov
On Mon, 13 Feb 2017 11:23:17 + "Daniel P. Berrange" wrote: > On Mon, Feb 13, 2017 at 11:45:46AM +0100, Igor Mammedov wrote: > > On Mon, 13 Feb 2017 14:30:56 +0530 > > Jitendra Kolhe wrote: > > > > > Using "-mem-prealloc" option for a large guest leads to higher guest > > > start-up and mi

Re: [Qemu-devel] [PATCH 4/8] tests/migration: Add test for VMSTATE_WITH_TMP

2017-02-13 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Add a test for VMSTATE_WITH_TMP to tests/test-vmstate.c > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 6/8] slirp: VMStatify sbuf

2017-02-13 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Convert the sbuf structure to a VMStateDescription. > Note this uses the VMSTATE_WITH_TMP mechanism to calculate > and reload the offsets based on the pointers. > > Signed-off-by: Dr. David Alan Gilbert > Reviewed-by: Dav

Re: [Qemu-devel] [PATCH v3 2/3] report guest crash information in GUEST_PANICKED event

2017-02-13 Thread Paolo Bonzini
On 13/02/2017 08:09, Denis V. Lunev wrote: > From: Anton Nefedov > > it's not very convenient to use the crash-information property interface, > so provide a CPU class callback to get the guest crash information, and pass > that information in the event > > Signed-off-by: Anton Nefedov > Sign

[Qemu-devel] [PATCH v12 10/24] tcg: enable tb_lock() for SoftMMU

2017-02-13 Thread Alex Bennée
tb_lock() has long been used for linux-user mode to protect code generation. By enabling it now we prepare for MTTCG and ensure all code generation is serialised by this lock. The other major structure that needs protecting is the l1_map and its PageDesc structures. For the SoftMMU case we also use

Re: [Qemu-devel] [PATCH 5/8] slirp: VMState conversion; tcpcb

2017-02-13 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Convert the migration of the struct tcpcb to use a VMStateDescription, > the rest of it will come later. > > Mostly mechanical, except for conversion of some 'char' to uint8_t > to ensure portability. > > Signed-off-by: Dr

[Qemu-devel] [PATCH v12 03/24] mttcg: Add missing tb_lock/unlock() in cpu_exec_step()

2017-02-13 Thread Alex Bennée
From: Pranith Kumar The recent patch enabling lock assertions uncovered the missing lock acquisition in cpu_exec_step(). This patch adds them. Signed-off-by: Pranith Kumar Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- cpu-exec.c | 4 1 file changed, 4 insertions(+) diff

[Qemu-devel] [PATCH v12 02/24] mttcg: translate-all: Enable locking debug in a debug build

2017-02-13 Thread Alex Bennée
From: Pranith Kumar Enable tcg lock debug asserts in a debug build by default instead of relying on DEBUG_LOCKING. None of the other DEBUG_* macros have asserts, so this patch removes DEBUG_LOCKING and enable these asserts in a debug build. CC: Richard Henderson Signed-off-by: Pranith Kumar [A

[Qemu-devel] [PATCH v12 14/24] cputlb: tweak qemu_ram_addr_from_host_nofail reporting

2017-02-13 Thread Alex Bennée
This moves the helper function closer to where it is called and updates the error message to report via error_report instead of the deprecated fprintf. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- cputlb.c | 24 1 file changed, 12 insertions(+), 12 dele

Re: [Qemu-devel] [PATCH 8/8] slirp: VMStatify remaining except for loop

2017-02-13 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > This converts the remaining components, except for the loop, to VMState. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

[Qemu-devel] [PATCH v12 04/24] tcg: move TCG_MO/BAR types into own file

2017-02-13 Thread Alex Bennée
We'll be using the memory ordering definitions to define values for both the host and guest. To avoid fighting with circular header dependencies just move these types into their own minimal header. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v8 - add clarifying comment about

[Qemu-devel] [PATCH v12 00/24] MTTCG Base enabling patches with ARM enablement

2017-02-13 Thread Alex Bennée
Hi Richard/Peter, Only a few changes from the last posting. There were a couple of tweaks to the ARM powerctl patches to address review comments. I've also folded the patches from Pranith: Subject: [PATCH v2 0/2] mttcg: Handle exception and flags in atomic execution Date: Fri, 10 Feb 201

[Qemu-devel] [PATCH v12 15/24] cputlb: introduce tlb_flush_* async work.

2017-02-13 Thread Alex Bennée
From: KONRAD Frederic Some architectures allow to flush the tlb of other VCPUs. This is not a problem when we have only one thread for all VCPUs but it definitely needs to be an asynchronous work when we are in true multithreaded work. We take the tb_lock() when doing this to avoid racing with o

[Qemu-devel] [PATCH v12 07/24] tcg: rename tcg_current_cpu to tcg_current_rr_cpu

2017-02-13 Thread Alex Bennée
..and make the definition local to cpus. In preparation for MTTCG the concept of a global tcg_current_cpu will no longer make sense. However we still need to keep track of it in the single-threaded case to be able to exit quickly when required. qemu_cpu_kick_no_halt() moves and becomes qemu_cpu_ki

[Qemu-devel] [PATCH v12 16/24] cputlb and arm/sparc targets: convert mmuidx flushes from varg to bitmap

2017-02-13 Thread Alex Bennée
While the vargs approach was flexible the original MTTCG ended up having munge the bits to a bitmap so the data could be used in deferred work helpers. Instead of hiding that in cputlb we push the change to the API to make it take a bitmap of MMU indexes instead. For ARM some the resulting flushes

[Qemu-devel] [PATCH v12 06/24] tcg: add kick timer for single-threaded vCPU emulation

2017-02-13 Thread Alex Bennée
Currently we rely on the side effect of the main loop grabbing the iothread_mutex to give any long running basic block chains a kick to ensure the next vCPU is scheduled. As this code is being re-factored and rationalised we now do it explicitly here. Signed-off-by: Alex Bennée Reviewed-by: Richa

Re: [Qemu-devel] [PATCH 7/8] slirp: VMStatify socket level

2017-02-13 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Working up the stack, this replaces the slirp_socket_load/save > with VMState definitions. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela > diff --git a/slirp/socket.h b/slirp/socket.h > index 8f

[Qemu-devel] [PATCH v12 17/24] cputlb: add tlb_flush_by_mmuidx async routines

2017-02-13 Thread Alex Bennée
This converts the remaining TLB flush routines to use async work when detecting a cross-vCPU flush. The only minor complication is having to serialise the var_list of MMU indexes into a form that can be punted to an asynchronous job. The pending_tlb_flush field on QOM's CPU structure also becomes

[Qemu-devel] [PATCH v12 05/24] tcg: add options for enabling MTTCG

2017-02-13 Thread Alex Bennée
From: KONRAD Frederic We know there will be cases where MTTCG won't work until additional work is done in the front/back ends to support. It will however be useful to be able to turn it on. As a result MTTCG will default to off unless the combination is supported. However the user can turn it on

[Qemu-devel] [PATCH v12 09/24] tcg: remove global exit_request

2017-02-13 Thread Alex Bennée
There are now only two uses of the global exit_request left. The first ensures we exit the run_loop when we first start to process pending work and in the kick handler. This is just as easily done by setting the first_cpu->exit_request flag. The second use is in the round robin kick routine. The

  1   2   3   4   >