The S5 executor's PowerMeter had only the powercap RaplMeter, which reads
/sys/class/powercap/intel-rapl:0/energy_uj. But common KVM hosts expose
the RAPL MSR while shipping no powercap node at all — AWS Nitro bare
metal (kernel *-aws) is exactly this: /dev/cpu/N/msr yields a live
MSR_PKG_ENERGY_STATUS (0x611) counter with the unit in
MSR_RAPL_POWER_UNIT (0x606), but /sys/class/powercap is empty.
MsrRaplMeter reads that counter directly (root + msr module), scaling
ticks by 1/2^ESU to microjoules — the same physical energy RaplMeter
reports, on hosts where the sysfs path doesn't exist. Where the MSR is
unreadable, package0() returns None and the executor falls back to the
honest ModelBased vCPU-seconds estimate, unchanged.
The boot_microvm example drives a real Firecracker through the reference
FirecrackerVmm (spawn firecracker --api-sock; PUT boot-source/drives/
machine-config + InstanceStart over our unix-socket HTTP/1.1 client),
meters the boot window on the MSR, and seals a Sandbox S5 JCR-1 receipt
(HwShunt where metered, ModelBased otherwise) — the executor's full
path, end to end, on a Linux KVM host.
Co-Authored-By: Claude Fable 5 <[email protected]>