]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xen: rework xen_pv_domain()
authorJuergen Gross <jgross@suse.com>
Tue, 26 Aug 2025 14:56:06 +0000 (16:56 +0200)
committerJuergen Gross <jgross@suse.com>
Mon, 8 Sep 2025 15:01:36 +0000 (17:01 +0200)
commit34c605fe53d49886d2741223b12950a33bdf2acf
tree2b575fbe8f5be414ea97866d39cc7cfd2aa4b95f
parent76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c
xen: rework xen_pv_domain()

Rework xen_pv_domain() to no longer use the xen_domain_type variable,
but the artificial X86_FEATURE_XENPV cpu feature.

On non-x86 architectures xen_pv_domain() can be defined as "0".

This has the advantage that a kernel not built with CONFIG_XEN_PV
will be smaller due to dead code elimination.

Set the X86_FEATURE_XENPV feature very early, as xen_pv_domain() is
used rather early, too.

Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20250826145608.10352-2-jgross@suse.com>
arch/x86/xen/enlighten_pv.c
include/xen/xen.h