sandbox: the proof and microvm oracles read RAPL MSRs where powercap lists none; sandbox-tee attests rapl-msr as RAPL #651
Loading…
Reference in a new issue
No description provided.
Delete branch "sandbox/proof-tee-msr"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This finishes the MSR fallback in the sandbox standard (follow-up to #629). Since #629, the production path already reads MSRs:
sandbox-meter'sRaplPackages::host()falls back to them, andsandbox-exec-microvm'sRaplMeter::host()is that same probe. Two test oracles and an example's mapping still assumed powercap. On a host with no powercap zone, run as root, the oracles disagreed with the meter and the tests failed, and the example attested an MSR reading asEstimator.Changes
sandbox-proof: the test oracle,oracle_package_uj_at(powercap, root), is independent of the crate.package-<n>orpackage-<n>-die-<m>).die_ids, a zero unit, and a powercap die zone taking precedence.sandbox-exec-microvm: intests/rapl_hardware.rsthe oracle now accepts die zones and falls back to its own MSR reader (watch_host()). Both tests bracket the meter's figure with MSR reads where powercap lists no package.RaplMeter's docs describe the fallback.sandbox-tee: theattested_efficiencyexample maps"rapl-msr"like"rapl-powercap", toCounterClass::Rapl; it's the same hardware counter. Its test pins each probe name to its class.Verified
cargo check --workspace --all-targetsis clean. Tests pass forsandbox-proof(25),sandbox-tee(43, and 52 withamd-kds,intel-pcs) andsandbox-exec-microvm(22). Clippy is clean.sandbox-proof(28, with its grep) andsandbox-tee(43). Clippy is clean.rapl-msr, ratio 1.000 to its oracle;RaplMeter8.90 J andMsrRaplMeter8.86 J, both inside the MSR bracket; the example attestsrapl, sealedHwShuntpackage-0-die-0andpackage-1-die-0estimatormsrgroup andCAP_SYS_RAWIO🤖 Generated with Claude Code