[Qemu-devel] [RFC PATCH v4] os-android: Add support to android platform

2015-10-02 Thread Houcheng Lin
Hi, The v4 patch uses qemu_getdtablesize(), remove os-android.h and use a local buffer when calling ptsname_r(). This patch is based on version: 007e620a7576e4ce2ea6955541e87d8ae8ed32ae. --- Building QEMU on android reqiures and

Re: [Qemu-devel] [RFC PATCH v3] os-android: Add support to android platform

2015-10-02 Thread Houcheng Lin
2015-09-28 19:40 GMT+08:00 Paolo Bonzini : > > > On 24/09/2015 15:21, Houcheng Lin wrote: >> +if [ "$android" = "yes" ] ; then >> + LIBS="-lglib-2.0 -lgthread-2.0 -lz -lpixman-1 -lintl -liconv -lc $LIBS" >> + libs_qga="-lglib-2.0 -lgthread-2.0 -lz -lpixman-1 -lintl -liconv -lc" >> +fi > > This ch

[Qemu-devel] [PATCH] target-tilegx: Implement v2mults instruction

2015-10-02 Thread gang . chen . 5i5j
From: Chen Gang Just according to v1multu instruction implementation. Signed-off-by: Chen Gang --- target-tilegx/helper.h | 1 + target-tilegx/simd_helper.c | 13 + target-tilegx/translate.c | 5 + 3 files changed, 19 insertions(+) diff --git a/target-tilegx/helper.h

Re: [Qemu-devel] [PATCH v6 07/12] qapi: Detect collisions in C member names

2015-10-02 Thread Eric Blake
On 10/02/2015 11:11 AM, Markus Armbruster wrote: >>> Why wrap function c_name() in a method? Why not simply call the >>> function? >> >> 'self.c_name()' is shorter than 'c_name(self.name)'. And I already had >> long lines with that seen[self.c_name()].describe() pattern. > > You could also try

Re: [Qemu-devel] [PATCH v2 5/8] target-arm: Add ARMMMUFaultInfo

2015-10-02 Thread Edgar E. Iglesias
On Thu, Oct 01, 2015 at 05:49:25PM -0700, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Introduce ARMMMUFaultInfo to propagate MMU Fault information > across the MMU translation code path. This is in preparation for > adding State-2 translation. > > No functional changes. > > Signed-

Re: [Qemu-devel] [RFC PATCH 07/10] spapr_pci: Allow PCI host bridge DMA window to be configured

2015-10-02 Thread Alexey Kardashevskiy
On 09/24/2015 04:59 PM, Laurent Vivier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 24/09/2015 01:54, David Gibson wrote: On Wed, Sep 23, 2015 at 08:55:01PM +0200, Laurent Vivier wrote: On 17/09/2015 15:09, David Gibson wrote: At present the PCI host bridge (PHB) for the pserie

Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable

2015-10-02 Thread Jordan Justen
On 2015-10-02 06:25:50, Laszlo Ersek wrote: > On 10/02/15 14:07, Gerd Hoffmann wrote: > > Hi, > > > >>> Any -kernel boot on x86 will use either linuxboot.bin or multiboot.bin. > >> > >> (Except when your firmware is OVMF -- OVMF has its own LoadLinuxLib. So, > >> if you decide to extend linuxboo

[Qemu-devel] [PATCH v2] libtasn1: check if static library is present

2015-10-02 Thread Laurent Vivier
Some distros [1] don't ship systematically static libraries, and pkg-config doesn't give us the information. This is the case for libtasn1, so add a check in configure to see if linker is able to find the library. [1] https://fedoraproject.org/wiki/Archive:PackagingDrafts/StaticLibraryPolicy Sig

Re: [Qemu-devel] [PATCH] libtasn1: check if static library is present

2015-10-02 Thread Peter Maydell
On 2 October 2015 at 22:46, Laurent Vivier wrote: > Some distros [1] don't ship systematically static libraries, > and pkg-config doesn't give us the information. > > This is the case for libtasn1, so add a check in configure > to see if linker is able to find the library. > > [1] https://fedorapr

Re: [Qemu-devel] [PATCH v1 2/3] xilinx_spips: Seperate the state struct into a header

2015-10-02 Thread Alistair Francis
On Wed, Sep 30, 2015 at 2:10 PM, Peter Crosthwaite wrote: > On Tue, Sep 29, 2015 at 4:03 PM, Alistair Francis > wrote: >> Seperate out the XilinxSPIPS struct into a seperate header >> file. >> >> Signed-off-by: Alistair Francis >> --- >> >> hw/ssi/xilinx_spips.c | 104 +-

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

2015-10-02 Thread Peter Maydell
On 2 October 2015 at 21:48, Christopher Covington wrote: > What I meant to ask was, do you see any reason for cpu_get_ticks() to exist? > If no architecture besides i386 wants to use it, perhaps the code should be > moved there. OTOH various non-x86 things do use the closely related cpu_get_real_

Re: [Qemu-devel] [PATCH v6 02/12] qapi: Don't use info as witness of implicit object type

2015-10-02 Thread Eric Blake
On 10/02/2015 10:57 AM, Eric Blake wrote: > On 10/02/2015 10:48 AM, Markus Armbruster wrote: > Do it the OO-way: QAPISchemaEntity.is_implicit() returns False. Any subclass that can have implicitly defined instances overrides it: QAPISchemaObjectType.is_implicit() tests for ':' pref

Re: [Qemu-devel] [Qemu-discuss] TCP options ipv4 and ipv6 have no effect

2015-10-02 Thread Peter Maydell
On 2 October 2015 at 19:20, Sair, Umair wrote: > If I am understanding correct, you are saying that we should set > addr->has_ipv6 and addr->has_ipv4 to true in any case, then in my opinion we > should simply ignore the value of addr->has_ipv* while evaluating the value > of ipv4 and ipv6 varia

Re: [Qemu-devel] [PATCH v6 06/12] qapi: Track owner of each object member

2015-10-02 Thread Eric Blake
On 10/02/2015 11:05 AM, Markus Armbruster wrote: >> Might be doable, but then we'd have to generate the implicit object name >> prior to creating its Member objects (thus splitting >> _make_implicit_object_type() into two parts). > > def _make_implicit_object_type(self, name, role, members):

[Qemu-devel] [PATCH] libtasn1: check if static library is present

2015-10-02 Thread Laurent Vivier
Some distros [1] don't ship systematically static libraries, and pkg-config doesn't give us the information. This is the case for libtasn1, so add a check in configure to see if linker is able to find the library. [1] https://fedoraproject.org/wiki/Archive:PackagingDrafts/StaticLibraryPolicy Sig

Re: [Qemu-devel] [PATCH v1 0/3] Connect the SPI devices to ZynqMP

2015-10-02 Thread Alistair Francis
On Thu, Oct 1, 2015 at 4:31 AM, Andrea Bolognani wrote: > On Tue, 2015-09-29 at 16:03 -0700, Alistair Francis wrote: >> Connect the SPI devices to Xilinx's ZynqMP. >> >> I also need to make some changes to the actual SPI device to >> imporove the fuctionality, but for the time being this works. >>

Re: [Qemu-devel] [PATCH v1 1/3] ssi: Move ssi.h into a seperate directory

2015-10-02 Thread Alistair Francis
On Thu, Oct 1, 2015 at 10:39 AM, Peter Crosthwaite wrote: > On Thu, Oct 1, 2015 at 10:19 AM, Alistair Francis > wrote: >> On Wed, Sep 30, 2015 at 2:06 PM, Peter Crosthwaite >> wrote: >>> On Tue, Sep 29, 2015 at 4:03 PM, Alistair Francis >>> wrote: Move the ssi.h include file into the ssi d

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

2015-10-02 Thread John Snow
On 09/21/2015 08:25 AM, Peter Lieven wrote: > PIO read requests on the ATAPI interface used to be sync blk requests. > This has to siginificant drawbacks. First the main loop hangs util an > I/O request is completed and secondly if the I/O request does not > complete (e.g. due to an unresponsive

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

2015-10-02 Thread Christopher Covington
On 10/02/2015 03:56 PM, Peter Crosthwaite wrote: > On Fri, Oct 2, 2015 at 12:25 PM, Christopher Covington > wrote: >> On 10/02/2015 01:25 PM, Peter Crosthwaite wrote: >>> On Fri, Oct 2, 2015 at 9:56 AM, Peter Maydell >>> wrote: On 2 October 2015 at 17:44, Christopher Covington wrote:

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

2015-10-02 Thread Peter Crosthwaite
On Fri, Oct 2, 2015 at 12:25 PM, Christopher Covington wrote: > On 10/02/2015 01:25 PM, Peter Crosthwaite wrote: >> On Fri, Oct 2, 2015 at 9:56 AM, Peter Maydell >> wrote: >>> On 2 October 2015 at 17:44, Christopher Covington >>> wrote: I've sent out the CPI test case and while exercising

Re: [Qemu-devel] [PATCH v12 2/5] apic: use per CPU AS to map APIC MMIO for TCG

2015-10-02 Thread Eduardo Habkost
On Fri, Oct 02, 2015 at 03:24:24PM -0300, Eduardo Habkost wrote: > On Tue, Sep 22, 2015 at 02:29:01PM +0200, Igor Mammedov wrote: > > On Wed, 16 Sep 2015 17:19:12 +0800 > > Zhu Guihua wrote: > > > > > TCG supports per CPU address space, and the emulation quality is > > > a bit better with it. > >

[Qemu-devel] [PATCH v5 47/48] ivshmem: use kvm irqfd for msi notifications

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Use irqfd for improving context switch when notifying the guest. If the host doesn't support kvm irqfd, regular msi notifications are still supported. Note: the ivshmem implementation doesn't allow switching between MSI and IO interrupts, this patch doesn't either. Signe

[Qemu-devel] [PATCH v5 44/48] ivshmem: add hostmem backend

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Instead of handling allocation, teach ivshmem to use a memory backend. This allows to use hugetlbfs backed memory now. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c| 84 +--- test

[Qemu-devel] [PATCH v5 45/48] ivshmem: remove EventfdEntry.vector

2015-10-02 Thread marcandre . lureau
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 Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[Qemu-devel] [PATCH v5 43/48] ivshmem: use qemu_strtosz()

2015-10-02 Thread marcandre . lureau
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 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index b8

[Qemu-devel] [PATCH v5 46/48] ivshmem: rename MSI eventfd_table

2015-10-02 Thread marcandre . lureau
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 Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/misc/ivshmem.c

[Qemu-devel] [PATCH v5 40/48] glib-compat: add 2.38/2.40/2.46 asserts

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Those are mostly useful for writing tests. Signed-off-by: Marc-André Lureau --- include/glib-compat.h | 61 +++ 1 file changed, 61 insertions(+) diff --git a/include/glib-compat.h b/include/glib-compat.h index 318e000..fb

[Qemu-devel] [PATCH v5 38/48] msix: implement pba write (but read-only)

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau qpci_msix_pending() writes on pba region, causing qemu to SEGV: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x77fba8c0 (LWP 25882)] 0x in ?? () (gdb) bt #0 0x in () #1 0x556556c5 in m

[Qemu-devel] [PATCH v5 31/48] contrib: add ivshmem client and server

2015-10-02 Thread marcandre . lureau
From: David Marchand When using ivshmem devices, notifications between guests can be sent as interrupts using a ivshmem-server (typical use described in documentation). The client is provided as a debug tool. Signed-off-by: Olivier Matz Signed-off-by: David Marchand [fix a valgrind warning, op

[Qemu-devel] [PATCH v5 37/48] contrib: remove unnecessary strdup()

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau getopt() optarg points to argv memory, no need to dup those values, fixes small leaks detected by clang-analyzer. Signed-off-by: Marc-André Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- contrib/ivshmem-client/main.c | 2 +- contrib/ivshmem-server/main.c | 6 +++-

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

2015-10-02 Thread Christopher Covington
On 10/02/2015 01:25 PM, Peter Crosthwaite wrote: > On Fri, Oct 2, 2015 at 9:56 AM, Peter Maydell > wrote: >> On 2 October 2015 at 17:44, Christopher Covington >> wrote: >>> I've sent out the CPI test case and while exercising it I noticed that >>> Laurent's patch fixed -icount. So my original g

[Qemu-devel] [PATCH v5 48/48] ivshmem: use little-endian int64_t for the protocol

2015-10-02 Thread marcandre . lureau
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-endian int64_t. This breaks the protocol, except on x64 little-endian ho

[Qemu-devel] [PATCH v5 34/48] ivshmem-server: fix hugetlbfs support

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau As pointed out on the ML by Andrew Jones, glibc no longer permits creating POSIX shm on hugetlbfs directly. When given a hugetlbfs path, create a shareable file there. Signed-off-by: Marc-André Lureau Reviewed-by: Vladimir Sementsov-Ogievskiy --- contrib/ivshmem-server

[Qemu-devel] [PATCH v5 33/48] ivshmem-server: use a uint16 for client ID

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau In practice, the number of VM is limited to MAXUINT16 in ivshmem, so use the same limit on the server (removes a theorical infinite loop) Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- contrib/ivshmem-server/ivshmem-server.c | 11 ++- contrib

[Qemu-devel] [PATCH v5 30/48] ivshmem: reset mask on device reset

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau The interrupt mask is a state value, it should be reset, like the interrupt status. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 50af4

[Qemu-devel] [PATCH v5 42/48] ivshmem: do not keep shm_fd open

2015-10-02 Thread marcandre . lureau
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 Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/hw/misc/ivshmem.c

[Qemu-devel] [PATCH v5 39/48] qtest: add qtest_add_abrt_handler()

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Allow a test to add abort handlers, use GHook for all handlers. There is currently no way to remove a handler, but it could be later added if needed. Signed-off-by: Marc-André Lureau --- tests/libqtest.c | 37 - tests/libqtest.h | 2

[Qemu-devel] [PATCH v5 41/48] tests: add ivshmem qtest

2015-10-02 Thread marcandre . lureau
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 directory to place server socket, both should be clear on exit and abort.

[Qemu-devel] [PATCH v5 26/48] ivshmem: add device description

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 9023f95..7be3d5e 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -925,6 +925,7 @

[Qemu-devel] [PATCH v5 25/48] ivshmem: check shm isn't already initialized

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau The server should not change the shm, and this isn't handled by qemu and we should should verify this in qemu. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/misc/ivshmem.

[Qemu-devel] [PATCH v5 24/48] ivshmem: shmfd can be 0

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau 0 is a valid fd value, so change conditions and set -1 value early Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index

[Qemu-devel] [PATCH v5 35/48] docs: update ivshmem device spec

2015-10-02 Thread marcandre . lureau
From: David Marchand Add some notes on the parts needed to use ivshmem devices: more specifically, explain the purpose of an ivshmem server and the basic concept to use the ivshmem devices in guests. Move some parts of the documentation and re-organise it. Signed-off-by: David Marchand Reviewed

[Qemu-devel] [PATCH v5 20/48] ivshmem: simplify a bit the code

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Use some more explicit variables to simplify the code. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 6ee4881..c054e52

[Qemu-devel] [PATCH v5 36/48] ivshmem: add check on protocol version in QEMU

2015-10-02 Thread marcandre . lureau
From: David Marchand Send a protocol version as the first message from server, clients must close communication if they don't support this protocol version. Older QEMUs should be fine with this change in the protocol since they overrides their own vm_id on reception of an id associated to no eve

[Qemu-devel] [PATCH v5 23/48] ivshmem: migrate with VMStateDescription

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau load_state_old() is used to keep compatibility with version 0. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 142 ++ 1 file changed, 89 insertions(+), 53 deletions(-) diff --gi

[Qemu-devel] [PATCH v5 32/48] ivshmem-client: check the number of vectors

2015-10-02 Thread marcandre . lureau
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/ivshmem-client.c | 5 + 1 file changed, 5 insertions(+) diff --git a/contrib/ivshmem-client/ivshmem-client.c b/con

[Qemu-devel] [PATCH v5 16/48] ivshmem: remove max_peer field

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau max_peer isn't really useful, it tracks the maximum received VM id, but that quickly matches nb_peers, the size of the peers array. Since VM come and go, there might be sparse peers so it doesn't help much in general to have this value around. Signed-off-by: Marc-André Lu

[Qemu-devel] [PATCH v5 28/48] ivshmem: replace 'guest' for 'peer' appropriately

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau The terms 'guest' and 'peer' are used sometime interchangeably which may be confusing. Instead, use 'peer' for the remote instances of ivshmem clients, and 'guest' for the local VM. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 2

[Qemu-devel] [PATCH v5 21/48] ivshmem: use common return

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Both if branches return, move this out to common end. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index c054e52..fbb6f40

[Qemu-devel] [PATCH v5 15/48] ivshmem: initialize max_peer to -1

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau There is no peer when device is initialized, do not let doorbell for inexisting peer 0. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/mi

[Qemu-devel] [PATCH v5 29/48] ivshmem: error on too many eventfd received

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau The number of eventfd that can be handled per peer is limited by the number of vectors. Return an error when receiving too many of them. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 8 1 file changed, 8 insertions(+) d

[Qemu-devel] [PATCH v5 19/48] ivshmem: print error on invalid peer id

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau The server shouldn't send invalid peer id, so print an error if it's the case. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index d7a00bd..6

[Qemu-devel] [PATCH v5 12/48] ivshmem: simplify around increase_dynamic_storage()

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Set the number of peers and array allocation in a single place. Rename to better reflect the function content. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 27 +++ 1 file changed, 11 insertions(+), 16 del

[Qemu-devel] [PATCH v5 17/48] ivshmem: improve debug messages

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Some misc improvements to ivshmem debug. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index c4c130d..50f9c8f 100644 --- a/hw/misc/ivshmem.c +++

[Qemu-devel] [PATCH v5 27/48] ivshmem: fix pci_ivshmem_exit()

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Free all objects owned by the device, making sure the device is free, fixing hot-unplug. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) d

[Qemu-devel] [PATCH v5 14/48] ivshmem: remove useless ivshmem_update_irq() val argument

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau val isn't used in ivshmem_update_irq() function. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 19640bb..374ecff

[Qemu-devel] [PATCH v5 22/48] ivshmem: use common is_power_of_2()

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau The common version correctly checks for 0 value case. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index fbb6f40..e678b

[Qemu-devel] [PATCH v5 13/48] ivshmem: allocate eventfds in resize_peers()

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau It simplifies a bit the code to allocate the array when setting the number of peers instead of lazily when receiving the first vector. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 11 ++- 1 file changed, 2 insertions(+),

[Qemu-devel] [PATCH v5 06/48] ivshmem: remove unnecessary dup()

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau qemu_chr_fe_get_msgfd() transfers ownership, there is no need to dup the fd. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/hw/misc/ivshmem.c

[Qemu-devel] [PATCH v5 11/48] ivshmem: limit maximum number of peers to G_MAXUINT16

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Limit the maximum number of peers to MAXUINT16. This is more realistic and better matches the limit of the doorbell register. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH v5 10/48] ivshmem: remove last exit(1)

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Failing to create a chardev shouldn't be fatal. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 62547c0..e7224b9 100644 -

[Qemu-devel] [PATCH v5 18/48] ivshmem: improve error handling

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau The test whether the chardev is an AF_UNIX socket rejects "-chardev socket,id=chr0,path=/tmp/foo,server,nowait -device ivshmem,chardev=chr0", but fails to explain why. Use an explicit error on why a chardev may be rejected. Signed-off-by: Marc-André Lureau Reviewed-by:

[Qemu-devel] [PATCH v5 09/48] ivshmem: more qdev conversion

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Use the latest qemu device modeling API, in particular, convert to realize to fix the error handling; right now a botched device_add ivhsmem command kills the VM. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 119

[Qemu-devel] [PATCH v5 05/48] ivshmem: factor out the incoming fifo handling

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Make a new function fifo_update_and_get() that can be reused by other functions (in next commits). Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 59 --- 1 file changed, 39 inser

[Qemu-devel] [PATCH v5 02/48] msix: add VMSTATE_MSIX_TEST

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau ivshmem is going to use MSIX state conditionally. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- include/hw/pci/msix.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h

[Qemu-devel] [PATCH v5 07/48] ivshmem: remove superflous ivshmem_attr field

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index fbeb731..7138b8d 100644 --- a/hw/misc/ivshmem.c +++ b/hw/

[Qemu-devel] [PATCH v5 08/48] ivshmem: remove useless doorbell field

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 7138b8d..dea4096 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -71,7 +71,6 @@ t

[Qemu-devel] [PATCH v5 04/48] ivshmem: fix number of bytes to push to fifo

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau If the fifo has 0 bytes, and the read is of size 1, the call to fifo8_push_all() will copy off boundary data. Signed-off-by: Marc-André Lureau Reviewed-by: Claudio Fontana --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc

[Qemu-devel] [PATCH v5 03/48] ivhsmem: read do not accept more than sizeof(long)

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau ivshmem_read() only reads sizeof(long) from the input buffer. Accepting more could lead to fifo8 abort() on 32bit systems if fifo is not empty. A following patch will change the protocol to 64-bit little-endian instead. Signed-off-by: Marc-André Lureau Reviewed-by: Cla

[Qemu-devel] [PATCH v5 00/48] ivshmem improvements

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau Hi, This series is mostly about adding the client/server code from David Marchand, code cleanups, and little improvements and fixes for ivshmem. Finally there is some ivshmem tests (they work fine without kvm btw). Git: https://github.com/elmarco/qemu.git ivshmem branch

[Qemu-devel] [PATCH v5 01/48] char: add qemu_chr_free()

2015-10-02 Thread marcandre . lureau
From: Marc-André Lureau If a chardev is allowed to be created outside of QMP, then it must be also possible to free it. This is useful for ivshmem that creates chardev anonymously and must be able to free them. Signed-off-by: Marc-André Lureau Acked-by: Paolo Bonzini Reviewed-by: Claudio Fonta

Re: [Qemu-devel] qemu-system-arm command line question

2015-10-02 Thread Gabriel L. Somlo
On Fri, Oct 02, 2015 at 07:37:37PM +0100, Richard W.M. Jones wrote: > On Fri, Oct 02, 2015 at 02:15:20PM -0400, Gabriel L. Somlo wrote: > > Trying to adapt the command line used with 32-bit arm, I ran: > > > > bin/qemu-system-aarch64 -M virt,accel=tcg -m 2048 -cpu cortex-a57 \ > > -kernel ./vmli

Re: [Qemu-devel] [PATCH COLO-Frame v9 03/32] COLO: migrate colo related info to slave

2015-10-02 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > We can know if VM in destination should go into COLO mode by refer to > the info that been migrated from PVM. > > We skip this section if colo is not enabled (i.e. > migrate_set_capability colo off), so that, It not break compatibility with

Re: [Qemu-devel] qemu-system-arm command line question

2015-10-02 Thread Richard W.M. Jones
On Fri, Oct 02, 2015 at 02:15:20PM -0400, Gabriel L. Somlo wrote: > Trying to adapt the command line used with 32-bit arm, I ran: > > bin/qemu-system-aarch64 -M virt,accel=tcg -m 2048 -cpu cortex-a57 \ > -kernel ./vmlinuz-4.0.4-301.fc22.aarch64 \ > -initrd ./initramfs-4.0.4-301.fc22.aarch64.im

Re: [Qemu-devel] [PATCH v7 03/24] util: add linux-only memfd fallback

2015-10-02 Thread Paolo Bonzini
Ah, so the answer is that mmap-alloc and memfd conflict. But if you order the files alphabetically they probably also conflict... :-) so separating the changes in two patches would not have helped. Michael is handling both patches so I guess he can resolve the conflict too. Paolo -Origina

Re: [Qemu-devel] [PATCH v7 03/24] util: add linux-only memfd fallback

2015-10-02 Thread Marc-André Lureau
On Fri, Oct 2, 2015 at 5:57 PM, Paolo Bonzini wrote: >> Will be easier to apply if this refactoring is a separate patch. > > Is someone doing anything conflicting in this area? (My answer: not > that I know of). so you mean that splitting over several lines isn't useful? The main reason I did

Re: [Qemu-devel] [PATCH v12 2/5] apic: use per CPU AS to map APIC MMIO for TCG

2015-10-02 Thread Eduardo Habkost
On Tue, Sep 22, 2015 at 02:29:01PM +0200, Igor Mammedov wrote: > On Wed, 16 Sep 2015 17:19:12 +0800 > Zhu Guihua wrote: > > > TCG supports per CPU address space, and the emulation quality is > > a bit better with it. > > So use per CPU address space to map APIC MMIO area. This allows the > > APIC

Re: [Qemu-devel] [PATCH 3/3] block: prohibit migration during transactions

2015-10-02 Thread John Snow
On 10/01/2015 02:01 PM, Paolo Bonzini wrote: > > > On 01/10/2015 18:34, John Snow wrote: >> + >> +error_setg(&blocker, "Block device(s) are in use by a Block >> Transaction"); > > s/Block Transaction/transaction command/ > > But how can migration start during a transaction? > Well, it

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

2015-10-02 Thread Peter Crosthwaite
On Fri, Oct 2, 2015 at 11:08 AM, Peter Maydell wrote: > On 2 October 2015 at 18:25, Peter Crosthwaite > wrote: >> So my idea here is the CPU input frequency should be a property of the CPU. >> >> Some experimental results confirm that the PMCCNTR on many common ARM >> implementations is directly

Re: [Qemu-devel] [PATCH 1/3] block: prohibit migration during BlockJobs

2015-10-02 Thread John Snow
On 10/01/2015 02:03 PM, Paolo Bonzini wrote: > > > On 01/10/2015 18:34, John Snow wrote: >> Unless we can prove this to be safe for specific cases, >> the default should be to prohibit migration during BlockJobs. > > Block jobs do not affect the current block, only other block device, > hence

[Qemu-devel] qemu-system-arm command line question

2015-10-02 Thread Gabriel L. Somlo
Hi Rich, On Tue, Jul 14, 2015 at 07:48:30PM +0100, Richard W.M. Jones wrote: > On Tue, Jul 14, 2015 at 02:23:14PM -0400, Gabriel L. Somlo wrote: > > On Tue, Jul 14, 2015 at 10:43:46AM +0100, Richard W.M. Jones wrote: > > > On Mon, Jul 13, 2015 at 04:09:37PM -0400, Gabriel L. Somlo wrote: > > > > 3

Re: [Qemu-devel] [PATCHv3 0/7] VFIO extensions to allow VFIO devices on spapr-pci-host-bridge

2015-10-02 Thread Alex Williamson
On Wed, 2015-09-30 at 12:13 +1000, David Gibson wrote: > Hi Alex, > > Here are the parts of my recent series to allow VFIO devices on the > spapr-pci-host-bridge device which affect the core VFIO code. They've > been revised according to the comments from yourself and others. > > There's also on

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

2015-10-02 Thread Peter Maydell
On 2 October 2015 at 18:25, Peter Crosthwaite wrote: > So my idea here is the CPU input frequency should be a property of the CPU. > > Some experimental results confirm that the PMCCNTR on many common ARM > implementations is directly connected to the input clock and can be > relied on as a straig

Re: [Qemu-devel] [PATCH v12 0/5] remove icc bus/bridge

2015-10-02 Thread Eduardo Habkost
On Wed, Sep 30, 2015 at 02:35:28PM +0800, Zhu Guihua wrote: > Hi Eduardo, > > Can you help merge this patch series to your x86 tree? Sorry for taking so long. Series applied to x86 tree. Thanks! -- Eduardo

Re: [Qemu-devel] feature idea: allow user to run custom scripts

2015-10-02 Thread Programmingkid
On Oct 2, 2015, at 12:21 PM, Eric Blake wrote: > On 10/02/2015 08:37 AM, Programmingkid wrote: >>> Even if it were a fancier GUI, I don't think it would really go very far to >>> providing users a solution which is on a par with VirtualBox or VMWare >>> Desktop >>> which are the benchmarks, as t

Re: [Qemu-devel] [PATCH] qmp-commands.hx: Update the supported 'transaction' operations

2015-10-02 Thread Max Reitz
On 02.10.2015 14:12, Kashyap Chamarthy wrote: > Although the canonical source of reference for QMP commands is > qapi-schema.json, for consistency's sake, update qmp-commands.hx to > state the list of supported transactionable operations, namely: > > drive-backup > blockdev-backup > bl

Re: [Qemu-devel] [Qemu-discuss] TCP options ipv4 and ipv6 have no effect

2015-10-02 Thread Peter Maydell
(looping in qemu-devel and Paolo) On 2 October 2015 at 17:54, Sair, Umair wrote: > I am working with qemu-2.4.0. I built it using mingw on Windows. I am having > a problem while connecting it to gdb. I figured out that qemu gdb server is > running on IPv6 whereas gdb tries to connect on IPv4. Thi

Re: [Qemu-devel] [PATCH v2 14/16] blockjob: Store device name at job creation

2015-10-02 Thread Max Reitz
On 01.10.2015 15:13, Kevin Wolf wrote: > Some block jobs change the block device graph on completion. This means > that the device that owns the job and originally was addressed with its > device name may no longer be what the corresponding BlockBackend points > to. > > Previously, the effects of

[Qemu-devel] [PULL 03/10] macio: move DBDMA_init from instance_init to realize

2015-10-02 Thread Markus Armbruster
From: Paolo Bonzini DBDMA_init is not idempotent, and calling it from instance_init breaks a simple object_new/object_unref pair. Work around this, pending qdev-ification of DBDMA, by moving the call to realize. Reported-by: Markus Armbruster Signed-off-by: Paolo Bonzini Reviewed-by: Thomas H

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

2015-10-02 Thread Max Reitz
On 01.10.2015 15:13, Kevin Wolf wrote: > Remember all parent nodes and just change the pointers there instead of > swapping the contents of the BlockDriverState. > > Handling of snapshot=on must be moved further down in bdrv_open() > because *pbs (which is the bs pointer in the BlockBackend) must

[Qemu-devel] [PULL 04/10] tests: Fix how qom-test is run

2015-10-02 Thread 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 architectures inherit their tests from others, like this: check-qte

[Qemu-devel] [PULL 06/10] libqtest: New hmp() & friends

2015-10-02 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 08/10] qmp: Fix device-list-properties not to crash for abstract device

2015-10-02 Thread Markus Armbruster
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 Reviewed-by: Andreas Färber Message-Id: <144368-12182-9-git-send-email-arm...@redhat.com> --- qmp.c

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

2015-10-02 Thread Peter Crosthwaite
On Fri, Oct 2, 2015 at 9:56 AM, Peter Maydell wrote: > On 2 October 2015 at 17:44, Christopher Covington wrote: >> I've sent out the CPI test case and while exercising it I noticed that >> Laurent's patch fixed -icount. So my original goal has been accomplished. I'm >> happy to rebase this patch

Re: [Qemu-devel] [PATCH v2 11/16] block-backend: Add blk_set_bs()

2015-10-02 Thread Max Reitz
On 01.10.2015 15:13, Kevin Wolf wrote: > It allows changing the BlockDriverState that a BlockBackend points to. > > Signed-off-by: Kevin Wolf > --- > block/block-backend.c | 17 + > include/block/block_int.h | 2 ++ > 2 files changed, 19 insertions(+) Reviewed-by: Max Reitz

[Qemu-devel] [PULL 09/10] qdev: Protect device-list-properties against broken devices

2015-10-02 Thread 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 device to find its properties. Broken in commit f4eb32b "qmp: s

[Qemu-devel] [PULL 07/10] device-introspect-test: New, covering device introspection

2015-10-02 Thread Markus Armbruster
The test doesn't check that the output makes any sense, only that QEMU survives. Useful since we've had an astounding number of crash bugs around there. In fact, we have a bunch of them right now: several devices crash or hang, and some leave dangling pointers behind. The test skips testing the

[Qemu-devel] [PULL 10/10] Revert "qdev: Use qdev_get_device_class() for -device , help"

2015-10-02 Thread Markus Armbruster
This reverts commit 31bed5509dfcbdfc293154ce81086a4dbd7a80b6. The reverted commit changed qdev_device_help() to reject abstract devices and devices that have cannot_instantiate_with_device_add_yet set, to fix crash bugs like -device x86_64-cpu,help. Rejecting abstract devices makes sense: they're

[Qemu-devel] [PULL 01/10] memory: allow destroying a non-empty MemoryRegion

2015-10-02 Thread Markus Armbruster
From: Paolo Bonzini This is legal; the MemoryRegion will simply unreference all the existing subregions and possibly bring them down with it as well. However, it requires a bit of care to avoid an infinite loop. Finalizing a memory region cannot trigger an address space update, but memory_region_

[Qemu-devel] [PULL 02/10] hw: do not pass NULL to memory_region_init from instance_init

2015-10-02 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

  1   2   3   4   >