From nobody Thu Dec 26 13:59:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1505424202884969.434224016613; Thu, 14 Sep 2017 14:23:22 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A462B21E97818; Thu, 14 Sep 2017 14:20:05 -0700 (PDT) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0070.outbound.protection.outlook.com [104.47.38.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3D21D21E74922 for ; Thu, 14 Sep 2017 14:20:03 -0700 (PDT) Received: from ubuntu-010236106000.amd.com (165.204.78.1) by DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.35.12; Thu, 14 Sep 2017 21:23:00 +0000 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=e13vmjhmlYr+r5r3iDawTH0Hk5kk/QFxtyHnxvybTf4=; b=Ia6jxv/S/HJsjFnvjla6BAqByrD2/4CgMg/txwBvsU5MbGeiJOzXB9j3nIQammfjEQgMz2iAGCUaBFyVW6li4hPbS7EPDYoUTRf6LEP/EYaQKBchXDfPfCKz2PbsC8H4OR6vZnLgiC8fIi4tkmnB4PgT/SiwrogEq2zV4iwXmtA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Thu, 14 Sep 2017 16:22:47 -0500 Message-Id: <20170914212247.124937-9-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20170914212247.124937-1-brijesh.singh@amd.com> References: <20170914212247.124937-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: DM5PR20CA0014.namprd20.prod.outlook.com (2603:10b6:3:93::24) To DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 81eea373-f510-40c6-c5dd-08d4fbb6c70c X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM2PR12MB0155; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 3:Rs1RCvboArJRE9xtT5vUyTq31JKaYdGgRWwGIfNgs9ZZs5/zXuEExeWqNA2sdoq51ND023OCJWHsw9FHl/cnXa5lrty4RofqS2aeet60AR2bnnL84ts42hczIWbDQdYnGHJy8+SUsCRt/QODxgH7vuiZKJ5L8Fa6KGQegHTQzIG2wzD82jnAZM4askEgWq/wkz71/LB/VwF6m0qEcftu6UgaRrndImQH//S9izqMokRKnz80PHamjUwIlskXB1pK; 25:E+WyBuzjD28vLJNWcs8OgaUfZEuFpZWi9nVjuj0Tao4jF0Ryt92wTRXfNT6X0E6XqA12wJUTHcmBudRlezHKTr4Ok7OV9joyvwrg1eyZR/3OoA2n0tgmC2uhuovESvj2XLbKeGB6Iffv9lndcSFDruuMJTXX7QREDZ9cKkP2Qu4U0WoC0dNwpsYopLStl+8Uq9KXvrGTURYnHSbWIaepT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UnBiAikyhIrj0sb6jKdP6EpmwRh2S3Bt6uKc4m1oLuSDHX/SIwMivOqtgIC/zTZ4j/pq38zx/dNpj7/kyDW8pTRiJPez0KpUzh77RQPzltSp9pXEPazdBLrEBts3dpKRdnbyKg6drqCbb3s4gn9qsNleW0WfpQMxBZVVxzMd4XIX1zCZbBU5O98vGEWN8uqnlHtY9cxqCxl/EWYreDKNQ== X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123555025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR12MB0155; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR12MB0155; X-Forefront-PRVS: 0430FA5CB7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(346002)(376002)(199003)(189002)(53936002)(4326008)(110136004)(50466002)(47776003)(50226002)(81156014)(81166006)(68736007)(54906002)(8676002)(2361001)(66066001)(2950100002)(6916009)(33646002)(2351001)(36756003)(106356001)(105586002)(53416004)(101416001)(48376002)(8936002)(25786009)(6486002)(97736004)(305945005)(7736002)(5660300001)(16526017)(16586007)(2906002)(5003940100001)(1076002)(6116002)(3846002)(316002)(50986999)(6666003)(76176999)(86362001)(478600001)(189998001)(344415003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0155; H:ubuntu-010236106000.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR12MB0155; 23:QcVMQmpXq+BfiEe7B2Nz0GSOEKbFCqjgRBt+T0a4X?= =?us-ascii?Q?0vnLjpssuB/ASEnR/8t3q3QLkRDlwSZAZx/csoDocDeH5ZRRwsEM1ybD0c5j?= =?us-ascii?Q?33MMukT6idxwAGhIHKgRBV91m29taJTAu58fowC2Ujfzop7LQp6HezL5BNri?= =?us-ascii?Q?xGd5NhWA6mSoJ1IwKZVvQ9aawLJUVJgWQtAAhZhrNTCnH9Y37w6/QerpUF0s?= =?us-ascii?Q?iBszvbqKL4JBhEiCga4bnr+TMzusi+nBdIZtWLJMqadDzc+Hi5RaUX9cD/rJ?= =?us-ascii?Q?fM3LZ9o1Gq45leDdKIscz0VHRlNJKZbV44Ybdvg7YGW7NTeiUi/3MjbIgyY7?= =?us-ascii?Q?dT1Yzofbbk7lBDXKp1MdYkMiDwXp6lHrdrnvcuc+DU7RW8afTp66O8PVcDZ0?= =?us-ascii?Q?4X+FHSKTaSJ2BfHTKw9iKFvRwNZffAwfNp/JvPHLpXf6zL1n4YLkx6KW2jgX?= =?us-ascii?Q?AZqAvetivKXxRtV7uRM1TUlj79JIJx4ajo9SVOO0Qpba0bObctwIvML2JG2S?= =?us-ascii?Q?SINYpSVH+CMHAPfCXut1s63UGbpBt7af/CW0tGMb4VDp7VdhYUxbRYp+7yer?= =?us-ascii?Q?MCMPfT/9ilPdPa9LIL7WjxJS4FSUI16gW6mTOrOIXp293oayQmf2UL+LZzPj?= =?us-ascii?Q?rb43v8GmBvbiT6dVIZ0cXp7knFgRr9KzB2wKD5zIgoXP+L/ASwPtRloxJXYY?= =?us-ascii?Q?1QS+cGtBEHFX3uPcOMIsdeaswuv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zxCTl1hEHxhgUmdcVQ95vh7h0v65ngefb8/bJYfAf9Djm9xIkJBsdMDz8B2cNkOmbrDbYwr65PTt2DYgXPmLlVDJN4P4=; 24:9to6dfQZDX5g9gnAFieZGN3Td2tWlTYpQaNiulkSvfBD0DQQ3Ws0QmlymzFivZBhyTizCzEerlRDrnbHaOwzLUUEc2794rXnQtRyg9YcTj4=; 7:pM2Ij+voGaJ0v31IMM1b69CarUNr/2ieyxI32iwSEQvaX9ZEBrBY/HDK+mdcTPGLInP9xrYbKsQgu6WiCjK89vrQaXgHf7GiC1BxLRLVIT4gBmgVGTgFQTuoyUv6fh0LfMsr2zj/yTpG36as+Yq4vtB2quf2lKTlmH9V0V9FMu13BTBRlKnkMqV7FUdchI50o+I8aWtfjVFW1Da5cMfVD9J9UbQMfnVLnBSoHazcfgs= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:dTuwDgZzxT+FVMxmIZLJVmwjKQAsX1UEhQDJsti+QSCqzqw5xqI5+68arBd3f+9+zH1lkUlO0LA3zuXyNCVJWrce9D6V+nwhgr3pjlxNpYj8QfXM/hoUQVs2N2sASyDdTDmjwS2nwdKsMXwIgc4hxJSETEbXS2k0f1ZdkpIGj35i2nj4LOl0YimGc6Ehmgjd6P6f3wOWJ7rqku/dprD+ztfG0ckNSIZa6r9FydO9xWJYPh5HaLmbIbWJXxl3rUHG X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2017 21:23:00.6017 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0155 Subject: [edk2] [PATCH v4 8/8] OvmfPkg/VirtioNetDxe: 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: , Cc: Jordan Justen , Tom Lendacky , Brijesh Singh , Laszlo Ersek , Ard Biesheuvel Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" VirtioNetDxe 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 Reviewed-by: Laszlo Ersek --- OvmfPkg/VirtioNetDxe/SnpInitialize.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/VirtioNetDxe/SnpInitialize.c b/OvmfPkg/VirtioNetDxe/Sn= pInitialize.c index ffb3deefe00c..9dff04ce6071 100644 --- a/OvmfPkg/VirtioNetDxe/SnpInitialize.c +++ b/OvmfPkg/VirtioNetDxe/SnpInitialize.c @@ -562,7 +562,8 @@ VirtioNetInitialize ( ASSERT (Dev->Snm.MediaPresentSupported =3D=3D !!(Features & VIRTIO_NET_F_STATUS)); =20 - Features &=3D VIRTIO_NET_F_MAC | VIRTIO_NET_F_STATUS | VIRTIO_F_VERSION_= 1; + Features &=3D VIRTIO_NET_F_MAC | VIRTIO_NET_F_STATUS | VIRTIO_F_VERSION_= 1 | + VIRTIO_F_IOMMU_PLATFORM; =20 // // In virtio-1.0, feature negotiation is expected to complete before que= ue @@ -602,7 +603,7 @@ VirtioNetInitialize ( // step 5 -- keep only the features we want // if (Dev->VirtIo->Revision < VIRTIO_SPEC_REVISION (1, 0, 0)) { - Features &=3D ~(UINT64)VIRTIO_F_VERSION_1; + Features &=3D ~(UINT64)(VIRTIO_F_VERSION_1 | VIRTIO_F_IOMMU_PLATFORM); Status =3D Dev->VirtIo->SetGuestFeatures (Dev->VirtIo, Features); if (EFI_ERROR (Status)) { goto ReleaseTxRing; --=20 2.9.5 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel