"At first VmEntry, we need use VmLaunch. For the next VmEntry, just use VmResume."

Is that enough to clarify?

David Ott

That's what I wrote in my post. But at first VmEntry VmLaunch reports "VMLAUNCH with non-clear VMCS".Or should I not use "SMM-transfer VMCS" for returning to executive monitor? How then should I use this "SMM-transfer VMCS"?

"The SMM monitor could use VMPTRST to determine the location of the VMCS that was set up prior to VMCALL) and then VMCLEAR it. It could then copy 4KB of data from the address identified by VMPTRST to a region in SMRAM and then execute first VMCLEAR and then VMPTRLD on that SMRAM region. It should then VMWRITE the following: (1) VM-entry controls to manage a return from SMM properly; (2) VM-exit controls to manage future invocations of the SMM monitor; and (3) host state to manage future invocations of the SMM monitor. It could VMWRITE the saved guest EIP to increment past the VMCALL instruction (the length of which was reported in the VM-exit instruction-length field). Upon conclusion of its initialization, the SMM monitor could use VMLAUNCH on the new VMCS to return to the invoking code."

There was also a question as to whether the SMM monitoristrying to return tothe same VMCS that was used to invoke it

My SMM monitor works, but i have a new problem: When SMM VM-exit occures from VMX-root mode (by receiving SMI) immediately after execution command "MOV SS,AX", then does not happen any VM-exits after VMRESUME in SMM monitor. What could it be?