X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/095a899a9749b85443e546b1062026747445658c..c166bd62fbb907f95f79f621e2a2fb4fdde08e01:/lunaix-os/includes/lunaix/mm/fault.h diff --git a/lunaix-os/includes/lunaix/mm/fault.h b/lunaix-os/includes/lunaix/mm/fault.h index 77aab84..3367841 100644 --- a/lunaix-os/includes/lunaix/mm/fault.h +++ b/lunaix-os/includes/lunaix/mm/fault.h @@ -2,8 +2,9 @@ #define __LUNAIX_FAULT_H #include -#include +#include #include +#include #define RESOLVE_OK ( 0b000001 ) #define NO_PREALLOC ( 0b000010 ) @@ -24,12 +25,15 @@ struct fault_context ptr_t fault_refva; // referneced va, for ptep fault, equals to fault_va otherwise pte_t resolving; // the pte that will resolve the fault - ptr_t prealloc_pa; // preallocated physical page in-case of empty fault-pte + struct leaflet* prealloc; // preallocated physical page in-case of empty fault-pte - bool kernel_vmfault:1; // faulting address that is kernel - bool ptep_fault:1; // faulting address is a ptep - bool remote_fault:1; // referenced faulting address is remote vms - bool kernel_access:1; // kernel mem access causing the fault + struct + { + bool kernel_vmfault:1; // faulting address that is kernel + bool ptep_fault:1; // faulting address is a ptep + bool remote_fault:1; // referenced faulting address is remote vms + bool kernel_access:1; // kernel mem access causing the fault + }; struct proc_mm* mm; // process memory space associated with fault, might be remote struct mm_region* vmr; @@ -41,9 +45,8 @@ bool __arch_prepare_fault_context(struct fault_context* context); static inline void -fault_resolved(struct fault_context* fault, pte_t resolved, int flags) +fault_resolved(struct fault_context* fault, int flags) { - fault->resolving = resolved; fault->resolve_type |= (flags | RESOLVE_OK); } #endif /* __LUNAIX_FAULT_H */