diff options
author | Alexander Graf <agraf@suse.de> | 2014-06-20 16:43:36 +0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-07-28 18:35:53 +0400 |
commit | c12fb43c2f6d6a57a4e21afe74ff56485d699ee7 (patch) | |
tree | 4e5b0697bebd43348fa15f116b1c746ef561a9cb /arch/powerpc/include/asm/kvm_booke.h | |
parent | c45c551403f0a7b152e56c53735b954faa36c54c (diff) | |
download | linux-c12fb43c2f6d6a57a4e21afe74ff56485d699ee7.tar.xz |
KVM: PPC: Handle magic page in kvmppc_ld/st
We use kvmppc_ld and kvmppc_st to emulate load/store instructions that may as
well access the magic page. Special case it out so that we can properly access
it.
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_booke.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_booke.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_booke.h b/arch/powerpc/include/asm/kvm_booke.h index cbb19906ca36..f7aa5cc395c4 100644 --- a/arch/powerpc/include/asm/kvm_booke.h +++ b/arch/powerpc/include/asm/kvm_booke.h @@ -103,4 +103,14 @@ static inline ulong kvmppc_get_fault_dar(struct kvm_vcpu *vcpu) { return vcpu->arch.fault_dear; } + +static inline bool kvmppc_supports_magic_page(struct kvm_vcpu *vcpu) +{ + /* Magic page is only supported on e500v2 */ +#ifdef CONFIG_KVM_E500V2 + return true; +#else + return false; +#endif +} #endif /* __ASM_KVM_BOOKE_H__ */ |