mirror of https://github.com/xemu-project/xemu.git
target/arm/kvm: Have kvm_arm_verify_ext_dabt_pending take a ARMCPU arg
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-14-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
76acc98799
commit
ca0d1b7ca4
|
@ -1170,18 +1170,18 @@ static int kvm_get_vcpu_events(ARMCPU *cpu)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* kvm_arm_verify_ext_dabt_pending:
|
* kvm_arm_verify_ext_dabt_pending:
|
||||||
* @cs: CPUState
|
* @cpu: ARMCPU
|
||||||
*
|
*
|
||||||
* Verify the fault status code wrt the Ext DABT injection
|
* Verify the fault status code wrt the Ext DABT injection
|
||||||
*
|
*
|
||||||
* Returns: true if the fault status code is as expected, false otherwise
|
* Returns: true if the fault status code is as expected, false otherwise
|
||||||
*/
|
*/
|
||||||
static bool kvm_arm_verify_ext_dabt_pending(CPUState *cs)
|
static bool kvm_arm_verify_ext_dabt_pending(ARMCPU *cpu)
|
||||||
{
|
{
|
||||||
|
CPUState *cs = CPU(cpu);
|
||||||
uint64_t dfsr_val;
|
uint64_t dfsr_val;
|
||||||
|
|
||||||
if (!kvm_get_one_reg(cs, ARM64_REG_ESR_EL1, &dfsr_val)) {
|
if (!kvm_get_one_reg(cs, ARM64_REG_ESR_EL1, &dfsr_val)) {
|
||||||
ARMCPU *cpu = ARM_CPU(cs);
|
|
||||||
CPUARMState *env = &cpu->env;
|
CPUARMState *env = &cpu->env;
|
||||||
int aarch64_mode = arm_feature(env, ARM_FEATURE_AARCH64);
|
int aarch64_mode = arm_feature(env, ARM_FEATURE_AARCH64);
|
||||||
int lpae = 0;
|
int lpae = 0;
|
||||||
|
@ -1218,7 +1218,7 @@ void kvm_arch_pre_run(CPUState *cs, struct kvm_run *run)
|
||||||
* an IMPLEMENTATION DEFINED exception (for 32-bit EL1)
|
* an IMPLEMENTATION DEFINED exception (for 32-bit EL1)
|
||||||
*/
|
*/
|
||||||
if (!arm_feature(env, ARM_FEATURE_AARCH64) &&
|
if (!arm_feature(env, ARM_FEATURE_AARCH64) &&
|
||||||
unlikely(!kvm_arm_verify_ext_dabt_pending(cs))) {
|
unlikely(!kvm_arm_verify_ext_dabt_pending(cpu))) {
|
||||||
|
|
||||||
error_report("Data abort exception with no valid ISS generated by "
|
error_report("Data abort exception with no valid ISS generated by "
|
||||||
"guest memory access. KVM unable to emulate faulting "
|
"guest memory access. KVM unable to emulate faulting "
|
||||||
|
|
Loading…
Reference in New Issue