mirror-linux/include/xen
Roger Pau Monne 0949c646d6 Partial revert "x86/xen: fix balloon target initialization for PVH dom0"
This partially reverts commit 87af633689 so
the current memory target for PV guests is still fetched from
start_info->nr_pages, which matches exactly what the toolstack sets the
initial memory target to.

Using get_num_physpages() is possible on PV also, but needs adjusting to
take into account the ISA hole and the PFN at 0 not considered usable
memory despite being populated, and hence would need extra adjustments.
Instead of carrying those extra adjustments switch back to the previous
code.  That leaves Linux with a difference in how current memory target is
obtained for HVM vs PV, but that's better than adding extra logic just for
PV.

However if switching to start_info->nr_pages for PV domains we need to
differentiate between released pages (freed back to the hypervisor) as
opposed to pages in the physmap which are not populated to start with.
Introduce a new xen_unpopulated_pages to account for papges that have
never been populated, and hence in the PV case don't need subtracting.

Fixes: 87af633689 ("x86/xen: fix balloon target initialization for PVH dom0")
Reported-by: James Dingwall <james@dingwall.me.uk>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Message-ID: <20260128110510.46425-2-roger.pau@citrix.com>
2026-02-02 07:31:22 +01:00
..
arm arm/xen: remove lazy mode related definitions 2023-09-19 07:04:49 +02:00
interface xen/mcelog: Add __nonstring annotations for unterminated strings 2025-03-14 11:15:16 +01:00
acpi.h xen: Remove dependency between pciback and privcmd 2024-10-18 11:59:04 +02:00
balloon.h
events.h x86/xen: eliminate some private header files 2024-07-11 16:33:48 +02:00
features.h
grant_table.h xen: replace XENFEAT_auto_translated_physmap with xen_pv_domain() 2025-09-08 17:01:36 +02:00
hvc-console.h
hvm.h
mem-reservation.h xen: replace XENFEAT_auto_translated_physmap with xen_pv_domain() 2025-09-08 17:01:36 +02:00
page.h
pci.h xen/pci: Add a function to reset device for xen 2024-09-25 09:54:40 +02:00
platform_pci.h
swiotlb-xen.h
xen-front-pgdir-shbuf.h
xen-ops.h xen: replace XENFEAT_auto_translated_physmap with xen_pv_domain() 2025-09-08 17:01:36 +02:00
xen.h Partial revert "x86/xen: fix balloon target initialization for PVH dom0" 2026-02-02 07:31:22 +01:00
xenbus.h drivers/xen/xenbus: Replace deprecated strcpy in xenbus_transaction_end 2025-11-17 08:48:40 +01:00
xenbus_dev.h