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

2017-05-26 Thread Marc-André Lureau
Hi On Fri, May 26, 2017 at 10:51 AM Haozhong Zhang wrote: > On 05/26/17 06:39 +, Marc-André Lureau wrote: > > Hi > > > > On Fri, May 26, 2017 at 6:34 AM Haozhong Zhang > > > wrote: > > > > > file_ram_alloc() currently maps the backend file via mmap to a virtual > > > address aligned to the

[Qemu-devel] [PULL 03/22] docker: Add libaio to fedora image

2017-05-26 Thread Fam Zheng
Signed-off-by: Fam Zheng Message-Id: <20170505032340.26467-5-f...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Paolo Bonzini Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/fedora.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-devel] [PULL 02/22] docker: Add bzip2 and hostname to fedora image

2017-05-26 Thread Fam Zheng
It is used by qemu-iotests. Signed-off-by: Fam Zheng Message-Id: <20170505032340.26467-3-f...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Paolo Bonzini Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/fedora.docker | 2 +- 1 file changed, 1 inse

[Qemu-devel] [PULL 00/22] Docker and block patches

2017-05-26 Thread Fam Zheng
The following changes since commit 9964e96dccf7f7c936ee854a795415d19b60: Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging (2017-05-23 15:01:31 +0100) are available in the git repository at: git://github.com/famz/qemu.git tags/docker-and-block-pull-request for

[Qemu-devel] [PULL 05/22] block: access copy_on_read with atomic ops

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-2-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block.c | 6 -- block/io.c| 8 blockdev.c| 2 +- include/block/

[Qemu-devel] [PULL 01/22] docker: Run tests with current user

2017-05-26 Thread Fam Zheng
We've used --add-current-user to create a user in the image, use it to run tests, because root has too much priviledge, and can surprise test cases. Signed-off-by: Fam Zheng Message-Id: <20170505032340.26467-2-f...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewe

[Qemu-devel] [PULL 12/22] throttle-groups: do not use qemu_co_enter_next

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Prepare for removing this function; always restart throttled requests from coroutine context. This will matter when restarting throttled requests will have to acquire a CoMutex. Reviewed-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-

[Qemu-devel] [PULL 04/22] docker: Add flex and bison to centos6 image

2017-05-26 Thread Fam Zheng
Currently there are warnings about flex and bison being missing when building in the centos6 image: make[1]: flex: Command not found BISON dtc-parser.tab.c make[1]: bison: Command not found Add them. Reported-by: Thomas Huth Signed-off-by: Fam Zheng Message-Id: <2017052400

[Qemu-devel] [PULL 06/22] block: access quiesce_counter with atomic ops

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-3-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block/io.c| 4 ++-- include/block/block_int.h | 1 + 2 files changed, 3 insertions(+

[Qemu-devel] [PULL 16/22] block: access write_gen with atomics

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-13-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block.c | 2 +- block/io.c| 6 +++--- include/block/block_int.h | 2 +- 3 files changed, 5 ins

[Qemu-devel] [PULL 10/22] block: access io_plugged with atomic ops

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-7-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block/io.c| 4 ++-- include/block/block_int.h | 8 +--- 2 files changed, 7 insertions(+), 5 deletions(-) dif

[Qemu-devel] [PULL 08/22] block: access serialising_in_flight with atomic ops

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-5-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block/io.c| 6 +++--- include/block/block_int.h | 10 ++ 2 files changed, 9 insertions(+), 7 deletions(-

[Qemu-devel] [PULL 07/22] block: access io_limits_disabled with atomic ops

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Reviewed-by: Alberto Garcia Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-4-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block/block-backend.c | 4 ++-- block/throttle-groups.c| 2 +- include/sysemu/block

[Qemu-devel] [PULL 11/22] throttle-groups: only start one coroutine from drained_begin

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Starting all waiting coroutines from bdrv_drain_all is unnecessary; throttle_group_co_io_limits_intercept calls schedule_next_request as soon as the coroutine restarts, which in turn will restart the next request if possible. If we only start the first request and let the cor

[Qemu-devel] [PULL 09/22] block: access wakeup with atomic ops

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-6-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block/io.c| 3 ++- block/nfs.c | 4 +++- block/sheepdog.c | 3 ++- include/block/block.h

[Qemu-devel] [PULL 15/22] block: use Stat64 for wr_highest_offset

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-12-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block/io.c| 4 +--- block/qapi.c | 2 +- include/block/block_int.h | 7 --- 3 files changed, 6

[Qemu-devel] [PULL 19/22] migration/block: reset dirty bitmap before reading

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Any data that is returned by read may be stale already, the bitmap has to be cleared before issuing the read. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-16-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- migration/block.c

[Qemu-devel] [PULL 17/22] block: protect tracked_requests and flush_queue with reqs_lock

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-14-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block.c | 1 + block/io.c| 16 ++-- include/block/block_int.h | 14 +-

[Qemu-devel] [PULL 18/22] block: introduce dirty_bitmap_mutex

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini It protects only the list of dirty bitmaps; in the next patch we will also protect their content. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-15-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 4

[Qemu-devel] [PULL 20/22] block: protect modification of dirty bitmaps with a mutex

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-17-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block/dirty-bitmap.c | 70 ++-- block/mirror.c | 11 +-- inclu

[Qemu-devel] [PULL 13/22] throttle-groups: protect throttled requests with a CoMutex

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini Another possibility is to use tg->lock, which we're holding anyway in both schedule_next_request and throttle_group_co_io_limits_intercept. This would require open-coding the CoQueue however, so I've chosen this alternative. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo

[Qemu-devel] [PULL 14/22] util: add stats64 module

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini This module provides fast paths for 64-bit atomic operations on machines that only have 32-bit atomic access. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-11-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- include/qemu/stat

[Qemu-devel] [PULL 21/22] block: introduce block_account_one_io

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini This is the common code to account operations that produced actual I/O. Reviewed-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-18-pbonz...@redhat.com> Signed-off-by: Fam Zheng --- block/accounting.c | 51 ++

[Qemu-devel] [PULL 22/22] block: make accounting thread-safe

2017-05-26 Thread Fam Zheng
From: Paolo Bonzini I'm not trying too hard yet. Later, with multiqueue support, this may cause mutex contention or cacheline bouncing. Reviewed-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini Message-Id: <20170525163225.29954-19-pbonz...@redhat.com> Signed-off-b

Re: [Qemu-devel] [PATCH 3/7] qcow2: Make perform_cow() call do_perform_cow() twice

2017-05-26 Thread Kevin Wolf
Am 23.05.2017 um 13:22 hat Alberto Garcia geschrieben: > Instead of calling perform_cow() twice with a different COW region > each time, call it just once and make perform_cow() handle both > regions. > > This patch simply moves code around. The next one will do the actual > reordering of the COW

Re: [Qemu-devel] [PATCH v1 05/13] qcow2: set inactive flag

2017-05-26 Thread Kevin Wolf
Am 19.05.2017 um 11:34 hat Anton Nefedov geschrieben: > Qcow2State and BlockDriverState flags have to be in sync > > Signed-off-by: Anton Nefedov > --- > block/qcow2.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/qcow2.c b/block/qcow2.c > index 6e7ce96..07c1706 100644 > --- a/

Re: [Qemu-devel] [PATCH v1 01/13] qcow2: alloc space for COW in one chunk

2017-05-26 Thread Kevin Wolf
Am 19.05.2017 um 11:34 hat Anton Nefedov geschrieben: > From: "Denis V. Lunev" > > Currently each single write operation can result in 3 write operations > if guest offsets are not cluster aligned. One write is performed for the > real payload and two for COW-ed areas. Thus the data possibly lays

[Qemu-devel] [PATCH] pci: Set err to errp directly rather than through error_porpagate()

2017-05-26 Thread Mao Zhongyi
ioh3420_interrupts_init() and its callers, rp_realize() and pci_qdev_realize() fill error message to local_err, then propagate it to errp by error_porpagate(), which's not necessary. So eliminate it and pass errp directly instead of local_err. Of course, error_propagate() also will be removed. Sig

Re: [Qemu-devel] [PULL 00/22] Docker and block patches

2017-05-26 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20170526075246.20265-1-f...@redhat.com Subject: [Qemu-devel] [PULL 00/22] Docker and block patches === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log --onel

Re: [Qemu-devel] [PULL v2 00/20] Misc patches for 2017-05-19

2017-05-26 Thread Vladimir Sementsov-Ogievskiy
Hi! What about this? Looks incomplete, only two patches here... 24.05.2017 19:11, Paolo Bonzini wrote: The following changes since commit 56821559f0ba682fe6b367815572e6f974d329ab: Merge remote-tracking branch 'dgilbert/tags/pull-hmp-20170517' into staging (2017-05-18 13:36:15 +0100) are a

Re: [Qemu-devel] [PATCH v1 01/13] qcow2: alloc space for COW in one chunk

2017-05-26 Thread Denis V. Lunev
On 05/26/2017 11:11 AM, Kevin Wolf wrote: > Am 19.05.2017 um 11:34 hat Anton Nefedov geschrieben: >> From: "Denis V. Lunev" >> >> Currently each single write operation can result in 3 write operations >> if guest offsets are not cluster aligned. One write is performed for the >> real payload and t

Re: [Qemu-devel] [PULL v2 00/20] Misc patches for 2017-05-19

2017-05-26 Thread Alex Bennée
Vladimir Sementsov-Ogievskiy writes: > Hi! > > What about this? Looks incomplete, only two patches here... A pull request is merged from a git tree - the patches on the list are informational only. If you need to re-issue a pull request it is acceptable to post it with just the tweaked patches

Re: [Qemu-devel] [PATCH 3/7] qcow2: Make perform_cow() call do_perform_cow() twice

2017-05-26 Thread Alberto Garcia
On Fri 26 May 2017 10:11:29 AM CEST, Kevin Wolf wrote: >> --- a/block/qcow2-cluster.c >> +++ b/block/qcow2-cluster.c >> @@ -414,6 +414,10 @@ static int coroutine_fn do_perform_cow(BlockDriverState >> *bs, >> struct iovec iov; >> int ret; >> >> +if (bytes == 0) { >> +return

[Qemu-devel] [PATCH 0/3] arm/virt: refine virt.c code and implement hot_add_cpu interface

2017-05-26 Thread Li Zhang
From: Li Zhang virt machine doesn't support hot_add_cpu interface. This patchset is to implement hot_add_cpu interface. A CPU can be added by QMP command with QEMU monitor. Here is command to add a CPU with QMP command. * qemu-system-aarch64 -machine virt -cpu cortex-a15 -smp 1,maxcpus=4 \

[Qemu-devel] [PATCH 2/3] arm/virt: Refine code of machvirt_init

2017-05-26 Thread Li Zhang
From: Li Zhang This patch is to refine cpu related in machvirt_init and add virt_new_cpu function which can be called by hot_add_cpu. Signed-off-by: Li Zhang --- hw/arm/virt.c | 231 -- 1 file changed, 128 insertions(+), 103 deletions(-)

[Qemu-devel] [PATCH 1/3] arm/virt: Refine fdt_add_cpu_nodes code

2017-05-26 Thread Li Zhang
From: Li Zhang Refind fdt_add_cpu_nodes code and add a new function fdt_add_cpu_node, which can be called by hot_add_cpu function. Signed-off-by: Li Zhang --- hw/arm/virt.c | 106 +- 1 file changed, 61 insertions(+), 45 deletions(-) diff

[Qemu-devel] [PATCH 3/3] arm/virt: Implement hot_add_cpu interface

2017-05-26 Thread Li Zhang
From: Li Zhang This patch is to add add_hot_cpu interface. Signed-off-by: Li Zhang --- hw/arm/virt.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 31314c1..c7e8322 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -527,6 +527,24 @@

Re: [Qemu-devel] [PATCH] scsi/lsi53c895a: Remove unused lsi_mem_*() return value

2017-05-26 Thread Paolo Bonzini
On 26/05/2017 03:46, Mao Zhongyi wrote: > lsi_mem_read/write() always return 0 about which their > callers actually don't care. Change the function type > to void. > > Signed-off-by: Mao Zhongyi > --- > hw/scsi/lsi53c895a.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) >

Re: [Qemu-devel] [PATCH v4] sockets: improve error reporting if UNIX socket path is too long

2017-05-26 Thread Paolo Bonzini
On 25/05/2017 17:53, Daniel P. Berrange wrote: > The 'struct sockaddr_un' only allows 108 bytes for the socket > path. > > If the user supplies a path, QEMU uses snprintf() to silently > truncate it when too long. This is undesirable because the user > will then be unable to connect to the path

[Qemu-devel] [PATCH] io: simplify qio_channel_attach_aio_context

2017-05-26 Thread Paolo Bonzini
If properly preceded by qio_channel_detach_aio_context, this function really has nothing to do except setting ioc->ctx. Signed-off-by: Paolo Bonzini --- io/channel.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/io/channel.c b/io/channel.c index cdf74540c1..1cfb8

Re: [Qemu-devel] [PATCH v2] target/s390x/cpu_models: Allow some additional feature bits for the "qemu" CPU

2017-05-26 Thread Aurelien Jarno
On 2017-05-25 11:22, Thomas Huth wrote: > Currently we only present the plain z900 feature bits to the guest, > but QEMU already emulates some additional features (but not all of > the next CPU generation, so we can not use the next CPU level as > default yet). Since newer Linux kernels are checkin

Re: [Qemu-devel] [PATCH] pci: Set err to errp directly rather than through error_porpagate()

2017-05-26 Thread Igor Mammedov
On Fri, 26 May 2017 16:29:25 +0800 Mao Zhongyi wrote: > ioh3420_interrupts_init() and its callers, rp_realize() and > pci_qdev_realize() fill error message to local_err, then > propagate it to errp by error_porpagate(), which's not necessary. > So eliminate it and pass errp directly instead of lo

Re: [Qemu-devel] [PATCH] io: simplify qio_channel_attach_aio_context

2017-05-26 Thread Daniel P. Berrange
On Fri, May 26, 2017 at 11:36:41AM +0200, Paolo Bonzini wrote: > If properly preceded by qio_channel_detach_aio_context, this function really > has nothing to do except setting ioc->ctx. > > Signed-off-by: Paolo Bonzini > --- > io/channel.c | 10 ++ > 1 file changed, 2 insertions(+), 8 d

[Qemu-devel] [RFC] Is it useful to create a seperate address space for cpu-memory on x86 platform?

2017-05-26 Thread Gonglei (Arei)
Hi all, I found that the memory consumption increase about 5M since below commit on Qemu process. commit 6731d864f80938e404dc3e5eb7f6b76b891e3e43 Author: Peter Crosthwaite Date: Thu Jan 21 14:15:06 2016 + qom/cpu: Add MemoryRegion property Add a MemoryRegion property, which

Re: [Qemu-devel] [PATCH 3/7] qcow2: Make perform_cow() call do_perform_cow() twice

2017-05-26 Thread Kevin Wolf
Am 26.05.2017 um 11:10 hat Alberto Garcia geschrieben: > On Fri 26 May 2017 10:11:29 AM CEST, Kevin Wolf wrote: > >> --- a/block/qcow2-cluster.c > >> +++ b/block/qcow2-cluster.c > >> @@ -414,6 +414,10 @@ static int coroutine_fn > >> do_perform_cow(BlockDriverState *bs, > >> struct iovec iov;

Re: [Qemu-devel] [PATCH v1 01/13] qcow2: alloc space for COW in one chunk

2017-05-26 Thread Anton Nefedov
On 05/26/2017 11:57 AM, Denis V. Lunev wrote: On 05/26/2017 11:11 AM, Kevin Wolf wrote: Am 19.05.2017 um 11:34 hat Anton Nefedov geschrieben: From: "Denis V. Lunev" Currently each single write operation can result in 3 write operations if guest offsets are not cluster aligned. One write is

Re: [Qemu-devel] [PATCH 7/7] qcow2: Merge the writing of the COW regions with the guest data

2017-05-26 Thread Kevin Wolf
Am 24.05.2017 um 21:05 hat Alberto Garcia geschrieben: > On Wed 24 May 2017 06:43:31 PM CEST, Anton Nefedov wrote: > >> +if (m->data_qiov) { > >> +qemu_iovec_reset(&qiov); > >> +qemu_iovec_add(&qiov, start_buffer, start->nb_bytes); > >> +qemu_iovec_concat(&qiov, m->data_

[Qemu-devel] [PATCH] qemu-ga: remove useless allocation

2017-05-26 Thread Marc-André Lureau
There is no need to duplicate a fixed string. CC: qemu-triv...@nongnu.org Signed-off-by: Marc-André Lureau --- qga/commands-posix.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 284ecc6d7e..d8e412275e 100644 --- a/qga/com

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-26 Thread Kevin Wolf
Am 24.05.2017 um 18:09 hat Anton Nefedov geschrieben: > I agree; as mentioned we have similar patches and they don't conflict much. > We noticed a performance regression on HDD though, for the > presumably optimized case (random 4k write over a large backed > image); so the patches were put on hold

Re: [Qemu-devel] [PATCH 0/4] qapi: Handle some keyval fallout

2017-05-26 Thread Marc-André Lureau
On Mon, May 22, 2017 at 8:45 PM Markus Armbruster wrote: > Markus Armbruster (4): > qobject-input-visitor: Reject non-finite numbers with keyval > qapi: Document visit_type_any() issues with keyval input > tests/qapi-schema: Avoid 'str' in alternate test cases > qapi: Reject alternates th

Re: [Qemu-devel] [PATCH v1 01/13] qcow2: alloc space for COW in one chunk

2017-05-26 Thread Denis V. Lunev
On 05/26/2017 11:11 AM, Kevin Wolf wrote: > > No. This is what you bypass: some analysis for the record. > * All sanity checks that the block layer does > > * bdrv_inc/dec_in_flight(), which is required for drain to work > correctly. Not doing this will cause crashes. Should not be a problem. W

Re: [Qemu-devel] [PATCH v5 4/5] slirp: fix leak

2017-05-26 Thread Marc-André Lureau
On Sat, May 6, 2017 at 3:56 AM Samuel Thibault wrote: > Applied to my tree, thanks! > > still not in tree, please remove the unnecessary 'if' before merging thanks! -- Marc-André Lureau

Re: [Qemu-devel] [PATCH] qtest: add rtc periodic timer test

2017-05-26 Thread Paolo Bonzini
On 26/05/2017 05:21, Xiao Guangrong wrote: > On 05/26/2017 12:03 AM, Paolo Bonzini wrote: >> On 25/05/2017 05:19, guangrong.x...@gmail.com wrote: >> I'm not sure I understand. Why would clock_step(1000) not be a good >> replacement for nsleep(1000)? > > We can not. As we use the real time to co

Re: [Qemu-devel] [PATCH v5 5/5] dump: fix memory_mapping_filter leak

2017-05-26 Thread Marc-André Lureau
Hi On Thu, May 4, 2017 at 2:42 AM Marc-André Lureau < marcandre.lur...@redhat.com> wrote: > Spotted by ASAN. > > Signed-off-by: Marc-André Lureau > --- > memory_mapping.c | 1 + > No maintainer for this file, Wen, Paolo? > 1 file changed, 1 insertion(+) > > diff --git a/memory_mapping.c b/m

[Qemu-devel] [PATCH] numa-test: fix query-cpus leaks

2017-05-26 Thread Marc-André Lureau
Fix test leaks introduced in commit 2941020a476. (and small extra space removed) Spotted by ASAN. Signed-off-by: Marc-André Lureau --- tests/numa-test.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/numa-test.c b/tests/numa-test.c index c3475d6d5e..3f

Re: [Qemu-devel] [RFC] Is it useful to create a seperate address space for cpu-memory on x86 platform?

2017-05-26 Thread Paolo Bonzini
On 26/05/2017 11:59, Gonglei (Arei) wrote: > The result before this commit: > > linux-arei:/mnt/sdb/gonglei/opensource/qemu # ps aux|grep qemu > root 12658 17.2 0.0 375996 21412 pts/1Sl+ 12:53 0:00 > ./x86_64-softmmu/qemu-system-x86_64 -machine pc-i440fx-2.5,accel=kvm,usb=off > -no

[Qemu-devel] [PATCH v2] nbd/client.c: use errp instead of LOG

2017-05-26 Thread Vladimir Sementsov-Ogievskiy
Move to modern errp scheme from just LOGging errors. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Fixes: - local_err initialized to NULL - 083 iotest ajusted \I feel like an idiot... block/nbd-client.c | 7 ++- include/block/nbd.h| 5 +++-- nbd/client.c

Re: [Qemu-devel] [PATCH] pci: Set err to errp directly rather than through error_porpagate()

2017-05-26 Thread Mao Zhongyi
Hi, Markus On 05/26/2017 05:43 PM, Igor Mammedov wrote: On Fri, 26 May 2017 16:29:25 +0800 Mao Zhongyi wrote: ioh3420_interrupts_init() and its callers, rp_realize() and pci_qdev_realize() fill error message to local_err, then propagate it to errp by error_porpagate(), which's not necessary.

Re: [Qemu-devel] [PATCH v1 01/13] qcow2: alloc space for COW in one chunk

2017-05-26 Thread Kevin Wolf
Am 26.05.2017 um 10:57 hat Denis V. Lunev geschrieben: > On 05/26/2017 11:11 AM, Kevin Wolf wrote: > > It seems much clearer to me that simply unifying the three write > > requests into a single one is an improvement. And it's easy to do, I > > even had a patch once to do this. The reason that I di

Re: [Qemu-devel] [PATCH 0/3] arm/virt: refine virt.c code and implement hot_add_cpu interface

2017-05-26 Thread Igor Mammedov
On Fri, 26 May 2017 17:21:05 +0800 Li Zhang wrote: > From: Li Zhang > > virt machine doesn't support hot_add_cpu interface. This patchset is to > implement > hot_add_cpu interface. A CPU can be added by QMP command with QEMU monitor. > > Here is command to add a CPU with QMP command. > > * q

[Qemu-devel] [PATCH V2 3/3] COLO-compare: Add remote initialization and checkpoint notification

2017-05-26 Thread Zhang Chen
Initialize remote communication socket and make a handshack with remote colo-frame. Then use this way to notify remote colo-frame do checkpoint. Signed-off-by: Zhang Chen --- net/colo-compare.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH V2 2/3] COLO-compare: Add remote checkpoint notify chardev socket handler frame

2017-05-26 Thread Zhang Chen
Add chardev handler to get remote colo-frame's notify, Xen colo is the first user. Signed-off-by: Zhang Chen --- net/colo-compare.c | 41 ++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 6f8c43

[Qemu-devel] [PATCH V2 0/3] COLO-compare: Make COLO-compare support remote COLO-frame

2017-05-26 Thread Zhang Chen
This series focus on COLO-proxy remote colo-frame support. Xen COLO-frame is the first user. We add a new chardev socket in colo-compare as the way of communicate with remote COLO-frame. And remote COLO-frame notify colo-proxy part depend on this serise: https://lists.nongnu.org/archive/html/qemu-d

[Qemu-devel] [PATCH V2 1/3] COLO-compare: Add new parameter for communicate with remote colo-frame

2017-05-26 Thread Zhang Chen
We add the "notify_dev=chardevID" parameter. colo-compare can connect with remote colo-frame through chardev socket, Xen colo-frame is the first user. We can notify colo-frame do checkpoint events. Signed-off-by: Zhang Chen --- net/colo-compare.c | 20 qemu-options.hx| 4

Re: [Qemu-devel] [PULL v2 00/20] Misc patches for 2017-05-19

2017-05-26 Thread Paolo Bonzini
On 24/05/2017 18:11, Paolo Bonzini wrote: > The following changes since commit 56821559f0ba682fe6b367815572e6f974d329ab: > > Merge remote-tracking branch 'dgilbert/tags/pull-hmp-20170517' into staging > (2017-05-18 13:36:15 +0100) > > are available in the git repository at: > > git://github

Re: [Qemu-devel] [PATCH v1 01/13] qcow2: alloc space for COW in one chunk

2017-05-26 Thread Kevin Wolf
Am 26.05.2017 um 12:57 hat Denis V. Lunev geschrieben: > On 05/26/2017 11:11 AM, Kevin Wolf wrote: > > > > No. This is what you bypass: > some analysis for the record. > [...] > anyway, this is a good list of things to take into account > within bdrv_allocate. But it is important, that from the >

Re: [Qemu-devel] [Qemu-block] Behavior of QMP "query-block"

2017-05-26 Thread Kevin Wolf
Am 25.05.2017 um 20:44 hat Bruno Alvisio geschrieben: > Hello John, > > Thanks. Yes, typo when I wrote the e-mail. > > It might be possible that XEN does that (I will ask in the XEN forum). > However, > I have noticed that it is not the case for all of the VMs I have launched. In > some of them

Re: [Qemu-devel] [PATCH 07/13] chardev: serial & parallel declaration to own headers

2017-05-26 Thread Marc-André Lureau
Hi On Tue, May 9, 2017 at 3:49 PM Paolo Bonzini wrote: > > > On 09/05/2017 13:33, Marc-André Lureau wrote: > > Signed-off-by: Marc-André Lureau > > --- > > include/chardev/char-parallel.h | 20 +++- > > include/chardev/char-serial.h | 22 ++ > > include/ch

[Qemu-devel] [PATCH v2] pci: Set err to errp directly rather than through error_porpagate()

2017-05-26 Thread Mao Zhongyi
ioh3420_interrupts_init() and its callers rp_realize() fill error message to local_err, then propagate it to errp by error_porpagate(), which's not necessary. So eliminate it and pass errp directly instead of local_err. Of course, error_propagate() also has been removed. Signed-off-by: Mao Zhongyi

Re: [Qemu-devel] [PATCH v7 09/20] qcow: convert QCow to use QCryptoBlock for encryption

2017-05-26 Thread Alberto Garcia
On Thu 25 May 2017 06:38:40 PM CEST, Daniel P. Berrange wrote: > @@ -105,6 +116,13 @@ static int qcow_open(BlockDriverState *bs, QDict > *options, int flags, > int ret; > QCowHeader header; > Error *local_err = NULL; > +QCryptoBlockOpenOptions *crypto_opts = NULL; > +unsigne

Re: [Qemu-devel] [PATCH V2 0/3] COLO-compare: Make COLO-compare support remote COLO-frame

2017-05-26 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 1495797727-16695-1-git-send-email-zhangchen.f...@cn.fujitsu.com Subject: [Qemu-devel] [PATCH V2 0/3] COLO-compare: Make COLO-compare support remote COLO-frame === TEST SCRIP

Re: [Qemu-devel] [PATCH v7 11/20] qcow2: convert QCow2 to use QCryptoBlock for encryption

2017-05-26 Thread Alberto Garcia
On Thu 25 May 2017 06:38:42 PM CEST, Daniel P. Berrange wrote: > This converts the qcow2 driver to make use of the QCryptoBlock > APIs for encrypting image content, using the legacy QCow2 AES > scheme. > > With this change it is now required to use the QCryptoSecret > object for providing passwords

Re: [Qemu-devel] [PATCH v2] target/s390x/cpu_models: Allow some additional feature bits for the "qemu" CPU

2017-05-26 Thread David Hildenbrand
On 25.05.2017 11:22, Thomas Huth wrote: > Currently we only present the plain z900 feature bits to the guest, > but QEMU already emulates some additional features (but not all of > the next CPU generation, so we can not use the next CPU level as > default yet). Since newer Linux kernels are checkin

[Qemu-devel] [PATCH] pci-bridge/i82801b11: Convert to realize

2017-05-26 Thread Mao Zhongyi
The pci-birdge device i82801b11 still implements the old PCIDeviceClass .init() through i82801b11_bridge_init() instead of the new .realize(). All devices need to be converted to .realize(). So convert it and rename it to i82801b11_bridge_realize(). Signed-off-by: Mao Zhongyi --- hw/pci-bridge/i

Re: [Qemu-devel] [PATCH 08/13] be-hci: use backend functions

2017-05-26 Thread Marc-André Lureau
On Tue, May 9, 2017 at 3:42 PM Marc-André Lureau < marcandre.lur...@redhat.com> wrote: > Avoid accessing CharBackend directly, use qemu_chr_be_* methods instead. > > be->chr_read should exists if qemu_chr_be_can_write() is true. > > (use qemu_chr_be_write(), _impl() bypasses replay) > > Signed-off

[Qemu-devel] [PATCH v2] kvmclock: update system_time_msr address forcibly

2017-05-26 Thread Denis Plotnikov
Do an update of system_time_msr address every time before reading the value of tsc_timestamp from guest's kvmclock page. There is no other code paths which ensure that qemu has an up-to-date value of system_time_msr. So, force this update on guest's tsc_timestamp reading. This bug causes effect o

Re: [Qemu-devel] [PATCH v2] kvmclock: update system_time_msr address forcibly

2017-05-26 Thread Roman Kagan
On Fri, May 26, 2017 at 03:25:22PM +0300, Denis Plotnikov wrote: > Do an update of system_time_msr address every time before reading > the value of tsc_timestamp from guest's kvmclock page. > > There is no other code paths which ensure that qemu has an up-to-date > value of system_time_msr. So, fo

Re: [Qemu-devel] [PATCH 09/13] char: generalize qemu_chr_write_all()

2017-05-26 Thread Marc-André Lureau
Hi On Tue, May 9, 2017 at 4:59 PM Philippe Mathieu-Daudé wrote: > Hi Marc-André, > > On 05/09/2017 08:33 AM, Marc-André Lureau wrote: > > qemu_chr_fe_write() is similar to qemu_chr_write_all(): the later write > > all with a chardev backend. > > > > Make qemu_chr_write() and qemu_chr_fe_write_bu

Re: [Qemu-devel] [PATCH v2] kvmclock: update system_time_msr address forcibly

2017-05-26 Thread no-reply
Hi, This 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. Message-id: 1495801522-27628-1-git-send-email-dplotni...@virtuozzo.com Subject: [Qemu-devel] [PATCH v2] kvmclock: update syste

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-26 Thread Anton Nefedov
On 05/26/2017 01:17 PM, Kevin Wolf wrote: Am 24.05.2017 um 18:09 hat Anton Nefedov geschrieben: I agree; as mentioned we have similar patches and they don't conflict much. We noticed a performance regression on HDD though, for the presumably optimized case (random 4k write over a large backed i

Re: [Qemu-devel] [PATCH 03/12] migration: Switch to using announcement timer

2017-05-26 Thread Vlad Yasevich
On 05/26/2017 12:16 AM, Jason Wang wrote: > > > On 2017年05月25日 02:05, Vladislav Yasevich wrote: >> Switch qemu_announce_self and virtio annoucements to use >> the announcement timer framework. This makes sure that both >> timers use the same timeouts and number of annoucement attempts >> >> Base

Re: [Qemu-devel] [PATCH 01/12] migration: Introduce announce parameters

2017-05-26 Thread Vlad Yasevich
On 05/26/2017 12:03 AM, Jason Wang wrote: > > On 2017年05月25日 02:05, Vladislav Yasevich wrote: >> Add parameters that control RARP/GARP announcement timeouts. >> The parameters structure is added to the QAPI and a qmp command >> is added to set/get the parameter data. >> >> Based on work by "Dr. Da

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-26 Thread Alberto Garcia
On Fri 26 May 2017 02:47:55 PM CEST, Anton Nefedov wrote: > Tried the another machine; about 10% improvement here [...] > [root@localhost ~]# fio --name=randwrite --blocksize=4k > --filename=/dev/sdb --rw=randwrite --direct=1 --ioengine=libaio > --size=2g --io_size=32m In my tests I sometimes de

Re: [Qemu-devel] [PATCH 01/12] migration: Introduce announce parameters

2017-05-26 Thread Eric Blake
On 05/24/2017 01:05 PM, Vladislav Yasevich wrote: > Add parameters that control RARP/GARP announcement timeouts. > The parameters structure is added to the QAPI and a qmp command > is added to set/get the parameter data. > > Based on work by "Dr. David Alan Gilbert" > > Signed-off-by: Vladislav

Re: [Qemu-devel] [PATCH 06/12] qmp: Expose qemu_announce_self as a qmp command

2017-05-26 Thread Eric Blake
On 05/24/2017 01:05 PM, Vladislav Yasevich wrote: > Add a qmp command that can trigger guest announcements. > > Based on work of Germano Veit Michel > > Signed-off-by: Vladislav Yasevich > --- > migration/savevm.c | 14 ++ > qapi-schema.json | 19 +++ > 2 files ch

Re: [Qemu-devel] [PATCH 01/12] migration: Introduce announce parameters

2017-05-26 Thread Vlad Yasevich
On 05/26/2017 09:08 AM, Eric Blake wrote: > On 05/24/2017 01:05 PM, Vladislav Yasevich wrote: >> Add parameters that control RARP/GARP announcement timeouts. >> The parameters structure is added to the QAPI and a qmp command >> is added to set/get the parameter data. >> >> Based on work by "Dr. Dav

Re: [Qemu-devel] [PATCH 06/12] qmp: Expose qemu_announce_self as a qmp command

2017-05-26 Thread Vlad Yasevich
On 05/26/2017 09:16 AM, Eric Blake wrote: > On 05/24/2017 01:05 PM, Vladislav Yasevich wrote: >> Add a qmp command that can trigger guest announcements. >> >> Based on work of Germano Veit Michel >> >> Signed-off-by: Vladislav Yasevich >> --- >> migration/savevm.c | 14 ++ >> qapi-sc

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-26 Thread Anton Nefedov
On 05/26/2017 04:08 PM, Alberto Garcia wrote: On Fri 26 May 2017 02:47:55 PM CEST, Anton Nefedov wrote: Tried the another machine; about 10% improvement here [...] [root@localhost ~]# fio --name=randwrite --blocksize=4k --filename=/dev/sdb --rw=randwrite --direct=1 --ioengine=libaio --size=

Re: [Qemu-devel] [PATCH v2] pci: Set err to errp directly rather than through error_porpagate()

2017-05-26 Thread Eric Blake
On 05/26/2017 06:58 AM, Mao Zhongyi wrote: In the subject: s/porpagate/propagate/ > ioh3420_interrupts_init() and its callers rp_realize() fill error > message to local_err, then propagate it to errp by error_porpagate(), and again > which's not necessary. So eliminate it and pass errp directly

Re: [Qemu-devel] [PATCH] numa-test: fix query-cpus leaks

2017-05-26 Thread Eric Blake
On 05/26/2017 06:04 AM, Marc-André Lureau wrote: > Fix test leaks introduced in commit 2941020a476. > > (and small extra space removed) > > Spotted by ASAN. > > Signed-off-by: Marc-André Lureau > --- > tests/numa-test.c | 14 +- > 1 file changed, 9 insertions(+), 5 deletions(-) Re

Re: [Qemu-devel] [PATCH 11/13] Remove/replace chardev/char.h inclusion

2017-05-26 Thread Marc-André Lureau
On Tue, May 9, 2017 at 4:46 PM Philippe Mathieu-Daudé wrote: > Hi Marc-André Lureau, > > Isn't clearer if the "remove" part of this commit goes before your patch > 6 "move headers to include/chardev"? > make sense, reordered thanks > > On 05/09/2017 08:33 AM, Marc-André Lureau wrote: > > Thos

Re: [Qemu-devel] [PATCH 0/7] qcow2: Reduce the number of I/O ops when doing COW

2017-05-26 Thread Alberto Garcia
On Fri 26 May 2017 03:32:49 PM CEST, Anton Nefedov wrote: >>> [root@localhost ~]# fio --name=randwrite --blocksize=4k >>> --filename=/dev/sdb --rw=randwrite --direct=1 --ioengine=libaio >>> --size=2g --io_size=32m >> >> In my tests I sometimes detected slight performance decreases in that >> HDD s

Re: [Qemu-devel] [PATCH] qemu-ga: remove useless allocation

2017-05-26 Thread Eric Blake
On 05/26/2017 05:13 AM, Marc-André Lureau wrote: > There is no need to duplicate a fixed string. > > CC: qemu-triv...@nongnu.org > Signed-off-by: Marc-André Lureau > --- > qga/commands-posix.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > Reviewed-by: Eric Blake -- Eric Blake

Re: [Qemu-devel] [PATCH 03/26] target/s390x: implement TEST AND SET

2017-05-26 Thread Richard Henderson
On 05/25/2017 02:04 PM, Aurelien Jarno wrote: +TCGv_i32 t1 = tcg_const_i32(0xff); +tcg_gen_atomic_fetch_or_i32(t1, o->in2, t1, get_mem_index(s), MO_UB); Better as tcg_gen_atomic_xchg_i32. r~

Re: [Qemu-devel] [PATCH v2] nbd/client.c: use errp instead of LOG

2017-05-26 Thread Eric Blake
On 05/26/2017 06:09 AM, Vladimir Sementsov-Ogievskiy wrote: > Move to modern errp scheme from just LOGging errors. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > > Fixes: > > - local_err initialized to NULL > - 083 iotest ajusted > > \I feel like an idiot... > We all have days like

Re: [Qemu-devel] [PATCH 04/26] target/s390x: implement TEST ADDRESSING MODE

2017-05-26 Thread Richard Henderson
On 05/25/2017 02:04 PM, Aurelien Jarno wrote: +tcg_gen_movi_i32(cc_op, cc); +set_cc_static(s); gen_op_movi_cc r~

Re: [Qemu-devel] [PATCH 01/26] target/s390x: remove dead code in translate.c

2017-05-26 Thread Richard Henderson
On 05/25/2017 02:04 PM, Aurelien Jarno wrote: Signed-off-by: Aurelien Jarno --- target/s390x/translate.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 02/26] target/s390x: make IPTE SMP aware

2017-05-26 Thread Richard Henderson
On 05/25/2017 02:04 PM, Aurelien Jarno wrote: /* XXX we exploit the fact that Linux passes the exact virtual address here - it's not obliged to! */ -tlb_flush_page(cs, page); +tlb_flush_page_all_cpus_synced(cs, page); /* XXX 31-bit hack */ if (page & 0x8

Re: [Qemu-devel] [PATCH v7 09/20] qcow: convert QCow to use QCryptoBlock for encryption

2017-05-26 Thread Daniel P. Berrange
On Fri, May 26, 2017 at 02:03:40PM +0200, Alberto Garcia wrote: > On Thu 25 May 2017 06:38:40 PM CEST, Daniel P. Berrange wrote: > > @@ -105,6 +116,13 @@ static int qcow_open(BlockDriverState *bs, QDict > > *options, int flags, > > int ret; > > QCowHeader header; > > Error *local_er

Re: [Qemu-devel] [PATCH v2] pci: Set err to errp directly rather than through error_porpagate()

2017-05-26 Thread Marcel Apfelbaum
On 26/05/2017 14:58, Mao Zhongyi wrote: ioh3420_interrupts_init() and its callers rp_realize() fill error message to local_err, then propagate it to errp by error_porpagate(), which's not necessary. So eliminate it and pass errp directly instead of local_err. Of course, error_propagate() also h

  1   2   3   >