Commit Graph

73285 Commits (cf7c49cf6aedb0486ca7ba7c32aa819fe51dadfb)

Author SHA1 Message Date
Eric Blake cf7c49cf6a bitmap: Enforce maximum bitmap name length
We document that for qcow2 persistent bitmaps, the name cannot exceed
1023 bytes.  It is inconsistent if transient bitmaps do not have to
abide by the same limit, and it is unlikely that any existing client
even cares about using bitmap names this long.  It's time to codify
that ALL bitmaps managed by qemu (whether persistent in qcow2 or not)
have a documented maximum length.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20191114024635.11363-3-eblake@redhat.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
2019-11-18 16:01:34 -06:00
Eric Blake 9d7ab222da nbd/server: Prefer heap over stack for parsing client names
As long as we limit NBD names to 256 bytes (the bare minimum permitted
by the standard), stack-allocation works for parsing a name received
from the client.  But as mentioned in a comment, we eventually want to
permit up to the 4k maximum of the NBD standard, which is too large
for stack allocation; so switch everything in the server to use heap
allocation.  For now, there is no change in actually supported name
length.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20191114024635.11363-2-eblake@redhat.com>
[eblake: fix uninit variable compile failure]
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
2019-11-18 16:01:34 -06:00
Eric Blake f61ffad53f qemu-coroutine-sleep: Silence Coverity warning
Coverity warns that we store the address of a stack variable through a
pointer passed in by the caller, which would let the caller trivially
trigger use-after-free if that stored value is still present when we
finish execution.  However, the way coroutines work is that after our
call to qemu_coroutine_yield(), control is temporarily continued in
the caller prior to our function concluding, and in order to resume
our coroutine, the caller must poll until the variable has been set to
NULL.  Thus, we can add an assert that we do not leak stack storage to
the caller on function exit.

Fixes: Coverity CID 1406474
CC: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20191111203524.21912-1-eblake@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
2019-11-18 16:01:34 -06:00
Andrey Shinkevich a4d925f8f0 iotests: Test NBD client reconnection
The test for an NBD client. The NBD server is disconnected after the
client write request. The NBD client should reconnect and complete
the write operation.

Suggested-by: Denis V. Lunev <den@openvz.org>
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Eric Blake <eblake@redhat.com>
Message-Id: <1573529976-815699-1-git-send-email-andrey.shinkevich@virtuozzo.com>
2019-11-18 16:01:31 -06:00
Peter Maydell a5c2a23510 Block layer patches:
- Fix HMP savevm with -blockdev
 - Minor iotests improvements
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJd0swsAAoJEH8JsnLIjy/WisIQAMLle35d/CT5u0eviWrKAEbA
 z7FcvDgA5fhPDYt6fBWs3h1nKVSVUAsapYhi7AAuWPYwuddyVyx98Xr/JtIRmNnC
 71gku6LLKgX8FZQqAGBv8HYqVCD1YN67Q+B5mxXPdHycbwxtWHnOqeScXbfRGP+1
 8mey3ljbFOKQUQu4wgb27Zg5yvU8aG+SupIHxkH4wTTFbXr8y52nEUPT5Sn4t5IP
 1Cn15+d56P3o47y9sTyaffbz752CVrf0mUj7UOInVNOiB7O2+dukfJq7QUlZHBc9
 +f85Z08zrPZFuY4M601lu6tDIV8gyuypObUEQ/IZzV/czVmGLRWNM7LU/afnOMBo
 Lyo8YhyaML2PkDLKNgs+bjx0tz7/LcXKPtwH7v4HweMVpJmG8hGwb6wy0r6tpbo3
 s5jfK6kho37qTexjS8eqVoPa/19o+OiscgLgS1eD5ZxoXE8RHzOynFGNg5MVPFdU
 vMjzPHMI9KashabUKW+Zm49uxyu6NN3bzfJf0vUwNgY7GdK0GiokOwsnClE6xdaF
 0Y+/izMyVyHsB/QxmIqTOaOzmfRIkQRtvNa6XpSLa9SwjCR59SCNCJVwkMf4l8Lt
 VoJqBj9qlRUOwbxRX4M2HD+Z89nXy9/hEJMrJnIgNMB06D3sm7uKQcB6EZMq3avN
 wOpXXnpnOr1b/qwqoX8U
 =Idcc
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging

Block layer patches:

- Fix HMP savevm with -blockdev
- Minor iotests improvements

# gpg: Signature made Mon 18 Nov 2019 16:51:56 GMT
# gpg:                using RSA key 7F09B272C88F2FD6
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]
# Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6

* remotes/kevin/tags/for-upstream:
  iotests: Test multiple blockdev-snapshot calls
  block: Remove 'backing': null from bs->{explicit_,}options
  iotests: Fix "no qualified output" error path
  qemu-iotests/iotests.py: improve assert_qmp message

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-18 17:06:17 +00:00
Kevin Wolf b1f6a8e180 iotests: Test multiple blockdev-snapshot calls
Test that doing a second blockdev-snapshot doesn't make the first
overlay's backing file go away.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2019-11-18 17:50:08 +01:00
Kevin Wolf ae0f57f0aa block: Remove 'backing': null from bs->{explicit_,}options
bs->options and bs->explicit_options shouldn't contain any options for
child nodes. bdrv_open_inherited() takes care to remove any options that
match a child name after opening the image and the same is done when
reopening.

However, we miss the case of 'backing': null, which is a child option,
but results in no child being created. This means that a 'backing': null
remains in bs->options and bs->explicit_options.

A typical use for 'backing': null is in live snapshots: blockdev-add for
the qcow2 overlay makes sure not to open the backing file (because it is
already opened and blockdev-snapshot will attach it). After doing a
blockdev-snapshot, bs->options and bs->explicit_options become
inconsistent with the actual state (bs has a backing file now, but the
options still say null). On the next occasion that the image is
reopened, e.g. switching it from read-write to read-only when another
snapshot is taken, the option will take effect again and the node
incorrectly loses its backing file.

Fix bdrv_open_inherited() to remove the 'backing' option from
bs->options and bs->explicit_options even for the case where it
specifies that no backing file is wanted.

Reported-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Tested-by: Peter Krempa <pkrempa@redhat.com>
2019-11-18 17:50:08 +01:00
Kevin Wolf d44abcc0f7 iotests: Fix "no qualified output" error path
The variable for error messages to be displayed is $results, not
$reason. Fix 'check' to print the "no qualified output" error message
again instead of having a failure without any message telling the user
why it failed.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
2019-11-18 17:50:08 +01:00
Vladimir Sementsov-Ogievskiy dbf231d7b4 qemu-iotests/iotests.py: improve assert_qmp message
From the two values compared, make it obvious which is found at path, and
which is expected.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2019-11-18 17:50:08 +01:00
Peter Maydell 1bd0f1c9c1 seabios: update to pre-1.13 snapshot again (lchs fixed)
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJd0ql2AAoJEEy22O7T6HE45DIQAJg92aPypzIW0XdnDDrSUKPA
 xkXqk8I0HJlA3fy6MIsJ5Vleb7LBoO7x5RKettLG/OMrYD1T7vqFlDMwzypxc9hX
 gxUvzKlyyAyoNoZmBV8S4IP6NxCl12BFBF76Vr/Ejxlnf0+fXIXGbKPBgwcmgibB
 U/OD4w7eG9FUHbPJlLNTb4acbDv4/6Ipr8aAZBoVIF3qMDCxN55ST25I4Cr7NUz1
 ZOaNVPssFhApnzFs07en+p1hPzE4lyrLhMwTHeb7myjOG56tQhmoB83D/iD4Fsse
 mLgMtFXa8ubgBrI02/SQTXiKdlQqP/GpYb85SkxOwERkiftF6n9/9oFWyiTiddcH
 tFfT8stnIa8enqn3gT8HTxjqRdta+VVrz3tMTJ76fw52+e52R30qw2e/s4sbOotE
 5yb0UN8m4Khl5rtQCzo6VHLz9clhMUDLMad20zFff+nQ5OkY84PQ2lBsR1V6FiBS
 SLUXMR3WmBiftMcNef3mbXOAFYt8+BynIxbdTOU5/ldFuIa/OnHWCgGgSGQGQHtw
 iTUe7HZdgvE8148z5he2tbmY26PiC7oq3W9kimu8s4iLVpuM/dyYOdKrQ78NEuZP
 2HRi3+82hsqu4DpeY+BAJW+QW/ra0xF+RH8fbbAVM5nBubyP+OAUnqmCwKIbeQos
 G6jJ1fdgQDvbIwpUVCnO
 =cjqc
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/seabios-20191118-pull-request' into staging

seabios: update to pre-1.13 snapshot again (lchs fixed)

# gpg: Signature made Mon 18 Nov 2019 14:23:50 GMT
# 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-20191118-pull-request:
  seabios: update to pre-1.13 snapshot again

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-18 14:30:24 +00:00
Gerd Hoffmann 0285747737 seabios: update to pre-1.13 snapshot again
Due to lchs support merge in upstream seabios gone wrong (applied v3
instead of v4) here is another seabios snapshot update with the
mis-merge fixed up, so lchs support should actually work in -rc2.

Also picked up two tpm bugfixes.

git shortlog from previous snapshot
===================================

Gerd Hoffmann (4):
      Revert "geometry: Apply LCHS values for boot devices"
      Revert "config: Add toggle for bootdevice information"
      Revert "geometry: Add boot_lchs_find_*() utility functions"
      Revert "geometry: Read LCHS from fw_cfg"

Sam Eiderman (4):
      geometry: Read LCHS from fw_cfg
      boot: Build ata and scsi paths in function
      geometry: Add boot_lchs_find_*() utility functions
      geometry: Apply LCHS values for boot devices

Stefan Berger (2):
      tpm: Require a response to have minimum size of a valid response header
      tcgbios: Check for enough bytes returned from TPM2_GetCapability

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-11-18 15:04:19 +01:00
Peter Maydell bbe165740a ppc patch queue 2019-11-15
Several fixes for 4.2.0-rc2:
 
 fix mos6522 performance issue,
 xive/xics issues,
 fix /chosen device-tree on reset
 and KVM default cpu-model for all machine classes
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAl3Sd+MTHGx2aXZpZXJA
 cmVkaGF0LmNvbQAKCRDzDDi9Py++PJV0EACL450uGT2R41he9H69sCH5x7KXcAt1
 V2fFMySJdNnDZTbvFu3ou7CtXFZ9qw6Gy1N4dWam+PgKxgY2zP0NWe1dsW31N/+6
 NiRBaCavMtqGGWdNbUY0SrpfmWnrXiVlv1/2EWn9dC8JsCPVCLDd7TdZqWvb7sLT
 MNrjAJh+Uqok/p4u8ap6of5gv/X3+iYqqY9967kQpeEA9nF0F/c5fKMqWHNRUxcW
 bYPcvBM4Ud+slUfPIQ9qjUaXj5UXQzgOtT4XOzF81z5JEO/cfHXFyFYt/r8KC6B8
 gXl4X9vRAdcVJJk272UGLdDON3xXem+IfAsqE481Auh7LdqEW/El+m0njm6Zjyg2
 I+JNs/GwHjhM9Ta7RwACn1ihr3figRHJiRpHlFIn6olvH3lQ0yqgPrp1BYH6XPoT
 hSGgTZ1hR8NZfkzEaU8tCE1F/EIGghfHGdUNMuN3QuBublUfacMQvpIN9s8g8K2S
 mm22lgpOrqgv0hmsQwlPgYzxO/KB2o2Xyt7yV83wVdutHMCqrmmeyIzoB1cJG3Ky
 k9CWS99fGWTngli+bzMumeKBgWdRpkehQNneoKJuZgJhZ/DpVs7X2SDvyBHXjjTN
 KLrph1cusEyzCP6eR8EsZNvABSfHv9i7alqpE7lHZOdM2Sg0KTl7C0NSxHGMm7uK
 c4sfoSLg0vjyyA==
 =Ykn6
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/vivier2/tags/ppc-for-4.2-pull-request' into staging

ppc patch queue 2019-11-15

Several fixes for 4.2.0-rc2:

fix mos6522 performance issue,
xive/xics issues,
fix /chosen device-tree on reset
and KVM default cpu-model for all machine classes

# gpg: Signature made Mon 18 Nov 2019 10:52:19 GMT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "lvivier@redhat.com"
# 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/ppc-for-4.2-pull-request:
  mos6522: fix T1 and T2 timers
  spapr/kvm: Set default cpu model for all machine classes
  spapr: Add /chosen to FDT only at reset time to preserve kernel and initramdisk
  ppc: Skip partially initialized vCPUs in 'info pic'
  xive, xics: Fix reference counting on CPU objects
  ppc: Add intc_destroy() handlers to SpaprInterruptController/PnvChip

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-18 11:09:06 +00:00
Laurent Vivier cd8843ff25 mos6522: fix T1 and T2 timers
With the Quadra 800 emulation, mos6522 timers processing can consume
until 70% of the host CPU time with an idle guest (I guess the problem
should also happen with PowerMac emulation).

On a recent system, it can be painless (except if you look at top), but
on an old host like a PowerMac G5 the guest kernel can be terribly slow
during the boot sequence (for instance, unpacking initramfs can take 15
seconds rather than only 3 seconds).

We can avoid this CPU overload by enabling QEMU internal timers only if
the mos6522 counter interrupts are enabled. Sometime the guest kernel
wants to read the counters values, but we don't need the timers to
update the counters.

With this patch applied, an idle Q800 consumes only 3% of host CPU time
(and the guest can boot in a decent time).

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20191102154919.17775-1-laurent@vivier.eu>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
2019-11-18 11:50:49 +01:00
David Gibson 165dc3edd7 spapr/kvm: Set default cpu model for all machine classes
We have to set the default model of all machine classes, not just for
the active one. Otherwise, "query-machines" will indicate the wrong
CPU model (e.g. "power9_v2.0-powerpc64-cpu" instead of
"host-powerpc64-cpu") as "default-cpu-type".

s390x already fixed this in de60a92e "s390x/kvm: Set default cpu model for
all machine classes".  This patch applies a similar fix for the pseries-*
machine types on ppc64.

Doing a
    {"execute":"query-machines"}
under KVM now results in
    {
      "hotpluggable-cpus": true,
      "name": "pseries-4.2",
      "numa-mem-supported": true,
      "default-cpu-type": "host-powerpc64-cpu",
      "is-default": true,
      "cpu-max": 1024,
      "deprecated": false,
      "alias": "pseries"
    },
    {
      "hotpluggable-cpus": true,
      "name": "pseries-4.1",
      "numa-mem-supported": true,
      "default-cpu-type": "host-powerpc64-cpu",
      "cpu-max": 1024,
      "deprecated": false
    },
    ...

Libvirt probes all machines via "-machine none,accel=kvm:tcg" and will
currently see the wrong CPU model under KVM.

Reported-by: Jiři Denemark <jdenemar@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
2019-11-18 11:50:39 +01:00
Alexey Kardashevskiy a49f62b9fd spapr: Add /chosen to FDT only at reset time to preserve kernel and initramdisk
Since "spapr: Render full FDT on ibm,client-architecture-support" we build
the entire flatten device tree (FDT) twice - at the reset time and
when "ibm,client-architecture-support" (CAS) is called. The full FDT from
CAS is then applied on top of the SLOF internal device tree.

This is mostly ok, however there is a case when the QEMU is started with
-initrd and for some reason the guest decided to move/unpack the init RAM
disk image - the guest correctly notifies SLOF about the change but
at CAS it is overridden with the QEMU initial location addresses and
the guest may fail to boot if the original initrd memory was changed.

This fixes the problem by only adding the /chosen node at the reset time
to prevent the original QEMU's linux,initrd-start/linux,initrd-end to
override the updated addresses.

This only treats /chosen differently as we know there is a special case
already and it is unlikely anything else will need to change /chosen at CAS
we are better off not touching /chosen after we handed it over to SLOF.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-Id: <20191024041308.5673-1-aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
2019-11-18 11:50:33 +01:00
Greg Kurz 0a83b47055 ppc: Skip partially initialized vCPUs in 'info pic'
CPU_FOREACH() can race with vCPU hotplug/unplug on sPAPR machines, ie.
we may try to print out info about a vCPU with a NULL presenter pointer.

Check that in order to prevent QEMU from crashing.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <157192725327.3146912.12047076483178652551.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
2019-11-18 11:50:25 +01:00
Greg Kurz 35886de140 xive, xics: Fix reference counting on CPU objects
When a VCPU gets connected to the XIVE interrupt controller, we add a
const link targetting the CPU object to the TCTX object. Similar links
are added to the ICP object when using the XICS interrupt controller.

As explained in <qom/object.h>:

 * The caller must ensure that @target stays alive as long as
 * this property exists.  In the case @target is a child of @obj,
 * this will be the case.  Otherwise, the caller is responsible for
 * taking a reference.

We're in the latter case for both XICS and XIVE. Add the missing
calls to object_ref() and object_unref().

This doesn't fix any known issue because the life cycle of the TCTX or
ICP happens to be shorter than the one of the CPU or XICS fabric, but
better safe than sorry.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <157192724770.3146912.15400869269097231255.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
2019-11-18 11:50:16 +01:00
Greg Kurz 0990ce6a2e ppc: Add intc_destroy() handlers to SpaprInterruptController/PnvChip
SpaprInterruptControllerClass and PnvChipClass have an intc_create() method
that calls the appropriate routine, ie. icp_create() or xive_tctx_create(),
to establish the link between the VCPU and the presenter component of the
interrupt controller during realize.

There aren't any symmetrical call to be called when the VCPU gets unrealized
though. It is assumed that object_unparent() is the only thing to do.

This is questionable because the parenting logic around the CPU and
presenter objects is really an implementation detail of the interrupt
controller. It shouldn't be open-coded in the machine code.

Fix this by adding an intc_destroy() method that undoes what was done in
intc_create(). Also NULLify the presenter pointers to avoid having
stale pointers around. This will allow to reliably check if a vCPU has
a valid presenter.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <157192724208.3146912.7254684777515287626.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
2019-11-18 11:49:11 +01:00
Gerd Hoffmann 369e8f5bbd buildfix: update texinfo menu
Build error message:
qemu-doc.texi:34: node `Top' lacks menu item for `Recently removed features' despite being its Up target

Fixes: 3264ffced3 ("dirty-bitmaps: remove deprecated autoload parameter")
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 20191023101956.19120-1-kraxel@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-18 10:33:29 +00:00
Peter Maydell 19bef037fe RISC-V Fixes for 4.2-rc2
This contains a handful of patches that I'd like to target for 4.2:
 
 * OpenSBI upgrade to 0.5
 * Increase in the flash size of the virt board.
 * A non-functional cleanup.
 * A cleanup to our MIP handling that avoids atomics.
 
 This passes "make check" and boots OpenEmbedded for me.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEAM520YNJYN/OiG3470yhUCzLq0EFAl3Nn18THHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRDvTKFQLMurQQYxEACVIdVobMaddZC1tUhzyY9Ef2AzRqca
 GyyHIyMlmVzOhHOD0Rig4HQWGzvxSxmzrNNYc0N0kh7IsnVUkOLyROv5tvSpMLpb
 hyLwMcIWTNWVLraAZ/e/TTwkzKenXB2gvl5ny00LhUW4Lt0lwkFgB6SMtL1R5K+r
 HYYeiWPXbMfUnft/zpdTN0mT4Y8+gUai6XK83QOuwZohsAepBvKDVJD5uORZ6gZK
 hQfaWZ/FzMDDC0BeQtt7NN6ElLJjilzESxgoDoLrcpq2BfmSWMo4XKH/k9DzNTbi
 iWqel1q/lirxclglqjYFDuqhb37gfHYtPqQG+jZ5+7YVuyVhB6+dRIIGbzp5Jrv5
 0DcKmmI51ngKpiWcos70AJh+inM5fRgEhW024IntInwn0Y8aEpTo4YAAXUIMQleF
 3An9CSjXuxHSdtJItIJtLLGhaV7i2k5xRWIM+hgpUcW2sYqUdfB0URp+pEg2Y/4k
 1btPXfWLbd0AGlXMwVv6QYdaKKhFE+0XcIK+HqsIec0qQlJ0lksdNJyNQTsxqCfP
 mQugcBwZJp/4RoMrT14RMFhPfAZjZAEZuh3IKBCMoKui4RS51YF6MNXevR2J5VYK
 BNotdb2+ceEtLOnaKReqYzXtl6MuSzLmPWKZrrA3l/CdtKXkAd6IUhjNvrNz5Nie
 cZyV3qhagZ3P3Q==
 =vwgx
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.2-rc2' into staging

RISC-V Fixes for 4.2-rc2

This contains a handful of patches that I'd like to target for 4.2:

* OpenSBI upgrade to 0.5
* Increase in the flash size of the virt board.
* A non-functional cleanup.
* A cleanup to our MIP handling that avoids atomics.

This passes "make check" and boots OpenEmbedded for me.

# gpg: Signature made Thu 14 Nov 2019 18:39:27 GMT
# gpg:                using RSA key 00CE76D1834960DFCE886DF8EF4CA1502CCBAB41
# gpg:                issuer "palmer@dabbelt.com"
# gpg: Good signature from "Palmer Dabbelt <palmer@dabbelt.com>" [unknown]
# gpg:                 aka "Palmer Dabbelt <palmer@sifive.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 00CE 76D1 8349 60DF CE88  6DF8 EF4C A150 2CCB AB41

* remotes/palmer/tags/riscv-for-master-4.2-rc2:
  riscv/virt: Increase flash size
  opensbi: Upgrade from v0.4 to v0.5
  target/riscv: Remove atomic accesses to MIP CSR
  remove unnecessary ifdef TARGET_RISCV64

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-15 11:22:33 +00:00
Alistair Francis 6911fde410 riscv/virt: Increase flash size
Coreboot developers have requested that they have at least 32MB of flash
to load binaries. We currently have 32MB of flash, but it is split in
two to allow loading two flash binaries. Let's increase the flash size
from 32MB to 64MB to ensure we have a single region that is 32MB.

No QEMU release has include flash in the RISC-V virt machine, so this
isn't a breaking change.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-11-14 09:53:28 -08:00
Alistair Francis 3158add2bd opensbi: Upgrade from v0.4 to v0.5
This release has:
    Lot of critical fixes
    Hypervisor extension support
    SBI v0.2 base extension support
    Debug prints support
    Handle traps when doing unpriv load/store
    Allow compiling without FP support
    Use git describe to generate boot-time banner
    Andes AE350 platform support

ShortLog:

Anup Patel (14):
      platform: sifive/fu540: Move FDT further up
      lib: Allow compiling without FP support
      lib: Introduce sbi_dprintf() API
      lib: Use sbi_dprintf() for invalid CSRs
      lib: Handle traps when doing unpriv load/store in get_insn()
      lib: Delegate supervisor ecall to HS-mode when H extension available
      lib: Extend sbi_hart_switch_mode() to support hypervisor extension
      lib: Extend sbi_trap_redirect() for hypervisor extension
      lib: Redirect WFI trapped from VS/VU mode to HS-mode
      include: Extend get_insn() to read instruction from VS/VU mode
      lib: Emulate HTIMEDELTA CSR for platforms not having TIME CSR
      Makefile: Minor fix in OPENSBI_VERSION_GIT
      lib: Fix coldboot race condition observed on emulators/simulators
      include: Bump-up version to 0.5

Atish Patra (16):
      lib: Provide an atomic exchange function unsigned long
      lib: Fix race conditions in tlb fifo access.
      platform: Remove the ipi_sync method from all platforms.
      lib: Fix timer for 32 bit
      lib: Support atomic swap instructions
      lib: Upgrade to full flush if size is at least threshold
      docs: Update the fu540 platform guide as per U-Boot documents.
      lib: Change tlb range flush threshold to 4k page instead of 1G
      lib: provide a platform specific tlb range flush threshold
      lib: Fix tlb flush range limit value
      Test: Move test payload related code out of interface header
      lib: Align error codes as per SBI specification.
      lib: Rename existing SBI implementation as 0.1.
      lib: Remove redundant variable assignment
      lib: Implement SBI v0.2
      lib: Provide a platform hook to implement vendor specific SBI extensions.

Bin Meng (6):
      platform: sifive: fu540: Use standard value string for cpu node status
      README: Document 32-bit / 64-bit images build
      treewide: Use conventional names for 32-bit and 64-bit
      platform: sifive: fu540: Expand FDT size before any patching
      firmware: Use macro instead of magic number for boot status
      docs: platform: Update descriptions for qemu/sifive_u support

Damien Le Moal (4):
      kendryte/k210: Use sifive UART driver
      kendryte/k210: remove sysctl code
      README: Update license information
      kendryte/k210: remove unused file

Georg Kotheimer (1):
      utils: Use cpu_to_fdt32() when writing to fdt

Jacob Garber (4):
      lib: Use bitwise & instead of boolean &&
      lib: Use correct type for return value
      lib: Prevent unintended sign extensions
      lib: Correct null pointer check

Lukas Auer (1):
      firmware: do not use relocated _boot_status before it is valid

Nylon Chen (3):
      firmware: Fix the loop condition of _wait_relocate_copy_done section
      platform: Add Andes AE350 initial support
      scripts: Add AE350 to platform list in the binary archive script

Palmer Dabbelt (1):
      Include `git describe` in OpenSBI

Zong Li (1):
      Write MSIP by using memory-mapped control register

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
2019-11-14 09:53:28 -08:00
Alistair Francis 7ec5d3030b target/riscv: Remove atomic accesses to MIP CSR
Instead of relying on atomics to access the MIP register let's update
our helper function to instead just lock the IO mutex thread before
writing. This follows the same concept as used in PPC for handling
interrupts

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Palmer Dabbelt <palmer@dabbelt.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
2019-11-14 09:53:28 -08:00
hiroyuki.obinata f480f6e8c5 remove unnecessary ifdef TARGET_RISCV64
Signed-off-by: Hiroyuki Obinata <hiroyuki.obinata@gmail.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-11-14 09:53:28 -08:00
Peter Maydell e10bf1fe00 seabios: update to pre-1.13 snapshot (with ahci fix included).
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJdzA0tAAoJEEy22O7T6HE4AaoQAIqoo3LSm4ai/SgGsudzpEDv
 4GwoVlI7OiWEDNYS/ePxWp/hNZZ5F988i+SMXS9pqDS0AXjLc/1pZ9/6fXB0LrNI
 3BaY8DUKie1lYMMMQ5KQmlT1V3ZvSVLW9wygbRYuKQvd101Ma1ZYp48BgN81NpQD
 T1xwLsp9+XXebggZOAgLnfyWa9L/YJm1IjgxVEGMRRqlBQ7xCCZfoVi6GL+iN80I
 Iw9iog5QrAzLNG1KeQ9hMkA2Of6Y46AEAkNqbHlOdFLGvUVLPWSem8Jefwd8qXJ0
 CoKxEdFSTVgvfTTSu6Ev1mVdjxAIqcN+uP09ODIKIxcjdiLbn9PaJjjCyDTAMWus
 oW/nVkVkA2ps11uDJoImdyLccDRRnZXrXo+tDLQPefbUJVXFwKMItw/6+OJY8Ayt
 cT6MQ1zmiUGIfaAljTs+gAmpj6nwgUIRYi/ZQV4nL9gI1Hc3NaDTTdAFSeNYjvWL
 GkiKqzNDGcLI7u7YjXsrHm7rJs27qdI1KABysyb84m2ebGEtk7mXdLroc2uc+lkW
 y6NQgOPXJDsQTTyvQmRgQnKJAUpWah01VI5zNULpivU69IFVh3XYcY+jgXdIFxju
 TWkRJypH2IvFoNaQQmRq0nfgFNJYPHKVmJ4paE3hjbzB0AMV37oVKbIHv6lil6AB
 UdjursSdKhkIlpXWJtz6
 =+Yw9
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/seabios-20191113-pull-request' into staging

seabios: update to pre-1.13 snapshot (with ahci fix included).

# gpg: Signature made Wed 13 Nov 2019 14:03:25 GMT
# 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-20191113-pull-request:
  seabios: update to pre-1.13 snapshot

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-14 10:44:32 +00:00
Gerd Hoffmann 0221d73ce6 seabios: update to pre-1.13 snapshot
seabios 1.13 will be released later this month.  This patch updates the
seabios submodule and binaries in qemu to a snapshot of git master.
That will increase the test coverage of the upcoming seabios release and
will also make the number of changes smaller when we update to the final
1.13 release during qemu code freeze for 4.2.

v3: add ahci bugfix
v2: build binaries with gcc 4.8.5 instead of gcc 8.3.1 (rhel7).

git shortlog rel-1.12.1..
=========================

David Woodhouse (2):
      csm: Sanitise alignment constraint in Legacy16GetTableAddress
      csm: Fix boot priority translation

Denis Plotnikov (1):
      virtio: extend virtio queue size to 256

Gerd Hoffmann (21):
      vga: move modelist from bochsvga.c to new svgamodes.c
      vga: make memcpy_high() public
      vga: add atiext driver
      vga: add ati bios tables
      vbe: add edid support.
      ati: add edid support.
      bochsvga: add edid support.
      bochsdisplay: add edid support.
      bochsdisplay: parse resolution from edid.
      add get_keystroke_full() helper
      bootmenu: add support for more than 9 entries
      optionrom: disallow int19 redirect for pnp roms.
      ati-vga: make less verbose
      ati-vga: fix ati_read()
      ati-vga: make i2c register and bits configurable
      ati-vga: try vga ddc first
      ati-vga: add rage128 edid support
      bochsdisplay: add copyright and license to bochsdisplay.c
      ramfb: add copyright and license to ramfb.c
      cp437: add license to cp437.c
      ahci: zero-initialize port struct

Joseph Pacheco-Corwin (1):
      bootsplash: Added support for 16/24/32bpp in one function

Kevin O'Connor (10):
      output: Avoid thunking to 16bit mode in printf() if no vgabios
      docs: Update mailing list archive links
      docs: Fix cut-and-paste error in Mailinglist.md archive link
      usb-ehci: Clear pipe token on pipe reallocate
      pciinit: Use %pP shorthand for printing device ids in intel_igd_setup()
      virtio-pci: Use %pP format in dprintf() calls
      Makefile: Build with -Wno-address-of-packed-member
      svgamodes: Add copyright notice to vgasrc/svgamodes.c
      docs: Add developer-certificate-of-origin
      docs: Note release date for v1.12.1

Liran Alon (1):
      pvscsi: ring_desc do not have to be page aligned

Sam Eiderman (6):
      smbios: Add missing zero byte to Type 0
      geometry: Read LCHS from fw_cfg
      boot: Reorder functions in boot.c
      geometry: Add boot_lchs_find_*() utility functions
      config: Add toggle for bootdevice information
      geometry: Apply LCHS values for boot devices

Stefan Berger (2):
      tcgbios: Use table to convert hash to buffer size
      tcgbios: Implement TPM 2.0 menu item to activate and deactivate PCR banks

Stefano Garzarella (1):
      qemu: avoid debug prints if debugcon is not enabled

Stephen Douthit (1):
      tpm: Check for TPM related ACPI tables before attempting hw probe

Uwe Kleine-König (3):
      cbvga: reuse svga modes definitions from svgamodes.c
      Add additional resolutions for 16:9 displays: 1600x900 and 2560x1440
      Remove dos line endings introduced in the last two commits

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-11-13 15:02:21 +01:00
Peter Maydell aa464db69b Update version for v4.2.0-rc1 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-12 18:40:02 +00:00
Peter Maydell ef45f7b378 Fix CID 1407221 and stime()
-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAl3K2usSHGxhdXJlbnRA
 dml2aWVyLmV1AAoJEPMMOL0/L748q3MQAJ9H2F9fa/bAXizFIf0R4okgiBRe0ZPi
 DSE6eEgbZ7SCmspkRc6e3L2MYJb3BnYzX3UwubHUvZs1nyx6SSU2F6VIhG1vUaTD
 VkGiq6Z5ucSISl5fD2FTRk/h/g9y2t9rHsKFa0wSo92+5ntPZ9ZpILd2XjXmkJst
 TziPgp5unjvQnttgkCZk6eT9crIzrNpIshVwgXFRSBUGHWHLoacpn0daBR7J6Rya
 zdHUjABYLcuQRnxej23/RqRJ0J0ahCEXt6d84ZwFhKzxXe4yHsqnk6r2tYedy8oF
 3eomB1Mm3L//nRYi/n9N699Si3AUxGiT7vqcFKJucHHI9pKyVsE/seNSgp8ZSopp
 ijBymIFyJExdCh58p8Db8J9pfhxiqsiFPz1urTCUnDE42oEee850/7hpW5SAsc36
 qqyF7j+UOEY4UHRIXvAZg32qCreDWLOLIljf/jWXbFpyTlDiUOXmNw1qEvzSEDQJ
 c5I0uGf0RGUbUkUL9SKihH4N/LxtdgKo360fIYwUF7FC5VVY0wOKe+RHg9hLxhlG
 nqVhxYr6z0Y9JLnJDdLuP9afwR/i8xr21POzliRP7wMYhisZ6EBPznDQCV0kfK9s
 1UQdCPnesJtiXRDJY6BMIYsHrRYEyaYrdIm+fc4ds9tKvptBn558ulZnGNd0zYKb
 2jlciB0wROEI
 =MMZM
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.2-pull-request' into staging

Fix CID 1407221 and stime()

# gpg: Signature made Tue 12 Nov 2019 16:16:43 GMT
# 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-4.2-pull-request:
  linux-user: remove host stime() syscall
  linux-user: fix missing break

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-12 17:46:57 +00:00
Peter Maydell 04d57cfa7e For upstream
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEErET+3BT38evtv0FRKcWWeA9ryoMFAl3K0rcACgkQKcWWeA9r
 yoNMeQf9GzzIwWO+JAxbKUEc5Bs8Kgq2wOOTnzQvzHobDFtEzlET6TE6zP6gJG9i
 /QGY5H+mo7KueORwOWAgUjIIGMpZrinsvppOM/xtfDerdUYXoyHXej8Q5dEFZGRn
 R4jFEUs6d0OBHCRV/tLzpoQA0Yw3Jd67hlDRjwEPMTUTqQWWw/pFoYnNbTGwBoim
 ySDTBwzM1+EQv7bJU9hZKGjKc47e5zwU5FpmLmmlqF9FDNSR2I+0nGpvo0yzwJIf
 k5a/m2JL74UQzLvDMKv8Bnop2iRKrRrwFP5Y1UEOA2wmABaJTfftGCf1nczfUZVZ
 8oacwBghuISsQxWUZzu8AJMHs8/3rg==
 =fzCL
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/edgar/tags/edgar/xilinx-next-2019-11-12.for-upstream' into staging

For upstream

# gpg: Signature made Tue 12 Nov 2019 15:41:43 GMT
# gpg:                using RSA key AC44FEDC14F7F1EBEDBF415129C596780F6BCA83
# gpg: Good signature from "Edgar E. Iglesias (Xilinx key) <edgar.iglesias@xilinx.com>" [unknown]
# gpg:                 aka "Edgar E. Iglesias <edgar.iglesias@gmail.com>" [full]
# Primary key fingerprint: AC44 FEDC 14F7 F1EB EDBF  4151 29C5 9678 0F6B CA83

* remotes/edgar/tags/edgar/xilinx-next-2019-11-12.for-upstream:
  target/microblaze: Plug temp leak around eval_cond_jmp()
  target/microblaze: Plug temp leaks with delay slot setup
  target/microblaze: Plug temp leaks for loads/stores

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-12 16:10:43 +00:00
Laurent Vivier 0f1f2d4596 linux-user: remove host stime() syscall
stime() has been withdrawn from glibc
(12cbde1dae6f "Use clock_settime to implement stime; withdraw stime.")

Implement the target stime() syscall using host
clock_settime(CLOCK_REALTIME, ...) as it is done internally in glibc.

Tested qemu-ppc/x86_64 with:

	#include <time.h>
	#include <stdio.h>

	int main(void)
	{
		time_t t;
		int ret;

		/* date -u -d"2019-11-12T15:11:00" "+%s" */
		t = 1573571460;
		ret = stime(&t);
		printf("ret %d\n", ret);
		return 0;
	}

        # date; ./stime; date
        Tue Nov 12 14:18:32 UTC 2019
        ret 0
        Tue Nov 12 15:11:00 UTC 2019

Buglink: https://bugs.launchpad.net/qemu/+bug/1852115
Reported-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20191112142556.6335-1-laurent@vivier.eu>
2019-11-12 17:05:57 +01:00
Laurent Vivier c0cb880153 linux-user: fix missing break
Reported by Coverity (CID 1407221)
Fixes: a2d866827b ("linux-user: Support for NETLINK socket options")
cc: Josh Kunz <jkz@google.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191112105055.32269-1-laurent@vivier.eu>
2019-11-12 17:05:24 +01:00
Edgar E. Iglesias c49a41b0b9 target/microblaze: Plug temp leak around eval_cond_jmp()
Plug temp leak around eval_cond_jmp().

Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2019-11-12 16:35:26 +01:00
Edgar E. Iglesias f91c60f0ca target/microblaze: Plug temp leaks with delay slot setup
Plug temp leaks with delay slot setup.

Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2019-11-12 16:35:26 +01:00
Edgar E. Iglesias a633801526 target/microblaze: Plug temp leaks for loads/stores
Simplify endian reversion of address also plugging TCG temp
leaks for loads/stores.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2019-11-12 16:35:26 +01:00
Peter Maydell 2a7e7c3e10 Testing and plugins for rc1
- add plugin API versioning
   - tests/vm add netbsd autoinstall
   - disable ipmi-bt-test for non-Linux
   - single-thread make check
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAl3KwvYACgkQ+9DbCVqe
 KkT/gQf/SWEZrH4q+3yjW+QblK9R5VP4l0LNfCkP8wqPQrYj+85KFswyOhKczH81
 8aExg+P8zvjKkBTN1xQWBuOqWAUAfo2Nv2EwwCU784qZSi/R5DY9Dzw3kRBWF10V
 j81kX9tUSDVAzQ98RVHvQtMe9yjpuyYOX5x+fD3zjpGmgp3it4+2y4+dHQQVDo3P
 PM4xXYrn3OhtDyYR919ydCZb7gwk74Hf6VQQBc99QfAJOwiddLPH66fTpuaXcBXH
 GUayxplo/zTTrgmdSfgg8lirYJhrZ0nnE0aK05rtPgc5k//WmVAgkSzDM9A0ZIT4
 Tryt8Ww7uJ96OwoSjlQ8+kS5ejLlSg==
 =wSRI
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-and-tcg-121119-1' into staging

Testing and plugins for rc1

  - add plugin API versioning
  - tests/vm add netbsd autoinstall
  - disable ipmi-bt-test for non-Linux
  - single-thread make check

# gpg: Signature made Tue 12 Nov 2019 14:34:30 GMT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-testing-and-tcg-121119-1:
  tcg plugins: expose an API version concept
  .travis.yml: don't run make check with multiple jobs
  tests/vm: support sites with sha512 checksums
  tests: only run ipmi-bt-test if CONFIG_LINUX
  tests/vm: update netbsd to version 8.1
  tests/vm: use console_consume for netbsd
  tests/vm: add console_consume helper
  tests/vm: netbsd autoinstall, using serial console

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-12 14:51:00 +00:00
Alex Bennée 3fb356cc86 tcg plugins: expose an API version concept
This is a very simple versioning API which allows the plugin
infrastructure to check the API a plugin was built against. We also
expose a min/cur API version to the plugin via the info block in case
it wants to avoid using old deprecated APIs in the future.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Robert Foley <robert.foley@linaro.org>
2019-11-12 14:32:55 +00:00
Alex Bennée 05273a43af .travis.yml: don't run make check with multiple jobs
Let's challenge the convention that doing more at a time helps. It
certainly doesn't tell you unambiguously where in the test cycle you
were before the test hangs and exceeds the job time limit.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-11-12 14:32:55 +00:00
Alex Bennée 5b4b4865f4 tests/vm: support sites with sha512 checksums
The NetBSD project uses SHA512 for its checksums so lets support that
in the download helper.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-12 14:32:55 +00:00
Alex Bennée 860eacec58 tests: only run ipmi-bt-test if CONFIG_LINUX
This test has been unstable on NetBSD for awhile. It seems the
mechanism used to listen to a random port is a Linux-ism (although a
received wisdom Linux-ism rather than a well documented one). As
working around would add more hard to test complexity to the test I've
gone for the easier option of making it CONFIG_LINUX only.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Corey Minyard <cminyard@mvista.com>
Cc: Kamil Rytarowski <kamil@netbsd.org>
2019-11-12 14:32:55 +00:00
Gerd Hoffmann 2548b4a7d3 tests/vm: update netbsd to version 8.1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20191031085306.28888-5-kraxel@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-12 14:32:55 +00:00
Gerd Hoffmann 00963aca8b tests/vm: use console_consume for netbsd
Use new helper to read all pending console output,
not just a single char.  Unblocks installer boot.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20191031085306.28888-4-kraxel@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-12 14:32:55 +00:00
Gerd Hoffmann 6c4f0416be tests/vm: add console_consume helper
Helper function to read all console output.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20191031085306.28888-3-kraxel@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-12 14:32:55 +00:00
Gerd Hoffmann af093bc937 tests/vm: netbsd autoinstall, using serial console
Instead of fetching the prebuilt image from patchew download the install
iso and prepare the image locally.  Install to disk, using the serial
console.  Create qemu user, configure ssh login.  Install packages
needed for qemu builds.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Kamil Rytarowski <n54@gmx.com>
Tested-by: Thomas Huth <thuth@redhat.com>
[ehabkost: rebased to latest qemu.git master]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20191031085306.28888-2-kraxel@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-11-12 14:32:55 +00:00
Peter Maydell 039e285e09 Trivial fixes (20191112)
ivshmem-server, error messages (numa, qom) and
 Makefile (bios-microvm) fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAl3Kg5MSHGxhdXJlbnRA
 dml2aWVyLmV1AAoJEPMMOL0/L748LqgP/0r7ouXbrMqDMeeD+UKSpf+WW77RW+ku
 MWDnIHfltmXaIXult/QSlxWM0Z5s623owe1hsZWKA1qrZLUgb3nHDMtUynk/qDRF
 D1m5ZWAiNERdZDwjlTfPNuTzClHrfnw0AQ20WmwsU1KVODecRgDUT/nLNb4cX/Aw
 rhkjie+tAN646NpCS6DQmN7/ZY4l/tGyd8fza0BfLhfrpGgSA14xAU6sfRd44BWB
 QMPT5y7CbgFYeEOsUnOJSZiKqJB8/jbd5urEfNgSuGFi72e5SBFlwNWrOzWOukRz
 Zf1v3VZPSXcXogA+onuld9UvHXD+n60Vylsh8C4/VySK9CwhEmeC/3ObF1UX2NqP
 NoWbTRoJJtsSqbnFRmI9dPVwR7dJnm86m/U1Dt6lqBPEgnGqbPrK21r6+S5nfgcx
 6p112Wl7qA7Catha9dLE6kpVctqZUf2Z+Qg7hKiBoXck/Z9fcSY9cCiL2EhxlihB
 3rZHTt8PLnEcsqHwlB6U8+zpMw9K08MH4qjrjWh2Eg0yJWuYfTwQFeBFYl+X7qEM
 VWwHbbcMEv3Cam3vXM7KCdAaEqjMeP3OFgiCfY1iCIy0U6rmoUbzbukm4NPKjrJu
 UNFYrabCOAL71NeJtdngHXUG1z/Kz0PAuSbf32uJ8QiDyO8O0O/t8PyCqQHbAsqr
 4oT2y5yVvtu+
 =Dt6d
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-pull-request' into staging

Trivial fixes (20191112)
ivshmem-server, error messages (numa, qom) and
Makefile (bios-microvm) fixes

# gpg: Signature made Tue 12 Nov 2019 10:04:03 GMT
# 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/trivial-branch-pull-request:
  ivshmem-server: Terminate also on SIGINT
  ivshmem-server: Clean up shmem on shutdown
  numa: Add missing \n to error message
  qom: Fix error message in object_class_property_add()
  Makefile: install bios-microvm like other binary blobs

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-12 12:09:19 +00:00
Peter Maydell b0f2855bd0 - Fix memory leaks for QTESTS
- Update MAINTAINERS file
 - Check for the availability of bzip2 in "configure"
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAl3KTIURHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbUJPw/9Hi2jo7/GCM0M7LmX0yLgjTIu88jpofqd
 MqlvqGRbODKNKZUi0REpgkjutHrgpD1xmabjXtEw2Jby/YGxuoZ2Xmmz+sCZq+dJ
 Scez/elRnLfmzFm/mff8GsaXCtKtQaYLSBfNgL8pEPKkmvadoO0sKqy7Phyy86Tg
 ilx1s1Nl48DAG2wx3ePsjjxKjpqVR1X8M4nacntQRVSm/UoKHb0Es7ccZwVDo44O
 t+oNdxaf27Yu9pfuwJO8Q6NopLZPVjRuYheVdkxjdoabteHKil5Bla/rQh5Yo5Bo
 NjwxbnuXyvlrGehzzJYqX00Orcy3cEFUZYPKxzZ44rrihZ9bqT3fU9H7JDtuFH0N
 wVKbc2XENYrLokO8aOrap1uatBKIfr+w/BfHnXBenghDPFFUs/wWdDd42Xptj0vy
 xH+brXY19l9/QkrHgwtd62QS4c30rkBzgb4hIsx2LGaxPMSiRdcEZVLwR/3JnLdX
 IsRTFotnZ8Oj4SXcacjRfjC9fsE170Wg+FnhkYJRiSBjeKenT0nVwvAaWdMNL1/K
 P21Fwq/P6EZXXsYt7+rc9T9hBRkfVejFomksaJJfYOzOw6gueRaTK5WQH8d+Uf19
 3rXllfwXF7Mf9XF3qS1MhakccXBEEFBns1vV6+fIo6YwxS8WDzo38yFtBTKnDJwA
 w26vpkAgvnY=
 =MOXx
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-11-12' into staging

- Fix memory leaks for QTESTS
- Update MAINTAINERS file
- Check for the availability of bzip2 in "configure"

# gpg: Signature made Tue 12 Nov 2019 06:09:09 GMT
# 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-2019-11-12:
  configure: Check bzip2 is available
  configure: Only decompress EDK2 blobs for X86/ARM targets
  tests/migration: Print some debug on bad status
  MAINTAINERS: slirp: Remove myself as maintainer
  cpu-plug-test: fix leaks
  qtest: fix qtest_qmp_device_add leak

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-12 10:14:33 +00:00
Jan Kiszka 5c62979ed5 ivshmem-server: Terminate also on SIGINT
Allows to shutdown a foreground session via ctrl-c.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Claudio Fontana <claudio.fontana@suse.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <99c1a7bd-1876-66a2-4b8e-d5bc86116fe7@web.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-11-12 10:37:20 +01:00
Jan Kiszka 0602a6166d ivshmem-server: Clean up shmem on shutdown
So far, the server leaves the posix shared memory object behind when
terminating, requiring the user to explicitly remove it in order to
start a new instance.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Claudio Fontana <claudio.fontana@suse.com>
Message-Id: <d938a62c-7538-9d2b-cc0a-13b240ab9141@web.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-11-12 10:36:12 +01:00
Greg Kurz 88ed5db16c numa: Add missing \n to error message
If memory allocation fails when using -mem-path, QEMU is supposed to print
out a message to indicate that fallback to anonymous RAM is deprecated. This
is done with error_printf() which does output buffering. As a consequence,
the message is only printed at the next flush, eg. when quiting QEMU, and
it also lacks a trailing newline:

qemu-system-ppc64: unable to map backing store for guest RAM: Cannot allocate memory
qemu-system-ppc64: warning: falling back to regular RAM allocation
QEMU 4.1.50 monitor - type 'help' for more information
(qemu) q
This is deprecated. Make sure that -mem-path  specified path has sufficient resources to allocate -m specified RAM amountgreg@boss02:~/Work/qemu/qemu-spapr$

Add the missing \n to fix both issues.

Fixes: cb79224b7e "deprecate -mem-path fallback to anonymous RAM"
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <157304440026.351774.14607704217028190097.stgit@bahia.lan>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-11-12 10:34:23 +01:00
Greg Kurz d55e937d3e qom: Fix error message in object_class_property_add()
The error message in object_class_property_add() was copied from
object_property_add() in commit 16bf7f522a. Clarify that it is
about a class, not an object.

While here, have the format string in both functions to fit in a
single line for better grep-ability, despite the checkpatch warning.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <157287383591.234942.311840593519058490.stgit@bahia.tlslab.ibm.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-11-12 10:33:02 +01:00
Bruce Rogers 32eb2da326 Makefile: install bios-microvm like other binary blobs
Commit 0d5fae3e52 introduced bios-microvm.bin but forgot to add
it to the list of blobs being installed.
Add it to the list of BLOBS that get installed.

Fixes: 0d5fae3e52 "roms: add microvm-bios (qboot) as binary"
Signed-off-by: Bruce Rogers <brogers@suse.com>
[PMD: Reworded description]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Sergio Lopez <slp@redhat.com>
Message-Id: <20191102114346.6445-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2019-11-12 10:31:43 +01:00