Gbps / gbhv

Simple x86-64 VT-x Hypervisor with EPT Hooking
Creative Commons Attribution 4.0 International
846 stars 144 forks source link

How to hook cpuid ? #31

Closed thelifeworm closed 2 years ago

thelifeworm commented 2 years ago

How to hook cpuid ? any way

daaximus commented 2 years ago

CPUID is an unconditionally exiting instruction; a handler for CPUID is required and always causes a trap. You can add a switch statement or otherwise in the handler to adjust results based on the input function id in eax.

Review the source code, and locate the CPUID exit handler.

thelifeworm commented 2 years ago

Thanks