hypervisor: x86: provide a generic SpecialRegisters structure

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2022-07-14 22:05:06 +00:00
committed by Liu Wei
parent d2b194c4f1
commit f1ab86fecb
10 changed files with 185 additions and 59 deletions
+2 -4
View File
@@ -4,9 +4,7 @@
//
#[cfg(target_arch = "x86_64")]
use hypervisor::arch::x86::SegmentRegister;
#[cfg(target_arch = "x86_64")]
use hypervisor::kvm::kvm_bindings::kvm_dtable as DTableRegister;
use hypervisor::arch::x86::{DescriptorTable, SegmentRegister};
use linux_loader::elf;
use std::fs::File;
use std::io::Write;
@@ -135,7 +133,7 @@ impl CpuSegment {
}
}
pub fn new_from_table(reg: DTableRegister) -> Self {
pub fn new_from_table(reg: DescriptorTable) -> Self {
CpuSegment {
selector: 0,
limit: reg.limit as u32,