Re: [Qemu-devel] [PATCH v3 04/35] spapr/xive: introduce a XIVE interrupt controller for sPAPR

2018-05-09 Thread Cédric Le Goater
On 05/05/2018 06:26 AM, David Gibson wrote: > On Fri, May 04, 2018 at 03:05:08PM +0200, Cédric Le Goater wrote: >> On 05/04/2018 05:33 AM, David Gibson wrote: >>> On Thu, May 03, 2018 at 06:50:09PM +0200, Cédric Le Goater wrote: On 05/03/2018 07:22 AM, David Gibson wrote: > On Thu, Apr 26,

Re: [Qemu-devel] [PATCH v3 06/35] spapr/xive: introduce a XIVE interrupt presenter model

2018-05-09 Thread Cédric Le Goater
On 05/05/2018 06:27 AM, David Gibson wrote: > On Fri, May 04, 2018 at 03:11:57PM +0200, Cédric Le Goater wrote: >> On 05/04/2018 06:51 AM, David Gibson wrote: >>> On Thu, May 03, 2018 at 06:06:14PM +0200, Cédric Le Goater wrote: On 05/03/2018 07:35 AM, David Gibson wrote: > On Thu, Apr 26,

Re: [Qemu-devel] [Qemu-ppc] Running QEMU without default devices / kernel / bios

2018-05-09 Thread Thomas Huth
On 08.05.2018 18:40, Eduardo Habkost wrote: > On Tue, May 08, 2018 at 07:33:46AM +0200, Thomas Huth wrote: >> On 07.05.2018 21:32, Eduardo Habkost wrote: >>> On Mon, May 07, 2018 at 09:13:57PM +0200, Thomas Huth wrote: [...] Without "-accel qtest", things are not that easy, unfortunately. Lots

Re: [Qemu-devel] [PATCH v3 07/35] spapr/xive: introduce the XIVE Event Queues

2018-05-09 Thread Cédric Le Goater
On 05/05/2018 06:29 AM, David Gibson wrote: > On Fri, May 04, 2018 at 03:29:02PM +0200, Cédric Le Goater wrote: >> On 05/04/2018 07:19 AM, David Gibson wrote: >>> On Thu, May 03, 2018 at 04:37:29PM +0200, Cédric Le Goater wrote: On 05/03/2018 08:25 AM, David Gibson wrote: > On Thu, May 03,

Re: [Qemu-devel] [PATCH v12 05/21] migration: Export functions to create send channels

2018-05-09 Thread Juan Quintela
Peter Xu wrote: > On Wed, Apr 25, 2018 at 01:27:07PM +0200, Juan Quintela wrote: >> Signed-off-by: Juan Quintela >> Reviewed-by: Daniel P. Berrangé >> --- >> migration/socket.c | 28 +++- >> migration/socket.h | 7 +++ >> 2 files changed, 34 insertions(+), 1 deletio

Re: [Qemu-devel] [Qemu-block] [PATCH] blockjob: expose error string via query

2018-05-09 Thread Alberto Garcia
On Wed 09 May 2018 01:36:59 AM CEST, John Snow wrote: > When we've reached the concluded state, we need to expose the error > state if applicable. Add the new field. > > This should be sufficient for determining if a job completed > successfully or not after concluding; if we want to discriminate >

Re: [Qemu-devel] [PATCH v12 01/21] migration: Set error state in case of error

2018-05-09 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Signed-off-by: Juan Quintela >> --- >> migration/ram.c | 24 ++-- >> 1 file changed, 22 insertions(+), 2 deletions(-) >> >> diff --git a/migration/ram.c b/migration/ram.c >> index 0e90efa092..2

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

2018-05-09 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Signed-off-by: Juan Quintela >> Reviewed-by: Daniel P. Berrangé > > Please print the magic with %x. done. > >> +return -1; >> +} >> + >> +if (msg.version != MULTIFD_VERSION) { >> +error_se

[Qemu-devel] [PATCH v1 1/7] hmat acpi: Build Memory Subsystem Address Range Structre(s) in ACPI HMAT

2018-05-09 Thread Liu Jingqi
HMAT is defined in ACPI 6.2: 5.2.27 Heterogeneous Memory Attribute Table (HMAT). The specification references below link: http://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf It describes the memory attributes, such as memory side cache attributes and bandwidth and latency details, relat

[Qemu-devel] [PATCH v1 3/7] hmat acpi: Build Memory Side Cache Information Structure(s) in ACPI HMAT

2018-05-09 Thread Liu Jingqi
This structure describes memory side cache information for memory proximity domains if the memory side cache is present and the physical device(SMBIOS handle) forms the memory side cache. The software could use this information to effectively place the data in memory to maximize the performance of

[Qemu-devel] [PATCH v1 2/7] hmat acpi: Build System Locality Latency and Bandwidth Information Structure(s) in ACPI HMAT

2018-05-09 Thread Liu Jingqi
This structure describes the memory access latency and bandwidth information from various memory access initiator proximity domains. The latency and bandwidth numbers represented in this structure correspond to rated latency and bandwidth for the platform. The software could use this information as

[Qemu-devel] [PATCH v1 4/7] numa: Classify the numa nodes as memory initiators and memory targets

2018-05-09 Thread Liu Jingqi
An initiator proximity domain (memory initiator) is any device such as a CPU or a separate memory I/O device that can initiate a memory request. A target proximity domain (memory target) is a CPU-accessible physical address range. Signed-off-by: Liu Jingqi --- numa.c | 7 +++ 1 file changed,

[Qemu-devel] [PATCH v1 5/7] numa: Extend the command-line to provide memory latency and bandwidth information

2018-05-09 Thread Liu Jingqi
Add -numa hmat-lb option to provide System Locality Latency and Bandwidth Information. These memory attributes help to build System Locality Latency and Bandwidth Information Structure(s) in ACPI Heterogeneous Memory Attribute Table (HMAT). Signed-off-by: Liu Jingqi --- numa.c | 142 +++

[Qemu-devel] [PATCH v1 6/7] numa: Extend the command-line to provide memory side cache information

2018-05-09 Thread Liu Jingqi
Add -numa hmat-cache option to provide Memory Side Cache Information. These memory attributes help to build Memory Side Cache Information Structure(s) in ACPI Heterogeneous Memory Attribute Table (HMAT). Signed-off-by: Liu Jingqi --- numa.c | 95 +

[Qemu-devel] [PATCH v1 7/7] hmat acpi: Implement _HMA method to update HMAT at runtime

2018-05-09 Thread Liu Jingqi
OSPM evaluates HMAT only during system initialization. Any changes to the HMAT state at runtime or information regarding HMAT for hot plug are communicated using _HMA method. _HMA is an optional object that enables the platform to provide the OS with updated Heterogeneous Memory Attributes informa

Re: [Qemu-devel] [PATCH] blockjob: expose error string via query

2018-05-09 Thread Kevin Wolf
Am 09.05.2018 um 01:36 hat John Snow geschrieben: > When we've reached the concluded state, we need to expose the error > state if applicable. Add the new field. > > This should be sufficient for determining if a job completed > successfully or not after concluding; if we want to discriminate > ba

Re: [Qemu-devel] [PATCH 0/5] vmdk: Implement x-blockdev-create

2018-05-09 Thread Fam Zheng
On Tue, 05/08 23:08, no-re...@patchew.org wrote: > /var/tmp/patchew-tester-tmp-rg1lnbdu/src/block/vmdk.c: In function > ‘vmdk_co_do_create’: > /var/tmp/patchew-tester-tmp-rg1lnbdu/src/block/vmdk.c:2153:8: error: ‘blk’ > may be used uninitialized in this function [-Werror=maybe-uninitialized] >

[Qemu-devel] [PATCH v1] RISC-V: Add misa to DisasContext

2018-05-09 Thread Michael Clark
gen methods should access state from DisasContext. Add misa field to the DisasContext struct and remove CPURISCVState argument from all gen methods. Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Alistair Francis Cc: Emilio G. Cota Signed-off-by: Michael Clark --- target

Re: [Qemu-devel] [PATCH 0/5] vmdk: Implement x-blockdev-create

2018-05-09 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Message-id: 20180509055802.28423-1-f...@redhat.com Subject: [Qemu-devel] [PATCH 0/5] vmdk: Implement x-blockdev-create === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git

Re: [Qemu-devel] [PATCH 01/18] translator: merge max_insns into DisasContextBase

2018-05-09 Thread Michael Clark
On Sat, Apr 21, 2018 at 6:55 AM, Emilio G. Cota wrote: > While at it, use int for both num_insns and max_insns to make > sure we have same-type comparisons. > > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota > Reviewed-by: Michael Clark > --- > accel/tcg/translator.c |

Re: [Qemu-devel] [PATCH v3] migration: update docs

2018-05-09 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Update the migration docs: > > Among other changes: > * Added a general list of advice for device authors > * Reordered the section on conditional state (subsections etc) > into the order we prefer. > * Add a not

Re: [Qemu-devel] [PATCH 18/18] target/riscv: convert to TranslatorOps

2018-05-09 Thread Michael Clark
On Sat, Apr 21, 2018 at 6:55 AM, Emilio G. Cota wrote: > Reviewed-by: Richard Henderson > Cc: Michael Clark > Cc: Palmer Dabbelt > Cc: Sagar Karandikar > Cc: Bastian Koppelmann > Signed-off-by: Emilio G. Cota > Reviewed-by: Michael Clark > --- > target/riscv/translate.c | 158 +

[Qemu-devel] [PATCH v1 0/6] Translation loop conversion for riscv

2018-05-09 Thread Michael Clark
This is the riscv subset of Emilio G. Cota's translation loop conversion patches forward ported to master, with a patch from https://github.com/riscv/riscv-qemu/tree/qemu-2.13-for-upstream The last patch in the series adds misa to DisasContext and removes CPURISCVState from gen methods. The intent

[Qemu-devel] [PATCH v1 1/6] target/riscv: avoid integer overflow in next_page PC check

2018-05-09 Thread Michael Clark
From: "Emilio G. Cota" If the PC is in the last page of the address space, next_page_start overflows to 0. Fix it. Reported-by: Richard Henderson Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Reviewed-by: Michael Clark Acked-by: Bastian Koppelmann Cc: Michael Clark Cc: Pal

[Qemu-devel] [PATCH v1 3/6] target/riscv: convert to DisasJumpType

2018-05-09 Thread Michael Clark
From: "Emilio G. Cota" Reviewed-by: Bastian Koppelmann Reviewed-by: Richard Henderson Cc: Michael Clark Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Signed-off-by: Emilio G. Cota --- target/riscv/translate.c | 72 +++- 1 file c

[Qemu-devel] [PATCH v1 4/6] target/riscv: convert to DisasContextBase

2018-05-09 Thread Michael Clark
From: "Emilio G. Cota" Notes: - Did not convert {num,max}_insns, since the corresponding code will go away in the next patch. - ctx->pc becomes ctx->base.pc_next, and ctx->next_pc becomes ctx->pc_succ_insn. While at it, convert the remaining tb->cflags readers to tb_cflags(). Reviewed-by:

[Qemu-devel] [PATCH v1 2/6] translator: merge max_insns into DisasContextBase

2018-05-09 Thread Michael Clark
From: "Emilio G. Cota" While at it, use int for both num_insns and max_insns to make sure we have same-type comparisons. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota --- accel/tcg/translator.c | 21 ++--- include/exec/translator.h | 8 target/alp

[Qemu-devel] [PATCH v1 6/6] target/riscv: add misa to DisasContext

2018-05-09 Thread Michael Clark
gen methods should access state from DisasContext. Add misa field to the DisasContext struct and remove CPURISCVState argument from all gen methods. [Rebased against github.com/cota/qemu/tree/trloop-conv-v3] Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Cc: Alistair Francis C

Re: [Qemu-devel] [Qemu-block] Some question about savem/qcow2 incremental snapshot

2018-05-09 Thread Stefan Hajnoczi
On Tue, May 08, 2018 at 05:03:09PM +0200, Kevin Wolf wrote: > Am 08.05.2018 um 16:41 hat Eric Blake geschrieben: > > On 12/25/2017 01:33 AM, He Junyan wrote: > 2. Make the nvdimm device use the QEMU block layer so that it is backed >by a non-raw disk image (such as a qcow2 file representing the

[Qemu-devel] [PATCH v1 5/6] target/riscv: convert to TranslatorOps

2018-05-09 Thread Michael Clark
From: "Emilio G. Cota" Reviewed-by: Richard Henderson Cc: Michael Clark Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Signed-off-by: Emilio G. Cota --- target/riscv/translate.c | 158 --- 1 file changed, 80 insertions(+), 78 dele

[Qemu-devel] [PULL 1/3] riscv: spike: allow base == 0

2018-05-09 Thread Michael Clark
From: KONRAD Frederic The sanity check on base doesn't allow htif to be mapped @0. Check if the symbol exists instead so we can map it where we want. Reviewed-by: Michael Clark Signed-off-by: KONRAD Frederic Signed-off-by: Michael Clark Message-Id: <1525360636-18229-2-git-send-email-frederic

[Qemu-devel] [PULL 2/3] riscv: htif: increase the priority of the htif subregion

2018-05-09 Thread Michael Clark
From: KONRAD Frederic The htif device is supposed to be mapped over an other subregion. So increase its priority to one to avoid any conflict. Here is the output of info mtree: Before: (qemu) info mtree address-space: memory - (prio 0, i/o): system 0

[Qemu-devel] [PULL 0/3] RISC-V: QEMU 2.13 Minor Fixes

2018-05-09 Thread Michael Clark
The following changes since commit c8b7e627b4269a3bc3ae41d9f420547a47e6d9b9: Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2018-05-04' into staging (2018-05-04 14:42:46 +0100) are available in the git repository at: https://github.com/riscv/riscv-qemu.git tags/riscv-qemu-2.13-mi

[Qemu-devel] [PULL 3/3] riscv: requires libfdt

2018-05-09 Thread Michael Clark
From: KONRAD Frederic When compiling on a machine without libfdt installed the configure script should try to get libfdt from the git or should die because otherwise CONFIG_LIBFDT is not set and the build process end in an error in the link phase.. eg: hw/riscv/virt.o: In function `riscv_virt_bo

[Qemu-devel] [Bug 1445633] Re: Creating a passthrough USB device causes excessive CPU usage in the guest

2018-05-09 Thread Thomas Huth
Looking through old bug tickets... can you still reproduce this issue with the latest version of QEMU? Or could we close this ticket nowadays? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscrib

Re: [Qemu-devel] [PATCH v1] configure: recognize more rpmbuild macros

2018-05-09 Thread Paolo Bonzini
On 09/05/2018 07:44, Olaf Hering wrote: > Am Wed, 9 May 2018 00:15:42 +0200 > schrieb Paolo Bonzini : > >> Actually, --program-prefix= and --exec-prefix= have a meaning, they >> cannot just be ignored. For now I've removed this line; what is the >> exact incantation used by SUSE Linux? > > Like

[Qemu-devel] [Bug 1440843] Re: Guest WinXP crashes when trying to use a USB spectrometer

2018-05-09 Thread Thomas Huth
"-usbdevice host" and "usb_add host" have been removed with QEMU 2.12, so marking this bug as Wont-Fix. ** Changed in: qemu Status: New => Won't Fix -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bu

Re: [Qemu-devel] [PATCH 00/67] include path cleanup

2018-05-09 Thread Paolo Bonzini
On 03/05/2018 21:50, Michael S. Tsirkin wrote: > At the moment during build we have multiple subdirectories of the source > tree on the search path for include files. This includes source > directory itself, tcg and accel/tcg subdirectories, target-specific > source subdirectory and the include su

Re: [Qemu-devel] [PATCH v12 10/21] migration: Create multipage support

2018-05-09 Thread Juan Quintela
Peter Xu wrote: > On Wed, Apr 25, 2018 at 01:27:12PM +0200, Juan Quintela wrote: > > [...] > >> +static void multifd_pages_init(MultiFDPages_t **ppages, size_t size) >> +{ >> +MultiFDPages_t *pages = g_new0(MultiFDPages_t, 1); >> + >> +pages->allocated = size; >> +pages->iov = g_new0(s

Re: [Qemu-devel] [PATCH v12 10/21] migration: Create multipage support

2018-05-09 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> We only create/destry the page list here. We will use it later. >> >> Signed-off-by: Juan Quintela >> --- >> migration/ram.c | 56 + >> 1 file changed, 56 insertion

Re: [Qemu-devel] [PATCH v12 11/21] migration: Create multifd packet

2018-05-09 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> We still don't put anything there. >> >> Signed-off-by: Juan Quintela >> --- >> migration/ram.c | 137 +++- >> 1 file changed, 136 insertions(+), 1 deletion(-) >> +b

Re: [Qemu-devel] [PATCH v2] migration: discard non-migratable RAMBlocks

2018-05-09 Thread Dr. David Alan Gilbert
This thread seems to have stalled; we've got the list of potential migration breaks that Peter found and only some minor comments on the actual patch. I'd like to get it going again sicne as well as Cédric, and Peter's cases, there's Lai Jiangshan and now Eric Wheeler was asking for something simi

Re: [Qemu-devel] [PATCH v12 12/21] migration: Add multifd traces for start/end thread

2018-05-09 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> We want to know how many pages/packets each channel has sent. Add >> counters for those. >> >> Signed-off-by: Juan Quintela >> --- >> migration/ram.c| 20 >> migration/trace-events |

Re: [Qemu-devel] [PATCH v12 13/21] migration: Calculate transferred ram correctly

2018-05-09 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> On multifd we send data from more places that main channel. >> >> Signed-off-by: Juan Quintela >> --- >> migration/migration.c | 11 +-- >> 1 file changed, 9 insertions(+), 2 deletions(-) >> >> diff --git

Re: [Qemu-devel] [PATCH v12 11/21] migration: Create multifd packet

2018-05-09 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert" wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > >> We still don't put anything there. > >> > >> Signed-off-by: Juan Quintela > >> --- > >> migration/ram.c | 137 +++- > >

Re: [Qemu-devel] [PULL 0/3] RISC-V: QEMU 2.13 Minor Fixes

2018-05-09 Thread Peter Maydell
On 8 May 2018 at 23:05, Michael Clark wrote: > > > On Wed, May 9, 2018 at 8:49 AM, Peter Maydell > wrote: >> >> On 8 May 2018 at 21:07, Michael Clark wrote: >> > The following changes since commit >> > c8b7e627b4269a3bc3ae41d9f420547a47e6d9b9: >> > >> > Merge remote-tracking branch 'remotes/er

[Qemu-devel] [PATCH] target/ppc: migrate VPA related state

2018-05-09 Thread Greg Kurz
QEMU implements the "Shared Processor LPAR" (SPLPAR) option, which allows the hypervisor to time-slice a physical processor into multiple virtual processor. The intent is to allow more guests to run, and to optimize processor utilization. The guest OS can cede idle VCPUs, so that their processing

[Qemu-devel] [PULL 00/41] Migration queue

2018-05-09 Thread Juan Quintela
at: git://github.com/juanquintela/qemu.git tags/migration/20180509 for you to fetch changes up to c14eb5ac63b0d2cd146ca004daaeaf56677b7ed1: Migration+TLS: Fix crash due to double cleanup (2018-05-09 12:17:22 +0200) migration/next fo

Re: [Qemu-devel] [PATCH] device_tree: Add qemu_fdt_totalsize function

2018-05-09 Thread Peter Maydell
On 9 May 2018 at 06:32, David Gibson wrote: > On Sun, May 06, 2018 at 04:04:02PM +0100, Peter Maydell wrote: >> On 6 May 2018 at 14:39, David Gibson wrote: >> > Although, that said, I'll re-iterate that I think qemu's fdt >> > manipulation is now sufficiently complex that it would be better off >

[Qemu-devel] [PULL 03/41] tests: Add migration xbzrle test

2018-05-09 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 2b9c0ce91e..70a565ea2d 100644 --- a/tests/migration-test.c +++ b/tes

[Qemu-devel] [PULL 01/41] migration: fix saving normal page even if it's been compressed

2018-05-09 Thread Juan Quintela
From: Xiao Guangrong Fix the bug introduced by da3f56cb2e767016 (migration: remove ram_save_compressed_page()), It should be 'return' rather than 'res' Sorry for this stupid mistake :( Signed-off-by: Xiao Guangrong Message-Id: <20180428081045.8878-1-xiaoguangr...@tencent.com> Signed-off-by: Ju

[Qemu-devel] [PULL 09/41] migration: Export functions to create send channels

2018-05-09 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --- migration/socket.c | 28 +++- migration/socket.h | 7 +++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/migration/socket.c b/migration/socket.c index 122d8ccfbe..e09fd1aae5 100644 --- a

[Qemu-devel] [PULL 04/41] tests: Migration ppc now inlines its program

2018-05-09 Thread Juan Quintela
No need to write it to a file. Just need a proper firmware O:-) Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier Reviewed-by: Thomas Huth --- tests/migration-test.c | 41 + 1 file changed, 5 insertions(+), 36 deletions(-) diff --git a/tests/mig

[Qemu-devel] [PULL 02/41] tests: Add migration precopy test

2018-05-09 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 a/tests/migration-test.c b/tests/migration-test.c index b99661b773..2b9

[Qemu-devel] [PULL 05/41] migration: Set error state in case of error

2018-05-09 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index da0b567003..4d8be30676 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -448,10 +448,22 @@ struct { in

[Qemu-devel] [PULL 06/41] migration: Introduce multifd_recv_new_channel()

2018-05-09 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --- 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 35f2781b03..4a7959c11

[Qemu-devel] [PULL 10/41] migration: Create multifd channels

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

[Qemu-devel] [PULL 07/41] migration: terminate_* can be called for other threads

2018-05-09 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 Reviewed-by: Daniel P. Berrangé -- Once here, s/terminate_multifd_*-threads/mult

[Qemu-devel] [PULL 14/41] migration: let incoming side use thread context

2018-05-09 Thread Juan Quintela
From: Peter Xu The old incoming migration is running in main thread and default gcontext. With the new qio_channel_add_watch_full() we can now let it run in the thread's own gcontext (if there is one). Currently this patch does nothing alone. But when any of the incoming migration is run in an

[Qemu-devel] [PULL 08/41] migration: Be sure all recv channels are created

2018-05-09 Thread Juan Quintela
We need them before we start migration. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --- 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] [PULL 13/41] migration: Define MultifdRecvParams sooner

2018-05-09 Thread Juan Quintela
Once there, we don't need the struct names anywhere, just the typedefs. And now also document all fields. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 46 +++--- 1 file changed, 31 insertions(+), 15 deletions(-)

[Qemu-devel] [PULL 19/41] migration: allow fault thread to pause

2018-05-09 Thread Juan Quintela
From: 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.

[Qemu-devel] [PULL 11/41] migration: Delay start of migration main routines

2018-05-09 Thread Juan Quintela
We need to make sure that we have started all the multifd threads. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --- migration/migration.c | 4 ++-- migration/migration.h | 1 + migration/ram.c | 3 +++ migration/socket.c| 4 4 files changed, 10 insertions(+), 2 de

[Qemu-devel] [PULL 17/41] migration: allow dst vm pause on postcopy

2018-05-09 Thread Juan Quintela
From: 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. One note is

[Qemu-devel] [PULL 22/41] migration: new state "postcopy-recover"

2018-05-09 Thread Juan Quintela
From: 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

[Qemu-devel] [PULL 15/41] migration: new postcopy-pause state

2018-05-09 Thread Juan Quintela
From: 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. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-3-p

[Qemu-devel] [PULL 12/41] migration: Transmit initial package through the multifd channels

2018-05-09 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé -- Be network agnostic. Add error checking for all values. --- migration/ram.c | 104 +--- 1 file changed, 99 insertions(+), 5 deletions(-) diff --git a/migration/ram.c b/migration/ram.c i

[Qemu-devel] [PULL 20/41] qmp: hmp: add migrate "resume" option

2018-05-09 Thread Juan Quintela
From: 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 Message-Id: <20180502104740.12123-8-pet...@redhat.com> Signed-off-by: Juan Quintela --- hmp-commands.hx | 7 --- hmp.c | 4 +++- m

[Qemu-devel] [PULL 16/41] migration: implement "postcopy-pause" src logic

2018-05-09 Thread Juan Quintela
From: 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 fo

[Qemu-devel] [PULL 24/41] migration: new cmd MIG_CMD_RECV_BITMAP

2018-05-09 Thread Juan Quintela
From: 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 Message-Id: <20180502104740.12123-12-pet...@redhat.com> Signed-off-by: Juan Quintela --- migration/savevm.c | 61 ++

[Qemu-devel] [PULL 21/41] migration: rebuild channel on source

2018-05-09 Thread Juan Quintela
From: Peter Xu This patch detects the "resume" flag of migration command, rebuild the channels only if the flag is set. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-9-pet...@redhat.com> Signed-off-by: Juan Quintela --- migration/migration.c |

[Qemu-devel] [PULL 28/41] migration: introduce SaveVMHandlers.resume_prepare

2018-05-09 Thread Juan Quintela
From: 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. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502

[Qemu-devel] [PULL 18/41] migration: allow src return path to pause

2018-05-09 Thread Juan Quintela
From: Peter Xu Let the thread pause for network issues. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-6-pet...@redhat.com> Signed-off-by: Juan Quintela --- migration/migration.c | 35 +-- migration/migration.h

[Qemu-devel] [PULL 27/41] migration: new message MIG_RP_MSG_RESUME_ACK

2018-05-09 Thread Juan Quintela
From: 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. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-15-pet...@redha

[Qemu-devel] [PULL 23/41] migration: wakeup dst ram-load-thread for recover

2018-05-09 Thread Juan Quintela
From: 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 stat

[Qemu-devel] [PULL 31/41] migration: final handshake for the resume

2018-05-09 Thread Juan Quintela
From: 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 st

[Qemu-devel] [PULL 30/41] migration: setup ramstate for resume

2018-05-09 Thread Juan Quintela
From: 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. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-18-pet...@redhat.com> Signed-off-by: Juan

[Qemu-devel] [PULL 29/41] migration: synchronize dirty bitmap for resume

2018-05-09 Thread Juan Quintela
From: 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 st

[Qemu-devel] [PULL 26/41] migration: new cmd MIG_CMD_POSTCOPY_RESUME

2018-05-09 Thread Juan Quintela
From: 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. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <201

[Qemu-devel] [PULL 33/41] qmp/migration: new command migrate-recover

2018-05-09 Thread Juan Quintela
From: Peter Xu The first allow-oob=true command. It's used on destination side when the postcopy migration is paused and ready for a recovery. After execution, a new migration channel will be established for postcopy to continue. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Me

[Qemu-devel] [PULL 36/41] migration/qmp: add command migrate-pause

2018-05-09 Thread Juan Quintela
From: Peter Xu It pauses an ongoing migration. Currently it only supports postcopy. Note that this command will work on either side of the migration. Basically when we trigger this on one side, it'll interrupt the other side as well since the other side will get notified on the disconnect event.

[Qemu-devel] [PULL 25/41] migration: new message MIG_RP_MSG_RECV_BITMAP

2018-05-09 Thread Juan Quintela
From: 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 bitm

[Qemu-devel] [PULL 34/41] hmp/migration: add migrate_recover command

2018-05-09 Thread Juan Quintela
From: Peter Xu Sister command to migrate-recover in QMP. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-22-pet...@redhat.com> Signed-off-by: Juan Quintela --- hmp-commands.hx | 13 + hmp.c | 10 ++ hmp.h |

[Qemu-devel] [PULL 38/41] migration: update docs

2018-05-09 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Update the migration docs: Among other changes: * Added a general list of advice for device authors * Reordered the section on conditional state (subsections etc) into the order we prefer. * Add a note about firmware Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PULL 39/41] migration: update index field when delete or qsort RDMALocalBlock

2018-05-09 Thread Juan Quintela
From: Lidong Chen rdma_delete_block function deletes RDMALocalBlock base on index field, but not update the index field. So when next time invoke rdma_delete_block, it will not work correctly. If start and cancel migration repeatedly, some RDMALocalBlock not invoke ibv_dereg_mr to decrease kerne

[Qemu-devel] [PULL 41/41] Migration+TLS: Fix crash due to double cleanup

2018-05-09 Thread Juan Quintela
From: "Dr. David Alan Gilbert" During a TLS connect we see: migration_channel_connect calls migration_tls_channel_connect (calls after TLS setup) migration_channel_connect My previous error handling fix made migration_channel_connect call migrate_fd_connect in all cases; unfortunately th

[Qemu-devel] [PULL 32/41] migration: init dst in migration_object_init too

2018-05-09 Thread Juan Quintela
From: 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). Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-20-pet...@

[Qemu-devel] [PULL 35/41] migration: introduce lock for to_dst_file

2018-05-09 Thread Juan Quintela
From: Peter Xu Let's introduce a lock for that QEMUFile since we are going to operate on it in multiple threads. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-23-pet...@redhat.com> Signed-off-by: Juan Quintela --- migration/channel.c | 3 ++-

Re: [Qemu-devel] [PATCH v2] migration: discard non-migratable RAMBlocks

2018-05-09 Thread Peter Maydell
On 9 May 2018 at 12:08, Dr. David Alan Gilbert wrote: > This thread seems to have stalled; we've got the list of potential > migration breaks that Peter found and only some minor comments on the > actual patch. > > I'd like to get it going again sicne as well as Cédric, and Peter's > cases, there'

[Qemu-devel] [PULL 37/41] migration/hmp: add migrate_pause command

2018-05-09 Thread Juan Quintela
From: Peter Xu Wrapper for QMP command "migrate-pause". Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-25-pet...@redhat.com> Signed-off-by: Juan Quintela --- hmp-commands.hx | 14 ++ hmp.c | 9 + hmp.h |

[Qemu-devel] [PULL 40/41] migration: Textual fixups for blocktime

2018-05-09 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Blank lines and comments as suggested by Eric. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Reviewed-by: Eric Blake Message-Id: <20180427111502.9822-1-dgilb...@redhat.com> Signed-off-by: Juan Quintela --- qapi/migration.json | 9 +

Re: [Qemu-devel] [Qemu-ppc] Running QEMU without default devices / kernel / bios

2018-05-09 Thread Markus Armbruster
Thomas Huth writes: > On 08.05.2018 18:40, Eduardo Habkost wrote: >> On Tue, May 08, 2018 at 07:33:46AM +0200, Thomas Huth wrote: >>> On 07.05.2018 21:32, Eduardo Habkost wrote: On Mon, May 07, 2018 at 09:13:57PM +0200, Thomas Huth wrote: > [...] > Without "-accel qtest", things are not

Re: [Qemu-devel] lm32: tcg_handle_interrupt: assertion failed: (qemu_mutex_iothread_locked())

2018-05-09 Thread Paolo Bonzini
On 08/05/2018 03:49, Philippe Mathieu-Daudé wrote: > #2 0x7fe17d5eefa5 in g_assertion_message () at > /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 > #3 0x7fe17d5ef00a in g_assertion_message_expr () at > /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 > #4 0x559d92ace7d5 in tcg_handle_interr

Re: [Qemu-devel] [PATCH v2] migration: discard non-migratable RAMBlocks

2018-05-09 Thread Paolo Bonzini
On 09/05/2018 13:33, Peter Maydell wrote: > > I don't think we need to fix those first, but: > > * we should note in the commit message for this patch that >it is a de-facto migration break for those boards > * we should fix those devices/boards in this release cycle, >since we've broke

Re: [Qemu-devel] [PATCH 1/5] qapi: Add qapi_enum_parse_full

2018-05-09 Thread Markus Armbruster
Fam Zheng writes: > This variant of qapi_enum_parse can do case insensitive compare. I'm curious why we need that. We'll see when we get to the new function's uses. > Signed-off-by: Fam Zheng > --- > include/qapi/util.h | 2 ++ > qapi/qapi-util.c| 20 > 2 files chan

[Qemu-devel] [PATCH v9 1/3] migration: Create socket-address parameter

2018-05-09 Thread Juan Quintela
It will be used to store the uri parameters. We want this only for tcp, so we don't set it for other uris. We need it to know what port is migration running. 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 sense.

[Qemu-devel] [PATCH v9 3/3] migration: Add multifd test

2018-05-09 Thread Juan Quintela
We set the x-multifd-page-count and x-multifd-channels. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- tests/migration-test.c | 48 ++ 1 file changed, 48 insertions(+) diff --git a/tests/migration-test.c b/tests/migration-test.c ind

[Qemu-devel] [PATCH v9 2/3] tests: Add basic migration precopy tcp test

2018-05-09 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 | 102 +++-- 1 file changed, 99 insertions(+), 3 deletions(-)

[Qemu-devel] [PATCH v9 0/3] Add make check tests for Migration

2018-05-09 Thread Juan Quintela
Hi In v9: - Dropp Export SocketAddress_to_str just create the functions where I need them. - drop precopy test and xbzrle (on pull requset) Use 100M for cache as dave suggests - drop ppc improvemnet (on pull request) - drop RFH, will work on tha later - move socket_address to info migrate Pl

Re: [Qemu-devel] [PATCH 3/5] vmdk: Implement .bdrv_co_create callback

2018-05-09 Thread Markus Armbruster
Beware, I'm only looking at QAPI-related aspects. Fam Zheng writes: > This makes VMDK support x-blockdev-create. The implementation reuses the > image creation code in vmdk_co_create_opts which now acceptes a callback > pointer to "retrieve" BlockBackend pointers from the caller. This way we > s

  1   2   3   4   >