Philippe Mathieu-Daudé
0d31a63186
target/arm/kvm: Have kvm_arm_vcpu_finalize take a ARMCPU argument
...
Unify the "kvm_arm.h" API: All functions related to ARM vCPUs
take a ARMCPU* argument. Use the CPU() QOM cast macro When
calling the generic vCPU API from "sysemu/kvm.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Message-id: 20231123183518.64569-12-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:46 +00:00
Philippe Mathieu-Daudé
bbb22d5865
target/arm/kvm: Have kvm_arm_vcpu_init take a ARMCPU argument
...
Unify the "kvm_arm.h" API: All functions related to ARM vCPUs
take a ARMCPU* argument. Use the CPU() QOM cast macro When
calling the generic vCPU API from "sysemu/kvm.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Message-id: 20231123183518.64569-11-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:46 +00:00
Philippe Mathieu-Daudé
5ed84f3bf7
target/arm/kvm: Have kvm_arm_pmu_set_irq take a ARMCPU argument
...
Unify the "kvm_arm.h" API: All functions related to ARM vCPUs
take a ARMCPU* argument. Use the CPU() QOM cast macro When
calling the generic vCPU API from "sysemu/kvm.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Message-id: 20231123183518.64569-10-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:46 +00:00
Philippe Mathieu-Daudé
d344f5ba87
target/arm/kvm: Have kvm_arm_pmu_init take a ARMCPU argument
...
Unify the "kvm_arm.h" API: All functions related to ARM vCPUs
take a ARMCPU* argument. Use the CPU() QOM cast macro When
calling the generic vCPU API from "sysemu/kvm.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Message-id: 20231123183518.64569-9-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:46 +00:00
Philippe Mathieu-Daudé
55503372c3
target/arm/kvm: Have kvm_arm_pvtime_init take a ARMCPU argument
...
Unify the "kvm_arm.h" API: All functions related to ARM vCPUs
take a ARMCPU* argument. Use the CPU() QOM cast macro When
calling the generic vCPU API from "sysemu/kvm.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Message-id: 20231123183518.64569-8-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:45 +00:00
Philippe Mathieu-Daudé
e77034f74b
target/arm/kvm: Have kvm_arm_set_device_attr take a ARMCPU argument
...
Unify the "kvm_arm.h" API: All functions related to ARM vCPUs
take a ARMCPU* argument. Use the CPU() QOM cast macro When
calling the generic vCPU API from "sysemu/kvm.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Message-id: 20231123183518.64569-7-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:45 +00:00
Philippe Mathieu-Daudé
d63392820b
target/arm/kvm: Have kvm_arm_sve_get_vls take a ARMCPU argument
...
Unify the "kvm_arm.h" API: All functions related to ARM vCPUs
take a ARMCPU* argument. Use the CPU() QOM cast macro When
calling the generic vCPU API from "sysemu/kvm.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Message-id: 20231123183518.64569-6-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:45 +00:00
Philippe Mathieu-Daudé
bc1b09b3db
target/arm/kvm: Have kvm_arm_sve_set_vls take a ARMCPU argument
...
Unify the "kvm_arm.h" API: All functions related to ARM vCPUs
take a ARMCPU* argument. Use the CPU() QOM cast macro When
calling the generic vCPU API from "sysemu/kvm.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Message-id: 20231123183518.64569-5-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:45 +00:00
Philippe Mathieu-Daudé
cac675b54e
target/arm/kvm: Have kvm_arm_add_vcpu_properties take a ARMCPU argument
...
Unify the "kvm_arm.h" API: All functions related to ARM vCPUs
take a ARMCPU* argument. Use the CPU() QOM cast macro When
calling the generic vCPU API from "sysemu/kvm.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Message-id: 20231123183518.64569-4-philmd@linaro.org
[PMM: fix parameter name in doc comment too]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:44 +00:00
Philippe Mathieu-Daudé
600f070e93
target/arm/kvm: Remove unused includes
...
Both MemoryRegion and Error types are forward declared
in "qemu/typedefs.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Message-id: 20231123183518.64569-3-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:44 +00:00
Philippe Mathieu-Daudé
5db30bcd7d
hw/intc/arm_gicv3: Include missing 'qemu/error-report.h' header
...
kvm_arm_its_reset_hold() calls warn_report(), itself declared
in "qemu/error-report.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Message-id: 20231123183518.64569-2-philmd@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:44 +00:00
Richard Henderson
396b6c50c3
target/arm/kvm: Unexport kvm_arm_vm_state_change
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:43 +00:00
Richard Henderson
71c34911c1
target/arm/kvm: Unexport and tidy kvm_arm_sync_mpstate_to_{kvm, qemu}
...
Drop fprintfs and actually use the return values in the callers.
This is OK to do since commit 7191f24c7f which added the
error-check to the generic accel/kvm functions that eventually
call into these ones.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
[PMM: tweak commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:43 +00:00
Richard Henderson
353e03cd45
target/arm/kvm: Unexport kvm_{get,put}_vcpu_events
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:43 +00:00
Richard Henderson
51641de468
target/arm/kvm: Init cap_has_inject_serror_esr in kvm_arch_init
...
There is no need to do this in kvm_arch_init_vcpu per vcpu.
Inline kvm_arm_init_serror_injection rather than keep separate.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:43 +00:00
Richard Henderson
09ddc01216
target/arm/kvm: Unexport kvm_arm_init_cpreg_list
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:42 +00:00
Richard Henderson
c223c67aaa
target/arm/kvm: Unexport kvm_arm_vcpu_finalize
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:42 +00:00
Richard Henderson
5a8a6013ea
target/arm/kvm: Unexport kvm_arm_vcpu_init
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:42 +00:00
Richard Henderson
de3c96017f
target/arm/kvm: Merge kvm64.c into kvm.c
...
Since kvm32.c was removed, there is no need to keep them separate.
This will allow more symbols to be unexported.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
[PMM: retain copyright lines from kvm64.c in kvm.c]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:42 +00:00
Richard Henderson
f38ce925eb
target/arm/kvm: Move kvm_arm_reg_syncs_via_cpreg_list and unexport
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
[PMM: merged two duplicate comments, as suggested by Gavin]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:41 +00:00
Richard Henderson
676fe6846f
target/arm/kvm: Move kvm_arm_cpreg_level and unexport
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:41 +00:00
Richard Henderson
d213f5adf5
target/arm/kvm: Use a switch for kvm_arm_cpreg_level
...
Use a switch instead of a linear search through data.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:41 +00:00
Richard Henderson
dc40d45ebd
target/arm/kvm: Move kvm_arm_get_host_cpu_features and unexport
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:41 +00:00
Richard Henderson
21beccd384
target/arm/kvm: Inline kvm_arm_steal_time_supported
...
This function is only used once, and is quite simple.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:40 +00:00
Richard Henderson
46512471c4
target/arm/kvm: Unexport kvm_arm_{get, put}_virtual_time
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:40 +00:00
Richard Henderson
5cba8f26de
target/arm/kvm: Move kvm_arm_handle_debug and unexport
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:40 +00:00
Richard Henderson
ea79c59989
target/arm/kvm: Move kvm_arm_hw_debug_active and unexport
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:40 +00:00
Richard Henderson
ec4145f728
target/arm/kvm: Move kvm_arm_copy_hw_debug_data and unexport
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:39 +00:00
Richard Henderson
20c83dc9ed
target/arm/kvm: Move kvm_arm_verify_ext_dabt_pending and unexport
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:39 +00:00
Richard Henderson
dd2157d291
target/arm/kvm: Merge kvm_arm_init_debug into kvm_arch_init
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:39 +00:00
Chao Du
b16620c32c
target/arm: kvm64: remove a redundant KVM_CAP_SET_GUEST_DEBUG probe
...
The KVM_CAP_SET_GUEST_DEBUG is probed during kvm_init().
gdbserver will fail to start if the CAP is not supported.
So no need to make another probe here, like other targets.
Signed-off-by: Chao Du <duchao@eswincomputing.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20231025070726.22689-1-duchao@eswincomputing.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:39 +00:00
Richard Henderson
16617c3cba
accel/kvm: Make kvm_has_guest_debug static
...
This variable is not used or declared outside kvm-all.c.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Gavin Shan <gshan@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2023-12-19 17:57:38 +00:00
Stefan Hajnoczi
bd00730ec0
Open 9.0 development tree
...
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2023-12-19 09:46:22 -05:00
Stefan Hajnoczi
1600b9f46b
Update version for v8.2.0 release
...
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
v8.2.0
2023-12-19 09:44:49 -05:00
Stefan Hajnoczi
039afc5ef7
Update version for v8.2.0-rc4 release
...
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
v8.2.0-rc4
2023-12-12 16:54:33 -05:00
Stefan Hajnoczi
4fd8a95437
Merge tag 'pull-tcg-20231212' of https://gitlab.com/rth7680/qemu into staging
...
target/i386: Fix 32-bit wrapping of pc/eip computation (#2022 )
tcg: Reduce serial context atomicity earlier (#2034 )
# -----BEGIN PGP SIGNATURE-----
#
# iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmV41IEdHHJpY2hhcmQu
# aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV+0DwgApqX4Ntaz1/eIbEmr
# sWTGlG7sQX28JrYm+Bd4MgtlE2+i06Vs3q1ZHThuZs9S6tQf8bcm1q1m0qZ486jk
# hgQqSMPAOJv1U+QhTRy1kW3l8UmZkw9YddfV5FjBHeuRWglVeSxDtqkc4fUffthb
# 82KvYIqo836HsYOOWtJqSuWVi60+q1RqYg+WZuygUmprf8Y+72Zu7ojjrizHoUNQ
# wTjGR8Jsf22ZrFi+B0MXL78oumMLTnjxCv1426+P+0zVclJAJZxS/7K+VhD4cG1q
# FG2zAphly+vuB248XSyzYxM8vgCVNAkLoUb2AAw1pdQpUzNaAEoTcAXIR7PJDord
# wZnmvw==
# =Fsyn
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 12 Dec 2023 16:45:37 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-tcg-20231212' of https://gitlab.com/rth7680/qemu :
tcg: Reduce serial context atomicity earlier
target/i386: Fix 32-bit wrapping of pc/eip computation
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2023-12-12 16:54:28 -05:00
Richard Henderson
cbb145567c
tcg: Reduce serial context atomicity earlier
...
Reduce atomicity while emitting opcodes, instead of later
during code generation. This ensures that any helper called
also sees the reduced atomicity requirement.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2034
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Tested-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20231212193542.149117-1-richard.henderson@linaro.org >
2023-12-12 13:35:19 -08:00
Richard Henderson
b5e0d5d22f
target/i386: Fix 32-bit wrapping of pc/eip computation
...
In 32-bit mode, pc = eip + cs_base is also 32-bit, and must wrap.
Failure to do so results in incorrect memory exceptions to the guest.
Before 732d548732 , this was implicitly done via truncation to
target_ulong but only in qemu-system-i386, not qemu-system-x86_64.
To fix this, we must add conditional zero-extensions.
Since we have to test for 32 vs 64-bit anyway, note that cs_base
is always zero in 64-bit mode.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2022
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com >
Message-Id: <20231212172510.103305-1-richard.henderson@linaro.org >
2023-12-12 13:35:08 -08:00
Alex Bennée
06ecb6ac19
docs: clean-up the xenpvh documentation
...
I noticed the code blocks where not rendering properly so thought I'd
better fix things up. So:
- Use better title for the machine type
- Explain why Xen is a little different
- Add a proper anchor to the tpm-device link
- add newline so code block properly renders
- add some indentation to make continuation clearer
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
Message-ID: <20231207130623.360473-1-alex.bennee@linaro.org >
2023-12-12 08:02:39 -05:00
Kevin Wolf
755ae3811f
block: Fix AioContext locking in qmp_block_resize()
...
The AioContext must be unlocked before calling blk_co_unref(), because
it takes the AioContext lock internally in blk_unref_bh(), which is
scheduled in the main thread. If we don't unlock, the AioContext is
locked twice and nested event loops such as in bdrv_graph_wrlock() will
deadlock.
Cc: <qemu-stable@nongnu.org >
Fixes: https://issues.redhat.com/browse/RHEL-15965
Fixes: 0c7d204f50
Signed-off-by: Kevin Wolf <kwolf@redhat.com >
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
Message-ID: <20231208124352.30295-1-kwolf@redhat.com >
2023-12-12 07:43:15 -05:00
Stefan Hajnoczi
eaae59af40
Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging
...
Fix for building with Xen 4.18
# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmV4M4AUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroOPgwgAhRYBI8Q7FO4LWZTi+ubYXfS1ZEVC
# uy5eiyQNlymmAFFqutXLokvN1qsGhRlSeX5/uo5Tn6vWjkXPLlGikrecWHFSPmLS
# 0s+4NOOfrM6gMm5CCqMzjQuogr4+xxiw/g+rxhWGhNqlL1jVG1+I6AU5EobMNlDA
# gqd33OL509xkLVN6pCcmFwBInDHQl63YwOwVIR3cd2cfUW28M8DzGd9KULWJkZva
# I51COEwo0EpLNC2ile7pnA8+8F79WBMgUdrhBzl/a8RHv7AvxAPQB/0TsZQknFo0
# PS3Y+yXdn2CT3KInu+QeW3kHkVoAdK06/cSOqIbEKuKgnZjEz0qFHq4K3A==
# =SKW6
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 12 Dec 2023 05:18:40 EST
# gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg: issuer "pbonzini@redhat.com "
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org >" [full]
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com >" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* tag 'for-upstream' of https://gitlab.com/bonzini/qemu :
xen: fix condition for skipping virtio-mmio defines
meson, xen: fix condition for enabling the Xen accelerator
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2023-12-12 07:42:02 -05:00
Paolo Bonzini
4efb13f845
xen: fix condition for skipping virtio-mmio defines
...
GUEST_VIRTIO_MMIO_* was added in Xen 4.17, so only define them
for CONFIG_XEN_CTRL_INTERFACE_VERSIONs up to 4.16.
Reported-by: Daniel P. Berrangé <berrange@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2023-12-12 11:18:32 +01:00
Paolo Bonzini
16b6273b4b
meson, xen: fix condition for enabling the Xen accelerator
...
A misspelled condition in xen_native.h is hiding a bug in the enablement of
Xen for qemu-system-aarch64. The bug becomes apparent when building for
Xen 4.18.
While the i386 emulator provides the xenpv machine type for multiple architectures,
and therefore can be compiled with Xen enabled even when the host is Arm, the
opposite is not true: qemu-system-aarch64 can only be compiled with Xen support
enabled when the host is Arm.
Expand the computation of accelerator_targets['CONFIG_XEN'] similar to what is
already there for KVM.
Cc: Stefano Stabellini <stefano.stabellini@amd.com >
Cc: Richard W.M. Jones <rjones@redhat.com >
Cc: Daniel P. Berrangé <berrange@redhat.com >
Reported-by: Michael Young <m.a.young@durham.ac.uk >
Fixes: 0c8ab1cddd ("xen_arm: Create virtio-mmio devices during initialization", 2023-08-30)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2023-12-12 11:18:21 +01:00
Stefan Hajnoczi
9c74490bff
Update version for v8.2.0-rc3 release
...
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
v8.2.0-rc3
2023-12-06 14:34:20 -05:00
Michael Roth
5746f70d68
i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit
...
Commit 7191f24c7f ("accel/kvm/kvm-all: Handle register access errors")
added error checking for KVM_SET_SREGS/KVM_SET_SREGS2. In doing so, it
exposed a long-running bug in current KVM support for SEV-ES where the
kernel assumes that MSR_EFER_LMA will be set explicitly by the guest
kernel, in which case EFER write traps would result in KVM eventually
seeing MSR_EFER_LMA get set and recording it in such a way that it would
be subsequently visible when accessing it via KVM_GET_SREGS/etc.
However, guest kernels currently rely on MSR_EFER_LMA getting set
automatically when MSR_EFER_LME is set and paging is enabled via
CR0_PG_MASK. As a result, the EFER write traps don't actually expose the
MSR_EFER_LMA bit, even though it is set internally, and when QEMU
subsequently tries to pass this EFER value back to KVM via
KVM_SET_SREGS* it will fail various sanity checks and return -EINVAL,
which is now considered fatal due to the aforementioned QEMU commit.
This can be addressed by inferring the MSR_EFER_LMA bit being set when
paging is enabled and MSR_EFER_LME is set, and synthesizing it to ensure
the expected bits are all present in subsequent handling on the host
side.
Ultimately, this handling will be implemented in the host kernel, but to
avoid breaking QEMU's SEV-ES support when using older host kernels, the
same handling can be done in QEMU just after fetching the register
values via KVM_GET_SREGS*. Implement that here.
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Marcelo Tosatti <mtosatti@redhat.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Akihiko Odaki <akihiko.odaki@daynix.com >
Cc: Philippe Mathieu-Daudé <philmd@linaro.org >
Cc: Lara Lazier <laramglazier@gmail.com >
Cc: Vitaly Kuznetsov <vkuznets@redhat.com >
Cc: Maxim Levitsky <mlevitsk@redhat.com >
Cc: <kvm@vger.kernel.org >
Fixes: 7191f24c7f ("accel/kvm/kvm-all: Handle register access errors")
Signed-off-by: Michael Roth <michael.roth@amd.com >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
Message-ID: <20231206155821.1194551-1-michael.roth@amd.com >
2023-12-06 14:34:11 -05:00
Stefan Hajnoczi
d451e32ce8
Merge tag 'pull-ufs-20231205' of https://gitlab.com/jeuk20.kim/qemu into staging
...
ufs fixes for 8.2
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEUBfYMVl8eKPZB+73EuIgTA5dtgIFAmVurjcACgkQEuIgTA5d
# tgLWVBAAkzus4nN2+Z0H23VUmeBPCLPFXRSkK8mOWC3ymbX3kiy/IjgM7Ept6QWA
# btssTf3YEeDtycgbrb5GZ4kEfKThDN7bbGRHvCW5bjwkyLQN1Ys2K61CTRX0VhSi
# U4HDE3gCm+LpO28BuV/1KunlSH4TWjt76AB6YG5PuyzSH+AbC8yY7m+VSJTmCw1k
# cZv0TQ+9lqWc4C6ziETV8UqhhltBmd/57P3xFDKhYNl0EtzxnKGSZ2szzWqE7guY
# DsmTlfB5bnkYPE51xxTcJnRj907utNrIfa2kbu9wXU/GuPuEf9QkDo1Dt3t1Z0Zm
# OZPkloXC2eNufVcGYVJa2PylRjwFlg01IuhYmlhsgerg5LZz2RIyrWM61JTONF2J
# 6EvO89e2S3XpBbnl2ugf2rMIdW1tlLSWhnLZD+jZzOu+V2TeLm6/onHWCVQ02sLr
# ddDVpf2djvUsmRvcBBYlI40FcC9Wt828Spm+wkRsGHC+VbAg2al6jRNXyJ2LWeiS
# wGsAwRV6XhQz996uMOWTA7jEsAawHUFgYCsH4bgiqiWEn+FblufY2iicRxY4ZsJA
# GXpvxGoUHWE8e0XjXG1BnRFo2Q5ns9SRl5gx5X7rcmIKUGGCh3ZI72zfeVgCjm7b
# 5/CV/YzKuCRWJCYcORguli1GVuPO01FJrBloTJc0OSaDAtZL2Mg=
# =o2kr
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 04 Dec 2023 23:59:35 EST
# gpg: using RSA key 5017D831597C78A3D907EEF712E2204C0E5DB602
# gpg: Good signature from "Jeuk Kim <jeuk20.kim@samsung.com >" [unknown]
# gpg: aka "Jeuk Kim <jeuk20.kim@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: 5017 D831 597C 78A3 D907 EEF7 12E2 204C 0E5D B602
* tag 'pull-ufs-20231205' of https://gitlab.com/jeuk20.kim/qemu :
hw/ufs: avoid generating the same ID string for different LU devices
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2023-12-05 09:25:27 -05:00
Akinobu Mita
80a37b039e
hw/ufs: avoid generating the same ID string for different LU devices
...
QEMU would not start when trying to create two UFS host controllers and
a UFS logical unit for each with the following options:
-device ufs,id=bus0 \
-device ufs-lu,drive=drive1,bus=bus0,lun=0 \
-device ufs,id=bus1 \
-device ufs-lu,drive=drive2,bus=bus1,lun=0 \
This is because the same ID string ("0:0:0/scsi-disk") is generated
for both UFS logical units.
To fix this issue, prepend the parent pci device's path to make
the ID string unique.
("0000:00:03.0/0:0:0/scsi-disk" and "0000:00:04.0/0:0:0/scsi-disk")
Resolves : #2018
Fixes: 096434fea1 ("hw/ufs: Modify lu.c to share codes with SCSI subsystem")
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com >
Reviewed-by: Jeuk Kim <jeuk20.kim@samsung.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-Id: <20231204150543.48252-1-akinobu.mita@gmail.com >
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com >
2023-12-05 13:57:18 +09:00
Stefan Hajnoczi
eeaaf96f55
Merge tag 'misc-fixes-20231204' of https://github.com/philmd/qemu into staging
...
Misc fixes for 8.2
- memory: Avoid unaligned accesses (Patrick)
- target/riscv: Fix variable shadowing (Daniel)
- tests/avocado: Update URL, skip flaky test (Alex, Phil)
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmVt7w4ACgkQ4+MsLN6t
# wN7AzA/+N1ec1I2IC0LYT8ThBCyV/92o+1FH5KaIxiVN5Ty3cACnGAac8IJ1K2tC
# 5WG8Dxg4rq+bM16lUq9ME7k82Y3PoxLoRQa8fuClFKdHMXU2sgY4OwTx2606cO4B
# 0H4gR+i3XgrgIDo8qRezWX0JSd1Srrz9QPlcq6kJfDtRq7DU0329aOobkyzuUJPb
# DJD9YPu9y0KokBCBuVlt5ypNSM9xJGRtznFt1sFfNyPgNOnie3s+fYpPn26UigcY
# 8OY/PMS5hapDw/s/gFKWQb/nCTSRnJKZ5dODOjHXK8HvTbYHedw8C4apXyjSXwBI
# fBerNEKJHwD/1QkFhbNCIwsidH72BWeHljrelbZlsUfXU1VcCqNiXV8d2R9ak3xt
# lrW7UcytC1+PqhmIVEXAOA4cwJcq6Hs9IcZ9G9aMvcmlhY3Fv0UKMoRYgsGTULeP
# ySQF3FDSc6dldsfBdwqHGHlwL12EYmpN2sIhEc5aQ9y5Mmuj2FBOYHUbPpyoVLpw
# e45n9Epc43GUVCMj3lZNjWKd+87nGjwKOM3rpBlcaSG3JRkLUe8o5APxeYzePZfO
# 2IOWcGnrUixsvWbNY+6JF98n5hQK7Va3h/e1YbS1K2OZ013LT1SNiZ1LOrl9KiXf
# agY6HMukKbCpJAqpXnMbgWdxCb7GdtjVaWKIVEgejeZTVdH4f8Y=
# =r21r
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 04 Dec 2023 10:23:58 EST
# gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org >" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE
* tag 'misc-fixes-20231204' of https://github.com/philmd/qemu :
tests/avocado: mark ReplayKernelNormal.test_mips64el_malta as flaky
tests/avocado: Update yamon-bin-02.22.zip URL
target/riscv/kvm: fix shadowing in kvm_riscv_(get|put)_regs_csr
system/memory: use ldn_he_p/stn_he_p
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2023-12-04 13:46:33 -05:00
Stefan Hajnoczi
db5e49e76c
Merge tag 'pull-target-arm-20231204-1' of https://git.linaro.org/people/pmaydell/qemu-arm into staging
...
target-arm queue:
* Turn off SME if SVE is turned off (this combination doesn't
currently work and QEMU will assert if you try it)
# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmVt3wQZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3vrmD/9zu48IxCdHFSshMRmXz6kI
# tMvTrsMSOGXfuQqCbvLn3CUP/La50Yt/T1C2TKzVII1W8zpw8wEEvraCBjexzUzK
# Jcjw0dPSIllQOHBkoUGsgqA0+UkhfIwH0po10rxm1L+ZP3DfISVdyDV9oxCNfEO0
# pGXI1eAN9GIQtJtUj3kZE+RUoamJfoSjlm5XVeX3T+utEU7yf1461L1/qaylYOrW
# wao72ffbuf41jRJwnVmMFoIPrwueYtEeuKl/EgYU4YPxkSQEo34u6d9fz2Irt6/Y
# utO2SffhhmlxQaFhgPX3hvAsfapMt/p2Jy6oUpThOjN75adCq+g1CYj7lzEfIX16
# kb2CY8zQ8NboJtgnkiQAA062myURnk/kmulv0OF6Hh0jHSuLzuMMLcCfBJgq4H6s
# mnBCJfetwRgwqcSl1JTfrMm4wYOLmSrmOcM5JjYwY2YYjnFXI+XB1MdKm0h8cROG
# nFu5TZtNnxgzqBgoh1140AYN851Y1dshczZIHb1/YuNpBIl+ZUO4v5sRT3KBSzb+
# G21570neBv8QcfDSgrLesrjNBDREfkaWEu9BM85461uTjbCLG8RUpn+Jd4VtpkNe
# YVzomhuM9CI5CmYdrTMJ74gnZUtAT9Q3FTcfGL8G4KiSIe85BTw+gEy4PhLXD6FT
# 68fP1M+s8/hsuXCJYbvmAA==
# =K/u0
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 04 Dec 2023 09:15:32 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-20231204-1' of https://git.linaro.org/people/pmaydell/qemu-arm :
target/arm: Disable SME if SVE is disabled
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2023-12-04 13:46:14 -05:00
Stefan Hajnoczi
169c4e7764
Merge tag 'pull-request-2023-12-04' of https://gitlab.com/thuth/qemu into staging
...
* Fix wording in iotest 149
* Fix whitespace issues in sh4 code (ignore checkpatch.pl warnings here)
* Make sure to check return values in qtests
# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmVt4PwRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbWhYxAAm6ww++qfCh5uLrKjXrv/ZS+b+8UVMT+p
# wOBNBz0RDpDahAwesxLABAg9b+fabLTx9OpOyQRgmM/ofCoW/Oi7xzCEwv9JPJX0
# Kr7x5AMCTc2hPydxsMenWYZXLZXcc0HSkB+4yN5FTeOl8YPoRetegsGbiirGpod1
# QyD/oLMZzBxqteF/m0a4gxEuwi3qgRVIOkdk8zeSBMAl6EUazsKR8sTrdCrkupHl
# ddMKjRH4Gr2sXoZ8L/mr4T5FodVxAF1pcZnVyPYDlVgNK/V0IWDcbmFFNr0rXxCM
# CZz7gIOZkpm/MXpVE9UEg++ZOQ16gDUNpvQRyNPgIn0vbiuF5kcXmUpstJWHDico
# O98wgH6im3iC7xyaMTOq3pjSb9RNP4cmIw77EKJyS93RDAgiCX0ozN3zEkxsvZYu
# hQadBd3TSUP6jxz2SWQ6irCwkElfozCc1cPfUyW0rFXjLqWei0UirWDdyN5dL8vk
# pkupZG5p3jiiZs1hm+TQ4W1CPVZFTAW+LcI7V/Na3EBKQvrjYDlHMQdx0NaJh5e3
# xn84bvTnuYfT/I63z9zqIbMwPQ5t+lJaR9ohkn9Q4tTEnHuMV9svON5rsRc3YE6p
# XrR02G9zu4kVAKs51DFNWC9SLgviW+LB2DCe+e2CrqwPjiz+MeOVGEEre7/nnj/q
# clP7u3MyX5A=
# =rU6S
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 04 Dec 2023 09:23:56 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-2023-12-04' of https://gitlab.com/thuth/qemu :
tests/qtest: check the return value
sh4: Coding style: Remove tabs
tests/qemu-iotests/149: Use more inclusive language in this test
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2023-12-04 13:45:35 -05:00