Re: [Qemu-devel] [PATCH v2 4/5] tpm: add CRB device

2018-01-20 Thread Stefan Berger
On 01/20/2018 07:54 AM, Philippe Mathieu-Daudé wrote: On 01/19/2018 11:11 AM, Marc-André Lureau wrote: tpm_crb is a device for TPM 2.0 Command Response Buffer (CRB) Interface as defined in TCG PC Client Platform TPM Profile (PTP) Specification Family “2.0” Level 00 Revision 01.03 v22. The PTP

[Qemu-devel] [PULL 07/12] spapr: fix device tree properties when using compatibility mode

2018-01-20 Thread David Gibson
From: Greg Kurz Commit 51f84465dd98 changed the compatility mode setting logic: - machine reset only sets compatibility mode for the boot CPU - compatibility mode is set for other CPUs when they are put online by the guest with the "start-cpu" RTAS call This causes a

[Qemu-devel] [PULL 05/12] target/ppc: msgsnd and msgclr instructions need hypervisor privilege

2018-01-20 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- target/ppc/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/translate.c b/target/ppc/translate.c

[Qemu-devel] [PULL 08/12] target-ppc: optimize cmp translation

2018-01-20 Thread David Gibson
From: "pbonz...@redhat.com" We know that only one bit (in addition to SO) is going to be set in the condition register, so do two movconds instead of three setconds, three shifts and two ORs. For ppc64-linux-user, the code size reduction is around 5% and the performance

[Qemu-devel] [PULL 11/12] target/ppc: add support for hypervisor doorbells on book3s CPUs

2018-01-20 Thread David Gibson
From: Cédric Le Goater The hypervisor doorbells are used by skiboot and Linux on POWER9 processors to wake up secondaries. This adds processor control support to the Server architecture by reusing the Embedded support. They are very similar, only the bits definition of the CPU

[Qemu-devel] [PULL 12/12] target/ppc/spapr_caps: Add macro to generate spapr_caps migration vmstate

2018-01-20 Thread David Gibson
From: Suraj Jitindar Singh The vmstate description and the contained needed function for migration of spapr_caps is the same for each cap, with the name of the cap substituted. As such introduce a macro to allow for easier generation of these. Convert the three

[Qemu-devel] [PULL 00/12] ppc-for-2.12 queue 20180121

2018-01-20 Thread David Gibson
The following changes since commit b384cd95eb9c6f73ad84ed1bb0717a26e29cc78f: Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-01-19 16:35:25 +) are available in the Git repository at: git://github.com/dgibson/qemu.git

[Qemu-devel] [PULL 02/12] default-configs/ppc-softmmu: Restructure the switches according to the machines

2018-01-20 Thread David Gibson
From: Thomas Huth Order the CONFIG switches in ppc-softmmu.mak according to the machine classes where they are used (embedded, Mac or PReP), so that it is easier for the users to disable a set of switches completely if they are not needed. Also add the missing

[Qemu-devel] [PULL 06/12] spapr: drop duplicate variable in spapr_core_plug()

2018-01-20 Thread David Gibson
From: Greg Kurz A variable is already defined at the begining of the function to hold a pointer to the CPU core object: sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(dev)); No need to define it again in the pre-2.10 compatibility code snipplet. Signed-off-by: Greg Kurz

[Qemu-devel] [PULL 10/12] sii3112: Add explicit type casts to avoid unintended sign extension

2018-01-20 Thread David Gibson
From: BALATON Zoltan Noticed by Coverity Reported-by: Peter Maydell Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/ide/sii3112.c | 10 +- 1 file changed, 5 insertions(+),

[Qemu-devel] [PULL 03/12] hw/ppc/Makefile: Add a way to disable the PPC4xx boards

2018-01-20 Thread David Gibson
From: Thomas Huth We've got the config switch CONFIG_PPC4XX, so we should use it in the Makefile accordingly and only include the PPC4xx boards if this switch has been enabled. (Note: Unfortunately, the files ppc4xx_devs.c and ppc405_uc.c still have to be included in the build

[Qemu-devel] [PULL 01/12] default-configs/ppc64-softmmu: Include 32-bit configs instead of copying them

2018-01-20 Thread David Gibson
From: Thomas Huth qemu-softmmu-ppc64 is supposed to be a superset of qemu-softmmu-ppc. However, instead of simply including the 32-bit config file, we've duplicated all CONFIG_xxx settings there instead. This way, we've missed some CONFIG switches in ppc64-softmmu.mak which

[Qemu-devel] [PULL 09/12] sm501: Add missing break to case

2018-01-20 Thread David Gibson
From: BALATON Zoltan Noticed by Coverity, forgotten in 5690d9ece Reported-by: Peter Maydell Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/display/sm501.c | 1 + 1 file changed,

[Qemu-devel] [PULL 04/12] target/ppc: fix doorbell and hypervisor doorbell definitions

2018-01-20 Thread David Gibson
From: Cédric Le Goater commit f03a1af581b9 ("ppc: Fix POWER7 and POWER8 exception definitions") introduced definitions for the server doorbell exceptions by reusing the embedded definitions but this adds complexity in the powerpc_excp() routine. Let's introduce specific

Re: [Qemu-devel] [PULL 00/27] Migration pull

2018-01-20 Thread Philippe Mathieu-Daudé
Hi Juan, On 01/20/2018 08:36 PM, Juan Quintela wrote: > Peter Maydell wrote: >> On 19 January 2018 at 16:43, Alexey Perevalov >> wrote: >>> As I remember, I tested build in QEMU's docker build system, >>> but now I checked it on i386 Ubuntu,

Re: [Qemu-devel] [PULL 00/27] Migration pull

2018-01-20 Thread Juan Quintela
Peter Maydell wrote: > On 19 January 2018 at 16:43, Alexey Perevalov wrote: >> As I remember, I tested build in QEMU's docker build system, >> but now I checked it on i386 Ubuntu, and yes linker says about unresolved >> atomic symbols. Next

Re: [Qemu-devel] [RFC] qid path collision issues in 9pfs

2018-01-20 Thread Emilio G. Cota
On Fri, Jan 19, 2018 at 19:05:06 -0500, Emilio G. Cota wrote: > > > > On Fri, 12 Jan 2018 19:32:10 +0800 > > > > Antonios Motakis wrote: > > > Since inodes are not completely random, and we usually have a handful of > > > device IDs, > > > we get a much smaller

Re: [Qemu-devel] [PATCH 00/11] sun4u: APB tidy-up/rename and tracepoint conversions

2018-01-20 Thread Artyom Tarasenko
On Mon, Jan 15, 2018 at 7:38 PM, Mark Cave-Ayland wrote: > On 14/01/18 13:25, Philippe Mathieu-Daudé wrote: > >> On 01/14/2018 08:21 AM, Mark Cave-Ayland wrote: >>> >>> On 14/01/18 11:15, no-re...@patchew.org wrote: Hi, This series seems to have

Re: [Qemu-devel] [PATCH] sun4u: implement power device

2018-01-20 Thread Artyom Tarasenko
Hi Mark, On Mon, Jan 15, 2018 at 9:58 PM, Mark Cave-Ayland wrote: > This inbuilt device contains a single 4-byte register, of which bit 24 is used > to power down the machine on a real Ultra 5. > > The power device exists at offset 0x724000 on a real machine, but

[Qemu-devel] [PULL 0/1] Dump patches

2018-01-20 Thread Marc-André Lureau
The following changes since commit b384cd95eb9c6f73ad84ed1bb0717a26e29cc78f: Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-01-19 16:35:25 +) are available in the Git repository at: https://github.com/elmarco/qemu.git

[Qemu-devel] [PULL 1/1] dump-guest-memory.py: fix python 2 support

2018-01-20 Thread Marc-André Lureau
Python GDB support may use Python 2 or 3. Inferior.read_memory() may return a 'buffer' with Python 2 or a 'memoryview' with Python 3 (see also https://sourceware.org/gdb/onlinedocs/gdb/Inferiors-In-Python.html) The elf.add_vmcoreinfo_note() method expects a "bytes" object. Wrap the returned

[Qemu-devel] [PATCH v2 2/6] qapi: Replace qobject_to_X(o) by qobject_to(o, X)

2018-01-20 Thread Max Reitz
This patch was generated using the following Coccinelle script: @@ expression Obj; @@ ( - qobject_to_qnum(Obj) + qobject_to(Obj, QNum) | - qobject_to_qstring(Obj) + qobject_to(Obj, QString) | - qobject_to_qdict(Obj) + qobject_to(Obj, QDict) | - qobject_to_qlist(Obj) + qobject_to(Obj, QList) | -

[Qemu-devel] [PATCH v2 5/6] block: Handle null backing link

2018-01-20 Thread Max Reitz
Instead of converting all "backing": null instances into "backing": "", handle a null value directly in bdrv_open_inherit(). This enables explicitly null backing links for json:{} filenames. Signed-off-by: Max Reitz --- block.c| 4 +++- blockdev.c

[Qemu-devel] [PATCH v2 4/6] qapi: Make more of qobject_to()

2018-01-20 Thread Max Reitz
This patch reworks some places which use either qobject_type() checks plus qobject_to(), where the latter alone is sufficient, or NULL checks plus qobject_type() checks where we can simply do a qobject_to() != NULL check. Signed-off-by: Max Reitz ---

[Qemu-devel] [PATCH v2 3/6] qapi: Remove qobject_to_X() functions

2018-01-20 Thread Max Reitz
They are no longer needed now. Signed-off-by: Max Reitz --- include/qapi/qmp/qbool.h | 1 - include/qapi/qmp/qdict.h | 1 - include/qapi/qmp/qlist.h | 1 - include/qapi/qmp/qnum.h| 1 - include/qapi/qmp/qstring.h | 1 - qobject/qbool.c| 11

[Qemu-devel] [PATCH v2 1/6] qapi: Add qobject_to()

2018-01-20 Thread Max Reitz
This is a dynamic casting macro that, given a QObject type, returns an object as that type or NULL if the object is of a different type (or NULL itself). The macro uses lower-case letters because: 1. There does not seem to be a hard rule on whether qemu macros have to be upper-cased, 2. The

[Qemu-devel] [PATCH v2 6/6] block: Deprecate "backing": ""

2018-01-20 Thread Max Reitz
We have a clear replacement, so let's deprecate it. Signed-off-by: Max Reitz --- qapi/block-core.json | 4 ++-- block.c | 4 qemu-doc.texi| 7 +++ qemu-options.hx | 4 ++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH v2 0/6] block: Handle null backing link

2018-01-20 Thread Max Reitz
Currently, we try to rewrite every occurrence of "backing": null into "backing": "" in qmp_blockdev_add(). However, that breaks using the same "backing": null construction in json:{} file names (which do not go through qmp_blockdev_add()). Currently, these then just behave as if the option has

Re: [Qemu-devel] [PATCH v2 4/5] tpm: add CRB device

2018-01-20 Thread Philippe Mathieu-Daudé
On 01/19/2018 11:11 AM, Marc-André Lureau wrote: > tpm_crb is a device for TPM 2.0 Command Response Buffer (CRB) > Interface as defined in TCG PC Client Platform TPM Profile (PTP) > Specification Family “2.0” Level 00 Revision 01.03 v22. > > The PTP allows device implementation to switch between

Re: [Qemu-devel] [PATCH v2 4/5] tpm: add CRB device

2018-01-20 Thread Eduardo Habkost
On Fri, Jan 19, 2018 at 04:56:31PM -0500, Stefan Berger wrote: > On 01/19/2018 01:42 PM, Eduardo Habkost wrote: > > On Fri, Jan 19, 2018 at 12:10:03PM -0500, Stefan Berger wrote: > > > On 01/19/2018 09:11 AM, Marc-André Lureau wrote: > > > > tpm_crb is a device for TPM 2.0 Command Response Buffer