summaryrefslogtreecommitdiff
path: root/OvmfPkg/Library
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2013-08-23 18:46:03 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2013-08-23 18:46:03 +0000
commitdc9447bd3777614529b711c9976979fe61822ba8 (patch)
tree02fe72a3e29eaea6d49b58a47dcf8e9e0a553f0b /OvmfPkg/Library
parent9bef3cdc8a9d9f9344bd9cb94af3bbdc4ec5ed4d (diff)
downloadedk2-platforms-dc9447bd3777614529b711c9976979fe61822ba8.tar.xz
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
Diffstat (limited to 'OvmfPkg/Library')
-rw-r--r--OvmfPkg/Library/VirtioLib/VirtioLib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/OvmfPkg/Library/VirtioLib/VirtioLib.c b/OvmfPkg/Library/VirtioLib/VirtioLib.c
index 87797e10e7..959bc5da87 100644
--- a/OvmfPkg/Library/VirtioLib/VirtioLib.c
+++ b/OvmfPkg/Library/VirtioLib/VirtioLib.c
@@ -456,5 +456,6 @@ VirtioFlush (
MemoryFence();
}
+ MemoryFence();
return EFI_SUCCESS;
}