From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by mx.groups.io with SMTP id smtpd.web10.8855.1585063376242132851 for ; Tue, 24 Mar 2020 08:22:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BJSfq6PA; spf=pass (domain: redhat.com, ip: 216.205.24.74, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585063375; 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=koyccD7GQYrlBNIALMyeNbLtaJIwmlcYNu8z0zTz/5s=; b=BJSfq6PAQ+uvcoik4Y8BW6rNxBtgPhamtR7CR0q6vSq38uEBL603BibnakTBSPDFT6WVmt 6D/qJt6Evab8ZgR2mvYdNcTjO294kgHEIfF/PTwWTzkC9yoiZqnsOgxW/6/Ears722piLB o4E8h+evHsW+oahcoMu1vI6ZoWGKrSc= 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-77-U4hfFXdeO0qDzfyTGLZggg-1; Tue, 24 Mar 2020 11:22:53 -0400 X-MC-Unique: U4hfFXdeO0qDzfyTGLZggg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 15DD4477; Tue, 24 Mar 2020 15:22:52 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-115-139.ams2.redhat.com [10.36.115.139]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98D645C1B2; Tue, 24 Mar 2020 15:22:33 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 10/17] OvmfPkg/PvScsiDxe: Enable IOSpace & Bus-Mastering in PCI attributes 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: <20200316150113.104630-1-liran.alon@oracle.com> <20200316150113.104630-11-liran.alon@oracle.com> From: "Laszlo Ersek" Message-ID: <91699028-6a49-10ce-e232-4ec1cfcbf62c@redhat.com> Date: Tue, 24 Mar 2020 16:22:19 +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: <20200316150113.104630-11-liran.alon@oracle.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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 Okay I can make a quick comment on this patch too, and on patch#17 too. (And I appreciate *very much* that you have broken up this work into small patches like this, because it allows me to do a thorough review with reasonable effort!) On 03/16/20 16:01, Liran Alon wrote: > Enable IOSpace & Bus-Mastering PCI attributes when device is started. > Note that original PCI attributes is restored when device is stopped. (1) typo: s/attributes is/attributes are/ > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2567 > Reviewed-by: Nikita Leshenko > Signed-off-by: Liran Alon > --- > OvmfPkg/PvScsiDxe/PvScsi.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/OvmfPkg/PvScsiDxe/PvScsi.c b/OvmfPkg/PvScsiDxe/PvScsi.c > index 92e0f4a98965..ff6b50b7020f 100644 > --- a/OvmfPkg/PvScsiDxe/PvScsi.c > +++ b/OvmfPkg/PvScsiDxe/PvScsi.c > @@ -309,6 +309,20 @@ PvScsiSetPCIAttributes ( > return Status; > } > > + // > + // Enable IOSpace & Bus-Mastering > + // > + Status = Dev->PciIo->Attributes ( > + Dev->PciIo, > + EfiPciIoAttributeOperationEnable, > + (EFI_PCI_IO_ATTRIBUTE_MEMORY | > + EFI_PCI_IO_ATTRIBUTE_BUS_MASTER), > + NULL > + ); > + if (EFI_ERROR (Status)) { > + return Status; > + } > + > return EFI_SUCCESS; > } > > (2) The patch looks OK, but the "IOSpace" comment is wrong. "IOSpace" would be appropriate for EFI_PCI_IO_ATTRIBUTE_IO (IO ports). Please say "MMIO space" in the comment. Thanks Laszlo