Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
and existing snapshots regenerated. Guest entry takes the random seed, host
page size, and log level.
* **Breaking:** Encode function calls with serde/postcard instead of FlatBuffers.
* Stop resetting guest FPU state between guest calls to improve performance.

### Fixed
* Fix surrogate process creation for Windows paths containing Unicode or spaces.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::hypervisor::WindowsInterruptHandle;
#[cfg(gdb)]
use crate::hypervisor::gdb::{DebugCommChannel, DebugMsg, DebugResponse};
use crate::hypervisor::hyperlight_vm::get_guest_log_filter;
use crate::hypervisor::regs::{CommonFpu, CommonRegisters, CommonSpecialRegisters};
use crate::hypervisor::regs::{CommonRegisters, CommonSpecialRegisters};
#[cfg(hvf)]
use crate::hypervisor::virtual_machine::hvf::HvfVm;
#[cfg(kvm)]
Expand Down Expand Up @@ -164,9 +164,6 @@ impl HyperlightVm {
self.vm
.set_regs(&regs)
.map_err(DispatchGuestCallError::SetupRegs)?;
self.vm
.set_fpu(&CommonFpu::default())
.map_err(DispatchGuestCallError::SetupRegs)?;
let result = self
.run(mem_mgr, host_funcs)
.map_err(DispatchGuestCallError::Run);
Expand Down
11 changes: 4 additions & 7 deletions src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use crate::hypervisor::gdb::{
#[cfg(gdb)]
use crate::hypervisor::gdb::{DebugError, DebugMemoryAccessError};
use crate::hypervisor::regs::{
CommonDebugRegs, CommonFpu, CommonRegisters, CommonSpecialRegisters, MsrEntry, MsrResetState,
CommonDebugRegs, CommonRegisters, CommonSpecialRegisters, MsrEntry, MsrResetState,
};
#[cfg(kvm)]
use crate::hypervisor::virtual_machine::kvm::KvmVm;
Expand Down Expand Up @@ -280,11 +280,6 @@ impl HyperlightVm {
.set_regs(&regs)
.map_err(DispatchGuestCallError::SetupRegs)?;

// reset fpu
self.vm
.set_fpu(&CommonFpu::default())
.map_err(DispatchGuestCallError::SetupRegs)?;

let result = self
.run(mem_mgr, host_funcs)
.map_err(DispatchGuestCallError::Run);
Expand Down Expand Up @@ -856,7 +851,9 @@ mod tests {
use super::*;
#[cfg(kvm)]
use crate::hypervisor::regs::FP_CONTROL_WORD_DEFAULT;
use crate::hypervisor::regs::{CommonSegmentRegister, CommonTableRegister, MXCSR_DEFAULT};
use crate::hypervisor::regs::{
CommonFpu, CommonSegmentRegister, CommonTableRegister, MXCSR_DEFAULT,
};
use crate::hypervisor::virtual_machine::VirtualMachine;
use crate::mem::layout::SandboxMemoryLayout;
use crate::mem::memory_region::MemoryRegionFlags;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ pub(crate) trait VirtualMachine: Debug + Send {
#[allow(dead_code)]
fn fpu(&self) -> std::result::Result<CommonFpu, RegisterError>;
/// Set fpu regs
#[allow(dead_code)]
fn set_fpu(&mut self, fpu: &CommonFpu) -> std::result::Result<(), RegisterError>;
/// Get special regs
#[allow(dead_code)]
Expand Down
Loading