direct-io.hg
changeset 3479:276d520b998a
bitkeeper revision 1.1159.224.6 (41f151cby-4agnF_MdJ_L_DQDJjYbw)
another manual merge.
another manual merge.
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Fri Jan 21 19:02:35 2005 +0000 (2005-01-21) |
parents | 46c14b1a4351 |
children | 43816da9da60 |
files | xen/arch/x86/domain.c xen/arch/x86/memory.c xen/common/domain.c xen/common/schedule.c xen/include/xen/domain.h |
line diff
1.1 --- a/xen/arch/x86/domain.c Fri Jan 21 18:50:29 2005 +0000 1.2 +++ b/xen/arch/x86/domain.c Fri Jan 21 19:02:35 2005 +0000 1.3 @@ -226,6 +226,8 @@ void dump_pageframe_info(struct domain * 1.4 } 1.5 1.6 xmem_cache_t *domain_struct_cachep; 1.7 +xmem_cache_t *exec_domain_struct_cachep; 1.8 + 1.9 void __init domain_startofday(void) 1.10 { 1.11 domain_struct_cachep = xmem_cache_create( 1.12 @@ -233,6 +235,12 @@ void __init domain_startofday(void) 1.13 0, SLAB_HWCACHE_ALIGN, NULL, NULL); 1.14 if ( domain_struct_cachep == NULL ) 1.15 panic("No slab cache for domain structs."); 1.16 + 1.17 + exec_domain_struct_cachep = xmem_cache_create( 1.18 + "exec_dom_cache", sizeof(struct exec_domain), 1.19 + 0, SLAB_HWCACHE_ALIGN, NULL, NULL); 1.20 + if ( exec_domain_struct_cachep == NULL ) 1.21 + BUG(); 1.22 } 1.23 1.24 struct domain *arch_alloc_domain_struct(void) 1.25 @@ -245,6 +253,16 @@ void arch_free_domain_struct(struct doma 1.26 xmem_cache_free(domain_struct_cachep, d); 1.27 } 1.28 1.29 +struct exec_domain *arch_alloc_exec_domain_struct(void) 1.30 +{ 1.31 + return xmem_cache_alloc(exec_domain_struct_cachep); 1.32 +} 1.33 + 1.34 +void arch_free_exec_domain_struct(struct exec_domain *ed) 1.35 +{ 1.36 + xmem_cache_free(exec_domain_struct_cachep, ed); 1.37 +} 1.38 + 1.39 void free_perdomain_pt(struct domain *d) 1.40 { 1.41 free_xenheap_page((unsigned long)d->mm_perdomain_pt);
2.1 --- a/xen/arch/x86/memory.c Fri Jan 21 18:50:29 2005 +0000 2.2 +++ b/xen/arch/x86/memory.c Fri Jan 21 19:02:35 2005 +0000 2.3 @@ -961,7 +961,7 @@ int new_guest_cr3(unsigned long pfn) 2.4 } 2.5 else 2.6 { 2.7 - MEM_LOG("Error while installing new baseptr %08lx", ptr); 2.8 + MEM_LOG("Error while installing new baseptr %08lx", pfn); 2.9 } 2.10 2.11 return okay; 2.12 @@ -1341,7 +1341,7 @@ int do_mmu_update( 2.13 2.14 LOCK_BIGLOCK(d); 2.15 2.16 - cleanup_writable_pagetable(d, PTWR_CLEANUP_ACTIVE | PTWR_CLEANUP_INACTIVE); 2.17 + cleanup_writable_pagetable(d); 2.18 2.19 /* 2.20 * If we are resuming after preemption, read how much work we have already 2.21 @@ -1572,7 +1572,7 @@ int do_update_va_mapping(unsigned long p 2.22 2.23 LOCK_BIGLOCK(d); 2.24 2.25 - cleanup_writable_pagetable(d, PTWR_CLEANUP_ACTIVE | PTWR_CLEANUP_INACTIVE); 2.26 + cleanup_writable_pagetable(d); 2.27 2.28 /* 2.29 * XXX When we make this support 4MB superpages we should also deal with
3.1 --- a/xen/common/domain.c Fri Jan 21 18:50:29 2005 +0000 3.2 +++ b/xen/common/domain.c Fri Jan 21 19:02:35 2005 +0000 3.3 @@ -354,7 +354,7 @@ long do_boot_vcpu(unsigned long vcpu, fu 3.4 out: 3.5 if ( c != NULL ) 3.6 xfree(c); 3.7 - xmem_cache_free(exec_domain_struct_cachep, d->exec_domain[vcpu]); 3.8 + arch_free_exec_domain_struct(d->exec_domain[vcpu]); 3.9 d->exec_domain[vcpu] = NULL; 3.10 return rc; 3.11 }
4.1 --- a/xen/common/schedule.c Fri Jan 21 18:50:29 2005 +0000 4.2 +++ b/xen/common/schedule.c Fri Jan 21 19:02:35 2005 +0000 4.3 @@ -89,17 +89,14 @@ static struct scheduler ops; 4.4 /* Per-CPU periodic timer sends an event to the currently-executing domain. */ 4.5 static struct ac_timer t_timer[NR_CPUS]; 4.6 4.7 -extern xmem_cache_t *domain_struct_cachep; 4.8 -extern xmem_cache_t *exec_domain_struct_cachep; 4.9 - 4.10 void free_domain_struct(struct domain *d) 4.11 { 4.12 struct exec_domain *ed; 4.13 4.14 SCHED_OP(free_task, d); 4.15 for_each_exec_domain(d, ed) 4.16 - xmem_cache_free(exec_domain_struct_cachep, ed); 4.17 - xmem_cache_free(domain_struct_cachep, d); 4.18 + arch_free_exec_domain_struct(ed); 4.19 + arch_free_domain_struct(d); 4.20 } 4.21 4.22 struct exec_domain *alloc_exec_domain_struct(struct domain *d, 4.23 @@ -109,7 +106,7 @@ struct exec_domain *alloc_exec_domain_st 4.24 4.25 ASSERT( d->exec_domain[vcpu] == NULL ); 4.26 4.27 - if ( (ed = xmem_cache_alloc(exec_domain_struct_cachep)) == NULL ) 4.28 + if ( (ed = arch_alloc_exec_domain_struct()) == NULL ) 4.29 return NULL; 4.30 4.31 memset(ed, 0, sizeof(*ed)); 4.32 @@ -143,7 +140,7 @@ struct exec_domain *alloc_exec_domain_st 4.33 4.34 out: 4.35 d->exec_domain[vcpu] = NULL; 4.36 - xmem_cache_free(exec_domain_struct_cachep, ed); 4.37 + arch_free_exec_domain_struct(ed); 4.38 4.39 return NULL; 4.40 } 4.41 @@ -152,7 +149,7 @@ struct domain *alloc_domain_struct(void) 4.42 { 4.43 struct domain *d; 4.44 4.45 - if ( (d = xmem_cache_alloc(domain_struct_cachep)) == NULL ) 4.46 + if ( (d = arch_alloc_domain_struct()) == NULL ) 4.47 return NULL; 4.48 4.49 memset(d, 0, sizeof(*d)); 4.50 @@ -163,7 +160,7 @@ struct domain *alloc_domain_struct(void) 4.51 return d; 4.52 4.53 out: 4.54 - xmem_cache_free(domain_struct_cachep, d); 4.55 + arch_free_domain_struct(d); 4.56 return NULL; 4.57 } 4.58 4.59 @@ -379,8 +376,7 @@ void __enter_scheduler(void) 4.60 if ( !is_idle_task(current->domain) ) 4.61 { 4.62 LOCK_BIGLOCK(current->domain); 4.63 - cleanup_writable_pagetable( 4.64 - prev->domain, PTWR_CLEANUP_ACTIVE | PTWR_CLEANUP_INACTIVE); 4.65 + cleanup_writable_pagetable(prev->domain); 4.66 UNLOCK_BIGLOCK(current->domain); 4.67 } 4.68
5.1 --- a/xen/include/xen/domain.h Fri Jan 21 18:50:29 2005 +0000 5.2 +++ b/xen/include/xen/domain.h Fri Jan 21 19:02:35 2005 +0000 5.3 @@ -12,7 +12,11 @@ extern struct domain *arch_alloc_domain_ 5.4 5.5 extern void arch_free_domain_struct(struct domain *d); 5.6 5.7 -extern void arch_do_createdomain(struct domain *d); 5.8 +struct exec_domain *arch_alloc_exec_domain_struct(void); 5.9 + 5.10 +extern void arch_free_exec_domain_struct(struct exec_domain *ed); 5.11 + 5.12 +extern void arch_do_createdomain(struct exec_domain *ed); 5.13 5.14 extern int arch_final_setup_guestos( 5.15 struct exec_domain *d, full_execution_context_t *c);