[PATCHv2] virtio: order used ring after used index read

2009-10-25 Thread Michael S. Tsirkin
On SMP guests, reads from the ring might bypass used index reads. This causes guest crashes because host writes to used index to signal ring data readiness. Fix this by inserting rmb before used ring reads. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Change from v1: indent with TAB and

Re: [PATCHv2] virtio: order used ring after used index read

2009-10-25 Thread Rusty Russell
On Sun, 25 Oct 2009 11:58:53 pm Michael S. Tsirkin wrote: On SMP guests, reads from the ring might bypass used index reads. This causes guest crashes because host writes to used index to signal ring data readiness. Fix this by inserting rmb before used ring reads. Thanks, good spotting.