Skip to content

Commit b88df32

Browse files
committed
Remove Hypervisor-Handler thread, and timeout-based config
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
1 parent 6abae5c commit b88df32

File tree

16 files changed

+468
-2029
lines changed

16 files changed

+468
-2029
lines changed

Justfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,12 @@ test-unit target=default-target features="":
8383
test-isolated target=default-target features="":
8484
cargo test {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" { "dev" } else { target } }} -p hyperlight-host --lib -- sandbox::uninitialized::tests::test_trace_trace --exact --ignored
8585
cargo test {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" { "dev" } else { target } }} -p hyperlight-host --lib -- sandbox::uninitialized::tests::test_log_trace --exact --ignored
86-
cargo test {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" { "dev" } else { target } }} -p hyperlight-host --lib -- hypervisor::hypervisor_handler::tests::create_1000_sandboxes --exact --ignored
86+
cargo test {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" { "dev" } else { target } }} -p hyperlight-host --lib -- sandbox::initialized_multi_use::tests::create_1000_sandboxes --exact --ignored
8787
cargo test {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" { "dev" } else { target } }} -p hyperlight-host --lib -- sandbox::outb::tests::test_log_outb_log --exact --ignored
8888
cargo test {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" { "dev" } else { target } }} -p hyperlight-host --lib -- mem::shared_mem::tests::test_drop --exact --ignored
8989
cargo test {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" { "dev" } else { target } }} -p hyperlight-host --test integration_test -- log_message --exact --ignored
9090
@# metrics tests
91-
cargo test {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F " + features } }} --profile={{ if target == "debug" { "dev" } else { target } }} -p hyperlight-host --lib -- metrics::tests::test_metrics_are_emitted --exact --ignored
92-
cargo test {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F function_call_metrics," + features } }} --profile={{ if target == "debug" { "dev" } else { target } }} -p hyperlight-host --lib -- metrics::tests::test_metrics_are_emitted --exact --ignored
93-
91+
cargo test {{ if features =="" {''} else if features=="no-default-features" {"--no-default-features" } else {"--no-default-features -F function_call_metrics," + features } }} --profile={{ if target == "debug" { "dev" } else { target } }} -p hyperlight-host --lib -- metrics::tests::test_metrics_are_emitted --exact
9492
# runs integration tests. Guest can either be "rust" or "c"
9593
test-integration guest target=default-target features="":
9694
@# run execute_on_heap test with feature "executable_heap" on and off

src/hyperlight_host/benches/benchmarks.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
use std::time::Duration;
18-
1917
use criterion::{criterion_group, criterion_main, Criterion};
2018
use hyperlight_host::sandbox::{MultiUseSandbox, SandboxConfiguration, UninitializedSandbox};
2119
use hyperlight_host::sandbox_state::sandbox::EvolvableSandbox;
@@ -68,7 +66,6 @@ fn guest_call_benchmark(c: &mut Criterion) {
6866
let mut config = SandboxConfiguration::default();
6967
config.set_input_data_size(2 * SIZE + (1024 * 1024)); // 2 * SIZE + 1 MB, to allow 1MB for the rest of the serialized function call
7068
config.set_heap_size(SIZE as u64 * 15);
71-
config.set_max_execution_time(Duration::from_secs(10));
7269

7370
let sandbox = UninitializedSandbox::new(
7471
GuestBinary::FilePath(simple_guest_as_string().unwrap()),

src/hyperlight_host/src/error.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,6 @@ pub enum HyperlightError {
122122
#[error("HostFunction {0} was not found")]
123123
HostFunctionNotFound(String),
124124

125-
/// An attempt to communicate with or from the Hypervisor Handler thread failed
126-
/// (i.e., usually a failure call to `.send()` or `.recv()` on a message passing
127-
/// channel)
128-
#[error("Communication failure with the Hypervisor Handler thread")]
129-
HypervisorHandlerCommunicationFailure(),
130-
131-
/// An attempt to cancel a Hypervisor Handler execution failed.
132-
/// See `terminate_hypervisor_handler_execution_and_reinitialise`
133-
/// for more details.
134-
#[error("Hypervisor Handler execution cancel attempt on a finished execution")]
135-
HypervisorHandlerExecutionCancelAttemptOnFinishedExecution(),
136-
137-
/// A Receive for a Hypervisor Handler Message Timedout
138-
#[error("Hypervisor Handler Message Receive Timedout")]
139-
HypervisorHandlerMessageReceiveTimedout(),
140-
141125
/// Reading Writing or Seeking data failed.
142126
#[error("Reading Writing or Seeking data failed {0:?}")]
143127
IOError(#[from] std::io::Error),

src/hyperlight_host/src/func/call_ctx.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ limitations under the License.
1616

1717
use tracing::{instrument, Span};
1818

19-
use super::guest_dispatch::call_function_on_guest;
2019
use super::{ParameterTuple, SupportedReturnType};
2120
use crate::{MultiUseSandbox, Result};
2221
/// A context for calling guest functions.
@@ -69,8 +68,11 @@ impl MultiUseGuestCallContext {
6968
// !Send (and !Sync), we also don't need to worry about
7069
// synchronization
7170

72-
let ret =
73-
call_function_on_guest(&mut self.sbox, func_name, Output::TYPE, args.into_value());
71+
let ret = self.sbox.call_guest_function_by_name_no_reset(
72+
func_name,
73+
Output::TYPE,
74+
args.into_value(),
75+
);
7476
Output::from_value(ret?)
7577
}
7678

0 commit comments

Comments
 (0)