Cédric Le Goater
aa173cb279
vfio: Introduce a new header file for VFIOdisplay declarations
...
Gather all VFIOdisplay related declarations into "vfio-display.h" to
reduce exposure of VFIO internals in "hw/vfio/vfio-common.h".
Reviewed-by: John Levon <john.levon@nutanix.com >
Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-8-clg@redhat.com
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com >
Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-9-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-04-25 09:01:37 +02:00
Cédric Le Goater
eb6caa7916
vfio: Move vfio_device_state_is_running/precopy() into migration.c
...
These routines are migration related. Move their declaration and
implementation under the migration files.
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org >
Reviewed-by: John Levon <john.levon@nutanix.com >
Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-8-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-04-25 09:01:37 +02:00
Cédric Le Goater
b553d2c414
vfio: Introduce a new header file for internal migration services
...
Gather all VFIO migration related declarations into
"vfio-migration-internal.h" to reduce exposure of VFIO internals in
"hw/vfio/vfio-common.h".
Cc: Kirti Wankhede <kwankhede@nvidia.com >
Cc: Avihai Horon <avihaih@nvidia.com >
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org >
Reviewed-by: John Levon <john.levon@nutanix.com >
Reviewed-by: Avihai Horon <avihaih@nvidia.com >
Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-7-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-04-25 09:01:37 +02:00
Cédric Le Goater
d04a35cb74
vfio: Make vfio_viommu_preset() static
...
This routine is only used in file "migration.c". Move it there.
Reviewed-by: John Levon <john.levon@nutanix.com >
Reviewed-by: Joao Martins <joao.m.martins@oracle.com >
Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-6-clg@redhat.com
Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-6-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-04-25 09:01:37 +02:00
Cédric Le Goater
0a73045687
vfio: Make vfio_un/block_multiple_devices_migration() static
...
Both of these routines are only used in file "migration.c". Move them
there.
Reviewed-by: Joao Martins <joao.m.martins@oracle.com >
Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-5-clg@redhat.com
Reviewed-by: John Levon <john.levon@nutanix.com >
Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-5-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-04-25 09:01:37 +02:00
Cédric Le Goater
e1d4ea53d6
vfio: Introduce a new header file for external migration services
...
The migration core subsystem makes use of the VFIO migration API to
collect statistics on the number of bytes transferred. These services
are declared in "hw/vfio/vfio-common.h" which also contains VFIO
internal declarations. Move the migration declarations into a new
header file "hw/vfio/vfio-migration.h" to reduce the exposure of VFIO
internals.
While at it, use a 'vfio_migration_' prefix for these services.
To be noted, vfio_migration_add_bytes_transferred() is a VFIO
migration internal service which we will be moved in the subsequent
patches.
Cc: Kirti Wankhede <kwankhede@nvidia.com >
Cc: Avihai Horon <avihaih@nvidia.com >
Reviewed-by: Prasad Pandit <pjp@fedoraproject.org >
Reviewed-by: John Levon <john.levon@nutanix.com >
Reviewed-by: Avihai Horon <avihaih@nvidia.com >
Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-4-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-04-25 09:01:37 +02:00
Cédric Le Goater
426ffab477
vfio: Rename vfio_reset_bytes_transferred()
...
Enforce a 'vfio_mig_' prefix for the VFIO migration API to better
reflect the namespace these routines belong to.
Reviewed-by: Avihai Horon <avihaih@nvidia.com >
Reviewed-by: John Levon <john.levon@nutanix.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Link: https://lore.kernel.org/qemu-devel/20250318095415.670319-3-clg@redhat.com
Link: https://lore.kernel.org/qemu-devel/20250326075122.1299361-3-clg@redhat.com
Signed-off-by: Cédric Le Goater <clg@redhat.com >
2025-04-25 09:01:37 +02:00
Stefan Hajnoczi
019fbfa4bc
Merge tag 'pull-misc-2025-04-24' of https://repo.or.cz/qemu/armbru into staging
...
Miscellaneous patches for 2025-04-24
# -----BEGIN PGP SIGNATURE-----
#
# iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAmgJ7dYSHGFybWJydUBy
# ZWRoYXQuY29tAAoJEDhwtADrkYZTiZIP/1PFAg/s3SoiLQwH/ZrjyUkm1kiKnjOH
# CC5Stw6I9tuYnDAhASAdSymofLv0NNydNe5ai6ZZAWRyRYjIcfNigKAGK4Di+Uhe
# nYxT0Yk8hNGwMhl6NnBp4mmCUNCwcbjT9uXdiYQxFYO/qqYR1388xJjeN3c362l3
# AaLrE5bX5sqa6TAkTeRPjeIqxlyGT7jnCrN7I1hMhDvbc3ITF3AMfYFMjnmAQgr+
# mTWGS1QogqqkloODbR1DKD1CAWOlpK+0HibhNF+lz71P0HlwVvy+HPXso505Wf0B
# dMwlSrZ1DnqNVF/y5IhMEMslahKajbjbFVhBjmrGl/8T821etCxxgB20c0vyFRy8
# qTyJGwBZaEo0VWr70unSmq45TRoeQvdHAw/e+GtilR0ci80q2ly4gbObnw7L8le+
# gqZo4IWmrwp2sbPepE57sYKQpEndwbRayf/kcFd0LPPpeINu9ZooXkYX0pOo6Cdg
# vDKMaEB1/fmPhjSlknxkKN9LZdR+nDw8162S1CKsUdWanAOjmP8haN19aoHhIekZ
# q+r2qUq/U827yNy9/qbInmsoFYDz9s6sAOE63jibd5rZZ9Anei6NOSgLzA4CqCR1
# +d0+TXp19gP9mLMFs7/ZclwkXCz47OQYhXYphjI3wM9x+xbdRcI4n+DOH5u5coKx
# AsA6+2n0GF4Y
# =GaoH
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 24 Apr 2025 03:52:54 EDT
# gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg: issuer "armbru@redhat.com "
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com >" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org >" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* tag 'pull-misc-2025-04-24' of https://repo.or.cz/qemu/armbru :
cleanup: Drop pointless label at end of function
cleanup: Drop pointless return at end of function
cleanup: Re-run return_directly.cocci
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com >
2025-04-24 13:44:57 -04:00
Markus Armbruster
8a2b516ba2
cleanup: Drop pointless return at end of function
...
A few functions now end with a label. The next commit will clean them
up.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250407082643.2310002-3-armbru@redhat.com >
[Straightforward conflict with commit 988ad4cceb (hw/loongarch/virt:
Fix cpuslot::cpu set at last in virt_cpu_plug()) resolved]
2025-04-24 09:33:42 +02:00
Philippe Mathieu-Daudé
a3d40b5eff
tcg: Convert TARGET_SUPPORTS_MTTCG to TCGCPUOps::mttcg_supported field
...
Instead of having a compile-time TARGET_SUPPORTS_MTTCG definition,
have each target set the 'mttcg_supported' field in the TCGCPUOps
structure.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Anton Johansson <anjo@rev.ng >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250405161320.76854-17-philmd@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:07:32 -07:00
Philippe Mathieu-Daudé
60b2c2e66b
tcg: Move qemu_tcg_mttcg_enabled() to 'system/tcg.h'
...
qemu_tcg_mttcg_enabled() is specific to 1/ TCG and
2/ system emulation. Move the prototype declaration
to "system/tcg.h", reducing 'mttcg_enabled' variable
scope.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250403220420.78937-17-philmd@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:07:32 -07:00
Richard Henderson
a9d107fa0e
tcg: Pass max_threads not max_cpus to tcg_init
...
In effect, hoist the check for mttcg from tcg_n_regions()
to tcg_init_machine().
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:07:32 -07:00
Philippe Mathieu-Daudé
04583ce7e0
tcg: Define guest_default_memory_order in TCGCPUOps
...
Add the TCGCPUOps::guest_default_memory_order field and have
each target initialize it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Anton Johansson <anjo@rev.ng >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:07:32 -07:00
Philippe Mathieu-Daudé
d864cbb65d
exec: Do not include 'accel/tcg/cpu-ldst.h' in 'exec-all.h'
...
Only 2 files requiring "accel/tcg/cpu-ldst.h" API do not
include it:
- accel/tcg/cpu-exec.c
- target/arm/tcg/sve_helper.c
Include it there and remove it from "exec/exec-all.h".
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:07:32 -07:00
Philippe Mathieu-Daudé
42fa9665e5
exec: Restrict 'cpu_ldst.h' to accel/tcg/
...
Mechanical change using:
$ sed -i -e 's,exec/cpu_ldst,accel/tcg/cpu-ldst,' \
$(git grep -l exec/cpu_ldst.h)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:07:32 -07:00
Philippe Mathieu-Daudé
231a1c0ff4
exec: Restrict 'cpu-ldst-common.h' to accel/tcg/
...
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:07:32 -07:00
Philippe Mathieu-Daudé
4ff1b33edf
tcg: Always define TARGET_INSN_START_EXTRA_WORDS
...
Do not define TARGET_INSN_START_EXTRA_WORDS under the
hood, have each target explicitly define it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:07:32 -07:00
Philippe Mathieu-Daudé
21d41c566d
tcg: Declare TARGET_INSN_START_EXTRA_WORDS in 'cpu-param.h'
...
To avoid including the huge "cpu.h" for a simple definition,
move TARGET_INSN_START_EXTRA_WORDS to "cpu-param.h".
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:07:32 -07:00
Pierrick Bouvier
5a9d472d01
exec/poison: KVM_HAVE_MCE_INJECTION can now be poisoned
...
We prevent common code to use this define by mistake.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-19-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
f1d2a8e953
accel/kvm: move KVM_HAVE_MCE_INJECTION define to kvm-all.c
...
This define is used only in accel/kvm/kvm-all.c, so we push directly the
definition there. Add more visibility to kvm_arch_on_sigbus_vcpu() to
allow removing this define from any header.
The architectures defining KVM_HAVE_MCE_INJECTION are i386, x86_64 and
aarch64.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-18-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
0df783b2fb
exec/cpu-all: remove this header
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-16-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
d97c3b06de
exec/cpu-all: transfer exec/cpu-common include to cpu.h headers
...
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-15-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
9c2ff9cdc9
exec/cpu-all: remove exec/target_page include
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
e9659a4da2
exec/cpu-all: remove cpu include
...
Now we made sure important defines are included using their direct
path, we can remove cpu.h from cpu-all.h.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-14-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
4fadca8d64
accel/tcg: fix missing includes for TARGET_HAS_PRECISE_SMC
...
We prepare to remove cpu.h from cpu-all.h, which will transitively
remove it from accel/tcg/tb-internal.h, and thus from most of tcg
compilation units.
Note: this was caught by a test regression for s390x-softmmu.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-13-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
98c7c14698
accel/tcg: fix missing includes for TCG_GUEST_DEFAULT_MO
...
We prepare to remove cpu.h from cpu-all.h, which will transitively
remove it from accel/tcg/tb-internal.h, and thus from most of tcg
compilation units.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-12-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
22a7c2f239
exec/cpu-all: remove exec/cpu-interrupt include
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-8-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
4533af18b2
exec/cpu-all: remove tswap include
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-7-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
e33865f048
exec/cpu-all: remove exec/page-protection include
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-6-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
342e313d6c
exec/cpu-all: remove system/memory include
...
We include this header where needed. When includes set already have
ifdef CONFIG_USER_ONLY, we add it here, else, we don't condition the
include.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-5-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
8d535c312c
include/exec/cpu-all: move compile time check for CPUArchState to cpu-target.c
...
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-4-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Pierrick Bouvier
33d2cca32b
exec/cpu-all: move cpu_copy to linux-user/qemu.h
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250325045915.994760-3-pierrick.bouvier@linaro.org >
2025-04-23 15:04:57 -07:00
Richard Henderson
d11bf649d5
page-vary: Restrict scope of TARGET_PAGE_BITS_MIN
...
The only place we really need to know the minimum is within
page-vary-target.c. Rename the target/arm TARGET_PAGE_BITS_MIN
to TARGET_PAGE_BITS_LEGACY to emphasize what it really means.
Move the assertions related to minimum page size as well.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:04:57 -07:00
Richard Henderson
12eeb04ab4
page-vary: Move and rename qemu_target_page_bits_min
...
Rename to migration_legacy_page_bits, to make it clear that
we cannot change the value without causing a migration break.
Move to page-vary.h and page-vary-target.c.
Define via TARGET_PAGE_BITS if not TARGET_PAGE_BITS_VARY.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:04:57 -07:00
Richard Henderson
6effa87475
include/exec: Redefine tlb-flags with absolute values
...
Don't base the values on TARGET_PAGE_BITS_MIN, but do verify
that TLB_FLAGS_MASK does not overlap minimum page size.
All targets now have the same placement for these flags,
simplifying mmu management when we enable heterogeneous systems.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:04:57 -07:00
Philippe Mathieu-Daudé
42fec1bbf5
hw/core/cpu: Remove CPUClass::mmu_index()
...
All targets have been converted to TCGCPUOps::mmu_index(),
remove the now unused CPUClass::mmu_index().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250401080938.32278-24-philmd@linaro.org >
2025-04-23 15:04:57 -07:00
Philippe Mathieu-Daudé
17fa8b6f03
accel/tcg: Introduce TCGCPUOps::mmu_index() callback
...
We'll move CPUClass::mmu_index() to TCGCPUOps::mmu_index().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250401080938.32278-3-philmd@linaro.org >
2025-04-23 15:04:57 -07:00
Philippe Mathieu-Daudé
6ca6310699
hw/core/cpu: Update CPUClass::mmu_index docstring
...
Since commits 32a8ea12fab..90b7022e698 (target: "Split out
TARGET_env_mmu_index"), target's memory_rw_debug() callbacks
use the target's TARGET_env_mmu_index(), not the generic
CPUClass::mmu_index() callback. Update the documentation.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250401080938.32278-2-philmd@linaro.org >
2025-04-23 15:04:57 -07:00
Richard Henderson
b103cc6e74
accel/tcg: Remove page_protect
...
Merge the user-only page_protect function with the user-only
implementation of tb_lock_page0. This avoids pulling
page-protection.h into tb-internal.h.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:04:57 -07:00
Richard Henderson
aa6f138aba
accel/tcg: Move get_page_addr_code* declarations
...
Move the declarations from exec/exec-all.h to the
private accel/tcg/internal-common.h.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:04:57 -07:00
Richard Henderson
a456c72695
include/exec: Move tb_{,set_}page_addr[01] to translation-block.h
...
Move the accessor functions for TranslationBlock
into the header related to the structure.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:04:57 -07:00
Richard Henderson
24b5e0fdb5
include/exec: Move TLB_MMIO, TLB_DISCARD_WRITE to slow flags
...
Recover two bits from the inline flags.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 15:04:56 -07:00
Richard Henderson
31d399ff38
accel/tcg: Fix argument types of tlb_reset_dirty
...
The arguments to tlb_reset_dirty are host pointers.
The conversion from ram_addr_t was done in the sole
caller, tlb_reset_dirty_range_all.
Fixes: e554861766 ("exec: prepare for splitting")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 14:08:48 -07:00
Pierrick Bouvier
4d43552abe
exec/cpu-all: extract tlb flags defines to exec/tlb-flags.h
...
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20250320223002.2915728-3-pierrick.bouvier@linaro.org >
2025-04-23 14:08:48 -07:00
Richard Henderson
8916c373a3
meson: Only allow CONFIG_USER_ONLY from certain source sets
...
Poison CONFIG_USER_ONLY and CONFIG_SOFTMMU unless
the compilation unit is in specific_ss, libuser_ss,
or libsystem_ss. This is intended to prevent files
being incorrectly added to common_ss.
Remove #ifndef CONFIG_USER_ONLY / #error / #endif blocks.
All they do is trigger the poison error.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 14:08:44 -07:00
Richard Henderson
c09a2edce0
include/qemu: Remove ifndef CONFIG_USER_ONLY from accel.h
...
While setup_post and has_memory will not be used for
CONFIG_USER_ONLY, let the struct have constant layout.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 14:08:44 -07:00
Richard Henderson
4d9baad7dc
include/system: Remove ifndef CONFIG_USER_ONLY in qtest.h
...
This is include/system, so CONFIG_USER_ONLY will never be true.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 14:08:44 -07:00
Richard Henderson
1751889b5a
include/exec: Protect icount_enabled from poisoned symbols
...
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 14:08:44 -07:00
Richard Henderson
161f5bc8e9
include/exec: Split out icount.h
...
Split icount stuff from system/cpu-timers.h.
There are 17 files which only require icount.h, 7 that only
require cpu-timers.h, and 7 that require both.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 14:08:44 -07:00
Richard Henderson
31030cf0ff
include/hw/s390x: Remove ifndef CONFIG_USER_ONLY in css.h
...
We were hiding a number of declarations from user-only,
although it hurts nothing to allow them.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2025-04-23 14:08:44 -07:00