mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: mshv: Introduce CPU state update function and use it
In most of the cases, special registers don't change after emulations, but current code sets them back unconditionally, and although some of them are set over the register page, others require a system call and a hypervisor to be updated, which is a waste it there were not changes. Introduce and CPU update method for Microsoft Hypervisor emulator and set special registers only when they were changed. This change reduces guest boot time by 4% for a single VP guest boot (in L1VH partition) in my experiments. Signed-off-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
5aba9b4308
commit
de2d8f486b
@@ -711,7 +711,7 @@ mod mock_vmm {
|
||||
insn: &[u8],
|
||||
num_insn: Option<usize>,
|
||||
) -> MockResult {
|
||||
let mut state = self
|
||||
let state = self
|
||||
.cpu_state(cpu_id)
|
||||
.map_err(EmulationError::PlatformEmulationError)?;
|
||||
let ip = state.ip();
|
||||
|
||||
Reference in New Issue
Block a user