From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web10.66897.1670910542634491512 for ; Mon, 12 Dec 2022 21:49:02 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=kGAq3KyK; spf=pass (domain: intel.com, ip: 192.55.52.43, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670910542; x=1702446542; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=nrGkcA3V1ivXq4YJKhsMgzNgIP4xbFTUpMUd9zmXNrE=; b=kGAq3KyKKNYzzzvhY+i03MROd0l1VECGcDRYK/K9AijpjHQI4NH7uWgJ xP538mGNr+Jr5rG/WpD4fopL5dTOWjdXzF1ut88bJ+EkZo/ceisQHEDNf VWYfEPgdQq5boFbWaB2UsX8v4zwj6H+KSZXuYgcR2jv9pRoiqC5nY89jQ yGpmP9ab7LzCEiSEA9djc7WY0fXNMqoXA0pNwJz42ucy1kB6d//UHhDNO b8xYhVYb9KmltBJDq/JwL34bmEqzwrcWwquewKocyuxXpQXFQTnTuxqkf /GIe8WFzJjDnHOEhTulmSqYo48ofzChDAJOGzBpmzjlwLybI1SxWdY14C A==; X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="404306848" X-IronPort-AV: E=Sophos;i="5.96,240,1665471600"; d="scan'208";a="404306848" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2022 21:49:02 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10559"; a="648443081" X-IronPort-AV: E=Sophos;i="5.96,240,1665471600"; d="scan'208";a="648443081" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.249.170.38]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2022 21:48:59 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Erdem Aktas , James Bottomley , Jiewen Yao , Gerd Hoffmann , Michael D Kinney , Liming Gao , Tom Lendacky Subject: [PATCH V2 0/4] Reserve shared memory for DMA operation Date: Tue, 13 Dec 2022 13:48:20 +0800 Message-Id: <20221213054824.53-1-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4171 This patch-set introduces the feature of reserving shared memory for DMA operation. Its intention is to reduce the allocation and conversion of private/shared memory, so that boot performance can be improved significantly. Detailed information is in Patch#1. Patch#2 renames AmdSevIoMmu.* to CcIoMmu.* because these 2 files support both SEV and TDX guest. Patch#3 is provided by Tom Lendacky which add SEV support for reserved shared memory. Patch#4 updates the related section in Maintainers.txt. Code: https://github.com/mxu9/edk2/tree/IoMmu.v2 v2 changes: - Add Patch#3 which is provided by Tom Lendacky. It adds SEV support for reserved shared memory. - Add more description for mReservedMemRanges. It describes: 1) How the pre-allocated memory is managed. 2) What if the pre-allocated memory is used up. Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Gerd Hoffmann Cc: Michael D Kinney Cc: Liming Gao Signed-off-by: Tom Lendacky Signed-off-by: Min Xu Min M Xu (3): OvmfPkg/IoMmuDxe: Reserve shared memory region for DMA operation OvmfPkg/IoMmuDxe: Rename AmdSevIoMmu to CcIoMmu Maintainers: Update OvmfPkg/IoMmuDxe Tom Lendacky (1): OvmfPkg/IoMmuDxe: Add SEV support for reserved shared memory Maintainers.txt | 2 +- OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} | 203 ++++---- OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} | 0 OvmfPkg/IoMmuDxe/IoMmuBuffer.c | 489 ++++++++++++++++++ OvmfPkg/IoMmuDxe/IoMmuDxe.c | 2 +- OvmfPkg/IoMmuDxe/IoMmuDxe.inf | 6 +- OvmfPkg/IoMmuDxe/IoMmuInternal.h | 179 +++++++ 7 files changed, 775 insertions(+), 106 deletions(-) rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} (85%) rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} (100%) create mode 100644 OvmfPkg/IoMmuDxe/IoMmuBuffer.c create mode 100644 OvmfPkg/IoMmuDxe/IoMmuInternal.h -- 2.29.2.windows.2