freebsd-dev/sys/amd64/vmm
Andriy Gapon 869dbab7ba vmm: remove a wmb() call
After removing wmb(), vm_set_rendezvous_func() became super trivial, so
there was no point in keeping it.

The wmb (sfence on amd64, lock nop on i386) was not needed.  This can be
explained from several points of view.

First, wmb() is used for store-store ordering (although, the primitive
is undocumented).  There was no obvious subsequent store that needed the
barrier.

Second, x86 has a memory model with strong ordering including total
store order.  An explicit store barrier may be needed only when working
with special memory (device, special caching mode) or using special
instructions (non-temporal stores).  That was not the case for this
code.

Third, I believe that there is a misconception that sfence "flushes" the
store buffer in a sense that it speeds up the propagation of stores from
the store buffer to the global visibility.  I think that such
propagation always happens as fast as possible.  sfence only makes
subsequent stores wait for that propagation to complete.  So, sfence is
only useful for ordering of stores and only in the situations described
above.

Reviewed by:	jhb
MFC after:	23 days
Differential Revision: https://reviews.freebsd.org/D21978
2019-10-19 07:10:15 +00:00
..
amd Correct the scope of several global variables. 2019-09-27 21:04:33 +00:00
intel Correct the scope of several global variables. 2019-09-27 21:04:33 +00:00
io Simplify bhyve vlapic ESR logic. 2019-08-29 18:23:38 +00:00
vmm_dev.c Fix syntax. 2019-07-12 19:14:52 +00:00
vmm_host.c
vmm_host.h Use get_pcpu() to fetch the current CPU's pcpu pointer. 2019-08-28 23:40:57 +00:00
vmm_instruction_emul.c Emulate the "TEST r/m{16,32,64}, imm{16,32,32}" instructions (opcode F7H). 2019-06-26 21:19:43 +00:00
vmm_ioport.c
vmm_ioport.h
vmm_ktr.h
vmm_lapic.c vmx: use C99 bool, not boolean_t 2019-08-01 02:16:48 +00:00
vmm_lapic.h vmx: use C99 bool, not boolean_t 2019-08-01 02:16:48 +00:00
vmm_mem.c
vmm_mem.h
vmm_stat.c
vmm_stat.h
vmm_util.c vmx: use C99 bool, not boolean_t 2019-08-01 02:16:48 +00:00
vmm_util.h vmx: use C99 bool, not boolean_t 2019-08-01 02:16:48 +00:00
vmm.c vmm: remove a wmb() call 2019-10-19 07:10:15 +00:00
x86.c
x86.h