From nobody Fri Dec 27 03:29: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 1503491080289954.5721808985421; Wed, 23 Aug 2017 05:24:40 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3C34C21E47D57; Wed, 23 Aug 2017 05:20:44 -0700 (PDT) Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0040.outbound.protection.outlook.com [104.47.40.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C770521D2E634 for ; Wed, 23 Aug 2017 05:20:36 -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_256_CBC_SHA384_P256) id 15.1.1362.18; Wed, 23 Aug 2017 12:23:07 +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=KhtIB3qIwY4G1o1XoMA9cKFwTTtE8fijA4hbyYVSz8U=; b=5Az8bBN3pzUvSURgfjGBX8gjcidxlGYiKmuhRAPjEgAZ6SG4Zl4TyZ+NmyW98cpXWWgxeo5Fkp1ti3ykiIjGs4Qc4gYmQzulK6/lRwIFtVAUoxjpBQ5gv2cniRv8vCvlBKuI0V7eimjdlIfSNhfSRWc9F327NYxrCPH6ryduFrA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: edk2-devel@lists.01.org Date: Wed, 23 Aug 2017 08:22:45 -0400 Message-Id: <1503490967-5559-22-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503490967-5559-1-git-send-email-brijesh.singh@amd.com> References: <1503490967-5559-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR12CA0069.namprd12.prod.outlook.com (2603:10b6:3:103::31) To DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8ca3bc9b-d94c-4ee1-58f0-08d4ea21b640 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:dNIwy40WjwDxJnioIPaDuTkGY+CaXobzeHynSsSoHzygIJxyOPUaGvVVzyXsyUpUtSuqgG/j5DRNyFbhP3QOdmStzbAfeelqJTLyOUaQC4YrKSHxgmkCGKYRcWfy6rWKfMHE8vJu+pjSkYuVGOBcDGhnYgMGL9vGA27q2Dnt9hkAU6ijODBxcqs1lQNV4mFYxZQOdzzmfBjEWrdQbWj8aGHBqCfKQPJqpBXLA0HDqJM4hcKmiSViNXTW76yoyX+h; 25:wbA0Np9ArBfKGECTRd5+1wKuX1pz9yRiBABhwu8fawUBWMq/blju8KjeFPy8tH+LnKFaGdSivpR5oedmzAZWtMbpzZfJ9Hw/FxLIjTD677ZgILIev012A/W5cDDAw3lZCV/KJONFMDiOqMfUX19yUhzUBCetnNKpjTFEKkqKfVc90DGRkSt+MkvH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0T6BfeCb6heuEnu21QE85SpZaSMN5+lDFXZedbe+a1E2yf2Q3cYKa6tr1aO+4j9D3WLNm9bkw1OHjnAbXGY0BzClRv00zAga0odsD5a0R0cBH61zedSnR9QeTy2EEt3wkPn2qLm5yJ9RCKF0CnO6silJxxlLgkGRHf+juXotCkA8i2vASr/dbzExO/1bKtzDH8EMvB70fWe681ztHVxmqmR2UIkDt+hXZUDa4Zx1byjQaDEx3+mdpKA== 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)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(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: 040866B734 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39860400002)(189002)(199003)(575784001)(305945005)(47776003)(97736004)(101416001)(110136004)(6666003)(189998001)(478600001)(7736002)(3846002)(66066001)(5003940100001)(6116002)(6486002)(48376002)(86362001)(105586002)(2950100002)(4326008)(106356001)(36756003)(6916009)(50466002)(2906002)(50226002)(42186005)(2351001)(33646002)(53416004)(25786009)(7350300001)(81156014)(76176999)(5660300001)(68736007)(54906002)(8676002)(53936002)(50986999)(81166006)(2361001); 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:wVAGWgCjQcQz6mUxXqZd1ujj3lXwMUihb7Af6hXrc?= =?us-ascii?Q?W6f4mkcsu2/C1u5pB6KFbdFX9z0wDdDVIFp/g+bpO3qpEpqRyCK+xGOlWtoe?= =?us-ascii?Q?gAlwts8ydvuN4p418dgp1RCdHHO9Tbe++tbj42DLRq0hkSie0O3eGMhgH9Xt?= =?us-ascii?Q?sAT9DmGAd+WE2b6HRaBMxY7QR5QHMuQXqJMyt4QykHVa1X5hfSJzoRpFSiWg?= =?us-ascii?Q?yEqRH9nQuwZaHyn4AVA2uF9RjJn2XrAd3hLnYskPxqr8W2aRErAdSzZ03Ol4?= =?us-ascii?Q?eEVlpPB9/x1bwE0UDVeABbpeibWUYMHCrrbsl5SKpXERgi3isZKzWfymt115?= =?us-ascii?Q?h19rOiRBV50etlhEIgEMmJssP+JToHN9lu17OpPNByp28VjEDOo78G/RxuXj?= =?us-ascii?Q?nlsdSyVC1taN8wKMCw8hIdUNwgMPQb5dUE5nn3XfoF2Wafm+iwbV6vwxoehT?= =?us-ascii?Q?0i7Hn7+q8q7ORV6THEwx3eDbQTnuCv4mvByzAP7epvobA2daYhiFlHk6Cf/h?= =?us-ascii?Q?MLp2W5u9s3/Bo0SSUiJPghiQE9lXhKWZf4f4lGbjCWBMV28Z7PAGMU4e2c0e?= =?us-ascii?Q?KDuAdxxeApzFfFl2C99LJ60PVaJAr/AgFZOXtdqJ1kUAlBLky5V3z08A0hco?= =?us-ascii?Q?WaKErGB5ykq2hjztau1aWrF27bJSQ/LzThVJ4pSlMJOV8Z3Yf9gQlsHcWENs?= =?us-ascii?Q?8yhd1QkIRjul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HLotH3DGRjpNrEFmwHfBUCudFL57NZrfRBZpjZ+56ps0HNihh1XoH57URP9IUyf9lMnxE5w==; 24:GAI7N8doipXAsAplOuyKM1/vUPMOOcB7dqwmfvlF37CTq/qxJXf0jUq310Nm9UVvN9Np0dqBjnR8xyua7n//6kImT0ljE7TuCiQomIDnRZ4=; 7:67PvkvPdwxyVnvXHxoM/OT+lgFlqvQAsWmIHjBICnrvahmBzweOxOSKJNV6QJLa1Hac/5GhmzzAvFKXLFs75p0hu3oJictX+FNg5cVjgXkimC8xCPh+QQxXqsOWxY/HIsQT4FiLK9AxKpU7jirCF2vqG0DlnK8AQpiGfPQ5pe4sZDuw+0NuUke/OECTqb7eupGjDd9fQafZp6UWQh8Ib5MZ2278gAk90hDCNVEm1wNE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:ld2XoUIW7IEXaj1w4kVpBWUhbanardNLVKwjRCEno4pwFhMBdcTZreTqu4v2Bl39Q4X2Uba7bFHoT4jE83x+Lo8xM6ySs3bCEVUtwEjO/G3OOtwnFrdC0Zuf3FfXLDwRcsPmvsdp9GqwoYK/P92y3bqAc152zMqpgtFE68GfF14Y8oMqHGS6T1zHqnL6hOJzecRhEJF6F8P9pbov+/tn8OHf64PErcusLYXhhuSOw57WvzaJjW2YV04nWrq69vG3 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2017 12:23:07.6853 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0155 Subject: [edk2] [PATCH v3 21/23] OvmfPkg/VirtioBlkDxe: negotiate VIRITO_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" In previous patches, we have implemented IOMMU-like member functions in VIRTIO_DEVICE_PROTOCOL to translate the physical address to bus address and virtio drivers are updated to use those member functions. 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/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 e23762743f75..fa6c527c0d28 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c @@ -824,7 +824,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 @@ -902,7 +903,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