[Qemu-devel] [PATCH for-2.11 v3 04/25] sparc: convert cpu features to qdev properties

2017-08-24 Thread Igor Mammedov
SPARC is the last target that uses legacy way of parsing and initializing cpu features, drop legacy approach and convert features to properties so that SPARC could as minimum benefit from generic cpu_generic_init(), common with x86 +-feat parser PS: the main purpose is to remove legacy way of cpu

[Qemu-devel] [PATCH for-2.11 v3 07/25] sparc: replace cpu_sparc_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
it's just a wrapper, drop it and use cpu_generic_init() directly Signed-off-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- CC: Fabien Chouteau CC: Mark Cave-Ayland CC: Artyom Tarasenko --- target/sparc/cpu.h | 3 +-- hw/sparc/leon3.c | 2 +-

[Qemu-devel] [PATCH for-2.11 v3 08/25] s390x: replace cpu_s390x_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
cpu_s390x_init() is used only *-user targets indirectly via cpu_init() macro and has a hack to assign ids to created cpus (I'm not sure if 'id' really matters to *-user emulation). So to on safe side, instead of having custom wrapper to do numbering replace it with cpu_generic_init() and use S390C

[Qemu-devel] [PATCH for-2.11 v3 10/25] hppa: replace cpu_hppa_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
drop custom cpu_hppa_init() in favor of cpu_generic_init(), to make cpu_generic_init() work all we need is to provide cc->class_by_name callback that would resolve any cpu_model to the sole TYPE_HPPA_CPU to match current behaviour. Signed-off-by: Igor Mammedov Acked-by: Richard Henderson --- te

[Qemu-devel] [PATCH for-2.11 v3 17/25] sh4: replace cpu_sh4_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
it's just a wrapper, drop it and use cpu_generic_init() directly Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- target/sh4/cpu.h | 3 +-- hw/sh4/r2d.c | 2 +- hw/sh4/shix.c| 2 +- target/sh4/cpu.c | 5 - 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/t

[Qemu-devel] [PATCH for-2.11 v3 14/25] tilegx: replace cpu_tilegx_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
cpu_tilegx_init() always falls back to TYPE_TILEGX_CPU object regardless of cpu_model. Put fallback logic into tilegx_cpu_class_by_name() which would translate any cpu_model into TYPE_TILEGX_CPU class and replace cpu_tilegx_init() with cpu_generic_init(). Signed-off-by: Igor Mammedov Reviewed-by:

[Qemu-devel] [PATCH for-2.11 v3 12/25] microblaze: replace cpu_mb_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
cpu_mb_init() always falls back to TYPE_MICROBLAZE_CPU object regardless of cpu_model. Put fallback logic into mb_cpu_class_by_name() which would translate any cpu_model into TYPE_MICROBLAZE_CPU class and replace cpu_mb_init() with cpu_generic_init(). Signed-off-by: Igor Mammedov Reviewed-by: Phi

[Qemu-devel] [PATCH for-2.11 v3 18/25] arm: replace cpu_arm_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
it's just a wrapper, drop it and use cpu_generic_init() directly Signed-off-by: Igor Mammedov Reviewed-by: Andrew Jones Tested-by: Philippe Mathieu-Daudé --- target/arm/cpu.h| 3 +-- hw/arm/musicpal.c | 2 +- hw/arm/omap1.c | 2 +- hw/arm/omap2.c | 2 +- hw/arm/pxa2xx.c | 4

[Qemu-devel] [PATCH for-2.11 v3 13/25] nios2: replace cpu_nios2_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
cpu_nios2_init() always falls back to TYPE_NIOS2_CPU object regardless of cpu_model. Put fallback logic into nios2_cpu_class_by_name() which would translate any cpu_model into TYPE_NIOS2_CPU class and replace cpu_nios2_init() with cpu_generic_init() Signed-off-by: Igor Mammedov Reviewed-by: Phili

[Qemu-devel] [PATCH for-2.11 v3 11/25] m68k: replace cpu_m68k_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
call register_m68k_insns() at realize time which makes cpu_m68k_init() typical object creation function. As result we can replace it with cpu_generic_init() which does the same job, reducing code duplication a bit. Signed-off-by: Igor Mammedov Tested-by: Thomas Huth Acked-by: Laurent Vivier ---

[Qemu-devel] [PATCH for-2.11 v3 15/25] xtensa: replace cpu_xtensa_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
call xtensa_irq_init() at realize time which makes cpu_xtensa_init() like generic cpu creation function. As result we can replace it with cpu_generic_init() which does the same job, reducing code duplication a bit. Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost Reviewed-by: Philippe M

[Qemu-devel] [PATCH for-2.11 v3 16/25] tricore: replace cpu_tricore_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
it's just a wrapper, drop it and use cpu_generic_init() directly Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- target/tricore/cpu.h | 4 +--- hw/tricore/tricore_testboard.c | 2 +- target/tricore/helper.c| 5 - 3 files changed, 2 insertions(+), 9 deletions(

Re: [Qemu-devel] [PATCH 02/16] qapi: Drop superfluous qapi_enum_parse() parameter max

2017-08-24 Thread Eric Blake
On 08/24/2017 03:45 AM, Markus Armbruster wrote: > The lookup tables have a sentinel, no need to make callers pass their > size. > > Fun: the header has it in the wrong position. Good riddance. > > Signed-off-by: Markus Armbruster > --- > block.c | 1 - > block/file-posix.c

[Qemu-devel] [PATCH for-2.11 v3 22/25] moxie: replace cpu_moxie_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
it's just a wrapper, drop it and use cpu_generic_init() directly Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- target/moxie/cpu.h | 3 +-- hw/moxie/moxiesim.c | 2 +- target/moxie/cpu.c | 5 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/target/moxie/cpu.

[Qemu-devel] [PATCH for-2.11 v3 19/25] cris: replace cpu_cris_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
it's just a wrapper, drop it and use cpu_generic_init() directly Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- target/cris/cpu.h| 3 +-- hw/cris/axis_dev88.c | 2 +- target/cris/cpu.c| 5 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/target/cris/cp

[Qemu-devel] [PATCH for-2.11 v3 20/25] x86: replace cpu_x86_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
it's just a wrapper, drop it and use cpu_generic_init() directly Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- target/i386/cpu.h | 3 +-- target/i386/cpu.c | 5 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index 051867

[Qemu-devel] [PATCH for-2.11 v3 21/25] lm32: replace cpu_lm32_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
it's just a wrapper, drop it and use cpu_generic_init() directly Signed-off-by: Igor Mammedov Acked-by: Michael Walle Reviewed-by: Eduardo Habkost --- target/lm32/cpu.h | 3 +-- hw/lm32/lm32_boards.c | 4 ++-- hw/lm32/milkymist.c | 2 +- target/lm32/helper.c | 5 - 4 files changed,

Re: [Qemu-devel] [Bug 1712818] [NEW] live migration with storage encounter assert(!(bs->open_flags & BDRV_O_INACTIVE)) crashes

2017-08-24 Thread Eric Blake
On 08/24/2017 07:59 AM, meeho yuen wrote: > Public bug reported: > > The vm guest runs a iotest program, and i migrate it with virsh --copy- > storage-all,then the qemu process on the source host happens to crash > with the following message: > > kvm: block/io.c:1543: bdrv_co_pwritev: Assertion `

[Qemu-devel] [PATCH for-2.11 v3 23/25] openrisc: replace cpu_openrisc_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
it's just a wrapper, drop it and use cpu_generic_init() directly Signed-off-by: Igor Mammedov Acked-by: Stafford Horne Reviewed-by: Eduardo Habkost --- target/openrisc/cpu.h | 4 +--- hw/openrisc/openrisc_sim.c | 2 +- target/openrisc/cpu.c | 5 - 3 files changed, 2 insertions(+)

[Qemu-devel] [PATCH for-2.11 v3 24/25] unicore32: replace uc32_cpu_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
it's just a wrapper, drop it and use cpu_generic_init() directly Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- target/unicore32/cpu.h| 4 +--- hw/unicore32/puv3.c | 2 +- target/unicore32/helper.c | 5 - 3 files changed, 2 insertions(+), 9 deletions(-) diff --git

[Qemu-devel] [PATCH for-2.11 v3 25/25] ppc: replace cpu_ppc_init() with cpu_generic_init()

2017-08-24 Thread Igor Mammedov
it's just a wrapper, drop it and use cpu_generic_init() directly Signed-off-by: Igor Mammedov Acked-by: David Gibson Reviewed-by: Hervé Poussineau Reviewed-by: Eduardo Habkost --- target/ppc/cpu.h| 3 +-- hw/ppc/e500.c | 3 ++- hw/ppc/mac_newworld.c | 3 ++- hw

Re: [Qemu-devel] [PATCH for-2.11 v3 06/25] sparc: make cpu feature parsing property based

2017-08-24 Thread Philippe Mathieu-Daudé
On 08/24/2017 01:31 PM, Igor Mammedov wrote: with features converted to properties we can use the same approach as x86 for features parsing and drop legacy approach that manipulated CPU instance directly. New sparc_cpu_parse_features() will allow only +-feat and explicitly disable feat=on|off syn

Re: [Qemu-devel] [PATCH 01/16] qapi: Update qapi-code-gen.txt examples to match current code

2017-08-24 Thread Eric Blake
On 08/24/2017 03:45 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > docs/devel/qapi-code-gen.txt | 47 > +++- > 1 file changed, 38 insertions(+), 9 deletions(-) Might be nice to call out which commit(s) failed to update the docs wh

Re: [Qemu-devel] [RFC 02/29] migrate: Update ram_block_discard_range for shared

2017-08-24 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Wed, Jun 28, 2017 at 08:00:20PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > The choice of call to discard a block is getting more complicated > > for other cases. We use fallocate PUNCH_HOLE in any file cases;

Re: [Qemu-devel] [PATCH for-2.11 v3 01/25] qom: cpu: fix parsed feature string length

2017-08-24 Thread Philippe Mathieu-Daudé
Hi Igor, On 08/24/2017 01:31 PM, Igor Mammedov wrote: since commit ( 9262685b cpu: Factor out cpu_generic_init() ) features parsed by it were truncated only to the 1st feature after CPU name due to fact that featurestr = strtok(NULL, ","); cc->parse_features(cpu, featurestr, &err); wou

Re: [Qemu-devel] [PATCH 1/3] nbd-client: enter read_reply_co during init to avoid crash

2017-08-24 Thread Eric Blake
On 08/24/2017 11:21 AM, Paolo Bonzini wrote: > On 24/08/2017 17:33, Stefan Hajnoczi wrote: >> This patch enters read_reply_co directly in >> nbd_client_attach_aio_context(). This is safe because new_context is >> acquired by the caller. This ensures that read_reply_co reaches its >> first yield p

Re: [Qemu-devel] S390 bios breaks in qemu 2.10.rc3

2017-08-24 Thread Farhan Ali
On 08/24/2017 12:07 PM, Peter Maydell wrote: On 24 August 2017 at 16:53, Farhan Ali wrote: On 08/24/2017 11:50 AM, Thomas Huth wrote: True, so that could still be an issue. Looking at the cio.h in the kernel, they define the struct like this: struct ccw1 { __u8 cmd_code;

Re: [Qemu-devel] [PATCH 2/3] qemu-iotests: improve nbd-fault-injector.py startup protocol

2017-08-24 Thread Eric Blake
On 08/24/2017 10:33 AM, Stefan Hajnoczi wrote: > Currently 083 waits for the nbd-fault-injector.py server to start up by > looping until netstat shows the TCP listen socket. > > The startup protocol can be simplified by passing a 0 port number to > nbd-fault-injector.py. The kernel will allocate

Re: [Qemu-devel] [PATCH 1/3] nbd-client: enter read_reply_co during init to avoid crash

2017-08-24 Thread Paolo Bonzini
On 24/08/2017 19:37, Eric Blake wrote: > On 08/24/2017 11:21 AM, Paolo Bonzini wrote: >> On 24/08/2017 17:33, Stefan Hajnoczi wrote: >>> This patch enters read_reply_co directly in >>> nbd_client_attach_aio_context(). This is safe because new_context is >>> acquired by the caller. This ensures th

Re: [Qemu-devel] [PATCH 3/3] qemu-iotests: test NBD over UNIX domain sockets in 083

2017-08-24 Thread Eric Blake
On 08/24/2017 10:33 AM, Stefan Hajnoczi wrote: > 083 only tests TCP. Some failures might be specific to UNIX domain > sockets. > > A few adjustments are necessary: > > 1. Generating a port number and waiting for server startup is >TCP-specific. Use the new nbd-fault-injector.py startup prot

Re: [Qemu-devel] [PATCH 0/3] iotests: clean up resources using context managers

2017-08-24 Thread Stefan Hajnoczi
On Thu, Aug 24, 2017 at 04:38:43PM +0800, Fam Zheng wrote: > On Thu, 08/24 08:21, Stefan Hajnoczi wrote: > > Tests should declare resources upfront in a with statement. Resources are > > automatically cleaned up whether the test passes or fails: > > > > with FilePath('test.img') as img_path, >

Re: [Qemu-devel] S390 bios breaks in qemu 2.10.rc3

2017-08-24 Thread Christian Borntraeger
On 08/24/2017 07:38 PM, Farhan Ali wrote: > > > On 08/24/2017 12:07 PM, Peter Maydell wrote: >> On 24 August 2017 at 16:53, Farhan Ali wrote: >>> >>> >>> On 08/24/2017 11:50 AM, Thomas Huth wrote: True, so that could still be an issue. Looking at the cio.h in the kernel, they define

Re: [Qemu-devel] S390 bios breaks in qemu 2.10.rc3

2017-08-24 Thread Christian Borntraeger
On 08/24/2017 06:02 PM, Halil Pasic wrote: > > > On 08/24/2017 05:53 PM, Farhan Ali wrote: >> >> >> On 08/24/2017 11:50 AM, Thomas Huth wrote: >>> On 24.08.2017 17:47, Halil Pasic wrote: On 08/24/2017 05:35 PM, Thomas Huth wrote: > On 24.08.2017 17:13, Cornelia Huck wrote: >>

Re: [Qemu-devel] [PATCH] spapr: Add ibm, processor-storage-keys property to CPU DT node

2017-08-24 Thread Ram Pai
On Thu, Aug 24, 2017 at 12:54:48PM +1000, Paul Mackerras wrote: > On Mon, Aug 21, 2017 at 05:00:36PM -0300, Thiago Jung Bauermann wrote: > > LoPAPR says: > > > > “ibm,processor-storage-keys” > > > > property name indicating the number of virtual storage keys supported > > by the proce

Re: [Qemu-devel] [PATCH] qobject: Explain how QNum works, and why

2017-08-24 Thread Markus Armbruster
Eric Blake writes: > On 08/22/2017 01:52 AM, Markus Armbruster wrote: >> Suggested-by: Max Reitz >> Signed-off-by: Markus Armbruster >> --- >> include/qapi/qmp/qnum.h | 21 + >> 1 file changed, 21 insertions(+) >> >> diff --git a/include/qapi/qmp/qnum.h b/include/qapi/qmp/

Re: [Qemu-devel] [PATCH 01/16] qapi: Update qapi-code-gen.txt examples to match current code

2017-08-24 Thread Markus Armbruster
Eric Blake writes: > On 08/24/2017 03:45 AM, Markus Armbruster wrote: >> Signed-off-by: Markus Armbruster >> --- >> docs/devel/qapi-code-gen.txt | 47 >> +++- >> 1 file changed, 38 insertions(+), 9 deletions(-) > > Might be nice to call out which commit(

Re: [Qemu-devel] [Qemu-block] [PATCH v7 4/6] block: convert ThrottleGroup to object with QOM

2017-08-24 Thread Stefan Hajnoczi
On Tue, Aug 22, 2017 at 01:15:33PM +0300, Manos Pitsidianakis wrote: > /* Increments the reference count of a ThrottleGroup given its name. > * > * If no ThrottleGroup is found with the given name a new one is > * created. > * > + * This function edits throttle_groups and must be called un

Re: [Qemu-devel] S390 bios breaks in qemu 2.10.rc3

2017-08-24 Thread Christian Borntraeger
Just to understand the urgency. Is the problem happening with the BIOS that is shipped in the upstream git tree, or a self-built one? On 08/24/2017 05:05 PM, Farhan Ali wrote: > Hi, > > There is an issue in QEMU bios which is exposed by commit > > commit 198c0d1f9df8c429502cb744fc26b6ba6e71db7

Re: [Qemu-devel] [PATCH 02/16] qapi: Drop superfluous qapi_enum_parse() parameter max

2017-08-24 Thread Markus Armbruster
Eric Blake writes: > On 08/24/2017 03:45 AM, Markus Armbruster wrote: >> The lookup tables have a sentinel, no need to make callers pass their >> size. >> >> Fun: the header has it in the wrong position. Good riddance. >> >> Signed-off-by: Markus Armbruster >> --- >> block.c

Re: [Qemu-devel] [PATCH 04/16] tpm: Clean up model registration & lookup

2017-08-24 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, Aug 24, 2017 at 10:45 AM, Markus Armbruster wrote: >> We have a strict separation between enum TpmModel and tpm_models[]: >> >> * TpmModel may have any number of members. It just happens to have one. >> >> * tpm_register_model() uses the first empty sl

Re: [Qemu-devel] [Qemu-block] [PATCH v7 5/6] block: add throttle block filter driver

2017-08-24 Thread Stefan Hajnoczi
On Tue, Aug 22, 2017 at 01:15:34PM +0300, Manos Pitsidianakis wrote: > @@ -3095,6 +3096,20 @@ > '*tls-creds': 'str' } } > > ## > +# @BlockdevOptionsThrottle: > +# > +# Driver specific block device options for the throttle driver > +# > +# @throttle-group: the name of the throttle-

Re: [Qemu-devel] [PATCH v7 6/6] qemu-iotests: add 184 for throttle filter driver

2017-08-24 Thread Stefan Hajnoczi
On Tue, Aug 22, 2017 at 01:15:35PM +0300, Manos Pitsidianakis wrote: > +_supported_fmt qcow2 What makes this test qcow2-specific? With additional filtering for IMGFMT it should be possible to run this on any image format.

[Qemu-devel] [ANNOUNCE] QEMU 2.10.0-rc4 is now available

2017-08-24 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the fifth release candidate for the QEMU 2.10 release. This release is meant for testing purposes and should not be used in a production environment. http://download.qemu-project.org/qemu-2.10.0-rc4.tar.xz http://dow

Re: [Qemu-devel] [PATCH 02/16] qapi: Drop superfluous qapi_enum_parse() parameter max

2017-08-24 Thread Eric Blake
On 08/24/2017 01:35 PM, Markus Armbruster wrote: > Eric Blake writes: > >> On 08/24/2017 03:45 AM, Markus Armbruster wrote: >>> The lookup tables have a sentinel, no need to make callers pass their >>> size. >>> >>> Fun: the header has it in the wrong position. Good riddance. >>> >>> +++ b/incl

Re: [Qemu-devel] [ANNOUNCE] QEMU 2.10.0-rc4 is now available

2017-08-24 Thread Laszlo Ersek
On 08/24/17 20:53, Michael Roth wrote: > Hello, > > On behalf of the QEMU Team, I'd like to announce the availability of the > fifth release candidate for the QEMU 2.10 release. This release is meant > for testing purposes and should not be used in a production environment. > > http://download

[Qemu-devel] Make test

2017-08-24 Thread Programmingkid
I think 'make test' is an abandoned testing option for QEMU so this report might be unimportant. Here is my results for running 'make test': $ make test make -C tests/tcg test LINKtest_path Undefined symbols for architecture x86_64: "_buffer_is_zero", referenced from: _qemu_iovec_is

[Qemu-devel] [PATCH v2 02/16] qapi-schema: Introspection doc is in the wrong section, fix

2017-08-24 Thread Markus Armbruster
Bug: introspection documentation is in section "Tracing commands". Cause: sub-schema qapi/introspect.json lacks a section header, and therefore goes into whatever section precedes its include. Fix: add a section header. Signed-off-by: Markus Armbruster Reviewed-by: Marc-André Lureau --- qapi/

[Qemu-devel] [PATCH v2 14/16] qapi-schema: Make block-core.json self-contained

2017-08-24 Thread Markus Armbruster
Except for block-core.json, the sub-schemas are self-contained: if they use a symbol defined in another sub-schema, they include that sub-schema. To check, feed the sub-schema to qapi2texi (or any other QAPI generator) along with the pragma from qapi-schema.json. Fix up things to make block-core.

[Qemu-devel] [PATCH v2 00/16] qapi-schema: Reorganize along maintenance boundaries

2017-08-24 Thread Markus Armbruster
Cc: "Daniel P. Berrange" Cc: Alberto Garcia Cc: Dr. David Alan Gilbert Cc: Gerd Hoffmann Cc: Jason Wang Cc: Juan Quintela Cc: Marc-André Lureau Cc: Paolo Bonzini Much of the QAPI schema really belongs to a subsystem, but MAINTAINERS can't tell when it's all in a big ball of mud (qapi-schem

[Qemu-devel] [PATCH v2 16/16] qapi-schema: Improve section headings

2017-08-24 Thread Markus Armbruster
The generated QEMU QMP reference is now structured as follows: 1.1 Introduction 1.2 Stability Considerations 1.3 Common data types 1.4 Socket data types 1.5 VM run state 1.6 Cryptography 1.7 Block devices 1.7.1 Block core (VM unrelated) 1.7.2 QAPI block definiti

[Qemu-devel] [PATCH v2 13/16] qapi-schema: Fold event.json back into qapi-schema.json

2017-08-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- Makefile | 2 +- qapi-schema.json | 134 - qapi/event.json | 138 --- 3 files changed, 134 insertions(+), 140 deletions(-) delete mode 100644 qa

[Qemu-devel] [PATCH v2 03/16] qapi-schema: Rocker doc section contains unrelated stuff, fix

2017-08-24 Thread Markus Armbruster
Bug: section "Rocker switch device" starts with the rocker stuff, but then has unrelated stuff, like ReplayMode, xen-load-devices-state, ... Cause: rocker.json is included in the middle of section "QMP commands". Fix: include it in a sane place, namely next to the other sub-schemas. Signed-off-b

[Qemu-devel] [PATCH v2 04/16] qapi-schema: Collect sockets stuff in qapi/sockets.json

2017-08-24 Thread Markus Armbruster
Cc: "Daniel P. Berrange" Cc: Gerd Hoffmann Cc: Paolo Bonzini Signed-off-by: Markus Armbruster --- MAINTAINERS | 1 + Makefile | 4 +- qapi-schema.json | 152 +-- qapi/block-core.json | 2 +- qapi/common.json |

[Qemu-devel] [PATCH v2 10/16] qapi-schema: Collect transaction stuff in qapi/transaction.json

2017-08-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- MAINTAINERS | 1 + Makefile | 1 + qapi-schema.json | 151 +-- qapi/transaction.json | 158 ++ 4 files changed, 161 insertions(+), 150 d

[Qemu-devel] [PATCH v2 15/16] qapi-schema: Move queries from common.json to qapi-schema.json

2017-08-24 Thread Markus Armbruster
query-version and query-commands are in common.json for no good reason. Several similar queries are in qapi-schema.json. Move them there. Signed-off-by: Markus Armbruster --- qapi-schema.json | 103 +++ qapi/common.json | 103

[Qemu-devel] [PATCH v2 01/16] qapi-schema: Document how generated documentation is ordered

2017-08-24 Thread Markus Armbruster
Documentation generated with qapi2texi.py is in source order, with included sub-schemas inserted at the first include directive (subsequent include directives have no effect). To get a sane and stable order, it's best to include each sub-schema just once, or include it first in qapi-schema.json.

[Qemu-devel] [PATCH v2 05/16] qapi-schema: Collect run state stuff in qapi/run-state.json

2017-08-24 Thread Markus Armbruster
Cc: Paolo Bonzini Signed-off-by: Markus Armbruster --- MAINTAINERS | 1 + Makefile| 1 + qapi-schema.json| 165 +--- qapi/event.json | 182 --- qapi/run-state.json | 352 ++

[Qemu-devel] [PATCH v2 11/16] qapi-schema: Collect TPM stuff in qapi/tpm.json

2017-08-24 Thread Markus Armbruster
Sadly, we don't have a TPM maintainer, not even a MAINTAINERS entry. Create one, and mark it orphaned. Signed-off-by: Markus Armbruster --- MAINTAINERS | 8 Makefile | 1 + qapi-schema.json | 132 + qapi/tpm.json| 137

[Qemu-devel] [PATCH v2 06/16] qapi-schema: Collect char device stuff in qapi/char.json

2017-08-24 Thread Markus Armbruster
Cc: Paolo Bonzini Cc: Marc-André Lureau Signed-off-by: Markus Armbruster --- MAINTAINERS | 1 + Makefile | 1 + qapi-schema.json | 511 +--- qapi/char.json | 538 +++ qapi/even

[Qemu-devel] [PATCH v2 12/16] qapi-schema: Move block events from event.json to block.json

2017-08-24 Thread Markus Armbruster
Cc: Alberto Garcia Signed-off-by: Markus Armbruster --- qapi/block.json | 68 + qapi/event.json | 68 - 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/qapi/block.json

[Qemu-devel] [PATCH v2 07/16] qapi-schema: Collect net device stuff in qapi/net.json

2017-08-24 Thread Markus Armbruster
Cc: Jason Wang Signed-off-by: Markus Armbruster --- MAINTAINERS | 1 + Makefile | 1 + qapi-schema.json | 675 +--- qapi/event.json | 24 -- qapi/net.json| 706 +++ 5 files

[Qemu-devel] [PATCH v2 08/16] qapi-schema: Collect UI stuff in qapi/ui.json

2017-08-24 Thread Markus Armbruster
UI stuff is remote desktop stuff (Spice, VNC) and input stuff (mouse, keyboard). Cc: Gerd Hoffmann Signed-off-by: Markus Armbruster --- MAINTAINERS | 2 + Makefile | 3 +- qapi-schema.json | 784 +--- qapi/event.json | 175 -- qa

[Qemu-devel] [PATCH v2 0/3] hostmem-file: Add "discard-data" option

2017-08-24 Thread Eduardo Habkost
This series adds a new "discard-data" option to memory-backend-file. The new option will be useful if somebody is sharing RAM contents on a pre-existing file using share=on, but don't need data to be flushed to disk when QEMU exits. Internally, it will trigger a madvise(MADV_REMOVE) call when the

[Qemu-devel] [RFC v2 00/32] postcopy+vhost-user/shared ram

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is a RFC/WIP series that enables postcopy migration with shared memory to a vhost-user process. It's based off current-head + Alexey's bitmap series It's tested with vhost-user-bridge and a dpdk (modified by Maxime that will get posted separately) - both

[Qemu-devel] [PATCH v2 09/16] qapi-schema: Collect migration stuff in qapi/migration.json

2017-08-24 Thread Markus Armbruster
Cc: Juan Quintela Cc: Dr. David Alan Gilbert Signed-off-by: Markus Armbruster --- MAINTAINERS |1 + Makefile|1 + qapi-schema.json| 1056 + qapi/common.json| 16 + qapi/event.json | 38 -- qapi/migration

[Qemu-devel] [RFC v2 04/32] qemu_ram_block_host_offset

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Utility to give the offset of a host pointer within a RAMBlock (assuming we already know it's in that RAMBlock) Signed-off-by: Dr. David Alan Gilbert --- exec.c| 10 ++ include/exec/cpu-common.h | 1 + 2 files changed, 11 insertions(+

[Qemu-devel] [PATCH v2 2/3] osdep: Define QEMU_MADV_REMOVE

2017-08-24 Thread Eduardo Habkost
Define QEMU_MADV_REMOVE, so we can use it with qemu_madvise(). Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * New patch added to series --- include/qemu/osdep.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 6855b94..e9fa217 1

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

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Only process received packets if the queue has been started. Signed-off-by: Dr. David Alan Gilbert --- tests/vhost-user-bridge.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c index 1e5b5ca3da..324abee53d

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

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use a flag on the RAMBlock to state whether it has the UFFDIO_ZEROPAGE capability, use it when it's available. This allows the use of postcopy on tmpfs as well as hugepage backed files. Signed-off-by: Dr. David Alan Gilbert --- exec.c| 15 +++

[Qemu-devel] [PATCH v2 1/3] vl: Clean up user-creatable objects when exiting

2017-08-24 Thread Eduardo Habkost
Delete all user-creatable objects in /objects when exiting QEMU, so they can perform cleanup actions. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * (none) --- include/qom/object_interfaces.h | 8 qom/object_interfaces.c | 5 + vl.c| 1 +

[Qemu-devel] [PATCH v2 3/3] hostmem-file: Add "discard-data" option

2017-08-24 Thread Eduardo Habkost
The new option can be used to indicate that the file contents can be destroyed and don't need to be flushed to disk when QEMU exits or when the memory backend object is removed. Internally, it will trigger a madvise(MADV_REMOVE) call when the memory backend is removed. Signed-off-by: Eduardo Habk

[Qemu-devel] [RFC v2 05/32] migration/ram: ramblock_recv_bitmap_test_byte_offset

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Utility for testing the map when you already know the offset in the RAMBlock. Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 5 + migration/ram.h | 1 + 2 files changed, 6 insertions(+) diff --git a/migration/ram.c b/migration/ram.c index affb20

[Qemu-devel] [RFC v2 19/32] vhost+postcopy: Resolve client address

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Resolve fault addresses read off the clients UFD into RAMBlock and offset, and call back to the postcopy code to ask for the page. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 3 +++ hw/virtio/vhost-user.c | 30 +

Re: [Qemu-devel] [PATCH 02/16] qapi: Drop superfluous qapi_enum_parse() parameter max

2017-08-24 Thread Markus Armbruster
Eric Blake writes: > On 08/24/2017 01:35 PM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On 08/24/2017 03:45 AM, Markus Armbruster wrote: The lookup tables have a sentinel, no need to make callers pass their size. Fun: the header has it in the wrong position. Good

[Qemu-devel] [RFC v2 08/32] postcopy: Add vhost-user flag for postcopy and check it

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a vhost feature flag for postcopy support, and use the postcopy notifier to check it before allowing postcopy. Signed-off-by: Dr. David Alan Gilbert --- contrib/libvhost-user/libvhost-user.h | 1 + docs/interop/vhost-user.txt | 10 + hw/vir

[Qemu-devel] [RFC v2 23/32] vhost+postcopy: Call wakeups

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Cause the vhost-user client to be woken up whenever: a) We place a page in postcopy mode b) We get a fault and the page has already been received Signed-off-by: Dr. David Alan Gilbert --- migration/postcopy-ram.c | 14 ++ migration/trace-events

[Qemu-devel] [RFC v2 12/32] postcopy: Allow registering of fd handler

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow other userfaultfd's to be registered into the fault thread so that handlers for shared memory can get responses. Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c| 3 + migration/migration.h| 2 + migration/postcopy-ram.c | 212 +++

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

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Wire up a notifier to send a VHOST_USER_POSTCOPY_ADVISE message on an incoming advise. Later patches will fill in the behaviour/contents of the message. Signed-off-by: Dr. David Alan Gilbert --- contrib/libvhost-user/libvhost-user.c | 21 --- contrib

[Qemu-devel] [RFC v2 01/32] vhu: vu_queue_started

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a vu_queue_started method to complement vu_queue_enabled. Signed-off-by: Dr. David Alan Gilbert --- contrib/libvhost-user/libvhost-user.c | 6 ++ contrib/libvhost-user/libvhost-user.h | 9 + 2 files changed, 15 insertions(+) diff --git a/contrib/

[Qemu-devel] [RFC v2 25/32] vhost+postcopy: Lock around set_mem_table

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" **HACK - better solution needed ** We have the situation where: qemu bridge send set_mem_table map memory a) mark area with UFD send reply with ma

[Qemu-devel] [RFC v2 13/32] vhost+postcopy: Register shared ufd with postcopy

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Register the UFD that comes in as the response to the 'advise' method with the postcopy code. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost-user.c | 21 - migration/postcopy-ram.h | 2 +- 2 files changed, 21 insertions(+), 2 del

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

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When new regions are sent to the client using SET_MEM_TABLE, register them with the userfaultfd. Signed-off-by: Dr. David Alan Gilbert --- contrib/libvhost-user/libvhost-user.c | 32 1 file changed, 32 insertions(+) diff --git a/

[Qemu-devel] [RFC v2 03/32] migrate: Update ram_block_discard_range for shared

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The choice of call to discard a block is getting more complicated for other cases. We use fallocate PUNCH_HOLE in any file cases; it works for both hugepage and for tmpfs. We use the DONTNEED for non-hugepage cases either where they're anonymous or where they're p

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

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now that we have the mechanisms in here, allow shared memory in a postcopy. Note that QEMU can't tell who all the users of shared regions are and thus can't tell whether all the users of the shared regions have appropriate support for postcopy. Those devices that

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

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Notify the vhost-user client on reception of the 'postcopy-listen' event from the source. Signed-off-by: Dr. David Alan Gilbert --- contrib/libvhost-user/libvhost-user.c | 21 + contrib/libvhost-user/libvhost-user.h | 2 ++ docs/interop/vhost

[Qemu-devel] [RFC v2 18/32] vhost+postcopy: Send requests to source for shared pages

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Send requests back to the source for shared page requests. Signed-off-by: Dr. David Alan Gilbert --- migration/migration.h| 2 ++ migration/postcopy-ram.c | 31 --- migration/postcopy-ram.h | 3 +++ migration/trace-events | 2

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

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Tell QEMU we understand the protocol features needed for postcopy. Signed-off-by: Dr. David Alan Gilbert --- contrib/libvhost-user/libvhost-user.c | 33 + 1 file changed, 33 insertions(+) diff --git a/contrib/libvhost-user/libvhos

[Qemu-devel] [RFC v2 16/32] vhost+postcopy: Send address back to qemu

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We need a better way, but at the moment we need the address of the mappings sent back to qemu so it can interpret the messages on the userfaultfd it reads. Note: We don't ask for the default 'ack' reply since we've got our own. Signed-off-by: Dr. David Alan Gilber

[Qemu-devel] [RFC v2 07/32] postcopy: Add notifier chain

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a notifier chain for postcopy with a 'reason' flag and an opportunity for a notifier member to return an error. Call it when enabling postcopy. This will initially used to enable devices to declare they're unable to postcopy and later to notify of devices of s

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

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Clear the area and turn off THP. Signed-off-by: Dr. David Alan Gilbert --- contrib/libvhost-user/libvhost-user.c | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib

[Qemu-devel] [RFC v2 30/32] vhost: Merge neighbouring hugepage regions where appropriate

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Where two regions are created with a gap such that when aligned to hugepage boundaries, the two regions overlap, merge them. I also add quite a few trace events to see what's going on. Note: This doesn't handle all the cases, but does handle the common case on a P

[Qemu-devel] [RFC v2 20/32] postcopy: wake shared

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Send a 'wake' request on a userfaultfd for a shared process. The address in the clients address space is specified together with the RAMBlock it was resolved to. Signed-off-by: Dr. David Alan Gilbert --- migration/postcopy-ram.c | 26 ++ m

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

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow replies with fds (for postcopy) Signed-off-by: Dr. David Alan Gilbert --- contrib/libvhost-user/libvhost-user.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/contrib/libvhost-user/libvhost-user.c b/contri

[Qemu-devel] [RFC v2 26/32] vhost: Add VHOST_USER_POSTCOPY_END message

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This message is sent just before the end of postcopy to get the client to stop using userfault since we wont respond to any more requests. It should close userfaultfd so that any other pages get mapped to the backing file automatically by the kernel, since at this

[Qemu-devel] [RFC v2 31/32] vhost: Don't break merged regions on small remove/non-adds

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The previous patch merges hugepage regions with small gaps back into one; this patch stops some of the cases that split them up again. vhost_set_memory avoids adding small regions that are being dirty-monitored (typically VGA regions), but vhost_set_memory does rem

[Qemu-devel] [RFC v2 22/32] vhost+postcopy: Add vhost waker

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Register a waker function in vhost-user code to be notified when pages arrive or requests to previously mapped pages get requested. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 3 +++ hw/virtio/vhost-user.c | 26 ++

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

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Open a userfaultfd (on a postcopy_advise) and send it back in the reply to the qemu for it to monitor. Signed-off-by: Dr. David Alan Gilbert --- contrib/libvhost-user/libvhost-user.c | 26 +++--- contrib/libvhost-user/libvhost-user.h | 3 +++

[Qemu-devel] [RFC v2 32/32] postcopy shared docs

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add some notes to the migration documentation for shared memory postcopy. Signed-off-by: Dr. David Alan Gilbert --- docs/devel/migration.txt | 39 +++ 1 file changed, 39 insertions(+) diff --git a/docs/devel/migration.txt b/do

[Qemu-devel] [RFC v2 27/32] vhost+postcopy: Wire up POSTCOPY_END notify

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Wire up a call to VHOST_USER_POSTCOPY_END message to the vhost clients right before we ask the listener thread to shutdown. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost-user.c | 30 ++ m

[Qemu-devel] [RFC v2 17/32] vhost+postcopy: Stash RAMBlock and offset

2017-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Stash the RAMBlock and offset for later use looking up addresses. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 1 + hw/virtio/vhost-user.c | 30 ++ 2 files changed, 31 insertions(+) diff --git a/hw/virtio/trace-

<    1   2   3   4   >