Re: [Qemu-devel] [PATCH RFC V5 9/9] hw/arm: Add virt-v3 machine that uses GIC-500

2015-10-21 Thread Pavel Fedin
Hello! > -Original Message- > From: Shlomo Pongratz [mailto:shlomopongr...@gmail.com] > Sent: Tuesday, October 20, 2015 8:22 PM > To: qemu-devel@nongnu.org > Cc: p.fe...@samsung.com; peter.mayd...@linaro.org; eric.au...@linaro.org; > shannon.z...@linaro.org; imamm...@redhat.com; ash...@br

[Qemu-devel] [PATCH] ehci: clear suspend bit on detach

2015-10-21 Thread Gerd Hoffmann
When a device is detached, clear the suspend bit (PORTSC_SUSPEND) in the port status register. The specs are not *that* clear what is supposed to happen in case a suspended device is unplugged. But the enable bit (PORTSC_PED) is cleared, and the specs mention setting suspend with enable being uns

Re: [Qemu-devel] [PATCH] ehci: clear suspend bit on detach

2015-10-21 Thread Hans de Goede
Hi, On 21-10-15 09:44, Gerd Hoffmann wrote: When a device is detached, clear the suspend bit (PORTSC_SUSPEND) in the port status register. The specs are not *that* clear what is supposed to happen in case a suspended device is unplugged. But the enable bit (PORTSC_PED) is cleared, and the spec

Re: [Qemu-devel] [PULL 0/9] Next set of s390x patches

2015-10-21 Thread David Hildenbrand
> On Tue, 20 Oct 2015 16:35:44 +0100 > Peter Maydell wrote: > > > On 20 October 2015 at 16:00, Cornelia Huck wrote: > > > The following changes since commit > > > ee9dfed242610ecb91418270fd46b875ed56e201: > > > > > > Merge remote-tracking branch > > > 'remotes/kraxel/tags/pull-input-20151020

Re: [Qemu-devel] [PATCH v3 0/2] PCI-e device multi-function hot-add support

2015-10-21 Thread Cao jin
Hello Michael On 10/13/2015 09:10 PM, Michael S. Tsirkin wrote: On Tue, Oct 13, 2015 at 07:54:07PM +0800, Cao jin wrote: On 10/13/2015 04:49 PM, Michael S. Tsirkin wrote: On Tue, Oct 13, 2015 at 04:41:33PM +0800, Cao jin wrote: Support PCI-e device hot-add multi-function via device_add, jus

Re: [Qemu-devel] [Qemu-block] Dynamic reconfiguration

2015-10-21 Thread Markus Armbruster
Sorry for my slow reply. Kevin Wolf writes: > Am 08.10.2015 um 13:02 hat Kevin Wolf geschrieben: >> Am 08.10.2015 um 08:15 hat Markus Armbruster geschrieben: >> > Max Reitz writes: >> > > E.g. you may have a block filter in the future where you want to >> > > exchange its child BDS. This exchan

Re: [Qemu-devel] [PATCH v8 33/54] postcopy: Incoming initialisation

2015-10-21 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Signed-off-by: Dr. David Alan Gilbert > Reviewed-by: David Gibson > Reviewed-by: Amit Shah > +/* > + * At the end of migration, undo the effects of init_range > + * opaque should be the MIS. > + */ > +static int cleanu

Re: [Qemu-devel] [PATCH COLO-Frame v9 08/32] COLO/migration: establish a new communication path from destination to source

2015-10-21 Thread zhanghailiang
On 2015/10/21 3:32, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: On 2015/10/19 17:54, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Add a new member 'to_src_file' to MigrationIncomingState and a new member 'from_d

Re: [Qemu-devel] [PATCH RFC V5 9/9] hw/arm: Add virt-v3 machine that uses GIC-500

2015-10-21 Thread Shlomo Pongratz
See inline. On Wednesday, October 21, 2015, Pavel Fedin wrote: > Hello! > > > -Original Message- > > From: Shlomo Pongratz [mailto:shlomopongr...@gmail.com ] > > Sent: Tuesday, October 20, 2015 8:22 PM > > To: qemu-devel@nongnu.org > > Cc: p.fe...@samsung.com ; peter.mayd...@linaro.org

Re: [Qemu-devel] [PATCH 0/3] Add 'blockdev-del' command

2015-10-21 Thread Markus Armbruster
Alberto Garcia writes: > Here's my first attempt at the 'blockdev-del' command. > > This series goes on top of Max's "BlockBackend and media" v6: > > https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg02810.html > > With Max's code, 'blockdev-add' can now create a BlockDriverState with > or

Re: [Qemu-devel] [v2 0/4] Fix long vm downtime during live migration

2015-10-21 Thread Li, Liang Z
> > Some cleanup operations take long time during the pause and copy > > stage, especially with the KVM patch 3ea3b7fa9af067, do these > > operations after the completion of live migration can help to reduce > > VM > downtime. > > > > Ony the first patch changes the behavior, the rest 3 patches

Re: [Qemu-devel] [PATCH v2 04/16] ui: convert VNC startup code to use SocketAddress

2015-10-21 Thread Daniel P. Berrange
On Tue, Oct 20, 2015 at 09:36:29PM +0100, Peter Maydell wrote: > On 20 October 2015 at 19:50, Daniel P. Berrange wrote: > > On Tue, Oct 20, 2015 at 06:01:37PM +0100, Peter Maydell wrote: > >> On 20 October 2015 at 14:39, Daniel P. Berrange > >> wrote: > >> > On Mon, Oct 19, 2015 at 04:20:09PM -0

Re: [Qemu-devel] [PATCH 0/3] Add 'blockdev-del' command

2015-10-21 Thread Alberto Garcia
On Wed 21 Oct 2015 10:57:32 AM CEST, Markus Armbruster wrote: > blockdev-add is a big & hairy feature that has taken considerable time > to develop, spanning multiple releases, and still isn't quite done > (never been closer, though). As such, it's a textbook example of an > experimental interfa

[Qemu-devel] [PATCH v2 3/5] vhost-user-test: add multiple queue test

2015-10-21 Thread Yuanhan Liu
Setting VHOST_USER_PROTOCOL_F_MQ protocol feature bit to claim that we support MQ feature, and simply assume we support 0xff queue pairs at most. Cc: Michael S. Tsirkin Cc: Jason Wang Signed-off-by: Yuanhan Liu --- v2: use macro to define the max queues we support --- tests/vhost-user-test.c

[Qemu-devel] [PATCH v2 2/5] doc: vhost-user: request naming fix

2015-10-21 Thread Yuanhan Liu
They are VHOST_USER_XXX instead of VHOST_XXX messages. Also, add VHOST_USER_GET_QUEUE_NUM to the section that requries replies. Cc: Michael S. Tsirkin Signed-off-by: Yuanhan Liu --- docs/specs/vhost-user.txt | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/

[Qemu-devel] [PATCH v2 1/5] Revert "vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE"

2015-10-21 Thread Yuanhan Liu
This reverts commit d1f8b30ec8dde0318fd1b98d24a64926feae9625. It turned out that it breaks stuff, so revert it: http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg00949.html CC: "Michael S. Tsirkin" Reported-by: Paolo Bonzini Signed-off-by: Yuanhan Liu --- docs/specs/vhost-user.t

[Qemu-devel] [PATCH v2 4/5] Revert "vhost-user: Send VHOST_RESET_OWNER on vhost stop"

2015-10-21 Thread Yuanhan Liu
Don't send VHOST_RESET_OWNER, for as Michael stated: Because we need to get the state from remote after stop. RESET_OWNER discards that, so we can't resume the VM. This reverts commit 294ce717e0f212ed0763307f3eab72b4a1bdf4d0. Cc: Luke Gorrie Cc: Michael S. Tsirkin Signed-off-by: Yuanha

[Qemu-devel] [PATCH v2 5/5] vhost: send VHOST_USER_SET_VRING_ENABLE at start/stop

2015-10-21 Thread Yuanhan Liu
Send VHOST_USER_SET_VRING_ENABLE at start/stop when multiple queue is negotiated, to inform the backend that we are ready or not. And exclude VHOST_USER_GET_QUEUE_NUM as one time request, as we need to get max_queues for each vhost_dev. Suggested-by: Michael S. Tsirkin Signed-off-by: Yuanhan Liu

Re: [Qemu-devel] [PATCH v8 36/54] Split out end of migration code from migration_thread

2015-10-21 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: v> From: "Dr. David Alan Gilbert" > > The code that gets run at the end of the migration process > is getting large, and is about to have a chunk added for postcopy. > Split it into a separate function. > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by:

Re: [Qemu-devel] [PATCH v3 0/2] PCI-e device multi-function hot-add support

2015-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 04:32:17PM +0800, Cao jin wrote: > Hello Michael > > On 10/13/2015 09:10 PM, Michael S. Tsirkin wrote: > >On Tue, Oct 13, 2015 at 07:54:07PM +0800, Cao jin wrote: > >> > >> > >>On 10/13/2015 04:49 PM, Michael S. Tsirkin wrote: > >>>On Tue, Oct 13, 2015 at 04:41:33PM +0800,

Re: [Qemu-devel] [PATCH 2/6] e1000: Trivial implementation of various MAC registers

2015-10-21 Thread Leonid Bloch
Hi Jason, thanks for the review! On Tue, Oct 20, 2015 at 8:40 AM, Jason Wang wrote: > > > > On 10/18/2015 03:53 PM, Leonid Bloch wrote: > > These registers appear in Intel's specs, but were not implemented. > > These registers are now implemented trivially, i.e. they are initiated > > with zero v

Re: [Qemu-devel] [PATCH v8 37/54] Postcopy: End of iteration

2015-10-21 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > The end of migration in postcopy is a bit different since some of > the things normally done at the end of migration have already been > done on the transition to postcopy. > > Signed-off-by: Dr. David Alan Gilbert Revie

Re: [Qemu-devel] [PATCH 1/3] Revert "vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE"

2015-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 04:55:16PM +0800, Yuanhan Liu wrote: > On Fri, Oct 16, 2015 at 10:47:49AM +0300, Michael S. Tsirkin wrote: > > On Fri, Oct 16, 2015 at 03:32:56PM +0800, Yuanhan Liu wrote: > > > On Fri, Oct 16, 2015 at 10:21:40AM +0300, Michael S. Tsirkin wrote: > > > > On Fri, Oct 16, 2015

Re: [Qemu-devel] [PATCH v8 53/54] Disable mlock around incoming postcopy

2015-10-21 Thread Juan Quintela
"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 you when they're not > there. > > munlock the pages we userfault protect before postcopy. > mlock

Re: [Qemu-devel] [PATCH v8 35/54] Postcopy: Postcopy startup in migration thread

2015-10-21 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Rework the migration thread to setup and start postcopy. > > Signed-off-by: Dr. David Alan Gilbert > Reviewed-by: Amit Shah > diff --git a/include/migration/migration.h b/include/migration/migration.h > index aecf284..

[Qemu-devel] [PATCH v2 0/1] vhost-user: support of live migration with multiqueue

2015-10-21 Thread Thibaut Collet
Patches serie for vhost-user live migration from Marc-Andre Lureau [PATCH v8 00/27] vhost-user: add migration support (http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg02452.html) does not work if multiqueue is set. This patch correct an issue of queue index when a migration is started wi

[Qemu-devel] [PATCH v2 1/1] vhost: set the correct queue index in case of migration with multiqueue

2015-10-21 Thread Thibaut Collet
When a live migration is started the log address to mark dirty pages is provided to the vhost backend through the vhost_dev_set_log function. This function is called for each queue pairs but the queue index provided to the vhost_virtqueue_set_addr function is wrongly set: always set to the first qu

Re: [Qemu-devel] [PATCH 1/3] Revert "vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE"

2015-10-21 Thread Yuanhan Liu
On Fri, Oct 16, 2015 at 10:47:49AM +0300, Michael S. Tsirkin wrote: > On Fri, Oct 16, 2015 at 03:32:56PM +0800, Yuanhan Liu wrote: > > On Fri, Oct 16, 2015 at 10:21:40AM +0300, Michael S. Tsirkin wrote: > > > On Fri, Oct 16, 2015 at 03:18:59PM +0800, Yuanhan Liu wrote: > > > > This reverts commit d

Re: [Qemu-devel] [PATCH 6/6] e1000: Implementing various counters

2015-10-21 Thread Leonid Bloch
On Tue, Oct 20, 2015 at 9:34 AM, Jason Wang wrote: > > > On 10/18/2015 03:53 PM, Leonid Bloch wrote: >> This implements the following Statistic registers (various counters) >> according to Intel's specs: >> >> TSCTC GOTCL GOTCH GORCL GORCH MPRC BPRC RUCROC >> BPTC MPTC PTC... PRC.

Re: [Qemu-devel] [PATCH 1/3] Revert "vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE"

2015-10-21 Thread Yuanhan Liu
On Wed, Oct 21, 2015 at 12:15:52PM +0300, Michael S. Tsirkin wrote: > On Wed, Oct 21, 2015 at 04:55:16PM +0800, Yuanhan Liu wrote: > > On Fri, Oct 16, 2015 at 10:47:49AM +0300, Michael S. Tsirkin wrote: > > > On Fri, Oct 16, 2015 at 03:32:56PM +0800, Yuanhan Liu wrote: > > > > On Fri, Oct 16, 2015

Re: [Qemu-devel] [PATCH] hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT

2015-10-21 Thread Paolo Bonzini
On 20/10/2015 20:14, Laszlo Ersek wrote: > Commit 4d00636e97b7 ("ich9: Add the lpc chip", Nov 14 2012) added the > ich9_apm_ctrl_changed() ioport write callback function such that it would > inject the SMI, in response to a write to the APM_CNT register, on the > first CPU, invariably. > > Since

Re: [Qemu-devel] Statically Compiling including SDL

2015-10-21 Thread sai pavan
On Tue, Oct 20, 2015 at 11:52 PM, Peter Maydell wrote: > On 20 October 2015 at 18:50, sai pavan wrote: >> I also tried manually compiling sdl libraries and installing them. >> Then making a static build, but even that did not help much. The >> config.log show below error.. >> >> cc -m32 -D_GNU_SO

Re: [Qemu-devel] [PATCH v2 0/3] virtio-blk: no scsi-passthrough by default

2015-10-21 Thread Stefan Hajnoczi
On Fri, Oct 16, 2015 at 12:25:51PM +0200, Cornelia Huck wrote: > Lightly tested on s390x. > > Changes v1->v2: > - have the s390x compat hander include HW_COMPAT > - prepare the pseries 2.4 compat handler > - switch compat property at virtio-blk-device instead of the > transport level > > Cornel

Re: [Qemu-devel] [PATCH v2 1/1] vhost: set the correct queue index in case of migration with multiqueue

2015-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 11:19:14AM +0200, Thibaut Collet wrote: > When a live migration is started the log address to mark dirty pages is > provided > to the vhost backend through the vhost_dev_set_log function. > This function is called for each queue pairs but the queue index provided to > the

Re: [Qemu-devel] [PATCH v2 06/22] block: Add "supports_stats" field to BlockStats

2015-10-21 Thread Stefan Hajnoczi
On Fri, Oct 16, 2015 at 11:49:00AM +0200, Alberto Garcia wrote: > On Thu 15 Oct 2015 04:58:22 PM CEST, Stefan Hajnoczi wrote: > >> > If I/O accounting isn't being used then all fields will be 0? > >> > >> Yes, but there's no way to tell if that happens because I/O > >> accounting is not supported

[Qemu-devel] [PULL 00/38] vhost, pc, virtio features, fixes, cleanups

2015-10-21 Thread Michael S. Tsirkin
The following changes since commit 6d57410a79d51d92673c54f26624b44f27fa6214: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20151016' into staging (2015-10-17 12:31:33 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags

[Qemu-devel] [PULL 05/38] vhost: add vhost_has_free_slot() interface

2015-10-21 Thread Michael S. Tsirkin
From: Igor Mammedov it will allow for other parts of QEMU check if it's safe to map memory region during hotplug/runtime. That way hotplug path will have a chance to cancel hotplug operation instead of crashing in vhost_commit(). Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Sig

[Qemu-devel] [PULL 04/38] tests: re-enable vhost-user-test

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau Commit 7fe34ca9c2e actually disabled vhost-user-test altogether, since CONFIG_VHOST_NET is a per-target config variable. tests/vhost-user-test is already x86/64 softmmu specific test, in order to enable it correctly, kvm & vhost-net are also conditions. To check that, set

[Qemu-devel] [PULL 03/38] net: don't set native endianness

2015-10-21 Thread Michael S. Tsirkin
commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991 vhost-net: tell tap backend about the vnet endianness makes vhost net always try to set LE - even if that matches the native endian-ness. This makes it fail on older kernels on x86 without TUNSETVNETLE support. To fix, make qemu_set_vnet_le/qemu

[Qemu-devel] [PULL 01/38] intel_iommu: Add support for translation for devices behind bridges

2015-10-21 Thread Michael S. Tsirkin
From: Knut Omang - Use a hash table indexed on bus pointers to store information about buses instead of using the bus numbers. Bus pointers are stored in a new VTDBus struct together with the vector of device address space pointers indexed by devfn. - The bus number is still used for lookup

[Qemu-devel] [PULL 07/38] vhost: fail backend intialization early

2015-10-21 Thread Michael S. Tsirkin
From: Igor Mammedov Don't initialize vhost backend if memslots number exceeds the supported limit. This prevents failures down the road when backend is actually started. [MST: rewrite commit log] Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin -

[Qemu-devel] [PULL 08/38] virtio: add some migration doc

2015-10-21 Thread Michael S. Tsirkin
From: Cornelia Huck Try to cover the basics of virtio migration. Signed-off-by: Cornelia Huck Reviewed-by: Greg Kurz Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Jason Wang --- docs/virtio-migration.txt | 106 ++

[Qemu-devel] [PULL 19/38] vhost-user: send log shm fd along with log_base

2015-10-21 Thread Michael S. Tsirkin
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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by:

[Qemu-devel] [PULL 02/38] exec: factor out duplicate mmap code

2015-10-21 Thread Michael S. Tsirkin
Anonymous and file-backed RAM allocation are now almost exactly the same. Reduce code duplication by moving RAM mmap code out of oslib-posix.c and exec.c. Reported-by: Marc-André Lureau Signed-off-by: Michael S. Tsirkin Reviewed-by: Paolo Bonzini Acked-by: Paolo Bonzini Tested-by: Thibaut Co

[Qemu-devel] [PULL 11/38] build-sys: split util-obj- on multi-lines

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau Make it easier to add new unrelated units with shorter lines. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- util/Makefile.objs | 11 --- 1 file changed, 8 insertions(+), 3 dele

[Qemu-devel] [PULL 09/38] configure: probe for memfd

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau Check if memfd_create() is part of system libc. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- configure | 19 +++ 1 file changed, 19 insertions(+) diff --git a/configu

[Qemu-devel] [PULL 24/38] vhost user: add support of live migration

2015-10-21 Thread Michael S. Tsirkin
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] [PULL 06/38] pc-dimm: add vhost slots limit check before commiting to hotplug

2015-10-21 Thread Michael S. Tsirkin
From: Igor Mammedov it allows safely cancel memory hotplug if vhost backend doesn't support necessary amount of memory slots and prevents QEMU crashing in vhost due to hitting vhost limit on amount of supported memory ranges. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-

[Qemu-devel] [PULL 13/38] util: add memfd helpers

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau Add qemu_memfd_alloc/free() helpers. The function helps to allocate and seal shared memory. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- include/qemu/memfd.h | 4 +++ util/memfd.c

[Qemu-devel] [PULL 31/38] vhost-user-test: learn to tweak various qemu arguments

2015-10-21 Thread Michael S. Tsirkin
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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- tests/vhost-user-test.c | 25

[Qemu-devel] [PULL 16/38] vhost: add vhost_set_log_base op

2015-10-21 Thread Michael S. Tsirkin
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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet -

[Qemu-devel] [PULL 36/38] vhost: set the correct queue index in case of migration with multiqueue

2015-10-21 Thread Michael S. Tsirkin
From: Thibaut Collet When a live migration is started the log address to mark dirty pages is provided to the vhost backend through the vhost_dev_set_log function. This function is called for each queue pairs but the queue index is wrongly set: always set to the first queue pair. Then vhost backen

[Qemu-devel] [PULL 10/38] linux-headers: add unistd.h

2015-10-21 Thread Michael S. Tsirkin
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] [PULL 21/38] vhost: use a function for each call

2015-10-21 Thread Michael S. Tsirkin
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] [PULL 14/38] util: add fallback for qemu_memfd_alloc()

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau Add an open/unlink/mmap fallback for system that do not support memfd (only available since 3.17, ~1y ago). This patch may require additional SELinux policies to work for enforced systems, but should fail gracefully in this case. Signed-off-by: Marc-André Lureau Reviewe

[Qemu-devel] [PULL 25/38] vhost user: add rarp sending after live migration for legacy guest

2015-10-21 Thread Michael S. Tsirkin
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] [PULL 15/38] vhost: document log resizing

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- hw/virtio/vhost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index f14a5c5..f5ecaf0 100644

[Qemu-devel] [PULL 18/38] vhost: alloc shareable log

2015-10-21 Thread Michael S. Tsirkin
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 Reviewed-by: Michael S. Tsirkin Signe

[Qemu-devel] [PULL v2 5/9] s390x: unify device reset during subsystem_reset()

2015-10-21 Thread Cornelia Huck
From: David Hildenbrand We have to manually reset several devices that are not on a bus: Let's collect them in an array. Reviewed-by: Cornelia Huck Acked-by: Christian Borntraeger Signed-off-by: David Hildenbrand Signed-off-by: Cornelia Huck --- hw/s390x/s390-virtio-ccw.c | 31 +

[Qemu-devel] [PULL 26/38] vhost-user: use an enum helper for features mask

2015-10-21 Thread Michael S. Tsirkin
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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Micha

[Qemu-devel] [PULL 17/38] vhost-user: add vhost_user_requires_shm_log()

2015-10-21 Thread Michael S. Tsirkin
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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- include/hw/virtio/vhost-backend.h | 4 hw

[Qemu-devel] [PULL 27/38] vhost: add migration block if memfd failed

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- include/qemu/memfd.h | 2 ++ hw/virtio/vhost.c| 3 +++ util/memfd.c | 22 ++ 3 files changed, 27 insertio

[Qemu-devel] [PULL v2 0/9] Next set of s390x patches

2015-10-21 Thread Cornelia Huck
ry at: git://github.com/cohuck/qemu tags/s390x-20151021-v2 for you to fetch changes up to 1cd4e0f6f0a6b1978a5868b41d4faae2071dc4ee: s390x/cmma: clean up cmma reset (2015-10-21 12:21:30 +0200) More s390x patches. The first ones

[Qemu-devel] [PULL 20/38] vhost-user: add a migration blocker

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau If VHOST_USER_PROTOCOL_F_LOG_SHMFD is not announced, block vhost-user migration. The blocker is removed in vhost_dev_cleanup(). Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- hw/virtio/

[Qemu-devel] [PULL 29/38] vhost-user-test: remove useless static check

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- 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 827c0c4.

[Qemu-devel] [PULL 30/38] vhost-user-test: wrap server in TestServer struct

2015-10-21 Thread Michael S. Tsirkin
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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- tests/vhost-u

[Qemu-devel] [PULL 28/38] vhost-user-test: move wait_for_fds() out

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau This function is a precondition for most vhost-user tests. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- tests/vhost-user-test.c | 18 ++ 1 file changed, 14 insertions(

[Qemu-devel] [PULL 22/38] vhost-user: document migration log

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- docs/specs/vhost-user.txt | 48 +-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --gi

[Qemu-devel] [PULL 12/38] util: add linux-only memfd fallback

2015-10-21 Thread Michael S. Tsirkin
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

[Qemu-devel] [PULL 33/38] vhost-user-test: check ownership during migration

2015-10-21 Thread Michael S. Tsirkin
From: Marc-André Lureau Check that backend source and destination do not have simultaneous ownership during migration. Signed-off-by: Marc-André Lureau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Tested-by: Thibaut Collet --- tests/vhost-user-test.c | 38 ++

[Qemu-devel] [PULL 38/38] hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT

2015-10-21 Thread Michael S. Tsirkin
From: Laszlo Ersek Commit 4d00636e97b7 ("ich9: Add the lpc chip", Nov 14 2012) added the ich9_apm_ctrl_changed() ioport write callback function such that it would inject the SMI, in response to a write to the APM_CNT register, on the first CPU, invariably. Since this register is used by guest co

[Qemu-devel] [PULL v2 3/9] s390x/kvm: Fix vector validity bit in device machine checks

2015-10-21 Thread Cornelia Huck
From: Christian Borntraeger Device hotplugs trigger a crw machine check. All machine checks have validity bits for certain register types. With vector support we also have to claim that vector registers are valid. This is a band-aid suitable for stable. Long term we should create the full mcic v

[Qemu-devel] [PULL v1 0/4] Misc fixes for crypto code module

2015-10-21 Thread Daniel P. Berrange
ypto-fixes-pull-20151021-1 for you to fetch changes up to 635b2807565e0724e4aed73f8ca54f14df051499: configure: avoid polluting global CFLAGS with tasn1 flags (2015-10-21 11:42:42 +0100) Merge qcrypto-fixes

[Qemu-devel] [PULL v1 4/4] configure: avoid polluting global CFLAGS with tasn1 flags

2015-10-21 Thread Daniel P. Berrange
The previous commit commit 9a2fd4347c40321f5cbb4ab4220e759fcbf87d03 Author: Daniel P. Berrange Date: Mon Apr 13 14:01:39 2015 +0100 crypto: add sanity checking of TLS x509 credentials defined new variables $TEST_LIBS and $TEST_CFLAGS and used them in tests/Makefile to augment $LIBS

Re: [Qemu-devel] [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENTED function

2015-10-21 Thread Stefan Hajnoczi
On Wed, Oct 21, 2015 at 12:26:35AM +0800, Xiao Guangrong wrote: > > > On 10/20/2015 11:51 PM, Stefan Hajnoczi wrote: > >On Mon, Oct 19, 2015 at 08:54:14AM +0800, Xiao Guangrong wrote: > >>+exit: > >>+/* Write our output result to dsm memory. */ > >>+((dsm_out *)dsm_ram_addr)->len = out->l

[Qemu-devel] [PULL v1 1/4] crypto: allow use of nettle/gcrypt to be selected explicitly

2015-10-21 Thread Daniel P. Berrange
Currently the choice of whether to use nettle or gcrypt is made based on what gnutls is linked to. There are times when it is desirable to be able to force build against a specific library. For example, if testing changes to QEMU's crypto code all 3 possible backends need to be checked regardless o

Re: [Qemu-devel] [PATCH v9 04/17] vnc: hoist allocation of VncBasicInfo to callers

2015-10-21 Thread Markus Armbruster
Eric Blake writes: > On 10/20/2015 08:46 AM, Markus Armbruster wrote: >> Gerd Hoffmann writes: >> >>> Hi, >>> > -static VncBasicInfo *vnc_basic_info_get(struct sockaddr_storage *sa, > -socklen_t salen) > +static void vnc_basic_info_get(struc

[Qemu-devel] [PULL v1 3/4] crypto: add sanity checking of plaintext/ciphertext length

2015-10-21 Thread Daniel P. Berrange
When encrypting/decrypting data, the plaintext/ciphertext buffers are required to be a multiple of the cipher block size. If this is not done, nettle will abort and gcrypt will report an error. To get consistent behaviour add explicit checks upfront for the buffer sizes. Signed-off-by: Daniel P. B

Re: [Qemu-devel] What's the intended use of log.h logging?

2015-10-21 Thread Denis V. Lunev
On 10/21/2015 01:41 PM, Stefan Hajnoczi wrote: Two useful aspects for observability: 1. Logging Error messages, rate-limited warnings, and important troubleshooting information for users. Audience: Users, system administrators, developers 2. Tracing Internal state changes and events for perf

Re: [Qemu-devel] [PATCH v8 38/54] Page request: Add MIG_RP_MSG_REQ_PAGES reverse command

2015-10-21 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Add MIG_RP_MSG_REQ_PAGES command on Return path for the postcopy > destination to request a page from the source. > > Two versions exist: >MIG_RP_MSG_REQ_PAGES_ID that includes a RAMBlock name and start/len >MIG_RP

Re: [Qemu-devel] [PATCH v9 04/17] vnc: hoist allocation of VncBasicInfo to callers

2015-10-21 Thread Daniel P. Berrange
On Tue, Oct 20, 2015 at 04:53:24PM -0600, Eric Blake wrote: > On 10/20/2015 08:46 AM, Markus Armbruster wrote: > > Gerd Hoffmann writes: > > > >> Hi, > >> > -static VncBasicInfo *vnc_basic_info_get(struct sockaddr_storage *sa, > -socklen_t salen

Re: [Qemu-devel] [PATCH v8 39/54] Page request: Process incoming page request

2015-10-21 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > On receiving MIG_RPCOMM_REQ_PAGES look up the address and > queue the page. > > Signed-off-by: Dr. David Alan Gilbert > Reviewed-by: Amit Shah Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH RFC V5 1/9] hw/intc: Implement GIC-500 support files

2015-10-21 Thread Pavel Fedin
Hello! > I can't find the patch that handles the for example modification of "uint8_t > sgi_pending[GIC_NR_SGIS][GIC_NCPU]" to fixed-size bitmaps. as > GIC_NCPU is not a constant and uint8_t need to have the size of nubmer of > CPUs which is no longer bounded. This is the only thing which i e

[Qemu-devel] [PULL v1 2/4] crypto: don't let builtin aes crash if no IV is provided

2015-10-21 Thread Daniel P. Berrange
If no IV is provided, then use a default IV of all-zeros instead of crashing. This gives parity with gcrypt and nettle backends. Signed-off-by: Daniel P. Berrange --- crypto/cipher-builtin.c| 14 +- tests/test-crypto-cipher.c | 30 ++ 2 files changed,

Re: [Qemu-devel] What's the intended use of log.h logging? (was: [PATCH 2/3] log: report hmp/qmp command and qmp event)

2015-10-21 Thread Stefan Hajnoczi
Two useful aspects for observability: 1. Logging Error messages, rate-limited warnings, and important troubleshooting information for users. Audience: Users, system administrators, developers 2. Tracing Internal state changes and events for performance analysis. Audience: Developers DPRINTF

Re: [Qemu-devel] [PATCH RFC V5 9/9] hw/arm: Add virt-v3 machine that uses GIC-500

2015-10-21 Thread Shlomo Pongratz
See inline On Wednesday, October 21, 2015, Pavel Fedin wrote: > Hello! > > > I see, just how do I pass the gic version from the command line? > > Easy. -machine virt,gic-version=3 > > > GICV3 is accessed by system instructions that exists only in ARCH64. > > Wrong. In 32-bit mode the CPU sees

Re: [Qemu-devel] [PATCH RFC V5 1/9] hw/intc: Implement GIC-500 support files

2015-10-21 Thread Shlomo Pongratz
See inline. On Wednesday, October 21, 2015, Pavel Fedin wrote: > Hello! > > > I can't find the patch that handles the for example modification of > "uint8_t sgi_pending[GIC_NR_SGIS][GIC_NCPU]" to fixed-size bitmaps. as > > GIC_NCPU is not a constant and uint8_t need to have the size of nubmer >

Re: [Qemu-devel] [PATCH v2 5/5] vhost: send VHOST_USER_SET_VRING_ENABLE at start/stop

2015-10-21 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 05:07:18PM +0800, Yuanhan Liu wrote: > Send VHOST_USER_SET_VRING_ENABLE at start/stop when multiple queue > is negotiated, to inform the backend that we are ready or not. OK but that's only if MQ is set. If now, we need to do RESET_OWNER followed by SET_OWNER. > And exclud

Re: [Qemu-devel] [PATCH v9 01/17] qapi: Add tests for reserved name abuse

2015-10-21 Thread Markus Armbruster
Eric Blake writes: > On 10/19/2015 10:05 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> A future patch wants to change qapi union representation from >>> an anonymous C union over to a named C union 'u', so that the >>> C names of tag values are in a separate namespace and thus >>> c

[Qemu-devel] [PULL v2 7/9] s390x: machine reset function with new ipl cpu handling

2015-10-21 Thread Cornelia Huck
From: David Hildenbrand Current implementation depends on the order of resets getting triggered. If a cpu reset is triggered after the ipl device reset, the CPU is stopped and the VM will not run. In fact, that hinders us from converting the ipl device into a TYPE_DEVICE. Let's change that by ma

[Qemu-devel] [PULL v2 9/9] s390x/cmma: clean up cmma reset

2015-10-21 Thread Cornelia Huck
From: David Hildenbrand The cmma reset is per VM, so we don't need a cpu object. We can directly make use of kvm_state, as it is already available when the reset is called. By moving the cmma reset in our machine reset function, we can avoid a manual reset handler. Acked-by: Christian Borntraege

Re: [Qemu-devel] [PATCH COLO-Frame v9 09/32] COLO: Implement colo checkpoint protocol

2015-10-21 Thread Eric Blake
On 09/02/2015 02:22 AM, zhanghailiang wrote: > We need communications protocol of user-defined to control the checkpoint > process. > > The new checkpoint request is started by Primary VM, and the interactive > process > like below: > Checkpoint synchronizing points, > >P

Re: [Qemu-devel] [PATCH COLO-Frame v9 10/32] COLO: Add a new RunState RUN_STATE_COLO

2015-10-21 Thread Eric Blake
On 09/02/2015 02:22 AM, zhanghailiang wrote: > Guest will enter this state when paused to save/restore VM state > under colo checkpoint. > > Cc: Eric Blake > Cc: Markus Armbruster > Signed-off-by: zhanghailiang > Signed-off-by: Li Zhijian > Signed-off-by: Gonglei > Reviewed-by: Dr. David Alan

Re: [Qemu-devel] [PATCH 4/6] e1000: Fixing the received/transmitted octets' counters

2015-10-21 Thread Leonid Bloch
On Tue, Oct 20, 2015 at 9:16 AM, Jason Wang wrote: > > > On 10/18/2015 03:53 PM, Leonid Bloch wrote: >> Previously, the lower parts of these counters (TORL, TOTL) were >> resetting after reaching their maximal values, and since the continuation >> of counting in the higher parts (TORH, TOTH) was t

Re: [Qemu-devel] What's the intended use of log.h logging? (was: [PATCH 2/3] log: report hmp/qmp command and qmp event)

2015-10-21 Thread Peter Maydell
On 21 October 2015 at 11:41, Stefan Hajnoczi wrote: > DPRINTF() falls under both #1 and #2. Care needs to be taken to > separate the logging from the tracing when converting DPRINTF(). > > Side note: we don't have effect "once only" or rate-limiting built into > error_report(). Guest-triggerable

Re: [Qemu-devel] [PATCH RFC V5 9/9] hw/arm: Add virt-v3 machine that uses GIC-500

2015-10-21 Thread Peter Maydell
On 21 October 2015 at 12:33, Shlomo Pongratz wrote: > I assume I can add the system registers to target-arm/cpu.c but I wonder if > someone really needs to simulate more than 8 AArch32 CPU(s) The system register implementation belongs in the gic code, not target-arm/. We already have support for

Re: [Qemu-devel] [PULL 0/7] Misc refactoring to util codebase

2015-10-21 Thread Peter Maydell
On 20 October 2015 at 16:38, Daniel P. Berrange wrote: > On Tue, Oct 20, 2015 at 04:33:55PM +0100, Daniel P. Berrange wrote: >> The following changes since commit c14e42d7a4495ecbad7bf8b3d603272e3a8992a1: >> >> Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20151020-1' >> into stagi

Re: [Qemu-devel] [PATCH v2 1/5] Revert "vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE"

2015-10-21 Thread Yuanhan Liu
On Wed, Oct 21, 2015 at 01:40:59PM +0300, Michael S. Tsirkin wrote: > On Wed, Oct 21, 2015 at 05:07:14PM +0800, Yuanhan Liu wrote: > > This reverts commit d1f8b30ec8dde0318fd1b98d24a64926feae9625. > > > > It turned out that it breaks stuff, so revert it: > > > > http://lists.nongnu.org/archiv

Re: [Qemu-devel] [PATCH v9 03/17] qapi: Reserve 'u' and 'has[-_]*' member names

2015-10-21 Thread Markus Armbruster
Eric Blake writes: > On 10/19/2015 11:19 AM, Markus Armbruster wrote: > >> I'm not quite comfortable with reserving 'u' now, becaue I feel we >> haven't fully explored the design space for avoiding branch - member >> clashes. >> >> I still like the basic idea to give the unnamed union a name. I

Re: [Qemu-devel] [PATCH RFC V5 1/9] hw/intc: Implement GIC-500 support files

2015-10-21 Thread Shlomo Pongratz
See inline On Wednesday, October 21, 2015, Pavel Fedin wrote: > Hello! > > >> See this: > http://lists.nongnu.org/archive/html/qemu-devel/2015-10/msg02349.html. > This is also a part of my live migration RFC. > >> I remember that Peter told long time ago that "it should really be a > property",

  1   2   3   4   >