vbox5: revoke VM memory during VM reset

Avoids reboot issues seen with Windows VMs.

Fixes #2946
This commit is contained in:
Alexander Boettcher 2018-08-27 13:58:32 +02:00 committed by Christian Helmuth
parent babb633922
commit 0ee0844c59
4 changed files with 17 additions and 1 deletions

View File

@ -149,3 +149,8 @@ extern "C" bool PGMUnmapMemoryGenode(void *, ::size_t)
Genode::error(__func__, " unimplemented");
return VERR_GENERAL_FAILURE;
}
extern "C" void PGMFlushVMMemory()
{
Genode::error(__func__, " unimplemented");
}

View File

@ -130,7 +130,6 @@ int GIMR3InitCompleted(PVM pVM)
void HMR3Relocate(PVM) TRACE()
void HMR3Reset(PVM pVM) TRACE()
int SELMR3Init(PVM) TRACE(VINF_SUCCESS)
int SELMR3Term(PVM) TRACE(VINF_SUCCESS)

View File

@ -157,6 +157,12 @@ VMMR3_INT_DECL(void) HMR3ResetCpu(PVMCPU pVCpu)
pVCpu->hm.s.fActive = false;
}
extern "C" void PGMFlushVMMemory();
VMMR3_INT_DECL(void) HMR3Reset(PVM pVM)
{
PGMFlushVMMemory();
}
VMMR3_INT_DECL(void) HMR3PagingModeChanged(PVM pVM, PVMCPU pVCpu, PGMMODE enmShadowMode, PGMMODE enmGuestMode)
{
}

View File

@ -48,6 +48,7 @@
extern "C" bool PGMUnmapMemoryGenode(void *, ::size_t);
extern "C" void PGMFlushVMMemory();
/*
@ -757,6 +758,11 @@ bool PGMUnmapMemoryGenode(void * vmm_local, ::size_t size)
return true;
}
extern "C" void PGMFlushVMMemory()
{
PGMUnmapMemoryGenode((void *)vm_memory().local_addr(0), MAX_VM_MEMORY);
}
extern "C" int sched_yield(void)
{