From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id DD1C81FF0BC for ; Wed, 02 Dec 2026 18:46:42 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2C409217E9; Wed, 02 Dec 2026 18:46:20 +0100 (CET) From: Jonas Theisen To: pve-devel@lists.proxmox.com Subject: [PATCH docs v4 7/7] qm: document hv-reenlightenment and invtsc Date: Wed, 2 Dec 2026 18:45:24 +0100 Message-ID: <20261202174530.565487-8-j.theisen@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261202174530.565487-1-j.theisen@proxmox.com> References: <20261202174530.565487-1-j.theisen@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1796233554979 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.053 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: HQUZE6P3AI2BMOF72EMWSJEWM7JYGWKP X-Message-ID-Hash: HQUZE6P3AI2BMOF72EMWSJEWM7JYGWKP X-MailFrom: j.theisen@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Explain what the new 'hv-reenlightenment' CPU flag is for, that guests only use it together with 'hv-frequencies', and that custom CPU types with 'invtsc' can now be live migrated. As both restrict live migration to nodes with a compatible TSC frequency, add this to the refused live migrations, and document which running VMs need to be stopped and started first. Signed-off-by: Jonas Theisen --- qm.adoc | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/qm.adoc b/qm.adoc index 3856b31..0eea939 100644 --- a/qm.adoc +++ b/qm.adoc @@ -571,6 +571,19 @@ listings, `Mapping.Modify` gates create/update/delete in the panel, and enforced on VM create, VM update, and VM clone, so a user who can clone a VM that uses a custom model still needs `Mapping.Use` on that model's ACL path. +Custom CPU types can enable the invariant time stamp counter (TSC) flag +`invtsc`, which guests need to use the TSC as clock source, for example for +nested hypervisors or applications that read it directly. The host CPU must have +an invariant TSC as well. Otherwise, QEMU refuses to start the VM, or starts it +without the flag if the CPU type is based on `host`. Except for confidential +VMs, {pve} sets the TSC frequency of such VMs to the one of the host they are +started on, as QEMU requires it for live migration, snapshots including RAM, and +hibernation. This restricts live migration to nodes with a compatible TSC +frequency, see <>. VMs started without an explicit TSC +frequency, for example before an update, must be stopped and started again +before they can be live migrated. A `-cpu` option in the `args` of a VM replaces +the CPU generated by {pve}, so it must set `tsc-frequency` itself or be removed. + [[qm_meltdown_spectre]] Meltdown / Spectre related CPU flags ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -699,6 +712,17 @@ guests on recent Intel hardware: only applies for x86_64 vCPUs; it is silently ignored on other architectures. +Windows guests running nested Hyper-V, for example with WSL2 or +virtualization-based security enabled, can pass a stable clock source on to +their own guests if the VM has the `hv-reenlightenment` flag and the +`hv-frequencies` flag, which custom CPU types can enable. As for `invtsc`, {pve} +sets an explicit TSC frequency for VMs with `hv-reenlightenment`, because KVM +does not fully implement its notifications about TSC frequency changes. With the +CPU types `host` and `max`, this also passes through the `invtsc` flag of the +host CPU, so the target node of a live migration must support it as well. If a +custom CPU type enabled `hv-reenlightenment` before an update, stop and start +the VM before migrating it, as its live migration can otherwise fail at the end. + NUMA ^^^^ @@ -1879,6 +1903,11 @@ if the VM cannot run there: of the CPU type. ** All VMs require a node that supports their Hyper-V enlightenments, which {pve} enables for Windows guests. +** VMs with an explicit TSC frequency, as set for the `invtsc` and + `hv-reenlightenment` CPU flags, require a node that supports TSC scaling, or + whose TSC frequency differs from the VM's by at most 250 ppm of its own. +** VMs with the `invtsc` CPU flag that were started without an explicit TSC + frequency cannot be live migrated until they are stopped and started again. -- + These checks only apply to VMs that use KVM hardware virtualization. The -- 2.47.3