On Mon, Jun 18, 2012 at 3:02 PM, Martin Decky <[email protected]> wrote:
>> Btw, why is running in user space considered a quiescent
>> state? Do transitions from/to user mode contain memory
>> barriers on OpenSolaris?
>
> I believe that all usual ways of entering the user mode contain an implicit
> memory barrier. Instructions such as iret and sysret are serializing, as
> well as all instructions that affect most of the control registers in
> privileged mode.
I had a look at Intel's manual [21] before seeing your
reply. It agrees with you almost entirely, but oddly it
does not list sysenter/sysexit as serializing instructions:
"
The following instructions are serializing instructions:
- Privileged serializing instructions: INVD, INVEPT, INVLPG,
INVVPID, LGDT, LIDT, LLDT, LTR, MOV (to control register,
with the exception of MOV CR8), MOV (to debug register),
WBINVD, and WRMSR.
- Non-privileged serializing instructions: CPUID, IRET, and RSM.
[..]
The following instructions are memory-ordering instructions [..]:
- Non-privileged memory-ordering instructions: SFENCE, LFENCE,
and MFENCE.
"
Moreover, sysenter/sysexit instruction documentation
does not mention any memory ordering guarantees.
Therefore, entering user space via sysexit cannot alone
be considered a quiescent state (but it depends on how
we're going to sample other cpu's execution mode).
Strange.
Adam
[21] Intel 64 and IA-32 Architectures Software Developer's
Manual, Vol 3A: System Programming Guide, Part 1,
section 8.3 Serializing Instructions
http://download.intel.com/products/processor/manual/253668.pdf
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel