From: "Denis V. Lunev" <den@openvz.org>
To: svt-core@virtuozzo.com
Cc: andrey.drobyshev@virtuozzo.com, den@openvz.org
Subject: [PATCH hci-8.1 v2 2/2] i386: hide la57 at fresh start on all Virtuozzo machine types #VSTOR-154986
Date: Tue, 17 Nov 2026 18:46:10 +0100 [thread overview]
Message-ID: <20261117174610.1689714-3-den@openvz.org> (raw)
In-Reply-To: <20261117174610.1689714-1-den@openvz.org>
From: Denis V. Lunev <den@openvz.org>
x-no-la57-on-start covers pc-q35-vz10.0.0 and older and every
pc-i440fx type, but not pc-q35-vz10.1.0. A Linux guest built with
CONFIG_X86_5LEVEL switches to 5-level paging whenever the CPU reports
la57, whatever its RAM size, so on hosts with la57 (Ice Lake SP and
newer, EPYC 9004/9005) every vz10.1.0 guest gets the extra page table
level. That lengthens the KVM software walk of guest page tables used
by emulated string I/O, and adds to page table setup and teardown in
every exec.
Our guests do not need a 57-bit address space. Move the property into
pc_vz_compat, which every Virtuozzo machine type applies, so the types
added later hide la57 too and pc_vz_10_0_compat goes away. Only
pc-q35-vz10.1.0 changes. A guest that needs la57 gets it only with
la57=on, "-cpu host" included. A running guest keeps la57 on incoming
migration.
Signed-off-by: Denis V. Lunev <den@openvz.org>
---
hw/i386/pc.c | 6 +-----
hw/i386/pc_piix.c | 2 +-
hw/i386/pc_q35.c | 2 +-
include/hw/i386/pc.h | 3 ---
target/i386/cpu.h | 4 ++--
5 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 40127f70269..5e194f43d40 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -546,13 +546,9 @@ GlobalProperty pc_vz_compat[] = {
{ TYPE_X86_CPU, "kvm-pv-sched-yield", "on" },
{ TYPE_X86_CPU, "kvm-asyncpf-int", "on" },
{ TYPE_X86_CPU, "x-consistent-cache", "false" },
-};
-const size_t pc_vz_compat_len = G_N_ELEMENTS(pc_vz_compat);
-
-GlobalProperty pc_vz_10_0_compat[] = {
{ TYPE_X86_CPU, "x-no-la57-on-start", "on" },
};
-const size_t pc_vz_10_0_compat_len = G_N_ELEMENTS(pc_vz_10_0_compat);
+const size_t pc_vz_compat_len = G_N_ELEMENTS(pc_vz_compat);
GlobalProperty pc_vz_9_2_compat[] = {
{ TYPE_X86_CPU, "x-tsx-compat", "on" },
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 768c6e47f53..b1b595078eb 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -1056,7 +1056,7 @@ DEFINE_I440FX_RHEL_MACHINE(7, 2, 0);
/* maj min mic basemt isdefault */
#define VZ_PC_MT(X) \
- X(10, 1, 0, MT_VER_SYM(10, 0, 0), true, pc_vz_10_0_compat) \
+ X(10, 1, 0, MT_VER_SYM(10, 0, 0), true) \
X(10, 0, 0, MT_VER_SYM(10, 0, 0), false) \
X(7, 16, 0, MT_VER_SYM(7, 6, 0), false, pc_vz_9_2_compat, \
hw_compat_vz_9_1, \
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index 51539f22399..019239bec6a 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -973,7 +973,7 @@ DEFINE_Q35_RHEL_MACHINE(7, 3, 0);
/* maj min mic basemt isdefault */
#define VZ_Q35_MT(X) \
X(10, 1, 0, MT_VER_SYM(10, 2, 0), true) \
- X(10, 0, 0, MT_VER_SYM(10, 0, 0), false, pc_vz_10_0_compat) \
+ X(10, 0, 0, MT_VER_SYM(10, 0, 0), false) \
X(9, 2, 0, MT_VER_SYM(9, 6, 0), false, pc_vz_9_2_compat) \
X(9, 1, 0, MT_VER_SYM(9, 4, 0), false, hw_compat_vz_9_1) \
X(9, 0, 0, MT_VER_SYM(9, 2, 0), false) \
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 021b139b872..bd73426644e 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -364,9 +364,6 @@ extern const size_t pc_rhel_7_2_compat_len;
extern GlobalProperty pc_vz_compat[];
extern const size_t pc_vz_compat_len;
-extern GlobalProperty pc_vz_10_0_compat[];
-extern const size_t pc_vz_10_0_compat_len;
-
extern GlobalProperty pc_vz_9_2_compat[];
extern const size_t pc_vz_9_2_compat_len;
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index cbea9cf63d9..bf19556aa38 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 unless requested
- * explicitly when the VM starts fresh, keep it on incoming migration.
+ * Virtuozzo machine types: hide la57 unless requested explicitly when
+ * the VM starts fresh, keep it on incoming migration.
*/
bool no_la57_on_start;
--
2.55.0
next prev parent reply other threads:[~2026-11-17 17:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 17:46 [PATCH hci-8.1 v2 0/2] i386: fix the exec slowdown of pc-q35-vz10.1.0 guests #VSTOR-154986 Denis V. Lunev
2026-11-17 17:46 ` [PATCH hci-8.1 v2 1/2] i386: turn off x-consistent-cache on all Virtuozzo machine types #VSTOR-154986 Denis V. Lunev
2026-11-17 17:48 ` no-reply
2026-11-17 17:46 ` Denis V. Lunev [this message]
2026-11-17 17:49 ` [PATCH hci-8.1 v2 2/2] i386: hide la57 at fresh start " no-reply
2026-11-17 18:04 ` [PATCH hci-8.1 v2 0/2] i386: fix the exec slowdown of pc-q35-vz10.1.0 guests #VSTOR-154986 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=20261117174610.1689714-3-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.