gamozolabs / applepie

A hypervisor for fuzzing built with WHVP and Bochs
366 stars 56 forks source link

Add better error code for when processor does not support xcr0 #21

Closed gamozolabs closed 5 years ago

gamozolabs commented 5 years ago

Currently on a processor without xcr0 (like Gulftown/Westmere-EP) we get:

========================================================================
                     Bochs x86 Emulator 2.6.9.svn
              Built from SVN snapshot after release 2.6.9
                  Compiled on Jan  8 2019 at 08:31:57
========================================================================
00000000000i[      ] reading configuration from bochsrc.bxrc
00000000000i[      ] installing win32 module as the Bochs GUI
00000000000i[      ] using log file bochsout.txt
Registering handler for a0000 bffff
Registering handler for e0000000 e0ffffff
Registering handler for fed00000 fed003ff
Registering handler for fec00000 fec00fff
Creating hypervisor!
Memory region: start 0000000000000000 end 000000000009ffff backing 000001a51d713000 perm 07
Memory region: start 0000000000100000 end 0000000001ffffff backing 000001a51d813000 perm 07
thread '<unnamed>' panicked at 'WHvSetVirtualProcessorRegisters() error: 0xc0350005

We need to either fix this error code or actually make it autodetect xcr0

gamozolabs commented 5 years ago

Done