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.web12.439.1585242803826255287 for ; Thu, 26 Mar 2020 10:13:24 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=iaXcTdS/; 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=1585242803; 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=q+SUKxOXm4ZekvaAar5dZwPrcT2ymbfWXIqiH5VmX+Q=; b=iaXcTdS/MfgMc8oeCVPtlkqJHZsAw+GR8f9XwhOj7iB8XOTMLJ3+MEw/W0pUuY10lmzZUh OghHX6JExuBcwFIwBuDag23tyUTD7iuz9DQmNKRkpdBe60JcMSQYHrIc8dLm4ga0o1v/4n qXdSYDAxs1OHzISoFQhCO6cpB5VqhDQ= 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-228-A3360dFAPxqkIrQyqID-CA-1; Thu, 26 Mar 2020 13:13:19 -0400 X-MC-Unique: A3360dFAPxqkIrQyqID-CA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D9BB2107ACC4; Thu, 26 Mar 2020 17:13:17 +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 0C8205E003; Thu, 26 Mar 2020 17:12:59 +0000 (UTC) Subject: Re: [PATCH v2 10/17] OvmfPkg/PvScsiDxe: Enable MMIO-Space & Bus-Mastering in PCI attributes To: Liran Alon , devel@edk2.groups.io 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-11-liran.alon@oracle.com> From: "Laszlo Ersek" Message-ID: Date: Thu, 26 Mar 2020 18:12:45 +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-11-liran.alon@oracle.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 03/25/20 17:09, Liran Alon wrote: > Enable MMIO-Space & Bus-Mastering PCI attributes when device is started. > Note that original PCI attributes are restored when device is stopped. > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2567 > Signed-off-by: Liran Alon > --- > OvmfPkg/PvScsiDxe/PvScsi.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/OvmfPkg/PvScsiDxe/PvScsi.c b/OvmfPkg/PvScsiDxe/PvScsi.c > index 5566b4cce467..531bed4e5ab7 100644 > --- a/OvmfPkg/PvScsiDxe/PvScsi.c > +++ b/OvmfPkg/PvScsiDxe/PvScsi.c > @@ -305,8 +305,18 @@ PvScsiSetPciAttributes ( > } > > // > - // TODO: Change PCI Attributes > + // Enable MMIO-Space & 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; > } > Reviewed-by: Laszlo Ersek