aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/domctl.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-12-17 06:27:56 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-12-17 06:27:56 +0000
commitaf909e7e16dd67452bde91bb71c8111c95c43983 (patch)
treeadc7949938cde5c9257942cb7fbbf6a06af08cfc /xen/common/domctl.c
parente8a90e0ab12cfb9cb4f8a87a5525797719cd07b6 (diff)
downloadxen-af909e7e16dd67452bde91bb71c8111c95c43983.tar.gz
xen-af909e7e16dd67452bde91bb71c8111c95c43983.tar.bz2
xen-af909e7e16dd67452bde91bb71c8111c95c43983.zip
M2P translation cannot be handled through flat table with only one slot per MFN
when an MFN is shared. However, all existing calls can either infer the GFN (for example p2m table destructor) or will not need to know GFN for shared pages. This patch identifies and fixes all the M2P accessors, either by removing the translation altogether or by making the relevant modifications. Shared MFNs have a special value of SHARED_M2P_ENTRY stored in their M2P table slot. Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
Diffstat (limited to 'xen/common/domctl.c')
-rw-r--r--xen/common/domctl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 0c417c7fea..9d7c271d4f 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -137,6 +137,7 @@ void getdomaininfo(struct domain *d, struct xen_domctl_getdomaininfo *info)
info->tot_pages = d->tot_pages;
info->max_pages = d->max_pages;
info->shared_info_frame = mfn_to_gmfn(d, __pa(d->shared_info)>>PAGE_SHIFT);
+ BUG_ON(SHARED_M2P(info->shared_info_frame));
memcpy(info->handle, d->handle, sizeof(xen_domain_handle_t));
}