diff options
author | Juergen Gross <jgross@suse.com> | 2025-08-26 16:56:07 +0200 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2025-09-08 17:01:36 +0200 |
commit | 0f4283123fe1e6016296048d0fdcfce615047a13 (patch) | |
tree | 6e073d82ff1cc58b732f97cdb6a543b1618fb47f /drivers/xen/unpopulated-alloc.c | |
parent | 34c605fe53d49886d2741223b12950a33bdf2acf (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 'drivers/xen/unpopulated-alloc.c')
-rw-r--r-- | drivers/xen/unpopulated-alloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/xen/unpopulated-alloc.c b/drivers/xen/unpopulated-alloc.c index a39f2d36dd9c..d6fc2aefe264 100644 --- a/drivers/xen/unpopulated-alloc.c +++ b/drivers/xen/unpopulated-alloc.c @@ -105,7 +105,7 @@ static int fill_list(unsigned int nr_pages) * are not restored since this region is now known not to * conflict with any devices. */ - if (!xen_feature(XENFEAT_auto_translated_physmap)) { + if (xen_pv_domain()) { xen_pfn_t pfn = PFN_DOWN(res->start); for (i = 0; i < alloc_pages; i++) { @@ -184,7 +184,7 @@ int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages) pages[i] = pg; #ifdef CONFIG_XEN_HAVE_PVMMU - if (!xen_feature(XENFEAT_auto_translated_physmap)) { + if (xen_pv_domain()) { ret = xen_alloc_p2m_entry(page_to_pfn(pg)); if (ret < 0) { unsigned int j; |