[XEN] Make the compat-mode l4 page table look more like a page table

and remove some special-case code in the shadows.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
This commit is contained in:
Tim Deegan committed 2007-02-28 13:17:27 +00:00
1 parent 990718d0bd
commit e4c182e03a
3 files changed
+8 -12

No files matched your search

+4
View File
@@ -229,6 +229,10 @@ static int setup_compat_l4(struct vcpu *v)
if ( !pg )
return -ENOMEM;
/* This page needs to look like a pagetable so that it can be shadowed */
pg->u.inuse.type_info = PGT_l4_page_table|PGT_validated;
l4tab = copy_page(page_to_virt(pg), idle_pg_table);
l4tab[l4_table_offset(LINEAR_PT_VIRT_START)] =
l4e_from_page(pg, __PAGE_HYPERVISOR);
+2 -5
View File
@@ -489,11 +489,7 @@ void shadow_demote(struct vcpu *v, mfn_t gmfn, u32 type)
{
struct page_info *page = mfn_to_page(gmfn);
#ifdef CONFIG_COMPAT
if ( !IS_COMPAT(v->domain) || type != SH_type_l4_64_shadow )
#endif
ASSERT(test_bit(_PGC_page_table, &page->count_info));
ASSERT(test_bit(_PGC_page_table, &page->count_info));
ASSERT(test_bit(type, &page->shadow_flags));
clear_bit(type, &page->shadow_flags);
@@ -1625,6 +1621,7 @@ void sh_destroy_shadow(struct vcpu *v, mfn_t smfn)
break;
case SH_type_l2h_64_shadow:
ASSERT( IS_COMPAT(v->domain) );
/* Fall through... */
case SH_type_l2_64_shadow:
SHADOW_INTERNAL_NAME(sh_destroy_l2_shadow, 4, 4)(v, smfn);
break;
+2 -7
View File
@@ -3368,16 +3368,11 @@ sh_set_toplevel_shadow(struct vcpu *v,
#if SHADOW_OPTIMIZATIONS & SHOPT_EARLY_UNSHADOW
/* Once again OK to unhook entries from this table if we see fork/exit */
#if CONFIG_PAGING_LEVELS == 4
if ( IS_COMPAT(d) )
ASSERT(!sh_mfn_is_a_page_table(gmfn));
else
#endif
ASSERT(sh_mfn_is_a_page_table(gmfn));
ASSERT(sh_mfn_is_a_page_table(gmfn));
mfn_to_page(gmfn)->shadow_flags &= ~SHF_unhooked_mappings;
#endif
/* Pin the shadow and put it (back) on the list of top-level shadows */
/* Pin the shadow and put it (back) on the list of pinned shadows */
if ( sh_pin(v, smfn) == 0 )
{
SHADOW_ERROR("can't pin %#lx as toplevel shadow\n", mfn_x(smfn));
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.