diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-04-15 19:18:42 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-04-17 21:34:04 +0100 |
commit | a0618a1990e4df30a76cf5b441b4aa7f002b0d64 (patch) | |
tree | 7a49aa78bfc908fecaf4cafd53798556082b5f6f /target-arm/kvm64.c | |
parent | 6cd8a2649aafb8e53db4a8f0bf0ea629441f8c03 (diff) | |
download | qemu-a0618a1990e4df30a76cf5b441b4aa7f002b0d64.zip |
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 <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Diffstat (limited to 'target-arm/kvm64.c')
-rw-r--r-- | target-arm/kvm64.c | 15 |
1 files changed, 14 insertions, 1 deletions
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; } |