From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH qemu-server v3 1/4] cpu config: disable vmx-mbec flag for machine versions < 11.0
Date: Tue, 14 Jul 2026 12:41:48 +0200 [thread overview]
Message-ID: <20260714104201.71308-2-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260714104201.71308-1-f.ebner@proxmox.com>
As reported in the community forum [0] and enterprise support, Windows
with MBEC and VBS can have issues on certain Intel CPUs, leading to
guest freezes and 100% CPU usage. Note that the vmx-mbec flag will
automatically be enabled if both QEMU (since 11.0) and the kernel
(since 7.0.0-3-pve) support it, but this is incorrect from a machine
version perspective, since the feature was not available before. While
there were no reports about this causing migration issues in practice,
this cannot be ruled out and it's better to preserve the behavior for
previous machine versions. In particular, existing VMs won't suddenly
be affected by the aforementioned issue after VBS is enabled.
[0]: https://forum.proxmox.com/threads/184178
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
Changes in v3:
* Improve commit message.
src/PVE/QemuServer/CPUConfig.pm | 12 ++++++++++++
src/test/cfg2cmd/cpu-level.conf.cmd | 2 +-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/PVE/QemuServer/CPUConfig.pm b/src/PVE/QemuServer/CPUConfig.pm
index df3e2b92..5b243000 100644
--- a/src/PVE/QemuServer/CPUConfig.pm
+++ b/src/PVE/QemuServer/CPUConfig.pm
@@ -1055,6 +1055,18 @@ sub get_pve_cpu_flags(
};
}
+ if (
+ $arch eq 'x86_64'
+ && min_version($qemu_binary_version, 11, 0) # The vmx-mbec flag got introduced in QEMU 11.0.
+ && $cputype eq 'host' # Other QEMU CPU models did not expose the vmx-mbec flag in 11.0.
+ && !min_version($machine_version, 11, 0)
+ ) {
+ $pve_flags->{'vmx-mbec'} = {
+ op => '-',
+ reason => "$pve_msg for backwards compatibility with older kernel and QEMU",
+ };
+ }
+
return $pve_flags;
}
diff --git a/src/test/cfg2cmd/cpu-level.conf.cmd b/src/test/cfg2cmd/cpu-level.conf.cmd
index d276a6de..5d5f760d 100644
--- a/src/test/cfg2cmd/cpu-level.conf.cmd
+++ b/src/test/cfg2cmd/cpu-level.conf.cmd
@@ -13,7 +13,7 @@
-boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
-vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \
-global 'kvm-pit.lost_tick_policy=discard' \
- -cpu 'host,level=30,-cet-ibt,-cet-ss,-hv-tlbflush,hv_ipi,hv_relaxed,hv_reset,hv_runtime,hv_spinlocks=0x1fff,hv_stimer,hv_synic,hv_time,hv_vapic,hv_vpindex,+kvm_pv_eoi,+kvm_pv_unhalt,+md-clear,+pdpe1gb' \
+ -cpu 'host,level=30,-cet-ibt,-cet-ss,-hv-tlbflush,hv_ipi,hv_relaxed,hv_reset,hv_runtime,hv_spinlocks=0x1fff,hv_stimer,hv_synic,hv_time,hv_vapic,hv_vpindex,+kvm_pv_eoi,+kvm_pv_unhalt,+md-clear,+pdpe1gb,-vmx-mbec' \
-m 768 \
-device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' \
-device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' \
--
2.47.3
next prev parent reply other threads:[~2026-07-14 10:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 10:41 [PATCH-SERIES qemu-server v3 0/4] cpu config: enable hv-evmcs for Windows 11/2022/2025 to mitigate issues with VBS Fiona Ebner
2026-07-14 10:41 ` Fiona Ebner [this message]
2026-07-14 10:41 ` [PATCH qemu-server v3 2/4] cpu config: use $version_guard rather than passing $machine_version Fiona Ebner
2026-07-14 10:41 ` [PATCH qemu-server v3 3/4] cpu config: enable hv-evmcs for Windows 11/2022/2025 to mitigate issues with VBS Fiona Ebner
2026-07-14 10:41 ` [PATCH qemu-server v3 4/4] test: cfg2cmd: allow setting host CPU vendor for a given test Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260714104201.71308-2-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox