[Qemu-devel] [PATCH 04/16] linux-user: fix mismatch of lock/unlock_user() invocations in rt_sigqueinfo() syscall

2017-05-12 Thread Miloš Stojanović
Change the unlock_user() argument from arg1 to arg3 to match with lock_user(), since arg3 contains the pointer to the siginfo_t structure. Signed-off-by: Miloš Stojanović --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-use

[Qemu-devel] [PATCH 01/16] linux-user: add strace for getuid(), gettid(), getppid(), geteuid()

2017-05-12 Thread Miloš Stojanović
Improve strace support for syscalls getuid(), gettid(), getppid() and geteuid(). Since these system calls don't have arguments, "%s()" is added in the corresponding strace.list entry so that no arguments are printed. getuid: Prior to this commit, typical strace output used to look like this: 4894

[Qemu-devel] [PATCH 16/16] [RFC] linux-user: add support for multiplexing signals in rt_sigqueueinfo(), rt_tgsigqueueinfo(), kill() and tgkill() syscalls.

2017-05-12 Thread Miloš Stojanović
Add support for multiplexing in the host_signal_handler() function and in system calls rt_sigqueueinfo()/rt_tgsigqueueinfo(), tgkill(), kill() for the case when pid > 0. The rt_sigqueueinfo()/rt_tgsigqueueinfo() system calls multiplex target signals which are out of the host range by setting the s

[Qemu-devel] [PATCH 00/16] Augment support for signal handling

2017-05-12 Thread Miloš Stojanović
This patch set deals with QEMU Linux user mode functionalities related to signal handling. It is composed of four sections: A. Extend strace support (patches 1-2, 8-9): Strace support is added for getuid(), gettid(), getppid(), geteuid(), tkill(), tgkill() and rt_sigqueueinfo(), along with

[Qemu-devel] [PATCH 06/16] linux-user: add support for rt_tgsigqueueinfo() system call

2017-05-12 Thread Miloš Stojanović
Add a new system call: rt_tgsigqueueinfo(). This system call is similar to rt_sigqueueinfo(), but instead of sending the signal and data to the whole thread group with the ID equal to the argument tgid, it sends it to a single thread within that thread group. The ID of the thread is specified by t

[Qemu-devel] [PATCH 07/16] linux-user: add rt_tgsigqueueinfo() strace

2017-05-12 Thread Miloš Stojanović
This commit improves strace support for syscall rt_tgsigqueueinfo(). Prior to this commit, typical strace output used to look like this: 7775 rt_tgsigqueueinfo(7775,7775,50,1996483164,0,0) = 0 After this commit, it looks like this: 7775 rt_tgsigqueueinfo(7775,7775,50,0x76ffea5c) = 0 Signed-off-b

[Qemu-devel] [PATCH 15/16] [RFC] linux-user: add support for multiplexing larger target signals

2017-05-12 Thread Miloš Stojanović
Add MUX_SIG as a multiplex signal number for all target signals which are out of the host range. Add support for multiplexing in do_sigaction(), process_pending_signals(), target_set_sigmask() and do_target_sigprocmask(). This patch solves the problem of unusable target signals which are out of th

[Qemu-devel] [PATCH 13/16] [RFC] linux-user: add functions for working with the target signal mask

2017-05-12 Thread Miloš Stojanović
Add functions tswapal_target_sigset(), target_to_abi_ulong_old_sigset() and abi_ulong_to_target_old_sigset(). The tswapal_target_sigset() function transforms target signal sets from target to host endianness. This is helpful for tracking and working with the target signal masks in the host endiann

[Qemu-devel] [PATCH 10/16] [RFC] linux-user: add support for tracking the target signal mask

2017-05-12 Thread Miloš Stojanović
If TRACK_TARGET_SIGMASK is defined, add fields in the TaskState structure which will hold the target signal and suspend mask and add support for initialization and forking. No functional changes are being introduced in this commit. The TRACK_TARGET_SIGMASK will be defined in a later commit where th

[Qemu-devel] [PATCH 09/16] linux-user: add strace support for uinfo structure of rt_sigqueueinfo() and rt_tgsigqueueinfo()

2017-05-12 Thread Miloš Stojanović
This commit adds support for printing the content of the target_siginfo_t structure in a similar way to how it is printed by the host strace. The pointer to this structure is sent as the last argument of the rt_sigqueueinfo() and rt_tgsigqueueinfo() system calls. For this purpose, print_siginfo() i

[Qemu-devel] [PATCH V5 5/9] migration: introduce postcopy-blocktime capability

2017-05-12 Thread Alexey Perevalov
Right now it could be used on destination side to enable vCPU blocktime calculation for postcopy live migration. vCPU blocktime - it's time since vCPU thread was put into interruptible sleep, till memory page was copied and thread awake. Signed-off-by: Alexey Perevalov --- include/migration/migr

[Qemu-devel] [PATCH V5 9/9] migration: postcopy_blocktime documentation

2017-05-12 Thread Alexey Perevalov
Signed-off-by: Alexey Perevalov --- docs/migration.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/migration.txt b/docs/migration.txt index 1b940a8..d0f5a6d 100644 --- a/docs/migration.txt +++ b/docs/migration.txt @@ -402,6 +402,16 @@ will now cause the transition from pr

[Qemu-devel] [PATCH V5 7/9] migration: calculate vCPU blocktime on dst side

2017-05-12 Thread Alexey Perevalov
This patch provides blocktime calculation per vCPU, as a summary and as a overlapped value for all vCPUs. This approach was suggested by Peter Xu, as an improvements of previous approch where QEMU kept tree with faulted page address and cpus bitmask in it. Now QEMU is keeping array with faulted pa

[Qemu-devel] [PATCH V5 0/9] calculate blocktime for postcopy live migration

2017-05-12 Thread Alexey Perevalov
The rationale for that idea is following: vCPU could suspend during postcopy live migration until faulted page is not copied into kernel. Downtime on source side it's a value - time interval since source turn vCPU off, till destination start runnig vCPU. But that value was proper value for precopy

[Qemu-devel] [PATCH V5 3/9] migration: fix hardcoded function name in error report

2017-05-12 Thread Alexey Perevalov
Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 4c859b4..0f75700 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -68,7 +68,7 @@ static

[Qemu-devel] [PATCH V5 8/9] migration: add postcopy total blocktime into query-migrate

2017-05-12 Thread Alexey Perevalov
Postcopy total blocktime is available on destination side only. But query-migrate was possible only for source. This patch adds ability to call query-migrate on destination. To distinguish src/dst, state of the MigrationState is using, query-migrate prepares MigrationInfo for source machine only in

[Qemu-devel] [PATCH V5 6/9] migration: add postcopy vcpu blocktime context into MigrationIncomingState

2017-05-12 Thread Alexey Perevalov
This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. PostcopyBlocktimeContext is incapsulated inside postcopy-ram.c, due to it's postcopy only feature. Also it defines PostcopyBlocktimeContext's instance live time. Information from Po

[Qemu-devel] [PATCH V5 2/9] migration: pass ptr to MigrationIncomingState into migration ufd_version_check & postcopy_ram_supported_by_host

2017-05-12 Thread Alexey Perevalov
That tiny refactoring is necessary to be able to set UFFD_FEATURE_THREAD_ID while requesting features, and then to create downtime context in case when kernel supports it. Signed-off-by: Alexey Perevalov --- include/migration/postcopy-ram.h | 2 +- migration/migration.c| 2 +- migr

[Qemu-devel] [PATCH V5 1/9] userfault: add pid into uffd_msg & update UFFD_FEATURE_*

2017-05-12 Thread Alexey Perevalov
This commit duplicates header of "userfaultfd: provide pid in userfault msg" into linux kernel. Signed-off-by: Alexey Perevalov --- linux-headers/linux/userfaultfd.h | 5 + 1 file changed, 5 insertions(+) diff --git a/linux-headers/linux/userfaultfd.h b/linux-headers/linux/userfaultfd.h in

[Qemu-devel] [PATCH V5 4/9] migration: split ufd_version_check onto receive/request features part

2017-05-12 Thread Alexey Perevalov
This modification is necessary for userfault fd features which are required to be requested from userspace. UFFD_FEATURE_THREAD_ID is a one of such "on demand" feature, which will be introduced in the next patch. QEMU need to use separate userfault file descriptor, due to userfault context has int

Re: [Qemu-devel] [PULL 00/58] Block layer patches

2017-05-12 Thread Stefan Hajnoczi
On Thu, May 11, 2017 at 04:32:03PM +0200, Kevin Wolf wrote: > The following changes since commit 76d20ea0f1b26ebd5da2f5fb2fdf3250cde887bb: > > Merge remote-tracking branch 'armbru/tags/pull-qapi-2017-05-04-v3' into > staging (2017-05-09 15:49:14 -0400) > > are available in the git repository a

Re: [Qemu-devel] KVM "fake DAX" device flushing

2017-05-12 Thread Stefan Hajnoczi
On Thu, May 11, 2017 at 05:38:40PM -0400, Rik van Riel wrote: > On Thu, 2017-05-11 at 14:17 -0400, Stefan Hajnoczi wrote: > > On Wed, May 10, 2017 at 09:26:00PM +0530, Pankaj Gupta wrote: > > > * For live migration use case, if host side backing file is  > > >   shared storage, we need to flush the

[Qemu-devel] [PATCH] nbd: strict nbd_wr_syncv

2017-05-12 Thread Vladimir Sementsov-Ogievskiy
nbd_wr_syncv is called either from coroutine or from client negotiation code, when socket is in blocking mode. So, -EAGAIN is impossible. Furthermore, EAGAIN is confusing, as, what to read/write again? With EAGAIN as a return code we don't know how much data is already read or written by the funct

[Qemu-devel] multiple -append?

2017-05-12 Thread Rob Landley
When I feed a second -append to qemu-system-i386 they don't get concatenated, the second replaces the first. Why is it called "append" then? Rob

Re: [Qemu-devel] [PATCH 6/6] spec/vhost-user spec: Add IOMMU support

2017-05-12 Thread Maxime Coquelin
On 05/11/2017 08:25 PM, Michael S. Tsirkin wrote: On Thu, May 11, 2017 at 02:32:46PM +0200, Maxime Coquelin wrote: This patch specifies and implements the master/slave communication to support device IOTLB in slave. The vhost_iotlb_msg structure introduced for kernel backends is re-used, maki

Re: [Qemu-devel] [PATCH v2] target-ppc: Enable open-pic timers to count and generate interrupts

2017-05-12 Thread alarson
David Gibson wrote on 05/12/2017 01:52:04 AM: > From: David Gibson > To: Aaron Larson > Cc: ag...@suse.de, qemu-devel@nongnu.org, qemu-...@nongnu.org > Date: 05/12/2017 01:52 AM > Subject: Re: [PATCH v2] target-ppc: Enable open-pic timers to count and generate interrupts > > On Tue, May 02,

[Qemu-devel] [PULL for-2.9 0/3] Block patches

2017-05-12 Thread Stefan Hajnoczi
The following changes since commit ecc1f5adeec4e3324d1b695a7c54e3967c526949: maintainers: Add myself as linux-user reviewer (2017-05-11 13:31:11 -0400) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for you to fetch changes up to 321d1dba8

[Qemu-devel] [PULL for-2.9 1/3] coroutine: remove GThread implementation

2017-05-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" The GThread implementation is not functional enough to actually run QEMU reliably. While it was potentially useful for debugging, we have a scripts/qemugdb/coroutine.py to enable tracing of ucontext coroutines in GDB, so that removes the only reason for GThread to exist

[Qemu-devel] [PULL for-2.9 3/3] aio: add missing aio_notify() to aio_enable_external()

2017-05-12 Thread Stefan Hajnoczi
The main loop uses aio_disable_external()/aio_enable_external() to temporarily disable processing of external AioContext clients like device emulation. This allows monitor commands to quiesce I/O and prevent the guest from submitting new requests while a monitor command is in progress. The aio_en

[Qemu-devel] [PULL for-2.9 1/1] trace: add sanity check

2017-05-12 Thread Stefan Hajnoczi
From: Anthony Xu If trace backend is set to TRACE_NOP, trace_get_vcpu_event_count returns 0, cause bitmap_new call abort. The abort can be triggered as follows: $ ./configure --enable-trace-backend=nop --target-list=x86_64-softmmu $ gdb ./x86_64-softmmu/qemu-system-x86_64 -M q35,accel=kvm -

[Qemu-devel] [PULL for-2.9 2/3] block: Simplify BDRV_BLOCK_RAW recursion

2017-05-12 Thread Stefan Hajnoczi
From: Eric Blake Since we are already in coroutine context during the body of bdrv_co_get_block_status(), we can shave off a few layers of wrappers when recursing to query the protocol when a format driver returned BDRV_BLOCK_RAW. Note that we are already using the correct recursion later on in

[Qemu-devel] [PULL for-2.9 0/1] Tracing patches

2017-05-12 Thread Stefan Hajnoczi
The following changes since commit ecc1f5adeec4e3324d1b695a7c54e3967c526949: maintainers: Add myself as linux-user reviewer (2017-05-11 13:31:11 -0400) are available in the git repository at: git://github.com/stefanha/qemu.git tags/tracing-pull-request for you to fetch changes up to 5651743

Re: [Qemu-devel] [PATCH 3/7] curl: avoid recursive locking of BDRVCURLState mutex

2017-05-12 Thread Paolo Bonzini
On 11/05/2017 22:56, Jeff Cody wrote: > On Wed, May 10, 2017 at 04:32:01PM +0200, Paolo Bonzini wrote: >> The curl driver has a ugly hack where, if it cannot find an empty CURLState, >> it just uses aio_poll to wait for one to be empty. This is probably >> buggy when used together with dataplane

Re: [Qemu-devel] [PATCH] nbd: strict nbd_wr_syncv

2017-05-12 Thread Paolo Bonzini
On 12/05/2017 16:17, Vladimir Sementsov-Ogievskiy wrote: > nbd_wr_syncv is called either from coroutine or from client negotiation > code, when socket is in blocking mode. So, -EAGAIN is impossible. > > Furthermore, EAGAIN is confusing, as, what to read/write again? With > EAGAIN as a return cod

[Qemu-devel] [PULL 1/5] migration: Fix regression with compression threads

2017-05-12 Thread Juan Quintela
Compression threads got broken on commit commit 247956946651ae0280f7b1ea88bb6237dd01c231 Author: Juan Quintela Date: Tue Mar 21 11:45:01 2017 +0100 ram: reorganize last_sent_block On do_compress_ram_page() we use a different QEMUFile than the migration one. We need to pass it the

[Qemu-devel] [PULL 3/5] ram: Rename RAM_SAVE_FLAG_COMPRESS to RAM_SAVE_FLAG_ZERO

2017-05-12 Thread Juan Quintela
Reflects better what it does now, and avoid confussions with RAM_SAVE_FLAG_COMPRESS_PAGE. Signed-off-by: Juan Quintela Reviewed-by: Peter Xu --- migration/ram.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 995d1f

[Qemu-devel] [PULL 5/5] migration: Create migration/blocker.h

2017-05-12 Thread Juan Quintela
This allows us to remove lots of includes of migration/migration.h Signed-off-by: Juan Quintela Reviewed-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert --- block/qcow.c | 2 +- block/vdi.c | 2 +- block/vhdx.c | 2 +- block/vmdk.c

[Qemu-devel] [PULL 0/5] Migration pull request

2017-05-12 Thread Juan Quintela
following changes since commit ecc1f5adeec4e3324d1b695a7c54e3967c526949: maintainers: Add myself as linux-user reviewer (2017-05-11 13:31:11 -0400) are available in the git repository at: git://github.com/juanquintela/qemu.git tags/migration/20170512 for you to fetch changes up to

[Qemu-devel] [PULL 2/5] migration: Pass Error ** argument to {save, load}_vmstate

2017-05-12 Thread Juan Quintela
This way we use the "normal" way of printing errors for hmp commands. Signed-off-by: Juan Quintela Suggested-by: Paolo Bonzini Reviewed-by: Peter Xu Reviewed-by: Laurent Vivier --- hmp.c| 9 +++-- include/sysemu/sysemu.h | 4 ++-- migration/savevm.c | 51 +

[Qemu-devel] [PULL 4/5] migration: Create block capabilities for shared and enable

2017-05-12 Thread Juan Quintela
Those two capabilities were added through the command line. Notice that we just created them. This is just the boilerplate. Signed-off-by: Juan Quintela Reviewed-by: Eric Blake Reviewed-by: zhanghailiang --- include/migration/block.h | 3 +++ include/migration/migration.h | 3 +++ migr

[Qemu-devel] [PATCH v2] migration: Move check_migratable() into qdev.c

2017-05-12 Thread Juan Quintela
The function is only used once, and nothing else in migration knows about objects. Create the function vmstate_device_is_migratable() in savem.c that really do the bit that is related with migration. Signed-off-by: Juan Quintela --- - move only_migrateble use back to savevm.c to fix linux-user

[Qemu-devel] [PATCH 1/2] migration: Remove use of old MigrationParams

2017-05-12 Thread Juan Quintela
We have change in the previous patch to use migration capabilities for it. Notice that we continue using the old command line flags from migrate command from the time being. Remove the set_params method as now it is empty. Signed-off-by: Juan Quintela Reviewed-by: zhanghailiang -- - Maintain

[Qemu-devel] [PATCH v3 0/2] Remove old MigrationParams

2017-05-12 Thread Juan Quintela
Hi changes from v2 - Patch 1 included in pull request - disable block_shared when we disable block_enable - enable block_enabled when we enable block_shared Please, review. [v2] - make migrate_block_set_* take a boolean - disable block migration in colo to maintain semantics. [v1] Upon a time

[Qemu-devel] [PATCH 2/2] migration: Remove old MigrationParams

2017-05-12 Thread Juan Quintela
Not used anymore after moving block migration to use capabilities. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: zhanghailiang --- include/migration/migration.h | 10 ++ include/migration/vmstate.h | 1 - include/qemu/typedefs.h | 1 - include/

Re: [Qemu-devel] [PATCH] nbd: strict nbd_wr_syncv

2017-05-12 Thread Vladimir Sementsov-Ogievskiy
12.05.2017 18:46, Paolo Bonzini wrote: On 12/05/2017 16:17, Vladimir Sementsov-Ogievskiy wrote: nbd_wr_syncv is called either from coroutine or from client negotiation code, when socket is in blocking mode. So, -EAGAIN is impossible. Furthermore, EAGAIN is confusing, as, what to read/write aga

[Qemu-devel] [PATCH 08/12] migration: Move qjson.h to migration/

2017-05-12 Thread Juan Quintela
It is only used for migration code. Signed-off-by: Juan Quintela --- migration/qjson.c| 2 +- {include/migration => migration}/qjson.h | 0 migration/vmstate.c | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename {include/migration => migr

[Qemu-devel] [PATCH 01/12] migration: Create migration/xbzrle.h

2017-05-12 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/migration/migration.h | 4 migration/ram.c | 1 + migration/xbzrle.c| 2 +- migration/xbzrle.h| 21 + tests/test-xbzrle.c | 2 +- 5 files changed, 24 insertions(+), 6 deletions(-)

[Qemu-devel] [PATCH 12/12] migration: migration.h was not needed

2017-05-12 Thread Juan Quintela
This files don't use any function from migration.h, so drop it. Signed-off-by: Juan Quintela --- block/qed.c | 1 - hw/i386/pc_q35.c| 1 - hw/virtio/vhost-user.c | 1 - hw/virtio/vhost-vsock.c | 1 - hw/virtio/virtio.c | 1 - monitor.c | 1 - 6 files chang

[Qemu-devel] [PATCH 04/12] migration: Remove migration.h from colo.h

2017-05-12 Thread Juan Quintela
migration.h is not included in any includes now. Signed-off-by: Juan Quintela --- include/migration/colo.h | 1 - migration/colo-comm.c| 3 ++- migration/colo.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/migration/colo.h b/include/migration/colo.h i

[Qemu-devel] [PATCH v3 00/12] Migration mini-cleanup

2017-05-12 Thread Juan Quintela
Hi Due to popular demand, and to make reviews easier, I just split the big cleanup series (41 patches) in small chunks. This chunk just include the easy patches: - create several include files foo.h for functcions exported from foo.c - split channel operations in channel.c - move colo headers to

[Qemu-devel] [PATCH 11/12] migration: Remove vmstate.h from migration.h

2017-05-12 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert -- Minor rearrangements due to rebase --- include/migration/migration.h | 1 - migration/block.c | 1 + migration/colo-comm.c | 1 + migration/migration.c | 1 + migration/ram.c | 1 + 5

[Qemu-devel] [PATCH 06/12] migration: Move failover.h to migration/colo-failover.h

2017-05-12 Thread Juan Quintela
This file is internal for migration/colo code. Signed-off-by: Juan Quintela --- MAINTAINERS | 2 +- migration/colo-failover.c | 2 +- include/migration/failover.h => migration/colo-failover.h | 0 migration/colo.c

[Qemu-devel] [PATCH 02/12] migration: Split migration/channel.c for channel operations

2017-05-12 Thread Juan Quintela
Create an include for its exported functions. Signed-off-by: Juan Quintela --- include/migration/migration.h | 7 - migration/Makefile.objs | 2 +- migration/channel.c | 69 +++ migration/channel.h | 25 mig

[Qemu-devel] [PATCH 10/12] migration: Remove qemu-file.h from vmstate.h

2017-05-12 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert -- minor rearangements due to the rebase --- include/hw/hw.h | 1 + include/migration/vmstate.h | 3 --- migration/block.c | 1 + migration/colo.c| 1 + migration/postcopy-ram.c| 1 + migrati

[Qemu-devel] [PATCH 03/12] migration: Export qemu-file-channel.c functions in its own file

2017-05-12 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/migration/migration.h | 1 + include/migration/qemu-file.h | 4 migration/channel.c | 1 + migration/colo.c | 1 + migration/migration.c | 1 + migration/qemu-file-channel.c | 1 + migration/qemu-file-channel.h | 2

Re: [Qemu-devel] [PATCH v9 01/13] qcow2: Unallocate unmapped zero clusters if no backing file

2017-05-12 Thread Max Reitz
On 2017-05-11 16:56, Eric Blake wrote: > [revisiting this older patch version, even though the final version in > today's pull request changed somewhat from this approach] > > On 04/12/2017 04:49 AM, Kevin Wolf wrote: >> Am 11.04.2017 um 03:17 hat Eric Blake geschrieben: >>> 'qemu-img map' already

[Qemu-devel] [PATCH 05/12] migration: Move colo.h to migration/

2017-05-12 Thread Juan Quintela
There are functions only used by migration code. Signed-off-by: Juan Quintela --- MAINTAINERS | 2 +- migration/colo-comm.c | 2 +- migration/colo-failover.c | 2 +- {include/migration => migration}/colo.h | 0 migration/migration.c

[Qemu-devel] [PATCH 07/12] migration: Move page_cache.c to migration/

2017-05-12 Thread Juan Quintela
It is only used by migration, so move it there. Signed-off-by: Juan Quintela --- Makefile.objs | 1 - migration/Makefile.objs | 2 +- page_cache.c => migration/page_cache.c| 0 {include/migration => migration}/page_cache.h | 0 tests/

[Qemu-devel] [PATCH 09/12] migration: Split vmstate-types.c from vmstate.c

2017-05-12 Thread Juan Quintela
Now one just has the interperter, and the other has the basic types. Once there, add copyright boilerplate. Signed-off-by: Juan Quintela --- migration/Makefile.objs | 2 +- migration/vmstate-types.c | 676 ++ migration/vmstate.c | 669 ++-

Re: [Qemu-devel] [PATCH] nbd: strict nbd_wr_syncv

2017-05-12 Thread Paolo Bonzini
On 12/05/2017 17:57, Vladimir Sementsov-Ogievskiy wrote: > 12.05.2017 18:46, Paolo Bonzini wrote: >> >> On 12/05/2017 16:17, Vladimir Sementsov-Ogievskiy wrote: >>> nbd_wr_syncv is called either from coroutine or from client negotiation >>> code, when socket is in blocking mode. So, -EAGAIN is im

Re: [Qemu-devel] [PATCH v3 2/5] target/arm: optimize rev16() using extract op

2017-05-12 Thread Richard Henderson
On 05/11/2017 08:35 PM, Philippe Mathieu-Daudé wrote: -tcg_gen_shri_i64(tcg_tmp, tcg_rn, 16); -tcg_gen_andi_i64(tcg_tmp, tcg_tmp, 0x); +tcg_gen_extract_i64(tcg_tmp, tcg_rn, 16, 0x); So your new script didn't work then? This should be "..., 16, 16);". r~

Re: [Qemu-devel] [Qemu-block] [PATCH] qcow2: remove extra local_error variable

2017-05-12 Thread Max Reitz
On 2017-05-11 17:03, Alberto Garcia wrote: > Commit d7086422b1c1e75e320519cfe26176db6ec97a37 added a local_err > variable global to the qcow2_amend_options() function, so there's no > need to have this other one. > > Signed-off-by: Alberto Garcia > --- > block/qcow2.c | 5 ++--- > 1 file changed

Re: [Qemu-devel] KVM "fake DAX" device flushing

2017-05-12 Thread Kevin Wolf
Am 12.05.2017 um 15:42 hat Stefan Hajnoczi geschrieben: > On Thu, May 11, 2017 at 05:38:40PM -0400, Rik van Riel wrote: > > On Thu, 2017-05-11 at 14:17 -0400, Stefan Hajnoczi wrote: > > > On Wed, May 10, 2017 at 09:26:00PM +0530, Pankaj Gupta wrote: > > > > * For live migration use case, if host si

Re: [Qemu-devel] [PATCH v3 2/3] arm64: kvm: inject SError with virtual syndrome

2017-05-12 Thread James Morse
Hi gengdongjiu, On 05/05/17 14:19, gengdongjiu wrote: > On 2017/5/2 23:37, James Morse wrote: > > ... I think you expect an SError to arrive at EL2 and have its ESR recorded > > in > > vcpu->arch.fault.vsesr_el2. Some time later KVM decides to inject an SError > > into > > the guest, and this ES

Re: [Qemu-devel] [Qemu-block] [PULL 05/58] qemu-img: Update documentation for -U

2017-05-12 Thread Max Reitz
On 2017-05-11 16:32, Kevin Wolf wrote: > From: Fam Zheng > > Signed-off-by: Fam Zheng > Signed-off-by: Kevin Wolf > --- > qemu-img-cmds.hx | 36 ++-- > 1 file changed, 18 insertions(+), 18 deletions(-) > > diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx > inde

Re: [Qemu-devel] [PATCH v8 0/4] Improve convert and dd commands

2017-05-12 Thread Max Reitz
On 2017-05-09 11:48, Daniel P. Berrange wrote: > Update to > > v1: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg05699.html > v2: https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg00728.html > v3: https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg04391.html > v4: h

Re: [Qemu-devel] [PATCH 3/3] net/filter-rewriter: Remove unused option in filter-rewirter

2017-05-12 Thread Eric Blake
On 05/11/2017 08:35 PM, Zhang Chen wrote: > Signed-off-by: Zhang Chen In the subject: s/rewirter/rewriter/ > --- > qemu-options.hx | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/qemu-options.hx b/qemu-options.hx > index 70c0ded..f5e088e 100644 > --- a/qemu-options.h

Re: [Qemu-devel] [RFC PATCH v3 1/5] coccinelle: add a script to optimize tcg op using tcg_gen_extract()

2017-05-12 Thread Eric Blake
On 05/12/2017 12:36 AM, Philippe Mathieu-Daudé wrote: > In this patch > http://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg01466.html > Aurelien does: > > -tcg_gen_shri_i32(cpu_sr_q, src, SR_Q); > -tcg_gen_andi_i32(cpu_sr_q, cpu_sr_q, 1); > +tcg_gen_extract_i32(cpu_sr_q, src,

Re: [Qemu-devel] [PATCH 05/12] migration: Move colo.h to migration/

2017-05-12 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > There are functions only used by migration code. That's only mostly true; see the current 'integrate colo frame with block replication and net compare' series (posted 22nd April). That adds colo_handle_shutdown to this header and calls it from vl.c (

Re: [Qemu-devel] [PATCH 09/12] migration: Split vmstate-types.c from vmstate.c

2017-05-12 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Now one just has the interperter, and the other has the basic types. > Once there, add copyright boilerplate. > > Signed-off-by: Juan Quintela I think this is generally OK, but as discussed on IRC, I think you need to check the licenses. Dave > --

Re: [Qemu-devel] [PATCH 12/12] migration: migration.h was not needed

2017-05-12 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > This files don't use any function from migration.h, so drop it. > > Signed-off-by: Juan Quintela > --- > block/qed.c | 1 - > hw/i386/pc_q35.c| 1 - > hw/virtio/vhost-user.c | 1 - > hw/virtio/vhost-vsock.c | 1 - > hw/virtio/vi

Re: [Qemu-devel] [PATCH v4] qemu-img: Check for backing image if specified during create

2017-05-12 Thread Max Reitz
On 2017-05-11 20:27, John Snow wrote: > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1213786 > > Or, rather, force the open of a backing image if one was specified > for creation. Using a similar -unsafe option as rebase, allow qemu-img > to ignore the backing file validation if possible. >

Re: [Qemu-devel] [PATCH v3 2/5] target/arm: optimize rev16() using extract op

2017-05-12 Thread Aurelien Jarno
On 2017-05-12 09:50, Richard Henderson wrote: > On 05/11/2017 08:35 PM, Philippe Mathieu-Daudé wrote: > > -tcg_gen_shri_i64(tcg_tmp, tcg_rn, 16); > > -tcg_gen_andi_i64(tcg_tmp, tcg_tmp, 0x); > > +tcg_gen_extract_i64(tcg_tmp, tcg_rn, 16, 0x); > > So your new script didn't work t

Re: [Qemu-devel] [PATCH RESEND v2 00/21] qdev/sysbus: Set user_creatable=false by default on sysbus

2017-05-12 Thread Eduardo Habkost
Ping? If there are no objections to this series, I plan to merge it through the Machine Core tree. If anybody is interested, below are the results of squashing patches 2-20 together: --- hw/core/sysbus.c | 11 +++ hw/i386/amd_iommu.c | 2 ++ hw/i386/intel_iommu.c| 2 ++

Re: [Qemu-devel] [PATCH] target/i386: enable A20 automatically in system management mode

2017-05-12 Thread Xu, Anthony
> On 12/05/2017 01:55, Xu, Anthony wrote: > > Hi Paolo, > > > > In KVM mode, seems A20 is ignored. > > Do you see any potential issue here? > > No; recent processors don't have A20 at all. I mean A20 in guest, not A20 in host. Guest is running on old platform, it tries to control A20 through

Re: [Qemu-devel] [PATCH v3 2/5] target/arm: optimize rev16() using extract op

2017-05-12 Thread Richard Henderson
On 05/12/2017 11:21 AM, Aurelien Jarno wrote: +uint64_t mask1 = sf ? 0x00ff00ff00ff00ffull : 0x00ff00ff; +uint64_t mask2 = sf ? 0xff00ff00ff00ff00ull : 0xff00ff00; + +tcg_gen_shri_i64(tcg_tmp, tcg_rn, 8); +tcg_gen_andi_i64(tcg_tmp, tcg_tmp, mask1); +tcg_gen_shli_i64(tcg_rd, tc

Re: [Qemu-devel] [PATCH] target/i386: enable A20 automatically in system management mode

2017-05-12 Thread Paolo Bonzini
On 12/05/2017 20:55, Xu, Anthony wrote: > >> On 12/05/2017 01:55, Xu, Anthony wrote: >>> Hi Paolo, >>> >>> In KVM mode, seems A20 is ignored. >>> Do you see any potential issue here? >> >> No; recent processors don't have A20 at all. > > I mean A20 in guest, not A20 in host. > Guest is runni

Re: [Qemu-devel] [PATCH v3 2/5] target/arm: optimize rev16() using extract op

2017-05-12 Thread Aurelien Jarno
On 2017-05-12 12:05, Richard Henderson wrote: > On 05/12/2017 11:21 AM, Aurelien Jarno wrote: > > +uint64_t mask1 = sf ? 0x00ff00ff00ff00ffull : 0x00ff00ff; > > +uint64_t mask2 = sf ? 0xff00ff00ff00ff00ull : 0xff00ff00; > > + > > +tcg_gen_shri_i64(tcg_tmp, tcg_rn, 8); > > +tcg_gen_a

Re: [Qemu-devel] [PATCH V2] migration: expose qemu_announce_self() via qmp

2017-05-12 Thread Dr. David Alan Gilbert
* Vlad Yasevich (vyase...@redhat.com) wrote: > On 02/20/2017 07:16 PM, Germano Veit Michel wrote: > > qemu_announce_self() is triggered by qemu at the end of migrations > > to update the network regarding the path to the guest l2addr. > > > > however it is also useful when there is a network chang

[Qemu-devel] [PATCH] block: Correct documentation for BLOCK_WRITE_THRESHOLD

2017-05-12 Thread Eric Blake
Use the correct command name. Signed-off-by: Eric Blake --- qapi/block-core.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 614181b..206e33b 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -3582,7 +3582,7

Re: [Qemu-devel] [PATCH v3 2/5] target/arm: optimize rev16() using extract op

2017-05-12 Thread Richard Henderson
On 05/12/2017 12:22 PM, Aurelien Jarno wrote: On 2017-05-12 12:05, Richard Henderson wrote: On 05/12/2017 11:21 AM, Aurelien Jarno wrote: +uint64_t mask1 = sf ? 0x00ff00ff00ff00ffull : 0x00ff00ff; +uint64_t mask2 = sf ? 0xff00ff00ff00ff00ull : 0xff00ff00; + +tcg_gen_shri_i64(tcg_tmp

Re: [Qemu-devel] [PATCH] target/i386: enable A20 automatically in system management mode

2017-05-12 Thread Kevin O'Connor
On Fri, May 12, 2017 at 09:16:31PM +0200, Paolo Bonzini wrote: > On 12/05/2017 20:55, Xu, Anthony wrote: > > If that's the case, QEMU/TCG should work with SeaBios even with ignoring > > A20. > > > > During SeaBios boot, there are >350 port 92 access, if we don't need to > > handle A20, > > we

Re: [Qemu-devel] [PATCH v4] qemu-img: Check for backing image if specified during create

2017-05-12 Thread Eric Blake
On 05/12/2017 01:07 PM, Max Reitz wrote: > On 2017-05-11 20:27, John Snow wrote: >> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1213786 >> >> Or, rather, force the open of a backing image if one was specified >> for creation. Using a similar -unsafe option as rebase, allow qemu-img >> to ign

Re: [Qemu-devel] [PATCH v4] qemu-img: Check for backing image if specified during create

2017-05-12 Thread John Snow
On 05/12/2017 03:46 PM, Eric Blake wrote: > On 05/12/2017 01:07 PM, Max Reitz wrote: >> On 2017-05-11 20:27, John Snow wrote: >>> Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1213786 >>> >>> Or, rather, force the open of a backing image if one was specified >>> for creation. Using a similar

Re: [Qemu-devel] [PATCH 1/3] migration: Create block capabilities for shared and enable

2017-05-12 Thread Eric Blake
On 05/11/2017 11:32 AM, Juan Quintela wrote: > Those two capabilities were added through the command line. Notice that > we just created them. This is just the boilerplate. > > Signed-off-by: Juan Quintela > Reviewed-by: Eric Blake > > -- > > Make migrate_set_block_* take a boolean argument.

Re: [Qemu-devel] [Qemu-ppc] [PATCH v9 4/6] hw/ppc/spapr.c: migrate pending_dimm_unplugs of spapr state

2017-05-12 Thread Daniel Henrique Barboza
On 05/12/2017 03:12 AM, David Gibson wrote: On Fri, May 05, 2017 at 05:47:44PM -0300, Daniel Henrique Barboza wrote: To allow for a DIMM unplug event to resume its work if a migration occurs in the middle of it, this patch migrates the non-empty pending_dimm_unplugs QTAILQ that stores the DIMM

Re: [Qemu-devel] [PATCH 2/3] migration: Remove use of old MigrationParams

2017-05-12 Thread Eric Blake
On 05/12/2017 05:55 AM, Juan Quintela wrote: >>> @@ -1239,6 +1240,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool >>> blk, >>> } >>> >>> if (has_inc && inc) { >>> +migrate_set_block_enabled(s, true); >>> migrate_set_block_shared(s, true); >> >> [2] >> >> IIUC

Re: [Qemu-devel] [Qemu-ppc] [PATCH v9 6/6] migration: spapr: migrate pending_events of spapr state

2017-05-12 Thread Daniel Henrique Barboza
On 05/12/2017 03:28 AM, David Gibson wrote: On Fri, May 05, 2017 at 05:47:46PM -0300, Daniel Henrique Barboza wrote: From: Jianjun Duan In racing situations between hotplug events and migration operation, a rtas hotplug event could have not yet be delivered to the source guest when migration

Re: [Qemu-devel] [PATCH V4 8/9] migration: add postcopy total blocktime into query-migrate

2017-05-12 Thread Eric Blake
On 05/12/2017 06:31 AM, Alexey Perevalov wrote: > Postcopy total blocktime is available on destination side only. > But query-migrate was possible only for source. This patch > adds ability to call query-migrate on destination. To distinguish > src/dst, state of the MigrationState is using, query-m

Re: [Qemu-devel] [PATCH V4 9/9] migration: postcopy_blocktime documentation

2017-05-12 Thread Eric Blake
On 05/12/2017 06:31 AM, Alexey Perevalov wrote: > Signed-off-by: Alexey Perevalov > --- > docs/migration.txt | 10 ++ > 1 file changed, 10 insertions(+) > > diff --git a/docs/migration.txt b/docs/migration.txt > index 1b940a8..d0f5a6d 100644 > --- a/docs/migration.txt > +++ b/docs/migrat

Re: [Qemu-devel] [PATCH V5 0/9] calculate blocktime for postcopy live migration

2017-05-12 Thread Eric Blake
On 05/12/2017 08:31 AM, Alexey Perevalov wrote: > The rationale for that idea is following: > vCPU could suspend during postcopy live migration until faulted > page is not copied into kernel. Downtime on source side it's a value - > time interval since source turn vCPU off, till destination start r

Re: [Qemu-devel] [PULL for-2.9 1/3] coroutine: remove GThread implementation

2017-05-12 Thread Eric Blake
On 05/12/2017 09:37 AM, Stefan Hajnoczi wrote: > From: "Daniel P. Berrange" > > The GThread implementation is not functional enough to actually > run QEMU reliably. While it was potentially useful for debugging, > we have a scripts/qemugdb/coroutine.py to enable tracing of > ucontext coroutines i

Re: [Qemu-devel] [PATCH v3 1/4] ACPI: Add APEI GHES Table Generation support

2017-05-12 Thread Laszlo Ersek
On 04/30/17 07:35, Dongjiu Geng wrote: > This implements APEI GHES Table by passing the error cper info > to the guest via a fw_cfg_blob. After a CPER info is added, an > SEA/SEI exception will be injected into the guest OS. > > Below is the table layout, the max number of error soure is 11, > whic

Re: [Qemu-devel] [PATCH V2] migration: expose qemu_announce_self() via qmp

2017-05-12 Thread Vlad Yasevich
On 05/12/2017 03:24 PM, Dr. David Alan Gilbert wrote: > * Vlad Yasevich (vyase...@redhat.com) wrote: >> On 02/20/2017 07:16 PM, Germano Veit Michel wrote: >>> qemu_announce_self() is triggered by qemu at the end of migrations >>> to update the network regarding the path to the guest l2addr. >>> >>>

Re: [Qemu-devel] [PATCH 4/7] curl: split curl_find_state/curl_init_state

2017-05-12 Thread Jeff Cody
On Wed, May 10, 2017 at 04:32:02PM +0200, Paolo Bonzini wrote: > If curl_easy_init fails, a CURLState is left with s->in_use = 1. Split > curl_init_state in two, so that we can distinguish the two failures and > call curl_clean_state if needed. > > While at it, simplify curl_find_state, removing

Re: [Qemu-devel] [PATCH 5/7] curl: convert CURLAIOCB to byte values

2017-05-12 Thread Jeff Cody
On Wed, May 10, 2017 at 04:32:03PM +0200, Paolo Bonzini wrote: > This is in preparation for the conversion from bdrv_aio_readv to > bdrv_co_preadv, and it also requires changing some of the size_t values > to uint64_t. This was broken before for disks > 2TB, but now it would > break at 4GB. > > S

Re: [Qemu-devel] [PATCH 6/7] curl: convert readv to coroutines

2017-05-12 Thread Jeff Cody
On Wed, May 10, 2017 at 04:32:04PM +0200, Paolo Bonzini wrote: > This is pretty simple. The bottom half goes away because, unlike > bdrv_aio_readv, coroutine-based read can return immediately without > yielding. However, for simplicity I kept the former bottom half > handler in a separate functio

Re: [Qemu-devel] [PATCH 7/7] curl: do not do aio_poll when waiting for a free CURLState

2017-05-12 Thread Jeff Cody
On Wed, May 10, 2017 at 04:32:05PM +0200, Paolo Bonzini wrote: > Instead, put the CURLAIOCB on a wait list; curl_clean_state will > wake the corresponding coroutine. > > Because of CURL's callback-based structure, we cannot easily convert > everything to CoMutex/CoQueue; keeping the QemuMutex is s

Re: [Qemu-devel] [RFC PATCH 7/8] VFIO: Add new IOCTL for IOMMU TLB invalidate propagation

2017-05-12 Thread Alex Williamson
On Wed, 26 Apr 2017 18:12:04 +0800 "Liu, Yi L" wrote: > From: "Liu, Yi L" > > This patch adds VFIO_IOMMU_TLB_INVALIDATE to propagate IOMMU TLB > invalidate request from guest to host. > > In the case of SVM virtualization on VT-d, host IOMMU driver has > no knowledge of caching structure updat

Re: [Qemu-devel] [RFC PATCH 5/8] VFIO: Add new IOTCL for PASID Table bind propagation

2017-05-12 Thread Alex Williamson
On Wed, 26 Apr 2017 18:12:02 +0800 "Liu, Yi L" wrote: > From: "Liu, Yi L" > > This patch adds VFIO_IOMMU_SVM_BIND_TASK for potential PASID table > binding requests. > > On VT-d, this IOCTL cmd would be used to link the guest PASID page table > to host. While for other vendors, it may also be u

<    1   2   3   >