diff options
Diffstat (limited to 'arch/powerpc/kvm/booke.h')
-rw-r--r-- | arch/powerpc/kvm/booke.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/arch/powerpc/kvm/booke.h b/arch/powerpc/kvm/booke.h index 492bb7030358..8e1fe33d64e5 100644 --- a/arch/powerpc/kvm/booke.h +++ b/arch/powerpc/kvm/booke.h | |||
@@ -52,24 +52,19 @@ | |||
52 | 52 | ||
53 | extern unsigned long kvmppc_booke_handlers; | 53 | extern unsigned long kvmppc_booke_handlers; |
54 | 54 | ||
55 | /* Helper function for "full" MSR writes. No need to call this if only EE is | 55 | void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr); |
56 | * changing. */ | 56 | void kvmppc_mmu_msr_notify(struct kvm_vcpu *vcpu, u32 old_msr); |
57 | static inline void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr) | ||
58 | { | ||
59 | if ((new_msr & MSR_PR) != (vcpu->arch.shared->msr & MSR_PR)) | ||
60 | kvmppc_mmu_priv_switch(vcpu, new_msr & MSR_PR); | ||
61 | |||
62 | vcpu->arch.shared->msr = new_msr; | ||
63 | |||
64 | if (vcpu->arch.shared->msr & MSR_WE) { | ||
65 | kvm_vcpu_block(vcpu); | ||
66 | kvmppc_set_exit_type(vcpu, EMULATED_MTMSRWE_EXITS); | ||
67 | }; | ||
68 | } | ||
69 | 57 | ||
70 | int kvmppc_booke_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu, | 58 | int kvmppc_booke_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu, |
71 | unsigned int inst, int *advance); | 59 | unsigned int inst, int *advance); |
72 | int kvmppc_booke_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt); | 60 | int kvmppc_booke_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt); |
73 | int kvmppc_booke_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs); | 61 | int kvmppc_booke_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs); |
74 | 62 | ||
63 | /* low-level asm code to transfer guest state */ | ||
64 | void kvmppc_load_guest_spe(struct kvm_vcpu *vcpu); | ||
65 | void kvmppc_save_guest_spe(struct kvm_vcpu *vcpu); | ||
66 | |||
67 | /* high-level function, manages flags, host state */ | ||
68 | void kvmppc_vcpu_disable_spe(struct kvm_vcpu *vcpu); | ||
69 | |||
75 | #endif /* __KVM_BOOKE_H__ */ | 70 | #endif /* __KVM_BOOKE_H__ */ |