[Qemu-devel] [PATCH v2 3/4] linux-user: fix clone() strace

2016-06-10 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- linux-user/strace.c | 42 -- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 5a9df46..e032a3a 100644 --- a/linux-user/strace.c +++

[Qemu-devel] [PATCH v2 2/4] linux-user: add socket() strace

2016-06-10 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- linux-user/strace.c| 23 +++ linux-user/strace.list | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 46391c8..5a9df46 100644 ---

[Qemu-devel] [PATCH v2 0/4] linux-user: some strace improvements

2016-06-10 Thread Laurent Vivier
These patches for linux-user strace are living for years in my tree. v2: - remove abi_nothl, use tswap16() instead, - check TARGET_SOCK_PACKET only with domain AF_INET (like in syscall.c) - use an array in print_socketcall() to display the information according to SOCKOP number, - Merge PATCH

[Qemu-devel] [PATCH v2 1/4] linux-user: add socketcall() strace

2016-06-10 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- linux-user/strace.c | 549 ++ linux-user/strace.list| 2 +- linux-user/syscall_defs.h | 22 +- 3 files changed, 568 insertions(+), 5 deletions(-) diff --git a/linux-user/strace.c

[Qemu-devel] [PATCH v2 4/4] linux-user: update get_thread_area/set_thread_area strace

2016-06-10 Thread Laurent Vivier
int get_thread_area(struct user_desc *u_info); int set_thread_area(struct user_desc *u_info); Signed-off-by: Laurent Vivier --- linux-user/strace.list | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.list

Re: [Qemu-devel] [PATCH] block-backend: allow flush on devices with open tray

2016-06-10 Thread Eric Blake
On 06/10/2016 03:59 PM, John Snow wrote: > If a device still has an attached BDS because the medium has not yet > been removed, we will be unable to migrate to a new host because > blk_flush will return an error for that backend. > > Replace the call to blk_is_available to blk_is_inserted to

Re: [Qemu-devel] [PATCH 6/6] block: Remove bs->zero_beyond_eof

2016-06-10 Thread Eric Blake
On 06/10/2016 10:05 AM, Kevin Wolf wrote: > It is always true for open images now. > > Signed-off-by: Kevin Wolf > --- > block.c | 2 -- > block/io.c| 51 > +-- > include/block/block_int.h | 3 ---

Re: [Qemu-devel] [PATCH v2 2/3] error: Remove unnecessary local_err variables

2016-06-10 Thread Eduardo Habkost
On Fri, Jun 10, 2016 at 02:59:55PM -0600, Eric Blake wrote: > On 06/10/2016 02:12 PM, Eduardo Habkost wrote: > > This patch simplifies code that uses a local_err variable just to > > immediately use it for an error_propagate() call. > > > > Coccinelle patch used to perform the changes added to >

Re: [Qemu-devel] [PATCH 5/6] qcow2: Let vmstate call qcow2_co_preadv/pwrite directly

2016-06-10 Thread Eric Blake
On 06/10/2016 10:05 AM, Kevin Wolf wrote: > We don't really want to go through the block layer in order to read from > or write to the vmstate in a qcow2 image. Doing so required a few ugly > hacks like saving and restoring the old image size (because writing to > vmstate offsets would increase

Re: [Qemu-devel] [PATCH 4/6] block: Make bdrv_load/save_vmstate coroutine_fns

2016-06-10 Thread Eric Blake
On 06/10/2016 10:05 AM, Kevin Wolf wrote: > This allows drivers to share code between normal I/O and vmstate > accesses. > > Signed-off-by: Kevin Wolf > --- > block/io.c| 80 > ++- > include/block/block_int.h | 10

[Qemu-devel] [PATCH] block-backend: allow flush on devices with open tray

2016-06-10 Thread John Snow
If a device still has an attached BDS because the medium has not yet been removed, we will be unable to migrate to a new host because blk_flush will return an error for that backend. Replace the call to blk_is_available to blk_is_inserted to weaken the check and allow flushes from the backend to

Re: [Qemu-devel] [PULL 01/31] Add optionrom compatible with fw_cfg DMA version

2016-06-10 Thread Richard W.M. Jones
On Fri, May 27, 2016 at 04:09:32PM +0200, Paolo Bonzini wrote: > From: Marc Marí > > This optionrom is based on linuxboot.S. > > Signed-off-by: Marc Marí > Signed-off-by: Richard W.M. Jones > Message-Id:

Re: [Qemu-devel] [PATCH 3/6] block: Allow .bdrv_load/save_vmstate() to return 0/-errno

2016-06-10 Thread Eric Blake
On 06/10/2016 10:05 AM, Kevin Wolf wrote: > The return value of .bdrv_load/save_vmstate() can be any non-negative > number in case of success now. It used to be bytes/-errno. > > Signed-off-by: Kevin Wolf > --- > block/io.c | 16 ++-- > 1 file changed, 14

Re: [Qemu-devel] [PATCH 2/6] block: Make .bdrv_load_vmstate() vectored

2016-06-10 Thread Eric Blake
On 06/10/2016 10:05 AM, Kevin Wolf wrote: > This brings it in line with .bdrv_save_vmstate(). > > Signed-off-by: Kevin Wolf > --- > block/io.c| 26 +- > block/qcow2.c | 6 +++--- > block/sheepdog.c | 13

Re: [Qemu-devel] [RFC v2 3/3] Remove unnecessary variables for function return value

2016-06-10 Thread Eric Blake
On 06/10/2016 02:12 PM, Eduardo Habkost wrote: > Use Coccinelle script to replace 'ret = E; return ret' with > 'return E'. The script will do the substitution only when the > function return type and variable type are the same. > > Sending as RFC because the patch looks more intrusive than the >

Re: [Qemu-devel] [PATCH v2 2/3] error: Remove unnecessary local_err variables

2016-06-10 Thread Eric Blake
On 06/10/2016 02:12 PM, Eduardo Habkost wrote: > This patch simplifies code that uses a local_err variable just to > immediately use it for an error_propagate() call. > > Coccinelle patch used to perform the changes added to > scripts/coccinelle/remove_local_err.cocci. > > Signed-off-by: Eduardo

Re: [Qemu-devel] [PATCH v2 1/3] error: Remove NULL checks on error_propagate() calls

2016-06-10 Thread Eric Blake
On 06/10/2016 02:12 PM, Eduardo Habkost wrote: > error_propagate() already ignores local_err==NULL, so there's no > need to check it before calling. > > Coccinelle patch used to perform the changes added to > scripts/coccinelle/error_propagate_null.cocci. > > Signed-off-by: Eduardo Habkost

Re: [Qemu-devel] [PATCH 1/6] block: Introduce bdrv_preadv()

2016-06-10 Thread Eric Blake
On 06/10/2016 10:05 AM, Kevin Wolf wrote: > We already have a byte-based bdrv_pwritev(), but the read counterpart > was still missing. This commit adds it. > > Signed-off-by: Kevin Wolf > --- > block/io.c| 20 +--- > include/block/block.h | 1 + >

[Qemu-devel] [PATCH v2 2/3] error: Remove unnecessary local_err variables

2016-06-10 Thread Eduardo Habkost
This patch simplifies code that uses a local_err variable just to immediately use it for an error_propagate() call. Coccinelle patch used to perform the changes added to scripts/coccinelle/remove_local_err.cocci. Signed-off-by: Eduardo Habkost --- block.c

[Qemu-devel] [RFC v2 3/3] Remove unnecessary variables for function return value

2016-06-10 Thread Eduardo Habkost
Use Coccinelle script to replace 'ret = E; return ret' with 'return E'. The script will do the substitution only when the function return type and variable type are the same. Sending as RFC because the patch looks more intrusive than the others. Probably better to split it per subsystem and let

Re: [Qemu-devel] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>

2016-06-10 Thread Maciej W. Rozycki
On Fri, 10 Jun 2016, Aleksandar Markovic wrote: > The changes that make QEMU behavior the same as hardware behavior (in > relation to CEIL, CVT, FLOOR, ROUND, TRUNC Mips instructions) are > already contained in this patch. Good, however that means that you've really combined two logically

[Qemu-devel] [PATCH v2 1/3] error: Remove NULL checks on error_propagate() calls

2016-06-10 Thread Eduardo Habkost
error_propagate() already ignores local_err==NULL, so there's no need to check it before calling. Coccinelle patch used to perform the changes added to scripts/coccinelle/error_propagate_null.cocci. Signed-off-by: Eduardo Habkost --- block.c

[Qemu-devel] [PATCH v2 0/3] coccinelle: Clean up error checks and return value variables

2016-06-10 Thread Eduardo Habkost
v2 of the previous "error: Remove NULL checks on error_propagate() calls" patch, now it became a series. Changes v1 -> v2: * The Coccinelle scripts were simplified by using "when" constraints to detect when a variable is not used elsewhere inside the function. * Added script to remove

Re: [Qemu-devel] [PATCH v4] spapr: Ensure all LMBs are represented in ibm, dynamic-memory

2016-06-10 Thread Michael Roth
Quoting Bharata B Rao (2016-06-10 00:14:48) > Memory hotplug can fail for some combinations of RAM and maxmem when > DDW is enabled in the presence of devices like nec-usb-xhci. DDW depends > on maximum addressable memory returned by guest and this value is currently > being calculated wrongly by

Re: [Qemu-devel] [PULL 00/15] tb hash improvements

2016-06-10 Thread Emilio G. Cota
On Fri, Jun 10, 2016 at 17:41:26 +0100, Peter Maydell wrote: > On 10 June 2016 at 17:34, Emilio G. Cota wrote: > > On Fri, Jun 10, 2016 at 16:33:10 +0100, Peter Maydell wrote: > >> Fails to build on ppc64be :-( > >> > >> In file included from

Re: [Qemu-devel] [Bug 1589153] Re: qemu-system-x86_64 version 2.5.0 freezes during windows 7 installation in lubuntu 16.04

2016-06-10 Thread Phil Troy
-- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1589153 Title: qemu-system-x86_64 version 2.5.0 freezes during windows 7 installation in lubuntu 16.04 Status in QEMU: New Bug description: Hi!

[Qemu-devel] [Bug 1589153] Re: qemu-system-x86_64 version 2.5.0 freezes during windows 7 installation in lubuntu 16.04

2016-06-10 Thread Phil Troy
Please see http://ubuntuforums.org/showthread.php?t=2325843=13499322#post13499322 for a similar discussion and for a workaround. But please note that to the best I can tell it is still a bug. Phil -- You received this bug notification because you are a member of qemu- devel-ml, which is

Re: [Qemu-devel] [PATCH v2] migration: Don't use *_to_cpup() and cpu_to_*w()

2016-06-10 Thread Eric Blake
On 06/10/2016 10:09 AM, Peter Maydell wrote: > The *_to_cpup() and cpu_to_*w() functions just compose a pointer > dereference with a byteswap. Instead use ld*_p() and st*_p(), > which handle potential pointer misalignment and avoid the need > to cast the pointer. > > Signed-off-by: Peter Maydell

Re: [Qemu-devel] [PATCH] nbd: Don't use cpu_to_*w() functions

2016-06-10 Thread Eric Blake
On 06/10/2016 10:15 AM, Peter Maydell wrote: > The cpu_to_*w() functions just compose a pointer dereference > with a byteswap. Instead use st*_p(), which handles potential > pointer misalignment and avoids the need to cast the pointer. > > Signed-off-by: Peter Maydell >

Re: [Qemu-devel] [PULL 0/8] migration: fixes

2016-06-10 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 10 June 2016 at 14:25, Peter Maydell wrote: > > On 10 June 2016 at 12:48, Amit Shah wrote: > >> > >> The following changes since commit > >> 0c33682d5f29b0a4ae53bdec4c8e52e4fae37b34: > >> > >>

[Qemu-devel] [PATCH v3 2/5] block/mirror: Fix target backing BDS

2016-06-10 Thread Max Reitz
Currently, we are trying to move the backing BDS from the source to the target in bdrv_replace_in_backing_chain() which is called from mirror_exit(). However, mirror_complete() already tries to open the target's backing chain with a call to bdrv_open_backing_file(). First, we should only set the

[Qemu-devel] [PATCH v3 3/5] block/null: Implement bdrv_refresh_filename()

2016-06-10 Thread Max Reitz
Signed-off-by: Max Reitz --- block/null.c | 20 1 file changed, 20 insertions(+) diff --git a/block/null.c b/block/null.c index 396500b..b511010 100644 --- a/block/null.c +++ b/block/null.c @@ -12,6 +12,8 @@ #include "qemu/osdep.h" #include

[Qemu-devel] [PATCH v3 4/5] iotests: Add test for post-mirror backing chains

2016-06-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/155 | 263 + tests/qemu-iotests/155.out | 5 + tests/qemu-iotests/group | 1 + 3 files changed, 269 insertions(+) create mode 100755 tests/qemu-iotests/155 create mode

[Qemu-devel] [PATCH v3 5/5] iotests: Add test for oVirt-like storage migration

2016-06-10 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/156 | 174 + tests/qemu-iotests/156.out | 48 + tests/qemu-iotests/group | 1 + 3 files changed, 223 insertions(+) create mode 100755 tests/qemu-iotests/156

[Qemu-devel] [PATCH v3 1/5] block: Allow replacement of a BDS by its overlay

2016-06-10 Thread Max Reitz
change_parent_backing_link() asserts that the BDS to be replaced is not used as a backing file. However, we may want to replace a BDS by its overlay in which case that very link should not be redirected. For instance, when doing a sync=none drive-mirror operation, we may have the following BDS/BB

[Qemu-devel] [PATCH v3 0/5] block/mirror: Fix (?) target backing BDS

2016-06-10 Thread Max Reitz
Issue #1: If the target image does not have a backing BDS before mirror completion, qemu tries really hard to give it a backing BDS. If the source has a backing BDS, it will actually always "succeed". In some cases, the target is not supposed to have a backing BDS, though (absolute-paths: because

Re: [Qemu-devel] [PATCH 07/10] target-sparc: cpu: use sparc_cpu_parse_features() directly

2016-06-10 Thread Mark Cave-Ayland
On 10/06/16 12:51, Eduardo Habkost wrote: > On Wed, Jun 08, 2016 at 01:30:11PM -0300, Eduardo Habkost wrote: >> On Mon, Jun 06, 2016 at 05:16:49PM +0200, Igor Mammedov wrote: >>> make SPARC target use sparc_cpu_parse_features() directly >>> so it won't get in the way of switching other

[Qemu-devel] [PATCH] macio: call dma_memory_unmap() at the end of each DMA transfer

2016-06-10 Thread Mark Cave-Ayland
This ensures that the underlying memory is marked dirty once the transfer is complete and resolves cache coherency problems under MacOS 9. Signed-off-by: Mark Cave-Ayland --- hw/ide/macio.c | 46 +---

[Qemu-devel] [PATCH RFC 16/16] sysemu/cpus: bye, bye smp_cores, smp_threads

2016-06-10 Thread Andrew Jones
The smp_cores and smp_threads globals are no longer used. Vanish them. Signed-off-by: Andrew Jones --- hw/core/machine.c | 2 -- include/sysemu/cpus.h | 10 -- vl.c | 2 -- 3 files changed, 14 deletions(-) diff --git a/hw/core/machine.c

[Qemu-devel] [PATCH RFC 10/16] hw/ppc/spapr: don't use smp_cores, smp_threads

2016-06-10 Thread Andrew Jones
Use CPUState nr_cores,nr_threads and MachineState cores,threads instead. Signed-off-by: Andrew Jones --- hw/ppc/spapr.c | 9 + hw/ppc/spapr_rtas.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index

[Qemu-devel] [PATCH RFC 14/16] hw/arm/virt: stash cpu topo info in VirtGuestInfo

2016-06-10 Thread Andrew Jones
This is a first step to preparing mach-virt for configurable cpu topology, and is necessary now to prepare to move smbios code away from using cpu topology globals smp_cores,smp_threads. Signed-off-by: Andrew Jones --- hw/arm/virt.c| 6 +-

[Qemu-devel] [PATCH RFC 11/16] target-ppc: don't use smp_threads

2016-06-10 Thread Andrew Jones
Use CPUState nr_threads instead. Signed-off-by: Andrew Jones --- target-ppc/translate_init.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index a1db5009c4a83..f442b2fc934d1

[Qemu-devel] [PATCH RFC 05/16] hw/core/machine: add smp properites

2016-06-10 Thread Andrew Jones
Signed-off-by: Andrew Jones --- hw/core/machine.c | 81 + include/hw/boards.h | 6 2 files changed, 87 insertions(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index 3dce9020e510a..2625044002e57 100644 ---

[Qemu-devel] [PATCH RFC 09/16] hw/i386/pc: don't use smp_cores, smp_threads

2016-06-10 Thread Andrew Jones
Use CPUState nr_cores,nr_threads and MachineState cores,threads instead. Signed-off-by: Andrew Jones --- hw/i386/pc.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-10 Thread Lluís Vilanova
Stefan Hajnoczi writes: > On Thu, Jun 09, 2016 at 04:17:11PM +0200, Lluís Vilanova wrote: >> >> @@ -61,7 +69,7 @@ static inline bool >> >> trace_event_get_state_static(TraceEvent *ev) >> >> static inline bool trace_event_get_state_dynamic_by_id(TraceEventID id) >> >> { >> >> /* it's on fast

[Qemu-devel] [PATCH RFC 06/16] vl: move smp parsing to machine pre_init

2016-06-10 Thread Andrew Jones
Move the guts of smp_parse() into hw/core/machine.c to operate on smp machine properties, and to eventually allow it to be overridden by machines. We leave the smp_parse function behind to handle the (now deprecated) -smp option, but now it only needs to set the machine properties. Signed-off-by:

Re: [Qemu-devel] [PATCH] configure: Rename CONFIG_QGA_NTDDDISK into CONFIG_QGA_NTDDSCSI

2016-06-10 Thread Michael Roth
Quoting Thomas Huth (2016-06-10 10:25:54) > There is no CONFIG_QGA_NTDDDISK define used anywhere in the QEMU > sources. Looking at the changelog and qga/commands-win32.c, it > seems like this should be called CONFIG_QGA_NTDDSCSI instead. > > Signed-off-by: Thomas Huth Yikes,

[Qemu-devel] [PATCH RFC 03/16] hw/smbios/smbios: fix number of sockets calculation

2016-06-10 Thread Andrew Jones
The specification "sect. 7.5 Processor Information (Type 4)" says "NOTE One structure is provided for each processor instance in a system. For example, a system that supports up to two processors includes two Processor Information structures - even if only one processor is currently

[Qemu-devel] [PATCH RFC 04/16] hw/core/machine: Introduce pre_init

2016-06-10 Thread Andrew Jones
From: Igor Mammedov Signed-off-by: Igor Mammedov Signed-off-by: Andrew Jones --- hw/core/machine.c | 6 ++ include/hw/boards.h | 1 + vl.c| 1 + 3 files changed, 8 insertions(+) diff --git a/hw/core/machine.c

[Qemu-devel] [PATCH RFC 15/16] smbios: don't use smp_cores, smp_threads

2016-06-10 Thread Andrew Jones
SMBIOS needs cpu topology for Type4 tables, so we need to pass it in. There are several parameters so we use a structure. There are two callers (of non-legacy, which generates Type4 tables), x86 and arm, so we also update both to pass the topology parameters from their MachineState properties

[Qemu-devel] [PATCH RFC 13/16] hw/arm/virt: don't use smp_cpus, max_cpus

2016-06-10 Thread Andrew Jones
Use MachineState.cpus or own copy from VirtBoardInfo.cpus instead. (Congratulations mach-virt, you're the first machine type to be cpu topology globals free!) Signed-off-by: Andrew Jones --- hw/arm/virt.c | 18 +- 1 file changed, 9 insertions(+), 9

[Qemu-devel] [PATCH RFC 07/16] qom/cpu: make nr-cores, nr-threads real properties

2016-06-10 Thread Andrew Jones
Signed-off-by: Andrew Jones --- qom/cpu.c | 8 1 file changed, 8 insertions(+) diff --git a/qom/cpu.c b/qom/cpu.c index 751e992de8823..024cda3eb98c8 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -28,6 +28,7 @@ #include "exec/log.h" #include "qemu/error-report.h"

[Qemu-devel] [PATCH RFC 02/16] vl: smp: add checks for maxcpus based topologies

2016-06-10 Thread Andrew Jones
smp_parse computes missing smp options. Unfortunately cores and threads are computed by dividing smp_cpus, instead of max_cpus. This is incorrect because the topology doesn't leave room for hotplug. More unfortunately, we can't change it easily, as doing so would impact existing command lines.

[Qemu-devel] [PATCH RFC 12/16] hw/arm/virt: rename *.smp_cpus to *.cpus

2016-06-10 Thread Andrew Jones
Use the name 'cpus' instead of 'smp_cpus' to be consistent with MachineState.cpus. This also makes grepping for the global smp_cpus easier. Signed-off-by: Andrew Jones --- hw/arm/virt-acpi-build.c | 14 +++--- hw/arm/virt.c| 14

[Qemu-devel] [PATCH RFC 08/16] hw/core/machine: set cpu global nr_cores, nr_threads in pre_init

2016-06-10 Thread Andrew Jones
CPUState nr_cores and nr_threads are properties so we can set them using the GlobalProperty API. Doing this in machine pre_init allows us to easily propagate the values from the machine properties to all cpus. An excellent bonus of this is that we can now remove the references to the cpu topology

[Qemu-devel] [PATCH RFC 01/16] vl: smp_parse: cleanups

2016-06-10 Thread Andrew Jones
No functional changes; only some code movement and removal of dead code (impossible conditions). Also, max_cpus can be initialized to 1, like smp_cpus, because it's either set by the user or set to smp_cpus, when smp_cpus is set by the user, or set to 1, when nothing is set. Signed-off-by: Andrew

[Qemu-devel] [PATCH RFC 00/16] Rework SMP parameters

2016-06-10 Thread Andrew Jones
This series is a first step in eliminating smp_* global variables (the last patch gets rid of two of them!) And, it's a first step in deprecating '-smp' in favor of using machine properties, e.g. qemu -machine pc,sockets=2,cores=2,threads=2,maxcpus=8,cpus=8 ... It's also a first step in allowing

Re: [Qemu-devel] [PATCH 1/2] Fix confusing argument names of do_unaligned_access() functions

2016-06-10 Thread Sergey Sorokin
cpu-common.h is not included in qom/cpu.h what do you think? Should it be included? Or may be MMUAccessType should be just moved into another header. For example into exec/memattrs.h 10.06.2016, 19:44, "Peter Maydell" : > On 10 June 2016 at 17:42, Sergey Sorokin

[Qemu-devel] [QEMU RFC PATCH v4 6/6] migration: spapr: migrate pending_events of spapr state

2016-06-10 Thread Jianjun Duan
In racing situations between hotplug events and migration operation, a rtas hotplug event could have not yet be delivered to the source guest when migration is started. In this case the pending_events of spapr state need be transmitted to the target so that the hotplug event can be finished on the

Re: [Qemu-devel] [PATCH v6 8/9] target-mips: Add nan2008 flavor of <CEIL|CVT|FLOOR|ROUND|TRUNC>.<L|W>.<S|D>

2016-06-10 Thread Aleksandar Markovic
The changes that make QEMU behavior the same as hardware behavior (in relation to CEIL, CVT, FLOOR, ROUND, TRUNC Mips instructions) are already contained in this patch. I just mentioned Mips-A / Mips-B / SoftFloat differences as an explanation/observation related to the change in this patch.

Re: [Qemu-devel] [Qemu-block] [PATCH] mirror: add target-zeroed flag

2016-06-10 Thread Stefan Hajnoczi
On Tue, Jun 07, 2016 at 07:30:19PM +0300, Vladimir Sementsov-Ogievskiy wrote: > On 03.06.2016 18:45, Denis V. Lunev wrote: > > On 06/03/2016 06:06 PM, Eric Blake wrote: > > > On 06/03/2016 08:05 AM, Vladimir Sementsov-Ogievskiy wrote: > > > > Add target-zeroed flag to allow user specify that

[Qemu-devel] [QEMU RFC PATCH v4 4/6] migration: migrate QTAILQ

2016-06-10 Thread Jianjun Duan
Currently we cannot directly transfer a QTAILQ instance because of the limitation in the migration code. Here we introduce an approach to transfer such structures. In our approach such a structure is tagged with VMS_LINKED. We then modified vmstate_save_state and vmstate_load_state so that when

[Qemu-devel] [QEMU RFC PATCH v4 3/6] migration: extend VMStateInfo

2016-06-10 Thread Jianjun Duan
Current migration code cannot handle some data structures such as QTAILQ in qemu/queue.h. Here we extend the signatures of put/get in VMStateInfo so that customized handling is supported. Signed-off-by: Jianjun Duan --- hw/net/vmxnet3.c| 18 ++---

[Qemu-devel] [QEMU RFC PATCH v4 5/6] migration: spapr: migrate ccs_list in spapr state

2016-06-10 Thread Jianjun Duan
ccs_list in spapr state maintains the device tree related information on the rtas side for hotplugged devices. In racing situations between hotplug events and migration operation, a rtas hotplug event could be migrated from the source guest to target guest, or the source guest could have not yet

[Qemu-devel] [QEMU RFC PATCH v4 2/6] migration: spapr_drc: defined VMStateDescription struct

2016-06-10 Thread Jianjun Duan
To manage hotplug/unplug of dynamic resources such as PCI cards, memory, and CPU on sPAPR guests, a firmware abstraction known as a Dynamic Resource Connector (DRC) is used to assign a particular dynamic resource to the guest, and provide an interface for the guest to manage configuration/removal

[Qemu-devel] [QEMU RFC PATCH v4 1/6] migration: alternative way to set instance_id in SaveStateEntry

2016-06-10 Thread Jianjun Duan
In QOM(QEMU Object Model) migrated objects are identified with instance_id which is calculated automatically using their path in the QOM composition tree. For some objects, this path could change from source to target in migration. To migrate such objects, we need to make sure the instance_id does

[Qemu-devel] [QEMU RFC PATCH v4 0/6] migration: ensure hotplug and migration work together

2016-06-10 Thread Jianjun Duan
v4: - Introduce a way to set customized instance_id in SaveStateEntry. Use it to set instance_id for DRC using its unique index to address David Gibson's concern. - Rename VMS_CSTM to VMS_LINKED based on Paolo Bonzini's suggestions. - Clean up qjson stuff in put_qtailq. -

Re: [Qemu-devel] [PATCH 1/2] Fix confusing argument names of do_unaligned_access() functions

2016-06-10 Thread Peter Maydell
On 10 June 2016 at 17:42, Sergey Sorokin wrote: > What if I combine both patches into single one? No particular objection. -- PMM

Re: [Qemu-devel] [PATCH 1/2] Fix confusing argument names of do_unaligned_access() functions

2016-06-10 Thread Sergey Sorokin
What if I combine both patches into single one? 10.06.2016, 19:33, "Peter Maydell" : > On 10 June 2016 at 17:26, Sergey Sorokin wrote: >>  There are functions cpu_unaligned_access() and do_unaligned_access() that >>  are called with access type and

Re: [Qemu-devel] [PULL 00/15] tb hash improvements

2016-06-10 Thread Peter Maydell
On 10 June 2016 at 17:34, Emilio G. Cota wrote: > On Fri, Jun 10, 2016 at 16:33:10 +0100, Peter Maydell wrote: >> Fails to build on ppc64be :-( >> >> In file included from /home/pm215/qemu/include/qemu/thread.h:4:0, >> from /home/pm215/qemu/include/block/aio.h:20,

Re: [Qemu-devel] [PATCH 1/2] Fix confusing argument names of do_unaligned_access() functions

2016-06-10 Thread Sergey Sorokin
I agree 10.06.2016, 19:33, "Peter Maydell" : > On 10 June 2016 at 17:26, Sergey Sorokin wrote: >>  There are functions cpu_unaligned_access() and do_unaligned_access() that >>  are called with access type and mmu index arguments. But these arguments

Re: [Qemu-devel] [PULL 00/15] tb hash improvements

2016-06-10 Thread Emilio G. Cota
On Fri, Jun 10, 2016 at 16:33:10 +0100, Peter Maydell wrote: > Fails to build on ppc64be :-( > > In file included from /home/pm215/qemu/include/qemu/thread.h:4:0, > from /home/pm215/qemu/include/block/aio.h:20, > from /home/pm215/qemu/include/block/block.h:4, >

[Qemu-devel] [PATCH 2/2] Fix a confusing argument name in tlb_fill() function

2016-06-10 Thread Sergey Sorokin
The function tlb_fill() is called with access type argument which is named 'is_write' in its declaration. The patch fixes the argument name to avoid a confusion. Signed-off-by: Sergey Sorokin --- include/exec/exec-all.h | 2 +- target-alpha/mem_helper.c | 4 ++--

Re: [Qemu-devel] [PATCH 1/2] Fix confusing argument names of do_unaligned_access() functions

2016-06-10 Thread Peter Maydell
On 10 June 2016 at 17:26, Sergey Sorokin wrote: > There are functions cpu_unaligned_access() and do_unaligned_access() that > are called with access type and mmu index arguments. But these arguments > are named 'is_write' and 'is_user' in their declarations. > The patch fixes

[Qemu-devel] [PATCH 1/2] Fix confusing argument names of do_unaligned_access() functions

2016-06-10 Thread Sergey Sorokin
There are functions cpu_unaligned_access() and do_unaligned_access() that are called with access type and mmu index arguments. But these arguments are named 'is_write' and 'is_user' in their declarations. The patch fixes the names to avoid a confusion. Signed-off-by: Sergey Sorokin

Re: [Qemu-devel] [PATCH 4/6] trace: Add per-vCPU tracing states for events with the 'vcpu' property

2016-06-10 Thread Stefan Hajnoczi
On Thu, Jun 09, 2016 at 04:17:11PM +0200, Lluís Vilanova wrote: > >> @@ -61,7 +69,7 @@ static inline bool > >> trace_event_get_state_static(TraceEvent *ev) > >> static inline bool trace_event_get_state_dynamic_by_id(TraceEventID id) > >> { > >> /* it's on fast path, avoid consistency checks

[Qemu-devel] [PATCH 0/2] Fix confusing argument names in some common functions

2016-06-10 Thread Sergey Sorokin
There are functions tlb_fill(), cpu_unaligned_access() and do_unaligned_access() that are called with access type and mmu index arguments. But these arguments are named 'is_write' and 'is_user' in their declarations. The patches fix the names to avoid a confusion. Sergey Sorokin (2): Fix

[Qemu-devel] [PATCH] hw/sh4/sh_pci.c: Use ldl_le_p() and stl_le_p()

2016-06-10 Thread Peter Maydell
Use ldl_le_p() and stl_le_p() instead of le32_to_cpup() and cpu_to_le32w(); the former handle misaligned addresses and don't need casts, and the latter are deprecated. Signed-off-by: Peter Maydell --- hw/sh4/sh_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [PATCH v2] migration: Don't use *_to_cpup() and cpu_to_*w()

2016-06-10 Thread Peter Maydell
The *_to_cpup() and cpu_to_*w() functions just compose a pointer dereference with a byteswap. Instead use ld*_p() and st*_p(), which handle potential pointer misalignment and avoid the need to cast the pointer. Signed-off-by: Peter Maydell --- Changes v1->v2: fix

[Qemu-devel] [PATCH 2/6] block: Make .bdrv_load_vmstate() vectored

2016-06-10 Thread Kevin Wolf
This brings it in line with .bdrv_save_vmstate(). Signed-off-by: Kevin Wolf --- block/io.c| 26 +- block/qcow2.c | 6 +++--- block/sheepdog.c | 13 ++--- include/block/block.h | 1 +

[Qemu-devel] [PATCH] nbd: Don't use cpu_to_*w() functions

2016-06-10 Thread Peter Maydell
The cpu_to_*w() functions just compose a pointer dereference with a byteswap. Instead use st*_p(), which handles potential pointer misalignment and avoids the need to cast the pointer. Signed-off-by: Peter Maydell --- nbd/client.c | 10 +- 1 file changed, 5

[Qemu-devel] [PATCH 1/6] block: Introduce bdrv_preadv()

2016-06-10 Thread Kevin Wolf
We already have a byte-based bdrv_pwritev(), but the read counterpart was still missing. This commit adds it. Signed-off-by: Kevin Wolf --- block/io.c| 20 +--- include/block/block.h | 1 + 2 files changed, 14 insertions(+), 7 deletions(-) diff

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-10 Thread Alex Bennée
Sergey Fedorov writes: > On 26/05/16 19:35, Alvise Rigo wrote: >> Using tcg_exclusive_{lock,unlock}(), make the emulation of >> LoadLink/StoreConditional thread safe. >> >> During an LL access, this lock protects the load access itself, the >> update of the exclusive

[Qemu-devel] [PATCH 6/6] block: Remove bs->zero_beyond_eof

2016-06-10 Thread Kevin Wolf
It is always true for open images now. Signed-off-by: Kevin Wolf --- block.c | 2 -- block/io.c| 51 +-- include/block/block_int.h | 3 --- 3 files changed, 23 insertions(+), 33 deletions(-) diff

[Qemu-devel] [PATCH 0/6] block: bdrv_load/save_vmstate() cleanups

2016-06-10 Thread Kevin Wolf
This series contains a few cleanups with respect to the vmstate I/O functions. Apart from making the interface more consistent (writes were already vectored, but not reads), this makes use of the new byte-based .bdrv_co_preadv/pwritev callbacks in qcow2 to get rid of a few hacks, including

[Qemu-devel] [PATCH 5/6] qcow2: Let vmstate call qcow2_co_preadv/pwrite directly

2016-06-10 Thread Kevin Wolf
We don't really want to go through the block layer in order to read from or write to the vmstate in a qcow2 image. Doing so required a few ugly hacks like saving and restoring the old image size (because writing to vmstate offsets would increase the image size) or disabling the "reads after EOF =

[Qemu-devel] [PATCH 4/6] block: Make bdrv_load/save_vmstate coroutine_fns

2016-06-10 Thread Kevin Wolf
This allows drivers to share code between normal I/O and vmstate accesses. Signed-off-by: Kevin Wolf --- block/io.c| 80 ++- include/block/block_int.h | 10 +++--- 2 files changed, 64 insertions(+), 26 deletions(-)

Re: [Qemu-devel] [PATCH] migration: Don't use *_to_cpup()

2016-06-10 Thread Peter Maydell
On 10 June 2016 at 16:05, Eric Blake wrote: > On 06/10/2016 09:01 AM, Peter Maydell wrote: >> The *_to_cpup() functions just compose a pointer dereference with >> a *_to_cpu() byteswap. Instead use ld*_p(), which handles potential >> pointer misaligment and avoids the need to

[Qemu-devel] [PATCH 3/6] block: Allow .bdrv_load/save_vmstate() to return 0/-errno

2016-06-10 Thread Kevin Wolf
The return value of .bdrv_load/save_vmstate() can be any non-negative number in case of success now. It used to be bytes/-errno. Signed-off-by: Kevin Wolf --- block/io.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/block/io.c

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-10 Thread alvise rigo
This would require to fill again the whole history which I find very unlikely. In any case, this has to be documented. Thank you, alvise On Fri, Jun 10, 2016 at 6:00 PM, Sergey Fedorov wrote: > On 10/06/16 18:53, alvise rigo wrote: >> On Fri, Jun 10, 2016 at 5:21 PM,

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-10 Thread Sergey Fedorov
On 10/06/16 18:53, alvise rigo wrote: > On Fri, Jun 10, 2016 at 5:21 PM, Sergey Fedorov wrote: >> On 26/05/16 19:35, Alvise Rigo wrote: >>> Using tcg_exclusive_{lock,unlock}(), make the emulation of >>> LoadLink/StoreConditional thread safe. >>> >>> During an LL access, this

Re: [Qemu-devel] [PULL 00/15] tb hash improvements

2016-06-10 Thread Peter Maydell
682d5f29b0a4ae53bdec4c8e52e4fae37b34: >> >> target-i386: Move user-mode exception actions out of user-exec.c >> (2016-06-09 15:55:02 +0100) >> >> are available in the git repository at: >> >> git://github.com/rth7680/qemu.git tags/pull-tcg-20160610 >&g

Re: [Qemu-devel] [RFC 02/10] softmmu_llsc_template.h: Move to multi-threading

2016-06-10 Thread alvise rigo
On Fri, Jun 10, 2016 at 5:21 PM, Sergey Fedorov wrote: > On 26/05/16 19:35, Alvise Rigo wrote: >> Using tcg_exclusive_{lock,unlock}(), make the emulation of >> LoadLink/StoreConditional thread safe. >> >> During an LL access, this lock protects the load access itself, the >>

[Qemu-devel] [PATCH] hw/usb/dev-network.c: Use ldl_le_p() and stl_le_p()

2016-06-10 Thread Peter Maydell
Use stl_le_p() and ldl_le_p() to read and write data from buffers, rather than using pointer casts and cpu_to_le32() for writes and le32_to_cpup() for reads. This: * avoids lots of casts * works even if the buffer isn't as aligned as the host would like * avoids using the *_to_cpup() functions

Re: [Qemu-devel] [PULL 00/15] tb hash improvements

2016-06-10 Thread Peter Maydell
c.c > (2016-06-09 15:55:02 +0100) > > are available in the git repository at: > > git://github.com/rth7680/qemu.git tags/pull-tcg-20160610 > > for you to fetch changes up to 9b1b8e78a5a8c849f5ca800d71497dc88a338483: > > translate-all: add tb hash

[Qemu-devel] [PATCH] block: drop support for using qcow[2] encryption with system emulators

2016-06-10 Thread Daniel P. Berrange
Back in the 2.3.0 release we declared qcow[2] encryption as deprecated, warning people that it would be removed in a future release. commit a1f688f4152e65260b94f37543521ceff8bfebe4 Author: Markus Armbruster Date: Fri Mar 13 21:09:40 2015 +0100 block: Deprecate

Re: [Qemu-devel] [PULL 0/5] ui: misc bug fixes

2016-06-10 Thread Peter Maydell
86: Move user-mode exception actions out of user-exec.c > (2016-06-09 15:55:02 +0100) > > are available in the git repository at: > > git://git.kraxel.org/qemu tags/pull-ui-20160610-1 > > for you to fetch changes up to 1185fde40c3ba02406665b9ee0743270c526be26: > >

Re: [Qemu-devel] [RFC 00/10] MTTCG: Slow-path for atomic insns

2016-06-10 Thread alvise rigo
I might have broken something while rebasing on top of enable-mttcg-for-armv7-v1. I will sort this problem out. Thank you, alvise On Fri, Jun 10, 2016 at 5:21 PM, Alex Bennée wrote: > > Alvise Rigo writes: > >> Hi, >> >> This series ports

[Qemu-devel] [PATCH] configure: Rename CONFIG_QGA_NTDDDISK into CONFIG_QGA_NTDDSCSI

2016-06-10 Thread Thomas Huth
There is no CONFIG_QGA_NTDDDISK define used anywhere in the QEMU sources. Looking at the changelog and qga/commands-win32.c, it seems like this should be called CONFIG_QGA_NTDDSCSI instead. Signed-off-by: Thomas Huth --- configure | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-devel] [PATCH v3 6/6] trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state

2016-06-10 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Reviewed-by: Stefan Hajnoczi --- monitor.c |4 +- qapi/trace.json | 20 ++-- qmp-commands.hx | 17 ++- trace/qmp.c | 143 --- 4 files changed,

  1   2   3   >