summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/kvm_emulate.h
diff options
context:
space:
mode:
authorPavel Fedin <p.fedin@samsung.com>2015-12-04 15:03:14 +0300
committerMarc Zyngier <marc.zyngier@arm.com>2015-12-04 16:30:03 +0000
commitf6be563abb60f0fa6978dec46da01164df89a635 (patch)
tree4c26dc5d7a5498e4728725ccfc4fb7b0f1a1c953 /arch/arm64/include/asm/kvm_emulate.h
parent2ec5be3dbfdcb672cdafde463a5f2c0bfe522c3d (diff)
downloadtalos-obmc-linux-f6be563abb60f0fa6978dec46da01164df89a635.tar.gz
talos-obmc-linux-f6be563abb60f0fa6978dec46da01164df89a635.zip
arm64: KVM: Get rid of old vcpu_reg()
Using oldstyle vcpu_reg() accessor is proven to be inappropriate and unsafe on ARM64. This patch converts the rest of use cases to new accessors and completely removes vcpu_reg() on ARM64. 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/include/asm/kvm_emulate.h')
-rw-r--r--arch/arm64/include/asm/kvm_emulate.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/arm64/include/asm/kvm_emulate.h b/arch/arm64/include/asm/kvm_emulate.h
index 5a182afab43b..25a40213bd9b 100644
--- a/arch/arm64/include/asm/kvm_emulate.h
+++ b/arch/arm64/include/asm/kvm_emulate.h
@@ -100,15 +100,10 @@ static inline void vcpu_set_thumb(struct kvm_vcpu *vcpu)
}
/*
- * vcpu_reg should always be passed a register number coming from a
- * read of ESR_EL2. Otherwise, it may give the wrong result on AArch32
- * with banked registers.
+ * vcpu_get_reg and vcpu_set_reg should always be passed a register number
+ * coming from a read of ESR_EL2. Otherwise, it may give the wrong result on
+ * AArch32 with banked registers.
*/
-static inline unsigned long *vcpu_reg(const struct kvm_vcpu *vcpu, u8 reg_num)
-{
- return (unsigned long *)&vcpu_gp_regs(vcpu)->regs.regs[reg_num];
-}
-
static inline unsigned long vcpu_get_reg(const struct kvm_vcpu *vcpu,
u8 reg_num)
{
OpenPOWER on IntegriCloud