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/balloon.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/balloon.c')
| -rw-r--r-- | drivers/xen/balloon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 2de37dcd7556..49c3f9926394 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -302,7 +302,7 @@ static enum bp_state reserve_additional_memory(void) * 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()) { unsigned long pfn, i; pfn = PFN_DOWN(resource->start); @@ -626,7 +626,7 @@ int xen_alloc_ballooned_pages(unsigned int nr_pages, struct page **pages) */ BUILD_BUG_ON(XEN_PAGE_SIZE != PAGE_SIZE); - if (!xen_feature(XENFEAT_auto_translated_physmap)) { + if (xen_pv_domain()) { ret = xen_alloc_p2m_entry(page_to_pfn(page)); if (ret < 0) goto out_undo; |