Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proc VMexit
- ;; 2 - save debug controls
- ;; 9 - host address-space size
- ;; 12 - load IA32_PERF_GLOBAL_CTRL
- ;; 15 - исключение на выходе
- ;; 18 - save IA32_PAT
- ;; 19 - load IA32_PAT
- ;; 20 - save IA32_EFER
- ;; 21 - load IA32_EFER
- ;; 22 - save VMX-preemption timer value
- ; проверить VMX_SUPPORT
- mov rax, [VMX_SUPPORT]
- and eax, BASE_TRUE
- jnz @F
- mov ecx, IA32_VMX_EXIT_CTLS ; 483h
- jmp Vmexit1
- @@:
- mov ecx, IA32_VMX_TRUE_EXIT_CTLS ; 48fh
- Vmexit1:
- rdmsr
- and edx, 300200h
- or eax, edx
- mov dword [vm_mem.ctrl_vm_exit_contr], eax
- ;; msr store count
- ;; msr load count
- ;; msr store address
- ;; msr load address
- ret
- endp
- proc VMentry
- ;; 2 - load debug controls
- ;; 9 - IA-32e mode guest
- ;; 10 - entry SMM
- ;; 11 - deactivate dual-monitor
- ;; 13 - load IA32_PERF_GLOBAL_CTRL
- ;; 14 - load IA32_PAT
- ;; 15 - load IA32_EFER
- ; проверить VMX_SUPPORT
- mov rax, [VMX_SUPPORT]
- and eax, BASE_TRUE
- jnz @F
- mov ecx, IA32_VMX_ENTRY_CTLS
- jmp VMentry1
- @@:
- mov ecx, IA32_VMX_TRUE_ENTRY_CTLS
- VMentry1:
- rdmsr
- and edx, 8200h
- or eax, edx
- mov dword [vm_mem.ctrl_vm_entry_contr], eax
- ;; msr load count
- ;; msr load address
- ;; interruption information
- ;; exception error
- ;; instruction length
- ret
- endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement