From nobody Fri Dec 27 02:04:46 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 1503880515654560.4405589035292; Sun, 27 Aug 2017 17:35:15 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EBF4A21E47D6E; Sun, 27 Aug 2017 17:32:27 -0700 (PDT) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0084.outbound.protection.outlook.com [104.47.38.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1F74C21E47D58 for ; Sun, 27 Aug 2017 17:32:26 -0700 (PDT) Received: from brijesh-build-machine.amd.com (165.204.77.1) by CY1PR12MB0152.namprd12.prod.outlook.com (10.161.173.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9; Mon, 28 Aug 2017 00:35: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=6dMVwUYIBx0sePBt0cptpYiiOO77nm1TNeYX7dPdlhw=; b=MOSYbEyL8J2k5YcCZkysVEU7JVXXuw637949s73fvIOSI91IQbTbu2RDgWssPixIjRuQxsdOYSoHODLOIz0z3HdUGce0YxdGo/EtXwhhI+vLMFRa9S3Qd6Y5HDnbStNqaSJnhuNAefFtmxFNBPi1Y6BuBIyFVqED8K1KI8Pmr5Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Sun, 27 Aug 2017 20:34:29 -0400 Message-Id: <1503880469-15999-4-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503880469-15999-1-git-send-email-brijesh.singh@amd.com> References: <1503880469-15999-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR2001CA0024.namprd20.prod.outlook.com (10.172.112.162) To CY1PR12MB0152.namprd12.prod.outlook.com (10.161.173.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e0130931-948d-4a48-fcba-08d4edac9fe6 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR12MB0152; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0152; 3:MF9oQy24W0zFmz9/ql01jku2u9D7W87rPgXCAU6U04rbxe5CiWLsfwLE9JQTclLOb93PJNC+BkPrAglL1zFWHnHUZ3Y32JJKh8TfLEVDUz4vTf9TByuKIQYPqn8bO+BjSbcFr0b24m8eZ8KJPdzL/BpGZmhuFSZo9XcCJU8YFHKTQAYeW8bfLjMR1IRlIzeCcTw5z13q+a4UUXcgbTspnS+RF4jkQKZaYv9dRbb5J8n6CHv5hYQoBP2QAOgnmpUW; 25:WSfL8YuXjXLcmpjgJtQnL4LMsPltx0Hx54fHXtnXqN/2WZ17qpqSS+3Oo5O6XCSLfqcftwihPGAdTr84rJbn7ZGtwYKzYwwG9dRVaXXXSChtCBO7HFxbpb/eKLTlPZKK7RlNI6/5R4xB4aXz9wquK/OX7SGhGwssMX1WqrUbbvZcBUISobjI/6n+us1MJg1LyMgOTAMGfhOBz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FopSmYm8Enm1dtJI09POD2frH4WseVjSbGM8OEzPuwVgnkgnnz9h64FgN2XEBAsnI5gHGfzjEnivH8e4htMiJmdyLIn4ZyaiW3nvssqU1yAXJL31O1aUagaM17aBvPFMU+84GG8aydU/I5p0JtKcE6YgPtYwJP+kRGT0V/rixDqnqYytTQDiKZFQ3+r8QNm3dQZnY7k80cse8+MIi7sx8bvxUZa7HzJjifKmnSKriemXTugfNg== 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)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123564025)(20161123555025)(20161123560025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR12MB0152; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR12MB0152; X-Forefront-PRVS: 0413C9F1ED X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39860400002)(189002)(199003)(2906002)(53936002)(6666003)(25786009)(7350300001)(478600001)(36756003)(2950100002)(76176999)(66066001)(47776003)(6116002)(97736004)(4326008)(6486002)(81166006)(8676002)(54906002)(81156014)(48376002)(110136004)(5003940100001)(50466002)(305945005)(6916009)(53416004)(68736007)(42186005)(2351001)(189998001)(7736002)(2361001)(50986999)(86362001)(3846002)(33646002)(105586002)(101416001)(50226002)(106356001)(5660300001)(344415003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0152; 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; CY1PR12MB0152; 23:vyVhh/KPSOcrBkzlZUR44hdRB8xwQuqK03q4Y0GjD?= =?us-ascii?Q?x2swhgxii21MLvS3m6g0KzdLZDAtsjeXHRmRvM4vkBvoy2KOduXBtdPRLXPW?= =?us-ascii?Q?z1SnkLlk+ReupMqtYhkLtbB4IhNqD6N7ZG8AK/QG4kZP3K1QK+ZMsqlRzMP8?= =?us-ascii?Q?juoah4M0DF6Ne0pMYowgb9UJLEn2uAXP5wAoYwX24PSIQDDHjUNI4NgHVwJq?= =?us-ascii?Q?k2bfla6bVMROHQNhZL08pTgl4gPkhWzSG9nuqcYJkvJIL/NRDriM8Hn6lob/?= =?us-ascii?Q?vXE164K5lDtfRVTDXQk1N9KqUbdnGWPwP83UuSs5bj+Y3S2zhbYQKS7ElafJ?= =?us-ascii?Q?naaSfNScFKpZI7mCOrTH5dq6wT3xmKCfvOthvf6hGdkYtnShG99B0qCm5GLc?= =?us-ascii?Q?5DgtdMVsSbSXcrjP0a4aCx0cPf00QCOhvQp2Lf8SKPw5jUbeK4y7LHcVccui?= =?us-ascii?Q?pufk9SCOOuQjV9uwntnKU/ZR/tbpSGu3LwGdIggnGKcoFqTM/RLZQr0gY/UV?= =?us-ascii?Q?amWvyzpOO1ynEQP2VAjA1A7ri5J0u+enpdI9MIgU3JKZfLRHV/zmHX6RtIsN?= =?us-ascii?Q?t+fJGx9G5Aw6TJnTpcIHcwds+9j9al7cmIQKvFuG4EwQVM4cT1L5piKMQ40F?= =?us-ascii?Q?birPXkMKhwVajjlqIMjbvQ5IX3SiCwlAES2DMJEoEUBCrUDI2ekEGDlenTYu?= =?us-ascii?Q?vKxrIcerJ+9afx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+V57Ow3jBwCzItncRwCWeZJu/9EyUm7Nlljbnu2DiomfzLPEbtDDrMh9Q==; 24:qpJycXL01Kzn2Peq685zNny8sIX9msHoyEkPd8lNqzgR5Xd+9GBQcU7leleQBpvauaxLvRnI0gitqR97n6z8obZwwQEzG/mO3Xvmk5s3Pxs=; 7:WLG1re0DXy75gDEya9BFFM+lGzkHdrSLNAW0sZhSz4dlkNSK3ncRMqh7qRWmD9pmrRgTUhuI+viEyvqN5d9plwi4crcgYcgOJwr2CbUisZtupc73BsL4wtQhj6xgPyluB+kLfnWer4I/wIo1CX6pVctkzWoONPhqMtx1RZxAvxAfWv1hZ1Gokgp/DLlFQU6XsnAPJsoqJQqdu58/vQH8Tu8OQBJNmZ8WR8NJjZCZFb8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0152; 20:nf5MHq/KyNJwjeHsYYNSnftutKhZE85VEBeceUoJcda8+0PCbK3mo0r5ZMvjhxHSroTODmnUGZvqXB2c5uttBmlqXT6Xi1sW+GZ4pstZsZzs1v8cH0G4iH+yLJlNg/jax5ftPBKLMTc1nKg/w6DYAJAYOT4+ApMRI7c6u+0yUmQouG+gzYNLKHtJmKtvZusmw0Gb/MBmcKYWDwGCKbzKhtL1vS66+70Q9QOchQ4hcK+hcxvIk6kCNyxcykgDaTQ2 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2017 00:35:03.1767 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0152 Subject: [edk2] [PATCH v2 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 c9c42aa41243..6abd937f86c6 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c @@ -808,7 +808,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 @@ -886,7 +887,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