Handle were the PE/VM does not have an IDT setup.

Signed-off-by: Eugene D. Myers <edmyers@tycho.nsa.gov>
This commit is contained in:
Eugene D. Myers 2020-12-09 13:04:34 -05:00 committed by Eugene D Myers
parent 1ae7b32e21
commit ea50188100
1 changed files with 8 additions and 0 deletions

View File

@ -173,6 +173,14 @@ void PeExceptionHandler( IN UINT32 CpuIndex)
"%ld PeExceptionHandler - VM/PE Page Fault on IDT page - terminating VM\n",
CpuIndex));
}
else if ((IDTLocation < PeVmData[VmType].UserModule.AddressSpaceStart) ||
(IDTLocation + SIZE_4KB > PeVmData[VmType].UserModule.AddressSpaceStart +
PeVmData[VmType].UserModule.AddressSpaceSize))
{
DEBUG ((EFI_D_ERROR,
"%ld PeExceptionHandler - VM/PE IDT outside of VM/PE address space - terminating VM\n",
CpuIndex));
}
else
{
// does the VM/PE want to handle its own page fault