Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
booke.c File Reference
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/kvm_host.h>
#include <linux/gfp.h>
#include <linux/module.h>
#include <linux/vmalloc.h>
#include <linux/fs.h>
#include <asm/cputable.h>
#include <asm/uaccess.h>
#include <asm/kvm_ppc.h>
#include <asm/cacheflush.h>
#include <asm/dbell.h>
#include <asm/hw_irq.h>
#include <asm/irq.h>
#include "timing.h"
#include "booke.h"

Go to the source code of this file.

Macros

#define VM_STAT(x)   offsetof(struct kvm, stat.x), KVM_STAT_VM
 
#define VCPU_STAT(x)   offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU
 

Functions

void kvmppc_dump_vcpu (struct kvm_vcpu *vcpu)
 
void kvmppc_set_msr (struct kvm_vcpu *vcpu, u32 new_msr)
 
void kvmppc_core_queue_program (struct kvm_vcpu *vcpu, ulong esr_flags)
 
void kvmppc_core_queue_dec (struct kvm_vcpu *vcpu)
 
int kvmppc_core_pending_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_prepare_to_enter (struct kvm_vcpu *vcpu)
 
int kvmppc_vcpu_run (struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
 
int kvmppc_handle_exit (struct kvm_run *run, struct kvm_vcpu *vcpu, unsigned int exit_nr)
 
int kvm_arch_vcpu_setup (struct kvm_vcpu *vcpu)
 
int kvm_arch_vcpu_ioctl_get_regs (struct kvm_vcpu *vcpu, struct kvm_regs *regs)
 
int kvm_arch_vcpu_ioctl_set_regs (struct kvm_vcpu *vcpu, struct kvm_regs *regs)
 
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_arch_vcpu_ioctl_get_sregs (struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
 
int kvm_arch_vcpu_ioctl_set_sregs (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)
 
int kvm_arch_vcpu_ioctl_get_fpu (struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
 
int kvm_arch_vcpu_ioctl_set_fpu (struct kvm_vcpu *vcpu, struct kvm_fpu *fpu)
 
int kvm_arch_vcpu_ioctl_translate (struct kvm_vcpu *vcpu, struct kvm_translation *tr)
 
int kvm_vm_ioctl_get_dirty_log (struct kvm *kvm, struct kvm_dirty_log *log)
 
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)
 
void kvmppc_set_tcr (struct kvm_vcpu *vcpu, u32 new_tcr)
 
void kvmppc_set_tsr_bits (struct kvm_vcpu *vcpu, u32 tsr_bits)
 
void kvmppc_clr_tsr_bits (struct kvm_vcpu *vcpu, u32 tsr_bits)
 
void kvmppc_decrementer_func (unsigned long data)
 
void kvmppc_booke_vcpu_load (struct kvm_vcpu *vcpu, int cpu)
 
void kvmppc_booke_vcpu_put (struct kvm_vcpu *vcpu)
 
int __init kvmppc_booke_init (void)
 
void __exit kvmppc_booke_exit (void)
 

Variables

unsigned long kvmppc_booke_handlers
 
struct kvm_stats_debugfs_item debugfs_entries []
 

Macro Definition Documentation

#define VCPU_STAT (   x)    offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU

Definition at line 46 of file booke.c.

#define VM_STAT (   x)    offsetof(struct kvm, stat.x), KVM_STAT_VM

Definition at line 45 of file booke.c.

Function Documentation

int kvm_arch_vcpu_ioctl_get_fpu ( struct kvm_vcpu vcpu,
struct kvm_fpu fpu 
)

Definition at line 1232 of file booke.c.

int kvm_arch_vcpu_ioctl_get_regs ( struct kvm_vcpu vcpu,
struct kvm_regs regs 
)

Definition at line 1014 of file booke.c.

int kvm_arch_vcpu_ioctl_get_sregs ( struct kvm_vcpu vcpu,
struct kvm_sregs sregs 
)

Definition at line 1192 of file booke.c.

int kvm_arch_vcpu_ioctl_set_fpu ( struct kvm_vcpu vcpu,
struct kvm_fpu fpu 
)

Definition at line 1237 of file booke.c.

int kvm_arch_vcpu_ioctl_set_regs ( struct kvm_vcpu vcpu,
struct kvm_regs regs 
)

Definition at line 1042 of file booke.c.

int kvm_arch_vcpu_ioctl_set_sregs ( struct kvm_vcpu vcpu,
struct kvm_sregs sregs 
)

Definition at line 1203 of file booke.c.

int kvm_arch_vcpu_ioctl_translate ( struct kvm_vcpu vcpu,
struct kvm_translation tr 
)

Definition at line 1242 of file booke.c.

int kvm_arch_vcpu_setup ( struct kvm_vcpu vcpu)

Definition at line 985 of file booke.c.

int kvm_vcpu_ioctl_get_one_reg ( struct kvm_vcpu vcpu,
struct kvm_one_reg reg 
)

Definition at line 1222 of file booke.c.

int kvm_vcpu_ioctl_set_one_reg ( struct kvm_vcpu vcpu,
struct kvm_one_reg reg 
)

Definition at line 1227 of file booke.c.

int kvm_vm_ioctl_get_dirty_log ( struct kvm kvm,
struct kvm_dirty_log log 
)

Definition at line 1251 of file booke.c.

void __exit kvmppc_booke_exit ( void  )

Definition at line 1358 of file booke.c.

int __init kvmppc_booke_init ( void  )

Definition at line 1309 of file booke.c.

void kvmppc_booke_vcpu_load ( struct kvm_vcpu vcpu,
int  cpu 
)

Definition at line 1299 of file booke.c.

void kvmppc_booke_vcpu_put ( struct kvm_vcpu vcpu)

Definition at line 1304 of file booke.c.

void kvmppc_clr_tsr_bits ( struct kvm_vcpu vcpu,
u32  tsr_bits 
)

Definition at line 1281 of file booke.c.

void kvmppc_core_commit_memory_region ( struct kvm kvm,
struct kvm_userspace_memory_region mem 
)

Definition at line 1262 of file booke.c.

void kvmppc_core_dequeue_dec ( struct kvm_vcpu vcpu)

Definition at line 186 of file booke.c.

void kvmppc_core_dequeue_external ( struct kvm_vcpu vcpu,
struct kvm_interrupt irq 
)

Definition at line 202 of file booke.c.

int kvmppc_core_pending_dec ( struct kvm_vcpu vcpu)

Definition at line 181 of file booke.c.

int kvmppc_core_prepare_memory_region ( struct kvm kvm,
struct kvm_userspace_memory_region mem 
)

Definition at line 1256 of file booke.c.

int kvmppc_core_prepare_to_enter ( struct kvm_vcpu vcpu)

Definition at line 442 of file booke.c.

void kvmppc_core_queue_dec ( struct kvm_vcpu vcpu)

Definition at line 176 of file booke.c.

void kvmppc_core_queue_external ( struct kvm_vcpu vcpu,
struct kvm_interrupt irq 
)

Definition at line 191 of file booke.c.

void kvmppc_core_queue_program ( struct kvm_vcpu vcpu,
ulong  esr_flags 
)

Definition at line 170 of file booke.c.

void kvmppc_decrementer_func ( unsigned long  data)

Definition at line 1287 of file booke.c.

void kvmppc_dump_vcpu ( struct kvm_vcpu vcpu)

Definition at line 69 of file booke.c.

void kvmppc_get_sregs_ivor ( struct kvm_vcpu vcpu,
struct kvm_sregs sregs 
)

Definition at line 1145 of file booke.c.

int kvmppc_handle_exit ( struct kvm_run run,
struct kvm_vcpu vcpu,
unsigned int  exit_nr 
)

kvmppc_handle_exit

Return value is in the form (errcode<<2 | RESUME_FLAG_HOST | RESUME_FLAG_NV)

Definition at line 667 of file booke.c.

void kvmppc_set_msr ( struct kvm_vcpu vcpu,
u32  new_msr 
)

Definition at line 127 of file booke.c.

int kvmppc_set_sregs_ivor ( struct kvm_vcpu vcpu,
struct kvm_sregs sregs 
)

Definition at line 1167 of file booke.c.

void kvmppc_set_tcr ( struct kvm_vcpu vcpu,
u32  new_tcr 
)

Definition at line 1267 of file booke.c.

void kvmppc_set_tsr_bits ( struct kvm_vcpu vcpu,
u32  tsr_bits 
)

Definition at line 1273 of file booke.c.

int kvmppc_vcpu_run ( struct kvm_run kvm_run,
struct kvm_vcpu vcpu 
)

Definition at line 498 of file booke.c.

Variable Documentation

struct kvm_stats_debugfs_item debugfs_entries[]
Initial value:
= {
{ "mmio", VCPU_STAT(mmio_exits) },
{ "dcr", VCPU_STAT(dcr_exits) },
{ "sig", VCPU_STAT(signal_exits) },
{ "itlb_r", VCPU_STAT(itlb_real_miss_exits) },
{ "itlb_v", VCPU_STAT(itlb_virt_miss_exits) },
{ "dtlb_r", VCPU_STAT(dtlb_real_miss_exits) },
{ "dtlb_v", VCPU_STAT(dtlb_virt_miss_exits) },
{ "sysc", VCPU_STAT(syscall_exits) },
{ "isi", VCPU_STAT(isi_exits) },
{ "dsi", VCPU_STAT(dsi_exits) },
{ "inst_emu", VCPU_STAT(emulated_inst_exits) },
{ "dec", VCPU_STAT(dec_exits) },
{ "ext_intr", VCPU_STAT(ext_intr_exits) },
{ "halt_wakeup", VCPU_STAT(halt_wakeup) },
{ "doorbell", VCPU_STAT(dbell_exits) },
{ "guest doorbell", VCPU_STAT(gdbell_exits) },
{ NULL }
}

Definition at line 48 of file booke.c.

unsigned long kvmppc_booke_handlers

Definition at line 43 of file booke.c.