From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web11.13830.1600344225082799510 for ; Thu, 17 Sep 2020 05:03:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=CBDwhpJJ; spf=pass (domain: nuviainc.com, ip: 209.85.221.66, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f66.google.com with SMTP id z4so1781836wrr.4 for ; Thu, 17 Sep 2020 05:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ntdZ02waAVXEh+TGQeOxvCDPse25GlZfS7AO1mFwpd8=; b=CBDwhpJJHL667YDW8UJ8dwRb6Tf/BGmI8SzHZUiSCO2Qt7npe9hDKuY3VhoHenaCHA oiV8GGtKokR/eyE+L85NVRZ1SA9VfDAbWcqdfOhXmmyv1uo6IeHqPf10skO8FXH8SoyE DLhxt+bFcbwHWT5yFmzQWeV6hymiw2I8GVVTq6r7aIC0e8Hcv9oGpc4VA5K9zbXcrZaa vzhm7uRj14MOoWUNhgOXZbgEoGFwEp6TSPyNQVGvbFQMLlzNjJGxbqER5Bmk4TVVJJCB 7K7MkELWIV5jUYlr9a43VBV0A860ORR5vY0BQpVg128fNqb8fBbJGEqJ7oNaub9+w2bd Jvog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ntdZ02waAVXEh+TGQeOxvCDPse25GlZfS7AO1mFwpd8=; b=JMgeDlO8SmvsCmztqQxNzwO87vBQBLHyvZgpzN1B8cgkPH4q//P+/gu4wNT0JR4eeg l5TXE1c7QiV1m1Znb41YOZaDlUcF7Qa9nUg9ISdDHVQTR1EYAI76FBR3S9skXUsrgHg1 wEs52ZTbHnRcN05OX+8D0wYEX0Z04NL47MbkBtcOp9xwDdLsVtJKaxXv+DvTUKmoxMG+ Yywlnr+nriD3nVB5m0InNddcmyjkMgpiyMR1MTSGiZsxEqiaGEPzsNQ6c4YscgeXr6xT eZUhFFrVTigdC1XTgQ/AellN+DiA02/OvNEsK//g/omEjILTjXlODCuJa2Bw3iVwhG8g VUdA== X-Gm-Message-State: AOAM531eOyXCYG0+V8nnH4r7K/knbJhZ2TTJ8PJbvTX1ASggwa9mMAmw 2uUiDVJ9oJxTDm1tOXxFtf/50Q== X-Google-Smtp-Source: ABdhPJzeYCZSM0MdfEPOxMbVSbsoxCvx66lWO+QNfP7QQT9kGuL74vtj3518JLshTatgYVp5/QU+jw== X-Received: by 2002:a5d:470e:: with SMTP id y14mr31703992wrq.354.1600344223555; Thu, 17 Sep 2020 05:03:43 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id u17sm33469726wri.45.2020.09.17.05.03.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 05:03:43 -0700 (PDT) Date: Thu, 17 Sep 2020 13:03:36 +0100 From: "Leif Lindholm" To: Laszlo Ersek Cc: devel@edk2.groups.io, Jordan Justen , Ard Biesheuvel Subject: Re: [PATCH 1/1] OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLib Message-ID: <20200917120336.GS5623@vanye> References: <20200912164022.5048-1-leif@nuviainc.com> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Thanks! Merged as 5648836987ca / #935. > Thanks > Laszlo > > > > > Drop the warning message. > > > > Cc: Jordan Justen > > Cc: Laszlo Ersek > > Cc: Ard Biesheuvel > > Signed-off-by: Leif Lindholm > > --- > > .../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; > > } > > > > >