From a0618a1990e4df30a76cf5b441b4aa7f002b0d64 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Tue, 15 Apr 2014 19:18:42 +0100 Subject: target-arm: Add AArch64 ELR_EL1 register. Add the AArch64 ELR_EL1 register. Note that this does not live in env->cp15: for KVM migration compatibility we need to migrate it separately rather than as part of the system registers, because the KVM-to-userspace interface puts it in the struct kvm_regs rather than making them visible via the ONE_REG ioctls. Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite --- target-arm/kvm64.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'target-arm/kvm64.c') diff --git a/target-arm/kvm64.c b/target-arm/kvm64.c index 1b7ca90374..ee727487b8 100644 --- a/target-arm/kvm64.c +++ b/target-arm/kvm64.c @@ -144,9 +144,15 @@ int kvm_arch_put_registers(CPUState *cs, int level) return ret; } + reg.id = AARCH64_CORE_REG(elr_el1); + reg.addr = (uintptr_t) &env->elr_el1; + ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®); + if (ret) { + return ret; + } + /* TODO: * SP_EL1 - * ELR_EL1 * SPSR[] * FP state * system registers @@ -195,6 +201,13 @@ int kvm_arch_get_registers(CPUState *cs) return ret; } + reg.id = AARCH64_CORE_REG(elr_el1); + reg.addr = (uintptr_t) &env->elr_el1; + ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®); + if (ret) { + return ret; + } + /* TODO: other registers */ return ret; } -- cgit v1.2.3