diff options
author | Pavel Fedin <p.fedin@samsung.com> | 2015-12-04 15:03:13 +0300 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2015-12-04 16:29:54 +0000 |
commit | 2ec5be3dbfdcb672cdafde463a5f2c0bfe522c3d (patch) | |
tree | 5172656b0fc303906f951be316cb9a2e902e249e /arch/arm64/kvm/sys_regs_generic_v8.c | |
parent | 3fec037d0fb292c4e5b2a7f8d132b5f9d5487ff3 (diff) | |
download | linux-2ec5be3dbfdcb672cdafde463a5f2c0bfe522c3d.tar.bz2 |
arm64: KVM: Correctly handle zero register in system register accesses
System register accesses also use zero register for Rt == 31, and
therefore using it will also result in getting SP value instead. This
patch makes them also using new accessors, introduced by the previous
patch. Since register value is no longer directly associated with storage
inside vCPU context structure, we introduce a dedicated storage for it in
struct sys_reg_params.
This refactor also gets rid of "massive hack" in kvm_handle_cp_64().
Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/kvm/sys_regs_generic_v8.c')
-rw-r--r-- | arch/arm64/kvm/sys_regs_generic_v8.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/sys_regs_generic_v8.c b/arch/arm64/kvm/sys_regs_generic_v8.c index ccd3e359b800..ed90578fa120 100644 --- a/arch/arm64/kvm/sys_regs_generic_v8.c +++ b/arch/arm64/kvm/sys_regs_generic_v8.c @@ -37,7 +37,7 @@ static bool access_actlr(struct kvm_vcpu *vcpu, if (p->is_write) return ignore_write(vcpu, p); - *vcpu_reg(vcpu, p->Rt) = vcpu_sys_reg(vcpu, ACTLR_EL1); + p->regval = vcpu_sys_reg(vcpu, ACTLR_EL1); return true; } |