Re: [Qemu-devel] [PATCH v6 12/16] qapi: Consistent generated code: prefer common labels

2015-09-30 Thread Markus Armbruster
Eric Blake writes: > 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 patch 3/4, focusing on naming the goto labels 'out' (not > 'clean')

Re: [Qemu-devel] [PATCH v4 0/5] add ACPI node for fw_cfg on pc and arm

2015-09-30 Thread Laszlo Ersek
On 09/29/15 12:27, Michael S. Tsirkin wrote: > On Sun, Sep 27, 2015 at 05:28:57PM -0400, Gabriel L. Somlo wrote: >> New since v3: >> >> - rebased to work on top of 87e896ab (introducing pc-*-25 classes), >>inserting fw_cfg acpi node only for machines >= 2.5. >> >> - reintroduce _S

[Qemu-devel] [RFC PATCH 1/8] backend: multi-socket

2015-09-30 Thread Christian Pinto
From: Baptiste Reynal This patch introduces a new socket for QEMU, called multi-socket. This socket allows multiple QEMU instances to communicate by sharing messages and file descriptors. A socket can be instantiated with the following parameters: -object multi-socket-backend,id=,path=,listen=

[Qemu-devel] [RFC PATCH 2/8] backend: shared memory backend

2015-09-30 Thread Christian Pinto
From: Baptiste Reynal This patch introduces a shared memory backend, allowing to share memory between a master and many slaves. The memory is implemented using hugetlbfs, and relies on the multi-socket backend to share informations (size and offset for the slaves). Instantiation on the master:

[Qemu-devel] [RFC PATCH 5/8] hw/arm: sysbus-fdt

2015-09-30 Thread Christian Pinto
Added node creation for dynamically instantiated sysbus IDM device. Support added for all ARM machines modeling dynamic sysbus devices instantiation. Signed-off-by: Christian Pinto --- hw/arm/sysbus-fdt.c | 60 + 1 file changed, 60 insertions(

[Qemu-devel] [RFC PATCH 8/8] qemu: numa

2015-09-30 Thread Christian Pinto
This patch modifies the behavior of memory_region_allocate_system_memory, when the new shared memory backend is used from a slave qemu instance. In such case there is not yet a valid pointer for the memory region pointed by the backend (it will be innitilized later when received from the master.) a

[Qemu-devel] [RFC PATCH 3/8] migration: add shared migration type

2015-09-30 Thread Christian Pinto
From: Baptiste Reynal A QEMU instance can now wait for the instantiation of the memory by the master while shared-memory backend is used. Use: -incoming "shared:" Signed-off-by: Baptiste Reynal --- backends/hostmem-shared.c | 9 + include/migration/migration.h | 2 ++ migration/

Re: [Qemu-devel] [PATCH v4 32/47] ivshmem-client: check the number of vectors

2015-09-30 Thread Marc-André Lureau
- Original Message - > On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Check the number of vectors received from the server, to avoid > > out of bound array access. > > > > Signed-off-by: Marc-André Lureau > > --- > > contrib/ivshmem-client

[Qemu-devel] [RFC PATCH 4/8] hw/misc: IDM Device

2015-09-30 Thread Christian Pinto
This patch introduces the Interrupt Distribution Module (IDM) device for ARM, x86 and X86_64 architectures, as the only currently supported ones. The IDM device is used both as and Inter-processor interrupt routing device, and to trigger the boot of a slave QEMU instance. The IDM device can be in

[Qemu-devel] [RFC PATCH 7/8] hw/arm: boot

2015-09-30 Thread Christian Pinto
Modify the boot process of an ARM machine in order to check whether it is a slave, by checking the slave machine flag. When the slave flag is on, no kernel, dtb or initrd are loaded into memory. The boot address of each core is set to the start address of the RAM, that depends on the machine model

[Qemu-devel] [RFC PATCH 6/8] qemu: slave machine flag

2015-09-30 Thread Christian Pinto
This patch adds a new machine flag, to configure qemu as a slave instance. Usage -machine -slave=[on|off] (default=off) Signed-off-by: Christian Pinto --- hw/core/machine.c | 27 +++ include/hw/boards.h | 2 ++ qemu-options.hx | 5 - util/qemu-config.c | 5

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

2015-09-30 Thread Alberto Garcia
On Tue 29 Sep 2015 02:21:37 PM CEST, Kevin Wolf wrote: >> > @@ -1090,6 +1090,7 @@ static BdrvChild *bdrv_attach_child(BlockDriverState >> > *parent_bs, >> > }; >> > >> > QLIST_INSERT_HEAD(&parent_bs->children, child, next); >> > +QLIST_INSERT_HEAD(&child_bs->parents, child, next_pa

[Qemu-devel] [RFC PATCH 0/8] Towards an Heterogeneous QEMU

2015-09-30 Thread Christian Pinto
Hi all, This RFC patch-series introduces the set of changes enabling the architectural elements to model the architecture presented in a previous RFC letter: "[Qemu-devel][RFC] Towards an Heterogeneous QEMU". To recap the goal of such RFC: The idea is to enhance the current architecture of QEMU

Re: [Qemu-devel] [PATCH] target-arm: Use common CPU cycle infrastructure

2015-09-30 Thread Christopher Covington
On 09/28/2015 06:05 PM, Alistair Francis wrote: > On Thu, Sep 24, 2015 at 12:43 PM, Christopher Covington > wrote: >> cpu_get_ticks() provides a common interface across targets for >> calculating CPU cycles. Using this fixes PMCCNTR reads when -icount >> is specified (previously a non-increasing v

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-09-30 Thread Gerd Hoffmann
Hi, > what about Recycling the output buffer as worker thread buffer? You can't do that as vs is allocated on the stack, therefore not valid any more when vnc_worker_thread_loop returns. > about shrinking: I had the idea to count the number of times the buffer was > (significantly) too big a

Re: [Qemu-devel] [PATCH v6 14/16] qapi: Consistent generated code: minimize push_indent() usage

2015-09-30 Thread Markus Armbruster
Eric Blake writes: > 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 patch makes no difference to the generated code, but rather > focuses o

Re: [Qemu-devel] [PATCH v6 05/16] qapi: Test for various name collisions

2015-09-30 Thread Eric Blake
On 09/29/2015 06:33 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Expose some weaknesses in the generator: we don't always forbid >> the generation of structs that contain multiple members that map >> to the same C name. > > C or QMP name, perhaps? Lots of good advice for an improved c

Re: [Qemu-devel] [PATCH 0/2] xen: Fix crash of "-machine xenfv, accel=kvm"

2015-09-30 Thread Stefano Stabellini
On Mon, 28 Sep 2015, Eduardo Habkost wrote: > This series fixes the following crash: > > $ ./x86_64-softmmu/qemu-system-x86_64 -machine xenfv,accel=kvm > Segmentation fault (core dumped) > > The crash happens because xen-platform calls xc_hvm_set_mem_type() with a NULL > xen_xc on reset, at p

Re: [Qemu-devel] [PATCH 2/2] xen-platform: Ensure xen is enabled when initializing

2015-09-30 Thread Stefano Stabellini
On Mon, 28 Sep 2015, Eduardo Habkost wrote: > The xen-platform code crashes on reset if the xen backend is not > initialized, because it calls xc_hvm_set_mem_type(). Ensure xen-platform > won't be created without initializing the xen backend. > > The assert can't be triggered by the user because t

Re: [Qemu-devel] [PATCH v4 23/47] ivshmem: migrate with VMStateDescription

2015-09-30 Thread Claudio Fontana
On 29.09.2015 15:39, Marc-André Lureau wrote: > > > - Original Message - >> On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau >>> >>> load_state_old() is used to keep compatibility with version 0. >>> >>> Signed-off-by: Marc-André Lureau >>> --- >>> hw

Re: [Qemu-devel] [PATCH 1/2] pc: Require xen when initializing xenfv machine

2015-09-30 Thread Stefano Stabellini
On Mon, 28 Sep 2015, Eduardo Habkost wrote: > Without this check, the xen-platform device will crash on reset > if using the accel option with anything other than xen (e.g. > "-machine xenfv,accel=kvm"). > > Signed-off-by: Eduardo Habkost Reviewed-by: Stefano Stabellini > hw/i386/pc_piix.c |

Re: [Qemu-devel] [PATCH v4 0/5] add ACPI node for fw_cfg on pc and arm

2015-09-30 Thread Michael S. Tsirkin
On Tue, Sep 29, 2015 at 03:59:28PM +0200, Laszlo Ersek wrote: > On 09/29/15 12:27, Michael S. Tsirkin wrote: > > On Sun, Sep 27, 2015 at 05:28:57PM -0400, Gabriel L. Somlo wrote: > >> New since v3: > >> > >>- rebased to work on top of 87e896ab (introducing pc-*-25 classes), > >> inserting

Re: [Qemu-devel] [PATCH v4 47/47] ivshmem: use little-endian int64_t for the protocol

2015-09-30 Thread Claudio Fontana
On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The current ivshmem protocol uses 'long' for integers. But the > sizeof(long) depends on the host and the endianess is not defined, which > may cause portability troubles. > > Instead, switch to using little-en

Re: [Qemu-devel] [PATCH v6 15/16] qapi: Share gen_err_check()

2015-09-30 Thread Markus Armbruster
Eric Blake writes: > qapi-commands had a nice helper gen_err_check(), but did not In fact, it still has :) > use it everywhere. In fact, using it in more places makes it > easier to reduce the lines of code used in appending an error Suggest "used for generating error checks" > check in gener

Re: [Qemu-devel] [PATCH v4 44/47] ivshmem: remove EventfdEntry.vector

2015-09-30 Thread Claudio Fontana
On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > No need to store an extra int for the vector number when it can be > computed easily by looking at the position in the array. > > Signed-off-by: Marc-André Lureau > --- > hw/misc/ivshmem.c | 8 > 1 f

Re: [Qemu-devel] [PATCH v4 42/47] ivshmem: use strtosz()

2015-09-30 Thread Claudio Fontana
On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Use the common qemu utility function to parse the memory size. > > Signed-off-by: Marc-André Lureau > --- > hw/misc/ivshmem.c | 36 +--- > 1 file changed, 5 insertions(+), 31 d

Re: [Qemu-devel] [PATCH v6 16/16] qapi: Share gen_visit_fields()

2015-09-30 Thread Markus Armbruster
Eric Blake writes: > 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 thre

Re: [Qemu-devel] [PATCH V2] vnc: destroy server surface if no client is connected

2015-09-30 Thread Peter Lieven
> Am 29.09.2015 um 16:08 schrieb Gerd Hoffmann : > > Hi, > >> what about Recycling the output buffer as worker thread buffer? > > You can't do that as vs is allocated on the stack, therefore not valid > any more when vnc_worker_thread_loop returns. why not? buffer_move_free only moves the hea

Re: [Qemu-devel] [PATCH 3/3] block: mirror - zero unallocated target sectors when zero init not present

2015-09-30 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 29/09/2015 10:39, Kevin Wolf wrote: > bdrv_has_zero_init() takes care of that, in theory. The "problem" > here is that the target is opened with BDRV_O_NO_BACKING, so the > block layer doesn't consider this an image with a backing file. I think

Re: [Qemu-devel] [PATCH v4 42/47] ivshmem: use strtosz()

2015-09-30 Thread Marc-André Lureau
- Original Message - > On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Use the common qemu utility function to parse the memory size. > > > > Signed-off-by: Marc-André Lureau > > --- > > hw/misc/ivshmem.c | 36 +-

[Qemu-devel] [PATCH v3 0/2] pc: memhp: enforce gaps between DIMMs

2015-09-30 Thread Igor Mammedov
v3: - use pc_machine_class_init() for default. (Eduardo) - make 'gap' boolean and just add 1 byte gap when calculating new_addr for DIMM. v2: make inter_dimm_gap a boolean and inster gap in 1 byte instead of 2Mb, due to alignment that gap would be extended up to natural backend ali

[Qemu-devel] [PATCH v3 1/2] memhp: extend address auto assignment to support gaps

2015-09-30 Thread Igor Mammedov
setting gap to TRUE will make sparse DIMM address auto allocation, leaving gaps between a new DIMM address and preceeding existing DIMM. Signed-off-by: Igor Mammedov --- v2: * make 'gap' boolean and just add 1 byte gap when calculating new_addr for DIMM. --- hw/i386/pc.c | 3 +

[Qemu-devel] [PATCH v3 2/2] pc: memhp: force gaps between DIMM's GPA

2015-09-30 Thread Igor Mammedov
mapping DIMMs non contiguously allows to workaround virtio bug reported earlier: http://lists.nongnu.org/archive/html/qemu-devel/2015-08/msg00522.html in this case guest kernel doesn't allocate buffers that can cross DIMM boundary keeping each buffer local to a DIMM. Suggested-by: Michael S. Tsirk

Re: [Qemu-devel] [PATCH v3 03/16] util: add memfd helpers

2015-09-30 Thread Michael S. Tsirkin
On Thu, Aug 06, 2015 at 02:40:39PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Add qemu_memfd_alloc/free() helpers. > > The function helps to allocate and seal a memfd, and implements an > open/unlink/mmap fallback for system that do not support memfd. > > Signed-off

Re: [Qemu-devel] [PATCH v6 12/16] qapi: Consistent generated code: prefer common labels

2015-09-30 Thread Eric Blake
On 09/29/2015 07:56 AM, Markus Armbruster wrote: > Eric Blake writes: > >> 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 patch 3/4,

Re: [Qemu-devel] [PATCH v5 11/21] vhost: only use shared log if in use by backend

2015-09-30 Thread Michael S. Tsirkin
On Thu, Sep 24, 2015 at 06:22:11PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Do not allocate a shared log if the backend doesn't support it. > > Signed-off-by: Marc-André Lureau So squash this in the previous patch introducing the shared log? This split makes revi

Re: [Qemu-devel] [PATCH v4 40/47] tests: add ivshmem qtest

2015-09-30 Thread Claudio Fontana
On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Adds 4 ivshmemtests: > - single qemu instance and basic IO > - pair of instances, check memory sharing > - pair of instances with server, and MSIX > - hot plug/unplug > > A temporary shm is created as well as a

Re: [Qemu-devel] [PATCH v6 14/16] qapi: Consistent generated code: minimize push_indent() usage

2015-09-30 Thread Eric Blake
On 09/29/2015 08:10 AM, Markus Armbruster wrote: > Eric Blake writes: > >> 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 patch makes n

Re: [Qemu-devel] [PATCH v5 00/21] vhost-user: add migration support

2015-09-30 Thread Michael S. Tsirkin
On Thu, Sep 24, 2015 at 06:22:00PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > The following series implement shareable log for vhost-user to support > memory tracking during live migration. On qemu-side, the solution is > fairly straightfoward since vhost alr

[Qemu-devel] [PATCH] kvm-unit-tests: arm: Fail on unknown subtest

2015-09-30 Thread Christopher Covington
Signed-off-by: Christopher Covington --- arm/selftest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arm/selftest.c b/arm/selftest.c index fc9ec60..aa16a91 100644 --- a/arm/selftest.c +++ b/arm/selftest.c @@ -376,6 +376,8 @@ int main(int argc, char **argv) cpumask_set_cpu

Re: [Qemu-devel] [PATCH v4 41/47] ivshmem: do not keep shm_fd open

2015-09-30 Thread Claudio Fontana
On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Remove shm_fd from device state, closing it as early as possible to avoid > leaks. > > Signed-off-by: Marc-André Lureau > --- > hw/misc/ivshmem.c | 16 +--- > 1 file changed, 5 insertions(+), 11

Re: [Qemu-devel] [PATCH v4 45/47] ivshmem: rename MSI eventfd_table

2015-09-30 Thread Claudio Fontana
On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The array is used to have vector specific data, so use a more > descriptive name. > > Signed-off-by: Marc-André Lureau > --- > hw/misc/ivshmem.c | 18 +- > 1 file changed, 9 insertions(+), 9 d

Re: [Qemu-devel] [PATCH v6 15/16] qapi: Share gen_err_check()

2015-09-30 Thread Eric Blake
On 09/29/2015 08:31 AM, Markus Armbruster wrote: > Eric Blake writes: > >> qapi-commands had a nice helper gen_err_check(), but did not > > In fact, it still has :) > >> use it everywhere. In fact, using it in more places makes it >> easier to reduce the lines of code used in appending an error

Re: [Qemu-devel] [PATCH v3] Add argument filters to the seccomp sandbox

2015-09-30 Thread Eduardo Otubo
On Fri, Sep 25, 2015 at 12=50=36AM -0400, Namsun Ch'o wrote: > Here's the v3 patch. I applied it and compiled QEMU, and it worked fine. > > Changes so far: > v1 > - Created argument filters for the madvise, shmget, and shmctl syscalls. > v1 -> v2 > - Added 5 new madvise flags which were present

Re: [Qemu-devel] [PATCH v4 40/47] tests: add ivshmem qtest

2015-09-30 Thread Marc-André Lureau
- Original Message - > On 24.09.2015 13:37, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Adds 4 ivshmemtests: > > - single qemu instance and basic IO > > - pair of instances, check memory sharing > > - pair of instances with server, and MSIX > > - hot plug/unpl

Re: [Qemu-devel] [PATCH v3 03/16] util: add memfd helpers

2015-09-30 Thread Marc-André Lureau
- Original Message - > On Thu, Aug 06, 2015 at 02:40:39PM +0200, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Add qemu_memfd_alloc/free() helpers. > > > > The function helps to allocate and seal a memfd, and implements an > > open/unlink/mmap fallback for syst

Re: [Qemu-devel] [PATCH v5 11/21] vhost: only use shared log if in use by backend

2015-09-30 Thread Marc-André Lureau
Hi - Original Message - > On Thu, Sep 24, 2015 at 06:22:11PM +0200, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Do not allocate a shared log if the backend doesn't support it. > > > > Signed-off-by: Marc-André Lureau > > So squash this in the previous patch

Re: [Qemu-devel] [PATCH 15/16] block: Add and use bdrv_replace_in_backing_chain()

2015-09-30 Thread Kevin Wolf
Am 23.09.2015 um 19:08 hat Max Reitz geschrieben: > On 17.09.2015 15:48, Kevin Wolf wrote: > > This cleans up the mess we left behind in the mirror code after the > > previous patch. Instead of using bdrv_swap(), just change pointers. > > > > The interface change of the mirror job that callers mus

Re: [Qemu-devel] [PATCH v4 0/7] Fix device introspection regressions

2015-09-30 Thread Markus Armbruster
Markus Armbruster writes: > 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

Re: [Qemu-devel] [PATCH v4 1/7] tests: Fix how qom-test is run

2015-09-30 Thread Andreas Färber
Am 28.09.2015 um 22:08 schrieb Markus Armbruster: > We want to run qom-test for every architecture, without having to > manually add it to every architecture's list of tests. Commit 3687d53 > accomplished this by adding it to every architecture's list > automatically. > > However, some architectu

Re: [Qemu-devel] [PATCH v2] Add argument filters to the seccomp sandbox

2015-09-30 Thread Eduardo Otubo
(I'm not sure what happens to your emails that all of them does not relate to the same thread/Message-ID, making a pain to follow through out the volume of email on the list, please pay attention to that) On Mon, Sep 28, 2015 at 11=14=42PM -0400, Namsun Ch'o wrote: > > My understanding of the conf

Re: [Qemu-devel] [PATCH v3 03/16] util: add memfd helpers

2015-09-30 Thread Michael S. Tsirkin
On Tue, Sep 29, 2015 at 11:25:04AM -0400, Marc-André Lureau wrote: > > > - Original Message - > > On Thu, Aug 06, 2015 at 02:40:39PM +0200, marcandre.lur...@redhat.com wrote: > > > From: Marc-André Lureau > > > > > > Add qemu_memfd_alloc/free() helpers. > > > > > > The function helps t

[Qemu-devel] [PATCH v6 02/24] configure: probe for memfd

2015-09-30 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 f14454e..5e77ed5 100755 --- a/configure +++ b/configure @@ -3486,6 +3486,2

Re: [Qemu-devel] [PATCH] kvm-unit-tests: arm: Fail on unknown subtest

2015-09-30 Thread Andrew Jones
On Tue, Sep 29, 2015 at 11:08:27AM -0400, Christopher Covington wrote: > Signed-off-by: Christopher Covington > --- > arm/selftest.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arm/selftest.c b/arm/selftest.c > index fc9ec60..aa16a91 100644 > --- a/arm/selftest.c > +++ b/arm/selft

Re: [Qemu-devel] [PATCH v4 5/7] qmp: Fix device-list-properties not to crash for abstract device

2015-09-30 Thread Andreas Färber
Am 29.09.2015 um 08:50 schrieb Thomas Huth: > On 28/09/15 22:08, Markus Armbruster wrote: >> Broken in commit f4eb32b "qmp: show QOM properties in >> device-list-properties", v2.1. >> >> Cc: qemu-sta...@nongnu.org >> Signed-off-by: Markus Armbruster >> Reviewed-by: Eric Blake >> --- >> qmp.c

[Qemu-devel] [PATCH v6 04/24] util: add linux-only memfd fallback

2015-09-30 Thread marcandre . lureau
From: Marc-André Lureau Implement memfd_create() fallback if not available in system libc. memfd_create() is still not included in glibc today, atlhough it's been available since Linux 3.17 in Oct 2014. memfd has numerous advantages over traditional shm/mmap for ipc memory sharing with fd handle

Re: [Qemu-devel] [PATCH 1/1] migration: fix deadlock

2015-09-30 Thread Igor Redko
On 25.09.2015 11:23, Wen Congyang wrote: On 09/25/2015 04:03 PM, Denis V. Lunev wrote: On 09/25/2015 04:21 AM, Wen Congyang wrote: On 09/24/2015 08:53 PM, Denis V. Lunev wrote: From: Igor Redko Release qemu global mutex before call synchronize_rcu(). synchronize_rcu() waiting for all readers

Re: [Qemu-devel] [PATCH v4 6/7] qdev: Protect device-list-properties against broken devices

2015-09-30 Thread Andreas Färber
Am 28.09.2015 um 22:08 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 v6 08/24] vhost: add vhost_set_log_base op

2015-09-30 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 +++

[Qemu-devel] [PATCH v6 17/24] vhost user: add rarp sending after live migration for legacy guest

2015-09-30 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] [Bug 1500935] [NEW] Qemu / KVM always wants to be on top

2015-09-30 Thread AlainKnaff
Public bug reported: Whenever I pass with the mouse over the KVM (qemu) window, it automatically raises on top, obscuring other windows on the same desktop, which is rather intrusive... No other application does this. > dpkg -l qemu-kvm Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Ins

[Qemu-devel] [PATCH v6 14/24] vhost-user: document migration log

2015-09-30 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

[Qemu-devel] [PATCH v6 19/24] vhost-user-test: remove useless static check

2015-09-30 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- tests/vhost-user-test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 88714ff..6662ca9 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -262,7 +262,6 @@

[Qemu-devel] [PATCH v6 01/24] vhost-user: unit test for new messages

2015-09-30 Thread marcandre . lureau
From: "Michael S. Tsirkin" Data is empty for now, but do make sure master sets the new feature bit flag. Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-test.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c inde

[Qemu-devel] [PATCH v4] fw_cfg: insert string blobs via qemu cmdline

2015-09-30 Thread Gabriel L. Somlo
Allow users to provide custom fw_cfg blobs with ascii string payloads specified directly on the qemu command line. Suggested-by: Jordan Justen Suggested-by: Laszlo Ersek Signed-off-by: Gabriel Somlo Reviewd-by: Laszlo Ersek --- New since v3: s/content/string/g for the option name, at Gerd'

[Qemu-devel] [PATCH v6 13/24] vhost: use a function for each call

2015-09-30 Thread marcandre . lureau
From: Marc-André Lureau Replace the generic vhost_call() by specific functions for each function call to help with type safety and changing arguments. While doing this, I found that "unsigned long long" and "uint64_t" were used interchangeably and causing compilation warnings, using uint64_t ins

[Qemu-devel] [PATCH v6 06/24] memfd: add fallback for memfd

2015-09-30 Thread marcandre . lureau
From: Marc-André Lureau Add an open/unlink/mmap fallback for system that do not support memfd. This patch may require additional SELinux policies to work for enforced systems, but should gracefully fail nonetheless. Signed-off-by: Marc-André Lureau --- util/memfd.c | 22 --

[Qemu-devel] [PATCH v6 00/24] vhost-user: add migration support

2015-09-30 Thread marcandre . lureau
From: Marc-André Lureau Hi, The following series implement shareable log for vhost-user to support memory tracking during live migration. On qemu-side, the solution is fairly straightfoward since vhost already supports the dirty log, only vhost-user couldn't access the log memory until then. Th

[Qemu-devel] [PATCH v6 15/24] net: add trace_vhost_user_event

2015-09-30 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] [PATCH v6 10/24] vhost: alloc shareable log

2015-09-30 Thread marcandre . lureau
From: Marc-André Lureau If the backend is requires it, allocate shareable memory. vhost_log_get() now uses 2 globals "vhost_log" and "vhost_log_shm", that way there is a common non-shareable log and a common shareable one. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 57 ++

Re: [Qemu-devel] [PATCH] ui/cocoa.m: run custom script menu item

2015-09-30 Thread Programmingkid
On Sep 29, 2015, at 1:18 PM, Peter Maydell wrote: > On 29 September 2015 at 18:03, Programmingkid > wrote: >> Allow the user the ability to run a custom script file. >> This patch adds a menu item called "Run Custom Script". >> When the user selects it, a open-file dialog has the >> user select

[Qemu-devel] [PATCH v6 05/24] util: add memfd helpers

2015-09-30 Thread marcandre . lureau
From: Marc-André Lureau Add qemu_memfd_alloc/free() helpers. The function helps to allocate and seal a memfd. Signed-off-by: Marc-André Lureau --- include/qemu/memfd.h | 4 util/memfd.c | 59 ++-- 2 files changed, 61 insertions(+),

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

2015-09-30 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 | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/vhost-user-test

Re: [Qemu-devel] [PATCH 3/3] kvm-all: notice KVM of vcpu's TSC rate after migration

2015-09-30 Thread Eduardo Habkost
On Tue, Sep 29, 2015 at 11:43:34AM +0800, Haozhong Zhang wrote: > On Mon, Sep 28, 2015 at 01:37:34PM -0300, Eduardo Habkost wrote: > > On Mon, Sep 28, 2015 at 01:38:31PM +0800, Haozhong Zhang wrote: [...] > > > static void do_kvm_cpu_synchronize_post_init(void *arg) > > > { > > > CPUState *c

[Qemu-devel] [PATCH v6 23/24] vhost-user-test: check ownership during migration

2015-09-30 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] [PATCH v6 07/24] vhost: document log resizing

2015-09-30 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- hw/virtio/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index c0ed5b2..67e09fe 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -334,6 +334,8 @@ static inline void vhost_d

[Qemu-devel] [PATCH v6 03/24] linux-headers: add unistd.h

2015-09-30 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é

[Qemu-devel] [PATCH] block/raw-posix: Open file descriptor O_RDWR to work around glibc posix_fallocate emulation issue.

2015-09-30 Thread Richard W.M. Jones
https://bugzilla.redhat.com/show_bug.cgi?id=1265196 The following command fails on an NFS mountpoint: $ qemu-img create -f qcow2 -o preallocation=falloc disk.img 262144 Formatting 'disk.img', fmt=qcow2 size=262144 encryption=off cluster_size=65536 preallocation='falloc' lazy_refcounts=off

Re: [Qemu-devel] [PATCH v4 4/5] acpi: arm: add fw_cfg device node to dsdt

2015-09-30 Thread Laszlo Ersek
On 09/29/15 20:26, Gabriel L. Somlo wrote: > On Tue, Sep 29, 2015 at 12:40:16PM +0200, Laszlo Ersek wrote: >> On 09/27/15 23:29, Gabriel L. Somlo wrote: >>> Add a fw_cfg device node to the ACPI DSDT. This is mostly >>> informational, as the authoritative fw_cfg MMIO region(s) >>> are listed in the

[Qemu-devel] [PATCH v6 22/24] vhost-user-test: add live-migration test

2015-09-30 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, 168 insertions(+), 3 deletions(

[Qemu-devel] [PATCH v6 09/24] vhost-user: add vhost_user_requires_shm_log()

2015-09-30 Thread marcandre . lureau
From: Marc-André Lureau Check if the backend has VHOST_USER_PROTOCOL_F_LOG_SHMFD feature and require a shared log. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c| 14 -- include/hw/virtio/vhost-backend.h | 4 2 files changed, 16 insertions(+), 2 delet

[Qemu-devel] [PATCH v6 12/24] vhost-user: add a migration blocker

2015-09-30 Thread marcandre . lureau
From: Marc-André Lureau If VHOST_USER_PROTOCOL_F_LOG_SHMFD is not announced, block vhost-user migration. Signed-off-by: Marc-André Lureau --- hw/virtio/vhost-user.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index cf14e38.

Re: [Qemu-devel] [PULL 0/7] X86 queue, 2015-09-28

2015-09-30 Thread Peter Maydell
On 29 September 2015 at 19:22, Eduardo Habkost wrote: > On Tue, Sep 29, 2015 at 12:28:15PM +0100, Peter Maydell wrote: >> I get a bunch of new warnings in the course of 'make check' now: >> >> warning: TCG doesn't support requested feature: CPUID.01H:EDX.de [bit 2] >> >> /home/petmay01/linaro/qemu

[Qemu-devel] [PATCH v6 11/24] vhost-user: send log shm fd along with log_base

2015-09-30 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 v6 24/24] vhost-user: use an enum helper for features mask

2015-09-30 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

[Qemu-devel] [PATCH v6 16/24] vhost user: add support of live migration

2015-09-30 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.

[Qemu-devel] [PATCH v6 18/24] vhost-user-test: move wait_for_fds() out

2015-09-30 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 | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 77b7b68

[Qemu-devel] [PATCH v6 20/24] vhost-user-test: wrap server in TestServer struct

2015-09-30 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 | 146 ++-- 1 file changed, 92 insertion

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

2015-09-30 Thread Sergey Fedorov
On 29.09.2015 12:33, Peter Maydell wrote: > On 28 September 2015 at 11:37, Sergey Fedorov wrote: >> Signed-off-by: Sergey Fedorov >> --- >> >> This patch is a prerequisite for a debug exception routing patch: >> https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg03542.html >> >> target-arm

Re: [Qemu-devel] [PATCH] block: disable I/O limits at the beginning of bdrv_close()

2015-09-30 Thread Andrey Korolyov
On Mon, Sep 28, 2015 at 12:04 PM, Alberto Garcia wrote: > On Mon 28 Sep 2015 02:18:33 AM CEST, Fam Zheng wrote: > >>> > Can this be abused? If I have a guest running in a cloud where the >>> > cloud provider has put severe throttling limits on me, but lets me >>> > hotplug to my heart's content,

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

2015-09-30 Thread Peter Maydell
On 29 September 2015 at 18:14, Sergey Fedorov wrote: > On 29.09.2015 12:33, Peter Maydell wrote: >> On 28 September 2015 at 11:37, Sergey Fedorov wrote: >> This field should be named mdcr_el2 if we have it, but: >> the reset value for this register is defined architecturally, >> so we don't need

[Qemu-devel] [PATCH] ui/cocoa.m: run custom script menu item

2015-09-30 Thread Programmingkid
Allow the user the ability to run a custom script file. This patch adds a menu item called "Run Custom Script". When the user selects it, a open-file dialog has the user select a text file with the custom scripts to run. This allows for virtually unlimited expandability. All monitor commands should

Re: [Qemu-devel] [PATCH v4 3/5] acpi: pc: add fw_cfg device node to ssdt

2015-09-30 Thread Gabriel L. Somlo
On Tue, Sep 29, 2015 at 12:33:40PM +0200, Laszlo Ersek wrote: > On 09/27/15 23:29, Gabriel L. Somlo wrote: > > Add a fw_cfg device node to the ACPI SSDT, on machine types > > pc-*-2.5 and up. While the guest-side BIOS can't utilize > > this information (since it has to access the hard-coded > > fw_

Re: [Qemu-devel] [PATCH v4 3/5] acpi: pc: add fw_cfg device node to ssdt

2015-09-30 Thread Laszlo Ersek
On 09/29/15 19:19, Gabriel L. Somlo wrote: > On Tue, Sep 29, 2015 at 06:55:01PM +0200, Laszlo Ersek wrote: >> On 09/29/15 18:46, Gabriel L. Somlo wrote: >>> On Tue, Sep 29, 2015 at 12:33:40PM +0200, Laszlo Ersek wrote: On 09/27/15 23:29, Gabriel L. Somlo wrote: > Add a fw_cfg device node t

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

2015-09-30 Thread Sergey Fedorov
On 29.09.2015 20:19, Peter Maydell wrote: > On 29 September 2015 at 18:14, Sergey Fedorov wrote: >> On 29.09.2015 12:33, Peter Maydell wrote: >>> On 28 September 2015 at 11:37, Sergey Fedorov wrote: >>> This field should be named mdcr_el2 if we have it, but: >>> the reset value for this register

Re: [Qemu-devel] [PATCH v4 3/5] acpi: pc: add fw_cfg device node to ssdt

2015-09-30 Thread Laszlo Ersek
On 09/29/15 18:46, Gabriel L. Somlo wrote: > On Tue, Sep 29, 2015 at 12:33:40PM +0200, Laszlo Ersek wrote: >> On 09/27/15 23:29, Gabriel L. Somlo wrote: >>> Add a fw_cfg device node to the ACPI SSDT, on machine types >>> pc-*-2.5 and up. While the guest-side BIOS can't utilize >>> this information

Re: [Qemu-devel] [PATCH v6 08/16] qapi: Test use of 'number' within alternates

2015-09-30 Thread Eric Blake
On 09/29/2015 07:38 AM, Markus Armbruster wrote: > Eric Blake writes: > >> 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 th

Re: [Qemu-devel] [PATCH] ui/cocoa.m: run custom script menu item

2015-09-30 Thread Peter Maydell
On 29 September 2015 at 18:03, Programmingkid wrote: > Allow the user the ability to run a custom script file. > This patch adds a menu item called "Run Custom Script". > When the user selects it, a open-file dialog has the > user select a text file with the custom scripts to run. > This allows fo

Re: [Qemu-devel] [PATCH 1/3] target-i386: add a subsection of vcpu's TSC rate in vmstate_x86_cpu

2015-09-30 Thread Dr. David Alan Gilbert
* Haozhong Zhang (haozhong.zh...@intel.com) wrote: > The newly added subsection 'vmstate_tsc_khz' in this patch results in > vcpu's TSC rate being saved on the source machine and loaded on the > target machine during the migration. > > Signed-off-by: Haozhong Zhang Hi, I'd appreciate it if you

Re: [Qemu-devel] [PATCH] target-tilegx: Support iret instruction and related special registers

2015-09-30 Thread Chen Gang
On 9/29/15 14:34, Richard Henderson wrote: > On 09/28/2015 03:06 PM, gang.chen.5...@gmail.com wrote: >> From: Chen Gang >> >> Acording to the __longjmp tilegx libc implementation, and reference from >> tilegx ISA document, we can left iret instruction empty. The related >> code is below: >> >>

  1   2   3   >