* [PATCH 1/1] OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLib
@ 2020-09-12 16:40 Leif Lindholm
2020-09-14 15:35 ` Laszlo Ersek
2020-09-14 18:04 ` [edk2-devel] " Philippe Mathieu-Daudé
0 siblings, 2 replies; 4+ messages in thread
From: Leif Lindholm @ 2020-09-12 16:40 UTC (permalink / raw)
To: devel; +Cc: Jordan Justen, Laszlo Ersek, Ard Biesheuvel
There is a DEBUG warning printout in VirtioMmioDeviceLib if the current
device's VendorID does not match the traditional 16-bit Red Hat PCIe
vendor ID used with virtio-pci. The virtio-mmio vendor ID is 32-bit and
has no connection to the PCIe registry.
Most specifically, this causes a bunch of noise when booting an AArch64
QEMU platform, since QEMU's virtio-mmio implementation used 'QEMU' as
the vendor ID:
VirtioMmioInit: Warning:
The VendorId (0x554D4551) does not match the VirtIo VendorId (0x1AF4).
Drop the warning message.
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
Signed-off-by: Leif Lindholm <leif@nuviainc.com>
---
.../VirtioMmioDeviceLib/VirtioMmioDevice.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
index 2f20272c1445..6dbbba008c75 100644
--- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
+++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
@@ -58,7 +58,6 @@ VirtioMmioInit (
)
{
UINT32 MagicValue;
- UINT32 VendorId;
UINT32 Version;
//
@@ -84,20 +83,6 @@ VirtioMmioInit (
return EFI_UNSUPPORTED;
}
- //
- // Double-check MMIO-specific values
- //
- VendorId = VIRTIO_CFG_READ (Device, VIRTIO_MMIO_OFFSET_VENDOR_ID);
- if (VendorId != VIRTIO_VENDOR_ID) {
- //
- // The ARM Base and Foundation Models do not report a valid VirtIo VendorId.
- // They return a value of 0x0 for the VendorId.
- //
- DEBUG((DEBUG_WARN, "VirtioMmioInit: Warning: The VendorId (0x%X) does not "
- "match the VirtIo VendorId (0x%X).\n",
- VendorId, VIRTIO_VENDOR_ID));
- }
-
return EFI_SUCCESS;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLib
2020-09-12 16:40 [PATCH 1/1] OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLib Leif Lindholm
@ 2020-09-14 15:35 ` Laszlo Ersek
2020-09-17 12:03 ` Leif Lindholm
2020-09-14 18:04 ` [edk2-devel] " Philippe Mathieu-Daudé
1 sibling, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2020-09-14 15:35 UTC (permalink / raw)
To: Leif Lindholm, devel; +Cc: Jordan Justen, Ard Biesheuvel
Hi Leif,
On 09/12/20 18:40, Leif Lindholm wrote:
> There is a DEBUG warning printout in VirtioMmioDeviceLib if the current
> device's VendorID does not match the traditional 16-bit Red Hat PCIe
> vendor ID used with virtio-pci. The virtio-mmio vendor ID is 32-bit and
> has no connection to the PCIe registry.
>
> Most specifically, this causes a bunch of noise when booting an AArch64
> QEMU platform, since QEMU's virtio-mmio implementation used 'QEMU' as
> the vendor ID:
> VirtioMmioInit: Warning:
> The VendorId (0x554D4551) does not match the VirtIo VendorId (0x1AF4).
Good catch -- in QEMU, this has been the case since initial virtio-mmio
commit 4b52530be987 ("virtio: Implement MMIO based virtio transport",
2013-07-19); and indeed neither the virtio-0.9.5 spec, nor the "Legacy
MMIO" part of the 1.0 spec, require this vendor ID to be 0x1AF4.
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Thanks
Laszlo
>
> Drop the warning message.
>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Signed-off-by: Leif Lindholm <leif@nuviainc.com>
> ---
> .../VirtioMmioDeviceLib/VirtioMmioDevice.c | 15 ---------------
> 1 file changed, 15 deletions(-)
>
> diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
> index 2f20272c1445..6dbbba008c75 100644
> --- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
> +++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
> @@ -58,7 +58,6 @@ VirtioMmioInit (
> )
> {
> UINT32 MagicValue;
> - UINT32 VendorId;
> UINT32 Version;
>
> //
> @@ -84,20 +83,6 @@ VirtioMmioInit (
> return EFI_UNSUPPORTED;
> }
>
> - //
> - // Double-check MMIO-specific values
> - //
> - VendorId = VIRTIO_CFG_READ (Device, VIRTIO_MMIO_OFFSET_VENDOR_ID);
> - if (VendorId != VIRTIO_VENDOR_ID) {
> - //
> - // The ARM Base and Foundation Models do not report a valid VirtIo VendorId.
> - // They return a value of 0x0 for the VendorId.
> - //
> - DEBUG((DEBUG_WARN, "VirtioMmioInit: Warning: The VendorId (0x%X) does not "
> - "match the VirtIo VendorId (0x%X).\n",
> - VendorId, VIRTIO_VENDOR_ID));
> - }
> -
> return EFI_SUCCESS;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [PATCH 1/1] OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLib
2020-09-12 16:40 [PATCH 1/1] OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLib Leif Lindholm
2020-09-14 15:35 ` Laszlo Ersek
@ 2020-09-14 18:04 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-14 18:04 UTC (permalink / raw)
To: devel, leif; +Cc: Jordan Justen, Laszlo Ersek, Ard Biesheuvel
On 9/12/20 6:40 PM, Leif Lindholm wrote:
> There is a DEBUG warning printout in VirtioMmioDeviceLib if the current
> device's VendorID does not match the traditional 16-bit Red Hat PCIe
> vendor ID used with virtio-pci. The virtio-mmio vendor ID is 32-bit and
> has no connection to the PCIe registry.
>
> Most specifically, this causes a bunch of noise when booting an AArch64
> QEMU platform, since QEMU's virtio-mmio implementation used 'QEMU' as
> the vendor ID:
> VirtioMmioInit: Warning:
> The VendorId (0x554D4551) does not match the VirtIo VendorId (0x1AF4).
>
> Drop the warning message.
>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> Signed-off-by: Leif Lindholm <leif@nuviainc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> .../VirtioMmioDeviceLib/VirtioMmioDevice.c | 15 ---------------
> 1 file changed, 15 deletions(-)
>
> diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
> index 2f20272c1445..6dbbba008c75 100644
> --- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
> +++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
> @@ -58,7 +58,6 @@ VirtioMmioInit (
> )
> {
> UINT32 MagicValue;
> - UINT32 VendorId;
> UINT32 Version;
>
> //
> @@ -84,20 +83,6 @@ VirtioMmioInit (
> return EFI_UNSUPPORTED;
> }
>
> - //
> - // Double-check MMIO-specific values
> - //
> - VendorId = VIRTIO_CFG_READ (Device, VIRTIO_MMIO_OFFSET_VENDOR_ID);
> - if (VendorId != VIRTIO_VENDOR_ID) {
> - //
> - // The ARM Base and Foundation Models do not report a valid VirtIo VendorId.
> - // They return a value of 0x0 for the VendorId.
> - //
> - DEBUG((DEBUG_WARN, "VirtioMmioInit: Warning: The VendorId (0x%X) does not "
> - "match the VirtIo VendorId (0x%X).\n",
> - VendorId, VIRTIO_VENDOR_ID));
> - }
> -
> return EFI_SUCCESS;
> }
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLib
2020-09-14 15:35 ` Laszlo Ersek
@ 2020-09-17 12:03 ` Leif Lindholm
0 siblings, 0 replies; 4+ messages in thread
From: Leif Lindholm @ 2020-09-17 12:03 UTC (permalink / raw)
To: Laszlo Ersek; +Cc: devel, Jordan Justen, Ard Biesheuvel
On Mon, Sep 14, 2020 at 17:35:13 +0200, Laszlo Ersek wrote:
> Hi Leif,
>
> On 09/12/20 18:40, Leif Lindholm wrote:
> > There is a DEBUG warning printout in VirtioMmioDeviceLib if the current
> > device's VendorID does not match the traditional 16-bit Red Hat PCIe
> > vendor ID used with virtio-pci. The virtio-mmio vendor ID is 32-bit and
> > has no connection to the PCIe registry.
> >
> > Most specifically, this causes a bunch of noise when booting an AArch64
> > QEMU platform, since QEMU's virtio-mmio implementation used 'QEMU' as
> > the vendor ID:
> > VirtioMmioInit: Warning:
> > The VendorId (0x554D4551) does not match the VirtIo VendorId (0x1AF4).
>
> Good catch -- in QEMU, this has been the case since initial virtio-mmio
> commit 4b52530be987 ("virtio: Implement MMIO based virtio transport",
> 2013-07-19); and indeed neither the virtio-0.9.5 spec, nor the "Legacy
> MMIO" part of the 1.0 spec, require this vendor ID to be 0x1AF4.
>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Thanks!
Merged as 5648836987ca / #935.
> Thanks
> Laszlo
>
> >
> > Drop the warning message.
> >
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Cc: Ard Biesheuvel <ard.biesheuvel@arm.com>
> > Signed-off-by: Leif Lindholm <leif@nuviainc.com>
> > ---
> > .../VirtioMmioDeviceLib/VirtioMmioDevice.c | 15 ---------------
> > 1 file changed, 15 deletions(-)
> >
> > diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
> > index 2f20272c1445..6dbbba008c75 100644
> > --- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
> > +++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c
> > @@ -58,7 +58,6 @@ VirtioMmioInit (
> > )
> > {
> > UINT32 MagicValue;
> > - UINT32 VendorId;
> > UINT32 Version;
> >
> > //
> > @@ -84,20 +83,6 @@ VirtioMmioInit (
> > return EFI_UNSUPPORTED;
> > }
> >
> > - //
> > - // Double-check MMIO-specific values
> > - //
> > - VendorId = VIRTIO_CFG_READ (Device, VIRTIO_MMIO_OFFSET_VENDOR_ID);
> > - if (VendorId != VIRTIO_VENDOR_ID) {
> > - //
> > - // The ARM Base and Foundation Models do not report a valid VirtIo VendorId.
> > - // They return a value of 0x0 for the VendorId.
> > - //
> > - DEBUG((DEBUG_WARN, "VirtioMmioInit: Warning: The VendorId (0x%X) does not "
> > - "match the VirtIo VendorId (0x%X).\n",
> > - VendorId, VIRTIO_VENDOR_ID));
> > - }
> > -
> > return EFI_SUCCESS;
> > }
> >
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-09-17 12:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-12 16:40 [PATCH 1/1] OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLib Leif Lindholm
2020-09-14 15:35 ` Laszlo Ersek
2020-09-17 12:03 ` Leif Lindholm
2020-09-14 18:04 ` [edk2-devel] " Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox