reload_cr3();
return OK;
}
+ case VMCTL_I386_INVLPG:
+ {
+ i386_invlpg(m_ptr->SVMCTL_VALUE);
+ return OK;
+ }
+
}
_PROTOTYPE( void phys_outsw, (u16_t port, phys_bytes buf, size_t count) );
_PROTOTYPE( u32_t read_cr3, (void) );
_PROTOTYPE( void reload_cr3, (void) );
+_PROTOTYPE( void i386_invlpg, (phys_bytes linaddr) );
_PROTOTYPE( void phys_memset, (phys_bytes ph, u32_t c, phys_bytes bytes));
_PROTOTYPE( void reload_ds, (void) );
_PROTOTYPE( void ia32_msr_read, (u32_t reg, u32_t * hi, u32_t * lo) );
pop %ebp
ret
+/*===========================================================================*/
+/* i386_invlpg */
+/*===========================================================================*/
+/* PUBLIC void i386_invlpg(unsigned long linaddr); */
+ENTRY(i386_invlpg)
+ push %ebp
+ mov %esp, %ebp
+ mov 8(%ebp), %eax
+ invlpg (%eax)
+ pop %ebp
+ ret
+
/*===========================================================================*/
/* getcr3val */
/*===========================================================================*/
return NULL;
}
- if((r=sys_vmctl(SELF, VMCTL_FLUSHTLB, 0)) != OK) {
- panic("VMCTL_FLUSHTLB failed: %d", r);
+ if((r=sys_vmctl(SELF, VMCTL_I386_INVLPG, loc)) != OK) {
+ panic("VMCTL_I386_INVLPG failed: %d", r);
}
level--;
panic("vm_lockpage: pt_writemap failed");
}
- if((r=sys_vmctl(SELF, VMCTL_FLUSHTLB, 0)) != OK) {
- panic("VMCTL_FLUSHTLB failed: %d", r);
+ if((r=sys_vmctl(SELF, VMCTL_I386_INVLPG, m)) != OK) {
+ panic("VMCTL_I386_INVLPG failed: %d", r);
}
return;