hypervisor: emulator: Add a CPU mode getter to CpuStateManager

We need to be able to build the CPU mode from its state in order to
start implementing mode related checks in the x86 emulator.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2020-11-26 19:01:10 +01:00
committed by Rob Bradford
parent b3a1f5f1be
commit 3faffcb087
2 changed files with 48 additions and 0 deletions

View File

@@ -29,6 +29,9 @@ pub enum PlatformError {
#[error("Invalid register: {0}")]
InvalidRegister(#[source] anyhow::Error),
#[error("Invalid state: {0}")]
InvalidState(#[source] anyhow::Error),
#[error("Memory read failure: {0}")]
MemoryReadFailure(#[source] anyhow::Error),