From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.groups.io with SMTP id smtpd.web10.397.1585261753644819707 for ; Thu, 26 Mar 2020 15:29:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LY2gACDc; spf=pass (domain: redhat.com, ip: 63.128.21.74, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585261752; 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=xMf5eK5858GSE+nVWbwDVKmvETxTaXdd2Sr0UBoAZGc=; b=LY2gACDc/qVhmk4OvI0VVf3f7lPw7HMgePyxecvH1zpisYsD+AUBM26eUOIC3PAJZzA7RG EjmW86zI/IRyUh6lGe7lc5iu6CDi22FSL8Y0YXilITV0FoKoa33eBtr7ux2VP4DPd7sxWS 2YtlmWRUyudBfk9SBjDgx5giBFok2ZU= 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-276-nBsRle0FOsGn6NxbiJMyZA-1; Thu, 26 Mar 2020 18:29:08 -0400 X-MC-Unique: nBsRle0FOsGn6NxbiJMyZA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AE9728017CC; Thu, 26 Mar 2020 22:29:07 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-128.ams2.redhat.com [10.36.113.128]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3971ECDBC1; Thu, 26 Mar 2020 22:29:06 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 17/17] OvmfPkg/PvScsiDxe: Enable device 64-bit DMA addresses To: devel@edk2.groups.io, liran.alon@oracle.com Cc: nikita.leshchenko@oracle.com, aaron.young@oracle.com, jordan.l.justen@intel.com, ard.biesheuvel@linaro.org References: <20200325161005.16743-1-liran.alon@oracle.com> <20200325161005.16743-18-liran.alon@oracle.com> From: "Laszlo Ersek" Message-ID: <767e54eb-9c55-0c33-0516-1f9db2762d28@redhat.com> Date: Thu, 26 Mar 2020 23:29:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200325161005.16743-18-liran.alon@oracle.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 03/25/20 17:10, Liran Alon wrote: > Enable PCI dual-address cycle attribute to signal device > supports 64-bit DMA addresses. > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2567 > Signed-off-by: Liran Alon > --- > OvmfPkg/PvScsiDxe/PvScsi.c | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) > > diff --git a/OvmfPkg/PvScsiDxe/PvScsi.c b/OvmfPkg/PvScsiDxe/PvScsi.c > index 42a18494efb7..3aea5c7f8eda 100644 > --- a/OvmfPkg/PvScsiDxe/PvScsi.c > +++ b/OvmfPkg/PvScsiDxe/PvScsi.c > @@ -836,6 +836,29 @@ PvScsiSetPciAttributes ( > return Status; > } > > + // > + // Signal device supports 64-bit DMA addresses > + // > + Status = Dev->PciIo->Attributes ( > + Dev->PciIo, > + EfiPciIoAttributeOperationEnable, > + EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE, > + NULL > + ); > + if (EFI_ERROR (Status)) { > + // > + // Warn user that device will only be using 32-bit DMA addresses. > + // > + // Note that this does not prevent the device/driver from working > + // and therefore we only warn and continue as usual. > + // > + DEBUG (( > + DEBUG_WARN, > + "%a: failed to enable 64-bit DMA addresses\n", > + __FUNCTION__ > + )); > + } > + > return EFI_SUCCESS; > } > > Reviewed-by: Laszlo Ersek