Skip to content

dstack-mr: support QEMU 10 and 11 ACPI measurements - #1049

Closed
kvinwang wants to merge 1 commit into
nextfrom
fix/dstack-mr-qemu-versions
Closed

dstack-mr: support QEMU 10 and 11 ACPI measurements#1049
kvinwang wants to merge 1 commit into
nextfrom
fix/dstack-mr-qemu-versions

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

Summary

  • update the pinned ACPI table generator with QEMU 10.0, 11.0, and 11.1 compatibility logic
  • use the updated generator in KMS and verifier builds
  • update the local build documentation

Validation

  • compared locally generated ACPI AML across upstream QEMU 9.2.1, 10.0.0, 10.1.0, 10.2.0, 11.0.0, and 11.1.0
  • confirmed identical ACPI output for QEMU 10.0 through 10.2
  • confirmed exact upstream AML deltas at QEMU 10.0, 11.0, and 11.1
  • ran dstack-mr measurements locally for 9.2.1, 10.0.0, 10.2.0, 11.0.0, and 11.1.0
  • cargo test -p dstack-mr -p dstack-mr-cli
  • QEMU ACPI compatibility unit tests: 7 passed

Copilot AI lite review requested due to automatic review settings August 13, 2026 08:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the ACPI table generator used for dstack-mr measurements to track QEMU 11.1 compatibility, and also introduces a substantial gateway-side WaveKV sync upgrade (v1/v2 negotiation, push endpoint, admission policy, bounded compression/decompression, and expanded sync telemetry).

Changes:

  • Bump the pinned QEMU fork/commit used to generate ACPI tables in verifier/KMS builder images and in the attestation verification tutorial.
  • Upgrade the gateway’s WaveKV integration toward a v2 (“SyncEnvelope”) protocol with v1 fallback, plus an opportunistic push route.
  • Add hardening and observability around gateway replication (key-prefix admission policy, bounded gzip handling, and new admin/proto telemetry fields).

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
dstack/verifier/builder/Dockerfile Update QEMU fork branch and pinned rev for ACPI table generation.
dstack/kms/dstack-app/builder/Dockerfile Update QEMU fork branch and pinned rev for ACPI table generation.
dstack/gateway/src/web_routes/wavekv_sync.rs Add v2 sync + push endpoints, bounded gunzip, and testable auth decision split.
dstack/gateway/src/web_routes.rs Mount new WaveKV routes and add a test to pin route URIs.
dstack/gateway/src/pp.rs Minor test refactor (repeat_n).
dstack/gateway/src/main_service.rs Reorder local node record publication after bootstrap; plumb uuid into sync service.
dstack/gateway/src/kv/sync_service.rs Add v2 sync and push client paths; centralize peer route construction.
dstack/gateway/src/kv/schema.rs New admission policy constraining replicated key prefixes per store.
dstack/gateway/src/kv/mod.rs Add admission-enabled WaveKV node config, gzip size limits, bounded gunzip, and wire-format tests.
dstack/gateway/src/kv/https_client.rs Bound response bodies, add probe POST for v1/v2 negotiation, and extend tests.
dstack/gateway/src/admin_service.rs Surface per-peer protocol/digest telemetry and new store metrics in admin status.
dstack/gateway/rpc/proto/gateway_rpc.proto Extend sync status RPC schema (protocol, digest mismatches, failures; deprecate buffered_logs).
dstack/Cargo.toml Switch wavekv dependency to an unreleased git branch pending crates.io release.
dstack/Cargo.lock Lockfile updates for the new git dependency and transitive changes.
docs/tutorials/attestation-verification.md Update QEMU fork branch referenced in local build docs.
Suppressed comments (1)

dstack/gateway/src/kv/mod.rs:430

  • encode lost its documentation comment when store_config and the sync size constants were inserted above it. Restoring the doc comment here avoids confusion about the intended wire format guarantees for KV values.
pub fn encode<T: Serialize>(value: &T) -> Result<Vec<u8>> {
    rmp_serde::encode::to_vec_named(value).context("failed to encode value")
}

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread dstack/gateway/src/kv/mod.rs Outdated
Comment on lines 371 to 375
@@ -374,6 +375,56 @@ pub mod keys {
/// in `#[serde(default)]` fields it does not receive, so the value types below
/// Read a v2 envelope from a request body, applying the same size cap as the v1 route.
async fn read_envelope(data: Data<'_>) -> Result<SyncEnvelope, Status> {
let bytes = data
.open(16.mebibytes())
Comment on lines +272 to +282
if let Err(err) = kv_store.sync_node(config.sync.node_id, &node_data) {
error!("Failed to sync this node to KvStore: {err:?}");
}
// Set this node's status to Online
if let Err(err) = kv_store.set_node_status(config.sync.node_id, NodeStatus::Up) {
error!("Failed to set node status: {err:?}");
}
// Register this node's sync URL in DB (for peer discovery)
if let Err(err) = kv_store.register_peer_url(config.sync.node_id, &config.sync.my_url) {
error!("Failed to register peer URL: {err:?}");
}
Comment thread dstack/Cargo.toml Outdated
Comment on lines +122 to +123
# TODO: repoint to `wavekv = "2.0"` once Phala-Network/wavekv#3 is released to crates.io.
wavekv = { git = "https://github.com/Phala-Network/wavekv", branch = "feat/delta-state-sync" }
Comment thread dstack/gateway/src/kv/schema.rs Fixed
@kvinwang
kvinwang force-pushed the fix/dstack-mr-qemu-versions branch from 5d3abcf to 40463f6 Compare August 13, 2026 08:55
@kvinwang
kvinwang force-pushed the fix/dstack-mr-qemu-versions branch from 40463f6 to e5dad61 Compare August 13, 2026 09:12
@kvinwang

Copy link
Copy Markdown
Collaborator Author

prefer #1050

@kvinwang kvinwang closed this Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants