NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/57230: set DIT/DOITM bit on arm/x86



The following reply was made to PR kern/57230; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/57230: set DIT/DOITM bit on arm/x86
Date: Tue, 14 Feb 2023 16:09:31 +0000

 One difference between Arm DIT and Intel DOITM:
 
 - The Arm PSTATE.DIT bit can be read and written at any execution
   level.  Userland programs could set PSTATE.DIT=0 if they are willing
   to run on the edge to take advantage of what are most likely
   minuscule microarchitectural microoptimizations, while the kernel
   could have PSTATE.DIT=1.
 
 - The Intel DOITM bit lives in an MSR, IA32_UARCH_MISC_CTL, which I
   suspect can only be read or written while privileged.  We could
   create a syscall/ioctl path by which userland programs could request
   to have the DOITM bit cleared when executing in userland, and have
   the kernel run with the DOITM bit set.
 
   (Note: The MXCSR bits, which affect the MCDT instructions, can be
   read and written unprivileged.)
 


Home | Main Index | Thread Index | Old Index