[Qemu-devel] [PULL for-2.9 3/5] .gdbinit: load QEMU sub-commands when gdb starts

2017-06-07 Thread Stefan Hajnoczi
The scripts/qemu-gdb.py file is not easily discoverable. Add a .gdbinit file so GDB either loads qemu-gdb.py automatically or prints a message informing the user how to enable them (some systems disable ./.gdbinit loading for security reasons). Symlink .gdbinit and the scripts directory in order

[Qemu-devel] [PULL for-2.9 4/5] coroutine-lock: do not touch coroutine after another one has been entered

2017-06-07 Thread Stefan Hajnoczi
From: Roman Pen Submission of requests on linux aio is a bit tricky and can lead to requests completions on submission path: 44713c9e8547 ("linux-aio: Handle io_submit() failure gracefully") 0ed93d84edab ("linux-aio: process completions from ioq_submit()") That

[Qemu-devel] [PULL for-2.9 0/5] Block patches

2017-06-07 Thread Stefan Hajnoczi
The following changes since commit 0db1851becbefe3e50cfc03776fb1f75817376af: Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.10-pull-request' into staging (2017-06-07 11:56:00 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git

[Qemu-devel] [PULL for-2.9 1/5] oslib: strip trailing '\n' from error_setg() string argument

2017-06-07 Thread Stefan Hajnoczi
From: Philippe Mathieu-Daudé spotted by Coccinelle script scripts/coccinelle/err-bad-newline.cocci Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake Reviewed-by: Laurent Vivier Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PULL for-2.9 2/5] coccinelle: fix typo in comment

2017-06-07 Thread Stefan Hajnoczi
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake Signed-off-by: Stefan Hajnoczi --- scripts/coccinelle/return_directly.cocci | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Qemu-devel] [PATCH v2 4/7] s390x/css: add missing css state conditionally

2017-06-07 Thread Juan Quintela
Halil Pasic wrote: > On 06/01/2017 01:32 PM, Cornelia Huck wrote: >> On Thu, 1 Jun 2017 11:35:27 +0200 >> Halil Pasic wrote: >> I was about to suggest to move css from pointer to an embedded struct, and then noticed that

[Qemu-devel] [PULL v1 3/5] sockets: ensure we don't accept IPv4 clients when IPv4 is disabled

2017-06-07 Thread Daniel P. Berrange
Currently if you disable listening on IPv4 addresses, via the CLI flag ipv4=off, we still mistakenly accept IPv4 clients via the IPv6 listener socket due to IPV6_V6ONLY flag being unset. We must ensure IPV6_V6ONLY is always set if ipv4=off This fixes the following scenarios -incoming

[Qemu-devel] [PULL v1 5/5] tests: add functional test validating ipv4/ipv6 address flag handling

2017-06-07 Thread Daniel P. Berrange
The semantics around handling ipv4=on|off & ipv6=on|off are quite subtle to understand in combination with the various hostname addresses and backend types. Introduce a massive test matrix that launches QEMU and validates the ability to connect a client on each protocol as appropriate. The test

[Qemu-devel] [PULL v1 2/5] sockets: don't block IPv4 clients when listening on "::"

2017-06-07 Thread Daniel P. Berrange
When inet_parse() parses the hostname, it is forcing the has_ipv6 && ipv6 flags if the address contains a ":". This means that if the user had set the ipv4=on flag, to try to restrict the listener to just ipv4, an error would not have been raised. eg -incoming tcp:[::]:9000,ipv4 should have

[Qemu-devel] [PULL v1 4/5] io: preserve ipv4/ipv6 flags when resolving InetSocketAddress

2017-06-07 Thread Daniel P. Berrange
The original InetSocketAddress struct may have has_ipv4 and has_ipv6 fields set, which will control both the ai_family used during DNS resolution, and later use of the V6ONLY flag. Currently the standalone DNS resolver code drops the has_ipv4 & has_ipv6 flags after resolving, which means the

Re: [Qemu-devel] [PATCH 0/5] Create setup/cleanup methods for migration incoming side

2017-06-07 Thread Juan Quintela
Juan Quintela wrote: > Hi Hi Kevin and Stefan, I intended to cc you on this series. Is this what you were asking for block layer migration? Do you need anything else? Thanks, Juan. > This series make: > - use of cleanup/save methods generic, not only for save_live

[Qemu-devel] [PULL v1 1/5] sockets: ensure we can bind to both ipv4 & ipv6 separately

2017-06-07 Thread Daniel P. Berrange
When binding to an IPv6 socket we currently force the IPV6_V6ONLY flag to off. This means that the IPv6 socket will accept both IPv4 & IPv6 sockets when QEMU is launched with something like -vnc :::1 While this is good for that case, it is bad for other cases. For example if an empty hostname

[Qemu-devel] [PULL v1 0/5] Merge sockets 2017/06/07

2017-06-07 Thread Daniel P. Berrange
The following changes since commit 0db1851becbefe3e50cfc03776fb1f75817376af: Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.10-pull-request' into staging (2017-06-07 11:56:00 +0100) are available in the git repository at: git://github.com/berrange/qemu

[Qemu-devel] [PULL 8/8] block: fix external snapshot abort permission error

2017-06-07 Thread Kevin Wolf
From: Jeff Cody In external_snapshot_abort(), we try to undo what was done in external_snapshot_prepare() calling bdrv_replace_node() to swap the nodes back. However, we receive a permissions error as writers are blocked on the old node, which is now the new node backing file.

[Qemu-devel] [PULL 4/8] qemu-iotests: Block migration test

2017-06-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Jeff Cody Reviewed-by: Eric Blake --- tests/qemu-iotests/183 | 140 + tests/qemu-iotests/183.out | 46 +++ tests/qemu-iotests/group | 1

Re: [Qemu-devel] [PATCH 6/6] migration: move skip_section_footers

2017-06-07 Thread Juan Quintela
Peter Xu wrote: > Move it into MigrationState, with a property binded to it. > > Same trick played with HW_COMPAT_2_3. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela

[Qemu-devel] [PULL 7/8] block/qcow.c: Fix memory leak in qcow_create()

2017-06-07 Thread Kevin Wolf
From: Peter Maydell Coverity points out that the code path in qcow_create() for the magic "fat:" backing file name leaks the memory used to store the filename (CID 1307771). Free the memory before we overwrite the pointer. Signed-off-by: Peter Maydell

[Qemu-devel] [PULL 6/8] qemu-iotests: Test automatic commit job cancel on hot unplug

2017-06-07 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: John Snow --- tests/qemu-iotests/040 | 35 +-- tests/qemu-iotests/040.out | 4 ++-- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/040

[Qemu-devel] [PULL 3/8] migration/block: Clean up BBs in block_save_complete()

2017-06-07 Thread Kevin Wolf
We need to release any block migrations BlockBackends on the source before successfully completing the migration because otherwise inactivating the images will fail (inactivation only tolerates device BBs). Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng

[Qemu-devel] [PULL 5/8] commit: Fix use after free in completion

2017-06-07 Thread Kevin Wolf
The final bdrv_set_backing_hd() could be working on already freed nodes because the commit job drops its references (through BlockBackends) to both overlay_bs and top already a bit earlier. One way to trigger the bug is hot unplugging a disk for which blockdev_mark_auto_del() cancels the block

[Qemu-devel] [PULL 2/8] migration: Inactivate images after .save_live_complete_precopy()

2017-06-07 Thread Kevin Wolf
Block migration may still access the image during its .save_live_complete_precopy() implementation, so we should only inactivate the image afterwards. Another reason for the change is that inactivating an image fails when there is still a non-device BlockBackend using it, which includes the BBs

[Qemu-devel] [PULL 1/8] block: Fix anonymous BBs in blk_root_inactivate()

2017-06-07 Thread Kevin Wolf
blk->name isn't an array, but a pointer that can be NULL. Checking for an anonymous BB must involve a NULL check first, otherwise we get crashes. Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng Reviewed-by: Juan Quintela Reviewed-by:

[Qemu-devel] [PULL 0/8] Block layer patches

2017-06-07 Thread Kevin Wolf
The following changes since commit b55a69fe5f0a504dac6359bb7e99a72b130c3661: Merge remote-tracking branch 'remotes/juanquintela/tags/migration/20170607' into staging (2017-06-07 15:06:42 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream

Re: [Qemu-devel] [PATCH v3 1/5] pnv_core: drop reference on ICPState object during CPU realization

2017-06-07 Thread Cédric Le Goater
On 06/07/2017 07:16 PM, Greg Kurz wrote: > Similarly to what was done to spapr with commit 249127d0dfeb, this patch > ensures that we don't keep an extra reference on the ICPState object. Also > since the object was just created and not reparented yet, the call to > object_property_add_child()

Re: [Qemu-devel] [PATCH 5/6] migration: move skip_configuration out

2017-06-07 Thread Juan Quintela
Peter Xu wrote: > It was in SaveState but now moved to MigrationState altogether. Again, > using HW_COMPAT_2_3 for old PC/SPAPR machines but still we'll have to > keep savevm_skip_configuration() since used by xen_init(). oops. > > Signed-off-by: Peter Xu

Re: [Qemu-devel] [PATCH v3 2/5] xics: add reset() handler to ICPStateClass

2017-06-07 Thread Cédric Le Goater
On 06/07/2017 07:17 PM, Greg Kurz wrote: > Taking into account that qemu_set_irq() returns immediatly if its first > argument is NULL, icp_kvm_reset() largely duplicates icp_reset(). > > This patch introduces a reset() handler, so that the common logic can > be implemented in icp_reset() only. >

Re: [Qemu-devel] [PATCH 3/6] migration: use compat bit for global_state

2017-06-07 Thread Juan Quintela
Peter Xu wrote: > Removing two callers of global_state_set_optional() since now we can use > HW_COMPAT_2_3. However there is still one more caller (xen_init), so we > still need to keep the function until it disappears. > > Signed-off-by: Peter Xu

Re: [Qemu-devel] [PATCH v8 00/20] Convert QCow[2] to QCryptoBlock & add LUKS support

2017-06-07 Thread Max Reitz
On 2017-06-01 19:27, Daniel P. Berrange wrote: > Previously posted: > > v1: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg00201.html > v2: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg05147.html > v3: https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg05671.html >

Re: [Qemu-devel] [PATCH 2/6] migration: move global_state.optional out

2017-06-07 Thread Juan Quintela
Peter Xu wrote: > Put it into MigrationState then we can use the properties to specify > whether to enable storing global state. > > Signed-off-by: Peter Xu > --- > include/migration/migration.h | 6 ++ > migration/migration.c | 21

Re: [Qemu-devel] [PATCH v8 19/20] qcow2: report encryption specific image information

2017-06-07 Thread Max Reitz
On 2017-06-01 19:27, Daniel P. Berrange wrote: > Currently 'qemu-img info' reports a simple "encrypted: yes" > field. This is not very useful now that qcow2 can support > multiple encryption formats. Users want to know which format > is in use and some data related to it. > > Wire up usage of the

Re: [Qemu-devel] [PATCH v2 05/45] qdev: remove PropertyInfo.qtype field

2017-06-07 Thread Markus Armbruster
Peter Maydell writes: > On 7 June 2017 at 14:09, Markus Armbruster wrote: >> Peter Maydell writes: >>> So how should I obtain those semantics with this cleanup in place ? >> >> Two ways come to mind: >> >> * Define a

Re: [Qemu-devel] [PATCH] Remove restriction that prevents bootimg elf64 images

2017-06-07 Thread Anatol Pomozov
+ more folks who made changes to hw/i386/multiboot.c On Tue, Jun 6, 2017 at 9:41 PM, Anatol Pomozov wrote: > It is possible to create a 64 bit elf image that has valid multiboot header. > qemu should be able to boot such images. > > Tested with homemade 64bit OS - now

Re: [Qemu-devel] [RFC PATCH 2/3] vmstate: error hint for failed equal checks part 2

2017-06-07 Thread Halil Pasic
On 06/07/2017 07:10 PM, Dr. David Alan Gilbert wrote: > * Halil Pasic (pa...@linux.vnet.ibm.com) wrote: >> >> >> On 06/07/2017 02:01 PM, Dr. David Alan Gilbert wrote: >>> * Halil Pasic (pa...@linux.vnet.ibm.com) wrote: On 06/07/2017 01:07 PM, Dr. David Alan Gilbert wrote: > *

[Qemu-devel] [PATCH v3 5/5] spapr: fix migration of ICPState objects from/to older QEMU

2017-06-07 Thread Greg Kurz
Commit 5bc8d26de20c ("spapr: allocate the ICPState object from under sPAPRCPUCore") moved ICPState objects from the machine to CPU cores. This is an improvement since we no longer allocate ICPState objects that will never be used. But it has the side-effect of breaking migration of older machine

[Qemu-devel] [PATCH v3 1/5] pnv_core: drop reference on ICPState object during CPU realization

2017-06-07 Thread Greg Kurz
Similarly to what was done to spapr with commit 249127d0dfeb, this patch ensures that we don't keep an extra reference on the ICPState object. Also since the object was just created and not reparented yet, the call to object_property_add_child() should never fail: let's pass _abort to make this

Re: [Qemu-devel] [Qemu-ppc] [PATCH] pseries: Correct panic behaviour for pseries machine type

2017-06-07 Thread Thomas Huth
On 07.06.2017 16:34, Paolo Bonzini wrote: > > > On 07/06/2017 09:33, Thomas Huth wrote: >> On 07.06.2017 09:07, David Gibson wrote: >>> The pseries machine type doesn't usually use the 'pvpanic' device as such, >>> because it has a firmware/hypervisor facility with roughly the same >>> purpose.

Re: [Qemu-devel] [PATCH] arm_gicv3: Fix ICC_BPR1 reset value when EL3 not implemented

2017-06-07 Thread Peter Maydell
On 7 June 2017 at 17:13, Alex Bennée wrote: > > Peter Maydell writes: > >> If EL3 is not implemented (ie only one security state) then the >> one and only ICC_BPR1 register behaves like the Non-secure >> ICC_BPR1 in an EL3-present configuration.

Re: [Qemu-devel] [RFC PATCH 2/3] vmstate: error hint for failed equal checks part 2

2017-06-07 Thread Dr. David Alan Gilbert
* Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > > > On 06/07/2017 02:01 PM, Dr. David Alan Gilbert wrote: > > * Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > >> > >> > >> On 06/07/2017 01:07 PM, Dr. David Alan Gilbert wrote: > >>> * Halil Pasic (pa...@linux.vnet.ibm.com) wrote: >

Re: [Qemu-devel] GSoC 2017 Proposal: TCG performance enhancements

2017-06-07 Thread Paolo Bonzini
On 07/06/2017 17:52, Lluís Vilanova wrote: > Paolo Bonzini writes: > >> On 07/06/2017 14:07, Peter Maydell wrote: My understanding was that adding a public instrumentation interface would add too much code maintenance overhead for a feature that is not in QEMU's core

Re: [Qemu-devel] [PATCH v2 11/14] char: move CharBackend handling in char-fe unit

2017-06-07 Thread Marc-André Lureau
Hi On Wed, Jun 7, 2017 at 8:57 PM Anthony PERARD wrote: > On Mon, May 29, 2017 at 12:45:43PM +0400, Marc-André Lureau wrote: > > Move all the fronted struct and methods to a seperate unit. This avoids > > accidentally mixing backend and frontend calls, and helps with

[Qemu-devel] [Bug 893956] Re: qemu-img bug with dynamic vhd

2017-06-07 Thread Thomas Huth
** Changed in: qemu Status: Incomplete => 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/bugs/893956 Title: qemu-img bug with dynamic vhd Status in QEMU: Won't Fix Bug description:

Re: [Qemu-devel] [PATCH v8 13/20] qcow2: add support for LUKS encryption format

2017-06-07 Thread Max Reitz
On 2017-06-01 19:27, Daniel P. Berrange wrote: > This adds support for using LUKS as an encryption format > with the qcow2 file, using the new encrypt.format parameter > to request "luks" format. e.g. > > # qemu-img create --object secret,data=123456,id=sec0 \ >-f qcow2 -o

Re: [Qemu-devel] [PATCH] cpus: reset throttle_thread_scheduled after sleep

2017-06-07 Thread Paolo Bonzini
On 07/06/2017 18:26, Juan Quintela wrote: > Felipe Franciosi wrote: >> Currently, the throttle_thread_scheduled flag is reset back to 0 before >> sleeping (as part of the throttling logic). Given that throttle_timer >> (well, any timer) may tick with a slight delay, it so

Re: [Qemu-devel] [PATCH 0/5] Code cleanups with Coccinelle

2017-06-07 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 0/5] Code cleanups with Coccinelle Type: series Message-id: 20170607074632.13162-1-marcandre.lur...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

[Qemu-devel] [PATCH v3 4/5] xics: directly register ICPState objects to vmstate

2017-06-07 Thread Greg Kurz
The ICPState objects are currently registered to vmstate as qdev objects. Their instance ids are hence computed automatically in the migration code, and thus depends on the order the CPU cores were plugged. If the destination had its CPU cores plugged in a different order than the source, then

Re: [Qemu-devel] [RFC PATCH 2/3] vmstate: error hint for failed equal checks part 2

2017-06-07 Thread Dr. David Alan Gilbert
* Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > > > On 06/07/2017 07:10 PM, Dr. David Alan Gilbert wrote: > > * Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > >> > >> > >> On 06/07/2017 02:01 PM, Dr. David Alan Gilbert wrote: > >>> * Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > >

Re: [Qemu-devel] [PATCH] block: fix external snapshot abort permission error

2017-06-07 Thread Kevin Wolf
Am 07.06.2017 um 15:55 hat Jeff Cody geschrieben: > In external_snapshot_abort(), we try to undo what was done in > external_snapshot_prepare() calling bdrv_replace_node() to swap the > nodes back. However, we receive a permissions error as writers are > blocked on the old node, which is now the

[Qemu-devel] [PATCH v3 2/5] xics: add reset() handler to ICPStateClass

2017-06-07 Thread Greg Kurz
Taking into account that qemu_set_irq() returns immediatly if its first argument is NULL, icp_kvm_reset() largely duplicates icp_reset(). This patch introduces a reset() handler, so that the common logic can be implemented in icp_reset() only. While there we can also drop icp_kvm_realize() and

[Qemu-devel] [PATCH v3 3/5] xics: setup cpu at realize time

2017-06-07 Thread Greg Kurz
Until recently, spapr used to allocate ICPState objects for the lifetime of the machine. They would only be associated to vCPUs in xics_cpu_setup() when plugging a CPU core. Now that ICPState objects have the same lifecycle as vCPUs, it is possible to associate them during realization. This

[Qemu-devel] [PATCH v3 0/5] spapr/xics: fix migration of older machine types

2017-06-07 Thread Greg Kurz
v3: - preparatory cleanup in pnv (patch 1) - rework ICPState realization and vmstate registration (patches 2,3,4) - fix migration using dummy icp/server entries (patch 5) v2: - some patches from v1 are already merged in ppc-for-2.10 - added a new fix to a potential memory leak (patch

[Qemu-devel] [PATCH v3 43/43] qobject: move dump_qobject() from block/ to qobject/

2017-06-07 Thread Marc-André Lureau
The dump functions could be generally useful for any qobject user or for debugging etc. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/qdict.h | 2 ++ include/qapi/qmp/qlist.h | 2 ++ include/qapi/qmp/qobject.h | 7 block/qapi.c | 90

[Qemu-devel] [PATCH v3 42/43] RFC: qdict: add uint

2017-06-07 Thread Marc-André Lureau
Similar to int support, add uint support. Note this is RFC because this is currently unused in qemu, I haven't found a good user for it yet (kaslr qemu-ga code did use it though). Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster

[Qemu-devel] [PATCH v3 40/43] console: use get_uint() for "head" property

2017-06-07 Thread Marc-André Lureau
TYPE_QEMU_CONSOLE property "head" is defined with object_property_add_uint*_ptr(). Signed-off-by: Marc-André Lureau --- ui/console.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/console.c b/ui/console.c index d914cced53..40572c9254

[Qemu-devel] [PATCH v3 38/43] numa: use get_uint() for "size" property

2017-06-07 Thread Marc-André Lureau
"size" is a property of TYPE_MEMORY_BACKEND. host_memory_backend_get_size() and host_memory_backend_set_size() use visit_type_size(). Signed-off-by: Marc-André Lureau --- numa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/numa.c

[Qemu-devel] [PATCH v3 34/43] arm: use get_uint() for "mp-affinity" property

2017-06-07 Thread Marc-André Lureau
TYPE_ARM_CPU's property "mp-affinity" is defined with DEFINE_PROP_UINT64(). Signed-off-by: Marc-André Lureau --- hw/intc/arm_gicv3_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c

[Qemu-devel] [PATCH] m25p80: Fix WINBOND fast read command dummy bytes

2017-06-07 Thread Aleksey Kuleshov
The original commit (3830c7a460b8252dc975f8115fdaed8c562d2d75) stated "Datasheet states that default dummy cycles is 8 so fix it." But since dummy cycles are handled in bytes it must be 1, not 8. Signed-off-by: Aleksey Kuleshov --- hw/block/m25p80.c | 2 +- 1 file changed, 1

[Qemu-devel] [PATCH v3 33/43] xen: use get_uint() for "max-ram-below-4g" property

2017-06-07 Thread Marc-André Lureau
TYPE_PC_MACHINE's property PC_MACHINE_MAX_RAM_BELOW_4G's getter and setter pc_machine_get_max_ram_below_4g() and pc_machine_set_max_ram_below_4g() use visit_type_size() Signed-off-by: Marc-André Lureau --- hw/i386/xen/xen-hvm.c | 6 +++--- 1 file changed, 3

[Qemu-devel] [PATCH] m25p80: Fix WINBOND fast read command dummy bytes

2017-06-07 Thread Aleksey Kuleshov
The original commit (3830c7a460b8252dc975f8115fdaed8c562d2d75) stated "Datasheet states that default dummy cycles is 8 so fix it." But since dummy cycles are handled in bytes it must be 1, not 8. Signed-off-by: Aleksey Kuleshov --- hw/block/m25p80.c | 2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH v8 07/20] block: deprecate "encryption=on" in favor of "encrypt.format=aes"

2017-06-07 Thread Max Reitz
On 2017-06-01 19:27, Daniel P. Berrange wrote: > Historically the qcow & qcow2 image formats supported a property > "encryption=on" to enable their built-in AES encryption. We'll > soon be supporting LUKS for qcow2, so need a more general purpose > way to enable encryption, with a choice of

[Qemu-devel] [PATCH] Revert "exec.c: Fix breakpoint invalidation race"

2017-06-07 Thread Pranith Kumar
Now that we have proper locking after MTTCG patches have landed, we can revert the commit. This reverts commit a9353fe897ca2687e5b3385ed39e3db3927a90e0. CC: Peter Maydell CC: Alex Bennée Signed-off-by: Pranith Kumar ---

[Qemu-devel] [PATCH v3 28/43] acpi: use get_uint() for various acpi properties

2017-06-07 Thread Marc-André Lureau
PIIX4: piix4_pm_add_propeties() defines these with object_property_add_uint*_ptr(). Q35: ich9_lpc_add_properties() and ich9_pm_add_properties() define them similarly, except for ACPI_PM_PROP_GPE0_BLK(). That one's getter ich9_pm_get_gpe0_blk() uses visit_type_uint32(). Signed-off-by: Marc-André

Re: [Qemu-devel] [RFC PATCH 2/3] vmstate: error hint for failed equal checks part 2

2017-06-07 Thread Halil Pasic
On 06/07/2017 06:35 PM, Juan Quintela wrote: > Halil Pasic wrote: >> Verbose error reporting for the _EQUAL family. Modify the standard _EQUAL >> so the hint states the assertion probably failed due to a bug. Introduce >> _EQUAL_HINT for specifying a context specific

[Qemu-devel] [PATCH v3 26/43] platform-bus: use get_uint() for "addr" property

2017-06-07 Thread Marc-André Lureau
This is TYPE_MEMORY_REGION's property. Its getter memory_region_get_addr() uses visit_type_uint64(). Signed-off-by: Marc-André Lureau --- hw/core/platform-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/platform-bus.c

[Qemu-devel] [PATCH v3 39/43] i386/cpu: use get_uint() for "min-level"/"min-xlevel" properties

2017-06-07 Thread Marc-André Lureau
These are properties of TYPE_X86_CPU, defined with DEFINE_PROP_UINT32() Signed-off-by: Marc-André Lureau --- target/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a91c0b6a64..52bda7b3f6

Re: [Qemu-devel] [PATCH v8 09/20] qcow: convert QCow to use QCryptoBlock for encryption

2017-06-07 Thread Max Reitz
On 2017-06-01 19:27, Daniel P. Berrange wrote: > This converts the qcow driver to make use of the QCryptoBlock > APIs for encrypting image content. This is only wired up to > permit use of the legacy QCow encryption format. Users who wish > to have the strong LUKS format should switch to qcow2

[Qemu-devel] [PATCH v3 25/43] bcm2835_fb: use {get, set}_uint() for "vcram-size" and "vcram-base"

2017-06-07 Thread Marc-André Lureau
Both properties are defined with DEFINE_PROP_UINT32(). Signed-off-by: Marc-André Lureau --- hw/arm/bcm2835_peripherals.c | 9 - hw/arm/raspi.c | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/arm/bcm2835_peripherals.c

[Qemu-devel] [PATCH v3 37/43] pnv-core: use get_uint() for "core-pir" property

2017-06-07 Thread Marc-André Lureau
This is an alias of TYPE_PNV_CORE's property "pir", which is defined with DEFINE_PROP_UINT32() Signed-off-by: Marc-André Lureau --- hw/ppc/pnv_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c index

Re: [Qemu-devel] [PATCH 1/6] migration: let MigrationState be a qdev

2017-06-07 Thread Juan Quintela
Peter Xu wrote: > Let the old man "MigrationState" join the object family. Direct benefit > is that we can start to use all the property features derived from > current QDev, like: HW_COMPAT_* bits, command line setup for migration > parameters (so will never need to set them

[Qemu-devel] [PATCH v3 24/43] aspeed: use {set, get}_uint() for "ram-size" property

2017-06-07 Thread Marc-André Lureau
This property is an alias for device TYPE_ASPEED_SDMC's property "ram-size", which is defined with DEFINE_PROP_UINT64(). Signed-off-by: Marc-André Lureau --- hw/arm/aspeed.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/arm/aspeed.c

Re: [Qemu-devel] [PATCH v2] mttcg/i386: Patch instruction using async_safe_* framework

2017-06-07 Thread Pranith Kumar
Can someone please pick this up? Thanks, On Fri, Feb 24, 2017 at 12:42 AM, Pranith Kumar wrote: > In mttcg, calling pause_all_vcpus() during execution from the > generated TBs causes a deadlock if some vCPU is waiting for exclusive > execution in start_exclusive(). Fix

Re: [Qemu-devel] [PATCH v2 11/14] char: move CharBackend handling in char-fe unit

2017-06-07 Thread Anthony PERARD
On Mon, May 29, 2017 at 12:45:43PM +0400, Marc-André Lureau wrote: > Move all the fronted struct and methods to a seperate unit. This avoids > accidentally mixing backend and frontend calls, and helps with readibilty. > > Make qemu_chr_replay() a macro shared by both char and char-fe. > > Export

[Qemu-devel] [PATCH v3 23/43] pcihp: use get_uint() for "bsel" property

2017-06-07 Thread Marc-André Lureau
The property is defined with object_property_add_uint32_ptr() Signed-off-by: Marc-André Lureau --- hw/acpi/pcihp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index 3a531a4416..c420a388ea 100644 ---

[Qemu-devel] [PATCH v3 29/43] acpi: use get_uint() for "pci-hole*" properties

2017-06-07 Thread Marc-André Lureau
Those properties use visit_type_uint*() Signed-off-by: Marc-André Lureau --- hw/i386/acpi-build.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 7c4c61290f..0b8bc62b99

[Qemu-devel] [PATCH v3 41/43] tests/qdict: check more get_try_int() cases

2017-06-07 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Suggested-by: Markus Armbruster Reviewed-by: Markus Armbruster --- tests/check-qdict.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/check-qdict.c b/tests/check-qdict.c index

[Qemu-devel] [PATCH v3 36/43] pvpanic: use get_uint() for "ioport" property

2017-06-07 Thread Marc-André Lureau
TYPE_ISA_PVPANIC_DEVICE's property PVPANIC_IOPORT_PROP is defined with DEFINE_PROP_UINT16(). Signed-off-by: Marc-André Lureau --- hw/misc/pvpanic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c index

[Qemu-devel] [PATCH v3 17/43] qdev: avoid type casts between signed and unsigned

2017-06-07 Thread Marc-André Lureau
Modify the unsigned type for various properties to use QNUM_U64, to avoid type casts. There are a few empty lines added to improve code reading/style. Signed-off-by: Marc-André Lureau --- include/hw/qdev-core.h | 1 + include/hw/qdev-properties.h | 29

[Qemu-devel] [PATCH v3 27/43] acpi: use get_uint() for "acpi-pcihp-io*" properties

2017-06-07 Thread Marc-André Lureau
Those are defined with object_property_add_uint16_ptr() Signed-off-by: Marc-André Lureau --- hw/i386/acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index b2dc3d8580..d1ffce7ce3 100644

[Qemu-devel] [PATCH v3 35/43] auxbus: use get_uint() for "addr" property

2017-06-07 Thread Marc-André Lureau
This is TYPE_MEMORY_REGION's property. Its getter memory_region_get_addr() uses visit_type_uint64(). Signed-off-by: Marc-André Lureau --- hw/misc/auxbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c index

[Qemu-devel] [PATCH v3 13/43] q35: fix get_mmcfg_size to use uint64 visitor

2017-06-07 Thread Marc-André Lureau
e->size is hwaddr, i.e. uint64_t. We silently truncate. Signed-off-by: Marc-André Lureau Suggested-by: Markus Armbruster Reviewed-by: Markus Armbruster --- hw/pci-host/q35.c | 3 +-- 1 file changed, 1 insertion(+), 2

[Qemu-devel] [PATCH v3 22/43] pc-dimm: make "size" property uint64

2017-06-07 Thread Marc-André Lureau
This carries the memory_region_size() value without implicit cast. Signed-off-by: Marc-André Lureau --- hw/acpi/memory_hotplug.c | 5 +++-- hw/acpi/nvdimm.c | 8 hw/mem/pc-dimm.c | 18 +- 3 files changed, 16 insertions(+),

[Qemu-devel] [PATCH v3 16/43] qdev: wrap default property value in an union

2017-06-07 Thread Marc-André Lureau
Wrap the Property default value (an int64_t) in a union, to prepare for the next patch adding a uint64_t. Signed-off-by: Marc-André Lureau --- include/hw/qdev-core.h | 4 +++- include/hw/qdev-properties.h | 8 hw/core/qdev-properties.c| 6 +++---

[Qemu-devel] [PATCH v3 32/43] pc: use get_uint() for "hpet-intcap" property

2017-06-07 Thread Marc-André Lureau
TYPE_HPET's property HPET_INTCAP is defined with DEFINE_PROP_UINT32(). Signed-off-by: Marc-André Lureau --- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f6d5717f8b..02f9a8fe91 100644 ---

[Qemu-devel] [PATCH v3 21/43] pc-dimm: use get_uint() for dimm properties

2017-06-07 Thread Marc-André Lureau
TYPE_PC_DIMM's property PC_DIMM_ADDR_PROP is defined with DEFINE_PROP_UINT64(). TYPE_PC_DIMM's property PC_DIMM_NODE_PROP is defined with DEFINE_PROP_UINT32(). Signed-off-by: Marc-André Lureau --- hw/acpi/memory_hotplug.c | 7 --- hw/acpi/nvdimm.c | 10

[Qemu-devel] [PATCH v3 10/43] json: learn to parse uint64 numbers

2017-06-07 Thread Marc-André Lureau
Switch strtoll() usage to qemu_strtoi64() helper while at it. Add a few tests for large numbers. Signed-off-by: Marc-André Lureau --- qobject/json-lexer.c | 4 qobject/json-parser.c | 36 tests/check-qjson.c | 44

[Qemu-devel] [PATCH v3 15/43] qdev: rename DEFINE_PROP_DEFAULT() to DEFINE_PROP_SIGNED()

2017-06-07 Thread Marc-André Lureau
Prepare for the next patch's DEFINE_PROP_UNSIGNED(). Signed-off-by: Marc-André Lureau --- include/hw/qdev-properties.h | 26 +- hw/block/fdc.c | 18 +- hw/net/e1000e.c | 6 +++--- 3 files changed,

[Qemu-devel] [PATCH v3 31/43] pc: use get_uint() for "apic-id" property

2017-06-07 Thread Marc-André Lureau
TYPE_X86_CPU's property "apic-id" is defined with DEFINE_PROP_UINT32(). Signed-off-by: Marc-André Lureau --- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f670ecb7f2..f6d5717f8b 100644 ---

[Qemu-devel] [PATCH v3 07/43] qapi: Remove visit_start_alternate() parameter promote_int

2017-06-07 Thread Marc-André Lureau
Before the previous commit, parameter promote_int = true made visit_start_alternate() with an input visitor avoid QTYPE_QINT variants and create QTYPE_QFLOAT variants instead. This was used where QTYPE_QINT variants were invalid. The previous commit fused QTYPE_QINT with QTYPE_QFLOAT, rendering

[Qemu-devel] [PATCH v3 20/43] isa: use get_uint() for "io-base"

2017-06-07 Thread Marc-André Lureau
The property is defined with DEFINE_PROP_UINT32(). Signed-off-by: Marc-André Lureau --- include/hw/isa/isa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index c2fdd70cdc..95593408ef 100644 ---

[Qemu-devel] [PATCH v3 12/43] object: add uint property setter/getter

2017-06-07 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- include/qom/object.h | 23 +++ qom/object.c | 29 + 2 files changed, 52 insertions(+) diff --git a/include/qom/object.h

[Qemu-devel] [PATCH v3 30/43] pc: use get_uint() for "iobase" property

2017-06-07 Thread Marc-André Lureau
TYPE_ISA_FDC's property "iobase" is defined with DEFINE_PROP_UINT32(). Signed-off-by: Marc-André Lureau --- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 5b8c6fbbea..f670ecb7f2 100644 ---

[Qemu-devel] [PATCH v3 19/43] qdev: use appropriate getter/setters type

2017-06-07 Thread Marc-André Lureau
Based on the underlying type of the data accessed, use the appropriate getters/setters. Signed-off-by: Marc-André Lureau --- hw/i386/acpi-build.c | 12 ++-- hw/pci-host/gpex.c| 2 +- hw/pci-host/q35.c | 2 +- hw/pci-host/xilinx-pcie.c

[Qemu-devel] [PATCH v3 05/43] qapi: minor refactoring

2017-06-07 Thread Marc-André Lureau
Use the more common pattern to error out. Signed-off-by: Marc-André Lureau --- qapi/qobject-input-visitor.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qapi/qobject-input-visitor.c b/qapi/qobject-input-visitor.c index

[Qemu-devel] [PATCH v3 11/43] qapi: update the qobject visitor to use QNUM_U64

2017-06-07 Thread Marc-André Lureau
Switch to use QNum/uint where appropriate to remove i64 limitation. The input visitor will cast i64 input to u64 for compatibility reasons (existing json QMP client already use negative i64 for large u64, and expect an implicit cast in qemu). Note: before the patch, uint64_t values above

[Qemu-devel] [PATCH v3 18/43] apic-common: make "id" property a uint32

2017-06-07 Thread Marc-André Lureau
The getter and setter of TYPE_APIC_COMMON property "id" are apic_common_get_id() and apic_common_set_id(). apic_common_get_id() reads either APICCommonState member uint32_t initial_apic_id or uint8_t id into an int64_t local variable. It then passes this variable to visit_type_int().

[Qemu-devel] [PATCH v3 03/43] tests: Remove test cases for alternates of 'number' and 'int'

2017-06-07 Thread Marc-André Lureau
Alternates with both a 'number' and an 'int' branch will become invalid when the next patch merges of QFloat and QInt into QNum. More sophisticated alternate code could keep them valid, but since we have no users outside tests, simply drop the tests. Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH v3 14/43] object: use more specific property type names

2017-06-07 Thread Marc-André Lureau
Use the actual unsigned integer type name. The type name change impacts the following externally visible area: * vl.c's machine_help_func() puts it in help for -machine NAME,help. * QMP command qom-list exposes it in ObjectPropertyInfo member @type. * QMP command device-list-properties exposes

[Qemu-devel] [PATCH v3 09/43] qnum: add uint type

2017-06-07 Thread Marc-André Lureau
In order to store integer values between INT64_MAX and UINT64_MAX, add a uint64_t internal representation. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster --- include/qapi/qmp/qnum.h | 7 ++ qobject/qnum.c | 64

[Qemu-devel] [PATCH v3 06/43] qapi: merge QInt and QFloat in QNum

2017-06-07 Thread Marc-André Lureau
We would like to use a same QObject type to represent numbers, whether they are int, uint, or floats. Getters will allow some compatibility between the various types if the number fits other representations. Add a few more tests while at it. Signed-off-by: Marc-André Lureau

[Qemu-devel] [PATCH v3 04/43] tests: add more int/number ranges checks

2017-06-07 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- tests/test-qobject-input-visitor.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/tests/test-qobject-input-visitor.c b/tests/test-qobject-input-visitor.c index

Re: [Qemu-devel] [RFC PATCH 3/3] s390x/css: add hint for devno missmatch

2017-06-07 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Halil Pasic (pa...@linux.vnet.ibm.com) wrote: >> This one has to be fixed up to 's390x: vmstatify config migration for >> virtio-ccw' provided we want to achieve the same as 's390x/css: catch >> section mismatch on load' does. >> >>

<    1   2   3   4   5   >