Does the VMCALL instruction on x86 save the state of the guest processor

VMCALL is very similar to the SYSENTER instruction, characterized in that SYSENTER is designed for a system call (quick transition to the OS), while VMCALL for hyperframes (switching to a hypervisor).

My question is that although SYSENTER does not save the state of the CPU, the same applies to VMCALL. Issuing VMCALL causes the VM to exit, but I'm not sure if it stores the state of the guest processor in the associated VMCS structure or not?

If it saves the state of the CPU, then how exactly can we pass arguments in a hypercall?

+4
source share
1 answer

VMCS 6 , - .

RIP, RFLAGS RSP VMExit. GPR HW VMExit.

VMCALL VMExit. api VMM.

Linux KVM API:

rbx, rcx, rdx rsi .   rax,   rax. ,   .

Intel 64 IA-32:

, VM, .

, VMCALL - .

+2

Source: https://habr.com/ru/post/1570051/


All Articles