diff --git a/arch/x86/kernel/include/arch-memory.h b/arch/x86/kernel/include/arch-memory.h index 035ea621..26752e0a 100644 --- a/arch/x86/kernel/include/arch-memory.h +++ b/arch/x86/kernel/include/arch-memory.h @@ -113,6 +113,7 @@ enum ihk_mc_pt_attribute { PTATTR_ACTIVE = 0x01, PTATTR_WRITABLE = 0x02, PTATTR_USER = 0x04, + PTATTR_DIRTY = 0x40, PTATTR_LARGEPAGE = 0x80, PTATTR_NO_EXECUTE = 0x8000000000000000, PTATTR_UNCACHABLE = 0x10000, diff --git a/kernel/process.c b/kernel/process.c index 2b815bf0..8945f6c7 100644 --- a/kernel/process.c +++ b/kernel/process.c @@ -1240,6 +1240,7 @@ static int protection_fault_process_memory_range(struct process_vm *vm, struct v } attr = vrflag_to_ptattr(range->flag); + attr |= PTATTR_DIRTY; error = ihk_mc_pt_set_pte(vm->page_table, ptep, pgsize, newpa, attr); if (error) { kprintf("protection_fault_process_memory_range"