Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
kvm.c File Reference
#include <linux/kvm_host.h>
#include <linux/init.h>
#include <linux/export.h>
#include <linux/kvm_para.h>
#include <linux/slab.h>
#include <linux/of.h>
#include <asm/reg.h>
#include <asm/sections.h>
#include <asm/cacheflush.h>
#include <asm/disassemble.h>
#include <asm/ppc-opcode.h>
#include <asm/epapr_hcalls.h>

Go to the source code of this file.

Macros

#define KVM_MAGIC_PAGE   (-4096L)
 
#define magic_var(x)   KVM_MAGIC_PAGE + offsetof(struct kvm_vcpu_arch_shared, x)
 
#define KVM_INST_LWZ   0x80000000
 
#define KVM_INST_STW   0x90000000
 
#define KVM_INST_LD   0xe8000000
 
#define KVM_INST_STD   0xf8000000
 
#define KVM_INST_NOP   0x60000000
 
#define KVM_INST_B   0x48000000
 
#define KVM_INST_B_MASK   0x03ffffff
 
#define KVM_INST_B_MAX   0x01ffffff
 
#define KVM_INST_LI   0x38000000
 
#define KVM_MASK_RT   0x03e00000
 
#define KVM_RT_30   0x03c00000
 
#define KVM_MASK_RB   0x0000f800
 
#define KVM_INST_MFMSR   0x7c0000a6
 
#define SPR_FROM   0
 
#define SPR_TO   0x100
 
#define KVM_INST_SPR(sprn, moveto)
 
#define KVM_INST_MFSPR(sprn)   KVM_INST_SPR(sprn, SPR_FROM)
 
#define KVM_INST_MTSPR(sprn)   KVM_INST_SPR(sprn, SPR_TO)
 
#define KVM_INST_TLBSYNC   0x7c00046c
 
#define KVM_INST_MTMSRD_L0   0x7c000164
 
#define KVM_INST_MTMSRD_L1   0x7c010164
 
#define KVM_INST_MTMSR   0x7c000124
 
#define KVM_INST_WRTEE   0x7c000106
 
#define KVM_INST_WRTEEI_0   0x7c000146
 
#define KVM_INST_WRTEEI_1   0x7c008146
 
#define KVM_INST_MTSRIN   0x7c0001e4
 

Functions

unsigned long kvm_hypercall (unsigned long *in, unsigned long *out, unsigned long nr)
 
 EXPORT_SYMBOL_GPL (kvm_hypercall)
 
 postcore_initcall (kvm_guest_init)
 

Variables

u32 kvm_emulate_mtmsrd_branch_offs
 
u32 kvm_emulate_mtmsrd_reg_offs
 
u32 kvm_emulate_mtmsrd_orig_ins_offs
 
u32 kvm_emulate_mtmsrd_len
 
u32 kvm_emulate_mtmsrd []
 
u32 kvm_emulate_mtmsr_branch_offs
 
u32 kvm_emulate_mtmsr_reg1_offs
 
u32 kvm_emulate_mtmsr_reg2_offs
 
u32 kvm_emulate_mtmsr_orig_ins_offs
 
u32 kvm_emulate_mtmsr_len
 
u32 kvm_emulate_mtmsr []
 
u32 kvm_template_start []
 
u32 kvm_template_end []
 

Macro Definition Documentation

#define KVM_INST_B   0x48000000

Definition at line 44 of file kvm.c.

#define KVM_INST_B_MASK   0x03ffffff

Definition at line 45 of file kvm.c.

#define KVM_INST_B_MAX   0x01ffffff

Definition at line 46 of file kvm.c.

#define KVM_INST_LD   0xe8000000

Definition at line 41 of file kvm.c.

#define KVM_INST_LI   0x38000000

Definition at line 47 of file kvm.c.

#define KVM_INST_LWZ   0x80000000

Definition at line 39 of file kvm.c.

#define KVM_INST_MFMSR   0x7c0000a6

Definition at line 52 of file kvm.c.

#define KVM_INST_MFSPR (   sprn)    KVM_INST_SPR(sprn, SPR_FROM)

Definition at line 62 of file kvm.c.

#define KVM_INST_MTMSR   0x7c000124

Definition at line 68 of file kvm.c.

#define KVM_INST_MTMSRD_L0   0x7c000164

Definition at line 66 of file kvm.c.

#define KVM_INST_MTMSRD_L1   0x7c010164

Definition at line 67 of file kvm.c.

#define KVM_INST_MTSPR (   sprn)    KVM_INST_SPR(sprn, SPR_TO)

Definition at line 63 of file kvm.c.

#define KVM_INST_MTSRIN   0x7c0001e4

Definition at line 74 of file kvm.c.

#define KVM_INST_NOP   0x60000000

Definition at line 43 of file kvm.c.

#define KVM_INST_SPR (   sprn,
  moveto 
)
Value:
(0x7c0002a6 | \
(((sprn) & 0x1f) << 16) | \
(((sprn) & 0x3e0) << 6) | \
(moveto))

Definition at line 57 of file kvm.c.

#define KVM_INST_STD   0xf8000000

Definition at line 42 of file kvm.c.

#define KVM_INST_STW   0x90000000

Definition at line 40 of file kvm.c.

#define KVM_INST_TLBSYNC   0x7c00046c

Definition at line 65 of file kvm.c.

#define KVM_INST_WRTEE   0x7c000106

Definition at line 70 of file kvm.c.

#define KVM_INST_WRTEEI_0   0x7c000146

Definition at line 71 of file kvm.c.

#define KVM_INST_WRTEEI_1   0x7c008146

Definition at line 72 of file kvm.c.

#define KVM_MAGIC_PAGE   (-4096L)

Definition at line 36 of file kvm.c.

#define KVM_MASK_RB   0x0000f800

Definition at line 51 of file kvm.c.

#define KVM_MASK_RT   0x03e00000

Definition at line 49 of file kvm.c.

#define KVM_RT_30   0x03c00000

Definition at line 50 of file kvm.c.

#define magic_var (   x)    KVM_MAGIC_PAGE + offsetof(struct kvm_vcpu_arch_shared, x)

Definition at line 37 of file kvm.c.

#define SPR_FROM   0

Definition at line 54 of file kvm.c.

#define SPR_TO   0x100

Definition at line 55 of file kvm.c.

Function Documentation

EXPORT_SYMBOL_GPL ( kvm_hypercall  )
unsigned long kvm_hypercall ( unsigned long in,
unsigned long out,
unsigned long  nr 
)

Definition at line 714 of file kvm.c.

postcore_initcall ( kvm_guest_init  )

Variable Documentation

u32 kvm_emulate_mtmsr[]
u32 kvm_emulate_mtmsr_branch_offs
u32 kvm_emulate_mtmsr_len
u32 kvm_emulate_mtmsr_orig_ins_offs
u32 kvm_emulate_mtmsr_reg1_offs
u32 kvm_emulate_mtmsr_reg2_offs
u32 kvm_emulate_mtmsrd[]
u32 kvm_emulate_mtmsrd_branch_offs
u32 kvm_emulate_mtmsrd_len
u32 kvm_emulate_mtmsrd_orig_ins_offs
u32 kvm_emulate_mtmsrd_reg_offs
u32 kvm_template_end[]
u32 kvm_template_start[]