Re: [Qemu-devel] [Qemu-stable] [ANNOUNCE] QEMU 2.6.1 Stable released

2016-08-24 Thread Peter Lieven
Am 17.08.2016 um 21:30 schrieb Michael Roth: Hi everyone, I am pleased to announce that the QEMU v2.6.1 stable release is now available: http://wiki.qemu.org/download/qemu-2.6.1.tar.bz2 v2.6.1 is now tagged in the official qemu.git repository, and the stable-2.6 branch has been updated acco

Re: [Qemu-devel] [PATCH 0/7] Improve buffer_is_zero

2016-08-24 Thread Vijay Kilari
Hi Richard, Migration fails on arm64 with these patches. On the destination VM, follow errors are appearing. qemu-system-aarch64: VQ 0 size 0x400 Guest index 0x0 inconsistent with Host index 0x1937: delta 0xe6c9 qemu-system-aarch64: error while loading state for instance 0x0 of device 'virtio-m

Re: [Qemu-devel] 答复: Re: [PATCH] chardev: Add 'help' option to print all available chardev backend types

2016-08-24 Thread Lin Ma
>>> Markus Armbruster 2016/8/17 星期三 下午 2:52 >>> >"Lin Ma" writes: > > Marc-André Lureau 8/17/2016 1:25 上午 >>> >[...] >>>How different is it from the list in qemu -help ? Why duplicate that list >>>with less informations (arguments and details) ? Do you expect it to be >>>easily machine rea

Re: [Qemu-devel] ppc: regression in 2.7.0-rc3 on rfi/rfid/hrfi instructions

2016-08-24 Thread Benjamin Herrenschmidt
On Thu, 2016-08-25 at 11:31 +1000, Benjamin Herrenschmidt wrote: >  > Interesting, the problem is only with 603, not 604. I think I might > have broken something with the 603 SW TLB loading stuff which is > a bit weird, I'll have a look. Thanks. This fixes it to some extent... It gets to "press en

Re: [Qemu-devel] ppc: regression in 2.7.0-rc3 on rfi/rfid/hrfi instructions

2016-08-24 Thread Benjamin Herrenschmidt
On Thu, 2016-08-25 at 11:31 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2016-08-24 at 20:39 +0200, Hervé Poussineau wrote: > > > > Hi, > > > > Following patch regresses Linux boot on PReP machine: > > > > commit a2e71b28e832346409efc795ecd1f0a2bcb705a3 > > Author: Benjamin Herrenschmidt > >

Re: [Qemu-devel] [PATCH V12 00/10] Introduce COLO-compare and filter-rewriter

2016-08-24 Thread Jason Wang
On 2016年08月25日 11:44, Zhang Chen wrote: Hi~~ Jason. If you have time, can you give me some feedback for this series? Thanks Zhang Chen Yes, a little busy this week, will do it next week. Thanks On 08/17/2016 04:10 PM, Zhang Chen wrote: COLO-compare is a part of COLO project. It is u

[Qemu-devel] [PATCH v7 3/4] vfio iommu: Add support for mediated devices

2016-08-24 Thread Kirti Wankhede
VFIO IOMMU drivers are designed for the devices which are IOMMU capable. Mediated device only uses IOMMU APIs, the underlying hardware can be managed by an IOMMU domain. Aim of this change is: - To use most of the code of TYPE1 IOMMU driver for mediated devices - To support direct assigned device

[Qemu-devel] [PATCH v7 4/4] docs: Add Documentation for Mediated devices

2016-08-24 Thread Kirti Wankhede
Add file Documentation/vfio-mediated-device.txt that include details of mediated device framework. Signed-off-by: Kirti Wankhede Signed-off-by: Neo Jia Change-Id: I137dd646442936090d92008b115908b7b2c7bc5d Reviewed-on: http://git-master/r/1182512 Reviewed-by: Automatic_Commit_Validation_User ---

[Qemu-devel] [PATCH v7 2/4] vfio: VFIO driver for mediated devices

2016-08-24 Thread Kirti Wankhede
VFIO MDEV driver registers with MDEV core driver. MDEV core driver creates mediated device and calls probe routine of MPCI VFIO driver. This driver adds mediated device to VFIO core module. Main aim of this module is to manage all VFIO APIs for each mediated device. Those are: - get VFIO device inf

[Qemu-devel] [PATCH v7 1/4] vfio: Mediated device Core driver

2016-08-24 Thread Kirti Wankhede
Design for Mediated Device Driver: Main purpose of this driver is to provide a common interface for mediated device management that can be used by different drivers of different devices. This module provides a generic interface to create the device, add it to mediated bus, add device to IOMMU grou

[Qemu-devel] [PATCH v7 0/4] Add Mediated device support

2016-08-24 Thread Kirti Wankhede
This series adds Mediated device support to Linux host kernel. Purpose of this series is to provide a common interface for mediated device management that can be used by different devices. This series introduces Mdev core module that create and manage mediated devices, VFIO based driver for mediate

Re: [Qemu-devel] [PATCH V12 00/10] Introduce COLO-compare and filter-rewriter

2016-08-24 Thread Zhang Chen
Hi~~ Jason. If you have time, can you give me some feedback for this series? Thanks Zhang Chen On 08/17/2016 04:10 PM, Zhang Chen wrote: COLO-compare is a part of COLO project. It is used to compare the network package to help COLO decide whether to do checkpoint. Filter-rewriter is a part

[Qemu-devel] [Bug 1616706] [NEW] watchdog doesn't bring down the VM

2016-08-24 Thread Amit Chandak
Public bug reported: Qemu-kvm version : QEMU emulator version 1.5.3 (qemu-kvm-1.5.3-105.el7), Copyright (c) 2003-2008 Fabrice Billard Qemu version: Virsh command line tool of libvirt 1.2.17 I have the VM stuck in bios (efi shell), but i don't see the watchdog in the host bringing it down? Coupl

Re: [Qemu-devel] A question about this commit 9894dc0cdcc397ee5b26370bc53da6d360a363c2

2016-08-24 Thread Daniel P. Berrange
On Tue, Aug 23, 2016 at 08:57:44AM +, Gaohaifeng (A) wrote: > Hi Daniel & Paolo, > > Commit 9894dc0c "char: convert from GIOChannel to QIOChannel", about > > the below code segment: > > -static gboolean tcp_chr_read(GIOChannel *chan, GIOCondition cond, void > *opaque) > +static gboolean tcp

Re: [Qemu-devel] ppc: regression in 2.7.0-rc3 on rfi/rfid/hrfi instructions

2016-08-24 Thread Benjamin Herrenschmidt
On Wed, 2016-08-24 at 20:39 +0200, Hervé Poussineau wrote: > Hi, > > Following patch regresses Linux boot on PReP machine: > > commit a2e71b28e832346409efc795ecd1f0a2bcb705a3 > Author: Benjamin Herrenschmidt > Date:   Tue Jun 21 23:48:46 2016 +0200 > >  ppc: Fix rfi/rfid/hrfi/... emulation

Re: [Qemu-devel] transient failure in the test-qht tests

2016-08-24 Thread Peter Maydell
On 25 August 2016 at 00:44, Emilio G. Cota wrote: > On Wed, Aug 24, 2016 at 21:39:01 +0100, Peter Maydell wrote: >> So I encountered this test failure running 'make check' on >> 32-bit ARM: >> >> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM % 255 + 1))} gtester -k >> --verbose -m=quick tests/test-

Re: [Qemu-devel] transient failure in the test-qht tests

2016-08-24 Thread Emilio G. Cota
On Wed, Aug 24, 2016 at 21:39:01 +0100, Peter Maydell wrote: > So I encountered this test failure running 'make check' on > 32-bit ARM: > > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM % 255 + 1))} gtester -k > --verbose -m=quick tests/test-qht > TEST: tests/test-qht... (pid=15763) > /qht/mode/d

Re: [Qemu-devel] [PATCH v6 4/4] docs: Add Documentation for Mediated devices

2016-08-24 Thread Daniel P. Berrange
On Thu, Aug 04, 2016 at 12:33:54AM +0530, Kirti Wankhede wrote: > diff --git a/Documentation/vfio-mediated-device.txt > b/Documentation/vfio-mediated-device.txt > new file mode 100644 > index ..029152670141 > --- /dev/null > +++ b/Documentation/vfio-mediated-device.txt > @@ -0,0 +1,235

Re: [Qemu-devel] [RFC] libvirt vGPU QEMU integration

2016-08-24 Thread Daniel P. Berrange
On Thu, Aug 18, 2016 at 09:41:59AM -0700, Neo Jia wrote: > Hi libvirt experts, > > I am starting this email thread to discuss the potential solution / proposal > of > integrating vGPU support into libvirt for QEMU. > > Some quick background, NVIDIA is implementing a VFIO based mediated device >

[Qemu-devel] [PATCH 5/8] linux-user: add stop-the-world to be called from CPU loop

2016-08-24 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- cpu-exec.c | 1 + include/exec/exec-all.h | 5 +++ linux-user/main.c | 89 + linux-user/syscall.c| 1 + 4 files changed, 96 insertions(+) diff --git a/cpu-exec.c b/cpu-exec.c index 63d739a

Re: [Qemu-devel] ppc: regression in 2.7.0-rc3 on rfi/rfid/hrfi instructions

2016-08-24 Thread Benjamin Herrenschmidt
On Wed, 2016-08-24 at 20:39 +0200, Hervé Poussineau wrote: > Hi, > > Following patch regresses Linux boot on PReP machine: Where do I find the source for that kernel ? Cheers, Ben. > commit a2e71b28e832346409efc795ecd1f0a2bcb705a3 > Author: Benjamin Herrenschmidt > Date:   Tue Jun 21 23:48:46

[Qemu-devel] [PATCH 2/8] cpu-exec: remove tb_lock from hot path

2016-08-24 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- cpu-exec.c | 38 +++--- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 041f8b7..63d739a 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -309,34 +309,18 @@ static TranslationBlock *tb_find_

[Qemu-devel] [PATCH 8/8] target-arm/a64: use HTM with stop-the-world fall-back path

2016-08-24 Thread Emilio G. Cota
TODO: convert paired atomics as well. Signed-off-by: Emilio G. Cota --- cpu-exec.c | 4 target-arm/helper-a64.c| 31 +++ target-arm/helper-a64.h| 4 target-arm/op_helper.c | 4 target-arm/translate-a64.c | 16 ++---

[Qemu-devel] [PATCH 4/8] target-arm: helper fixup for paired atomics

2016-08-24 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- target-arm/helper-a64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c index 8ce518b..6f3fd17 100644 --- a/target-arm/helper-a64.c +++ b/target-arm/helper-a64.c @@ -453,7 +453,7 @@ uint64_

[Qemu-devel] [PATCH 1/8] cpu list: convert to RCU QLIST

2016-08-24 Thread Emilio G. Cota
This avoids the chance of reading a corrupted list of CPUs in usermode. Note: this breaks hw/ppc/spapr due to the removal of CPU_FOREACH_REVERSE. Signed-off-by: Emilio G. Cota --- cpus.c | 2 +- exec.c | 18 +++--- include/qom/cpu.h| 16 +++--

[Qemu-devel] [PATCH 7/8] htm: add powerpc64 intrinsics

2016-08-24 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/qemu/htm.h | 39 +++ 1 file changed, 39 insertions(+) diff --git a/include/qemu/htm.h b/include/qemu/htm.h index dc84bc1..f367ee4 100644 --- a/include/qemu/htm.h +++ b/include/qemu/htm.h @@ -39,5 +39,44 @@ static inlin

[Qemu-devel] [PATCH 6/8] htm: add header to abstract Hardware Transactional Memory intrinsics

2016-08-24 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/qemu/htm.h | 43 +++ 1 file changed, 43 insertions(+) create mode 100644 include/qemu/htm.h diff --git a/include/qemu/htm.h b/include/qemu/htm.h new file mode 100644 index 000..dc84bc1 --- /dev/null +++ b/incl

[Qemu-devel] [PATCH 3/8] rcu: add rcu_read_lock_held()

2016-08-24 Thread Emilio G. Cota
Signed-off-by: Emilio G. Cota --- include/qemu/rcu.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h index 83ae280..0f6e467 100644 --- a/include/qemu/rcu.h +++ b/include/qemu/rcu.h @@ -98,6 +98,13 @@ static inline void rcu_read_unlock(void)

Re: [Qemu-devel] [PATCH 2/3] qemu: Implement virtio-pstore device

2016-08-24 Thread Daniel P. Berrange
> diff --git a/hw/virtio/virtio-pstore.c b/hw/virtio/virtio-pstore.c > new file mode 100644 > index 000..b8fb4be > --- /dev/null > +++ b/hw/virtio/virtio-pstore.c > @@ -0,0 +1,699 @@ > +/* > + * Virtio Pstore Device > + * > + * Copyright (C) 2016 LG Electronics > + * > + * Authors: > + * Nam

Re: [Qemu-devel] ppc: regression in 2.7.0-rc3 on rfi/rfid/hrfi instructions

2016-08-24 Thread Mark Cave-Ayland
On 24/08/16 19:39, Hervé Poussineau wrote: > Hi, > > Following patch regresses Linux boot on PReP machine: > > commit a2e71b28e832346409efc795ecd1f0a2bcb705a3 > Author: Benjamin Herrenschmidt > Date: Tue Jun 21 23:48:46 2016 +0200 > > ppc: Fix rfi/rfid/hrfi/... emulation > > This re

Re: [Qemu-devel] [PATCH] aarch64: use TSX for ldrex/strex

2016-08-24 Thread Emilio G. Cota
On Thu, Aug 18, 2016 at 08:38:47 -0700, Richard Henderson wrote: > A couple of other notes, as I've thought about this some more. Thanks for spending time on this. I have a new patchset (will send as a reply to this e-mail in a few minutes) that has good performance. Its main ideas: - Use transa

Re: [Qemu-devel] [Patch v3 01/30] qmp: details about CPU definitions in query-cpu-definitions

2016-08-24 Thread David Hildenbrand
> On 08/24/2016 01:10 PM, David Hildenbrand wrote: > > It might be of interest for tooling whether a CPU definition can be safely > > used when migrating, or if e.g. CPU features might get lost during > > migration when migrationg from/to a different QEMU version or host, even if > > the same compa

Re: [Qemu-devel] [Patch v3 01/30] qmp: details about CPU definitions in query-cpu-definitions

2016-08-24 Thread Eric Blake
On 08/24/2016 01:10 PM, David Hildenbrand wrote: > It might be of interest for tooling whether a CPU definition can be safely > used when migrating, or if e.g. CPU features might get lost during > migration when migrationg from/to a different QEMU version or host, even if > the same compatibility m

[Qemu-devel] [PATCH 3/3] atomics: Remove redundant barrier()'s

2016-08-24 Thread Pranith Kumar
Remove the redundant barrier() after the fence as agreed in previous discussion here: https://lists.gnu.org/archive/html/qemu-devel/2016-04/msg00489.html Signed-off-by: Pranith Kumar --- include/qemu/atomic.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/qem

[Qemu-devel] [PATCH 2/3] atomics: Use __atomic_*_n() variant primitives

2016-08-24 Thread Pranith Kumar
Use the __atomic_*_n() primitives which take the value as argument. It is not necessary to store the value locally before calling the primitive, hence saving us a stack store and load. Signed-off-by: Pranith Kumar --- include/qemu/atomic.h | 16 +--- 1 file changed, 5 insertions(+),

[Qemu-devel] [PATCH 1/3] atomics: Test __STDC_VERSION__ for C11 compat

2016-08-24 Thread Pranith Kumar
This patch tries to do the Right Thing™ to test for C11 features, which is to test __STDC_VERSION__. Signed-off-by: Pranith Kumar --- include/qemu/atomic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h index 43b0645..d313e

Re: [Qemu-devel] Patch to add support for building in MSYS2 on Windows

2016-08-24 Thread Peter Maydell
On 24 August 2016 at 20:58, Stefan Weil wrote: > Maybe you could start with documenting the MSYS2 based build process on > http://wiki.qemu.org/Hosts/W32 and refer to a QEMU git clone which includes > the necessary modifications. > > More feedback also from other contributors whether MSYS2 support

[Qemu-devel] transient failure in the test-qht tests

2016-08-24 Thread Peter Maydell
So I encountered this test failure running 'make check' on 32-bit ARM: MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM % 255 + 1))} gtester -k --verbose -m=quick tests/test-qht TEST: tests/test-qht... (pid=15763) /qht/mode/default: OK /qht/mode/re

Re: [Qemu-devel] [PATCH v2 0/8] Improve buffer_is_zero

2016-08-24 Thread Richard Henderson
On 08/24/2016 12:18 PM, Eric Blake wrote: On 08/24/2016 12:48 PM, Richard Henderson wrote: Patches 1-4 remove the use of ifunc from the implementation. Patch 6 adjusts the x86 implementation a bit more to take advantage of ptest (in sse4.1) and unaligned accesses (in avx1). Do we really care

Re: [Qemu-devel] Patch to add support for building in MSYS2 on Windows

2016-08-24 Thread Stefan Weil
On 08/24/16 09:44, Evan Hunter wrote: Hi, I noticed that QEMU would not compile on Windows in the MSYS2 environment. Here is a patch that adds a check for it to the configure script and amended some ifdefs so it now builds. At the bottom of this email is a build script I made for building under

Re: [Qemu-devel] [Patch v3 27/30] qmp: add QMP interface "query-cpu-model-baseline"

2016-08-24 Thread Eduardo Habkost
On Wed, Aug 24, 2016 at 08:11:03PM +0200, David Hildenbrand wrote: > Let's provide a standardized interface to baseline two CPU models, to > create a third, compatible one. This is especially helpful when two > CPU models are not identical, but a CPU model is required that is > guaranteed to run un

Re: [Qemu-devel] [Patch v3 26/30] qmp: add QMP interface "query-cpu-model-comparison"

2016-08-24 Thread Eduardo Habkost
On Wed, Aug 24, 2016 at 08:11:02PM +0200, David Hildenbrand wrote: > Let's provide a standardized interface to compare two CPU models. > "query-cpu-model-compare" takes two models and returns how they compare > in a specific configuration. > > The result will give guarantees about runnability. E.

Re: [Qemu-devel] [Patch v3 25/30] qmp: add QMP interface "query-cpu-model-expansion"

2016-08-24 Thread Eduardo Habkost
On Wed, Aug 24, 2016 at 08:11:01PM +0200, David Hildenbrand wrote: > Let's provide a standardized interface to expand CPU models. This interface > can be used by tooling to get details about a specific CPU model in a > certain configuration, e.g. about the "host" model. > > To take care of all arc

Re: [Qemu-devel] [PATCH] 9pfs: disallow / in path components

2016-08-24 Thread Peter Maydell
On 24 August 2016 at 17:40, Greg Kurz wrote: > On Wed, 24 Aug 2016 16:00:24 +0100 > Peter Maydell wrote: >> Do we also need ".." and "." to be illegal names (for at least most >> operations)? > I understand how ".." could be an issue, but I don't for "."... can you > please elaborate ? If you t

Re: [Qemu-devel] [PATCH v2 0/8] Improve buffer_is_zero

2016-08-24 Thread Eric Blake
On 08/24/2016 12:48 PM, Richard Henderson wrote: > Patches 1-4 remove the use of ifunc from the implementation. > > Patch 6 adjusts the x86 implementation a bit more to take > advantage of ptest (in sse4.1) and unaligned accesses (in avx1). Do we really care about unaligned access? Or can we gua

Re: [Qemu-devel] [PULL 0/2] virtio: fixes

2016-08-24 Thread Peter Maydell
On 23 August 2016 at 17:34, Michael S. Tsirkin wrote: > The following changes since commit 60ac136102098a70b97ab0c07bc7bf53131c: > > target-arm: Fix warn about implicit conversion (2016-08-12 11:12:24 +0100) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/virt/

Re: [Qemu-devel] [PULL 2/2] e1000e: remove internal interrupt flag

2016-08-24 Thread Amit Shah
On (Tue) 23 Aug 2016 [23:12:21], Markus Armbruster wrote: > Amit Shah writes: > > > On (Mon) 22 Aug 2016 [16:09:27], Jason Wang wrote: > >> From: Cao jin > >> > >> Commit 66bf7d58 removed internal msi state flag E1000E_USE_MSI, > >> E1000E_USE_MSIX > >> is not necessary too, remove it now. And

[Qemu-devel] ppc: regression in 2.7.0-rc3 on rfi/rfid/hrfi instructions

2016-08-24 Thread Hervé Poussineau
Hi, Following patch regresses Linux boot on PReP machine: commit a2e71b28e832346409efc795ecd1f0a2bcb705a3 Author: Benjamin Herrenschmidt Date: Tue Jun 21 23:48:46 2016 +0200 ppc: Fix rfi/rfid/hrfi/... emulation This reworks emulation of the various "rfi" variants. I removed some

[Qemu-devel] [Patch v3 27/30] qmp: add QMP interface "query-cpu-model-baseline"

2016-08-24 Thread David Hildenbrand
Let's provide a standardized interface to baseline two CPU models, to create a third, compatible one. This is especially helpful when two CPU models are not identical, but a CPU model is required that is guaranteed to run under both configurations, where the original models run. "query-cpu-model-b

Re: [Qemu-devel] [Patch v3 00/30] s390x CPU models: exposing features

2016-08-24 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Message-id: 1472062266-53206-1-git-send-email-d...@linux.vnet.ibm.com Subject: [Qemu-devel] [Patch v3 00/30] s390x CPU models: exposing features Type: series === TEST SCRIPT BEGIN === #!/bin/bash BA

[Qemu-devel] [PATCH v2 5/7] docker: make sure debootstrap is at least 1.0.67

2016-08-24 Thread Sascha Silbe
debootstrap prior to 1.0.67 generated an empty sources.list during foreign bootstraps (Debian#732255 [1]). Fall back to the git checkout if the installed debootstrap version is too old. [1] https://bugs.debian.org/732255 Signed-off-by: Sascha Silbe --- Not sure if this used to work in even older

[Qemu-devel] [PATCH v2 2/7] docker: avoid dependency on 'realpath' package

2016-08-24 Thread Sascha Silbe
The 'realpath' executable is shipped in a separate package that isn't installed by default on some distros. We already use 'readlink -e' (provided by GNU coreutils) in some other part of the code, so let's settle for that instead. Signed-off-by: Sascha Silbe --- Too bad there isn't a POSIX equiv

[Qemu-devel] [PATCH v2 6/7] docker: build debootstrap after cloning

2016-08-24 Thread Sascha Silbe
When using the git version of debootstrap (because no usable version of debootstrap was installed on the host), we need to run 'make' so that devices.tar.gz gets built. Otherwise the first debootstrap stage will fail without printing any error message. Signed-off-by: Sascha Silbe --- tests/docke

[Qemu-devel] [Patch v3 17/30] s390x/sclp: propagate the mha via sclp

2016-08-24 Thread David Hildenbrand
The mha is provided in the CPU model, so get any CPU and extract the value. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 1 + include/hw/s390x/sclp.h | 3 ++- target-s390x/cpu_models.c | 14 ++ target-s390x/cpu_models.h | 1 + 4 files

[Qemu-devel] [PATCH v2 1/7] docker.py: don't hang on large docker output

2016-08-24 Thread Sascha Silbe
Unlike Popen.communicate(), subprocess.call() doesn't read from the stdout file descriptor. If the child process produces more output than fits into the pipe buffer, it will block indefinitely. If we don't intend to consume the output, just send it straight to /dev/null to avoid this issue. Signe

[Qemu-devel] [Patch v3 09/30] s390x/cpumodel: store the CPU model in the CPU instance

2016-08-24 Thread David Hildenbrand
A CPU model consists of a CPU definition, to which delta changes are applied - features added or removed (e.g. z13-base,vx=on). In addition, certain properties (e.g. cpu id) can later on change during migration but belong into the CPU model. This data will later be filled from the host model in the

Re: [Qemu-devel] [PATCH] 9pfs: disallow / in path components

2016-08-24 Thread Michael S. Tsirkin
On Wed, Aug 24, 2016 at 04:29:07PM +0200, Greg Kurz wrote: > At various places in 9pfs, full paths are created by concatenating a guest > originated string to the export path. A malicious guest could forge a > relative path and access files outside the export path. > > A tentative fix was sent rec

[Qemu-devel] [PATCH v2 4/7] docker: print warning if EXECUTABLE is not set when building debootstrap image

2016-08-24 Thread Sascha Silbe
Building the debian-debootstrap image will usually fail if EXECUTABLE isn't set (when using the Makefile). Warn the user in this case so they know why it's failing. Signed-off-by: Sascha Silbe --- tests/docker/Makefile.include | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/docker/M

[Qemu-devel] [PATCH v2 7/7] docker: silence debootstrap when --quiet is given

2016-08-24 Thread Sascha Silbe
If we silence docker when --quiet is given, we should also silence the .pre script (i.e. debootstrap). Only discards stdout, so some diagnostics (e.g. from git clone) are still printed. Most of the verbose output is gone however and this way we still have a chance to see error messages. Signed-of

[Qemu-devel] [Patch v3 08/30] s390x/cpumodel: register defined CPU models as subclasses

2016-08-24 Thread David Hildenbrand
This patch adds the CPU model definitions that are known on s390x - like z900, zBC12 or z13. For each definition, introduce two CPU models: 1. Base model (e.g. z13-base): Minimum feature set we expect to be around on all z13 systems. These models are migration-safe and will never change. 2.

[Qemu-devel] [PATCH v2 0/7] docker tests fixes

2016-08-24 Thread Sascha Silbe
A couple of fixes for issues encountered while trying out the new docker test support. As of v2 building the debian-debootstrap image now works on my laptop, too. Thanks for the docker test support, BTW. The centos6 test came in rather handy today for testing the glib < 2.30 compatibility code. v

[Qemu-devel] [Patch v3 10/30] s390x/cpumodel: expose features and feature groups as properties

2016-08-24 Thread David Hildenbrand
Let's add all features and feature groups as properties to all CPU models. If the "host" CPU model is unknown, we can neither query nor change features. KVM will just continue to work like it did until now. We will not allow to enable features that were not part of the original CPU model, because

[Qemu-devel] [Patch v3 03/30] s390x/cpumodel: expose CPU class properties

2016-08-24 Thread David Hildenbrand
Let's expose the description and migration safety and whether a definition is static, as class properties, this can be helpful in the future. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s390x/cpu.c| 1 + target-s390x/cpu.h| 1 + target-s390x/cpu_models.

[Qemu-devel] [PATCH v2 3/7] docker: debian-bootstrap.pre: print helpful message if DEB_ARCH/DEB_TYPE unset

2016-08-24 Thread Sascha Silbe
The debian-bootstrap image doesn't choose a default architecture and distribution version, instead the user has to set both DEB_ARCH and DEB_TYPE in the environment. Print a reasonably helpful message if either of them isn't set instead of complaining about "qemu-" being missing or erroring out bec

[Qemu-devel] [Patch v3 25/30] qmp: add QMP interface "query-cpu-model-expansion"

2016-08-24 Thread David Hildenbrand
Let's provide a standardized interface to expand CPU models. This interface can be used by tooling to get details about a specific CPU model in a certain configuration, e.g. about the "host" model. To take care of all architectures, two detail levels for an expansion are introduced. Certain archit

[Qemu-devel] [Patch v3 19/30] linux-headers: update against kvm/next

2016-08-24 Thread David Hildenbrand
Update against 29b4817d4018 ("Linux 4.8-rc1") Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- include/standard-headers/linux/input-event-codes.h | 32 + include/standard-headers/linux/input.h | 1 + include/standard-headers/linux/virtio_config.h | 1

[Qemu-devel] [Patch v3 16/30] s390x/sclp: propagate the ibc val(lowest and unblocked ibc)

2016-08-24 Thread David Hildenbrand
If we have a lowest ibc, we can indicate the ibc to the guest. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 2 ++ include/hw/s390x/sclp.h | 3 ++- target-s390x/cpu_models.c | 21 + target-s390x/cpu_models.h | 12 4

Re: [Qemu-devel] [PATCH] 9pfs: disallow / in path components

2016-08-24 Thread Michael S. Tsirkin
On Wed, Aug 24, 2016 at 06:41:45PM +0200, Greg Kurz wrote: > On Wed, 24 Aug 2016 18:46:10 +0300 > "Michael S. Tsirkin" wrote: > > > On Wed, Aug 24, 2016 at 04:00:24PM +0100, Peter Maydell wrote: > > > On 24 August 2016 at 15:29, Greg Kurz wrote: > > > > At various places in 9pfs, full paths ar

[Qemu-devel] [Patch v3 18/30] s390x/sclp: propagate hmfai

2016-08-24 Thread David Hildenbrand
hmfai is provided on CPU models >= z196. Let's propagate it properly. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 1 + include/hw/s390x/sclp.h | 3 ++- target-s390x/cpu_models.c | 14 ++ target-s390x/cpu_models.h | 1 + 4 files chang

[Qemu-devel] [Patch v3 13/30] s390x/sclp: factor out preparation of cpu entries

2016-08-24 Thread David Hildenbrand
Let's factor out the common code of "read cpu info" and "read scp info". This will make the introduction of new cpu entry fields easier. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) d

[Qemu-devel] [Patch v3 11/30] s390x/cpumodel: let the CPU model handle feature checks

2016-08-24 Thread David Hildenbrand
If we have certain features enabled, we have to migrate additional state (e.g. vector registers or runtime-instrumentation registers). Let the CPU model control that unless we have no "host" CPU model in the KVM case. This will later on be the case for compatibility machines, so migration from QEMU

[Qemu-devel] [Patch v3 26/30] qmp: add QMP interface "query-cpu-model-comparison"

2016-08-24 Thread David Hildenbrand
Let's provide a standardized interface to compare two CPU models. "query-cpu-model-compare" takes two models and returns how they compare in a specific configuration. The result will give guarantees about runnability. E.g. if a CPU model A is a subset of CPU model B, model A is guaranteed to run

[Qemu-devel] [Patch v3 28/30] s390x/cpumodel: implement QMP interface "query-cpu-model-expansion"

2016-08-24 Thread David Hildenbrand
In order to expand CPU models, we create temporary cpus that handle the feature/group parsing. Only CPU feature properties are expanded. When converting the data structure back, we always fall back to the static base CPU model, which is by definition migration-safe. Acked-by: Cornelia Huck Signe

[Qemu-devel] [Patch v3 12/30] s390x/cpumodel: check and apply the CPU model

2016-08-24 Thread David Hildenbrand
We have to test if a configured CPU model is runnable in the current configuration, and if not report why that is the case. This is done by comparing it to the maximum supported model (host for KVM or z900 for TCG). Also, we want to do some base sanity checking for a configured CPU model. We'll ca

[Qemu-devel] [Patch v3 21/30] s390x/kvm: implement CPU model support

2016-08-24 Thread David Hildenbrand
Let's implement our two hooks so we can support CPU models. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- target-s390x/cpu_models.c | 75 +++- target-s390x/cpu_models.h | 50 target-s390x/kvm.c| 295 ++ 3 file

[Qemu-devel] [Patch v3 30/30] s390x/cpumodel: implement QMP interface "query-cpu-model-baseline"

2016-08-24 Thread David Hildenbrand
Let's implement that interface by reusing our conversion code and lookup code for CPU definitions. In order to find a compatible CPU model, we first detect the maximum possible CPU generation and then try to find a maximum model, satisfying all base features (not exceeding the maximum generation).

[Qemu-devel] [Patch v3 29/30] s390x/cpumodel: implement QMP interface "query-cpu-model-comparison"

2016-08-24 Thread David Hildenbrand
Let's implement that interface by reusing our convertion code implemented for expansion. We use CPU generations and CPU features to calculate the result. This means, that a zEC12 cannot simply be converted into a z13 by stripping of features. This is required, as other magic values (e.g. maximum a

[Qemu-devel] [Patch v3 07/30] s390x/cpumodel: introduce CPU feature group definitions

2016-08-24 Thread David Hildenbrand
Let's use the generated groups to create feature group representations for the user. These groups can later be used to enable/disable multiple features in one shot and will be used to reduce the amount of reported features to the user if all subfeatures are in place. Acked-by: Cornelia Huck Signe

[Qemu-devel] [Patch v3 00/30] s390x CPU models: exposing features

2016-08-24 Thread David Hildenbrand
Only minor changes this version. I think this is ready to go. If we find model inconsitencies or bad feature names, we can still fix them until the next release. Latest version can be found on branch: github.com/cohuck/qemu cpumodel-s390x-v3 Concept---

[Qemu-devel] [Patch v3 24/30] s390x/kvm: don't enable key wrapping if msa3 is disabled

2016-08-24 Thread David Hildenbrand
As the CPU model now controls msa3, trying to set wrapping keys without msa3 being around/enable in the kernel will produce misleading errors. So let's simply not configure key wrapping if msa3 is not enabled and make compat machines with disabled CPU model work correctly. Signed-off-by: David Hi

[Qemu-devel] [Patch v3 02/30] s390x/cpumodel: "host" and "qemu" as CPU subclasses

2016-08-24 Thread David Hildenbrand
This patch introduces two CPU models, "host" and "qemu". "qemu" is used as default when running under TCG. "host" is used as default when running under KVM. "host" cannot be used without KVM. "host" is not migration-safe. They both inherit from the base s390x CPU, which is turned into an abstract c

[Qemu-devel] [Patch v3 14/30] s390x/sclp: introduce sclp feature blocks

2016-08-24 Thread David Hildenbrand
The sclp "read cpu info" and "read scp info" commands can include features for the cpu info and configuration characteristics (extended), decribing some advanced features available in the configuration. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- include/hw/s390x/sclp.h | 12 ++

[Qemu-devel] [Patch v3 04/30] s390x/cpumodel: introduce CPU features

2016-08-24 Thread David Hildenbrand
From: Michael Mueller The patch introduces s390x CPU features (most of them refered to as facilities) along with their discription and some functions that will be helpful when working with the features later on. Please note that we don't introduce all known CPU features, only the ones currently

[Qemu-devel] [Patch v3 05/30] s390x/cpumodel: generate CPU feature lists for CPU models

2016-08-24 Thread David Hildenbrand
From: Michael Mueller This patch introduces the helper "gen-features" which allows to generate feature list definitions at compile time. Its flexibility is better and the error-proneness is lower when compared to static programming time added statements. The helper includes "target-s390x/cpu_fea

[Qemu-devel] [Patch v3 23/30] s390x/kvm: let the CPU model control CMM(A)

2016-08-24 Thread David Hildenbrand
Starting with recent kernels, if the cmma attributes are available, we actually have hardware support. Enabling CMMA then means providing the guest VCPU with CMM, therefore enabling its CMM facility. Let's not blindly enable CMM anymore but let's control it using CPU models. For disabled CPU model

[Qemu-devel] [Patch v3 01/30] qmp: details about CPU definitions in query-cpu-definitions

2016-08-24 Thread David Hildenbrand
It might be of interest for tooling whether a CPU definition can be safely used when migrating, or if e.g. CPU features might get lost during migration when migrationg from/to a different QEMU version or host, even if the same compatibility machine is used. Also, we want to know if a CPU definitio

[Qemu-devel] [Patch v3 15/30] s390x/sclp: indicate sclp features

2016-08-24 Thread David Hildenbrand
We have three different blocks in the SCLP read-SCP information response that indicate sclp features. Let's prepare propagation. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/sclp.c | 9 + target-s390x/cpu_models.c | 14 ++ target-s390x/cpu

[Qemu-devel] [Patch v3 20/30] s390x/kvm: allow runtime-instrumentation for "none" machine

2016-08-24 Thread David Hildenbrand
To be able to query the correct host model for the "none" machine, let's allow runtime-instrumentation for that machine. Acked-by: Cornelia Huck Signed-off-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/

[Qemu-devel] [Patch v3 06/30] s390x/cpumodel: generate CPU feature group lists

2016-08-24 Thread David Hildenbrand
Feature groups will be very helpful to reduce the amount of features typically available in sane configurations. E.g. the MSA facilities introduced loads of subfunctions, which could - in theory - go away in the future, but we want to avoid reporting hundrets of features to the user if usually all

[Qemu-devel] [Patch v3 22/30] s390x/kvm: disable host model for problematic compat machines

2016-08-24 Thread David Hildenbrand
Compatibility machines that touch runtime-instrumentation should not be used with the CPU model. Otherwise the host model will look different, depending on the QEMU machine QEMU has been started with. So let's simply disable the host model for existing compatibility machines that all disable ri. T

[Qemu-devel] [PATCH v2 6/8] cutils: Rewrite x86 buffer zero checking

2016-08-24 Thread Richard Henderson
Use unaligned load operations. Add versions for avx1 and sse4.1. Cc: liang.z...@intel.com Signed-off-by: Richard Henderson --- util/bufferiszero.c | 169 1 file changed, 145 insertions(+), 24 deletions(-) diff --git a/util/bufferiszero.c b/ut

[Qemu-devel] [PATCH v2 8/8] cutils: Rewrite ppc buffer zero checking

2016-08-24 Thread Richard Henderson
GCC versions through 6 do a poor job with the indexed addressing, and (for ppc64le) issues unnecessary xxswapd insns. Cc: qemu-...@nongnu.org Cc: David Gibson Signed-off-by: Richard Henderson --- util/bufferiszero.c | 40 ++-- 1 file changed, 38 insertions(+)

[Qemu-devel] [PATCH v2 1/8] cutils: Move buffer_is_zero and subroutines to a new file

2016-08-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- util/Makefile.objs | 1 + util/bufferiszero.c | 272 util/cutils.c | 244 -- 3 files changed, 273 insertions(+), 244 deletions(-) create mode 100644 util

[Qemu-devel] [PATCH v2 5/8] cutils: Add generic prefetch

2016-08-24 Thread Richard Henderson
There's no real knowledge of the cacheline size, just prefetching one loop ahead. Signed-off-by: Richard Henderson --- util/bufferiszero.c | 5 + 1 file changed, 5 insertions(+) diff --git a/util/bufferiszero.c b/util/bufferiszero.c index 5246c5b..264598b 100644 --- a/util/bufferiszero.c ++

[Qemu-devel] [PATCH v2 4/8] cutils: Rearrange buffer_is_zero acceleration

2016-08-24 Thread Richard Henderson
Allow selection of several acceleration functions based on the size and alignment of the buffer. Do not require ifunc support for AVX2 acceleration. Signed-off-by: Richard Henderson --- configure | 21 +--- util/bufferiszero.c | 352 +---

[Qemu-devel] [PATCH v2 7/8] cutils: Rewrite aarch64 buffer zero checking

2016-08-24 Thread Richard Henderson
Provide 64-byte and 128-byte versions. Use dczid_el0 as a proxy for the cacheline size. Cc: qemu-...@nongnu.org Cc: vijay.kil...@gmail.com Signed-off-by: Richard Henderson --- util/bufferiszero.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/ut

[Qemu-devel] [PATCH v2 0/8] Improve buffer_is_zero

2016-08-24 Thread Richard Henderson
Patches 1-4 remove the use of ifunc from the implementation. Patch 6 adjusts the x86 implementation a bit more to take advantage of ptest (in sse4.1) and unaligned accesses (in avx1). Patches 3 and 7 are the result of my conversation with Vijaya Kumar with respect to ThunderX. Patch 8 is the res

[Qemu-devel] [PATCH v2 3/8] cutils: Export only buffer_is_zero

2016-08-24 Thread Richard Henderson
Since the two users don't make use of the returned offset, beyond ensuring that the entire buffer is zero, consider the can_use_buffer_find_nonzero_offset and buffer_find_nonzero_offset functions internal. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Richard Henderson --- include/qemu/cut

[Qemu-devel] [PATCH] Postcopy vs xbzrle: Don't send xbzrle pages once in postcopy [for 2.8]

2016-08-24 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" xbzrle relies on reading pages that have already been sent to the destination and then applying the modifications; we can't do that in postcopy because the destination may well have modified the page already or the page has been discarded. I already didn't allow re

Re: [Qemu-devel] [PATCH] 9pfs: disallow / in path components

2016-08-24 Thread Greg Kurz
On Wed, 24 Aug 2016 18:46:10 +0300 "Michael S. Tsirkin" wrote: > On Wed, Aug 24, 2016 at 04:00:24PM +0100, Peter Maydell wrote: > > On 24 August 2016 at 15:29, Greg Kurz wrote: > > > At various places in 9pfs, full paths are created by concatenating a guest > > > originated string to the expor

  1   2   >