diff options
-rw-r--r-- | OvmfPkg/Library/VirtioLib/VirtioLib.c | 1 | ||||
-rw-r--r-- | OvmfPkg/VirtioNetDxe/Events.c | 1 | ||||
-rw-r--r-- | OvmfPkg/VirtioNetDxe/SnpGetStatus.c | 1 | ||||
-rw-r--r-- | OvmfPkg/VirtioNetDxe/SnpReceive.c | 1 |
4 files changed, 4 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;
}
diff --git a/OvmfPkg/VirtioNetDxe/Events.c b/OvmfPkg/VirtioNetDxe/Events.c index 3a5b6b492e..b9d7bbf6c6 100644 --- a/OvmfPkg/VirtioNetDxe/Events.c +++ b/OvmfPkg/VirtioNetDxe/Events.c @@ -61,6 +61,7 @@ VirtioNetIsPacketAvailable ( //
MemoryFence ();
RxCurUsed = *Dev->RxRing.Used.Idx;
+ MemoryFence ();
if (Dev->RxLastUsed != RxCurUsed) {
gBS->SignalEvent (&Dev->Snp.WaitForPacket);
diff --git a/OvmfPkg/VirtioNetDxe/SnpGetStatus.c b/OvmfPkg/VirtioNetDxe/SnpGetStatus.c index eabcf93c4b..adb57cf8fe 100644 --- a/OvmfPkg/VirtioNetDxe/SnpGetStatus.c +++ b/OvmfPkg/VirtioNetDxe/SnpGetStatus.c @@ -103,6 +103,7 @@ VirtioNetGetStatus ( MemoryFence ();
RxCurUsed = *Dev->RxRing.Used.Idx;
TxCurUsed = *Dev->TxRing.Used.Idx;
+ MemoryFence ();
if (InterruptStatus != NULL) {
//
diff --git a/OvmfPkg/VirtioNetDxe/SnpReceive.c b/OvmfPkg/VirtioNetDxe/SnpReceive.c index 8b3faa38b6..87c6ca9b4b 100644 --- a/OvmfPkg/VirtioNetDxe/SnpReceive.c +++ b/OvmfPkg/VirtioNetDxe/SnpReceive.c @@ -105,6 +105,7 @@ VirtioNetReceive ( //
MemoryFence ();
RxCurUsed = *Dev->RxRing.Used.Idx;
+ MemoryFence ();
if (Dev->RxLastUsed == RxCurUsed) {
Status = EFI_NOT_READY;
|