[Qemu-devel] [Bug 1516446] Re: Migration always causes guest freeze in one direction.

2018-06-15 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1516446 Title: Migration a

Re: [Qemu-devel] [PATCH v3 11/13] nvdimm: allow setting the label-size to 0

2018-06-15 Thread Haozhong Zhang
On 06/15/18 16:04, David Hildenbrand wrote: > It is inititally 0, so setting it to 0 should be allowed, too. I'm fine with this change and believe nothing is broken in practice, but what is expected by the user who sets a zero label size? Look at nvdimm_dsm_device() which enables label DSMs only

Re: [Qemu-devel] [PATCH 6/6] linux-user: Use *at functions to implement interp_prefix

2018-06-15 Thread Evan Green
Apologies for getting lost in the dust storm, but where does this leave this patch? Sounds like there's a real failure caused by it? -Evan On Thu, Jun 7, 2018 at 9:43 AM Richard Henderson wrote: > > On 06/07/2018 01:01 AM, Laurent Vivier wrote: > >> Your script doesn't work outside debian, lacking

Re: [Qemu-devel] [PATCH v7 00/54] fix building of tests/tcg - last chance to review!

2018-06-15 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180615194705.28019-1-alex.ben...@linaro.org Subject: [Qemu-devel] [PATCH v7 00/54] fix building of tests/tcg - last chance to review! === TEST SCRIPT BEGIN === #!/bin/bash

[Qemu-devel] [PATCH v3 2/2] i386/cpu: make -cpu host support monitor/mwait

2018-06-15 Thread Michael S. Tsirkin
When guest CPU PM is enabled, and with -cpu host, expose the host CPU MWAIT leaf in the CPUID so guest can make good PM decisions. Note: the result is 100% CPU utilization reported by host as host no longer knows that the CPU is halted. Signed-off-by: Michael S. Tsirkin --- target/i386/cpu.h |

[Qemu-devel] [PATCH v3 0/2] kvm: limited x86 CPU power management

2018-06-15 Thread Michael S. Tsirkin
This adds ability to expose some host CPU power management capabilities to guests. For intel guests, this is sufficient for guest to enable low power CPU states on idle. For AMD guests it isn't sufficient, deeper C-states are entered using System-IO. When enabled this puts CPU in a low power state

[Qemu-devel] [PATCH v3 1/2] kvm: support -dedicated cpu-pm=on|off

2018-06-15 Thread Michael S. Tsirkin
With this flag, kvm allows guest to control host CPU power state. This increases latency for other processes using same host CPU in an unpredictable way, but if decreases idle entry/exit times for the running VCPU, so it works best if you use a dedicated host cpu, hence the name. Follow-up patche

[Qemu-devel] [PATCH v3 1/2] qapi: open files in binary mode and use explicit decoding/encoding in common.py

2018-06-15 Thread Matthias Maier
This is a different approach to fix the locale dependent encode/decode problem in common.py utilizing the binary read/write mode [1,2], and (if a python 3 interpreter is used) with explicit decode/encode arguments [3]. This approach is preferred over the fix in commit d4e5ec877ca because it is (a)

[Qemu-devel] [PATCH v3 2/2] Revert commit d4e5ec877ca

2018-06-15 Thread Matthias Maier
This commit removes the PYTHON_UTF8 workaround. The problem with setting LC_ALL= LANG=C LC_CTYPE=en_US.UTF-8 is that the en_US.UTF-8 locale might not be available. In this case setting above locales results in build errors even though another UTF-8 locale was originally set [1]. The only stable

[Qemu-devel] [PATCH v3 0/2] Fix compilation with python-3 if en_US.UTF-8 is unavailable

2018-06-15 Thread Matthias Maier
Hi, this is hopefully the final iteration of the patches. v3: - reverse order of patches - rename second patch to "Revert commit ..." - drop "UTF-8" argument in decode()/encode(); bot functions default to utf-8 already. v2: - ensure compatibility with python2 by only calling encode()/deco

Re: [Qemu-devel] [PATCH v2 2/2] qapi: open files in binary mode and use explicit decoding/encoding in common.py

2018-06-15 Thread Matthias Maier
On Fri, Jun 15, 2018, at 10:31 CDT, Markus Armbruster wrote: > If I understand 7.2.3. Standard Encodings[*] correctly, the canonical > name is "utf-8". Let's use that. Wait, it's the default, no need to > pass an argument. Roger. I will change this in v3.

Re: [Qemu-devel] [PATCH v2 0/2] kvm: x86 CPU power management

2018-06-15 Thread Michael S. Tsirkin
On Fri, Jun 15, 2018 at 03:32:27PM -0300, Marcelo Tosatti wrote: > On Thu, Jun 14, 2018 at 02:37:28AM +0300, Michael S. Tsirkin wrote: > > On Wed, Jun 13, 2018 at 07:34:53PM -0300, Marcelo Tosatti wrote: > > > On Tue, Jun 12, 2018 at 09:47:11PM +0300, Michael S. Tsirkin wrote: > > > > This adds abi

Re: [Qemu-devel] [PATCH 1/2] Partially revert commit d4e5ec877ca

2018-06-15 Thread Matthias Maier
On Fri, Jun 15, 2018, at 15:34 CDT, Eduardo Habkost wrote: > Thanks for the patches. It's nice to see that hack go away. > > Patch 2/2 is necessary to make the removal of PYTHON_UTF8 safe, > correct? In that case, I plan to reverse the order of the > patches before applying. Yes, the order o

Re: [Qemu-devel] [PATCH 1/2] Partially revert commit d4e5ec877ca

2018-06-15 Thread Eduardo Habkost
On Thu, Jun 14, 2018 at 10:43:56AM -0500, Matthias Maier wrote: > This commit removes the PYTHON_UTF8 workaround. The problem with setting > > LC_ALL= LANG=C LC_CTYPE=en_US.UTF-8 > > is that the en_US.UTF-8 locale might not be available. In this case > setting above locales results in build err

[Qemu-devel] [PATCH v7 52/54] docker: docker.py adding age check command

2018-06-15 Thread Alex Bennée
This is useful for querying if an image is too old. Signed-off-by: Alex Bennée --- tests/docker/docker.py | 49 -- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 3666197a16..ad0c47921a

[Qemu-devel] [PATCH v7 38/54] tests/tcg: enable building for sparc64

2018-06-15 Thread Alex Bennée
As before, using Debian SID compilers. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v5 - add Makefile with EXTRA_RUNS for mmap tests --- tests/docker/Makefile.include| 1 + tests/docker/dockerfiles/debian-sparc

[Qemu-devel] [PATCH v7 27/54] tests/tcg: move MIPS specific tests into subdir

2018-06-15 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 v7 36/54] tests/tcg: enable building for m68k

2018-06-15 Thread Alex Bennée
As before, using Debian SID compilers. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v5 - add EXTRA_RUNS for mmap tests --- tests/docker/Makefile.include | 1 + tests/docker/dockerfiles/debian-m68k-cross.docker | 12

[Qemu-devel] [PATCH v7 50/54] docker: docker.py add check sub-command

2018-06-15 Thread Alex Bennée
This command allows you to check if we need to re-build a docker image. If the image isn't in the repository or the checksums don't match then we return false and some text (for processing in makefiles). Signed-off-by: Alex Bennée --- - fix prints to be "modern" - PEP8 fixes --- tests/docke

[Qemu-devel] [PATCH v7 46/54] tests/tcg: add run, diff, and skip helper macros

2018-06-15 Thread Alex Bennée
As we aren't using the default runners for all the test cases it is easy to miss out things like timeouts. To help with this we add some helpers and use them so we only need to make core changes in one place. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Math

[Qemu-devel] [PATCH v7 13/54] tests/tcg/multiarch: move most output to stdout

2018-06-15 Thread Alex Bennée
The default test run outputs to stdout so it can be re-directed. Errors are still reported to stderr. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- v4 - remove space in fprintf () to keep checkpatch happy

[Qemu-devel] [PATCH v7 44/54] Makefile.target: add (clean-/build-)guest-tests targets

2018-06-15 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 v7 34/54] tests/tcg/alpha: add Alpha specific tests

2018-06-15 Thread Alex Bennée
These tests did use their own crt.o stub however that is a little stone age so we drop crt.S and just statically link to the cross compilers libraries. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v4 - dro

[Qemu-devel] [PATCH v7 18/54] tests/tcg/i386: add runner for test-i386-fprem

2018-06-15 Thread Alex Bennée
The runner needs to compare against a reference run. We also only run this test when SPEED=slow as it takes a while. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v5 - include test-i386-fprem.ref v5.1 - remove the 69Mb test-i386-fprem.r

[Qemu-devel] [PATCH v7 24/54] tests/tcg/arm: fix up test-arm-iwmmxt test

2018-06-15 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 [rth: force fpu configuration] Signed-off-by: Richard Henderson Reviewed-by: Phil

[Qemu-devel] [PATCH v7 14/54] tests/tcg: move i386 specific tests into subdir

2018-06-15 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é Reviewed-by: Richard H

[Qemu-devel] [PATCH v7 45/54] tests/Makefile.include: add [build|clean|check]-tcg targets

2018-06-15 Thread Alex Bennée
This will ensure all linux-user targets build their guest test programs and ensure check-tcg will run the respective tests. 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 TA

[Qemu-devel] [PATCH v7 35/54] tests/tcg: enable building for HPPA

2018-06-15 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v5 - add EXTRA_RUNS for mmap tests --- tests/docker/Makefile.include | 1 + tests/docker/dockerfiles/debian-hppa-cross.docker | 12 tests/tcg/hppa/Makefile.i

[Qemu-devel] [PATCH v7 32/54] tests/tcg: enable building for ppc64

2018-06-15 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 v7 47/54] tests/tcg: override runners for broken tests

2018-06-15 Thread Alex Bennée
To get a clean run of check-tcg these tests are currently skipped: - hello-mips for mips - linux-test for sparc Signed-off-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé --- v4 - document broken tests in commit - temporarily demote fcvt while fixe

[Qemu-devel] [PATCH v7 51/54] tests/Makefile: call sub-makes with SKIP_DOCKER_BUILD=1

2018-06-15 Thread Alex Bennée
As we now ensure all the images we are going to use are built in the top level make file lets not over complicate things by running the full script again. We do run the check script just in case someone deletes the docker image while we are running. Signed-off-by: Alex Bennée --- tests/Makefile.

[Qemu-devel] [PATCH v7 17/54] tests/tcg/i386: fix test-i386

2018-06-15 Thread Alex Bennée
We don't include anything from qemu itself for the build. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- v4 - reword commit message to be more accurate --- tests/tcg/i386/test-i38

[Qemu-devel] [PATCH v7 25/54] tests/tcg: enable building for AArch64

2018-06-15 Thread Alex Bennée
We only have compilers for the (default) little endian variants. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v4 - update MAINTAINERS --- MAINTAINERS| 1 + tests/tcg/aarch64/Makefi

[Qemu-devel] [PATCH v7 29/54] tests/docker/Makefile.include: fix mipsel-cross dependancy

2018-06-15 Thread Alex Bennée
This got broken in commit 4319db7 but generally only shows up when you try and do massive parallel builds on fresh machines. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.incl

[Qemu-devel] [PATCH v7 33/54] tests/tcg: enable building for Alpha

2018-06-15 Thread Alex Bennée
We can't use our normal Debian based compilers as Alpha isn't an officially supported architecture. However it is available as a port and fortunately cross compilers for all these targets are included in Debian Sid, the perpetual rolling/unstable/testing version of Debian. Signed-off-by: Alex Benn

[Qemu-devel] [PATCH v7 41/54] docker: move debian-powerpc-cross to sid based build

2018-06-15 Thread Alex Bennée
The original Jessie based cross builder hasn't worked for a while. The state of the libraries is still perilous for cross-building QEMU but we can use it for building TCG tests. The debian-apt-fake.sh script can also be dropped as it is no longer used. Signed-off-by: Alex Bennée Reviewed-by: Phi

[Qemu-devel] [PATCH v7 16/54] tests/tcg/i386: Build fix for hello-i386

2018-06-15 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 Reviewed-by: Richard Henderson --- tests/tcg/i386/hello-i386.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tcg/i386/hello-i386.c b/t

[Qemu-devel] [PATCH v7 40/54] tests/tcg: enable building for RISCV64

2018-06-15 Thread Alex Bennée
As before, using Debian SID compilers. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include| 1 + tests/docker/dockerfiles/debian-riscv64-cross.docker | 12 tests/tcg/riscv/Makef

[Qemu-devel] [PATCH v7 37/54] tests/tcg: enable building for sh4

2018-06-15 Thread Alex Bennée
As before, using Debian SID compilers. While the compiler can be coerced into generating big-endian code it seems the linker can't deal with it so we only enable the building for little endian SH4. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé

[Qemu-devel] [PATCH v7 54/54] .travis.yml: add check-tcg test

2018-06-15 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v7 - explicit build-tcg-prereqs --- .travis.yml | 8 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index fabfe9ec34..ad352c5784 100644 --- a/.travis.yml +++

[Qemu-devel] [PATCH v7 42/54] tests/tcg: enable building for PowerPC

2018-06-15 Thread Alex Bennée
Now we have restored debian-image-powerpc-cross using Debian SID compilers we can build for 32 bit powerpc. Although PPC32 supports a range of pages sizes currently only 4k works so the others are commented out for now. We can also merge the ppc64 support under the base architecture directory to a

[Qemu-devel] [PATCH v7 28/54] tests/tcg: enable building for MIPS

2018-06-15 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 Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/tcg/mips

[Qemu-devel] [PATCH v7 30/54] tests/tcg/mips: include common mips hello-mips

2018-06-15 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- 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/

[Qemu-devel] [PATCH v7 19/54] tests/tcg/x86_64: add Makefile.target

2018-06-15 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 and those that can't be built for 32 bit. Signed-off-by: Alex Bennée Reviewed-by: Philippe

[Qemu-devel] [PATCH v7 22/54] tests/tcg: move ARM specific tests into subdir

2018-06-15 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é Reviewed-by: Richard Henderson --- v2 - do VPATH manipulation in tests/tcg/arm/Makefile.target - merge with fix hello-arm

[Qemu-devel] [PATCH v7 49/54] docker: docker.py don't conflate checksums for extra_files

2018-06-15 Thread Alex Bennée
This just gets confusing especially as the helper function doesn't even take into account any extra files (or the executable). Currently the actual check just ignores them and also passes the result through _dockerfile_preprocess so we fix that too. Signed-off-by: Alex Bennée --- tests/docker/do

[Qemu-devel] [PATCH v7 21/54] tests/tcg/i386/test-i386: fix printf format

2018-06-15 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- 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/t

[Qemu-devel] [PATCH v7 39/54] tests/tcg: enable building for mips64

2018-06-15 Thread Alex Bennée
As before, using Debian SID compilers. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/docker/Makefile.include | 1 + tests/docker/dockerfiles/debian-mips64-cross.docker | 12 tests/tcg/mips/Makefile

[Qemu-devel] [PATCH v7 12/54] tests/tcg/multiarch: don't hard code paths/ports for linux-test

2018-06-15 Thread Alex Bennée
The fixed path and ports get in the way of running our tests and builds in parallel. Instead of using TESTPATH we use mkdtemp() and instead of a fixed port we allow the kernel to assign one and query it afterwards. Signed-off-by: Alex Bennée --- tests/tcg/multiarch/linux-test.c | 37

[Qemu-devel] [PATCH v7 20/54] tests/tcg/i386/test-i386: use modern vector_size attributes

2018-06-15 Thread Alex Bennée
The compiler complains about the old __mode__ style attributes. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/tcg/i386/test-i386.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH v7 01/54] configure: add support for --cross-cc-FOO

2018-06-15 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 v7 10/54] tests/tcg/multiarch: Build fix for linux-test

2018-06-15 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 Revi

[Qemu-devel] [PATCH v7 48/54] tests: add top-level make dependency for docker builds

2018-06-15 Thread Alex Bennée
One problem with satisfying your docker dependencies in a sub-make it you might end up trying to satisfy the dependency multiple times. This is especially a problem with debian-sid based cross compilers and CI setups. We solve this by doing a docker build pass at the top level before any sub-makes

[Qemu-devel] [PATCH v7 02/54] configure: move i386_cc to cross_cc_i386

2018-06-15 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é Reviewed-by: Richard Henderson --- v2 - drop using system x86_64 compiler for i386 compiles v3 - fix cross_cc_i386 when on i386 v4 - fix merge conflicts - sort cross_cc

[Qemu-devel] [PATCH v7 11/54] tests/tcg/multiarch: enable additional linux-test tests

2018-06-15 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. I've also fixed up the clone thread flags as QEMU will only allow a clone to use flags which match glibc. However the test is still

[Qemu-devel] [PATCH v7 31/54] tests/tcg: enable building for s390x

2018-06-15 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é Reviewed-by: David Hildenbrand --- tests/tcg/s390x/Makefile.include | 2 ++ 1 fil

[Qemu-devel] [PULL v2 16/19] cputlb: remove tb_lock from tlb_flush functions

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" The acquisition of tb_lock was added when the async tlb_flush was introduced in e3b9ca810 ("cputlb: introduce tlb_flush_* async work.") tb_lock was there to allow us to do memset() on the tb_jmp_cache's. However, since f3ced3c5928 ("tcg: consistently access cpu->tb_jmp_cac

Re: [Qemu-devel] [PATCH v2 0/2] kvm: x86 CPU power management

2018-06-15 Thread Marcelo Tosatti
On Thu, Jun 14, 2018 at 02:37:28AM +0300, Michael S. Tsirkin wrote: > On Wed, Jun 13, 2018 at 07:34:53PM -0300, Marcelo Tosatti wrote: > > On Tue, Jun 12, 2018 at 09:47:11PM +0300, Michael S. Tsirkin wrote: > > > This adds ability to expose host CPU power management capabilities to > > > guests. Fo

[Qemu-devel] [PATCH v7 05/54] docker: Add "cc" subcommand

2018-06-15 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 v7 53/54] tests/docker/Makefile.include: only force SID to NOCACHE if old

2018-06-15 Thread Alex Bennée
Now we can check the age of a docker image we can be a little more intelligent about re-building Sid images and only force NOCACHE if it is "old". Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/docker/Makefile.include

[Qemu-devel] [PULL v2 12/19] translate-all: add page_locked assertions

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" This is only compiled under CONFIG_DEBUG_TCG to avoid bloating the binary. In user-mode, assert_page_locked is equivalent to assert_mmap_lock. Note: There are some tb_lock assertions left that will be removed by later patches. Reviewed-by: Richard Henderson Suggested-by

[Qemu-devel] [PATCH v7 09/54] tests/tcg: move architecture independent tests into subdir

2018-06-15 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 Reviewed-by: Ri

[Qemu-devel] [PATCH v7 04/54] configure: set cross_cc_FOO for host compiler

2018-06-15 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 Reviewed-by: Richard Henderson --- configure | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/configure b/configure index b96017b423..069219e9ae 100755 --

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

2018-06-15 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 v7 15/54] tests/tcg: enable building for i386

2018-06-15 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 Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PULL v2 11/19] translate-all: use per-page locking in !user-mode

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" Groundwork for supporting parallel TCG generation. Instead of using a global lock (tb_lock) to protect changes to pages, use fine-grained, per-page locks in !user-mode. User-mode stays with mmap_lock. Sometimes changes need to happen atomically on more than one page (e.g.

[Qemu-devel] [PATCH v7 03/54] configure: allow user to specify --cross-cc-cflags-foo=

2018-06-15 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 Reviewed-by: Richard Henderson --- v3 - fix up the cross-cc v4 - add --help text - sort cross_cc_foo lines --- configure | 10

[Qemu-devel] [PATCH v7 08/54] docker: Makefile.include introduce DOCKER_SCRIPT

2018-06-15 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] [PULL v2 10/19] translate-all: move tb_invalidate_phys_page_range up in the file

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" This greatly simplifies next commit's diff. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 77 --- 1 file changed, 39 insertions

[Qemu-devel] [PATCH v7 23/54] tests/tcg: enable building for ARM

2018-06-15 Thread Alex Bennée
This allows us to use the docker cross compiler image to build these tests. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- v5 - add EXTRA_RUNS for mmap tests --- tests/tcg/arm/Makefile.include | 8 tests/tcg/arm/Makefile.target

[Qemu-devel] [PATCH v7 06/54] docker: extend "cc" command to accept compiler

2018-06-15 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 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Fam Zheng --- v2 - use arg.cc default to simplify logic --- tests/docker/docker.py | 4 +++- 1 file changed, 3 insertions

[Qemu-devel] [PULL v2 09/19] translate-all: work page-by-page in tb_invalidate_phys_range_1

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" So that we pass a same-page range to tb_invalidate_phys_page_range, instead of always passing an end address that could be on a different page. As discussed with Peter Maydell on the list [1], tb_invalidate_phys_page_range doesn't actually do much with 'end', which explain

[Qemu-devel] [PATCH v7 07/54] docker: allow "cc" command to run in user context

2018-06-15 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 663dfcba4b..c83fd89985 100755 --- a/t

[Qemu-devel] [PULL v2 19/19] tcg: Reduce max TB opcode count

2018-06-15 Thread Richard Henderson
Also, assert that we don't overflow any of two different offsets into the TB. Both unwind and goto_tb both record a uint16_t for later use. This fixes an arm-softmmu test case utilizing NEON in which there is a TB generated that runs to 7800 opcodes, and compiles to 96k on an x86_64 host. This ov

[Qemu-devel] [PULL v2 18/19] tcg: remove tb_lock

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" Use mmap_lock in user-mode to protect TCG state and the page descriptors. In !user-mode, each vCPU has its own TCG state, so no locks needed. Per-page locks are used to protect the page descriptors. Per-TB locks are used in both modes to protect TB jumps. Some notes: - t

[Qemu-devel] [PATCH v7 00/54] fix building of tests/tcg - last chance to review!

2018-06-15 Thread Alex Bennée
Hi, Most of the work has been trying to get make check-tcg to work reliably under high -j's. This has led to a couple of fixes to actual tests (see tests/tcg/multiarch: don't hard code paths/ports for linux-test) and a lot of messing about with docker rules. After lots of attempts of encoding var

[Qemu-devel] [PULL v2 08/19] translate-all: remove hole in PageDesc

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" Groundwork for supporting parallel TCG generation. Move the hole to the end of the struct, so that a u32 field can be added there without bloating the struct. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard H

[Qemu-devel] [PULL v2 15/19] translate-all: protect TB jumps with a per-destination-TB lock

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" This applies to both user-mode and !user-mode emulation. Instead of relying on a global lock, protect the list of incoming jumps with tb->jmp_lock. This lock also protects tb->cflags, so update all tb->cflags readers outside tb->jmp_lock to use atomic reads via tb_cflags()

[Qemu-devel] [PULL v2 06/19] translate-all: iterate over TBs in a page with PAGE_FOR_EACH_TB

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" This commit does several things, but to avoid churn I merged them all into the same commit. To wit: - Use uintptr_t instead of TranslationBlock * for the list of TBs in a page. Just like we did in (c37e6d7e "tcg: Use uintptr_t type for jmp_list_{next|first} fields of T

[Qemu-devel] [PULL v2 13/19] translate-all: introduce assert_no_pages_locked

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" The appended adds assertions to make sure we do not longjmp with page locks held. Note that user-mode has nothing to check, since page_locks are !user-mode only. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/e

[Qemu-devel] [PULL v2 17/19] translate-all: remove tb_lock mention from cpu_restore_state_from_tb

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" tb_lock was needed when the function did retranslation. However, since fca8a500d519 ("tcg: Save insn data and use it in cpu_restore_state_from_tb") we don't do retranslation. Get rid of the comment. Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off

[Qemu-devel] [PULL v2 14/19] translate-all: discard TB when tb_link_page returns an existing matching TB

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" Use the recently-gained QHT feature of returning the matching TB if it already exists. This allows us to get rid of the lookup we perform right after acquiring tb_lock. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-o

[Qemu-devel] [PULL v2 05/19] tcg: move tb_ctx.tb_phys_invalidate_count to tcg_ctx

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" Thereby making it per-TCGContext. Once we remove tb_lock, this will avoid an atomic increment every time a TB is invalidated. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderson --- include/exec/tb-con

[Qemu-devel] [PULL v2 04/19] tcg: track TBs with per-region BST's

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" This paves the way for enabling scalable parallel generation of TCG code. Instead of tracking TBs with a single binary search tree (BST), use a BST for each TCG region, protecting it with a lock. This is as scalable as it gets, since each TCG thread operates on a separate

[Qemu-devel] [PULL v2 03/19] qht: return existing entry when qht_insert fails

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" The meaning of "existing" is now changed to "matches in hash and ht->cmp result". This is saner than just checking the pointer value. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: R

[Qemu-devel] [PULL v2 07/19] translate-all: make l1_map lockless

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" Groundwork for supporting parallel TCG generation. We never remove entries from the radix tree, so we can use cmpxchg to implement lockless insertions. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Signed-off-by: Richard Henderso

[Qemu-devel] [PULL v2 00/19] tcg queued patches

2018-06-15 Thread Richard Henderson
Since last: * fix clang build failure in patch 14, * include tb code gen overflow fix. r~ Emilio G. Cota (17): qht: require a default comparison function qht: return existing entry when qht_insert fails tcg: track TBs with per-region BST's tcg: move tb_ctx.tb_phys_invalidate_count t

[Qemu-devel] [PULL v2 02/19] qht: require a default comparison function

2018-06-15 Thread Richard Henderson
From: "Emilio G. Cota" qht_lookup now uses the default cmp function. qht_lookup_custom is defined to retain the old behaviour, that is a cmp function is explicitly provided. qht_insert will gain use of the default cmp in the next patch. Note that we move qht_lookup_custom's @func to be the last

[Qemu-devel] [PULL v2 01/19] tcg/i386: Use byte form of xgetbv instruction

2018-06-15 Thread Richard Henderson
From: John Arbuckle The assembler in most versions of Mac OS X is pretty old and does not support the xgetbv instruction. To go around this problem, the raw encoding of the instruction is used instead. Signed-off-by: John Arbuckle Message-Id: <20180604215102.11002-1-programmingk...@gmail.com>

[Qemu-devel] [PULL 5/7] scripts/qemu.py: introduce set_console() method

2018-06-15 Thread Eduardo Habkost
From: Cleber Rosa The set_console() method is intended to ease higher level use cases that require a console device. The amount of intelligence is limited on purpose, requiring either the device type explicitly, or the existence of a machine (pattern) definition. Because of the console device t

[Qemu-devel] [PULL 6/7] Acceptance tests: add Linux kernel boot and console checking test

2018-06-15 Thread Eduardo Habkost
From: Cleber Rosa This test boots a Linux kernel, and checks that the given command line was effective in two ways: * It makes the kernel use the set "console device" as a console * The kernel records the command line as expected in the console Given that way too many error conditions may occ

[Qemu-devel] [PULL 2/7] Add functional/acceptance tests infrastructure

2018-06-15 Thread Eduardo Habkost
From: Cleber Rosa This patch adds the very minimum infrastructure necessary for writing and running functional/acceptance tests, including: * Documentation * The avocado_qemu.Test base test class * One example tests (version.py) Additional functionality is expected to be added along the test

[Qemu-devel] [PULL 4/7] Acceptance tests: add quick VNC tests

2018-06-15 Thread Eduardo Habkost
From: Cleber Rosa This patch adds a few simple behavior tests for VNC. Signed-off-by: Cleber Rosa Reviewed-by: Stefan Hajnoczi Message-Id: <20180530184156.15634-4-cr...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Eduardo Habkost --- test

[Qemu-devel] [PULL 7/7] configure: Enable out-of-tree acceptance tests

2018-06-15 Thread Eduardo Habkost
From: Philippe Mathieu-Daudé Currently to run Avocado acceptance tests in an out-of-tree build directory, we need to use the full path to the test: build_dir$ avocado run /full/path/to/sources/qemu/tests/acceptance/boot_linux_console.py This patch adds a symlink in the build tree to simplify

[Qemu-devel] [PULL 1/7] Remove COPYING.PYTHON

2018-06-15 Thread Eduardo Habkost
The COPYING.PYTHON file was added when we added the compatibility argparse.py module, which was licensed under the Python Software Foundation License Version 2. Now the compatibility argparse.py module was removed, and we are not carrying any code under that license anymore. Remove COPYING.PYTHON

[Qemu-devel] [PULL 3/7] scripts/qemu.py: allow adding to the list of extra arguments

2018-06-15 Thread Eduardo Habkost
From: Cleber Rosa Tests will often need to add extra arguments to QEMU command line arguments. Signed-off-by: Cleber Rosa Reviewed-by: Stefan Hajnoczi Message-Id: <20180530184156.15634-3-cr...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Ed

[Qemu-devel] [PULL 0/7] Python queue, 2018-06-15

2018-06-15 Thread Eduardo Habkost
The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2: Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100) are available in the Git repository at: git://github.com/ehabkost/qemu.git tags/python-next-pul

Re: [Qemu-devel] [PATCH] docs: add guidance on configuring CPU models for x86

2018-06-15 Thread Eduardo Habkost
On Fri, Jun 15, 2018 at 03:16:09PM +0100, Daniel P. Berrangé wrote: > With the recent set of CPU hardware vulnerabilities on x86, it is > increasingly difficult to understand which CPU configurations are > good to use and what flaws they might be vulnerable to. > > This doc attempts to help manage

Re: [Qemu-devel] Abandon our QMP first policy? (was: [PATCH v3 5/7] hmp: Add info commands for preconfig)

2018-06-15 Thread Eduardo Habkost
On Fri, Jun 15, 2018 at 06:10:48PM +0200, Markus Armbruster wrote: > "Dr. David Alan Gilbert" writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> Gerd Hoffmann writes: > >> > >> > Hi, > >> > > >> >> > Now let's review the three commands: > >> >> > > >> >> > * Gerd, why does "in

Re: [Qemu-devel] bug in reopen arch

2018-06-15 Thread Vladimir Sementsov-Ogievskiy
14.06.2018 13:46, Kevin Wolf wrote: Am 12.06.2018 um 20:57 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi all! I've faced the following problem:     1. create image with dirty bitmap, a.qcow2 (start qemu and run qmp     command block-dirty-bitmap-add)     2. run the following commands:

  1   2   3   4   5   >