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

Go to the source code of this file.

Macros

#define PT64_PT_BITS   9
 
#define PT64_ENT_PER_PAGE   (1 << PT64_PT_BITS)
 
#define PT32_PT_BITS   10
 
#define PT32_ENT_PER_PAGE   (1 << PT32_PT_BITS)
 
#define PT_WRITABLE_SHIFT   1
 
#define PT_PRESENT_MASK   (1ULL << 0)
 
#define PT_WRITABLE_MASK   (1ULL << PT_WRITABLE_SHIFT)
 
#define PT_USER_MASK   (1ULL << 2)
 
#define PT_PWT_MASK   (1ULL << 3)
 
#define PT_PCD_MASK   (1ULL << 4)
 
#define PT_ACCESSED_SHIFT   5
 
#define PT_ACCESSED_MASK   (1ULL << PT_ACCESSED_SHIFT)
 
#define PT_DIRTY_SHIFT   6
 
#define PT_DIRTY_MASK   (1ULL << PT_DIRTY_SHIFT)
 
#define PT_PAGE_SIZE_SHIFT   7
 
#define PT_PAGE_SIZE_MASK   (1ULL << PT_PAGE_SIZE_SHIFT)
 
#define PT_PAT_MASK   (1ULL << 7)
 
#define PT_GLOBAL_MASK   (1ULL << 8)
 
#define PT64_NX_SHIFT   63
 
#define PT64_NX_MASK   (1ULL << PT64_NX_SHIFT)
 
#define PT_PAT_SHIFT   7
 
#define PT_DIR_PAT_SHIFT   12
 
#define PT_DIR_PAT_MASK   (1ULL << PT_DIR_PAT_SHIFT)
 
#define PT32_DIR_PSE36_SIZE   4
 
#define PT32_DIR_PSE36_SHIFT   13
 
#define PT32_DIR_PSE36_MASK   (((1ULL << PT32_DIR_PSE36_SIZE) - 1) << PT32_DIR_PSE36_SHIFT)
 
#define PT64_ROOT_LEVEL   4
 
#define PT32_ROOT_LEVEL   2
 
#define PT32E_ROOT_LEVEL   3
 
#define PT_PDPE_LEVEL   3
 
#define PT_DIRECTORY_LEVEL   2
 
#define PT_PAGE_TABLE_LEVEL   1
 
#define PFERR_PRESENT_MASK   (1U << 0)
 
#define PFERR_WRITE_MASK   (1U << 1)
 
#define PFERR_USER_MASK   (1U << 2)
 
#define PFERR_RSVD_MASK   (1U << 3)
 
#define PFERR_FETCH_MASK   (1U << 4)
 

Functions

int kvm_mmu_get_spte_hierarchy (struct kvm_vcpu *vcpu, u64 addr, u64 sptes[4])
 
void kvm_mmu_set_mmio_spte_mask (u64 mmio_mask)
 
int handle_mmio_page_fault_common (struct kvm_vcpu *vcpu, u64 addr, bool direct)
 
int kvm_init_shadow_mmu (struct kvm_vcpu *vcpu, struct kvm_mmu *context)
 

Macro Definition Documentation

#define PFERR_FETCH_MASK   (1U << 4)

Definition at line 51 of file mmu.h.

#define PFERR_PRESENT_MASK   (1U << 0)

Definition at line 47 of file mmu.h.

#define PFERR_RSVD_MASK   (1U << 3)

Definition at line 50 of file mmu.h.

#define PFERR_USER_MASK   (1U << 2)

Definition at line 49 of file mmu.h.

#define PFERR_WRITE_MASK   (1U << 1)

Definition at line 48 of file mmu.h.

#define PT32_DIR_PSE36_MASK   (((1ULL << PT32_DIR_PSE36_SIZE) - 1) << PT32_DIR_PSE36_SHIFT)

Definition at line 36 of file mmu.h.

#define PT32_DIR_PSE36_SHIFT   13

Definition at line 35 of file mmu.h.

#define PT32_DIR_PSE36_SIZE   4

Definition at line 34 of file mmu.h.

#define PT32_ENT_PER_PAGE   (1 << PT32_PT_BITS)

Definition at line 10 of file mmu.h.

#define PT32_PT_BITS   10

Definition at line 9 of file mmu.h.

#define PT32_ROOT_LEVEL   2

Definition at line 40 of file mmu.h.

#define PT32E_ROOT_LEVEL   3

Definition at line 41 of file mmu.h.

#define PT64_ENT_PER_PAGE   (1 << PT64_PT_BITS)

Definition at line 8 of file mmu.h.

#define PT64_NX_MASK   (1ULL << PT64_NX_SHIFT)

Definition at line 28 of file mmu.h.

#define PT64_NX_SHIFT   63

Definition at line 27 of file mmu.h.

#define PT64_PT_BITS   9

Definition at line 7 of file mmu.h.

#define PT64_ROOT_LEVEL   4

Definition at line 39 of file mmu.h.

#define PT_ACCESSED_MASK   (1ULL << PT_ACCESSED_SHIFT)

Definition at line 20 of file mmu.h.

#define PT_ACCESSED_SHIFT   5

Definition at line 19 of file mmu.h.

#define PT_DIR_PAT_MASK   (1ULL << PT_DIR_PAT_SHIFT)

Definition at line 32 of file mmu.h.

#define PT_DIR_PAT_SHIFT   12

Definition at line 31 of file mmu.h.

#define PT_DIRECTORY_LEVEL   2

Definition at line 44 of file mmu.h.

#define PT_DIRTY_MASK   (1ULL << PT_DIRTY_SHIFT)

Definition at line 22 of file mmu.h.

#define PT_DIRTY_SHIFT   6

Definition at line 21 of file mmu.h.

#define PT_GLOBAL_MASK   (1ULL << 8)

Definition at line 26 of file mmu.h.

#define PT_PAGE_SIZE_MASK   (1ULL << PT_PAGE_SIZE_SHIFT)

Definition at line 24 of file mmu.h.

#define PT_PAGE_SIZE_SHIFT   7

Definition at line 23 of file mmu.h.

#define PT_PAGE_TABLE_LEVEL   1

Definition at line 45 of file mmu.h.

#define PT_PAT_MASK   (1ULL << 7)

Definition at line 25 of file mmu.h.

#define PT_PAT_SHIFT   7

Definition at line 30 of file mmu.h.

#define PT_PCD_MASK   (1ULL << 4)

Definition at line 18 of file mmu.h.

#define PT_PDPE_LEVEL   3

Definition at line 43 of file mmu.h.

#define PT_PRESENT_MASK   (1ULL << 0)

Definition at line 14 of file mmu.h.

#define PT_PWT_MASK   (1ULL << 3)

Definition at line 17 of file mmu.h.

#define PT_USER_MASK   (1ULL << 2)

Definition at line 16 of file mmu.h.

#define PT_WRITABLE_MASK   (1ULL << PT_WRITABLE_SHIFT)

Definition at line 15 of file mmu.h.

#define PT_WRITABLE_SHIFT   1

Definition at line 12 of file mmu.h.

Function Documentation

int handle_mmio_page_fault_common ( struct kvm_vcpu vcpu,
u64  addr,
bool  direct 
)

Definition at line 3176 of file mmu.c.

int kvm_init_shadow_mmu ( struct kvm_vcpu vcpu,
struct kvm_mmu context 
)

Definition at line 3683 of file mmu.c.

int kvm_mmu_get_spte_hierarchy ( struct kvm_vcpu vcpu,
u64  addr,
u64  sptes[4] 
)

Definition at line 4339 of file mmu.c.

void kvm_mmu_set_mmio_spte_mask ( u64  mmio_mask)

Definition at line 194 of file mmu.c.