From nobody Fri Dec 27 03:27:04 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 1503697441047284.25414345625745; Fri, 25 Aug 2017 14:44:01 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2EA0F2095E01F; Fri, 25 Aug 2017 14:41:15 -0700 (PDT) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0074.outbound.protection.outlook.com [104.47.36.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BAEB02095AE71 for ; Fri, 25 Aug 2017 14:41:13 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.1) by DM2PR12MB0156.namprd12.prod.outlook.com (2a01:111:e400:50ce::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1362.18; Fri, 25 Aug 2017 21:43:48 +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=NaaglaFg/ZwCF3X4hy+HOFIkJ8k1tM3sX9eCY0vl3ow=; b=V0wLUY1kw2p0XhROT6s7b78MQTO7Kt7Y557IzY2QQkSyA5qfBRSqaVle7RvBbLGrFOrdUt1ji12zP1lc/xH3RM5ccPAzL9UneVR7Z6sUjUd0/gDJWkacUcc6ccvs291hyG6Z1ZrhbUGNceOuN36uDmXbIKZggOK4QydTYyLC5Ag= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Fri, 25 Aug 2017 17:43:34 -0400 Message-Id: <1503697414-6830-4-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503697414-6830-1-git-send-email-brijesh.singh@amd.com> References: <1503697414-6830-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR2201CA0041.namprd22.prod.outlook.com (2603:10b6:301:16::15) To DM2PR12MB0156.namprd12.prod.outlook.com (2a01:111:e400:50ce::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4de933c3-8335-4acc-69b0-08d4ec025f1b X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM2PR12MB0156; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 3:Ew5TZo1yhUqMSUL2i4drsD1yUcEFOfY+YsS9zAg+moO6F4YGiSaHJwEmwQNtKl8okGH8dWuWt1N6JKKs2K/IRoC4RAJekTMJ9jClLkZFGQAz2NPtaf1AMt5/oHq5bNQkcjX3jOO9GQ2WUEbaZHCZaX4A+yYUPc4DinU+JkobF+PcGr8z7X5ccidC2umUgNotF8XGqDAWcQcqKNksmBJ9TCXXfvOCGGynn6B7TQmR9U1qTe0pg5CCFH51TLgrMvgr; 25:zB/+dYwWcIaFFjWa+32eR5kwjIIdNrnLQ5dLSb9JNV48cJ9/JMBqWhtS4l+FWCAPJVdMOwP7ABiqqVVwsx+d1N7gHqIl2FauLrMRKuPrp8pJL1/sajWCVuDkX7UHPm26Fy35nxWLAMB4uQl8sQTBjU6kLtYBHpQtgBQs+kD7b3JIeX4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i1sprtnKKHm6fx0yLuXtMkB+5zJ8Shc8cagkjyzPdBaNw0i/aUHHCezzPfZpPUF77N/KJDl1aigkCF7ra3fitaHy9yhSouhiGpHQoiErkjUwEEpFJAo1QkMaqzenJH0hoKEuXK7rQIL0P/7eMweCnOomOlTV9rr6s9Aeop9AmBAmH/Gjv+Wm7EC5vF6vL5hKvgbWK6wC7zAdSzoK60huxIz2zSK6mcRm/7iWA3DONzA8M/djGrPVAeA== 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)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR12MB0156; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR12MB0156; X-Forefront-PRVS: 041032FF37 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(7370300001)(6009001)(39860400002)(199003)(189002)(97736004)(54906002)(86362001)(47776003)(5660300001)(110136004)(48376002)(4326008)(7736002)(305945005)(53936002)(68736007)(105586002)(50466002)(5003940100001)(6486002)(7350300001)(2950100002)(8676002)(76176999)(101416001)(6666003)(6116002)(50986999)(478600001)(106356001)(66066001)(2906002)(25786009)(81156014)(53416004)(189998001)(33646002)(50226002)(81166006)(3846002)(36756003)(42186005)(2361001)(2351001)(6916009)(344415003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0156; H:brijesh-build-machine.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; DM2PR12MB0156; 23:8t4/2fnPrXt5QS8sTJGWATgIKiziB+j+P1JWNaOgR?= =?us-ascii?Q?wT0R4tIIgbimSHy7wm98p9kqQPqYtwxbLs4MNXN6n1WabZwGn7z+6yxp85BN?= =?us-ascii?Q?AIXVZBxq4Xfk0qIAv1FXBdSuWPS64TRlvN2nviOwX1JcRfmvJPA40eQObH18?= =?us-ascii?Q?E7FtkaYCa42HvSOe3yfn0VbUg182Xl97x7RKgfUAqtBLVGs7Q5UqjOei8jyc?= =?us-ascii?Q?nKRc2qY1PIp0o8dAbmrxUh+V4i1t3jbePqTZSFVQoXWxy0BFXGIJDGOJUrqe?= =?us-ascii?Q?6S+/iGhPA6AUZtDK0nN1g/JmOGK9+6kJRkfK3hYlSvTpZ57STXVRcgdaj7Eb?= =?us-ascii?Q?2MEWEx5pJ3eGDRv5+gLfdppYwFpG2VrJfK6BLwPi0SHYNgndzcygUbHgjmFj?= =?us-ascii?Q?AulqWOoH4yDr7m7LqJSZnD2QOvVyY6JqEw4l0fxgjQvcG9gQlHMqBhFJ1Si7?= =?us-ascii?Q?9COlSccZ4KEkMRhnBEbv8fWQAUUeFu6NCbb3kd5UchX4mbXj7jBZ5v0gpG7q?= =?us-ascii?Q?xkwjrM+zbX2iWiOnVDud8tHqJWFus/mfpUg5gpu3U0oetv3kZJ3hyhoYX37B?= =?us-ascii?Q?kj1m7BVGaFGvV+L3U9g1nzCffs5CrSEdICotmfrNTQg2Tq5j3yR7ygnHPggh?= =?us-ascii?Q?Ua2SzwXUykhbVPH0VOTAZDSPK1qnxglu6EdrciSVdvouBviTO7ioS9eLz2O9?= =?us-ascii?Q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FMOtdwhxi1CZeimBegq/M/JW0ukaJ7XJOnu0hTlR4IB7MgNcbT+iFlJQ==; 24:Gwnn6IRdbhtVn72HGUI4QHz/7eiDyW957NwGn62MLqZL54pgEbHLFKLd0eQy/UFaTcjdgMsxb9uer/adaoIl5Cckr9V1ztrGuShS+GE0+bs=; 7:6DafVzRsHr9BbKTUIYejhnOSev8oDoPMmz6tesP4tIs0kIJIezk0hNhvVaIEAn1ciq7Qq7PCrjiAE/IbiLWMzzRXFDWEGVk1FauQQavIUQtVJDaSsqY4GAZafGsGUW+JdPn7iLgiuYn70jNGHQ/MVqWnOSCyueIcRKuLMA2+FN2CFL+QPqFJNRkeIWp/aQHHSz7TuIv5i0hJHsQWf1OdsohuQ/joQkMQgCN1utkmMm8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0156; 20:uLWWfRZCV5Dkr+KdYQcYu5q9Df0t/PO8oM1Ltd5h9JQUyCm1/1ENRT3MmEjBgLDxczYMY1Q+yg1UcNeM8rXl5lh5S2ehTtd8tKqqX8YouSmcRQdaIb04xdTzs0cT2LpfJGJObGfuIG2B1yxByPocafbEmSAS1Es/X8S1QDzq4mQUjcJlo9y3rx8fVFJCOaFouQdA707Vs1NgC3067Ohu/eNAzYLl9C5aEeYg//8WaR8j/qSJcu9Uvpo5GYoSyy1K X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Aug 2017 21:43:48.8616 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0156 Subject: [edk2] [PATCH 3/3] OvmfPkg/VirtioBlkDxe: 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" VirtioBlkDxe 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/VirtioBlkDxe/VirtioBlk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c b/OvmfPkg/VirtioBlkDxe/Virtio= Blk.c index ab69cb08a625..3c4d9dfd4d54 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c @@ -825,7 +825,8 @@ VirtioBlkInit ( } =20 Features &=3D VIRTIO_BLK_F_BLK_SIZE | VIRTIO_BLK_F_TOPOLOGY | VIRTIO_BLK= _F_RO | - VIRTIO_BLK_F_FLUSH | VIRTIO_F_VERSION_1; + VIRTIO_BLK_F_FLUSH | VIRTIO_F_VERSION_1 | + VIRTIO_F_IOMMU_PLATFORM; =20 // // In virtio-1.0, feature negotiation is expected to complete before que= ue @@ -903,7 +904,7 @@ VirtioBlkInit ( // step 5 -- Report understood features. // 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