Open wangpc-pp opened 4 months ago
Ping for comments.
No, there is no plan to add such a feature.
No, there is no plan to add such a feature.
If so, then there is no meaning for getcpu
in vDSO, which may cause some performance issues compared to other archs.
What if we add an extension to expose mhartid
to unprivileged code?
There is a reason to have getcpu
in the vDSO, which is that a user-space facility could eventually be added if deemed necessary. Perhaps its day will come.
Directly exposing mhartid
is a virtualization hole.
When optimizing
__vdso_getcpu
, we need an userspace unique identifier as the CPU id. Currently we just invoke the syscall.But we can't read
mhartid
, is there a way/extension to exposemhartid
to userspace? Or is there an unique identifier that can be used as CPU id?