From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0041.outbound.protection.outlook.com [104.47.40.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 23A1A21D1B2BC 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=pz0ixjWxm2iYFlziotvx+QmTC7xQ/Vu0uttwW/MblZU=; b=ImRKK2BrKTrtH4KoWQsUmVXoq7z044xSn9VztyYIO26j0KfhjKwIcFdsHWpCDUnOTazhn4yko3deLTxF5mFyVsv5DG3H/hWPRaN9mnvCR9R2inEkDY9kgMYsIm8LhXJj7osUez7IAtBJj3YQf1oLHumpCdA+I/iid/TQCLH4Zw8= 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:33 +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:10 -0400 Message-Id: <1500502151-13508-3-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: 5ce0b16f-e56c-446d-9363-08d4cef2d66e 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:InpXBJ/sl33eK+vshxiCOlAG+aqrgvodltcScH2ijfR1GK/d0SeZfEqR3Js+qFrarMYptEByYtqxCFfCRX7zeHEY7OnZxLsOMh5P3ahuZ4G/iJD1OiVwOrdUN6XyK0Wn7cJJqxDgHW0ITrRaONKa25tYixG0Jq4hZ7Ru8hfC+JzETttVapld92Ax+llGOKZpwYe6zkcFPz0DyfSRvETdftCyX8xwr/xVzvJ8oT9Irh7r4tLnl6GTE3SGeqcs3EZof1gXLU+rTtBz9FPAn80q2hvlBtE7S3Yir/RDgIoAGl0yZGKsMy2+LvQOqddmBQa+Mfbp+7DN/uY8WVbeHatX6PLgJ1AEmYpkkJFab2QPTYBLy79uVc7XCm6YP19vnFbtN85+/h2oe4vRog1zXCAFO2qiMIkmCllfCorv/67PXJD2tP+FKt3doG5uDgH4Te9aeGkjB9OTKecibzH8Sv3IBg92ZmHRISCNBBPZfFSdr12E6VGt6YPlayibh5ULZnPKE2tCNhssxJuK97i2aB7iV0G1h/Dd4nCYXJEboqFKA6FbSL1wSW8bhQBJG02jiesDWOznjJAp4Cm0ovG1X/lrMysdl26wTdFSZbpHSwDyElTw5OioL955YTF6THERzuzGYBhsiaZrF9iJCPPR1ALWQBnuqZ4XpgA6ghcApOvioX/YHJXCiv+BedI1Mul2KE7W4g0X8MlZrryeT0yTwBt2Ct/Z6+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oGCgATjMBwICTXzshj9Rlqg4DmN9sjuepX22/dwol0nM2nlCoXZAMqw1mMYIZwcudWThSYa7mte0pMHYGJAqrbf6+157SMCZ8l8V/MIdAnvs1+49qXWlZQ05dTOrCwkFs/e/qOrMb+17UwzblEqpLyh0y//5CSpq1zzMWxr3U8NppjZENqahhaYwuB X-Exchange-Antispam-Report-Test: UriScan:(133145235818549)(236129657087228)(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:ub1DRJyE7Z0dnJ8oUqrLFIut303KEc/LtH69N0AWW+?= =?us-ascii?Q?Z7yJeAAjhQJLwHrW0Mr5LPerWX/C/C2nUOcgsio1Bh3xW8zuyOzjf3hIUZ12?= =?us-ascii?Q?hWF0wi/kZyDcyerA8/OR2J2LakRbUn+u6FBjBnJ/+HonNJ+65iTOV+PaV7cc?= =?us-ascii?Q?Z6nb/woY8VSa7pb/ddpUXB2RtBZVkLwttAEoRKstbhMGQ9+T3/8K9s8KOLrs?= =?us-ascii?Q?sYjBRt6wb74ighNp0h/kduVzUeWIxetvWUOIBq0ebrSN09RRhXv6aFg/kt5f?= =?us-ascii?Q?9keD1AIWa9mY62TUNP582ofjZ7NxKs35MBSUiNZqD2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aLwElDyNMkapUH35SYQ82ACq/xlsxUzSGVGNVR21Yv?= =?us-ascii?Q?BgDi8K981ergXgwXB++hPnKbGf+wwHvsrMfIA4k5ixxcfdi3oW1E30iccP9f?= =?us-ascii?Q?0jkkr4tIt0PwTMJ1BkNzpRJrFs4DEUknYwN/P9DHbs?= 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)(19627235001); 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:CC/Q3nPxqFcLZyA9LBnw1VA5YHnMoDZaVSGvWHT8h?= =?us-ascii?Q?D+liZAaydV3fbqLBsEvPHRcxJXZwQL8Lc/ord+azcE3teoUze/veywqjJCsx?= =?us-ascii?Q?bpc8mqQyHv9JI8WBf0qSHaj/IbalNFMfbStpNvcEC8kYFuObuwrWLJRVN/En?= =?us-ascii?Q?+qeP0jQZe6RnEKTAGePaiYMRjprBs0AR3aP6BMLxgFSR0JsmtTL9KZyEZAkh?= =?us-ascii?Q?DwvOVf0PT274rOfyn8MIDe3D8F3IN3mAUssxKKlr38v2E0ucGJaxMPu+Hsuz?= =?us-ascii?Q?lSYrPwt7uj0p6/47yEJlaj3I+7qjFv1qxrs7pm1ogBVfqR/kX2FJzvL04mwt?= =?us-ascii?Q?LjRjpmtlHre66sO4YTBYnyKMV1IOzzKQ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p69135bhsJ8xr2bsKFUh7/YA?= =?us-ascii?Q?OORpV6wZWM/Rj7WIT/FgbHs6tTYkN3uSGYQn57zzIxONdKIFXj04PVjH/OxI?= =?us-ascii?Q?E8YLCWsIvl6xMYGzNOFOjz+gCZVR2W5gOO/Pli13Vk8Ux0YAn5LsPyXN8oid?= =?us-ascii?Q?nSLHVz3piL51953MNMSF49?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0150; 5:UbsHv+CZnf3tvk+T0N57sbDtowJ7VFy9Uux0Y/qeEcJDI8WOWwMGMvLFz0fghjTC0ncxxA1PBE0xz8xY5Mc1y7roR8njddaOp2LZsQUqgudSG1fgyxIk9fImruDKPcKbEsLfqlCdCqBEMrmN6szoPsNhxMKCQKfv5RwAaJjMwCPrHzK5nPqHJHLz0APP0ukCBHV1iuDXh7BxnA/ZUiq4ra/hmphJXSnW7P63MGRY82HHpbp1Aoy0ppAToaMfPcgsxPNoKjbweuFF5uU9mPI1D8pFHX+jF8dQEdDlKKVRGx/Yrh5ub0EBqdF3GduLjmB4LiBOrMzlkLTMJnEOvtVna9CEhNE7/P/fUBTIDKGjPorzKqb4wObx5dd+Ti3FAq7W0KDkA2APoVigwJiJ8QtiK1rNMyNUue8g2z55gypC/9wLGHT1k+TOTF4tFHtnCgjL3g1wKD3huA24Z3mIhOAf7Osa0Pnc4zn8ySUTaQKgCg3xjKOnP3Mnhmv9dBK8NyaF; 24:hmvhzAoBGm93klEyxIQ7EkoVvyokeHbus/jgykY4U8qorELDYg2cLXNNW4UZH/hQ/OMEiDG1h0BMarYdZRMcv/BaouceXI2ItD5BUQv+bPk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0150; 7:O+2dSTsmlOTwbeBh1lqdfp9M3iPITkK3Zjmtg37aATJuam9QOLQMUNIxnBAve1kYhcl74r7vcFnEZkeZh3kAPnnWQu1egHXyR9L8rYT4slvsEsKkUG7H3vl37C9Dr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enant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0150 Subject: [RFC v1 2/3] OvmfPkg/VirtioLib: Add 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:40 -0000 Content-Type: text/plain When iommu_platform is set, use IOMMU protocols buffer allocation and free routines to allocate and free vring buffer (guest-host communication 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/Library/VirtioLib/VirtioLib.inf | 1 + OvmfPkg/VirtioBlkDxe/VirtioBlk.inf | 1 + OvmfPkg/VirtioGpuDxe/VirtioGpu.inf | 1 + OvmfPkg/VirtioNetDxe/VirtioNet.inf | 1 + OvmfPkg/VirtioRngDxe/VirtioRng.inf | 1 + OvmfPkg/VirtioScsiDxe/VirtioScsi.inf | 1 + OvmfPkg/Include/IndustryStandard/Virtio095.h | 1 + OvmfPkg/Include/Library/VirtioLib.h | 20 ++++ OvmfPkg/Library/VirtioLib/VirtioLib.c | 96 +++++++++++++++++++- 9 files changed, 121 insertions(+), 2 deletions(-) diff --git a/OvmfPkg/Library/VirtioLib/VirtioLib.inf b/OvmfPkg/Library/VirtioLib/VirtioLib.inf index fb5897a88ecf..6629d0d52b04 100644 --- a/OvmfPkg/Library/VirtioLib/VirtioLib.inf +++ b/OvmfPkg/Library/VirtioLib/VirtioLib.inf @@ -26,6 +26,7 @@ [Sources] [Packages] MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec OvmfPkg/OvmfPkg.dec [LibraryClasses] diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.inf b/OvmfPkg/VirtioBlkDxe/VirtioBlk.inf index d5975b74eb05..53d5a164a0b8 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.inf +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.inf @@ -26,6 +26,7 @@ [Sources] [Packages] MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec OvmfPkg/OvmfPkg.dec [LibraryClasses] diff --git a/OvmfPkg/VirtioGpuDxe/VirtioGpu.inf b/OvmfPkg/VirtioGpuDxe/VirtioGpu.inf index 04bc2964c223..a6d4cbbd191a 100644 --- a/OvmfPkg/VirtioGpuDxe/VirtioGpu.inf +++ b/OvmfPkg/VirtioGpuDxe/VirtioGpu.inf @@ -31,6 +31,7 @@ [Sources] [Packages] MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec OvmfPkg/OvmfPkg.dec [LibraryClasses] diff --git a/OvmfPkg/VirtioNetDxe/VirtioNet.inf b/OvmfPkg/VirtioNetDxe/VirtioNet.inf index a855ad4ac154..2b8996ed366e 100644 --- a/OvmfPkg/VirtioNetDxe/VirtioNet.inf +++ b/OvmfPkg/VirtioNetDxe/VirtioNet.inf @@ -42,6 +42,7 @@ [Sources] [Packages] MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec OvmfPkg/OvmfPkg.dec [LibraryClasses] diff --git a/OvmfPkg/VirtioRngDxe/VirtioRng.inf b/OvmfPkg/VirtioRngDxe/VirtioRng.inf index 471beb37bc7f..898bfb7158c2 100644 --- a/OvmfPkg/VirtioRngDxe/VirtioRng.inf +++ b/OvmfPkg/VirtioRngDxe/VirtioRng.inf @@ -26,6 +26,7 @@ [Sources] [Packages] MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec OvmfPkg/OvmfPkg.dec [LibraryClasses] diff --git a/OvmfPkg/VirtioScsiDxe/VirtioScsi.inf b/OvmfPkg/VirtioScsiDxe/VirtioScsi.inf index 75581123930b..082f9a12bb09 100644 --- a/OvmfPkg/VirtioScsiDxe/VirtioScsi.inf +++ b/OvmfPkg/VirtioScsiDxe/VirtioScsi.inf @@ -27,6 +27,7 @@ [Sources] [Packages] MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec OvmfPkg/OvmfPkg.dec [LibraryClasses] diff --git a/OvmfPkg/Include/IndustryStandard/Virtio095.h b/OvmfPkg/Include/IndustryStandard/Virtio095.h index 6bf77cb32075..c81b29c6d9d0 100644 --- a/OvmfPkg/Include/IndustryStandard/Virtio095.h +++ b/OvmfPkg/Include/IndustryStandard/Virtio095.h @@ -154,6 +154,7 @@ typedef struct { VRING_AVAIL Avail; VRING_USED Used; UINT16 QueueSize; + VOID *Iommu; } VRING; // diff --git a/OvmfPkg/Include/Library/VirtioLib.h b/OvmfPkg/Include/Library/VirtioLib.h index 5badfb32917f..92a3d5e10f7b 100644 --- a/OvmfPkg/Include/Library/VirtioLib.h +++ b/OvmfPkg/Include/Library/VirtioLib.h @@ -17,10 +17,30 @@ #ifndef _VIRTIO_LIB_H_ #define _VIRTIO_LIB_H_ +#include #include #include +/** + + Configure a virtio ring to use IOMMU protocol + + This function tells vring to use the given IOMMU protocol interface + for allocating and freeing the vring buffer (this guest-host communication + area) + + @param[in] The virtio ring to set up. + + @param[in] IOMMU protocol to use. + +**/ +VOID +EFIAPI +VirtioRingUseIommu ( + IN VRING *Ring, + IN EDKII_IOMMU_PROTOCOL *Iommu + ); /** diff --git a/OvmfPkg/Library/VirtioLib/VirtioLib.c b/OvmfPkg/Library/VirtioLib/VirtioLib.c index 845f206369a3..d8fdb6310d52 100644 --- a/OvmfPkg/Library/VirtioLib/VirtioLib.c +++ b/OvmfPkg/Library/VirtioLib/VirtioLib.c @@ -26,6 +26,69 @@ /** + Configure a virtio ring to use IOMMU protocol + + This function tells vring to use the given IOMMU protocol interface + for allocating and freeing the vring buffer (this guest-host communication + area) + + @param[in] The virtio ring to set up. + + @param[in] IOMMU protocol to use. + +**/ +VOID +EFIAPI +VirtioRingUseIommu ( + IN VRING *Ring, + IN EDKII_IOMMU_PROTOCOL *Iommu + ) +{ + Ring->Iommu = Iommu; +} + +/** + + Allocate vring (the guest-host communication area) + + This function checks if host has requested the Iommu support then it uses + the IOMMU protocol allocator for allocating vring otherwise uses AllocatePages + +**/ +STATIC +VOID * +VirtioRingAllocatePages ( + IN VRING *Ring + ) +{ + UINT32 NumPages; + EDKII_IOMMU_PROTOCOL *Iommu; + + NumPages = Ring->NumPages; + Iommu = (EDKII_IOMMU_PROTOCOL *)Ring->Iommu; + + // + // If IOMMU protocol is set then use IOMMU allocator otherwise + // fallback to standard allocator + // + if (Iommu) { + EFI_STATUS Status; + VOID *Buffer; + + Status = Iommu->AllocateBuffer (Iommu, 0, EfiBootServicesData, + NumPages, &Buffer, EDKII_IOMMU_ATTRIBUTE_MEMORY_CACHED); + if (EFI_ERROR (Status)) { + return NULL; + } + + return Buffer; + } + + return AllocatePages (NumPages); +} + +/** + Configure a virtio ring. This function sets up internal storage (the guest-host communication area) @@ -76,7 +139,7 @@ VirtioRingInit ( EFI_PAGE_SIZE); Ring->NumPages = EFI_SIZE_TO_PAGES (RingSize); - Ring->Base = AllocatePages (Ring->NumPages); + Ring->Base = VirtioRingAllocatePages (Ring); if (Ring->Base == NULL) { return EFI_OUT_OF_RESOURCES; } @@ -118,6 +181,35 @@ VirtioRingInit ( return EFI_SUCCESS; } +/** + + Free vring (the guest-host communication area) + + This function checks if host has requested the Iommu support then it uses + the IOMMU protocol free callback otherwise uses FreePages + +**/ +STATIC +VOID +VirtioRingFreePages ( + IN VRING *Ring + ) +{ + EDKII_IOMMU_PROTOCOL *Iommu; + + Iommu = (EDKII_IOMMU_PROTOCOL *)Ring->Iommu; + + // + // If IOMMU protocol is set then use IOMMU FreeBuffer otherwise + // fallback to FreePages + // + if (Iommu) { + Iommu->FreeBuffer (Iommu, Ring->NumPages, Ring->Base); + } else { + FreePages (Ring->Base, Ring->NumPages); + } +} + /** @@ -136,7 +228,7 @@ VirtioRingUninit ( IN OUT VRING *Ring ) { - FreePages (Ring->Base, Ring->NumPages); + VirtioRingFreePages (Ring); SetMem (Ring, sizeof *Ring, 0x00); } -- 2.7.4