Re: Fault-Only-First Indexed Loads Instructions


Jonathan Behrens <behrensj@...>
 

This instruction would enable U-mode software to probe any page in memory to determine whether it was currently mapped or not, without giving the OS any opportunity to intervene. Currently it is only possible to detect that information via issuing a normal memory load and timing how long it takes (which only works if the OS chooses not to terminate the process in its page fault handler).

Jonathan


On Tue, Jun 16, 2020 at 9:22 AM lidawei14 via lists.riscv.org <lidawei14=huawei.com@...> wrote:
        while (True) {
            if (unLo > unHi) break;
            n = ((Int32)block[ptr[unLo]+d]) - med;
            if (n == 0) {
               mswap(ptr[unLo], ptr[ltLo]);
               ltLo++; unLo++; continue;
            };
            if (n >  0) break;
            unLo++;
         }

The loop above is from actual SPEC CPU 401.bzip2,
I think those if statements guarantee correctness of
memory access of block[], thus I think my answer is
positive.
 

Join tech-vector-ext@lists.riscv.org to automatically receive all group messages.