]> git.proxmox.com Git - mirror_edk2.git/commit
OvmfPkg: Virtio: load used ring element strictly after loading used index
authorLaszlo Ersek <lersek@redhat.com>
Fri, 23 Aug 2013 18:46:03 +0000 (18:46 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 23 Aug 2013 18:46:03 +0000 (18:46 +0000)
commitdc9447bd3777614529b711c9976979fe61822ba8
tree02fe72a3e29eaea6d49b58a47dcf8e9e0a553f0b
parent9bef3cdc8a9d9f9344bd9cb94af3bbdc4ec5ed4d
OvmfPkg: Virtio: load used ring element strictly after loading used index

Enforce in-order execution of these steps even on not sequentially
consistent architectures, as discussed in [1]. These changes should be
unnecessary on x86 (the only architecture OVMF currently supports), but
they align the OVMF virtio code with the virtio specification and could be
necessary for future OVMF ports.

[1] http://lists.linuxfoundation.org/pipermail/virtualization/2013-June/024547.html

Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14601 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg/Library/VirtioLib/VirtioLib.c
OvmfPkg/VirtioNetDxe/Events.c
OvmfPkg/VirtioNetDxe/SnpGetStatus.c
OvmfPkg/VirtioNetDxe/SnpReceive.c