fix REQ-40

This commit is contained in:
Tomoki Shirasawa
2016-03-24 13:46:13 +09:00
parent 670741ae40
commit 932a287437
4 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,16 @@
#ifndef __ARCH_MM_H
#define __ARCH_MM_H
struct process_vm;
static inline void
flush_nfo_tlb()
{
}
static inline void
flush_nfo_tlb_mm(struct process_vm *vm)
{
}
#endif

View File

@ -2083,6 +2083,7 @@ release_process_vm(struct process_vm *vm)
if(vm->free_cb)
vm->free_cb(vm, vm->opt);
flush_nfo_tlb_mm(vm);
free_all_process_memory_range(vm);
detach_address_space(vm->address_space, vm->proc->pid);

View File

@ -973,6 +973,8 @@ do_mmap(const intptr_t addr0, const size_t len0, const int prot,
}
}
flush_nfo_tlb();
ihk_mc_spinlock_lock_noirq(&thread->vm->memory_range_lock);
if (flags & MAP_FIXED) {
@ -1258,6 +1260,8 @@ SYSCALL_DECLARE(mprotect)
return 0;
}
flush_nfo_tlb();
ihk_mc_spinlock_lock_noirq(&thread->vm->memory_range_lock);
first = lookup_process_memory_range(thread->vm, start, start+PAGE_SIZE);
@ -1364,6 +1368,8 @@ SYSCALL_DECLARE(brk)
dkprintf("SC(%d)[sys_brk] brk_start=%lx,end=%lx\n",
ihk_mc_get_processor_id(), region->brk_start, region->brk_end);
flush_nfo_tlb();
/* brk change fail, including glibc trick brk(0) to obtain current brk */
if(address < region->brk_start) {
r = region->brk_end;
@ -6354,6 +6360,8 @@ SYSCALL_DECLARE(remap_file_pages)
goto out;
}
flush_nfo_tlb();
range->flag |= VR_FILEOFF;
error = remap_process_memory_range(thread->vm, range, start, end, off);
if (error) {

View File

@ -18,6 +18,7 @@
#include <memory.h>
#include <ihk/lock.h>
#include <ihk/atomic.h>
#include <arch/mm.h>
struct memobj;
struct process_vm;