Re: [Qemu-devel] [PATCH v10 18/24] migration: Add multifd traces for start/end thread

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 12:00:04PM +0100, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > migration/ram.c| 6 ++ > migration/trace-events | 4 > 2 files changed, 10 insertions(+) Reviewed-by: Daniel P. Berrangé Regards,

Re: [Qemu-devel] [PATCH v10 24/24] [RFC] migration: Send pages through the multifd channels

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 12:00:10PM +0100, Juan Quintela wrote: > Migration ends correctly, but there is still a race between clean up > and last synchronization. > > Signed-off-by: Juan Quintela > --- > migration/ram.c| 132 >

Re: [Qemu-devel] [PATCH v2 3/9] chardev: update net listener gcontext

2018-03-07 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 01:33:14PM +0800, Peter Xu wrote: > TCP chardevs can be using QIO network listeners working in the > background when in listening mode. However the network listeners are > always running in main context. This can race with chardevs that are > running in non-main contexts.

Re: [Qemu-devel] [PATCH v2 5/9] chardev: introduce chr_machine_done hook

2018-03-07 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 01:33:16PM +0800, Peter Xu wrote: > Introduce ChardevClass.chr_machine_done() hook so that chardevs can run > customized procedures after machine init. > > There was an existing mux user already that did similar thing but used a > raw machine done notifier. Generalize it

Re: [Qemu-devel] [PATCH v2 8/9] chardev: tcp: let TLS run on chardev context

2018-03-07 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 01:33:19PM +0800, Peter Xu wrote: > Now qio_channel_tls_handshake() is ready to receive the context. Let > socket chardev use it, then the TLS handshake of chardev will always be > with the chardev's context. > > Signed-off-by: Peter Xu > --- >

Re: [Qemu-devel] [Qemu-arm] VCPU hotplug on KVM/ARM

2018-03-07 Thread Marc Zyngier
On 01/03/18 13:32, David Hildenbrand wrote: > On 01.03.2018 11:05, Peter Maydell wrote: >> On 1 March 2018 at 09:50, Igor Mammedov wrote: >>> In QEMU on x86 (and I think ppc, s390 as well), we create vCPUs on demand.>> >>> It would be nice if ARM would be able to do that too,

[Qemu-devel] [PULL v1 2/5] tpm: convert tpm_passthrough.c to use trace-events

2018-03-07 Thread Stefan Berger
Signed-off-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi --- hw/tpm/tpm_passthrough.c | 13 +++-- hw/tpm/trace-events

[Qemu-devel] [PULL v1 0/5] Merge tpm 2018/03/07

2018-03-07 Thread Stefan Berger
This series of patches converts the TPM code to use trace-events rather than debug #define's. Stefan The following changes since commit 8cb340c613ee3e626b070e0429c589f8a60ac657: Merge remote-tracking branch 'remotes/famz/tags/staging-pull-request' into staging (2018-03-01 12:32:31 +)

[Qemu-devel] [PATCH v4 4/4] migration: use the free page hint feature from balloon

2018-03-07 Thread Wei Wang
Start the free page optimization after the migration bitmap is synchronized. This can't be used in the stop phase since the guest is paused. Make sure the guest reporting has stopped before synchronizing the migration dirty bitmap. Currently, the optimization is added to precopy only.

Re: [Qemu-devel] [PATCH v3 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-07 Thread Wei Wang
On 03/06/2018 10:38 AM, Michael S. Tsirkin wrote: On Tue, Mar 06, 2018 at 09:54:49AM +0800, Wei Wang wrote: On 03/05/2018 10:09 PM, Michael S. Tsirkin wrote: On Mon, Mar 05, 2018 at 11:36:15AM +0800, Wei Wang wrote: On 03/03/2018 02:37 AM, Michael S. Tsirkin wrote: On Fri, Mar 02, 2018 at

[Qemu-devel] [PATCH v10 06/24] tests: Add basic migration precopy tcp test

2018-03-07 Thread Juan Quintela
Not sharing code from precopy/unix because we have to read back the tcp parameter. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- tests/migration-test.c | 58

[Qemu-devel] [PATCH v10 09/24] migration: Set error state in case of error

2018-03-07 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.c | 20 1 file changed, 20 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 3b6c077964..4a56a85d53 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -414,6 +414,16 @@ static void

[Qemu-devel] [PATCH v10 12/24] migration: Reference counting recv channels correctly

2018-03-07 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/socket.c | 11 +++ migration/socket.h | 7 +++ 2 files changed, 18 insertions(+) diff --git a/migration/socket.c b/migration/socket.c index b12b0a462e..26110739cf 100644 --- a/migration/socket.c +++

[Qemu-devel] [PATCH v10 08/24] migration: Add multifd test

2018-03-07 Thread Juan Quintela
We set the x-multifd-page-count and x-multifd-channels. Signed-off-by: Juan Quintela --- tests/migration-test.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/tests/migration-test.c b/tests/migration-test.c index

[Qemu-devel] [PATCH v10 20/24] migration: Delay start of migration main routines

2018-03-07 Thread Juan Quintela
We need to make sure that we have started all the multifd threads. Signed-off-by: Juan Quintela --- migration/migration.c | 4 ++-- migration/migration.h | 1 + migration/ram.c | 3 +++ migration/socket.c| 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH v10 07/24] [RFH] tests: Add migration compress threads tests

2018-03-07 Thread Juan Quintela
Yeap, it is still not working. trying to learn how to debug threads for guests running from the testt hardness. For some reason, compression is not working at the moment, test is disabled until I found why. Signed-off-by: Juan Quintela --- tests/migration-test.c | 52

[Qemu-devel] [PATCH v10 01/24] tests: Add migration precopy test

2018-03-07 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- tests/migration-test.c | 44 ++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH v10 13/24] migration: Introduce multifd_recv_new_channel()

2018-03-07 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/migration.c | 3 ++- migration/ram.c | 6 ++ migration/ram.h | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index c398665de7..919343232e 100644

[Qemu-devel] [PATCH v10 19/24] migration: Create multifd channels

2018-03-07 Thread Juan Quintela
In both sides. We still don't transmit anything through them. Signed-off-by: Juan Quintela --- migration/ram.c | 52 ++-- 1 file changed, 42 insertions(+), 10 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index

[Qemu-devel] [PATCH v10 22/24] migration: Create ram_multifd_page

2018-03-07 Thread Juan Quintela
The function still don't use multifd, but we have simplified ram_save_page, xbzrle and RDMA stuff is gone. We have added a new counter. Signed-off-by: Juan Quintela -- Add last_page parameter Add commets for done and address Remove multifd field, it is the same than normal

[Qemu-devel] [PULL 2/4] multiboot: Remove unused variables from multiboot.c

2018-03-07 Thread Kevin Wolf
From: Jack Schwartz Remove unused variables: mh_mode_type, mh_width, mh_height, mh_depth Signed-off-by: Jack Schwartz Reviewed-by: Daniel Kiper Reviewed-by: Prasad J Pandit Signed-off-by:

[Qemu-devel] [PULL 1/4] multiboot: bss_end_addr can be zero

2018-03-07 Thread Kevin Wolf
From: Jack Schwartz The multiboot spec (https://www.gnu.org/software/grub/manual/multiboot/), section 3.1.3, allows for bss_end_addr to be zero. A zero bss_end_addr signifies there is no .bss section. Suggested-by: Daniel Kiper Signed-off-by:

[Qemu-devel] [PATCH v10 24/24] [RFC] migration: Send pages through the multifd channels

2018-03-07 Thread Juan Quintela
Migration ends correctly, but there is still a race between clean up and last synchronization. Signed-off-by: Juan Quintela --- migration/ram.c| 132 ++--- migration/trace-events | 3 +- 2 files changed, 126

[Qemu-devel] [PULL 4/6] qio: non-default context for threaded qtask

2018-03-07 Thread Daniel P . Berrangé
From: Peter Xu qio_task_run_in_thread() allows main thread to run blocking operations in the background. However it has an assumption on that it's always working with the default context. This patch tries to allow the threaded QIO task framework to run with non-default

Re: [Qemu-devel] [PATCH] block: make BDRV_POLL_WHILE() re-entrancy safe

2018-03-07 Thread Stefan Hajnoczi
On Tue, Mar 06, 2018 at 12:08:44PM +0100, Kevin Wolf wrote: > Am 06.03.2018 um 11:53 hat Stefan Hajnoczi geschrieben: > > Nested BDRV_POLL_WHILE() calls can occur. Currently > > assert(!bs_->wakeup) will fail when this happens. > > > > This patch converts bs->wakeup from bool to a counter. > >

Re: [Qemu-devel] [PATCH v10 04/24] migration: Set the migration tcp port

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 11:59:50AM +0100, Juan Quintela wrote: > We can set the port parameter as zero. This patch lets us know what > port the system was choosen for us. Now we can migrate to this place. > > Signed-off-by: Juan Quintela > > -- > > This was

Re: [Qemu-devel] [PATCH v10 12/24] migration: Reference counting recv channels correctly

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 11:59:58AM +0100, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > migration/socket.c | 11 +++ > migration/socket.h | 7 +++ > 2 files changed, 18 insertions(+) > > diff --git a/migration/socket.c b/migration/socket.c > index

Re: [Qemu-devel] [PATCH v10 17/24] migration: Export functions to create send channels

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 12:00:03PM +0100, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > migration/socket.c | 28 +++- > migration/socket.h | 3 +++ > 2 files changed, 30 insertions(+), 1 deletion(-) > > diff --git a/migration/socket.c

Re: [Qemu-devel] [PATCH v10 22/24] migration: Create ram_multifd_page

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 12:00:08PM +0100, Juan Quintela wrote: > The function still don't use multifd, but we have simplified > ram_save_page, xbzrle and RDMA stuff is gone. We have added a new > counter. > > Signed-off-by: Juan Quintela > > -- > Add last_page parameter >

Re: [Qemu-devel] [PATCH v2 4/9] chardev: allow telnet gsource to switch gcontext

2018-03-07 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 01:33:15PM +0800, Peter Xu wrote: > It was originally created by qio_channel_add_watch() so it's always > assigning the task to main context. Now we use the new API called > qio_channel_add_watch_source() so that we get the GSource handle rather > than the tag ID. > >

Re: [Qemu-devel] [PATCH] trace: only permit standard C types and fixed size integer types

2018-03-07 Thread Stefan Hajnoczi
On Tue, Mar 06, 2018 at 03:46:25PM +, Daniel P. Berrangé wrote: > Some trace backends will compile code based on the declared trace > events. It should not be assumed that the backends can resolve any QEMU > specific typedefs. So trace events should restrict their argument > types to the

Re: [Qemu-devel] [PULL 19/34] address_space_access_valid: address_space_to_flatview needs RCU lock

2018-03-07 Thread Cornelia Huck
On Tue, 6 Mar 2018 14:19:15 +0100 Paolo Bonzini wrote: > address_space_access_valid is calling address_space_to_flatview but it can > be called outside the RCU lock. To fix it, push the rcu_read_lock/unlock > pair up from flatview_access_valid to

[Qemu-devel] [PULL v1 1/5] tpm: convert tpm_crb.c to use trace-events

2018-03-07 Thread Stefan Berger
Signed-off-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi --- Makefile.objs | 1 + hw/tpm/tpm_crb.c| 17

[Qemu-devel] [PATCH v4 1/4] bitmap: bitmap_count_one_with_offset

2018-03-07 Thread Wei Wang
Count the number of 1s in a bitmap starting from an offset. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela CC: Michael S. Tsirkin --- include/qemu/bitmap.h | 13 + 1 file

Re: [Qemu-devel] [Qemu-ppc] [PULL 00/30] ppc-for-2.12 queue 20180306

2018-03-07 Thread Cornelia Huck
On Wed, 7 Mar 2018 13:21:18 +0100 Thomas Huth wrote: > On 07.03.2018 13:16, luigi burdo wrote: > > HI, > > > > i had test last git with Zoltan sam emultation but at start i recive this > > > > ./qemu-system-ppc -M sam460ex > > qemu-system-ppc: > >

[Qemu-devel] [PATCH v4 0/4] virtio-balloon: free page hint reporting support

2018-03-07 Thread Wei Wang
This is the deivce part implementation to add a new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device receives the guest free page hints from the driver and clears the corresponding bits in the dirty bitmap, so that those free pages are not transferred by the

[Qemu-devel] [PATCH v4 3/4] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

2018-03-07 Thread Wei Wang
The new feature enables the virtio-balloon device to receive hints of guest free pages from the free page vq. balloon_free_page_start - start guest free page hint reporting. balloon_free_page_stop - stop guest free page hint reporting. Note: balloon will report pages which were free at the time

[Qemu-devel] [PATCH v10 03/24] migration: Create tcp_port parameter

2018-03-07 Thread Juan Quintela
It will be used to store the uri tcp_port parameter. This is the only parameter than can change and we can need to be able to connect to it. Signed-off-by: Juan Quintela -- This used to be uri parameter, but it has so many troubles to reproduce that it don't just make

[Qemu-devel] [RFC v10 00/24] Multifd

2018-03-07 Thread Juan Quintela
Hi this is the v10 version of the multifd patches, Lots of changes from previous versions: a - everything is sent now through the multifd channels, nothing is sent through main channel b - locking is band new, I was getting into a hole with the previous approach, right now, there is a single

[Qemu-devel] [PATCH v10 23/24] migration: Create pages structure for reception

2018-03-07 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index df9646ed2e..264d2e462a 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -698,6 +698,7 @@ static void

[Qemu-devel] [PATCH v10 11/24] migration: terminate_* can be called for other threads

2018-03-07 Thread Juan Quintela
Once there, make count field to always be accessed with atomic operations. To make blocking operations, we need to know that the thread is running, so create a bool to indicate that. Signed-off-by: Juan Quintela --- migration/ram.c | 30 -- 1

[Qemu-devel] [PATCH v10 21/24] migration: Transmit initial package through the multifd channels

2018-03-07 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.c | 50 +- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 1aab96bd5e..4efac0c20c 100644 --- a/migration/ram.c +++

[Qemu-devel] [PULL 3/4] multiboot: Use header names when displaying fields

2018-03-07 Thread Kevin Wolf
From: Jack Schwartz Refer to field names when displaying fields in printf and debug statements. Signed-off-by: Jack Schwartz Reviewed-by: Daniel Kiper Signed-off-by: Kevin Wolf ---

[Qemu-devel] [PULL 6/6] qio: non-default context for TLS handshake

2018-03-07 Thread Daniel P . Berrangé
From: Peter Xu A new parameter "context" is added to qio_channel_tls_handshake() is to allow the TLS to be run on a non-default context. Still, no functional change. Signed-off-by: Peter Xu Signed-off-by: Daniel P. Berrangé ---

[Qemu-devel] [PULL 2/6] qio: introduce qio_channel_add_watch_{full|source}

2018-03-07 Thread Daniel P . Berrangé
From: Peter Xu Firstly, introduce an internal qio_channel_add_watch_full(), which enhances qio_channel_add_watch() that context can be specified. Then add a new API wrapper qio_channel_add_watch_source() to return a GSource pointer rather than a tag ID. Note that the

[Qemu-devel] [PULL 0/6] Qio next patches

2018-03-07 Thread Daniel P . Berrangé
The following changes since commit f2bb2d14c2958f3f5aef456bd2cdb1ff99f4a562: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2018-03-05 16:41:20 +) are available in the Git repository at: https://github.com/berrange/qemu tags/qio-next-pull-request

[Qemu-devel] [PULL 1/6] qio: rename qio_task_thread_result

2018-03-07 Thread Daniel P . Berrangé
From: Peter Xu It is strange that it was called gio_task_thread_result. Rename it to follow the naming rule of the file. Reviewed-by: Daniel P. Berrange Signed-off-by: Peter Xu Signed-off-by: Daniel P. Berrangé

Re: [Qemu-devel] [PATCH v3 5/5] tests/bios-tables-test: add test cases for DIMM proximity

2018-03-07 Thread Igor Mammedov
On Mon, 5 Mar 2018 14:57:10 +0800 Haozhong Zhang wrote: > QEMU now builds one SRAT memory affinity structure for each > static-plugged PC-DIMM and NVDIMM device with the proximity domain > specified in the device option 'node', rather than only one SRAT > memory

Re: [Qemu-devel] [PATCH v10 18/24] migration: Add multifd traces for start/end thread

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 12:00:04PM +0100, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > migration/ram.c| 6 ++ > migration/trace-events | 4 > 2 files changed, 10 insertions(+) > > diff --git a/migration/trace-events b/migration/trace-events

[Qemu-devel] [PATCH] tests/boot-serial: Check the 40p machine, too

2018-03-07 Thread Thomas Huth
The "40p" machine is using the Open Hack'Ware BIOS, just like the "prep" machine, so we can test it accordingly with the boot-serial tester, too. While we're at it, also change the strings that we are using for the "prep" machine, so that this test now also checks some CLI parameters.

Re: [Qemu-devel] [PULL] RISC-V QEMU Port Submission v8.2

2018-03-07 Thread Michael Clark
On Wed, 7 Mar 2018 at 11:11 PM, Richard W.M. Jones wrote: > On Wed, Mar 07, 2018 at 01:09:29PM +1300, Michael Clark wrote: > > Hopefully, this PR gets merged... > > I hope so too. We've been testing v8 (substantially the same as v8.2) > extensively, including SMP. It's

Re: [Qemu-devel] [Qemu-ppc] [PULL 00/30] ppc-for-2.12 queue 20180306

2018-03-07 Thread Thomas Huth
On 07.03.2018 13:16, luigi burdo wrote: > HI, > > i had test last git with Zoltan sam emultation but at start i recive this > > ./qemu-system-ppc -M sam460ex > qemu-system-ppc: > /home/gigi/src/tags/ppc-for-2.12-20180306/include/qemu/rcu.h:89: > rcu_read_unlock: asserzione "p_rcu_reader->depth

Re: [Qemu-devel] [PATCH v2 1/9] vl: export machine_init_done

2018-03-07 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 01:33:12PM +0800, Peter Xu wrote: > We have that variable but not exported. Export that so modules can have > a way to poke on whether machine init has finished. > > Meanwhile, set that up even before calling the notifiers, so that > notifiers who may depend on this field

Re: [Qemu-devel] [PATCH v3 1/3] migration: API to clear bits of guest free pages from the dirty bitmap

2018-03-07 Thread Dr. David Alan Gilbert
* Wei Wang (wei.w.w...@intel.com) wrote: > This patch adds an API to clear bits corresponding to guest free pages > from the dirty bitmap. Spilt the free page block if it crosses the QEMU > RAMBlock boundary. > > Signed-off-by: Wei Wang > CC: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH] trace: fix ARM TrustZone PPC hwaddr type

2018-03-07 Thread Stefan Hajnoczi
On Tue, Mar 06, 2018 at 03:40:23PM -0300, Philippe Mathieu-Daudé wrote: > On 03/06/2018 02:22 PM, Stefan Hajnoczi wrote: > > Commit 9eb8040c2d2b ("hw/misc/tz-ppc: Model TrustZone peripheral > > protection controller") added trace events with hwaddr type arguments. > > > > This is not allowed and

Re: [Qemu-devel] [PATCH v2 7/9] chardev: tcp: postpone async connection setup

2018-03-07 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 01:33:18PM +0800, Peter Xu wrote: > This patch allows the socket chardev async connection be setup with > non-default gcontext. We do it by postponing the setup to machine done, > since until then we can know which context we should run the async > operation on. > >

Re: [Qemu-devel] [BUG] I/O thread segfault for QEMU on s390x

2018-03-07 Thread Farhan Ali
On 03/06/2018 01:34 AM, Martin Schwidefsky wrote: On Mon, 5 Mar 2018 20:08:45 +0100 Christian Borntraeger wrote: Do you happen to run with a recent host kernel that has commit 7041d28115e91f2144f811ffe8a195c696b1e1d0 s390: scrub registers on kernel entry and

Re: [Qemu-devel] [PATCH v3 1/3] migration: API to clear bits of guest free pages from the dirty bitmap

2018-03-07 Thread Wei Wang
On 03/07/2018 08:23 PM, Dr. David Alan Gilbert wrote: * Wei Wang (wei.w.w...@intel.com) wrote: This patch adds an API to clear bits corresponding to guest free pages from the dirty bitmap. Spilt the free page block if it crosses the QEMU RAMBlock boundary. Signed-off-by: Wei Wang

Re: [Qemu-devel] [PATCH 0/5] Convert the TPM code to use tracing

2018-03-07 Thread Stefan Berger
On 03/06/2018 09:48 AM, Stefan Hajnoczi wrote: On Sun, Mar 04, 2018 at 04:56:22PM -0500, Stefan Berger wrote: This series of patches converts the TPM code to use tracing rather than the #define DEBUG_XYZ type of debugging. Regards, Stefan Stefan Berger (5): tpm: convert tpm_crb.c to

Re: [Qemu-devel] [PATCH v3 3/3] migration: use the free page hint feature from balloon

2018-03-07 Thread Wei Wang
On 03/07/2018 08:32 PM, Dr. David Alan Gilbert wrote: * Wei Wang (wei.w.w...@intel.com) wrote: Start the free page optimization when the bulk stage starts. In case the guest is slow in reporting, actively stops it when the bulk stage ends. The optimization avoids sending guest free pages during

[Qemu-devel] [PATCH v4 2/4] migration: API to clear bits of guest free pages from the dirty bitmap

2018-03-07 Thread Wei Wang
This patch adds an API to clear bits corresponding to guest free pages from the dirty bitmap. Spilt the free page block if it crosses the QEMU RAMBlock boundary. Signed-off-by: Wei Wang CC: Dr. David Alan Gilbert CC: Juan Quintela

Re: [Qemu-devel] [PULL 19/34] address_space_access_valid: address_space_to_flatview needs RCU lock

2018-03-07 Thread Paolo Bonzini
On 07/03/2018 13:49, Cornelia Huck wrote: > On Tue, 6 Mar 2018 14:19:15 +0100 > Paolo Bonzini wrote: > >> address_space_access_valid is calling address_space_to_flatview but it can >> be called outside the RCU lock. To fix it, push the rcu_read_lock/unlock >> pair up from

[Qemu-devel] [PATCH] memory: fix flatview_access_valid RCU read lock/unlock imbalance

2018-03-07 Thread Paolo Bonzini
Fixes: 11e732a5ed46903f997985bed4c3767ca28a7eb6 Reported-by: Cornelia Huck Reported-by: luigi burdo Signed-off-by: Paolo Bonzini --- exec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/exec.c b/exec.c index

[Qemu-devel] [PATCH v10 14/24] migration: Be sure all recv channels are created

2018-03-07 Thread Juan Quintela
We need them before we start migration. Signed-off-by: Juan Quintela --- migration/migration.c | 6 +- migration/ram.c | 11 +++ migration/ram.h | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/migration/migration.c

[Qemu-devel] [PATCH v10 16/24] migration: Synchronize recv threads

2018-03-07 Thread Juan Quintela
We synchronize all threads each RAM_SAVE_FLAG_EOS. Bitmap synchronizations don't happen inside a ram section, so we are safe about two channels trying to overwrite the same memory. Signed-off-by: Juan Quintela --- migration/ram.c| 37

[Qemu-devel] [PATCH v10 02/24] tests: Add migration xbzrle test

2018-03-07 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Peter Xu --- tests/migration-test.c | 64 ++ 1 file changed, 64 insertions(+) diff --git a/tests/migration-test.c b/tests/migration-test.c index

[Qemu-devel] [PATCH v10 18/24] migration: Add multifd traces for start/end thread

2018-03-07 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.c| 6 ++ migration/trace-events | 4 2 files changed, 10 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index 0266bd200c..b57d9fd667 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -492,6

[Qemu-devel] [PULL 4/4] multiboot: fprintf(stderr...) -> error_report()

2018-03-07 Thread Kevin Wolf
From: Jack Schwartz Change all fprintf(stderr...) calls in hw/i386/multiboot.c to call error_report() instead, including the mb_debug macro. Remove the "\n" from strings passed to all modified calls, since error_report() appends one. Signed-off-by: Jack Schwartz

[Qemu-devel] [PATCH v10 17/24] migration: Export functions to create send channels

2018-03-07 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/socket.c | 28 +++- migration/socket.h | 3 +++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/migration/socket.c b/migration/socket.c index 26110739cf..b3b5571ebb 100644 ---

[Qemu-devel] [PULL 0/4] Multiboot patches

2018-03-07 Thread Kevin Wolf
The following changes since commit f32408f3b472a088467474ab152be3b6285b2d7b: misc: don't use hwaddr as a type in trace events (2018-03-06 14:24:30 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch changes up to

[Qemu-devel] [PULL 5/6] qio: non-default context for async conn

2018-03-07 Thread Daniel P . Berrangé
From: Peter Xu We have worked on qio_task_run_in_thread() already. Further, let all the qio channel APIs use that context. Signed-off-by: Peter Xu Signed-off-by: Daniel P. Berrangé --- chardev/char-socket.c | 4 ++--

Re: [Qemu-devel] [PATCH V4 4/7] CAN bus Kvaser PCI CAN-S (single SJA1000 channel) emulation added.

2018-03-07 Thread Paolo Bonzini
On 06/03/2018 21:52, Pavel Pisa wrote: > Hello Thomas, > > thanks for report but I at this time I am and > can be some time in condition which does not allow > me to access e-mail and normal work > > On Tuesday 06 of March 2018 16:29:19 Thomas Huth wrote: >> On 14.01.2018 21:14,

[Qemu-devel] [PATCH] virtio-blk: dataplane: Don't batch notifications if EVENT_IDX is present

2018-03-07 Thread Sergio Lopez
Commit 5b2ffbe4d99843fd8305c573a100047a8c962327 ("virtio-blk: dataplane: notify guest as a batch") deferred guest notification to a BH in order batch notifications, with purpose of avoiding flooding the guest with interruptions. This optimization came with a cost. The average latency perceived in

Re: [Qemu-devel] [PATCH v10 10/24] migration: In case of error just end the migration

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 11:59:56AM +0100, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > migration/socket.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Daniel P. Berrangé > diff --git a/migration/socket.c

Re: [Qemu-devel] [PATCH v10 21/24] migration: Transmit initial package through the multifd channels

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 12:00:07PM +0100, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > migration/ram.c | 50 +- > 1 file changed, 45 insertions(+), 5 deletions(-) > > diff --git a/migration/ram.c

Re: [Qemu-devel] [Qemu-ppc] [PULL 00/30] ppc-for-2.12 queue 20180306

2018-03-07 Thread luigi burdo
HI, i had test last git with Zoltan sam emultation but at start i recive this ./qemu-system-ppc -M sam460ex qemu-system-ppc: /home/gigi/src/tags/ppc-for-2.12-20180306/include/qemu/rcu.h:89: rcu_read_unlock: asserzione "p_rcu_reader->depth != 0" non riuscita. Annullato (core dump creato) My

Re: [Qemu-devel] [PATCH v3 3/3] migration: use the free page hint feature from balloon

2018-03-07 Thread Dr. David Alan Gilbert
* Wei Wang (wei.w.w...@intel.com) wrote: > Start the free page optimization when the bulk stage starts. In case the > guest is slow in reporting, actively stops it when the bulk stage ends. > The optimization avoids sending guest free pages during the bulk stage. > Currently, the optimization is

Re: [Qemu-devel] [PATCH v2 6/9] chardev: use chardev's gcontext for async connect

2018-03-07 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 01:33:17PM +0800, Peter Xu wrote: > Generalize the function to create the async QIO task connection. Also, > fix the context pointer to use the chardev's gcontext. > > Reviewed-by: Paolo Bonzini > Signed-off-by: Peter Xu > --- >

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-07 Thread Daniel P . Berrangé
On Tue, Mar 06, 2018 at 01:33:20PM +0800, Peter Xu wrote: > TLS handshake may create background GSource tasks, while we won't know > the correct GMainContext until the whole chardev (including frontend) > inited. Let's postpone the initial TLS handshake until machine done. > > For dynamically

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: > On Tue, Mar 06, 2018 at 01:33:20PM +0800, Peter Xu wrote: > > TLS handshake may create background GSource tasks, while we won't know > > the correct GMainContext until the whole chardev (including frontend) > > inited. Let's

[Qemu-devel] [PATCH v2] block: make BDRV_POLL_WHILE() re-entrancy safe

2018-03-07 Thread Stefan Hajnoczi
Nested BDRV_POLL_WHILE() calls can occur. Currently assert(!wait_->wakeup) fails in AIO_WAIT_WHILE() when this happens. This patch converts the bool wait_->need_kick flag to an unsigned wait_->num_waiters counter. Nesting works correctly because outer AIO_WAIT_WHILE() callers evaluate the

[Qemu-devel] [PULL v1 5/5] tpm: convert tpm_tis.c to use trace-events

2018-03-07 Thread Stefan Berger
Leave the DEBUG_TIS for more debugging and convert to use if (DEBUG_TIS) rather than #if DEBUG_TIS where it is being used. Signed-off-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau

[Qemu-devel] [PULL v1 3/5] tpm: convert tpm_util.c to use trace-events

2018-03-07 Thread Stefan Berger
Signed-off-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi --- hw/tpm/tpm_util.c | 29 -

[Qemu-devel] [PULL v1 4/5] tpm: convert tpm_emulator.c to use trace-events

2018-03-07 Thread Stefan Berger
Signed-off-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Reviewed-by: Stefan Hajnoczi --- hw/tpm/tpm_emulator.c | 45

[Qemu-devel] KVM call for 2018-03-13

2018-03-07 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. At the end of Monday I will send an email with the agenda or the cancellation of the call, so hurry up. After discussions on the QEMU Summit, we are going to have always open a KVM call where you can add topics. Call details:

Re: [Qemu-devel] [PATCH v3 0/4] vl: introduce vm_shutdown()

2018-03-07 Thread Paolo Bonzini
On 07/03/2018 15:42, Stefan Hajnoczi wrote: > v3: > * Rebase on qemu.git/master after AIO_WAIT_WHILE() was merged [Fam] > v2: > * Tackle the .ioeventfd_stop() vs vq handler race by removing the ioeventfd >from a BH in the IOThread [Fam] > > There are several race conditions in

Re: [Qemu-devel] [Qemu-block] [PATCH] hw: Do not include "sysemu/block-backend.h" if it is not necessary

2018-03-07 Thread Paolo Bonzini
On 15/02/2018 09:55, Thomas Huth wrote: > After reviewing a patch from Philippe that removes block-backend.h > from hw/lm32/milkymist.c, I noticed that this header is included > unnecessarily in a lot of other files, too. Remove those unneeded > includes to speed up the compilation process a

Re: [Qemu-devel] [PATCH] build-sys: make help could have 'modules' target

2018-03-07 Thread Paolo Bonzini
On 07/03/2018 02:38, Fam Zheng wrote: > On Tue, 03/06 17:17, Marc-André Lureau wrote: >> Available when configure --enable-modules. >> >> Signed-off-by: Marc-André Lureau >> --- >> Makefile | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/Makefile

[Qemu-devel] [RFC] Defining firmware (OVMF, et al) metadata format & file

2018-03-07 Thread Kashyap Chamarthy
Problem background -- The various OVMF binary file names and paths are slightly different[+] for each Linux distribution. And each high-level management tool (libguestfs, oVirt, `virt-manager` and OpenStack Nova) is inventing its own approach to detect and configure the said OVMF

Re: [Qemu-devel] [PATCH v2 9/9] chardev: tcp: postpone TLS work until machine done

2018-03-07 Thread Paolo Bonzini
On 07/03/2018 13:40, Daniel P. Berrangé wrote: > On Wed, Mar 07, 2018 at 12:36:50PM +, Daniel P. Berrangé wrote: >> On Tue, Mar 06, 2018 at 01:33:20PM +0800, Peter Xu wrote: >>> TLS handshake may create background GSource tasks, while we won't know >>> the correct GMainContext until the whole

Re: [Qemu-devel] [PATCH qemu] slirp/debug: Print IP addresses in human readable form

2018-03-07 Thread Paolo Bonzini
On 01/02/2018 10:35, Alexey Kardashevskiy wrote: > Signed-off-by: Alexey Kardashevskiy > --- > slirp/arp_table.c | 4 ++-- > slirp/socket.c| 8 > slirp/udp.c | 4 ++-- > 3 files changed, 8 insertions(+), 8 deletions(-) Samuel, Jason, can you pick this up?

Re: [Qemu-devel] [PATCH v10 10/24] migration: In case of error just end the migration

2018-03-07 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela It's probably worth keeping an eye on what happens in the case of Peter's postcopy recovery where a new incoming connection happens later. Dave > --- > migration/socket.c | 6 ++ > 1 file

Re: [Qemu-devel] [RFC] Defining firmware (OVMF, et al) metadata format & file

2018-03-07 Thread Daniel P . Berrangé
On Wed, Mar 07, 2018 at 03:49:51PM +0100, Kashyap Chamarthy wrote: > Problem background > -- > > The various OVMF binary file names and paths are slightly different[+] > for each Linux distribution. And each high-level management tool > (libguestfs, oVirt, `virt-manager` and

[Qemu-devel] [PATCH v3 2/4] virtio-blk: fix race between .ioeventfd_stop() and vq handler

2018-03-07 Thread Stefan Hajnoczi
If the main loop thread invokes .ioeventfd_stop() just as the vq handler function begins in the IOThread then the handler may lose the race for the AioContext lock. By the time the vq handler is able to acquire the AioContext lock the ioeventfd has already been removed and the handler isn't

[Qemu-devel] [PATCH v3 4/4] vl: introduce vm_shutdown()

2018-03-07 Thread Stefan Hajnoczi
Commit 00d09fdbbae5f7864ce754913efc84c12fdf9f1a ("vl: pause vcpus before stopping iothreads") and commit dce8921b2baaf95974af8176406881872067adfa ("iothread: Stop threads before main() quits") tried to work around the fact that emulation was still active during termination by stopping iothreads.

Re: [Qemu-devel] [PATCH] qemu-doc: update deprecation section to use -nic and -netdev hubport

2018-03-07 Thread Paolo Bonzini
On 07/03/2018 15:38, Thomas Huth wrote: > But please note that we've currently got a BiteSizeTask to replace all > single-dash options with double dash options here: > > https://wiki.qemu.org/BiteSizedTasks#Consistent_option_usage_in_documentation Is anybody actually using VLANs^Wdouble dash

[Qemu-devel] [PATCH v3 3/4] virtio-scsi: fix race between .ioeventfd_stop() and vq handler

2018-03-07 Thread Stefan Hajnoczi
If the main loop thread invokes .ioeventfd_stop() just as the vq handler function begins in the IOThread then the handler may lose the race for the AioContext lock. By the time the vq handler is able to acquire the AioContext lock the ioeventfd has already been removed and the handler isn't

Re: [Qemu-devel] [PATCH] checkpatch: Exempt long URLs

2018-03-07 Thread Paolo Bonzini
On 22/02/2018 22:58, Eric Blake wrote: > Sometimes, we want to refer to really long URLs, but checkpatch > balks, and we have to manually bypass the check. URL shorterners > may be nice at reducing long links, but it's hard to guarantee the > shortened link will live as long as the real target,

Re: [Qemu-devel] [PATCH] qemu-doc: update deprecation section to use -nic and -netdev hubport

2018-03-07 Thread Thomas Huth
On 07.03.2018 15:43, Paolo Bonzini wrote: > On 07/03/2018 15:38, Thomas Huth wrote: >> But please note that we've currently got a BiteSizeTask to replace all >> single-dash options with double dash options here: >> >> https://wiki.qemu.org/BiteSizedTasks#Consistent_option_usage_in_documentation >

[Qemu-devel] [PATCH v5 1/1] s390x/sclp: extend SCLP event masks to 64 bits

2018-03-07 Thread Claudio Imbrenda
Extend the SCLP event masks to 64 bits. Notice that using any of the new bits results in a state that cannot be migrated to an older version. Signed-off-by: Claudio Imbrenda --- hw/s390x/event-facility.c | 49 ---

<    1   2   3   4   >