Virtuozzo QEMU development (svt-core@virtuozzo.com)
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
To: andrey.drobyshev@virtuozzo.com
Cc: svt-core@virtuozzo.com, den@openvz.org
Subject: [PATCH hci-8.0/hci-8.1] i386: hide la57 at fresh start for named CPU models too #VSTOR-153243
Date: Tue,  3 Nov 2026 21:27:10 +0100	[thread overview]
Message-ID: <20261103202710.976429-1-den@openvz.org> (raw)

From: Denis V. Lunev <den@openvz.org>

x-no-la57-on-start acted only on "-cpu host", so nova host-model VMs
still triple-faulted on AMD Turin and Genoa hosts after the update.
libvirt turns host-model into a named model before building the command
line, and with no EPYC-Turin in its cpu_map that is EPYC-Genoa. la57 is
part of that definition and is not passed explicitly, so the guest keeps
it and OVMF boots Windows into its LA57 kernel.

Hide la57 for any CPU model on the same machine types unless la57=on is
given explicitly. libvirt records the filtered la57 as disabled in the
live definition for check='partial', which nova uses for host-model, so
migration, save and snapshots carry it as before.

Intel named models with la57 (Icelake-Server, SapphireRapids,
GraniteRapids) lose it on fresh start too, as "-cpu host" already does.

Fixes: 1c84596876f ("i386: hide la57 at fresh start on vz machine types that show ARCH_CAPABILITIES #VSTOR-152405")
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
Applies unchanged to hci-8.0 and hci-8.1. Build-checked on both, not
yet run on an LA57 host.

 target/i386/cpu.c | 3 +--
 target/i386/cpu.h | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 8d2ce279a72..e22fafeaef0 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -9116,8 +9116,7 @@ static bool x86_cpu_hide_la57(X86CPU *cpu)
 {
     CPUX86State *env = &cpu->env;
 
-    if (!cpu->no_la57_on_start || !X86_CPU_GET_CLASS(cpu)->max_features ||
-        !kvm_enabled() ||
+    if (!cpu->no_la57_on_start || !kvm_enabled() ||
         !(env->features[FEAT_7_0_ECX] & CPUID_7_0_ECX_LA57) ||
         (env->user_features[FEAT_7_0_ECX] & CPUID_7_0_ECX_LA57)) {
         return false;
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 5c1a692aca3..cbea9cf63d9 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -2343,8 +2343,8 @@ struct ArchCPU {
     bool svm_features_compat;
 
     /*
-     * Virtuozzo machine types up to vz10.0.0: hide la57 from "-cpu host"
-     * when the VM starts fresh, keep it on incoming migration.
+     * Virtuozzo machine types up to vz10.0.0: hide la57 unless requested
+     * explicitly when the VM starts fresh, keep it on incoming migration.
      */
     bool no_la57_on_start;
 

base-commit: 1c84596876fb77b3e25d56cd4a4fa0c32f1faa32
-- 
2.53.0


             reply	other threads:[~2026-11-03 20:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 20:27 Denis V. Lunev [this message]
2026-11-03 20:29 ` no-reply
2026-11-04 11:57 ` Andrey Drobyshev

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=20261103202710.976429-1-den@openvz.org \
    --to=den@openvz.org \
    --cc=andrey.drobyshev@virtuozzo.com \
    --cc=svt-core@virtuozzo.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