From: Andres Lagar-Cavilla <andres@lagarcavilla.org>
To: xen-devel@lists.xensource.com
Cc: andres@gridcentric.ca, tim@xen.org, olaf@aepfle.de, adin@gridcentric.ca
Subject: [PATCH 1 of 9] x86/mm: Remove p2m_ram_paging_in
Date: Wed, 01 Feb 2012 14:51:53 -0500 [thread overview]
Message-ID: <decd21170c2a9883c6a9.1328125913@xdev.gridcentric.ca> (raw)
In-Reply-To: <patchbomb.1328125912@xdev.gridcentric.ca>
xen/arch/x86/mm.c | 8 ++++----
xen/arch/x86/mm/p2m-ept.c | 3 +--
xen/arch/x86/mm/p2m.c | 7 +++----
xen/include/asm-x86/p2m.h | 7 ++-----
4 files changed, 10 insertions(+), 15 deletions(-)
This state in the paging state machine became unnecessary after the last
few updates.
Once eliminated, rename p2m_ram_paging_in_start to p2m_ram_paging_in.
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
diff -r aa58893caa60 -r decd21170c2a xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -3573,7 +3573,7 @@ int do_mmu_update(
rc = -ENOENT;
break;
}
- else if ( p2m_ram_paging_in_start == l1e_p2mt &&
+ else if ( p2m_ram_paging_in == l1e_p2mt &&
!mfn_valid(l1emfn) )
{
put_gfn(pg_owner, l1egfn);
@@ -3622,7 +3622,7 @@ int do_mmu_update(
rc = -ENOENT;
break;
}
- else if ( p2m_ram_paging_in_start == l2e_p2mt &&
+ else if ( p2m_ram_paging_in == l2e_p2mt &&
!mfn_valid(l2emfn) )
{
put_gfn(pg_owner, l2egfn);
@@ -3657,7 +3657,7 @@ int do_mmu_update(
rc = -ENOENT;
break;
}
- else if ( p2m_ram_paging_in_start == l3e_p2mt &&
+ else if ( p2m_ram_paging_in == l3e_p2mt &&
!mfn_valid(l3emfn) )
{
put_gfn(pg_owner, l3egfn);
@@ -3692,7 +3692,7 @@ int do_mmu_update(
rc = -ENOENT;
break;
}
- else if ( p2m_ram_paging_in_start == l4e_p2mt &&
+ else if ( p2m_ram_paging_in == l4e_p2mt &&
!mfn_valid(l4emfn) )
{
put_gfn(pg_owner, l4egfn);
diff -r aa58893caa60 -r decd21170c2a xen/arch/x86/mm/p2m-ept.c
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -82,7 +82,6 @@ static void ept_p2m_type_to_flags(ept_en
case p2m_ram_paging_out:
case p2m_ram_paged:
case p2m_ram_paging_in:
- case p2m_ram_paging_in_start:
default:
entry->r = entry->w = entry->x = 0;
break;
@@ -381,7 +380,7 @@ ept_set_entry(struct p2m_domain *p2m, un
old_entry = *ept_entry;
if ( mfn_valid(mfn_x(mfn)) || direct_mmio || p2m_is_paged(p2mt) ||
- (p2mt == p2m_ram_paging_in_start) )
+ (p2mt == p2m_ram_paging_in) )
{
/* Construct the new entry, and then write it once */
new_entry.emt = epte_get_entry_emt(p2m->domain, gfn, mfn, &ipat,
diff -r aa58893caa60 -r decd21170c2a xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -935,7 +935,7 @@ void p2m_mem_paging_populate(struct doma
if ( p2mt == p2m_ram_paging_out )
req.flags |= MEM_EVENT_FLAG_EVICT_FAIL;
- set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_paging_in_start, a);
+ set_p2m_entry(p2m, gfn, mfn, PAGE_ORDER_4K, p2m_ram_paging_in, a);
}
p2m_unlock(p2m);
@@ -994,7 +994,7 @@ int p2m_mem_paging_prep(struct domain *d
ret = -ENOENT;
/* Allow missing pages */
- if ( (p2mt != p2m_ram_paging_in_start) && (p2mt != p2m_ram_paged) )
+ if ( (p2mt != p2m_ram_paging_in) && (p2mt != p2m_ram_paged) )
goto out;
/* Allocate a page if the gfn does not have one yet */
@@ -1086,8 +1086,7 @@ void p2m_mem_paging_resume(struct domain
mfn = p2m->get_entry(p2m, rsp.gfn, &p2mt, &a, p2m_query, NULL);
/* Allow only pages which were prepared properly, or pages which
* were nominated but not evicted */
- if ( mfn_valid(mfn) &&
- (p2mt == p2m_ram_paging_in || p2mt == p2m_ram_paging_in_start) )
+ if ( mfn_valid(mfn) && (p2mt == p2m_ram_paging_in) )
{
set_p2m_entry(p2m, rsp.gfn, mfn, PAGE_ORDER_4K,
paging_mode_log_dirty(d) ? p2m_ram_logdirty :
diff -r aa58893caa60 -r decd21170c2a xen/include/asm-x86/p2m.h
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -82,9 +82,8 @@ typedef enum {
p2m_ram_paging_out = 9, /* Memory that is being paged out */
p2m_ram_paged = 10, /* Memory that has been paged out */
p2m_ram_paging_in = 11, /* Memory that is being paged in */
- p2m_ram_paging_in_start = 12, /* Memory that is being paged in */
- p2m_ram_shared = 13, /* Shared or sharable memory */
- p2m_ram_broken = 14, /* Broken page, access cause domain crash */
+ p2m_ram_shared = 12, /* Shared or sharable memory */
+ p2m_ram_broken = 13, /* Broken page, access cause domain crash */
} p2m_type_t;
/*
@@ -131,7 +130,6 @@ typedef enum {
| p2m_to_mask(p2m_ram_ro) \
| p2m_to_mask(p2m_ram_paging_out) \
| p2m_to_mask(p2m_ram_paged) \
- | p2m_to_mask(p2m_ram_paging_in_start) \
| p2m_to_mask(p2m_ram_paging_in) \
| p2m_to_mask(p2m_ram_shared))
@@ -158,7 +156,6 @@ typedef enum {
#define P2M_PAGING_TYPES (p2m_to_mask(p2m_ram_paging_out) \
| p2m_to_mask(p2m_ram_paged) \
- | p2m_to_mask(p2m_ram_paging_in_start) \
| p2m_to_mask(p2m_ram_paging_in))
#define P2M_PAGED_TYPES (p2m_to_mask(p2m_ram_paged))
next prev parent reply other threads:[~2012-02-01 19:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 19:51 [PATCH 0 of 9] x86/mm: Fixes to sharing, paging and p2m Andres Lagar-Cavilla
2012-02-01 19:51 ` Andres Lagar-Cavilla [this message]
2012-02-01 19:51 ` [PATCH 2 of 9] x86/mm: Don't fail to nominate for paging on type flag, rather look at type count Andres Lagar-Cavilla
2012-02-01 19:51 ` [PATCH 3 of 9] x86/mm: Refactor possibly deadlocking get_gfn calls Andres Lagar-Cavilla
2012-02-02 12:39 ` Tim Deegan
2012-02-02 13:44 ` Andres Lagar-Cavilla
2012-02-01 19:51 ` [PATCH 4 of 9] Reorder locks used by shadow code in anticipation of synchronized p2m lookups Andres Lagar-Cavilla
2012-02-01 19:51 ` [PATCH 5 of 9] x86/mm: When removing/adding a page from/to the physmap, keep in mind it could be shared Andres Lagar-Cavilla
2012-02-02 12:41 ` Tim Deegan
2012-02-02 13:46 ` Andres Lagar-Cavilla
2012-02-01 19:51 ` [PATCH 6 of 9] x86/mm: Fix balooning+sharing Andres Lagar-Cavilla
2012-02-01 19:51 ` [PATCH 7 of 9] x86/mm: Fix paging stats Andres Lagar-Cavilla
2012-02-01 19:52 ` [PATCH 8 of 9] x86/mm: Make sharing ASSERT check more accurate Andres Lagar-Cavilla
2012-02-01 19:52 ` [PATCH 9 of 9] x86/mm: Make debug_{gfn, mfn, gref} calls to sharing more useful and correct Andres Lagar-Cavilla
2012-02-02 12:32 ` [PATCH 0 of 9] x86/mm: Fixes to sharing, paging and p2m Tim Deegan
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=decd21170c2a9883c6a9.1328125913@xdev.gridcentric.ca \
--to=andres@lagarcavilla.org \
--cc=adin@gridcentric.ca \
--cc=andres@gridcentric.ca \
--cc=olaf@aepfle.de \
--cc=tim@xen.org \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.