Re: [Qemu-devel] [PATCH v5 1/4] target/arm: implement SHA-512 instructions

2018-02-06 Thread Peter Maydell
On 6 February 2018 at 19:59, Ard Biesheuvel wrote: > Thanks a lot for debugging that. As I said, I don't have test vectors, > or I would have tested it myself, and most likely would have found > this as well. No problem. I spent a surprisingly long time looking at the inside of the loop trying to

[Qemu-devel] [RFC PATCH 12/34] hyperv: add synic event flag signaling

2018-02-06 Thread Roman Kagan
Add infrastructure to signal SynIC event flags by atomically setting the corresponding bit in the event flags page and firing a SINT if necessary. Signed-off-by: Roman Kagan --- target/i386/hyperv.h | 2 ++ target/i386/hyperv.c | 32 2 files changed, 34 insertio

[Qemu-devel] [RFC PATCH 21/34] vmbus: build configuration

2018-02-06 Thread Roman Kagan
From: Evgeny Yakovlev Add option to configure and makefiles to enable building vmbus support (default to "on" on Linux and "off" otherwise). Signed-off-by: Roman Kagan --- configure| 11 +++ hw/Makefile.objs | 1 + 2 files changed, 12 insertions(+) diff --git a/configure b/co

[Qemu-devel] [RFC PATCH 07/34] hyperv: make HvSintRoute reference-counted

2018-02-06 Thread Roman Kagan
Multiple entities (e.g. VMBus devices) can use the same SINT route. To make their lives easier in maintaining SINT route ownership, make it reference-counted. Adjust the respective API names accordingly. Signed-off-by: Roman Kagan --- target/i386/hyperv.h | 10 +- hw/misc/hyperv_te

[Qemu-devel] [PULL 02/14] audio: Replace AUDIO_FUNC with __func__

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Apparently we don't use __MSC_VER as a compiler anymore and we always require a C99 compiler (which means we always have __func__) so we don't need a special AUDIO_FUNC macro. We can just replace AUDIO_FUNC with __func__ instead. Checkpatch failures were manually fixed. S

Re: [Qemu-devel] how to handle QOM 'container' objects whose contents depend on QOM properties?

2018-02-06 Thread Eduardo Habkost
On Tue, Feb 06, 2018 at 07:27:17PM +, Peter Maydell wrote: > On 6 February 2018 at 19:04, Eduardo Habkost wrote: > > On Tue, Feb 06, 2018 at 06:18:25PM +, Peter Maydell wrote: > >> One current approach to that is that instead of init'ing those > >> child objects in the container init, we p

[Qemu-devel] [RFC PATCH 15/34] hyperv_testdev: add SynIC message and event testmodes

2018-02-06 Thread Roman Kagan
Add testmodes for SynIC messages and events. The message or event connection setup / teardown is initiated by the guest via new control codes written to the test device port. Then the test connections bounce the respective operations back to the guest, i.e. the incoming messages are posted or the

[Qemu-devel] [RFC PATCH 03/34] hyperv: cosmetic: g_malloc -> g_new

2018-02-06 Thread Roman Kagan
Signed-off-by: Roman Kagan --- target/i386/hyperv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index c9a4bb539d..e762eac79f 100644 --- a/target/i386/hyperv.c +++ b/target/i386/hyperv.c @@ -88,7 +88,7 @@ HvSintRoute *kvm_hv_sint_

[Qemu-devel] [PULL 12/14] hw/sparc*: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PULL 14/14] tcg: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [RFC PATCH 11/34] hyperv: add synic message delivery

2018-02-06 Thread Roman Kagan
Add infrastructure to deliver SynIC messages to the guest SynIC message page. Note that KVM also may want to deliver (SynIC timer) messages to the same message slot. The problem is that the access to a SynIC message slot is controlled by the value of its .msg_type field which indicates if the slo

[Qemu-devel] [PULL 03/14] hw/arm: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PULL 07/14] hw/moxie: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [RFC PATCH 02/34] hyperv_testdev: refactor for readability

2018-02-06 Thread Roman Kagan
Make hyperv_testdev slightly easier to follow and enhance in future. For that, put the hyperv sint routes (wrapped in a helper structure) on a linked list rather than a fixed-size array. Signed-off-by: Roman Kagan --- hw/misc/hyperv_testdev.c | 114 ++-

[Qemu-devel] [RFC PATCH 01/34] hyperv: ensure VP index equal to QEMU cpu_index

2018-02-06 Thread Roman Kagan
Hyper-V identifies vCPUs by Virtual Processor (VP) index which can be queried by the guest via HV_X64_MSR_VP_INDEX msr. It is defined by the spec as a sequential number which can't exceed the maximum number of vCPUs per VM. It has to be owned by QEMU in order to preserve it across migration. How

[Qemu-devel] [PULL 08/14] hw/openrisc: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PULL 11/14] hw/sd: Replace fprintf(stderr, "*\n" with DPRINTF()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Signed-off-by: Alistair Francis [Most of original patch dropped, commit message replaced to match what's left] Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20180203084315.20497-11-arm...@redhat.com> Reviewed-by: Thomas Huth --- hw/s

[Qemu-devel] [PULL 04/14] hw/dma: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PULL 13/14] hw/xen*: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

Re: [Qemu-devel] how to handle QOM 'container' objects whose contents depend on QOM properties?

2018-02-06 Thread Peter Maydell
On 6 February 2018 at 19:04, Eduardo Habkost wrote: > On Tue, Feb 06, 2018 at 06:18:25PM +, Peter Maydell wrote: >> One current approach to that is that instead of init'ing those >> child objects in the container init, we postpone that to >> container realize. This looks pretty ugly, and it al

[Qemu-devel] [PULL 10/14] hw/ppc: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PULL 06/14] hw/mips: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PATCH 05/54] qemu-pr-helper: miscellaneous fixes

2018-02-06 Thread Michael Roth
From: Paolo Bonzini 1) Return a generic sense if TEST UNIT READY does not provide one; 2) Fix two mistakes in copying from the spec. Cc: qemu-sta...@nongnu.org Reported-by: Dr. David Alan Gilbert Signed-off-by: Paolo Bonzini (cherry picked from commit a4a9b6eaf35dbe4bf0e069854945bf5e45fc7eab)

[Qemu-devel] [PULL 05/14] hw/lm32: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

Re: [Qemu-devel] [PATCH v5 1/4] target/arm: implement SHA-512 instructions

2018-02-06 Thread Ard Biesheuvel
On 6 February 2018 at 20:41, Peter Maydell wrote: > On 6 February 2018 at 19:15, Peter Maydell wrote: >> On 6 February 2018 at 19:06, Peter Maydell wrote: >>> SM4EKEY, SM4E >> >> Sample SM4EKEY failure: >> insn 0xce78cbdd (SM4EKEY V29.4S, V30.4S, V24.4S) >> V24 : 6ee7a2520059bd15bac75e4436b3

[Qemu-devel] [PATCH 06/54] block/nbd: fix segmentation fault when .desc is not null-terminated

2018-02-06 Thread Michael Roth
From: Murilo Opsfelder Araujo The find_desc_by_name() from util/qemu-option.c relies on the .name not being NULL to call strcmp(). This check becomes unsafe when the list is not NULL-terminated, which is the case of nbd_runtime_opts in block/nbd.c, and can result in segmentation fault when strcmp

[Qemu-devel] [PULL 00/14] Error reporting patches for 2018-02-06

2018-02-06 Thread Markus Armbruster
The following changes since commit 20e0d439a6ded635ec89f6135c08cd5541c68962: Merge remote-tracking branch 'remotes/rth/tags/pull-hppa-20180204' into staging (2018-02-06 14:21:41 +) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-error-2018-02-06 for y

[Qemu-devel] [PULL 09/14] hw/pci*: Replace fprintf(stderr, "*\n" with error_report()

2018-02-06 Thread Markus Armbruster
From: Alistair Francis Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed. find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\))

[Qemu-devel] [PULL 01/14] error: Improve documentation of error_append_hint()

2018-02-06 Thread Markus Armbruster
Suggested-by: Halil Pasic Signed-off-by: Markus Armbruster Message-Id: <1502359588-29451-1-git-send-email-arm...@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Halil Pasic --- include/qapi/error.h | 8 1 file changed, 8 insertions(+) diff --git a/include/qapi/error.h b/include/qapi

[Qemu-devel] [PATCH 53/54] target/ppc/spapr_caps: Add new tristate cap safe_indirect_branch

2018-02-06 Thread Michael Roth
From: Suraj Jitindar Singh Add new tristate cap cap-ibs to represent the indirect branch serialisation capability. Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Gibson Signed-off-by: David Gibson (cherry picked from commit 4be8d4e7d935fc8919d61f53a0f0fb7230052bb3) Signed-off-by: Mich

[Qemu-devel] [PATCH 04/54] qemu-options: Remove stray colons from output of --help

2018-02-06 Thread Michael Roth
From: Markus Armbruster Commit 43f187a broke --help: it put colons into blank lines. It removed the colon from DEFHEADING(TITLE:) and added it back in the macro expansion of DEFHEADING(TITLE), so hxtool can emit "@subsection TITLE" more easily. Trouble is it's added back even for the blank line

Re: [Qemu-devel] [PATCH v8 18/26] block: Add sgfnt_runtime_opts to BlockDriver

2018-02-06 Thread Eric Blake
On 02/05/2018 09:18 AM, Max Reitz wrote: This new field can be set by block drivers to list the runtime options they accept that may influence the contents of the respective BDS. As of a follow-up patch, this list will be used by the common bdrv_refresh_filename() implementation to decide which o

[Qemu-devel] [PATCH 07/54] block: Make bdrv_drain_invoke() recursive

2018-02-06 Thread Michael Roth
From: Kevin Wolf This change separates bdrv_drain_invoke(), which calls the BlockDriver drain callbacks, from bdrv_drain_recurse(). Instead, the function performs its own recursion now. One reason for this is that bdrv_drain_recurse() can be called multiple times by bdrv_drain_all_begin(), but t

[Qemu-devel] [PATCH 54/54] target/ppc/spapr: Add H-Call H_GET_CPU_CHARACTERISTICS

2018-02-06 Thread Michael Roth
From: Suraj Jitindar Singh The new H-Call H_GET_CPU_CHARACTERISTICS is used by the guest to query behaviours and available characteristics of the cpu. Implement the handler for this new H-Call which formulates its response based on the setting of the spapr_caps cap-cfpc, cap-sbbc and cap-ibs. S

Re: [Qemu-devel] [Qemu-block] [PATCH] block: Simplify bdrv_can_write_zeroes_with_unmap()

2018-02-06 Thread Eric Blake
On 01/29/2018 05:08 AM, Stefan Hajnoczi wrote: On Fri, Jan 26, 2018 at 01:34:39PM -0600, Eric Blake wrote: We don't need the can_write_zeroes_with_unmap field in BlockDriverInfo, because it is redundant information with supported_zero_flags & BDRV_REQ_MAY_UNMAP. Note that BlockDriverInfo and su

Re: [Qemu-devel] [PATCH v5 1/4] target/arm: implement SHA-512 instructions

2018-02-06 Thread Peter Maydell
On 6 February 2018 at 19:15, Peter Maydell wrote: > On 6 February 2018 at 19:06, Peter Maydell wrote: >> SM4EKEY, SM4E > > Sample SM4EKEY failure: > insn 0xce78cbdd (SM4EKEY V29.4S, V30.4S, V24.4S) > V24 : 6ee7a2520059bd15bac75e4436b3a1bd > V30 : a67d04e738f68da895ffd0c3e154e3e7 > > V29

[Qemu-devel] [PATCH 52/54] target/ppc/spapr_caps: Add new tristate cap safe_bounds_check

2018-02-06 Thread Michael Roth
From: Suraj Jitindar Singh Add new tristate cap cap-sbbc to represent the speculation barrier bounds checking capability. Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Gibson Signed-off-by: David Gibson (cherry picked from commit 09114fd8179977e4157b36aab2e3d68eaf08adca) Signed-off-b

[Qemu-devel] [PATCH 50/54] target/ppc/spapr_caps: Add support for tristate spapr_capabilities

2018-02-06 Thread Michael Roth
From: Suraj Jitindar Singh spapr_caps are used to represent the level of support for various capabilities related to the spapr machine type. Currently there is only support for boolean capabilities. Add support for tristate capabilities by implementing their get/set functions. These capabilities

Re: [Qemu-devel] [qemu-web PATCH] Add a blog post with the presentations from DevConf and FOSDEM 2018

2018-02-06 Thread Paolo Bonzini
On 06/02/2018 19:44, Thomas Huth wrote: > Sure, I can add them ... actually, there are even some more talks > related to KVM , e.g. the one from Vitaly: > > https://fosdem.org/2018/schedule/event/vai_kvm_on_hyperv/ > > or related to Xen: > > https://fosdem.org/2018/schedule/event/vai_pci_emula

[Qemu-devel] [PATCH 51/54] target/ppc/spapr_caps: Add new tristate cap safe_cache

2018-02-06 Thread Michael Roth
From: Suraj Jitindar Singh Add new tristate cap cap-cfpc to represent the cache flush on privilege change capability. Signed-off-by: Suraj Jitindar Singh Reviewed-by: David Gibson Signed-off-by: David Gibson (cherry picked from commit 8f38eaf8f9dd194c9961cf76c675724930ce4570) Signed-off-by: M

[Qemu-devel] [PATCH 48/54] target/ppc/spapr_caps: Add macro to generate spapr_caps migration vmstate

2018-02-06 Thread Michael Roth
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 existing spapr_caps (htm, vsx, and

Re: [Qemu-devel] [PULL 00/47] Misc patches for 2018-02-05

2018-02-06 Thread Peter Maydell
On 5 February 2018 at 19:28, Paolo Bonzini wrote: > The following changes since commit f24ee107a07f093bd7ed475dd48d7ba57ea3d8fe: > > Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180202-pull-request' > into staging (2018-02-02 18:54:11 +) > > are available in the git repository at:

[Qemu-devel] [PATCH 08/54] block: Call .drain_begin only once in bdrv_drain_all_begin()

2018-02-06 Thread Michael Roth
From: Kevin Wolf bdrv_drain_all_begin() used to call the .bdrv_co_drain_begin() driver callback inside its polling loop. This means that how many times it got called for each node depended on long it had to poll the event loop. This is obviously not right and results in nodes that stay drained e

[Qemu-devel] [PATCH 46/54] spapr: fix device tree properties when using compatibility mode

2018-02-06 Thread Michael Roth
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 regression for machines st

[Qemu-devel] [PATCH 03/54] target/sh4: fix TCG leak during gusa sequence

2018-02-06 Thread Michael Roth
From: Alex Bennée This fixes bug #1735384 while running java under qemu-sh4. When debug was enabled it showed a problem with TCG temps. Once fixed I was able to run java -version normally. Cc: qemu-sta...@nongnu.org Reported-by: John Paul Adrian Glaubitz Suggested-by: Richard Henderson Signed-

[Qemu-devel] [PATCH 49/54] target/ppc/kvm: Add cap_ppc_safe_[cache/bounds_check/indirect_branch]

2018-02-06 Thread Michael Roth
From: Suraj Jitindar Singh Add three new kvm capabilities used to represent the level of host support for three corresponding workarounds. Host support for each of the capabilities is queried through the new ioctl KVM_PPC_GET_CPU_CHAR which returns four uint64 quantities. The first two, characte

[Qemu-devel] [PATCH 41/54] target/ppc: Clean up probing of VMX, VSX and DFP availability on KVM

2018-02-06 Thread Michael Roth
From: David Gibson When constructing the "host" cpu class we modify whether the VMX and VSX vector extensions and DFP (Decimal Floating Point) are available based on whether KVM can support those instructions. This can depend on policy in the host kernel as well as on the actual host cpu capabil

[Qemu-devel] [PATCH 37/54] spapr: Add pseries-2.12 machine type

2018-02-06 Thread Michael Roth
From: David Gibson While we're at it fix a couple of small errors in the 2.11 and 2.10 models (they didn't have any real effect, but don't quite match the template). Signed-off-by: David Gibson (cherry picked from commit 2b6154120cbd7f5514cefd3c6084d39922d26d88) Signed-off-by: Michael Roth ---

[Qemu-devel] [PATCH 44/54] hw/ppc/spapr_caps: Rework spapr_caps to use uint8 internal representation

2018-02-06 Thread Michael Roth
From: Suraj Jitindar Singh Currently spapr_caps are tied to boolean values (on or off). This patch reworks the caps so that they can have any uint8 value. This allows more capabilities with various values to be represented in the same way internally. Capabilities are numbered in ascending order.

[Qemu-devel] [PATCH 47/54] target/ppc: introduce the PPC_BIT() macro

2018-02-06 Thread Michael Roth
From: Cédric Le Goater and use them in a couple of obvious places. Other macros will be used in the model of the XIVE interrupt controller. Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson (cherry picked from commit 2a83f9976efa9a85e8ceb9d1035a68f25c321334) Signed-off-by: Michael Ro

[Qemu-devel] [PATCH 31/54] s390x/kvm: provide stfle.81

2018-02-06 Thread Michael Roth
From: Christian Borntraeger stfle.81 (ppa15) is a transparent facility that can be passed to the guest without the need to implement hypervisor support. As this feature can be provided by firmware we add it to all full models. Cc: qemu-sta...@nongnu.org Signed-off-by: Christian Borntraeger Mess

[Qemu-devel] [PATCH 36/54] spapr: don't initialize PATB entry if max-cpu-compat < power9

2018-02-06 Thread Michael Roth
From: Laurent Vivier if KVM is enabled and KVM capabilities MMU radix is available, the partition table entry (patb_entry) for the radix mode is initialized by default in ppc_spapr_reset(). It's a problem if we want to migrate the guest to a POWER8 host while the kernel is not started to set the

[Qemu-devel] [PATCH 45/54] ppc: Change Power9 compat table to support at most 8 threads/core

2018-02-06 Thread Michael Roth
From: Jose Ricardo Ziviani Increases the max smt mode to 8 for Power9. That's because KVM supports smt emulation in this platform so QEMU should allow users to use it as well. Today if we try to pass -smp ...,threads=8, QEMU will silently truncate it to smt4 mode and may cause a crash if we try

[Qemu-devel] [PATCH 42/54] spapr: Handle VMX/VSX presence as an spapr capability flag

2018-02-06 Thread Michael Roth
From: David Gibson We currently have some conditionals in the spapr device tree code to decide whether or not to advertise the availability of the VMX (aka Altivec) and VSX vector extensions to the guest, based on whether the guest cpu has those features. This can lead to confusion and subtle fa

[Qemu-devel] [PATCH 34/54] spapr_pci: fix MSI/MSIX selection

2018-02-06 Thread Michael Roth
From: Greg Kurz In various place we don't correctly check if the device supports MSI or MSI-X. This can cause devices to be advertised with MSI support, even if they only support MSI-X (like virtio-pci-* devices for example): ethernet@0 { ibm,req#msi = <0x

[Qemu-devel] [PATCH 40/54] spapr: Validate capabilities on migration

2018-02-06 Thread Michael Roth
From: David Gibson Now that the "pseries" machine type implements optional capabilities (well, one so far) there's the possibility of having different capabilities available at either end of a migration. Although arguably a user error, it would be nice to catch this situation and fail as gracefu

[Qemu-devel] [PATCH 39/54] spapr: Treat Hardware Transactional Memory (HTM) as an optional capability

2018-02-06 Thread Michael Roth
From: David Gibson This adds an spapr capability bit for Hardware Transactional Memory. It is enabled by default for pseries-2.11 and earlier machine types. with POWER8 or later CPUs (as it must be, since earlier qemu versions would implicitly allow it). However it is disabled by default for th

[Qemu-devel] [PATCH 30/54] s390x/kvm: Handle bpb feature

2018-02-06 Thread Michael Roth
From: Christian Borntraeger We need to handle the bpb control on reset and migration. Normally stfle.82 is transparent (and the normal guest part works without hypervisor activity). To prevent any issues we require full host kernel support for this feature. Cc: qemu-sta...@nongnu.org Signed-off-

[Qemu-devel] [PATCH 02/54] block/iscsi: dont leave allocmap in an invalid state on UNMAP failure

2018-02-06 Thread Michael Roth
From: Peter Lieven we forgot to set the allocmap to invalid if an UNMAP call fails. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven Message-Id: <1512733868-9009-2-git-send-email...@kamp.de> Reviewed-by: Eric Blake Signed-off-by: Paolo Bonzini (cherry picked from commit aef172ffdc2f9c41

[Qemu-devel] [PATCH 32/54] osdep: Retry SETLK upon EINTR

2018-02-06 Thread Michael Roth
From: Fam Zheng We could hit lock failure if there is a signal that makes fcntl return -1 and errno set to EINTR. In this case we should retry. Cc: qemu-sta...@nongnu.org Signed-off-by: Fam Zheng Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf (cherry picked from commit f86428a1f4f91a460ed5

[Qemu-devel] [PATCH 43/54] spapr: Handle Decimal Floating Point (DFP) as an optional capability

2018-02-06 Thread Michael Roth
From: David Gibson Decimal Floating Point has been available on POWER7 and later (server) cpus. However, it can be disabled on the hypervisor, meaning that it's not available to guests. We currently handle this by conditionally advertising DFP support in the device tree depending on whether the

[Qemu-devel] [PATCH 35/54] linux-user/signal.c: Rename MC_* defines

2018-02-06 Thread Michael Roth
From: Peter Maydell The SPARC code in linux-user/signal.c defines a set of MC_* constants. On some SPARC hosts these are also defined by sys/ucontext.h, resulting in build failures: linux-user/signal.c:2786:0: error: "MC_NGREG" redefined [-Werror] #define MC_NGREG 19 In file included from /usr

[Qemu-devel] [PATCH 29/54] linux-headers: update

2018-02-06 Thread Michael Roth
From: Cornelia Huck Update headers against 4.15-rc9. Signed-off-by: Cornelia Huck (cherry picked from commit 9cbb636270b4df6f0a548e5c34b895330db5df8b) Signed-off-by: Michael Roth --- include/standard-headers/asm-s390/virtio-ccw.h | 6 +- linux-headers/asm-powerpc/kvm.h| 2

[Qemu-devel] [PATCH 38/54] spapr: Capabilities infrastructure

2018-02-06 Thread Michael Roth
From: David Gibson Because PAPR is a paravirtual environment access to certain CPU (or other) facilities can be blocked by the hypervisor. PAPR provides ways to advertise in the device tree whether or not those features are available to the guest. In some places we automatically determine wheth

[Qemu-devel] [PATCH 25/54] i386: Add EPYC-IBPB CPU model

2018-02-06 Thread Michael Roth
From: Eduardo Habkost EPYC-IBPB is a copy of the EPYC CPU model with just CPUID_8000_0008_EBX_IBPB added. Cc: Jiri Denemark Cc: Tom Lendacky Cc: Brijesh Singh Signed-off-by: Eduardo Habkost Message-Id: <20180109154519.25634-7-ehabk...@redhat.com> Signed-off-by: Eduardo Habkost (cherry picke

[Qemu-devel] [PATCH 28/54] linux-headers: update to 4.15-rc1

2018-02-06 Thread Michael Roth
From: Eric Auger Update headers against v4.15-rc1. Signed-off-by: Eric Auger Message-id: 1511883692-11511-4-git-send-email-eric.au...@redhat.com Signed-off-by: Peter Maydell (cherry picked from commit dd8739669f95b30653a3a05cb2e21da3f52894fa) Signed-off-by: Michael Roth --- include/standard-

[Qemu-devel] [PATCH 20/54] i386: Change X86CPUDefinition::model_id to const char*

2018-02-06 Thread Michael Roth
From: Eduardo Habkost It is valid to have a 48-character model ID on CPUID, however the definition of X86CPUDefinition::model_id is char[48], which can make the compiler drop the null terminator from the string. If a CPU model happens to have 48 bytes on model_id, "-cpu help" will print garbage

[Qemu-devel] [PATCH 33/54] usb-storage: Fix share-rw option parsing

2018-02-06 Thread Michael Roth
From: Fam Zheng Because usb-storage creates an internal scsi device, we should propagate options. We already do so for bootindex etc, but failed to take care of share-rw. Fix it in an apparent way: add a new parameter to scsi_bus_legacy_add_drive and pass in s->conf.share_rw. Cc: qemu-sta...@non

[Qemu-devel] [PATCH 21/54] i386: Add support for SPEC_CTRL MSR

2018-02-06 Thread Michael Roth
From: Paolo Bonzini Signed-off-by: Eduardo Habkost Message-Id: <20180109154519.25634-3-ehabk...@redhat.com> Signed-off-by: Eduardo Habkost (cherry picked from commit a33a2cfe2f771b360b3422f6cdf566a560860bfc) Signed-off-by: Michael Roth --- target/i386/cpu.h | 3 +++ target/i386/kvm.c

[Qemu-devel] [PATCH 27/54] s390x: fix storage attributes migration for non-small guests

2018-02-06 Thread Michael Roth
From: Claudio Imbrenda Fix storage attribute migration so that it does not fail for guests with more than a few GB of RAM. With such guests, the index in the buffer would go out of bounds, usually by large amounts, thus receiving -EFAULT from the kernel. Migration itself would be successful, but

[Qemu-devel] [PATCH 19/54] hw/pci-bridge: fix QEMU crash because of pcie-root-port

2018-02-06 Thread Michael Roth
From: Marcel Apfelbaum If we try to use more pcie_root_ports then available slots and an IO hint is passed to the port, QEMU crashes because we try to init the "IO hint" capability even if the device is not created. Fix it by checking for error before adding the capability, so QEMU can fail grace

Re: [Qemu-devel] [PATCH v5 1/4] target/arm: implement SHA-512 instructions

2018-02-06 Thread Peter Maydell
On 6 February 2018 at 19:06, Peter Maydell wrote: > SM4EKEY, SM4E Sample SM4EKEY failure: insn 0xce78cbdd (SM4EKEY V29.4S, V30.4S, V24.4S) V24 : 6ee7a2520059bd15bac75e4436b3a1bd V30 : a67d04e738f68da895ffd0c3e154e3e7 V29 actual: a67d04e7b98aaef47bf01b8158da5407 V29 expected: 8d4922

[Qemu-devel] [PATCH 22/54] i386: Add spec-ctrl CPUID bit

2018-02-06 Thread Michael Roth
From: Eduardo Habkost Add the feature name and a CPUID_7_0_EDX_SPEC_CTRL macro. Signed-off-by: Eduardo Habkost Message-Id: <20180109154519.25634-4-ehabk...@redhat.com> Signed-off-by: Eduardo Habkost (cherry picked from commit a2381f0934432ef2cd47a335348ba8839632164c) Signed-off-by: Michael Rot

[Qemu-devel] [PATCH 26/54] linux-user: Fix locking order in fork_start()

2018-02-06 Thread Michael Roth
From: Peter Maydell Our locking order is that the tb lock should be taken inside the mmap_lock, but fork_start() grabs locks the other way around. This means that if a heavily multithreaded guest process (such as Java) calls fork() it can deadlock, with the thread that called fork() stuck in fork

[Qemu-devel] [PATCH 14/54] vhost: remove assertion to prevent crash

2018-02-06 Thread Michael Roth
From: Jay Zhou QEMU will assert on vhost-user backed virtio device hotplug if QEMU is using more RAM regions than VHOST_MEMORY_MAX_NREGIONS (for example if it were started with a lot of DIMM devices). Fix it by returning error instead of asserting and let callers of vhost_set_mem_table() handle

[Qemu-devel] [PATCH 24/54] i386: Add new -IBRS versions of Intel CPU models

2018-02-06 Thread Michael Roth
From: Eduardo Habkost The new MSR IA32_SPEC_CTRL MSR was introduced by a recent Intel microcode updated and can be used by OSes to mitigate CVE-2017-5715. Unfortunately we can't change the existing CPU models without breaking existing setups, so users need to explicitly update their VM configura

[Qemu-devel] [PATCH 18/54] scsi-disk: release AioContext in unaligned WRITE SAME case

2018-02-06 Thread Michael Roth
From: Stefan Hajnoczi scsi_write_same_complete() can retry the write if the request was unaligned. Make sure to release the AioContext when that code path is taken! This patch fixes a hang when QEMU terminates after an unaligned WRITE SAME request has been processed with dataplane. The hang oc

[Qemu-devel] [PATCH 11/54] hw/intc/arm_gicv3: Make reserved register addresses RAZ/WI

2018-02-06 Thread Michael Roth
From: Peter Maydell The GICv3 specification says that reserved register addresses should RAZ/WI. This means we need to return MEMTX_OK, not MEMTX_ERROR, because now that we support generating external aborts the latter will cause an abort on new board models. Cc: qemu-sta...@nongnu.org Signed-of

[Qemu-devel] [PATCH 16/54] hw/sd/milkymist-memcard: Reset SD card on controller reset

2018-02-06 Thread Michael Roth
From: Peter Maydell Since milkymist-memcard is still using the legacy SD card API, the SD card created by sd_init() is not plugged into any bus. This means that the controller has to reset it manually. Failing to do this mostly didn't affect the guest since the guest typically does a programmed

[Qemu-devel] [PATCH 01/54] target/i386: Fix handling of VEX prefixes

2018-02-06 Thread Michael Roth
From: Peter Maydell In commit e3af7c788b73a6495eb9d94992ef11f6ad6f3c56 we replaced direct calls to to cpu_ld*_code() with calls to the x86_ld*_code() wrappers which incorporate an advance of s->pc. Unfortunately we didn't notice that in one place the old code was deliberately not incrementing s->

[Qemu-devel] [PATCH 15/54] hw/sd/pl181: Reset SD card on controller reset

2018-02-06 Thread Michael Roth
From: Peter Maydell Since pl181 is still using the legacy SD card API, the SD card created by sd_init() is not plugged into any bus. This means that the controller has to reset it manually. Failing to do this mostly didn't affect the guest since the guest typically does a programmed SD card rese

[Qemu-devel] [PATCH 17/54] hw/sd/ssi-sd: Reset SD card on controller reset

2018-02-06 Thread Michael Roth
From: Peter Maydell Since ssi-sd is still using the legacy SD card API, the SD card created by sd_init() is not plugged into any bus. This means that the controller has to reset it manually. Failing to do this mostly didn't affect the guest since the guest typically does a programmed SD card res

[Qemu-devel] [PATCH 13/54] virtio_error: don't invoke status callbacks

2018-02-06 Thread Michael Roth
From: "Michael S. Tsirkin" Backends don't need to know what frontend requested a reset, and notifying then from virtio_error is messy because virtio_error itself might be invoked from backend. Let's just set the status directly. Cc: qemu-sta...@nongnu.org Reported-by: Ilya Maximets Signed-off-

[Qemu-devel] [PATCH 23/54] i386: Add FEAT_8000_0008_EBX CPUID feature word

2018-02-06 Thread Michael Roth
From: Eduardo Habkost Add the new feature word and the "ibpb" feature flag. Based on a patch by Paolo Bonzini. Signed-off-by: Eduardo Habkost Message-Id: <20180109154519.25634-5-ehabk...@redhat.com> Signed-off-by: Eduardo Habkost (cherry picked from commit 1b3420e1c4d523c49866cca4e7544753201c

[Qemu-devel] [PATCH 12/54] hw/intc/arm_gic: reserved register addresses are RAZ/WI

2018-02-06 Thread Michael Roth
From: Peter Maydell The GICv2 specification says that reserved register addresses must RAZ/WI; now that we implement external abort handling for Arm CPUs this means we must return MEMTX_OK rather than MEMTX_ERROR, to avoid generating a spurious guest data abort. Cc: qemu-sta...@nongnu.org Signed

[Qemu-devel] [PATCH 00/54] Patch Round-up for stable 2.11.1, freeze on 2018-02-12

2018-02-06 Thread Michael Roth
Hi everyone, The following new patches are queued for QEMU stable v2.11.1: https://github.com/mdroth/qemu/commits/stable-2.11-staging The release is planned for 2017-02-14: https://wiki.qemu.org/P

[Qemu-devel] [PATCH 09/54] block: Open backing image in force share mode for size probe

2018-02-06 Thread Michael Roth
From: Fam Zheng Management tools create overlays of running guests with qemu-img: $ qemu-img create -b /image/in/use.qcow2 -f qcow2 /overlay/image.qcow2 but this doesn't work anymore due to image locking: qemu-img: /overlay/image.qcow2: Failed to get shared "write" lock Is another pr

Re: [Qemu-devel] [PATCH v5 1/4] target/arm: implement SHA-512 instructions

2018-02-06 Thread Peter Maydell
On 6 February 2018 at 18:57, Ard Biesheuvel wrote: > On 6 February 2018 at 18:56, Ard Biesheuvel wrote: >> On 6 February 2018 at 18:45, Peter Maydell wrote: >>> On 22 January 2018 at 17:26, Ard Biesheuvel >>> wrote: This implements emulation of the new SHA-512 instructions that have

Re: [Qemu-devel] [PATCH 2/2] qapi: add block latency histogram interface

2018-02-06 Thread Eric Blake
On 02/06/2018 12:06 PM, Vladimir Sementsov-Ogievskiy wrote: 06.02.2018 18:50, Eric Blake wrote: On 02/06/2018 08:07 AM, Vladimir Sementsov-Ogievskiy wrote: Set (and clear) histogram through new command block-latency-histogram-set and show new statistics in query-blockstats results. The commi

Re: [Qemu-devel] how to handle QOM 'container' objects whose contents depend on QOM properties?

2018-02-06 Thread Eduardo Habkost
On Tue, Feb 06, 2018 at 06:18:25PM +, Peter Maydell wrote: > [I've cc'd a fairly random selection of people who I thought > might be interested or have an opinion.] > > It's fairly common to have a setup where we have a QOM container > object (like an SoC) which in turn instantiates a lot of c

Re: [Qemu-devel] [PATCH v5 1/4] target/arm: implement SHA-512 instructions

2018-02-06 Thread Ard Biesheuvel
On 6 February 2018 at 18:45, Peter Maydell wrote: > On 22 January 2018 at 17:26, Ard Biesheuvel wrote: >> This implements emulation of the new SHA-512 instructions that have >> been added as an optional extensions to the ARMv8 Crypto Extensions >> in ARM v8.2. >> >> Signed-off-by: Ard Biesheuvel

Re: [Qemu-devel] [PATCH v2] s390x/cpumodel: model PTFF subfunctions for Multiple-epoch facility

2018-02-06 Thread Cornelia Huck
On Mon, 5 Feb 2018 11:29:35 +0100 David Hildenbrand wrote: > For now, the kernel does not properly indicate configured CPU subfunctions > to the guest, but simply uses the host values (as support in KVM is still > missing). That's why we missed to model the PTFF subfunctions that come > with Mul

Re: [Qemu-devel] [qemu-web PATCH] Add a blog post with the presentations from DevConf and FOSDEM 2018

2018-02-06 Thread Thomas Huth
On 06.02.2018 18:25, Marc-André Lureau wrote: > Hi > > On Tue, Feb 6, 2018 at 5:36 PM, Thomas Huth wrote: >> Let's provide some links to the videos from DevConf and FOSDEM. >> >> Signed-off-by: Thomas Huth >> --- >> I've tried my best to find all talks that are related to QEMU, not sure >> whe

Re: [Qemu-devel] [PATCH v5 1/4] target/arm: implement SHA-512 instructions

2018-02-06 Thread Ard Biesheuvel
On 6 February 2018 at 18:56, Ard Biesheuvel wrote: > On 6 February 2018 at 18:45, Peter Maydell wrote: >> On 22 January 2018 at 17:26, Ard Biesheuvel >> wrote: >>> This implements emulation of the new SHA-512 instructions that have >>> been added as an optional extensions to the ARMv8 Crypto Ex

Re: [Qemu-devel] [PATCH v2] iotests: 205: support luks format

2018-02-06 Thread Eric Blake
On 02/06/2018 12:26 PM, Daniel P. Berrangé wrote: On Tue, Feb 06, 2018 at 09:25:07PM +0300, Vladimir Sementsov-Ogievskiy wrote: Support default luks options in VM.add_drive and in new library function qemu_img_create. Use it in 205 iotests. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Rev

[Qemu-devel] [PULL 11/11] vfio/pci: Add option to disable GeForce quirks

2018-02-06 Thread Alex Williamson
These quirks are necessary for GeForce, but not for Quadro/GRID/Tesla assignment. Leaving them enabled is fully functional and provides the most compatibility, but due to the unique NVIDIA MSI ACK behavior[1], it also introduces latency in re-triggering the MSI interrupt. This overhead is typical

Re: [Qemu-devel] [PATCH v5 1/1] s390x/cpu: expose the guest crash information

2018-02-06 Thread Eric Blake
On 02/06/2018 12:21 PM, Christian Borntraeger wrote: +    CRASH_REASON_UNKNOWN,  /* default value of 0 on reset */ +    CRASH_REASON_PGM, +    CRASH_REASON_EXT, +    CRASH_REASON_WAITPSW, +    CRASH_REASON_OPEREXC, ...you have an internal enum for decoding some of those integer values into

[Qemu-devel] [PULL 08/11] vfio/pci: Allow relocating MSI-X MMIO

2018-02-06 Thread Alex Williamson
Recently proposed vfio-pci kernel changes (v4.16) remove the restriction preventing userspace from mmap'ing PCI BARs in areas overlapping the MSI-X vector table. This change is primarily intended to benefit host platforms which make use of system page sizes larger than the PCI spec recommendation

Re: [Qemu-devel] [PATCH v5 1/4] target/arm: implement SHA-512 instructions

2018-02-06 Thread Peter Maydell
On 22 January 2018 at 17:26, Ard Biesheuvel wrote: > This implements emulation of the new SHA-512 instructions that have > been added as an optional extensions to the ARMv8 Crypto Extensions > in ARM v8.2. > > Signed-off-by: Ard Biesheuvel > +void HELPER(crypto_sha512h)(void *vd, void *vn, void

[Qemu-devel] [PULL 06/11] vfio/pci: Emulate BARs

2018-02-06 Thread Alex Williamson
The kernel provides similar emulation of PCI BAR register access to QEMU, so up until now we've used that for things like BAR sizing and storing the BAR address. However, if we intend to resize BARs or add BARs that don't exist on the physical device, we need to switch to the pure QEMU emulation o

<    1   2   3   4   5   >