From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 E69C621E11D2E for ; Sun, 27 Aug 2017 17:32:24 -0700 (PDT) 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=YfSGpgxG289NsMcqg1TNBT3g2RrmnjnMmXkII/+d0F8=; b=ypC8owxwayA/E9EGKa07hoOVqrpJRSXQjILWETeKk0d1aHE2AcRiB8BC/R90+5OBCxdBdvxoy/AnnHEyhE71QcavGOeiOVTHcfGZ30ZQ/SMMrFgUx1RWO/TWnBwEgAe4g0INByiI6ufKApwX0+wwOnsGc2541NuRYnHPdKGVYPc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; 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:34:59 +0000 From: Brijesh Singh To: edk2-devel@lists.01.org Cc: Brijesh Singh , Ard Biesheuvel , Jordan Justen , Tom Lendacky , Laszlo Ersek Date: Sun, 27 Aug 2017 20:34:26 -0400 Message-Id: <1503880469-15999-1-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 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: 0c016063-090c-4767-c049-08d4edac9de8 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:BR/xo8J/YVZH3yGd0/GSDhRrQY4694TM7mWXekbSmNI8pDGZvWUGYBRlMXrqPuVBLwrGaFhgar1vKTYXnMX/F619qPDZTyKmnhvs9VFKeJrLGJmISA3VMOInAPj7zmSS6IOoukL5m+wo2rtrSXwUT6/F081rgOJuV4HUO+ok7+xdfXtTZZ2RpPCQBTIQV6F7X0aXU17qiccEhfxAfzLEixd3ei/mx9qjeLzCDn9rte/il2nEBKZ246bzb2QERAVY; 25:A2Yg+kDqIePeFVA2Xypi8SU2Are8fO943TQMYLhp8doZ3VTDuMEUQJHWlJqRwG/8H7jX3wBzn8pKprIrpPbDaisWWBSK6MMRckQpFjY4dtze2eLQfDv6LKixIKCFQlT1HAc2hLmONilg/s+yBJFQ471ltK6sS1DTKgNanspQKm/9JqzWnMEEICMEaZ+i3evKba7CDbGuxoQGn4u3pD/tL1cWvg3wQD+GYpWWJhhJ8/VCS7g5p7GhcmolNUO6IKOTW5LlydyRlVXZRwNo93YuuDBLM++VQ1RM3C7QTdcydShiagqI84/MSzfcm6jDqpkKjbD6hW4TeyEBJ0t0K3rRTQ==; 31:jtOo8Hx8+XV9TasePuptFuFJYctuLIlKQkb/WXYbJIGdrmX/5+i0xIcwvYhGATCcbXuD4WYSVkd7gczI53ilBiayvgBuKJVtY7ePYwgvFV4w4IKzY2gojPBmExLLlEZ04bnDIakBCMPW/bcrJKJeTrLV18P2EO1XVrL7p1CN1d72bnugylopdqHw3rKXkj9IWyPRZGKnz4/g0ipF4TEsLQYvHboKk2QcM1MWdkpA2RY= X-MS-TrafficTypeDiagnostic: CY1PR12MB0152: X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0152; 20:9uXagapAIHwSYevPT9GwTV9T60QVATf0d6L3Jc+ZUtQHh3iKTbAKVrG/y4iv+RnMseni3meWb9Xmoz1e3LdVhm0qJRVapuVNdWE1fWZkiR5oJwzA5v71yB8g53+N6ADztFcb9pd8b3DODEt2R/d4ZiiW+ogDgIRNr+PrAXNBwy8VTMBovsU/bC6HyK4B7Eac1n2jvSg6UP/iNYPuygBwd2pSsHogenr1PQ/1TiLfcQl0GGktKOo4h3Gbc2UrvjMc8unNTeM2LhwOP3NlGuA4Hzgt93f9njLYkVXpt8QRVGspmQAyESBiC8L17zhE5LUKERlj5RExtOzZakMvs6CKoqYMrFeODjOqM1NV92FFM1I9gfdm3vPsoDdFmfhRv8gaqFoW49cYi/0ZocOueKeUs1ylKas1msvF4aBbk2NMFs2Nwt2xxDACJUpMc23/Mb5WuSlJp72pEJMyOCWdbGAOV6RTjtPslZ5T2gw5VDW34QRAmM1Iot4gnHD6sqjtG6RJ; 4:AkAoAVvVAD4YJttT913MDGnUiJXNQ+asUAFF19LXmIq7UhN5RrrMN+bpd8l/Ak6v9ucI0+0lTfwD4r8iGnBMJc7FQ2OIF8oYv1nuDbhEiCwTOUKzcnLfHprKdciFecAsSuWbpNT+Y0892Bm51jZxdD+/A71LEIXlNBpy6Q9QsL4Fh8deRWpTE//mqNnsK1eE920WtonWNDtPGlAaxvyRBtEk5NkeAVm7eGOHlcYDu/6JXb1Od01+zs/rrmVx3oxVpX7ZgHvI6GeSU4KXsbhVL0iImG9V/90sDt2Znfff4eUVygYVo/GOvnrjCCqyzcfViw75llq74pP4FQJKAqH0+fzEu1nZpx1MWT2BOoXQYeo= X-Exchange-Antispam-Report-Test: UriScan:(166708455590820)(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)(66066001)(47776003)(966005)(6116002)(97736004)(4326008)(6486002)(81166006)(8676002)(54906002)(81156014)(48376002)(6306002)(110136004)(5003940100001)(50466002)(305945005)(6916009)(53416004)(68736007)(42186005)(2351001)(189998001)(7736002)(2361001)(50986999)(86362001)(3846002)(33646002)(105586002)(101416001)(50226002)(106356001)(5660300001); 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 (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR12MB0152; 23:dq8+pIPU4VRJkE4xuEyO8EAjYBRbmY7vsE6XKQZCZ?= =?us-ascii?Q?/YIPoFLX86EfkPPbTz/mnKswsRvQY6au8uXFwMB+N9imY8mnpdqjw/ttDTW9?= =?us-ascii?Q?2sRwH9FQmzudT5j4jxuYLBaYzKbzGMdLO7fXPIxE0m3smxXk629D5d9o96vp?= =?us-ascii?Q?xKM5kcItgmo7Db2GYYzBA/OtS3kPPg+ga+hb0UlzoxuOyRi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r3pQ21jdY03Q3g1bn7kM0nBpZcmbIwF7d5n/YvJAAe1f2praB02dDqGLB6QpJY9XCCHYedptMgjlFgcgDP7+fLZulz0C8FrObFNE7WaT5M4sWOATdvKmHJP+c/bMmiuIlOuu0/57TD7GCyh/1PO2NwDft/d9Tj0cdebNlGa8LDJxYoqoAkNsvnJbHXWg7VIA4B511kvw4Z6L4huU+ozpncB5EYUL8dPS94UJg3dis X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2017 00:34:59.8329 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0152 Subject: [PATCH v2 0/3] OvmfPkg/VirtioBlkDxe: map host address to device address 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: , X-List-Received-Date: Mon, 28 Aug 2017 00:32:25 -0000 Content-Type: text/plain The patch updates the VirtioBlkDxe to use IOMMU-like member functions to map the system physical address to device address for buffers (including vring, device specific request and response pointed by vring descriptor, and any furter memory reference by those request and response). Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Tom Lendacky Cc: Laszlo Ersek Repo: https://github.com/codomania/edk2 Branch: virtio-blk-2 Changes since v1: * changes to address v1 feedback Brijesh Singh (3): OvmfPkg/VirtioBlkDxe: map VRING using VirtioRingMap() Ovmfpkg/VirtioBlkDxe: map virtio-blk request and response buffers OvmfPkg/VirtioBlkDxe: negotiate VIRTIO_F_IOMMU_PLATFORM OvmfPkg/VirtioBlkDxe/VirtioBlk.h | 1 + OvmfPkg/VirtioBlkDxe/VirtioBlk.c | 188 +++++++++++++++++--- 2 files changed, 166 insertions(+), 23 deletions(-) -- 2.7.4