Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/vmm/intel/vmx.h
| Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | enum { | ||||
| IDX_MSR_CSTAR, | IDX_MSR_CSTAR, | ||||
| IDX_MSR_STAR, | IDX_MSR_STAR, | ||||
| IDX_MSR_SF_MASK, | IDX_MSR_SF_MASK, | ||||
| IDX_MSR_KGSBASE, | IDX_MSR_KGSBASE, | ||||
| IDX_MSR_PAT, | IDX_MSR_PAT, | ||||
| GUEST_MSR_NUM /* must be the last enumeration */ | GUEST_MSR_NUM /* must be the last enumeration */ | ||||
| }; | }; | ||||
| /* per vcpu msrs */ | |||||
| struct vmx_msrs { | |||||
| uint64_t reg[GUEST_MSR_NUM]; | |||||
| }; | |||||
| /* virtual machine softc */ | /* virtual machine softc */ | ||||
| struct vmx { | struct vmx { | ||||
| struct vmcs vmcs[VM_MAXCPU]; /* one vmcs per virtual cpu */ | struct vmcs vmcs[VM_MAXCPU]; /* one vmcs per virtual cpu */ | ||||
| struct apic_page apic_page[VM_MAXCPU]; /* one apic page per vcpu */ | struct apic_page apic_page[VM_MAXCPU]; /* one apic page per vcpu */ | ||||
| char msr_bitmap[PAGE_SIZE]; | char msr_bitmap[PAGE_SIZE]; | ||||
| struct pir_desc pir_desc[VM_MAXCPU]; | struct pir_desc pir_desc[VM_MAXCPU]; | ||||
| uint64_t guest_msrs[VM_MAXCPU][GUEST_MSR_NUM]; | struct vmx_msrs guest_msrs[VM_MAXCPU]; | ||||
| struct vmxctx ctx[VM_MAXCPU]; | struct vmxctx ctx[VM_MAXCPU]; | ||||
| struct vmxcap cap[VM_MAXCPU]; | struct vmxcap cap[VM_MAXCPU]; | ||||
| struct vmxstate state[VM_MAXCPU]; | struct vmxstate state[VM_MAXCPU]; | ||||
| uint64_t eptp; | uint64_t eptp; | ||||
| struct vm *vm; | struct vm *vm; | ||||
| long eptgen[MAXCPU]; /* cached pmap->pm_eptgen */ | long eptgen[MAXCPU]; /* cached pmap->pm_eptgen */ | ||||
| }; | }; | ||||
| CTASSERT((offsetof(struct vmx, vmcs) & PAGE_MASK) == 0); | CTASSERT((offsetof(struct vmx, vmcs) & PAGE_MASK) == 0); | ||||
| Show All 19 Lines | |||||