CVSROOT:        /cvs
Module name:    src
Changes by:     d...@cvs.openbsd.org    2022/05/20 16:14:19

Modified files:
        sys/arch/amd64/amd64: vmm.c 

Log message:
vmm: load the vmcs before reading vcpu registers

The vmm(4) ioctl for reading a vcpu's registers didn't flush and
load the vmcs before issuing vmread instructions. This adds a flag
to vcpu_readregs_vmx to signal if the vmcs needs to be synchronized
before attempting the reads. (This is the same approach used for
vcpu_writeregs_vmx function.)

This fixes `vmctl send` on Intel hosts using vmd(8).

While here, I noticed the vcpu_writeregs_vmx function doesn't
properly set the vmcs state variable to VMCS_CLEARED after running
a vmclear instruction. This can cause errors on vm re-entry.

ok mlarkin@

Reply via email to