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

* Re: [PATCH] OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Fix SetQueueAlignment.
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2023-03-24 12:30 UTC (permalink / raw)
  To: Jeff Brasen; +Cc: devel, philmd, ardb+tianocore, jiewen.yao, jordan.l.justen

On Fri, Mar 24, 2023 at 01:42:17AM +0000, Jeff Brasen wrote:
> 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);
> +  }

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>


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

* Re: [PATCH] OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Fix SetQueueAlignment.
  2023-03-24 12:30 ` Gerd Hoffmann
@ 2023-04-12 11:13   ` Ard Biesheuvel
  0 siblings, 0 replies; 3+ messages in thread
From: Ard Biesheuvel @ 2023-04-12 11:13 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Jeff Brasen, devel, philmd, ardb+tianocore, jiewen.yao,
	jordan.l.justen

On Fri, 24 Mar 2023 at 13:30, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> On Fri, Mar 24, 2023 at 01:42:17AM +0000, Jeff Brasen wrote:
> > 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);
> > +  }
>
> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
>

Queuing this up now - apologies for the delay.

^ permalink raw reply	[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