Commit Graph

73428 Commits

Author SHA1 Message Date
Philippe Mathieu-Daudé d32dc61421 hw/mips: Deprecate the r4k machine
The r4k machine was introduced in 2005 (6af0bf9c7) and its last
logical change was in 2005 (9542611a6). After that, one can
count 164 maintenance commits (QEMU API changes) with the
exception of 1 fix in 2015 (memory leak, commit 3ad9fd5a).

This machine was introduced as a proof of concept to run a MIPS
CPU. Two years later, the Malta machine was added (commit
5856de80), modeling a real platform.

Note also this machine has no specification except 5 lines in
the header of this file:

 * emulates a simple machine with ISA-like bus.
 * ISA IO space mapped to the 0x14000000 (PHYS) and
 * ISA memory at the 0x10000000 (PHYS, 16Mb in size).
 * All peripherial devices are attached to this "bus" with
 * the standard PC ISA addresses.

The Linux kernel support for this machine has been dropped more
than 10 years ago in commit 302922e5.

It is time to deprecate this obsolete machine. Users are
recommended to use the Malta board, and its hardware is well
documented.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Acked-by: Aurelien Jarno <aurelien@aurel32.net>
Message-Id: <20191125104103.28962-1-philmd@redhat.com>
2019-12-16 13:16:15 +01:00
Filip Bozuta f3db354ca4 mips: fulong 2e: Renovate coding style
The script checkpatch.pl located in scripts folder was
used to detect all errors and warrnings in files:
    hw/mips/mips_fulong2e.c
    hw/isa/vt82c686.c
    hw/pci-host/bonito.c
    include/hw/isa/vt82c686.h

These mips Fulong 2E machine files were edited and
all the errors and warrings generated by the checkpatch.pl
script were corrected and then the script was
ran again to make sure there are no more errors and warnings.

Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1575640687-20744-6-git-send-email-Filip.Bozuta@rt-rk.com>
2019-12-16 13:16:15 +01:00
Filip Bozuta f48eefa202 mips: r4000: Renovate coding style
The script checkpatch.pl located in scripts folder was
used to detect all errors and warrnings in file:
    hw/mips/mips_r4k.c

This mips r4000 machine file was edited and
all the errors and warrings generated by the checkpatch.pl
script were corrected and then the script was
ran again to make sure there are no more errors and warnings.

Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1575640687-20744-5-git-send-email-Filip.Bozuta@rt-rk.com>
2019-12-16 13:16:14 +01:00
Filip Bozuta 83aecbaa45 mips: mipssim: Renovate coding style
The script checkpatch.pl located in scripts folder was
used to detect all errors and warrnings in files:
    hw/mips/mips_mipssim.c
    hw/net/mipsnet.c

All these mips mipssim machine files were edited and
all the errors and warrings generated by the checkpatch.pl
script were corrected and then the script was
ran again to make sure there are no more errors and warnings.

Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1575640687-20744-4-git-send-email-Filip.Bozuta@rt-rk.com>
2019-12-16 13:16:00 +01:00
Filip Bozuta dbd07eda9d mips: malta: Renovate coding style
The script checkpatch.pl located in scripts folder was
used to detect all errors and warrnings in files:
    hw/mips/mips_malta.c
    hw/mips/gt64xxx_pci.c
    tests/acceptance/linux_ssh_mips_malta.py

All these mips malta machine files were edited and
all the errors and warrings generated by the checkpatch.pl
script were corrected and then the script was
ran again to make sure there are no more errors and warnings.

Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1575640687-20744-3-git-send-email-Filip.Bozuta@rt-rk.com>
2019-12-16 13:08:17 +01:00
Filip Bozuta 68fa5f552a mips: jazz: Renovate coding style
The script checkpatch.pl located in scripts folder was
used to detect all errors and warrnings in files:
    hw/mips/mips_jazz.c
    hw/display/jazz_led.c
    hw/dma/rc4030.c

All these mips jazz machine files were edited and
all the errors and warrings generated by the checkpatch.pl
script were corrected and then the script was
ran again to make sure there are no more errors and warnings.

Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <1575640687-20744-2-git-send-email-Filip.Bozuta@rt-rk.com>
2019-12-16 13:04:46 +01:00
Peter Maydell 084a398bf8 Pull request
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl3zoOsACgkQnKSrs4Gr
 c8jeYQgAvpGixIk4yPRhxlbWmOyNao0ves8F8HE0JAbGxKHo12/EJQFAoe7H+fBe
 pNNAzOCGZUF5YplXcrHdwmrDCjCQTWUT6deAKMbUoUJrw6nOxyCQJDuV5Xzuxvbn
 ekou59uLRFGnVnBKNlVnYXJuN0AKoEAnM2Z6qnrjhBvecYVooZAJO8XTAwbQoese
 2fs5fqcEz9SOYsGPd55DahCAt8DKxBqJ4lugq6KdztxS3/2KWgXASKJtsWXsmVFX
 YeUo2Y1zo35JbvwDtGtXOTo8DTzxiHPqHDA9Jm4mL0W7nPHUvpHS+5bmFhwyF/qz
 /2M1/zOt3YXnwR2V15c3/IaekoOk2g==
 =UNxY
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Pull request

# gpg: Signature made Fri 13 Dec 2019 14:32:11 GMT
# 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/block-pull-request:
  iothread: document -object iothread on man page
  virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is advertised

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-13 18:14:07 +00:00
Peter Maydell 4148d142a8 virtiofs pull 2019-12-13: Minor fixes and cleanups
Cleanup from Marc-André and MSI-X fix from Stefan.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEERfXHG0oMt/uXep+pBRYzHrxb/ecFAl3ze80ACgkQBRYzHrxb
 /eesrw//aYIhGN7m6rHfQ8gMdwknMxdPGDOgOiby83mFKxKVsKXgWR8wXX03vk2S
 I4vCWPWXL8FadmyZ3UlpXRR24EzrxRhcAHG+SxOPt/v5SaDP/o4+SZd9fP1KfthF
 a+kgfCZK767KcUqYov2D4cqqI3EkIj6i9LwqyvenGV6EPaNIe+5rswhflVIPGfEF
 wAN+3wRiG9B1StLHEQyNfmUnYHG0E10BMdK48kPle+a/YaL98RJgRtVzEyhtxCQD
 vc0SK8DX0LAijXxJC/kGCdgqaAhQnRjZnoR4zXyKQy5PuxtwaMd3ncQzNicy0VhG
 1vnmHljM00aK6qaW8GvE8dQAznlkjk8w9tT+OcTidY3mYBnQKXNYkn5dLrwjllQX
 mb5H2FT9pR3QKVxscxf4k3wg0ZXVZLyxYI+25IgecJ36qpNY2JLikrYzsdVr5AwE
 RkQWacTfF7XBn2Zw4zlW4OVamAHDqd0Dnx7DySXPdlEJIaG9wi1FVMGGOOlk0rdB
 ZrAEGpWhsV7FD4hwAHuchpoYILV80I6hhoU84ZU1ayo21RrHYOJOFF476zx7bHVm
 MnQRJjsM3wHxGtbZ7clDks+zlxuSS23hlrKJxGNNy9xNcryBoZu4cz8eS99hmohO
 pIEncZyTfA+tFqvAtKQ9Q/ygyOkDyYJ9oKVV7iUE/y6cvvBQoGk=
 =eO9a
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgilbert/tags/pull-virtiofs-20191213a' into staging

virtiofs pull 2019-12-13: Minor fixes and cleanups

Cleanup from Marc-André and MSI-X fix from Stefan.

# gpg: Signature made Fri 13 Dec 2019 11:53:49 GMT
# gpg:                using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full]
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-virtiofs-20191213a:
  virtio-fs: fix MSI-X nvectors calculation
  vhost-user-fs: remove "vhostfd" property

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-13 15:58:54 +00:00
Peter Maydell 35081f79fa - conversion of virtfs-proxy-helper from libcap to libcap-ng
- removal of libcap-dev from docker, travis and gitlab CI
 - removal of deprecate "-virtfs_synth" option
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEtIKLr5QxQM7yo0kQcdTV5YIvc9YFAl3ym0kACgkQcdTV5YIv
 c9YzNhAAoVGEBUgEGqDhmqU42g34Texs5Of3NPk7IPl471T7pnK4bKSNLzk77ib6
 VuknfywHBnljTNBr+3am6A6N8icAkeADkr/gXFt/WPeLdByPuVH6K9Ome4jFuFT3
 7mxuH4fKSfLGO4VuuHy1ezGs3upOsQZysKdMFVp6JaoyfGYga/CKGxbBdy1M2iR9
 vcRFK9zVbqixuMXDH+K9iGXtJG+voJdFitMhvuraNZK1tGrXiiXRl01FaUxnYgzS
 mnm+qgWOP05u7gIfpAN9BYPIz2FvyKu+xJNPwXYXzJMyd4mHg6DDxFnpV3e9a7Nq
 rxSvdt4mO9jacFuuWS4MROAkVlatSc12bjseiIMqLp8fqg7GJ1AIa/5CqBN3Rmmb
 yxS8ck7EKV5AQDH//aG+uXy2XhgqBh+iK07udJJfoTDKJMwTNfTqDbJmtnUREZFf
 paIfi92H+qBWxML6eFcqMw1mzKXS5Lqad/8o+Ma2Cmh4GVABlFOZiSoNli8EwHUp
 BnBTBNehiSLYQe3XP00clboo4x4ySRVeZA8MlGDO0OFqNzHV7pW29Oh+mbDsH/S+
 3CL3j/9sqO0tAFaMlZULh0L7d5Vn1Pc2LV+XYMuZy6sYoMeCrHslcaZUevQ6aap5
 z5y1vXCQtXWw3wsFcKgKIsgIh5HIH6bQIc/fdI4578Y4yoIi19M=
 =ms/Q
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/gkurz/tags/9p-next-2019-12-12' into staging

- conversion of virtfs-proxy-helper from libcap to libcap-ng
- removal of libcap-dev from docker, travis and gitlab CI
- removal of deprecate "-virtfs_synth" option

# gpg: Signature made Thu 12 Dec 2019 19:55:53 GMT
# gpg:                using RSA key B4828BAF943140CEF2A3491071D4D5E5822F73D6
# gpg: Good signature from "Greg Kurz <groug@kaod.org>" [full]
# gpg:                 aka "Gregory Kurz <gregory.kurz@free.fr>" [full]
# gpg:                 aka "[jpeg image of size 3330]" [full]
# Primary key fingerprint: B482 8BAF 9431 40CE F2A3  4910 71D4 D5E5 822F 73D6

* remotes/gkurz/tags/9p-next-2019-12-12:
  virtfs: Remove the deprecated "-virtfs_synth" option
  travis.yml: Drop libcap-dev
  ci: Use libcap-ng
  docker: remove libcap development packages
  virtfs-proxy-helper: switch from libcap to libcap-ng

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-13 13:47:45 +00:00
Peter Maydell ba9975025e Open 5.0 development tree
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-13 11:59:06 +00:00
Stefan Hajnoczi 86d2a49b41 iothread: document -object iothread on man page
Add -object iothread documentation to the man page, including references
to the query-iothread QMP command and qom-set syntax for adjusting
adaptive polling parameters at run-time.

Reported-by: Zhenyu Ye <yezhenyu2@huawei.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20191025122236.29815-1-stefanha@redhat.com
Message-Id: <20191025122236.29815-1-stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-12-13 11:24:07 +00:00
Evgeny Yakovlev 5f2585772f virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is advertised
Virtio spec 1.1 (and earlier), 5.2.5.2 Driver Requirements: Device
Initialization:

"Devices SHOULD always offer VIRTIO_BLK_F_FLUSH, and MUST offer it if
they offer VIRTIO_BLK_F_CONFIG_WCE"

Currently F_CONFIG_WCE and F_WCE are not connected to each other.
Qemu will advertise F_CONFIG_WCE if config-wce argument is
set for virtio-blk device. And F_WCE is advertised only if
underlying block backend actually has it's caching enabled.

Fix this by advertising F_WCE if F_CONFIG_WCE is also advertised.

To preserve backwards compatibility with newer machine types make this
behaviour governed by "x-enable-wce-if-config-wce" virtio-blk-device
property and introduce hw_compat_4_2 with new property being off by
default for all machine types <= 4.2 (but don't introduce 4.3
machine type itself yet).

Signed-off-by: Evgeny Yakovlev <wrfsh@yandex-team.ru>
Message-Id: <1572978137-189218-1-git-send-email-wrfsh@yandex-team.ru>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-12-13 11:22:06 +00:00
Stefan Hajnoczi 366844f3d1 virtio-fs: fix MSI-X nvectors calculation
The following MSI-X vectors are required:
 * VIRTIO Configuration Change
 * hiprio virtqueue
 * requests virtqueues

Fix the calculation to reserve enough MSI-X vectors.  Otherwise guest
drivers fall back to a sub-optional configuration where all virtqueues
share a single vector.

This change does not break live migration compatibility since
vhost-user-fs-pci devices are not migratable yet.

Reported-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20191209110759.35227-1-stefanha@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-12-13 10:53:57 +00:00
Marc-André Lureau 7038573487 vhost-user-fs: remove "vhostfd" property
The property doesn't make much sense for a vhost-user device.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20191116112016.14872-1-marcandre.lureau@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-12-13 10:38:58 +00:00
Peter Maydell b0ca999a43 Update version for v4.2.0 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-12 16:45:57 +00:00
Peter Maydell 52901abf94 Update version for v4.2.0-rc5 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-10 17:15:21 +00:00
Thomas Huth b3e2bb9458 virtfs: Remove the deprecated "-virtfs_synth" option
It's been marked as deprecated since QEMU v4.1, time to remove it now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
2019-12-09 18:00:35 +01:00
Greg Kurz 26f603d4f8 travis.yml: Drop libcap-dev
Commit 7e46261368 converted virtfs-proxy-helper to using libcap-ng. There
aren't any users of libcap anymore. No need to install libcap-dev.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
2019-12-09 18:00:22 +01:00
Dr. David Alan Gilbert 24e15a0b69 ci: Use libcap-ng
We currently enable libcap-dev in build-clang to pick up the 9p proxy
helper.  Paolo's patch changes (commit 7e46261368) that to use
libcap-ng, so switch to using it.  This also means we'll be testing the
scsi pr manager and the bridge helper.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
[groug, mention SHA1 that dropped libcap]
Signed-off-by: Greg Kurz <groug@kaod.org>
2019-12-09 18:00:08 +01:00
Paolo Bonzini ad430dd9da docker: remove libcap development packages
Libcap was dropped from virtio-9p (commit 7e46261368), so remove it from
the dockerfiles as well.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
[groug, mention SHA1 that dropped libcap]
Signed-off-by: Greg Kurz <groug@kaod.org>
2019-12-09 17:59:33 +01:00
Peter Maydell 9b4efa2ede bitmap fix for 4.2-rc5
- Fix a regression that broke bitmap deletion without a transaction,
 and causes a crash with transaction (only transaction is new to 4.2),
 when a qcow2 file contains persistent bitmaps from prior shutdown
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAl3uaBMACgkQp6FrSiUn
 Q2rX+Af8Dn6cklzAizMLWCvXgEmbUhEvcVp5Gc9w34McCYokQaFDtNDuoShDIksa
 F01uP3TlKYd8JoMiGihqVP1mcof8dyGBNMX1fVr2iYIet0h7OAtzOfatXiHmaz4g
 r3utlx+0BHm+m9jhwsnCKp24ERa9izGmFQAIyaFLarGdasr29ArepCEXGXiOwtYF
 RwD+ioolN9wDcOHjRrEVLHKKRkiX9dSnxKxENahf+M2hVXD+UfbX4cumYxBWOxJQ
 qJpTznTA3BxRzUd3/Ue6NL0YmKmXLqHzyeX2Nc1NsdC485nCKn/QZtgI/8yAU0uL
 6nseBGa1kgF4+97LwGmPKUmumcxGmQ==
 =YAZ1
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2019-12-09' into staging

bitmap fix for 4.2-rc5

- Fix a regression that broke bitmap deletion without a transaction,
and causes a crash with transaction (only transaction is new to 4.2),
when a qcow2 file contains persistent bitmaps from prior shutdown

# gpg: Signature made Mon 09 Dec 2019 15:28:19 GMT
# 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-2019-12-09:
  block/qcow2-bitmap: fix crash bug in qcow2_co_remove_persistent_dirty_bitmap

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-09 16:06:51 +00:00
Vladimir Sementsov-Ogievskiy f56281abd9 block/qcow2-bitmap: fix crash bug in qcow2_co_remove_persistent_dirty_bitmap
Here is double bug:

First, return error but not set errp. This may lead to:
qmp block-dirty-bitmap-remove may report success when actually failed

block-dirty-bitmap-remove used in a transaction will crash, as
qmp_transaction will think that it returned success and will call
block_dirty_bitmap_remove_commit which will crash, as state->bitmap is
NULL

Second (like in anecdote), this case is not an error at all. As it is
documented in the comment above bdrv_co_remove_persistent_dirty_bitmap
definition, absence of bitmap is not an error, and similar case handled
at start of qcow2_co_remove_persistent_dirty_bitmap, it returns 0 when
there is no bitmaps at all.

But when there are some bitmaps, but not the requested one, it return
error with errp unset.

Fix that.

Trigger:
1. create persistent bitmap A
2. shutdown vm  (bitmap A is synced)
3. start vm
4. create persistent bitmap B
5. remove bitmap B - it fails (and crashes if in transaction)

Potential workaround (rather invasive to ask clients to implement it):
1. create persistent bitmap A
2. shutdown vm
3. start vm
4. create persistent bitmap B
5. remember, that we want to remove bitmap B after vm shutdown
...
  some other operations
...
6. vm shutdown
7. start vm in stopped mode, and remove all bitmaps marked for removing
8. stop vm

Fixes: b56a1e3175
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20191205193049.30666-1-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
[eblake: commit message tweaks]
Signed-off-by: Eric Blake <eblake@redhat.com>
2019-12-09 09:23:04 -06:00
Peter Maydell 8350b17be0 ppc patch queue 2019-12-09
This is a last minute pull request for ppc-for-4.2.  I know it's very
 late in freeze, but this does fix a regression: a bad interaction
 between the new qemu and SLOF device tree construction code means that
 SLOF will crash if PCI to PCI bridges are included in the system.
 
 This PR supersedes ppc-for-4.2-20191206.  This one has only a more
 minimal change to the firmware addressed only at fixing this bug and
 not incorporating some other unrelated changes that happened in the
 meantime.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAl3t0wMACgkQbDjKyiDZ
 s5Jfsg//c8aRcQLJDYmdrMdmSh9t2rhXBG7lM+kRYa914HM9J3+Zk03NRJYmeEYn
 NP05Vek0r6EE603dtHujcepfX5PiU5702fENv6aqSun24uionIVsN6NH8CElY93/
 KcDY5xeNX9XOkZ2m6q+QRK8SxgSmB0fEgpQg2pcC3L5zCd7LQ4psaT/lCDY4Mvix
 9l7WdrWKfY5GLZ1F54jX9Rulu4p8Bcy9jTkrddfyQK0/NMjuT3TsnJKt/CSGU0ar
 CjTxxf8C2UTObXB2N6DPRruKQ2sB8Dwx6YXHY9k7pShRiFtBXAJBLOdawX/5MXXq
 DYKl6hw0RNrzcGbyH4fgcIC7X/GoaAf+GSW3c0C6umHo+A63LTjnPvaPhM/Tzdw6
 Z4UnWFZ+xVOuKBc1PAjTEzoQtnoxa8Rn9glnTKtgQ7N/GTwoTMmwLCA7zrbGOyk9
 o1rx/87QpAob6idzZIxNWhNqQIFhKtAz9BjsCfpJIQDDPn2o+NbAQIU/QPKgN0LQ
 rIpXDBM94jjhDkQ4S9HoqwI74AGQjzvUcT59bSsYpYD2UYZAjwAYEIj6gbOgpvJB
 Hu1ujhl50gwgVGxYcfrxoJvURIsroaDNSYVyYVlnZBqIz83SE6LTyzas1GmDsgz5
 GIGPMSr6aYKMTgRnDbHHs48bE1UGPybgnAek/tS5Ei3qoV5JJMs=
 =ZWDP
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.2-20191209' into staging

ppc patch queue 2019-12-09

This is a last minute pull request for ppc-for-4.2.  I know it's very
late in freeze, but this does fix a regression: a bad interaction
between the new qemu and SLOF device tree construction code means that
SLOF will crash if PCI to PCI bridges are included in the system.

This PR supersedes ppc-for-4.2-20191206.  This one has only a more
minimal change to the firmware addressed only at fixing this bug and
not incorporating some other unrelated changes that happened in the
meantime.

# gpg: Signature made Mon 09 Dec 2019 04:52:19 GMT
# gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full]
# gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown]
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-4.2-20191209:
  pseries: Update SLOF firmware image

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-09 11:07:34 +00:00
Alexey Kardashevskiy a2fad86497 pseries: Update SLOF firmware image
This fixes PCI bridge regression.

Alexey Kardashevskiy (3):
      ibm,client-architecture-support: Fix stack handling
      fdt: Fix updating the tree at H_CAS
      version: update to 20191209

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-12-09 12:16:26 +11:00
Peter Maydell 02f9c885ed * fix for x86 KVM on older kernels (Yang Zhong)
-----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAl3qPSgUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroMaPAf/d9qRoE2EBrvz2gYksEz4WY0BpyyG
 1QX5U3cF3DNXWyqbB2gWMR/O7h4cxYBr8u9tTFVUjhAK69fNqm0lACfhkmhUjeMx
 Nh1Hy3JW9wDadUk/8jEmxGH+vJcJW5wV6PJtyKYTGGkpA4ZvUIY7xSea4MlfrqPr
 mpBk3GR2ItsQh+IEyItfQrNWSqKEiHjxejsb8DsM0qkJSudT462vyL2BjVEvIF3Z
 uQPO5U8flSeR1mgAqIGOP98Db1iWPBOCAwDW62W18CH5t64Q7ZTTB+nPP+MrLoPm
 IMkRr1zKMJFX+z20Sl/E3NoQ1cLVr0bMFN792uNKR0qFEXyhsQM/CFRHRQ==
 =T82y
 -----END PGP SIGNATURE-----

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

* fix for x86 KVM on older kernels (Yang Zhong)

# gpg: Signature made Fri 06 Dec 2019 11:36:08 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream:
  target/i386: disable VMX features if nested=0

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-06 15:05:20 +00:00
Yang Zhong 2605188240 target/i386: disable VMX features if nested=0
If kvm does not support VMX feature by nested=0, the kvm_vmx_basic
can't get the right value from MSR_IA32_VMX_BASIC register, which
make qemu coredump when qemu do KVM_SET_MSRS.

The coredump info:
error: failed to set MSR 0x480 to 0x0
kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
Message-Id: <20191206071111.12128-1-yang.zhong@intel.com>
Reported-by: Catherine Ho <catherine.hecx@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-12-06 12:35:40 +01:00
Peter Maydell 1bdc319ab5 Update version for v4.2.0-rc4 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-03 17:56:30 +00:00
Peter Maydell 24d68f3737 * last HVF fix (Cameron)
-----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAl3mGMcUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroNkgAf9F37Q+vR+AE43/tMExyyxP43LD56X
 S+GMyR6ZUxk+w2vUCI0J4mVip5lmFrsNGKQmHpIqUDa/YnUiGm0FmCIXIZTfC14C
 96AROkNxG3/q4H7pznnMhtAJBltvDydGopK8uN6pgsCQchpr0OehzONa1iR7dxdL
 dQxjYAvj3SITUULyhzMYt5Id9V1EHUjU9dY8exguMDlU27Mpe6BBTPHe1EZ6c47a
 ZX41v1sPTC70ylbMAfRWrFVCbVGPh4ojzV3s/3CmuVhlsQeUwa33ghWEsuEXTFxh
 RVKBT9RZTlfKiNOlr2YulkVjteMOy+nLfGgPEebX8oM1Q51hr4bujkSOMA==
 =9PV4
 -----END PGP SIGNATURE-----

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

* last HVF fix (Cameron)

# gpg: Signature made Tue 03 Dec 2019 08:11:51 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream:
  hvf: correctly inject VMCS_INTR_T_HWINTR versus VMCS_INTR_T_SWINTR.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-03 10:07:56 +00:00
Cameron Esfahani 64bef038e7 hvf: correctly inject VMCS_INTR_T_HWINTR versus VMCS_INTR_T_SWINTR.
Previous implementation in hvf_inject_interrupts() would always inject
VMCS_INTR_T_SWINTR even when VMCS_INTR_T_HWINTR was required.  Now
correctly determine when VMCS_INTR_T_HWINTR is appropriate versus
VMCS_INTR_T_SWINTR.

Make sure to clear ins_len and has_error_code when ins_len isn't
valid and error_code isn't set.

Signed-off-by: Cameron Esfahani <dirty@apple.com>
Message-Id: <bf8d945ea1b423786d7802bbcf769517d1fd01f8.1575330463.git.dirty@apple.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-12-03 09:11:42 +01:00
Peter Maydell 39032981fa Error reporting patches for 2019-12-02
-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAl3lKxkSHGFybWJydUBy
 ZWRoYXQuY29tAAoJEDhwtADrkYZTtmYP/i3G3U3L74gsuk0YDLedqHktcc+QGook
 oUkhEKhaU2VgIPgL58ghALzEXQobridh6FQsysx5ETGEN+snwkgJeqM4pAG1ROB6
 OpF4lvR613HEGK+YjxwYpera8Hu4K/6aYSddrpf+mvnUcI7LR7OrvbnqE8slj294
 fp7LdonIDdzl48zzb2DcRYdySNobMmWgFvX5jGbayZ7274iU7wHbk5D2TCf7MvxP
 iuRpsQYQS9lwtCxiaWveMU5mW7Fjcv54CoCxLpY0Z0kyFR1g6p7hVJtfuaxaRJMp
 8QOkLdLDxOYLmL/eGOjFbaaSEk4aXjCnrHy8LgcViqzOl6pXyXbxSv0GTLcPH1mH
 nVutohuZzjxCa+nNf6CW6DbTOZOBwGl6efVLtUqkkd855ls9poxyxMLTyO/EveSK
 E46ZLSM3XiX8HGmboBeeW18QS5wUJlT8SB0PO9k6oQr9LdCJt45MjGCZCjjOglmk
 1RO+Mx+XlzjFJsbdMoNfSrYVvuPn+c1mACSoITkr0eTr2XyqaxXknHMRKXacJSt7
 1ppA4sFaQH6ORvCKm8NutTRAd0qAlOdougmrgSL7p0ZcaxfygAG4GAgh6UjEDWOe
 /+LmmT2p41BOxmd3F5Pj6YZaOWucw7rZMm1YuxN9ZllMKoj9lP5leGjssGYom+K6
 UW96fQzGmpaV
 =qwBN
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2019-12-02' into staging

Error reporting patches for 2019-12-02

# gpg: Signature made Mon 02 Dec 2019 15:17:45 GMT
# 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-error-2019-12-02:
  block/file-posix: Fix laio_init() error handling crash bug
  net/virtio: Fix failover error handling crash bugs
  net/virtio: Drop useless n->primary_dev not null checks

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-12-02 16:29:41 +00:00
Markus Armbruster cb09104ea8 block/file-posix: Fix laio_init() error handling crash bug
raw_aio_attach_aio_context() passes uninitialized Error *local_err by
reference to laio_init() via aio_setup_linux_aio().  When laio_init()
fails, it passes it on to error_setg_errno(), tripping error_setv()'s
assertion unless @local_err is null by dumb luck.

Fix by initializing @local_err properly.

Fixes: ed6e216171
Cc: Nishanth Aravamudan <naravamudan@digitalocean.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20191130194240.10517-4-armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
2019-12-02 16:14:41 +01:00
Markus Armbruster 5a0948d36c net/virtio: Fix failover error handling crash bugs
Functions that take an Error ** parameter to pass an error to the
caller expect the parameter to point to null.
failover_replug_primary() violates this precondition in several
places:

* After qemu_opts_from_qdict() failed, *errp is no longer null.
  Passing it to error_setg() is wrong, and will trip the assertion in
  error_setv().  Messed up in commit 150ab54aa6 "net/virtio: fix
  re-plugging of primary device".  Simply drop the error_setg().

* Passing @errp to qemu_opt_set_bool(), hotplug_handler_pre_plug(),
  and hotplug_handler_plug() is wrong.  If one of the first two fails,
  *errp is no longer null.  Risks tripping the same assertion.
  Moreover, continuing after such errors is unsafe.  Messed up in
  commit 9711cd0dfc "net/virtio: add failover support".  Fix by
  handling each error properly.

failover_replug_primary() crashes when passed a null @errp.  Also
messed up in commit 9711cd0dfc.  This bug can't bite as no caller
actually passes null.  Fix it anyway.

Fixes: 9711cd0dfc
Fixes: 150ab54aa6
Cc: Jens Freimann <jfreimann@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20191130194240.10517-3-armbru@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
2019-12-02 16:14:38 +01:00
Markus Armbruster 4dbac1aed2 net/virtio: Drop useless n->primary_dev not null checks
virtio_net_handle_migration_primary() returns early when it can't
ensure n->primary_dev is non-null.  Checking it again right after that
early return is redundant.  Drop.

If n->primary_dev is null on entering failover_replug_primary(), @pdev
will become null, and pdev->partially_hotplugged will crash.  Checking
n->primary_dev later is useless.  It can't actually be null, because
its caller virtio_net_handle_migration_primary() ensures it isn't.
Drop the useless check.

Cc: Jens Freimann <jfreimann@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20191130194240.10517-2-armbru@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
2019-12-02 16:14:33 +01:00
Paolo Bonzini 7e46261368 virtfs-proxy-helper: switch from libcap to libcap-ng
virtfs-proxy-helper is the only user of libcap; everyone else is using
the simpler libcap-ng API.  Switch and remove the configure code to
detect libcap.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
[groug: - drop remaining -lcap from Makefile
        - fix error message in configure]
Signed-off-by: Greg Kurz <groug@kaod.org>
2019-12-02 15:26:33 +01:00
Alex Bennée fb2246882a .travis.yml: drop xcode9.4 from build matrix
It's broken so it's no longer helping. The latest Xcode is covered by
Cirrus.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20191127132430.3681-1-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-29 15:51:52 +00:00
Peter Maydell b944295090 A fix for regression in the s390-ccw bios
-----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAl3g5FsRHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbXH8Q//X2+FcS42xJ3ND+vKThQVp8lsXo3NvGzD
 mOrOqSplx47qFdbNlvM+UT9vvP82K9fQtOK/2KFDpnO2+zKJLcqeQBBdo5faJqgw
 MO7Xdr6Yi1Xh/eQYdE6mP3kCeQ96ZMp9HrGgHPtCHck4vFbotYH8UjvSK/vEqvt3
 AN/zBVXC0aoAoD0SSWVGCVH5yiglnRISlKFVwxncQeWWIlrCmBSRIwy9z+ZYQYxQ
 rGDbKOejv2xDKF8SwNITjC2lPFZqJT8+eWjoqQ8tppoUBJnjiWQw8VxWI/ivfPX9
 W9pLv0X97mvCdUtuuhPaZVl5bWXWSPAWIq7z6SeuxluPQlj8VT2jIi0apgEchNnp
 kXSQgMOTtKB/XFkA0NiRVtUpGkZ8wly/u7w6F05zjdkenMq2SrKSk+30j22TCh9y
 fYh1KMAKFEECObzGbkcsctJ4uzh+rG6ehecDyAKirQvhcyDsiRoXsDyYGS5oBXb1
 gZoe4SPQRbcpVYDbah6CFzCBAzuBBV4JfWBOHMntS5QOnO13+mSxC9lXa1mMYGi2
 fqS0JzpnsGAR5Uyb3XAurvJw7gE2XSOGS0XZanisyjlFbDSwVJjy2wkB3ofwz4xo
 weYpAEfSvqHcuxfExeTDwWHb4B5FGwzb7V4lOtgqqDwDs55wZ//lmw+7A2veyh+Q
 jWAQ3TYovX0=
 =NzmB
 -----END PGP SIGNATURE-----

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

A fix for regression in the s390-ccw bios

# gpg: Signature made Fri 29 Nov 2019 09:26:51 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-29:
  pc-bios/s390: Update firmware image with the "fix sclp_get_loadparm_ascii" patch
  pc-bios/s390-ccw: fix sclp_get_loadparm_ascii

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-29 11:41:55 +00:00
Thomas Huth bf876a688c pc-bios/s390: Update firmware image with the "fix sclp_get_loadparm_ascii" patch
This fixes various boot scenarios, e.g. the possibility to use
"-boot menu=on".

Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-11-29 10:12:33 +01:00
Claudio Imbrenda f24ec9fead pc-bios/s390-ccw: fix sclp_get_loadparm_ascii
The existing s390 bios gets the LOADPARM information from the system using
an SCLP call that specifies a buffer length too small to contain all the
output.

The recent fixes in the SCLP code have exposed this bug, since now the
SCLP call will return an error (as per architecture) instead of
writing partially and completing successfully.

The solution is simply to specify the full page length as the SCCB
length instead of a smaller size.

Fixes: 832be0d8a3 ("s390x: sclp: Report insufficient SCCB length")
Fixes: 9a22473c70 ("pc-bios/s390-ccw: get LOADPARM stored in SCP Read Info")

Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-Id: <1574944437-31182-1-git-send-email-imbrenda@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Tested-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2019-11-29 09:16:02 +01:00
Peter Maydell 1a61a081ac Update version for v4.2.0-rc3 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26 21:52:26 +00:00
Peter Maydell be54302608 A few vm-test updates
- use Ubuntu 18.04 for i386 image
   - python3 for centos and docker
   - install locales for ubuntu
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAl3dDQ4ACgkQ+9DbCVqe
 KkRERQf/UasMmLybcKQwfyXTemk0D0O7IW2Nb2PNg+6i/BWXm4WfNCVQOizZFDLV
 PWq0K7OyRWzzsCjD4r6by8hkDkygBDu6kJE2kmuojhj/g1RHQNf4vmJDMCYbVt64
 mfEbqOCpyGWbTfaUoLZWoc6La+QsAPqwMy02NIGDrSZvuD7VUyjNssfSa/UgUIvy
 h8XiRz5ObRijpr7p59G2IJfvvz4Lp1X1mKzhjzjQUsFbWx75jiWp0f0WpBDbPEBA
 nSVOC/lvGQDvfJjZsk04VmkbkKXmGIYn53pWSacSKZDZTS8Eg5xT6dhpnhlPPzQD
 82upUJbvEfQEUVwlLuZo1YBPV0QfUw==
 =xNjo
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stsquad/tags/pull-rc3-testing-261119-1' into staging

A few vm-test updates

  - use Ubuntu 18.04 for i386 image
  - python3 for centos and docker
  - install locales for ubuntu

# gpg: Signature made Tue 26 Nov 2019 11:31:26 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-rc3-testing-261119-1:
  tests/vm/ubuntu: update i386 image to 18.04
  tests/vm/ubuntu: include language pack to silence locale warnings
  tests/vm/centos: fix centos build target

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26 20:43:46 +00:00
Peter Maydell e0d79c9435 * VMX feature fix (myself)
* HVF fixes (Cameron)
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAl3c6UMUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroNPxgf9FteAWW0LfRiCa1Rw4iujvqwiNLiM
 VrxlSqmQ65n+0Ao2CA6/qJ4KqDQMDZKmDIX4PHi39BtkWskIDbl6fl4Gwbxw7FYu
 7VbmCNnFB+/osz/w4n5jHkomlGJJSj32qWh830GIF5a0+F8Mey9KZl2PHLespLeB
 Dmbge8cYP3am96gzLXEgB+FvpdUjYWaSgynjmhl4p3tv3xDzTJSG6E53Ksd4wiSX
 4u5plnVjdVZqKdcKrU+9c1h65jlwheHGBr5q7paUuZ93h6/eAdC9h8Nimn5I2/9Z
 fy6FHFCYTvCWQnFFHxvrlesxJRGFmKS0LXNOcM8zUdsx/Mr6Hk8HGITyrQ==
 =fulk
 -----END PGP SIGNATURE-----

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

* VMX feature fix (myself)
* HVF fixes (Cameron)

# gpg: Signature made Tue 26 Nov 2019 08:58:43 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini/tags/for-upstream:
  hvf: more accurately match SDM when setting CR0 and PDPTE registers
  hvf: correctly handle REX prefix in relation to legacy prefixes
  hvf: remove TSC synchronization code because it isn't fully complete
  hvf: non-RAM, non-ROMD memory ranges are now correctly mapped in
  target/i386: add two missing VMX features for Skylake and CascadeLake Server

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26 19:48:01 +00:00
Peter Maydell 5f64adc138 target-arm queue:
* handle FTYPE flag correctly in v7M exception return
    for v7M CPUs with an FPU (v8M CPUs were already correct)
  * versal: Add the CRP as unimplemented
  * Fix ISR_EL1 tracking when executing at EL2
  * Honor HCR_EL2.TID3 trapping requirements
 -----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAl3dMqYZHHBldGVyLm1h
 eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3hnbD/4lQJUhXBeYSuZn4TcnjQ/S
 pVVhnxq/TkAkYv2lhUvD8a9MUkZbufXwOl9JbQK21vJamz1LlFqoXtrnJsjJrL53
 oHmPZXJ7dYJkOerszZfrGQ2+2hvX8uf62oaV9jdpNLOHQOSGCVjzHCf/cnqrC/W0
 dmbbYPOb2mO4JiTVa6HkKr54EjPPnIKoPAhctMNffc1Oatxh7hPXpZWmW+sJFxvx
 GwyZEZ39ySBeKxEsiRMOTB0JhJgsZ3atqmiCzabOn7tjipPY3/FWKqJq+XwZUG29
 kBv7BrO17s/5idpvg17Js16uUdwbU5G6tT5T73XFE3w+1MRl193cx2WPcO/Z1vze
 +RJDKvJRt5ttspX4+AqMgq5iX2C4f9FVgNI/szI3RvsopTnF0ZHhWW2EsFzK4jDT
 ieAJ8Il5D6m7uapSHop3A4uEN5EiK1HVrx+0EeIxiBT0/C132jCqiro3q2a+EwKZ
 nnplVCiSIecAT1XBy31lkYP5UlP4+eDxiBCJul2cnwpAUc7LFRO5KzfOkLlQNIGU
 ElCej4Ga8UjxWCAPgL34qkjODpX1izUQ7YltAWyFfmTkhv6m5o+u113b3bwPWyWD
 H1qq1UW6/MSaWV7pY8Kqas5krxEVn8lCfi3EKY6ReXLvvoN3m9GlFDwjMmTzwalL
 D0EfAoU/xoiZ0hxps0LX1A==
 =EFhx
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20191126' into staging

target-arm queue:
 * handle FTYPE flag correctly in v7M exception return
   for v7M CPUs with an FPU (v8M CPUs were already correct)
 * versal: Add the CRP as unimplemented
 * Fix ISR_EL1 tracking when executing at EL2
 * Honor HCR_EL2.TID3 trapping requirements

# gpg: Signature made Tue 26 Nov 2019 14:11:50 GMT
# 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-20191126:
  target/arm: Honor HCR_EL2.TID3 trapping requirements
  target/arm: Fix ISR_EL1 tracking when executing at EL2
  hw/arm: versal: Add the CRP as unimplemented
  target/arm: Fix handling of cortex-m FTYPE flag in EXCRET

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26 18:37:49 +00:00
Peter Maydell 0d4f9d7dc7 Block patches for 4.2.0-rc3:
- Fix for shared storage migration with persistent dirty bitmaps
 -----BEGIN PGP SIGNATURE-----
 
 iQFGBAABCAAwFiEEkb62CjDbPohX0Rgp9AfbAGHVz0AFAl3dKEQSHG1yZWl0ekBy
 ZWRoYXQuY29tAAoJEPQH2wBh1c9A9i0H/jtePaUsYXnkcZ09PqCLFtGp1euIOU6S
 hM3BP38EQoO6na7+rmq3OGHxyxkfCg3rO1Vp9zp57TzB46D7GzNzHU1E9LByJtQk
 vkflspgK8OuJk78r6Tm9AJx0dXvyrTUC+BsyySjJPZ80B7zZGrNAUxezvzaAVotJ
 dwKRNOFOn+nyEjEWfPJhdx7C9P+8vXhL3jL+CKwQkHpBmZ9Vx4hMHtoZEfc5+Lhv
 30aOGBrY2kwkhTjQ10UNg2ErlIP79gYbYsw4asSWEKqKeYBRtd3AtTN1ybZaJJf1
 rBNzIh+XEmyqtUqLn4W87uKKldLul30VOcNVCjoWZ6YOF4aJt5mikEo=
 =fTgW
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-11-26' into staging

Block patches for 4.2.0-rc3:
- Fix for shared storage migration with persistent dirty bitmaps

# gpg: Signature made Tue 26 Nov 2019 13:27:32 GMT
# 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-2019-11-26:
  iotests: add new test cases to bitmap migration
  block/qcow2-bitmap: fix bitmap migration

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26 17:29:29 +00:00
Peter Maydell a0aaca7e9c ppc patch queue for 2019-11-26
Here's the first 4.2 hard freeze pull request from me.  This has:
 
   * A fix for some testcases that cause errors on older host kernels
     (e.g. RHEL7), with our new default configuration of VSMT mode
   * Changes to make VFIO devices interact properly with change of irq
     chip caused by PAPR feature negotiation.  This is more involved
     than I would like, but it's a problem in real use cases and I
     can't see an easier way to handle it.
   * Fix an error with ms6522 counters for the g3beige machine
   * Fix a coverity warning
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAl3cvZAACgkQbDjKyiDZ
 s5LzYA/+KUmXnvvaVfRMLqYZuBVLxUN7+b472mYxrZY8neQ4yO9JYcFRb1FWlZKo
 zqUjBXljARPJZoT4pGhobqgR6hs/nbn6WaN0oI0ZrxHKMUsPe56c90PbvprtiGMe
 qGCoSuWQHccwouSZFmMcOUqO8rT+wlwMV+if/WbwNvhm4oCvA9Lcx2bBNllLN8XB
 bIdiZACsk+XHJDm5SDNr/Wyhz/N8tODStuKPYtyoHd5LarXVUymqljaNJhEIcqQZ
 awFP200fX6fKR+jRUV7AnG5faF2p1P6K2khwMYQF0QzpEQg4d9hKBs7SsSkzY3YD
 8nVeXGi6201kw9V5tqzqiG0mNcCME8Pb3K4fsmOfLSWbnOax8yv9tisz8+FYuful
 KxUBjp9cE/Tla+Zg1SeQ8VZrHJhcX98aT57CWQCtuYX+82krHQCKMSRpbEJ6ECRJ
 dChfXrAqmtG0mPd7sypeQPuJRBMOwuJsuJr6a0glDY61XmXCJbH5R6Jf+iDQ2Nf8
 owx07xNQ5fVO0RYDqr+eZSTfllW1P2FNI8sz0XFp6/dAz3KbLuNbzREFZcdEV1Gp
 CdJd9UA1P45c/BOOQy7FAeewKhuhgBE1S7m5brX9t1CorUW2zaM/hLwd3ZII0UyE
 if8hYpfeTY+lhNpu0hCpyzecZOMBabLAmQqIUUKO/wkydcIKYUg=
 =GHGC
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.2-20191126' into staging

ppc patch queue for 2019-11-26

Here's the first 4.2 hard freeze pull request from me.  This has:

  * A fix for some testcases that cause errors on older host kernels
    (e.g. RHEL7), with our new default configuration of VSMT mode
  * Changes to make VFIO devices interact properly with change of irq
    chip caused by PAPR feature negotiation.  This is more involved
    than I would like, but it's a problem in real use cases and I
    can't see an easier way to handle it.
  * Fix an error with ms6522 counters for the g3beige machine
  * Fix a coverity warning

# gpg: Signature made Tue 26 Nov 2019 05:52:16 GMT
# gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full]
# gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown]
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-4.2-20191126:
  ppc/spapr_events: fix potential NULL pointer dereference in rtas_event_log_dequeue
  mos6522: update counters when timer interrupts are off
  spapr: Work around spurious warnings from vfio INTx initialization
  spapr: Handle irq backend changes with VFIO PCI devices
  vfio/pci: Respond to KVM irqchip change notifier
  vfio/pci: Split vfio_intx_update()
  kvm: Introduce KVM irqchip change notifier
  pseries: fix migration-test and pxe-test

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26 16:48:48 +00:00
Peter Maydell 3c48f6daed vmstate-static-checker fix for 4.2
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEEWjIv1avE09usz9GqKAeTb5hNxaYFAl3cWusUHGVoYWJrb3N0
 QHJlZGhhdC5jb20ACgkQKAeTb5hNxaZtlg//beEZ0+koq4Ik/0brgL+HfD+2duPc
 c2BbHO54p3aCK5JWNz4UBom9KfPYTwRPtJm9t33a4N0OlX9jdKqpblwN9oa1fYbP
 0OSDjGTDpsJVnM1g+UDgmzirS6rGQSq84msVJJfyyy688wQeJeSPApGaPFwwjwUa
 MIv1lJH8bOfHmFZqN7lXggrPz+vHR6v6bq39ZlTFKMkeX3wMhCLwMKiRG1xLOqCe
 0wKPpWxl3OiRNAjIt8gNnNBe46jIPUxu66UuYna2AHwKurCESFH0K4b7KC9t2hMT
 xN/TaIvL1J9Hiwy91Im6KDoD4Qizcm8oN3SDNi9tAFY2FypKiGmf8XBRVx1WI9Lw
 nJYP8i2Eb22o83sySA3Rg54DVMuIJK4iraOUYxY/l34aWeSoTo3uklrs4N5Pxx59
 T1sYuMdXyJPZXPNd1C3rDKTV8ZkKOlY+AX2A+rQnzeWcX6ACRMm+fUakSLXOomoR
 brEsslHWK/fO8tNLsVgz97kNfCikiA4xftJBCtRFLmI4rwhBIn0sf5WveUTsFNeL
 LCOxe9HfJIGqhhUvYjjfilK6NognyAo5hOBEq21z+xdiYvz8tIwBkmNmDsrfBsyT
 40bwdzz/8hcP1CKQooVryambr3qSwPtl95a3CdkPSZAlPrgEZShvuj/V45igr46w
 Sm/owD55ZPJs6z4=
 =fUWE
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request' into staging

vmstate-static-checker fix for 4.2

# gpg: Signature made Mon 25 Nov 2019 22:51:23 GMT
# gpg:                using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6
# gpg:                issuer "ehabkost@redhat.com"
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full]
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/python-next-pull-request:
  vmstate-static-checker: Fix for current python

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26 15:10:45 +00:00
Marc Zyngier 6a4ef4e5d1 target/arm: Honor HCR_EL2.TID3 trapping requirements
HCR_EL2.TID3 mandates that access from EL1 to a long list of id
registers traps to EL2, and QEMU has so far ignored this requirement.

This breaks (among other things) KVM guests that have PtrAuth enabled,
while the hypervisor doesn't want to expose the feature to its guest.
To achieve this, KVM traps the ID registers (ID_AA64ISAR1_EL1 in this
case), and masks out the unsupported feature.

QEMU not honoring the trap request means that the guest observes
that the feature is present in the HW, starts using it, and dies
a horrible death when KVM injects an UNDEF, because the feature
*really* isn't supported.

Do the right thing by trapping to EL2 if HCR_EL2.TID3 is set.

Note that this change does not include trapping of the MVFR
registers from AArch32 (they are accessed via the VMRS
instruction and need to be handled in a different way).

Reported-by: Will Deacon <will@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Tested-by: Will Deacon <will@kernel.org>
Message-id: 20191123115618.29230-1-maz@kernel.org
[PMM: added missing accessfn line for ID_AA4PFR2_EL1_RESERVED;
 changed names of access functions to include _tid3]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26 13:55:37 +00:00
Marc Zyngier 7cf95aed53 target/arm: Fix ISR_EL1 tracking when executing at EL2
The ARMv8 ARM states when executing at EL2, EL3 or Secure EL1,
ISR_EL1 shows the pending status of the physical IRQ, FIQ, or
SError interrupts.

Unfortunately, QEMU's implementation only considers the HCR_EL2
bits, and ignores the current exception level. This means a hypervisor
trying to look at its own interrupt state actually sees the guest
state, which is unexpected and breaks KVM as of Linux 5.3.

Instead, check for the running EL and return the physical bits
if not running in a virtualized context.

Fixes: 636540e9c4
Cc: qemu-stable@nongnu.org
Reported-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Message-id: 20191122135833.28953-1-maz@kernel.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26 13:55:36 +00:00
Edgar E. Iglesias f0138990ce hw/arm: versal: Add the CRP as unimplemented
Add the CRP as unimplemented thus avoiding bus errors when
guests access these registers.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
Message-id: 20191115154734.26449-2-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26 13:55:36 +00:00
Jean-Hugues Deschênes f900b1e5b0 target/arm: Fix handling of cortex-m FTYPE flag in EXCRET
According to the PushStack() pseudocode in the armv7m RM,
bit 4 of the LR should be set to NOT(CONTROL.PFCA) when
an FPU is present. Current implementation is doing it for
armv8, but not for armv7. This patch makes the existing
logic applicable to both code paths.

Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@ossiaco.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-11-26 13:55:36 +00:00
Vladimir Sementsov-Ogievskiy d8130f4c42 iotests: add new test cases to bitmap migration
Add optional pre-shutdown: shutdown/launch vm before migration. This
leads to storing persistent bitmap to the storage, which breaks
migration with dirty-bitmaps capability enabled and shared storage
until fixed by previous commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20191125125229.13531-3-vsementsov@virtuozzo.com
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-11-26 14:18:01 +01:00