Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
kvm_host.h File Reference
#include <linux/mutex.h>
#include <linux/hrtimer.h>
#include <linux/interrupt.h>
#include <linux/types.h>
#include <linux/kvm_types.h>
#include <linux/threads.h>
#include <linux/spinlock.h>
#include <linux/kvm_para.h>
#include <linux/list.h>
#include <linux/atomic.h>
#include <asm/kvm_asm.h>
#include <asm/processor.h>
#include <asm/page.h>
#include <asm/cacheflush.h>

Go to the source code of this file.

Data Structures

struct  kvm_vm_stat
 
struct  kvm_vcpu_stat
 
struct  kvmppc_exit_timing
 
struct  kvmppc_pginfo
 
struct  kvmppc_spapr_tce_table
 
struct  kvmppc_linear_info
 
struct  revmap_entry
 
struct  kvm_arch_memory_slot
 
struct  kvm_arch
 
struct  kvmppc_vcore
 
struct  kvmppc_vpa
 
struct  kvmppc_pte
 
struct  kvmppc_mmu
 
struct  kvmppc_slb
 
struct  kvm_vcpu_arch
 

Macros

#define KVM_MAX_VCPUS   NR_CPUS
 
#define KVM_MAX_VCORES   NR_CPUS
 
#define KVM_MEMORY_SLOTS   32
 
#define KVM_PRIVATE_MEM_SLOTS   4
 
#define KVM_MEM_SLOTS_NUM   (KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS)
 
#define KVM_HPAGE_GFN_SHIFT(x)   0
 
#define KVM_NR_PAGE_SIZES   1
 
#define KVM_PAGES_PER_HPAGE(x)   (1UL<<31)
 
#define HPTEG_CACHE_NUM   (1 << 15)
 
#define HPTEG_HASH_BITS_PTE   13
 
#define HPTEG_HASH_BITS_PTE_LONG   12
 
#define HPTEG_HASH_BITS_VPTE   13
 
#define HPTEG_HASH_BITS_VPTE_LONG   5
 
#define HPTEG_HASH_NUM_PTE   (1 << HPTEG_HASH_BITS_PTE)
 
#define HPTEG_HASH_NUM_PTE_LONG   (1 << HPTEG_HASH_BITS_PTE_LONG)
 
#define HPTEG_HASH_NUM_VPTE   (1 << HPTEG_HASH_BITS_VPTE)
 
#define HPTEG_HASH_NUM_VPTE_LONG   (1 << HPTEG_HASH_BITS_VPTE_LONG)
 
#define KVM_PAM   0x0fffffffffffffffULL
 
#define KVMPPC_RMAP_LOCK_BIT   63
 
#define KVMPPC_RMAP_RC_SHIFT   32
 
#define KVMPPC_RMAP_REFERENCED   (HPTE_R_R << KVMPPC_RMAP_RC_SHIFT)
 
#define KVMPPC_RMAP_CHANGED   (HPTE_R_C << KVMPPC_RMAP_RC_SHIFT)
 
#define KVMPPC_RMAP_PRESENT   0x100000000ul
 
#define KVMPPC_RMAP_INDEX   0xfffffffful
 
#define KVMPPC_PAGE_ORDER_MASK   0x1f
 
#define KVMPPC_PAGE_NO_CACHE   HPTE_R_I /* 0x20 */
 
#define KVMPPC_PAGE_WRITETHRU   HPTE_R_W /* 0x40 */
 
#define KVMPPC_GOT_PAGE   0x80
 
#define VCORE_ENTRY_COUNT(vc)   ((vc)->entry_exit_count & 0xff)
 
#define VCORE_EXIT_COUNT(vc)   ((vc)->entry_exit_count >> 8)
 
#define VCORE_INACTIVE   0
 
#define VCORE_RUNNING   1
 
#define VCORE_EXITING   2
 
#define VCORE_SLEEPING   3
 
#define KVMPPC_VCPU_STOPPED   0
 
#define KVMPPC_VCPU_BUSY_IN_HOST   1
 
#define KVMPPC_VCPU_RUNNABLE   2
 
#define KVM_MMIO_REG_MASK   0x001f
 
#define KVM_MMIO_REG_EXT_MASK   0xffe0
 
#define KVM_MMIO_REG_GPR   0x0000
 
#define KVM_MMIO_REG_FPR   0x0020
 
#define KVM_MMIO_REG_QPR   0x0040
 
#define KVM_MMIO_REG_FQPR   0x0060
 
#define __KVM_HAVE_ARCH_WQP
 

Enumerations

enum  kvm_exit_types {
  MMIO_EXITS, DCR_EXITS, SIGNAL_EXITS, ITLB_REAL_MISS_EXITS,
  ITLB_VIRT_MISS_EXITS, DTLB_REAL_MISS_EXITS, DTLB_VIRT_MISS_EXITS, SYSCALL_EXITS,
  ISI_EXITS, DSI_EXITS, EMULATED_INST_EXITS, EMULATED_MTMSRWE_EXITS,
  EMULATED_WRTEE_EXITS, EMULATED_MTSPR_EXITS, EMULATED_MFSPR_EXITS, EMULATED_MTMSR_EXITS,
  EMULATED_MFMSR_EXITS, EMULATED_TLBSX_EXITS, EMULATED_TLBWE_EXITS, EMULATED_RFI_EXITS,
  EMULATED_RFCI_EXITS, DEC_EXITS, EXT_INTR_EXITS, HALT_WAKEUP,
  USR_PR_INST, FP_UNAVAIL, DEBUG_EXITS, TIMEINGUEST,
  DBELL_EXITS, GDBELL_EXITS, __NUMBER_OF_KVM_EXIT_TYPES
}
 

Macro Definition Documentation

#define __KVM_HAVE_ARCH_WQP

Definition at line 553 of file kvm_host.h.

#define HPTEG_CACHE_NUM   (1 << 15)

Definition at line 69 of file kvm_host.h.

#define HPTEG_HASH_BITS_PTE   13

Definition at line 70 of file kvm_host.h.

#define HPTEG_HASH_BITS_PTE_LONG   12

Definition at line 71 of file kvm_host.h.

#define HPTEG_HASH_BITS_VPTE   13

Definition at line 72 of file kvm_host.h.

#define HPTEG_HASH_BITS_VPTE_LONG   5

Definition at line 73 of file kvm_host.h.

#define HPTEG_HASH_NUM_PTE   (1 << HPTEG_HASH_BITS_PTE)

Definition at line 74 of file kvm_host.h.

#define HPTEG_HASH_NUM_PTE_LONG   (1 << HPTEG_HASH_BITS_PTE_LONG)

Definition at line 75 of file kvm_host.h.

#define HPTEG_HASH_NUM_VPTE   (1 << HPTEG_HASH_BITS_VPTE)

Definition at line 76 of file kvm_host.h.

#define HPTEG_HASH_NUM_VPTE_LONG   (1 << HPTEG_HASH_BITS_VPTE_LONG)

Definition at line 77 of file kvm_host.h.

#define KVM_HPAGE_GFN_SHIFT (   x)    0

Definition at line 65 of file kvm_host.h.

#define KVM_MAX_VCORES   NR_CPUS

Definition at line 39 of file kvm_host.h.

#define KVM_MAX_VCPUS   NR_CPUS

Definition at line 38 of file kvm_host.h.

#define KVM_MEM_SLOTS_NUM   (KVM_MEMORY_SLOTS + KVM_PRIVATE_MEM_SLOTS)

Definition at line 43 of file kvm_host.h.

#define KVM_MEMORY_SLOTS   32

Definition at line 40 of file kvm_host.h.

#define KVM_MMIO_REG_EXT_MASK   0xffe0

Definition at line 547 of file kvm_host.h.

#define KVM_MMIO_REG_FPR   0x0020

Definition at line 549 of file kvm_host.h.

#define KVM_MMIO_REG_FQPR   0x0060

Definition at line 551 of file kvm_host.h.

#define KVM_MMIO_REG_GPR   0x0000

Definition at line 548 of file kvm_host.h.

#define KVM_MMIO_REG_MASK   0x001f

Definition at line 546 of file kvm_host.h.

#define KVM_MMIO_REG_QPR   0x0040

Definition at line 550 of file kvm_host.h.

#define KVM_NR_PAGE_SIZES   1

Definition at line 66 of file kvm_host.h.

#define KVM_PAGES_PER_HPAGE (   x)    (1UL<<31)

Definition at line 67 of file kvm_host.h.

#define KVM_PAM   0x0fffffffffffffffULL

Definition at line 80 of file kvm_host.h.

#define KVM_PRIVATE_MEM_SLOTS   4

Definition at line 42 of file kvm_host.h.

#define KVMPPC_GOT_PAGE   0x80

Definition at line 222 of file kvm_host.h.

#define KVMPPC_PAGE_NO_CACHE   HPTE_R_I /* 0x20 */

Definition at line 220 of file kvm_host.h.

#define KVMPPC_PAGE_ORDER_MASK   0x1f

Definition at line 219 of file kvm_host.h.

#define KVMPPC_PAGE_WRITETHRU   HPTE_R_W /* 0x40 */

Definition at line 221 of file kvm_host.h.

#define KVMPPC_RMAP_CHANGED   (HPTE_R_C << KVMPPC_RMAP_RC_SHIFT)

Definition at line 214 of file kvm_host.h.

#define KVMPPC_RMAP_INDEX   0xfffffffful

Definition at line 216 of file kvm_host.h.

#define KVMPPC_RMAP_LOCK_BIT   63

Definition at line 211 of file kvm_host.h.

#define KVMPPC_RMAP_PRESENT   0x100000000ul

Definition at line 215 of file kvm_host.h.

#define KVMPPC_RMAP_RC_SHIFT   32

Definition at line 212 of file kvm_host.h.

#define KVMPPC_RMAP_REFERENCED   (HPTE_R_R << KVMPPC_RMAP_RC_SHIFT)

Definition at line 213 of file kvm_host.h.

#define KVMPPC_VCPU_BUSY_IN_HOST   1

Definition at line 542 of file kvm_host.h.

#define KVMPPC_VCPU_RUNNABLE   2

Definition at line 543 of file kvm_host.h.

#define KVMPPC_VCPU_STOPPED   0

Definition at line 541 of file kvm_host.h.

#define VCORE_ENTRY_COUNT (   vc)    ((vc)->entry_exit_count & 0xff)

Definition at line 286 of file kvm_host.h.

#define VCORE_EXIT_COUNT (   vc)    ((vc)->entry_exit_count >> 8)

Definition at line 287 of file kvm_host.h.

#define VCORE_EXITING   2

Definition at line 292 of file kvm_host.h.

#define VCORE_INACTIVE   0

Definition at line 290 of file kvm_host.h.

#define VCORE_RUNNING   1

Definition at line 291 of file kvm_host.h.

#define VCORE_SLEEPING   3

Definition at line 293 of file kvm_host.h.

Enumeration Type Documentation

Enumerator:
MMIO_EXITS 
DCR_EXITS 
SIGNAL_EXITS 
ITLB_REAL_MISS_EXITS 
ITLB_VIRT_MISS_EXITS 
DTLB_REAL_MISS_EXITS 
DTLB_VIRT_MISS_EXITS 
SYSCALL_EXITS 
ISI_EXITS 
DSI_EXITS 
EMULATED_INST_EXITS 
EMULATED_MTMSRWE_EXITS 
EMULATED_WRTEE_EXITS 
EMULATED_MTSPR_EXITS 
EMULATED_MFSPR_EXITS 
EMULATED_MTMSR_EXITS 
EMULATED_MFMSR_EXITS 
EMULATED_TLBSX_EXITS 
EMULATED_TLBWE_EXITS 
EMULATED_RFI_EXITS 
EMULATED_RFCI_EXITS 
DEC_EXITS 
EXT_INTR_EXITS 
HALT_WAKEUP 
USR_PR_INST 
FP_UNAVAIL 
DEBUG_EXITS 
TIMEINGUEST 
DBELL_EXITS 
GDBELL_EXITS 
__NUMBER_OF_KVM_EXIT_TYPES 

Definition at line 127 of file kvm_host.h.