... with a check of domain_tot_pages().
The check of page_list prevents the prior allocation of PGC_extra pages,
whereas what the code is trying to verify is that the toolstack has not
already RAM for the domain.
Signed-off-by: Paul Durrant <paul@xen.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
p2m_lock(p2m);
- if ( p2m_is_hostp2m(p2m)
- && !page_list_empty(&d->page_list) )
+ if ( p2m_is_hostp2m(p2m) && domain_tot_pages(d) )
{
P2M_ERROR("dom %d already has memory allocated\n", d->domain_id);
p2m_unlock(p2m);