Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184591
b: refs/heads/master
c: 86e9424
h: refs/heads/master
i:
  184589: 557a778
  184587: 6a11aad
  184583: 4e42d19
  184575: 357d1ea
v: v3
  • Loading branch information
Michael S. Tsirkin committed Feb 28, 2010
1 parent 11d94d2 commit 5b97cb1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 655ffee284dfcf9a24ac0343f3e5ee6db85b85c5
refs/heads/master: 86e9424d7252bae5ad1c17b4b8088193e6b27cbe
12 changes: 8 additions & 4 deletions trunk/drivers/vhost/vhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,10 +1004,14 @@ int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)
if (unlikely(vq->log_used)) {
/* Make sure data is seen before log. */
smp_wmb();
log_write(vq->log_base, vq->log_addr + sizeof *vq->used->ring *
(vq->last_used_idx % vq->num),
sizeof *vq->used->ring);
log_write(vq->log_base, vq->log_addr, sizeof *vq->used->ring);
/* Log used ring entry write. */
log_write(vq->log_base,
vq->log_addr + ((void *)used - (void *)vq->used),
sizeof *used);
/* Log used index update. */
log_write(vq->log_base,
vq->log_addr + offsetof(struct vring_used, idx),
sizeof vq->used->idx);
if (vq->log_ctx)
eventfd_signal(vq->log_ctx, 1);
}
Expand Down

0 comments on commit 5b97cb1

Please sign in to comment.