Skip to content

Conversation

@andreiltd
Copy link
Member

andreiltd and others added 3 commits December 12, 2025 14:58
Updated image links in README.md to use GitHub assets.
Replace smart quotes with ASCII quotes and backticks and
fix minor grammatical issues in the RNG buffer proposal README.
@andreiltd andreiltd added area/documentation Related to documentation kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. labels Dec 12, 2025

### Risks and Mitigations

**Risk**: Malicious guest corrupting the queue **Mitigation**: Do not expose low level queue API to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know that not exposing it to the guest does anything. The guest is fully untrusted and so we need to do the mitigation suggested after this, that we serialize all data as known types and do assertions as suggested.

and `len` as raw bytes providing 12 bytes of inline storage. We should asses if any of flatbuffer
schema serialized data can actually fit into small inline data.

**4. Descriptor Chaining - scatter gather list**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it proposed to implement this now or as future option?

example `ioeventfd` for kvm). This is especially useful for streaming scenarios where the guest can
continue processing while the host consumes data asynchronously.

**3. Inline Descriptors**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this proposed to be implemented now or as possible improvement in the future

2. Device writes up to buffer length
3. Device sets actual written length in descriptor
4. If `actual_length > buffer_length`, device sets a `TRUNCATED` flag,
5. Driver can re-submit with larger buffer if needed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can image this would be possible performance issue? Can we provide a metric for when this occurs and a way to improve initial buffer size?

Snapshotting requires that the descriptor table has no in-flight guest-to-host requests and any
attempt to snapshot a sandbox with such pending requests will result in a snapshot failure.

### Difference from spec
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from what spec?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh from from virtio spec, let's link the mention above to here

### Snapshotting

Snapshotting requires that the descriptor table has no in-flight guest-to-host requests and any
attempt to snapshot a sandbox with such pending requests will result in a snapshot failure.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we ensure this?


The design leverages virtio's well-defined publishing/consumption semantics and memory safety
guarantees while adapting them to Hyperlight's specific needs. Since we control both ends of the
queue, we can deviate from strict virtio compliance where it makes sense.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we link to the section below?


```

### Test Plan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love seeing the comprehensive testing!


```

### Test Plan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe worth outlining the implemenation plan a bit? Will this come in a couple different PRs or behind feature flags, etc?

Copy link
Contributor

@jsturtevant jsturtevant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks for such a detailed write up. Left a few minor comments but otherwise this seems like it would set up the project to work well for the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Related to documentation kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants