From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6BE7221E2DA68 for ; Tue, 29 Aug 2017 05:41:17 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 5072F356D3; Tue, 29 Aug 2017 12:43:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5072F356D3 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-166.phx2.redhat.com [10.3.116.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2AA101712C; Tue, 29 Aug 2017 12:43:55 +0000 (UTC) To: Brijesh Singh , edk2-devel@lists.01.org Cc: Jordan Justen , Tom Lendacky , Ard Biesheuvel References: <1503919610-26185-1-git-send-email-brijesh.singh@amd.com> <1503919610-26185-4-git-send-email-brijesh.singh@amd.com> From: Laszlo Ersek Message-ID: <6bbc74f9-b54d-ebc0-b7fc-3e69ebc45dbc@redhat.com> Date: Tue, 29 Aug 2017 14:43:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1503919610-26185-4-git-send-email-brijesh.singh@amd.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 29 Aug 2017 12:43:57 +0000 (UTC) Subject: Re: [PATCH 3/3] OvmfPkg/VirtioScsiDxe: negotiate VIRTIO_F_IOMMU_PLATFORM X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Aug 2017 12:41:17 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 08/28/17 13:26, Brijesh Singh wrote: > VirtioScsiDxe driver has been updated to use IOMMU-like member functions > from VIRTIO_DEVICE_PROTOCOL to translate the system physical address to > device address. We do not need to do anything special when > VIRTIO_F_IOMMU_PLATFORM bit is present hence treat it in parallel with > VIRTIO_F_VERSION_1. > > Cc: Ard Biesheuvel > Cc: Jordan Justen > Cc: Tom Lendacky > Cc: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Brijesh Singh > --- > OvmfPkg/VirtioScsiDxe/VirtioScsi.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c > index a1ee810919e4..7028d04f5165 100644 > --- a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c > +++ b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c > @@ -937,7 +937,8 @@ VirtioScsiInit ( > goto Failed; > } > > - Features &= VIRTIO_SCSI_F_INOUT | VIRTIO_F_VERSION_1; > + Features &= VIRTIO_SCSI_F_INOUT | VIRTIO_F_VERSION_1 | > + VIRTIO_F_IOMMU_PLATFORM; > > // > // In virtio-1.0, feature negotiation is expected to complete before queue > @@ -1017,7 +1018,7 @@ VirtioScsiInit ( > // step 5 -- Report understood features and guest-tuneables. > // > if (Dev->VirtIo->Revision < VIRTIO_SPEC_REVISION (1, 0, 0)) { > - Features &= ~(UINT64)VIRTIO_F_VERSION_1; > + Features &= ~(UINT64)(VIRTIO_F_VERSION_1 | VIRTIO_F_IOMMU_PLATFORM); > Status = Dev->VirtIo->SetGuestFeatures (Dev->VirtIo, Features); > if (EFI_ERROR (Status)) { > goto UnmapQueue; > Reviewed-by: Laszlo Ersek