|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] x86 p2m superpage fix: Re-insert missing
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1215597757 -3600
# Node ID 06bcd8f622c846314e46b233b87b8264c358aaf4
# Parent 830e5d8b71da076b01c0327f360440a6810dcb54
x86 p2m superpage fix: Re-insert missing shadow code from the original
patch that was submitted to xen-devel, to remove mappings when we're
removing a p2m 2mb page.
Signed-off-by: Gianluca Guida <gianluca.guida@xxxxxxxxxxxxx>
---
xen/arch/x86/mm/shadow/common.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+)
diff -r 830e5d8b71da -r 06bcd8f622c8 xen/arch/x86/mm/shadow/common.c
--- a/xen/arch/x86/mm/shadow/common.c Wed Jul 09 10:41:49 2008 +0100
+++ b/xen/arch/x86/mm/shadow/common.c Wed Jul 09 11:02:37 2008 +0100
@@ -3354,6 +3354,26 @@ shadow_write_p2m_entry(struct vcpu *v, u
}
}
+ /* If we're removing a superpage mapping from the p2m, remove all the
+ * MFNs covered by it from the shadows too. */
+ if ( level == 2 && (l1e_get_flags(*p) & _PAGE_PRESENT) &&
+ (l1e_get_flags(*p) & _PAGE_PSE) )
+ {
+ unsigned int i;
+ mfn_t mfn = _mfn(l1e_get_pfn(*p));
+ p2m_type_t p2mt = p2m_flags_to_type(l1e_get_flags(*p));
+ if ( p2m_is_valid(p2mt) && mfn_valid(mfn) )
+ {
+ for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ )
+ {
+ sh_remove_all_shadows_and_parents(v, mfn);
+ if ( sh_remove_all_mappings(v, mfn) )
+ flush_tlb_mask(d->domain_dirty_cpumask);
+ mfn = _mfn(mfn_x(mfn) + 1);
+ }
+ }
+ }
+
/* Update the entry with new content */
safe_write_pte(p, new);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] x86 p2m superpage fix: Re-insert missing shadow code from the original,
Xen patchbot-unstable <=
|
|
|
|
|