gbhv
gbhv copied to clipboard
Exit Handler issues
Hi I've been playing around with gbhv as part of getting into hypervisor research I'd like to appreciate the project it's well made and it pretty simplistic which helps my learning curve by a lot
I have a question I'm trying to extend its compatibility with a manual mapper and I know that it should work since there's isn't much SEH
However, as soon as I remove the driver unload routine I've had to implement more VM exit handlers for MSR R/W
the handlers are implemented correctly but then I'm getting an exception when restoring CR4 for disabling Virtual Machine Extensions
Are you inside of an exit when you try to remove the bit from cr4? As it stands now the code is absolutely wrong about how unloading is done, you must write something to force an exit and then from the exit you must tear down the hypervisor.
On Sun, Mar 21, 2021, 2:27 PM Souhardya Sardar @.***> wrote:
Hi I've been playing around with gbhv as part of getting into hypervisor research I'd like to appreciate the project it's well made and it pretty simplistic which helps my learning curve by a lot
I have a question I'm trying to extend its compatibility with a manual mapper and I know that it should work since there's isn't much SEH
However, as soon as I remove the driver unload routine I've had to implement more VM exit handlers for MSR R/W
the handlers are implemented correctly but then I'm getting an exception when restoring CR4 for disabling Virtual Machine Extensions
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Gbps/gbhv/issues/24, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKZAKHAQZN225YPRBR7QBTTEY3ANANCNFSM4ZR2DGBQ .
Appreciate the quick response
I'm apparently inside Msr read when the exception occurs however I don't really see the point in having a driver unload routine either for my purpose
Just trying to get a stable execution but its weird when the ExitRootModeOnAllProcessors called in the driver unload routine everything works fine I don't even hit exits for R/W MSR or VMOFF etc
But once I remove the Driverunload routine I start hitting MSR R/W even when I know MSR bitmap is both cleared and a bunch of other exits
Maybe Im just doing something wrong I'm sorry if this seems a bit confusing Im quite new to hypervisors