hypervisor: Start moving register definitions to the hypervisor crate

Most of arch/src/x86_64/regs.rs will eventually move unde
hypervisor/src/x86/regs.rs.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2020-11-26 18:50:43 +01:00
committed by Rob Bradford
parent 2bc5119730
commit b3a1f5f1be
3 changed files with 29 additions and 17 deletions

View File

@@ -63,3 +63,5 @@ pub enum Exception {
VE = 20, // Virtualization Exception
CP = 21, // Control Protection Exception
}
pub mod regs;

View File

@@ -0,0 +1,17 @@
//
// Copyright © 2020 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
// EFER (technically not a register) bits
pub const EFER_LMA: u64 = 0x400;
pub const EFER_LME: u64 = 0x100;
// CR0 bits
pub const CR0_PE: u64 = 0x1;
pub const CR0_PG: u64 = 0x80000000;
// CR4 bits
pub const CR4_PAE: u64 = 0x20;
pub const CR4_LA57: u64 = 0x1000;