xen/setup: Cap amount to populate based on current tot_pages count.
Previous to this patch we would try to populate exactly up to
xen_released_pages number (so the ones that we released), but
that is incorrect as there are some pages that we thought were
released but in actuality were shared. Depending on the platform
it could be small amounts - 2 pages, but some had much higher - 17.
As such, lets use the XENMEM_current_reservation to get the exact
count of pages we are using, subtract it from nr_pages and use the
lesser of this and xen_released_pages to populate back.
This fixes errors such as:
(XEN) page_alloc.c:1148:d0 Over-allocation for domain 0:
2097153 >
2097152
(XEN) memory.c:133:d0 Could not allocate order=0 extent: id=0 memflags=0 (0 of 17)
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>