Re: [Qemu-devel] dropped pkts with Qemu on tap interace (RX)

2018-01-03 Thread Alexandre DERUMIER
Hi Stefan, >>The tap devices on the target vm shows dropped RX packages on BOTH tap >>interfaces - strangely with the same amount of pkts? that's strange indeed. if you tcpdump tap interfaces, do you see incoming traffic only on 1 interface, or both random ? (can you provide the network conf

Re: [Qemu-devel] [PATCH v12 4/6] migration: postcopy_blocktime documentation

2018-01-03 Thread Juan Quintela
Alexey Perevalov wrote: > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Alexey Perevalov > --- > docs/devel/migration.txt | 13 + > 1 file changed, 13 insertions(+) Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH v12 5/6] migration: add blocktime calculation into migration-test

2018-01-03 Thread Juan Quintela
Alexey Perevalov wrote: > This patch just requests blocktime calculation, > and check it in case when UFFD_FEATURE_THREAD_ID feature is set > on the host. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH v12 2/6] migration: add postcopy blocktime ctx into MigrationIncomingState

2018-01-03 Thread Juan Quintela
Eric Blake wrote: > On 10/30/2017 08:16 AM, Alexey Perevalov wrote: >> This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, >> in case when this feature is provided by kernel. > > Either 'in the case when this feature' or 'in case this feature'. > >> >> PostcopyBlocktimeContext is

[Qemu-devel] [Bug 1158912] Re: QEMU Version 1.4.0 - SLIRP hangs VM

2018-01-03 Thread Thomas Huth
** Changed in: qemu Status: Incomplete => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1158912 Title: QEMU Version 1.4.0 - SLIRP hangs VM Status in QEMU: Fix Released Bug d

Re: [Qemu-devel] [PATCH 0/3] chardev: convert leftover glib APIs to use dedicate gcontext

2018-01-03 Thread Paolo Bonzini
On 28/12/2017 08:29, Peter Xu wrote: > There were existing work that tried to allow chardev to be run in a > dedicated gcontext rather than the default main context/thread. > Basically that work passed in the correct gcontext during > g_source_attach(). However, I found something missing along the

Re: [Qemu-devel] [PATCH 01/11] migration: assert colo instead of check

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > When reaching here if we are still "active" it means we must be in colo > state. Assert it instead of check it in if condition. I don't think so. > Finally I want to use "switch" here rather than lots of complicated if > clauses. > > Signed-off-by: Peter Xu > --- > migration

Re: [Qemu-devel] [PATCH v5 1/2] qemu-img.texi: Clean up parameter list

2018-01-03 Thread Kashyap Chamarthy
On Tue, Dec 26, 2017 at 10:52:46AM +0800, Fam Zheng wrote: > Split options out of the "@table @var" section and create a "@table > @option", then use whitespaces and blank lines consistently. > > Suggested-by: Kevin Wolf > Signed-off-by: Fam Zheng > --- > qemu-img.texi | 66 > +

Re: [Qemu-devel] [PATCH 0/3] chardev: convert leftover glib APIs to use dedicate gcontext

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 08:10:58AM +0100, Paolo Bonzini wrote: > On 28/12/2017 08:29, Peter Xu wrote: > > There were existing work that tried to allow chardev to be run in a > > dedicated gcontext rather than the default main context/thread. > > Basically that work passed in the correct gcontext du

Re: [Qemu-devel] [PATCH v20 3/7 RESEND] xbitmap: add more operations

2018-01-03 Thread Wei Wang
On 01/02/2018 10:09 PM, Matthew Wilcox wrote: On Fri, Dec 22, 2017 at 04:49:11PM +0800, Wei Wang wrote: Thanks for the improvement. I also found a small bug in xb_zero. With the following changes, it has passed the current test cases and tested with the virtio-balloon usage without any issue. T

Re: [Qemu-devel] [PATCH 03/11] migration: remove "enable_colo" var

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > It's only used once, clean it up a bit. > > Signed-off-by: Peter Xu See my previous comment on patch 1. We can remove the variable, but the move to ose assert is wrong IMHO. Later, Juan. > --- > migration/migration.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-

Re: [Qemu-devel] [PATCH 01/11] migration: assert colo instead of check

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 09:38:52AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > When reaching here if we are still "active" it means we must be in colo > > state. Assert it instead of check it in if condition. > > I don't think so. > > > Finally I want to use "switch" here rather than lots

Re: [Qemu-devel] [PATCH v20 4/7] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-03 Thread Wei Wang
On 01/03/2018 10:29 AM, Tetsuo Handa wrote: Matthew Wilcox wrote: The radix tree convention is objectively awful, which is why I'm working to change it. Specifying the GFP flags at radix tree initialisation time rather than allocation time leads to all kinds of confusion. The preload API is a

Re: [Qemu-devel] [PATCH 04/11] migration: split use of MigrationState.total_time

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > It was used either to: > > 1. store initial timestamp of migration start, and > 2. store total time used by last migration > > Let's provide two parameters for each of them. Mix use of the two is > slightly misleading. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela I

Re: [Qemu-devel] [PATCH 04/11] migration: split use of MigrationState.total_time

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 09:58:10AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > It was used either to: > > > > 1. store initial timestamp of migration start, and > > 2. store total time used by last migration > > > > Let's provide two parameters for each of them. Mix use of the two is > > sl

Re: [Qemu-devel] [PATCH 05/11] migration: move vm_old_running into global state

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > Firstly, it was passed around. Let's just move it into MigrationState > just like many other variables as state of migration. > > One thing to mention is that for postcopy, we actually don't need this > knowledge at all since postcopy can't resume a VM even if it fails (we > can

Re: [Qemu-devel] [PATCH 06/11] migration: introduce vm_down_start_time

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > Introduce MigrationState.vm_down_start_time to replace the local > variable "start_time" in migration_thread to avoid passing things around. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela But I would suggest renaming the variable? Later, Juan. > diff --git a/migrat

[Qemu-devel] [PATCH v2] hw/ppc: Remove the deprecated spapr-pci-vfio-host-bridge device

2018-01-03 Thread Thomas Huth
It's a deprecated dummy device since QEMU v2.6.0. That should have been enough time to allow the users to update their scripts in case they still use it, so let's remove this legacy code now. Reviewed-by: Alexey Kardashevskiy Signed-off-by: Thomas Huth --- v2: Rebased to the ppc-for-2.12 branch

Re: [Qemu-devel] [PATCH 07/11] migration: introduce migrate_calculate_complete

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > Generalize the calculation part when migration complete into a > function to simplify migration_thread(). > > Signed-off-by: Peter Xu > --- > migration/migration.c | 25 ++--- > 1 file changed, 14 insertions(+), 11 deletions(-) > > diff --git a/migration/

Re: [Qemu-devel] [PATCH v14 9/9] target-arm: kvm64: handle SIGBUS signal from kernel or KVM

2018-01-03 Thread gengdongjiu
On 2017/12/28 23:07, Igor Mammedov wrote: > On Thu, 28 Dec 2017 13:54:18 +0800 > Dongjiu Geng wrote: > >> Add SIGBUS signal handler. In this handler, it checks the SIGBUS type, >> translates the host VA which is delivered by host to guest PA, then fill >> this PA to CPER and fill the CPER to gu

Re: [Qemu-devel] [PATCH 08/11] migration: use switch at the end of migration

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > It converts the old if clauses into switch, explicitly mentions the > possible migration states. The old nested "if"s are not clear on what > we do on different states. > > Signed-off-by: Peter Xu > --- > migration/migration.c | 32 +--- > 1 file ch

Re: [Qemu-devel] [PATCH 02/11] migration: qemu_savevm_state_cleanup() in cleanup

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > Moving existing callers all into migrate_fd_cleanup(). It simplifies > migration_thread() a bit. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela I am trying to see if we can call migrate_fd_cleanup() twice. As far as I can see, we are not doing it. But, and it is a

Re: [Qemu-devel] [PATCH 05/11] migration: move vm_old_running into global state

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 10:05:07AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > Firstly, it was passed around. Let's just move it into MigrationState > > just like many other variables as state of migration. > > > > One thing to mention is that for postcopy, we actually don't need this > > k

Re: [Qemu-devel] [PATCH 04/11] migration: split use of MigrationState.total_time

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > On Wed, Jan 03, 2018 at 09:58:10AM +0100, Juan Quintela wrote: >> Peter Xu wrote: >> > It was used either to: >> > >> > 1. store initial timestamp of migration start, and >> > 2. store total time used by last migration >> > >> > Let's provide two parameters for each of them. Mi

Re: [Qemu-devel] [SPARC] question on LEON IRQMP interrupt controller.

2018-01-03 Thread jcd
Le 2018-01-02 19:58, Fabien Chouteau a écrit : Hello Jean-Christophe, I'm the original author of this patch and I add in copy my colleague Frederic. On 02/01/2018 12:13, Jean-Christophe DUBOIS wrote: I am wondering if the IRQMP code in hw/intc/grlib_irqmp.c is correct when it comes to acknowle

Re: [Qemu-devel] [PATCH 04/11] migration: split use of MigrationState.total_time

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 10:20:39AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > On Wed, Jan 03, 2018 at 09:58:10AM +0100, Juan Quintela wrote: > >> Peter Xu wrote: > >> > It was used either to: > >> > > >> > 1. store initial timestamp of migration start, and > >> > 2. store total time used b

Re: [Qemu-devel] [PATCH 02/11] migration: qemu_savevm_state_cleanup() in cleanup

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 10:15:41AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > Moving existing callers all into migrate_fd_cleanup(). It simplifies > > migration_thread() a bit. > > > > Signed-off-by: Peter Xu > > Reviewed-by: Juan Quintela Thanks. > > I am trying to see if we can cal

[Qemu-devel] [PULL 01/14] migration: Use proper types in json

2018-01-03 Thread Juan Quintela
We use int for everything (int64_t), and then we check that value is between 0 and 255. Change it to the valid types. This change only happens for HMP. QMP always use bytes and similar. Signed-off-by: Juan Quintela Reviewed-by: Eric Blake --- hmp.c | 22 +++---

[Qemu-devel] [PULL 03/14] migration: free addr in the same function that we created it

2018-01-03 Thread Juan Quintela
Otherwise, we can't use it after calling socket_start_incoming_migration Signed-off-by: Juan Quintela Reviewed-by: Peter Xu --- migration/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/socket.c b/migration/socket.c index dee869044a..3a8232dd2d 100644

[Qemu-devel] [PULL 00/14] Migration pull request

2018-01-03 Thread Juan Quintela
1:36 +) are available in the Git repository at: git://github.com/juanquintela/qemu.git tags/migration/20180103 for you to fetch changes up to 8a18afdcd8d2d6ab31f9de89d2f20fdadb89beb8: migration: finalize current_migration object (2018-01-03 09:2

[Qemu-devel] [PULL 13/14] migration: Guard ram_bytes_remaining against early call

2018-01-03 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Calling ram_bytes_remaining during the early part of setup is unsafe because the ram_state isn't yet initialised. This can happen in the sequence: migrate migrate_cancel info migrate if the migrate sticks trying to connect (e.g. to an unresponsive destina

[Qemu-devel] [PULL 05/14] migration: free result string

2018-01-03 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reported-by: Peter Xu --- tests/migration-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index be598d3257..799e24ebc6 100644 --- a/tests/migration-test.

[Qemu-devel] [PULL 06/14] migration: fix analyze-migration.py script with radix table

2018-01-03 Thread Juan Quintela
From: Laurent Vivier Since commit 3a38429748 ("Add a "no HPT" encoding to HTAB migration stream") the HTAB migration stream contains a header set to "-1", meaning there is no HPT. Teach analyze-migration.py to ignore the section in this case. Without this fix, the script fails with a dump from a

[Qemu-devel] [PULL 02/14] migration: print features as on off

2018-01-03 Thread Juan Quintela
Once there, do one thing for line Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- migration/migration.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 8d2372394c..1

[Qemu-devel] [PULL 14/14] migration: finalize current_migration object

2018-01-03 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy current_migration has .instance_finalize callback, but it is not called, because nobody unrefs current_migration. Fix that. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- includ

[Qemu-devel] [PULL 04/14] docs: Convert migration.txt to rst

2018-01-03 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Mostly just manual conversion with very minor fixes. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrange Reviewed-by: Kashyap Chamarthy Reviewed-by: Peter Xu Signed-off-by: Juan Quintela --- docs/devel/{migration.txt => migration.rst} | 470

[Qemu-devel] [PULL 10/14] migration: postcopy_blocktime documentation

2018-01-03 Thread Juan Quintela
From: Alexey Perevalov Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- docs/devel/migration.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/devel/migration.rst b/docs/devel/migration.

[Qemu-devel] [PULL 11/14] migration: add blocktime calculation into migration-test

2018-01-03 Thread Juan Quintela
From: Alexey Perevalov This patch just requests blocktime calculation, and check it in case when UFFD_FEATURE_THREAD_ID feature is set on the host. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- tests/migration

[Qemu-devel] [PULL 12/14] migration: add postcopy total blocktime into query-migrate

2018-01-03 Thread Juan Quintela
From: 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 be able to see postcopy blocktime, need to request postcopy-blocktime capability. The query-migr

[Qemu-devel] [PULL 07/14] migration: introduce postcopy-blocktime capability

2018-01-03 Thread Juan Quintela
From: 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. Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [PULL 08/14] migration: add postcopy blocktime ctx into MigrationIncomingState

2018-01-03 Thread Juan Quintela
From: Alexey Perevalov This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case this feature is provided by kernel. PostcopyBlocktimeContext is encapsulated inside postcopy-ram.c, due to it being a postcopy-only feature. Also it defines PostcopyBlocktimeContext's instance live

Re: [Qemu-devel] [PATCH 06/11] migration: introduce vm_down_start_time

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 10:10:21AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > Introduce MigrationState.vm_down_start_time to replace the local > > variable "start_time" in migration_thread to avoid passing things around. > > > > Signed-off-by: Peter Xu > > Reviewed-by: Juan Quintela > >

[Qemu-devel] [PULL 09/14] migration: calculate vCPU blocktime on dst side

2018-01-03 Thread Juan Quintela
From: 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 keep

Re: [Qemu-devel] [PATCH v6 05/17] target/m68k: add CPU_LOG_INT trace

2018-01-03 Thread Philippe Mathieu-Daudé
On 01/02/2018 08:40 PM, Laurent Vivier wrote: > Display the interrupts/exceptions information > in QEMU logs (-d int) > > Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé > --- > > Notes: > v6: update SR with the content of CCR in the logs > > target/m68k/cpu.h |

Re: [Qemu-devel] [PATCH 09/11] migration: cleanup stats update into function

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > We have quite a few lines in migration_thread() that calculates some > statistics for the migration interations. Isolate it into a single > function to improve readability. > > Signed-off-by: Peter Xu > +static void migration_update_statistics(MigrationState *s, migration_

Re: [Qemu-devel] [PATCH v3 06/42] sdhci: refactor common sysbus/pci realize() into sdhci_realizefn()

2018-01-03 Thread Philippe Mathieu-Daudé
Hi Fam, On 01/03/2018 04:52 AM, Fam Zheng wrote: > On Fri, 12/29 14:48, Philippe Mathieu-Daudé wrote: >> Signed-off-by: Philippe Mathieu-Daudé >> Reviewed-by: Alistair Francis >> --- >> hw/sd/sdhci.c | 22 ++ >> 1 file changed, 14 insertions(+), 8 deletions(-) >> >> diff --g

Re: [Qemu-devel] [PATCH v3 07/42] sdhci: refactor common sysbus/pci unrealize() into sdhci_unrealizefn()

2018-01-03 Thread Philippe Mathieu-Daudé
Hi Fam, On 01/03/2018 04:56 AM, Fam Zheng wrote: > On Fri, 12/29 14:48, Philippe Mathieu-Daudé wrote: >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> hw/sd/sdhci.c | 19 --- >> 1 file changed, 16 insertions(+), 3 deletions(-) >> >> diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c >>

Re: [Qemu-devel] [PATCH v2.1 3/3] chardev: introduce qemu_chr_timeout_add() and use

2018-01-03 Thread Marc-André Lureau
- Original Message - > It's a replacement of g_timeout_add[_seconds]() for chardevs. Chardevs > now can have dedicated gcontext, we should always bind chardev tasks > onto those gcontext rather than the default main context. Since there > are quite a few of g_timeout_add[_seconds]() cal

Re: [Qemu-devel] [PATCH 10/11] migration: major cleanup for migrate iterations

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > The major work for migration iterations are to move RAM/block/... data > via qemu_savevm_state_iterate(). Generalize those part into a single > function. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela I am not fan of having to add yet another state enumeration, but I

Re: [Qemu-devel] [PATCH 11/11] migration: put the finish part into a new function

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > This patch only moved the last part of migration_thread() into a new > function migration_iteration_finish() to make it much shorter. With > previous works to remove some local variables, now it's fairly easy to > do that. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 02/11] migration: qemu_savevm_state_cleanup() in cleanup

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > On Wed, Jan 03, 2018 at 10:15:41AM +0100, Juan Quintela wrote: >> Peter Xu wrote: >> > Moving existing callers all into migrate_fd_cleanup(). It simplifies >> > migration_thread() a bit. >> > >> > Signed-off-by: Peter Xu >> >> Reviewed-by: Juan Quintela > > Thanks. > >> >>

Re: [Qemu-devel] [PATCH v20 4/7] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-03 Thread Tetsuo Handa
Wei Wang wrote: > On 01/03/2018 10:29 AM, Tetsuo Handa wrote: > > Matthew Wilcox wrote: > >> The radix tree convention is objectively awful, which is why I'm working > >> to change it. Specifying the GFP flags at radix tree initialisation time > >> rather than allocation time leads to all kinds of

Re: [Qemu-devel] [PATCH 02/11] migration: qemu_savevm_state_cleanup() in cleanup

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 11:21:31AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > On Wed, Jan 03, 2018 at 10:15:41AM +0100, Juan Quintela wrote: > >> Peter Xu wrote: > >> > Moving existing callers all into migrate_fd_cleanup(). It simplifies > >> > migration_thread() a bit. > >> > > >> > Sign

Re: [Qemu-devel] [PATCH 05/11] migration: move vm_old_running into global state

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > On Wed, Jan 03, 2018 at 10:05:07AM +0100, Juan Quintela wrote: >> Peter Xu wrote: >> > Firstly, it was passed around. Let's just move it into MigrationState >> > just like many other variables as state of migration. >> > >> > One thing to mention is that for postcopy, we actual

[Qemu-devel] [PATCH V3 2/5] mem: add share parameter to memory-backend-ram

2018-01-03 Thread Marcel Apfelbaum
Currently only file backed memory backend can be created with a "share" flag in order to allow sharing guest RAM with other processes in the host. Add the "share" flag also to RAM Memory Backend in order to allow remapping parts of the guest RAM to different host virtual addresses. This is needed

[Qemu-devel] [PATCH V3 3/5] docs: add pvrdma device documentation.

2018-01-03 Thread Marcel Apfelbaum
Signed-off-by: Marcel Apfelbaum Signed-off-by: Yuval Shaia Reviewed-by: Shamir Rabinovitch --- docs/pvrdma.txt | 145 1 file changed, 145 insertions(+) create mode 100644 docs/pvrdma.txt diff --git a/docs/pvrdma.txt b/docs/pvrdma.txt ne

[Qemu-devel] [PATCH V3 1/5] pci/shpc: Move function to generic header file

2018-01-03 Thread Marcel Apfelbaum
From: Yuval Shaia This function should be declared in generic header file so we can utilize it. Signed-off-by: Yuval Shaia Signed-off-by: Marcel Apfelbaum --- hw/pci/shpc.c | 13 ++--- include/qemu/host-utils.h | 10 ++ 2 files changed, 12 insertions(+), 11 deletio

[Qemu-devel] [PATCH V3 5/5] MAINTAINERS: add entry for hw/rdma

2018-01-03 Thread Marcel Apfelbaum
Signed-off-by: Marcel Apfelbaum Signed-off-by: Yuval Shaia --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 73a735..256a284753 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1979,6 +1979,14 @@ F: block/replication.c F: tests/test-re

[Qemu-devel] [PATCH V3 0/5] hw/pvrdma: PVRDMA device implementation

2018-01-03 Thread Marcel Apfelbaum
V2 -> V3: - Addressed Michael S. Tsirkin and Philippe Mathieu-Daudé comments: - Moved the device to hw/rdma - Addressed Michael S. Tsirkin comments: - Split the code into generic (hw/rdma) and VMWare specific (hw/rdma/vmw) - Added more details to documentation - VMware guest-host pr

Re: [Qemu-devel] [PATCH v14 1/9] ACPI: add some GHES structures and macros definition

2018-01-03 Thread gengdongjiu
Igor, sorry for my late response due to chines new year holiday. On 2017/12/28 20:29, Igor Mammedov wrote: >> +enum AcpiHestNotifyType { >> +ACPI_HEST_NOTIFY_POLLED = 0, >> +ACPI_HEST_NOTIFY_EXTERNAL = 1, >> +ACPI_HEST_NOTIFY_LOCAL = 2, >> +ACPI_HEST_NOTIFY_SCI = 3, >> +ACPI

Re: [Qemu-devel] [PATCH 05/11] migration: move vm_old_running into global state

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 11:26:12AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > On Wed, Jan 03, 2018 at 10:05:07AM +0100, Juan Quintela wrote: > >> Peter Xu wrote: > >> > Firstly, it was passed around. Let's just move it into MigrationState > >> > just like many other variables as state of

Re: [Qemu-devel] [PATCH V3 0/5] hw/pvrdma: PVRDMA device implementation

2018-01-03 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 20180103102911.35562-1-mar...@redhat.com Subject: [Qemu-devel] [PATCH V3 0/5] hw/pvrdma: PVRDMA devic

Re: [Qemu-devel] [PATCH v3 07/42] sdhci: refactor common sysbus/pci unrealize() into sdhci_unrealizefn()

2018-01-03 Thread Philippe Mathieu-Daudé
> On 01/03/2018 04:56 AM, Fam Zheng wrote: >> On Fri, 12/29 14:48, Philippe Mathieu-Daudé wrote: >>> Signed-off-by: Philippe Mathieu-Daudé >>> --- >>> hw/sd/sdhci.c | 19 --- >>> 1 file changed, 16 insertions(+), 3 deletions(-) >>> >>> diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c >>

Re: [Qemu-devel] [PATCH V3 0/5] hw/pvrdma: PVRDMA device implementation

2018-01-03 Thread Marcel Apfelbaum
On 03/01/2018 12:29, Marcel Apfelbaum wrote: V2 -> V3: - Addressed Michael S. Tsirkin and Philippe Mathieu-Daudé comments: - Moved the device to hw/rdma - Addressed Michael S. Tsirkin comments: - Split the code into generic (hw/rdma) and VMWare specific (hw/rdma/vmw) - Added

Re: [Qemu-devel] [PATCH 07/11] migration: introduce migrate_calculate_complete

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 10:12:10AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > Generalize the calculation part when migration complete into a > > function to simplify migration_thread(). > > > > Signed-off-by: Peter Xu > > > > > --- > > migration/migration.c | 25 ++-

Re: [Qemu-devel] [PATCH 09/11] migration: cleanup stats update into function

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 11:08:49AM +0100, Juan Quintela wrote: > Peter Xu wrote: > > We have quite a few lines in migration_thread() that calculates some > > statistics for the migration interations. Isolate it into a single > > function to improve readability. > > > > Signed-off-by: Peter Xu >

Re: [Qemu-devel] [PATCH 09/11] migration: cleanup stats update into function

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 06:55:29PM +0800, Peter Xu wrote: > On Wed, Jan 03, 2018 at 11:08:49AM +0100, Juan Quintela wrote: > > Peter Xu wrote: > > > We have quite a few lines in migration_thread() that calculates some > > > statistics for the migration interations. Isolate it into a single > > >

[Qemu-devel] [PATCH v4 01/17] sdhci: clean up includes

2018-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/sd/sdhci-internal.h | 4 include/hw/sd/sdhci.h | 7 ++- hw/sd/sdhci.c | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/sd/sdhci-internal.h b/hw/sd/sdhci-internal.h index 161177cf

[Qemu-devel] [PATCH v4 02/17] sdhci: sort registers comments

2018-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis --- include/hw/sd/sdhci.h | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/include/hw/sd/sdhci.h b/include/hw/sd/sdhci.h index 1335373d3c..749cc279ed 100644 --- a/include/hw/sd/sdhci.h +++

[Qemu-devel] [PATCH v4 00/17] SDHCI: housekeeping

2018-01-03 Thread Philippe Mathieu-Daudé
Since v3: - since the series was getting too big and first part reviewed, split in 2. - addressed Fam's review from "refactor the common sysbus/pci qdev" - improved commit descriptions - restored useful s->fifo_buffer = NULL - added Alistair R-b Patches still missing review: 4, 5, 7, 12. Sin

[Qemu-devel] [PATCH v4 16/17] sdhci: use deposit64() on admasysaddr

2018-01-03 Thread Philippe Mathieu-Daudé
This makes the code slightly safer, and easier to review. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/sd/sdhci.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 25a3ee5ef6..97129e178e 100644 --- a/hw/sd

[Qemu-devel] [PATCH v4 03/17] sdhci: remove dead code

2018-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- include/hw/sd/sdhci.h | 2 -- hw/sd/sdhci.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/hw/sd/sdhci.h b/include/hw/sd/sdhci.h index 749cc279ed..a6fe064f51 100644 --- a/include/hw/sd/sdhci.h +++ b/in

[Qemu-devel] [PATCH v4 11/17] sdhci: move MASK_TRNMOD with other SDHC_TRN* defines in "sd-internal.h"

2018-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/sd/sdhci-internal.h | 1 + hw/sd/sdhci.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sd/sdhci-internal.h b/hw/sd/sdhci-internal.h index 248fd027f9..e941bc2386 100644 --- a/hw/sd/sdh

[Qemu-devel] [PATCH v4 04/17] sdhci: refactor same sysbus/pci properties into a common one

2018-01-03 Thread Philippe Mathieu-Daudé
Now both sysbus/pci classes inherit of the 'pending-insert-quirk' property, which is a HCI dependent property (regardless if accessed through a MMIO sysbus or a PCI bus). So far only the BCM implementation has to use it. Add sysbus/pci/sdbus comments to have clearer code blocks separation. Signed

[Qemu-devel] [PATCH v4 05/17] sdhci: refactor common sysbus/pci class_init() into sdhci_class_init()

2018-01-03 Thread Philippe Mathieu-Daudé
Now both inherited classes appear as DEVICE_CATEGORY_STORAGE. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index a11469fbca..38d82b4c61 100644 --- a/hw/sd/sdhci.c

[Qemu-devel] [PATCH v4 07/17] sdhci: refactor common sysbus/pci unrealize() into sdhci_unrealizefn()

2018-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index d5c6d8ab0b..967521d347 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -32,6 +32,7 @@ #include "qapi/error.

[Qemu-devel] [PATCH v4 12/17] sdhci: use FIELD_DP32() macro for the WRITE_PROTECT flag

2018-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci-internal.h | 6 -- hw/sd/sdhci.c | 8 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/sd/sdhci-internal.h b/hw/sd/sdhci-internal.h index e941bc2386..df240ea046 100644 --- a/hw/sd/sdhci-internal.h +++ b/h

[Qemu-devel] [PATCH v4 06/17] sdhci: refactor common sysbus/pci realize() into sdhci_realizefn()

2018-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/sd/sdhci.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 38d82b4c61..d5c6d8ab0b 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c

[Qemu-devel] [PATCH v4 15/17] sdhci: Implement write method of ACMD12ERRSTS register

2018-01-03 Thread Philippe Mathieu-Daudé
From: Andrey Smirnov Reviewed-by: Peter Maydell Signed-off-by: Andrey Smirnov Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sdhci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index ea7d27087e..25a3ee5ef6 100644 -

[Qemu-devel] [PATCH v4 08/17] sdhci: use qemu_log_mask(UNIMP) instead of fprintf()

2018-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/sd/sdhci.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 967521d347..59078bb9f5 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -947,7 +947,8 @@ static ui

[Qemu-devel] [PATCH v4 09/17] sdhci: convert the DPRINT() calls into trace events

2018-01-03 Thread Philippe Mathieu-Daudé
zero-initialize ADMADescr 'dscr' in sdhci_do_adma() to avoid: hw/sd/sdhci.c: In function ‘sdhci_do_adma’: hw/sd/sdhci.c:714:29: error: ‘dscr.addr’ may be used uninitialized in this function [-Werror=maybe-uninitialized] trace_sdhci_adma("link", s->admasysaddr);

[Qemu-devel] [PATCH v4 17/17] sdhci: add a "dma-memory" property

2018-01-03 Thread Philippe Mathieu-Daudé
Add a dma property allowing machine creation to provide the address-space sdhci dma operates on. [based on a patch from Alistair Francis from qemu/xilinx tag xilinx-v2016.1] Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- include/hw/sd/sdhci.h | 2 ++ hw/sd/sdhci.c

[Qemu-devel] [PATCH v4 14/17] sdhci: fix CAPAB/MAXCURR registers, both are 64bit and read-only

2018-01-03 Thread Philippe Mathieu-Daudé
running qtests: $ make check-qtest-arm GTESTER check-qtest-arm SDHC rd_4b @0x44 not implemented SDHC wr_4b @0x40 <- 0x89abcdef not implemented SDHC wr_4b @0x44 <- 0x01234567 not implemented Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- include/hw/sd/sdhci.

[Qemu-devel] [PATCH v4 10/17] sdhci: add a GPIO for the 'access control' LED

2018-01-03 Thread Philippe Mathieu-Daudé
It blinks to caution the user not to remove the card while the SD card is being accessed. So far it only emits a trace event. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis --- include/hw/sd/sdhci.h | 2 ++ hw/sd/sdhci.c | 14 ++ hw/sd/trace-events| 1

[Qemu-devel] [PATCH v4 13/17] sdhci: rename the SDHC_CAPAB register

2018-01-03 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis --- hw/sd/sdhci-internal.h | 2 +- hw/sd/sdhci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sd/sdhci-internal.h b/hw/sd/sdhci-internal.h index df240ea046..b7475a1b7b 100644 --- a/hw/sd/sdh

Re: [Qemu-devel] stable/linux-4.14.y boot: 108 boots: 0 failed, 107 passed with 1 conflict (v4.14.11)

2018-01-03 Thread Paolo Bonzini
On 03/01/2018 11:36, Thomas Gleixner wrote: > On Wed, 3 Jan 2018, Guillaume Tucker wrote: >> On 03/01/18 09:48, Thomas Gleixner wrote: Well, it turns out this is not exactly a conflict as there's a subtle difference between the qemu devices in lab-mhart and in lab-collabora. The one

Re: [Qemu-devel] [PATCH 02/11] migration: qemu_savevm_state_cleanup() in cleanup

2018-01-03 Thread Juan Quintela
Peter Xu wrote: > On Wed, Jan 03, 2018 at 11:21:31AM +0100, Juan Quintela wrote: >> Peter Xu wrote: >> > On Wed, Jan 03, 2018 at 10:15:41AM +0100, Juan Quintela wrote: >> >> Peter Xu wrote: >> >> > Moving existing callers all into migrate_fd_cleanup(). It simplifies >> >> > migration_thread() a

Re: [Qemu-devel] [PATCH v4 00/17] SDHCI: housekeeping

2018-01-03 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 20180103110126.29209-1-f4...@amsat.org Subject: [Qemu-devel] [PATCH v4 00/17] SDHCI: housekeeping ==

Re: [Qemu-devel] [PATCH v1 00/21] RISC-V QEMU Port Submission v1

2018-01-03 Thread Richard W.M. Jones
Just a few small points: (1) I've built Fedora RPMs from this patch set [approximately - I'm using a very slightly different / slightly older version, but it's not substantively different]: http://copr-fe.cloud.fedoraproject.org/coprs/rjones/riscv/ It works well for me building plenty of Fedor

Re: [Qemu-devel] [PATCH 02/11] migration: qemu_savevm_state_cleanup() in cleanup

2018-01-03 Thread Peter Xu
On Wed, Jan 03, 2018 at 12:18:54PM +0100, Juan Quintela wrote: > Peter Xu wrote: > > On Wed, Jan 03, 2018 at 11:21:31AM +0100, Juan Quintela wrote: > >> Peter Xu wrote: > >> > On Wed, Jan 03, 2018 at 10:15:41AM +0100, Juan Quintela wrote: > >> >> Peter Xu wrote: > >> >> > Moving existing callers

[Qemu-devel] [PATCH v3 0/2] qmp: 'wakeup-suspend-support' in query-target

2018-01-03 Thread Daniel Henrique Barboza
v3: - added a "(since 2.12)" notation in the new flag, as suggested by Eric Blake - added a "backwards compatible" note in the commit msg - previous version link: https://lists.gnu.org/archive/html/qemu-devel/2018-01/msg00093.html v2: - changed the approach based on v1 discussions: instead of a ne

[Qemu-devel] [PATCH v3 1/2] qmp: adding 'wakeup-suspend-support' in query-target

2018-01-03 Thread Daniel Henrique Barboza
When issuing the qmp/hmp 'system_wakeup' command, what happens in a nutshell is: - qmp_system_wakeup_request set runstate to RUNNING, sets a wakeup_reason and notify the event - in the main_loop, all vcpus are paused, a system reset is issued, all subscribers of wakeup_notifiers receives a notific

[Qemu-devel] [PATCH v3 2/2] qga: update guest-suspend-ram and guest-suspend-hybrid descriptions

2018-01-03 Thread Daniel Henrique Barboza
This patch updates the descriptions of 'guest-suspend-ram' and 'guest-suspend-hybrid' to mention that both commands relies now on the existence of 'system_wakeup' and also on the proper support for wake up from suspend, retrieved by the 'wakeup-suspend-support' attribute of the 'query-target' QMP c

[Qemu-devel] [PATCH v2 05/13] migration: move vm_old_running into global state

2018-01-03 Thread Peter Xu
Firstly, it was passed around. Let's just move it into MigrationState just like many other variables as state of migration, renaming it to vm_was_running. One thing to mention is that for postcopy, we actually don't need this knowledge at all since postcopy can't resume a VM even if it fails (we

[Qemu-devel] [PATCH v2 01/13] migration: assert colo instead of check

2018-01-03 Thread Peter Xu
When reaching here if we are still "active" it means we must be in colo state. After a quick discussion offlist, we decided to use the safer error_report(). Finally I want to use "switch" here rather than lots of complicated if clauses. Signed-off-by: Peter Xu --- migration/migration.c | 10 ++

[Qemu-devel] [PATCH v2 03/13] migration: remove "enable_colo" var

2018-01-03 Thread Peter Xu
It's only used once, clean it up a bit. Signed-off-by: Peter Xu --- migration/migration.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 2c2140006c..9ba96ae301 100644 --- a/migration/migration.c +++ b/migration/migration.

[Qemu-devel] [PATCH v2 06/13] migration: introduce downtime_start

2018-01-03 Thread Peter Xu
Introduce MigrationState.downtime_start to replace the local variable "start_time" in migration_thread to avoid passing things around. Reviewed-by: Juan Quintela Signed-off-by: Peter Xu --- migration/migration.c | 12 migration/migration.h | 2 ++ 2 files changed, 6 insertions(+),

[Qemu-devel] [PATCH v2 00/13] migration: cleanup migration_thread()

2018-01-03 Thread Peter Xu
v2 - add r-bs - the first patch: don't assert but error_report [Juan, Dave] - remove mig_* prefix in var names [Juan] - two more patches [Juan]: migration: remove notify in migrate_fd_error migration: remove some block_cleanup_parameters() - rename old_vm_running to vm_was_running [Juan] - rena

[Qemu-devel] [PATCH v2 08/13] migration: use switch at the end of migration

2018-01-03 Thread Peter Xu
It converts the old if clauses into switch, explicitly mentions the possible migration states. The old nested "if"s are not clear on what we do on different states. Signed-off-by: Peter Xu --- migration/migration.c | 44 +++- 1 file changed, 27 insertions

[Qemu-devel] [PATCH v2 07/13] migration: introduce migrate_calculate_complete

2018-01-03 Thread Peter Xu
Generalize the calculation part when migration complete into a function to simplify migration_thread(). Signed-off-by: Peter Xu --- migration/migration.c | 31 --- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/migration/migration.c b/migration/migrat

  1   2   3   4   >