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()
215 vmwrite(VIRTUAL_PROCESSOR_ID, 0); in init_vmcs_control_fields()
216 vmwrite(POSTED_INTR_NV, 0); in init_vmcs_control_fields()
218 vmwrite(PIN_BASED_VM_EXEC_CONTROL, rdmsr(MSR_IA32_VMX_TRUE_PINBASED_CTLS)); in init_vmcs_control_fields()
230 vmwrite(EPT_POINTER, ept_paddr); in init_vmcs_control_fields()
234 if (!vmwrite(SECONDARY_VM_EXEC_CONTROL, sec_exec_ctl)) in init_vmcs_control_fields()
235 vmwrite(CPU_BASED_VM_EXEC_CONTROL, in init_vmcs_control_fields()
238 vmwrite(CPU_BASED_VM_EXEC_CONTROL, rdmsr(MSR_IA32_VMX_TRUE_PROCBASED_CTLS)); in init_vmcs_control_fields()
242 vmwrite(EXCEPTION_BITMAP, 0); in init_vmcs_control_fields()
243 vmwrite(PAGE_FAULT_ERROR_CODE_MASK, 0); in init_vmcs_control_fields()
244 vmwrite(PAGE_FAULT_ERROR_CODE_MATCH, -1); /* Never match */ in init_vmcs_control_fields()
245 vmwrite(CR3_TARGET_COUNT, 0); in init_vmcs_control_fields()
246 vmwrite(VM_EXIT_CONTROLS, rdmsr(MSR_IA32_VMX_EXIT_CTLS) | in init_vmcs_control_fields()
248 vmwrite(VM_EXIT_MSR_STORE_COUNT, 0); in init_vmcs_control_fields()
249 vmwrite(VM_EXIT_MSR_LOAD_COUNT, 0); in init_vmcs_control_fields()
250 vmwrite(VM_ENTRY_CONTROLS, rdmsr(MSR_IA32_VMX_ENTRY_CTLS) | in init_vmcs_control_fields()
252 vmwrite(VM_ENTRY_MSR_LOAD_COUNT, 0); in init_vmcs_control_fields()
253 vmwrite(VM_ENTRY_INTR_INFO_FIELD, 0); in init_vmcs_control_fields()
254 vmwrite(TPR_THRESHOLD, 0); in init_vmcs_control_fields()
256 vmwrite(CR0_GUEST_HOST_MASK, 0); in init_vmcs_control_fields()
257 vmwrite(CR4_GUEST_HOST_MASK, 0); in init_vmcs_control_fields()
258 vmwrite(CR0_READ_SHADOW, get_cr0()); in init_vmcs_control_fields()
259 vmwrite(CR4_READ_SHADOW, get_cr4()); in init_vmcs_control_fields()
261 vmwrite(MSR_BITMAP, vmx->msr_gpa); in init_vmcs_control_fields()
262 vmwrite(VMREAD_BITMAP, vmx->vmread_gpa); in init_vmcs_control_fields()
263 vmwrite(VMWRITE_BITMAP, vmx->vmwrite_gpa); in init_vmcs_control_fields()
275 vmwrite(HOST_ES_SELECTOR, get_es()); in init_vmcs_host_state()
276 vmwrite(HOST_CS_SELECTOR, get_cs()); in init_vmcs_host_state()
277 vmwrite(HOST_SS_SELECTOR, get_ss()); in init_vmcs_host_state()
278 vmwrite(HOST_DS_SELECTOR, get_ds()); in init_vmcs_host_state()
279 vmwrite(HOST_FS_SELECTOR, get_fs()); in init_vmcs_host_state()
280 vmwrite(HOST_GS_SELECTOR, get_gs()); in init_vmcs_host_state()
281 vmwrite(HOST_TR_SELECTOR, get_tr()); in init_vmcs_host_state()
284 vmwrite(HOST_IA32_PAT, rdmsr(MSR_IA32_CR_PAT)); in init_vmcs_host_state()
286 vmwrite(HOST_IA32_EFER, rdmsr(MSR_EFER)); in init_vmcs_host_state()
288 vmwrite(HOST_IA32_PERF_GLOBAL_CTRL, in init_vmcs_host_state()
291 vmwrite(HOST_IA32_SYSENTER_CS, rdmsr(MSR_IA32_SYSENTER_CS)); in init_vmcs_host_state()
293 vmwrite(HOST_CR0, get_cr0()); in init_vmcs_host_state()
294 vmwrite(HOST_CR3, get_cr3()); in init_vmcs_host_state()
295 vmwrite(HOST_CR4, get_cr4()); in init_vmcs_host_state()
296 vmwrite(HOST_FS_BASE, rdmsr(MSR_FS_BASE)); in init_vmcs_host_state()
297 vmwrite(HOST_GS_BASE, rdmsr(MSR_GS_BASE)); in init_vmcs_host_state()
298 vmwrite(HOST_TR_BASE, in init_vmcs_host_state()
300 vmwrite(HOST_GDTR_BASE, get_gdt().address); in init_vmcs_host_state()
301 vmwrite(HOST_IDTR_BASE, get_idt().address); in init_vmcs_host_state()
302 vmwrite(HOST_IA32_SYSENTER_ESP, rdmsr(MSR_IA32_SYSENTER_ESP)); in init_vmcs_host_state()
303 vmwrite(HOST_IA32_SYSENTER_EIP, rdmsr(MSR_IA32_SYSENTER_EIP)); in init_vmcs_host_state()
313 vmwrite(GUEST_ES_SELECTOR, vmreadz(HOST_ES_SELECTOR)); in init_vmcs_guest_state()
314 vmwrite(GUEST_CS_SELECTOR, vmreadz(HOST_CS_SELECTOR)); in init_vmcs_guest_state()
315 vmwrite(GUEST_SS_SELECTOR, vmreadz(HOST_SS_SELECTOR)); in init_vmcs_guest_state()
316 vmwrite(GUEST_DS_SELECTOR, vmreadz(HOST_DS_SELECTOR)); in init_vmcs_guest_state()
317 vmwrite(GUEST_FS_SELECTOR, vmreadz(HOST_FS_SELECTOR)); in init_vmcs_guest_state()
318 vmwrite(GUEST_GS_SELECTOR, vmreadz(HOST_GS_SELECTOR)); in init_vmcs_guest_state()
319 vmwrite(GUEST_LDTR_SELECTOR, 0); in init_vmcs_guest_state()
320 vmwrite(GUEST_TR_SELECTOR, vmreadz(HOST_TR_SELECTOR)); in init_vmcs_guest_state()
321 vmwrite(GUEST_INTR_STATUS, 0); in init_vmcs_guest_state()
322 vmwrite(GUEST_PML_INDEX, 0); in init_vmcs_guest_state()
324 vmwrite(VMCS_LINK_POINTER, -1ll); in init_vmcs_guest_state()
325 vmwrite(GUEST_IA32_DEBUGCTL, 0); in init_vmcs_guest_state()
326 vmwrite(GUEST_IA32_PAT, vmreadz(HOST_IA32_PAT)); in init_vmcs_guest_state()
327 vmwrite(GUEST_IA32_EFER, vmreadz(HOST_IA32_EFER)); in init_vmcs_guest_state()
328 vmwrite(GUEST_IA32_PERF_GLOBAL_CTRL, in init_vmcs_guest_state()
331 vmwrite(GUEST_ES_LIMIT, -1); in init_vmcs_guest_state()
332 vmwrite(GUEST_CS_LIMIT, -1); in init_vmcs_guest_state()
333 vmwrite(GUEST_SS_LIMIT, -1); in init_vmcs_guest_state()
334 vmwrite(GUEST_DS_LIMIT, -1); in init_vmcs_guest_state()
335 vmwrite(GUEST_FS_LIMIT, -1); in init_vmcs_guest_state()
336 vmwrite(GUEST_GS_LIMIT, -1); in init_vmcs_guest_state()
337 vmwrite(GUEST_LDTR_LIMIT, -1); in init_vmcs_guest_state()
338 vmwrite(GUEST_TR_LIMIT, 0x67); in init_vmcs_guest_state()
339 vmwrite(GUEST_GDTR_LIMIT, 0xffff); in init_vmcs_guest_state()
340 vmwrite(GUEST_IDTR_LIMIT, 0xffff); in init_vmcs_guest_state()
341 vmwrite(GUEST_ES_AR_BYTES, in init_vmcs_guest_state()
343 vmwrite(GUEST_CS_AR_BYTES, 0xa09b); in init_vmcs_guest_state()
344 vmwrite(GUEST_SS_AR_BYTES, 0xc093); in init_vmcs_guest_state()
345 vmwrite(GUEST_DS_AR_BYTES, in init_vmcs_guest_state()
347 vmwrite(GUEST_FS_AR_BYTES, in init_vmcs_guest_state()
349 vmwrite(GUEST_GS_AR_BYTES, in init_vmcs_guest_state()
351 vmwrite(GUEST_LDTR_AR_BYTES, 0x10000); in init_vmcs_guest_state()
352 vmwrite(GUEST_TR_AR_BYTES, 0x8b); in init_vmcs_guest_state()
353 vmwrite(GUEST_INTERRUPTIBILITY_INFO, 0); in init_vmcs_guest_state()
354 vmwrite(GUEST_ACTIVITY_STATE, 0); in init_vmcs_guest_state()
355 vmwrite(GUEST_SYSENTER_CS, vmreadz(HOST_IA32_SYSENTER_CS)); in init_vmcs_guest_state()
356 vmwrite(VMX_PREEMPTION_TIMER_VALUE, 0); in init_vmcs_guest_state()
358 vmwrite(GUEST_CR0, vmreadz(HOST_CR0)); in init_vmcs_guest_state()
359 vmwrite(GUEST_CR3, vmreadz(HOST_CR3)); in init_vmcs_guest_state()
360 vmwrite(GUEST_CR4, vmreadz(HOST_CR4)); in init_vmcs_guest_state()
361 vmwrite(GUEST_ES_BASE, 0); in init_vmcs_guest_state()
362 vmwrite(GUEST_CS_BASE, 0); in init_vmcs_guest_state()
363 vmwrite(GUEST_SS_BASE, 0); in init_vmcs_guest_state()
364 vmwrite(GUEST_DS_BASE, 0); in init_vmcs_guest_state()
365 vmwrite(GUEST_FS_BASE, vmreadz(HOST_FS_BASE)); in init_vmcs_guest_state()
366 vmwrite(GUEST_GS_BASE, vmreadz(HOST_GS_BASE)); in init_vmcs_guest_state()
367 vmwrite(GUEST_LDTR_BASE, 0); in init_vmcs_guest_state()
368 vmwrite(GUEST_TR_BASE, vmreadz(HOST_TR_BASE)); in init_vmcs_guest_state()
369 vmwrite(GUEST_GDTR_BASE, vmreadz(HOST_GDTR_BASE)); in init_vmcs_guest_state()
370 vmwrite(GUEST_IDTR_BASE, vmreadz(HOST_IDTR_BASE)); in init_vmcs_guest_state()
371 vmwrite(GUEST_DR7, 0x400); in init_vmcs_guest_state()
372 vmwrite(GUEST_RSP, (uint64_t)rsp); in init_vmcs_guest_state()
373 vmwrite(GUEST_RIP, (uint64_t)rip); in init_vmcs_guest_state()
374 vmwrite(GUEST_RFLAGS, 2); in init_vmcs_guest_state()
375 vmwrite(GUEST_PENDING_DBG_EXCEPTIONS, 0); in init_vmcs_guest_state()
376 vmwrite(GUEST_SYSENTER_ESP, vmreadz(HOST_IA32_SYSENTER_ESP)); in init_vmcs_guest_state()
377 vmwrite(GUEST_SYSENTER_EIP, vmreadz(HOST_IA32_SYSENTER_EIP)); in init_vmcs_guest_state()