Commit Graph

89482 Commits

Author SHA1 Message Date
Thomas Huth
8cc461c185 docs/about/removed-features: Document removed CLI options from QEMU v3.0
These CLI options had been removed/replaced in QEMU v3.0. Still, some
people might want to update from older versions to the recent QEMU version,
so we should give some recommendations for the replacements in our
documentation.

Message-Id: <20210811084103.74832-3-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2021-08-11 15:38:54 +02:00
Thomas Huth
3d9c7ec955 docs/about/removed-features: Document removed CLI options from QEMU v2.12
These CLI options had been removed/replaced in QEMU v2.12. Still, some
people might want to update from older versions to the recent QEMU version,
so we should give some recommendations for the replacements in our
documentation.

Message-Id: <20210811084103.74832-2-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2021-08-11 15:38:50 +02:00
Alexander Bulekov
3973e7ae63 fuzz: avoid building twice, when running on gitlab
On oss-fuzz, we build twice, to put together a build that is portable to
the runner containers. On gitlab ci, this is wasteful and contributes to
timeouts on the build-oss-fuzz job. Avoid building twice on gitlab, at
the remote cost of potentially missing some cases that break oss-fuzz
builds.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20210809111621.54454-1-alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2021-08-11 13:40:01 +02:00
Thomas Huth
b063c290f3 tests/qtest/vhost-user-blk-test: Check whether qemu-storage-daemon is available
The vhost-user-blk-test currently hangs if QTEST_QEMU_STORAGE_DAEMON_BINARY
points to a non-existing binary. Let's improve this situation by checking
for the availability of the binary first, so we can fail gracefully if
it is not accessible.

Message-Id: <20210811095949.133462-1-thuth@redhat.com>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Tested-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2021-08-11 13:40:01 +02:00
Thomas Huth
cc1838c25d storage-daemon: Add missing build dependency to the vhost-user-blk-test
vhost-user-blk-test needs the qemu-storage-daemon, otherwise it
currently hangs. So make sure that we build the daemon before running
the tests.

Message-Id: <20210811094705.131314-1-thuth@redhat.com>
Tested-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2021-08-11 13:39:50 +02:00
Daniel P. Berrangé
a1f0f36838 gitlab: skip many more targets in windows cross builds
The windows cross builds still take way too long in gitlab CI, so need
more targets to be skipped. We don't want to hurt coverage of other
cross builds more though, so we let jobs fine tune with a new env
variale $CROSS_SKIP_TARGETS.

We take the set of targets that are considered relatively niche or
very old architectures, and skip approx half of them in win32 builds
and the other half of them in win64.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210810140653.3969823-3-berrange@redhat.com>
[thuth: Swapped the "CROSS_SKIP_TARGETS:" lines as suggested by philmd]
Signed-off-by: Thomas Huth <thuth@redhat.com>
2021-08-11 08:52:31 +02:00
Daniel P. Berrangé
a62354915b gitlab: exclude sparc-softmmu and riscv32-softmmu from cross builds
We need to cut down compile time by excluding more targets. Both these
targets still have their 64-bit variant enabled, so the loss of coverage
is mitigated to some degree.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Willian Rampazzo <willianr@redhat.com>
Message-Id: <20210810140653.3969823-2-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
2021-08-11 07:52:43 +02:00
Peter Maydell
703e8cd618 Update version for v6.1.0-rc3 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-10 19:08:09 +01:00
Hanna Reitz
b0c4798f97 MAINTAINERS: Name and email address change
I have changed my name and email address.  Update the MAINTAINERS file
to match, and .mailmap in case anyone wants to send me an email because
of some past commit I authored.  (As suggested by Philippe, I put the
.mailmap line into the "preferred name forms" section, considering it
counts as a git author config change.)

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-10 16:42:16 +01:00
Peter Maydell
02b8aeede2 fixes for gtk, sdl and audio live migration.
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEoDKM/7k6F6eZAf59TLbY7tPocTgFAmESbpYACgkQTLbY7tPo
 cThQuQ//X5kLamLlPjM6GAukCty5/15rs3lrjQuIwTxxWX//82pmGUwVPGm3oiqj
 6wb2ps4Exb5dCxpVs/smnPt9P3bkbrrbfCLxmWZ3Uf0+MTpadeaiG2V4KS9QqZYR
 o6lnl9hStt8P48zhLmKpJcQpmo6qDNrOnPPz3GBFnB4lJ6DtVGHDf0+BQYFLDQ6p
 t+/F9jbXn8IFoMwiMJd1x1A3mezJQ5wyf8rhMQh+FO2bki1IuZDdY2XwwBABNMrp
 1PIgZVSq69/CAjWTQuw2DEEhtcD/z1cI6mx08zIXHBgybkhZk1xjHLlakRuIfjzP
 KSpS2Dg8O1Tgkr1X+zjoS2LrqiM9okw0mSwOfnOXuz1wNgNj/JggRTV9c7FFA7SO
 D1fRpXOx1pq8Mo3YYIN31oxt2PELipR/Jn1PK29ezB06qY7Yv+zOBw5Ep+InEuz+
 O4g2mBzv1iZsZ7X1wfr8Fu9KfeMmxNaKjL/J6vD0hbjufno6WmVaexwVXBTMGW9q
 3mXCPkGu4dWbSBXjomV9GYmcpk23bR7oH57c3PFXM7STX4Nc0leABW0HwZ6XHeDu
 l4Wb5HC6kR5KkhemZ7ifUO2ElfFBn6XUQY1q/UPV/gzYKiMyot0GBlHjd6O0/NiQ
 sxU6QxrBDv3MjhzUQpBCrNeQm/f8PUAEgfXmznjx24HPJWorLL8=
 =qZFO
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20210810-pull-request' into staging

fixes for gtk, sdl and audio live migration.

# gpg: Signature made Tue 10 Aug 2021 13:18:30 BST
# gpg:                using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# 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/fixes-20210810-pull-request:
  ui/sdl2: Check return value from g_setenv()
  audio: Never send migration section
  ui/gtk: retry sending VTE console input

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-10 14:00:39 +01:00
Peter Maydell
6ff5b5d6d5 ui/sdl2: Check return value from g_setenv()
Setting environment variables can fail; check the return value
from g_setenv() and bail out if we couldn't set SDL_VIDEODRIVER.

Fixes: Coverity 1458798
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210809161424.32355-1-peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-08-10 10:56:39 +02:00
Dr. David Alan Gilbert
da77adbaf6 audio: Never send migration section
The audio migration vmstate is empty, and always has been; we can't
just remove it though because an old qemu might send it us.
Changes with -audiodev now mean it's sometimes created when it didn't
used to be, and can confuse migration to old qemu.

Change it so that vmstate_audio is never sent; if it's received it
should still be accepted, and old qemu's shouldn't be too upset if it's
missing.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Tested-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20210809170956.78536-1-dgilbert@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-08-10 10:55:57 +02:00
Peter Maydell
1f3afa5da2 qemu-ga patch queue for hard-freeze
* fix memory leak in guest_exec
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEzqzJ4VU066u4LT+gM1PJzvEItYQFAmER1ZcACgkQM1PJzvEI
 tYQuAgf9Haicx4FaFYUu7KuharaSlsaRpPdm5yjyITCGBUdktXZZoAPLwc18p0Wx
 euB8dQ+7OdXYWMYqVtJwoTyKNd0vKIDL+WmM1xJ2gnsrdOKq7vPthkx2Ci1DFZ2P
 V7UGVSVdH8s5tePxX+i0XNMDl8jBj1ugrmXwx8BxFct3u6mzvBm4Sto6qfPZGLPw
 FZNWQYLqYbws9Ig4QPKRmxcq96fKjzSvfGexZ/yiEgU+6Ln6ouAqaErvop/l3pY4
 hZOkb/FaseDyUsT7oyQnGZSrIrMrvKooes0Raus9ISnRjzA2y6qbFkibdR+n2sG1
 7YOBUSXthHoU8XL1zHRI7/ioRuBHtg==
 =73Wq
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2021-08-09-tag' into staging

qemu-ga patch queue for hard-freeze

* fix memory leak in guest_exec

# gpg: Signature made Tue 10 Aug 2021 02:25:43 BST
# gpg:                using RSA key CEACC9E15534EBABB82D3FA03353C9CEF108B584
# gpg: Good signature from "Michael Roth <flukshun@gmail.com>" [full]
# gpg:                 aka "Michael Roth <mdroth@utexas.edu>" [full]
# gpg:                 aka "Michael Roth <mdroth@linux.vnet.ibm.com>" [full]
# Primary key fingerprint: CEAC C9E1 5534 EBAB B82D  3FA0 3353 C9CE F108 B584

* remotes/mdroth/tags/qga-pull-2021-08-09-tag:
  qga: fix leak of base64 decoded data on command error

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-10 09:42:06 +01:00
Volker Rümelin
7bce330ae4 ui/gtk: retry sending VTE console input
Commit 584af1f1d9 ("ui/gtk: add a keyboard fifo to the VTE
consoles") changed the VTE chardev backend code to rely on the
chr_accept_input() callback function. The code expects a
chr_accept_input() call whenever qemu_chr_be_can_write() bytes
were written. It turns out this is wrong. Some chardev
frontends only call this callback after can_write was 0.

Change the code to send data until the keyboard fifo is empty
or qemu_chr_be_can_write() returns 0.

Fixes: 584af1f1d9 ("ui/gtk: add a keyboard fifo to the VTE consoles")
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210810063257.17411-1-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2021-08-10 10:39:46 +02:00
Daniel P. Berrangé
057489dd15 qga: fix leak of base64 decoded data on command error
If the guest command fails to be spawned, then we would leak the decoded
base64 input used for the command's stdin feed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <michael.roth@amd.com>
2021-08-09 20:18:43 -05:00
Peter Maydell
e0d24696b9 Block patches for 6.1-rc3:
- Build fix for FUSE block exports
 - iotest 233 fix
 -----BEGIN PGP SIGNATURE-----
 
 iQFGBAABCAAwFiEEkb62CjDbPohX0Rgp9AfbAGHVz0AFAmERXvESHG1yZWl0ekBy
 ZWRoYXQuY29tAAoJEPQH2wBh1c9AgTkIALLjvAWWvcZc4JaGV4Wo6ZQZ7zfOXnYc
 jK/NhBLrKj1FPB0j00gAzTDlNcZB/39NImHtXjdI2sOvqIsG87efqrBheTOJ43+9
 tAB4efsQ1+HDHEtGoKd3ydYinJojradWzQQeoTVvsPSPsouUlEe8ZBIThe7SWy+9
 kmqZjIgaFkGaML/citMYg4FWDjm3IYt0K4BliIg3ySiJSCGEm6xIIe91PbaRru//
 zrBw+sIf0ax0fXSlOemUwm+gwQ4jHE7n9cnnRSK8crawwfdyqmfjjfiPDfCs5sFw
 Nr+qtwPmvLVpkbdsF9G9cB3MIO6Rb59aAIcLSpMouI1cQpGFMhZUOrE=
 =Ew2C
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/hreitz/tags/pull-block-2021-08-09' into staging

Block patches for 6.1-rc3:
- Build fix for FUSE block exports
- iotest 233 fix

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

* remotes/hreitz/tags/pull-block-2021-08-09:
  tests: filter out TLS distinguished name in certificate checks
  block/export/fuse.c: fix musl build

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-09 21:14:24 +01:00
Daniel P. Berrangé
a6d2bb25cf tests: filter out TLS distinguished name in certificate checks
The version of GNUTLS in Fedora 34 has changed the order in which encodes
fields when generating new TLS certificates. This in turn changes the
order seen when querying the distinguished name. This ultimately breaks
the expected output in the NBD TLS iotests. We don't need to be
comparing the exact distinguished name text for the purpose of the test
though, so it is fine to filter it out.

Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20210804180330.3469683-1-berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
2021-08-09 17:32:43 +02:00
Fabrice Fontaine
50482fda98 block/export/fuse.c: fix musl build
Fix the following build failure on musl raised since version 6.0.0 and
4ca37a96a7
because musl does not define FALLOC_FL_ZERO_RANGE:

../block/export/fuse.c: In function 'fuse_fallocate':
../block/export/fuse.c:563:23: error: 'FALLOC_FL_ZERO_RANGE' undeclared (first use in this function)
  563 |     } else if (mode & FALLOC_FL_ZERO_RANGE) {
      |                       ^~~~~~~~~~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/b96e3d364fd1f8bbfb18904a742e73327d308f64

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Message-Id: <20210809095101.1101336-1-fontaine.fabrice@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
2021-08-09 17:19:27 +02:00
Peter Maydell
370ea52f72 hw/nvme fixes
* coverity fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmERCTYACgkQTeGvMW1P
 DekByggAqswnK64P7zjkq3aEjENKdD00lYfy0aInSn6HbV75D6f654izVWN/8NUn
 vBhcmuYDi87hXv/dfD9OvaIrpajiMuEmer0jUigIhJvXJseHx7R7tf3H6OSxbQtn
 NnhticUYtFQoHADoM129rtkh/r/KXbMMpVC+/EwuhLBGR8/GRG50yBs6ZgqUbydU
 rcO+1neFO1ee6bsV2TIDrQhs/vsDAQsOLkbe8g2LeNIxCOSKkTRnn4t2fq3Ue0up
 y8m3vEl3zq4GVpQW+MrSfSS1G5bdunoGtrrPlK9EkCRYT6HRX/YstLFSk2TWUdJ0
 rA/el4WN/XMvYOF6YSb+6d72ZK7uFw==
 =nrUW
 -----END PGP SIGNATURE-----

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

hw/nvme fixes

* coverity fixes

# gpg: Signature made Mon 09 Aug 2021 11:53:42 BST
# gpg:                using RSA key 522833AA75E2DCE6A24766C04DE1AF316D4F0DE9
# gpg: Good signature from "Klaus Jensen <its@irrelevant.dk>" [unknown]
# gpg:                 aka "Klaus Jensen <k.jensen@samsung.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: DDCA 4D9C 9EF9 31CC 3468  4272 63D5 6FC5 E55D A838
#      Subkey fingerprint: 5228 33AA 75E2 DCE6 A247  66C0 4DE1 AF31 6D4F 0DE9

* remotes/nvme/tags/nvme-next-pull-request:
  hw/nvme: fix missing variable initializers

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-09 15:00:26 +01:00
Klaus Jensen
5f4884c441 hw/nvme: fix missing variable initializers
Coverity found that 'uuid', 'csi' and 'eui64' are uninitialized. While
we set most of the fields, we do not explicitly set the rsvd2 field in
the NvmeIdNsDescr header.

Fix this by explicitly zero-initializing the variables.

Reported-by: Coverity (CID 1458835, 1459295 and 1459580)
Fixes: 6870cfb814 ("hw/nvme: namespace parameter for EUI-64")
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-08-09 12:52:16 +02:00
Peter Maydell
632eda5404 Fix for gnutls-crypto detection
-----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmEQ+MQUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroMdtQf+NRP8oZyq1jTMIXqG7m8oChEl5FVE
 mEGYjRaTlspt48qlybwIXtGGnKf9EgHDuUY/buYL6lbrBB8SCbSawXNYZWHafbcZ
 nv9fce0hvVqyzz/82AeJblHODd/1WXog1ZU/YiJEZj+1h86a4B8GZTWpwJfBhDZG
 0AYVHxBLpnp5/Rg1WCkrhKihiJWEJKEgqwDkAL0FAcKrdhzncR1iF2U4ZPdVmEl7
 XHkqYM/dIMn1MkljNSH7A5ZHxN5b704U+g4YAXkh1oN4HNKGrEJU/gbnmJ/4tGPG
 jqADsHxhiRA/Jm8OMpwfOdl60ZN8IZ+ricTKA2yjTNyDNNQyp6cxNdd5Xg==
 =ZOOe
 -----END PGP SIGNATURE-----

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

Fix for gnutls-crypto detection

# gpg: Signature made Mon 09 Aug 2021 10:43:32 BST
# 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-gitlab/tags/for-upstream:
  meson: fix logic for gnutls check

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-09 11:04:27 +01:00
Alyssa Ross
abc14fd056 meson: fix logic for gnutls check
The logic before was

	if not get_option('gnutls').auto() or have_system

Which is equivalent to

	if get_option('gnutls').enabled() or get_option('gnutls').disabled() or have_system

This means that the check for gnutls is performed even if gnutls is
disabled, which means that the build system will insist on having
libtasn1 if gnutls is found, even if gnutls support is disabled.

When gnutls is disabled, the check for gnutls shouldn't be performed,
to ensure that further build system logic (like the check for
libtasn1) doesn't make decisions based on the presence of gnutls,
rather than the gnutls option.

After making this change, I can successfully ./configure --disable-gnutls
on my system with gnutls installed, but not libtasn1.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
Message-Id: <20210806144947.321647-1-hi@alyssa.is>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
2021-08-06 15:36:11 +00:00
Peter Maydell
dee64246de linux-user pull request 20210806
Fix endianness and addresses in i386 linux-user target
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmEM/fASHGxhdXJlbnRA
 dml2aWVyLmV1AAoJEPMMOL0/L748RIQQAJ/h0OQSZqu7X5CERvbrLkzuU8ZmzFmb
 TIBDqzbnM4AhmS3b8j5UEGbZ6UCrnyph+e1Ksf8l9mpmpuDPK178HfKG5NAe7lXY
 x2Y8e2JllZ9ASsRUqqUjnTfXirx5hx5S3V15KVLsdpYq4UG1K07jfh2aqZKijAdi
 zf64ZmMGTMwLO6PdrsDzxM+5fYy5o+ELG4XnHfhH2VsjND6wUSEkouXLVwnxsW3R
 reKFBrzqTX7ryEfAgli4LjdOJ4HPgiMlkQR0boAIYv/lJAc+pSPBO2FxUxJQ+AK/
 KVMjHPbx8aPUC6MADXhjkPdAXotRWX49coQoeR2MRbhIHuLD/JS4frpy5LMNLv8F
 MI+Hx5wCWyyF+V7X1ezkKduN512JPP7tl7EedxEG7OiOkcQuU3ssXbttwZuCf5tz
 dIbUSKUrpYJE+uB91/vL/Fg85c3/i0a7Nl/glzje/IOJ2J4ZSSvVGM9WcC8y5Mbk
 KiEF4jlDrz/lZeNYcVzpYBDzjnVvwIdd9nKYlaJT3VysVjJAxxJkimmK/wqkasEF
 EzmsU0y6pFttsodHm08Mm6U9qQZM6KfyjMOOp9BlUj+S9mv4nMXEOboHHzXUvDCG
 QkSOQqCI7ow6AeEkCeNPuBuGihAfCAdzUlEZNrTwADeEytZ1i7GXWe4mZIDQjrRk
 xTj9ir/H3qmQ
 =I2DD
 -----END PGP SIGNATURE-----

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

linux-user pull request 20210806

Fix endianness and addresses in i386 linux-user target

# gpg: Signature made Fri 06 Aug 2021 10:16:32 BST
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/linux-user-for-6.1-pull-request:
  linux-user/elfload: byteswap i386 registers when dumping core
  linux-user: fix guest/host address mixup in i386 setup_rt_frame()

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-06 10:28:33 +01:00
Peter Maydell
ca92f16276 QAPI patches patches for 2021-08-05
-----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmEL8FQSHGFybWJydUBy
 ZWRoYXQuY29tAAoJEDhwtADrkYZTA/MP/ixcTS2eQXXzbckLNULfkODtLMq2S/o9
 lDYLDh3y39/4B/i70pfy6opQGUyiuMdrzqXK51Mh9WSxyn4CfxHEjfJVD/ex0hVQ
 DevTIpIY+W9pH5Tx/EXsm0bV0PDtRo08ov8oRg+6IXKZvVNI1tMPAn0UtSmLxDJJ
 saux+AA75DMTxJ4jUx+a6gz7yPJIL9ZIO7m5dp4hV8sT8PwGk6SIC1LGUPPquFvY
 fn0wIHEOTKKlrC27YkaVF8CQ3xmCqBiR5HznFkSBEkpupeK10Yeb4ZccBLhArwhj
 D4iF8VUYh/xR2No8W3lZ5SaW0aAWeKhsJrorBceiz9Qi/N/6fcT7NGf3H6D/D0Ho
 m3xoETnNYVvCPRkfiYykyYh7nyuhLK2uAOsHy0KpkOlVcdfdVXePesj9xiw6kGte
 Fv/UjXiNmiqIyZfVEt0tYk4ooRdgbBGTJ+ZnC73aKQpWZXC24SdB9xIyPPZ77W3s
 NuuGWar8iPzSB2ZeIvIzXFewDAz/Sg01xQBsjjS6X/QI2TdtMIuFD842MLlW1rzM
 ia0BGxmo6uyiNPUyDYZI6bSOk0huM09niXX2JFI0pGVIYoFVjoaLyr20hNLfqRfQ
 SFeUqj+6lKw/K2dEMhTtJe7U2KyJf6Hs3LWiL8TzrxshDPK/a7woWhCfH43GsWS0
 oE6kLCRX8v67
 =ge3b
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-08-05' into staging

QAPI patches patches for 2021-08-05

# gpg: Signature made Thu 05 Aug 2021 15:06:12 BST
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2021-08-05:
  docs: convert writing-qmp-commands.txt to writing-qmp-commands.rst
  docs/qapi-code-gen: add cross-references
  docs/qapi-code-gen: Beautify formatting
  docs: convert qapi-code-gen.txt to ReST
  docs/devel/qapi-code-gen: Update examples to match current code

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-05 18:48:06 +01:00
Peter Maydell
287d53398a Chardev-related fixes
Hi
 
 Here are some bug fixes worthy for 6.1.
 
 thanks
 -----BEGIN PGP SIGNATURE-----
 
 iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmEL3vMcHG1hcmNhbmRy
 ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5fe7D/0U6k36kb02MePc2OIW
 OVYijYm4/LiJQ0Tae5yKhvcaG81+sXyjJa3MvU2lscHrLxFsT0Li2N8cDx8Tozfy
 ob2URg/Wd8sBllze4QSqLlMqpX5Fh7GsKjx+3d+RzFzKW3BE8ZUoxTsRH0f1imd3
 lZJmVbhvl5Bo65U0J5xp+VI4BZnEc9R/JHQOiUT+wnmwAbv4knjCz1LiW51LQvNP
 2A8cHhftN58ogm3yptSfD/5OHfFsn+16uhhTRtjuiro+9+zuVgBqxJSXENsDhzDU
 IuL5J9MHhnhSv6/QB4zuVCYZfBlMLB1CXo3bFLalSN5wCAkCxrFEozPVjj2f9gR+
 TrM1JxYK0CoAJZosHAlk1J+KGXZ4zs4Y3TyutFdLlhz9KYi4Xve3UYNQc8uK4jD8
 7eXbaxTS0b9T1LYZd7YNbyKYuUeZJSt9dwGEXdudZPhp2lRjJ/Bhhkx0RLdR8LTX
 qcpemc14AwMUh0zaUcXPuxCeWEJO8ffJyVzXY5j36tSIt5LMecDqJHEqv4ZjWgyz
 mc9AMHRDtzRx0WPV3vNHEEIioXKOqARmWuuUaW5hUDdWue3f1wuU81xoMEN92DKs
 LftUgetgdqD9vbobtoiYFI7qIjb4IaKKK5TCn6glq4Poyd2tErl/fcjkO60/IZPR
 bzDygkxX8thipWkxQhTVBaaHVA==
 =KDK+
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/marcandre/tags/chr-fix-pull-request' into staging

Chardev-related fixes

Hi

Here are some bug fixes worthy for 6.1.

thanks

# gpg: Signature made Thu 05 Aug 2021 13:52:03 BST
# gpg:                using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5
# gpg:                issuer "marcandre.lureau@redhat.com"
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full]
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full]
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* remotes/marcandre/tags/chr-fix-pull-request:
  chardev: report a simpler error about duplicated id
  chardev: give some context on chardev-add error
  chardev: fix qemu_chr_open_fd() with fd_in==fd_out
  chardev: fix qemu_chr_open_fd() being called with fd=-1
  chardev: fix fd_chr_add_watch() when in != out
  chardev: mark explicitly first argument as poisoned
  chardev/socket: print a more correct command-line address
  util: fix abstract socket path copy

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-05 16:25:44 +01:00
Marc-André Lureau
a68403b0a6 chardev: report a simpler error about duplicated id
Report:
  "Chardev with id 'char2' already exists"
Rather than:
  "Failed to add chardev 'char2': duplicate yank instance"

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-05 16:15:33 +04:00
Marc-André Lureau
64195b0d36 chardev: give some context on chardev-add error
Description from Daniel P. Berrangé:
> The original code reported:
>
>  "attempt to add duplicate property 'char2' to object (type 'container')"
>
> Since adding yank support, the current code reports
>
>  "duplicate yank instance"
>
> With this patch applied it now reports:
>
>  "Failed to add chardev 'char2': duplicate yank instance"
>
> This is marginally better, but still not great, not that the original
> error was great either.
>
> It would be nice if we could report
>
>   "chardev with id 'char2' already exists"

Related to:
https://bugzilla.redhat.com/show_bug.cgi?id=1984721

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-05 16:15:33 +04:00
Marc-André Lureau
733ba02084 chardev: fix qemu_chr_open_fd() with fd_in==fd_out
The "serial" chardev calls qemu_chr_open_fd() with the same fd. This
may lead to double-close as each QIOChannel owns the fd.

Instead, share the reference to the same QIOChannel.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-05 16:15:33 +04:00
Marc-André Lureau
46fe3ff6ea chardev: fix qemu_chr_open_fd() being called with fd=-1
The "file" chardev may call qemu_chr_open_fd() with fd_in=-1. This may
cause invalid system calls, as the QIOChannel is assumed to be properly
initialized later on.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-05 16:15:33 +04:00
Marc-André Lureau
bb2b058f1a chardev: fix fd_chr_add_watch() when in != out
Create child sources for the different streams, and dispatch on the
parent source with the synthesized conditions.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-05 16:15:33 +04:00
Marc-André Lureau
bf7b1eab25 chardev: mark explicitly first argument as poisoned
Since commit 9894dc0cdc "char: convert
from GIOChannel to QIOChannel", the first argument to the watch callback
can actually be a QIOChannel, which is not a GIOChannel (but a QEMU
Object).

Even though we never used that pointer, change the callback type to warn
the users. Possibly a better fix later, we may want to store the
callback and call it from intermediary functions.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-05 16:15:33 +04:00
Ilya Leoshkevich
030912e01c linux-user/elfload: byteswap i386 registers when dumping core
Core dumps from emulating x86_64 on big-endian hosts contain incorrect
register values.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210803172013.148446-1-iii@linux.ibm.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2021-08-05 12:17:30 +02:00
Ilya Leoshkevich
0c40c18ecd linux-user: fix guest/host address mixup in i386 setup_rt_frame()
setup_rt_frame() passes siginfo and ucontext host addresses to guest
signal handlers, causing problems when e.g. emulating x86_64 on s390x.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210803171858.148394-1-iii@linux.ibm.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2021-08-05 12:15:44 +02:00
Marc-André Lureau
30f80be34b chardev/socket: print a more correct command-line address
Better reflect the command line version of the socket address arguments,
following the now recommended long-form opt=on syntax.

Complement/fixes commit 9d902d51 "chardev: do not use short form boolean
options in non-QemuOpts character device descriptions".

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2021-08-04 23:23:31 +04:00
Marc-André Lureau
4cfd970ec1 util: fix abstract socket path copy
Commit 776b97d360 "qemu-sockets: add abstract UNIX domain socket
support" neglected to update socket_sockaddr_to_address_unix() and
copied the whole sun_path without taking "salen" into account.

Later, commit 3b14b4ec49 "sockets: Fix socket_sockaddr_to_address_unix()
for abstract sockets" handled the abstract UNIX path, by stripping the
leading \0 character and fixing address details, but didn't use salen
either.

Not taking "salen" into account may result in incorrect "path" being
returned in monitors commands, as we read past the address which is not
necessarily \0-terminated.

Fixes: 776b97d360
Fixes: 3b14b4ec49
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: xiaoqiang zhao <zxq_yx_007@163.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-08-04 23:23:31 +04:00
Peter Maydell
bccabb3a5d Update version for v6.1.0-rc2 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-04 16:56:14 +01:00
Peter Maydell
f17d05569a pc,pci: bugfixes
Small bugfixes all over the place.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmEJp+sPHG1zdEByZWRo
 YXQuY29tAAoJECgfDbjSjVRpKuoH/inLOUmbyv9dxQL88qIfKUtDoVYWV1TspaR9
 nswKltOZjLopLFZUMcfJsH5KxdM6CPM5d2/OQqMivKbwTxMSWQvfL+G/PdEqQ+Fb
 21zkd483B6RhuLDeamSD2DGQImlZlpCOEVxucHxrnhsD9PqDGdMX4aYj1kfNcXnj
 2X4apEPTMeeN8VAv0VgV6zXW1ksgAetVCKLuyktv6UerBT7yHAssGMPEX0j86TGX
 lg8nbtJ5LXMcCaY6vsBI/dSAhUmvilkvaIooTb7n604WgkUIHy1v7hDzACwZNyCP
 ZWDqz5oCtF7DIMKnHEzJlW7X7cxtmo151g4IVXBGYkuc+WXOVrU=
 =eYH0
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

pc,pci: bugfixes

Small bugfixes all over the place.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

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

* remotes/mst/tags/for_upstream:
  Drop _DSM 5 from expected DSDTs on ARM
  Revert "acpi/gpex: Inform os to keep firmware resource map"
  arm/acpi: allow DSDT changes
  acpi: x86: pcihp: add support hotplug on multifunction bridges
  hw/pcie-root-port: Fix hotplug for PCI devices requiring IO

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-04 13:53:38 +01:00
Peter Maydell
700d82c9bc SD/MMC patches queue
- sdcard: Fix assertion accessing out-of-range addresses
   with SEND_WRITE_PROT (CMD30)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmEJfvsACgkQ4+MsLN6t
 wN5eKRAA0dWxmsr4eZGHQababmorVWs46T1IXW+slmSQL781+KMBme0XiKS0o7y/
 +1TlL2KWyvx8davAnW2eVYbhwEo5j48gWWxSNPcvKj5gAy9Hd6/NOPTMT7XTHYNI
 zhhk1+Gjvrlg4KIoJoBECDBh/9fy/pmgENow3wnbkbDj55RQq6XT1us0ypVlWwCp
 ug57g3vyYDPTPNdzdgyQsikgiyLqsk2CVhet2c+1IuBrCwdA5ZgflsxNmAH+hsHX
 okHK8FreFKcyscj38vXP8tZi7GHj+hJE3EBL0Fz16gTWLkxONc3DYYxzhtvXRE8l
 ANSslmWNQw+TLverT+a/0I1QKFO27q7MoXBs08Wf4YdB3Pgsx+y9FXzuPMbauK5T
 Z8RNSKU3CoAtcOD1TOyItH0fZaaYuVcprsKLR6ZsSIs2rIoeUNfd7pUjxAs7rZvC
 fAbYJrFjxYlrSxZT+jEAMZFE4PzH8Hb/+NeOk8xfI5+uNdr2UgGvcZdXZQPfQEPK
 lRQSwoHOlPy+UYMzVwJP9YsRiUNcZr082cif3d7BBcymeJ//SFusdQSj5jktkszq
 Dn5SL6Up86UmU3QCMgtFURKavashUZ+SnBJ+GdJpXCz16sBfHY70gPpfDhm9+vOy
 pf/7S4fA64EHvV6rfVH6sqeqnV5YAc+1ubEHK5vP3w3FOzFJ06c=
 =EaXR
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/philmd/tags/sdmmc-20210803' into staging

SD/MMC patches queue

- sdcard: Fix assertion accessing out-of-range addresses
  with SEND_WRITE_PROT (CMD30)

# gpg: Signature made Tue 03 Aug 2021 18:38:03 BST
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* remotes/philmd/tags/sdmmc-20210803:
  hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30
  hw/sd/sdcard: Document out-of-range addresses for SEND_WRITE_PROT

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-04 11:40:27 +01:00
John Snow
68e6dc594a docs: convert writing-qmp-commands.txt to writing-qmp-commands.rst
This does about the bare minimum, converting section headers to ReST
ones and adding an indent for code blocks.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210721165015.2180311-1-jsnow@redhat.com>
Reviewed-by: Connor Kuehl <ckuehl@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-04 11:18:05 +02:00
John Snow
9c66762a60 docs/qapi-code-gen: add cross-references
Add clickables to many places.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210720235619.2048797-4-jsnow@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-04 11:05:52 +02:00
John Snow
55927c5f32 docs/qapi-code-gen: Beautify formatting
Mostly, add ``literal`` markers to a lot of things like C types, add
code blocks, and fix the way a few things render.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210720235619.2048797-3-jsnow@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-04 11:05:48 +02:00
John Snow
f7aa076dbd docs: convert qapi-code-gen.txt to ReST
This is a very rudimentary conversion from .txt to .rst changing as
little as possible, but getting it to render somewhat nicely; without
using any Sphinx directives. (It is 'native' ReST.)

Further patches will add cross-references and Sphinx-specific extensions
to make it sparkle.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210720235619.2048797-2-jsnow@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2021-08-04 11:05:43 +02:00
Markus Armbruster
e0366f9f2b docs/devel/qapi-code-gen: Update examples to match current code
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210712150214.624281-1-armbru@redhat.com>
Acked-by: John Snow <jsnow@redhat.com>
2021-08-04 11:04:16 +02:00
Peter Maydell
ef6607edf0 Block layer patches
- Fix hang after request padding error (Windows + 512-on-4k emulation)
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmEJVUoRHGt3b2xmQHJl
 ZGhhdC5jb20ACgkQfwmycsiPL9bTtw//bab1AYur6kTf9verEcdiUo9/9rfxKoz/
 Lf+W2MLEF/hYkXuGSuHRM/8/y7CHY34IDf/EeizNIfJo2zT29jY1kvUGzbFsCu04
 9R6RxnYnjULtDidtJc5FW9Hcx/nU+ymzXcc66MIOy0HcY/2ED4CbabP+SKEgEC9R
 tzFYqSjQRnSJCYD5q2siL9l4je0Of7pTw6glzxtA3l57T0HTffXuV1JHmiFstB/7
 QFYEyYXg/f/hLdvc5GlTmoS4q2Rcu0WvhZtoui3lLRedeu4FBYx5XLsZ5Ni4BT3j
 qde0Fn/rcRfwUvuS3WiWGV7ptSMPsro0/o6DKczFeQ1bF2o7kPBq0V44xLE3UW6W
 ZQszdD7d/DAYUucuxeWt9QDmkq24JGknjOWHxeaPu1hlO3+oG0QRckTLk6h3hz/a
 h20FlBLt59z/JGOTnHI/PDjMt69drIR/IOuJUeD25blRlgIqXJTdBPRfdx3GxD/M
 n6/YBAEoGxMl5TjrCu3HDwJxVQ2mihkjeruUynx/qoMHyRsxvZNcnP4V+t6PQiMe
 Iyrl8LbbGI5mTww+AcbEJVXU+5Sro4HlB9VrHD8VmxGhENGrKiPzfVEbdNPEKDtZ
 ToZgBkB5HYnPGaVmFjWVg0vyy3iInIj4ZagKR9iFCH3OKcz9moCe2tFzfJ7nXtJ3
 waeT1U/76Vo=
 =s3q9
 -----END PGP SIGNATURE-----

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

Block layer patches

- Fix hang after request padding error (Windows + 512-on-4k emulation)

# gpg: Signature made Tue 03 Aug 2021 15:40:10 BST
# gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg:                issuer "kwolf@redhat.com"
# 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:
  block: Fix in_flight leak in request padding error path

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-04 09:27:24 +01:00
Michael S. Tsirkin
62a4db5522 Drop _DSM 5 from expected DSDTs on ARM
diff -rup /tmp/old/tests/data/acpi/microvm/DSDT.pcie.dsl /tmp/new/tests/data/acpi/microvm/DSDT.pcie.dsl
--- /tmp/old/tests/data/acpi/microvm/DSDT.pcie.dsl	2021-08-03 16:22:52.289295442 -0400
+++ /tmp/new/tests/data/acpi/microvm/DSDT.pcie.dsl	2021-08-03 16:22:40.102286317 -0400
@@ -1302,14 +1302,9 @@ DefinitionBlock ("", "DSDT", 2, "BOCHS "
                     {
                         Return (Buffer (One)
                         {
-                             0x21                                             // !
+                             0x01                                             // .
                         })
                     }
-
-                    If ((Arg2 == 0x05))
-                    {
-                        Return (Zero)
-                    }
                 }

                 Return (Buffer (One)

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-08-03 16:32:35 -04:00
Michael S. Tsirkin
40c3472a29 Revert "acpi/gpex: Inform os to keep firmware resource map"
This reverts commit 0cf8882fd0.

Which this commit, with aarch64 when using efi PCI devices with IO ports
do not work.  The reason is that EFI creates I/O port mappings below
0x1000 (in fact, at 0). However Linux, for legacy reasons, does not
support I/O ports <= 0x1000 on PCI, so the I/O assignment created by EFI
is rejected.

EFI creates the mappings primarily for itself, and up until DSM #5
started to be enforced, all PCI resource allocations that existed at
boot were ignored by Linux and recreated from scratch.

Also, the commit in question looks dubious - it seems unlikely that
Linux would fail to create a resource tree. What does
happen is that BARs get moved around, which may cause trouble in some
cases: for instance, Linux had to add special code to the EFI framebuffer
driver to copy with framebuffer BARs being relocated.

DSM #5 has a long history of debate and misinterpretation.

Link: https://lore.kernel.org/r/20210724185234.GA2265457@roeck-us.net/
Fixes: 0cf8882fd0 ("acpi/gpex: Inform os to keep firmware resource map")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-08-03 16:32:34 -04:00
Michael S. Tsirkin
5cd4a8d4e5 arm/acpi: allow DSDT changes
We are going to commit ccee1a8140 ("acpi: Update _DSM method in expected files").
Allow changes to DSDT on ARM. Only configs with pci are
affected thus all virt variants but for microvm only the pcie variant.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-08-03 16:32:34 -04:00
Igor Mammedov
d7346e614f acpi: x86: pcihp: add support hotplug on multifunction bridges
Commit [1] switched PCI hotplug from native to ACPI one by default.

That however breaks hotplug on following CLI that used to work:
   -nodefaults -machine q35 \
   -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
   -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2

where PCI device is hotplugged to pcie-root-port-1 with error on guest side:

  ACPI BIOS Error (bug): Could not resolve symbol [^S0B.PCNT], AE_NOT_FOUND (20201113/psargs-330)
  ACPI Error: Aborting method \_SB.PCI0.PCNT due to previous error (AE_NOT_FOUND) (20201113/psparse-531)
  ACPI Error: Aborting method \_GPE._E01 due to previous error (AE_NOT_FOUND) (20201113/psparse-531)
  ACPI Error: AE_NOT_FOUND, while evaluating GPE method [_E01] (20201113/evgpe-515)

cause is that QEMU's ACPI hotplug never supported functions other then 0
and due to bug it was generating notification entries for not described
functions.

Technically there is no reason not to describe cold-plugged bridges
(root ports) on functions other then 0, as they similarly to bridge
on function 0 are unpluggable.

So since we need to describe multifunction devices iterate over
fuctions as well. But describe only cold-plugged bridges[root ports]
on functions other than 0 as well.

1)
Fixes: 17858a1695 (hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35)
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reported-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20210723090424.2092226-1-imammedo@redhat.com>
Fixes: 17858a1695 (hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35)<br>
Signed-off-by: Igor Mammedov &lt;<a href="mailto:imammedo@redhat.com" target="_blank">imammedo@redhat.com</a>&gt;<br>
Reported-by: Laurent Vivier &lt;<a href="mailto:lvivier@redhat.com" target="_blank">lvivier@redhat.com</a>&gt;<br>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-08-03 16:31:07 -04:00
Marcel Apfelbaum
e2a6290aab hw/pcie-root-port: Fix hotplug for PCI devices requiring IO
Q35 has now ACPI hotplug enabled by default for PCI(e) devices.
As opposed to native PCIe hotplug, guests like Fedora 34
will not assign IO range to pcie-root-ports not supporting
native hotplug, resulting into a regression.

Reproduce by:
    qemu-bin -M q35 -device pcie-root-port,id=p1 -monitor stdio
    device_add e1000,bus=p1
In the Guest OS the respective pcie-root-port will have the IO range
disabled.

Fix it by setting the "reserve-io" hint capability of the
pcie-root-ports so the firmware will allocate the IO range instead.

Acked-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Message-Id: <20210802090057.1709775-1-marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2021-08-03 16:31:07 -04:00
Peter Maydell
cb2f4b8750 * Fixes for SIGILL and SIGFPE of the s390x linux-user target
-----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmEJRQ4RHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbU8XA/9H8uXt/S/I53oAJK9xL84cEm5qoRR6CNf
 gZAcczg/tIvPt+uRV7e39KyKhQRBCqR0mr+IP5tZ8dekB9qbj1k0nH6v6iSbhHs6
 MxKQ9QQ/9bDrgLSlIN+zerLzxzowtdR7b9x/YcifThqUOqL6rE7JJPrzL6Yykk+y
 cI/MU5AsZNeSNkWIDEBTFXScB1059bUzMgza9Gdao5ROnCbDrpE+SwRih27wntNQ
 sLrlDdGZzO62jl681YqYAbLSZYbE9nbv/oJ8wLeD7b937qWfovdQgF5Esf9mPaME
 oEFUCqP0SJ9/6HimVnQg7owV28twqVmPhhgvXO7H+BVj7AjiI1AbNUStnKSvdhV2
 8LVhzwxgf+ClVfetM4I60e6smMxTtpFHGDmsBQfOYkxnh1fMQVXyvmGztAvyc8MY
 LRbdV22nAkzKGdavTFlkj/GVVrf3h6F7hsdccPCBv8C6IEinhXO2E0k8Xznb6eky
 KUsNN2j0r36RbENpBbOCR4lmp+0jWVKYYcF2Do91ispTw1ta7DGvw4NrCFIbzQeo
 sejYElt6CRMfBuyZgg5zaQ8W9bxR4vrDpYfZ23Afj+JOaUoZuMctkXpvUyea6nhL
 5yq88jo13rbpobpLJ/ngDwIQXues6ru3DC4aE1t4ec0wA7pPaSApyaadQcZceEAE
 UTCUloOucAE=
 =1YMM
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-08-03' into staging

* Fixes for SIGILL and SIGFPE of the s390x linux-user target

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

* remotes/thuth-gitlab/tags/pull-request-2021-08-03:
  tests/tcg: Test that compare-and-trap raises SIGFPE
  linux-user/s390x: signal with SIGFPE on compare-and-trap
  target/s390x: Fix SIGILL and SIGFPE psw.addr reporting

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2021-08-03 19:50:43 +01:00