qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] vmgenid: add generation counter
@ 2022-08-03 13:41 bchalios
  2022-08-03 13:41 ` [PATCH 1/2] vmgenid: make device data size configurable bchalios
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: bchalios @ 2022-08-03 13:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: bchalios, ani, mst, imammedo, dwmw, graf, xmarcalx

From: Babis Chalios <bchalios@amazon.es>

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(-)

-- 
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



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-08-07 23:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-03 13:41 [PATCH 0/2] vmgenid: add generation counter bchalios
2022-08-03 13:41 ` [PATCH 1/2] vmgenid: make device data size configurable bchalios
2022-08-03 13:41 ` [PATCH 2/2] vmgenid: add generation counter bchalios
2022-08-03 15:36 ` [PATCH 0/2] " Michael S. Tsirkin
2022-08-03 16:17   ` bchalios
2022-08-03 16:26 ` Daniel P. Berrangé
2022-08-04  9:54   ` Chalios, Babis
2022-08-04 10:02     ` Daniel P. Berrangé
2022-08-04 10:17       ` Chalios, Babis
2022-08-04 13:31         ` Chalios, Babis
2022-08-07 15:39           ` Michael Kelley (LINUX)
2022-08-04 15:01 ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).