Skip to content

Commit

Permalink
Merge branch 'main' into az-linux-3
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Davies <[email protected]>
  • Loading branch information
simongdavies authored Dec 12, 2024
2 parents db5f27b + d2d78f6 commit a7aa437
Show file tree
Hide file tree
Showing 31 changed files with 455 additions and 387 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/dep_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ jobs:
# with only one driver enabled (driver mshv/kvm feature is ignored on windows) + seccomp + inprocess
just test-rust ${{ matrix.config }} inprocess,seccomp,${{ matrix.hypervisor == 'mshv' && 'mshv' || 'kvm' }}
# make sure certain cargo features compile
cargo check -p hyperlight-host --features crashdump
cargo check -p hyperlight-host --features print_debug
# without any driver (shouldn't compile)
just test-rust-feature-compilation-fail ${{ matrix.config }}
Expand Down
93 changes: 44 additions & 49 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/debugging-hyperlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ cargo test --package hyperlight-host --test integration_test --features print_de

## Dumping the memory configuration, virtual processor register state and memory contents on a crash or unexpected VM Exit

To dump the details of the memory configuration, the virtual processors register state and the contents of the VM memory set the feature `dump_on_crash` and run a debug build. This will result in a dump file being created in the temporary directory. The name and location of the dump file will be printed to the console and logged as an error message.
To dump the details of the memory configuration, the virtual processors register state and the contents of the VM memory set the feature `crashdump` and run a debug build. This will result in a dump file being created in the temporary directory. The name and location of the dump file will be printed to the console and logged as an error message.

There are no tools at this time to analyze the dump file, but it can be useful for debugging.
6 changes: 3 additions & 3 deletions docs/hyperlight-metrics-logs-and-traces.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,21 @@ In the [examples/otlp_tracing](../src/hyperlight_host/examples/otlp_tracing) dir
#### Linux

```bash
RUST_LOG='none,hyperlight-host=info,tracing=info' cargo run --example otlp_tracing
RUST_LOG='none,hyperlight_host=info,tracing=info' cargo run --example otlp_tracing
```

#### Windows

```powershell
$env:RUST_LOG='none,hyperlight-host=info,tracing=info';cargo run --example otlp_tracing
$env:RUST_LOG='none,hyperlight_host=info,tracing=info';cargo run --example otlp_tracing
```

The sample will run and generate trace data until any key is pressed.

To view the trace data, leave the example running and use the jaegertracing/all-in-one container image with the following command:

```console
docker run -d --name jaeger -e COLLECTOR_OTLP_ENABLED=true -p 4317:4317 -p 16686:16686 jaegertracing/all-in-one:1.51
docker run -d --name jaeger -e COLLECTOR_OTLP_ENABLED=true -p 4317:4317 -p 16686:16686 jaegertracing/all-in-one:1.60
```

NOTE: when running this on windows that this is a linux container, so you will need to ensure that docker is configured to run linux containers using WSL2. Alternatively, you can download the Jaeger binaries from [here](https://www.jaegertracing.io/download/). Extract the archive and run the `jaeger-all-in-one` executable as follows:
Expand Down
2 changes: 1 addition & 1 deletion proposals/NNNN-hip-template/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# HIP NNNN - SKIP NAME
# HIP NNNN - HIP NAME

<!-- toc -->
- [Summary](#summary)
Expand Down
7 changes: 3 additions & 4 deletions src/hyperlight_common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ workspace = true

[dependencies]
flatbuffers = { version = "24.3.25", default-features = false }
anyhow = { version = "1.0.72", default-features = false }
anyhow = { version = "1.0.94", default-features = false }
log = "0.4.20"
tracing = { version = "0.1.27", optional = true }
strum = {version = "0.25", default-features = false, features = ["derive"]}
strum_macros = {version = "0.26", features =[]}
tracing = { version = "0.1.41", optional = true }
strum = {version = "0.26", default-features = false, features = ["derive"]}

[features]
default = ["tracing"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.

use anyhow::{bail, Error, Result};
use log::Level;
use strum_macros::EnumIter;
use strum::EnumIter;
#[cfg(feature = "tracing")]
use tracing::{instrument, Span};

Expand Down
4 changes: 2 additions & 2 deletions src/hyperlight_guest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ printf = [] # compile printf
alloca = [] # compile alloca wrapper

[dependencies]
anyhow = { version = "1.0.45", default-features = false }
anyhow = { version = "1.0.94", default-features = false }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }
buddy_system_allocator = "0.11.0"
hyperlight-common = { workspace = true }
spin = "0.9.8"
log = { version = "0.4", default-features = false }

[build-dependencies]
cc = "1.0"
cc = "1.2"
cfg-if = "1.0"
5 changes: 0 additions & 5 deletions src/hyperlight_guest/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,6 @@ fn cargo_main() {
cfg.define("__x86_64__", None);
cfg.define("__LITTLE_ENDIAN__", None);

cfg.define("malloc", "hlmalloc");
cfg.define("calloc", "hlcalloc");
cfg.define("free", "hlfree");
cfg.define("realloc", "hlrealloc");

// silence compiler warnings
cfg.flag("-Wno-sign-compare");
cfg.flag("-Wno-bitwise-op-parentheses");
Expand Down
Loading

0 comments on commit a7aa437

Please sign in to comment.