Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
44x_tlb.c File Reference
#include <linux/types.h>
#include <linux/string.h>
#include <linux/kvm.h>
#include <linux/kvm_host.h>
#include <linux/highmem.h>
#include <asm/tlbflush.h>
#include <asm/mmu-44x.h>
#include <asm/kvm_ppc.h>
#include <asm/kvm_44x.h>
#include "timing.h"
#include "44x_tlb.h"
#include "trace.h"

Go to the source code of this file.

Macros

#define PPC44x_TLBE_SIZE   PPC44x_TLB_4K
 
#define PAGE_SIZE_4K   (1<<12)
 
#define PAGE_MASK_4K   (~(PAGE_SIZE_4K - 1))
 
#define PPC44x_TLB_UATTR_MASK   (PPC44x_TLB_U0|PPC44x_TLB_U1|PPC44x_TLB_U2|PPC44x_TLB_U3)
 
#define PPC44x_TLB_USER_PERM_MASK   (PPC44x_TLB_UX|PPC44x_TLB_UR|PPC44x_TLB_UW)
 
#define PPC44x_TLB_SUPER_PERM_MASK   (PPC44x_TLB_SX|PPC44x_TLB_SR|PPC44x_TLB_SW)
 

Functions

void kvmppc_44x_tlb_load (struct kvm_vcpu *vcpu)
 
void kvmppc_44x_tlb_put (struct kvm_vcpu *vcpu)
 
int kvmppc_44x_tlb_index (struct kvm_vcpu *vcpu, gva_t eaddr, unsigned int pid, unsigned int as)
 
gpa_t kvmppc_mmu_xlate (struct kvm_vcpu *vcpu, unsigned int gtlb_index, gva_t eaddr)
 
int kvmppc_mmu_itlb_index (struct kvm_vcpu *vcpu, gva_t eaddr)
 
int kvmppc_mmu_dtlb_index (struct kvm_vcpu *vcpu, gva_t eaddr)
 
void kvmppc_mmu_itlb_miss (struct kvm_vcpu *vcpu)
 
void kvmppc_mmu_dtlb_miss (struct kvm_vcpu *vcpu)
 
void kvmppc_mmu_destroy (struct kvm_vcpu *vcpu)
 
void kvmppc_mmu_map (struct kvm_vcpu *vcpu, u64 gvaddr, gpa_t gpaddr, unsigned int gtlb_index)
 
void kvmppc_mmu_msr_notify (struct kvm_vcpu *vcpu, u32 old_msr)
 
void kvmppc_set_pid (struct kvm_vcpu *vcpu, u32 new_pid)
 
int kvmppc_44x_emul_tlbwe (struct kvm_vcpu *vcpu, u8 ra, u8 rs, u8 ws)
 
int kvmppc_44x_emul_tlbsx (struct kvm_vcpu *vcpu, u8 rt, u8 ra, u8 rb, u8 rc)
 

Macro Definition Documentation

#define PAGE_MASK_4K   (~(PAGE_SIZE_4K - 1))

Definition at line 40 of file 44x_tlb.c.

#define PAGE_SIZE_4K   (1<<12)

Definition at line 39 of file 44x_tlb.c.

#define PPC44x_TLB_SUPER_PERM_MASK   (PPC44x_TLB_SX|PPC44x_TLB_SR|PPC44x_TLB_SW)

Definition at line 45 of file 44x_tlb.c.

#define PPC44x_TLB_UATTR_MASK   (PPC44x_TLB_U0|PPC44x_TLB_U1|PPC44x_TLB_U2|PPC44x_TLB_U3)

Definition at line 42 of file 44x_tlb.c.

#define PPC44x_TLB_USER_PERM_MASK   (PPC44x_TLB_UX|PPC44x_TLB_UR|PPC44x_TLB_UW)

Definition at line 44 of file 44x_tlb.c.

#define PPC44x_TLBE_SIZE   PPC44x_TLB_4K

Definition at line 36 of file 44x_tlb.c.

Function Documentation

int kvmppc_44x_emul_tlbsx ( struct kvm_vcpu vcpu,
u8  rt,
u8  ra,
u8  rb,
u8  rc 
)

Definition at line 499 of file 44x_tlb.c.

int kvmppc_44x_emul_tlbwe ( struct kvm_vcpu vcpu,
u8  ra,
u8  rs,
u8  ws 
)

Definition at line 439 of file 44x_tlb.c.

int kvmppc_44x_tlb_index ( struct kvm_vcpu vcpu,
gva_t  eaddr,
unsigned int  pid,
unsigned int  as 
)

Definition at line 180 of file 44x_tlb.c.

void kvmppc_44x_tlb_load ( struct kvm_vcpu vcpu)

Definition at line 142 of file 44x_tlb.c.

void kvmppc_44x_tlb_put ( struct kvm_vcpu vcpu)

Definition at line 162 of file 44x_tlb.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_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_msr_notify ( struct kvm_vcpu vcpu,
u32  old_msr 
)

Definition at line 389 of file 44x_tlb.c.

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.

void kvmppc_set_pid ( struct kvm_vcpu vcpu,
u32  new_pid 
)

Definition at line 396 of file 44x_tlb.c.