Skip to content

Commit

Permalink
x86/mem_sharing: copy parent VM's hostp2m's max_mapped_pfn during for…
Browse files Browse the repository at this point in the history
…king

When creating a VM fork copy the parent VM's hostp2m max_mapped_pfn value. Some
toolstack relies on the XENMEM_maximum_gpfn value to establish the maximum
addressable physical memory in the VM and for forks that have not yet been
unpaused that value is not going to reflect the correct max gpfn that's
possible to populate into the p2m. This patch fixes the issue.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@intel.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
master commit: f10c415
master date: 2021-03-26 16:17:07 +0100
  • Loading branch information
tklengyel authored and jbeulich committed Mar 26, 2021
1 parent cbc8a90 commit b712639
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions xen/arch/x86/mm/mem_sharing.c
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,7 @@ static int copy_settings(struct domain *cd, struct domain *d)
return rc;

copy_tsc(cd, d);
p2m_get_hostp2m(cd)->max_mapped_pfn = p2m_get_hostp2m(d)->max_mapped_pfn;

return rc;
}
Expand Down

0 comments on commit b712639

Please sign in to comment.