Skip to content

Commit

Permalink
Revert event gfn workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorian Eikenberg authored and cakeless committed Nov 23, 2023
1 parent 744dec6 commit 7f1bb30
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions vmicore/src/lib/vmi/InterruptEventSupervisor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,20 +171,16 @@ namespace VmiCore
auto eventResponse = VMI_EVENT_RESPONSE_NONE;
event->interrupt_event.reinject = REINJECT_INTERRUPT;

// TODO: fix event gfn in kvmi
// auto eventPA =
// (event->interrupt_event.gfn << PagingDefinitions::numberOfPageIndexBits) +
// event->interrupt_event.offset;
auto eventPA =
(event->interrupt_event.gfn << PagingDefinitions::numberOfPageIndexBits) + event->interrupt_event.offset;
if (interruptEventSupervisor == nullptr)
{
GlobalControl::logger()->error(
"Caught interrupt event with destroyed InterruptEventSupervisor",
{CxxLogField("logger", loggerName) /*, CxxLogField("eventPA", fmt::format("{:#x}", eventPA))*/});
{CxxLogField("logger", loggerName), CxxLogField("eventPA", fmt::format("{:#x}", eventPA))});
return eventResponse;
}
interruptEventSupervisor->vmiInterface->flushV2PCache(LibvmiInterface::flushAllPTs);
auto eventPA =
interruptEventSupervisor->vmiInterface->convertVAToPA(event->interrupt_event.gla, event->x86_regs->cr3);

auto breakpointsAtEventGFN =
interruptEventSupervisor->breakpointsByGFN.find(eventPA >> PagingDefinitions::numberOfPageIndexBits);
if (breakpointsAtEventGFN != interruptEventSupervisor->breakpointsByGFN.end())
Expand Down

0 comments on commit 7f1bb30

Please sign in to comment.