From 1de1bae235186c5878b35a27eaaba7abb97f4739 Mon Sep 17 00:00:00 2001 From: George Dunlap Date: Mon, 23 Dec 2019 17:54:53 +0000 Subject: [PATCH 1/4] x86/p2m: Remove some trailing whitespace No functional changes. Signed-off-by: George Dunlap --- xen/arch/x86/mm/p2m.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index ba126f790a..b9f8948130 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -892,7 +892,7 @@ guest_physmap_add_entry(struct domain *d, gfn_t gfn, mfn_t mfn, &a, 0, NULL, NULL); if ( p2m_is_shared(ot) ) { - /* Do an unshare to cleanly take care of all corner + /* Do an unshare to cleanly take care of all corner * cases. */ int rc; rc = mem_sharing_unshare_page(p2m->domain, @@ -909,7 +909,7 @@ guest_physmap_add_entry(struct domain *d, gfn_t gfn, mfn_t mfn, * However, all current (changeset 3432abcf9380) code * paths avoid this unsavoury situation. For now. * - * Foreign domains are okay to place an event as they + * Foreign domains are okay to place an event as they * won't go to sleep. */ (void)mem_sharing_notify_enomem(p2m->domain, gfn_x(gfn_add(gfn, i)), false); @@ -924,7 +924,7 @@ guest_physmap_add_entry(struct domain *d, gfn_t gfn, mfn_t mfn, /* Really shouldn't be unmapping grant/foreign maps this way */ domain_crash(d); p2m_unlock(p2m); - + return -EINVAL; } else if ( p2m_is_ram(ot) && !p2m_is_paged(ot) ) @@ -1787,7 +1787,7 @@ int p2m_mem_paging_prep(struct domain *d, unsigned long gfn_l, uint64_t buffer) if ( user_ptr ) /* Sanity check the buffer and bail out early if trouble */ - if ( (buffer & (PAGE_SIZE - 1)) || + if ( (buffer & (PAGE_SIZE - 1)) || (!access_ok(user_ptr, PAGE_SIZE)) ) return -EINVAL; @@ -1832,7 +1832,7 @@ int p2m_mem_paging_prep(struct domain *d, unsigned long gfn_l, uint64_t buffer) "bytes left %d\n", gfn_l, d->domain_id, rc); ret = -EFAULT; put_page(page); /* Don't leak pages */ - goto out; + goto out; } } @@ -1904,7 +1904,7 @@ static struct p2m_domain * p2m_getlru_nestedp2m(struct domain *d, struct p2m_domain *p2m) { struct list_head *lru_list = &p2m_get_hostp2m(d)->np2m_list; - + ASSERT(!list_empty(lru_list)); if ( p2m == NULL ) @@ -2050,7 +2050,7 @@ p2m_get_nestedp2m_locked(struct vcpu *v) nestedp2m_lock(d); p2m = nv->nv_p2m; - if ( p2m ) + if ( p2m ) { p2m_lock(p2m); if ( p2m->np2m_base == np2m_base ) @@ -2889,7 +2889,7 @@ void audit_p2m(struct domain *d, pod_unlock(p2m); p2m_unlock(p2m); - + P2M_PRINTK("p2m audit complete\n"); if ( orphans_count | mpbad | pmbad ) P2M_PRINTK("p2m audit found %lu orphans\n", orphans_count); -- 2.24.0