aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/memory.c
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@citrix.com>2011-06-02 13:16:52 +0100
committerTim Deegan <Tim.Deegan@citrix.com>2011-06-02 13:16:52 +0100
commit8c7d0b26207932a07061b03e1873dc3c8987f568 (patch)
treed26798443d514c1a1b03bb80979a49dd8f16d323 /xen/common/memory.c
parent992980732559dc633b85bf661918c3041df36c6e (diff)
downloadxen-8c7d0b26207932a07061b03e1873dc3c8987f568.tar.gz
xen-8c7d0b26207932a07061b03e1873dc3c8987f568.tar.bz2
xen-8c7d0b26207932a07061b03e1873dc3c8987f568.zip
x86/mm/p2m: merge gfn_to_mfn_unshare with other gfn_to_mfn paths.
gfn_to_mfn_unshare() had its own function despite all other lookup types being handled in one place. Merge it into _gfn_to_mfn_type(), so that it gets the benefit of broken-page protection, for example, and tidy its interfaces up to fit. The unsharing code still has a lot of bugs, e.g. - failure to alloc for unshare on a foreign lookup still BUG()s, - at least one race condition in unshare-and-retry - p2m_* lookup types should probably be flags, not enum but it's cleaner and will make later p2m cleanups easier. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'xen/common/memory.c')
-rw-r--r--xen/common/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/common/memory.c b/xen/common/memory.c
index cf6482de9f..382caf6c51 100644
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -363,7 +363,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(p2m_get_hostp2m(d), gmfn + k, &p2mt, 0));
+ mfn = mfn_x(gfn_to_mfn_unshare(p2m_get_hostp2m(d), gmfn + k, &p2mt));
if ( p2m_is_shared(p2mt) )
{
rc = -ENOMEM;