linux/drivers/virtio
Michael S. Tsirkin d57ed95da4 virtio: use smp_XX barriers on SMP
virtio is communicating with a virtual "device" that actually runs on
another host processor. Thus SMP barriers can be used to control
memory access ordering.

Where possible, we should use SMP barriers which are more lightweight than
mandatory barriers, because mandatory barriers also control MMIO effects on
accesses through relaxed memory I/O windows (which virtio does not use)
(compare specifically smp_rmb and rmb on x86_64).

We can't just use smp_mb and friends though, because
we must force memory ordering even if guest is UP since host could be
running on another CPU, but SMP barriers are defined to barrier() in
that configuration. So, for UP fall back to mandatory barriers instead.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2010-02-24 14:22:25 +10:30
..
Kconfig virtio: balloon driver 2008-02-04 23:50:13 +11:00
Makefile virtio: balloon driver 2008-02-04 23:50:13 +11:00
config.c Virtio interface 2007-10-23 15:49:54 +10:00
virtio.c virtio: enhance id_matching for virtio drivers 2009-06-12 22:16:40 +09:30
virtio_balloon.c virtio: fix balloon without VIRTIO_BALLOON_F_STATS_VQ 2010-02-24 14:22:17 +10:30
virtio_pci.c Add __devexit_p around reference to virtio_pci_remove 2010-02-24 14:22:04 +10:30
virtio_ring.c virtio: use smp_XX barriers on SMP 2010-02-24 14:22:25 +10:30