From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0057.outbound.protection.outlook.com [104.47.37.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A632421EB5269 for ; Thu, 31 Aug 2017 07:58:45 -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=P0psQir2WVgAgx4ag0isI7nl6OwUudo2UVXn2EDkWL4=; b=MFaixxTLnW4wD3OYl/Bk421wkiGE72mkZgzG9nilF+uCI5PybXIuqN+TiZtwxbUuChyKhnV4RFlXTJEiwpADSZp32Iqv1urPAvNsbv6eKpfI6FKNi6H6iel2tFn3p6MHZ4WA7gHp+gCuVJESEZgnQpT/KhbtjQe5Oeq0VTtz92U= 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 SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9; Thu, 31 Aug 2017 15:01:26 +0000 From: Brijesh Singh To: edk2-devel@lists.01.org Cc: Brijesh Singh , Ard Biesheuvel , Jordan Justen , Tom Lendacky , Laszlo Ersek Date: Thu, 31 Aug 2017 11:01:10 -0400 Message-Id: <1504191674-3949-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: MWHPR08CA0056.namprd08.prod.outlook.com (10.173.236.30) To SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e2831bb-d5a8-4664-30df-08d4f08127ac 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)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 3:oxFHllwg9ArNsADXZr5zVzrXKcw+6pyMWIMzBGGo/g8RY4oMqhez02YNG4R7CUx36krplmn0czsTWUjjXbdi4fTuu0iD9SEtA/K4sFvv80koad82cPiF4CTNXperkIFHnFG0kR2E9M4xWe+EzieS0fWVWN6zXmfwxVLDSh+eXATFyOj14IaqodJSFQyPWz7OA6VuUhoWxJpGPtXfRyCt3EqLMMOU7F+fRkUfXooZtzPwN4v6bk/inLCbssSFSjBb; 25:pKFLspuqnyBJCeMP5epsLgZ+SEji94HRnrwdQ26cSjSVF/+B9fuwIjYKLEMu80haMgpRIskpzIUlR5qmh/gQgOVeDjq2+o4q4AicH2b0lSovkSjXWv1XVhbgfTQ/u72MmSZUOhizBroz3wa1NP/slhuT/k4AJniWKvQPmslXbM8gPqimYVRzPTkuR9R6IQ5hFxU0dNiK9GOYJtm8YQeBRIPEImJpRC6F/MdzNMLfXCM6wdxyWRcmYoCh+xXKTuo5QhJVNSc1DfXaIlFbDhUaTBa8io5T/t07KCiN0PBBxCeaPXRqalvRpPkPrWFUX48RmwNbceWykaDz1gmQs1BYFg==; 31:w7+Vsvh0k7cPBoOOfVInHat0IaZQRYsOgoiZr3tflueXlEwiSCI26/iMZB3ctOYoZhkWfw4r3AqfSqgNaMw+g0HY+ygGUK2+FbnAAckfNQyDsWZlIq4lvKeyBqNAX2Nsb9td3gpT3VW7SBjMwhgD3PMIQegS5XjRtOC7YSFwNcUJjkbKGpaZoLUNHoFAnh5KT9npFctYK745/pXQ7E8rpY4oNLJiALH4XWZ1Lm2fj7w= X-MS-TrafficTypeDiagnostic: SN1PR12MB0158: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 20:272UghBDoSmwseib/LsCbr6br4sot6yMSbecANh41vELapmhMNSciIKeB1gtqRetHWWvGtoUMZ4HK/YT1IsqhO1bYWP6lwDqnkd3D2TOmRI2uTQi81tmPoN7VugMd1eXcUk2vx8YU2+EcjPiwt5QsZZWpDbid67Ot44N4INY047Lbld5CGB7eXiJaFLmWnSk1P5H+y4lxrbKiP9ovxk8M3sb3jThWL9eQFvcXKUJ+wgkwcvGT7eDqFJH5mbpr2J/3MyZk1BiDdc7sRgfr1saNEFnknRKdLxGOs78C8sDp/1XQaMJsfwiDFfnMyqRyT+kkDeFU1lvFY8Wny0I5Wc5kE6VwpSzwmtPBj5xO6ml5E7EFmBuMKJBh+Yz4GYFQRsu15FuIKYN1DAHhgp7asObStF5E0Co+hvgjy5g2AxfMjNOGJXAS8Z4TBBc4T+Y4UFfmHqd7H+16LJsMV75KOvySH2Tvj9iGQw2FuiCcF8PNVNUWfmrvJLHb6ndY4b7Lm7Z; 4:uOvDHEti9qpfjjBwOK8/Z9M4us91j1y1sI17DNggnFv9a4IVVnqB2o0nk9t7EZlOQAAx1V8gDncOPvchtsIHhYBHR5e/pT4FS4+mg15eSgBUCs0xRhH5tNJmh9ztigBMGUYVoh2kGt7flooP5o1Aqak02pm+Pn+XYi861jBUtcnUJ6UMJPfByiEaBotGYaCqgi36afuWHuMG8/K+9qR7uhSCMTVCOG4gtuqjRPJrGgusF3+yBuh9zxEndssqW4J4rl8YWGoNdQsUlfjLnhEuTmVq2Df2Uj9pk8mvnTzVid9pZrlYvrPTPogCJ+9E9zr9yStcrA2++iusXHM1LXc8hBv/n7/ntd3gug4omr1d39w= 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)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123564025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN1PR12MB0158; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN1PR12MB0158; X-Forefront-PRVS: 04163EF38A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(199003)(189002)(81156014)(8676002)(478600001)(81166006)(5003940100001)(50226002)(8936002)(4326008)(50986999)(2361001)(110136004)(2906002)(2351001)(189998001)(66066001)(106356001)(105586002)(7736002)(42186005)(53416004)(54906002)(6306002)(47776003)(25786009)(97736004)(53936002)(33646002)(101416001)(305945005)(6486002)(6916009)(966005)(48376002)(3846002)(6116002)(36756003)(6666003)(5660300001)(86362001)(50466002)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0158; H:brijesh-build-machine.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; SN1PR12MB0158; 23:6ZJJp4LOCiek4Oc+mV5wAoZC0k73dyvP2B5ANOTc/?= =?us-ascii?Q?1C7z14bgVGXmWY8Jz9y7vAQwkF/Jc01RmT03nitcJBP18RVQorThzJDtqrgs?= =?us-ascii?Q?tPXqd6ePG23i0oepdqaP7ReBo/O9sSy8hRU90Nvg02cwCzpGPtuPwAD0lS4W?= =?us-ascii?Q?o9efO/bC/cp57Q3hkm0whfEX0dK19+SROqJg95H0YSXf6X82S+Ocfwwy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3i?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 6:I4AREWizCCRK71tZJcUU9Qj/PBl3CaRSCmXpNWhvn793knVFEwbVhOC/zYlS48gQ/Xhep05DG2iBKrYaS6YsSMF7p/pICbUI4WrZBCh6AgtVXObm13wO/8bufq3fPnqOzMw7Qy6SpfOZ+vycy1n2zN6t/V04qDavJNw4UHW4mqoybpWfSuYaLT2Bf3sCWfxWQ1HdCf67CsWRAEVCvP/iYQgsq2DdQKj77ryBmG80D3jdTpcu8wScPd6rsXY8M6Wlr6bdK4PW9NZVFqbCciulhVxrKbQ26QGzGRmkBhj60e+QOic03WS68kynlG9m/xH6dFD0M8MH3v3GJJN9igfavw==; 5:A5VsGE/7vJqtZghJe28j7b7ZV6QL5IjVpOa5n1bqqrFtGYxK9yMiN0Qo7QVFcZyKXGuj98GZOfN/HPSJQaQdzziE5dx9hwUrMUdbcz2BTBauLTtXCPpgfNjZTezk5gsa5M2SHclJIhQlvo9uND0ENw==; 24:bYsZG7uywMqeoiYSubbJ13FMlYb+Pswhz1TN7zzA3eumiiwqjppqJRmGU59Yor6ArM25AikarJGGHADtCXLA26f9ypN3b1csAi/lJlzyivo=; 7:r8VHRzuVZpZTVegnk8KTPDKI89+OPMR88EcHhStdBEpM6NIq0bodLWv9GVciuAbn/241h805YoCe2U24Mr3IjdYUZ5jTaSPxEEQHZqO5HEuXkkrLqcOtJ4NxI2byd0LZgtIB9EqhJ7vv6GeKBDIyPtPtZY5jOIpjB9jgU+/a66sD3SXJz8EhfEKpMdjZd01buvaQ941O71CK+pqPfrynk4Mtnjsk07sqaikgKHBDu/o= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0158; 20:5dm2UUnGZAV3cJQLL9nPwaLtb1DA5K/gbVH00//X+n5TdJYNhQWOxLoeGGmmAjGQ69gYugrewoJ7LfSjDLch1mSy3EGv04AhxByCgmNxOJ9jLS3sOJYQeVTJxQ+txgbL2WLWrQJG0IzZ6Chv5jyjWXoAyqpCBHcEYqHeVM19BOEE+40t6l6s4iURkwnV1G53DZoEKJ70QM4S/ut6F5M9ZxpXBeeYn/nXw5zQj5z8lY4xGMTfYPXmWRzr9Sp8HjFN X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2017 15:01:26.5157 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0158 Subject: [PATCH v3 0/4] OvmfPkg/VirtioScsiDxe: 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: Thu, 31 Aug 2017 14:58:45 -0000 Content-Type: text/plain The patch updates VirtioScsiDxe 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-scsi-3 Changes since v2: * changes to address v2 feedback Brijesh Singh (4): OvmfPkg/VirtioScsiDxe: map VRING using VirtioRingMap() OvmfPkg/VirtioScsiDxe: add helper to create a fake host adapter error OvmfPkg/VirtioScsiDxe: map virtio-scsi request and response buffers OvmfPkg/VirtioScsiDxe: negotiate VIRTIO_F_IOMMU_PLATFORM OvmfPkg/VirtioScsiDxe/VirtioScsi.h | 1 + OvmfPkg/VirtioScsiDxe/VirtioScsi.c | 306 +++++++++++++++++--- 2 files changed, 273 insertions(+), 34 deletions(-) -- 2.7.4