qemu.git
14 months agomeson: add qemu-keymap
Marc-André Lureau [Mon, 15 Jul 2019 10:48:31 +0000 (14:48 +0400)] 
meson: add qemu-keymap

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: add qemu-bridge-helper
Marc-André Lureau [Mon, 15 Jul 2019 10:39:25 +0000 (14:39 +0400)] 
meson: add qemu-bridge-helper

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: convert dummy Windows qga/qemu-ga target
Paolo Bonzini [Tue, 28 Jan 2020 14:06:16 +0000 (15:06 +0100)] 
meson: convert dummy Windows qga/qemu-ga target

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: add msi generation
Marc-André Lureau [Mon, 15 Jul 2019 09:06:20 +0000 (13:06 +0400)] 
meson: add msi generation

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: convert vss-win32
Marc-André Lureau [Mon, 15 Jul 2019 07:39:13 +0000 (11:39 +0400)] 
meson: convert vss-win32

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: convert qemu-ga
Paolo Bonzini [Thu, 18 Jul 2019 11:19:02 +0000 (13:19 +0200)] 
meson: convert qemu-ga

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: add solaris and Haiku libraries
Paolo Bonzini [Sun, 9 Aug 2020 21:47:45 +0000 (23:47 +0200)] 
meson: add solaris and Haiku libraries

There is no probing in configure, so no need to pass them as
variables to meson.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: add macos dependencies
Marc-André Lureau [Tue, 20 Aug 2019 15:48:59 +0000 (19:48 +0400)] 
meson: add macos dependencies

There is no probing in configure, so no need to pass them as
variables to meson. Do a regular meson dependency() instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agocontrib/elf2dmp: convert to meson
Marc-André Lureau [Fri, 12 Jul 2019 19:47:06 +0000 (23:47 +0400)] 
contrib/elf2dmp: convert to meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agocontrib/ivshmem: convert to meson
Marc-André Lureau [Fri, 12 Jul 2019 19:16:54 +0000 (23:16 +0400)] 
contrib/ivshmem: convert to meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agocontrib/vhost-user-gpu: convert to meson
Marc-André Lureau [Fri, 12 Jul 2019 18:23:46 +0000 (22:23 +0400)] 
contrib/vhost-user-gpu: convert to meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agocontrib/vhost-user-input: convert to meson
Marc-André Lureau [Fri, 12 Jul 2019 18:11:20 +0000 (22:11 +0400)] 
contrib/vhost-user-input: convert to meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agocontrib/rdmacm-mux: convert to Meson
Paolo Bonzini [Mon, 10 Jun 2019 10:27:52 +0000 (12:27 +0200)] 
contrib/rdmacm-mux: convert to Meson

We can use config-host.mak to decide whether the tool has to be built,
apart from that the conversion is straightforward.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agocontrib/vhost-user-scsi: convert to Meson
Paolo Bonzini [Mon, 10 Jun 2019 10:21:14 +0000 (12:21 +0200)] 
contrib/vhost-user-scsi: convert to Meson

The libiscsi pkg-config information is extracted from config-host.mak and
used to link vhost-user-blk.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agovhost-user-scsi: add compatibility for libiscsi 1.9.0
Paolo Bonzini [Mon, 10 Aug 2020 19:15:19 +0000 (21:15 +0200)] 
vhost-user-scsi: add compatibility for libiscsi 1.9.0

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agocontrib/vhost-user-blk: convert to Meson
Paolo Bonzini [Mon, 10 Jun 2019 10:18:02 +0000 (12:18 +0200)] 
contrib/vhost-user-blk: convert to Meson

The GLib pkg-config information is extracted from config-host.mak and
used to link vhost-user-blk.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agotools/virtiofsd: convert to Meson
Paolo Bonzini [Wed, 5 Feb 2020 08:45:39 +0000 (09:45 +0100)] 
tools/virtiofsd: convert to Meson

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agocontrib/libvhost-user: convert to Meson
Paolo Bonzini [Wed, 5 Feb 2020 08:44:24 +0000 (09:44 +0100)] 
contrib/libvhost-user: convert to Meson

Since libqemuutil.a has been converted to Meson, the conversion is
straightforward.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: add version.o
Marc-André Lureau [Wed, 17 Jul 2019 20:31:05 +0000 (00:31 +0400)] 
meson: add version.o

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: add remaining generated tcg trace helpers
Marc-André Lureau [Mon, 15 Jul 2019 14:48:06 +0000 (18:48 +0400)] 
meson: add remaining generated tcg trace helpers

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agolibqemuutil, qapi, trace: convert to meson
Paolo Bonzini [Wed, 19 Aug 2020 12:44:56 +0000 (08:44 -0400)] 
libqemuutil, qapi, trace: convert to meson

This shows how to do some "computations" in meson.build using its array
and dictionary data structures, and also a basic usage of the sourceset
module for conditional compilation.

Notice the new "if have_system" part of util/meson.build, which fixes
a bug in the old build system was buggy: util/dbus.c was built even for
non-softmmu builds, but the dependency on -lgio was lost when the linking
was done through libqemuutil.a.  Because all of its users required gio
otherwise, the bug was hidden.  Meson instead propagates libqemuutil's
dependencies down to its users, and shows the problem.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: add testsuite Makefile generator
Paolo Bonzini [Tue, 28 Jan 2020 13:48:54 +0000 (14:48 +0100)] 
meson: add testsuite Makefile generator

Rules to execute tests are generated by a simple Python program
that integrates into the existing "make check" mechanism.  This
provides familiarity for developers, and also allows piecewise
conversion of the testsuite Makefiles to meson.

The generated rules are based on QEMU's existing test harness
Makefile and TAP parser.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: add sparse support
Paolo Bonzini [Mon, 3 Feb 2020 13:45:33 +0000 (14:45 +0100)] 
meson: add sparse support

Do not use cgcc; instead, extract compilation commands from compile_commands.json
and invoke sparse directly.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: use coverage option
Marc-André Lureau [Fri, 4 Oct 2019 13:35:16 +0000 (17:35 +0400)] 
meson: use coverage option

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: enable pie
Marc-André Lureau [Tue, 17 Sep 2019 11:39:36 +0000 (15:39 +0400)] 
meson: enable pie

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: move summary to meson.build
Paolo Bonzini [Mon, 3 Feb 2020 12:28:38 +0000 (13:28 +0100)] 
meson: move summary to meson.build

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agobuild-sys: add meson submodule
Marc-André Lureau [Wed, 21 Aug 2019 07:21:16 +0000 (11:21 +0400)] 
build-sys: add meson submodule

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agobuild-sys hack: link with whole .fa archives
Marc-André Lureau [Tue, 16 Jul 2019 08:30:43 +0000 (12:30 +0400)] 
build-sys hack: link with whole .fa archives

In order to link the *-obj-y files into tests, we will make static
libraries of them in Meson, and then link them as whole archives
into the tests.  To separate regular static libraries from link-whole
libraries, give them a different file extension.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agoconfigure: generate Meson cross file
Marc-André Lureau [Fri, 12 Jul 2019 21:47:54 +0000 (01:47 +0400)] 
configure: generate Meson cross file

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agoconfigure: integrate Meson in the build system
Paolo Bonzini [Mon, 10 Jun 2019 10:05:14 +0000 (12:05 +0200)] 
configure: integrate Meson in the build system

The Meson build system is integrated in the existing configure/make steps
by invoking Meson from the configure script and converting Meson's build.ninja
rules to an included Makefile.

build.ninja already provides tags/ctags/cscope rules, so they are removed.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agoconfigure: add support for pseudo-"in source tree" builds
Daniel P. Berrangé [Fri, 21 Aug 2020 10:22:04 +0000 (12:22 +0200)] 
configure: add support for pseudo-"in source tree" builds

Meson requires the build dir to be separate from the source tree. Many
people are used to just running "./configure && make" though and the
meson conversion breaks that.

This introduces some backcompat support to make it appear as if an
"in source tree" build is being done, but with the results in the
"build/" directory. This allows "./configure && make" to work as it
did historically, albeit with the output binaries staying under build/.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agotests/vm: include setuptools
Paolo Bonzini [Mon, 10 Aug 2020 11:44:26 +0000 (13:44 +0200)] 
tests/vm: include setuptools

They are a dependency of Meson, so install them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agoconfigure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson
Paolo Bonzini [Mon, 3 Feb 2020 14:22:17 +0000 (15:22 +0100)] 
configure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson

Split between CFLAGS/QEMU_CFLAGS and CXXFLAGS/QEMU_CXXFLAGS so that
we will use CFLAGS and CXXFLAGS for flags that we do not want to
pass to add_project_arguments.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agoconfigure: expand path variables for meson configure
Marc-André Lureau [Thu, 11 Jul 2019 15:13:39 +0000 (19:13 +0400)] 
configure: expand path variables for meson configure

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agoconfigure: do not include $(...) variables in config-host.mak
Paolo Bonzini [Mon, 10 Jun 2019 10:03:04 +0000 (12:03 +0200)] 
configure: do not include $(...) variables in config-host.mak

This ensures that Meson will be able to reuse the results of
the tests that are performed in the configure script.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agonsis: use "make DESTDIR=" instead of "make prefix="
Paolo Bonzini [Mon, 10 Aug 2020 13:23:28 +0000 (15:23 +0200)] 
nsis: use "make DESTDIR=" instead of "make prefix="

The next patch will prevent modifying the prefix on "make install".  Adjust the
creation of the installer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agotests/docker: add test script for static linux-user builds
Paolo Bonzini [Mon, 10 Aug 2020 14:24:29 +0000 (16:24 +0200)] 
tests/docker: add test script for static linux-user builds

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agotests/vm: check for Python YAML parser in the Makefile
Paolo Bonzini [Thu, 6 Aug 2020 12:05:50 +0000 (14:05 +0200)] 
tests/vm: check for Python YAML parser in the Makefile

No need to do it in the configure file if it is only used for a help message.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agotests/vm: do not pollute configure with --efi-aarch64
Paolo Bonzini [Thu, 6 Aug 2020 12:00:50 +0000 (14:00 +0200)] 
tests/vm: do not pollute configure with --efi-aarch64

Just make EFI_AARCH64 a variable in the makefile that defaults to the efi
firmware included with QEMU.  It can be redefined on the "make" command
line.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agobuild-sys hack: ensure target directory is there
Marc-André Lureau [Tue, 27 Aug 2019 17:57:39 +0000 (21:57 +0400)] 
build-sys hack: ensure target directory is there

By removing some unnest-vars calls, we miss some directory creation
that may be required by some/dir/object.d.

This will go away once everything is converted to Meson.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: rename .inc.h files to .h.inc
Paolo Bonzini [Tue, 4 Feb 2020 11:41:01 +0000 (12:41 +0100)] 
meson: rename .inc.h files to .h.inc

Make it consistent with '.c.inc' and '.rst.inc'.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agomeson: rename included C source files to .c.inc
Paolo Bonzini [Tue, 4 Feb 2020 11:41:01 +0000 (12:41 +0100)] 
meson: rename included C source files to .c.inc

With Makefiles that have automatically generated dependencies, you
generated includes are set as dependencies of the Makefile, so that they
are built before everything else and they are available when first
building the .c files.

Alternatively you can use a fine-grained dependency, e.g.

        target/arm/translate.o: target/arm/decode-neon-shared.inc.c

With Meson you have only one choice and it is a third option, namely
"build at the beginning of the corresponding target"; the way you
express it is to list the includes in the sources of that target.

The problem is that Meson decides if something is a source vs. a
generated include by looking at the extension: '.c', '.cc', '.m', '.C'
are sources, while everything else is considered an include---including
'.inc.c'.

Use '.c.inc' to avoid this, as it is consistent with our other convention
of using '.rst.inc' for included reStructuredText files.  The editorconfig
file is adjusted.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agotrace: switch position of headers to what Meson requires
Paolo Bonzini [Tue, 4 Feb 2020 11:20:10 +0000 (12:20 +0100)] 
trace: switch position of headers to what Meson requires

Meson doesn't enjoy the same flexibility we have with Make in choosing
the include path.  In particular the tracing headers are using
$(build_root)/$(<D).

In order to keep the include directives unchanged,
the simplest solution is to generate headers with patterns like
"trace/trace-audio.h" and place forwarding headers in the source tree
such that for example "audio/trace.h" includes "trace/trace-audio.h".

This patch is too ugly to be applied to the Makefiles now.  It's only
a way to separate the changes to the tracing header files from the
Meson rewrite of the tracing logic.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agopc-bios/s390-ccw: do not use rules.mak
Thomas Huth [Fri, 7 Aug 2020 14:14:52 +0000 (16:14 +0200)] 
pc-bios/s390-ccw: do not use rules.mak

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agooptionrom: simplify Makefile
Marc-André Lureau [Tue, 8 Oct 2019 15:27:24 +0000 (19:27 +0400)] 
optionrom: simplify Makefile

Make it independent from the rules.mak, and clean up to use pattern rules.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agooss-fuzz/build: remove LIB_FUZZING_ENGINE
Paolo Bonzini [Sun, 9 Aug 2020 15:17:00 +0000 (17:17 +0200)] 
oss-fuzz/build: remove LIB_FUZZING_ENGINE

Meson build scripts will only include qemu-fuzz-TARGET rules if configured
with --enable-fuzzing, and that takes care of adding -fsanitize=fuzzer.
Therefore we can just specify the configure option and stop modifying
the CFLAGS and CONFIG_FUZZ options in the "make" invocation.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 months agoMerge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-08-11' into staging
Peter Maydell [Wed, 19 Aug 2020 21:19:11 +0000 (22:19 +0100)] 
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-08-11' into staging

Block patches for 5.1.0-rc4:
- Fix abort when running a backup job on an image whose size is not
  aligned to the backup job's cluster size

# gpg: Signature made Tue 11 Aug 2020 10:29:27 BST
# gpg:                using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
# gpg:                issuer "mreitz@redhat.com"
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40

* remotes/maxreitz/tags/pull-block-2020-08-11:
  iotests: add test for unaligned granularity bitmap backup
  block/block-copy: always align copied region to cluster size

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoOpen 5.2 development tree
Peter Maydell [Tue, 18 Aug 2020 12:44:04 +0000 (13:44 +0100)] 
Open 5.2 development tree

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoUpdate version for v5.1.0 release v5.1.0
Peter Maydell [Tue, 11 Aug 2020 16:07:03 +0000 (17:07 +0100)] 
Update version for v5.1.0 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoiotests: add test for unaligned granularity bitmap backup
Stefan Reiter [Mon, 10 Aug 2020 09:55:23 +0000 (11:55 +0200)] 
iotests: add test for unaligned granularity bitmap backup

Start a VM with a 4097 byte image attached, add a 4096 byte granularity
dirty bitmap, mark it dirty, and then do a backup.

This used to run into an assert and fail, check that it works as
expected and also check the created image to ensure that misaligned
backups in general work correctly.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Message-Id: <20200810095523.15071-2-s.reiter@proxmox.com>
[mreitz: Drop bitmap, and do not write past the image's end]
Signed-off-by: Max Reitz <mreitz@redhat.com>
14 months agoblock/block-copy: always align copied region to cluster size
Stefan Reiter [Mon, 10 Aug 2020 09:55:22 +0000 (11:55 +0200)] 
block/block-copy: always align copied region to cluster size

Since commit 42ac214406e0 (block/block-copy: refactor task creation)
block_copy_task_create calculates the area to be copied via
bdrv_dirty_bitmap_next_dirty_area, but that can return an unaligned byte
count if the image's last cluster end is not aligned to the bitmap's
granularity.

Always ALIGN_UP the resulting bytes value to satisfy block_copy_do_copy,
which requires the 'bytes' parameter to be aligned to cluster size.

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Message-Id: <20200810095523.15071-1-s.reiter@proxmox.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
14 months agoUpdate version for v5.1.0-rc3 release v5.1.0-rc3
Peter Maydell [Wed, 5 Aug 2020 16:37:17 +0000 (17:37 +0100)] 
Update version for v5.1.0-rc3 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agotarget/arm: Fix Rt/Rt2 in ESR_ELx for copro traps from AArch32 to 64
Peter Maydell [Tue, 4 Aug 2020 19:39:03 +0000 (20:39 +0100)] 
target/arm: Fix Rt/Rt2 in ESR_ELx for copro traps from AArch32 to 64

When a coprocessor instruction in an  AArch32 guest traps to AArch32
Hyp mode, the syndrome register (HSR) includes Rt and Rt2 fields
which are simply copies of the Rt and Rt2 fields from the trapped
instruction.  However, if the instruction is trapped from AArch32 to
an AArch64 higher exception level, the Rt and Rt2 fields in the
syndrome register (ESR_ELx) must be the AArch64 view of the register.
This makes a difference if the AArch32 guest was in a mode other than
User or System and it was using r13 or r14, or if it was in FIQ mode
and using r8-r14.

We don't know at translate time which AArch32 CPU mode we are in, so
we leave the values we generate in our prototype syndrome register
value at translate time as the raw Rt/Rt2 from the instruction, and
instead correct them to the AArch64 view when we find we need to take
an exception from AArch32 to AArch64 with one of these syndrome
values.

Fixes: https://bugs.launchpad.net/qemu/+bug/1879587
Reported-by: Julien Freche <julien@bedrocksystems.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200804193903.31240-1-peter.maydell@linaro.org

14 months agoqcow2-cluster: Fix integer left shift error in qcow2_alloc_cluster_link_l2()
Tuguoyi [Wed, 5 Aug 2020 09:22:58 +0000 (09:22 +0000)] 
qcow2-cluster: Fix integer left shift error in qcow2_alloc_cluster_link_l2()

When calculating the offset, the result of left shift operation will be promoted
to type int64 automatically because the left operand of + operator is uint64_t.
but the result after integer promotion may be produce an error value for us and
trigger the following asserting error.

For example, consider i=0x2000, cluster_bits=18, the result of left shift
operation will be 0x80000000. Cause argument i is of signed integer type,
the result is automatically promoted to 0xffffffff80000000 which is not
we expected

The way to trigger the assertion error:
  qemu-img create -f qcow2 -o preallocation=full,cluster_size=256k tmpdisk 10G

This patch fix it by casting @i to uint64_t before doing left shift operation

Signed-off-by: Guoyi Tu <tu.guoyi@h3c.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-id: 81ba90fe0c014f269621c283269b42ad@h3c.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoMerge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-08-05' into...
Peter Maydell [Wed, 5 Aug 2020 10:02:46 +0000 (11:02 +0100)] 
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-08-05' into staging

* Test rx-softmmu, avr-softmmu, Centos7 and Debian on gitlab-CI
* Fix compiler warning on 32-bit big endian systems
* Remove remainders of libqemustub.a

# gpg: Signature made Wed 05 Aug 2020 10:51:32 BST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2020-08-05:
  Get rid of the libqemustub.a remainders
  target/riscv/vector_helper: Fix build on 32-bit big endian hosts
  gitlab-ci: Fix Avocado cache usage
  gitlab-ci.yml: Add build-system-debian and build-system-centos jobs
  tests/acceptance: Disable the rx sash and arm cubieboard replay test on Gitlab
  tests/docker: Add python3-venv and netcat to the debian-amd64 container

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoGet rid of the libqemustub.a remainders
Thomas Huth [Mon, 3 Aug 2020 19:14:57 +0000 (21:14 +0200)] 
Get rid of the libqemustub.a remainders

libqemustub.a has been removed in commit ebedb37c8d ("Makefile: Remove
libqemustub.a"). Some remainders have been missed. Remove them now.

Message-Id: <20200804170055.2851-8-thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
14 months agotarget/riscv/vector_helper: Fix build on 32-bit big endian hosts
Thomas Huth [Mon, 3 Aug 2020 17:54:36 +0000 (19:54 +0200)] 
target/riscv/vector_helper: Fix build on 32-bit big endian hosts

The code currently fails to compile on 32-bit big endian hosts:

 target/riscv/vector_helper.c: In function 'vext_clear':
 target/riscv/vector_helper.c:154:16: error: cast to pointer from integer
 of different size [-Werror=int-to-pointer-cast]
         memset((void *)((uintptr_t)tail & ~(7ULL)), 0, part1);
                ^
 target/riscv/vector_helper.c:155:16: error: cast to pointer from integer
 of different size [-Werror=int-to-pointer-cast]
         memset((void *)(((uintptr_t)tail + 8) & ~(7ULL)), 0, part2);
                ^
 cc1: all warnings being treated as errors

We should not use "long long" (i.e. 64-bit) values here to avoid the
problem. Switch to our QEMU_ALIGN_PTR_DOWN/UP macros instead.

Fixes: 751538d5da ("add vector stride load and store instructions")
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200804170055.2851-3-thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
14 months agogitlab-ci: Fix Avocado cache usage
Thomas Huth [Thu, 30 Jul 2020 08:35:48 +0000 (10:35 +0200)] 
gitlab-ci: Fix Avocado cache usage

In commit 6957fd98dc ("gitlab: add avocado asset caching") we
tried to save the Avocado cache (as in commit c1073e44b4 with
Travis-CI) however it doesn't work as expected. For some reason
Avocado uses /root/avocado_cache/ which we can not select later.

Manually generate a Avocado config to force the use of the
current job's directory.

This patch is based on an earlier version from Philippe Mathieu-Daudé.

Message-Id: <20200730141326.8260-5-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
14 months agogitlab-ci.yml: Add build-system-debian and build-system-centos jobs
Thomas Huth [Tue, 14 Jul 2020 15:35:45 +0000 (17:35 +0200)] 
gitlab-ci.yml: Add build-system-debian and build-system-centos jobs

We were missing the two new targets avr-softmmu and rx-softmmu in the
gitlab-CI so far, and did not add some of the "other endianess" targets
like sh4eb-softmmu yet.
Since the current build-system-* jobs run already for a very long time,
let's do not add these missing targets there, but introduce two new
additional build jobs, one running with Debian and one running with
CentOS, and add the new targets there. Also move some targets from
the old build-system-* jobs to these new targets, to distribute the
load and reduce the runtime of the CI.

Message-Id: <20200730141326.8260-4-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
14 months agotests/acceptance: Disable the rx sash and arm cubieboard replay test on Gitlab
Thomas Huth [Thu, 23 Jul 2020 06:36:04 +0000 (08:36 +0200)] 
tests/acceptance: Disable the rx sash and arm cubieboard replay test on Gitlab

These tests always time out on Gitlab, not sure what's happening here.
Let's disable them until somebody has enough spare time to debug the
issues.

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20200730141326.8260-3-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
14 months agotests/docker: Add python3-venv and netcat to the debian-amd64 container
Thomas Huth [Wed, 15 Jul 2020 04:35:01 +0000 (06:35 +0200)] 
tests/docker: Add python3-venv and netcat to the debian-amd64 container

Without python3-venv, I get the following message when trying to
run the acceptance tests within the debian container:

 The virtual environment was not created successfully because ensurepip is not
 available.  On Debian/Ubuntu systems, you need to install the python3-venv
 package using the following command.
    apt-get install python3-venv
 You may need to use sudo with that command.  After installing the python3-venv
 package, recreate your virtual environment.

Let's do it as the message suggests.

And while we're at it, also add netcat here since it is required for
some of the acceptance tests.

Message-Id: <20200730141326.8260-2-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
14 months agoMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200804' into...
Peter Maydell [Tue, 4 Aug 2020 17:20:32 +0000 (18:20 +0100)] 
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200804' into staging

target-arm queue:
 * Fix decode of LDRA[AB] instructions
 * docs/devel: Document decodetree no-overlap groups

# gpg: Signature made Tue 04 Aug 2020 17:08:11 BST
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20200804:
  target/arm: Fix decode of LDRA[AB] instructions
  docs/devel: Document decodetree no-overlap groups

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoMerge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
Peter Maydell [Tue, 4 Aug 2020 15:51:32 +0000 (16:51 +0100)] 
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

virtio: bugfix

A last minute bugfix.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Tue 04 Aug 2020 16:48:37 BST
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  virtio-mem: Correct format specifier mismatch for RISC-V

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agovirtio-mem: Correct format specifier mismatch for RISC-V
Bruce Rogers [Thu, 30 Jul 2020 13:05:19 +0000 (07:05 -0600)] 
virtio-mem: Correct format specifier mismatch for RISC-V

This likely affects other, less popular host architectures as well.
Less common host architectures under linux get QEMU_VMALLOC_ALIGN (from
which VIRTIO_MEM_MIN_BLOCK_SIZE is derived) define to a variable of
type uintptr, which isn't compatible with the format specifier used to
print a user message. Since this particular usage of the underlying data
seems unique to this file, the simple fix is to just cast
QEMU_VMALLOC_ALIGN to uint32_t, which corresponds to the format specifier
used.

Signed-off-by: Bruce Rogers <brogers@suse.com>
Message-Id: <20200730130519.168475-1-brogers@suse.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
14 months agotarget/arm: Fix decode of LDRA[AB] instructions
Peter Collingbourne [Tue, 4 Aug 2020 00:28:49 +0000 (17:28 -0700)] 
target/arm: Fix decode of LDRA[AB] instructions

These instructions use zero as the discriminator, not SP.

Signed-off-by: Peter Collingbourne <pcc@google.com>
Message-id: 20200804002849.30268-1-pcc@google.com
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agodocs/devel: Document decodetree no-overlap groups
Richard Henderson [Mon, 3 Aug 2020 20:57:08 +0000 (13:57 -0700)] 
docs/devel: Document decodetree no-overlap groups

When support for this feature went in, the update to the
documentation was forgotten.

Fixes: 067e8b0f45d6
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200803205708.315829-1-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoMerge remote-tracking branch 'remotes/aperard/tags/pull-xen-20200804' into staging
Peter Maydell [Tue, 4 Aug 2020 10:53:20 +0000 (11:53 +0100)] 
Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20200804' into staging

xen patch

Bug fix.

# gpg: Signature made Tue 04 Aug 2020 10:24:51 BST
# gpg:                using RSA key F80C006308E22CFD8A92E7980CF5572FD7FB55AF
# gpg:                issuer "anthony.perard@citrix.com"
# gpg: Good signature from "Anthony PERARD <anthony.perard@gmail.com>" [marginal]
# gpg:                 aka "Anthony PERARD <anthony.perard@citrix.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 5379 2F71 024C 600F 778A  7161 D8D5 7199 DF83 42C8
#      Subkey fingerprint: F80C 0063 08E2 2CFD 8A92  E798 0CF5 572F D7FB 55AF

* remotes/aperard/tags/pull-xen-20200804:
  accel/xen: Fix xen_enabled() behavior on target-agnostic objects

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoaccel/xen: Fix xen_enabled() behavior on target-agnostic objects
Philippe Mathieu-Daudé [Tue, 4 Aug 2020 07:49:30 +0000 (09:49 +0200)] 
accel/xen: Fix xen_enabled() behavior on target-agnostic objects

CONFIG_XEN is generated by configure and stored in "config-target.h",
which is (obviously) only include for target-specific objects.
This is a problem for target-agnostic objects as CONFIG_XEN is never
defined and xen_enabled() is always inlined as 'false'.

Fix by following the KVM schema, defining CONFIG_XEN_IS_POSSIBLE
when we don't know to force the call of the non-inlined function,
returning the xen_allowed boolean.

Fixes: da278d58a092 ("accel: Move Xen accelerator code under accel/xen/")
Reported-by: Paul Durrant <pdurrant@amazon.com>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <20200804074930.13104-2-philmd@redhat.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
14 months agoMerge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
Peter Maydell [Tue, 4 Aug 2020 09:20:08 +0000 (10:20 +0100)] 
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging

# gpg: Signature made Tue 04 Aug 2020 07:15:08 BST
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  hw/net/net_tx_pkt: fix assertion failure in net_tx_pkt_add_raw_fragment()
  colo-compare: Remove superfluous NULL-pointer checks for s->iothread

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agohw/net/net_tx_pkt: fix assertion failure in net_tx_pkt_add_raw_fragment()
Mauro Matteo Cascella [Sat, 1 Aug 2020 16:42:38 +0000 (18:42 +0200)] 
hw/net/net_tx_pkt: fix assertion failure in net_tx_pkt_add_raw_fragment()

An assertion failure issue was found in the code that processes network packets
while adding data fragments into the packet context. It could be abused by a
malicious guest to abort the QEMU process on the host. This patch replaces the
affected assert() with a conditional statement, returning false if the current
data fragment exceeds max_raw_frags.

Reported-by: Alexander Bulekov <alxndr@bu.edu>
Reported-by: Ziming Zhang <ezrakiez@gmail.com>
Reviewed-by: Dmitry Fleytman <dmitry.fleytman@gmail.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
14 months agocolo-compare: Remove superfluous NULL-pointer checks for s->iothread
Lukas Straub [Fri, 31 Jul 2020 05:06:04 +0000 (07:06 +0200)] 
colo-compare: Remove superfluous NULL-pointer checks for s->iothread

s->iothread is checked for NULL on object creation in colo_compare_complete,
so it's guaranteed not to be NULL.
This resolves a false alert from Coverity (CID 1429969).

Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
14 months agoMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200803' into...
Peter Maydell [Mon, 3 Aug 2020 19:34:26 +0000 (20:34 +0100)] 
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200803' into staging

target-arm queue:
 * hw/timer/imx_epit: Avoid assertion when CR.SWR is written
 * netduino2, netduinoplus2, microbit: set system_clock_scale so that
   SysTick running on the CPU clock works
 * target/arm: Avoid maybe-uninitialized warning with gcc 4.9
 * target/arm: Fix AddPAC error indication
 * Make AIRCR.SYSRESETREQ actually reset the system for the
   microbit, mps2-*, musca-*, netduino* boards

# gpg: Signature made Mon 03 Aug 2020 20:29:17 BST
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20200803:
  hw/timer/imx_epit: Avoid assertion when CR.SWR is written
  hw/arm/nrf51_soc: Set system_clock_scale
  target/arm: Avoid maybe-uninitialized warning with gcc 4.9
  target/arm: Fix AddPAC error indication
  msf2-soc, stellaris: Don't wire up SYSRESETREQ
  hw/intc/armv7m_nvic: Provide default "reset the system" behaviour for SYSRESETREQ
  include/hw/irq.h: New function qemu_irq_is_connected()
  hw/arm/netduino2, netduinoplus2: Set system_clock_scale

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agohw/timer/imx_epit: Avoid assertion when CR.SWR is written
Peter Maydell [Mon, 27 Jul 2020 15:45:50 +0000 (16:45 +0100)] 
hw/timer/imx_epit: Avoid assertion when CR.SWR is written

The imx_epit device has a software-controllable reset triggered by
setting the SWR bit in the CR register. An error in commit cc2722ec83ad9
means that we will end up assert()ing if the guest does this, because
the code in imx_epit_write() starts ptimer transactions, and then
imx_epit_reset() also starts ptimer transactions, triggering
"ptimer_transaction_begin: Assertion `!s->in_transaction' failed".

The cleanest way to avoid this double-transaction is to move the
start-transaction for the CR write handling down below the check of
the SWR bit.

Fixes: https://bugs.launchpad.net/qemu/+bug/1880424
Fixes: cc2722ec83ad944505fe
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20200727154550.3409-1-peter.maydell@linaro.org

14 months agohw/arm/nrf51_soc: Set system_clock_scale
Peter Maydell [Mon, 27 Jul 2020 19:34:58 +0000 (20:34 +0100)] 
hw/arm/nrf51_soc: Set system_clock_scale

The nrf51 SoC model wasn't setting the system_clock_scale
global.which meant that if guest code used the systick timer in "use
the processor clock" mode it would hang because time never advances.

Set the global to match the documented CPU clock speed for this SoC.

This SoC in fact doesn't have a SysTick timer (which is the only thing
currently that cares about the system_clock_scale), because it's
a configurable option in the Cortex-M0. However our Cortex-M0 and
thus our nrf51 and our micro:bit board do provide a SysTick, so
we ought to provide a functional one rather than a broken one.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20200727193458.31250-1-peter.maydell@linaro.org

14 months agotarget/arm: Avoid maybe-uninitialized warning with gcc 4.9
Kaige Li [Mon, 3 Aug 2020 16:55:04 +0000 (17:55 +0100)] 
target/arm: Avoid maybe-uninitialized warning with gcc 4.9

GCC version 4.9.4 isn't clever enough to figure out that all
execution paths in disas_ldst() that use 'fn' will have initialized
it first, and so it warns:

/home/LiKaige/qemu/target/arm/translate-a64.c: In function ‘disas_ldst’:
/home/LiKaige/qemu/target/arm/translate-a64.c:3392:5: error: ‘fn’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
     fn(cpu_reg(s, rt), clean_addr, tcg_rs, get_mem_index(s),
     ^
/home/LiKaige/qemu/target/arm/translate-a64.c:3318:22: note: ‘fn’ was declared here
     AtomicThreeOpFn *fn;
                      ^

Make it happy by initializing the variable to NULL.

Signed-off-by: Kaige Li <likaige@loongson.cn>
Message-id: 1596110248-7366-2-git-send-email-likaige@loongson.cn
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: Clean up commit message and note which gcc version this was]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agotarget/arm: Fix AddPAC error indication
Richard Henderson [Mon, 3 Aug 2020 16:55:03 +0000 (17:55 +0100)] 
target/arm: Fix AddPAC error indication

The definition of top_bit used in this function is one higher
than that used in the Arm ARM psuedo-code, which put the error
indication at top_bit - 1 at the wrong place, which meant that
it wasn't visible to Auth.

Fixing the definition of top_bit requires more changes, because
its most common use is for the count of bits in top_bit:bot_bit,
which would then need to be computed as top_bit - bot_bit + 1.

For now, prefer the minimal fix to the error indication alone.

Fixes: 63ff0ca94cb
Reported-by: Derrick McKee <derrick.mckee@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20200728195706.11087-1-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: added comment about the divergence from the pseudocode]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agomsf2-soc, stellaris: Don't wire up SYSRESETREQ
Peter Maydell [Mon, 3 Aug 2020 16:55:03 +0000 (17:55 +0100)] 
msf2-soc, stellaris: Don't wire up SYSRESETREQ

The MSF2 SoC model and the Stellaris board code both wire
SYSRESETREQ up to a function that just invokes
    qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
This is now the default action that the NVIC does if the line is
not connected, so we can delete the handling code.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200728103744.6909-4-peter.maydell@linaro.org

14 months agohw/intc/armv7m_nvic: Provide default "reset the system" behaviour for SYSRESETREQ
Peter Maydell [Mon, 3 Aug 2020 16:55:03 +0000 (17:55 +0100)] 
hw/intc/armv7m_nvic: Provide default "reset the system" behaviour for SYSRESETREQ

The NVIC provides an outbound qemu_irq "SYSRESETREQ" which it signals
when the guest sets the SYSRESETREQ bit in the AIRCR register.  This
matches the hardware design (where the CPU has a signal of this name
and it is up to the SoC to connect that up to an actual reset
mechanism), but in QEMU it mostly results in duplicated code in SoC
objects and bugs where SoC model implementors forget to wire up the
SYSRESETREQ line.

Provide a default behaviour for the case where SYSRESETREQ is not
actually connected to anything: use qemu_system_reset_request() to
perform a system reset.  This will allow us to remove the
implementations of SYSRESETREQ handling from the boards where that's
exactly what it does, and also fixes the bugs in the board models
which forgot to wire up the signal:

 * microbit
 * mps2-an385
 * mps2-an505
 * mps2-an511
 * mps2-an521
 * musca-a
 * musca-b1
 * netduino
 * netduinoplus2

We still allow the board to wire up the signal if it needs to, in case
we need to model more complicated reset controller logic or to model
buggy SoC hardware which forgot to wire up the line itself. But
defaulting to "reset the system" is more often going to be correct
than defaulting to "do nothing".

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200728103744.6909-3-peter.maydell@linaro.org

14 months agoinclude/hw/irq.h: New function qemu_irq_is_connected()
Peter Maydell [Mon, 3 Aug 2020 16:55:03 +0000 (17:55 +0100)] 
include/hw/irq.h: New function qemu_irq_is_connected()

Mostly devices don't need to care whether one of their output
qemu_irq lines is connected, because functions like qemu_set_irq()
silently do nothing if there is nothing on the other end.  However
sometimes a device might want to implement default behaviour for the
case where the machine hasn't wired the line up to anywhere.

Provide a function qemu_irq_is_connected() that devices can use for
this purpose.  (The test is trivial but encapsulating it in a
function makes it easier to see where we're doing it in case we need
to change the implementation later.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200728103744.6909-2-peter.maydell@linaro.org

14 months agohw/arm/netduino2, netduinoplus2: Set system_clock_scale
Peter Maydell [Mon, 3 Aug 2020 16:55:03 +0000 (17:55 +0100)] 
hw/arm/netduino2, netduinoplus2: Set system_clock_scale

The netduino2 and netduinoplus2 boards forgot to set the system_clock_scale
global, which meant that if guest code used the systick timer in "use
the processor clock" mode it would hang because time never advances.

Set the global to match the documented CPU clock speed of these boards.
Judging by the data sheet this is slightly simplistic because the
SoC allows configuration of the SYSCLK source and frequency via the
RCC (reset and clock control) module, but we don't model that.

Fixes: https://bugs.launchpad.net/qemu/+bug/1876187
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20200727162617.26227-1-peter.maydell@linaro.org

14 months agoMerge remote-tracking branch 'remotes/ericb/tags/pull-bitmaps-2020-08-03' into staging
Peter Maydell [Mon, 3 Aug 2020 14:13:49 +0000 (15:13 +0100)] 
Merge remote-tracking branch 'remotes/ericb/tags/pull-bitmaps-2020-08-03' into staging

bitmaps patches for 2020-08-03

- fix bitmap migration involving read-only bitmap from backing chain

# gpg: Signature made Mon 03 Aug 2020 15:06:51 BST
# gpg:                using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full]
# gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full]
# gpg:                 aka "[jpeg image of size 6874]" [full]
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* remotes/ericb/tags/pull-bitmaps-2020-08-03:
  iotests/169: Test source cont with backing bmap
  qcow2: Release read-only bitmaps when inactivated

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoiotests/169: Test source cont with backing bmap
Max Reitz [Thu, 30 Jul 2020 12:02:34 +0000 (14:02 +0200)] 
iotests/169: Test source cont with backing bmap

Test migrating from a VM with a persistent bitmap in the backing chain,
and then continuing that VM after the migration

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200730120234.49288-3-mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
14 months agoqcow2: Release read-only bitmaps when inactivated
Max Reitz [Thu, 30 Jul 2020 12:02:33 +0000 (14:02 +0200)] 
qcow2: Release read-only bitmaps when inactivated

During migration, we release all bitmaps after storing them on disk, as
long as they are (1) stored on disk, (2) not read-only, and (3)
consistent.

(2) seems arbitrary, though.  The reason we do not release them is
because we do not write them, as there is no need to; and then we just
forget about all bitmaps that we have not written to the file.  However,
read-only persistent bitmaps are still in the file and in sync with
their in-memory representation, so we may as well release them just like
any R/W bitmap that we have updated.

It leads to actual problems, too: After migration, letting the source
continue may result in an error if there were any bitmaps on read-only
nodes (such as backing images), because those have not been released by
bdrv_inactive_all(), but bdrv_invalidate_cache_all() attempts to reload
them (which fails, because they are still present in memory).

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200730120234.49288-2-mreitz@redhat.com>
Tested-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
14 months agoMerge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-08-03' into staging
Peter Maydell [Mon, 3 Aug 2020 11:21:57 +0000 (12:21 +0100)] 
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-08-03' into staging

QAPI patches patches for 2020-08-03

# gpg: Signature made Mon 03 Aug 2020 10:08:30 BST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2020-08-03:
  schemas: Add vim modeline
  qapi: Delete unwanted indentation of top-level expressions
  qapi/machine.json: Fix missing newline in doc comment

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoMerge remote-tracking branch 'remotes/kraxel/tags/seabios-20200803-pull-request'...
Peter Maydell [Mon, 3 Aug 2020 08:54:58 +0000 (09:54 +0100)] 
Merge remote-tracking branch 'remotes/kraxel/tags/seabios-20200803-pull-request' into staging

seabios: update to master snapshot

seabios master branch got a few bugfixes, so update
to a newer snapshot to pick them up for 5.1-rc3.

# gpg: Signature made Mon 03 Aug 2020 06:24:17 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/seabios-20200803-pull-request:
  seabios: update to master snapshot

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoschemas: Add vim modeline
Andrea Bolognani [Wed, 29 Jul 2020 18:50:24 +0000 (20:50 +0200)] 
schemas: Add vim modeline

The various schemas included in QEMU use a JSON-based format which
is, however, strictly speaking not valid JSON.

As a consequence, when vim tries to apply syntax highlight rules
for JSON (as guessed from the file name), the result is an unreadable
mess which mostly consist of red markers pointing out supposed errors
in, well, pretty much everything.

Using Python syntax highlighting produces much better results, and
in fact these files already start with specially-formatted comments
that instruct Emacs to process them as if they were Python files.

This commit adds the equivalent special comments for vim.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Message-Id: <20200729185024.121766-1-abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
14 months agoqapi: Delete unwanted indentation of top-level expressions
Markus Armbruster [Thu, 30 Jul 2020 09:16:56 +0000 (11:16 +0200)] 
qapi: Delete unwanted indentation of top-level expressions

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200730091656.2633334-1-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[One more line de-indented]

14 months agoqapi/machine.json: Fix missing newline in doc comment
Peter Maydell [Wed, 29 Jul 2020 19:10:19 +0000 (20:10 +0100)] 
qapi/machine.json: Fix missing newline in doc comment

In commit 176d2cda0dee9f4 we added the @die-id field
to the CpuInstanceProperties struct, but in the process
accidentally removed the newline between the doc-comment
lines for @core-id and @thread-id.

Put the newline back in; this fixes a misformatting in the
generated HTML QMP reference manual.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200729191019.19168-1-peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
14 months agoseabios: update to master snapshot
Gerd Hoffmann [Mon, 3 Aug 2020 05:00:58 +0000 (07:00 +0200)] 
seabios: update to master snapshot

seabios master branch got a few bugfixes, so update
to a newer snapshot to pick them up for 5.1-rc3.

shortlog
========

Kevin O'Connor (2):
      vgabios: Fix preserve memory flag in handle_1000
      ldnoexec: Add script to remove ET_EXEC flag from intermediate build objects

Paul Menzel (1):
      nvme: Increase `nvme_cmd_readwrite()` message log level from 3 to 5

Stefan Reiter (1):
      virtio-scsi: fix boot prio detection by using correct lun

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
14 months agoMerge remote-tracking branch 'remotes/cohuck/tags/s390x-20200731' into staging
Peter Maydell [Fri, 31 Jul 2020 09:28:12 +0000 (10:28 +0100)] 
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200731' into staging

Fix a problem introduced in a recent fix.

# gpg: Signature made Fri 31 Jul 2020 09:50:28 BST
# gpg:                using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF
# gpg:                issuer "cohuck@redhat.com"
# gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [marginal]
# gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full]
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full]
# gpg:                 aka "Cornelia Huck <cohuck@kernel.org>" [marginal]
# gpg:                 aka "Cornelia Huck <cohuck@redhat.com>" [marginal]
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/s390x-20200731:
  s390x/s390-virtio-ccw: fix off-by-one in loadparm getter

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoMerge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
Peter Maydell [Thu, 30 Jul 2020 19:02:26 +0000 (20:02 +0100)] 
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging

Pull request

A build fix and a 'simple' trace backend regression fix.

# gpg: Signature made Thu 30 Jul 2020 19:13:10 BST
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/tracing-pull-request:
  tracetool: carefully define SDT_USE_VARIADIC
  trace/simple: Allow enabling simple traces from command line

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agotracetool: carefully define SDT_USE_VARIADIC
Stefan Hajnoczi [Wed, 29 Jul 2020 15:39:26 +0000 (16:39 +0100)] 
tracetool: carefully define SDT_USE_VARIADIC

The dtrace backend defines SDT_USE_VARIADIC as a workaround for a
conflict with a LTTng UST header file, which requires SDT_USE_VARIADIC
to be defined.

LTTng UST <lttng/tracepoint.h> breaks if included after generated dtrace
headers because SDT_USE_VARIADIC will already be defined:

  #ifdef LTTNG_UST_HAVE_SDT_INTEGRATION
  #define SDT_USE_VARIADIC <-- error, it's already defined
  #include <sys/sdt.h>

Be more careful when defining SDT_USE_VARIADIC. This fixes the build
when both the dtrace and ust tracers are enabled at the same time.

Fixes: 27e08bab94f7c6ebe0b75938c98c394c969e3fd8 ("tracetool: work around ust <sys/sdt.h> include conflict")
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20200729153926.127083-1-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
14 months agos390x/s390-virtio-ccw: fix off-by-one in loadparm getter
Halil Pasic [Thu, 30 Jul 2020 13:01:56 +0000 (15:01 +0200)] 
s390x/s390-virtio-ccw: fix off-by-one in loadparm getter

As pointed out by Peter, g_memdup(ms->loadparm, sizeof(ms->loadparm) + 1)
reads one past of the end of ms->loadparm, so g_memdup() can not be used
here.

Let's use g_strndup instead!

Fixes: d6645483285f ("s390x/s390-virtio-ccw: fix loadparm property getter")
Fixes: Coverity CID 1431058
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20200730130156.35063-1-pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
14 months agotrace/simple: Allow enabling simple traces from command line
Josh DuBois [Thu, 23 Jul 2020 05:33:59 +0000 (00:33 -0500)] 
trace/simple: Allow enabling simple traces from command line

The simple trace backend is enabled / disabled with a call
to st_set_trace_file_enabled().  When initializing tracing
from the command-line, this must be enabled on startup.
(Prior to db25d56c014aa1a9, command-line initialization of
simple trace worked because every call to st_set_trace_file
enabled tracing.)

Fixes: db25d56c014aa1a96319c663e0a60346a223b31e
Signed-off-by: Josh DuBois <josh@joshdubois.com>
Message-id: 20200723053359.256928-1-josh@joshdubois.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
14 months agoUpdate version for v5.1.0-rc2 release v5.1.0-rc2
Peter Maydell [Tue, 28 Jul 2020 20:51:03 +0000 (21:51 +0100)] 
Update version for v5.1.0-rc2 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoMerge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2020-07-28' into staging
Peter Maydell [Tue, 28 Jul 2020 19:43:03 +0000 (20:43 +0100)] 
Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2020-07-28' into staging

nbd patches for 2020-07-28

- fix NBD handling of trim/zero requests larger than 2G
- allow no-op resizes on NBD (in turn fixing qemu-img convert -c into NBD)
- several deadlock fixes when using NBD reconnect

# gpg: Signature made Tue 28 Jul 2020 15:59:42 BST
# gpg:                using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A
# gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full]
# gpg:                 aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full]
# gpg:                 aka "[jpeg image of size 6874]" [full]
# Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2  F3AA A7A1 6B4A 2527 436A

* remotes/ericb/tags/pull-nbd-2020-07-28:
  block/nbd: nbd_co_reconnect_loop(): don't sleep if drained
  block/nbd: on shutdown terminate connection attempt
  block/nbd: allow drain during reconnect attempt
  block/nbd: split nbd_establish_connection out of nbd_client_connect
  iotests: Test convert to qcow2 compressed to NBD
  iotests: Add more qemu_img helpers
  iotests: Make qemu_nbd_popen() a contextmanager
  block: nbd: Fix convert qcow2 compressed to nbd
  nbd: Fix large trim/zero requests

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoMerge remote-tracking branch 'remotes/elmarco/tags/slirp-pull-request' into staging
Peter Maydell [Tue, 28 Jul 2020 18:44:03 +0000 (19:44 +0100)] 
Merge remote-tracking branch 'remotes/elmarco/tags/slirp-pull-request' into staging

slirp: update to latest stable-4.2 branch

# gpg: Signature made Tue 28 Jul 2020 15:30:09 BST
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "marcandre.lureau@redhat.com"
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full]
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* remotes/elmarco/tags/slirp-pull-request:
  slirp: update to latest stable-4.2 branch
  test-char: abort on serial test error

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200727' into...
Peter Maydell [Tue, 28 Jul 2020 17:43:48 +0000 (18:43 +0100)] 
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200727' into staging

target-arm queue:
 * ACPI: Assert that we don't run out of the preallocated memory
 * hw/misc/aspeed_sdmc: Fix incorrect memory size
 * target/arm: Always pass cacheattr in S1_ptw_translate
 * docs/system/arm/virt: Document 'mte' machine option
 * hw/arm/boot: Fix PAUTH, MTE for EL3 direct kernel boot
 * target/arm: Improve IMPDEF algorithm for IRG

# gpg: Signature made Mon 27 Jul 2020 16:18:38 BST
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20200727:
  target/arm: Improve IMPDEF algorithm for IRG
  hw/arm/boot: Fix MTE for EL3 direct kernel boot
  hw/arm/boot: Fix PAUTH for EL3 direct kernel boot
  docs/system/arm/virt: Document 'mte' machine option
  target/arm: Always pass cacheattr in S1_ptw_translate
  hw/misc/aspeed_sdmc: Fix incorrect memory size
  ACPI: Assert that we don't run out of the preallocated memory

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoMerge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-07-28' into staging
Peter Maydell [Tue, 28 Jul 2020 17:00:21 +0000 (18:00 +0100)] 
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-07-28' into staging

Block patches for 5.1.0:
- Fix block I/O for split transfers
- Fix iotest 197 for non-qcow2 formats

# gpg: Signature made Tue 28 Jul 2020 14:45:28 BST
# gpg:                using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
# gpg:                issuer "mreitz@redhat.com"
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40

* remotes/maxreitz/tags/pull-block-2020-07-28:
  iotests/197: Fix for non-qcow2 formats
  iotests/028: Add test for cross-base-EOF reads
  block: Fix bdrv_aligned_p*v() for qiov_offset != 0

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
14 months agoMerge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.1-pull-request...
Peter Maydell [Tue, 28 Jul 2020 16:15:09 +0000 (17:15 +0100)] 
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.1-pull-request' into staging

linux-user 20200728

Fix "pgb_reserved_va: Assertion `guest_base != 0' failed." error
Fix rt_sigtimedwait() errno
Fix getcwd() errno

# gpg: Signature made Tue 28 Jul 2020 13:34:11 BST
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-5.1-pull-request:
  linux-user: Use getcwd syscall directly
  linux-user: Fix syscall rt_sigtimedwait() implementation
  linux-user: Ensure mmap_min_addr is non-zero

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>