Skip to content

fix(vmm): turn PCI hotplug off by default and require it off for GPU passthrough - #1387

Merged
kvinwang merged 2 commits into
nextfrom
fix/require-hotplug-off
Sep 24, 2026
Merged

kvinwang merged 2 commits into
nextfrom
fix/require-hotplug-off

Conversation

@kvinwang

Copy link
Copy Markdown
Collaborator

Replaces #1203.

With PCI hotplug on, QEMU emits ACPI hotplug AML for every pcie-root-port bus, which qemu-acpi does not model. A TDX CVM with GPUs or NVSwitches on root ports therefore failed lite verification with an ACPI digest mismatch (seen on an 8×B200 host).

Instead of modeling that AML, require hotplug off:

  • MachineConfig::validate rejects hotplug with root-port passthrough (HotplugWithRootPorts), so the verifier, KMS and dstack-mr fail with a named error instead of a digest mismatch.
  • qemu_hotplug_off defaults to true in vmm.toml, the dstackup template, the VMM tutorial and the full-stack e2e config.
  • The differential test no longer generates the rejected topology, and the GPU goldens move to hotplug off.

Breaking for hosts relying on the default: every CVM gets different ACPI tables, and so different RTMRs, on its next start. Anything pinning those measurements, such as the KMS aggregated-MR allowlist, needs updating. A host without GPUs can set qemu_hotplug_off = false to keep its current measurements.

Verification

  • The new golden hashes match the pinned QEMU reference image (kvin/dstack-acpi-tables@sha256:54e692d8…) byte for byte.
  • differential-random.py against that image: 61/61 pass (29 fixed cases plus 32 random).
  • cargo test -p qemu-acpi -p dstack-mr -p dstack-mr-cli -p dstack-verifier -p dstack-kms -p dstack-vmm -p dstack-cli-core: pass.
  • cargo fmt --check and clippy -D warnings are clean.

…passthrough

QEMU emits ACPI hotplug AML for pcie-root-port buses when PCI hotplug is on,
and qemu-acpi does not model it, so a TDX CVM with GPUs or NVSwitches on root
ports failed lite verification with an ACPI digest mismatch.

Rather than modeling that AML (#1203), require hotplug off for such
topologies: MachineConfig::validate rejects them with a named error, and the
VMM config, dstackup template, tutorial and e2e config default
qemu_hotplug_off to true. The GPU goldens move to hotplug off, with hashes
checked against the pinned QEMU reference image.
@kvinwang
kvinwang merged commit 2f5aaca into next Sep 24, 2026
12 checks passed
@kvinwang
kvinwang deleted the fix/require-hotplug-off branch September 24, 2026 16:11
kvinwang added a commit that referenced this pull request Sep 25, 2026
… parser bounds

#1387 requires PCI hotplug off for GPU passthrough, so the matrix GPU row
failed; measure it with hotplug off and assert the named rejection without.
#1229 reads XLF bit 1, not bit 6, for the initrd ceiling: fix the harness
oracle and add a row with a 5-level-only kernel. #1367 made diagnose honour
num_nics, num_verity_volumes and swtpm; compare it with measure. Run the
new dstack-mr and dstack-types bound vectors from #1229, #1231, #1236 and

Signed-off-by: Kevin Wang <wy721@qq.com>
#1275 by exact name.
source-c pushed a commit to silicon-foundation/dstack that referenced this pull request Oct 4, 2026
Dstack-TEE#1387 made the VMM default qemu_hotplug_off to true and made ACPI generation
reject hotplug with GPU root ports, but left the CLI defaulting to false. A
measurement of a default VMM CVM therefore came out wrong, and one with GPUs
failed with HotplugWithRootPorts, unless --hotplug-off true was passed.

Signed-off-by: Kevin Wang <wy721@qq.com>
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.

1 participant