From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web11.64089.1600097720076601980 for ; Mon, 14 Sep 2020 08:35:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ahn2nqty; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600097719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A2qdIg4JO5BAOgMSlaEFZHYUU9x9I/740MJ7mpiV1pE=; b=Ahn2nqtymmpONBY6Zc9ga5q3VdhPjLeNmACmjCeqYBnQqKYsZDrYhW4AOlsfknJNTVajNL 98LDnzvW8dkZYLh6vtHN4X7r8z5CfegtNomTlSx1aAne3pCo/HgOO+JUCQOTdAd76I2Rvm KCO9RDTMExdiKur7palkah4pq/gK4K0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-186-aNTfRdUWPm2bkq8hX6-7sw-1; Mon, 14 Sep 2020 11:35:17 -0400 X-MC-Unique: aNTfRdUWPm2bkq8hX6-7sw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3C34EA1C1; Mon, 14 Sep 2020 15:35:15 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-38.ams2.redhat.com [10.36.114.38]) by smtp.corp.redhat.com (Postfix) with ESMTP id C1C2D1002D46; Mon, 14 Sep 2020 15:35:14 +0000 (UTC) Subject: Re: [PATCH 1/1] OvmfPkg: drop redundant VendorID check in VirtioMmioDeviceLib To: Leif Lindholm , devel@edk2.groups.io Cc: Jordan Justen , Ard Biesheuvel References: <20200912164022.5048-1-leif@nuviainc.com> From: "Laszlo Ersek" Message-ID: Date: Mon, 14 Sep 2020 17:35:13 +0200 MIME-Version: 1.0 In-Reply-To: <20200912164022.5048-1-leif@nuviainc.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US 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 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; > } > >