Skip to content

vmgenid: add generation counter

[email protected] qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vmgenid: make device data size configurabledocs/specs/vmgenid.txt hw/acpi/vmgenid.c include/hw/acpi/vmgenid.h+66 -130 replies
2/2vmgenid: add generation counterdocs/specs/vmgenid.txt hw/acpi/vmgenid.c include/hw/acpi/vmgenid.h+144 -580 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] vmgenid: add generation counter

From: Babis Chalios <[email protected]>

VM generation ID exposes a GUID inside the VM which changes every time a VM restore is happening. Typically, this GUID is used by the guest kernel to re-seed its internal PRNG. As a result, this value cannot be exposed in guest user-space as a notification mechanism for VM restore events.

This patch set extends vmgenid to introduce a 32 bits generation counter whose purpose is to be used as a VM restore notification mechanism for the guest user-space.

It is true that such a counter could be implemented entirely by the guest kernel, but this would rely on the vmgenid ACPI notification to trigger the counter update, which is inherently racy. Exposing this through the monitor allows the updated value to be in-place before resuming the vcpus, so interested user-space code can (atomically) observe the update without relying on the ACPI notification.

Babis Chalios (2):
vmgenid: make device data size configurable
vmgenid: add generation counter

 docs/specs/vmgenid.txt    | 101 ++++++++++++++++++--------
 hw/acpi/vmgenid.c         | 145 +++++++++++++++++++++++++++++++-------
 include/hw/acpi/vmgenid.h |  23 ++++--
 3 files changed, 204 insertions(+), 65 deletions(-)
Signature · 3 lines
2.37.1

Amazon Spain Services sociedad limitada unipersonal, Calle Ramirez de Prado 5, 28045 Madrid. Registro Mercantil de Madrid . Tomo 22458 . Folio 102 . Hoja M-401234 . CIF B84570936