From: Friedrich Weber <f.weber@proxmox.com>
To: Fiona Ebner <f.ebner@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server v2 1/3] cpu config: disable vmx-mbec flag for machine versions < 11.0
Date: Mon, 13 Jul 2026 14:46:51 +0200 [thread overview]
Message-ID: <bf9c73f2-224e-4821-b8d9-a5ab44a00f64@proxmox.com> (raw)
In-Reply-To: <20260713124025.121154-2-f.ebner@proxmox.com>
Thanks for looking into this!
On 13/07/2026 14:40, Fiona Ebner wrote:
> 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 flag was enabled before. While there
Should this be "since the flag *not* enabled before"?
> 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>
> ---
>
> New in v2.
>
> 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' \
next prev parent reply other threads:[~2026-07-13 12:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 12:40 [PATCH-SERIES qemu-server v2 0/3] cpu config: disable APICv for Windows 11/2022/2025 to mitigate issues with VBS Fiona Ebner
2026-07-13 12:40 ` [PATCH qemu-server v2 1/3] cpu config: disable vmx-mbec flag for machine versions < 11.0 Fiona Ebner
2026-07-13 12:46 ` Friedrich Weber [this message]
2026-07-13 12:48 ` Fiona Ebner
2026-07-13 12:40 ` [PATCH qemu-server v2 2/3] cpu config: use $version_guard rather than passing $machine_version Fiona Ebner
2026-07-13 12:40 ` [PATCH qemu-server v2 3/3] cpu config: disable APICv for Windows 11/2022/2025 to mitigate issues with VBS Fiona Ebner
2026-07-15 8:21 ` superseded: [PATCH-SERIES qemu-server v2 0/3] " 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=bf9c73f2-224e-4821-b8d9-a5ab44a00f64@proxmox.com \
--to=f.weber@proxmox.com \
--cc=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