ARM: KVM: Remove unused hyp_pc field
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 5 Jan 2016 18:57:36 +0000 (18:57 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 29 Feb 2016 18:34:15 +0000 (18:34 +0000)
This field was never populated, and the panic code already
does something similar. Delete the related code.

Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/include/asm/kvm_emulate.h
arch/arm/include/asm/kvm_host.h
arch/arm/kernel/asm-offsets.c
arch/arm/kvm/handle_exit.c

index f710616ccadcbd32032099c0bff1e5316543d97b..8a8c6ded9ca7ea2d7dd93c0f8601ad45da971eeb 100644 (file)
@@ -108,11 +108,6 @@ static inline phys_addr_t kvm_vcpu_get_fault_ipa(struct kvm_vcpu *vcpu)
        return ((phys_addr_t)vcpu->arch.fault.hpfar & HPFAR_MASK) << 8;
 }
 
-static inline unsigned long kvm_vcpu_get_hyp_pc(struct kvm_vcpu *vcpu)
-{
-       return vcpu->arch.fault.hyp_pc;
-}
-
 static inline bool kvm_vcpu_dabt_isvalid(struct kvm_vcpu *vcpu)
 {
        return kvm_vcpu_get_hsr(vcpu) & HSR_ISV;
index daf6a71071da63e8e64d03af8e63ee2dbcfae5f6..19e9aba85463c25626415ed8ae79643423145c6c 100644 (file)
@@ -85,7 +85,6 @@ struct kvm_vcpu_fault_info {
        u32 hsr;                /* Hyp Syndrome Register */
        u32 hxfar;              /* Hyp Data/Inst. Fault Address Register */
        u32 hpfar;              /* Hyp IPA Fault Address Register */
-       u32 hyp_pc;             /* PC when exception was taken from Hyp mode */
 };
 
 /*
index 1f24c32e11fe5f8278b95d05b09d715bcf864a26..27d05813ff09c09d167a27b2c790bf1ba0135ba5 100644 (file)
@@ -175,7 +175,6 @@ int main(void)
   DEFINE(CPU_CTXT_VFP,         offsetof(struct kvm_cpu_context, vfp));
   DEFINE(CPU_CTXT_GP_REGS,     offsetof(struct kvm_cpu_context, gp_regs));
   DEFINE(GP_REGS_USR,          offsetof(struct kvm_regs, usr_regs));
-  DEFINE(VCPU_HYP_PC,          offsetof(struct kvm_vcpu, arch.fault.hyp_pc));
 #endif
   BLANK();
 #ifdef CONFIG_VDSO
index 3ede90d8b20bae91c4b8f20173b307cc1b0659fd..5377d7539a40e57c318c1b70e5b7ff0ddee2e3e2 100644 (file)
@@ -147,11 +147,6 @@ int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run,
        switch (exception_index) {
        case ARM_EXCEPTION_IRQ:
                return 1;
-       case ARM_EXCEPTION_UNDEFINED:
-               kvm_err("Undefined exception in Hyp mode at: %#08lx\n",
-                       kvm_vcpu_get_hyp_pc(vcpu));
-               BUG();
-               panic("KVM: Hypervisor undefined exception!\n");
        case ARM_EXCEPTION_DATA_ABORT:
        case ARM_EXCEPTION_PREF_ABORT:
        case ARM_EXCEPTION_HVC: