Skip to content

Commit 103abe7

Browse files
committed
Reset more vcpu state on snapshot restore
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
1 parent e2621b9 commit 103abe7

File tree

12 files changed

+1744
-34
lines changed

12 files changed

+1744
-34
lines changed

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/hyperlight_host/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ mshv-ioctls = { version = "0.6", optional = true}
8484
uuid = { version = "1.20.0", features = ["v4"] }
8585
signal-hook-registry = "1.4.8"
8686
serde = "1.0"
87+
iced-x86 = { version = "1.21", default-features = false, features = ["std", "code_asm"] }
8788
proptest = "1.9.0"
8889
tempfile = "3.24.0"
8990
crossbeam-queue = "0.3.12"

src/hyperlight_host/src/error.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,10 @@ impl HyperlightError {
326326
| HyperlightError::StackOverflow()
327327
| HyperlightError::MemoryAccessViolation(_, _, _)
328328
| HyperlightError::SnapshotSizeMismatch(_, _)
329-
| HyperlightError::MemoryRegionSizeMismatch(_, _, _) => true,
329+
| HyperlightError::MemoryRegionSizeMismatch(_, _, _)
330+
// HyperlightVmError::Restore is already handled manually in restore(), but we mark it
331+
// as poisoning here too for defense in depth.
332+
| HyperlightError::HyperlightVmError(HyperlightVmError::Restore(_)) => true,
330333

331334
// These errors poison the sandbox because they can leave
332335
// it in an inconsistent state due to snapshot restore

0 commit comments

Comments
 (0)