Commit e3b8369c authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus' of git://github.com/rustyrussell/linux

* tag 'for-linus' of git://github.com/rustyrussell/linux:
  lguest: remove reference from Documentation/virtual/00-INDEX
  virtio: correct the memory barrier in virtqueue_kick_prepare()
  virtio: fix typos of memory barriers
parents 6c334f4f 13289d5f
...@@ -4,8 +4,6 @@ Virtualization support in the Linux kernel. ...@@ -4,8 +4,6 @@ Virtualization support in the Linux kernel.
- this file. - this file.
kvm/ kvm/
- Kernel Virtual Machine. See also http://linux-kvm.org - Kernel Virtual Machine. See also http://linux-kvm.org
lguest/
- Extremely simple hypervisor for experimental/educational use.
uml/ uml/
- User Mode Linux, builds/runs Linux kernel as a userspace program. - User Mode Linux, builds/runs Linux kernel as a userspace program.
virtio.txt virtio.txt
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#define virtio_rmb(vq) \ #define virtio_rmb(vq) \
do { if ((vq)->weak_barriers) smp_rmb(); else rmb(); } while(0) do { if ((vq)->weak_barriers) smp_rmb(); else rmb(); } while(0)
#define virtio_wmb(vq) \ #define virtio_wmb(vq) \
do { if ((vq)->weak_barriers) smp_rmb(); else rmb(); } while(0) do { if ((vq)->weak_barriers) smp_wmb(); else wmb(); } while(0)
#else #else
/* We must force memory ordering even if guest is UP since host could be /* 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 * running on another CPU, but SMP barriers are defined to barrier() in that
...@@ -308,9 +308,9 @@ bool virtqueue_kick_prepare(struct virtqueue *_vq) ...@@ -308,9 +308,9 @@ bool virtqueue_kick_prepare(struct virtqueue *_vq)
bool needs_kick; bool needs_kick;
START_USE(vq); START_USE(vq);
/* Descriptors and available array need to be set before we expose the /* We need to expose available array entries before checking avail
* new available array entries. */ * event. */
virtio_wmb(vq); virtio_mb(vq);
old = vq->vring.avail->idx - vq->num_added; old = vq->vring.avail->idx - vq->num_added;
new = vq->vring.avail->idx; new = vq->vring.avail->idx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment