summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorJeff Brasen <jbrasen@nvidia.com>2023-03-24 01:42:17 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-12 12:41:17 +0000
commitf9278458b60d519b1635e18ab8fb6ca495f027b7 (patch)
treee522bc74e442ecf923569b1841f72ee817f3f920 /OvmfPkg
parent89520115b89d755ae79f61850c356aae4be2d9ad (diff)
downloadedk2-f9278458b60d519b1635e18ab8fb6ca495f027b7.tar.gz
edk2-f9278458b60d519b1635e18ab8fb6ca495f027b7.tar.bz2
edk2-f9278458b60d519b1635e18ab8fb6ca495f027b7.zip
OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Fix SetQueueAlignment.
Nothing to do here for virtio 1.0 devices Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c
index 8bdf1e1fc3..de2c5fa2a6 100644
--- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c
+++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c
@@ -144,7 +144,9 @@ VirtioMmioSetQueueAlignment (
Device = VIRTIO_MMIO_DEVICE_FROM_VIRTIO_DEVICE (This);
- VIRTIO_CFG_WRITE (Device, VIRTIO_MMIO_OFFSET_QUEUE_ALIGN, Alignment);
+ if (Device->Version == VIRTIO_MMIO_DEVICE_VERSION_0_95) {
+ VIRTIO_CFG_WRITE (Device, VIRTIO_MMIO_OFFSET_QUEUE_ALIGN, Alignment);
+ }
return EFI_SUCCESS;
}