[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/mem_sharing: use INVALID_MFN and p2m_is_shared in relinquish_shared_pages
commit 5a9185c395527f4eebd788773c74e269f085bde4 Author: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx> AuthorDate: Fri Jan 24 10:25:12 2020 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Fri Jan 24 10:25:12 2020 +0100 x86/mem_sharing: use INVALID_MFN and p2m_is_shared in relinquish_shared_pages While using _mfn(0) is of no consequence during teardown, INVALID_MFN is the correct value that should be used. Signed-off-by: Tamas K Lengyel <tamas.lengyel@xxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/mm/mem_sharing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c index 1846f97acc..cc3fc97618 100644 --- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -1314,7 +1314,7 @@ int relinquish_shared_pages(struct domain *d) break; mfn = p2m->get_entry(p2m, _gfn(gfn), &t, &a, 0, NULL, NULL); - if ( mfn_valid(mfn) && t == p2m_ram_shared ) + if ( mfn_valid(mfn) && p2m_is_shared(t) ) { /* Does not fail with ENOMEM given the DESTROY flag */ BUG_ON(__mem_sharing_unshare_page( @@ -1324,7 +1324,7 @@ int relinquish_shared_pages(struct domain *d) * unshare. Must succeed: we just read the old entry and * we hold the p2m lock. */ - set_rc = p2m->set_entry(p2m, _gfn(gfn), _mfn(0), PAGE_ORDER_4K, + set_rc = p2m->set_entry(p2m, _gfn(gfn), INVALID_MFN, PAGE_ORDER_4K, p2m_invalid, p2m_access_rwx, -1); ASSERT(!set_rc); count += 0x10; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |