Fix hypervisor

This commit is contained in:
momo5502 2022-04-02 16:05:04 +02:00
parent aae1a8a69b
commit bd82bdb561
2 changed files with 4 additions and 7 deletions

View File

@ -31,12 +31,9 @@ include ksamd64.inc
push rcx ; save the RCX register, which we spill below
lea rcx, [rsp+8h] ; store the context in the stack, bias for
; the return address and the push we just did.
call ShvOsCaptureContext ; save the current register state.
; note that this is a specially written function
; which has the following key characteristics:
; 1) it does not taint the value of RCX
; 2) it does not spill any registers, nor
; expect home space to be allocated for it
sub rsp, 30h
call ShvOsCaptureContext
add rsp, 30h
mov rcx, [rsp+CxRsp+8h]
add rcx, 8h
mov [rsp+CxRsp+8h], rcx

View File

@ -318,7 +318,7 @@ void ShvVmxEptInitialize(vmx::vm_state* VpData)
//
// Loop every 1GB of RAM (described by the PDPTE)
//
__stosq((UINT64*)VpData->epdpt, tempEpde.full, PDPTE_ENTRY_COUNT * PDE_ENTRY_COUNT);
__stosq((UINT64*)VpData->epde, tempEpde.full, PDPTE_ENTRY_COUNT * PDE_ENTRY_COUNT);
for (i = 0; i < PDPTE_ENTRY_COUNT; i++)
{
//