]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
arm64: KVM: Correctly handle zero register in system register accesses
authorPavel Fedin <p.fedin@samsung.com>
Fri, 4 Dec 2015 12:03:13 +0000 (15:03 +0300)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 4 Dec 2015 16:29:54 +0000 (16:29 +0000)
commit2ec5be3dbfdcb672cdafde463a5f2c0bfe522c3d
tree5172656b0fc303906f951be316cb9a2e902e249e
parent3fec037d0fb292c4e5b2a7f8d132b5f9d5487ff3
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>
arch/arm64/kvm/sys_regs.c
arch/arm64/kvm/sys_regs.h
arch/arm64/kvm/sys_regs_generic_v8.c