Linux Kernel
3.7.1
|
#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) |
#define PAGE_MASK_4K (~(PAGE_SIZE_4K - 1)) |
#define PPC44x_TLB_SUPER_PERM_MASK (PPC44x_TLB_SX|PPC44x_TLB_SR|PPC44x_TLB_SW) |
#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_TLBE_SIZE PPC44x_TLB_4K |
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.