aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-06-20 07:58:16 -0400
committerAlexander Graf <agraf@suse.de>2014-07-28 10:27:12 -0400
commit35c4a7330dbe1ae6f590a5645b185e35ddb3f6d9 (patch)
tree931fa003d549a0b14e284c85862490c229d83e74 /arch/powerpc/include
parent7d15c06f1abfe4b893c6c2c8a306b02210a6a6db (diff)
KVM: PPC: Move kvmppc_ld/st to common code
We have enough common infrastructure now to resolve GVA->GPA mappings at runtime. With this we can move our book3s specific helpers to load / store in guest virtual address space to common code as well. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/kvm_book3s.h2
-rw-r--r--arch/powerpc/include/asm/kvm_host.h4
-rw-r--r--arch/powerpc/include/asm/kvm_ppc.h4
3 files changed, 7 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/kvm_book3s.h b/arch/powerpc/include/asm/kvm_book3s.h
index a86ca652028c..172fd6dd2821 100644
--- a/arch/powerpc/include/asm/kvm_book3s.h
+++ b/arch/powerpc/include/asm/kvm_book3s.h
@@ -148,8 +148,8 @@ extern void kvmppc_mmu_hpte_sysexit(void);
148extern int kvmppc_mmu_hv_init(void); 148extern int kvmppc_mmu_hv_init(void);
149extern int kvmppc_book3s_hcall_implemented(struct kvm *kvm, unsigned long hc); 149extern int kvmppc_book3s_hcall_implemented(struct kvm *kvm, unsigned long hc);
150 150
151/* XXX remove this export when load_last_inst() is generic */
151extern int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data); 152extern int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data);
152extern int kvmppc_st(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr, bool data);
153extern void kvmppc_book3s_queue_irqprio(struct kvm_vcpu *vcpu, unsigned int vec); 153extern void kvmppc_book3s_queue_irqprio(struct kvm_vcpu *vcpu, unsigned int vec);
154extern void kvmppc_book3s_dequeue_irqprio(struct kvm_vcpu *vcpu, 154extern void kvmppc_book3s_dequeue_irqprio(struct kvm_vcpu *vcpu,
155 unsigned int vec); 155 unsigned int vec);
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
index 11385bb46527..66f5b5914e6c 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -111,15 +111,15 @@ struct kvm_vcpu_stat {
111 u32 halt_wakeup; 111 u32 halt_wakeup;
112 u32 dbell_exits; 112 u32 dbell_exits;
113 u32 gdbell_exits; 113 u32 gdbell_exits;
114 u32 ld;
115 u32 st;
114#ifdef CONFIG_PPC_BOOK3S 116#ifdef CONFIG_PPC_BOOK3S
115 u32 pf_storage; 117 u32 pf_storage;
116 u32 pf_instruc; 118 u32 pf_instruc;
117 u32 sp_storage; 119 u32 sp_storage;
118 u32 sp_instruc; 120 u32 sp_instruc;
119 u32 queue_intr; 121 u32 queue_intr;
120 u32 ld;
121 u32 ld_slow; 122 u32 ld_slow;
122 u32 st;
123 u32 st_slow; 123 u32 st_slow;
124#endif 124#endif
125}; 125};
diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h
index 1a60af9f2fa1..17fa277d297e 100644
--- a/arch/powerpc/include/asm/kvm_ppc.h
+++ b/arch/powerpc/include/asm/kvm_ppc.h
@@ -80,6 +80,10 @@ extern int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu,
80extern int kvmppc_load_last_inst(struct kvm_vcpu *vcpu, 80extern int kvmppc_load_last_inst(struct kvm_vcpu *vcpu,
81 enum instruction_type type, u32 *inst); 81 enum instruction_type type, u32 *inst);
82 82
83extern int kvmppc_ld(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr,
84 bool data);
85extern int kvmppc_st(struct kvm_vcpu *vcpu, ulong *eaddr, int size, void *ptr,
86 bool data);
83extern int kvmppc_emulate_instruction(struct kvm_run *run, 87extern int kvmppc_emulate_instruction(struct kvm_run *run,
84 struct kvm_vcpu *vcpu); 88 struct kvm_vcpu *vcpu);
85extern int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu); 89extern int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu);