From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0054.outbound.protection.outlook.com [104.47.36.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D4C2F2095BB85 for ; Wed, 30 Aug 2017 13:45:14 -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=p4uOisB6WdyiDPZfA07wbLZt1Jsk2AufeWhnfxj44nY=; b=5ntHk3P5bAEhT5XlYCL7rW3wTTfz8trbw3dt5uaCHABk5vjdJ/AlYr3Bwggznmk2DflUgZF4lHDxSwcWHkaLbIYUEuNkLhHKtPNGe/kYT5XyPjnnJmq9IjmhWZQFxtv3N1WR8bNAKCRxtfCn50ZlV8jiqsuHNsQFTTOPgAMwVIw= 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 DM2PR12MB0154.namprd12.prod.outlook.com (2a01:111:e400:50ce::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Wed, 30 Aug 2017 20:45:16 +0000 From: Brijesh Singh To: edk2-devel@lists.01.org Cc: Brijesh Singh , Ard Biesheuvel , Jordan Justen , Tom Lendacky , Laszlo Ersek Date: Wed, 30 Aug 2017 16:44:59 -0400 Message-Id: <1504125903-29816-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: MWHPR2201CA0040.namprd22.prod.outlook.com (2603:10b6:301:16::14) To DM2PR12MB0154.namprd12.prod.outlook.com (2a01:111:e400:50ce::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1ff5dc0-46b8-41c5-600f-08d4efe80570 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)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DM2PR12MB0154; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 3:OWrpjbdz8l2AR4bvhleyP2OkH3Z/17TQ9mZJS/jaq7IDUdqXbZnYCt/6hBhIgI80Nebw1QwjbMFABkUjA8jaaWyE58rd8KHB/ocAnCUUkWc9rFPmIiIjt/lyjNebAp+5rHRfiQV26eqBv46LkkmfwmbdsoVpvRb2p/CEJ0rBNMq0/JV019Y/lL08pF8KP9IUSzSfSe1NlzqspC48+hPx3/CllbdAx3ygfGu0DnBF0TS8IBHwim5N2GWwTfub7oU7; 25:qbNr+B1F+plxbkEpszJXoxSkQrj664JBjg8egW24o5ab+IqkTL2ghtmMJSRaR/PJXuO8UMZt+KX9MwQmKJGVwFpEnISEOP7qWsZpGPQvCzs2iB2NJv/zpbZ5TIxLph+/5uRa1T2zLZFC0l9xPPMmcy1tSdZv6WTbe24l8YYK5qaki5+7m6t4S5VSLbr67NA5JKLXsQndGHbKz2QPKZAfM/IDOQjl+5we0mjSb8nE3/GDfFhyp6u1lFeem1COAb0eZqiV39UwNShrvIA24XQNZuooagWYo07XsXHu4jMQuTN0Hn6qrMmFg4oLLHB2aGeRV6ACfqZlXWRkyNrIhpMfbw==; 31:xstMM3hc12QrWYaXie0pl8+0NdS0+Yz3UOjWC8Sk62T82ZYg1MnavpebR6bCZzvQtSpkOunrwZuXjOvfuIHDHSyDLFbZpHevZbovL8J1VHAnKt02ZRYS91Sw9T6oRfFWyqAG4nE1oMrzEgrCfH4Y21MjVj0FjcrNI7C5K9tK1iujzpFZVa6E2iqwj3a37q9CK5pGbIZPuTSmGS/fc5rcpD7alfbHN69diAyV+ncCbDo= X-MS-TrafficTypeDiagnostic: DM2PR12MB0154: X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 20:JiqE+d6XGa3qGuLub0kpBYOIp4GwqJVqcW4hFlBNriskOAugB8PozJDN49ZseNihDBrORoM4xGAoOMFp7dZekVt8bNNC+dxHm89/6uDgRnaj/TjGEWCQcJZONKB29Z3ktB/tpIGUO1FuC9IFRMZEvgRhAVIhElv/8SSYbEpQqwuSERyH9cwoojtaWUNTS03B0xD0uh91Js5is2yxvMGiyLfAu3HyCcVENbLXbljWzuarwltJFFg8vkPIjg1X/UOhUbBOYBTIaV9M0NpvItY2b7R+3jLje4xFdk4NfEuhfqZbZOTMEeeLPI84BHA6cseCx2y0kmHH0iNwkIKd6e0fL6s4ijOlCvpgc2VdDF5c/HGjc2jvTGy/EaAQAwWVaSrDwGsNVZv6XqqKaAHGJrZKVIjCZ5tBpRToqnDrp8qgSxkfyYDNIFc51gDBErwEG69j+j4QcIFOyzIssTqCy2nlEHu2lzd2xYuLWzPtN86dLYxsSV7T2R8wdAkMovEHv/sp; 4:SH9Xce4ykWHFnXoeDun3NfZLp0/ZgfFCWlhdFhaiCgeyiyPcR57PSDqzg8BWmca2XA+rk3P6VMIe3+vjf5an0bZuICug11hUlUEgWChKvM+PjZwoNDP6I7fV7UxrEWp65nRXR/Kbl9Q5lyJrKyy3ZVKTrZOWNcvQ7mbm1RI1hy0xr9gDxtZLkViEjBVZPHYq4J85kI0Vw5IUsCHn5CnnjJpzrDMYtegkvRIZ/PlD+lggWzjzQy1Ul14VAVyvfF7jE5UDqQtWlhG70w5i9P5Hip8BzPYOze8FyauxGyoYWA0pEX3eeIChW0uVJMWy2XEY0g/U7bYZr/bt6rtfDtyHj6oJsIKhDbQ0xusDHohhSyY= 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)(10201501046)(93006095)(93001095)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123564025)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM2PR12MB0154; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM2PR12MB0154; X-Forefront-PRVS: 041517DFAB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(199003)(189002)(50466002)(86362001)(53936002)(3846002)(6916009)(54906002)(6116002)(478600001)(7736002)(33646002)(68736007)(189998001)(2906002)(48376002)(66066001)(966005)(47776003)(4326008)(8676002)(81166006)(97736004)(2351001)(50986999)(25786009)(2361001)(8936002)(101416001)(106356001)(5003940100001)(50226002)(105586002)(6306002)(6666003)(110136004)(81156014)(36756003)(305945005)(53416004)(6486002)(42186005)(5660300001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0154; 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; DM2PR12MB0154; 23:lbZ7ac92Gr4xb4g1L17hfAS0he3G4ezceMJBAFtVR?= =?us-ascii?Q?MXqfkr9ALHMYWVXBA2AkXdqgOX4u9lzZ3eE849bQGJ54yEOZEb2D4O6qMWpu?= =?us-ascii?Q?n3RvHwPMUAzFz0P+qOTvE7bRhsJALtWOPPRE3sdPTmOkO14OsmKSa6DyavrG?= =?us-ascii?Q?2nELKvL8u56/VUhJ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-ascii?Q?ieKZ7U=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 6:iGDswLsHHjdpmzSTcL4NEHql5pw6ltYNw7U0QWRKF3QEedoCTEH8AFe769cKoeyVHbTLNguW61JNK0GiqyIS5SkAah1ac1QMDYyCATDKd819uhhhgL0q3itF3Y/TmBONx6Fq7V867LKjC3m3KZscxoi6jQe4tRglaBZbY4Kx5mtC9V2/EeLA6kjqAwU6+tFvaX/vy72qXJGRqGtzjzoklyQT3M+i0Ua2nHfSS/joM40+WxfRPADSeXxlQ0UNUuacPcPTD/vlGvQftn7kV7GZ4vRBNV5iTPH3IVFhrjeIyxd0gKSAD9RU3YUT719vOs/Hqas/wXe5NzzCpc8sxtuOxw==; 5:wI+id3bO8P0NnbIuHBZHObBe0ywnvqP8GXNJTuoh/cciwCf+s/bDO2VK/wiS9CqBCqRfK0gS6eHMVMR2fTb5TzyzP+CU244Agk04EoXygbyXB+2fCNS9NkiT+zpSvXMjMF1Aik2Jwq3NVWWNlW73kQ==; 24:rHxZfv6GIaZbZ3Lbv6V3yM1VxKWw96rjBwOy+tgl7EZSr62ENzSFNEzP/qwGM8UTBY++OOVm3cx+2atCeivwJIMsZAmd1yi4kknizwQuF08=; 7:V8foYaCorVLnjHsCKfFW/7RY6pQHqzIdp8TJocws8rDkvc2VoNHIDGt4+yN6imntfzihySq37hZ4BYOUmbbPlIJxhF8fewiHiixJnWKpTvJIShgZU/xwkMyO18PVYWJ70kSo7klCcvfLgnfJrQupYDqcNtcJWLJJpdpwenVQXetw7fRhIu0+Z8ikqWRBCiRk9/9TMl1gojeQ0SU78Of7Ew7o3aCHVOw6MCTUw0c1dds= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0154; 20:xTf+o6fWEpUoPg+Muzdsq7yeXRFrb7LHHECB7f7W7jlNJ76cyGnCtBVNNLFQn9rhL4a3ad6xqXrSSLNvz/FLMkNdHDEYF3i/Yw6TrDLCw4BW9BJU2Jaj+o510zIJmNqtCFoDBciK8evqgHPB+NiWziHCS4aP0OeEtHmPp8sn2k6j3TktdAKBN4uKOFh08i672mrjsKgOI4wSMh2bt64V+Po1ZiKwsVo0pBPNtHBrIvGEILUwkns97tQrolAsCXJJ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2017 20:45:16.1596 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0154 Subject: [PATCH v2 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: Wed, 30 Aug 2017 20:45:15 -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-2 Changes since v1: * changes to address v1 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 | 301 +++++++++++++++++--- 2 files changed, 269 insertions(+), 33 deletions(-) -- 2.7.4