mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-09 00:07:57 -06:00
target/arm/kvm: Have kvm_arm_handle_debug 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-16-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
3187e06a82
commit
39639275a1
1 changed files with 4 additions and 4 deletions
|
@ -1342,7 +1342,7 @@ static int kvm_arm_handle_dabt_nisv(ARMCPU *cpu, uint64_t esr_iss,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* kvm_arm_handle_debug:
|
* kvm_arm_handle_debug:
|
||||||
* @cs: CPUState
|
* @cpu: ARMCPU
|
||||||
* @debug_exit: debug part of the KVM exit structure
|
* @debug_exit: debug part of the KVM exit structure
|
||||||
*
|
*
|
||||||
* Returns: TRUE if the debug exception was handled.
|
* Returns: TRUE if the debug exception was handled.
|
||||||
|
@ -1353,11 +1353,11 @@ static int kvm_arm_handle_dabt_nisv(ARMCPU *cpu, uint64_t esr_iss,
|
||||||
* ABI just provides user-space with the full exception syndrome
|
* ABI just provides user-space with the full exception syndrome
|
||||||
* register value to be decoded in QEMU.
|
* register value to be decoded in QEMU.
|
||||||
*/
|
*/
|
||||||
static bool kvm_arm_handle_debug(CPUState *cs,
|
static bool kvm_arm_handle_debug(ARMCPU *cpu,
|
||||||
struct kvm_debug_exit_arch *debug_exit)
|
struct kvm_debug_exit_arch *debug_exit)
|
||||||
{
|
{
|
||||||
int hsr_ec = syn_get_ec(debug_exit->hsr);
|
int hsr_ec = syn_get_ec(debug_exit->hsr);
|
||||||
ARMCPU *cpu = ARM_CPU(cs);
|
CPUState *cs = CPU(cpu);
|
||||||
CPUARMState *env = &cpu->env;
|
CPUARMState *env = &cpu->env;
|
||||||
|
|
||||||
/* Ensure PC is synchronised */
|
/* Ensure PC is synchronised */
|
||||||
|
@ -1424,7 +1424,7 @@ int kvm_arch_handle_exit(CPUState *cs, struct kvm_run *run)
|
||||||
|
|
||||||
switch (run->exit_reason) {
|
switch (run->exit_reason) {
|
||||||
case KVM_EXIT_DEBUG:
|
case KVM_EXIT_DEBUG:
|
||||||
if (kvm_arm_handle_debug(cs, &run->debug.arch)) {
|
if (kvm_arm_handle_debug(cpu, &run->debug.arch)) {
|
||||||
ret = EXCP_DEBUG;
|
ret = EXCP_DEBUG;
|
||||||
} /* otherwise return to guest */
|
} /* otherwise return to guest */
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue