Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
e500.h File Reference
#include <linux/kvm_host.h>
#include <asm/mmu-book3e.h>
#include <asm/tlb.h>

Go to the source code of this file.

Data Structures

struct  tlbe_ref
 
struct  tlbe_priv
 
struct  kvmppc_e500_tlb_params
 
struct  kvmppc_vcpu_e500
 

Macros

#define E500_PID_NUM   3
 
#define E500_TLB_NUM   2
 
#define E500_TLB_VALID   1
 
#define E500_TLB_DIRTY   2
 
#define E500_TLB_BITMAP   4
 
#define KVM_E500_TLB0_WAY_SIZE   128
 
#define KVM_E500_TLB0_WAY_NUM   2
 
#define KVM_E500_TLB0_SIZE   (KVM_E500_TLB0_WAY_SIZE * KVM_E500_TLB0_WAY_NUM)
 
#define KVM_E500_TLB1_SIZE   16
 
#define index_of(tlbsel, esel)   (((tlbsel) << 16) | ((esel) & 0xFFFF))
 
#define tlbsel_of(index)   ((index) >> 16)
 
#define esel_of(index)   ((index) & 0xFFFF)
 
#define E500_TLB_USER_PERM_MASK   (MAS3_UX|MAS3_UR|MAS3_UW)
 
#define E500_TLB_SUPER_PERM_MASK   (MAS3_SX|MAS3_SR|MAS3_SW)
 
#define MAS2_ATTRIB_MASK   (MAS2_X0 | MAS2_X1)
 
#define MAS3_ATTRIB_MASK
 
#define get_tlb_sts(gtlbe)   (MAS1_TS)
 

Functions

int kvmppc_e500_emul_mt_mmucsr0 (struct kvmppc_vcpu_e500 *vcpu_e500, ulong value)
 
int kvmppc_e500_emul_tlbwe (struct kvm_vcpu *vcpu)
 
int kvmppc_e500_emul_tlbre (struct kvm_vcpu *vcpu)
 
int kvmppc_e500_emul_tlbivax (struct kvm_vcpu *vcpu, int ra, int rb)
 
int kvmppc_e500_emul_tlbilx (struct kvm_vcpu *vcpu, int rt, int ra, int rb)
 
int kvmppc_e500_emul_tlbsx (struct kvm_vcpu *vcpu, int rb)
 
int kvmppc_e500_tlb_init (struct kvmppc_vcpu_e500 *vcpu_e500)
 
void kvmppc_e500_tlb_uninit (struct kvmppc_vcpu_e500 *vcpu_e500)
 
void kvmppc_get_sregs_e500_tlb (struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
 
int kvmppc_set_sregs_e500_tlb (struct kvm_vcpu *vcpu, struct kvm_sregs *sregs)
 
void kvmppc_e500_tlbil_one (struct kvmppc_vcpu_e500 *vcpu_e500, struct kvm_book3e_206_tlb_entry *gtlbe)
 
void kvmppc_e500_tlbil_all (struct kvmppc_vcpu_e500 *vcpu_e500)
 
unsigned int kvmppc_e500_get_tlb_stid (struct kvm_vcpu *vcpu, struct kvm_book3e_206_tlb_entry *gtlbe)
 

Macro Definition Documentation

#define E500_PID_NUM   3

Definition at line 26 of file e500.h.

#define E500_TLB_BITMAP   4

Definition at line 31 of file e500.h.

#define E500_TLB_DIRTY   2

Definition at line 30 of file e500.h.

#define E500_TLB_NUM   2

Definition at line 27 of file e500.h.

#define E500_TLB_SUPER_PERM_MASK   (MAS3_SX|MAS3_SR|MAS3_SW)

Definition at line 122 of file e500.h.

#define E500_TLB_USER_PERM_MASK   (MAS3_UX|MAS3_UR|MAS3_UW)

Definition at line 121 of file e500.h.

#define E500_TLB_VALID   1

Definition at line 29 of file e500.h.

#define esel_of (   index)    ((index) & 0xFFFF)

Definition at line 119 of file e500.h.

#define get_tlb_sts (   gtlbe)    (MAS1_TS)

Definition at line 303 of file e500.h.

#define index_of (   tlbsel,
  esel 
)    (((tlbsel) << 16) | ((esel) & 0xFFFF))

Definition at line 117 of file e500.h.

#define KVM_E500_TLB0_SIZE   (KVM_E500_TLB0_WAY_SIZE * KVM_E500_TLB0_WAY_NUM)

Definition at line 114 of file e500.h.

#define KVM_E500_TLB0_WAY_NUM   2

Definition at line 112 of file e500.h.

#define KVM_E500_TLB0_WAY_SIZE   128

Definition at line 111 of file e500.h.

#define KVM_E500_TLB1_SIZE   16

Definition at line 115 of file e500.h.

#define MAS2_ATTRIB_MASK   (MAS2_X0 | MAS2_X1)

Definition at line 123 of file e500.h.

#define MAS3_ATTRIB_MASK
Value:

Definition at line 125 of file e500.h.

#define tlbsel_of (   index)    ((index) >> 16)

Definition at line 118 of file e500.h.

Function Documentation

int kvmppc_e500_emul_mt_mmucsr0 ( struct kvmppc_vcpu_e500 vcpu_e500,
ulong  value 
)

Definition at line 668 of file e500_tlb.c.

int kvmppc_e500_emul_tlbilx ( struct kvm_vcpu vcpu,
int  rt,
int  ra,
int  rb 
)

Definition at line 755 of file e500_tlb.c.

int kvmppc_e500_emul_tlbivax ( struct kvm_vcpu vcpu,
int  ra,
int  rb 
)

Definition at line 685 of file e500_tlb.c.

int kvmppc_e500_emul_tlbre ( struct kvm_vcpu vcpu)

Definition at line 770 of file e500_tlb.c.

int kvmppc_e500_emul_tlbsx ( struct kvm_vcpu vcpu,
int  rb 
)

Definition at line 789 of file e500_tlb.c.

int kvmppc_e500_emul_tlbwe ( struct kvm_vcpu vcpu)

Definition at line 857 of file e500_tlb.c.

unsigned int kvmppc_e500_get_tlb_stid ( struct kvm_vcpu vcpu,
struct kvm_book3e_206_tlb_entry gtlbe 
)

Definition at line 216 of file e500.c.

int kvmppc_e500_tlb_init ( struct kvmppc_vcpu_e500 vcpu_e500)

Definition at line 1256 of file e500_tlb.c.

void kvmppc_e500_tlb_uninit ( struct kvmppc_vcpu_e500 vcpu_e500)

Definition at line 1370 of file e500_tlb.c.

void kvmppc_e500_tlbil_all ( struct kvmppc_vcpu_e500 vcpu_e500)

Definition at line 289 of file e500.c.

void kvmppc_e500_tlbil_one ( struct kvmppc_vcpu_e500 vcpu_e500,
struct kvm_book3e_206_tlb_entry gtlbe 
)

Definition at line 234 of file e500.c.

void kvmppc_get_sregs_e500_tlb ( struct kvm_vcpu vcpu,
struct kvm_sregs sregs 
)

Definition at line 1092 of file e500_tlb.c.

int kvmppc_set_sregs_e500_tlb ( struct kvm_vcpu vcpu,
struct kvm_sregs sregs 
)

Definition at line 1108 of file e500_tlb.c.