Re: [Qemu-devel] [PATCH] qga: Use g_new() & friends where that makes obvious sense

2015-09-24 Thread Markus Armbruster
Ping? Markus Armbruster writes: > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > for two reasons. One, it catches multiplication overflowing size_t. > Two, it returns T * rather than void *, which lets the compiler catch > more type errors. > > This

Re: [Qemu-devel] No error report when using the qemu-img.exetoconvert a disk to vmdk format which is saved on a disk that has nomorespace

2015-09-24 Thread Guangmu Zhu
Hi Kevin, I tried the patch you provide, and I haven't seen that problem yet. If the disk space is full, an error will be reported with the message "Invalid argument" and the program will stop. Will you merge the patch to the master? Thanks. Guangmu Zhu diff --git a/block/raw-win32.c

[Qemu-devel] [RfC PATCH 00/10] vnc buffer handling

2015-09-24 Thread Gerd Hoffmann
Hi, Here is a patch series to improve the vnc buffer handling. It picks up the qio_buffer patches from Daniel, adds move calls (move data from one buffer to another) and tracing, makes vnc use the new features. Net effect should be that (a) vnc copies less data around and (b) buffers don't

Re: [Qemu-devel] No error report when using the qemu-img.exetoconvert a disk to vmdk format which is saved on a disk that has nomorespace

2015-09-24 Thread Kevin Wolf
Am 24.09.2015 um 10:01 hat Guangmu Zhu geschrieben: > Hi Kevin, > > I tried the patch you provide, and I haven't seen that problem yet. If the > disk > space is full, an error will be reported with the message "Invalid argument" > and the program will stop. > > Will you merge the patch to the

Re: [Qemu-devel] [PATCH v11 2/7] vhost-user: add protocol feature negotiation

2015-09-24 Thread Marcel Apfelbaum
On 09/23/2015 07:19 AM, Yuanhan Liu wrote: From: "Michael S. Tsirkin" Support a separate bitmask for vhost-user protocol features, and messages to get/set protocol features. Invoke them at init. No features are defined yet. [ leverage vhost_user_call for request handling --

Re: [Qemu-devel] [PATCH] hw/arm/virt: smbios: inform guest of kvm

2015-09-24 Thread Andrew Jones
On Wed, Sep 23, 2015 at 09:09:11AM -0700, Peter Maydell wrote: > On 23 September 2015 at 08:43, Peter Maydell wrote: > > On 23 September 2015 at 07:18, Andrew Jones wrote: > >> ARM/AArch64 KVM guests don't have any way to identify > >> themselves as

Re: [Qemu-devel] [PATCH v11 1/7] vhost-user: use VHOST_USER_XXX macro for switch statement

2015-09-24 Thread Michael S. Tsirkin
On Thu, Sep 24, 2015 at 01:05:11PM +0300, Marcel Apfelbaum wrote: > On 09/23/2015 07:19 AM, Yuanhan Liu wrote: > >So that we could let vhost_user_call to handle extented requests, > >such as VHOST_USER_GET/SET_PROTOCOL_FEATURES, instead of invoking > >vhost_user_read/write and constructing the msg

Re: [Qemu-devel] [PATCH v2 04/11] virtio-gpu: move iov free to virtio_gpu_cleanup_mapping_iov

2015-09-24 Thread Michael S. Tsirkin
On Thu, Sep 24, 2015 at 11:04:55AM +0200, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann It's easy to see this is what the patch does. But why? Some explanation in the commit log about why it's done, as opposed to what is done, would be better. > --- >

Re: [Qemu-devel] [PATCH v7 41/42] Disable mlock around incoming postcopy

2015-09-24 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > Userfault doesn't work with mlock; mlock is designed to nail down pages > > so they don't move, userfault is designed to tell

Re: [Qemu-devel] [PATCH v11 2/7] vhost-user: add protocol feature negotiation

2015-09-24 Thread Yuanhan Liu
On Thu, Sep 24, 2015 at 01:13:24PM +0300, Marcel Apfelbaum wrote: > On 09/23/2015 07:19 AM, Yuanhan Liu wrote: > >From: "Michael S. Tsirkin" > > > >Support a separate bitmask for vhost-user protocol features, > >and messages to get/set protocol features. > > > >Invoke them at

[Qemu-devel] [PATCH v4 06/47] ivshmem: remove unnecessary dup()

2015-09-24 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 --- hw/misc/ivshmem.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-)

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

2015-09-24 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 --- hw/misc/ivshmem.c | 59

[Qemu-devel] [PATCH v4 17/47] ivshmem: improve debug messages

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

[Qemu-devel] [PATCH v4 16/47] ivshmem: remove max_peer field

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

[Qemu-devel] [PATCH v4 12/47] ivshmem: simplify around increase_dynamic_storage()

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

Re: [Qemu-devel] [PATCH v3] ui/cocoa.m: Add Mount image file menu item

2015-09-24 Thread Programmingkid
On Sep 24, 2015, at 2:57 AM, Markus Armbruster wrote: > Programmingkid writes: > >> On Sep 23, 2015, at 4:35 PM, Peter Maydell wrote: >> >>> On 17 September 2015 at 21:17, Programmingkid >>> wrote: Add "Mount Image File..." and a

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

2015-09-24 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 --- hw/misc/ivshmem.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-)

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

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

[Qemu-devel] [PATCH v4 26/47] ivshmem: add device description

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

[Qemu-devel] [PATCH v4 35/47] docs: update ivshmem device spec

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

[Qemu-devel] [PATCH v4 34/47] ivshmem-server: fix hugetlbfs support

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

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

2015-09-24 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,

Re: [Qemu-devel] [PATCH v3] spapr: generate DT node names

2015-09-24 Thread Laurent Vivier
On 24/09/2015 11:34, Michael S. Tsirkin wrote: > On Wed, Sep 23, 2015 at 02:14:03PM +0200, Laurent Vivier wrote: >> When DT node names for PCI devices are generated by SLOF, >> they are generated according to the type of the device >> (for instance, ethernet for virtio-net-pci device). >> >>

Re: [Qemu-devel] [Qemu-block] [PATCH] tests: Fix test 049 fallout from improved HMP error messages

2015-09-24 Thread Alberto Garcia
On Wed 23 Sep 2015 01:15:52 AM CEST, Eric Blake wrote: > Commit 50b7b000 improved HMP error messages, but forgot to update > qemu-iotests to match. > > Reported-by: Kevin Wolf > Signed-off-by: Eric Blake Reviewed-by: Alberto Garcia

Re: [Qemu-devel] [PATCH] pc: Set broken_reserved_end on pc-*-2.4, not 2.5

2015-09-24 Thread Igor Mammedov
On Wed, 23 Sep 2015 12:04:49 -0300 Eduardo Habkost wrote: > Version 1 of the pc-*-2.5 machine class series was applied to the PCI > tree instead of v3 (which was rebased after the broken_reserved_end > patch by Igor was included). > > This patch includes the missing hunks

Re: [Qemu-devel] [PATCH] tests: Fix test 049 fallout from improved HMP error messages

2015-09-24 Thread Kevin Wolf
Am 23.09.2015 um 01:15 hat Eric Blake geschrieben: > Commit 50b7b000 improved HMP error messages, but forgot to update > qemu-iotests to match. > > Reported-by: Kevin Wolf > Signed-off-by: Eric Blake Thanks, applied to the block branch. > I'm not sure if

Re: [Qemu-devel] [PATCH v11 0/7] vhost-user multiple queue support

2015-09-24 Thread Marcel Apfelbaum
On 09/23/2015 07:19 AM, Yuanhan Liu wrote: Hi, Here is the updated patch set for enabling vhost-user multiple queue. And I did proper and formal testing this time. This patch set introduces 2 more vhost user messages: VHOST_USER_GET_QUEUE_NUM, for querying how many queues the backend supports,

Re: [Qemu-devel] [PATCH] hw/arm/virt: smbios: inform guest of kvm

2015-09-24 Thread Andrew Jones
On Wed, Sep 23, 2015 at 08:43:39AM -0700, Peter Maydell wrote: > On 23 September 2015 at 07:18, Andrew Jones wrote: > > ARM/AArch64 KVM guests don't have any way to identify > > themselves as KVM guests (x86 guests use a CPUID leaf). Now, we > > could discuss all sorts of

[Qemu-devel] [PATCH v4 2/2] spapr: generate DT node names

2015-09-24 Thread Laurent Vivier
When DT node names for PCI devices are generated by SLOF, they are generated according to the type of the device (for instance, ethernet for virtio-net-pci device). Node name for hotplugged devices is generated by QEMU. This patch adds the mechanic to QEMU to create the node name according to the

[Qemu-devel] [PATCH v4 0/2] spapr: generate DT node names

2015-09-24 Thread Laurent Vivier
When DT node names for PCI devices are generated by SLOF, they are generated according to the type of the device (for instance, ethernet for virtio-net-pci device). Node name for hotplugged devices is generated by QEMU. This series adds the mechanic to QEMU to create the node name according to

[Qemu-devel] [PATCH v4 09/47] ivshmem: more qdev conversion

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

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

2015-09-24 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:

[Qemu-devel] [PATCH v4 07/47] ivshmem: remove superflous ivshmem_attr field

2015-09-24 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- 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 ---

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

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

[Qemu-devel] [PATCH v4 18/47] ivshmem: improve error handling

2015-09-24 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:

Re: [Qemu-devel] [PATCH] exec: factor out duplicate mmap code

2015-09-24 Thread Michael S. Tsirkin
On Thu, Sep 24, 2015 at 02:44:41PM +0300, Michael S. Tsirkin wrote: > 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 Och

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

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

[Qemu-devel] [PATCH v4 43/47] ivshmem: add hostmem backend

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

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

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

[Qemu-devel] [PATCH v4 30/47] ivshmem: reset mask on device reset

2015-09-24 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 --- hw/misc/ivshmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/misc/ivshmem.c

Re: [Qemu-devel] [PATCH] tests: Fix test 049 fallout from improved HMP error messages

2015-09-24 Thread Markus Armbruster
Kevin Wolf writes: > Am 23.09.2015 um 01:15 hat Eric Blake geschrieben: >> Commit 50b7b000 improved HMP error messages, but forgot to update >> qemu-iotests to match. >> >> Reported-by: Kevin Wolf >> Signed-off-by: Eric Blake > > Thanks,

[Qemu-devel] [PATCH v3] docs: describe the QEMU build system structure / design

2015-09-24 Thread Daniel P. Berrange
Developers who are new to QEMU, or have a background familiarity with GNU autotools, can have trouble getting their head around the home-grown QEMU build system. This document attempts to explain the structure / design of the configure script and the various Makefile pieces that live across the

Re: [Qemu-devel] [PATCH v11 01/12] qmp: delete qemu opts when delete an object

2015-09-24 Thread Yang Hongyang
On 09/24/2015 05:42 PM, Markus Armbruster wrote: Yang Hongyang writes: On 09/24/2015 03:43 PM, Markus Armbruster wrote: This has finally reached the front of my review queue. I apologize for the lng delay. Copying Paolo for another pair of eyeballs (he wrote

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

2015-09-24 Thread Eduardo Otubo
On Thu, Sep 10, 2015 at 08=54=28PM -0400, namn...@safe-mail.net wrote: > > The current intention of the seccomp filter in QEMU, is that /all/ existing > > QEMU features continue to work unchanged. So even if a flag is used in a > > seemingly uncommon code path, we still need to allow that in a

Re: [Qemu-devel] [PATCH v11 01/12] qmp: delete qemu opts when delete an object

2015-09-24 Thread Yang Hongyang
On 09/24/2015 05:42 PM, Markus Armbruster wrote: Yang Hongyang writes: On 09/24/2015 03:43 PM, Markus Armbruster wrote: This has finally reached the front of my review queue. I apologize for the lng delay. Copying Paolo for another pair of eyeballs (he wrote

Re: [Qemu-devel] [PATCH] iotests: disable core dumps in test 061

2015-09-24 Thread Kevin Wolf
Am 24.09.2015 um 08:45 hat Markus Armbruster geschrieben: > Max Reitz writes: > > > On 23.09.2015 18:11, Alberto Garcia wrote: > >> Commit 934659c460 disabled the supression of segmentation faults in > >> bash tests. The new output of test 061, however, assumes that a core >

Re: [Qemu-devel] RFC: virtio-peer shared memory based peer communication device

2015-09-24 Thread Michael S. Tsirkin
On Mon, Sep 21, 2015 at 02:32:10PM +0200, Jan Kiszka wrote: > On 2015-09-21 14:13, Michael S. Tsirkin wrote: > > On Fri, Sep 18, 2015 at 06:29:27PM +0200, Claudio Fontana wrote: > >> Hello, > >> > >> this is a first RFC for virtio-peer 0.1, which is still very much a work > >> in progress: > >> >

Re: [Qemu-devel] [PATCH] pc: Set broken_reserved_end on pc-*-2.4, not 2.5

2015-09-24 Thread Michael S. Tsirkin
On Wed, Sep 23, 2015 at 12:04:49PM -0300, Eduardo Habkost wrote: > Version 1 of the pc-*-2.5 machine class series was applied to the PCI > tree instead of v3 (which was rebased after the broken_reserved_end > patch by Igor was included). > > This patch includes the missing hunks from v3, to make

Re: [Qemu-devel] [PATCH] qga: Use g_new() & friends where that makes obvious sense

2015-09-24 Thread Michael Roth
Quoting Markus Armbruster (2015-09-24 02:02:41) > Ping? Thanks, applied to qga tree: https://github.com/mdroth/qemu/commits/qga > > Markus Armbruster writes: > > > g_new(T, n) is neater than g_malloc(sizeof(T) * n). It's also safer, > > for two reasons. One, it catches

Re: [Qemu-devel] [PULL 6/7] vmxnet3: Drop net_vmxnet3_info.can_receive

2015-09-24 Thread Shmulik Ladkani
Hi, On Thu, 3 Sep 2015 10:19:19 +0300, shmulik.ladk...@ravellosystems.com wrote: > On Wed, 2 Sep 2015 17:14:52 +0100, stefa...@redhat.com wrote: > > From: Fam Zheng > > > > Commit 6e99c63 ("net/socket: Drop net_socket_can_send") changed the > > semantics around .can_receive

Re: [Qemu-devel] [PATCH v11 01/12] qmp: delete qemu opts when delete an object

2015-09-24 Thread Markus Armbruster
Yang Hongyang writes: > On 09/24/2015 05:42 PM, Markus Armbruster wrote: >> Yang Hongyang writes: >> >>> On 09/24/2015 03:43 PM, Markus Armbruster wrote: This has finally reached the front of my review queue. I apologize for the lng

[Qemu-devel] [PATCH v4 20/47] ivshmem: simplify a bit the code

2015-09-24 Thread marcandre . lureau
From: Marc-André Lureau Use some more explicit variables to simplify the code. nth_eventfd variable is the current eventfd to be manipulated. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 28 ++-- 1

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

2015-09-24 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 --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1

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

2015-09-24 Thread marcandre . lureau
From: Marc-André Lureau Failing to create a chardev shouldn't be fatal. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c

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

2015-09-24 Thread marcandre . lureau
From: Marc-André Lureau load_state_old() is used to keep compatibility with version 0. Signed-off-by: Marc-André Lureau --- hw/misc/ivshmem.c | 141 ++ 1 file changed, 88

[Qemu-devel] [PATCH v4 27/47] ivshmem: fix pci_ivshmem_exit()

2015-09-24 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 --- hw/misc/ivshmem.c | 38 +++--- 1 file changed, 35

Re: [Qemu-devel] [PATCH v3] spapr: generate DT node names

2015-09-24 Thread Michael S. Tsirkin
On Wed, Sep 23, 2015 at 02:14:03PM +0200, Laurent Vivier wrote: > When DT node names for PCI devices are generated by SLOF, > they are generated according to the type of the device > (for instance, ethernet for virtio-net-pci device). > > Node name for hotplugged devices is generated by QEMU. >

Re: [Qemu-devel] [PATCH v7 22/42] migrate_start_postcopy: Command to trigger transition to postcopy

2015-09-24 Thread Dr. David Alan Gilbert
* Amit Shah (amit.s...@redhat.com) wrote: > On (Mon) 13 Jul 2015 [20:07:52], Juan Quintela wrote: > > "Dr. David Alan Gilbert" wrote: > > > * Juan Quintela (quint...@redhat.com) wrote: > > > >> > +void qmp_migrate_start_postcopy(Error **errp) > > >> > +{ > > >> > +

Re: [Qemu-devel] [PATCH v11 4/7] vhost-user: add VHOST_USER_GET_QUEUE_NUM message

2015-09-24 Thread Marcel Apfelbaum
On 09/23/2015 07:19 AM, Yuanhan Liu wrote: This is for querying how many queues the backend supports if it has mq support(when VHOST_USER_PROTOCOL_F_MQ flag is set from the quried /s/quried/queried Only if you plan to send another version, we can fix it on top. protocol features).

Re: [Qemu-devel] [PATCH v4 1/2] PCI: add missing classes in pci_ids.h to build device tree

2015-09-24 Thread Thomas Huth
On 24/09/15 12:27, Laurent Vivier wrote: > To allow QEMU to add PCI entries in device tree, > we must have a more exhaustive list of PCI class IDs. > > This patch synchronizes as much as possible with > pci_ids.h and add some missing IDs from SLOF. > > Signed-off-by: Laurent Vivier

[Qemu-devel] [RFC PATCH v1 1/2] spapr: Allocate HTAB from machine init

2015-09-24 Thread Bharata B Rao
Allocate HTAB from ppc_spapr_init() so that we can abort the guest if requested HTAB size is't allocated by the host. However retain the htab reset call in spapr_reset_htab() so that HTAB gets reset (and not allocated) during machine reset. Signed-off-by: Bharata B Rao

[Qemu-devel] [RFC PATCH v1 2/2] spapr: Abort when HTAB of requested size isn't allocated

2015-09-24 Thread Bharata B Rao
Terminate the guest when HTAB of requested size isn't allocated by the host. When memory hotplug is attempted on a guest that has booted with less than requested HTAB size, the guest kernel will not be able to gracefully fail the hotplug request. This patch will ensure that we never end up in a

Re: [Qemu-devel] [PATCH v11 01/12] qmp: delete qemu opts when delete an object

2015-09-24 Thread Markus Armbruster
Yang Hongyang writes: > On 09/24/2015 05:42 PM, Markus Armbruster wrote: >> Yang Hongyang writes: >> >>> On 09/24/2015 03:43 PM, Markus Armbruster wrote: This has finally reached the front of my review queue. I apologize for the lng

[Qemu-devel] [PATCH v4 15/47] ivshmem: initialize max_peer to -1

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

[Qemu-devel] [PATCH v4 31/47] contrib: add ivshmem client and server

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

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

2015-09-24 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(-)

[Qemu-devel] [PATCH v4 21/47] ivshmem: use common return

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

[Qemu-devel] [PATCH v4 24/47] ivshmem: shmfd can be 0

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

[Qemu-devel] [PATCH v4 22/47] ivshmem: use common is_power_of_2()

2015-09-24 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(+),

Re: [Qemu-devel] [PATCH] libseccomp: add cacheflush to whitelist

2015-09-24 Thread Eduardo Otubo
On Wed, Jul 01, 2015 at 09=12=33AM -0400, Andrew Jones wrote: > cacheflush is an arm-specific syscall that qemu built for arm > uses. Add it to the whitelist. > > Signed-off-by: Andrew Jones > > --- > > I'm not sure about the priority selection. Maybe cacheflush gets > used

Re: [Qemu-devel] [PATCH v11 01/12] qmp: delete qemu opts when delete an object

2015-09-24 Thread Markus Armbruster
Yang Hongyang writes: > On 09/24/2015 03:43 PM, Markus Armbruster wrote: >> This has finally reached the front of my review queue. I apologize for >> the lng delay. >> >> Copying Paolo for another pair of eyeballs (he wrote this code). >> > [...] >>> + >>> +opts =

Re: [Qemu-devel] [PATCH RFC V4 0/4] Implement GIC-500 from GICv3 family for arm64

2015-09-24 Thread Pavel Fedin
Hello! Nice to see things moving on. I am waiting for PULL to be applied to master, and after this i'll be able to proceed with other things, including live migration. As part of it, i already rewrote state structure using bitops, so that it's free of CPU number restrictions. Would be nice

Re: [Qemu-devel] [PATCH v11 3/7] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE

2015-09-24 Thread Marcel Apfelbaum
On 09/23/2015 07:19 AM, Yuanhan Liu wrote: Quote from Michael: We really should rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE. I suggest to change this to a better commit message :) You can take anything from the mail thread discussion about it. Suggested-by: Michael S. Tsirkin

Re: [Qemu-devel] [PATCH v11 1/7] vhost-user: use VHOST_USER_XXX macro for switch statement

2015-09-24 Thread Marcel Apfelbaum
On 09/23/2015 07:19 AM, Yuanhan Liu wrote: So that we could let vhost_user_call to handle extented requests, such as VHOST_USER_GET/SET_PROTOCOL_FEATURES, instead of invoking vhost_user_read/write and constructing the msg again by ourself. Signed-off-by: Yuanhan Liu

Re: [Qemu-devel] [PATCH v11 1/7] vhost-user: use VHOST_USER_XXX macro for switch statement

2015-09-24 Thread Marcel Apfelbaum
On 09/24/2015 01:18 PM, Michael S. Tsirkin wrote: On Thu, Sep 24, 2015 at 01:05:11PM +0300, Marcel Apfelbaum wrote: On 09/23/2015 07:19 AM, Yuanhan Liu wrote: So that we could let vhost_user_call to handle extented requests, such as VHOST_USER_GET/SET_PROTOCOL_FEATURES, instead of invoking

[Qemu-devel] [PATCH v4 1/2] PCI: add missing classes in pci_ids.h to build device tree

2015-09-24 Thread Laurent Vivier
To allow QEMU to add PCI entries in device tree, we must have a more exhaustive list of PCI class IDs. This patch synchronizes as much as possible with pci_ids.h and add some missing IDs from SLOF. Signed-off-by: Laurent Vivier Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [RFC PATCH v1 0/2] spapr: Abort when HTAB size requirement can't be met

2015-09-24 Thread Bharata B Rao
HTAB size is a factor of maximum memory size that is specified by maxmem= command line option. In cases where there is shortage of host memory, host will not be able to allocate contiguous memory for guest HTAB and will instead allocate a smaller HTAB. This usually is not a problem but when user

Re: [Qemu-devel] [PATCH v3] docs: describe the QEMU build system structure / design

2015-09-24 Thread Laszlo Ersek
On 09/24/15 11:49, Daniel P. Berrange wrote: > Developers who are new to QEMU, or have a background familiarity > with GNU autotools, can have trouble getting their head around the > home-grown QEMU build system. This document attempts to explain > the structure / design of the configure script

Re: [Qemu-devel] [PATCH v11 2/7] vhost-user: add protocol feature negotiation

2015-09-24 Thread Yuanhan Liu
On Thu, Sep 24, 2015 at 01:13:24PM +0300, Marcel Apfelbaum wrote: > >diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c > >index 1d76b94..9d32d76 100644 > >--- a/hw/net/vhost_net.c > >+++ b/hw/net/vhost_net.c > >@@ -152,8 +152,10 @@ struct vhost_net *vhost_net_init(VhostNetOptions > >*options)

[Qemu-devel] [PATCH v4 00/47] ivshmem improvements

2015-09-24 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:

[Qemu-devel] [PATCH v4 02/47] msix: add VMSTATE_MSIX_TEST

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

[Qemu-devel] [PATCH v4 01/47] char: add qemu_chr_free()

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

[Qemu-devel] [PATCH v4 08/47] ivshmem: remove useless doorbell field

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

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

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

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

2015-09-24 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 --- hw/misc/ivshmem.c | 8 1

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

2015-09-24 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 --- hw/misc/ivshmem.c | 11 ++- 1

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

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

Re: [Qemu-devel] [PATCH v11 02/12] init/cleanup of netfilter object

2015-09-24 Thread Markus Armbruster
Yang Hongyang writes: > On 09/24/2015 04:41 PM, Markus Armbruster wrote: >> Yang Hongyang writes: >> >>> Add a netfilter object based on QOM. >>> >>> A netfilter is attached to a netdev, captures all network packets >>> that pass through the netdev.

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

2015-09-24 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 | 4 1 file changed, 4 insertions(+)

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

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

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

2015-09-24 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 --- hw/misc/ivshmem.c | 8 1 file changed, 4

[Qemu-devel] [PATCH v4 37/47] contrib: remove unnecessary strdup()

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

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

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

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

2015-09-24 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 --- hw/misc/ivshmem.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-)

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

2015-09-24 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 ()

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

2015-09-24 Thread Laurent Vivier
-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 pseries machine >>> type has a fixed DMA

Re: [Qemu-devel] [RFC PATCH 05/10] memory: Allow replay of IOMMU mapping notifications

2015-09-24 Thread Laurent Vivier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 24/09/2015 01:50, David Gibson wrote: > On Wed, Sep 23, 2015 at 07:04:55PM +0200, Laurent Vivier wrote: >> >> >> On 17/09/2015 15:09, David Gibson wrote: >>> When we have guest visible IOMMUs, we allow notifiers to be >>> registered which will

[Qemu-devel] [PATCH 3/5] net/dump: Separate the NetClientState from the DumpState

2015-09-24 Thread Thomas Huth
With the upcoming dumping-via-netfilter patch, the DumpState should not be related to NetClientState anymore, so move the related information to a new struct called DumpNetClient. Signed-off-by: Thomas Huth --- net/dump.c | 74

[Qemu-devel] [PATCH 0/5] Network traffic dumping via netfilter

2015-09-24 Thread Thomas Huth
The "-net dump" option only works with the "-net" option. So far, it is not possible to dump network traffic with the "-netdev" option yet. This patch series now fixes this ugliness by enabling dumping for the netdev devices via the new netfilter infrastructure from Yang Hongyang (integration into

Re: [Qemu-devel] [PATCH] virtio-9p: migrate virtio subsections

2015-09-24 Thread Greg Kurz
On Mon, 21 Sep 2015 10:09:34 +0200 Greg Kurz wrote: > On Sat, 19 Sep 2015 15:34:02 +0530 > "Aneesh Kumar K.V" wrote: > > > Greg Kurz writes: > > > > > In a cross-endian setup, the virtio-9p device has state

  1   2   3   4   >