git: 252f0c28855b - stable/15 - vmgenc.4: Add VM Generation ID Counter manual

From: Alexander Ziaee <ziaee_at_FreeBSD.org>
Date: Fri, 10 Apr 2026 18:31:23 UTC
The branch stable/15 has been updated by ziaee:

URL: https://cgit.FreeBSD.org/src/commit/?id=252f0c28855bf089d0e54147c52af8f8d6961cdc

commit 252f0c28855bf089d0e54147c52af8f8d6961cdc
Author:     Christos Longros <chris.longros@gmail.com>
AuthorDate: 2026-03-31 02:24:16 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2026-04-10 18:30:15 +0000

    vmgenc.4: Add VM Generation ID Counter manual
    
    Document the vmgenc(4) ACPI driver which detects virtual machine
    cloning and snapshot restoration via the VM Generation ID
    specification. The driver reseeds the kernel entropy pool when
    a generation change is detected.
    
    MFC after:              3 days
    Reviewed by:            cem (previous), ziaee
    Signed-off-by:          Christos Longros <chris.longros@gmail.com>
    Differential Revision:  https://reviews.freebsd.org/D56011
    
    (cherry picked from commit 59cb18f35617d3a53f7d7e142b4f91ad7951f5e0)
---
 share/man/man4/Makefile |  1 +
 share/man/man4/vmgenc.4 | 62 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)

diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile
index ecf10bc693c8..62d0b8f77f0f 100644
--- a/share/man/man4/Makefile
+++ b/share/man/man4/Makefile
@@ -621,6 +621,7 @@ MAN=	aac.4 \
 	virtio_random.4 \
 	virtio_scsi.4 \
 	${_vmci.4} \
+	vmgenc.4 \
 	vkbd.4 \
 	vlan.4 \
 	vxlan.4 \
diff --git a/share/man/man4/vmgenc.4 b/share/man/man4/vmgenc.4
new file mode 100644
index 000000000000..1938e7f70eac
--- /dev/null
+++ b/share/man/man4/vmgenc.4
@@ -0,0 +1,62 @@
+.\"
+.\" Copyright (c) 2026 Christos Longros <chris.longros@gmail.com>
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
+.Dd March 21, 2026
+.Dt VMGENC 4
+.Os
+.Sh NAME
+.Nm vmgenc
+.Nd ACPI virtual machine generation ID counter
+.Sh SYNOPSIS
+.Cd device vmgenc
+.Pp
+In
+.Xr loader.conf 5 :
+.Cd vmgenc_load="YES"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the Virtual Machine Generation ID,
+a 128-bit unique identifier exposed by the hypervisor via ACPI.
+The hypervisor changes this identifier whenever the virtual machine
+is cloned, restored from a snapshot, or otherwise duplicated.
+.Pp
+When a generation ID change is detected, the
+.Nm
+driver feeds the new identifier into the kernel entropy pool via
+.Xr random 4 ,
+ensuring that duplicated virtual machines do not share
+cryptographic state.
+The driver also sends a
+.Xr devctl 4
+event and an internal kernel notification so that other subsystems
+can respond to the duplication.
+.Pp
+The Virtual Machine Generation ID specification is supported by
+QEMU, VMware ESXi, Microsoft Hyper-V, and Xen.
+.Sh SYSCTL VARIABLES
+The following variable is available:
+.Bl -tag -width indent
+.It Va dev.vmgenc.%d.guid
+The current cached VM generation counter as a 128-bit value.
+This value is updated each time the hypervisor signals a
+generation change.
+.El
+.Sh SEE ALSO
+.Xr acpi 4 ,
+.Xr random 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 13.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Conrad Meyer Aq Mt cem@FreeBSD.org .
+.Pp
+This manual page was written by
+.An Christos Longros Aq Mt chris.longros@gmail.com .