hypervisor: x86: provide a generic StandardRegisters structure

We only need to do this for x86 since MSHV does not have aarch64 support
yet. This reduces unnecessary code churn.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu
2022-07-14 20:59:27 +00:00
committed by Liu Wei
parent d20f647b32
commit 8b7781e267
9 changed files with 165 additions and 27 deletions

View File

@@ -10,7 +10,8 @@ use crate::layout::{BOOT_GDT_START, BOOT_IDT_START, PVH_INFO_START};
use crate::GuestMemoryMmap;
use hypervisor::arch::x86::gdt::{gdt_entry, segment_from_gdt};
use hypervisor::arch::x86::regs::CR0_PE;
use hypervisor::x86_64::{FpuState, SpecialRegisters, StandardRegisters};
use hypervisor::arch::x86::StandardRegisters;
use hypervisor::x86_64::{FpuState, SpecialRegisters};
use std::sync::Arc;
use std::{mem, result};
use vm_memory::{Address, Bytes, GuestMemory, GuestMemoryError};