|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/p2m: add PoD accounting to set_typed_p2m_entry()
commit 11d49fffb2cad84403d807200be3085d653c854c
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Sep 23 11:14:05 2015 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Sep 23 11:14:05 2015 +0200
x86/p2m: add PoD accounting to set_typed_p2m_entry()
While neither PoD together with pass-through nor PVH are currently
supported we still shouldn't leave in place such latent issues.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Tim Deegan <tim@xxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>
---
xen/arch/x86/mm/p2m.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index e1d930a..87b6a16 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -926,11 +926,19 @@ static int set_typed_p2m_entry(struct domain *d, unsigned
long gfn, mfn_t mfn,
P2M_DEBUG("set %d %lx %lx\n", gfn_p2mt, gfn, mfn_x(mfn));
rc = p2m_set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, gfn_p2mt,
access);
- gfn_unlock(p2m, gfn, 0);
if ( rc )
gdprintk(XENLOG_ERR,
"p2m_set_entry failed! mfn=%08lx rc:%d\n",
mfn_x(get_gfn_query_unlocked(p2m->domain, gfn, &ot)), rc);
+ else if ( p2m_is_pod(ot) )
+ {
+ pod_lock(p2m);
+ p2m->pod.entry_count--;
+ BUG_ON(p2m->pod.entry_count < 0);
+ pod_unlock(p2m);
+ }
+ gfn_unlock(p2m, gfn, 0);
+
return rc;
}
--
generated by git-patchbot for /home/xen/git/xen.git#master
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |