* Fix the replay-linux avocado test
* Relax a time constraint in iotest 264
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmLwmJsRHHRodXRoQHJl
ZGhhdC5jb20ACgkQLtnXdP5wLbUuaw//XGlKYzjKHEsmSGGuwSEF/iW7BvHf8lAn
X2loC7Fd1WzEoq1EX/s5jd/4+ZUVxDP4F2wO9Hzhi7GpEfd/Cr5cu3TPwWCGjQT8
g6UFVPPzHeVU68GxQX6ufBAPk7Lc9S57GHZ9n4tzcN7Jvp63zAXEFXe4lVLnAmzJ
ykDz1Ir1bCDEl1AIbVp1umpIAh4MkbY1XfZeXWRkbGtQolH1y/F6sZWw3i72G30b
JOM1pmu89KjnxWPoz1J142jOx53/XpSSlrqpFeqieykbU59rilBTIwi+k7K0KMOd
0DbrPDuU0EQ7JRkWzAlTT/IfNPbQB5gOjw6zFr+0L5S+3LcPM/p8XszNk4j3XQWt
Bps3HDU13LDQpydRyZajY4iCQl6tzBDVXCoY+LUgrYjkP6OM5UpbakZgXJWNw9Nu
Juu3kQ7imtLtMlKZQGSvhsy6gyUXjVlZxTZFspTQsMoOp/BDZdIwG+mKxk786hgr
32RxingXv6SWFYS+zrKsRJePtleLJr/RcySZFHNboJt9RIGf6W/IdROEjgZeYLce
QDnlfi6AbwnP37nWmah5Iu2PeoZwDgr3jL81otdWlU8bc7G+gjwrnN/E77y3jJvH
Auhj9YBNttQH6O8L4juMaD9+8/KtO47FfVfXojmPoicEB9NeWLChlUovVz47LC/U
olsgxmuoDac=
=JZmF
-----END PGP SIGNATURE-----
Merge tag 'pull-request-2022-08-08' of https://gitlab.com/thuth/qemu into staging
* Fix booting in the s390-ccw bios when physical and logical block sizes differ
* Fix the replay-linux avocado test
* Relax a time constraint in iotest 264
# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmLwmJsRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbUuaw//XGlKYzjKHEsmSGGuwSEF/iW7BvHf8lAn
# X2loC7Fd1WzEoq1EX/s5jd/4+ZUVxDP4F2wO9Hzhi7GpEfd/Cr5cu3TPwWCGjQT8
# g6UFVPPzHeVU68GxQX6ufBAPk7Lc9S57GHZ9n4tzcN7Jvp63zAXEFXe4lVLnAmzJ
# ykDz1Ir1bCDEl1AIbVp1umpIAh4MkbY1XfZeXWRkbGtQolH1y/F6sZWw3i72G30b
# JOM1pmu89KjnxWPoz1J142jOx53/XpSSlrqpFeqieykbU59rilBTIwi+k7K0KMOd
# 0DbrPDuU0EQ7JRkWzAlTT/IfNPbQB5gOjw6zFr+0L5S+3LcPM/p8XszNk4j3XQWt
# Bps3HDU13LDQpydRyZajY4iCQl6tzBDVXCoY+LUgrYjkP6OM5UpbakZgXJWNw9Nu
# Juu3kQ7imtLtMlKZQGSvhsy6gyUXjVlZxTZFspTQsMoOp/BDZdIwG+mKxk786hgr
# 32RxingXv6SWFYS+zrKsRJePtleLJr/RcySZFHNboJt9RIGf6W/IdROEjgZeYLce
# QDnlfi6AbwnP37nWmah5Iu2PeoZwDgr3jL81otdWlU8bc7G+gjwrnN/E77y3jJvH
# Auhj9YBNttQH6O8L4juMaD9+8/KtO47FfVfXojmPoicEB9NeWLChlUovVz47LC/U
# olsgxmuoDac=
# =JZmF
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 07 Aug 2022 10:01:15 PM 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-08' of https://gitlab.com/thuth/qemu:
tests/qemu-iotests/264: Allow up to 5s for the BLOCK_JOB_CANCEL event to arrive
tests/avocado: fix replay-linux test
pc-bios/s390-ccw: Update the s390-ccw.img with the block size fix
pc-bios/s390-ccw: Fix booting with logical block size < physical block size
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This test of -readconfig validates the last three regressions we
have fixed with -readconfig:
* Interpretation of memory size units as MiB not bytes
* Allow use of [spice]
* Allow use of [object]
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20220805115529.124544-2-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
mem_str will never be an empty string, because qemu_opt_get_size() fails
if it encounters one:
$ ./qemu-system-x86_64 -m size=
qemu-system-x86_64: -m size=: Parameter size expects a non-negative number below 2^64
Optional suffix k, M, G, T, P or E means kilo-, mega-, giga-, tera-, peta-
and exabytes, respectively.
Suggested-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
The -M memory.* options do not have magic applied to them like the -m
option, namely no "M" (for mebibytes) is tacked at the end of a suffixless
value for "-M memory.size".
This magic is performed by parse_memory_options, and we have to do it for
both "-m" and the [memory] section of a config file. Storing [memory]
sections directly to machine_opts_dict changed the meaning of
[memory]
size = "1024"
in a -readconfig file from 1024MiB to 8KiB (1024 Bytes rounded up to
8KiB silently). To avoid this, the [memory] section has to be changed
back to QemuOpts (combining [memory] and "-m" will work fine thanks to
.merge_lists being true).
Change parse_memory_options() so that, similar to the older function
set_memory_options(), it operates after command line parsing is done;
and also call it where set_memory_options() used to be.
Note, the parsing code uses exit(1) instead of exit(EXIT_FAILURE) to
match neighboring code.
Reported-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Fixes: ce9d03fb3f ("machine: add mem compound property", 2022-05-12)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
In xlnx_dp_aux_set_command, when the command leads to the default
branch, xlxn-dp will abort and then crash.
This patch removes this abort and drops this operation.
Fixes: 58ac482 ("introduce xlnx-dp")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/411
Reported-by: Qiang Liu <cyruscyliu@gmail.com>
Tested-by: Qiang Liu <cyruscyliu@gmail.com>
Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Qiang Liu <cyruscyliu@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Frederic Konrad <fkonrad@amd.com>
Message-Id: <20220808080116.2184881-1-cyruscyliu@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
We allocate VuVirtqElement with g_malloc() in
virtqueue_alloc_element(), but free it with free() in
vhost-user-blk.c. Harmless, but use g_free() anyway.
One of the calls is guarded by a "not null" condition. Useless,
because it cannot be null (it's dereferenced right before), and even
it it could be, free() and g_free() do the right thing. Drop the
conditional.
Fixes: Coverity CID 1490290
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20220630085219.1305519-1-armbru@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
It is possible to hit the assertTrue(delta_t < 2.0) on very loaded
systems. Increase the value to 5.0 to ease the situation a little bit.
Message-Id: <20220802123101.430757-1-thuth@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Last line of the test is missing by accident.
This patch fixes the script.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Message-Id: <165943656662.362178.2086588841425038338.stgit@pasha-ThinkPad-X280>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
For accessing single blocks during boot, it's the logical block size that
matters. (Physical block sizes are rather interesting e.g. for creating
file systems with the correct alignment for speed reasons etc.).
So the s390-ccw bios has to use the logical block size for calculating
sector numbers during the boot phase, the "physical_block_exp" shift
value must not be taken into account. This change fixes the boot process
when the guest hast been installed on a disk where the logical block size
differs from the physical one, e.g. if the guest has been installed
like this:
qemu-system-s390x -nographic -accel kvm -m 2G \
-drive if=none,id=d1,file=fedora.iso,format=raw,media=cdrom \
-device virtio-scsi -device scsi-cd,drive=d1 \
-drive if=none,id=d2,file=test.qcow2,format=qcow2
-device virtio-blk,drive=d2,physical_block_size=4096,logical_block_size=512
Linux correctly uses the logical block size of 512 for the installation,
but the s390-ccw bios tries to boot from a disk with 4096 block size so
far, as long as this patch has not been applied yet (well, it used to work
by accident in the past due to the virtio_assume_scsi() hack that used to
enforce 512 byte sectors on all virtio-block disks, but that hack has been
well removed in commit 5447de2619 to fix other scenarios).
Fixes: 5447de2619 ("pc-bios/s390-ccw/virtio-blkdev: Remove virtio_assume_scsi()")
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2112303
Message-Id: <20220805094214.285223-1-thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
* Display deprecation warnings in -cpu help
* Fix zerocopy IPv6 handling
* Clarify platform support policy on minor release/backports
* Fix closesocket call in error path
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE2vOm/bJrYpEtDo4/vobrtBUQT98FAmLtNQoACgkQvobrtBUQ
T9/vbQ//ab28uFWbUxnBjOsI57PEJLCL4iWCtJtMEkjWRT6W5hoMirktsThierSe
Yi1idrL0Z5lP6S1AZvuKYO9yTjzO+VzpmolXXRB6lRabQJ7eL/KNAAj2gO1X/ELh
UItcalI14ucrWUSd14PGjHAOgpI1RONDcgnY3/Yp9/ARz+0XEtH4CLk2NyAxCRn/
PHDA/BB0tKf0S6aC92vHOVLdLppA6lhheIKCyrM+QWZfp/PuIQLvjHdilB9dcbdC
JtZN5TWISvOPuAGBMkulAefKPMWhrdy2UYBIGvN3+s+l6y++neyrChagt0ky+8F3
dF0AZsqVRQfVwAKLhHpaNAImCbUt2jVWXHXzgrwVSNpdP1oDcFVVuu/strdcvyb6
UgZI10hkKWsaZXcjXJ0qMZ8bI5CLXAosRx4SA0U/SLGJs5jpEO9gK3cq5o+vtG+j
cJI7/B5OI3csuBVCXddgl6bkOYldSOcP6QEre7KJ+V07feDWDGa8qzwpRvh9h6Vb
YZ+eWWTOAbDbXpgwk8sNTGYHbKME6GSBMa2QF2rLFrIHnI9OoWFzn2O87wKSNt9M
9p7Xv2UF0hB6CQ2p0wjETbnkfbQR5C3ybanfWvqK/98w1AkwMkaK3pDDbX571hFN
EzZx1cdirpthzvGXyYRsM+V64T86t7J2jeCbbPpEzSmpglD9IKM=
=JTiu
-----END PGP SIGNATURE-----
Merge tag 'misc-next-pull-request' of https://gitlab.com/berrange/qemu into staging
Merge misc patches
* Display deprecation warnings in -cpu help
* Fix zerocopy IPv6 handling
* Clarify platform support policy on minor release/backports
* Fix closesocket call in error path
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE2vOm/bJrYpEtDo4/vobrtBUQT98FAmLtNQoACgkQvobrtBUQ
# T9/vbQ//ab28uFWbUxnBjOsI57PEJLCL4iWCtJtMEkjWRT6W5hoMirktsThierSe
# Yi1idrL0Z5lP6S1AZvuKYO9yTjzO+VzpmolXXRB6lRabQJ7eL/KNAAj2gO1X/ELh
# UItcalI14ucrWUSd14PGjHAOgpI1RONDcgnY3/Yp9/ARz+0XEtH4CLk2NyAxCRn/
# PHDA/BB0tKf0S6aC92vHOVLdLppA6lhheIKCyrM+QWZfp/PuIQLvjHdilB9dcbdC
# JtZN5TWISvOPuAGBMkulAefKPMWhrdy2UYBIGvN3+s+l6y++neyrChagt0ky+8F3
# dF0AZsqVRQfVwAKLhHpaNAImCbUt2jVWXHXzgrwVSNpdP1oDcFVVuu/strdcvyb6
# UgZI10hkKWsaZXcjXJ0qMZ8bI5CLXAosRx4SA0U/SLGJs5jpEO9gK3cq5o+vtG+j
# cJI7/B5OI3csuBVCXddgl6bkOYldSOcP6QEre7KJ+V07feDWDGa8qzwpRvh9h6Vb
# YZ+eWWTOAbDbXpgwk8sNTGYHbKME6GSBMa2QF2rLFrIHnI9OoWFzn2O87wKSNt9M
# 9p7Xv2UF0hB6CQ2p0wjETbnkfbQR5C3ybanfWvqK/98w1AkwMkaK3pDDbX571hFN
# EzZx1cdirpthzvGXyYRsM+V64T86t7J2jeCbbPpEzSmpglD9IKM=
# =JTiu
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 05 Aug 2022 08:19:38 AM PDT
# gpg: using RSA key DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF
# gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" [full]
# gpg: aka "Daniel P. Berrange <berrange@redhat.com>" [full]
* tag 'misc-next-pull-request' of https://gitlab.com/berrange/qemu:
util/qemu-sockets: Replace the call to close a socket with closesocket()
target/arm: display deprecation status in '-cpu help'
target/s390x: display deprecation status in '-cpu help'
target/i386: display deprecation status in '-cpu help'
QIOChannelSocket: Add support for MSG_ZEROCOPY + IPV6
docs: build-platforms: Clarify stance on minor releases and backports
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
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>
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>
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>
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>
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>
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>
close() is a *nix function. It works on any file descriptor, and
sockets in *nix are an example of a file descriptor.
closesocket() is a Windows-specific function, which works only
specifically with sockets. Sockets on Windows do not use *nix-style
file descriptors, and socket() returns a handle to a kernel object
instead, so it must be closed with closesocket().
In QEMU there is already a logic to handle such platform difference
in os-posix.h and os-win32.h, that:
* closesocket maps to close on POSIX
* closesocket maps to a wrapper that calls the real closesocket()
on Windows
Replace the call to close a socket with closesocket() instead.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
When the user queries CPU models via QMP there is a 'deprecated' flag
present, however, this is not done for the CLI '-cpu help' command.
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
When the user queries CPU models via QMP there is a 'deprecated' flag
present, however, this is not done for the CLI '-cpu help' command.
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
When the user queries CPU models via QMP there is a 'deprecated' flag
present, however, this is not done for the CLI '-cpu help' command.
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
For using MSG_ZEROCOPY, there are two steps:
1 - io_writev() the packet, which enqueues the packet for sending, and
2 - io_flush(), which gets confirmation that all packets got correctly sent
Currently, if MSG_ZEROCOPY is used to send packets over IPV6, no error will
be reported in (1), but it will fail in the first time (2) happens.
This happens because (2) currently checks for cmsg_level & cmsg_type
associated with IPV4 only, before reporting any error.
Add checks for cmsg_level & cmsg_type associated with IPV6, and thus enable
support for MSG_ZEROCOPY + IPV6
Fixes: 2bc58ffc29 ("QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX")
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
These changes match those made in the following libvirt commits:
2ac78307af docs: Clarify our stance on backported packages
78cffd450a docs: Spell out our policy concerning minor releases
Since QEMU's platform support policy is based on libvirt's, it
makes sense to mirror these recent changes made to the latter.
The policy is not altered significantly - we're simply spelling
out some rules that were likely already being implicitly
enforced.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
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-----
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>
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: 706e944206 ("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>
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>
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>
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>
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>
Delay generating the exception until after we know the
insn length, and record that length in env->error_code.
Fixes: 8ec7e3c53d ("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>
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>
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 1487136, 1487175
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>
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 1487239, 1487254
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>
This reverts commit cfd66f30fb.
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>
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>
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>
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>
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>
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>