Re: [Qemu-devel] [PATCH] fix: avoid an infinite loop or a dangling pointer problem in img_commit

2017-06-16 Thread sochin.jiang
Good advice, thank you, Max. On 2017/6/16 21:27, Max Reitz wrote: > On 2017-06-15 08:47, sochin.jiang wrote: >> From: "sochin.jiang" >> >> img_commit could fall into an infinite loop calling run_block_job() if >> its blockjob fails on any I/O error, fix this already known problem. >> >> Signed-o

Re: [Qemu-devel] [PATCH v6 3/6] target: [tcg] Add generic translation framework

2017-06-16 Thread Emilio G. Cota
On Thu, Jun 15, 2017 at 19:25:07 -0400, Emilio G. Cota wrote: > Also, consider keeping the @is_jmp name instead of renaming it to > @jmp_type. (@jmp would be shorter but it would be confusing though, > e.g. cris has both dc->jmp and dc->is_jmp.) It turns out that keeping the original names also ma

Re: [Qemu-devel] [PATCHv4 5/5] fw_cfg: move QOM type defines and fw_cfg types into fw_cfg.h

2017-06-16 Thread Laszlo Ersek
On 06/16/17 15:23, Mark Cave-Ayland wrote: > This allows the device to be instantiated externally for boards that > wish to wire up the fw_cfg device themselves. > > Signed-off-by: Mark Cave-Ayland > --- > hw/nvram/fw_cfg.c | 56 --- > include/hw

Re: [Qemu-devel] [PATCHv4 4/5] fw_cfg: move qdev_init_nofail() from fw_cfg_init1() to callers

2017-06-16 Thread Laszlo Ersek
On 06/16/17 15:23, Mark Cave-Ayland wrote: > When looking to instantiate a TYPE_FW_CFG_MEM or TYPE_FW_CFG_IO device to be > able to wire it up differently, it is much more convenient for the caller to > instantiate the device and have the fw_cfg default files already preloaded > during realize. >

Re: [Qemu-devel] [PATCHv4 3/5] fw_cfg: move assert() and linking of fw_cfg device to the machine into instance_init()

2017-06-16 Thread Laszlo Ersek
On 06/16/17 15:23, Mark Cave-Ayland wrote: > In preparation for calling fw_cfg_init1() during realize rather than during > init, move the assert() checking for existing fw_cfg devices and the linking > of the device to the machine with object_property_add_child() to a new > fw_cfg instance_init() f

Re: [Qemu-devel] [PATCHv4 1/5] fw_cfg: don't map the fw_cfg IO ports in fw_cfg_io_realize()

2017-06-16 Thread Laszlo Ersek
On 06/16/17 15:23, Mark Cave-Ayland wrote: > As indicated by Laszlo it is a QOM bug for the realize() method to actually > map the device. Set up the IO regions within fw_cfg_io_realize() and defer > the mapping with sysbus_add_io() to the caller, as already done in > fw_cfg_init_mem_wide(). > > T

Re: [Qemu-devel] [PATCH v2 1/5] tcg: Refactor helper_lookup_tb_ptr

2017-06-16 Thread Richard Henderson
On 06/16/2017 01:19 PM, Emilio G. Cota wrote: While booting debian-arm I'm measuring (see below) a hit rate in the high 90's for the htable lookups here, so adding an 'unlikely()' hint would be a good idea. GCC already predicts null pointers unlikely. We get identical code with and without the

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [virtio-dev] Re: [PATCH v1] virtio-net: enable configurable tx queue size

2017-06-16 Thread Michael S. Tsirkin
On Fri, Jun 16, 2017 at 07:04:27PM +0200, Maxime Coquelin wrote: > > > On 06/16/2017 05:19 PM, Michael S. Tsirkin wrote: > > On Fri, Jun 16, 2017 at 04:57:01PM +0800, Jason Wang wrote: > > > > > > > > > On 2017年06月16日 11:22, Michael S. Tsirkin wrote: > > > > > I think the issues can be solved b

Re: [Qemu-devel] [RFC] virtio-mem: paravirtualized memory

2017-06-16 Thread Michael S. Tsirkin
On Fri, Jun 16, 2017 at 05:59:07PM +0200, David Hildenbrand wrote: > On 16.06.2017 17:04, Michael S. Tsirkin wrote: > > On Fri, Jun 16, 2017 at 04:20:02PM +0200, David Hildenbrand wrote: > >> Hi, > >> > >> this is an idea that is based on Andrea Arcangeli's original idea to > >> host enforce guest

Re: [Qemu-devel] [PATCH v2 1/5] tcg: Refactor helper_lookup_tb_ptr

2017-06-16 Thread Emilio G. Cota
On Wed, Jun 14, 2017 at 12:48:17 -0700, Richard Henderson wrote: > --- a/tcg-runtime.c > +++ b/tcg-runtime.c (snip) > tb = tb_htable_lookup(cpu, addr, cs_base, flags); > -if (likely(tb)) { > -atomic_set(&cpu->tb_jmp_cache[tb_jmp_cache_hash_func(addr)], tb); > -

Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs

2017-06-16 Thread Emilio G. Cota
On Wed, Jun 14, 2017 at 12:43:00 -0700, Richard Henderson wrote: > On 06/14/2017 12:07 PM, Alex Bennée wrote: > >If your rolling a series for all these can you also pick up Thomas > >Huth's fix for --accel? > > Will do. Just a heads up since I see the patch is in your tcg-next branch: Paolo incl

Re: [Qemu-devel] ARM v6 memory barrier cp15 ops still implemented as NOPs

2017-06-16 Thread Alex Bennée
Peter Maydell writes: > Hi; I just noticed that we seem to still implement the ARM v6 > memory-barrier cp15 ops as NOPs: > > { .name = "ISB", .cp = 15, .crn = 7, .crm = 5, .opc1 = 0, .opc2 = 4, > .access = PL0_W, .type = ARM_CP_NO_RAW, .writefn = arm_cp_write_ignore > }, > { .name

Re: [Qemu-devel] [PATCH v2 3/3] migration: add bitmap for received page

2017-06-16 Thread Alexey Perevalov
On 06/16/2017 09:46 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: On 06/16/2017 08:14 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This patch adds ability to track down already received pages, it's necessary for c

[Qemu-devel] [PATCH v9 7/8] migration: calculate vCPU blocktime on dst side

2017-06-16 Thread Alexey Perevalov
This patch provides blocktime calculation per vCPU, as a summary and as a overlapped value for all vCPUs. This approach was suggested by Peter Xu, as an improvements of previous approch where QEMU kept tree with faulted page address and cpus bitmask in it. Now QEMU is keeping array with faulted pa

[Qemu-devel] [PATCH v9 4/8] migration: split ufd_version_check onto receive/request features part

2017-06-16 Thread Alexey Perevalov
This modification is necessary for userfault fd features which are required to be requested from userspace. UFFD_FEATURE_THREAD_ID is a one of such "on demand" feature, which will be introduced in the next patch. QEMU have to use separate userfault file descriptor, due to userfault context has int

[Qemu-devel] [PATCH v9 2/8] migration: pass MigrationIncomingState* into migration check functions

2017-06-16 Thread Alexey Perevalov
That tiny refactoring is necessary to be able to set UFFD_FEATURE_THREAD_ID while requesting features, and then to create downtime context in case when kernel supports it. Signed-off-by: Alexey Perevalov --- migration/migration.c| 3 ++- migration/postcopy-ram.c | 10 +- migration/p

[Qemu-devel] [PATCH v9 5/8] migration: introduce postcopy-blocktime capability

2017-06-16 Thread Alexey Perevalov
Right now it could be used on destination side to enable vCPU blocktime calculation for postcopy live migration. vCPU blocktime - it's time since vCPU thread was put into interruptible sleep, till memory page was copied and thread awake. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey P

[Qemu-devel] [PATCH v9 1/8] userfault: add pid into uffd_msg & update UFFD_FEATURE_*

2017-06-16 Thread Alexey Perevalov
This commit duplicates header of "userfaultfd: provide pid in userfault msg" into linux kernel. Signed-off-by: Alexey Perevalov --- linux-headers/linux/userfaultfd.h | 4 1 file changed, 4 insertions(+) diff --git a/linux-headers/linux/userfaultfd.h b/linux-headers/linux/userfaultfd.h ind

[Qemu-devel] [PATCH v9 3/8] migration: fix hardcoded function name in error report

2017-06-16 Thread Alexey Perevalov
Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 35f3ffd..b35baf3 100644 --- a/migration/postc

[Qemu-devel] [PATCH v9 6/8] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-06-16 Thread Alexey Perevalov
This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. PostcopyBlocktimeContext is incapsulated inside postcopy-ram.c, due to it's postcopy only feature. Also it defines PostcopyBlocktimeContext's instance live time. Information from Po

[Qemu-devel] [PATCH v9 8/8] migration: postcopy_blocktime documentation

2017-06-16 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- docs/devel/migration.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/devel/migration.txt b/docs/devel/migration.txt index 1b940a8..4b625ca 100644 --- a/docs/devel/migration.txt +++ b/docs/devel/migra

[Qemu-devel] [PATCH v9 0/8] calculate blocktime for postcopy live migration

2017-06-16 Thread Alexey Perevalov
This is 9th version. The rationale for that idea is following: vCPU could suspend during postcopy live migration until faulted page is not copied into kernel. Downtime on source side it's a value - time interval since source turn vCPU off, till destination start runnig vCPU. But that value was pro

[Qemu-devel] [PATCH v3 3/3] migration: add bitmap for received page

2017-06-16 Thread Alexey Perevalov
This patch adds ability to track down already received pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure. Also it's necessary to solve shared memory issue in postcopy livemigration. Information about received page

[Qemu-devel] [PATCH v3 1/3] migration: postcopy_place_page factoring out

2017-06-16 Thread Alexey Perevalov
Need to mark copied pages as closer as possible to the place where it tracks down. That will be necessary in futher patch. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 13 +++-- migr

[Qemu-devel] [PATCH v3 2/3] migration: introduce qemu_ufd_copy_ioctl helper

2017-06-16 Thread Alexey Perevalov
Just for placing auxilary operations inside helper, auxilary operations like: track received pages, notify about copying operation in futher patches. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 34

[Qemu-devel] [PATCH v3 0/3] Add bitmap for received pages in postcopy migration

2017-06-16 Thread Alexey Perevalov
This is third version of [PATCH v1 0/2] Add bitmap for copied pages in postcopy migration cover message from there This is a separate patch set, it derived from https://www.mail-archive.com/qemu-devel@nongnu.org/msg456004.html There are several possible use cases: 1. solve issue with postcopy liv

[Qemu-devel] [PATCH v2 2/2] gen-icount: use tcg_ctx.tcg_env instead of cpu_env

2017-06-16 Thread Emilio G. Cota
We are relying on cpu_env being defined as a global, yet most targets (i.e. all but arm/a64) have it defined as a local variable. Luckily all of them use the same "cpu_env" name, but really compilation shouldn't break if the name of that local variable changed. Fix it by using tcg_ctx.tcg_env, whi

[Qemu-devel] [PATCH v3 2/3] applesmc: implement error status port

2017-06-16 Thread Gabriel L. Somlo
As of release 10.12.4, OS X (Sierra) refuses to boot unless the AppleSMC supports an additional I/O port, expected to provide an error status code. Update the [cmd|data]_write() and data_read() methods to implement the required state machine, and add I/O region & methods to handle access to the er

[Qemu-devel] [PATCH v2 0/2] cpu_env in gen-icount

2017-06-16 Thread Emilio G. Cota
v1: https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg03771.html Changes from v1: - Use tcg_ctx.tcg_env instead of passing cpu_env around as suggested by Richard. - Added Richard's R-b tag to patch 1. Thanks, Emilio

[Qemu-devel] [PATCH v2 1/2] gen-icount: add missing inline to gen_tb_end

2017-06-16 Thread Emilio G. Cota
Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- include/exec/gen-icount.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index 62d462e..547c979 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/ge

[Qemu-devel] [PATCH v3 1/3] applesmc: cosmetic whitespace and indentation cleanup

2017-06-16 Thread Gabriel L. Somlo
Signed-off-by: Gabriel Somlo Reviewed-by: Alexander Graf Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Phil Dennis-Jordan --- hw/misc/applesmc.c | 98 -- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git a/hw/misc/applesmc.c b/

[Qemu-devel] [PATCH v3 3/3] applesmc: fix port i/o access width

2017-06-16 Thread Gabriel L. Somlo
Set access width of all AppleSMC i/o regions to 1 byte, since they all represent 8-bit-wide ports. Signed-off-by: Gabriel Somlo Reviewed-by: Alexander Graf --- hw/misc/applesmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/applesmc.c b/hw/misc/applesmc.c inde

[Qemu-devel] [PATCH v3 0/3] Update AppleSMC for OS X 10.12.4+ guests

2017-06-16 Thread Gabriel L. Somlo
As of 10.12.4, OS X refuses to boot unless the AppleSMC supports a third I/O port, which provides the current error status when read. New since v2: - updated "reviewd-by" fields - ping ? >New since v1: > >- 1/3: don't touch the default OSK string, as it's unnecessary >

Re: [Qemu-devel] [PATCH 2/2] gen-icount: pass cpu_env as a parameter to gen_* inlines

2017-06-16 Thread Emilio G. Cota
On Fri, Jun 16, 2017 at 10:32:14 +0200, Paolo Bonzini wrote: > On 16/06/2017 01:04, Emilio G. Cota wrote: > > va = dest_gpr(ctx, ra); > > if (ctx->tb->cflags & CF_USE_ICOUNT) { > > -gen_io_start(); > > +gen_io_start(cpu_env); > >

Re: [Qemu-devel] [PATCH v2 3/3] migration: add bitmap for received page

2017-06-16 Thread Dr. David Alan Gilbert
* Alexey Perevalov (a.pereva...@samsung.com) wrote: > On 06/16/2017 08:14 PM, Dr. David Alan Gilbert wrote: > > * Alexey Perevalov (a.pereva...@samsung.com) wrote: > > > This patch adds ability to track down already received > > > pages, it's necessary for calculation vCPU block time in > > > postc

Re: [Qemu-devel] [PATCH v2 5/5] migration: Make compression_threads use save/load_setup/cleanup()

2017-06-16 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Once there, be consistent and use > compress_thread_{save,load}_{setup,cleanup}. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/migration.c | 5 - > migration/ram.c | 12 > migratio

Re: [Qemu-devel] [PATCH v2 4/5] migration: Convert ram to use new load_setup()/load_cleanup()

2017-06-16 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Once there, I rename ram_migration_cleanup() to ram_save_cleanup(). > Notice that this is the first pass, and I only passed XBZRLE to the > new scheme. Moved decoded_buf to inside XBZRLE struct. > As a bonus, I don't have to export xbzrle functions fr

[Qemu-devel] [PATCH v2 30/31] qed: Use bdrv_co_* for coroutine_fns

2017-06-16 Thread Kevin Wolf
All functions that are marked coroutine_fn can directly call the bdrv_co_* version of functions instead of going through the wrapper. Signed-off-by: Kevin Wolf --- block/qed.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/block/qed.c b/block/qed.c index 48f

[Qemu-devel] [PATCH v2 28/31] qed: Use a coroutine for need_check_timer

2017-06-16 Thread Kevin Wolf
This fixes the last place where we degraded from AIO to actual blocking synchronous I/O requests. Putting it into a coroutine means that instead of blocking, the coroutine simply yields while doing I/O. Signed-off-by: Kevin Wolf --- block/qed.c | 33 + 1 file chan

Re: [Qemu-devel] [PATCH v2 3/5] migration: Create load_setup()/cleanup() methods

2017-06-16 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We need to do things at load time and at cleanup time. > > Signed-off-by: Juan Quintela > --- > include/migration/register.h | 2 ++ > migration/savevm.c | 44 > > migration/trace-events

[Qemu-devel] [PATCH v2 29/31] qed: Add coroutine_fn to I/O path functions

2017-06-16 Thread Kevin Wolf
Now that we stay in coroutine context for the whole request when doing reads or writes, we can add coroutine_fn annotations to many functions that can do I/O or yield directly. Signed-off-by: Kevin Wolf --- block/qed-cluster.c | 5 +++-- block/qed.c | 44

[Qemu-devel] [PATCH v2 26/31] qed: Use CoQueue for serialising allocations

2017-06-16 Thread Kevin Wolf
Now that we're running in coroutine context, the ad-hoc serialisation code (which drops a request that has to wait out of coroutine context) can be replaced by a CoQueue. This means that when we resume a serialised request, it is running in coroutine context again and its I/O isn't blocking any mo

Re: [Qemu-devel] [PATCH v2 3/3] migration: add bitmap for received page

2017-06-16 Thread Alexey Perevalov
On 06/16/2017 08:14 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This patch adds ability to track down already received pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure

[Qemu-devel] [PATCH v2 27/31] qed: Simplify request handling

2017-06-16 Thread Kevin Wolf
Now that we process a request in the same coroutine from beginning to end and don't drop out of it any more, we can look like a proper coroutine-based driver and simply call qed_aio_next_io() and get a return value from it instead of spawning an additional coroutine that reenters the parent when it

[Qemu-devel] [PATCH v2 22/31] qed: Add return value to qed_aio_read/write_data()

2017-06-16 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 72 ++--- block/qed.h | 21 -

[Qemu-devel] [PATCH v2 31/31] block: Remove bdrv_aio_readv/writev/flush()

2017-06-16 Thread Kevin Wolf
These functions are unused now. Signed-off-by: Kevin Wolf --- block/io.c| 171 -- block/trace-events| 3 - include/block/block.h | 8 --- 3 files changed, 182 deletions(-) diff --git a/block/io.c b/block/io.c index faca3fa..eab

[Qemu-devel] [PATCH v2 23/31] qed: Remove ret argument from qed_aio_next_io()

2017-06-16 Thread Kevin Wolf
All callers pass ret = 0, so we can just remove it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/block/qed.c b/block/qed.c index 6f83831..db80987 100644 --- a/block/qed.c +++ b/block

[Qemu-devel] [PATCH v2 25/31] qed: Implement .bdrv_co_readv/writev

2017-06-16 Thread Kevin Wolf
Most of the qed code is now synchronous and matches the coroutine model. One notable exception is the serialisation between requests which can still schedule a callback. Before we can replace this with coroutine locks, let's convert the driver's external interfaces to the coroutine versions. We ne

[Qemu-devel] [PATCH v2 20/31] qed: Add return value to qed_aio_write_cow()

2017-06-16 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. While refactoring qed_aio_write_alloc() to accomodate the change, qed_aio_write_zero_cluster() ended up with a single line, so I chose to inline that line and remove the fu

[Qemu-devel] [PATCH v2 24/31] qed: Remove recursion in qed_aio_next_io()

2017-06-16 Thread Kevin Wolf
Instead of calling itself recursively as the last thing, just convert qed_aio_next_io() into a loop. This patch is best reviewed with 'git show -w' because most of it is just whitespace changes. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 63 +++

[Qemu-devel] [PATCH v2 18/31] qed: Add return value to qed_aio_write_l2_update()

2017-06-16 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 43 ++- 1 file changed, 26 insertions(+), 17 deletions(-

[Qemu-devel] [PATCH v2 17/31] qed: Add return value to qed_aio_write_l1_update()

2017-06-16 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/block/qed

[Qemu-devel] [PATCH v2 21/31] qed: Add return value to qed_aio_write_inplace/alloc()

2017-06-16 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 43 --- 1 file changed, 20 insertions(+), 23 deletions(-

[Qemu-devel] [PATCH v2 09/31] qed: Make qed_write_header() synchronous

2017-06-16 Thread Kevin Wolf
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 Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/qed.c | 76 +++---

[Qemu-devel] [PATCH v2 19/31] qed: Add return value to qed_aio_write_main()

2017-06-16 Thread Kevin Wolf
Don't recurse into qed_aio_next_io() and qed_aio_complete() here, but just return an error code and let the caller handle it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 55 ++- 1 file changed, 30 insertions(+), 25

[Qemu-devel] [PATCH v2 16/31] qed: Inline qed_commit_l2_update()

2017-06-16 Thread Kevin Wolf
qed_commit_l2_update() is unconditionally called at the end of qed_aio_write_l1_update(). Inline it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed.c | 36 ++-- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/block/qed.c b/bl

[Qemu-devel] [PATCH v2 10/31] qed: Remove callback from qed_write_header()

2017-06-16 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qed.c | 32 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/block/qed.c b/block/qed.c index 2665efc..95f1050 100644 --- a/block/qed.c +++ b/block/qed.c @@ -98,8 +98,7 @@ int qed_write_header_sync(BDRVQEDState *s)

[Qemu-devel] [PATCH v2 11/31] qed: Make qed_write_table() synchronous

2017-06-16 Thread Kevin Wolf
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 Reviewed-by: Stefan Hajnoczi --- block/qed-table.c | 84 --- 1 file c

[Qemu-devel] [PATCH v2 13/31] qed: Remove callback from qed_write_table()

2017-06-16 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/qed-table.c | 47 --- block/qed.c | 12 +++- block/qed.h | 8 +++- 3 files changed, 22 insertions(+), 45 deletions(-) diff --git a/block/qed-table.c b/block/qed-

[Qemu-devel] [PATCH v2 15/31] qed: Make qed_aio_write_main() synchronous

2017-06-16 Thread Kevin Wolf
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 Reviewed-by: Stefan Hajnoczi --- block/qed.c | 61 +++-- 1 file c

[Qemu-devel] [PATCH v2 05/31] qed: Remove callback from qed_find_cluster()

2017-06-16 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qed-cluster.c | 39 ++- block/qed.c | 24 +++- block/qed.h | 4 ++-- 3 files changed, 35 insertions(+), 32 deletions(-) diff --git a/block/qed-cluster.c b/block/qed-cluster.c index d27994

[Qemu-devel] [PATCH v2 07/31] qed: Make qed_copy_from_backing_file() synchronous

2017-06-16 Thread Kevin Wolf
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 Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/qed.c | 78 +++---

[Qemu-devel] [PATCH v2 08/31] qed: Remove callback from qed_copy_from_backing_file()

2017-06-16 Thread Kevin Wolf
With this change, qed_aio_write_prefill() and qed_aio_write_postfill() collapse into a single function. This is reflected by a rename of the combined function to qed_aio_write_cow(). Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/qed.c | 57 +++

[Qemu-devel] [PATCH v2 14/31] qed: Make qed_aio_read_data() synchronous

2017-06-16 Thread Kevin Wolf
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 Reviewed-by: Stefan Hajnoczi --- block/qed.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/

[Qemu-devel] [PATCH v2 03/31] qed: Remove callback from qed_read_table()

2017-06-16 Thread Kevin Wolf
Instead of passing the return value to a callback, return it to the caller so that the callback can be inlined there. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/qed-table.c | 79 ++- 1 file change

[Qemu-devel] [PATCH v2 06/31] qed: Make qed_read_backing_file() synchronous

2017-06-16 Thread Kevin Wolf
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 Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/qed.c | 32 ++-- 1 file chang

[Qemu-devel] [PATCH v2 04/31] qed: Remove callback from qed_read_l2_table()

2017-06-16 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/qed-cluster.c | 94 ++--- block/qed-table.c | 15 +++-- block/qed.h | 3 +- 3 files changed, 36 insertions(+), 76 deletions(-) diff --git a/bl

[Qemu-devel] [PATCH v2 12/31] qed: Remove GenericCB

2017-06-16 Thread Kevin Wolf
The GenericCB infrastructure isn't used any more. Remove it. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- block/Makefile.objs | 2 +- block/qed-gencb.c | 33 - block/qed.h | 11 --- 3 files changed, 1 insertion(+), 45 deletions(-)

[Qemu-devel] [PATCH v2 01/31] qed: Use bottom half to resume waiting requests

2017-06-16 Thread Kevin Wolf
The qed driver serialises allocating write requests. When the active allocation is finished, the AIO callback is called, but after this, the next allocating request is immediately processed instead of leaving the coroutine. Resuming another allocation request in the same request coroutine means tha

[Qemu-devel] [PATCH v2 02/31] qed: Make qed_read_table() synchronous

2017-06-16 Thread Kevin Wolf
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 Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi --- block/qed-table.c | 56 ++--

[Qemu-devel] [PATCH v2 00/31] qed: Convert to coroutines

2017-06-16 Thread Kevin Wolf
The qed block driver is one of the last remaining block drivers that use the AIO callback style interfaces. This series converts it to the coroutine model that other drivers are using and removes some AIO functions from the block layer API afterwards. If this isn't compelling enough, the diffstat

[Qemu-devel] ARM v6 memory barrier cp15 ops still implemented as NOPs

2017-06-16 Thread Peter Maydell
Hi; I just noticed that we seem to still implement the ARM v6 memory-barrier cp15 ops as NOPs: { .name = "ISB", .cp = 15, .crn = 7, .crm = 5, .opc1 = 0, .opc2 = 4, .access = PL0_W, .type = ARM_CP_NO_RAW, .writefn = arm_cp_write_ignore }, { .name = "DSB", .cp = 15, .crn = 7, .crm = 10

Re: [Qemu-devel] [PATCH v2 2/5] migration: Rename cleanup() to save_cleanup()

2017-06-16 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We need a cleanup for loads, so we rename here to be consistent. > > Signed-off-by: Juan Quintela > --- > hw/ppc/spapr.c | 2 +- > include/migration/register.h | 2 +- > migration/block.c| 2 +- > migration/ram.c

Re: [Qemu-devel] [PATCH v2 1/5] migration: Rename save_live_setup() to save_setup()

2017-06-16 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We are going to use it now for more than save live regions. > Once there rename qemu_savevm_state_begin() to qemu_savevm_state_setup(). > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > hw/ppc/spapr.c | 2

Re: [Qemu-devel] [PATCH 5/7] cpu: Introduce a wrapper for tlb_flush() that can be used in common code

2017-06-16 Thread Paolo Bonzini
On 16/06/2017 19:07, Alex Bennée wrote: > > Thomas Huth writes: > >> Commit 1f5c00cfdb8114c ("qom/cpu: move tlb_flush to cpu_common_reset") >> moved the call to tlb_flush() from the target-specific reset handlers >> into the common code qom/cpu.c file, and protected the call with >> "#ifdef CO

[Qemu-devel] [PATCH] hw/ppc/spapr.c: consecutive 'spapr->patb_entry = 0' statements

2017-06-16 Thread Daniel Henrique Barboza
In ppc_spapr_reset(), if the guest is using HPT, the code was executing: } else { spapr->patb_entry = 0; spapr_setup_hpt_and_vrma(spapr); } And, at the end of spapr_setup_hpt_and_vrma: /* We're setting up a hash table, so that means we're not radix */ spapr->patb_

Re: [Qemu-devel] [PATCH v2 3/3] migration: add bitmap for received page

2017-06-16 Thread Dr. David Alan Gilbert
* Alexey Perevalov (a.pereva...@samsung.com) wrote: > On 06/16/2017 12:06 PM, Peter Xu wrote: > > On Thu, Jun 15, 2017 at 07:36:15PM +0300, Alexey Perevalov wrote: > > > > [...] > > > > > +void init_receivedmap(void) > > > +{ > > > +RAMBlock *rb; > > > + > > > +RAMBLOCK_FOREACH(rb) { > >

Re: [Qemu-devel] [PATCH] throttle: Update throttle-groups.c documentation

2017-06-16 Thread Kevin Wolf
Am 13.06.2017 um 23:16 hat Alberto Garcia geschrieben: > There used to be throttle_timers_{detach,attach}_aio_context() calls > in bdrv_set_aio_context(), but since 7ca7f0f6db1fedd28d490795d778cf239 > they are now in blk_set_aio_context(). > > Signed-off-by: Alberto Garcia Thanks, applied to the

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

2017-06-16 Thread Michael Roth
Quoting Igor Mammedov (2017-06-16 08:53:12) > On Wed, 14 Jun 2017 19:27:12 -0500 > Michael Roth wrote: > > > Quoting Igor Mammedov (2017-06-14 04:00:01) > > > On Tue, 13 Jun 2017 16:42:45 -0500 > > > Michael Roth wrote: > > > > > > > Quoting Igor Mammedov (2017-06-09 03:27:33) > [...] > >

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

2017-06-16 Thread Michael Roth
Quoting David Gibson (2017-06-16 09:40:53) > On Fri, Jun 16, 2017 at 03:53:12PM +0200, Igor Mammedov wrote: > > On Wed, 14 Jun 2017 19:27:12 -0500 > > Michael Roth wrote: > > > > > Quoting Igor Mammedov (2017-06-14 04:00:01) > > > > On Tue, 13 Jun 2017 16:42:45 -0500 > > > > Michael Roth wrote:

Re: [Qemu-devel] [PATCH v2 3/3] migration: add bitmap for received page

2017-06-16 Thread Dr. David Alan Gilbert
* Alexey Perevalov (a.pereva...@samsung.com) wrote: > This patch adds ability to track down already received > pages, it's necessary for calculation vCPU block time in > postcopy migration feature, maybe for restore after > postcopy migration failure. > Also it's necessary to solve shared memory is

[Qemu-devel] [RFH] qemu-2.6 memory corruption with OVMF and linux-4.9

2017-06-16 Thread Philipp Hahn
Hello, I tried to get QEMU running with UEFI and SecureBoot. It sometimes works, but sometimes I get memory corruption: - the Debian installer sometimes fails to load the "libata.ko" or "e1000.ko" modules. - it it not always the same module - my guest kernel uses KASLR, which might explain differe

Re: [Qemu-devel] [PATCH 5/7] cpu: Introduce a wrapper for tlb_flush() that can be used in common code

2017-06-16 Thread Alex Bennée
Thomas Huth writes: > Commit 1f5c00cfdb8114c ("qom/cpu: move tlb_flush to cpu_common_reset") > moved the call to tlb_flush() from the target-specific reset handlers > into the common code qom/cpu.c file, and protected the call with > "#ifdef CONFIG_SOFTMMU" to avoid that it is called for linux-u

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [virtio-dev] Re: [PATCH v1] virtio-net: enable configurable tx queue size

2017-06-16 Thread Maxime Coquelin
On 06/16/2017 05:19 PM, Michael S. Tsirkin wrote: On Fri, Jun 16, 2017 at 04:57:01PM +0800, Jason Wang wrote: On 2017年06月16日 11:22, Michael S. Tsirkin wrote: I think the issues can be solved by VIRTIO_F_MAX_CHAIN_SIZE. For now, how about splitting it into two series of patches: 1) enable 1

Re: [Qemu-devel] [PATCH v2 2/3] migration: introduce qemu_ufd_copy_ioctl helper

2017-06-16 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Jun 15, 2017 at 07:36:14PM +0300, Alexey Perevalov wrote: > > Just for placing auxilary operations inside helper, > > auxilary operations like: track received pages, > > notify about copying operation in futher patches. > > > > Signed-off-by: Alexey

Re: [Qemu-devel] [PATCH v2] block: Do not strcmp() with NULL uri->scheme

2017-06-16 Thread Max Reitz
On 2017-06-13 22:57, Max Reitz wrote: > uri_parse(...)->scheme may be NULL. In fact, probably every field may be > NULL, and the callers do test this for all of the other fields but not > for scheme (except for block/gluster.c; block/vxhs.c does not access > that field at all). > > We can easily f

Re: [Qemu-devel] [PATCH 0/2] block: Fix gcc 7 warnings

2017-06-16 Thread Max Reitz
On 2017-06-13 19:20, Max Reitz wrote: > blkdebug and blkverify use snprintf() to generate a filename; however, > that may not fit into the target buffer (BDS.exact_filename). If so, > they generate a truncated and thus pretty much unusable filename. In > this case it's better to just not generate a

Re: [Qemu-devel] [PATCH v3] target-ppc: Enable open-pic timers to count and generate interrupts

2017-06-16 Thread alarson
Aaron Larson wrote on 06/05/2017 12:22:53 PM: > From: Aaron Larson > To: ag...@suse.de, alar...@ddci.com, da...@gibson.dropbear.id.au, qemu-devel@nongnu.org, qemu-...@nongnu.org > Date: 06/05/2017 12:22 PM > Subject: [PATCH v3] target-ppc: Enable open-pic timers to count and generate interrupt

Re: [Qemu-devel] [PATCH] qemu-doc: Move the qemu-ga description into a separate chapter

2017-06-16 Thread Kevin Wolf
Am 22.05.2017 um 22:53 hat Thomas Huth geschrieben: > The qemu-ga description is currently a subsection of the Disk Images > chapter - which does not make much sense since the qemu-ga is not > directly related to disk images. So let's move this information > into a separate chapter instead. > > Si

Re: [Qemu-devel] [PATCH v2 0/7] Poison some more target-specific defines

2017-06-16 Thread Thomas Huth
On 16.06.2017 17:55, Paolo Bonzini wrote: > > > On 16/06/2017 17:21, Thomas Huth wrote: >>> Why do you say they can't be moved? They can, and your series should >>> change nothing about it, thanks to what you're doing now with >>> CONFIG_KVM_IS_POSSIBLE (which was also done before with NEED_CPU_

[Qemu-devel] [PATCH 08/11] travis: install more library dependencies

2017-06-16 Thread Philippe Mathieu-Daudé
so more codebase is built Signed-off-by: Philippe Mathieu-Daudé --- .travis.yml | 8 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4889c192c2..4c0f7f444e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,10 +9,12 @@ addons: apt: packages: #

Re: [Qemu-devel] [PATCH v2 1/3] migration: postcopy_place_page factoring out

2017-06-16 Thread Dr. David Alan Gilbert
* Alexey Perevalov (a.pereva...@samsung.com) wrote: > Need to mark copied pages as closer as possible to the place where it > tracks down. That will be necessary in futher patch. > > Reviewed-by: Juan Quintela > Signed-off-by: Alexey Perevalov Reviewed-by: Dr. David Alan Gilbert > --- > migr

[Qemu-devel] [PATCH 07/11] travis: install more library dependencies

2017-06-16 Thread Philippe Mathieu-Daudé
From: Peter Maydell Update the travis list of library packages to install so that our build tests cover more of our code base. Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- .travis.yml | 18 +++

Re: [Qemu-devel] [PATCH v2 0/7] Poison some more target-specific defines

2017-06-16 Thread Paolo Bonzini
On 16/06/2017 18:15, Thomas Huth wrote: > This is quite similar to trying to poison CONFIG_USER_ONLY ... every > common file that depends on include/exec/memory.h or > /include/exec/cpu-common.h then does not compile anymore - and as far as > I can see, this can't be fixed with some trivial "#ifd

[Qemu-devel] [PATCH 04/11] tests: add rule to compile many objects used by tests

2017-06-16 Thread Philippe Mathieu-Daudé
all those objects can get compiled simultaneously Signed-off-by: Philippe Mathieu-Daudé --- tests/Makefile.include | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index f42f3dfa72..3773f9d8d2 100644 --- a/tests/Makefile.

[Qemu-devel] [PATCH 09/11] scripts/run-coverity-scan: Script to run Coverity Scan build

2017-06-16 Thread Philippe Mathieu-Daudé
From: Peter Maydell Add a new script to automate the process of running the Coverity Scan build tools and uploading the resulting tarball to the website. This is primarily intended to be driven from Travis, but it can be run locally (if you are a maintainer of the QEMU project on the Coverity Sca

Re: [Qemu-devel] [PATCH v2] live-block-ops.txt: Rename, rewrite, and improve it

2017-06-16 Thread Stephen Finucane
On Fri, 2017-06-16 at 16:51 +0200, Kashyap Chamarthy wrote: > This edition documents (including their QMP invocations) all four > operations: > >   - `block-stream` >   - `block-commit` >   - `drive-mirror` (& `blockdev-mirror`) >   - `drive-backup` (& `blockdev-backup`) > > Things considered whi

[Qemu-devel] [PATCH 10/11] travis: Add config to do a Coverity Scan upload

2017-06-16 Thread Philippe Mathieu-Daudé
From: Peter Maydell Add config to travis to do a Coverity Scan build and upload, using the new run-coverity-scan script. There is an official integration between Travis and Coverity Scan: https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/addons/coverity_scan.rb which slurp

[Qemu-devel] [PATCH 11/11] MAINTAINERS: self-appoint me as reviewer in build/test automation

2017-06-16 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 120788d8fb..e62cbc439a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1858,6 +1858,7 @@ Build and test automation --

[Qemu-devel] [PATCH 06/11] travis: retry if llvm.org timeouts

2017-06-16 Thread Philippe Mathieu-Daudé
example of failure: https://travis-ci.org/qemu/qemu/jobs/243232857 $ sudo apt-get update -qq W: Failed to fetch http://llvm.org/apt/trusty/dists/llvm-toolchain-trusty-3.9/Release.gpg Connection failed E: Some index files failed to download. They have been ignored, or old ones used

  1   2   3   >