From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.40213.1681298034482142120 for ; Wed, 12 Apr 2023 04:13:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pHIwcmw5; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EBCEC63319 for ; Wed, 12 Apr 2023 11:13:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D38FC433A0 for ; Wed, 12 Apr 2023 11:13:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681298033; bh=+7EEvvO7m8sgffqN3AIaDrqu5UHI5pnav9FExlWVQoY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pHIwcmw5i2Uwi2AUTb2d9WyUtlDIDkIckV4RVkiAtxjVtTodCXHEx3kx2JSM5YwrP /ilTZt4OvKHeaRLnsEo75YRXPLycT1Jwf+l+1x8WBCTNiygxARwcy/9onluFEDChgB rYgt8/jElh9lbYEIx3521ID8HTcz/9RcYJaX+kI7wMhwpLeU5MnA9XbsbyHPqic1p1 IvZ1L9G/7gm3NiulJEshqpbbfu5O4ex9vhRiuCHZYtqKER3dibbynHV7oQuytv8LHm GqCjGeusoGN34jPT2UfoCZvFRvjT0UyHywRNAi30s6nV2a+CSMDJDvy1IkPbZQG5RV IT9rCId9fBayQ== Received: by mail-lf1-f49.google.com with SMTP id t14so14067273lft.7 for ; Wed, 12 Apr 2023 04:13:53 -0700 (PDT) X-Gm-Message-State: AAQBX9cl27ck78+wKISysGLKFM8kpCx6IkHNhLoxTvM8EcwtDQxyESQ7 zVYhcIMzr4g22YDAc7YYPG21Y3Y3+WhdOAzfEC0= X-Google-Smtp-Source: AKy350aEHwAdtynBeNC+rcof3+E2udF80vd1qWXcrMhlSUDjG5C3QCKofjBgLS1hLvymV6rUsfYh5hPnCe5fPZeufWk= X-Received: by 2002:ac2:4148:0:b0:4eb:3f68:553f with SMTP id c8-20020ac24148000000b004eb3f68553fmr1844031lfi.9.1681298031405; Wed, 12 Apr 2023 04:13:51 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Ard Biesheuvel" Date: Wed, 12 Apr 2023 13:13:40 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] OvmfPkg/VirtioMmioDeviceLib: virtio 1.0: Fix SetQueueAlignment. To: Gerd Hoffmann Cc: Jeff Brasen , devel@edk2.groups.io, philmd@redhat.com, ardb+tianocore@kernel.org, jiewen.yao@intel.com, jordan.l.justen@intel.com Content-Type: text/plain; charset="UTF-8" On Fri, 24 Mar 2023 at 13:30, Gerd Hoffmann 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 > > --- > > .../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 > Queuing this up now - apologies for the delay.