hypervisor: x86: Add an InstructionHandler interface

And an InstructionMap helper structure to map x86 mnemonic codes
to instruction handlers.

Any instruction emulation implementation should then boil down with
implementing InstructionHandler for any supported mnemonic.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2020-11-19 20:00:32 +01:00
parent fc5d6c96be
commit 1fc97e91a4
3 changed files with 76 additions and 0 deletions
+2
View File
@@ -10,6 +10,8 @@ use crate::arch::emulator::PlatformError;
use crate::x86_64::{SegmentRegister, SpecialRegisters, StandardRegisters};
use iced_x86::*;
mod instructions;
/// CpuStateManager manages an x86 CPU state.
///
/// Instruction emulation handlers get a mutable reference to