From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xen.org
Cc: julien.grall@linaro.org, tim@xen.org,
Ian Campbell <ian.campbell@citrix.com>,
stefano.stabellini@eu.citrix.com
Subject: [PATCH v2 2/4] xen: arm: rename p2m next_gfn_to_relinquish to lowest_mapped_gfn
Date: Tue, 4 Feb 2014 14:22:23 +0000 [thread overview]
Message-ID: <1391523745-21139-2-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1391523701.5635.6.camel@kazak.uk.xensource.com>
This has other uses other than during relinquish, so rename it for clarity.
This is a pure rename.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
xen/arch/arm/p2m.c | 9 ++++-----
xen/include/asm-arm/p2m.h | 8 +++++---
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c
index ace3c54..a61edeb 100644
--- a/xen/arch/arm/p2m.c
+++ b/xen/arch/arm/p2m.c
@@ -388,7 +388,7 @@ static int apply_p2m_changes(struct domain *d,
{
if ( hypercall_preempt_check() )
{
- p2m->next_gfn_to_relinquish = addr >> PAGE_SHIFT;
+ p2m->lowest_mapped_gfn = addr >> PAGE_SHIFT;
rc = -EAGAIN;
goto out;
}
@@ -415,8 +415,7 @@ static int apply_p2m_changes(struct domain *d,
unsigned long egfn = paddr_to_pfn(end_gpaddr);
p2m->max_mapped_gfn = MAX(p2m->max_mapped_gfn, egfn);
- /* Use next_gfn_to_relinquish to store the lowest gfn mapped */
- p2m->next_gfn_to_relinquish = MIN(p2m->next_gfn_to_relinquish, sgfn);
+ p2m->lowest_mapped_gfn = MIN(p2m->lowest_mapped_gfn, sgfn);
}
rc = 0;
@@ -606,7 +605,7 @@ int p2m_init(struct domain *d)
p2m->first_level = NULL;
p2m->max_mapped_gfn = 0;
- p2m->next_gfn_to_relinquish = ULONG_MAX;
+ p2m->lowest_mapped_gfn = ULONG_MAX;
err:
spin_unlock(&p2m->lock);
@@ -619,7 +618,7 @@ int relinquish_p2m_mapping(struct domain *d)
struct p2m_domain *p2m = &d->arch.p2m;
return apply_p2m_changes(d, RELINQUISH,
- pfn_to_paddr(p2m->next_gfn_to_relinquish),
+ pfn_to_paddr(p2m->lowest_mapped_gfn),
pfn_to_paddr(p2m->max_mapped_gfn),
pfn_to_paddr(INVALID_MFN),
MATTR_MEM, p2m_invalid);
diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h
index 53b3266..e9c884a 100644
--- a/xen/include/asm-arm/p2m.h
+++ b/xen/include/asm-arm/p2m.h
@@ -24,9 +24,11 @@ struct p2m_domain {
*/
unsigned long max_mapped_gfn;
- /* When releasing mapped gfn's in a preemptible manner, recall where
- * to resume the search */
- unsigned long next_gfn_to_relinquish;
+ /* Lowest mapped gfn in the p2m. When releasing mapped gfn's in a
+ * preemptible manner this is update to track recall where to
+ * resume the search. Apart from during teardown this can only
+ * decrease. */
+ unsigned long lowest_mapped_gfn;
};
/* List of possible type for each page in the p2m entry.
--
1.7.10.4
next prev parent reply other threads:[~2014-02-04 14:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 14:21 [PATCH 0/4 v2] xen/arm: fix guest builder cache cohenrency (again, again) Ian Campbell
2014-02-04 14:22 ` [PATCH v2 1/4] xen: arm: rename create_p2m_entries to apply_p2m_changes Ian Campbell
2014-02-04 14:22 ` Ian Campbell [this message]
2014-02-04 14:22 ` [PATCH v2 3/4] xen/arm: clean and invalidate all guest caches by VMID after domain build Ian Campbell
2014-02-04 15:00 ` Jan Beulich
2014-02-04 15:43 ` Ian Campbell
2014-02-04 15:48 ` Jan Beulich
2014-02-04 16:07 ` Ian Campbell
2014-02-04 16:42 ` Jan Beulich
2014-02-04 15:32 ` Ian Jackson
2014-02-04 15:37 ` Ian Campbell
2014-02-04 15:55 ` Ian Jackson
2014-02-04 16:09 ` Ian Campbell
2014-02-04 16:16 ` Ian Jackson
2014-02-04 14:22 ` [PATCH v2 4/4] Revert "xen: arm: force guest memory accesses to cacheable when MMU is disabled" Ian Campbell
2014-02-04 15:37 ` Julien Grall
2014-02-04 16:07 ` Ian Campbell
-- strict thread matches above, loose matches on Subject: below --
2014-02-05 16:03 [PATCH 0/4 v3] xen/arm: fix guest builder cache cohenrency (again, again) Ian Campbell
2014-02-05 16:03 ` [PATCH v2 2/4] xen: arm: rename p2m next_gfn_to_relinquish to lowest_mapped_gfn Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1391523745-21139-2-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).