[Qemu-devel] [PATCH v3 21/35] spapr: advertise XIVE exploitation mode in CAS

2018-04-19 Thread Cédric Le Goater
Both XIVE and XICS interrupt mode are advertised for the moment. Signed-off-by: Cédric Le Goater --- hw/ppc/spapr.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e3567543e6e6..d05c83cdb322 100644 --- a/hw/ppc/

[Qemu-devel] [PATCH v3 17/35] spapr: add XIVE support to spapr_qirq()

2018-04-19 Thread Cédric Le Goater
The XIVE object has its own set of qirqs which is to be used when the XIVE exploitation interrupt mode is activated. Signed-off-by: Cédric Le Goater --- hw/intc/spapr_xive.c| 13 + hw/ppc/spapr.c | 4 include/hw/ppc/spapr_xive.h | 1 + include/hw/ppc/xive.

[Qemu-devel] [PATCH v3 24/35] spapr/xive: add common realize routine for KVM

2018-04-19 Thread Cédric Le Goater
The XiveSource and sPAPRXive device models will be shared between the emulated and the KVM mode. The difference will reside in the way the memory regions are initialized and in the qemu_irq handler. Introduce common realize routines to share some code. Signed-off-by: Cédric Le Goater --- hw/intc

[Qemu-devel] [PATCH v3 23/35] target/ppc/kvm: add Linux KVM definitions for XIVE

2018-04-19 Thread Cédric Le Goater
These define a new capability and a new KVM device for the XIVE native exploitation interrupt mode. New ioctls are also introduced to initialize the KVM device and handle VM migration. Signed-off-by: Cédric Le Goater --- linux-headers/asm-powerpc/kvm.h | 18 ++ linux-headers/linu

[Qemu-devel] [PATCH v3 18/35] spapr: introduce a spapr_icp_create() helper

2018-04-19 Thread Cédric Le Goater
On sPAPR, the creation of the interrupt presenter depends on some of the machine attributes. When the XIVE exploitation interrupt mode is available, this will get more complex. So provide a machine-level helper to isolate the process and hide the details to the sPAPR core realize function. Signed-

[Qemu-devel] [PATCH] linux-user: Fix getdents emulation for 64 bit guest on 32 bit host

2018-04-19 Thread Peter Maydell
Currently we mishandle emulation of the getdents syscall for the case of a 64 bit guest on a 32 bit host -- it defaults into the 'host and guest same size' codepath and generates incorrect structures in the guest buffer. We can't easily handle the 64-on-32 case using the host getdents syscall, bec

[Qemu-devel] [PATCH v3 26/35] spapr/xive: add a XIVE KVM device to the machine

2018-04-19 Thread Cédric Le Goater
As the VM is connected to the KVM interrupt device at the init of the machine, KVM support is added for XICS or for XIVE but not both at the same time. This should change later on when KVM resets are supported. Signed-off-by: Cédric Le Goater --- hw/intc/xics_kvm.c | 22 +- h

[Qemu-devel] [PATCH v3 25/35] spapr/xive: add KVM support

2018-04-19 Thread Cédric Le Goater
This introduces a set of XIVE models specific to KVM. They handle the synchronization of the state with KVM, for the monitor usage and for the migration. The TIMA and ESB MMIO regions are initialized differently under KVM. 'ram device' memory mappings, similarly to VFIO, are exposed to the guest a

[Qemu-devel] [PATCH v3 22/35] spapr: add classes for the XIVE models

2018-04-19 Thread Cédric Le Goater
The XIVE models for the emulated and the KVM mode will have a lot in common. Introduce some classes to handle the differences, mostly to synchronize the state with KVM for the monitor and migration. This is very much like XICS is doing. Signed-off-by: Cédric Le Goater --- hw/intc/spapr_xive.c

[Qemu-devel] [PATCH v3 30/35] spapr/xive, xics: reset KVM at machine reset

2018-04-19 Thread Cédric Le Goater
The interrupt controller KVM device needs to be destroyed and then recreated accordingly with the interrupt mode negociated at CAS time. A new KVM_DESTROY_DEVICE is required for this purpose along with the necessary support in Linux/KVM. This won't work without the vpcus being first disconnected f

[Qemu-devel] [PATCH 0/4] audio/hda: improve windows guest audio quality.

2018-04-19 Thread Gerd Hoffmann
Based on a patch by Martin Schrodt. Gerd Hoffmann (4): audio/hda: create millisecond timers that handle IO audio/hda: turn some dprintfs into trace points audio/hda: tweak timer adjust logic audio/hda: detect output buffer overruns and underruns include/hw/compat.h | 7 ++ hw/audio/h

[Qemu-devel] [PATCH v3 29/35] spapr/xive, xics: use the CPU_INTC handlers to reset KVM

2018-04-19 Thread Cédric Le Goater
The vCPUs are disconnected from the KVM device using a 'disable=1' as last argument of the KVM_ENABLE_CAP ioctl. This is a bit hacky, we should probably introduce a KVM_DISABLE_CAP ioctl. Signed-off-by: Cédric Le Goater --- hw/intc/spapr_xive_kvm.c | 55 ++

[Qemu-devel] [PATCH v3 27/35] migration: discard non-migratable RAMBlocks

2018-04-19 Thread Cédric Le Goater
On the POWER9 processor, the XIVE interrupt controller can control interrupt sources using MMIO to trigger events, to EOI or to turn off the sources. Priority management and interrupt acknowledgment is also controlled by MMIO in the presenter sub-engine. These MMIO regions are exposed to guests in

[Qemu-devel] [PATCH v3 34/35] ppc/pnv: add XIVE support

2018-04-19 Thread Cédric Le Goater
This is simple model of the POWER9 XIVE interrupt controller for the PowerNV machine. XIVE for baremetal is a complex controller and the model only addresses the needs of the skiboot firmware. Support is provided for : * virtual structure descriptor tables describing the XIVE internal tables sto

[Qemu-devel] [PATCH v3 31/35] spapr/xive: raise migration priority of the machine

2018-04-19 Thread Cédric Le Goater
The XIVE MMIO regions should be set on the destination before the XIVE sources are restored. This is currently handled at the machine level because it depends on the KVM initialization to be done before anything else. But it has ugly consequences on MMU, which seems broken after migration : Oop

[Qemu-devel] [PATCH v3 28/35] intc: introduce a CPUIntc interface

2018-04-19 Thread Cédric Le Goater
which we will use in the sPAPR machine to reset the interrupt controller of each CPU at the KVM level. Signed-off-by: Cédric Le Goater --- hw/intc/intc.c | 26 ++ include/hw/intc/intc.h | 21 + 2 files changed, 47 insertions(+) diff --git a/hw

[Qemu-devel] [PATCH 2/4] ui: switch trivial displays to qapi parser

2018-04-19 Thread Gerd Hoffmann
Drop the option-less display types (egl-headless, curses, none) from parse_display(), so they'll be handled by parse_display_qapi(). Signed-off-by: Gerd Hoffmann --- vl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/vl.c b/vl.c index 784c3fb795..39303d6b55 100644 --- a/vl.c +++ b/vl.

[Qemu-devel] [PATCH v3 32/35] ppc/pnv: introduce a pnv_icp_create() helper

2018-04-19 Thread Cédric Le Goater
The type of the interrupt presenter depends on the processor family, POWER8 uses XICS and POWER9 uses XIVE. Provide a machine-level helper to isolate the process and hide the details to the pnv core realize function. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 14 ++ h

[Qemu-devel] [PATCH 1/4] audio/hda: create millisecond timers that handle IO

2018-04-19 Thread Gerd Hoffmann
Currently, the HDA device tries to sync itself with the QEMU audio backend by waiting for the guest driver to handle buffer completion interrupts. This causes the backend to often read too much data from the device, as well as running out of data whenever the guest takes too long to handle the inte

[Qemu-devel] [PATCH v3 33/35] ppc: externalize ppc_get_vcpu_by_pir()

2018-04-19 Thread Cédric Le Goater
We will use it to get the CPU interrupt presenter in XIVE. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 16 hw/ppc/ppc.c | 16 include/hw/ppc/ppc.h | 1 + 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/p

Re: [Qemu-devel] [qemu-s390x] [PATCH for-2.13] Clear mem_path if we fall back to anonymous RAM allocation

2018-04-19 Thread Cornelia Huck
On Thu, 19 Apr 2018 14:33:18 +0200 Igor Mammedov wrote: > On Thu, 19 Apr 2018 17:21:23 +1000 > David Gibson wrote: > > > If the -mem-path option is set, we attempt to map the guest's RAM from a > > file in the given path; it's usually used to back guest RAM with hugepages. > > If we're unable t

[Qemu-devel] [PATCH 3/4] audio/hda: tweak timer adjust logic

2018-04-19 Thread Gerd Hoffmann
We have some jitter in the audio timer call frequency and buffer sizes. So it is rather pointless trying to be very exact, effect is a constant up+down adjustment. So adjust only in case we are off too much. Signed-off-by: Gerd Hoffmann --- hw/audio/hda-codec.c | 20 +--- hw/au

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-04-19 Thread Cédric Le Goater
On 04/16/2018 06:29 AM, David Gibson wrote: > On Thu, Apr 12, 2018 at 10:36:10AM +0200, Cédric Le Goater wrote: >> On 04/12/2018 07:16 AM, David Gibson wrote: >>> On Mon, Feb 12, 2018 at 09:55:17AM +1100, Benjamin Herrenschmidt wrote: On Sun, 2018-02-11 at 19:08 +1100, David Gibson wrote:

Re: [Qemu-devel] [virtio-dev] RE: [PATCH v3 6/6] vhost-user: support registering external host notifiers

2018-04-19 Thread Paolo Bonzini
On 19/04/2018 14:43, Liang, Cunming wrote: >> 2. Memory barriers. Right now after updating the avail idx, >> virtio does smp_wmb() and then the MMIO write. Normal hardware >> drivers do wmb() which is an sfence. Can a PCI device read bypass >> index write and see a stale index value? > > A compile

[Qemu-devel] [PATCH 4/4] audio/hda: detect output buffer overruns and underruns

2018-04-19 Thread Gerd Hoffmann
If some event caused some larger playback hickup the fine-grained timer adjust isn't able to recover. Use a buffer overruns and underruns as indicator for that. Reset timer adjust logic in case we detected one. Signed-off-by: Gerd Hoffmann --- hw/audio/hda-codec.c | 22 ++

Re: [Qemu-devel] [Qemu-block] [PATCH v4 01/13] block/mirror: Pull out mirror_perform()

2018-04-19 Thread Alberto Garcia
On Wed 11 Apr 2018 08:54:13 PM CEST, Max Reitz wrote: > When converting mirror's I/O to coroutines, we are going to need a point > where these coroutines are created. mirror_perform() is going to be > that point. > > Signed-off-by: Max Reitz > Reviewed-by: Fam Zheng > Reviewed-by: Vladimir Semen

[Qemu-devel] [PATCH 2/4] audio/hda: turn some dprintfs into trace points

2018-04-19 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/audio/hda-codec.c | 9 - hw/audio/trace-events | 4 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 9ee2f3d55f..13d4473f18 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.

[Qemu-devel] [PATCH 0/4] ui: use qapi-based parser for most -display options.

2018-04-19 Thread Gerd Hoffmann
Gerd Hoffmann (4): ui: add qapi parser for -display ui: switch trivial displays to qapi parser ui: switch gtk display to qapi parser ui: document non-qapi parser cases. vl.c | 81 ++-- 1 file changed, 41 insertions(+), 40 d

Re: [Qemu-devel] [qemu-s390x] [PATCH for-2.13] Clear mem_path if we fall back to anonymous RAM allocation

2018-04-19 Thread Christian Borntraeger
On 04/19/2018 02:58 PM, Cornelia Huck wrote: > On Thu, 19 Apr 2018 14:33:18 +0200 > Igor Mammedov wrote: > >> On Thu, 19 Apr 2018 17:21:23 +1000 >> David Gibson wrote: >> >>> If the -mem-path option is set, we attempt to map the guest's RAM from a >>> file in the given path; it's usually used

Re: [Qemu-devel] [PATCH v5 0/5] Simplify qobject refcount

2018-04-19 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, Apr 19, 2018 at 12:09 PM, Marc-André Lureau > wrote: >>> On the one hand, we provide safe conversion macros QOBJECT() and >>> qobject_to(). By the way, shouting one but not the other is a bit ugly. >> >> QOBJECT is static upcast, the compiler will shou

Re: [Qemu-devel] [PATCH v5 5/5] qobject: modify qobject_ref() to assert on NULL

2018-04-19 Thread Marc-André Lureau
Hi On Thu, Apr 19, 2018 at 8:18 AM, Markus Armbruster wrote: > Marc-André Lureau writes: > >> While it may be convenient to accept NULL value in >> qobject_unref() (for similar reasons as free() accepts NULL), it is >> not such a good idea for qobject_ref(), assert() on NULL. One place >> relied

[Qemu-devel] [PATCH 1/4] ui: add qapi parser for -display

2018-04-19 Thread Gerd Hoffmann
Add parse_display_qapi() function which parses the -display command line using a qapi visitor for DisplayOptions. Wire up as default catch in parse_display(). Improves the error message for unknown display types. Also enables json as -display argument, i.e. -display "{ 'type': 'gtk' }" Signed-o

[Qemu-devel] [PATCH 3/4] ui: switch gtk display to qapi parser

2018-04-19 Thread Gerd Hoffmann
Drop the gtk option parser from parse_display(), so parse_display_qapi() will handle it instead. Signed-off-by: Gerd Hoffmann --- vl.c | 32 1 file changed, 32 deletions(-) diff --git a/vl.c b/vl.c index 39303d6b55..1123cd792e 100644 --- a/vl.c +++ b/vl.c @@ -21

[Qemu-devel] [PATCH 4/4] ui: document non-qapi parser cases.

2018-04-19 Thread Gerd Hoffmann
Add comments to the cases not (yet) switched over to parse_display_qapi(). Signed-off-by: Gerd Hoffmann --- vl.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/vl.c b/vl.c index 1123cd792e..d35c443b8c 100644 --- a/vl.c +++ b/vl.c @@ -2121,6 +2121,16 @@ static void parse_disp

Re: [Qemu-devel] [PATCH for-2.13 01/10] spapr: Avoid redundant calls to spapr_cpu_reset()

2018-04-19 Thread Greg Kurz
On Tue, 17 Apr 2018 17:17:13 +1000 David Gibson wrote: > af81cf323c1 "spapr: CPU hotplug support" added a direct call to > spapr_cpu_reset() in spapr_cpu_init(), as well as registering it as a > reset callback. That was in order to make sure that the reset function > got called for a newly hotpl

[Qemu-devel] [PATCH v2 04/43] configure: move i386_cc to cross_cc_i386

2018-04-19 Thread Alex Bennée
Also dont assume x86_64 compiler can build i386 binaries. Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé --- v2 - drop using system x86_64 compiler for i386 compiles --- configure | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/conf

[Qemu-devel] [PATCH v2 05/43] configure: allow user to specify --cross-cc-cflags-foo=

2018-04-19 Thread Alex Bennée
As an individual compiler may be able to support several targets with the appropriate flags we need to expose this to the user as well. Signed-off-by: Alex Bennée --- configure | 8 1 file changed, 8 insertions(+) diff --git a/configure b/configure index 038fb9db7b..29af33716d 100755 -

[Qemu-devel] [PATCH v2 02/43] configure: add test for docker availability

2018-04-19 Thread Alex Bennée
This tests for a working docker installation without sudo and sets up config-host.mak accordingly. This will be useful from cross compiling things in the future. Signed-off-by: Alex Bennée --- configure | 17 + 1 file changed, 17 insertions(+) diff --git a/configure b/configure

[Qemu-devel] [PATCH v2 01/43] docker: add "probe" command for configure

2018-04-19 Thread Alex Bennée
From: Peter Maydell This is a helper function for the configure script. It replies yes, sudo or no to inform the user if non-interactive docker support is available. We trap the Exception to fail gracefully. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 18 ++ 1 file

[Qemu-devel] [PATCH v2 03/43] configure: add support for --cross-cc-FOO

2018-04-19 Thread Alex Bennée
This allows us to specify cross compilers for our guests. This is useful for building test images/programs. Currently we re-run the compile test for each target. I couldn't think of a way to cache the value for a given arch without getting messier configure code. The cross compiler for the guest i

[Qemu-devel] [PATCH v2 00/43] fix building of tests/tcg

2018-04-19 Thread Alex Bennée
Hi, This is the second revision of my attempt to revive the tests/tcg directory. You can find the first iteration here: https://lists.gnu.org/archive/html/qemu-devel/2018-04/msg01361.html Changes: I've slightly re-jigged the Makefile inclusion to make tests/tcg/Makefile very simple. All the T

[Qemu-devel] [PATCH v2 06/43] configure: set cross_cc_FOO for host compiler

2018-04-19 Thread Alex Bennée
We can build tests for the host system with the compiler that we have selected. Signed-off-by: Alex Bennée --- configure | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 29af33716d..44d310a692 100755 --- a/configure +++ b/configure

[Qemu-devel] [PATCH v2 09/43] docker: extend "cc" command to accept compiler

2018-04-19 Thread Alex Bennée
When calling our cross-compilation images we want to call something other than the default cc. Signed-off-by: Alex Bennée --- v2 - use arg.cc default to simplify logic --- tests/docker/docker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/docker/docker.py b/te

[Qemu-devel] [PATCH v2 14/43] tests/tcg/multiarch: enable additional linux-test tests

2018-04-19 Thread Alex Bennée
Un-comment the remaining tests. I removed the itimer value tests because I'm fairly sure a re-arming timer will always have a different value in it when you grab it. Signed-off-by: Alex Bennée --- tests/tcg/multiarch/linux-test.c | 20 1 file changed, 8 insertions(+), 12 del

[Qemu-devel] [PATCH v2 10/43] docker: allow "cc" command to run in user context

2018-04-19 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/docker.py | 4 1 file changed, 4 insertions(+) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 59bce9f19a..37bfa98005 100755 --- a/t

[Qemu-devel] [PATCH v2 18/43] tests/tcg/i386: Build fix for hello-i386

2018-04-19 Thread Alex Bennée
From: Fam Zheng We have -Werror=missing-prototype, add a dummy prototype to avoid that warning. Signed-off-by: Fam Zheng Reviewed-by: Thomas Huth --- tests/tcg/i386/hello-i386.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tcg/i386/hello-i386.c b/tests/tcg/i386/hello-i386.c index

[Qemu-devel] [PATCH v2 33/43] tests/tcg: enable building for s390x

2018-04-19 Thread Alex Bennée
This doesn't add any additional tests but enables building the multiarch tests for s390x. Signed-off-by: Alex Bennée Acked-by: Cornelia Huck Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/tcg/s390x/Makefile.include | 2 ++ 1 file changed, 2 insertions(+) crea

[Qemu-devel] [PATCH v2 35/43] tests/tcg/Makefile: update to be called from Makefile.target

2018-04-19 Thread Alex Bennée
This make is now invoked from each individual target make with the appropriate CC and EXTRA_CFLAGS set for each guest. It then includes additional Makefile.targets from: - tests/tcg/multiarch (always) - tests/tcg/$(TARGET_BASE_ARCH) (if available) - tests/tcg/$(TARGET_NAME) The order is imp

[Qemu-devel] [PATCH v2 08/43] docker: Add "cc" subcommand

2018-04-19 Thread Alex Bennée
Signed-off-by: Fam Zheng [AJB: add if args.paths check] Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - add if args.paths check to avoid iterating null argument --- tests/docker/docker.py | 25 + 1 file changed

[Qemu-devel] [PATCH v2 07/43] Makefile: Rename TARGET_DIRS to TARGET_LIST

2018-04-19 Thread Alex Bennée
From: Fam Zheng To be more accurate on its purpose and make code that looks for a certain target out of this variable more readable. Signed-off-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- Makefile | 20 ++-- configure

[Qemu-devel] [PATCH v2 20/43] tests/tcg/i386: fix test-i386-fprem

2018-04-19 Thread Alex Bennée
Remove dependencies on QEMU's source tree and build directly. Signed-off-by: Alex Bennée --- tests/tcg/i386/test-i386-fprem.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/tcg/i386/test-i386-fprem.c b/tests/tcg/i386/test-i386-fprem.c index 1a71623204..66f

[Qemu-devel] [PATCH v2 22/43] tests/tcg/x86_64: add Makefile.target

2018-04-19 Thread Alex Bennée
The sources for x86_64 are shared in the i386 directory which will be included thanks to TARGET_BASE_ARCH. However not all sources build so we need to filter out the ones we can't build in the 64 bit world. Signed-off-by: Alex Bennée --- tests/tcg/i386/Makefile.target | 2 +- tests/tcg/x86_64

[Qemu-devel] [PATCH v2 17/43] tests/tcg: enable building for i386

2018-04-19 Thread Alex Bennée
While you can construct a compile command that does work using the x86_64 host compiler that most people use this is flakey. Different distros handle this is different ways so we default to using a known good i386 compiler via docker. Signed-off-by: Alex Bennée --- tests/tcg/i386/Makefile.includ

[Qemu-devel] [PATCH v2 42/43] tests/tcg: disable fp-test for 32 bit (HACK!)

2018-04-19 Thread Alex Bennée
This prevents us trying to build fp-test for 32 bit guests as they would fail due to pollution from config-host.h when including osdep.h. As keeping softfloat.o would be useful maybe we can conditionally disabled it? Signed-off-by: Alex Bennée --- tests/tcg/multiarch/Makefile.target | 2 ++ 1 fi

[Qemu-devel] [PATCH v2 27/43] tests/tcg/aarch64: add Makefile.target

2018-04-19 Thread Alex Bennée
Nothing much here yet. Signed-off-by: Alex Bennée --- tests/tcg/aarch64/Makefile.target | 5 + 1 file changed, 5 insertions(+) create mode 100644 tests/tcg/aarch64/Makefile.target diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Makefile.target new file mode 100644 index

[Qemu-devel] [PATCH v2 13/43] tests/tcg/multiarch: Build fix for linux-test

2018-04-19 Thread Alex Bennée
From: Fam Zheng To keep the compiler happy, and to fit in our buildsys flags: - Make local functions "static" - #ifdef out unused functions - drop cutils/osdep dependencies Signed-off-by: Fam Zheng [AJB: drop cutils/osdep dependencies] Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth ---

[Qemu-devel] [PATCH v2 24/43] tests/tcg/i386/test-i386: fix printf format

2018-04-19 Thread Alex Bennée
Signed-off-by: Alex Bennée --- tests/tcg/i386/test-i386.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c index caef4da176..a29b41e764 100644 --- a/tests/tcg/i386/test-i386.c +++ b/tests/tcg/i386/test-i386.c @@ -2258,7 +2

[Qemu-devel] [PATCH v2 15/43] tests/tcg: move i386 specific tests into subdir

2018-04-19 Thread Alex Bennée
These only need to be built for i386 guests. This includes a stub tests/tcg/i386/Makfile.target which absorbs some of what was in tests/tcg/Makefile. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - move VPATH

[Qemu-devel] [PATCH v2 34/43] tests/tcg: enable building for ppc64

2018-04-19 Thread Alex Bennée
Currently this just enables building the multiarch tests. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/tcg/ppc64le/Makefile.include | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/tcg/ppc64le/Makefile.include diff

[Qemu-devel] [PATCH v2 16/43] docker: Add fedora-i386-cross image

2018-04-19 Thread Alex Bennée
From: Fam Zheng It has some basic *-devel.i686 packages to be used with "gcc -m32" as a 32 bit cross build environment. Signed-off-by: Fam Zheng [AJB: add glibc-static] Signed-off-by: Alex Bennée --- v2 - include static glibc package as well --- tests/docker/dockerfiles/fedora-i386-cross.d

[Qemu-devel] [PATCH v2 21/43] tests/tcg/i386: disable i386 version of test-i386-ssse

2018-04-19 Thread Alex Bennée
It doesn't build for i386 easily and we probably need a better more methodical test for SSE et all in QEMU. Signed-off-by: Alex Bennée --- tests/tcg/i386/Makefile.target | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Makefile.t

[Qemu-devel] [PATCH v2 40/43] tests: add fp-test, a floating point test suite

2018-04-19 Thread Alex Bennée
From: "Emilio G. Cota" This will allow us to run correctness tests against our FP implementation. The test can be run in two modes (called "testers"): host and soft. With the former we check the results and FP flags on the host machine against the model. With the latter we check QEMU's fpu primit

[Qemu-devel] [PATCH v2 37/43] tests/Makefile.include: add (clean-)check-tcg targets

2018-04-19 Thread Alex Bennée
This will ensure all linux-user targets build their guest test programs. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - use -include instead of complex macro stuff - also include TARGET_BASE_ARCH/Makefile --- tests/Makefile.include

Re: [Qemu-devel] [qemu-s390x] [PATCH for-2.13] Clear mem_path if we fall back to anonymous RAM allocation

2018-04-19 Thread David Hildenbrand
On 19.04.2018 15:34, Christian Borntraeger wrote: > > > On 04/19/2018 02:58 PM, Cornelia Huck wrote: >> On Thu, 19 Apr 2018 14:33:18 +0200 >> Igor Mammedov wrote: >> >>> On Thu, 19 Apr 2018 17:21:23 +1000 >>> David Gibson wrote: >>> If the -mem-path option is set, we attempt to map the gue

[Qemu-devel] [PATCH v2 31/43] tests/tcg: enable building for MIPS

2018-04-19 Thread Alex Bennée
This doesn't add any additional tests but enables building the multiarch tests for MIPS using docker cross compilers. We don't have a cross compiler for mips64 big endian though. Signed-off-by: Alex Bennée --- tests/tcg/mips/Makefile.include | 17 + 1 file changed, 17 insertions(

[Qemu-devel] [PATCH v2 12/43] tests/tcg: move architecture independent tests into subdir

2018-04-19 Thread Alex Bennée
We will want to build these for all supported guest architectures so lets move them all into one place. We also drop test_path at this point because it needs qemu utils and glib bits which is hard to support for cross compiling. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth --- v2 - mov

[Qemu-devel] [PATCH v2 11/43] docker: Makefile.include introduce DOCKER_SCRIPT

2018-04-19 Thread Alex Bennée
Define this in one place to make it easy to re-use. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index

[Qemu-devel] [PATCH v2 30/43] tests/tcg: move MIPS specific tests into subdir

2018-04-19 Thread Alex Bennée
These only need to be built for MIPS guests. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/tcg/README | 11 --- tests/tcg/mips/README | 7 +++ tests/tcg/{ => mips}/hello-mips.c | 0 3 files

[Qemu-devel] [PATCH v2 26/43] tests/tcg/arm: fix up test-arm-iwmmxt test

2018-04-19 Thread Alex Bennée
We need to rename the source file to a .S so we can do a single-line assemble and link invocation. We also specify the additional CFLAGS for the compile as it's a non-standard ARM binary. Signed-off-by: Alex Bennée --- tests/tcg/arm/Makefile.target | 5 + tests/tcg/a

[Qemu-devel] [PATCH v2 32/43] tests/tcg/mips: include common mips hello-mips

2018-04-19 Thread Alex Bennée
Signed-off-by: Alex Bennée --- tests/tcg/mips/Makefile.target | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 tests/tcg/mips/Makefile.target diff --git a/tests/tcg/mips/Makefile.target b/tests/tcg/mips/Makefile.target new file mode 100644 index 00..71f0c2dd

[Qemu-devel] [PATCH v2 28/43] tests/tcg/aarch64: add fcvt test cases for AArch64

2018-04-19 Thread Alex Bennée
This runs through the usual float to float conversions and crucially also runs with ARM Alternative Half Precision Format. Signed-off-by: Alex Bennée --- tests/tcg/aarch64/Makefile.target |8 + tests/tcg/aarch64/fcvt.c | 260 ++ tests/tcg/aarch64/fcvt.out| 1305

[Qemu-devel] [PATCH v2 23/43] tests/tcg/i386/test-i386: use modern vector_size attributes

2018-04-19 Thread Alex Bennée
The compiler complains about the old __mode__ style attributes. Signed-off-by: Alex Bennée --- tests/tcg/i386/test-i386.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c index cae6a7773a..caef4da176 100644 --- a/test

[Qemu-devel] [PATCH] target/arm: Use v7m_stack_read() for reading the frame signature

2018-04-19 Thread Peter Maydell
In commit 95695effe8caa552b8f2 we changed the v7M/v8M stack pop code to use a new v7m_stack_read() function that checks whether the read should fail due to an MPU or bus abort. We missed one call though, the one which reads the signature word for the callee-saved register part of the frame. Correc

[Qemu-devel] [PATCH v2 19/43] tests/tcg/i386: fix test-i386

2018-04-19 Thread Alex Bennée
The test-i386 test case is a little special as it includes assembler files. Add the additional compile magic to assemble these bits and link them to the final binary. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé ---

[Qemu-devel] [PATCH v2 29/43] tests/tcg/aarch64: userspace system register test

2018-04-19 Thread Alex Bennée
Signed-off-by: Alex Bennée --- tests/tcg/aarch64/Makefile.target | 2 +- tests/tcg/aarch64/sysregs.c | 14 ++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/tcg/aarch64/sysregs.c diff --git a/tests/tcg/aarch64/Makefile.target b/tests/tcg/aarch64/Ma

[Qemu-devel] [PATCH v2 41/43] tests/tcg/multiarch: add fp-test into multiarch set

2018-04-19 Thread Alex Bennée
The compile for fp-test is a little funky as we need to include a build of QEMU's softfloat as well. There is still a problem caused by the inclusion of config-host.h by osdep.h as it will trigger problems like: In file included from /home/alex/lsrc/qemu/qemu.git/include/qemu/bitops.h:16:0,

[Qemu-devel] [PATCH v2 36/43] Makefile.target: add (clean-)guest-tests targets

2018-04-19 Thread Alex Bennée
Now all the build infrastructure is in place we can build tests for each guest that we support. That support mainly depends on having cross compilers installed or docker setup. To keep all the logic for that together we put the rules in tests/tcg/Makefile.include and include it from the main Makefi

[Qemu-devel] [PATCH v2 43/43] tests: fp-test add fcvt support (!INCOMPLETE WIP)

2018-04-19 Thread Alex Bennée
This adds support for the various FOO-to-BAR conversions to fp-test. It also defines PREC_HALF although currently that is not used and will need compile time detection for _Float16 support. I've added a small test file for testing against regressions. Signed-off-by: Alex Bennée --- tests/fp/fp-

[Qemu-devel] [PATCH] target/arm: Remove stale TODO comment

2018-04-19 Thread Peter Maydell
Remove a stale TODO comment -- we have now made the arm_ldl_ptw() and arm_ldq_ptw() functions propagate physical memory read errors out to their callers. Signed-off-by: Peter Maydell --- target/arm/helper.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/target/arm/hel

[Qemu-devel] [PATCH v2 38/43] osdep: disable glib-compat.h include with QEMU_NO_GLIB

2018-04-19 Thread Alex Bennée
From: "Emilio G. Cota" To ease the cross-compilation of tests that do not use glib. Signed-off-by: Emilio G. Cota --- include/qemu/osdep.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 41658060a7..fabaf73007 100644 --- a/include/qemu/os

Re: [Qemu-devel] [PATCH] riscv: requires libfdt

2018-04-19 Thread KONRAD Frederic
On 04/19/2018 12:51 PM, KONRAD Frederic wrote: When compiling on a machine without libfdt installed the configure script should try to get libfdt from the git or should die because otherwise CONFIG_LIBFDT is not set and the build process end in an error in the link phase.. eg: hw/riscv/virt.o:

[Qemu-devel] [PATCH v2 39/43] softfloat: do not include glib headers

2018-04-19 Thread Alex Bennée
From: "Emilio G. Cota" To ease the cross-compilation of softfloat.o. Signed-off-by: Emilio G. Cota --- fpu/softfloat.c | 4 1 file changed, 4 insertions(+) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 70e0c40a1c..a2a5d4ea33 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -8

[Qemu-devel] [PATCH v2 25/43] tests/tcg: move ARM specific tests into subdir

2018-04-19 Thread Alex Bennée
These only need to be built for ARM guests. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v2 - do VPATH manipulation in tests/tcg/arm/Makefile.target - merge with fix hello-arm test --- tests/tcg/README

Re: [Qemu-devel] [Qemu-block] [PATCH v4 05/13] block/mirror: Use source as a BdrvChild

2018-04-19 Thread Alberto Garcia
On Wed 11 Apr 2018 08:54:17 PM CEST, Max Reitz wrote: > With this, the mirror_top_bs is no longer just a technically required > node in the BDS graph but actually represents the block job operation. > > Also, drop MirrorBlockJob.source, as we can reach it through > mirror_top_bs->backing. > > Signe

Re: [Qemu-devel] [PATCH v5 3/5] qobject: replace qobject_incref/QINCREF qobject_decref/QDECREF

2018-04-19 Thread Marc-André Lureau
Hi On Thu, Apr 19, 2018 at 8:16 AM, Markus Armbruster wrote: > Marc-André Lureau writes: > >> Now that we can safely call QOBJECT() on QObject * as well as its >> subtypes, we can have macros qobject_ref() / qobject_unref() that work >> everywhere instead of having to use QINCREF() / QDECREF() f

Re: [Qemu-devel] [Qemu-block] [PATCH v4 12/13] block/mirror: Add copy mode QAPI interface

2018-04-19 Thread Alberto Garcia
On Wed 11 Apr 2018 08:54:24 PM CEST, Max Reitz wrote: > This patch allows the user to specify whether to use active or only > background mode for mirror block jobs. Currently, this setting will > remain constant for the duration of the entire block job. > > Signed-off-by: Max Reitz Reviewed-by:

Re: [Qemu-devel] [Qemu-block] [PATCH v4 13/13] iotests: Add test for active mirroring

2018-04-19 Thread Alberto Garcia
On Wed 11 Apr 2018 08:54:25 PM CEST, Max Reitz wrote: > Signed-off-by: Max Reitz > Reviewed-by: Fam Zheng Reviewed-by: Alberto Garcia Berto

[Qemu-devel] [PATCH v6 0/5] Simplify qobject refcount

2018-04-19 Thread Marc-André Lureau
Hi, This series aims to get rid of the distinction between QObject, that must use qobject_incref/qobject_decref and its various derived types that have to use QINCREF/QDECREF. Instead, replace it with qobject_ref/qobject_unref for all types. v6: after Eric and Markus reviews - remove double-under

[Qemu-devel] [PATCH v6 1/5] qobject: ensure base is at offset 0

2018-04-19 Thread Marc-André Lureau
All QObject types have the base QObject as their first field. This allows the simplification of qobject_to(). This explicitly guarantees that existing casts work correctly (even though we'd prefer to get rid of such casts in any location except the qobject.h macros) Signed-off-by: Marc-André Lure

[Qemu-devel] [PATCH v6 5/5] qobject: modify qobject_ref() to assert on NULL

2018-04-19 Thread Marc-André Lureau
While it may be convenient to accept NULL value in qobject_unref() (for similar reasons as free() accepts NULL), it is not such a good idea for qobject_ref(): now assert() on NULL. Some places relied on that behaviour (the monitor request id for example), and it's best to be explicit that NULL is

[Qemu-devel] [PATCH v6 4/5] qobject: modify qobject_ref() to return obj

2018-04-19 Thread Marc-André Lureau
For convenience and clarity, make it possible to call qobject_ref() at the time when the reference is associated with a variable, or argument, by making qobject_ref() return the same pointer as given. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake --- include/qapi/qmp/qnull.h |

[Qemu-devel] [PATCH v6 2/5] qobject: use a QObjectBase_ struct

2018-04-19 Thread Marc-André Lureau
By moving the base fields to a QObjectBase_, QObject can be a type which also has a 'base' field. This allows writing a generic QOBJECT() macro that will work with any QObject type, including QObject itself. The container_of() macro ensures that the object to cast has a QObjectBase_ base field, giv

Re: [Qemu-devel] [virtio-dev] RE: [PATCH v3 6/6] vhost-user: support registering external host notifiers

2018-04-19 Thread Michael S. Tsirkin
On Thu, Apr 19, 2018 at 03:02:40PM +0200, Paolo Bonzini wrote: > On 19/04/2018 14:43, Liang, Cunming wrote: > >> 2. Memory barriers. Right now after updating the avail idx, > >> virtio does smp_wmb() and then the MMIO write. Normal hardware > >> drivers do wmb() which is an sfence. Can a PCI devic

Re: [Qemu-devel] [PATCH v6 1/5] qobject: ensure base is at offset 0

2018-04-19 Thread Eric Blake
On 04/19/2018 10:01 AM, Marc-André Lureau wrote: > All QObject types have the base QObject as their first field. This > allows the simplification of qobject_to(). > > This explicitly guarantees that existing casts work correctly (even > though we'd prefer to get rid of such casts in any location e

Re: [Qemu-devel] [Qemu-block] [PATCH v4 06/13] block: Generalize should_update_child() rule

2018-04-19 Thread Alberto Garcia
On Wed 11 Apr 2018 08:54:18 PM CEST, Max Reitz wrote: > Currently, bdrv_replace_node() refuses to create loops from one BDS to > itself if the BDS to be replaced is the backing node of the BDS to > replace it: Say there is a node A and a node B. Replacing B by A means > making all references to B

Re: [Qemu-devel] [PATCH v6 1/5] qobject: ensure base is at offset 0

2018-04-19 Thread Marc-André Lureau
On Thu, Apr 19, 2018 at 5:20 PM, Eric Blake wrote: > On 04/19/2018 10:01 AM, Marc-André Lureau wrote: >> All QObject types have the base QObject as their first field. This >> allows the simplification of qobject_to(). >> >> This explicitly guarantees that existing casts work correctly (even >> tho

Re: [Qemu-devel] [PATCH v2] dump: add Windows dump format to dump-guest-memory

2018-04-19 Thread Marc-André Lureau
On Wed, Apr 18, 2018 at 7:39 PM, Viktor Prutyanov wrote: > This patch adds Windows crashdumping feature. Now QEMU can produce ELF-dump > containing Windows crashdump header, which can help to convert to a valid > WinDbg-understandable crashdump file, or immediately create such file. > The crashdum

Re: [Qemu-devel] [PATCH v6 3/5] qobject: replace qobject_incref/QINCREF qobject_decref/QDECREF

2018-04-19 Thread Eric Blake
On 04/19/2018 10:01 AM, Marc-André Lureau wrote: > Now that we can safely call QOBJECT() on QObject * as well as its > subtypes, we can have macros qobject_ref() / qobject_unref() that work > everywhere instead of having to use QINCREF() / QDECREF() for QObject > and qobject_incref() / qobject_decr

Re: [Qemu-devel] [RFC for-2.13 0/7] spapr: Clean up pagesize handling

2018-04-19 Thread Andrea Bolognani
On Thu, 2018-04-19 at 16:29 +1000, David Gibson wrote: > Currently the "pseries" machine type will (usually) advertise > different pagesizes to the guest when running under KVM and TCG, which > is not how things are supposed to work. > > This comes from poor handling of hardware limitations which

Re: [Qemu-devel] [PATCH v6 4/5] qobject: modify qobject_ref() to return obj

2018-04-19 Thread Eric Blake
On 04/19/2018 10:01 AM, Marc-André Lureau wrote: > For convenience and clarity, make it possible to call qobject_ref() at > the time when the reference is associated with a variable, or > argument, by making qobject_ref() return the same pointer as given. > > Signed-off-by: Marc-André Lureau > Re

  1   2   3   4   5   >