[Qemu-devel] [PATCH v9 02/10] softfloat: Clean code format in fpu/softfloat-specialize.h

2016-06-10 Thread Aleksandar Markovic
From: Aleksandar Markovic fpu/softfloat-specialize.h is the most critical file in SoftFloat library, since it handles numerous differences between platforms in relation to floating point arithmetics. This patch makes the code in this file more consistent

[Qemu-devel] [PATCH v9 06/10] target-mips: Activate IEEE 754-2008 signaling NaN bit meaning for MSA

2016-06-10 Thread Aleksandar Markovic
From: Aleksandar Markovic Function msa_reset() is updated so that flag snan_bit_is_one is properly set to 0. By applying this patch, a number of incorrect MSA behaviors that require IEEE 754-2008 compliance will be fixed. Those are behaviors that (up to the

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

2016-06-10 Thread Peter Maydell
On 10 June 2016 at 08:00, Amit Shah wrote: > The following changes since commit 0c33682d5f29b0a4ae53bdec4c8e52e4fae37b34: > > 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: > >

[Qemu-devel] [PULL 5/8] Postcopy: Add stats on page requests

2016-06-10 Thread Amit Shah
From: "Dr. David Alan Gilbert" On the source, add a count of page requests received from the destination. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake Reviewed-by: Denis V. Lunev Message-Id:

[Qemu-devel] [PULL 1/8] migration: fix typos in qapi-schema from latest migration additions

2016-06-10 Thread Amit Shah
From: "Daniel P. Berrange" Recent migration QAPI enhancements had a few spelling mistakes and also incorrect version number in a few places. Signed-off-by: Daniel P. Berrange Reviewed-by: Eric Blake Message-Id:

[Qemu-devel] [PULL 8/8] Postcopy: Check for support when setting the capability

2016-06-10 Thread Amit Shah
From: "Dr. David Alan Gilbert" Knowing whether the destination host supports migration with postcopy can be tricky. The destination doesn't need the capability set, however if we set it then use the opportunity to do the test and tell the user/management layer early.

Re: [Qemu-devel] [PATCH v6 00/13] data-driven device registers

2016-06-10 Thread Peter Maydell
On 9 June 2016 at 01:30, Alistair Francis wrote: > On Thu, May 12, 2016 at 3:45 PM, Alistair Francis > wrote: >> This patch series is based on Peter C's original register API. His >> original cover letter is below. > > Ping! I've

[Qemu-devel] [PULL 6/8] test: Postcopy

2016-06-10 Thread Amit Shah
From: "Dr. David Alan Gilbert" This is a postcopy test (x86 only) that actually runs the guest and checks the memory contents. The test runs from an x86 boot block with the hex embedded in the test; the source for this is: ... .code16 .org 0x7c00 .file

Re: [Qemu-devel] [PATCH 2/5] linux-user: correct setsockopt() strace.

2016-06-10 Thread Peter Maydell
On 8 June 2016 at 21:24, Laurent Vivier wrote: > From: Laurent Vivier > > Parameter of SO_RCVTIMEO and SO_SNDTIMEO is timeval, not int. > > To test this, you can use : > > QEMU_STRACE= ping localhost 2>&1 |grep TIMEO > 568

[Qemu-devel] [PULL 4/5] ui/console-gl: Add support for big endian display surfaces

2016-06-10 Thread Gerd Hoffmann
From: Thomas Huth This is required for running QEMU on big endian hosts (like PowerPC machines) that use RGB instead of BGR byte ordering. Ticket: https://bugs.launchpad.net/qemu/+bug/1581796 Signed-off-by: Thomas Huth Message-id:

[Qemu-devel] Troubleshooting migrations wiki page

2016-06-10 Thread Dr. David Alan Gilbert
Hi, I've put together a wiki page on troubleshooting failed migrations; see: http://wiki.qemu.org/Features/Migration/Troubleshooting Dave -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

[Qemu-devel] [PATCH v5 4/6] test: Postcopy

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This is a postcopy test (x86 only) that actually runs the guest and checks the memory contents. The test runs from an x86 boot block with the hex embedded in the test; the source for this is: ... .code16 .org 0x7c00 .file

Re: [Qemu-devel] [PATCH 03/10] target-i386: cpu: move xcc->kvm_required check to realize time

2016-06-10 Thread Eduardo Habkost
On Fri, Jun 10, 2016 at 09:15:44AM +0200, Igor Mammedov wrote: > On Thu, 9 Jun 2016 15:34:30 -0300 > Eduardo Habkost wrote: > > > On Mon, Jun 06, 2016 at 05:16:45PM +0200, Igor Mammedov wrote: > > > it will allow to drop custom cpu_x86_init() and use > > > cpu_generic_init()

Re: [Qemu-devel] [PATCH v6 11/13] register: Add GPIO API

2016-06-10 Thread Peter Maydell
On 12 May 2016 at 23:46, Alistair Francis wrote: > Add GPIO functionality to the register API. This allows association > and automatic connection of GPIOs to bits in registers. GPIO inputs > will attach to handlers that automatically set read-only bits in > registers.

Re: [Qemu-devel] [PATCH v20 00/10] Block replication for continuous checkpoints

2016-06-10 Thread Michael Tokarev
08.06.2016 04:11, Changlong Xie wrote: > Block replication is a very important feature which is used for > continuous checkpoints(for example: COLO). ... I'm not sure I understand why this has been sent to qemu-trivial? :) Thanks /mjt

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

2016-06-10 Thread Peter Maydell
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: >> >> target-i386: Move user-mode exception actions out of user-exec.c

[Qemu-devel] [PATCH v9 10/10] target-mips: Add FCR31's FS bit definition

2016-06-10 Thread Aleksandar Markovic
From: Aleksandar Markovic Add preprocessor definition of FCR31's FS bit, and update related code for setting this bit. Signed-off-by: Aleksandar Markovic --- target-mips/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1

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
I referred to SoftFloat library in QEMU code, and the case "Operand is smaller than INT_MIN" is different between SoftFloat and Mips-B, while the case "Operand is a NaN" is different between SoftFloat and Mips-A. Aleksandar From: Maciej Rozycki Sent:

[Qemu-devel] [PATCH v9 07/10] target-mips: Add abs2008 flavor of <ABS|NEG>.<S|D>

2016-06-10 Thread Aleksandar Markovic
From: Aleksandar Markovic Updated handling of instructions .. Note that legacy (pre-abs2008) ABS and NEG instructions are arithmetic (and, therefore, any NaN operand causes signaling invalid operation), while abs2008 ones are non-arithmetic, always

[Qemu-devel] [PATCH v5 1/6] Postcopy: Avoid 0 length discards

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The discard code in migration/ram.c would send request for zero length discards in the case where no discards were needed. It doesn't appear to have had any bad effect. Signed-off-by: Dr. David Alan Gilbert Reviewed-by:

[Qemu-devel] [PATCH v5 3/6] Postcopy: Add stats on page requests

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" On the source, add a count of page requests received from the destination. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake Reviewed-by: Denis V. Lunev --- hmp.c

[Qemu-devel] [PATCH v5 5/6] tests: fix libqtest socket timeouts

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: Andrea Arcangeli I kept getting timeouts and unix socket accept failures under high load, the patch fixes it. Signed-off-by: Andrea Arcangeli Reviewed-by: Marcel Apfelbaum --- tests/libqtest.c | 2 +- 1 file changed, 1

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

2016-06-10 Thread Peter Maydell
On 8 June 2016 at 21:24, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > linux-user/strace.c | 25 ++--- > 1 file changed, 14 insertions(+), 11 deletions(-) I think this change is correct, but it would be clearer to read

Re: [Qemu-devel] [PATCH v6 05/13] register: QOMify

2016-06-10 Thread Peter Maydell
On 12 May 2016 at 23:46, Alistair Francis wrote: > From: Peter Crosthwaite > > QOMify registers as a child of TYPE_DEVICE. This allows registers to > define GPIOs. > > Define an init helper that will do QOM initialisation. You should

[Qemu-devel] [PATCH] target-i386: Remove assert(kvm_enabled()) from host_x86_cpu_initfn()

2016-06-10 Thread Eduardo Habkost
The code will be changed to allow creation of the CPU object and report kvm_required errors only at realizefn, so we need to make the instance_init function more flexible. Signed-off-by: Eduardo Habkost --- I am applying this before "Move xcc->kvm_required check to realize

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 12:48, Amit Shah wrote: > > > > The following changes since commit 0c33682d5f29b0a4ae53bdec4c8e52e4fae37b34: > > > > target-i386: Move user-mode exception actions out of user-exec.c > > (2016-06-09

[Qemu-devel] [PATCH v9 09/10] target-mips: Implement FCR31's R/W bitmask and related functionalities

2016-06-10 Thread Aleksandar Markovic
From: Aleksandar Markovic This patch implements read and write access rules for Mips floating point control and status register (FCR31). The change can be divided into following parts: - Add fields that will keep FCR31's R/W bitmask in procesor definitions and

[Qemu-devel] [PATCH v9 05/10] linux-user: Update preprocessor constants for Mips-specific e_flags bits

2016-06-10 Thread Aleksandar Markovic
From: Aleksandar Markovic Missing values EF_MIPS_FP64 and EF_MIPS_NAN2008 added. Reviewed-by: Leon Alrae Signed-off-by: Thomas Schwinge Signed-off-by: Maciej W. Rozycki Signed-off-by:

[Qemu-devel] [PATCH v5 6/6] Postcopy: Check for support when setting the capability

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Knowing whether the destination host supports migration with postcopy can be tricky. The destination doesn't need the capability set, however if we set it then use the opportunity to do the test and tell the user/management layer early.

[Qemu-devel] [PULL 2/8] migration: rename functions to starting migrations

2016-06-10 Thread Amit Shah
From: "Daniel P. Berrange" Apply the following renames for starting incoming migration: process_incoming_migration -> migration_fd_process_incoming migration_set_incoming_channel -> migration_channel_process_incoming migration_tls_set_incoming_channel ->

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

2016-06-10 Thread Eduardo Habkost
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 propertified > > targets to handling features as global

Re: [Qemu-devel] [PATCH v2 3/6] target-sparc: cpu: use sparc_cpu_parse_features() directly

2016-06-10 Thread Eduardo Habkost
On Thu, Jun 09, 2016 at 07:11:00PM +0200, Igor Mammedov wrote: > make SPARC target use sparc_cpu_parse_features() directly > so it won't get in the way of switching other propertified > targets to handling features as global properties. > > Signed-off-by: Igor Mammedov

Re: [Qemu-devel] [PATCH v6 09/13] qdev: Define qdev_get_gpio_out

2016-06-10 Thread Peter Maydell
On 12 May 2016 at 23:46, Alistair Francis wrote: > From: Peter Crosthwaite > > An API similar to the existing qdev_get_gpio_in() except gets outputs. > Useful for: > > 1: Implementing lightweight devices that don't want to keep pointers

[Qemu-devel] [PATCH v9 00/10] IEEE 754-2008 support for Mips

2016-06-10 Thread Aleksandar Markovic
From: Aleksandar Markovic v8 -> v9: - patches 1 and 2 slightly reorganized to separate real changes from cleanup changes more clearly - unnecessary changes removed from patches 5 and 9 - changes related to FS bit moved to a separate patch (patch 10)

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

2016-06-10 Thread Gerd Hoffmann
repository at: git://git.kraxel.org/qemu tags/pull-ui-20160610-1 for you to fetch changes up to 1185fde40c3ba02406665b9ee0743270c526be26: console: ignore ui_info updates which don't actually update something (2016-06-10 11:16:18 +0200

Re: [Qemu-devel] [PATCH] hw/timer: Add value matching support to aspeed_timer

2016-06-10 Thread Peter Maydell
On 10 June 2016 at 01:59, Andrew Jeffery wrote: > On Thu, 2016-06-09 at 19:15 +0100, Peter Maydell wrote: >> On 27 May 2016 at 06:08, Andrew Jeffery wrote: >> > >> > Value matching allows Linux to boot with CONFIG_NO_HZ_IDLE=y on the >> > palmetto-bmc machine.

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: > I referred to SoftFloat library in QEMU code, and the case "Operand is > smaller than INT_MIN" is different between SoftFloat and Mips-B, while > the case "Operand is a NaN" is different between SoftFloat and Mips-A. Ah, but then you just can

[Qemu-devel] [PATCH v5 2/6] Migration: Split out ram part of qmp_query_migrate

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The RAM section of qmp_query_migrate is reasonably complex and repeated 3 times. Split it out into a helper. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric Blake Reviwed-by: Denis V. Lunev

[Qemu-devel] [PATCH v5 0/6] postcopy (& 1 test) patch for 2.7

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is a small set of postcopy changes, the largest of which is an x86 test for postcopy. Andrea's libqtest change came about from running my test under very heavy load. The test includes a self contained migration workload that

Re: [Qemu-devel] [PATCH 3/5] linux-user: add socket() strace

2016-06-10 Thread Peter Maydell
On 8 June 2016 at 21:24, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > linux-user/strace.c| 24 > linux-user/strace.list | 2 +- > 2 files changed, 25 insertions(+), 1 deletion(-) > > diff --git

Re: [Qemu-devel] [PATCH 5/5] linux-user: update get_thread_area/set_thread_area strace

2016-06-10 Thread Peter Maydell
On 8 June 2016 at 21:24, Laurent Vivier wrote: >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 | 4 ++-- > 1 file changed, 2

Re: [Qemu-devel] [PATCH v2 2/9] migration: Fix a potential issue

2016-06-10 Thread Amit Shah
On (Thu) 05 May 2016 [15:32:52], Liang Li wrote: > At the end of live migration and before vm_start() on the destination > side, we should make sure all the decompression tasks are finished, if > this can not be guaranteed, the VM may get the incorrect memory data, > or the updated memory may be

Re: [Qemu-devel] [Xen-devel] [PULL 3/4] xen: add pvUSB backend

2016-06-10 Thread Gerd Hoffmann
On Di, 2016-06-07 at 10:35 +0200, Olaf Hering wrote: > On Mon, May 23, Gerd Hoffmann wrote: > > > +++ b/hw/usb/Makefile.objs > > +common-obj-$(CONFIG_XEN_BACKEND) += xen-usb.o > > +++ b/hw/usb/xen-usb.c > > +usb_bus_new(>bus, sizeof(usbif->bus), _usb_bus_ops, > > xen_sysdev); > > xen_sysdev

Re: [Qemu-devel] [PATCH v6 06/13] register: Add block initialise helper

2016-06-10 Thread Peter Maydell
On 12 May 2016 at 23:46, Alistair Francis wrote: > From: Peter Crosthwaite > > Add a helper that will scan a static RegisterAccessInfo Array > and populate a container MemoryRegion with registers as defined. > > Signed-off-by: Peter

Re: [Qemu-devel] [PATCH v6 04/13] register: Define REG and FIELD macros

2016-06-10 Thread Peter Maydell
On 12 May 2016 at 23:46, Alistair Francis wrote: > From: Peter Crosthwaite > > Define some macros that can be used for defining registers and fields. > > The REG32 macro will define A_FOO, for the byte address of a register > as well as

[Qemu-devel] [PATCH v3 2/2] avx2 configure: Use primitives in test

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use the avx2 primitives during the test, thus making sure that the compiler and assembler could actually use avx2. This also detects the failure case on gcc 4.8.x with -save-temps and avoids the need for the gcc version check in cutils.

[Qemu-devel] [PATCH v3 1/2] Make avx2 configure test work with -O2

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When configured with --extra-cflags=-O2 gcc optimised out the test and the readelf failed the check leaving avx2 disabled. Signed-off-by: Dr. David Alan Gilbert --- configure | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-devel] [PATCH v3 0/2] AVX2 configure fixes

2016-06-10 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This pair of patches fixes a couple of issues that we found during test. The first is that the configure test is pessimistic when compiled with -O2, the second is that the explicit 4.9 gcc test is a bit coarse; I've removed that test but

Re: [Qemu-devel] [PATCH v6 07/13] dma: Add Xilinx Zynq devcfg device model

2016-06-10 Thread Peter Maydell
On 12 May 2016 at 23:46, Alistair Francis wrote: > Add a minimal model for the devcfg device which is part of Zynq. > This model supports DMA capabilities and interrupt generation. > > Signed-off-by: Peter Crosthwaite > Signed-off-by:

Re: [Qemu-devel] [PATCH v6 08/13] xilinx_zynq: Connect devcfg to the Zynq machine model

2016-06-10 Thread Peter Maydell
On 12 May 2016 at 23:46, Alistair Francis wrote: > From: Peter Crosthwaite > > Signed-off-by: Peter Crosthwaite > Signed-off-by: Alistair Francis > --- > V4: > - Small

[Qemu-devel] [PULL 7/8] tests: fix libqtest socket timeouts

2016-06-10 Thread Amit Shah
From: Andrea Arcangeli I kept getting timeouts and unix socket accept failures under high load, the patch fixes it. Signed-off-by: Andrea Arcangeli Reviewed-by: Marcel Apfelbaum Message-Id:

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 >>

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

[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 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

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

[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] [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] [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,

[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

[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] [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

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

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

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] [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] [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

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.

[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] 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

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

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

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

[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] [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

[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 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 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

[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 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 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

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

[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(-)

[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 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

[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 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 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

[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 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 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

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

[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

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:

[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] 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 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

  1   2   3   >