David Hildenbrand [Thu, 19 Dec 2024 14:41:04 +0000 (15:41 +0100)]
s390x/s390-virtio-hcall: prepare for more diag500 hypercalls
Let's generalize, abstracting the virtio bits. diag500 is now a generic
hypercall to handle QEMU/KVM specific things. Explicitly specify all
already defined subcodes, including legacy ones (so we know what we can
use for new hypercalls).
Move the PGM_SPECIFICATION injection into the renamed function
handle_diag_500(), so we can turn it into a void function.
We'll rename the files separately, so git properly detects the rename.
Message-ID: <
20241219144115.
2820241-4-david@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
David Hildenbrand [Thu, 19 Dec 2024 14:41:03 +0000 (15:41 +0100)]
s390x/s390-virtio-hcall: remove hypercall registration mechanism
Nowadays, we only have a single machine type in QEMU, everything is based
on virtio-ccw and the traditional virtio machine does no longer exist. No
need to dynamically register diag500 handlers. Move the two existing
handlers into s390-virtio-hcall.c.
Message-ID: <
20241219144115.
2820241-3-david@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
David Hildenbrand [Thu, 19 Dec 2024 14:41:02 +0000 (15:41 +0100)]
s390x/s390-virtio-ccw: don't crash on weird RAM sizes
KVM is not happy when starting a VM with weird RAM sizes:
# qemu-system-s390x --enable-kvm --nographic -m 1234K
qemu-system-s390x: kvm_set_user_memory_region: KVM_SET_USER_MEMORY_REGION
failed, slot=0, start=0x0, size=0x244000: Invalid argument
kvm_set_phys_mem: error registering slot: Invalid argument
Aborted (core dumped)
Let's handle that in a better way by rejecting such weird RAM sizes
right from the start:
# qemu-system-s390x --enable-kvm --nographic -m 1234K
qemu-system-s390x: ram size must be multiples of 1 MiB
Message-ID: <
20241219144115.
2820241-2-david@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
David Hildenbrand [Fri, 25 Oct 2024 10:41:03 +0000 (12:41 +0200)]
virtio-mem: unplug memory only during system resets, not device resets
We recently converted from the LegacyReset to the new reset framework
in commit
c009a311e939 ("virtio-mem: Use new Resettable framework instead
of LegacyReset") to be able to use the ResetType to filter out wakeup
resets.
However, this change had an undesired implications: as we override the
Resettable interface methods in VirtIOMEMClass, the reset handler will
not only get called during system resets (i.e., qemu_devices_reset())
but also during any direct or indirect device rests (e.g.,
device_cold_reset()).
Further, we might now receive two reset callbacks during
qemu_devices_reset(), first when reset by a parent and later when reset
directly.
The memory state of virtio-mem devices is rather special: it's supposed to
be persistent/unchanged during most resets (similar to resetting a hard
disk will not destroy the data), unless actually cold-resetting the whole
system (different to a hard disk where a reboot will not destroy the data):
ripping out system RAM is something guest OSes don't particularly enjoy,
but we want to detect when rebooting to an OS that does not support
virtio-mem and wouldn't be able to detect+use the memory -- and we want
to force-defragment hotplugged memory to also shrink the usable device
memory region. So we rally want to catch system resets to do that.
On supported targets (e.g., x86), getting a cold reset on the
device/parent triggers is not that easy (but looks like PCI code
might trigger it), so this implication went unnoticed.
However, with upcoming s390x support it is problematic: during
kdump, s390x triggers a subsystem reset, ending up in
s390_machine_reset() and calling only subsystem_reset() instead of
qemu_devices_reset() -- because it's not a full system reset.
In subsystem_reset(), s390x performs a device_cold_reset() of any
TYPE_VIRTUAL_CSS_BRIDGE device, which ends up resetting all children,
including the virtio-mem device. Consequently, we wrongly detect a system
reset and unplug all device memory, resulting in hotplugged memory not
getting included in the crash dump -- undesired.
We really must not mess with hotplugged memory state during simple
device resets. To fix, create+register a new reset object that will only
get triggered during qemu_devices_reset() calls, but not during any other
resets as it is logically not the child of any other object.
Message-ID: <
20241025104103.342188-1-david@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Juraj Marcin <jmarcin@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Stefan Hajnoczi [Thu, 19 Dec 2024 20:46:43 +0000 (15:46 -0500)]
Merge tag 'pull-loongarch-
20241219' of https://gitlab.com/bibo-mao/qemu into staging
loongarch queue
# -----BEGIN PGP SIGNATURE-----
#
# iHUEABYKAB0WIQQNhkKjomWfgLCz0aQfewwSUazn0QUCZ2PKBQAKCRAfewwSUazn
# 0QAZAQCxbLnvzOb9TPORlg5w0n/xFaKCL7dJbJE4WjlM7dhLkAEA5G8JVoP5Ju2B
# mcK7wbymyXNX1ocsukL/JM2JavHS+AI=
# =JoSk
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 19 Dec 2024 02:23:49 EST
# gpg: using EDDSA key
0D8642A3A2659F80B0B3D1A41F7B0C1251ACE7D1
# gpg: Good signature from "bibo mao <maobibo@loongson.cn>" [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: 7044 3A00 19C0 E97A 31C7 13C4 8E86 8FB7 A176 9D4C
# Subkey fingerprint: 0D86 42A3 A265 9F80 B0B3 D1A4 1F7B 0C12 51AC E7D1
* tag 'pull-loongarch-
20241219' of https://gitlab.com/bibo-mao/qemu:
hw/intc/loongarch_extioi: Code cleanup about loongarch_extioi
hw/intc/loongarch_extioi: Add pre_save interface
hw/intc/loongarch_extioi: Inherit from loongarch_extioi_common
hw/intc/loongarch_extioi: Add common file loongarch_extioi_common
hw/intc/loongarch_extioi: Add unrealize interface
hw/intc/loongarch_extioi: Add common realize interface
hw/intc/loongarch_extioi: Rename LoongArchExtIOI with LoongArchExtIOICommonState
include: Rename LoongArchExtIOI with LoongArchExtIOICommonState
include: Move struct LoongArchExtIOI to header file loongarch_extioi_common
include: Add loongarch_extioi_common header file
hw/intc/loongarch_pch: Code cleanup about loongarch_pch_pic
hw/intc/loongarch_pch: Add pre_save and post_load interfaces
hw/intc/loongarch_pch: Inherit from loongarch_pic_common
hw/intc/loongarch_pch: Move some functions to file loongarch_pic_common
hw/intc/loongarch_pch: Rename LoongArchPCHPIC with LoongArchPICCommonState
hw/intc/loongarch_pch: Merge instance_init() into realize()
include: Move struct LoongArchPCHPIC to loongarch_pic_common header file
include: Add loongarch_pic_common header file
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Bibo Mao [Fri, 13 Dec 2024 07:34:48 +0000 (15:34 +0800)]
hw/intc/loongarch_extioi: Code cleanup about loongarch_extioi
Remove definition about LoongArchExtIOI and LOONGARCH_EXTIOI, and
replace them with LoongArchExtIOICommonState and macro
LOONGARCH_EXTIOI_COMMON separately. Also remove unnecessary header
files.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Fri, 8 Nov 2024 07:42:05 +0000 (15:42 +0800)]
hw/intc/loongarch_extioi: Add pre_save interface
Add vmstate pre_save interface, which can be used extioi kvm driver
in future.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Fri, 13 Dec 2024 07:32:39 +0000 (15:32 +0800)]
hw/intc/loongarch_extioi: Inherit from loongarch_extioi_common
Set TYPE_LOONGARCH_EXTIOI inherit from TYPE_LOONGARCH_EXTIOI_COMMON
object, it shares vmsate and property of TYPE_LOONGARCH_EXTIOI_COMMON,
and has its own realize() function.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Wed, 18 Dec 2024 09:28:04 +0000 (17:28 +0800)]
hw/intc/loongarch_extioi: Add common file loongarch_extioi_common
Add new common file loongarch_extioi_common.c, and move vmstate
and property structure to common file.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Fri, 20 Sep 2024 03:48:10 +0000 (11:48 +0800)]
hw/intc/loongarch_extioi: Add unrealize interface
For loongarch extioi emulation driver, add unrealize interface and
remove instance_finalize interface and move the code to unrealize
interface.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Fri, 20 Sep 2024 07:49:12 +0000 (15:49 +0800)]
hw/intc/loongarch_extioi: Add common realize interface
Add common realize function, it is only to check validity of property.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Wed, 18 Dec 2024 09:24:24 +0000 (17:24 +0800)]
hw/intc/loongarch_extioi: Rename LoongArchExtIOI with LoongArchExtIOICommonState
With some structure such as vmstate and property, rename LoongArchExtIOI
with LoongArchExtIOICommonState, these common structure will be moved
to common file.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Fri, 20 Sep 2024 02:17:06 +0000 (10:17 +0800)]
include: Rename LoongArchExtIOI with LoongArchExtIOICommonState
Rename structure LoongArchExtIOI with LoongArchExtIOICommonState,
since it is defined in file loongarch_extioi_common.h
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Fri, 20 Sep 2024 02:08:56 +0000 (10:08 +0800)]
include: Move struct LoongArchExtIOI to header file loongarch_extioi_common
Move definiton of structure LoongArchExtIOI from header file loongarch_extioi.h
to file loongarch_extioi_common.h.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Fri, 20 Sep 2024 02:01:07 +0000 (10:01 +0800)]
include: Add loongarch_extioi_common header file
Add common header file include/hw/intc/loongarch_extioi_common.h, and
move some macro definition from include/hw/intc/loongarch_extioi.h to
the common header file.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Wed, 18 Sep 2024 04:05:00 +0000 (12:05 +0800)]
hw/intc/loongarch_pch: Code cleanup about loongarch_pch_pic
Remove definition about LoongArchPCHPIC and LOONGARCH_PCH_PIC, and
replace them with LoongArchPICCommonState and LOONGARCH_PIC_COMMON
separately. Also remove unnecessary header files.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Wed, 18 Sep 2024 03:50:49 +0000 (11:50 +0800)]
hw/intc/loongarch_pch: Add pre_save and post_load interfaces
Add vmstate pre_save and post_load interfaces, which can be used
by pic kvm driver in future.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Wed, 18 Sep 2024 06:45:50 +0000 (14:45 +0800)]
hw/intc/loongarch_pch: Inherit from loongarch_pic_common
Set TYPE_LOONGARCH_PIC inherit from TYPE_LOONGARCH_PIC_COMMON object,
it shares vmsate and property of TYPE_LOONGARCH_PIC_COMMON, and has
its own realize() function.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Wed, 18 Dec 2024 09:18:56 +0000 (17:18 +0800)]
hw/intc/loongarch_pch: Move some functions to file loongarch_pic_common
Move some common functions to file loongarch_pic_common.c, the common
functions include loongarch_pic_common_realize(), property structure
loongarch_pic_common_properties and vmstate structure
vmstate_loongarch_pic_common.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Wed, 18 Dec 2024 09:10:14 +0000 (17:10 +0800)]
hw/intc/loongarch_pch: Rename LoongArchPCHPIC with LoongArchPICCommonState
With pic vmstate, rename structure name vmstate_loongarch_pch_pic with
vmstate_loongarch_pic_common, and with pic property rename
loongarch_pch_pic_properties with loongarch_pic_common_properties.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Wed, 18 Sep 2024 02:16:28 +0000 (10:16 +0800)]
hw/intc/loongarch_pch: Merge instance_init() into realize()
Memory region is created in instance_init(), merge it into function
realize(). There is no special class_init() for loongarch_pch object.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Wed, 18 Sep 2024 06:43:10 +0000 (14:43 +0800)]
include: Move struct LoongArchPCHPIC to loongarch_pic_common header file
Move structure LoongArchPCHPIC from header file loongarch_pch_pic.h
to file loongarch_pic_common.h, and rename structure name with
LoongArchPICCommonState.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Bibo Mao [Sat, 14 Sep 2024 09:34:06 +0000 (17:34 +0800)]
include: Add loongarch_pic_common header file
Add common header file hw/intc/loongarch_pic_common.h, and move
some macro definition from hw/intc/loongarch_pch_pic.h to the common
header file.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Song Gao <gaosong@loongson.cn>
Stefan Hajnoczi [Thu, 19 Dec 2024 01:24:59 +0000 (20:24 -0500)]
Merge tag 'qga-pull-2024-12-18' of https://github.com/kostyanf14/qemu into staging
qga-pull-2024-12-18
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEwsLBCepDxjwUI+uE711egWG6hOcFAmdit4wACgkQ711egWG6
# hOfQ0xAAjByk0U6cTjIOTgNb3GDEE65CnL/dqiriOtmTPdbmVT4WqkQjPNG8REge
# lA0eDr7oBLWn/Yku7nqMjn4IcnBop92h9jL3RpQNeIbvPdQcpaPEORCCulky58l0
# 0hM/SnhBmRomZ2CwWu4mvl4bKRzn7WCg7mdPbBZEtvAfNdiUGOH5nwdUoJKtcPTj
# OeEOTxcN+FeYNyMRqCUJ4S44OAIh7WMbi4h/0gxufU8KFGYbQphk4xITIBFXBfIf
# oRxqwSMTLXG7nzegfad4HGX2pFUR6Omtmlgn3Cvh8UF8xEJIJIk1mA6Wd2R2am9j
# pdyKwo25K6FSkSvH43cH/IXTaQVvfCLIOOUA7rlAhfWrDsvRuisfh75T9jMOYH5S
# /jB9Vjd8E85qpTwQD2HuphJMzFRpWEeOeMJ2jWHWuMj+d3lHrR3hAmpGFBy7Xmxb
# KyVkUBgaulqoPQqt7C1urNxHjr6FoWDU1AqIAYQdqOJ5TLh/j5o6oz2ZJDOT+RiG
# NZLhTJWtjwA3Rbu1BcF2eyYv20cqeHVAFhS5tJdXOoHyqoJ7Hf+4G56zhXgjxfV9
# 60W3ETQwUPrrUtmb+qDZzmEagSQjj3UpMGEQFWXHKx4zBBXYeYU9O0Xvy04RGh+L
# PV4Y35yPegQ69GbRYUAagXk8Rh3Gbh2l4iFQz+QYCvd1b2CxYFg=
# =nY8c
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 18 Dec 2024 06:52:44 EST
# gpg: using RSA key
C2C2C109EA43C63C1423EB84EF5D5E8161BA84E7
# gpg: Good signature from "Kostiantyn Kostiuk (Upstream PR sign) <kkostiuk@redhat.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: C2C2 C109 EA43 C63C 1423 EB84 EF5D 5E81 61BA 84E7
* tag 'qga-pull-2024-12-18' of https://github.com/kostyanf14/qemu:
qga: Don't access global variable in run_agent_once()
qemu-ga-win: Fix a typo error
qga: skip bind mounts in fs list
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Stefan Hajnoczi [Thu, 19 Dec 2024 01:24:51 +0000 (20:24 -0500)]
Merge tag 'pull-request-2024-12-18' of https://gitlab.com/thuth/qemu into staging
* Lots of functional test improvements (clean-ups, don't fail on
temporary download errors, etc.)
* Convert some more avocado tests to the functional framework
* Disallow building with libnfs v6 due to an API breakage
# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmdirOIRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbU0NRAAke8X0B6OOD+99lY5nc7Hrh7N1m+sw5Lw
# TVwIpxdhxU11vgdlCodfdoVJCV1NGVHwkR57lLNr+bdspWDBBwlmUWn0+t2QCXGe
# oyQsV+boznsjG9pan6v6DcU/gOu7/7ZydhJi+M8Msf8ah0lcn/otAdC4ZFB93JLh
# 6xPnj69y8HomCW+wMyXl7WTjcWX0wQFzweEYY8p7X7p1rtjYyseiZlRjNAvPgTMI
# jznZ6v9/qU54xR9RnKdW+0m1Qu06nx26Wz+ZBlvrJS1Llloe23X9+LY1tDD0Xh1D
# 9P0v9PuaBWRRF+UjVjl37LMyn9h1aaKFKBoWQiKMbyvOVr4ncobjRgN8r5kdNxDP
# FZ/fA1GiX8O3foN9uB9JLKd6Hl49LAqQSPzAneEc3pfQLH3NdAjPxJDbJH5fyMa7
# qVOQC0Bdy8+2kCxFfKbemrwDOFcyq1fVYcADPDZySjMiPnwFJ1Qpni1tXY1PZ+Tl
# Q18AsFJanyAAn7L+8R3Yl54983SuR5eXIFxO+Tq9mw1V1V2h+Cm09HGcS8y5bxFG
# Xh+jhMsMB98NFLR87W6olwl57gKllSbTYuGtiz9TrbnuT/THhUJ0k/B76L7C9HWE
# ZefkFxC5Zy8jrcz3pgarO+19V+eXg5rwGtEngRQrji/3cY5CbK7Jeh5nvZQeASpb
# nZ/gJ/gC8Gs=
# =SWw6
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 18 Dec 2024 06:07:14 EST
# gpg: using RSA key
27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg: issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg: aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5
* tag 'pull-request-2024-12-18' of https://gitlab.com/thuth/qemu: (38 commits)
meson.build: Disallow libnfs v6 to fix the broken macOS build
tests/functional: Convert the hotplug_cpu avocado test
tests/functional: Convert the intel_iommu avocado test
tests/functional: Add a helper function for retrieving the hostfwd port
tests/functional: Convert the arm virt avocado test
tests/functional: Convert the quanta-gsj avocado test
MAINTAINERS: add myself as reviewer for functional test suite
tests/functional: ignore errors when caching assets, except for 404
tests/functional: skip tests if assets are not available
tests/functional: remove now unused 'run_cmd' helper
tests/functional: replace 'run_cmd' with subprocess helpers
tests/functional: drop back compat imports from utils.py
tests/functional: convert tests to new uncompress helper
tests/functional: add 'uncompress' to QemuBaseTest
tests/functional: add a generalized uncompress helper
tests/functional: convert tests to new archive_extract helper
tests/functional: add 'archive_extract' to QemuBaseTest
tests/functional: add a generalized archive_extract
tests/functional: let cpio_extract accept filenames
tests/functional: add common deb_extract helper
...
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Stefan Hajnoczi [Wed, 18 Dec 2024 19:21:21 +0000 (14:21 -0500)]
Merge tag 'pull-target-arm-
20241217' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
target-arm queue:
* remove a line of redundant code
* convert various TCG helper fns to use 'fpst' alias
* Use float_status in helper_fcvtx_f64_to_f32
* Use float_status in helper_vfp_fcvt{ds,sd}
* Implement FEAT_XS
* hw/intc/arm_gicv3_its: Zero initialize local DTEntry etc structs
* tests/functional: update sbsa-ref firmware used in test
# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmdhsj0ZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3vldEACY/BJeDSfE3X6fi2qiVF+p
# hs2NaeiM6HS3+/1oPlPz7sW87cGV58hPW0vOCjZYlfw+Afv2wuL9zb2C7IV+PJOn
# Vy1L/tBezYvgBwi1+bRvLpCge3UKdbRNa6aowGmLnvcnQuZ6lOOcmQ8Jq/a5W1TM
# xOrvPYp0FbcfGXLcDLIluCozupsq4aJsh0gWayzr9zm2tWnzMAhb/GQLuCmLLn35
# pUiAI209xU393AOfdCpAmCGjDCqcqbjHpz0AqrIPtOwaDO3hRlJIMw1eGk2dS0BD
# R0vZG+WFSQMV972reVoTT83W7NmIeeqhZgeKDv2R347EHsbCKt5PIUpWX2zYvk+H
# rfCltOxFVWvJ0e33b9opk2/GfgckkTGw+6ZYMIdMm8UxABrdEaHcWCV0qMyLk2JH
# 4EKYlmKeR8yqkPRDbGkRVANEIDxRBmL96kN6il0wSM742y7UMwMzP3C344Jg0tf/
# AhGrwjsuRW8oeEZMgk9Z0i/J6q3CNxRQSVGGQtYsEt8fs5OXLltLrXEX+aZNF5ua
# ry5SfLWlwIR+0AO4oNaJqJYNQArqhzDUgsY4ryzrueZnaaMShobMn0AP2H3+/l4X
# W3wlIqOQ97ivk0Snc9WpDQyhPPOZuj4LN4IkTkodHu7+eoMrkvojf/BVc5kku2VL
# dE224ctbEbKsbydwubSVfQ==
# =Z/7q
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 17 Dec 2024 12:17:49 EST
# 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]
# gpg: aka "Peter Maydell <peter@archaic.org.uk>" [unknown]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* tag 'pull-target-arm-
20241217' of https://git.linaro.org/people/pmaydell/qemu-arm:
tests/functional: update sbsa-ref firmware used in test
hw/intc/arm_gicv3_its: Zero initialize local DTEntry etc structs
tests/tcg/aarch64: add system test for FEAT_XS
target/arm: Enable FEAT_XS for the max cpu
target/arm: Add decodetree entry for DSB nXS variant
target/arm: Add ARM_CP_ADD_TLBI_NXS type flag to TLBI insns
target/arm: Add ARM_CP_ADD_TLBI_NXS type flag for NXS insns
target/arm: Implement fine-grained-trap handling for FEAT_XS
target/arm: Use float_status in helper_vfp_fcvt{ds,sd}
target/arm: Use float_status in helper_fcvtx_f64_to_f32
target/arm: Convert neon_helper.c to use env alias
target/arm: Convert vec_helper.c to use env alias
target/arm: Convert sme_helper.c to fpst alias
target/arm: Convert sve_helper.c to fpst alias
target/arm: Convert neon_helper.c to fpst alias
target/arm: Convert vec_helper.c to fpst alias
target/arm: Convert helper-a64.c to fpst alias
target/arm: Convert vfp_helper.c to fpst alias
target/arm: remove redundant code
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Michal Privoznik [Thu, 5 Dec 2024 16:18:45 +0000 (17:18 +0100)]
qga: Don't access global variable in run_agent_once()
The run_agent_once() function is already given GAState via an
argument. There's no need to access the global ga_state variable
which points to the argument anyways (thanks to
initialize_agent()). Worse, some parts of the function use the
argument and the other use the global variable. Stick with the
function argument.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Link: https://lore.kernel.org/r/8ae7f5d5032b14a5b956fe8aaf47bae5ca401699.1733414906.git.mprivozn@redhat.com
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Dehan Meng [Tue, 10 Dec 2024 05:46:16 +0000 (13:46 +0800)]
qemu-ga-win: Fix a typo error
There is a typo error for api 'guest-get-osinfo',
the win2025's version in WIN_10_0_SERVER_VERSION_MATRIX
should be adjusted.
Signed-off-by: Dehan Meng <demeng@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Link: https://lore.kernel.org/r/20241210054616.260386-1-demeng@redhat.com
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Jean-Louis Dupond [Wed, 2 Oct 2024 10:06:35 +0000 (12:06 +0200)]
qga: skip bind mounts in fs list
The filesystem list in build_fs_mount_list should skip bind mounts.
This because we end up in locking situations when doing fsFreeze. Like
mentioned in [1] and [2].
Next to that, the build_fs_mount_list call did a fallback via
build_fs_mount_list_from_mtab if mountinfo did not exist.
There it skipped bind mounts, but this is broken for newer OS.
This as mounts does not return the path of the bind mount but the
underlying dev/partition, so S_ISDIR will never return true in
dev_major_minor call.
This patch simply checks the existing devmajor:devminor tuple in the
mounts, and if it already exists, this means we have the same devices
mounted again, a bind mount. So skip this.
Same approach is used in open-vm-tools [3].
[1]: https://gitlab.com/qemu-project/qemu/-/issues/592
[2]: https://gitlab.com/qemu-project/qemu/-/issues/520
[3]: https://github.com/vmware/open-vm-tools/commit/
d58847b497e212737007958c945af1df22a8ab58
Signed-off-by: Jean-Louis Dupond <jean-louis@dupond.be>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Link: https://lore.kernel.org/r/20241002100634.162499-2-jean-louis@dupond.be
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Thomas Huth [Wed, 18 Dec 2024 06:21:59 +0000 (07:21 +0100)]
meson.build: Disallow libnfs v6 to fix the broken macOS build
The macOS builds in our CI (and possibly other very recent distros)
are currently broken since the update to libnfs version 6 there.
That version apparently comes with a big API breakage. v5.0.3 was
the final release of the old API (see the libnfs commit here:
https://github.com/sahlberg/libnfs/commit/
4379837 ).
Disallow version 6.x for now to get the broken CI job working
again. Once somebody had enough time to adapt our code in
block/nfs.c, we can revert this change again.
Message-ID: <
20241218065157.209020-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Thomas Huth [Tue, 17 Dec 2024 13:52:45 +0000 (14:52 +0100)]
tests/functional: Convert the hotplug_cpu avocado test
Since we don't have ssh support in the functional test framework yet,
simply use the serial console for this test instead. It's also
sufficient to only boot into an initrd here, no need to fire up a
full-blown guest, so the test now finishes much faster.
While we're at it, also unplug the CPU now and check that it is gone
in the guest.
Message-ID: <
20241217142020.155776-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Thomas Huth [Fri, 6 Dec 2024 18:02:24 +0000 (19:02 +0100)]
tests/functional: Convert the intel_iommu avocado test
Convert the intel_iommu test to the new functional framework.
This test needs some changes since we neither support the old 'LinuxTest'
class in the functional framework yet, nor a way to use SSH for running
commands in the guest. So we now directly download a Fedora kernel and
initrd and set up the serial console for executing the commands and for
looking for the results. Instead of configuring the cloud image via
cloud-init, we now simply mount the file system manually from an initrd
rescue shell.
While the old test was exercising the network with a "dnf install"
command (which is not the best option for the CI since this depends
on third party servers), the new code is now setting up a little
HTTP server in the guest and transfers a file from the guest to the
host instead.
The test should now run much faster and more reliable (since we
don't depend on the third party servers for "dnf install" anymore),
so we can also drop the @skipUnless decorator now.
Message-ID: <
20241217121550.141072-3-thuth@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Thomas Huth [Fri, 13 Dec 2024 16:02:59 +0000 (17:02 +0100)]
tests/functional: Add a helper function for retrieving the hostfwd port
It's just a wrapper around get_info_usernet_hostfwd_port from the
qemu module that is also calling the right monitor command for
retrieving the information from QEMU.
Message-ID: <
20241217121550.141072-2-thuth@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Thomas Huth [Thu, 5 Dec 2024 16:28:07 +0000 (17:28 +0100)]
tests/functional: Convert the arm virt avocado test
Straight forward conversion, basically just the hashsums needed
to be updated to sha256 now.
Message-ID: <
20241206102358.
1186644-7-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Thomas Huth [Wed, 4 Dec 2024 14:21:36 +0000 (15:21 +0100)]
tests/functional: Convert the quanta-gsj avocado test
Straight forward conversion, basically just the hashsums needed
to be updated to sha256 now.
Message-ID: <
20241206102358.
1186644-6-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:53 +0000 (15:59 +0000)]
MAINTAINERS: add myself as reviewer for functional test suite
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-33-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:52 +0000 (15:59 +0000)]
tests/functional: ignore errors when caching assets, except for 404
We see periodic errors caching assets due to a combination of transient
networking and server problems. With the previous patch to skip running
a test when it has missing assets, we can now treat most cache download
errors as non-fatal.
Only HTTP 404 is retained as fatal, since it is a strong indicator of
a fully broken test rather than a transient error.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-32-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:51 +0000 (15:59 +0000)]
tests/functional: skip tests if assets are not available
If downloading of assets has been disabled, then skip running a
test if the assets it has registered are not already downloaded.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-31-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:50 +0000 (15:59 +0000)]
tests/functional: remove now unused 'run_cmd' helper
All usage has been replaced by direct 'subprocess' helpers.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-30-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:49 +0000 (15:59 +0000)]
tests/functional: replace 'run_cmd' with subprocess helpers
The 'run_cmd' helper is re-implementing a convenient helper that
already exists in the form of the 'run' and 'check_call' methods
provided by 'subprocess'.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-29-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:48 +0000 (15:59 +0000)]
tests/functional: drop back compat imports from utils.py
Now that all tests are converted over to the higher level wrapper
functions, the back compat imports from utils.py are redundant.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-28-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:47 +0000 (15:59 +0000)]
tests/functional: convert tests to new uncompress helper
Replace use of lzma_uncompress and gzip_uncompress with the
new uncompress helper.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-27-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:46 +0000 (15:59 +0000)]
tests/functional: add 'uncompress' to QemuBaseTest
This helper wrappers utils.uncompress, forcing the use of the scratch
directory, to ensure any uncompressed files are cleaned at test
termination.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-26-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:45 +0000 (15:59 +0000)]
tests/functional: add a generalized uncompress helper
There are many types of compression that the tests deal with, and
it makes sense to have a single helper 'uncompress' that can deal
with all.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-25-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:44 +0000 (15:59 +0000)]
tests/functional: convert tests to new archive_extract helper
Replace use of utils.archive_extract and extract_from_deb with the
new archive_extract helper.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-24-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:43 +0000 (15:59 +0000)]
tests/functional: add 'archive_extract' to QemuBaseTest
This helper wrappers archive.archive_extract, forcing the use of the
scratch directory, to ensure any extracted files are cleaned at test
termination. If a specific member is requested, then the path to the
extracted file is also returned.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-23-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:42 +0000 (15:59 +0000)]
tests/functional: add a generalized archive_extract
There are many types of archives that the tests deal with. Provide
a generalized 'archive_extract' that can detect the format and
delegate to the appropriate helper for extraction. This ensures
that all archive extraction code follows the same design pattern.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-22-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:41 +0000 (15:59 +0000)]
tests/functional: let cpio_extract accept filenames
Currently cpio_extract differs from tar_extract/zip_extract
in that it only allows a file-like object as input. Adapt it
to also support filenames.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-21-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:40 +0000 (15:59 +0000)]
tests/functional: add common deb_extract helper
This mirrors the existing archive_extract, cpio_extract and zip_extract
helpers
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-20-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:39 +0000 (15:59 +0000)]
tests/functional: add common zip_extract helper
This mirrors the existing archive_extract and cpio_extract helpers
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-19-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:38 +0000 (15:59 +0000)]
tests/functional: move uncompress handling into new uncompress.py file
More uncompress related code will be added shortly, so having a
separate file makes more sense.
The utils.py imports the functions from archive.py, so that
existing callers don't need to be modified. This avoids
redundant code churn until later in the series when all
calls will be adapted for other reasons.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-18-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:37 +0000 (15:59 +0000)]
tests/functional: move archive handling into new archive.py file
More archive related code will be added shortly, so having a
separate file makes more sense.
The utils.py imports the functions from archive.py, so that
existing callers don't need to be modified. This avoids
redundant code churn until later in the series when all
calls will be adapted for other reasons.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-17-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:36 +0000 (15:59 +0000)]
tests/functional: remove redundant 'rmtree' call
Everything in the scratch directory is automatically purged. Calling
'rmtree' again breaks the ability to optionally preserve the scratch
directory contents.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-16-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:35 +0000 (15:59 +0000)]
tests/functional: switch over to using self.scratch_file()
Replace any instances of
os.path.join(self.workdir, ".../...")
self.workdir + "/.../..."
with
self.scratch_file("...", "...")
which is more compact and portable
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-15-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:34 +0000 (15:59 +0000)]
tests/functional: switch over to using self.data_file(...)
This removes direct path manipulation to figure out the source dir
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-14-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:33 +0000 (15:59 +0000)]
tests/functional: switch over to using self.build_file(...)
This removes direct access of the 'BUILD_DIR' variable.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-13-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:32 +0000 (15:59 +0000)]
tests/functional: switch over to using self.log_file(...)
This removes direct access of the 'self.logdir' variable.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-12-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:31 +0000 (15:59 +0000)]
tests/functional: add helpers for building file paths
Add helper methods that construct paths for
* log files - to be preserved at the end of a test
* scratch files - to be purged at the end of a test
* build files - anything relative to the build root
* data files - anything relative to the functional test source root
* socket files - a short temporary dir to avoid UNIX socket limits
These are to be used instead of direct access to the self.workdir,
or self.logdir variables, or any other place where paths are built
manually.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-11-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:30 +0000 (15:59 +0000)]
tests/functional: drop 'has_cmd' and 'has_cmds' helpers
The 'which' helper is simpler, not depending on the external 'which'
binary, and is sufficient for test needs.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-10-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:29 +0000 (15:59 +0000)]
tests/functional: switch to new test skip decorators
This ensures consistency of behaviour across all the tests, and requires
that we provide gitlab bug links when marking a test to be skipped due
to unreliability.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-9-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:28 +0000 (15:59 +0000)]
tests/functional: introduce some helpful decorators
Reduce repeated boilerplate with some helper decorators:
@skipIfNotPlatform("x86_64", "aarch64")
=> Skip unless the build host platform matches
@skipIfMissingCommands("mkisofs", "losetup")
=> Skips unless all listed commands are found in $PATH
@skipIfMissingImports("numpy", "cv2")
=> Skips unless all listed modules can be imported
@skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/NNN")
=> Skips unless env var requests flaky tests with the
reason documented in the referenced gitlab bug
@skipBigData
=> Skips unless env var permits tests creating big data files
@skipUntrustedTest
=> Skips unless env var permits tests which are potentially
dangerous to the host
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-8-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:27 +0000 (15:59 +0000)]
tests/functional: drop 'tesseract_available' helper
Platforms we target have new enough tesseract that it suffices to merely
check if the binary exists.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <
20241217155953.
3950506-7-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:26 +0000 (15:59 +0000)]
tests/functional: simplify 'which' implementation
The 'access' check implies the file exists.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-6-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:25 +0000 (15:59 +0000)]
tests/functional: remove duplicated 'which' function impl
Put the 'which' function into shared code.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-5-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:24 +0000 (15:59 +0000)]
tests/functional: resolve str(Asset) to cache file path
Allow an Asset object to be used in place of a filename but
making its string representation resolve to the cache file
path.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <
20241217155953.
3950506-4-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:23 +0000 (15:59 +0000)]
tests/functional: remove many unused imports
Identified using 'pylint --disable=all --enable=W0611'
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <
20241217155953.
3950506-3-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Daniel P. Berrangé [Tue, 17 Dec 2024 15:59:22 +0000 (15:59 +0000)]
tests/functional: add execute permission to aspeed tests
Tests are expected to be directly invoked when debugging so must
have execute permission.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <
20241217155953.
3950506-2-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Marcin Juszkiewicz [Mon, 25 Nov 2024 12:54:48 +0000 (13:54 +0100)]
tests/functional: update sbsa-ref firmware used in test
Update the URLs for the binaries we use for the firmware in the
sbsa-ref functional tests.
The firmware is built using Debian 'bookworm' cross toolchain (gcc
12.2.0).
Used versions:
- Trusted Firmware v2.12.0
- Tianocore EDK2 stable202411
- Tianocore EDK2 Platforms code commit
4b3530d
This allows us to move away from "some git commit on trunk"
to a stable release for both TF-A and EDK2.
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Message-id:
20241125125448.185504-1-marcin.juszkiewicz@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Fri, 13 Dec 2024 18:23:37 +0000 (18:23 +0000)]
hw/intc/arm_gicv3_its: Zero initialize local DTEntry etc structs
In the GICv3 ITS model, we have a common coding pattern which has a
local C struct like "DTEntry dte", which is a C representation of an
in-guest-memory data structure, and we call a function such as
get_dte() to read guest memory and fill in the C struct. These
functions to read in the struct sometimes have cases where they will
leave early and not fill in the whole struct (for instance get_dte()
will set "dte->valid = false" and nothing else for the case where it
is passed an entry_addr implying that there is no L2 table entry for
the DTE). This then causes potential use of uninitialized memory
later, for instance when we call a trace event which prints all the
fields of the struct. Sufficiently advanced compilers may produce
-Wmaybe-uninitialized warnings about this, especially if LTO is
enabled.
Rather than trying to carefully separate out these trace events into
"only the 'valid' field is initialized" and "all fields can be
printed", zero-init all the structs when we define them. None of
these structs are large (the biggest is 24 bytes) and having
consistent behaviour is less likely to be buggy.
Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2718
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20241213182337.
3343068-1-peter.maydell@linaro.org
Manos Pitsidianakis [Wed, 11 Dec 2024 14:44:40 +0000 (14:44 +0000)]
tests/tcg/aarch64: add system test for FEAT_XS
Add system test to make sure FEAT_XS is enabled for max cpu emulation
and that QEMU doesn't crash when encountering an NXS instruction
variant.
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id:
20241211144440.
2700268-7-peter.maydell@linaro.org
[PMM: In ISAR field test, mask with 0xf, not 0xff; use < rather
than an equality test to follow the standard ID register field
check guidelines]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Manos Pitsidianakis [Wed, 11 Dec 2024 14:44:39 +0000 (14:44 +0000)]
target/arm: Enable FEAT_XS for the max cpu
Add FEAT_XS feature report value in max cpu's ID_AA64ISAR1 sys register.
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20241211144440.
2700268-6-peter.maydell@linaro.org
[PMM: Add entry for FEAT_XS to documentation]
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Manos Pitsidianakis [Wed, 11 Dec 2024 14:44:38 +0000 (14:44 +0000)]
target/arm: Add decodetree entry for DSB nXS variant
The DSB nXS variant is always both a reads and writes request type.
Ignore the domain field like we do in plain DSB and perform a full
system barrier operation.
The DSB nXS variant is part of FEAT_XS made mandatory from Armv8.7.
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20241211144440.
2700268-5-peter.maydell@linaro.org
[PMM: added missing "UNDEF unless feature present" check]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Peter Maydell [Wed, 11 Dec 2024 14:44:37 +0000 (14:44 +0000)]
target/arm: Add ARM_CP_ADD_TLBI_NXS type flag to TLBI insns
Add the ARM_CP_ADD_TLBI_NXS to the TLBI insns with an NXS variant.
This is every AArch64 TLBI encoding except for the four FEAT_RME TLBI
insns.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20241211144440.
2700268-4-peter.maydell@linaro.org
Peter Maydell [Wed, 11 Dec 2024 14:44:36 +0000 (14:44 +0000)]
target/arm: Add ARM_CP_ADD_TLBI_NXS type flag for NXS insns
All of the TLBI insns with an NXS variant put that variant at the
same encoding but with a CRn field that is one greater than for the
original TLBI insn. To avoid having to define every TLBI insn
effectively twice, once in the normal way and once in a set of cpreg
arrays that are only registered when FEAT_XS is present, we define a
new ARM_CP_ADD_TLB_NXS type flag for cpregs. When this flag is set
in a cpreg struct and FEAT_XS is present,
define_one_arm_cp_reg_with_opaque() will automatically add a second
cpreg to the hash table for the TLBI NXS insn with:
* the crn+1 encoding
* an FGT field that indicates that it should honour HCR_EL2.FGTnXS
* a name with the "NXS" suffix
(If there are future TLBI NXS insns that don't use this same
encoding convention, it is also possible to define them manually.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20241211144440.
2700268-3-peter.maydell@linaro.org
Peter Maydell [Wed, 11 Dec 2024 14:44:35 +0000 (14:44 +0000)]
target/arm: Implement fine-grained-trap handling for FEAT_XS
FEAT_XS introduces a set of new TLBI maintenance instructions with an
"nXS" qualifier. These behave like the stardard ones except that
they do not wait for memory accesses with the XS attribute to
complete. They have an interaction with the fine-grained-trap
handling: the FGT bits that a hypervisor can use to trap TLBI
maintenance instructions normally trap also the nXS variants, but the
hypervisor can elect to not trap the nXS variants by setting
HCRX_EL2.FGTnXS to 1.
Add support to our FGT mechanism for these TLBI bits. For each
TLBI-trapping FGT bit we define, for example:
* FGT_TLBIVAE1 -- the same value we do at present for the
normal variant of the insn
* FGT_TLBIVAE1NXS -- for the nXS qualified insn; the value of
this enum has an NXS bit ORed into it
In access_check_cp_reg() we can then ignore the trap bit for an
access where ri->fgt has the NXS bit set and HCRX_EL2.FGTnXS is 1.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20241211144440.
2700268-2-peter.maydell@linaro.org
Richard Henderson [Tue, 17 Dec 2024 15:05:42 +0000 (15:05 +0000)]
target/arm: Use float_status in helper_vfp_fcvt{ds,sd}
Pass float_status not env to match other functions.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20241206031952.78776-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Richard Henderson [Tue, 17 Dec 2024 15:05:42 +0000 (15:05 +0000)]
target/arm: Use float_status in helper_fcvtx_f64_to_f32
Pass float_status not env to match other functions.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20241206031952.78776-2-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Richard Henderson [Tue, 17 Dec 2024 15:05:41 +0000 (15:05 +0000)]
target/arm: Convert neon_helper.c to use env alias
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20241206031224.78525-10-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Richard Henderson [Tue, 17 Dec 2024 15:05:41 +0000 (15:05 +0000)]
target/arm: Convert vec_helper.c to use env alias
Allow the helpers to receive CPUARMState* directly
instead of via void*.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20241206031224.78525-9-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Richard Henderson [Tue, 17 Dec 2024 15:05:41 +0000 (15:05 +0000)]
target/arm: Convert sme_helper.c to fpst alias
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id:
20241206031224.78525-8-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Richard Henderson [Tue, 17 Dec 2024 15:05:41 +0000 (15:05 +0000)]
target/arm: Convert sve_helper.c to fpst alias
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20241206031224.78525-7-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Richard Henderson [Tue, 17 Dec 2024 15:05:40 +0000 (15:05 +0000)]
target/arm: Convert neon_helper.c to fpst alias
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20241206031224.78525-6-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Richard Henderson [Tue, 17 Dec 2024 15:05:40 +0000 (15:05 +0000)]
target/arm: Convert vec_helper.c to fpst alias
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20241206031224.78525-5-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Richard Henderson [Tue, 17 Dec 2024 15:05:40 +0000 (15:05 +0000)]
target/arm: Convert helper-a64.c to fpst alias
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20241206031224.78525-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Richard Henderson [Tue, 17 Dec 2024 15:05:39 +0000 (15:05 +0000)]
target/arm: Convert vfp_helper.c to fpst alias
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20241206031224.78525-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Denis Rastyogin [Tue, 17 Dec 2024 15:05:39 +0000 (15:05 +0000)]
target/arm: remove redundant code
This call is redundant as it only retrieves a value that is not used further.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Denis Rastyogin <gerben@altlinux.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id:
20241212120618.518369-1-gerben@altlinux.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Stefan Hajnoczi [Mon, 16 Dec 2024 19:20:33 +0000 (14:20 -0500)]
Merge tag 'firmware-
20241216-pull-request' of https://gitlab.com/kraxel/qemu into staging
x86/loader: fix efi binary loading
x86/loader: support secure boot with direct kernel load
firmware: json descriptor updates
roms: re-add edk2-basetools target
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEoDKM/7k6F6eZAf59TLbY7tPocTgFAmdgBfwACgkQTLbY7tPo
# cTj7MQ/+MJkVWTYN59Yy1o+XgfIBMoPKuF8Rm9jyosR751Nb5slw7ivd/nr9vKOd
# QNmCUNSHqNhkt10fGZmiL/OBNPH2I226iJ/QPB6CPgn+klWu9/n/qCYHKqkUl+4V
# uAe2CtsljiMmBouJUshmUvtUeB62aykwYYUBb2WfpElBaAvDqs8O+WBCp/83ugfP
# pd0G/bG+7lI6co9KLa3u7hMgcmxu2t/uKd55BaD/H2+Py353geQtnwXThom33jhy
# RMDzSZKWXxcXpwYtGJmUgy2XQqRwCe2uCqCldJ+Yn+VqWIJhszGrfxa1W3AQWoT0
# BHcnH9uriEwMEL5gO6i83m1No9tPJQaw9qhOa/zKtAxoVjdB9FBab1+MYCyYiS4N
# BBz6pIwR+74iDjn1SCOn4vJPmblEL6qtV+IB7MauG1o9GN6IluWDDHotpcmI5B6k
# oXh7mld70cqUFWjFZvoPYEp6HBAvhXLyUf3A4fQoemEX6mSVM9eYol4GM4gTj0gs
# IsBfd9wvHmaurpXMgB0cJOpr7UbbijtssseB/WzkMWlKskuMlJxsif/IEJO+GrbZ
# RdEcdVOr45Ty1Hmqv6b9M9kUojphUchLe6nl+CQihm3K7dF27yqhcJYqNTe7mKpt
# 4+i6RZaTKKtbY8FL80ycDRZIkDZg9cwMQHMxrDABQVN5WpVfRgU=
# =4fZc
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 16 Dec 2024 05:50:36 EST
# gpg: using RSA key
A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* tag 'firmware-
20241216-pull-request' of https://gitlab.com/kraxel/qemu:
roms: re-add edk2-basetools target
pc-bios: add missing riscv64 descriptor
pc-bios: Add amd-sev-es to edk2 json
x86/loader: add -shim option
x86/loader: expose unpatched kernel
x86/loader: read complete kernel
x86/loader: only patch linux kernels
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Stefan Hajnoczi [Mon, 16 Dec 2024 14:35:34 +0000 (09:35 -0500)]
Merge tag 'pull-prop-
20241215' of https://gitlab.com/rth7680/qemu into staging
Constify almost all struct Property
# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmdfJ5wdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV9KYAf+Lu4rFaJ99LVVDPXJ
# A3e9eIciGS1qS8RYACiaMZvpteYJeSPJriPSw7d5LY0H6rr7Az3dRVX5x3xI5C3u
# tz7VvNu8agxkCqab6k5xWH1FyNaFi+3u8Yqnbtm5fcAEkf6QdbEPONEZbKeGQuDH
# bxQ3EJvj+fmc5/Fdcp/SoFnDNcM65PVgi5PUKiAFEE1dxvtUfYQx5DjokyehyhsS
# 4O6UEcLWOW+50CYy7X256ifSPaDz6HXBIIJVgCk9+347mKOLsZ3HbNalxXLdj+N0
# a148b+7ans8A88NZ6m5bezhlj0x9lEuK+6AocZmntYuFqOYcJVuzC40dEd9mj93J
# 8W8E7A==
# =EA7k
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 15 Dec 2024 14:01:48 EST
# gpg: using RSA key
7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg: issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A 05C0 64DF 38E8 AF7E 215F
* tag 'pull-prop-
20241215' of https://gitlab.com/rth7680/qemu: (67 commits)
docs: Constify all Property in examples
tests/unit: Constify all Property
hw/xen: Constify all Property
hw/watchdog: Constify all Property
hw/virtio: Constify all Property
hw/vfio: Constify all Property
hw/usb: Constify all Property
hw/ufs: Constify all Property
hw/tpm: Constify all Property
hw/timer: Constify all Property
hw/ssi: Constify all Property
hw/sparc64: Constify all Property
hw/sparc: Constify all Property
hw/sd: Constify all Property
hw/scsi: Constify all Property
hw/s390x: Constify all Property
hw/rx: Constify all Property
hw/rtc: Constify all Property
hw/riscv: Constify all Property
hw/remote: Constify all Property
...
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Gerd Hoffmann [Thu, 12 Dec 2024 08:44:07 +0000 (09:44 +0100)]
roms: re-add edk2-basetools target
Needed to build ipxe nic roms.
Reported-by: Liu Jaloo <liu.jaloo@gmail.com>
Fixes: 22e11539e167 ("edk2: replace build scripts")
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <
20241212084408.
1390728-1-kraxel@redhat.com>
Heinrich Schuchardt [Thu, 12 Dec 2024 09:00:59 +0000 (10:00 +0100)]
pc-bios: add missing riscv64 descriptor
Without descriptor libvirt cannot discover the EDK II binaries via
the qemu:///system connection.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Message-ID: <
20241212090059.94167-1-heinrich.schuchardt@canonical.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Pratik R. Sampat [Mon, 18 Nov 2024 16:14:05 +0000 (10:14 -0600)]
pc-bios: Add amd-sev-es to edk2 json
With the default BIOS being compatible with amd-sev-es add the feature
to the json to indicate it's support
Signed-off-by: Pratik R. Sampat <pratikrajesh.sampat@amd.com>
Message-ID: <
20241118161405.208437-1-pratikrajesh.sampat@amd.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Thu, 5 Sep 2024 14:12:10 +0000 (16:12 +0200)]
x86/loader: add -shim option
Add new -shim command line option, wire up for the x86 loader.
When specified load shim into the new "etc/boot/shim" fw_cfg file.
Needs OVMF changes too to be actually useful.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <
20240905141211.
1253307-6-kraxel@redhat.com>
Gerd Hoffmann [Thu, 5 Sep 2024 14:12:09 +0000 (16:12 +0200)]
x86/loader: expose unpatched kernel
Add a new "etc/boot/kernel" fw_cfg file, containing the kernel without
the setup header patches. Intended use is booting in UEFI with secure
boot enabled, where the setup header patching breaks secure boot
verification.
Needs OVMF changes too to be actually useful.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <
20240905141211.
1253307-5-kraxel@redhat.com>
Gerd Hoffmann [Thu, 5 Sep 2024 14:12:08 +0000 (16:12 +0200)]
x86/loader: read complete kernel
Load the complete kernel (including setup) into memory. Excluding the
setup is handled later when adding the FW_CFG_KERNEL_SIZE and
FW_CFG_KERNEL_DATA entries.
This is a preparation for the next patch which adds a new fw_cfg file
containing the complete, unpatched kernel. No functional change.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <
20240905141211.
1253307-4-kraxel@redhat.com>
Gerd Hoffmann [Thu, 5 Sep 2024 14:12:07 +0000 (16:12 +0200)]
x86/loader: only patch linux kernels
If the binary loaded via -kernel is *not* a linux kernel (in which
case protocol == 0), do not patch the linux kernel header fields.
It's (a) pointless and (b) might break binaries by random patching
and (c) changes the binary hash which in turn breaks secure boot
verification.
Background: OVMF happily loads and runs not only linux kernels but
any efi binary via direct kernel boot.
Note: Breaking the secure boot verification is a problem for linux
kernels too, but fixed that is left for another day ...
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <
20240905141211.
1253307-3-kraxel@redhat.com>
Richard Henderson [Fri, 13 Dec 2024 14:54:14 +0000 (14:54 +0000)]
docs: Constify all Property in examples
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Richard Henderson [Fri, 13 Dec 2024 17:34:38 +0000 (17:34 +0000)]
tests/unit: Constify all Property
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Richard Henderson [Fri, 13 Dec 2024 17:31:36 +0000 (17:31 +0000)]
hw/xen: Constify all Property
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Richard Henderson [Fri, 13 Dec 2024 17:30:13 +0000 (17:30 +0000)]
hw/watchdog: Constify all Property
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Richard Henderson [Fri, 13 Dec 2024 17:29:25 +0000 (17:29 +0000)]
hw/virtio: Constify all Property
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>