1433d6423SLionel Sambuc 2433d6423SLionel Sambuc #ifndef _VMPROC_H 3433d6423SLionel Sambuc #define _VMPROC_H 1 4433d6423SLionel Sambuc 5433d6423SLionel Sambuc #include <minix/bitmap.h> 6433d6423SLionel Sambuc #include <machine/archtypes.h> 7433d6423SLionel Sambuc 8433d6423SLionel Sambuc #include "pt.h" 9433d6423SLionel Sambuc #include "vm.h" 10433d6423SLionel Sambuc #include "regionavl.h" 11433d6423SLionel Sambuc 12433d6423SLionel Sambuc struct vmproc; 13433d6423SLionel Sambuc 14433d6423SLionel Sambuc struct vmproc { 15433d6423SLionel Sambuc int vm_flags; 16433d6423SLionel Sambuc endpoint_t vm_endpoint; 17433d6423SLionel Sambuc pt_t vm_pt; /* page table data */ 18433d6423SLionel Sambuc struct boot_image *vm_boot; /* if boot time process */ 19433d6423SLionel Sambuc 20433d6423SLionel Sambuc /* Regions in virtual address space. */ 21433d6423SLionel Sambuc region_avl vm_regions_avl; 22433d6423SLionel Sambuc vir_bytes vm_region_top; /* highest vaddr last inserted */ 23433d6423SLionel Sambuc int vm_acl; 24433d6423SLionel Sambuc int vm_slot; /* process table slot */ 25433d6423SLionel Sambuc #if VMSTATS 26433d6423SLionel Sambuc int vm_bytecopies; 27433d6423SLionel Sambuc #endif 28433d6423SLionel Sambuc vir_bytes vm_total; 29433d6423SLionel Sambuc vir_bytes vm_total_max; 30433d6423SLionel Sambuc u64_t vm_minor_page_fault; 31433d6423SLionel Sambuc u64_t vm_major_page_fault; 32433d6423SLionel Sambuc }; 33433d6423SLionel Sambuc 34433d6423SLionel Sambuc /* Bits for vm_flags */ 35433d6423SLionel Sambuc #define VMF_INUSE 0x001 /* slot contains a process */ 36433d6423SLionel Sambuc #define VMF_EXITING 0x002 /* PM is cleaning up this process */ 37*63483e02SCristiano Giuffrida #define VMF_VM_INSTANCE 0x010 /* This is a VM process instance */ 38433d6423SLionel Sambuc 39433d6423SLionel Sambuc #endif 40