On Thu, Aug 06, 2020 at 04:08:47PM -0700, Dave Hansen wrote:
> On 8/6/20 4:04 PM, Ricardo Neri wrote:
> > * CPUID is the conventional way, but it's nasty: it doesn't
> > * exist on some 486-like CPUs, and it usually exits to a
> > * hypervisor.
> > *
> > * The SERIALIZE
On 8/6/20 4:04 PM, Ricardo Neri wrote:
>* CPUID is the conventional way, but it's nasty: it doesn't
>* exist on some 486-like CPUs, and it usually exits to a
>* hypervisor.
>*
>* The SERIALIZE instruction is the most straightforward way to
>* do this
On Thu, Aug 06, 2020 at 12:57:26PM -0700, Dave Hansen wrote:
> On 8/6/20 12:25 PM, Ricardo Neri wrote:
> > static inline void sync_core(void)
> > {
> > /*
> > -* There are quite a few ways to do this. IRET-to-self is nice
> > +* Hardware can do this for us if SERIALIZE is available.
On 8/6/20 12:25 PM, Ricardo Neri wrote:
> static inline void sync_core(void)
> {
> /*
> - * There are quite a few ways to do this. IRET-to-self is nice
> + * Hardware can do this for us if SERIALIZE is available. Otherwise,
> + * there are quite a few ways to do this.
The SERIALIZE instruction gives software a way to force the processor to
complete all modifications to flags, registers and memory from previous
instructions and drain all buffered writes to memory before the next
instruction is fetched and executed. Thus, it serves the purpose of
sync_core(). Use
5 matches
Mail list logo