Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Enumerations | Functions | Variables
kvm_ppc.h File Reference
#include <linux/mutex.h>
#include <linux/timer.h>
#include <linux/types.h>
#include <linux/kvm_types.h>
#include <linux/kvm_host.h>
#include <asm/kvm_booke.h>

Go to the source code of this file.

Enumerations

enum  emulation_result {
  EMULATE_DONE, EMULATE_DO_MMIO, EMULATE_DO_DCR, EMULATE_FAIL,
  EMULATE_AGAIN, EMULATE_DONE, EMULATE_DO_MMIO, EMULATE_FAIL
}
 

Functions

int kvmppc_vcpu_run (struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
 
int __kvmppc_vcpu_run (struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
 
void kvmppc_handler_highmem (void)
 
void kvmppc_dump_vcpu (struct kvm_vcpu *vcpu)
 
int kvmppc_handle_load (struct kvm_run *run, struct kvm_vcpu *vcpu, unsigned int rt, unsigned int bytes, int is_bigendian)
 
int kvmppc_handle_loads (struct kvm_run *run, struct kvm_vcpu *vcpu, unsigned int rt, unsigned int bytes, int is_bigendian)
 
int kvmppc_handle_store (struct kvm_run *run, struct kvm_vcpu *vcpu, u64 val, unsigned int bytes, int is_bigendian)
 
int kvmppc_emulate_instruction (struct kvm_run *run, struct kvm_vcpu *vcpu)
 
int kvmppc_emulate_mmio (struct kvm_run *run, struct kvm_vcpu *vcpu)
 
void kvmppc_emulate_dec (struct kvm_vcpu *vcpu)
 
u32 kvmppc_get_dec (struct kvm_vcpu *vcpu, u64 tb)
 
void kvmppc_decrementer_func (unsigned long data)
 
int kvmppc_sanity_check (struct kvm_vcpu *vcpu)
 
void kvmppc_mmu_map (struct kvm_vcpu *vcpu, u64 gvaddr, gpa_t gpaddr, unsigned int gtlb_idx)
 
void kvmppc_mmu_priv_switch (struct kvm_vcpu *vcpu, int usermode)
 
void kvmppc_mmu_switch_pid (struct kvm_vcpu *vcpu, u32 pid)
 
void kvmppc_mmu_destroy (struct kvm_vcpu *vcpu)
 
int kvmppc_mmu_init (struct kvm_vcpu *vcpu)
 
int kvmppc_mmu_dtlb_index (struct kvm_vcpu *vcpu, gva_t eaddr)
 
int kvmppc_mmu_itlb_index (struct kvm_vcpu *vcpu, gva_t eaddr)
 
gpa_t kvmppc_mmu_xlate (struct kvm_vcpu *vcpu, unsigned int gtlb_index, gva_t eaddr)
 
void kvmppc_mmu_dtlb_miss (struct kvm_vcpu *vcpu)
 
void kvmppc_mmu_itlb_miss (struct kvm_vcpu *vcpu)
 
struct kvm_vcpukvmppc_core_vcpu_create (struct kvm *kvm, unsigned int id)
 
void kvmppc_core_vcpu_free (struct kvm_vcpu *vcpu)
 
int kvmppc_core_vcpu_setup (struct kvm_vcpu *vcpu)
 
int kvmppc_core_check_processor_compat (void)
 
int kvmppc_core_vcpu_translate (struct kvm_vcpu *vcpu, struct kvm_translation *tr)
 
void kvmppc_core_vcpu_load (struct kvm_vcpu *vcpu, int cpu)
 
void kvmppc_core_vcpu_put (struct kvm_vcpu *vcpu)
 
int kvmppc_core_prepare_to_enter (struct kvm_vcpu *vcpu)
 
int kvmppc_core_pending_dec (struct kvm_vcpu *vcpu)
 
void kvmppc_core_queue_program (struct kvm_vcpu *vcpu, ulong flags)
 
void kvmppc_core_queue_dec (struct kvm_vcpu *vcpu)
 
void kvmppc_core_dequeue_dec (struct kvm_vcpu *vcpu)
 
void kvmppc_core_queue_external (struct kvm_vcpu *vcpu, struct kvm_interrupt *irq)
 
void kvmppc_core_dequeue_external (struct kvm_vcpu *vcpu, struct kvm_interrupt *irq)
 
int kvmppc_core_emulate_op (struct kvm_run *run, struct kvm_vcpu *vcpu, unsigned int op, int *advance)
 
int kvmppc_core_emulate_mtspr (struct kvm_vcpu *vcpu, int sprn, ulong val)
 
int kvmppc_core_emulate_mfspr (struct kvm_vcpu *vcpu, int sprn, ulong *val)
 
int kvmppc_booke_init (void)
 
void kvmppc_booke_exit (void)
 
void kvmppc_core_destroy_mmu (struct kvm_vcpu *vcpu)
 
int kvmppc_kvm_pv (struct kvm_vcpu *vcpu)
 
void kvmppc_map_magic (struct kvm_vcpu *vcpu)
 
long kvmppc_alloc_hpt (struct kvm *kvm, u32 *htab_orderp)
 
long kvmppc_alloc_reset_hpt (struct kvm *kvm, u32 *htab_orderp)
 
void kvmppc_free_hpt (struct kvm *kvm)
 
long kvmppc_prepare_vrma (struct kvm *kvm, struct kvm_userspace_memory_region *mem)
 
void kvmppc_map_vrma (struct kvm_vcpu *vcpu, struct kvm_memory_slot *memslot, unsigned long porder)
 
int kvmppc_pseries_do_hcall (struct kvm_vcpu *vcpu)
 
long kvm_vm_ioctl_create_spapr_tce (struct kvm *kvm, struct kvm_create_spapr_tce *args)
 
long kvmppc_h_put_tce (struct kvm_vcpu *vcpu, unsigned long liobn, unsigned long ioba, unsigned long tce)
 
long kvm_vm_ioctl_allocate_rma (struct kvm *kvm, struct kvm_allocate_rma *rma)
 
struct kvmppc_linear_infokvm_alloc_rma (void)
 
void kvm_release_rma (struct kvmppc_linear_info *ri)
 
struct kvmppc_linear_infokvm_alloc_hpt (void)
 
void kvm_release_hpt (struct kvmppc_linear_info *li)
 
int kvmppc_core_init_vm (struct kvm *kvm)
 
void kvmppc_core_destroy_vm (struct kvm *kvm)
 
int kvmppc_core_prepare_memory_region (struct kvm *kvm, struct kvm_userspace_memory_region *mem)
 
void kvmppc_core_commit_memory_region (struct kvm *kvm, struct kvm_userspace_memory_region *mem)
 
int kvm_vm_ioctl_get_smmu_info (struct kvm *kvm, struct kvm_ppc_smmu_info *info)
 
int kvmppc_bookehv_init (void)
 
void kvmppc_bookehv_exit (void)
 
void kvmppc_core_get_sregs (struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
 
int kvmppc_core_set_sregs (struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
 
void kvmppc_get_sregs_ivor (struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
 
int kvmppc_set_sregs_ivor (struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
 
int kvm_vcpu_ioctl_get_one_reg (struct kvm_vcpu *vcpu, struct kvm_one_reg *reg)
 
int kvm_vcpu_ioctl_set_one_reg (struct kvm_vcpu *vcpu, struct kvm_one_reg *reg)
 
void kvmppc_set_pid (struct kvm_vcpu *vcpu, u32 pid)
 
int kvm_vcpu_ioctl_config_tlb (struct kvm_vcpu *vcpu, struct kvm_config_tlb *cfg)
 
int kvm_vcpu_ioctl_dirty_tlb (struct kvm_vcpu *vcpu, struct kvm_dirty_tlb *cfg)
 
long kvmppc_alloc_lpid (void)
 
void kvmppc_claim_lpid (long lpid)
 
void kvmppc_free_lpid (long lpid)
 
void kvmppc_init_lpid (unsigned long nr_lpids)
 

Variables

char kvmppc_handlers_start []
 
unsigned long kvmppc_handler_len
 

Enumeration Type Documentation

Enumerator:
EMULATE_DONE 
EMULATE_DO_MMIO 
EMULATE_DO_DCR 
EMULATE_FAIL 
EMULATE_AGAIN 
EMULATE_DONE 
EMULATE_DO_MMIO 
EMULATE_FAIL 

Definition at line 40 of file kvm_ppc.h.

Function Documentation

int __kvmppc_vcpu_run ( struct kvm_run kvm_run,
struct kvm_vcpu vcpu 
)
struct kvmppc_linear_info* kvm_alloc_hpt ( void  )
read

Definition at line 125 of file book3s_hv_builtin.c.

struct kvmppc_linear_info* kvm_alloc_rma ( void  )
read

Definition at line 92 of file book3s_hv_builtin.c.

void kvm_release_hpt ( struct kvmppc_linear_info li)

Definition at line 131 of file book3s_hv_builtin.c.

void kvm_release_rma ( struct kvmppc_linear_info ri)

Definition at line 98 of file book3s_hv_builtin.c.

int kvm_vcpu_ioctl_config_tlb ( struct kvm_vcpu vcpu,
struct kvm_config_tlb cfg 
)

Definition at line 1122 of file e500_tlb.c.

int kvm_vcpu_ioctl_dirty_tlb ( struct kvm_vcpu vcpu,
struct kvm_dirty_tlb cfg 
)

Definition at line 1247 of file e500_tlb.c.

int kvm_vcpu_ioctl_get_one_reg ( struct kvm_vcpu vcpu,
struct kvm_one_reg reg 
)

Definition at line 538 of file book3s_hv.c.

int kvm_vcpu_ioctl_set_one_reg ( struct kvm_vcpu vcpu,
struct kvm_one_reg reg 
)

Definition at line 553 of file book3s_hv.c.

long kvm_vm_ioctl_allocate_rma ( struct kvm kvm,
struct kvm_allocate_rma rma 
)

Definition at line 1204 of file book3s_hv.c.

long kvm_vm_ioctl_create_spapr_tce ( struct kvm kvm,
struct kvm_create_spapr_tce args 
)

Definition at line 100 of file book3s_64_vio.c.

int kvm_vm_ioctl_get_smmu_info ( struct kvm kvm,
struct kvm_ppc_smmu_info info 
)

Definition at line 1235 of file book3s_hv.c.

long kvmppc_alloc_hpt ( struct kvm kvm,
u32 htab_orderp 
)

Definition at line 43 of file book3s_64_mmu_hv.c.

long kvmppc_alloc_lpid ( void  )

Definition at line 860 of file powerpc.c.

long kvmppc_alloc_reset_hpt ( struct kvm kvm,
u32 htab_orderp 
)

Definition at line 120 of file book3s_64_mmu_hv.c.

void kvmppc_booke_exit ( void  )

Definition at line 1358 of file booke.c.

int kvmppc_booke_init ( void  )

Definition at line 1309 of file booke.c.

void kvmppc_bookehv_exit ( void  )
int kvmppc_bookehv_init ( void  )
void kvmppc_claim_lpid ( long  lpid)

Definition at line 875 of file powerpc.c.

int kvmppc_core_check_processor_compat ( void  )

Definition at line 46 of file 44x.c.

void kvmppc_core_commit_memory_region ( struct kvm kvm,
struct kvm_userspace_memory_region mem 
)

Definition at line 1346 of file book3s_hv.c.

void kvmppc_core_dequeue_dec ( struct kvm_vcpu vcpu)

Definition at line 147 of file book3s.c.

void kvmppc_core_dequeue_external ( struct kvm_vcpu vcpu,
struct kvm_interrupt irq 
)

Definition at line 163 of file book3s.c.

void kvmppc_core_destroy_mmu ( struct kvm_vcpu vcpu)
void kvmppc_core_destroy_vm ( struct kvm kvm)

Definition at line 171 of file 44x.c.

int kvmppc_core_emulate_mfspr ( struct kvm_vcpu vcpu,
int  sprn,
ulong val 
)

Definition at line 151 of file 44x_emulate.c.

int kvmppc_core_emulate_mtspr ( struct kvm_vcpu vcpu,
int  sprn,
ulong  val 
)

Definition at line 131 of file 44x_emulate.c.

int kvmppc_core_emulate_op ( struct kvm_run run,
struct kvm_vcpu vcpu,
unsigned int  op,
int advance 
)

Definition at line 36 of file 44x_emulate.c.

void kvmppc_core_get_sregs ( struct kvm_vcpu vcpu,
struct kvm_sregs sregs 
)

Definition at line 116 of file 44x.c.

int kvmppc_core_init_vm ( struct kvm kvm)

Definition at line 166 of file 44x.c.

int kvmppc_core_pending_dec ( struct kvm_vcpu vcpu)

Definition at line 142 of file book3s.c.

int kvmppc_core_prepare_memory_region ( struct kvm kvm,
struct kvm_userspace_memory_region mem 
)

Definition at line 1302 of file book3s_hv.c.

int kvmppc_core_prepare_to_enter ( struct kvm_vcpu vcpu)

Definition at line 261 of file book3s.c.

void kvmppc_core_queue_dec ( struct kvm_vcpu vcpu)

Definition at line 137 of file book3s.c.

void kvmppc_core_queue_external ( struct kvm_vcpu vcpu,
struct kvm_interrupt irq 
)

Definition at line 152 of file book3s.c.

void kvmppc_core_queue_program ( struct kvm_vcpu vcpu,
ulong  flags 
)

Definition at line 131 of file book3s.c.

int kvmppc_core_set_sregs ( struct kvm_vcpu vcpu,
struct kvm_sregs sregs 
)

Definition at line 121 of file 44x.c.

struct kvm_vcpu* kvmppc_core_vcpu_create ( struct kvm kvm,
unsigned int  id 
)
read

Definition at line 126 of file 44x.c.

void kvmppc_core_vcpu_free ( struct kvm_vcpu vcpu)

Definition at line 157 of file 44x.c.

void kvmppc_core_vcpu_load ( struct kvm_vcpu vcpu,
int  cpu 
)

Definition at line 34 of file 44x.c.

void kvmppc_core_vcpu_put ( struct kvm_vcpu vcpu)

Definition at line 40 of file 44x.c.

int kvmppc_core_vcpu_setup ( struct kvm_vcpu vcpu)

Definition at line 58 of file 44x.c.

int kvmppc_core_vcpu_translate ( struct kvm_vcpu vcpu,
struct kvm_translation tr 
)

Definition at line 91 of file 44x.c.

void kvmppc_decrementer_func ( unsigned long  data)

Definition at line 485 of file book3s.c.

void kvmppc_dump_vcpu ( struct kvm_vcpu vcpu)

Definition at line 69 of file booke.c.

void kvmppc_emulate_dec ( struct kvm_vcpu vcpu)

Definition at line 78 of file emulate.c.

int kvmppc_emulate_instruction ( struct kvm_run run,
struct kvm_vcpu vcpu 
)

Definition at line 150 of file emulate.c.

int kvmppc_emulate_mmio ( struct kvm_run run,
struct kvm_vcpu vcpu 
)

Definition at line 129 of file powerpc.c.

void kvmppc_free_hpt ( struct kvm kvm)

Definition at line 155 of file book3s_64_mmu_hv.c.

void kvmppc_free_lpid ( long  lpid)

Definition at line 880 of file powerpc.c.

u32 kvmppc_get_dec ( struct kvm_vcpu vcpu,
u64  tb 
)

Definition at line 122 of file emulate.c.

void kvmppc_get_sregs_ivor ( struct kvm_vcpu vcpu,
struct kvm_sregs sregs 
)

Definition at line 1145 of file booke.c.

long kvmppc_h_put_tce ( struct kvm_vcpu vcpu,
unsigned long  liobn,
unsigned long  ioba,
unsigned long  tce 
)

Definition at line 44 of file book3s_64_vio_hv.c.

int kvmppc_handle_load ( struct kvm_run run,
struct kvm_vcpu vcpu,
unsigned int  rt,
unsigned int  bytes,
int  is_bigendian 
)

Definition at line 512 of file powerpc.c.

int kvmppc_handle_loads ( struct kvm_run run,
struct kvm_vcpu vcpu,
unsigned int  rt,
unsigned int  bytes,
int  is_bigendian 
)

Definition at line 534 of file powerpc.c.

int kvmppc_handle_store ( struct kvm_run run,
struct kvm_vcpu vcpu,
u64  val,
unsigned int  bytes,
int  is_bigendian 
)

Definition at line 545 of file powerpc.c.

void kvmppc_handler_highmem ( void  )
void kvmppc_init_lpid ( unsigned long  nr_lpids)

Definition at line 885 of file powerpc.c.

int kvmppc_kvm_pv ( struct kvm_vcpu vcpu)

Definition at line 51 of file powerpc.c.

void kvmppc_map_magic ( struct kvm_vcpu vcpu)
void kvmppc_map_vrma ( struct kvm_vcpu vcpu,
struct kvm_memory_slot memslot,
unsigned long  porder 
)

Definition at line 178 of file book3s_64_mmu_hv.c.

void kvmppc_mmu_destroy ( struct kvm_vcpu vcpu)

Definition at line 271 of file 44x_tlb.c.

int kvmppc_mmu_dtlb_index ( struct kvm_vcpu vcpu,
gva_t  eaddr 
)

Definition at line 230 of file 44x_tlb.c.

void kvmppc_mmu_dtlb_miss ( struct kvm_vcpu vcpu)

Definition at line 241 of file 44x_tlb.c.

int kvmppc_mmu_init ( struct kvm_vcpu vcpu)

Definition at line 357 of file book3s_32_mmu_host.c.

int kvmppc_mmu_itlb_index ( struct kvm_vcpu vcpu,
gva_t  eaddr 
)

Definition at line 223 of file 44x_tlb.c.

void kvmppc_mmu_itlb_miss ( struct kvm_vcpu vcpu)

Definition at line 237 of file 44x_tlb.c.

void kvmppc_mmu_map ( struct kvm_vcpu vcpu,
u64  gvaddr,
gpa_t  gpaddr,
unsigned int  gtlb_index 
)

kvmppc_mmu_map – create a host mapping for guest memory

If the guest wanted a larger page than the host supports, only the first host page is mapped here and the rest are demand faulted.

If the guest wanted a smaller page than the host page size, we map only the guest-size page (i.e. not a full host page mapping).

Caller must ensure that the specified guest TLB entry is safe to insert into the shadow TLB.

Definition at line 292 of file 44x_tlb.c.

void kvmppc_mmu_priv_switch ( struct kvm_vcpu vcpu,
int  usermode 
)
void kvmppc_mmu_switch_pid ( struct kvm_vcpu vcpu,
u32  pid 
)
gpa_t kvmppc_mmu_xlate ( struct kvm_vcpu vcpu,
unsigned int  gtlb_index,
gva_t  eaddr 
)

Definition at line 213 of file 44x_tlb.c.

long kvmppc_prepare_vrma ( struct kvm kvm,
struct kvm_userspace_memory_region mem 
)
int kvmppc_pseries_do_hcall ( struct kvm_vcpu vcpu)

Definition at line 364 of file book3s_hv.c.

int kvmppc_sanity_check ( struct kvm_vcpu vcpu)

Definition at line 99 of file powerpc.c.

void kvmppc_set_pid ( struct kvm_vcpu vcpu,
u32  pid 
)

Definition at line 396 of file 44x_tlb.c.

int kvmppc_set_sregs_ivor ( struct kvm_vcpu vcpu,
struct kvm_sregs sregs 
)

Definition at line 1167 of file booke.c.

int kvmppc_vcpu_run ( struct kvm_run kvm_run,
struct kvm_vcpu vcpu 
)

Definition at line 1090 of file book3s_hv.c.

Variable Documentation

unsigned long kvmppc_handler_len
char kvmppc_handlers_start[]