diff options
Diffstat (limited to 'include/asm-powerpc/kvm_ppc.h')
-rw-r--r-- | include/asm-powerpc/kvm_ppc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-powerpc/kvm_ppc.h b/include/asm-powerpc/kvm_ppc.h index 7ac820308a7e..5a21115228af 100644 --- a/include/asm-powerpc/kvm_ppc.h +++ b/include/asm-powerpc/kvm_ppc.h | |||
@@ -57,6 +57,7 @@ extern int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu, | |||
57 | 57 | ||
58 | extern int kvmppc_emulate_instruction(struct kvm_run *run, | 58 | extern int kvmppc_emulate_instruction(struct kvm_run *run, |
59 | struct kvm_vcpu *vcpu); | 59 | struct kvm_vcpu *vcpu); |
60 | extern int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu); | ||
60 | 61 | ||
61 | extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, | 62 | extern void kvmppc_mmu_map(struct kvm_vcpu *vcpu, u64 gvaddr, gfn_t gfn, |
62 | u64 asid, u32 flags); | 63 | u64 asid, u32 flags); |
@@ -77,12 +78,17 @@ static inline void kvmppc_clear_exception(struct kvm_vcpu *vcpu, int exception) | |||
77 | clear_bit(priority, &vcpu->arch.pending_exceptions); | 78 | clear_bit(priority, &vcpu->arch.pending_exceptions); |
78 | } | 79 | } |
79 | 80 | ||
81 | /* Helper function for "full" MSR writes. No need to call this if only EE is | ||
82 | * changing. */ | ||
80 | static inline void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr) | 83 | static inline void kvmppc_set_msr(struct kvm_vcpu *vcpu, u32 new_msr) |
81 | { | 84 | { |
82 | if ((new_msr & MSR_PR) != (vcpu->arch.msr & MSR_PR)) | 85 | if ((new_msr & MSR_PR) != (vcpu->arch.msr & MSR_PR)) |
83 | kvmppc_mmu_priv_switch(vcpu, new_msr & MSR_PR); | 86 | kvmppc_mmu_priv_switch(vcpu, new_msr & MSR_PR); |
84 | 87 | ||
85 | vcpu->arch.msr = new_msr; | 88 | vcpu->arch.msr = new_msr; |
89 | |||
90 | if (vcpu->arch.msr & MSR_WE) | ||
91 | kvm_vcpu_block(vcpu); | ||
86 | } | 92 | } |
87 | 93 | ||
88 | #endif /* __POWERPC_KVM_PPC_H__ */ | 94 | #endif /* __POWERPC_KVM_PPC_H__ */ |