[Qemu-devel] [PATCH 0/3] armv7-m exit, exception fixes and add MPU

2015-10-09 Thread Michael Davidsaver
Please be aware that this work is based on my reading of ARM documentation, and hasn't yet been cross-checked with real hardware. Patch #1 is (I think) fairly straightforward. I'd like to get some comments on patches #2 and #3, which I don't consider ready for merge. The first patch was previ

Re: [Qemu-devel] [PATCH 2/2] kvm/x86: Hyper-V kvm exit

2015-10-09 Thread Paolo Bonzini
On 09/10/2015 15:39, Denis V. Lunev wrote: > From: Andrey Smetanin > > A new vcpu exit is introduced to notify the userspace of the > changes in Hyper-V synic configuraion triggered by guest writing to the > corresponding MSRs. > > Signed-off-by: Andrey Smetanin > Reviewed-by: Roman Kagan >

Re: [Qemu-devel] [PATCH v2 13/16] block: Implement bdrv_append() without bdrv_swap()

2015-10-09 Thread Stefan Hajnoczi
On Thu, Oct 01, 2015 at 03:13:31PM +0200, Kevin Wolf wrote: > +static void change_parent_backing_link(BlockDriverState *from, > + BlockDriverState *to) > +{ > +BdrvChild *c, *next; > + > +QLIST_FOREACH_SAFE(c, &from->parents, next_parent, next) { I fin

Re: [Qemu-devel] [Qemu-block] [PATCH v5 3/4] qmp: add monitor command to add/remove a child

2015-10-09 Thread Max Reitz
On 08.10.2015 10:29, Alberto Garcia wrote: > On Thu 08 Oct 2015 08:15:25 AM CEST, Markus Armbruster wrote: >>> For the second point, you should also consider how useful this >>> feature is to management tools. Just being able to remove and attach >>> children from a quorum node seems very useful on

[Qemu-devel] [PATCH v8 16/27] net: add trace_vhost_user_event

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau Replace error_report() and use tracing instead. It's not an error to get a connection or a disconnection, so silence this and trace it instead. Signed-off-by: Marc-André Lureau --- net/vhost-user.c | 4 ++-- trace-events | 3 +++ 2 files changed, 5 insertions(+), 2

[Qemu-devel] [PULL 05/20] qapi: Improve 'include' error message

2015-10-09 Thread Markus Armbruster
From: Eric Blake Use of '"...%s" % include' to print non-strings can lead to ugly messages, such as this (if the .json change is applied without the qapi.py change): Expected a file name (string), got: OrderedDict() Better is to just omit the actual non-string value in the message. Signed-off-

[Qemu-devel] [PATCH v2 3/4] tests/i44fx-test: No need for zeroing memory before memset

2015-10-09 Thread Thomas Huth
Change a g_malloc0 into g_malloc since the following memset fills the whole buffer anyway. Signed-off-by: Thomas Huth Reviewed-by: Laszlo Ersek --- tests/i440fx-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c index d0bc8de..7f

Re: [Qemu-devel] [Qemu-block] [PATCH v5 3/4] qmp: add monitor command to add/remove a child

2015-10-09 Thread Dr. David Alan Gilbert
* Max Reitz (mre...@redhat.com) wrote: > On 08.10.2015 08:15, Markus Armbruster wrote: > > Max Reitz writes: > > > >> On 22.09.2015 09:44, Wen Congyang wrote: > >>> The new QMP command name is x-blockdev-child-add, and > >>> x-blockdev-child-del. > >>> It justs for adding/removing quorum's child

[Qemu-devel] [PATCH v8 26/27] vhost-user-test: check ownership during migration

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau Check that backend source and destination do not have simultaneous ownership during migration. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/tests/vhost-user-test.

[Qemu-devel] [PULL 18/20] qapi: Share gen_err_check()

2015-10-09 Thread Markus Armbruster
From: Eric Blake qapi-commands has a nice helper gen_err_check(), but did not use it everywhere. In fact, using it in more places makes it easier to reduce the lines of code used for generating error checks. This in turn will make it easier for later patches to consolidate another common pattern

Re: [Qemu-devel] [PATCH 2/2] hw/arm/virt: don't use a15memmap directly

2015-10-09 Thread Peter Maydell
On 6 October 2015 at 15:37, Andrew Jones wrote: > We should always go through VirtBoardInfo when we need the memmap. > To avoid using a15memmap directly, in this case, we need to defer > the max-cpus check from class init time to instance init time. In > class init we now use MAX_CPUMASK_BITS for

Re: [Qemu-devel] [PATCH v2 2/2] target-arm: Fix CPU breakpoint handling

2015-10-09 Thread Sergey Fedorov
On 09.10.2015 17:04, Peter Maydell wrote: > On 9 October 2015 at 14:59, Sergey Fedorov wrote: >> On 08.10.2015 21:40, Peter Maydell wrote: >>> Annoying corner case which I don't think we need to handle necessarily: >>> if you set a breakpoint on a 32-bit Thumb instruction which spans a page >>> bo

[Qemu-devel] [PATCH v2 0/4] Small optimizations for code using g_malloc0 + memset/memcpy

2015-10-09 Thread Thomas Huth
There are a couple of spots in the QEMU code which use g_malloc0, directly followed by a memset or memcpy which fill the whole allocated buffer. In this case it either does not make sense to zero the buffer via g_malloc0 first (so g_malloc should be used instead), or if the second command is a mems

[Qemu-devel] [PATCH v8 01/27] exec: factor out duplicate mmap code

2015-10-09 Thread marcandre . lureau
From: "Michael S. Tsirkin" Anonymous and file-backed RAM allocation are now almost exactly the same. Reduce code duplication by moving RAM mmap code out of oslib-posix.c and exec.c. Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini Acked-by: Paolo Bonzini --- exec.c

[Qemu-devel] [PULL 14/20] qapi: Consistent generated code: prefer visitor 'v'

2015-10-09 Thread Markus Armbruster
From: Eric Blake We had some pointless differences in the generated code for visit, command marshalling, and events; unifying them makes it easier for future patches to consolidate to common helper functions. This is one patch of a series to clean up these differences. This patch names the local

[Qemu-devel] [PATCH v8 06/27] util: add memfd helpers

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau Add qemu_memfd_alloc/free() helpers. The function helps to allocate and seal shared memory. Signed-off-by: Marc-André Lureau --- include/qemu/memfd.h | 4 +++ util/memfd.c | 72 +++- 2 files changed, 75 insertion

[Qemu-devel] [PATCH v2 4/4] linux-user/syscall: Replace g_malloc0 + memcpy with g_memdup

2015-10-09 Thread Thomas Huth
No need to use g_malloc0 to zero the memory if we memcpy to the whole buffer afterwards anyway. Actually, there is even a function which combines both steps, g_memdup, so let's use this function here instead. Signed-off-by: Thomas Huth Reviewed-by: Eric Blake --- linux-user/syscall.c | 3 +-- 1

Re: [Qemu-devel] [PULL 0/5] Block patches

2015-10-09 Thread Peter Maydell
On 9 October 2015 at 10:13, Stefan Hajnoczi wrote: > The following changes since commit 1d27b91723c252d9a97151dc1959cfd89c5816cb: > > Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20151007.0' > into staging (2015-10-08 16:50:34 +0100) > > are available in the git repository at

[Qemu-devel] [PATCH v2 2/4] hw/input/tsc210x: Remove superfluous memset

2015-10-09 Thread Thomas Huth
g_malloc0 already clears the memory, so no need for additional memsets here. And while we're at it, let's also remove the superfluous typecasts for the return values of g_malloc0 and use the type-safe g_new0 instead. Signed-off-by: Thomas Huth --- hw/input/tsc210x.c | 8 ++-- 1 file changed,

[Qemu-devel] [PATCH v8 09/27] vhost: add vhost_set_log_base op

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau Split VHOST_SET_LOG_BASE call in a seperate function callback, so that type safety works and more arguments can be added in the next patches. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-backend.c | 8 hw/virtio/vhost-user.c| 17 +++

Re: [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-09 Thread John Snow
On 10/09/2015 04:21 AM, Kevin Wolf wrote: > Am 08.10.2015 um 18:44 hat John Snow geschrieben: >> On 10/08/2015 08:06 AM, Peter Lieven wrote: >>> Hi all, >>> >>> short summary from my side. The whole thing seems to get complicated, >>> let me explain why: >>> >>> 1) During review I found that the

[Qemu-devel] [PATCH v8 03/27] linux-headers: add unistd.h

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau New syscalls are not yet widely distributed. Add them to qemu linux-headers include directory. Update based on v4.3-rc3 kernel headers. Exclude mips for now, which is more problematic due to extra header inclusion and probably unnecessary here. Signed-off-by: Marc-André

Re: [Qemu-devel] [PATCH] armv7-m: exit on external reset request

2015-10-09 Thread Peter Maydell
On 8 October 2015 at 16:40, Michael Davidsaver wrote: > Signed-off-by: Michael Davidsaver > --- > hw/intc/armv7m_nvic.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c > index 3ec8408..a671d84 100644 > --- a/hw/intc/armv

Re: [Qemu-devel] [PATCH COLO-Frame v9 05/32] migration: Integrate COLO checkpoint process into migration

2015-10-09 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > Add a migrate state: MIGRATION_STATUS_COLO, enter this migration state > after the first live migration successfully finished. > > Signed-off-by: zhanghailiang > Signed-off-by: Li Zhijian > Signed-off-by: Gonglei If I understand this co

[Qemu-devel] [PATCH v8 12/27] vhost-user: send log shm fd along with log_base

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau Send the shm for the dirty pages logging if the backend supports VHOST_USER_PROTOCOL_F_LOG_SHMFD. Wait for a reply to make sure the old log is no longer used. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-backend.c | 3 ++- hw/virtio/vhost-user.c

[Qemu-devel] [PATCH v8 18/27] vhost user: add rarp sending after live migration for legacy guest

2015-10-09 Thread marcandre . lureau
From: Thibaut Collet A new vhost user message is added to allow QEMU to ask to vhost user backend to broadcast a fake RARP after live migration for guest without GUEST_ANNOUNCE capability. This new message is sent only if the backend supports the new VHOST_USER_PROTOCOL_F_RARP protocol feature.

[Qemu-devel] [PATCH v3 03/16] blkverify: Convert s->test_file to BdrvChild

2015-10-09 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia Reviewed-by: Fam Zheng --- block/blkverify.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/block/blkverify.c b/block/blkverify.c index d277e63..6b71622

[Qemu-devel] [PATCH v8 15/27] vhost-user: document migration log

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- docs/specs/vhost-user.txt | 48 +-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 4eadad1..e0292a0 100644 --- a/d

Re: [Qemu-devel] [PATCH] armv7-m: exit on external reset request

2015-10-09 Thread Michael Davidsaver
On 10/09/2015 12:59 PM, Peter Maydell wrote: > On 8 October 2015 at 16:40, Michael Davidsaver wrote: >> ... >> case 0xd0c: /* Application Interrupt/Reset Control. */ >> if ((value >> 16) == 0x05fa) { >> +if (value & 4) { >> +qemu_system_reset_request();

[Qemu-devel] [PATCH v8 23/27] vhost-user-test: wrap server in TestServer struct

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau In the coming patches, a test will use several servers simultaneously. Wrap the server in a struct, out of the global scope. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 139 +++- 1 file changed, 89 insertion

Re: [Qemu-devel] [Qemu-block] [PATCH v5 3/4] qmp: add monitor command to add/remove a child

2015-10-09 Thread Max Reitz
On 08.10.2015 08:15, Markus Armbruster wrote: > Max Reitz writes: > >> On 22.09.2015 09:44, Wen Congyang wrote: >>> The new QMP command name is x-blockdev-child-add, and x-blockdev-child-del. >>> It justs for adding/removing quorum's child now, and don't support all >>> kinds of children, >> >> I

[Qemu-devel] [PATCH v8 20/27] vhost: add migration block if memfd failed

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c| 3 +++ include/qemu/memfd.h | 2 ++ util/memfd.c | 22 ++ 3 files changed, 27 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 1e8ee76..eaf8117 100644 --- a/h

[Qemu-devel] [PATCH v8 19/27] vhost-user: use an enum helper for features mask

2015-10-09 Thread marcandre . lureau
From: Thibaut Collet The VHOST_USER_PROTOCOL_FEATURE_MASK will be automatically updated when adding new features to the enum. Signed-off-by: Thibaut Collet [Adapted from mailing list discussion - Marc-André] Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 13 + 1 fil

Re: [Qemu-devel] [PATCH v2] migration: disallow migrate_add_blocker during migration

2015-10-09 Thread Dr. David Alan Gilbert
* John Snow (js...@redhat.com) wrote: > If a migration is already in progress and somebody attempts > to add a migration blocker, this should rightly fail. > > Add an errp parameter and a retcode return value to migrate_add_blocker. > > This is part one of two for a solution to prohibit e.g. bloc

Re: [Qemu-devel] [PAT​CH 03/17] spec: add qcow2-dirty-bitmaps specification

2015-10-09 Thread Max Reitz
On 08.10.2015 22:56, Denis V. Lunev wrote: > On 10/08/2015 11:28 PM, John Snow wrote: [...] >> That's about all of the thoughts I have on the matter currently. >> Does anybody else have strong feelings on where we should go from here? >> >> (A) Argue with Max and push for qcow2-as-container >> (B

[Qemu-devel] [PULL 10/20] qapi: Add tests for empty unions

2015-10-09 Thread Markus Armbruster
From: Eric Blake The documentation claims that alternates are useful for allowing two or more types, although nothing enforces this. Meanwhile, it is silent on whether empty unions are allowed. In practice, the generated code will compile, in part because we have a 'void *data' branch; but attemp

Re: [Qemu-devel] [PATCH 01/12] aio: Introduce "type" in aio_set_fd_handler and aio_set_event_notifier

2015-10-09 Thread Kevin Wolf
Am 09.10.2015 um 07:45 hat Fam Zheng geschrieben: > The parameter is added but not used. > > Signed-off-by: Fam Zheng > --- > aio-posix.c | 4 ++- > aio-win32.c | 2 ++ > async.c | 3 ++- > block/curl.c| 14 ++

[Qemu-devel] [PATCH v8 21/27] vhost-user-test: move wait_for_fds() out

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau This function is a precondition for most vhost-user tests. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 56df5c

[Qemu-devel] [PATCH v8 02/27] configure: probe for memfd

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau Check if memfd_create() is part of system libc. Signed-off-by: Marc-André Lureau --- configure | 19 +++ 1 file changed, 19 insertions(+) diff --git a/configure b/configure index 2d2a498..a68863c 100755 --- a/configure +++ b/configure @@ -3486,6 +3486,2

[Qemu-devel] [PATCH v8 25/27] vhost-user-test: add live-migration test

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau This test checks that the log fd is given to the migration source, and mark dirty pages during migration. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 171 +++- 1 file changed, 169 insertions(+), 2 deletions(

[Qemu-devel] [PATCH v8 27/27] seccomp: add memfd_create to whitelist

2015-10-09 Thread marcandre . lureau
From: Eduardo Otubo This is used by memfd code. Signed-off-by: Eduardo Otubo Signed-off-by: Marc-André Lureau --- qemu-seccomp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c index f9de0d3..80d034a 100644 --- a/qemu-seccomp.c +++ b/qemu-

[Qemu-devel] [PULL v3 01/12] update-linux-headers: Rename SW_MAX to SW_MAX_

2015-10-09 Thread Markus Armbruster
The next commit will compile hw/input/virtio-input.c and hw/input/virtio-input-hid.c even when CONFIG_LINUX is off. These files include both "include/standard-headers/linux/input.h" and then. Doesn't work, because both define SW_MAX. We don't actually use it. Patch input.h to define SW_MAX_ in

[Qemu-devel] [Bug 1465935] Re: kvm_irqchip_commit_routes: Assertion `ret == 0' failed

2015-10-09 Thread Stefan Bader
Utopic is out of support now. ** Changed in: qemu (Ubuntu Utopic) Status: New => Won't Fix ** Changed in: qemu (Ubuntu) Status: Incomplete => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.l

[Qemu-devel] [PATCH v8 24/27] vhost-user-test: learn to tweak various qemu arguments

2015-10-09 Thread marcandre . lureau
From: Marc-André Lureau Add a new macro to make the qemu command line with other values of memory size, and specific chardev id. Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tests/vh

[Qemu-devel] [PULL 01/11] shaders: initialize vertexes once

2015-10-09 Thread Gerd Hoffmann
Create a buffer for the vertex data and place vertexes there at initialization time. Then just use the buffer for each texture blit. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Reviewed-by: Max Reitz --- include/ui/shader.h | 4 +++- ui/console-gl.c | 7 ++- ui/shade

Re: [Qemu-devel] [PATCH 03/12] nbd: Mark fd handlers client type as "external"

2015-10-09 Thread Kevin Wolf
Am 09.10.2015 um 07:45 hat Fam Zheng geschrieben: > So we could distinguish it from internal used fds, thus avoid handling > unwanted events in nested aio polls. > > Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf

Re: [Qemu-devel] [PATCH] armv7-m: exit on external reset request

2015-10-09 Thread Michael Davidsaver
On 10/09/2015 02:18 PM, Peter Crosthwaite wrote: > On Fri, Oct 9, 2015 at 10:25 AM, Michael Davidsaver > wrote: >> >> >> On 10/09/2015 12:59 PM, Peter Maydell wrote: >>> On 8 October 2015 at 16:40, Michael Davidsaver >>> wrote: ... case 0xd0c: /* Application Interrupt/Reset Contro

Re: [Qemu-devel] [PATCH 1/5] ide/atapi: make PIO read requests async

2015-10-09 Thread Peter Lieven
Am 09.10.2015 um 10:21 schrieb Kevin Wolf: > Am 08.10.2015 um 18:44 hat John Snow geschrieben: >> On 10/08/2015 08:06 AM, Peter Lieven wrote: >>> Hi all, >>> >>> short summary from my side. The whole thing seems to get complicated, >>> let me explain why: >>> >>> 1) During review I found that the c

[Qemu-devel] [PULL 11/20] qapi: Test use of 'number' within alternates

2015-10-09 Thread Markus Armbruster
From: Eric Blake Add some testsuite exposure for use of a 'number' as part of an alternate. The current state of the tree has a few bugs exposed by this: our input parser depends on the ordering of how the qapi schema declared the alternate, and the parser does not accept integers for a 'number'

Re: [Qemu-devel] [PULL 00/48] ivshmem series

2015-10-09 Thread Paolo Bonzini
On 09/10/2015 15:02, Pavel Fedin wrote: >> It is needed for use with vhost-user. If the file descriptor you >> pass to the vhost-user server is mapped with MAP_PRIVATE, the >> vhost-user server will not get the guest's memory contents. At >> least I think so. :) > > Aha, so it actually tested o

Re: [Qemu-devel] [PATCH v2 2/2] target-arm: Fix CPU breakpoint handling

2015-10-09 Thread Peter Maydell
On 9 October 2015 at 16:55, Sergey Fedorov wrote: > Thank you for the explanation, Peter. I see, if we do insn translation > then we take the page fault instead of the CPU breakpoint. As of user > mode, can we actually set any CPU breakpoint? If not, as I guess, then > (b) is not applicable to the

Re: [Qemu-devel] [PATCH v2 2/2] target-arm: Fix CPU breakpoint handling

2015-10-09 Thread Sergey Fedorov
On 09.10.2015 17:04, Peter Maydell wrote: > On 9 October 2015 at 14:59, Sergey Fedorov wrote: >> On 08.10.2015 21:40, Peter Maydell wrote: >>> Annoying corner case which I don't think we need to handle necessarily: >>> if you set a breakpoint on a 32-bit Thumb instruction which spans a page >>> bo

Re: [Qemu-devel] [PATCH v2 2/2] target-arm: Fix CPU breakpoint handling

2015-10-09 Thread Peter Maydell
On 9 October 2015 at 14:59, Sergey Fedorov wrote: > On 08.10.2015 21:40, Peter Maydell wrote: >> Annoying corner case which I don't think we need to handle necessarily: >> if you set a breakpoint on a 32-bit Thumb instruction which spans a page >> boundary, and the second page is not present, we w

[Qemu-devel] [PATCH 2/3] armv7-m: fix non-IRQ exceptions

2015-10-09 Thread Michael Davidsaver
Handlers will not be entered unless v7m.exception is updated. For example, an invalid instruction won't invoke UsageError, but rather re-executes the invalid instruction forever. Add warn and fix of mis-aligned handlers. Ensure exception return "addresses" always fault, and trap them just before

Re: [Qemu-devel] [PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-09 Thread Paolo Bonzini
Christian, the question for you is towards the end... On 09/10/2015 15:39, Denis V. Lunev wrote: > diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c > index 62cf8c9..15c3c02 100644 > --- a/arch/x86/kvm/hyperv.c > +++ b/arch/x86/kvm/hyperv.c > @@ -23,13 +23,265 @@ > > #include "x86.h" >

[Qemu-devel] [PULL 19/20] qapi: Share gen_visit_fields()

2015-10-09 Thread Markus Armbruster
From: Eric Blake Consolidate the code between visit, command marshalling, and event generation that iterates over the members of a struct. It reduces code duplication in the generator, so that a future patch can reduce the size of generated code while touching only one instead of three locations.

[Qemu-devel] [PULL 12/20] qapi: Reuse code for flat union base validation

2015-10-09 Thread Markus Armbruster
From: Eric Blake Rather than open-code the check for a valid base type, we should reuse the common functionality. This allows for consistent error messages, and also makes it easier for a later patch to turn on support for inline anonymous base structures. Test flat-union-inline is updated to te

Re: [Qemu-devel] [PATCH v10 01/10] allow writing to the backing file

2015-10-09 Thread Eric Blake
On 09/25/2015 12:17 AM, Wen Congyang wrote: > For block replication, we have such backing chain: > secondary disk <-- hidden disk <-- active disk > secondary disk is top BDS(use bacing reference), so it can be opened in s/BDS(use bacing/BDS (use backing/ > read-write mode. But hidden disk is

Re: [Qemu-devel] [PATCH 3/8] migration: add new capability test-only

2015-10-09 Thread Dr. David Alan Gilbert
* Denis V. Lunev (d...@openvz.org) wrote: > On 10/07/2015 06:05 PM, Eric Blake wrote: > >On 10/07/2015 12:20 AM, Denis V. Lunev wrote: > >>From: Igor Redko > >> > >>This patch declares a new migration capability that allows > >>to distinguish between true migration and the test. > >> > >>An altern

Re: [Qemu-devel] [PATCH v2 2/4] hw/input/tsc210x: Remove superfluous memset

2015-10-09 Thread Eric Blake
On 10/09/2015 09:56 AM, Thomas Huth wrote: > g_malloc0 already clears the memory, so no need for additional > memsets here. And while we're at it, let's also remove the > superfluous typecasts for the return values of g_malloc0 > and use the type-safe g_new0 instead. > > Signed-off-by: Thomas Huth

Re: [Qemu-devel] [PATCH v2 00/16] block: Get rid of bdrv_swap()

2015-10-09 Thread Stefan Hajnoczi
On Thu, Oct 01, 2015 at 03:13:18PM +0200, Kevin Wolf wrote: > bdrv_swap() has always been an ugly hack that we would rather have > avoided. When it was introduced, we simply didn't have the > infrastructure to update pointers instead of transplanting the contents > of BDS object, so we grudgingly

[Qemu-devel] [PULL 00/20] QAPI patches

2015-10-09 Thread Markus Armbruster
The following changes since commit b37686f7e84b22cfaf7fd01ac5133f2617cc3027: Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2015-10-09 12:18:14 +0100) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2015-10-09

Re: [Qemu-devel] [PATCH v5 0/6] fw_cfg DMA interface

2015-10-09 Thread Gerd Hoffmann
On Do, 2015-10-08 at 17:02 +0200, Marc Marí wrote: > Implement host-side of the FW CFG DMA interface both for x86 and ARM. > > Based on Gerd Hoffman's initial implementation. > > Gabriel L. Somlo (1): > fw_cfg: document fw_cfg_modify_iXX() update functions > > Kevin O'Connor (1): > fw_cfg: D

Re: [Qemu-devel] Live migration sequence

2015-10-09 Thread Dr. David Alan Gilbert
* Pavel Fedin (p.fe...@samsung.com) wrote: > Hello! > > I would like to clarify, what is the exact live migration sequence in qemu? > > I mean - there are pre_save and post_load callbacks for VMState structures. > Is there any determined > order of calling them related to memory contents migr

[Qemu-devel] [RFC v1 0/2] Enforce gaps between DIMMs

2015-10-09 Thread Bharata B Rao
The suggested way to work around the virtio bug reported here http://lists.nongnu.org/archive/html/qemu-devel/2015-08/msg00522.html is to introduce gaps between DIMMs. Igor's patchset changes the pc-dimm auto-address assignment to introduce gaps and ues the same from pc memhp. This patchset does

Re: [Qemu-devel] [Qemu-block] [PATCH v5 2/4] quorum: implement bdrv_add_child() and bdrv_del_child()

2015-10-09 Thread Max Reitz
On 08.10.2015 10:12, Alberto Garcia wrote: > On Wed 07 Oct 2015 08:51:21 PM CEST, Max Reitz wrote: >>> +if (s->num_children == s->max_children) { >>> +if (s->max_children >= INT_MAX) { >> >> Opposing Berto (:-)), I like >= even if the > part is actually >> impossible. I myself like to

[Qemu-devel] [PATCH v8 17/27] vhost user: add support of live migration

2015-10-09 Thread marcandre . lureau
From: Thibaut Collet Some vhost user backends are able to support live migration. To provide this service the following features must be added: 1. Add the VIRTIO_NET_F_GUEST_ANNOUNCE capability to vhost-net when netdev backend is vhost-user. 2. Provide a nop receive callback to vhost-user.

Re: [Qemu-devel] [PULL 00/25] virtio,pc features, fixes

2015-10-09 Thread Eduardo Otubo
On Fri, Oct 09, 2015 at 12=09=49PM +0100, Peter Maydell wrote: > On 9 October 2015 at 12:05, Peter Maydell wrote: > > /home/petmay01/qemu/util/memfd.c: In function ‘memfd_create’: > > /home/petmay01/qemu/util/memfd.c:57:20: error: ‘__NR_memfd_create’ > > undeclared (first use in this function) > >

[Qemu-devel] [PATCH] scripts/text2pod.pl: Escape left brace

2015-10-09 Thread Fam Zheng
Latest perl now deprecates "{" literal in regex and print warnings like "unescaped left brace in regex is deprecated". Add escapes to keep it happy. Signed-off-by: Fam Zheng --- roms/ipxe | 2 +- scripts/texi2pod.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PULL 20/20] qapi: Simplify gen_visit_fields() error handling

2015-10-09 Thread Markus Armbruster
From: Eric Blake Since we have consolidated all generated code to use 'err' as the name of the local variable for error detection, we can simplify the decision on whether to skip error detection (useful for deallocation paths) to be a boolean. Signed-off-by: Eric Blake Message-Id: <1443565276-4

Re: [Qemu-devel] [PATCH 04/12] dataplane: Mark host notifiers' client type as "external"

2015-10-09 Thread Kevin Wolf
Am 09.10.2015 um 07:45 hat Fam Zheng geschrieben: > They will be excluded by type in the nested event loops in block layer, > so that unwanted events won't be processed there. > > Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf

[Qemu-devel] [PATCH v3 16/16] block: Remove bdrv_swap()

2015-10-09 Thread Kevin Wolf
bdrv_swap() is unused now. Remove it and all functions that have no other users than bdrv_swap(). In particular, this removes the .bdrv_rebind callbacks from block drivers. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia Reviewed-by: Fam Zheng --- block.c

[Qemu-devel] [PULL 2/2] trace: remove malloc tracing

2015-10-09 Thread Stefan Hajnoczi
From: Paolo Bonzini The malloc vtable is not supported anymore in glib, because it broke when constructors called g_malloc. Remove tracing of g_malloc, g_realloc and g_free calls. Note that, for systemtap users, glib also provides tracepoints glib.mem_alloc, glib.mem_free, glib.mem_realloc, gli

[Qemu-devel] [PULL 04/20] qapi: Sort qapi-schema tests

2015-10-09 Thread Markus Armbruster
From: Eric Blake Recent changes to qapi have provided quite a bit of churn in the makefile, because we are inconsistent on what order test names appear in, and on whether to re-wrap the list of tests or just add arbitrary line lengths. Writing the list in a sorted fashion, one test per line, wil

Re: [Qemu-devel] [PATCH v7 10/14] qapi: Detect collisions in C member names

2015-10-09 Thread Eric Blake
On 10/09/2015 08:11 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Detect attempts to declare two object members that would result >> in the same C member name, by keying the 'seen' dictionary off >> of the C name rather than the qapi name. It also requires passing >> info through some o

Re: [Qemu-devel] [PATCH 2/2] hw/arm/virt: don't use a15memmap directly

2015-10-09 Thread Andrew Jones
On Fri, Oct 09, 2015 at 05:45:24PM +0100, Peter Maydell wrote: > On 6 October 2015 at 15:37, Andrew Jones wrote: > > We should always go through VirtBoardInfo when we need the memmap. > > To avoid using a15memmap directly, in this case, we need to defer > > the max-cpus check from class init time

[Qemu-devel] [PATCH v3 05/16] block: Convert bs->file to BdrvChild

2015-10-09 Thread Kevin Wolf
This patch removes the temporary duplication between bs->file and bs->file_child by converting everything to BdrvChild. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia Reviewed-by: Fam Zheng --- block.c | 63 ++

Re: [Qemu-devel] [PATCH v2] migration: disallow migrate_add_blocker during migration

2015-10-09 Thread Eric Blake
On 09/30/2015 11:07 AM, John Snow wrote: > If a migration is already in progress and somebody attempts > to add a migration blocker, this should rightly fail. > > Add an errp parameter and a retcode return value to migrate_add_blocker. > > This is part one of two for a solution to prohibit e.g. b

Re: [Qemu-devel] [PATCH v2] migration: disallow migrate_add_blocker during migration

2015-10-09 Thread John Snow
On 10/09/2015 03:42 PM, Eric Blake wrote: > On 09/30/2015 11:07 AM, John Snow wrote: >> If a migration is already in progress and somebody attempts >> to add a migration blocker, this should rightly fail. >> >> Add an errp parameter and a retcode return value to migrate_add_blocker. >> >> This is

[Qemu-devel] [PULL v3 00/12] Fix device introspection regressions

2015-10-09 Thread Markus Armbruster
QMP command device-list-properties regressed in 2.1: it can crash or leave dangling pointers behind. -device FOO,help regressed in 2.2: it no longer works for non-pluggable devices. I tried to fix that some time ago[*], but my fix failed review. This is my second, more comprehensive try. PATCH

[Qemu-devel] [PULL v3 04/12] hw: do not pass NULL to memory_region_init from instance_init

2015-10-09 Thread Markus Armbruster
From: Paolo Bonzini This causes the region to outlive the object, because it attaches the region to /machine. This is not nice for the "realize" method, but much worse for "instance_init" because it can cause dangling pointers after a simple object_new/object_unref pair. Reported-by: Markus Arm

Re: [Qemu-devel] [Qemu-block] [PATCH 03/17] spec: add qcow2-dirty-bitmaps specification

2015-10-09 Thread Eric Blake
On 10/09/2015 11:07 AM, Max Reitz wrote: > > Except maybe the last bit, because "512 byte sector" basically is > meaningless when talking about a qcow2 file (which works in terms of > clusters), At KVM Forum, Kevin was mentioning an idea of adding an incompatible feature to qcow2 that would let

[Qemu-devel] [PATCH 06/12] block: Introduce "drained begin/end" API

2015-10-09 Thread Fam Zheng
The semantics is that after bdrv_drained_begin(bs), bs will not get new external requests until the matching bdrv_drained_end(bs). Signed-off-by: Fam Zheng --- block.c | 2 ++ block/io.c| 18 ++ include/block/block.h | 19 +++

Re: [Qemu-devel] [PULL 12/25] vhost: use a function for each call

2015-10-09 Thread Michael S. Tsirkin
On Fri, Oct 09, 2015 at 08:40:27AM +0200, Thibaut Collet wrote: > Hi Michael, > > this patch is not correct. If we apply QEMU enters in a dead lock if > we have several queue pairs for virttio/vhost and vhost backend > crashes during the initialisation sequence > I have sent some comments yesterda

Re: [Qemu-devel] [PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-09 Thread Paolo Bonzini
On 09/10/2015 17:53, Roman Kagan wrote: > > I really don't like this auto-EOI extension, but I guess that's the > > spec. :( If it wasn't for it, you could do everything very easily in > > userspace using Google's proposed MSR exit. > I guess you're right. We'd probably have to (ab)use MSI for S

[Qemu-devel] [PATCH v2] target-arm: Add MDCR_EL2

2015-10-09 Thread Sergey Fedorov
Signed-off-by: Sergey Fedorov --- Changes in v2: * Reset value is simply made zero target-arm/cpu.h| 1 + target-arm/helper.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index cc1578c..51d8ed1 100644 --- a/target-arm/cpu.h +++ b/ta

[Qemu-devel] [PULL v3 08/12] libqtest: New hmp() & friends

2015-10-09 Thread Markus Armbruster
New convenience function hmp() to facilitate use of human-monitor-command in tests. Use it to simplify its existing uses. To blend into existing libqtest code, also add qtest_hmpv() and qtest_hmp(). That, and the egregiously verbose GTK-Doc comment format make this patch look bigger than it is.

[Qemu-devel] [PULL 16/20] qapi: Consistent generated code: prefer common indentation

2015-10-09 Thread Markus Armbruster
From: Eric Blake We had some pointless differences in the generated code for visit, command marshalling, and events; unifying them makes it easier for future patches to consolidate to common helper functions. This is one patch of a series to clean up these differences. This patch adjusts gen_vis

[Qemu-devel] [PULL 2/5] virtio-blk: use blk_io_plug/unplug for Linux AIO batching

2015-10-09 Thread Stefan Hajnoczi
The raw-posix block driver implements Linux AIO batching so multiple requests can be submitted with a single io_submit(2) system call. Batching is currently only used by virtio-scsi and virtio-blk-data-plane. Enable batching for regular virtio-blk so the number of io_submit(2) system calls is redu

Re: [Qemu-devel] [PATCH 1/4] hw/core: Add iommu to machine properties

2015-10-09 Thread David kiarie
On Thu, Oct 8, 2015 at 9:10 PM, Marcel Apfelbaum wrote: > On 10/09/2015 05:53 AM, David Kiarie wrote: >> >> From: David >> >> Add iommu to machine properties in preparation of introducing >> AMD IOMMU >> >> Signed-off-by: David Kiarie >> --- >> hw/core/machine.c | 25

Re: [Qemu-devel] [PATCH 0/4] AMD IOMMU v1

2015-10-09 Thread Valentine Sinitsyn
Hi David, Thanks for your efforts. On 09.10.2015 07:53, David Kiarie wrote: David (4): hw/core: Add iommu to machine properties hw/pci-host: Add AMD IOMMU to PIIX and Q35 pcs hw/i386: Introduce AMD IOMMU hw/acpi: ACPI table for AMD IOMMU hw/core/machine.c | 25 + hw/

[Qemu-devel] [PATCH v3 04/16] quorum: Convert to BdrvChild

2015-10-09 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Alberto Garcia Reviewed-by: Fam Zheng --- block/quorum.c | 65 ++ 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index 8fe53b4.

Re: [Qemu-devel] [PATCH 1/2] kvm/x86: Hyper-V synthetic interrupt controller

2015-10-09 Thread Roman Kagan
On Fri, Oct 09, 2015 at 04:42:33PM +0200, Paolo Bonzini wrote: > You need to add SYNIC vectors to the EOI exit bitmap, so that APICv > (Xeon E5 or higher, Ivy Bridge or newer) is handled correctly. You also > need to check the auto EOI exit bitmap in __apic_accept_irq, and avoid > going through kv

Re: [Qemu-devel] [PATCH v3 6/6] tcg/mips: Support r6 SEL{NE, EQ}Z instead of MOVN/MOVZ

2015-10-09 Thread James Hogan
On Thu, Oct 08, 2015 at 06:31:32PM +0200, Aurelien Jarno wrote: > On 2015-10-02 13:24, James Hogan wrote: > > Extend MIPS movcond implementation to support the SELNEZ/SELEQZ > > instructions introduced in MIPS r6 (where MOVN/MOVZ have been removed). > > > > Whereas the "MOVN/MOVZ rd, rs, rt" instr

Re: [Qemu-devel] [PATCH] target-tilegx: Let prefetch nop instructions return before allocating dest temporary register

2015-10-09 Thread Richard Henderson
On 10/09/2015 09:48 AM, Chen Gang wrote: On 10/7/15 18:17, Chen Gang wrote: On 10/7/15 17:19, Richard Henderson wrote: On 10/04/2015 10:15 PM, Chen Gang wrote: From 40ec3f1c75b4c97e3e0495c9e465be898f48a652 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Sun, 4 Oct 2015 17:34:17 +0800 Subject:

Re: [Qemu-devel] [PULL v3 11/12] qdev: Protect device-list-properties against broken devices

2015-10-09 Thread Andreas Färber
Am 09.10.2015 um 16:36 schrieb Markus Armbruster: > Several devices don't survive object_unref(object_new(T)): they crash > or hang during cleanup, or they leave dangling pointers behind. > > This breaks at least device-list-properties, because > qmp_device_list_properties() needs to create a devi

[Qemu-devel] [PATCH v3 12/16] block: Introduce parents list

2015-10-09 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Fam Zheng --- block.c | 3 +++ include/block/block_int.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/block.c b/block.c index a2d6238..980437f 100644 --- a/block.c +++ b/block.c @@ -1090,6 +1090,7 @@ stati

Re: [Qemu-devel] [PATCH v9 00/24] Generate ACPI v5.1 tables and expose them to guest over fw_cfg on ARM

2015-10-09 Thread liang yan
Hello, Shannon, From: Shannon Zhao This patch series generate seven ACPI tables for machine virt on ARM. The set of generated tables are: - RSDP - RSDT - MADT - GTDT - FADT - DSDT - MCFG (For PCIe host bridge) These tables are created dynamically using the function of aml-build.c, taking into

Re: [Qemu-devel] [PATCH 2/2] kvm/x86: Hyper-V kvm exit

2015-10-09 Thread Paolo Bonzini
On 09/10/2015 16:53, Roman Kagan wrote: >> > Why is this exit necessary? > The guest writes to synic-related MSRs and that should take "immediate" > effect. > > E.g. it may decide to disable or relocate the message page by writing to > SIMP MSR. The host is then supposed to stop accessing the o

Re: [Qemu-devel] [PATCH v7 04/14] qapi: Don't use info as witness of implicit object type

2015-10-09 Thread Eric Blake
On 10/07/2015 10:27 AM, Markus Armbruster wrote: >> def visit_needed(self, entity): >> # Visit everything except implicit objects >> -return not isinstance(entity, QAPISchemaObjectType) or entity.info >> +return not entity.is_implicit(QAPISchemaObjectType) > > The al

<    1   2   3   >