]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
22 months agotarget/loongarch: Update gdb_set_fpu() and gdb_get_fpu()
Song Gao [Fri, 5 Aug 2022 03:35:23 +0000 (11:35 +0800)]
target/loongarch: Update gdb_set_fpu() and gdb_get_fpu()

GDB LoongArch fpu use fcc register, update gdb_set_fpu()
and gdb_get_fpu() to match it.

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220805033523.1416837-6-gaosong@loongson.cn>

22 months agotarget/loongarch: Update loongarch-fpu.xml
Song Gao [Fri, 5 Aug 2022 03:35:22 +0000 (11:35 +0800)]
target/loongarch: Update loongarch-fpu.xml

Rename loongarch-fpu64.xml to loongarch-fpu.xml and update
loongarch-fpu.xml to match upstream GDB [1]

[1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/fpu.xml

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220805033523.1416837-5-gaosong@loongson.cn>

22 months agotarget/loongarch: update loongarch-base64.xml
Song Gao [Fri, 5 Aug 2022 03:35:21 +0000 (11:35 +0800)]
target/loongarch: update loongarch-base64.xml

Update loongarch-base64.xml to match the upstream GDB [1].

[1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220805033523.1416837-4-gaosong@loongson.cn>

22 months agotarget/loongarch: add gdb_arch_name()
Song Gao [Fri, 5 Aug 2022 03:35:20 +0000 (11:35 +0800)]
target/loongarch: add gdb_arch_name()

Matches bfd/cpu-loongarch.c, bfd_loongarch_arch.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220805033523.1416837-3-gaosong@loongson.cn>

22 months agotarget/loongarch: Fix GDB get the wrong pc
Song Gao [Fri, 5 Aug 2022 03:35:19 +0000 (11:35 +0800)]
target/loongarch: Fix GDB get the wrong pc

GDB LoongArch add a register orig_a0, see the base64.xml [1].
We should add the orig_a0 to match the upstream GDB.

[1]: https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220805033523.1416837-2-gaosong@loongson.cn>

22 months agohw/loongarch: remove acpi-build.c unused variable 'aml_len'
Song Gao [Thu, 21 Jul 2022 04:00:46 +0000 (12:00 +0800)]
hw/loongarch: remove acpi-build.c unused variable 'aml_len'

Fix a compiler warning on openbsd:
../src/hw/loongarch/acpi-build.c:416:12: warning: variable 'aml_len'
set but not used [-Wunused-but-set-variable]
    size_t aml_len = 0;
           ^

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220721040046.3985609-1-gaosong@loongson.cn>
[rth: Removing aml_len in turn makes fadt set but not used.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agotarget/loongarch: Fix macros SET_FPU_* in cpu.h
Qi Hu [Thu, 4 Aug 2022 13:24:50 +0000 (21:24 +0800)]
target/loongarch: Fix macros SET_FPU_* in cpu.h

The macros SET_FPU_* are used to set corresponding bits of fcsr.
Unfortunately it forgets to set the result and it causes fcsr's
"CAUSE" never being updated. This patch is to fix this bug.

Signed-off-by: Qi Hu <huqi@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Message-Id: <20220804132450.314329-1-huqi@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoMerge tag 'trivial-branch-for-7.1-pull-request' of https://gitlab.com/laurent_vivier...
Richard Henderson [Fri, 5 Aug 2022 00:21:13 +0000 (17:21 -0700)]
Merge tag 'trivial-branch-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging

Pull request trivial branch 20220804

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmLsHD8SHGxhdXJlbnRA
# dml2aWVyLmV1AAoJEPMMOL0/L748y7AP/iXRxiqvnb478I+OuOPRu37PaBEfU3n4
# Ry4xr1VT+9GV3MKBK1icA065+tTmW4s1ANJBihhGgn0S1oMiSJQk6esAKtjGsdt0
# OdWPPxVHN2XMs0UgwnONjzgSCbS5boLPK6wk+jMoyb3Vry+moa7JIbRr1ynlWOdN
# 3S3rDTsyOX0gvuNOjht56g5aGRnnPqU3qIU6AdIOxpZxpb4dHi3g+UDAB5APCZss
# oUZonuBeiSA+1T2XJc9opNdA56s8ObO41TJ1vMqt4TboYWUo+VXZf5Y21wE85Cx/
# qUtNiY7rCfBA8EdjmvkunmV0jIc9TghWCBTh3JMWp756dvwIpwl4eWnODFUwyhZs
# S4EAlPgHEjzqi6dbuKb+MNDkQKjUjP8gDn8ZVPQT+QLl0yjY9sOasKqkI0xnZDfI
# NVVIhUjpwWfC9jJL7M+ML6+Tg16UpH4vOq9nySZ3G/z61P1+uXnI/M2Fx5LxoELQ
# Z9eHzphbXgyGialt+Yin0A07rOYG9oRgAKGc2e0RgEPFSO8c6kcy+DdoVgz87xCC
# PwrfNs/s6vzH11a3MPkYhTadVvaDIXbPgkRdUNKPyaGLvSjkrQ7aMCCGT0dCfDAq
# 00SAq+KMaSdL9VDgtipGcDOGwbLpI9ixNXvMPNrfVu+Qa6VcZO6synwWaeTMnxzf
# tx4tSb/W4nB3
# =y8/X
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 04 Aug 2022 12:21:35 PM PDT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [undefined]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [undefined]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [undefined]
# 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: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* tag 'trivial-branch-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu:
  include/qemu/host-utils.h: Simplify the compiler check in mulu128()
  ppc: Remove redundant macro MSR_BOOK3S_MASK.
  docs/about/removed-features: Move the -soundhw into the right section
  vdpa: Fix file descriptor leak on get features error
  README.rst: fix link formatting

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoMerge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging
Richard Henderson [Thu, 4 Aug 2022 21:06:17 +0000 (14:06 -0700)]
Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging

Pull request

- Format string portability fix in virtiofsd

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmLsF9sACgkQnKSrs4Gr
# c8hAgwf/QPdBt6F1kBZTlSSt2nV2VAlX9HxsWAE5tSbtUTNS9Xr+avX6MHljAU20
# WN+zZ+4cUHjIqtt6NueqkTczV5PqccvB6H9Cs0FdkKH8unyMSHvSRNuRlAG+LgMF
# YQdHGGc9tvcIACz4GwWfzXJ/FsaoFHw7qTX3AUxe9nmlZnbB7cdl4Z7v6CQZ6kFL
# bfXCd2bXcw2XosykGijsiiJ5IV+nshchaVA01DbO+w/KeLaGJgUbiEB6unMGUIBL
# IMxy9VaP2AS44cGqNkFfWIm2tCfE0uT2qhca4BMk0kXQlwoBAuFGHuGHhbH0dU+w
# fFN+lSaLs0oBGo1G0Mw+ImLF9XymAw==
# =k1jb
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 04 Aug 2022 12:02:51 PM PDT
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]

* tag 'block-pull-request' of https://gitlab.com/stefanha/qemu:
  virtiofsd: Fix format strings

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoMerge tag 'pull-ppc-20220804' of https://gitlab.com/danielhb/qemu into staging
Richard Henderson [Thu, 4 Aug 2022 18:47:58 +0000 (11:47 -0700)]
Merge tag 'pull-ppc-20220804' of https://gitlab.com/danielhb/qemu into staging

ppc patch queue for 2022-08-04:

In this short queue we have a fix in the sam460ex machine where we're
not storing all GPIO lines in sam460ex_init().

This is not causing problems (as far as we're aware of) at this moment,
but this is getting in the way of a ppc405 rework we want to do for 7.2,
so let's fix it now.

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQQX6/+ZI9AYAK8oOBk82cqW3gMxZAUCYuwOIQAKCRA82cqW3gMx
# ZN+NAQDDOk4b79khltmrslo4Sa16nu/ARgqMGOsyy0Y5Whs9MgEAyiAVhpQ6C7Ok
# W2sHeUkv/ZvzWvE7LWXMPZehBgU9DgM=
# =QrsF
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 04 Aug 2022 11:21:21 AM PDT
# gpg:                using EDDSA key 17EBFF9923D01800AF2838193CD9CA96DE033164
# gpg: Good signature from "Daniel Henrique Barboza <danielhb413@gmail.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: 17EB FF99 23D0 1800 AF28  3819 3CD9 CA96 DE03 3164

* tag 'pull-ppc-20220804' of https://gitlab.com/danielhb/qemu:
  hw/ppc: sam460ex.c: store all GPIO lines in mal_irqs[]

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agovirtiofsd: Fix format strings
Stefan Weil [Thu, 4 Aug 2022 07:48:33 +0000 (09:48 +0200)]
virtiofsd: Fix format strings

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Message-Id: <20220804074833.892604-1-sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
22 months agohw/ppc: sam460ex.c: store all GPIO lines in mal_irqs[]
Daniel Henrique Barboza [Wed, 3 Aug 2022 23:32:04 +0000 (20:32 -0300)]
hw/ppc: sam460ex.c: store all GPIO lines in mal_irqs[]

We're not storing all GPIO lines we're retrieving with
qdev_get_gpio_in() in mal_irqs[]. We're storing just the last one in the
first index:

    for (i = 0; i < ARRAY_SIZE(mal_irqs); i++) {
        mal_irqs[0] = qdev_get_gpio_in(uic[2], 3 + i);
    }
    ppc4xx_mal_init(env, 4, 16, mal_irqs);

mal_irqs is used in ppc4xx_mal_init() to assign the IRQs to MAL:

    for (i = 0; i < 4; i++) {
        mal->irqs[i] = irqs[i];
    }

Since only irqs[0] has been initialized, mal->irqs[1,2,3] are being
zeroed.

This doesn´t seem to trigger any apparent issues at this moment, but
Cedric's QOMification of the MAL device [1] is executing a
sysbus_connect_irq() that will fail if we do not store all GPIO lines
properly.

[1] https://lists.gnu.org/archive/html/qemu-devel/2022-08/msg00497.html

Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: BALATON Zoltan <balaton@eik.bme.hu>
Fixes: 706e944206d7 ("hw/ppc/sam460ex: Drop use of ppcuic_init()")
Acked-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220803233204.2724202-1-danielhb413@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
22 months agoinclude/qemu/host-utils.h: Simplify the compiler check in mulu128()
Thomas Huth [Thu, 21 Jul 2022 07:48:09 +0000 (09:48 +0200)]
include/qemu/host-utils.h: Simplify the compiler check in mulu128()

We currently require at least GCC 7.4 or Clang 6.0 for compiling QEMU.
GCC has __builtin_mul_overflow since version 5 already, and Clang 6.0
also provides this built-in function (see its documentation on this page:
https://releases.llvm.org/6.0.0/tools/clang/docs/LanguageExtensions.html ).
So we can simplify the #if statement here.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220721074809.1513357-1-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
22 months agoppc: Remove redundant macro MSR_BOOK3S_MASK.
Yonggang Luo [Thu, 28 Jul 2022 20:11:35 +0000 (04:11 +0800)]
ppc: Remove redundant macro MSR_BOOK3S_MASK.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220728201135.223-1-luoyonggang@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
22 months agodocs/about/removed-features: Move the -soundhw into the right section
Thomas Huth [Tue, 2 Aug 2022 07:56:11 +0000 (09:56 +0200)]
docs/about/removed-features: Move the -soundhw into the right section

The note about the removal of '-soundhw' has been accidentally added
to the section of removed "linux-user mode CPUs" ... it should reside
in the section about removed "System emulator command line arguments"
instead.

Fixes: 039a68373c ("introduce -audio as a replacement for -soundhw")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <20220802075611.346835-1-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
22 months agovdpa: Fix file descriptor leak on get features error
Eugenio Pérez [Tue, 2 Aug 2022 11:24:46 +0000 (13:24 +0200)]
vdpa: Fix file descriptor leak on get features error

File descriptor vdpa_device_fd is not free in the case of returning
error from vhost_vdpa_get_features. Fixing it by making all errors go to
the same error path.

Resolves: Coverity CID 1490785
Fixes: 8170ab3f43 ("vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs")
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20220802112447.249436-2-eperezma@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
22 months agoREADME.rst: fix link formatting
Cornelia Huck [Wed, 3 Aug 2022 09:02:50 +0000 (11:02 +0200)]
README.rst: fix link formatting

Make the links render correctly.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220803090250.136556-1-cohuck@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
22 months agoMerge tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier...
Richard Henderson [Wed, 3 Aug 2022 15:32:44 +0000 (08:32 -0700)]
Merge tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging

Pull request linux-user 20220803

# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEEzS913cjjpNwuT1Fz8ww4vT8vvjwFAmLqjIMSHGxhdXJlbnRA
# dml2aWVyLmV1AAoJEPMMOL0/L748bpAP/1HW4wQztNCDL2epXGtDMTHFIjsLlc05
# h/3BwnXXXbRv/m4+IEJLITI5WpyZ24CGgA5kIFPRDxLCIHxcTo5etzqkJzxhnRvU
# MNP3m8L5gSAUUZhD8Xw2b95V8vOv4cu8J+sgub8ZaRXJpcHK1cuCF43OeI3bBuoz
# HNVY8XHl0E46JyXQmK9/phBRSK8INhlMIORd+k/GzSx7+9/UdIqTj1kVpdgbQ8we
# GqrnVW9hYA2T2vUL3SEV8t6GE6lSGRr9bvsyRRfLxJanUEQbGmbJPvqBwjamRwUF
# xZOBou/cYQOoI9AVku9bL+h2ITGfrfNZ8Oo7r7oOrz+ZjBfL9hUQqhFhI/oI265n
# 4ivzdOcsXH6OT7X+JdZRvyv6pxVL7ycu2KCKvmnNvQSocGHT1OvFqIHAWd+NAdEr
# c4q1ob1QdUfZjrzjzLR/qY2NPZat1Ge5lSIXOwC1G3T5umuw8cV7BV9KJJRoQXfE
# AWeXsLKqqByQ59z+qObnFIkUXLaUOzKMjHNFpDGSqk+dzXxQYJtBn+b8ZLoL9MLa
# miIN9imVzI2gzolIBz9Za2pnBw72bIR2PdXd3zfKH0cqmytOhKlMIEK4KJcB6kMB
# CNAbszUwrmBSopGGryf+hLMk9VsPLVUg+Yqnc6/GLY8LF9d8Xr5rd8UzelYowBuh
# 3UR/V06U2Skv
# =41sQ
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 03 Aug 2022 07:56:03 AM PDT
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "laurent@vivier.eu"
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [undefined]
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [undefined]
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [undefined]
# 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: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu:
  linux-user: Use memfd for open syscall emulation
  linux-user: Do not treat madvise()'s advice as a bitmask
  linux-user/flatload.c: Fix setting of image_info::end_code

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoUpdate version for v7.1.0-rc1 release
Richard Henderson [Wed, 3 Aug 2022 03:12:42 +0000 (20:12 -0700)]
Update version for v7.1.0-rc1 release

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoMerge tag 'pull-semi-20220802' of https://gitlab.com/rth7680/qemu into staging
Richard Henderson [Wed, 3 Aug 2022 00:59:36 +0000 (17:59 -0700)]
Merge tag 'pull-semi-20220802' of https://gitlab.com/rth7680/qemu into staging

Fix mips semihosting regression.

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmLpx/EdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV8d2Qf+PO1v5r5HDZYVYyhZ
# moew0E+XKv+Tzw9zjHlarC75pxMfFWbkUzKXvrsvGRg/MKo+VQyLC65PuxdtMQsr
# FSHF0KQpa0XRb7fZ+HozZE5ufmXHdtEiiXxDe0hvTt7MVRHqtonECYA2Ian3cZra
# bTJ1Iwn9mVmaWWG1JqCyvDO+PszAAQO8wCc+ADso7yt5C3BJLfWUmjjPRMWF2dHu
# 9mz15ii6kF73833btwb1/LuxtPy9UxxpHKTA8Xqpjb7ZXOZU67e0Z52CMgNBcB/U
# aeo1GUZqDKi7swI9Ilrl5ZUAQ5PsS76ePjr4j4d6aTp0ry+1axdwvkcbJnW1okMe
# qS242Q==
# =5DLw
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 02 Aug 2022 05:57:21 PM PDT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate]

* tag 'pull-semi-20220802' of https://gitlab.com/rth7680/qemu:
  target/mips: Advance pc after semihosting exception

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agotarget/mips: Advance pc after semihosting exception
Richard Henderson [Sat, 30 Jul 2022 02:17:02 +0000 (19:17 -0700)]
target/mips: Advance pc after semihosting exception

Delay generating the exception until after we know the
insn length, and record that length in env->error_code.

Fixes: 8ec7e3c53d4 ("target/mips: Use an exception for semihosting")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1126
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoMerge tag 'pull-migration-20220802c' of https://gitlab.com/dagrh/qemu into staging
Richard Henderson [Tue, 2 Aug 2022 17:03:18 +0000 (10:03 -0700)]
Merge tag 'pull-migration-20220802c' of https://gitlab.com/dagrh/qemu into staging

Migration fixes pull 2022-08-02

Small migration (and virtiofsd) fixes.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEERfXHG0oMt/uXep+pBRYzHrxb/ecFAmLpR80ACgkQBRYzHrxb
# /edDiQ//VWx6VFpq3j/cFe+aZudCJWbHD5HI8e0wABoCAMzfYnRRq5pMP7DaVy/x
# Su0Lr6AO7vqSZzAqjsSm4DLQJHYM28YXxo0un/aJvnOZFGiXJzFe9OIE1LUwekQe
# g6OrsyhOAf7wHY9MsoC6RRitKdSo/z7YZYZY6wEv2cyIJDda1+b9jpD6mWADQ2z1
# 7eU5T0Kxfg2nArgF1MwgMWzPzjw4xN6BbqLLkWKdf3RD8Vl0BOdwxfXPDECqouUi
# 08vcNB4jRV7WSJ5mnOEW2EMQvgmUkSe9HUhMhkD39LmbeeJ4a84oRoKZkQuvrb1h
# qsbwoMlWhg8nxqyqB7ChTUw/27V3lfzlr/k6r6ExXsDL+zUwJXg4LrFuzyaqWdb2
# vH5cp/mZkSho+PcIF+KeFQMEj51yV/y0ucU4JWwyyKCnGoJYofmZnBWG2czGOotq
# 2qX44srufFkTDISpZ+NVUsaFl06nTrS7W9aTZdISYpGuxzHphOtrnYj8Pqqdwv4B
# F6CyNmUcVbLLnGIRASYYEYMByfptmiRQgGhOtv1IJyYgzIgg0PJQUR5Dbjgb96vR
# 0jhvLucKAkBrQaxkxxMVuIUJ9JdLeVbyEaSrc38qfr3FinRt8rgNr0mnFPAcNS7s
# oAy4Ei9jZ3MoAITs/JD+ODglC/f58o0oHaSA6RFrOxmxxkrXowk=
# =b2BF
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 02 Aug 2022 08:50:37 AM PDT
# gpg:                using RSA key 45F5C71B4A0CB7FB977A9FA90516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" [full]

* tag 'pull-migration-20220802c' of https://gitlab.com/dagrh/qemu:
  virtiofsd: Disable killpriv_v2 by default
  migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long
  migration: Assert that migrate_multifd_compression() returns an in-range value
  Revert "migration: Simplify unqueue_page()"
  migration: add remaining params->has_* = true in migration_instance_init()

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agovirtiofsd: Disable killpriv_v2 by default
Vivek Goyal [Fri, 29 Jul 2022 13:17:06 +0000 (09:17 -0400)]
virtiofsd: Disable killpriv_v2 by default

We are having bunch of issues with killpriv_v2 enabled by default. First
of all it relies on clearing suid/sgid bits as needed by dropping
capability CAP_FSETID. This does not work for remote filesystems like
NFS (and possibly others).

Secondly, we are noticing other issues related to clearing of SGID
which leads to failures for xfstests generic/355 and generic/193.

Thirdly, there are other issues w.r.t caching of metadata (suid/sgid)
bits in fuse client with killpriv_v2 enabled. Guest can cache that
data for sometime even if cleared on server.

Second and Third issue are fixable. Just that it might take a little
while to get it fixed in kernel. First one will probably not see
any movement for a long time.

Given these issues, killpriv_v2 does not seem to be a good candidate
for enabling by default. We have already disabled it by default in
rust version of virtiofsd.

Hence this patch disabled killpriv_v2 by default. User can choose to
enable it by passing option "-o killpriv_v2".

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <YuPd0itNIAz4tQRt@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
22 months agomigration: Define BLK_MIG_BLOCK_SIZE as unsigned long long
Peter Maydell [Thu, 21 Jul 2022 11:52:07 +0000 (12:52 +0100)]
migration: Define BLK_MIG_BLOCK_SIZE as unsigned long long

When we use BLK_MIG_BLOCK_SIZE in expressions like
block_mig_state.submitted * BLK_MIG_BLOCK_SIZE, this multiplication
is done as 32 bits, because both operands are 32 bits.  Coverity
complains about possible overflows because we then accumulate that
into a 64 bit variable.

Define BLK_MIG_BLOCK_SIZE as unsigned long long using the ULL suffix.
The only two current uses of it with this problem are both in
block_save_pending(), so we could just cast to uint64_t there, but
using the ULL suffix is simpler and ensures that we don't
accidentally introduce new variants of the same issue in future.

Resolves: Coverity CID 14871361487175
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220721115207.729615-3-peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
22 months agomigration: Assert that migrate_multifd_compression() returns an in-range value
Peter Maydell [Thu, 21 Jul 2022 11:52:06 +0000 (12:52 +0100)]
migration: Assert that migrate_multifd_compression() returns an in-range value

Coverity complains that when we use the return value from
migrate_multifd_compression() as an array index:
  multifd_recv_state->ops = multifd_ops[migrate_multifd_compression()];

that this might overrun the array (which is declared to have size
MULTIFD_COMPRESSION__MAX).  This is because the function return type
is MultiFDCompression, which is an autogenerated enum.  The code
generator includes the "one greater than the maximum possible value"
MULTIFD_COMPRESSION__MAX in the enum, even though this is not
actually a valid value for the enum, and this makes Coverity think
that migrate_multifd_compression() could return that __MAX value and
index off the end of the array.

Suppress the Coverity error by asserting that the value we're going
to return is within range.

Resolves: Coverity CID 14872391487254
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20220721115207.729615-2-peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
22 months agoRevert "migration: Simplify unqueue_page()"
Thomas Huth [Tue, 2 Aug 2022 06:19:49 +0000 (08:19 +0200)]
Revert "migration: Simplify unqueue_page()"

This reverts commit cfd66f30fb0f735df06ff4220e5000290a43dad3.

The simplification of unqueue_page() introduced a bug that sometimes
breaks migration on s390x hosts.

The problem is not fully understood yet, but since we are already in
the freeze for QEMU 7.1 and we need something working there, let's
revert this patch for the upcoming release. The optimization can be
redone later again in a proper way if necessary.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2099934
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220802061949.331576-1-thuth@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
22 months agomigration: add remaining params->has_* = true in migration_instance_init()
Leonardo Bras [Tue, 26 Jul 2022 01:02:35 +0000 (22:02 -0300)]
migration: add remaining params->has_* = true in migration_instance_init()

Some of params->has_* = true are missing in migration_instance_init, this
causes migrate_params_check() to skip some tests, allowing some
unsupported scenarios.

Fix this by adding all missing params->has_* = true in
migration_instance_init().

Fixes: 69ef1f36b0 ("migration: define 'tls-creds' and 'tls-hostname' migration parameters")
Fixes: 1d58872a91 ("migration: do not wait for free thread")
Fixes: d2f1d29b95 ("migration: add support for a "tls-authz" migration parameter")
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Message-Id: <20220726010235.342927-1-leobras@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
22 months agoMerge tag 'for-upstream' of git://repo.or.cz/qemu/kevin into staging
Richard Henderson [Tue, 2 Aug 2022 13:52:05 +0000 (06:52 -0700)]
Merge tag 'for-upstream' of git://repo.or.cz/qemu/kevin into staging

Block layer patches

- libvduse: Coverity fixes
- hd-geometry: Fix ignored bios-chs-trans setting
- io_uring: Fix compiler warning (missing #include)
- main loop: add missing documentation links to GS/IO macros
- qemu-iotests: Discard stderr when probing devices

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEE3D3rFZqa+V09dFb+fwmycsiPL9YFAmLpKDURHGt3b2xmQHJl
# ZGhhdC5jb20ACgkQfwmycsiPL9ZMcA//buzWQl/AFL2VT5Fy3WpFCYDVp5mTPJ2q
# bgkhCpn6i7UXIkML53hygfm7LN9Fj8Q8Ld4ljkETzljJajS3zsXvyY6bgNevQutX
# 8WvkcUNWMb96DEgetInak2ebH6lhti6/V7lBfjNFG1yC2s8l+JoWIPqWfJqohdiN
# D4+loa/wQx1ZS3TgKq8zAxfi5qbbGxRTZQUvuCJNYRryRQmJsZH380DzlIqkRJWt
# b3rM7m9ElSpmcmwmztWkdK4E/2VYGknUQOnRpY0AUSUTcm/kaP7EVwh61+TdjlKL
# NZxvZ08kenGFTBEA9z3ahnggcLypj4IYU3DB29CiJLjMjCb0s7tMwc8USYajN+GA
# iDqkbK14mDd8auRDVbVcmnq34xzS0rJocpzT0Jo9zYo7oGe/r+JjaVWmWq0pZ2SE
# QQuSPZXZokUdpL6E5X05+JZ+u6+G+iQz9UOhNpwmKB1ajiXUVKIst/SctpyKedOr
# cJWB34tQxQIFB57s6K7wVMbSWPIumTwQc08EX0HoicT9pUMN7s+Z1jrCufudZ0ot
# gx95v7gBDZZDsJim5qi3znA8tqnUmtL0yxkUVgv7LdQfIleEnEFfutFJpq/7VFe9
# WRzXBQJPU451jF7Gvj/StA3+05qMr22mXW4CX6t96Ud6QHiR0mUBSGPRzYusIV4d
# KYOjySU7cOg=
# =axCN
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 02 Aug 2022 06:35:49 AM PDT
# gpg:                using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6
# gpg:                issuer "kwolf@redhat.com"
# gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]

* tag 'for-upstream' of git://repo.or.cz/qemu/kevin:
  main loop: add missing documentation links to GS/IO macros
  qemu-iotests: Discard stderr when probing devices
  hw/block/hd-geometry: Do not override specified bios-chs-trans
  libvduse: Pass positive value to strerror()
  libvduse: Replace strcpy() with strncpy()
  libvduse: Fix the incorrect function name
  block/io_uring: add missing include file

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agolinux-user: Use memfd for open syscall emulation
Rainer Müller [Fri, 29 Jul 2022 15:49:51 +0000 (17:49 +0200)]
linux-user: Use memfd for open syscall emulation

For certain paths in /proc, the open syscall is intercepted and the
returned file descriptor points to a temporary file with emulated
contents.

If TMPDIR is not accessible or writable for the current user (for
example in a read-only mounted chroot or container) tools such as ps
from procps may fail unexpectedly. Trying to read one of these paths
such as /proc/self/stat would return an error such as ENOENT or EROFS.

To relax the requirement on a writable TMPDIR, use memfd_create()
instead to create an anonymous file and return its file descriptor.

Signed-off-by: Rainer Müller <raimue@codingfarm.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220729154951.76268-1-raimue@codingfarm.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
22 months agomain loop: add missing documentation links to GS/IO macros
Emanuele Giuseppe Esposito [Thu, 9 Jun 2022 12:22:06 +0000 (08:22 -0400)]
main loop: add missing documentation links to GS/IO macros

If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE
definition, we just find that they "mark and check that the function
is part of the {category} API".
However, ther is no definition on what {category} API is, they are
in include/block/block-*.h
Therefore, add a comment that refers to such documentation.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220609122206.1016936-1-eesposit@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
22 months agoqemu-iotests: Discard stderr when probing devices
Cole Robinson [Sun, 5 Jun 2022 14:57:17 +0000 (10:57 -0400)]
qemu-iotests: Discard stderr when probing devices

qemu-iotests fails in the following setup:

  ./configure --enable-modules --enable-smartcard \
      --target-list=x86_64-softmmu,s390x-softmmu
  make
  cd build
  QEMU_PROG=`pwd`/s390x-softmmu/qemu-system-s390x \
      ../tests/check-block.sh qcow2
  ...
  --- /home/crobinso/src/qemu/tests/qemu-iotests/127.out
  +++ /home/crobinso/src/qemu/build/tests/qemu-iotests/scratch/127.out.bad
  @@ -1,4 +1,18 @@
   QA output created by 127
  +Failed to open module: /home/crobinso/src/qemu/build/hw-usb-smartcard.so: undefined symbol: ccid_card_ccid_attach
  ...
  --- /home/crobinso/src/qemu/tests/qemu-iotests/267.out
  +++ /home/crobinso/src/qemu/build/tests/qemu-iotests/scratch/267.out.bad
  @@ -1,4 +1,11 @@
   QA output created by 267
  +Failed to open module: /home/crobinso/src/qemu/build/hw-usb-smartcard.so: undefined symbol: ccid_card_ccid_attach

The stderr spew is its own known issue, but seems like iotests should
be discarding stderr in this case.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
22 months agohw/block/hd-geometry: Do not override specified bios-chs-trans
Lev Kujawski [Thu, 7 Jul 2022 20:40:45 +0000 (20:40 +0000)]
hw/block/hd-geometry: Do not override specified bios-chs-trans

For small disk images (<4 GiB), QEMU and SeaBIOS default to the
LARGE/ECHS disk translation method, but it is not uncommon for other
BIOS software to use LBA in these cases as well.  Some operating
system boot loaders (e.g., NT 4) do not handle LARGE translations
outside of fixed configurations.  See, e.g., Q154052:

"When starting an x86 based computer, Ntdetect.com retrieves and
stores Interrupt 13 information. . . If the disk controller is using a
32 sector/64 head translation scheme, this boundary will be 1 GB. If
the controller uses 63 sector/255 head translation [AUTHOR: i.e.,
LBA], the limit will be 4 GB."

To accommodate these situations, hd_geometry_guess() now follows the
disk translation specified by the user even when the ATA disk geometry
is guessed.

hd_geometry_guess():
* Only set the disk translation when translation is AUTO.
* Show the soon-to-be active translation (*ptrans) in the trace rather
  than what was guessed.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/56
Buglink: https://bugs.launchpad.net/qemu/+bug/1745312
Signed-off-by: Lev Kujawski <lkujaw@member.fsf.org>
Message-Id: <20220707204045.999544-1-lkujaw@member.fsf.org>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
22 months agolibvduse: Pass positive value to strerror()
Xie Yongji [Wed, 6 Jul 2022 09:56:24 +0000 (17:56 +0800)]
libvduse: Pass positive value to strerror()

The value passed to strerror() should be positive.
So let's fix it.

Fixes: Coverity CID 1490226, 1490223
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220706095624.328-4-xieyongji@bytedance.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
22 months agolibvduse: Replace strcpy() with strncpy()
Xie Yongji [Wed, 6 Jul 2022 09:56:23 +0000 (17:56 +0800)]
libvduse: Replace strcpy() with strncpy()

Coverity reported a string overflow issue since we copied
"name" to "dev_config->name" without checking the length.
This should be a false positive since we already checked
the length of "name" in vduse_name_is_invalid(). But anyway,
let's replace strcpy() with strncpy() (as a general library,
we'd like to minimize dependencies on other libraries, so we
didn't use g_strlcpy() here) to fix the coverity complaint.

Fixes: Coverity CID 1490224
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220706095624.328-3-xieyongji@bytedance.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
22 months agolibvduse: Fix the incorrect function name
Xie Yongji [Wed, 6 Jul 2022 09:56:22 +0000 (17:56 +0800)]
libvduse: Fix the incorrect function name

In vduse_name_is_valid(), we actually check whether
the name is invalid or not. So let's change the
function name to vduse_name_is_invalid() to match
the behavior.

Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20220706095624.328-2-xieyongji@bytedance.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
22 months agoblock/io_uring: add missing include file
Jinhao Fan [Thu, 21 Jul 2022 06:56:45 +0000 (14:56 +0800)]
block/io_uring: add missing include file

The commit "Use io_uring_register_ring_fd() to skip fd operations" uses
warn_report but did not include the header file "qemu/error-report.h".
This causes "error: implicit declaration of function ‘warn_report’".
Include this header file.

Fixes: e2848bc574 ("Use io_uring_register_ring_fd() to skip fd operations")
Signed-off-by: Jinhao Fan <fanjinhao21s@ict.ac.cn>
Message-Id: <20220721065645.577404-1-fanjinhao21s@ict.ac.cn>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
22 months agoMerge tag 'pull-riscv-to-apply-20220802' of github.com:alistair23/qemu into staging
Richard Henderson [Tue, 2 Aug 2022 02:05:10 +0000 (19:05 -0700)]
Merge tag 'pull-riscv-to-apply-20220802' of github.com:alistair23/qemu into staging

Seventh RISC-V PR for QEMU 7.1

This is a second PR to go in for RC1. It fixes a bug we have had
for awhile, but it's a simple fix so let's pull it in for RC1.

* linux-user/riscv: Align signal frame to 16 bytes

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCAAdFiEE9sSsRtSTSGjTuM6PIeENKd+XcFQFAmLoWxwACgkQIeENKd+X
# cFTePAf8Ci1TmiEzZ8eZo/+3EGIU4sNk749bFUhkUeQa2fB8IwCBAOG4nMyX/DvT
# 4nmkzFjJIWu2FQ8KJ9oJPnb8kZD4fKsAPCUX7bDV9hk9Pv26ReZbgwUgme8v9ehM
# l28BH8zxvUAZgj3TIG96k+X/k9dBjPMvhmcukym+HSdznyCXiUEwENC5WIsI4ARC
# jK295wItcH23SMOSgvFYE/JUNxbTqNvBu76OaUqjnasNOC4QfcJK+HTU0Uu9tVIN
# CUrUjnu2sJApmFEyRfz4mQ+2DvINffXTtCvcyIhVF//EG698joFxcyi/cHLZBf7i
# h3WCBDHIINe1gZlmhWfpBDtRd9KQjQ==
# =o+Uw
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 01 Aug 2022 04:00:44 PM PDT
# gpg:                using RSA key F6C4AC46D4934868D3B8CE8F21E10D29DF977054
# gpg: Good signature from "Alistair Francis <alistair@alistair23.me>" [undefined]
# 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: F6C4 AC46 D493 4868 D3B8  CE8F 21E1 0D29 DF97 7054

* tag 'pull-riscv-to-apply-20220802' of github.com:alistair23/qemu:
  linux-user/riscv: Align signal frame to 16 bytes

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agolinux-user/riscv: Align signal frame to 16 bytes
Richard Henderson [Fri, 29 Jul 2022 20:19:42 +0000 (13:19 -0700)]
linux-user/riscv: Align signal frame to 16 bytes

Follow the kernel's alignment, as we already noted.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1093
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220729201942.30738-1-richard.henderson@linaro.org>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
22 months agoMerge tag 'pull-aspeed-20220801' of https://github.com/legoater/qemu into staging
Richard Henderson [Mon, 1 Aug 2022 20:55:11 +0000 (13:55 -0700)]
Merge tag 'pull-aspeed-20220801' of https://github.com/legoater/qemu into staging

aspeed queue:

* Fix ownership of RAM regions on the fby35 machine

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmLn1N8ACgkQUaNDx8/7
# 7KHaVA//eh5wIZKeg1Qit8dhVoPXcO7b97KFpBreyCkfdREJpoLjoFe4y+rnKhnL
# tJm6qx1YG5s0UN/ODcy4TyKV9CkpcjsRZ+BHuZ+jjiz3WzuarZUTbZx1jVSJP6z0
# xcXc3CucKe/yyidGV1gKGiWetuXv2F6nYHzfvJ4auei6Rga8rwmiN7Rqf3Qfh6Lw
# Islj/9axfLxGzuMV85uuRZdRrrlmTOjDgnF4mxwVXRrxjtLIaAbzKT6mc1p1FUry
# cuE7bDjbZoT7ftBn5y4gQXV38M3XcWzB1KvzMslldkccU7cTbJg8620KSNiscOkJ
# 03xEJiBJoAzy/X1PUmEODNYUV8a19xcsXEyqaRQiyYtO1XMBDcNkSaiaFacOnhFT
# UxabJf3qvzf1QwAmgxGUdbR5usNXsr8Yrnpf1lew7Mvr3SwOYVXqb/JPp+j7uoV3
# CVvvTFZm+hBQghaHC0wHBX+C3aLsTis4Jppn5loulo6fb9KZiosj2kPRwEIetVkt
# ZgkBOLWRWtizdWKM7HImt7F+v/r7ClFlwAIJj8QQV0HTtVZ+gM6MXWj5oczKENJ8
# vPkoP6AUoOWzKFEhBU5XtQ9DdwPSP9m6zAZXl4LD17tVPUPpsuSEDaxhH5hAEnIR
# 39Mgx7hoK0uLHhM02RrNodD/NDmrZCPV3PwZ979z0Q/C8dttRkY=
# =hAJg
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 01 Aug 2022 06:27:59 AM PDT
# gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <clg@kaod.org>" [undefined]
# 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: A0F6 6548 F048 95EB FE6B  0B60 51A3 43C7 CFFB ECA1

* tag 'pull-aspeed-20220801' of https://github.com/legoater/qemu:
  aspeed/fby35: Fix owner of the BMC RAM memory region
  aspeed: Remove unused fields from AspeedMachineState

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoMerge tag 'pull-target-arm-20220801' of https://git.linaro.org/people/pmaydell/qemu...
Richard Henderson [Mon, 1 Aug 2022 19:00:08 +0000 (12:00 -0700)]
Merge tag 'pull-target-arm-20220801' of https://git.linaro.org/people/pmaydell/qemu-arm into staging

target-arm queue:
 * Fix KVM SVE ID register probe code

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmLn8rwZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3seqD/sE4YU3qpovlyPhJJWsEFyH
# JRheAwddoj8P/ufOeJVPh85PqGH8zR6MSLSJqzz32ADrN56CFA56c0TRAoL7F6Ru
# iTibwP7hFloDxBCJIYVMZdbSw959LYADYHhdIN7UBkSryCoOC74AraUCwuYqzr9l
# jgh3lnvaH2kj5460XQQYPX4Pkf1jZIV83nhs9kh6GohhuHWtyz9UucDe8VcgMyl2
# 9jn7aobLWXI1LJyWTNYJHxQacGn4HK4HbVHczDRgf9PzmjliiTltGvol+T1XGyha
# TGHXMNnMTRbWFz7LCENfEYhup5ScuZbBr5fWh4sBveodczgOActNwmFuy1sempWo
# Cnzy/rwcNREj6EXoKvUkpATKuls9rtH9U4927mesxrk9S3bRJXU4C/EgpAn3qIBZ
# 1iFTgSq7eqX+BaYmG1/dtEK+vFX6mhpmKCMhQyRtSFHHibovvlANaNhOHgnPnS0m
# +Bb1pioolo31LLLxBpByOX/MxnXbG+GBnn2kmqX9MLkqamrYQq4g+ITUZcrLReId
# HmvBtYENoiXfReuvT/zRH1nBax97dKrluOgejco2bJrhiYaDgJ94jDMegdoR9mSl
# W/G3QHq18PJ5YOkrjmTn6IFjYNozLEvVqn5VwGXr6QZFxBuivAUoxOELrGULSlba
# OPTBWo2kAbJ8FvKOr3RzhQ==
# =hkV8
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 01 Aug 2022 08:35:24 AM PDT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [full]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [full]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [full]

* tag 'pull-target-arm-20220801' of https://git.linaro.org/people/pmaydell/qemu-arm:
  target/arm: Move sve probe inside kvm >= 4.15 branch
  target/arm: Set KVM_ARM_VCPU_SVE while probing the host
  target/arm: Use kvm_arm_sve_supported in kvm_arm_get_host_cpu_features

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoMerge tag 'pull-request-2022-08-01' of https://gitlab.com/thuth/qemu into staging
Richard Henderson [Mon, 1 Aug 2022 17:22:00 +0000 (10:22 -0700)]
Merge tag 'pull-request-2022-08-01' of https://gitlab.com/thuth/qemu into staging

- Some fixes for various tests
- Improve wordings in some files

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmLn6aYRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbWekg/+NVIT1jp3tcbfPIE6pB0vI/AhqN3i2hUd
# zfJ4V3rSe5tg54JpmuuSt542mp4BDM9bPfYcY/DYESWEtW0c9wv80iP/5LFdJF0G
# GYtk7Q4pRXvB32kF0v9OxjCEGPUeEqSRrDrsI/Ify5evEIhr55oHPnDjN/US1Bx+
# TIuVfmyz8jhSPHsUvZzfVyFxkHre1+BWDxgM3zxoHFIaWEscIPE1KhwRILbKIxWx
# MHpL8JLAneGFwljQoUAMCl7GzHkVna59RhqkbBJ+8iTaNGipQj9FhHZBo2CulO0J
# SR7scWowYN8Jt2FNMe3tcKM2xQn/2Fg2TEK4sp6q+hCXhJuvFfWFHBiFYTNpagFA
# LGgZmPfDr4uZtMEqY4AdEZdL14YZcoM9E/RpW7GhSvMHy73wOj16O8luH1bU0jtG
# 6X1VvAZlw8/Son1Tbq2CC6WejlMfJFXSzF6Fy6M7SflMPW44vJOs5uKdW405MYjE
# Pksbfz1rwoNfK+1qBNQop7SccgDRvPtlLf3lDAU9V/JHWVEITs1KTfyS+46U8jKA
# 9SVBzKuTpVd+aXvMgvMAmmqnyvUBPHJ9KcFq4vHNbIETsGaQsXu0Q6waBmpcK8YB
# KUL/g0EsdfhkpVVgKYZ4Bzj7shG6SKTdwc/lUcOt+wQuDrZZzaC+A2cu/6ReQN6T
# BIHtoaxTz8E=
# =K6RW
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 01 Aug 2022 07:56:38 AM PDT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [undefined]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [undefined]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [undefined]
# 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: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2022-08-01' of https://gitlab.com/thuth/qemu:
  tests/qtest/migration-test: Run the dirty ring tests only with the x86 target
  trivial: Fix duplicated words
  misc: fix commonly doubled up words
  tests/unit/test-qga: Replace the word 'blacklist' in the guest agent unit test
  migration-test: Allow test to run without uffd
  migration-test: Use migrate_ensure_converge() for auto-converge
  tests/tcg/linux-test: Fix random hangs in test_socket

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoMerge tag 'for-qemu-2022-08-01' of github.com:cminyard/qemu into staging
Richard Henderson [Mon, 1 Aug 2022 15:50:54 +0000 (08:50 -0700)]
Merge tag 'for-qemu-2022-08-01' of github.com:cminyard/qemu into staging

Add a change to make Coverity happy.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEE/Q1c5nzg9ZpmiCaGYfOMkJGb/4EFAmLn2woACgkQYfOMkJGb
# /4HDxA/9EvFQCSHLrbfp5rR44PQOcLnFOPt5Gq9JUcGZ+6JfsKkEmLMhj004hLlK
# pby6b+dvSPgZr+vzzTeSViQFZqlEv5xK4ItH4Kv9jwigFDxzeiHbygxGdHGjO2so
# eMGhGawCN0/7ElDOMIp7guRdxfy/vv+zK+u6Yod5wbduzQbYz/rVeGF5N6hb7Nkn
# lM8+W+Uz1StatOj83m1K0YNWZSvQ3zKG2Oc0zSJAjvDCZr89ifJRJkp+U+GrM/Hw
# 1gFI5Jtm7THPfuzUm5popnOtD5sae6lx0r1JNFSmX+5/IpcTu+7UqJQi0ANLiJeq
# 2Fm4SOv6CqmDBtZY6KIfXkdZouKhunlUv/wEfAc2geZHSMNzn7LDAMNcLfjDZG1A
# PFTKyv1Spn1d7BI5aqnLvY39yojYYg8SY6uiRRLPd6xNIivsywg9fZN7XRRY7L6h
# VeIYxo65z4kjfTpx2tdspdUngKGheH/IOARLkkR/Xvx7acV9LC9Af0HEJz/IJxXY
# WYdsmzsDCVtphBRVUIxiWIgR5qk73rnDzYEkjevK8JzZUFf6qoTUlLcL0zpJqP1A
# 1J56MoHBzmsVZLuJl+jf6UrBfyDPFAsarERKlfh1H0/DySz1JutqVascPnh2ZPQz
# hx+Ye3xj69cg7a35Vb4cEjAu96ngeYE5a7isamyaYuBQ/ixmYTE=
# =97ZM
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 01 Aug 2022 06:54:18 AM PDT
# gpg:                using RSA key FD0D5CE67CE0F59A6688268661F38C90919BFF81
# gpg: Good signature from "Corey Minyard <cminyard@mvista.com>" [unknown]
# gpg:                 aka "Corey Minyard <minyard@acm.org>" [unknown]
# gpg:                 aka "Corey Minyard <corey@minyard.net>" [unknown]
# gpg:                 aka "Corey Minyard <minyard@mvista.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: FD0D 5CE6 7CE0 F59A 6688  2686 61F3 8C90 919B FF81

* tag 'for-qemu-2022-08-01' of github.com:cminyard/qemu:
  ipmi:smbus: Add a check around a memcpy

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agotarget/arm: Move sve probe inside kvm >= 4.15 branch
Richard Henderson [Mon, 1 Aug 2022 15:21:18 +0000 (16:21 +0100)]
target/arm: Move sve probe inside kvm >= 4.15 branch

The test for the IF block indicates no ID registers are exposed, much
less host support for SVE.  Move the SVE probe into the ELSE block.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220726045828.53697-4-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
22 months agotarget/arm: Set KVM_ARM_VCPU_SVE while probing the host
Richard Henderson [Mon, 1 Aug 2022 15:21:18 +0000 (16:21 +0100)]
target/arm: Set KVM_ARM_VCPU_SVE while probing the host

Because we weren't setting this flag, our probe of ID_AA64ZFR0
was always returning zero.  This also obviates the adjustment
of ID_AA64PFR0, which had sanitized the SVE field.

The effects of the bug are not visible, because the only thing that
ID_AA64ZFR0 is used for within qemu at present is tcg translation.
The other tests for SVE within KVM are via ID_AA64PFR0.SVE.

Reported-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220726045828.53697-3-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
22 months agotarget/arm: Use kvm_arm_sve_supported in kvm_arm_get_host_cpu_features
Richard Henderson [Mon, 1 Aug 2022 15:21:17 +0000 (16:21 +0100)]
target/arm: Use kvm_arm_sve_supported in kvm_arm_get_host_cpu_features

Indication for support for SVE will not depend on whether we
perform the query on the main kvm_state or the temp vcpu.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220726045828.53697-2-richard.henderson@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
22 months agotests/qtest/migration-test: Run the dirty ring tests only with the x86 target
Thomas Huth [Mon, 1 Aug 2022 11:17:46 +0000 (13:17 +0200)]
tests/qtest/migration-test: Run the dirty ring tests only with the x86 target

kvm_dirty_ring_supported() only checks whether the dirty ring support
is available on the x86 host, but it ignores whether the target QEMU
architecture is x86 or not. Thus the test_vcpu_dirty_limit() test
currently fails with the assert((strcmp(arch, "x86_64") == 0)) statement
in dirtylimit_start_vm() if the users run e.g. "make check-qtest-aarch64"
on their x86 host. Fix it by only executing the tests when we're running
with a x86_64 target QEMU binary with KVM.

Message-Id: <20220801114644.208197-1-thuth@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
22 months agoMerge tag 'nvme-next-pull-request' of git://git.infradead.org/qemu-nvme into staging
Richard Henderson [Mon, 1 Aug 2022 13:29:49 +0000 (06:29 -0700)]
Merge tag 'nvme-next-pull-request' of git://git.infradead.org/qemu-nvme into staging

hw/nvme fixes

Some fixes for hw/nvme ioeventfd support.

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCAAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmLnpQ4ACgkQTeGvMW1P
# Delnywf/fM7Qp5WMR0ExHqVuKfpN1EBK8C6wa3xp7EI0pCDP50ZwJfcMmeZOhDAe
# 3KXdNTXV43cxygkdzG/uxh7j26Zq8zGzcf1RVLAIUqzL9wTkoFcJ4+aIuzlV4wjU
# oS1jK+pItJ9/Kb9SeavVGOzTzyBzs2G9odRvjyjGrwrEfpEBEtncwfXAK7mPqt1V
# TNDR0M0qJ9Bheaoqs7miqa4zOevtKKp3pPeG0n2BOhWromGx6MbeHwTuNg96zR0+
# VXuEmUyj8r6ezKmQdgnJPoqFCwEJI0iBGPSKhpIp3EGrkAww2IuBAN8C4bo03Bzq
# Fj3pne5Sr9iBV/nhz9vN267STQzdsw==
# =AL7y
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 01 Aug 2022 03:03:58 AM PDT
# 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

* tag 'nvme-next-pull-request' of git://git.infradead.org/qemu-nvme:
  hw/nvme: do not enable ioeventfd by default
  hw/nvme: unregister the event notifier handler on the main loop
  hw/nvme: skip queue processing if notifier is cleared

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoaspeed/fby35: Fix owner of the BMC RAM memory region
Cédric Le Goater [Thu, 28 Jul 2022 06:15:52 +0000 (08:15 +0200)]
aspeed/fby35: Fix owner of the BMC RAM memory region

A MachineState object is used as a owner of the RAM region and this
asserts in memory_region_init_ram() when QEMU is built with
CONFIG_QOM_CAST_DEBUG :

    /* This will assert if owner is neither NULL nor a DeviceState.
     * We only want the owner here for the purposes of defining a
     * unique name for migration. TODO: Ideally we should implement
     * a naming scheme for Objects which are not DeviceStates, in
     * which case we can relax this restriction.
     */
    owner_dev = DEVICE(owner);

Use the BMC and BIC objects as the owners of their memory regions.

Cc: Peter Delevoryas <peter@pjd.dev>
Fixes: 778e14cc5cd5 ("aspeed: Add AST2600 (BMC) to fby35")
Reviewed-by: Peter Delevoryas <peter@pjd.dev>
Message-Id: <20220727102714.803041-3-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
22 months agoaspeed: Remove unused fields from AspeedMachineState
Cédric Le Goater [Thu, 28 Jul 2022 06:15:52 +0000 (08:15 +0200)]
aspeed: Remove unused fields from AspeedMachineState

Fixes: 346160cbf2af ("aspeed: Set the dram container at the SoC level")
Message-Id: <20220727102714.803041-2-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
22 months agoipmi:smbus: Add a check around a memcpy
Corey Minyard [Sun, 31 Jul 2022 22:58:09 +0000 (17:58 -0500)]
ipmi:smbus: Add a check around a memcpy

In one case:

  memcpy(sid->inmsg + sid->inlen, buf, len);

if len == 0 then sid->inmsg + sig->inlen can point to one past the inmsg
array if the array is full.  We have to allow len == 0 due to some
vagueness in the spec, but we don't have to call memcpy.

Found by Coverity.  This is not a problem in practice, but the results
are technically (maybe) undefined.  So make Coverity happy.

Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
22 months agohw/nvme: do not enable ioeventfd by default
Klaus Jensen [Thu, 28 Jul 2022 06:34:21 +0000 (08:34 +0200)]
hw/nvme: do not enable ioeventfd by default

Do not enable ioeventfd by default. Let the feature mature a bit before
we consider enabling it by default.

Fixes: 2e53b0b45024 ("hw/nvme: Use ioeventfd to handle doorbell updates")
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Jinhao Fan <fanjinhao21s@ict.ac.cn>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
22 months agohw/nvme: unregister the event notifier handler on the main loop
Klaus Jensen [Thu, 28 Jul 2022 06:48:51 +0000 (08:48 +0200)]
hw/nvme: unregister the event notifier handler on the main loop

Make sure the notifier handler is unregistered in the main loop prior to
cleaning it up.

Fixes: 2e53b0b45024 ("hw/nvme: Use ioeventfd to handle doorbell updates")
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Jinhao Fan <fanjinhao21s@ict.ac.cn>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
22 months agohw/nvme: skip queue processing if notifier is cleared
Klaus Jensen [Thu, 28 Jul 2022 06:36:07 +0000 (08:36 +0200)]
hw/nvme: skip queue processing if notifier is cleared

While it is safe to process the queues when they are empty, skip it if
the event notifier callback was invoked spuriously.

Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Jinhao Fan <fanjinhao21s@ict.ac.cn>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
22 months agotrivial: Fix duplicated words
Thomas Huth [Fri, 22 Jul 2022 14:35:21 +0000 (16:35 +0200)]
trivial: Fix duplicated words

Some files wrongly contain the same word twice in a row.
One of them should be removed or replaced.

Message-Id: <20220722145859.1952732-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
22 months agomisc: fix commonly doubled up words
Daniel P. Berrangé [Thu, 7 Jul 2022 16:37:15 +0000 (17:37 +0100)]
misc: fix commonly doubled up words

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220707163720.1421716-5-berrange@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
22 months agotests/unit/test-qga: Replace the word 'blacklist' in the guest agent unit test
Thomas Huth [Wed, 27 Jul 2022 08:39:13 +0000 (10:39 +0200)]
tests/unit/test-qga: Replace the word 'blacklist' in the guest agent unit test

Let's use better, more inclusive wording here.

Message-Id: <20220727092135.302915-4-thuth@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
22 months agomigration-test: Allow test to run without uffd
Peter Xu [Thu, 28 Jul 2022 13:35:16 +0000 (09:35 -0400)]
migration-test: Allow test to run without uffd

We used to stop running all tests if uffd is not detected.  However
logically that's only needed for postcopy not the rest of tests.

Keep running the rest when still possible.

Signed-off-by: Peter Xu <peterx@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220728133516.92061-3-peterx@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
22 months agomigration-test: Use migrate_ensure_converge() for auto-converge
Peter Xu [Thu, 28 Jul 2022 13:35:15 +0000 (09:35 -0400)]
migration-test: Use migrate_ensure_converge() for auto-converge

Thomas reported that auto-converge test will timeout on MacOS CI gatings.
Use the migrate_ensure_converge() helper too in the auto-converge as when
Daniel reworked the other test cases.

Since both max_bandwidth / downtime_limit will not be used for converge
calculations, make it simple by removing the remaining check, then we can
completely remove both variables altogether, since migrate_ensure_converge
is used the remaining check won't make much sense anyway.

Reported-by: Thomas Huth <thuth@redhat.com>
Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20220728133516.92061-2-peterx@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
22 months agotests/tcg/linux-test: Fix random hangs in test_socket
Ilya Leoshkevich [Mon, 25 Jul 2022 14:42:51 +0000 (16:42 +0200)]
tests/tcg/linux-test: Fix random hangs in test_socket

test_socket hangs randomly in connect(), especially when run without
qemu. Apparently the reason is that linux started treating backlog
value of 0 literally instead of rounding it up since v4.4 (commit
ef547f2ac16b).

So set it to 1 instead.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20220725144251.192720-1-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
22 months agoMerge tag 'pull-hex-20220731' of https://github.com/quic/qemu into staging
Richard Henderson [Mon, 1 Aug 2022 04:38:53 +0000 (21:38 -0700)]
Merge tag 'pull-hex-20220731' of https://github.com/quic/qemu into staging

Hexagon bug fixes and test improvements

1) Fixes a bug in qemu-hexagon
2) Fixes a bug in a test case
3) Adds reference file for float_convd test case

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEENjXHiM5iuR/UxZq0ewJE+xLeRCIFAmLnDw8ACgkQewJE+xLe
# RCIwVgf/bPvX2cbmAECNJ5y/Galy5n1sMttwyrlwR4VVf8jQbCESDritIiWVn5gw
# zvM1Ba4MGH6YSkr/1Om7kBkEp+hqX5eDpUW1Q1qFa6SyF3oIu25MVBq8fkrrU1+f
# kJcTKdW7eQ2TfGupUW6Dj/QdoVknBnoIPk7T9lkT/qtmn9YwDyrqDSFnJTgVbrAv
# W/gGFzT4HskKuJ5Fy0wzeca7BfR9fl8rencuqyUfDehLk5hbjiR9vGG9Xt1mJyae
# LRFaqdy4/OsZHAVad4fnSOvYJp7EN4fR7zmkRfPi7kTNwnQ6ewBOZnUUoK3VQ0bk
# TViBl7kNjxdcO4DFjBeLYJUGxVUoww==
# =a+hi
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 31 Jul 2022 04:23:59 PM PDT
# gpg:                using RSA key 3635C788CE62B91FD4C59AB47B0244FB12DE4422
# gpg: Good signature from "Taylor Simpson (Rock on) <tsimpson@quicinc.com>" [undefined]
# 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: 3635 C788 CE62 B91F D4C5  9AB4 7B02 44FB 12DE 4422

* tag 'pull-hex-20220731' of https://github.com/quic/qemu:
  Hexagon (tests/tcg/hexagon) reference file for float_convd
  Hexagon (tests/tcg/hexagon) Fix alignment in load_unpack.c
  Hexagon (target/hexagon) make VyV operands use a unique temp

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoHexagon (tests/tcg/hexagon) reference file for float_convd
Taylor Simpson [Mon, 18 Jul 2022 23:03:20 +0000 (16:03 -0700)]
Hexagon (tests/tcg/hexagon) reference file for float_convd

The test is in tests/tcg/multiarch/float_convd.c

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220718230320.24444-4-tsimpson@quicinc.com>

22 months agoHexagon (tests/tcg/hexagon) Fix alignment in load_unpack.c
Taylor Simpson [Mon, 18 Jul 2022 23:03:19 +0000 (16:03 -0700)]
Hexagon (tests/tcg/hexagon) Fix alignment in load_unpack.c

The increment used in :brev tests was causing unaligned addresses
Change the increment and the relevant expected values

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220718230320.24444-3-tsimpson@quicinc.com>

22 months agoHexagon (target/hexagon) make VyV operands use a unique temp
Taylor Simpson [Mon, 18 Jul 2022 23:03:18 +0000 (16:03 -0700)]
Hexagon (target/hexagon) make VyV operands use a unique temp

VyV operand is only used in the vshuff and vdeal instructions.  These
instructions write to both VyV and VxV operands.  In the case where
both operands are the same register, we need a separate location for
VyV.  We use the existing vtmp field in CPUHexagonState.

Test case added in tests/tcg/hexagon/hvx_misc.c

Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220718230320.24444-2-tsimpson@quicinc.com>

22 months agoMerge tag 'pull-la-20220729' of https://gitlab.com/rth7680/qemu into staging
Richard Henderson [Sat, 30 Jul 2022 00:39:17 +0000 (17:39 -0700)]
Merge tag 'pull-la-20220729' of https://gitlab.com/rth7680/qemu into staging

Rename ls7a to virt, when it's board not chipset related.

# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmLkfO8dHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV9UvAgAud1jhWBalaON0be6
# tC3UMB2Xe5Dzgm5yiLC7EspHci/HB/kSqbeXY436/hbU9iBXGEZkuTeQ1BX41Aq8
# D8LBzFAr35uySD5wfZbDdpefCvuBiDcb1SMpNXLC4I3zJj0Euj96j/IewIeJfGrc
# 0ZkJSq4jAOuPaU0NB1+Wmb9UsoMWhHQQOcIdz8ZpR0hjuU8yz7xAEGQosJNh/Acq
# Fdm6jDCOH4KY+uw/6dKF9poeSqpBDz3rCLicNNk6D+btDQybb2NzaVHE5ApLGRbW
# T0MnOf1ERoWTubAbJasKR/ODCt6Jby3kC9lZFsfOAqKjRXMYL/HexdJcM2UqKE9W
# E0aFjQ==
# =c3v3
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 29 Jul 2022 05:35:59 PM PDT
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [ultimate]

* tag 'pull-la-20220729' of https://gitlab.com/rth7680/qemu:
  hw/loongarch: Change macro name 'LS7A_XXX' to 'VIRT_XXX'
  hw/loongarch: Rename file 'loongson3.XXX' to 'virt.XXX'

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agohw/loongarch: Change macro name 'LS7A_XXX' to 'VIRT_XXX'
Xiaojuan Yang [Fri, 29 Jul 2022 07:30:18 +0000 (15:30 +0800)]
hw/loongarch: Change macro name 'LS7A_XXX' to 'VIRT_XXX'

Change macro name 'LS7A_XXX' to 'VIRT_XXX', as the loongarch
virt machinue use the GPEX bridge instead of LS7A bridge. So
the macro name should keep consistency.

Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
Message-Id: <20220729073018.27037-3-yangxiaojuan@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agohw/loongarch: Rename file 'loongson3.XXX' to 'virt.XXX'
Xiaojuan Yang [Fri, 29 Jul 2022 07:30:17 +0000 (15:30 +0800)]
hw/loongarch: Rename file 'loongson3.XXX' to 'virt.XXX'

1. Rename 'loongson3.c' to 'virt.c' and change the meson.build file.
2. Rename 'loongson3.rst' to 'virt.rst'.

Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
Message-Id: <20220729073018.27037-2-yangxiaojuan@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoci: Upgrade msys2 release to 20220603
Yonggang Luo [Thu, 28 Jul 2022 20:04:22 +0000 (04:04 +0800)]
ci: Upgrade msys2 release to 20220603

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Message-Id: <20220728200422.1502-1-luoyonggang@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoMerge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
Richard Henderson [Fri, 29 Jul 2022 15:38:45 +0000 (08:38 -0700)]
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* Misc build system bugfixes
* Fix CGA 2-color graphics

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmLj1BYUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroO1nQgAoKoT4oiRrHGRPRav5FVHedeVoLgn
# QXqdiB90xB4uoxeCqqEWWdQ/yuGkCrhrBYqlJynM7BLj0ujqsxw5MHsmcN4MKwVH
# 9hQQDegpzRcN8yY9/t4vBqxS66Z6Pj8zVTq58FkyTsE5yusayoT2gXINb/Y6iEnm
# sff46kgnXmx0+QiEVkzfuQk4Q4orih554GquOiUUrT0QfVgkTmZr3EIjU0x6urU9
# 9Pnr20GB4iK4IdqcDT1y/7viHhRLwzONO/6+7dmod82cxWVwIR3WZlonqOsWBS/F
# Vw6iVWquC7vMm7eS9mh2bZZSkXkczcdegKVE5O4WgpdqXmad4sJtWBgT5g==
# =q27Q
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 29 Jul 2022 05:35:34 AM PDT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [undefined]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [undefined]
# 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: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  configure: pass correct cflags to container-based cross compilers
  kvm: don't use perror() without useful errno
  configure: Fix ppc container_cross_cc substitution
  stubs: update replay-tools to match replay.h types
  vga: fix incorrect line height in 640x200x2 mode
  ui: dbus-display requires CONFIG_GBM

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agolinux-user: Do not treat madvise()'s advice as a bitmask
Ilya Leoshkevich [Mon, 25 Jul 2022 13:41:00 +0000 (15:41 +0200)]
linux-user: Do not treat madvise()'s advice as a bitmask

Advice is enum, not flags. Doing (advice & MADV_DONTNEED) also matches
e.g. MADV_MERGEABLE.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20220725134100.128035-1-iii@linux.ibm.com>
Fixes: 892a4f6a750a ("linux-user: Add partial support for MADV_DONTNEED")
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
22 months agoMerge tag 'pull-testing-next-290722-1' of https://github.com/stsquad/qemu into staging
Richard Henderson [Fri, 29 Jul 2022 12:13:59 +0000 (05:13 -0700)]
Merge tag 'pull-testing-next-290722-1' of https://github.com/stsquad/qemu into staging

Testing, semihosting and doc fixes:

  - update to latest libvirt-ci
  - echo testlog.txt on failed cirrus runs
  - drop containers-layer2 stage
  - update handling of symlinks on windows builds
  - return 0 for failure of semihosting console write
  - don't copy unused buffer after semihost operation
  - check for errors in semihosting args
  - fix buffer handling for semihosting TMPNAM
  - add qapi exit-failure PanicAction
  - add lowcore unaligned access test to s390x
  - fix documentation of OBJECT_DECLARE_SIMPLE_TYPE
  - expand documentation on booting code

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCgAdFiEEZoWumedRZ7yvyN81+9DbCVqeKkQFAmLjoIQACgkQ+9DbCVqe
# KkSLyAf7Byt1jeIHCYYYqOPj8+Zx+kJXgWr59wMRSDFLwd0wWeFkgQhxriSlSUAl
# oVOTP8fkczeaMKPhp7CJnqpcQuZzD6iaK9hg/hNzKy0gTQbJgFRtTSP7c0E0iak5
# ZfDX5h+BRSAoeDo3I+ulj/bLKlj+KbxRWGf+y4K9rRGHKcTJUbcpkZ7aQlK5J6UD
# nqjkrvgnNWslxhdRSI6+2KPzkYaOmbiyPIVGOiBvmyv0N+NuazPvFMp2mFGH25kB
# XGsU5zxmm8IskxLGHHFvlwIM19SwB/2vArLtyaTVEPbLDhvdENePrPSL1Lr2BA/A
# yStVAvAnyy7Cdr8YmRCAGm3qnY61dg==
# =57ZK
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 29 Jul 2022 01:55:32 AM PDT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [undefined]
# 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: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* tag 'pull-testing-next-290722-1' of https://github.com/stsquad/qemu:
  qemu-options: bring the kernel and image options together
  docs/devel: fix description of OBJECT_DECLARE_SIMPLE_TYPE
  tests/tcg/s390x: Test unaligned accesses to lowcore
  qapi: Add exit-failure PanicAction
  semihosting: Fix handling of buffer in TARGET_SYS_TMPNAM
  semihosting: Check for errors on SET_ARG()
  semihosting: Don't copy buffer after console_write()
  semihosting: Don't return negative values on qemu_semihosting_console_write() failure
  .gitlab-ci.d/windows.yml: Enable native Windows symlink
  .cirrus.yml: Change winsymlinks to 'native'
  gitlab: drop 'containers-layer2' stage
  gitlab: show testlog.txt contents when cirrus/custom-runner jobs fail
  tests: refresh to latest libvirt-ci module

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoqemu-options: bring the kernel and image options together
Alex Bennée [Mon, 25 Jul 2022 14:05:20 +0000 (15:05 +0100)]
qemu-options: bring the kernel and image options together

How to control the booting of QEMU is often a source of confusion for
users. Bring the options that control this together in the manual
pages and add some verbiage to describe when each option is
appropriate. This attempts to codify some of the knowledge expressed
in:

  https://stackoverflow.com/questions/58420670/qemu-bios-vs-kernel-vs-device-loader-file/58434837#58434837

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220725140520.515340-14-alex.bennee@linaro.org>

22 months agodocs/devel: fix description of OBJECT_DECLARE_SIMPLE_TYPE
Alex Bennée [Mon, 25 Jul 2022 14:05:19 +0000 (15:05 +0100)]
docs/devel: fix description of OBJECT_DECLARE_SIMPLE_TYPE

Since 30b5707c26 (qom: Remove module_obj_name parameter from
OBJECT_DECLARE* macros) we don't need the additional two parameters.
Fix the documentation.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220725140520.515340-13-alex.bennee@linaro.org>

22 months agotests/tcg/s390x: Test unaligned accesses to lowcore
Ilya Leoshkevich [Mon, 25 Jul 2022 22:37:46 +0000 (00:37 +0200)]
tests/tcg/s390x: Test unaligned accesses to lowcore

Add a small test to avoid regressions.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220725223746.227063-3-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
22 months agoqapi: Add exit-failure PanicAction
Ilya Leoshkevich [Mon, 25 Jul 2022 22:37:45 +0000 (00:37 +0200)]
qapi: Add exit-failure PanicAction

Currently QEMU exits with code 0 on both panic an shutdown. For tests
it is useful to return 1 on panic, so that it counts as a test
failure.

Introduce a new exit-failure PanicAction that makes main() return
EXIT_FAILURE. Tests can use -action panic=exit-failure option to
activate this behavior.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20220725223746.227063-2-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
22 months agosemihosting: Fix handling of buffer in TARGET_SYS_TMPNAM
Peter Maydell [Mon, 25 Jul 2022 14:05:16 +0000 (15:05 +0100)]
semihosting: Fix handling of buffer in TARGET_SYS_TMPNAM

The TARGET_SYS_TMPNAM implementation has two bugs spotted by
Coverity:
 * confusion about whether 'len' has the length of the string
   including or excluding the terminating NUL means we
   lock_user() len bytes of memory but memcpy() len + 1 bytes
 * In the error-exit cases we forget to free() the buffer
   that asprintf() returned to us

Resolves: Coverity CID 14902851490289
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220719121110.225657-5-peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220725140520.515340-10-alex.bennee@linaro.org>

22 months agosemihosting: Check for errors on SET_ARG()
Peter Maydell [Mon, 25 Jul 2022 14:05:15 +0000 (15:05 +0100)]
semihosting: Check for errors on SET_ARG()

The SET_ARG() macro returns an error indication; we check this in the
TARGET_SYS_GET_CMDLINE case but not when we use it in implementing
TARGET_SYS_ELAPSED.  Check for and handle the errors via the do_fault
codepath, and update the comment documenting the SET_ARG() and
GET_ARG() macros to note how they handle memory access errors.

Resolves: Coverity CID 1490287
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220719121110.225657-4-peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220725140520.515340-9-alex.bennee@linaro.org>

22 months agosemihosting: Don't copy buffer after console_write()
Peter Maydell [Mon, 25 Jul 2022 14:05:14 +0000 (15:05 +0100)]
semihosting: Don't copy buffer after console_write()

The console_write() semihosting function outputs guest data from a
buffer; it doesn't update that buffer.  It therefore doesn't need to
pass a length value to unlock_user(), but can pass 0, meaning "do not
copy any data back to the guest memory".

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220719121110.225657-3-peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220725140520.515340-8-alex.bennee@linaro.org>

22 months agosemihosting: Don't return negative values on qemu_semihosting_console_write() failure
Peter Maydell [Mon, 25 Jul 2022 14:05:13 +0000 (15:05 +0100)]
semihosting: Don't return negative values on qemu_semihosting_console_write() failure

The documentation comment for qemu_semihosting_console_write() says
 * Returns: number of bytes written -- this should only ever be short
 * on some sort of i/o error.

and the callsites rely on this.  However, the implementation code
path which sends console output to a chardev doesn't honour this,
and will return negative values on error.  Bring it into line with
the other implementation codepaths and the documentation, so that
it returns 0 on error.

Spotted by Coverity, because console_write() passes the return value
to unlock_user(), which doesn't accept a negative length.

Resolves: Coverity CID 1490288
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220719121110.225657-2-peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220725140520.515340-7-alex.bennee@linaro.org>

22 months ago.gitlab-ci.d/windows.yml: Enable native Windows symlink
Bin Meng [Mon, 25 Jul 2022 14:05:12 +0000 (15:05 +0100)]
.gitlab-ci.d/windows.yml: Enable native Windows symlink

The following error message was seen during the configure:

  "ln: failed to create symbolic link
  'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory"

By default the MSYS environment variable is not defined, so the runtime
behavior of winsymlinks is: if <target> does not exist, 'ln -s' fails.
At the configure phase, the qemu-system-x86_64.exe has not been built
so creation of the symbolic link fails hence the error message.

Set winsymlinks to 'native' whose behavior is most similar to the
behavior of 'ln -s' on *nix, that is:

  a) if native symlinks are enabled, and whether <target> exists
     or not, creates <destination> as a native Windows symlink;
  b) else if native symlinks are not enabled, and whether <target>
     exists or not, 'ln -s' creates as a Windows shortcut file.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220725123000.807608-1-bmeng.cn@gmail.com>
Message-Id: <20220725140520.515340-6-alex.bennee@linaro.org>

22 months ago.cirrus.yml: Change winsymlinks to 'native'
Bin Meng [Mon, 25 Jul 2022 14:05:11 +0000 (15:05 +0100)]
.cirrus.yml: Change winsymlinks to 'native'

At present winsymlinks is set to 'nativestrict', and its behavior is:

  a) if native symlinks are enabled and <target> exists, creates
     <destination> as a native Windows symlink;
  b) else if native symlinks are not enabled or if <target> does
     not exist, 'ln -s' fails.

This causes the following error message was seen during the configure:

  "ln: failed to create symbolic link
  'x86_64-softmmu/qemu-system-x86_64.exe': No such file or directory"

Change winsymlinks to 'native' whose behavior is most similar to the
behavior of 'ln -s' on *nix, that is:

  a) if native symlinks are enabled, and whether <target> exists
     or not, creates <destination> as a native Windows symlink;
  b) else if native symlinks are not enabled, and whether <target>
     exists or not, 'ln -s' creates as a Windows shortcut file.

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Message-Id: <20220719161230.766063-1-bmeng.cn@gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220725140520.515340-5-alex.bennee@linaro.org>

22 months agogitlab: drop 'containers-layer2' stage
Daniel P. Berrangé [Mon, 25 Jul 2022 14:05:10 +0000 (15:05 +0100)]
gitlab: drop 'containers-layer2' stage

Since we express dependencies via a 'needs' clause, we don't need to
split container builds into separate stages. GitLab happily lets jobs
depend on other jobs in the same stage and will run them when possible.

Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220722130431.2319019-4-berrange@redhat.com>
[AJB: fix typo]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220725140520.515340-4-alex.bennee@linaro.org>

22 months agogitlab: show testlog.txt contents when cirrus/custom-runner jobs fail
Daniel P. Berrangé [Mon, 25 Jul 2022 14:05:09 +0000 (15:05 +0100)]
gitlab: show testlog.txt contents when cirrus/custom-runner jobs fail

When tests fail meson just displays a summary and tells you to look at
the testlog.txt file for details. The native jobs on shared runners
publish testlog.txt as an artifact. For the Cirrus jobs and custom
runner jobs this is not currently possible. The best we can do is cat
the log contents on failure, to give maintainers a fighting chance
of diagnosing the problem.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220722130431.2319019-3-berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220725140520.515340-3-alex.bennee@linaro.org>

22 months agotests: refresh to latest libvirt-ci module
Daniel P. Berrangé [Mon, 25 Jul 2022 14:05:08 +0000 (15:05 +0100)]
tests: refresh to latest libvirt-ci module

Notable changes:

  - libvirt-ci source tree was re-arranged, so the script we
    run now lives in a bin/ sub-dir

  - opensuse 15.2 is replaced by opensuse 15.3

  - libslirp is temporarily dropped on opensuse as the
    libslirp-version.h is broken

     https://bugzilla.opensuse.org/show_bug.cgi?id=1201551

  - The incorrectly named python3-virtualenv module was
    changed to python3-venv, but most distros don't need
    any package as 'venv' is a standard part of python

  - glibc-static was renamed to libc-static, to reflect
    fact that it isn't going to be glibc on all distros

  - The cmocka/json-c deps that were manually added to
    the centos dockerfile and are now consistently added
    to all targets

Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220722130431.2319019-2-berrange@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220725140520.515340-2-alex.bennee@linaro.org>

22 months agoconfigure: pass correct cflags to container-based cross compilers
Paolo Bonzini [Thu, 28 Jul 2022 22:21:32 +0000 (00:21 +0200)]
configure: pass correct cflags to container-based cross compilers

probe_target_compiler returns nonempty $target_cc for installed toolchains
and $container_cross_cc for container-based toolchains.  In both cases
however the flags (coming from $cross_cc_cflags_${target_arch}) must be
in $target_cflags.

Therefore, do not clear them prior to returning from probe_target_compiler.

Reported-by: Taylor Simpson <tsimpson@quicinc.com>
Fixes: 92e288fcfb ("build: try both native and cross compilers", 2022-07-08)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
22 months agokvm: don't use perror() without useful errno
Cornelia Huck [Thu, 28 Jul 2022 14:24:46 +0000 (16:24 +0200)]
kvm: don't use perror() without useful errno

perror() is designed to append the decoded errno value to a
string. This, however, only makes sense if we called something that
actually sets errno prior to that.

For the callers that check for split irqchip support that is not the
case, and we end up with confusing error messages that end in
"success". Use error_report() instead.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Message-Id: <20220728142446.438177-1-cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
22 months agoconfigure: Fix ppc container_cross_cc substitution
Richard Henderson [Thu, 28 Jul 2022 18:39:01 +0000 (11:39 -0700)]
configure: Fix ppc container_cross_cc substitution

When moving this code out of probe_target_compiler(), we failed to adjust
the variable in which the target is located, resulting in e.g.
powerpc64-linux-user-linux-gnu-gcc-10

Fixes: cd362defbbd ("tests/tcg: merge configure.sh back into main configure script")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220728183901.1290113-1-richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
22 months agoMerge tag 'pull-ppc-20220728' of https://gitlab.com/danielhb/qemu into staging
Richard Henderson [Thu, 28 Jul 2022 22:06:42 +0000 (15:06 -0700)]
Merge tag 'pull-ppc-20220728' of https://gitlab.com/danielhb/qemu into staging

ppc patch queue for 2022-07-28:

Short queue with 2 Coverity fixes and one fix of the
'wait' insns that is causing hangs if the guest kernel uses
the most up to date wait opcode.

- target/ppc:
  - implement new wait variants to fix guest hang when using the new opcode
- ppc440_uc: initialize length passed to cpu_physical_memory_map()
- spapr_nvdimm: check if spapr_drc_index() returns NULL

# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQQX6/+ZI9AYAK8oOBk82cqW3gMxZAUCYuK8VgAKCRA82cqW3gMx
# ZOc7AQDPMsFY9NHNqJ3O0MiX4Qoy8IGUreZ9dzZSS3zT1nxtEAD+Lwl0/aGO+dk+
# +NiIO80A5Agy/0g8PHie4qR3EqHEnwA=
# =Q4eR
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 28 Jul 2022 09:41:58 AM PDT
# gpg:                using EDDSA key 17EBFF9923D01800AF2838193CD9CA96DE033164
# gpg: Good signature from "Daniel Henrique Barboza <danielhb413@gmail.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: 17EB FF99 23D0 1800 AF28  3819 3CD9 CA96 DE03 3164

* tag 'pull-ppc-20220728' of https://gitlab.com/danielhb/qemu:
  target/ppc: Implement new wait variants
  hw/ppc/ppc440_uc: Initialize length passed to cpu_physical_memory_map()
  hw/ppc: check if spapr_drc_index() returns NULL in spapr_nvdimm.c

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agolinux-user/flatload.c: Fix setting of image_info::end_code
Peter Maydell [Thu, 28 Jul 2022 15:14:06 +0000 (16:14 +0100)]
linux-user/flatload.c: Fix setting of image_info::end_code

The flatload loader sets the end_code field in the image_info struct
incorrectly, due to a typo.

This is a very long-standing bug (dating all the way back to when
the bFLT loader was added in 2006), but has gone unnoticed because
(a) most people don't use bFLT binaries
(b) we don't actually do anything with the end_code field, except
    print it in debugging traces and pass it to TCG plugins

Fix the typo.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1119
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220728151406.2262862-1-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
22 months agotarget/ppc: Implement new wait variants
Nicholas Piggin [Wed, 20 Jul 2022 13:33:52 +0000 (23:33 +1000)]
target/ppc: Implement new wait variants

ISA v2.06 adds new variations of wait, specified by the WC field. These
are not all compatible with the prior wait implementation, because they
add additional conditions that cause the processor to resume, which can
cause software to hang or run very slowly.

At this moment, with the current wait implementation and a pseries guest
using mainline kernel with new wait upcodes [1], QEMU hangs during boot if
more than one CPU is present:

 qemu-system-ppc64 -M pseries,x-vof=on -cpu POWER10 -smp 2 -nographic
-kernel zImage.pseries -no-reboot

QEMU will exit (as there's no filesystem) if the test "passes", or hang
during boot if it hits the bug.

ISA v3.0 changed the wait opcode and removed the new variants (retaining
the WC field but making non-zero values reserved).

ISA v3.1 added new WC values to the new wait opcode, and added a PL
field.

This patch implements the new wait encoding and supports WC variants
with no-op implementations, which provides basic correctness as
explained in comments.

[1] https://lore.kernel.org/all/20220720132132.903462-1-npiggin@gmail.com/

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Víctor Colombo <victor.colombo@eldorado.org.br>
Tested-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20220720133352.904263-1-npiggin@gmail.com>
[danielhb: added information about the bug being fixed]
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
22 months agostubs: update replay-tools to match replay.h types
Claudio Fontana [Mon, 4 Jul 2022 07:58:32 +0000 (09:58 +0200)]
stubs: update replay-tools to match replay.h types

detected with GCC 13 [-Werror=enum-int-mismatch]

Solves Issue #1096.

Signed-off-by: Claudio Fontana <cfontana@suse.de>
Cc: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220704075832.31537-1-cfontana@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
22 months agovga: fix incorrect line height in 640x200x2 mode
Paolo Bonzini [Thu, 28 Jul 2022 13:32:18 +0000 (15:32 +0200)]
vga: fix incorrect line height in 640x200x2 mode

When in CGA modes, QEMU wants to ignore the maximum scan field (bits 0..4) of
the maximum scan length register in the CRTC.  It is not clear why this is
needed---for example, Bochs ignores bit 7 instead.  The issue is that the
CGA modes are not detected correctly, and in particular mode 6 results in
multi_scan==3 according to how SeaBIOS programs it.  The right way to check
for CGA graphics modes is to check whether bit 13 of the address is special
cased by the CRT controller to achieve line interleaving, i.e. whether bit 0
of the CRTC mode control register is clear.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1020
Reported-by: Korneliusz Osmenda <korneliuszo@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
22 months agohw/ppc/ppc440_uc: Initialize length passed to cpu_physical_memory_map()
Peter Maydell [Tue, 26 Jul 2022 18:23:40 +0000 (19:23 +0100)]
hw/ppc/ppc440_uc: Initialize length passed to cpu_physical_memory_map()

In dcr_write_dma(), there is code that uses cpu_physical_memory_map()
to implement a DMA transfer.  That function takes a 'plen' argument,
which points to a hwaddr which is used for both input and output: the
caller must set it to the size of the range it wants to map, and on
return it is updated to the actual length mapped. The dcr_write_dma()
code fails to initialize rlen and wlen, so will end up mapping an
unpredictable amount of memory.

Initialize the length values correctly, and check that we managed to
map the entire range before using the fast-path memmove().

This was spotted by Coverity, which points out that we never
initialized the variables before using them.

Fixes: Coverity CID 1487137, 1487150
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220726182341.1888115-2-peter.maydell@linaro.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
22 months agohw/ppc: check if spapr_drc_index() returns NULL in spapr_nvdimm.c
Daniel Henrique Barboza [Sat, 9 Apr 2022 20:08:56 +0000 (17:08 -0300)]
hw/ppc: check if spapr_drc_index() returns NULL in spapr_nvdimm.c

spapr_nvdimm_flush_completion_cb() and flush_worker_cb() are using the
DRC object returned by spapr_drc_index() without checking it for NULL.
In this case we would be dereferencing a NULL pointer when doing
SPAPR_NVDIMM(drc->dev) and PC_DIMM(drc->dev).

This can happen if, during a scm_flush(), the DRC object is wrongly
freed/released (e.g. a bug in another part of the code).
spapr_drc_index() would then return NULL in the callbacks.

Fixes: Coverity CID 1487108, 1487178
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <20220409200856.283076-2-danielhb413@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
22 months agoMerge tag 'pull-riscv-to-apply-20220728' of github.com:alistair23/qemu into staging
Richard Henderson [Thu, 28 Jul 2022 11:40:26 +0000 (04:40 -0700)]
Merge tag 'pull-riscv-to-apply-20220728' of github.com:alistair23/qemu into staging

Sixth RISC-V PR for QEMU 7.1

This is a PR to go in for RC1. It fixes a segfault that occurs
when using multiple sockets on the RISC-V virt board. It also
includes a small fix to allow both Zmmul and M extensions.

* Allow both Zmmul and M extension
* Fix multi-socket plic configuraiton

# -----BEGIN PGP SIGNATURE-----
#
# iQEzBAABCAAdFiEE9sSsRtSTSGjTuM6PIeENKd+XcFQFAmLh33AACgkQIeENKd+X
# cFROBQf/QFxHsIX9clpAkHmK220efQ3rjHZtdCqQoCeRZp2EytFS9KZ6iae/BM9r
# 3Z8cZci38kxjqTzsYJLj46yNO3AxHoFsDH41yWTMOsxjVWVlno/06R/C1B4Ek37N
# kZXWKHzqfQvZRJIUAjKfVxaLtw9xRI9xYqWxVngdYSoW3HWHHz5UmA6fFoJ29QiZ
# SKEgxhakrqhvN9GMm1aWGkLN10uD5lFWOBMYdqMVcWq48XSP3Df5FU2Xk0sfegXq
# EqbIYKJL/Q6koyvmdpQz7VmtMAGjMTcmozEH8oN/MuCk7MCLmbloWVl+LF39SeTH
# 3amapiJBtYBOwaNZUpb5TZkv/bEDIw==
# =ip1R
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 27 Jul 2022 05:59:28 PM PDT
# gpg:                using RSA key F6C4AC46D4934868D3B8CE8F21E10D29DF977054
# gpg: Good signature from "Alistair Francis <alistair@alistair23.me>" [undefined]
# 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: F6C4 AC46 D493 4868 D3B8  CE8F 21E1 0D29 DF97 7054

* tag 'pull-riscv-to-apply-20220728' of github.com:alistair23/qemu:
  hw/intc: sifive_plic: Fix multi-socket plic configuraiton
  RISC-V: Allow both Zmmul and M

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoui: dbus-display requires CONFIG_GBM
Paolo Bonzini [Thu, 28 Jul 2022 06:41:28 +0000 (08:41 +0200)]
ui: dbus-display requires CONFIG_GBM

Without CONFIG_GBM, compiling dbus-display fails with

../ui/dbus.c: In function ‘dbus_create_context’:
../ui/dbus.c:47:20: error: ‘qemu_egl_rn_ctx’ undeclared (first use in this function); did you mean ‘qemu_egl_init_ctx’?
   47 |                    qemu_egl_rn_ctx);
      |                    ^~~~~~~~~~~~~~~
      |                    qemu_egl_init_ctx
../ui/dbus.c:47:20: note: each undeclared identifier is reported only once for each function it appears in

and many other similar errors, because include/ui/egl-helpers.h only has
these declaration if gbm is found on the system.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1108
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
22 months agoMerge tag 'pull-block-2022-07-27' of https://gitlab.com/vsementsov/qemu into staging
Richard Henderson [Thu, 28 Jul 2022 03:10:15 +0000 (20:10 -0700)]
Merge tag 'pull-block-2022-07-27' of https://gitlab.com/vsementsov/qemu into staging

Block: fix parallels block driver

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEi5wmzbL9FHyIDoahVh8kwfGfefsFAmLhi0cACgkQVh8kwfGf
# efs1Dg/7BwbaJu5uZEGhz3+KBRPk5kdYKX60bOojac27pBTVo4OyiP7QFzBt4c6+
# 4yftT2vD7yTyzKANlmIYBvmjoIEw6eB09gJ5/mnUKgxTAS+thKo0e2v1zdncliy+
# h9SEYRT3RhlePJYSssZx8lW4gfCG2JZi5xSjfqbG50X7I8RgDtMmcj7EUwkvCkaI
# WL3iZIuYPxkfFwbQ/6xVmwc6uE97tWom9Z0iyEgFIhtFGlrgV3zJrDJ2CbOXIbi+
# 9c2j4zmnMUZLwtdT2CFwyvO03iU8eMJxqnt4aSyByOAd/rqko+ugHeE53eZkND0Q
# ci4bFq9XjgxOSsIqHXemIEUnuExhMuw5i7dtwR8w7K5Kwc88/44GTUgCZrPnBLx2
# smGX0g7BiCpNYXA8DkquOsUQf8cS67M3rjdTB6SiMo0KuQHe5O0RDQAwu7f+hnTw
# vEyo8dk4xGqUvqYcOpLLBHDis1lghWwseC5gB/M6Q+KqvDF4WDpIWwPLfR1phJ0L
# kA1M9QO+NAcUtLEuT7N22QU8LMTxAX/hSYpR5Jrt5g3R26h7w7VZEvJbpQaytXTY
# VhDVWAGg9Xn3oxGTEyVqGP3Avik9OeoK9gCFiIyTEOL1jfEXqOsX8V6QkpaKP6c+
# WXWiWfV9A9D7O556Z92hUeDuWhQKb2w1dry2e7DPeSWiUmgHtyY=
# =QfFj
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 27 Jul 2022 12:00:23 PM PDT
# gpg:                using RSA key 8B9C26CDB2FD147C880E86A1561F24C1F19F79FB
# gpg: Good signature from "Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>" [unknown]
# gpg:                 aka "Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.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: 8B9C 26CD B2FD 147C 880E  86A1 561F 24C1 F19F 79FB

* tag 'pull-block-2022-07-27' of https://gitlab.com/vsementsov/qemu:
  iotests/131: Add parallels regression test
  block/parallels: Fix buffer-based write call

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agohw/intc: sifive_plic: Fix multi-socket plic configuraiton
Atish Patra [Sat, 23 Jul 2022 09:03:35 +0000 (02:03 -0700)]
hw/intc: sifive_plic: Fix multi-socket plic configuraiton

Since commit 40244040a7ac, multi-socket configuration with plic is
broken as the hartid for second socket is calculated incorrectly.
The hartid stored in addr_config already includes the offset
for the base hartid for that socket. Adding it again would lead
to segfault while creating the plic device for the virt machine.
qdev_connect_gpio_out was also invoked with incorrect number of gpio
lines.

Fixes: 40244040a7ac (hw/intc: sifive_plic: Avoid overflowing the addr_config buffer)
Signed-off-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220723090335.671105-1-atishp@rivosinc.com>
[ Changes by AF:
 - Change the qdev_connect_gpio_out() numbering
]
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
22 months agoRISC-V: Allow both Zmmul and M
Palmer Dabbelt [Thu, 14 Jul 2022 18:00:33 +0000 (11:00 -0700)]
RISC-V: Allow both Zmmul and M

We got to talking about how Zmmul and M interact with each other
https://github.com/riscv/riscv-isa-manual/issues/869 , and it turns out
that QEMU's behavior is slightly wrong: having Zmmul and M is a legal
combination, it just means that the multiplication instructions are
supported even when M is disabled at runtime via misa.

This just stops overriding M from Zmmul, with that the other checks for
the multiplication instructions work as per the ISA.

Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220714180033.22385-1-palmer@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
22 months agoUpdate version for v7.1.0-rc0 release
Richard Henderson [Wed, 27 Jul 2022 01:03:16 +0000 (18:03 -0700)]
Update version for v7.1.0-rc0 release

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
22 months agoMerge tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging
Richard Henderson [Tue, 26 Jul 2022 19:57:20 +0000 (12:57 -0700)]
Merge tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging

pc,virtio: fixes

Several fixes. From now on, regression fixes only.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmLgQr8PHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRpGUUIAKtNhrnKopGm4LlRpx8zN3Jc1Jo0nb648gaM
# Oyi+Pl8+hpESUhaWN10XDk38/QuPQfIFeR2ZhfYjFTRlZE+n3X9LVlwL8ejjP8KH
# AcWm78Ff/SLA45aMKMmw74pvEDNsoPYTp7TrfeIej5ub8BIXr8+8pqDdIR9WwtWO
# PbhLNXkTT2yLEs6jCVT4/dyh7zivSkrY7G/RVmtUaFe3PgY8fdW2z3+Txz7UIMgw
# CQoGuAucCO5ToBbs2CbT0V5yxY6G5VO6Qd8g0PzDW4M6GsY/Xr5QCnyJe0jTW0d6
# Dcc7UZFAzGNzyQCxHCic9xwTO+ZcJPJlH5TwknunxOb9xwCx4Qs=
# =zN41
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 26 Jul 2022 12:38:39 PM PDT
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [undefined]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [undefined]
# 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: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu:
  hw/virtio/virtio-iommu: Enforce power-of-two notify for both MAP and UNMAP
  i386/pc: restrict AMD only enforcing of 1Tb hole to new machine type
  i386/pc: relocate 4g start to 1T where applicable
  i386/pc: bounds check phys-bits against max used GPA
  i386/pc: factor out device_memory base/size to helper
  i386/pc: handle unitialized mr in pc_get_cxl_range_end()
  i386/pc: factor out cxl range start to helper
  i386/pc: factor out cxl range end to helper
  i386/pc: factor out above-4g end to an helper
  i386/pc: pass pci_hole64_size to pc_memory_init()
  i386/pc: create pci-host qdev prior to pc_memory_init()
  hw/i386: add 4g boundary start to X86MachineState
  hw/cxl: Fix size of constant in interleave granularity function.
  hw/i386/pc: Always place CXL Memory Regions after device_memory
  hw/machine: Clear out left over CXL related pointer from move of state handling to machines.
  acpi/nvdimm: Define trace events for NVDIMM and substitute nvdimm_debug()

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>