aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/paging.h
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@xensource.com>2007-07-03 14:57:59 +0100
committerTim Deegan <Tim.Deegan@xensource.com>2007-07-03 14:57:59 +0100
commit3f5c68995bdf3cccb836e173abcf364e9b6e36a1 (patch)
tree789ad364b6ff44b24c1bba48da0d2430dbb7d79b /xen/include/asm-x86/paging.h
parent0c8f21176bda88ad6b46e0f431dabfa6a47b3857 (diff)
downloadxen-3f5c68995bdf3cccb836e173abcf364e9b6e36a1.tar.gz
xen-3f5c68995bdf3cccb836e173abcf364e9b6e36a1.tar.bz2
xen-3f5c68995bdf3cccb836e173abcf364e9b6e36a1.zip
[XEN] Fix p2m->shadow callback to pass the mfn being written to
as well as the pointer and contents. This was being calculated but got disconnected from its use when the p2m and shadow functions were separated. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Diffstat (limited to 'xen/include/asm-x86/paging.h')
-rw-r--r--xen/include/asm-x86/paging.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/xen/include/asm-x86/paging.h b/xen/include/asm-x86/paging.h
index 0f2809fe94..35067b289b 100644
--- a/xen/include/asm-x86/paging.h
+++ b/xen/include/asm-x86/paging.h
@@ -122,7 +122,8 @@ struct paging_mode {
void (*update_cr3 )(struct vcpu *v, int do_locking);
void (*update_paging_modes )(struct vcpu *v);
void (*write_p2m_entry )(struct vcpu *v, unsigned long gfn,
- l1_pgentry_t *p, l1_pgentry_t new,
+ l1_pgentry_t *p, mfn_t table_mfn,
+ l1_pgentry_t new,
unsigned int level);
int (*write_guest_entry )(struct vcpu *v, intpte_t *p,
intpte_t new, mfn_t gmfn);
@@ -291,17 +292,22 @@ static inline void safe_write_pte(l1_pgentry_t *p, l1_pgentry_t new)
}
/* Atomically write a P2M entry and update the paging-assistance state
- * appropriately. */
+ * appropriately.
+ * Arguments: the domain in question, the GFN whose mapping is being updated,
+ * a pointer to the entry to be written, the MFN in which the entry resides,
+ * the new contents of the entry, and the level in the p2m tree at which
+ * we are writing. */
static inline void paging_write_p2m_entry(struct domain *d, unsigned long gfn,
- l1_pgentry_t *p, l1_pgentry_t new,
- unsigned int level)
+ l1_pgentry_t *p, mfn_t table_mfn,
+ l1_pgentry_t new, unsigned int level)
{
struct vcpu *v = current;
if ( v->domain != d )
v = d->vcpu[0];
if ( likely(v && paging_mode_enabled(d) && v->arch.paging.mode != NULL) )
{
- return v->arch.paging.mode->write_p2m_entry(v, gfn, p, new, level);
+ return v->arch.paging.mode->write_p2m_entry(v, gfn, p, table_mfn,
+ new, level);
}
else
safe_write_pte(p, new);