vm: lock memory under "sudo" addr

Remove memory touching from transactions.
This commit is contained in:
Nekotekina 2020-11-09 17:34:59 +03:00
parent e98eb4659e
commit 083397a555
5 changed files with 5 additions and 32 deletions

View file

@ -770,6 +770,10 @@ namespace vm
// Unlock
g_range_lock.release(0);
perf_meter<"PAGE_LCK"_u64> perf1;
utils::memory_lock(g_base_addr + addr, size);
}
bool page_protect(u32 addr, u32 size, u8 flags_test, u8 flags_set, u8 flags_clear)

View file

@ -160,12 +160,6 @@ namespace vm
#endif
stamp1 = __rdtsc();
// Touch memory if transaction failed with status 0
if (!status)
{
reinterpret_cast<atomic_t<u8>*>(sptr)->fetch_add(0);
}
// Stage 2: try to lock reservation first
_old = res.fetch_add(1);