Skip to content

x86: read the VM Generation ID device and advance the machine generation #572

Closed

Description

@lexoliu

QEMU's vmgenid device publishes a 16-byte generation ID that changes on every snapshot restore and clone (QEMU hw/acpi/vmgenid.c, post_load). The x86 backend does not look for it, so a restored x86 guest cannot know it was restored. The device exists only on QEMU's x86 machines; aarch64 virt and riscv virt build no such table.

Scope

  • Find the ACPI device with _HID "QEMUVGID" / _CID "VM_Gen_Counter" through the AML interpreter the acpi crate already provides, evaluate ADDR, and map the 16-byte window.
  • Publish the window to the kernel's machine generation; the kernel probes it on every entropy draw and on a periodic task.
  • helios-inspector vm attaches -device vmgenid,guid=auto on the x86 profile.
  • The boot log names the device: vmgenid online address=… generation=…, or that the machine has none.

Done when

  • smoke-x86-64 asserts the vmgenid online line.
  • A device present with a zero ADDR fails boot naming the check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions