4 ms·
There are several facets to this topic. As you said, it's possible to use instructions in userspace that the kernel doesn't know about; in general the kernel d
by wmf 4y ago
There are several facets to this topic.
As you said, it's possible to use instructions in userspace that the kernel doesn't know about; in general the kernel doesn't care what goes on in userspace. One twist is that the kernel needs to know about processor registers so that it can save/restore them during a context switch. If an ISA extension introduces new registers (e.g. matrix registers) then the kernel needs to know about them.
Many vendors are complying with the Linux license fairly loosely if at all. Maybe they have a modified kernel build and they never publish the source. Maybe they only give the source to people who ask, and the source has no comments and it requires a secret compiler that is not available.
- ladyanita22 4y agoMay it be possible to, let's say, use a kernel module that uses those instructions exclusively, and then interface it though a userspace library? In such case, I understand the operations would be done in kernel space which doesn't require saving states (as it's running in kernel mode, which is a single address space) and these extensions would be accessed through this library.
- wmf 4y agoThe kernel still has threads and thread switching. Pretty much anything is possible since it's open source.
- ladyanita22 4y agoDo these threads require state saving?