Lines Matching refs:vmwrite
107 vmx->vmwrite = (void *)vm_vaddr_alloc_page(vm); in vcpu_alloc_vmx()
108 vmx->vmwrite_hva = addr_gva2hva(vm, (uintptr_t)vmx->vmwrite); in vcpu_alloc_vmx()
109 vmx->vmwrite_gpa = addr_gva2gpa(vm, (uintptr_t)vmx->vmwrite); in vcpu_alloc_vmx()
195 vmwrite(VIRTUAL_PROCESSOR_ID, 0); in init_vmcs_control_fields()
196 vmwrite(POSTED_INTR_NV, 0); in init_vmcs_control_fields()
198 vmwrite(PIN_BASED_VM_EXEC_CONTROL, rdmsr(MSR_IA32_VMX_TRUE_PINBASED_CTLS)); in init_vmcs_control_fields()
210 vmwrite(EPT_POINTER, ept_paddr); in init_vmcs_control_fields()
214 if (!vmwrite(SECONDARY_VM_EXEC_CONTROL, sec_exec_ctl)) in init_vmcs_control_fields()
215 vmwrite(CPU_BASED_VM_EXEC_CONTROL, in init_vmcs_control_fields()
218 vmwrite(CPU_BASED_VM_EXEC_CONTROL, rdmsr(MSR_IA32_VMX_TRUE_PROCBASED_CTLS)); in init_vmcs_control_fields()
222 vmwrite(EXCEPTION_BITMAP, 0); in init_vmcs_control_fields()
223 vmwrite(PAGE_FAULT_ERROR_CODE_MASK, 0); in init_vmcs_control_fields()
224 vmwrite(PAGE_FAULT_ERROR_CODE_MATCH, -1); /* Never match */ in init_vmcs_control_fields()
225 vmwrite(CR3_TARGET_COUNT, 0); in init_vmcs_control_fields()
226 vmwrite(VM_EXIT_CONTROLS, rdmsr(MSR_IA32_VMX_EXIT_CTLS) | in init_vmcs_control_fields()
228 vmwrite(VM_EXIT_MSR_STORE_COUNT, 0); in init_vmcs_control_fields()
229 vmwrite(VM_EXIT_MSR_LOAD_COUNT, 0); in init_vmcs_control_fields()
230 vmwrite(VM_ENTRY_CONTROLS, rdmsr(MSR_IA32_VMX_ENTRY_CTLS) | in init_vmcs_control_fields()
232 vmwrite(VM_ENTRY_MSR_LOAD_COUNT, 0); in init_vmcs_control_fields()
233 vmwrite(VM_ENTRY_INTR_INFO_FIELD, 0); in init_vmcs_control_fields()
234 vmwrite(TPR_THRESHOLD, 0); in init_vmcs_control_fields()
236 vmwrite(CR0_GUEST_HOST_MASK, 0); in init_vmcs_control_fields()
237 vmwrite(CR4_GUEST_HOST_MASK, 0); in init_vmcs_control_fields()
238 vmwrite(CR0_READ_SHADOW, get_cr0()); in init_vmcs_control_fields()
239 vmwrite(CR4_READ_SHADOW, get_cr4()); in init_vmcs_control_fields()
241 vmwrite(MSR_BITMAP, vmx->msr_gpa); in init_vmcs_control_fields()
242 vmwrite(VMREAD_BITMAP, vmx->vmread_gpa); in init_vmcs_control_fields()
243 vmwrite(VMWRITE_BITMAP, vmx->vmwrite_gpa); in init_vmcs_control_fields()
255 vmwrite(HOST_ES_SELECTOR, get_es()); in init_vmcs_host_state()
256 vmwrite(HOST_CS_SELECTOR, get_cs()); in init_vmcs_host_state()
257 vmwrite(HOST_SS_SELECTOR, get_ss()); in init_vmcs_host_state()
258 vmwrite(HOST_DS_SELECTOR, get_ds()); in init_vmcs_host_state()
259 vmwrite(HOST_FS_SELECTOR, get_fs()); in init_vmcs_host_state()
260 vmwrite(HOST_GS_SELECTOR, get_gs()); in init_vmcs_host_state()
261 vmwrite(HOST_TR_SELECTOR, get_tr()); in init_vmcs_host_state()
264 vmwrite(HOST_IA32_PAT, rdmsr(MSR_IA32_CR_PAT)); in init_vmcs_host_state()
266 vmwrite(HOST_IA32_EFER, rdmsr(MSR_EFER)); in init_vmcs_host_state()
268 vmwrite(HOST_IA32_PERF_GLOBAL_CTRL, in init_vmcs_host_state()
271 vmwrite(HOST_IA32_SYSENTER_CS, rdmsr(MSR_IA32_SYSENTER_CS)); in init_vmcs_host_state()
273 vmwrite(HOST_CR0, get_cr0()); in init_vmcs_host_state()
274 vmwrite(HOST_CR3, get_cr3()); in init_vmcs_host_state()
275 vmwrite(HOST_CR4, get_cr4()); in init_vmcs_host_state()
276 vmwrite(HOST_FS_BASE, rdmsr(MSR_FS_BASE)); in init_vmcs_host_state()
277 vmwrite(HOST_GS_BASE, rdmsr(MSR_GS_BASE)); in init_vmcs_host_state()
278 vmwrite(HOST_TR_BASE, in init_vmcs_host_state()
280 vmwrite(HOST_GDTR_BASE, get_gdt().address); in init_vmcs_host_state()
281 vmwrite(HOST_IDTR_BASE, get_idt().address); in init_vmcs_host_state()
282 vmwrite(HOST_IA32_SYSENTER_ESP, rdmsr(MSR_IA32_SYSENTER_ESP)); in init_vmcs_host_state()
283 vmwrite(HOST_IA32_SYSENTER_EIP, rdmsr(MSR_IA32_SYSENTER_EIP)); in init_vmcs_host_state()
293 vmwrite(GUEST_ES_SELECTOR, vmreadz(HOST_ES_SELECTOR)); in init_vmcs_guest_state()
294 vmwrite(GUEST_CS_SELECTOR, vmreadz(HOST_CS_SELECTOR)); in init_vmcs_guest_state()
295 vmwrite(GUEST_SS_SELECTOR, vmreadz(HOST_SS_SELECTOR)); in init_vmcs_guest_state()
296 vmwrite(GUEST_DS_SELECTOR, vmreadz(HOST_DS_SELECTOR)); in init_vmcs_guest_state()
297 vmwrite(GUEST_FS_SELECTOR, vmreadz(HOST_FS_SELECTOR)); in init_vmcs_guest_state()
298 vmwrite(GUEST_GS_SELECTOR, vmreadz(HOST_GS_SELECTOR)); in init_vmcs_guest_state()
299 vmwrite(GUEST_LDTR_SELECTOR, 0); in init_vmcs_guest_state()
300 vmwrite(GUEST_TR_SELECTOR, vmreadz(HOST_TR_SELECTOR)); in init_vmcs_guest_state()
301 vmwrite(GUEST_INTR_STATUS, 0); in init_vmcs_guest_state()
302 vmwrite(GUEST_PML_INDEX, 0); in init_vmcs_guest_state()
304 vmwrite(VMCS_LINK_POINTER, -1ll); in init_vmcs_guest_state()
305 vmwrite(GUEST_IA32_DEBUGCTL, 0); in init_vmcs_guest_state()
306 vmwrite(GUEST_IA32_PAT, vmreadz(HOST_IA32_PAT)); in init_vmcs_guest_state()
307 vmwrite(GUEST_IA32_EFER, vmreadz(HOST_IA32_EFER)); in init_vmcs_guest_state()
308 vmwrite(GUEST_IA32_PERF_GLOBAL_CTRL, in init_vmcs_guest_state()
311 vmwrite(GUEST_ES_LIMIT, -1); in init_vmcs_guest_state()
312 vmwrite(GUEST_CS_LIMIT, -1); in init_vmcs_guest_state()
313 vmwrite(GUEST_SS_LIMIT, -1); in init_vmcs_guest_state()
314 vmwrite(GUEST_DS_LIMIT, -1); in init_vmcs_guest_state()
315 vmwrite(GUEST_FS_LIMIT, -1); in init_vmcs_guest_state()
316 vmwrite(GUEST_GS_LIMIT, -1); in init_vmcs_guest_state()
317 vmwrite(GUEST_LDTR_LIMIT, -1); in init_vmcs_guest_state()
318 vmwrite(GUEST_TR_LIMIT, 0x67); in init_vmcs_guest_state()
319 vmwrite(GUEST_GDTR_LIMIT, 0xffff); in init_vmcs_guest_state()
320 vmwrite(GUEST_IDTR_LIMIT, 0xffff); in init_vmcs_guest_state()
321 vmwrite(GUEST_ES_AR_BYTES, in init_vmcs_guest_state()
323 vmwrite(GUEST_CS_AR_BYTES, 0xa09b); in init_vmcs_guest_state()
324 vmwrite(GUEST_SS_AR_BYTES, 0xc093); in init_vmcs_guest_state()
325 vmwrite(GUEST_DS_AR_BYTES, in init_vmcs_guest_state()
327 vmwrite(GUEST_FS_AR_BYTES, in init_vmcs_guest_state()
329 vmwrite(GUEST_GS_AR_BYTES, in init_vmcs_guest_state()
331 vmwrite(GUEST_LDTR_AR_BYTES, 0x10000); in init_vmcs_guest_state()
332 vmwrite(GUEST_TR_AR_BYTES, 0x8b); in init_vmcs_guest_state()
333 vmwrite(GUEST_INTERRUPTIBILITY_INFO, 0); in init_vmcs_guest_state()
334 vmwrite(GUEST_ACTIVITY_STATE, 0); in init_vmcs_guest_state()
335 vmwrite(GUEST_SYSENTER_CS, vmreadz(HOST_IA32_SYSENTER_CS)); in init_vmcs_guest_state()
336 vmwrite(VMX_PREEMPTION_TIMER_VALUE, 0); in init_vmcs_guest_state()
338 vmwrite(GUEST_CR0, vmreadz(HOST_CR0)); in init_vmcs_guest_state()
339 vmwrite(GUEST_CR3, vmreadz(HOST_CR3)); in init_vmcs_guest_state()
340 vmwrite(GUEST_CR4, vmreadz(HOST_CR4)); in init_vmcs_guest_state()
341 vmwrite(GUEST_ES_BASE, 0); in init_vmcs_guest_state()
342 vmwrite(GUEST_CS_BASE, 0); in init_vmcs_guest_state()
343 vmwrite(GUEST_SS_BASE, 0); in init_vmcs_guest_state()
344 vmwrite(GUEST_DS_BASE, 0); in init_vmcs_guest_state()
345 vmwrite(GUEST_FS_BASE, vmreadz(HOST_FS_BASE)); in init_vmcs_guest_state()
346 vmwrite(GUEST_GS_BASE, vmreadz(HOST_GS_BASE)); in init_vmcs_guest_state()
347 vmwrite(GUEST_LDTR_BASE, 0); in init_vmcs_guest_state()
348 vmwrite(GUEST_TR_BASE, vmreadz(HOST_TR_BASE)); in init_vmcs_guest_state()
349 vmwrite(GUEST_GDTR_BASE, vmreadz(HOST_GDTR_BASE)); in init_vmcs_guest_state()
350 vmwrite(GUEST_IDTR_BASE, vmreadz(HOST_IDTR_BASE)); in init_vmcs_guest_state()
351 vmwrite(GUEST_DR7, 0x400); in init_vmcs_guest_state()
352 vmwrite(GUEST_RSP, (uint64_t)rsp); in init_vmcs_guest_state()
353 vmwrite(GUEST_RIP, (uint64_t)rip); in init_vmcs_guest_state()
354 vmwrite(GUEST_RFLAGS, 2); in init_vmcs_guest_state()
355 vmwrite(GUEST_PENDING_DBG_EXCEPTIONS, 0); in init_vmcs_guest_state()
356 vmwrite(GUEST_SYSENTER_ESP, vmreadz(HOST_IA32_SYSENTER_ESP)); in init_vmcs_guest_state()
357 vmwrite(GUEST_SYSENTER_EIP, vmreadz(HOST_IA32_SYSENTER_EIP)); in init_vmcs_guest_state()