#
802c4daf |
| 23-Mar-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Move target-agnostic code from accel-target.c -> accel-common.c
Various methods of accel-target.c don't use any target-specific knowledge at all and can be built once in the target-agnostic a
accel: Move target-agnostic code from accel-target.c -> accel-common.c
Various methods of accel-target.c don't use any target-specific knowledge at all and can be built once in the target-agnostic accel-common.c file.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20250417165430.58213-8-philmd@linaro.org>
show more ...
|
#
44246e71 |
| 23-Mar-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Make AccelCPUClass structure target-agnostic
Move the target-agnostic parts of "accel/accel-cpu-target.h" to "accel/accel-cpu.h".
Doing so we need to include missing "hw/core/cpu.h" header i
accel: Make AccelCPUClass structure target-agnostic
Move the target-agnostic parts of "accel/accel-cpu-target.h" to "accel/accel-cpu.h".
Doing so we need to include missing "hw/core/cpu.h" header in "accel/accel-cpu.h" otherwise we get:
include/accel/accel-cpu-target.h:39:28: error: unknown type name 'CPUClass' 39 | void (*cpu_class_init)(CPUClass *cc); | ^
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20250417165430.58213-7-philmd@linaro.org>
show more ...
|
#
64cbcf1d |
| 23-Mar-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Implement accel_init_ops_interfaces() for both system/user mode
We want to build more common code, moving objects from meson's specific_ss[] set to common_ss[]. Since the CONFIG_USER_ONLY def
accel: Implement accel_init_ops_interfaces() for both system/user mode
We want to build more common code, moving objects from meson's specific_ss[] set to common_ss[]. Since the CONFIG_USER_ONLY definitions isn't applied on the common_ss[] set, it is simpler to add an empty accel_init_ops_interfaces() stub on user emulation, removing any CONFIG_USER_ONLY use in accel-target.c.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20250417165430.58213-5-philmd@linaro.org>
show more ...
|
#
5e15bb7d |
| 23-Mar-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
cpus: Replace CPU_RESOLVING_TYPE -> target_cpu_type()
Replace the target-specific CPU_RESOLVING_TYPE definition by a call to the target-agnostic target_cpu_type() runtime helper.
Since the big "cpu
cpus: Replace CPU_RESOLVING_TYPE -> target_cpu_type()
Replace the target-specific CPU_RESOLVING_TYPE definition by a call to the target-agnostic target_cpu_type() runtime helper.
Since the big "cpu.h" is not required anymore in tcg-all.c, remove it, using the tinier "cpu-param.h" header.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Message-Id: <20250417165430.58213-3-philmd@linaro.org>
show more ...
|
#
e27fa95f |
| 21-Jan-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Prefer cached CpuClass over CPU_GET_CLASS() macro
CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it.
Signed-off-by: Philipp
accel: Prefer cached CpuClass over CPU_GET_CLASS() macro
CpuState caches its CPUClass since commit 6fbdff87062 ("cpu: cache CPUClass in CPUState for hot code paths"), use it.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250122093028.52416-6-philmd@linaro.org>
show more ...
|
#
b12a0f85 |
| 23-Jan-2025 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Rename 'hw/core/accel-cpu.h' -> 'accel/accel-cpu-target.h'
AccelCPUClass is for accelerator to initialize target specific features of a vCPU. Not really related to hardware emulation, rename
accel: Rename 'hw/core/accel-cpu.h' -> 'accel/accel-cpu-target.h'
AccelCPUClass is for accelerator to initialize target specific features of a vCPU. Not really related to hardware emulation, rename "hw/core/accel-cpu.h" as "accel/accel-cpu-target.h" (using the explicit -target suffix).
More importantly, target specific header often access the target specific definitions which are in each target/FOO/cpu.h header, usually included generically as "cpu.h" relative to target/FOO/. However, there is already a "cpu.h" in hw/core/ which takes precedence. This change allows "accel-cpu-target.h" to include a target "cpu.h".
Mechanical change doing:
$ git mv include/hw/core/accel-cpu.h \ include/accel/accel-cpu-target.h $ sed -i -e 's,hw/core/accel-cpu.h,accel/accel-cpu-target.h,' \ $(git grep -l hw/core/accel-cpu.h)
and renaming header guard 'ACCEL_CPU_TARGET_H'.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20250123234415.59850-12-philmd@linaro.org>
show more ...
|
#
e92a883f |
| 28-Jan-2020 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
accel/accel: Make TYPE_ACCEL abstract
There is no generic acceleration, we have to use specific implementations. Make the base class abstract.
Fixes: b14a0b7469fa ("accel: Use QOM classes for accel
accel/accel: Make TYPE_ACCEL abstract
There is no generic acceleration, we have to use specific implementations. Make the base class abstract.
Fixes: b14a0b7469fa ("accel: Use QOM classes for accel types") Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <20200129212345.20547-3-philmd@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
show more ...
|
#
463b0068 |
| 10-Jan-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Rename accel_init_ops_interfaces() to include 'system'
accel_init_ops_interfaces() is system specific, so rename it as accel_system_init_ops_interfaces() to ease navigating the code.
Signed-
accel: Rename accel_init_ops_interfaces() to include 'system'
accel_init_ops_interfaces() is system specific, so rename it as accel_system_init_ops_interfaces() to ease navigating the code.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-ID: <20240111120221.35072-2-philmd@linaro.org>
show more ...
|
#
0017c64e |
| 04-Oct-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Rename accel_softmmu* -> accel_system*
Rename accel.softmmu -> accel.system in file paths and the register_types() method.
Rename sysemu_stubs_ss -> system_stubs_ss in meson following the pa
accel: Rename accel_softmmu* -> accel_system*
Rename accel.softmmu -> accel.system in file paths and the register_types() method.
Rename sysemu_stubs_ss -> system_stubs_ss in meson following the pattern used on other source set names.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231004090629.37473-7-philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
e8b845b9 |
| 14-Sep-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Rename accel-common.c -> accel-target.c
We use the '-common.c' suffix for target agnostic units. This file is target specific, rename it using the '-target' suffix.
Signed-off-by: Philippe M
accel: Rename accel-common.c -> accel-target.c
We use the '-common.c' suffix for target agnostic units. This file is target specific, rename it using the '-target' suffix.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Anton Johansson <anjo@rev.ng> Message-Id: <20230914185718.76241-6-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
59851868 |
| 03-Oct-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Declare AccelClass::cpu_common_[un]realize() handlers
Currently accel_cpu_realize() only performs target-specific realization. Introduce the cpu_common_[un]realize fields in the base AccelCla
accel: Declare AccelClass::cpu_common_[un]realize() handlers
Currently accel_cpu_realize() only performs target-specific realization. Introduce the cpu_common_[un]realize fields in the base AccelClass to be able to perform target-agnostic [un]realization of vCPUs.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231003123026.99229-6-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
1aa1d830 |
| 03-Oct-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Introduce accel_cpu_common_unrealize() stub
Prepare the stub for parity with accel_cpu_common_realize().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231003123026
accel: Introduce accel_cpu_common_unrealize() stub
Prepare the stub for parity with accel_cpu_common_realize().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231003123026.99229-5-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
bd684b2f |
| 03-Oct-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Rename accel_cpu_realize() -> accel_cpu_common_realize()
accel_cpu_realize() is a generic function working with CPUs from any target. Rename it using '_common_' to emphasis it is not target s
accel: Rename accel_cpu_realize() -> accel_cpu_common_realize()
accel_cpu_realize() is a generic function working with CPUs from any target. Rename it using '_common_' to emphasis it is not target specific.
Suggested-by: Claudio Fontana <cfontana@suse.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231003123026.99229-4-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
6294e502 |
| 03-Oct-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Rename AccelCPUClass::cpu_realizefn() -> cpu_target_realize()
The AccelCPUClass::cpu_realizefn handler is meant for target specific code, rename it using '_target_' to emphasis it.
Suggested
accel: Rename AccelCPUClass::cpu_realizefn() -> cpu_target_realize()
The AccelCPUClass::cpu_realizefn handler is meant for target specific code, rename it using '_target_' to emphasis it.
Suggested-by: Claudio Fontana <cfontana@suse.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20231003123026.99229-3-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
e5dc722c |
| 03-Oct-2023 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
accel: Rename accel_cpu_realizefn() -> accel_cpu_realize()
We use the '*fn' suffix for handlers, this is a public method. Drop the suffix.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
accel: Rename accel_cpu_realizefn() -> accel_cpu_realize()
We use the '*fn' suffix for handlers, this is a public method. Drop the suffix.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Claudio Fontana <cfontana@suse.de> Message-Id: <20231003123026.99229-2-philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
3b7a9388 |
| 29-Sep-2022 |
Alex Bennée <alex.bennee@linaro.org> |
gdbstub: move sstep flags probing into AccelClass
The support of single-stepping is very much dependent on support from the accelerator we are using. To avoid special casing in gdbstub move the prob
gdbstub: move sstep flags probing into AccelClass
The support of single-stepping is very much dependent on support from the accelerator we are using. To avoid special casing in gdbstub move the probing out to an AccelClass function so future accelerators can put their code there.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Mads Ynddal <mads@ynddal.dk> Message-Id: <20220929114231.583801-44-alex.bennee@linaro.org>
show more ...
|
#
55bd445c |
| 24-Jun-2022 |
Alexander Graf <agraf@csgraf.de> |
accel: Introduce current_accel_name()
We need to fetch the name of the current accelerator in flexible error messages more going forward. Let's create a helper that gives it to us without casting in
accel: Introduce current_accel_name()
We need to fetch the name of the current accelerator in flexible error messages more going forward. Let's create a helper that gives it to us without casting in the target code.
Signed-off-by: Alexander Graf <agraf@csgraf.de> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20220620192242.70573-1-agraf@csgraf.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
#
f934907a |
| 24-Jun-2021 |
Gerd Hoffmann <kraxel@redhat.com> |
accel: autoload modules
Call module_object_class_by_name() instead of object_class_by_name() for objects possibly implemented as module
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by:
accel: autoload modules
Call module_object_class_by_name() instead of object_class_by_name() for objects possibly implemented as module
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jose R. Ziviani <jziviani@suse.de> Message-Id: <20210624103836.2382472-26-kraxel@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
cc3f2be6 |
| 22-Mar-2021 |
Claudio Fontana <cfontana@suse.de> |
accel: add init_accel_cpu for adapting accel behavior to CPU type
while on x86 all CPU classes can use the same set of TCGCPUOps, on ARM the right accel behavior depends on the type of the CPU.
So
accel: add init_accel_cpu for adapting accel behavior to CPU type
while on x86 all CPU classes can use the same set of TCGCPUOps, on ARM the right accel behavior depends on the type of the CPU.
So we need a way to specialize the accel behavior according to the CPU. Therefore, add a second initialization, after the accel_cpu->cpu_class_init, that allows to do this.
Signed-off-by: Claudio Fontana <cfontana@suse.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20210322132800.7470-24-cfontana@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
9ea057dc |
| 22-Mar-2021 |
Claudio Fontana <cfontana@suse.de> |
accel-cpu: make cpu_realizefn return a bool
overall, all devices' realize functions take an Error **errp, but return void.
hw/core/qdev.c code, which realizes devices, therefore does:
local_err =
accel-cpu: make cpu_realizefn return a bool
overall, all devices' realize functions take an Error **errp, but return void.
hw/core/qdev.c code, which realizes devices, therefore does:
local_err = NULL; dc->realize(dev, &local_err); if (local_err != NULL) { goto fail; }
However, we can improve at least accel_cpu to return a meaningful bool value.
Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210322132800.7470-9-cfontana@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
bb883fd6 |
| 22-Mar-2021 |
Claudio Fontana <cfontana@suse.de> |
accel: introduce new accessor functions
avoid open coding the accesses to cpu->accel_cpu interfaces, and instead introduce:
accel_cpu_instance_init, accel_cpu_realizefn
to be used by the targets/
accel: introduce new accessor functions
avoid open coding the accesses to cpu->accel_cpu interfaces, and instead introduce:
accel_cpu_instance_init, accel_cpu_realizefn
to be used by the targets/ initfn code, and by cpu_exec_realizefn respectively.
Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210322132800.7470-7-cfontana@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
fb6916dd |
| 04-Feb-2021 |
Claudio Fontana <cfontana@suse.de> |
accel: introduce AccelCPUClass extending CPUClass
add a new optional interface to CPUClass, which allows accelerators to extend the CPUClass with additional accelerator-specific initializations.
Th
accel: introduce AccelCPUClass extending CPUClass
add a new optional interface to CPUClass, which allows accelerators to extend the CPUClass with additional accelerator-specific initializations.
This will allow to separate the target cpu code that is specific to each accelerator, and register it automatically with object hierarchy lookup depending on accelerator code availability, as part of the accel_init_interfaces() initialization step.
Signed-off-by: Claudio Fontana <cfontana@suse.de> Message-Id: <20210204163931.7358-19-cfontana@suse.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
b86f59c7 |
| 04-Feb-2021 |
Claudio Fontana <cfontana@suse.de> |
accel: replace struct CpusAccel with AccelOpsClass
This will allow us to centralize the registration of the cpus.c module accelerator operations (in accel/accel-softmmu.c), and trigger it automatica
accel: replace struct CpusAccel with AccelOpsClass
This will allow us to centralize the registration of the cpus.c module accelerator operations (in accel/accel-softmmu.c), and trigger it automatically using object hierarchy lookup from the new accel_init_interfaces() initialization step, depending just on which accelerators are available in the code.
Rename all tcg-cpus.c, kvm-cpus.c, etc to tcg-accel-ops.c, kvm-accel-ops.c, etc, matching the object type names.
Signed-off-by: Claudio Fontana <cfontana@suse.de> Message-Id: <20210204163931.7358-18-cfontana@suse.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
940e43aa |
| 04-Feb-2021 |
Claudio Fontana <cfontana@suse.de> |
accel: extend AccelState and AccelClass to user-mode
Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
[claudio: rebased on Richard's splitwx work]
accel: extend AccelState and AccelClass to user-mode
Signed-off-by: Claudio Fontana <cfontana@suse.de> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
[claudio: rebased on Richard's splitwx work]
Signed-off-by: Claudio Fontana <cfontana@suse.de> Message-Id: <20210204163931.7358-17-cfontana@suse.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
#
d0dddab4 |
| 05-Feb-2021 |
Peter Maydell <peter.maydell@linaro.org> |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc,virtio,pci: fixes, features,code removal
Fixes all over the place. Ability to control ACPI OEM ID's. Ability to control
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
pc,virtio,pci: fixes, features,code removal
Fixes all over the place. Ability to control ACPI OEM ID's. Ability to control rom BAR size. Removal of deprecated pc machine types.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Fri 05 Feb 2021 13:54:32 GMT # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* remotes/mst/tags/for_upstream: tests/acpi: disallow updates for expected data files tests/acpi: update expected data files tests/acpi: add OEM ID and OEM TABLE ID test acpi: use constants as strncpy limit acpi: Permit OEM ID and OEM table ID fields to be changed tests/acpi: allow updates for expected data files vhost: Check for valid vdev in vhost_backend_handle_iotlb_msg hw/virtio/virtio-balloon: Remove the "class" property hw/i386: Remove the deprecated pc-1.x machine types vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support virtio-pmem: add trace events virtio: Add corresponding memory_listener_unregister to unrealize virtio-mmio: fix guest kernel crash with SHM regions virtio: move 'use-disabled-flag' property to hw_compat_4_2 pci: add romsize property pci: reject too large ROMs
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|