add NOPHYS which means no physical memory

This commit is contained in:
NAKAMURA Gou
2016-03-28 14:31:02 +09:00
parent c760a01a79
commit 0c53a5ca35
2 changed files with 10 additions and 1 deletions

View File

@ -162,6 +162,8 @@
#define USER_STACK_NR_PAGES 8192
#define KERNEL_STACK_NR_PAGES 25
#define NOPHYS ((uintptr_t)-1)
#include <waitq.h>
#include <futex.h>

View File

@ -1023,7 +1023,14 @@ int add_process_memory_range(struct process_vm *vm,
range->flag);
}
if (flag & VR_REMOTE) {
rc = 0;
if (0) {
/* dummy */
}
else if (phys == NOPHYS) {
/* nothing to map */
}
else if (flag & VR_REMOTE) {
rc = update_process_page_table(vm, range, phys, IHK_PTA_REMOTE);
} else if (flag & VR_IO_NOCACHE) {
rc = update_process_page_table(vm, range, phys, PTATTR_UNCACHABLE);