public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Fix SetQueueAlignment.
@ 2023-03-24  1:42 Jeff Brasen
  2023-03-24 12:30 ` Gerd Hoffmann
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Brasen @ 2023-03-24  1:42 UTC (permalink / raw)
  To: devel
  Cc: philmd, ardb+tianocore, jiewen.yao, jordan.l.justen, kraxel,
	Jeff Brasen

Nothing to do here for virtio 1.0 devices

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
---
 .../Library/VirtioMmioDeviceLib/VirtioMmioDeviceFunctions.c   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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;
 }
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-12 11:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-24  1:42 [PATCH] OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Fix SetQueueAlignment Jeff Brasen
2023-03-24 12:30 ` Gerd Hoffmann
2023-04-12 11:13   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox