From nobody Fri Dec 27 02:44:13 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 1503919636212938.127992257531; Mon, 28 Aug 2017 04:27:16 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6BD722095DCAD; Mon, 28 Aug 2017 04:24:29 -0700 (PDT) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0056.outbound.protection.outlook.com [104.47.42.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B04152095DC9F for ; Mon, 28 Aug 2017 04:24:25 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.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_128_CBC_SHA256_P256) id 15.1.1362.18; Mon, 28 Aug 2017 11:27:03 +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=mEXMqia8FLsEHiIgf30Sd0IDA/yKDbu8p0M/mkBzpsw=; b=zuT75ffQwj2dN6Gq24g7A+UlD0lYn+nvVKmD+ZOSgmHt6oZUw161UyoZsatjdF9U5X7IacZswhWsLCoh4rmEeaJDPY75KAdt7xdvd7BgRiroJcw5reyQ+gy+bAo/2FLUuInG2lrssL1y6C2m7LXWpvCuiCqKTO7U4i0bLGG70+I= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Mon, 28 Aug 2017 07:26:50 -0400 Message-Id: <1503919610-26185-4-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503919610-26185-1-git-send-email-brijesh.singh@amd.com> References: <1503919610-26185-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR20CA0011.namprd20.prod.outlook.com (2603:10b6:3:93::21) To DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e063a149-85b3-4c54-75e6-08d4ee07b4f9 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)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM2PR12MB0155; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 3:n7crOJV3L5/ReUEELFyjvrZ7jDzUqja01PrJ0tpRvB+su5nfQaH4Qnxy4OEuVmtGtXu1IzbrZ72DQsIWAO1XG9QD+K7yD9rt46dAcEHEA7DaTdYPBZUhSeIbp3WrsQmSEs3B/+iyUkLkDdEL6t8tJ7MHQIhszdc2UG4qdZzuBG5crxXkw/rnglWKooXUvhRDaa9NwzzZsjwO1N25QJkDS2XmJrmR+gev+AEPGWpY2NbyZTX7l0vx6dbIZmbzWiUm; 25:ITlWQHfmabFOrr9wbd7CMjAkUyMo+tW1BwJDdl44iOHbjbFhAGwwt0q7qwsYS2+B4n3Tx1pgx9dBgyJSCJhPMXFZkMxNYkplFdAAXkaFCa30bn/5UoO0Fk8IKOxM8QnSnv49Wt/MGcS0pHKSRyjqTgBiBC3+hJ6c1YYVImUUJ7rkfeu98XbrzY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PglMxFNSj2KmCXxkh2YcxdbiWEW1Fh53UitDUOj3XtAmOzyKcQfEtG7i6uD6CLWyimCq+aPpBcHUhjJWg59XM9y/PHqqdF7Fp1hJ9Z3ZCR1Cw0JYnY/Z2Ggne6WOREEmw/u1CdvVExxrbgkWr2t3PfV6kJFbMwrXPhOUs7YU8CdTa6vMzs6F0FIdZWbVgqRFRDaOZibhB6txSYDdx1ADugJxZv5h595QB83q/3ZMPl0Tjrd/+u9rfQkv5o3jA8Q== 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)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123558100)(20161123562025)(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: 0413C9F1ED X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39860400002)(189002)(199003)(7350300001)(478600001)(66066001)(6666003)(110136004)(86362001)(101416001)(47776003)(189998001)(54906002)(5003940100001)(305945005)(68736007)(7736002)(3846002)(97736004)(6116002)(106356001)(48376002)(50466002)(36756003)(6486002)(2950100002)(105586002)(2906002)(4326008)(33646002)(50226002)(42186005)(2351001)(6916009)(53416004)(25786009)(76176999)(8676002)(81156014)(2361001)(50986999)(5660300001)(53936002)(81166006)(344415003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0155; H:brijesh-build-machine.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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:FJAiPfigiUDLUiVXIPuuaH59nDbVsnU80aWzu9NVh?= =?us-ascii?Q?46BU8Zeo6ATmu0DcRmh267eZdF1ZThr0rcqKdSWnjfkaTkIeUwWIH1qJqSx2?= =?us-ascii?Q?mg4TDbZdii9Y0LkbI4I/u3dzs1CgXfGvXoLOveB4Mef0HPIOl9hSvhImRtUb?= =?us-ascii?Q?DlfPHsNgKxAXCEIZKc5PuBhi1hYyXzcFRQkrETDegs1Dm5KmAKgYZVM6URfO?= =?us-ascii?Q?1U/7um99i1V3WUYR2EShth12ndbfwUzgnOiU6xr0ihX+10GbXvrKX71ZRs70?= =?us-ascii?Q?dY4m+pPshut8xS8/iKZJleoDPXfUVOQIIpt03Dtpz+CqsaDDJPdzf+4swsDJ?= =?us-ascii?Q?mHNc50LvNgZLps5PHkd83fbJf1Ig44MIy1JUa7EZy+35+ug3V9P02lPute+v?= =?us-ascii?Q?ccTaOmhzBWFa0a5uKWGI3gvq0a0nc4pZsdq0qGGtlmQJkCW/f6ZRwgnITZsb?= =?us-ascii?Q?KB1sz5Efz0e/U67i2nGF0rkA22tT0NhgvcpH0YUbzCzzMzvMk8xELUTdOOex?= =?us-ascii?Q?5T/+w/BqCLKmie/hdiFa+/i6f315ZbT9+lZgwhXNnPTQKxujQTyRmgZbVzTn?= =?us-ascii?Q?kBn6U5STNBcFC8q5dFXJkG84Yh62+EV7FSa46AaO33ORMjKarB/nN5TBlWo+?= =?us-ascii?Q?kBVsZhfNekIVOAWwr3QCyQdB59cCKtCPkkpdvoZ+n0An0PhTXiVKdrohb5uz?= =?us-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nFCuJ/cMzUNbr3jmZRmrjr6qZ/iK9kXCFv5hj5f5pHnrJA8OJCfSpNV6JaEldSOT06CwYDWcaA==; 24:1iqgj/yJ1WMzk/X3Lc7Tc8FnD8ULerFfE4AZJ98GGZTEm+u6UPIxIfIZIJPVQjv1H7lT21Sq6CS/XGubfB602CY5+1Wn7Zzu1whaTSQjwMw=; 7:NS5EHEPiV6juobpTWkq7GIvIGAZhE6QmQBH/BskELyQhlIGm7w8bKdCcq3OFSNxhOzFBe9mCXYz+1NwLACJl0B2ScWaRgBQS44qyFvnw1zMFw2lbyLgDgwU+zt3IodogrbQVtIuJSQ3/3/7JxqDN/3tDt/xmMj9KZGrNrL9aXraR0l8iHv2mwh9L6AecPA0Qq2VYyR+WRFEGUr3nPYIZnuYU6wselkTZYlGCkcyQ7j0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:QJxbnpZLX54KlmZtCJAgn4YxbM+kaPGwbqc2pPMkRP/tEkutCwwn1HMgzHvbR/EQldQttKMc26TidQaWXzsDae4i7Vud+J55b2UXYujHtlCNj5HBBGPahk5YP0HlBRi5FqvQ5IHliIyMbsgtLVAdu/H1rNxKceO/kKFLAQTH8TkARQCIlJSTZRNvmh82aBDzEOMf+JpRdTzWQHwcIvfj617mxY0NhkX/5/T2oiv6iIWUT1tlbc81aRHUP+Doj9gK X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2017 11:27:03.2793 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0155 Subject: [edk2] [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: , Cc: Jordan Justen , Tom Lendacky , 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" 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 Reviewed-by: Laszlo Ersek --- OvmfPkg/VirtioScsiDxe/VirtioScsi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c b/OvmfPkg/VirtioScsiDxe/Vir= tioScsi.c index a1ee810919e4..7028d04f5165 100644 --- a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c +++ b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c @@ -937,7 +937,8 @@ VirtioScsiInit ( goto Failed; } =20 - Features &=3D VIRTIO_SCSI_F_INOUT | VIRTIO_F_VERSION_1; + Features &=3D VIRTIO_SCSI_F_INOUT | VIRTIO_F_VERSION_1 | + VIRTIO_F_IOMMU_PLATFORM; =20 // // In virtio-1.0, feature negotiation is expected to complete before que= ue @@ -1017,7 +1018,7 @@ VirtioScsiInit ( // step 5 -- Report understood features and guest-tuneables. // 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 UnmapQueue; --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel