public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH] kernel config: don't automatically enable kexec handover (KHO)
@ 2026-07-14 12:44 Dominik Csapak
  2026-07-15  8:12 ` Dominik Csapak
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2026-07-14 12:44 UTC (permalink / raw)
  To: pve-devel

CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT is enabled by default in the
upstream ubuntu kernel config, but has a (probably) unintended
side-effect: when KHO is automatically enabled, the kernel reserves
scratch memory for the kernel handoff and marks it with MIGRATE_CMA to
prevent non-movable allocations there.

This causes unusual stats in /proc/meminfo, for example:

CmaTotal:              0 kB
CmaFree:         4894720 kB

which looks nonsensical on the surface. It also reduces the available
memory for e.g. guests with PCI passthrough, as pinner memory can't live
in these areas.

Since we don't use kexec handover by default, and it can still be
enabled on the kernel commandline (kho=on), disable it by default to
increase the available pinnable memory for guests.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 debian/rules.d/config-common.opts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/rules.d/config-common.opts b/debian/rules.d/config-common.opts
index 64505b4..204bab4 100644
--- a/debian/rules.d/config-common.opts
+++ b/debian/rules.d/config-common.opts
@@ -68,3 +68,4 @@
 -d CONFIG_N_GSM
 -d UBSAN_BOUNDS
 -e CONFIG_RUST
+-d CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kernel config: don't automatically enable kexec handover (KHO)
  2026-07-14 12:44 [PATCH] kernel config: don't automatically enable kexec handover (KHO) Dominik Csapak
@ 2026-07-15  8:12 ` Dominik Csapak
  0 siblings, 0 replies; 2+ messages in thread
From: Dominik Csapak @ 2026-07-15  8:12 UTC (permalink / raw)
  To: pve-devel

just a note for this (maybe can be squashed into the commit message
on applying):

this does not disable the kexec handoff completely, it just
does not enable it by default, so users that would need it
can still enable it via 'kho=on' on the commandline.

conversely, users running into problem with the current configuration
can mitigate the issue by adding 'kho=off' to their commandline
to disable it.

On 7/14/26 2:44 PM, Dominik Csapak wrote:
> CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT is enabled by default in the
> upstream ubuntu kernel config, but has a (probably) unintended
> side-effect: when KHO is automatically enabled, the kernel reserves
> scratch memory for the kernel handoff and marks it with MIGRATE_CMA to
> prevent non-movable allocations there.
> 
> This causes unusual stats in /proc/meminfo, for example:
> 
> CmaTotal:              0 kB
> CmaFree:         4894720 kB
> 
> which looks nonsensical on the surface. It also reduces the available
> memory for e.g. guests with PCI passthrough, as pinner memory can't live
> in these areas.
> 
> Since we don't use kexec handover by default, and it can still be
> enabled on the kernel commandline (kho=on), disable it by default to
> increase the available pinnable memory for guests.
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>   debian/rules.d/config-common.opts | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/debian/rules.d/config-common.opts b/debian/rules.d/config-common.opts
> index 64505b4..204bab4 100644
> --- a/debian/rules.d/config-common.opts
> +++ b/debian/rules.d/config-common.opts
> @@ -68,3 +68,4 @@
>   -d CONFIG_N_GSM
>   -d UBSAN_BOUNDS
>   -e CONFIG_RUST
> +-d CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-15  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14 12:44 [PATCH] kernel config: don't automatically enable kexec handover (KHO) Dominik Csapak
2026-07-15  8:12 ` Dominik Csapak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal