summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRoger Pau Monne <roger@xenproject.org>2026-08-05 11:40:07 +0200
committerJuergen Gross <jgross@suse.com>2026-08-05 14:06:58 +0200
commit5d00a11d484e7b31a358cd81afebccb4602dbe8c (patch)
treea9eee8b6b1487d970f4005f5fa82a4536d277685 /tools
parentc76cbf348c7df077f93fa99a1225a527ce64cfa1 (diff)
x86/xen: fix init of balloon stats again
The handling of extra memory regions done in balloon_add_regions() is not correct for PV guests, since the initial target is set to reflect the real memory the system has, not what's described on the memory map, which can be higher if memory != maxmem. Introduce separate logic for addition vs subtraction in balloon_add_regions() and handle extra regions correctly by adding them to the total amount of pages, instead of subtracting from the current and target pages amounts. In the common case PV domU/dom0 and PVH dom0 will use the addition path, since the initial target reflects the real assigned memory. HVM and PVH domUs use the subtraction path, since the target is set based on the amount of memory reported in the memory map, without accounting for released regions. Fixes: 87af633689ce ("x86/xen: fix balloon target initialization for PVH dom0") Fixes: 0949c646d646 ("Partial revert "x86/xen: fix balloon target initialization for PVH dom0"") Signed-off-by: Roger Pau Monné <roger@xenproject.org> Cc: stable@vger.kernel.org Reviewed-by: Juergen Gross <jgross@suse.com> Tested-by: Matthias Goergens <matthias.goergens@gmail.com> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <20260805094008.95778-1-roger@xenproject.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions