summaryrefslogtreecommitdiff
path: root/arch/x86/xen/p2m.c
diff options
context:
space:
mode:
authorJuergen Gross <jgross@suse.com>2025-08-26 16:56:07 +0200
committerJuergen Gross <jgross@suse.com>2025-09-08 17:01:36 +0200
commit0f4283123fe1e6016296048d0fdcfce615047a13 (patch)
tree6e073d82ff1cc58b732f97cdb6a543b1618fb47f /arch/x86/xen/p2m.c
parent34c605fe53d49886d2741223b12950a33bdf2acf (diff)
xen: replace XENFEAT_auto_translated_physmap with xen_pv_domain()
Instead of testing the XENFEAT_auto_translated_physmap feature, just use !xen_pv_domain() which is equivalent. This has the advantage that a kernel not built with CONFIG_XEN_PV will be smaller due to dead code elimination. Reviewed-by: Jason Andryuk <jason.andryuk@amd.com> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <20250826145608.10352-3-jgross@suse.com>
Diffstat (limited to 'arch/x86/xen/p2m.c')
-rw-r--r--arch/x86/xen/p2m.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c
index 56914e21e303..2dd12b61a230 100644
--- a/arch/x86/xen/p2m.c
+++ b/arch/x86/xen/p2m.c
@@ -686,7 +686,7 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
int i, ret = 0;
pte_t *pte;
- if (xen_feature(XENFEAT_auto_translated_physmap))
+ if (!xen_pv_domain())
return 0;
if (kmap_ops) {
@@ -769,7 +769,7 @@ int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops,
{
int i, ret = 0;
- if (xen_feature(XENFEAT_auto_translated_physmap))
+ if (!xen_pv_domain())
return 0;
for (i = 0; i < count; i++) {