aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/memory.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-08-09 16:46:42 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-08-09 16:46:42 +0100
commit74aeab42a37ad74d65fc182b96d57251458f7ab4 (patch)
treeca3d5844ec4218c63e2310a67a1bc27164a09523 /xen/common/memory.c
parentc92aec02ad55858cd5767f37ee7a9069ba2f248b (diff)
downloadxen-74aeab42a37ad74d65fc182b96d57251458f7ab4.tar.gz
xen-74aeab42a37ad74d65fc182b96d57251458f7ab4.tar.bz2
xen-74aeab42a37ad74d65fc182b96d57251458f7ab4.zip
Nested Virtualization: p2m infrastructure
Change p2m infrastructure to operate on per-p2m instead of per-domain. This allows us to use multiple p2m tables per-domain. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'xen/common/memory.c')
-rw-r--r--xen/common/memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/common/memory.c b/xen/common/memory.c
index 9dd0307f96..a18c896545 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -161,7 +161,7 @@ int guest_remove_page(struct domain *d, unsigned long gmfn)
unsigned long mfn;
#ifdef CONFIG_X86
- mfn = mfn_x(gfn_to_mfn(d, gmfn, &p2mt));
+ mfn = mfn_x(gfn_to_mfn(p2m_get_hostp2m(d), gmfn, &p2mt));
#else
mfn = gmfn_to_mfn(d, gmfn);
#endif
@@ -356,7 +356,7 @@ static long memory_exchange(XEN_GUEST_HANDLE(xen_memory_exchange_t) arg)
p2m_type_t p2mt;
/* Shared pages cannot be exchanged */
- mfn = mfn_x(gfn_to_mfn_unshare(d, gmfn + k, &p2mt, 0));
+ mfn = mfn_x(gfn_to_mfn_unshare(p2m_get_hostp2m(d), gmfn + k, &p2mt, 0));
if ( p2m_is_shared(p2mt) )
{
rc = -ENOMEM;