From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0042.outbound.protection.outlook.com [104.47.40.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CECF821D1B2BD for ; Wed, 19 Jul 2017 15:07:40 -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=3v4lgPM+b5avXPKzmqom88niOouQFy2yfIbzM9ZoFTA=; b=X3O7vL3y9gWgICzCD76+kBDHvZsuc5oQR6LgorX2T0BBBe44G3uYkN7NESmBZaWdfSUIVNLzJCGoj4yPiiq7+w2+4qlJ16qQZTN2dhw6zcfNSeiJJPB4iS4kHbr7W1d6WqIlky9J17kfg3bTXGCtmLSn+ZVWmTh7s2tXgfVTUB0= Authentication-Results: lists.01.org; dkim=none (message not signed) header.d=none;lists.01.org; dmarc=none action=none header.from=amd.com; Received: from brijesh-build-machine.amd.com (165.204.77.1) by CY1PR12MB0150.namprd12.prod.outlook.com (10.161.173.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.13; Wed, 19 Jul 2017 22:09:34 +0000 From: Brijesh Singh To: edk2-devel@lists.01.org Cc: Tom Lendacky , Brijesh Singh , Jordan Justen , Laszlo Ersek , Jason Wang , "Michael S . Tsirkin" Date: Wed, 19 Jul 2017 18:09:11 -0400 Message-Id: <1500502151-13508-4-git-send-email-brijesh.singh@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500502151-13508-1-git-send-email-brijesh.singh@amd.com> References: <1500502151-13508-1-git-send-email-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR02CA0012.namprd02.prod.outlook.com (10.168.209.150) To CY1PR12MB0150.namprd12.prod.outlook.com (10.161.173.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a2faf2f7-9800-42bf-3756-08d4cef2d71a X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR12MB0150; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0150; 3:2Ts17Rz+PUFNipPlOhgB9yAffeDTL95x/I2Ma40/2DbtyvezcWtJfDLKZMrU95LBo+bapF2OZLeGU6LGGo4lbOOsCCf+RC8AhwB20imEZ6rjfW8IeJGy+WSncLA7QZal+1iNCEWfP9VZhP/7eVb4rtnT9kYo1nzszVz/KMRNBxnGxRy37KtbUKUu+SAjA6a1rPHpEw0c4Pwyk8SU37BMJ0da4sRZrGNqwngVgpCRYv2X+VnwF0jj+swjtD35U3r81EakkMQYM/LJ6syj5scJQiHZUo0FA9t+GYGFWjAC9Yxq33hUj1R+PODIYo23+TMynOEzBrvHoneS2rlpARZl7sI01niouklu050I6NVTPvtpKdBMLqgbb44VElq9l4PqnH0L17OwHq4Mbb+gmc9sRagyp7bzuxrD9TV4d6O/rIWYWbhn/NlVPOixtywY+TwlkJIeBAfuz8xjEpOPlBjs4Uip7f4MDl/G+1Xv1CjQHhAkpcP2Hwk9m6BQNTtGiYMP5SSBG9giMVDyeNcCrxE2V8pDSXFnRgGAdYRWOW6M5xZIIqhjV8heDFMsTJHuMblMiqsUDOn93/0uP0lMPq+8CreV+XQD6JLpDyEQ77mU1AWU03pfnRxtwBSclFIWPQroo8vg5Z3jjU+PULxSLLrCeGHb0vsOMC3sGMaoMkBgUmQOxCd4NMPupvGWQZlVVc0fmUhv2QpnFSuINlLQ9R12A2GWH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KSOBonxPW1Xg18Ndl5NpPtfjb47H+1cC3jGCFDSQiflZjnN1YWqaHZ9VVeeLd8Adp9vdJ1ZuBygsYc10C8zhd1w6qsMH3vU1DbXBbdttfyWhIeHTa2gV/eGbWl2LfTh/uTgIkTLCG+A29nCroqotPFeA8ZYAvifhCMInuuvXlxOWi2HJNIDxVTPH+gw9VcXJKIrMZVb6 X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(131327999870524)(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)(2017060910075)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR12MB0150; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR12MB0150; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR12MB0150; 4:KDmtkBCaWCW1frV6f9UF9OqXAkGwNxbODISHiq/nrC?= =?us-ascii?Q?A1hkKuHBGJPqnJJgNI2wxNOl7v0z1fkwV6Z6FuW4nGR0twZjDFMh68NMqruL?= =?us-ascii?Q?qsCm/QqE86DANCdgCUCW0nzzE5YR+retbdT49ImRr0hTIdQzSfpGBmnH30/K?= =?us-ascii?Q?Zn02kWGYRtU2AjoseDEDujMkG4v6OT7JyyOb9iG+TAEIVvCI6yecpQU4kTaB?= =?us-ascii?Q?JliiL2KOs/WO5pJjoiRjBX3jMV4ZCAllIq/LEBOwmXkpJ54J41THtt5kTiW/?= =?us-ascii?Q?T6Knx86HurgM88I89TH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Or?= =?us-ascii?Q?Fnmqi0gXIYewyczeE19opi7L3evUdgkGKommRnxeKflHXL1Pk3j8gc9BK7Xz?= =?us-ascii?Q?SRz8XfdBqvKyGwQH0PNFVMMOe7nZrVW2QjI0x9MuRdXjfB7saoADfr4Gn3u4?= =?us-ascii?Q?3GiHhrWW6jc9u3SU0lERNbQ8nBBIlKdftdQgcib3tvEJxLdKybg19TvG75QN?= =?us-ascii?Q?i9+dU6UZPis7Pq/4Jq17yd9PA=3D?= X-Forefront-PRVS: 0373D94D15 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6009001)(39410400002)(39860400002)(39850400002)(39400400002)(39450400003)(39840400002)(2361001)(50986999)(2906002)(6916009)(8676002)(478600001)(5660300001)(33646002)(81166006)(76176999)(53936002)(7736002)(50466002)(2351001)(305945005)(53416004)(48376002)(54906002)(42186005)(4326008)(189998001)(36756003)(6486002)(5003940100001)(25786009)(110136004)(6116002)(575784001)(50226002)(86362001)(47776003)(3846002)(38730400002)(6666003)(66066001)(2950100002)(7350300001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0150; H:brijesh-build-machine.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR12MB0150; 23:gvgYSD5wj+XJbB0FzEWZzn6uBinSoUiIPeUMeEiOt?= =?us-ascii?Q?pJmlrRX1JCxIxQOtJ4hbu64NyGLLgIGe2pVPzFKg+8md9zp6WQaZGHYhThhW?= =?us-ascii?Q?7OAGbcHZX4wg0TOWINqV4ZLXcpWT+SKR20h0xso/pZeirjjOVDuxZ6cWi9gG?= =?us-ascii?Q?Ai+d7zKklBBwJIjBtsBLwWrEOJv2sTiPvZnQMc/azMux2HtBLA0CNoIr39+Q?= =?us-ascii?Q?KCXwBeFalGF/lordbi3XZt+YWuksY/Wl6tq8H0CqsmOWCEZuXgMjsWmuxpxv?= =?us-ascii?Q?Ug5korYF9vma+L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YlGZ?= =?us-ascii?Q?jY9RJsKL9FYLtU=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR12MB0150; 6:9kLBaxgSH7ixXYaXN4TV9AkSXf6m6QlCe9xqlBZS7m?= =?us-ascii?Q?eybkVJDKYCH64DFssk+g9HOVX85vOh9Y3GK24SJV257LR42cPw62WltLWEE8?= =?us-ascii?Q?dhs80YWCIinHeaJIinTXO1juk/5yUA/XecgBlW78rPcn70SPvuj1jIsBsx56?= =?us-ascii?Q?aUjnHMEzrG11Ck5mLSfgV4vCEdGDWvgUD71YkwVlnVwG4u975a/c9yWh+6U7?= =?us-ascii?Q?XR8dYBtcXf3Y+n3LwDr/lIYVmePoNjV2AcfojpBZxsKMh2E0A4Ikp6VVf8RL?= =?us-ascii?Q?jmTLjDqDXz1guQ0tghvFQpkope97A07cVF6ltvz+p4VvoLHEh4hgGgII7bEo?= =?us-ascii?Q?zatA+KF7rI1ndH5fwxa5cfbIpwez6Lxpmq/W8VPd6V1HOHcyOtiFS5krom1/?= =?us-ascii?Q?cKHFFFKUtZ4hMs9CzmMVqa9tzI466TLpYy0lQ3sOqq+31V7xKCagaoGBvwJZ?= =?us-ascii?Q?DUAYUDqH+XxS4uZ2DQkP2H1jhjgAFF+jpjgfrnFrVS5ngOMDcZDKp1WiSu1p?= =?us-ascii?Q?0eWwbUGL/VGB+thVgcMNFnre/g4BRDgOraFHc2DDOwRWPmIzVE0ArRcoY5pe?= =?us-ascii?Q?4AwEy00zA0BqNykPBMli3mdm6dfMMbRH6CxbzHKbYnAs4pZjZa+s5Oi4Fi8X?= =?us-ascii?Q?u0bgJBqdL/qUM2/5i9a2tileM/AZLnSdKC7augX/lHmDfjzm9AwfQ1YBjzj+?= =?us-ascii?Q?CQQJXfYkeGVZqGgfLkdFMStNlhLFKFtn7w0DmShC+8NDllqCVuiMifbT6l08?= =?us-ascii?Q?TxP3Xzy1RQJSxIxvdAkMVLg327MKUZl0zHCLzTc398omgRvZmz8kDX9Ee5DR?= =?us-ascii?Q?5f8HoQhFrAoGVcB8w0OhOqrvQtTNXHNAzjuxOaxt2LBhks10VbacWY1s7iIn?= =?us-ascii?Q?mt6lMERVhz+mW+nEkrcJumweiEWkeKgg9cXnYxUnNWJecIfqC0biT3aRkZzO?= =?us-ascii?Q?Ix43TIQVjJA6H/T5D14khYLSVSZhVmZy+mao1fucJepxmd9J7ekCfBtPbhtd?= =?us-ascii?Q?woWlYTZiA+biIppesjBEmd?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0150; 5:EfhkheiIwOOOQp8aftRUZIgIcXwGGTfcX3ILKKCpw1fTUdq3zbYfF8Y9/O7bnWSLAVD0DOm+22epX+2HsMwK2vjuFD1gj+Et74ID5c5RIIwWJgteuF1wum+IpiHkuac+kJ7ldRzfWwky0lTD0CxCpo4f2+qokwEy8U4RQdHSF8MDpcgvyiuoWoZGYtC0jHfW8+4ZQhcJ0zYY3iIxI29A/9ZG+h5+ZfykZ9/ikbG8iltqRcrARWyiVyPi6Vgv+oQhCiohEr+1HzlJWdzBGWV50qifQbZ+sPTeXvjQzN9CR12bscLq3YmE3ddVQT12cuCeHZfWDbOwaklK+xaC0LlQYmg+XoFaVV9TqpeJgTkh9FH+54edroyOi8dHyv1cVs6vveFC2ksWMKGTO1WRO/eryNVJxPSQL/Oq4y7WGKQAfun1leg9AB+f+7ETeN2xKPopD3j1x1yxt4w3hvf+v3pYZU/6bcvG4eJoBUjXGWnkKa+To8FHcyDlsddj6CculWC6; 24:iTDSL/6YCU7PvgcdNiZMafi6tKSe3LIysvCQmSU91M364gFKQZp6deecRlQq9JZVW8D6CsNmdHWwWN+ET1VuzBvck0Va4KTGkDh/d/X+cnc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0150; 7:pjcXk7zkeg1lFxpqbwAs/LsWpVQlT2bTkHQ1lfU5edRBHoTNRejKaLPlElHKRzEPdhc8yIEsPa8Td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ArrivalTime: 19 Jul 2017 22:09:34.4623 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0150 Subject: [RFC v1 3/3] OvmfPkg/VirtioBlkDxe: Add VIRITO_F_IOMMU_PLATFORM support 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, 19 Jul 2017 22:07:41 -0000 Content-Type: text/plain When VIRTIO_F_IOMMU_PLATFORM feature bit in set then try locating IOMMU protocol. If IOMMU protocol is available, then use the IOMMU protocols functions to allocate, free, map and unmap the host buffer to device buffer. Cc: Jordan Justen Cc: Laszlo Ersek Cc: Jason Wang Cc: Michael S. Tsirkin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brijesh Singh --- OvmfPkg/VirtioBlkDxe/VirtioBlk.inf | 4 + OvmfPkg/VirtioBlkDxe/VirtioBlk.c | 125 ++++++++++++++++++-- 2 files changed, 118 insertions(+), 11 deletions(-) diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.inf b/OvmfPkg/VirtioBlkDxe/VirtioBlk.inf index 53d5a164a0b8..12577c5f700f 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.inf +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.inf @@ -41,3 +41,7 @@ [LibraryClasses] [Protocols] gEfiBlockIoProtocolGuid ## BY_START gVirtioDeviceProtocolGuid ## TO_START + gEdkiiIoMmuProtocolGuid ## SOMETIMES_CONSUMES + +[Depex] + gEdkiiIoMmuProtocolGuid OR gIoMmuAbsentProtocolGuid diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c index 3ce72281c204..f78052c4ecc0 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c @@ -23,6 +23,8 @@ **/ +#include + #include #include #include @@ -33,6 +35,8 @@ #include "VirtioBlk.h" +STATIC EDKII_IOMMU_PROTOCOL *mIoMmuProtocol; + /** Convenience macros to read and write region 0 IO space elements of the @@ -247,13 +251,49 @@ SynchronousRequest ( ) { UINT32 BlockSize; - volatile VIRTIO_BLK_REQ Request; - volatile UINT8 HostStatus; + volatile VIRTIO_BLK_REQ LocalRequest; + volatile UINT8 LocalHostStatus; + volatile VIRTIO_BLK_REQ *Request; + volatile UINT8 *HostStatus; DESC_INDICES Indices; + VOID *IommuBuffer; + UINT32 NumPages; + VOID *Mapping; + EFI_STATUS Status; + EFI_PHYSICAL_ADDRESS DeviceBuffer; BlockSize = Dev->BlockIoMedia.BlockSize; // + // set NumPages to suppress incorrect compiler/analyzer warnings + // + NumPages = 0; + + // + // If IOMMU platform is enabled for this device then allocate Request and + // HostStatus variable dynamically using IOMMU allocator + // + if (mIoMmuProtocol) { + EFI_STATUS Status; + + NumPages = (UINT32)EFI_SIZE_TO_PAGES (sizeof (*Request) + sizeof (*HostStatus)); + Status = mIoMmuProtocol->AllocateBuffer (mIoMmuProtocol, 0, + EfiBootServicesData, NumPages, &IommuBuffer, + EDKII_IOMMU_ATTRIBUTE_MEMORY_CACHED); + if (EFI_ERROR (Status)) { + return Status; + } + + Request = IommuBuffer; + HostStatus = IommuBuffer + sizeof(*Request); + } else { + Request = &LocalRequest; + HostStatus = &LocalHostStatus; + IommuBuffer = NULL; + Mapping = NULL; + } + + // // ensured by VirtioBlkInit() // ASSERT (BlockSize > 0); @@ -268,18 +308,18 @@ SynchronousRequest ( // Prepare virtio-blk request header, setting zero size for flush. // IO Priority is homogeneously 0. // - Request.Type = RequestIsWrite ? + Request->Type = RequestIsWrite ? (BufferSize == 0 ? VIRTIO_BLK_T_FLUSH : VIRTIO_BLK_T_OUT) : VIRTIO_BLK_T_IN; - Request.IoPrio = 0; - Request.Sector = MultU64x32(Lba, BlockSize / 512); + Request->IoPrio = 0; + Request->Sector = MultU64x32(Lba, BlockSize / 512); VirtioPrepare (&Dev->Ring, &Indices); // // preset a host status for ourselves that we do not accept as success // - HostStatus = VIRTIO_BLK_S_IOERR; + *HostStatus = VIRTIO_BLK_S_IOERR; // // ensured by VirtioBlkInit() -- this predicate, in combination with the @@ -290,7 +330,7 @@ SynchronousRequest ( // // virtio-blk header in first desc // - VirtioAppendDesc (&Dev->Ring, (UINTN) &Request, sizeof Request, + VirtioAppendDesc (&Dev->Ring, (UINTN) Request, sizeof *Request, VRING_DESC_F_NEXT, &Indices); // @@ -308,6 +348,42 @@ SynchronousRequest ( ASSERT (BufferSize <= SIZE_1GB); // + // When IOMMU platform is enabled, map the host buffer to device + // + if (mIoMmuProtocol) { + EDKII_IOMMU_OPERATION Operation; + UINTN NumBytes; + + NumBytes = BufferSize; + + if (RequestIsWrite) { + Operation = EdkiiIoMmuOperationBusMasterRead; + } else { + Operation = EdkiiIoMmuOperationBusMasterWrite; + } + + Status = mIoMmuProtocol->Map (mIoMmuProtocol, Operation, (VOID *)Buffer, + &NumBytes, &DeviceBuffer, &Mapping); + if (EFI_ERROR (Status)) { + Status = EFI_DEVICE_ERROR; + goto HandleExit; + } + + // + // Verify that we are able to map the required size + // + if (NumBytes < BufferSize) { + DEBUG ((DEBUG_ERROR, "%a: request %d got %d\n", __FUNCTION__, + BufferSize, NumBytes)); + + Status = EFI_DEVICE_ERROR; + mIoMmuProtocol->Unmap (mIoMmuProtocol, Mapping); + goto HandleExit; + } + Buffer = (VOID *)DeviceBuffer; + } + + // // VRING_DESC_F_WRITE is interpreted from the host's point of view. // VirtioAppendDesc (&Dev->Ring, (UINTN) Buffer, (UINT32) BufferSize, @@ -318,7 +394,7 @@ SynchronousRequest ( // // host status in last (second or third) desc // - VirtioAppendDesc (&Dev->Ring, (UINTN) &HostStatus, sizeof HostStatus, + VirtioAppendDesc (&Dev->Ring, (UINTN) HostStatus, sizeof *HostStatus, VRING_DESC_F_WRITE, &Indices); // @@ -326,11 +402,23 @@ SynchronousRequest ( // if (VirtioFlush (Dev->VirtIo, 0, &Dev->Ring, &Indices, NULL) == EFI_SUCCESS && - HostStatus == VIRTIO_BLK_S_OK) { - return EFI_SUCCESS; + *HostStatus == VIRTIO_BLK_S_OK) { + Status = EFI_SUCCESS; + goto HandleExit; } - return EFI_DEVICE_ERROR; + Status = EFI_DEVICE_ERROR; + +HandleExit: + if (Mapping) { + mIoMmuProtocol->Unmap (mIoMmuProtocol, Mapping); + } + + if (IommuBuffer) { + mIoMmuProtocol->FreeBuffer (mIoMmuProtocol, NumPages, IommuBuffer); + } + + return Status; } @@ -692,6 +780,21 @@ VirtioBlkInit ( } } + // + // If IOMMU_PLATFORM feature is requested then try to locate IOMMU + // protocol before acking that we support IOMMU_PLATFORM feature + // + if (Features & VIRTIO_F_IOMMU_PLATFORM) { + Status = gBS->LocateProtocol (&gEdkiiIoMmuProtocolGuid, NULL, (VOID **)&mIoMmuProtocol); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "%a: Failed to locate IOMMU protocol\n", __FUNCTION__)); + goto Failed; + } + + Features &= VIRTIO_F_IOMMU_PLATFORM; + VirtioRingUseIommu (&Dev->Ring, mIoMmuProtocol); + } + Features &= VIRTIO_BLK_F_BLK_SIZE | VIRTIO_BLK_F_TOPOLOGY | VIRTIO_BLK_F_RO | VIRTIO_BLK_F_FLUSH | VIRTIO_F_VERSION_1; -- 2.7.4