mirror of
https://github.com/momo5502/hypervisor.git
synced 2025-06-05 10:57:41 +00:00
Fix hypervisor
This commit is contained in:
parent
aae1a8a69b
commit
bd82bdb561
@ -31,12 +31,9 @@ include ksamd64.inc
|
|||||||
push rcx ; save the RCX register, which we spill below
|
push rcx ; save the RCX register, which we spill below
|
||||||
lea rcx, [rsp+8h] ; store the context in the stack, bias for
|
lea rcx, [rsp+8h] ; store the context in the stack, bias for
|
||||||
; the return address and the push we just did.
|
; the return address and the push we just did.
|
||||||
call ShvOsCaptureContext ; save the current register state.
|
sub rsp, 30h
|
||||||
; note that this is a specially written function
|
call ShvOsCaptureContext
|
||||||
; which has the following key characteristics:
|
add rsp, 30h
|
||||||
; 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
|
|
||||||
mov rcx, [rsp+CxRsp+8h]
|
mov rcx, [rsp+CxRsp+8h]
|
||||||
add rcx, 8h
|
add rcx, 8h
|
||||||
mov [rsp+CxRsp+8h], rcx
|
mov [rsp+CxRsp+8h], rcx
|
||||||
|
@ -318,7 +318,7 @@ void ShvVmxEptInitialize(vmx::vm_state* VpData)
|
|||||||
//
|
//
|
||||||
// Loop every 1GB of RAM (described by the PDPTE)
|
// 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++)
|
for (i = 0; i < PDPTE_ENTRY_COUNT; i++)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user