Re: [Qemu-devel] [RFC v2 0/8] monitor: allow per-monitor thread

2017-08-30 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Wed, Aug 23, 2017 at 02:51:03PM +0800, Peter Xu wrote: >> v2: >> - fixed "make check" error that patchew reported >> - moved the thread_join upper in monitor_data_destroy(), before >> resources are released >> - added one new patch (current patch 3) that fixes

Re: [Qemu-devel] [PATCH] s390-ccw: Fix alignment for CCW1

2017-08-30 Thread Cornelia Huck
On Tue, 29 Aug 2017 14:45:51 -0400 Eric Farman wrote: > There were multiple $QEMUSRC directories on this system. At least one > 2.9.xx version didn't have commit 198c0d1f9df8c4 (and thus wouldn't care > about the boundary alignment), while others did. The aligned(8) fix > described here was

Re: [Qemu-devel] [RFC 5/6] migration: store listen task tag

2017-08-30 Thread Peter Xu
On Tue, Aug 29, 2017 at 11:38:31AM +0100, Daniel P. Berrange wrote: > > > > So, IMHO, you should change all the callbacks to 'return TRUE' so that > > > > they keep the watch registered, and then explicitly call > > > > g_source_remove() > > > > passing the listen tag, when incoming migration star

Re: [Qemu-devel] [PATCH] slirp: fix clearing ifq_so from pending packets

2017-08-30 Thread Thomas Huth
Hi Samuel, On 26.08.2017 00:37, Samuel Thibault wrote: > The if_fastq and if_batchq contain not only packets, but queues of packets > for the same socket. When sofree frees a socket, it thus has to clear ifq_so > from all the packets from the queues, not only the first. I think you should CC: th

Re: [Qemu-devel] [PATCH] slirp: fix clearing ifq_so from pending packets

2017-08-30 Thread Samuel Thibault
Thomas Huth, on mer. 30 août 2017 09:50:45 +0200, wrote: > On 26.08.2017 00:37, Samuel Thibault wrote: > > The if_fastq and if_batchq contain not only packets, but queues of packets > > for the same socket. When sofree frees a socket, it thus has to clear ifq_so > > from all the packets from the qu

Re: [Qemu-devel] [PATCH v4] vl: exit if maxcpus is negative

2017-08-30 Thread seeteena
On 08/29/2017 07:15 PM, Philippe Mathieu-Daudé wrote: Hi Seeteena, On 08/29/2017 02:45 AM, Seeteena Thoufeek wrote: ---Steps to Reproduce--- When passed a negative number to 'maxcpus' parameter, Qemu aborts with a core dump. Run the following command with maxcpus argument as negative number

Re: [Qemu-devel] [Qemu-discuss] Accessing a shared folder

2017-08-30 Thread Thomas Huth
On 30.08.2017 09:55, Mahmood wrote: >> You don't have to write "fsdriver" here, but replace it with "local", >> "handle" or "proxy". > > Still get the same error > > mahmood@cluster:qemu-vm$ qemu-system-x86_64 -m 4000 -cpu Opteron_G5 -smp 2 > -hda centos7server.img -boot c  -usbdevice tablet -en

[Qemu-devel] [PATCH v2 00/13] add support for Hypervisor.framework in QEMU

2017-08-30 Thread Sergio Andres Gomez Del Real
Changes in v2: (1) Removed legacy option "-enable-hvf" in favor of "-M accel=hvf" (2) Added missing copyright headers; replace fprintfs for error_report; improved commit description. (3) Moved patch that adds compilation rules in Makefile.objs right after the patch tha

[Qemu-devel] [PATCH v2 03/13] hvf: add compilation rules to Makefile.objs

2017-08-30 Thread Sergio Andres Gomez Del Real
This commit adds to target/i386/Makefile.objs the necessary rules so that the new files for hvf are compiled by the build system. It also adds handling of the -enable-hvf argument in the main function in vl.c. Signed-off-by: Sergio Andres Gomez Del Real --- target/i386/Makefile.objs | 1 + 1 fil

[Qemu-devel] [PATCH v2 01/13] hvf: add support for Hypervisor.framework in the configure script

2017-08-30 Thread Sergio Andres Gomez Del Real
This patch adds to the configure script the code to support the --enable-hvf argument. If the OS is Darwin, it checks for presence of HVF in the system. The patch also adds strings related to HVF in the file qemu-options.hx. QEMU will only support the modern syntax style '-M accel=hvf' no enable hv

[Qemu-devel] [PATCH v2 06/13] hvf: use new helper functions for put/get xsave

2017-08-30 Thread Sergio Andres Gomez Del Real
This commit makes use of the helper functions for handling xsave in xsave_helper.c, which are shared with kvm. Signed-off-by: Sergio Andres Gomez Del Real --- target/i386/hvf-utils/x86hvf.c | 63 ++ 1 file changed, 8 insertions(+), 55 deletions(-) diff --

[Qemu-devel] [PATCH v2 07/13] apic: add function to apic that will be used by hvf

2017-08-30 Thread Sergio Andres Gomez Del Real
This commit adds the function apic_get_highest_priority_irr to apic.c and exports it through the interface in apic.h for use by hvf. Signed-off-by: Sergio Andres Gomez Del Real --- hw/intc/apic.c | 11 +++ include/hw/i386/apic.h | 1 + 2 files changed, 12 insertions(+) diff --g

[Qemu-devel] [PATCH v2 05/13] hvf: add fields to CPUState and CPUX86State; add definitions

2017-08-30 Thread Sergio Andres Gomez Del Real
This commit adds some fields specific to hvf in CPUState and CPUX86State. It also adds some handy #defines. Signed-off-by: Sergio Andres Gomez Del Real --- include/qom/cpu.h | 2 ++ target/i386/cpu.h | 23 +++ 2 files changed, 25 insertions(+) diff --git a/include/qom/cpu.h

[Qemu-devel] [PATCH v2 10/13] hvf: implement vga dirty page tracking

2017-08-30 Thread Sergio Andres Gomez Del Real
This commit implements setting the tracking of dirty pages, using hvf's interface to protect guest memory. It uses the MemoryListener callback mechanism through .log_start/stop/sync Signed-off-by: Sergio Andres Gomez Del Real --- include/sysemu/hvf.h | 5 target/i386/hvf-all.c | 72 ++

[Qemu-devel] [PATCH v2 13/13] hvf: inject General Protection Fault when vmexit through vmcall

2017-08-30 Thread Sergio Andres Gomez Del Real
This commit injects a GP fault when the guest vmexit's by executing a vmcall instruction. Signed-off-by: Sergio Andres Gomez Del Real --- target/i386/hvf-all.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/i386/hvf-all.c b/target/i386/hvf-all.c index 430affd9ce..c

[Qemu-devel] [PATCH v2 09/13] hvf: refactor cpuid code

2017-08-30 Thread Sergio Andres Gomez Del Real
This patch generalizes some code in cpu.c, sharing code and data between hvf and kvm. It also beings calling the new hvf_get_supported_cpuid where appropriate. Signed-off-by: Sergio Andres Gomez Del Real --- target/i386/cpu-qom.h | 4 +-- target/i386/cpu.c | 80 +

[Qemu-devel] [PATCH v2 08/13] hvf: implement hvf_get_supported_cpuid

2017-08-30 Thread Sergio Andres Gomez Del Real
This commit implements hvf_get_supported_cpuid, which returns the set of features supported by both the host processor and the hypervisor. Signed-off-by: Sergio Andres Gomez Del Real --- target/i386/hvf-utils/x86_cpuid.c | 138 ++ 1 file changed, 138 insertion

[Qemu-devel] [RFC v2 02/33] bitmap: introduce bitmap_count_one()

2017-08-30 Thread Peter Xu
Count how many bits set in the bitmap. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- include/qemu/bitmap.h | 10 ++ util/bitmap.c | 15 +++ 2 files changed, 25 insertions(+) diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h index c318da1..

[Qemu-devel] [PATCH v2 12/13] hvf: refactor event injection code for hvf

2017-08-30 Thread Sergio Andres Gomez Del Real
This commit refactors the event-injection code for hvf through using the appropriate fields already provided by CPUX86State. At vmexit, it fills these fields so that hvf_inject_interrupts can just retrieve them without calling into hvf. Signed-off-by: Sergio Andres Gomez Del Real --- target/i386

[Qemu-devel] [RFC v2 04/33] migration: dump str in migrate_set_state trace

2017-08-30 Thread Peter Xu
Strings are more readable for debugging. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/migration.c | 3 ++- migration/trace-events | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index eb7d767..c81

[Qemu-devel] [RFC v2 07/33] migration: provide postcopy_fault_thread_notify()

2017-08-30 Thread Peter Xu
A general helper to notify the fault thread. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/postcopy-ram.c | 35 --- migration/postcopy-ram.h | 2 ++ 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/migration/postcopy-r

[Qemu-devel] [PATCH v2 11/13] hvf: move fields from CPUState to CPUX86State

2017-08-30 Thread Sergio Andres Gomez Del Real
This commit is a small refactoring of hvf's emulation code: it moves the HVFX86EmulatorState field to CPUX86State, and in general changes, for the emulation functions, the parameter with signature 'CPUState *' for 'CPUX86State *' so we don't have to get the 'env' (which is what we really need) thro

[Qemu-devel] [RFC v2 08/33] migration: new postcopy-pause state

2017-08-30 Thread Peter Xu
Introducing a new state "postcopy-paused", which can be used when the postcopy migration is paused. It is targeted for postcopy network failure recovery. Signed-off-by: Peter Xu --- migration/migration.c | 2 ++ qapi-schema.json | 5 - 2 files changed, 6 insertions(+), 1 deletion(-) di

[Qemu-devel] [RFC v2 12/33] migration: allow send_rq to fail

2017-08-30 Thread Peter Xu
We will not allow failures to happen when sending data from destination to source via the return path. However it is possible that there can be errors along the way. This patch allows the migrate_send_rp_message() to return error when it happens, and further extended it to migrate_send_rp_req_page

[Qemu-devel] [RFC v2 03/33] bitmap: provide to_le/from_le helpers

2017-08-30 Thread Peter Xu
Provide helpers to convert bitmaps to little endian format. It can be used when we want to send one bitmap via network to some other hosts. One thing to mention is that, these helpers only solve the problem of endianess, but it does not solve the problem of different word size on machines (the bit

[Qemu-devel] [RFC v2 01/33] bitmap: remove BITOP_WORD()

2017-08-30 Thread Peter Xu
We have BIT_WORD(). It's the same. Signed-off-by: Peter Xu --- util/bitops.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/bitops.c b/util/bitops.c index b0c35dd..f236401 100644 --- a/util/bitops.c +++ b/util/bitops.c @@ -14,15 +14,13 @@ #include "qemu/osdep.h"

[Qemu-devel] [RFC v2 15/33] migration: pass MigrationState to migrate_init()

2017-08-30 Thread Peter Xu
Let the callers take the object, then pass it to migrate_init(). Signed-off-by: Peter Xu --- migration/migration.c | 7 ++- migration/migration.h | 2 +- migration/savevm.c| 5 - 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/migration/migration.c b/migration/migratio

[Qemu-devel] [RFC v2 13/33] migration: allow fault thread to pause

2017-08-30 Thread Peter Xu
Allows the fault thread to stop handling page faults temporarily. When network failure happened (and if we expect a recovery afterwards), we should not allow the fault thread to continue sending things to source, instead, it should halt for a while until the connection is rebuilt. When the dest ma

[Qemu-devel] [RFC v2 10/33] migration: allow dst vm pause on postcopy

2017-08-30 Thread Peter Xu
When there is IO error on the incoming channel (e.g., network down), instead of bailing out immediately, we allow the dst vm to switch to the new POSTCOPY_PAUSE state. Currently it is still simple - it waits the new semaphore, until someone poke it for another attempt. Signed-off-by: Peter Xu ---

[Qemu-devel] [RFC v2 00/33] Migration: postcopy failure recovery

2017-08-30 Thread Peter Xu
v2 note (the coarse-grained changelog): - I appended the migrate-incoming re-use series into this one, since that one depends on this one, and it's really for the recovery - I haven't yet added (actually I just added them but removed) the per-monitor thread related patches into this one, basi

Re: [Qemu-devel] [PATCH] oslib-posix: Print errors before aborting on qemu_alloc_stack()

2017-08-30 Thread Stefan Hajnoczi
On Tue, Aug 29, 2017 at 06:20:53PM -0300, Eduardo Habkost wrote: > If QEMU is running on a system that's out of memory and mmap() > fails, QEMU aborts with no error message at all, making it hard > to debug the reason for the failure. > > Add perror() calls that will print error information before

[Qemu-devel] [RFC v2 22/33] migration: new message MIG_RP_MSG_RESUME_ACK

2017-08-30 Thread Peter Xu
Creating new message to reply for MIG_CMD_POSTCOPY_RESUME. One uint32_t is used as payload to let the source know whether destination is ready to continue the migration. Signed-off-by: Peter Xu --- migration/migration.c | 37 + migration/migration.h | 3 +++

[Qemu-devel] [RFC v2 14/33] qmp: hmp: add migrate "resume" option

2017-08-30 Thread Peter Xu
It will be used when we want to resume one paused migration. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- hmp-commands.hx | 7 --- hmp.c | 4 +++- migration/migration.c | 2 +- qapi-schema.json | 5 - 4 files changed, 12 insertions(+), 6 del

[Qemu-devel] [RFC v2 05/33] migration: better error handling with QEMUFile

2017-08-30 Thread Peter Xu
If the postcopy down due to some reason, we can always see this on dst: qemu-system-x86_64: RP: Received invalid message 0x length 0x However in most cases that's not the real issue. The problem is that qemu_get_be16() has no way to show whether the returned data is valid or not, and we

[Qemu-devel] [RFC v2 18/33] migration: wakeup dst ram-load-thread for recover

2017-08-30 Thread Peter Xu
On the destination side, we cannot wake up all the threads when we got reconnected. The first thing to do is to wake up the main load thread, so that we can continue to receive valid messages from source again and reply when needed. At this point, we switch the destination VM state from postcopy-p

[Qemu-devel] [RFC v2 23/33] migration: introduce SaveVMHandlers.resume_prepare

2017-08-30 Thread Peter Xu
This is hook function to be called when a postcopy migration wants to resume from a failure. For each module, it should provide its own recovery logic before we switch to the postcopy-active state. Signed-off-by: Peter Xu --- include/migration/register.h | 2 ++ migration/migration.c| 2

[Qemu-devel] [RFC v2 06/33] migration: reuse mis->userfault_quit_fd

2017-08-30 Thread Peter Xu
It was only used for quitting the page fault thread before. Let it be something more useful - now we can use it to notify a "wake" for the page fault thread (for any reason), and it only means "quit" if the fault_thread_quit is set. Since we changed what it does, renaming it to userfault_event_fd.

[Qemu-devel] [RFC v2 16/33] migration: rebuild channel on source

2017-08-30 Thread Peter Xu
This patch detects the "resume" flag of migration command, rebuild the channels only if the flag is set. Signed-off-by: Peter Xu --- migration/migration.c | 92 ++- 1 file changed, 69 insertions(+), 23 deletions(-) diff --git a/migration/migration

[Qemu-devel] [RFC v2 19/33] migration: new cmd MIG_CMD_RECV_BITMAP

2017-08-30 Thread Peter Xu
Add a new vm command MIG_CMD_RECV_BITMAP to request received bitmap for one ramblock. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/savevm.c | 61 ++ migration/savevm.h | 1 + migration/trace-events | 2 ++ 3

[Qemu-devel] [RFC v2 24/33] migration: synchronize dirty bitmap for resume

2017-08-30 Thread Peter Xu
This patch implements the first part of core RAM resume logic for postcopy. ram_resume_prepare() is provided for the work. When the migration is interrupted by network failure, the dirty bitmap on the source side will be meaningless, because even the dirty bit is cleared, it is still possible that

Re: [Qemu-devel] [PATCH] oslib-posix: Print errors before aborting on qemu_alloc_stack()

2017-08-30 Thread Stefan Hajnoczi
On Tue, Aug 29, 2017 at 06:20:53PM -0300, Eduardo Habkost wrote: > If QEMU is running on a system that's out of memory and mmap() > fails, QEMU aborts with no error message at all, making it hard > to debug the reason for the failure. > > Add perror() calls that will print error information before

[Qemu-devel] [RFC v2 09/33] migration: implement "postcopy-pause" src logic

2017-08-30 Thread Peter Xu
Now when network down for postcopy, the source side will not fail the migration. Instead we convert the status into this new paused state, and we will try to wait for a rescue in the future. If a recovery is detected, migration_thread() will reset its local variables to prepare for that. Signed-o

[Qemu-devel] [RFC v2 25/33] migration: setup ramstate for resume

2017-08-30 Thread Peter Xu
After we updated the dirty bitmaps of ramblocks, we also need to update the critical fields in RAMState to make sure it is ready for a resume. Signed-off-by: Peter Xu --- migration/ram.c| 37 - migration/trace-events | 1 + 2 files changed, 37 inserti

[Qemu-devel] [RFC v2 26/33] migration: final handshake for the resume

2017-08-30 Thread Peter Xu
Finish the last step to do the final handshake for the recovery. First source sends one MIG_CMD_RESUME to dst, telling that source is ready to resume. Then, dest replies with MIG_RP_MSG_RESUME_ACK to source, telling that dest is ready to resume (after switch to postcopy-active state). When sourc

[Qemu-devel] [RFC v2 27/33] migration: free SocketAddress where allocated

2017-08-30 Thread Peter Xu
Freeing the SocketAddress struct in socket_start_incoming_migration is slightly confusing. Let's free the address in the same context where we allocated it. Signed-off-by: Peter Xu --- migration/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/socket.c b

[Qemu-devel] [RFC v2 11/33] migration: allow src return path to pause

2017-08-30 Thread Peter Xu
Let the thread pause for network issues. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/migration.c | 35 +-- migration/migration.h | 1 + migration/trace-events | 2 ++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [RFC v2 29/33] migration: return incoming task tag for exec

2017-08-30 Thread Peter Xu
Return the async task tag for exec typed incoming migration in exec_start_incoming_migration(). Signed-off-by: Peter Xu --- migration/exec.c | 18 +++--- migration/exec.h | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/migration/exec.c b/migration/exec.c inde

[Qemu-devel] [RFC v2 30/33] migration: return incoming task tag for fd

2017-08-30 Thread Peter Xu
Allow to return the task tag in fd_start_incoming_migration(). Signed-off-by: Peter Xu --- migration/fd.c | 18 +++--- migration/fd.h | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/migration/fd.c b/migration/fd.c index 30f5258..e9a548c 100644 --- a/migration

[Qemu-devel] [RFC v2 31/33] migration: store listen task tag

2017-08-30 Thread Peter Xu
Store the task tag for migration types: tcp/unix/fd/exec in current MigrationIncomingState struct. For defered migration, no need to store task tag since there is no task running in the main loop at all. For RDMA, let's mark it as todo. Signed-off-by: Peter Xu --- migration/migration.c | 22 +++

[Qemu-devel] [RFC v2 33/33] migration: init dst in migration_object_init too

2017-08-30 Thread Peter Xu
Though we may not need it, now we init both the src/dst migration objects in migration_object_init() so that even incoming migration object would be thread safe (it was not). Signed-off-by: Peter Xu --- migration/migration.c | 27 ++- 1 file changed, 14 insertions(+), 13

[Qemu-devel] [RFC v2 17/33] migration: new state "postcopy-recover"

2017-08-30 Thread Peter Xu
Introducing new migration state "postcopy-recover". If a migration procedure is paused and the connection is rebuilt afterward successfully, we'll switch the source VM state from "postcopy-paused" to the new state "postcopy-recover", then we'll do the resume logic in the migration thread (along wit

[Qemu-devel] [RFC v2 32/33] migration: allow migrate_incoming for paused VM

2017-08-30 Thread Peter Xu
migrate_incoming command is previously only used when we were providing "-incoming defer" in the command line, to defer the incoming migration channel creation. However there is similar requirement when we are paused during postcopy migration. The old incoming channel might have been destroyed alr

Re: [Qemu-devel] make check speed

2017-08-30 Thread Cornelia Huck
On Thu, 24 Aug 2017 07:27:18 +0200 Thomas Huth wrote: > On 23.08.2017 14:20, Cornelia Huck wrote: > > So I tried this on master just for fun, and 'make V=1 SPEED=slow > > check-qtest-x86_64' promptly failed for some ivshmem test. > > > > On x86_86: > > TEST: tests/ivshmem-test... (pid=3672) > >

[Qemu-devel] [RFC v2 20/33] migration: new message MIG_RP_MSG_RECV_BITMAP

2017-08-30 Thread Peter Xu
Introducing new return path message MIG_RP_MSG_RECV_BITMAP to send received bitmap of ramblock back to source. This is the reply message of MIG_CMD_RECV_BITMAP, it contains not only the header (including the ramblock name), and it was appended with the whole ramblock received bitmap on the destina

[Qemu-devel] [RFC v2 21/33] migration: new cmd MIG_CMD_POSTCOPY_RESUME

2017-08-30 Thread Peter Xu
Introducing this new command to be sent when the source VM is ready to resume the paused migration. What the destination does here is basically release the fault thread to continue service page faults. Signed-off-by: Peter Xu --- migration/savevm.c | 33 + mi

[Qemu-devel] [RFC v2 28/33] migration: return incoming task tag for sockets

2017-08-30 Thread Peter Xu
For socket based incoming migration, we attached a background task onto main loop to handle the acception of connections. We never had a way to destroy it before, only if we finished the migration. Let's allow socket_start_incoming_migration() to return the source tag of the listening async work,

Re: [Qemu-devel] [Qemu-block] [PATCH v3] qemu-iotests: Extend non-shared storage migration test (194)

2017-08-30 Thread Kashyap Chamarthy
On Tue, Aug 29, 2017 at 04:16:54PM -0500, Eric Blake wrote: > On 08/29/2017 12:42 PM, Stefan Hajnoczi wrote: > > On Tue, Aug 29, 2017 at 5:50 PM, Kashyap Chamarthy > > wrote: > >> This is the follow-up patch that was discussed[*] as part of feedback to > >> qemu-iotest 194. > >> > > >> Signed-of

Re: [Qemu-devel] make check speed

2017-08-30 Thread Thomas Huth
On 30.08.2017 10:59, Cornelia Huck wrote: [...] >>> On s390x: >>> TEST: tests/ivshmem-test... (pid=63617) >>> /x86_64/ivshmem/single: OK >>> /x86_64/ivshmem/hotplug: OK >>> /x86_64/ivshmem/memdev:

Re: [Qemu-devel] [Qemu-block] [PATCH v2 8/9] AHCI: pretty-print FIS to buffer instead of stderr

2017-08-30 Thread Stefan Hajnoczi
On Tue, Aug 29, 2017 at 04:49:33PM -0400, John Snow wrote: > The current FIS printing routines dump the FIS to screen. adjust this > such that it dumps to buffer instead, then use this ability to have > FIS dump mechanisms via trace-events instead of compiled defines. > > Signed-off-by: John Snow

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/9] IDE: replace printfs with tracing

2017-08-30 Thread Stefan Hajnoczi
On Tue, Aug 29, 2017 at 04:49:25PM -0400, John Snow wrote: > Wherever possible, replace all printfs with proper tracing. > In most places I've tried to do a straight replacement, but > forthcoming patches may calibrate the tracing to be a little nicer. > > For now, it's nice to just remove the all

Re: [Qemu-devel] [PATCH v8 5/6] fsdev: hmp interface for throttling

2017-08-30 Thread Alberto Garcia
On Tue 29 Aug 2017 04:23:06 PM CEST, Pradeep Jagadeesh wrote: > +static void print_fsdev_throttle_config(Monitor *mon, IOThrottle *fscfg, > + Error *err) > +{ > +monitor_printf(mon, "%s", fscfg->id); > +monitor_printf(mon, "I/O throttling:" > +

Re: [Qemu-devel] About virtio device hotplug in Q35! 【外域邮件.谨慎查阅】

2017-08-30 Thread Bob Chen
I think I have observed what you said... The link speed on host remained 8GT/s until I finished running p2pBandwidthLatencyTest for the first time. Then it became 2.5GT/s... # lspci -s 09:00.0 -vvv 09:00.0 3D controller: NVIDIA Corporation GM204GL [Tesla M60] (rev a1) Subsystem: NVIDIA Corporati

Re: [Qemu-devel] [PATCH 1/2] tests: Use real size for iov tests

2017-08-30 Thread Juan Quintela
Thomas Huth wrote: > On 23.08.2017 10:39, Juan Quintela wrote: >> We were using -1 instead of the real size because the functions check >> what is bigger, size in bytes or the size of the iov. Recent gcc's >> barf at this. >> >> Signed-off-by: Juan Quintela >> --- >> tests/test-iov.c | 8 -

Re: [Qemu-devel] [PATCH 1/4] s390x/pci: fixup trap_msix()

2017-08-30 Thread Cornelia Huck
On Mon, 28 Aug 2017 10:04:44 +0200 Yi Min Zhao wrote: > The function trap_msix() is to check if pcistg instruction would access > msix table entries. The correct boundary condition should be > [table_offset, table_offset+entries*entry_size). But the current > condition calculated misses the last

Re: [Qemu-devel] [RFC v2 06/32] postcopy: use UFFDIO_ZEROPAGE only when available

2017-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 24, 2017 at 9:27 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Use a flag on the RAMBlock to state whether it has the > UFFDIO_ZEROPAGE capability, use it when it's available. > > This allows the use of postcopy on tmpfs as well as hugepage > backed

Re: [Qemu-devel] [RFC v2 02/32] vhub: Only process received packets on started queues

2017-08-30 Thread Marc-André Lureau
On Thu, Aug 24, 2017 at 9:27 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Only process received packets if the queue has been started. > > Signed-off-by: Dr. David Alan Gilbert > --- > tests/vhost-user-bridge.c | 1 + > 1 file changed, 1 insertion(+) > > diff --g

[Qemu-devel] [PATCH] block: Cleanup BMDS in bdrv_close_all

2017-08-30 Thread Fam Zheng
This fixes the assertion due to op blockers added by BMDS: block.c:3248: bdrv_delete: Assertion `bdrv_op_blocker_is_empty(bs)' failed. Reproducer: simply start block migration and quit QEMU before it ends. Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng --- block.c | 2 ++

Re: [Qemu-devel] [RFC v2 09/32] vhost-user: Add 'VHOST_USER_POSTCOPY_ADVISE' message

2017-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 24, 2017 at 12:27 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Wire up a notifier to send a VHOST_USER_POSTCOPY_ADVISE > message on an incoming advise. > > Later patches will fill in the behaviour/contents of the > message. > > Signed-off-by: Dr. Da

Re: [Qemu-devel] [Qemu-discuss] Accessing a shared folder

2017-08-30 Thread Greg Kurz
On Wed, 30 Aug 2017 09:28:57 + (UTC) Mahmood wrote: > >Could you please try to replace the -virtfs option with these two options: > > > >-fsdev local,id=shared,path=/home/mahmood/Downloads \ > >-device virtio-9p-pci,fsdev=shared,mount_tag=Downloads > > > > > Still get the same error!

Re: [Qemu-devel] [RFC v2 0/8] monitor: allow per-monitor thread

2017-08-30 Thread Daniel P. Berrange
On Wed, Aug 30, 2017 at 09:06:20AM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > On Wed, Aug 23, 2017 at 02:51:03PM +0800, Peter Xu wrote: > > >> However, even with the series, it does not mean that per-monitor > >> threads will never hang. One example is that we can stil

Re: [Qemu-devel] [PATCH] fixup! hostmem-file: Add "discard-data" option

2017-08-30 Thread Daniel P. Berrange
On Tue, Aug 29, 2017 at 06:36:57PM -0300, Eduardo Habkost wrote: > On Tue, Aug 29, 2017 at 10:12:58AM -0300, Eduardo Habkost wrote: > > On Tue, Aug 29, 2017 at 12:13:45PM +0100, Daniel P. Berrange wrote: > > > On Thu, Aug 24, 2017 at 04:23:15PM -0300, Eduardo Habkost wrote: > [...] > > > > @@ -4172

Re: [Qemu-devel] reduce write bandwidth of qcow2 driver while allocating new cluster

2017-08-30 Thread Anton Nefedov
On 29/08/2017 05:56, Liu Qing wrote: On Mon, Aug 28, 2017 at 10:46:34AM -0500, Eric Blake wrote: [adding qemu-block] On 08/28/2017 12:56 AM, Liu Qing wrote: Dear list, Recently I used fio to test qcow2 driver in the guest os, and found out that when a new cluster is allocated the 4K IO wi

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-30 Thread Fam Zheng
On Tue, 08/29 10:35, Philippe Mathieu-Daudé wrote: > On 08/29/2017 10:22 AM, Kamil Rytarowski wrote: > > On 29.08.2017 15:10, Philippe Mathieu-Daudé wrote: > > > Hi Fam, Kamil, > > > > > > > On 08/28/2017 02:47 PM, Fam Zheng wrote: > > > [...] > > > > > +subprocess.check_call([tar_cmd, > >

Re: [Qemu-devel] [PATCH v4 03/10] tests: Add vm test lib

2017-08-30 Thread Fam Zheng
On Wed, 08/30 11:29, Fam Zheng wrote: > On Tue, 08/29 09:15, Philippe Mathieu-Daudé wrote: > > > +self._args = [ \ > > > +"-nodefaults", "-m", "2G", > > > +"-cpu", "host", > > > +"-netdev", "user,id=vnet,hostfwd=:0.0.0.0:0-:22", > > > > Testing with debi

Re: [Qemu-devel] [PATCH v2 01/13] hvf: add support for Hypervisor.framework in the configure script

2017-08-30 Thread Stefan Hajnoczi
On Wed, Aug 30, 2017 at 03:26:50AM -0500, Sergio Andres Gomez Del Real wrote: > This patch adds to the configure script the code to support the > --enable-hvf argument. If the OS is Darwin, it checks for presence of > HVF in the system. The patch also adds strings related to HVF in the > file qemu-

Re: [Qemu-devel] [RFC v2 10/32] vhub: Support sending fds back to qemu

2017-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 24, 2017 at 12:27 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Allow replies with fds (for postcopy) > > Signed-off-by: Dr. David Alan Gilbert > --- > contrib/libvhost-user/libvhost-user.c | 29 - > 1 file changed, 28 i

Re: [Qemu-devel] [PATCH v2 03/13] hvf: add compilation rules to Makefile.objs

2017-08-30 Thread Stefan Hajnoczi
On Wed, Aug 30, 2017 at 03:26:52AM -0500, Sergio Andres Gomez Del Real wrote: > This commit adds to target/i386/Makefile.objs the necessary rules so > that the new files for hvf are compiled by the build system. > It also adds handling of the -enable-hvf argument in the main function > in vl.c. >

Re: [Qemu-devel] [PATCH v2 05/13] hvf: add fields to CPUState and CPUX86State; add definitions

2017-08-30 Thread Stefan Hajnoczi
On Wed, Aug 30, 2017 at 03:26:54AM -0500, Sergio Andres Gomez Del Real wrote: > This commit adds some fields specific to hvf in CPUState and > CPUX86State. It also adds some handy #defines. > > Signed-off-by: Sergio Andres Gomez Del Real > --- > include/qom/cpu.h | 2 ++ > target/i386/cpu.h | 2

Re: [Qemu-devel] [PATCH v2 03/13] hvf: add compilation rules to Makefile.objs

2017-08-30 Thread Stefan Hajnoczi
On Wed, Aug 30, 2017 at 03:26:52AM -0500, Sergio Andres Gomez Del Real wrote: > This commit adds to target/i386/Makefile.objs the necessary rules so > that the new files for hvf are compiled by the build system. > It also adds handling of the -enable-hvf argument in the main function > in vl.c. >

Re: [Qemu-devel] [RFC v2 11/32] vhub: Open userfaultfd

2017-08-30 Thread Marc-André Lureau
I would rather use libvhost-user: message prefix (same for similar libvhost-user patches) On Thu, Aug 24, 2017 at 12:27 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Open a userfaultfd (on a postcopy_advise) and send it back in > the reply to the qemu for it to mon

Re: [Qemu-devel] Persistent bitmaps for non-qcow2 formats

2017-08-30 Thread Max Reitz
On 2017-08-29 11:26, Yaniv Lavi (Dary) wrote: > > > YANIV LAVI (YANIV DARY) > > SENIOR TECHNICAL PRODUCT MANAGER > > Red Hat Israel Ltd. > > 34 Jerusalem Road, Building A, 1st floor > > Ra'anana, Israel 4350109 > > yl...@redhat.com     T: +9

Re: [Qemu-devel] [RFC v2 14/32] vhost+postcopy: Transmit 'listen' to client

2017-08-30 Thread Marc-André Lureau
On Thu, Aug 24, 2017 at 12:27 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Notify the vhost-user client on reception of the 'postcopy-listen' > event from the source. > > Signed-off-by: Dr. David Alan Gilbert > --- > contrib/libvhost-user/libvhost-user.c | 21 +++

Re: [Qemu-devel] [PATCH v2 0/3] QEMU Backup Tool

2017-08-30 Thread Stefan Hajnoczi
On Tue, Aug 29, 2017 at 10:13:36PM +0530, Ishani Chugh wrote: > This patch series is intended to introduce QEMU Backup tool. > qemu-backup will be a command-line tool for performing full and > incremental disk backups on running VMs. It is intended as a > reference implementation for management sta

Re: [Qemu-devel] [RFC v2 28/32] postcopy: Allow shared memory

2017-08-30 Thread Marc-André Lureau
Hi On Thu, Aug 24, 2017 at 12:27 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Now that we have the mechanisms in here, allow shared memory in a > postcopy. > > Note that QEMU can't tell who all the users of shared regions are > and thus can't tell whether all the

Re: [Qemu-devel] [RFC v2 15/32] vhost+postcopy: Register new regions with the ufd

2017-08-30 Thread Marc-André Lureau
Use "libvhost-user: " commit title tag/prefix? On Thu, Aug 24, 2017 at 12:27 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > When new regions are sent to the client using SET_MEM_TABLE, register > them with the userfaultfd. > > Signed-off-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH 2/2] tests: Make acpid test compile

2017-08-30 Thread Daniel P. Berrange
On Tue, Aug 29, 2017 at 03:17:25PM -0500, Eric Blake wrote: > On 08/28/2017 09:41 AM, Cédric Le Goater wrote: > > On 08/23/2017 01:53 PM, Dr. David Alan Gilbert wrote: > >> * Juan Quintela (quint...@redhat.com) wrote: > >>> Compiler gets confused with the size of the struct, so move form > >>> g_ne

Re: [Qemu-devel] [RFC v2 24/32] vub+postcopy: madvises

2017-08-30 Thread Marc-André Lureau
Hi "libvhost-user: madvises for postcopy" for ex, would be nicer imho On Thu, Aug 24, 2017 at 12:27 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Clear the area and turn off THP. > > Signed-off-by: Dr. David Alan Gilbert > --- > contrib/libvhost-user/libvhost-us

Re: [Qemu-devel] [PATCH for-2.11 5/6] ppc: simplify cpu model lookup by PVR

2017-08-30 Thread Igor Mammedov
On Fri, 25 Aug 2017 19:32:29 +1000 David Gibson wrote: > On Fri, Aug 25, 2017 at 09:40:37AM +0200, Igor Mammedov wrote: > > On Fri, 25 Aug 2017 14:16:44 +1000 > > David Gibson wrote: > > > > > On Thu, Aug 24, 2017 at 10:21:50AM +0200, Igor Mammedov wrote: > > > > Signed-off-by: Igor Mammedo

Re: [Qemu-devel] [PATCH 2/2] tests: Make acpid test compile

2017-08-30 Thread Juan Quintela
Cedric Le Goater wrote: > On 08/23/2017 01:53 PM, Dr. David Alan Gilbert wrote: >> * Juan Quintela (quint...@redhat.com) wrote: >>> Compiler gets confused with the size of the struct, so move form >>> g_new0() to g_malloc0(). >>> >>> I *think* that the problem is in gcc (or glib for that matter),

Re: [Qemu-devel] [RFC v2 29/32] vhost-user: Claim support for postcopy

2017-08-30 Thread Marc-André Lureau
Hi Use "libvhost-user: ", so we don't confuse with qemu own vhost-user code. On Thu, Aug 24, 2017 at 12:27 PM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Tell QEMU we understand the protocol features needed for postcopy. > > Signed-off-by: Dr. David Alan Gilbert >

Re: [Qemu-devel] [PATCH] misc: Remove unused Error variables

2017-08-30 Thread Stefan Hajnoczi
On Tue, Aug 29, 2017 at 03:08:36PM +0300, Alberto Garcia wrote: > There's a few cases which we're passing an Error pointer to a function > only to discard it immediately afterwards without checking it. In > these cases we can simply remove the variable and pass NULL instead. > > Signed-off-by: Alb

Re: [Qemu-devel] [PATCH 0/3] scripts: add argparse module for Python 2.6 compatibility

2017-08-30 Thread Stefan Hajnoczi
On Fri, Aug 25, 2017 at 04:57:29PM +0100, Stefan Hajnoczi wrote: > Many scripts can benefit from the standard library argparse module, which has > improvements over the older optparse module. Unfortunately argparse was only > shipped in Python 2.7 so we need a fallback for Python 2.6. > > This pa

Re: [Qemu-devel] [PATCH 2/2] tests: Make acpid test compile

2017-08-30 Thread Daniel P. Berrange
On Wed, Aug 30, 2017 at 12:51:23PM +0200, Juan Quintela wrote: > Cedric Le Goater wrote: > > On 08/23/2017 01:53 PM, Dr. David Alan Gilbert wrote: > >> * Juan Quintela (quint...@redhat.com) wrote: > >>> Compiler gets confused with the size of the struct, so move form > >>> g_new0() to g_malloc0().

Re: [Qemu-devel] [PATCH 0/8] tcg/s390 improvements

2017-08-30 Thread Cornelia Huck
On Tue, 29 Aug 2017 13:47:51 -0700 Richard Henderson wrote: > This finally converts s390 to the tcg_target_op_def function, which > allows constraints to vary at runtime. Once we have that, we can > > (1) Perform some facilities checks once during startup instead of > every time we evaluate

Re: [Qemu-devel] Persistent bitmaps for non-qcow2 formats

2017-08-30 Thread Max Reitz
On 2017-08-29 03:18, John Snow wrote: > > > On 08/25/2017 09:44 AM, Max Reitz wrote: >> On 2017-08-25 02:55, John Snow wrote: [...] >>> In (1), we avoid saving or specifying the relationship between these two >>> data stores in any way. This is certainly easy to do, and will save us >>> some he

Re: [Qemu-devel] Persistent bitmaps for non-qcow2 formats

2017-08-30 Thread Max Reitz
On 2017-08-29 23:02, John Snow wrote: > > > On 08/29/2017 10:30 AM, Eric Blake wrote: >> On 08/28/2017 08:18 PM, John Snow wrote: > We'd have to develop a new syntax for specifying these resources that > can be stored in a qcow2 file, It's called the json-pseudo-protocol and was

Re: [Qemu-devel] [PATCH] slirp: fix clearing ifq_so from pending packets

2017-08-30 Thread Peter Maydell
On 30 August 2017 at 08:52, Samuel Thibault wrote: > Thomas Huth, on mer. 30 août 2017 09:50:45 +0200, wrote: >> On 26.08.2017 00:37, Samuel Thibault wrote: >> > The if_fastq and if_batchq contain not only packets, but queues of packets >> > for the same socket. When sofree frees a socket, it thus

[Qemu-devel] [PATCH v2 0/2] Fix tests on recent gcc

2017-08-30 Thread Juan Quintela
Hi Changes from v1: - move all uses of -1 for memtest. - remove docs about the feature. - use size_t for the second patch (cedric) Please, review. [v1] On Fedora 26 (gcc-7.1.1 and glib2 2.52.3) tests don't compile. In file included from /usr/include/string.h:639:0, from /mn

[Qemu-devel] [PATCH v2 1/2] tests: Use real size for iov tests

2017-08-30 Thread Juan Quintela
We were using -1 instead of the real size because the functions check what is bigger, size in bytes or the size of the iov. Recent gcc's barf at this. Signed-off-by: Juan Quintela -- Remove comments about this feature. Fix missing -1. --- include/qemu/iov.h | 6 -- tests/test-iov.c | 1

[Qemu-devel] [PATCH v2 2/2] tests: Make vmgenid test compile

2017-08-30 Thread Juan Quintela
Just make sure that nr_tables is size_t not int. Suggested-by: Cédric Le Goater Signed-off-by: Juan Quintela -- Drop the s/g_new0/g_malloc0/ change. --- tests/vmgenid-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vmgenid-test.c b/tests/vmgenid-test.c index 3

  1   2   3   4   5   >