From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web12.24020.1650846491154693470 for ; Sun, 24 Apr 2022 17:28:11 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=HEQj9p/w; spf=pass (domain: intel.com, ip: 134.134.136.65, 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=1650846491; x=1682382491; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xCeLdjuZ3faqNSH1ngH2kVYrt0bVh/7PErMsAJLa4hQ=; b=HEQj9p/w9WUwge6hAxq5+7brWO84HQuTFdAoPvSF2GcFH2DZ7VDp+py8 cOCFetnpUqBWf6l3tf+zpZ0bfonXMqIjUm2K/YGSOa7+Kip9tNPeh3fvK lzbfEKKanj3t93FdHAFz4RgWR/hEiCRSN1PXs1ObcZa3EEsmgrSSl1mX7 XCVzsvVkAETxJ6hy8tYx/m5xvpWqX2I04KfldsBcG2PYBE6aYKTaFaIVt pO82YUl32bEK4Mp6jOVBUfutKorkgD7b+NkHniO2oJWvyo/r529wQoE+z I8bPyMR5OWYiozendSVffA5EzKZZbjf9ABZw9oZYrwElRNm/MHDYPQwwG w==; X-IronPort-AV: E=McAfee;i="6400,9594,10327"; a="264897905" X-IronPort-AV: E=Sophos;i="5.90,287,1643702400"; d="scan'208";a="264897905" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2022 17:28:10 -0700 X-IronPort-AV: E=Sophos;i="5.90,287,1643702400"; d="scan'208";a="531851414" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.255.30.220]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2022 17:28:08 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Brijesh Singh , Erdem Aktas , Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky Subject: [PATCH 1/1] OvmfPkg: Add README for TDVF Date: Mon, 25 Apr 2022 08:27:57 +0800 Message-Id: <0fc7719aab0567c5857807c2223d999503b8bfaf.1650846417.git.min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3249 Add README for TDVF. Cc: Brijesh Singh Cc: Erdem Aktas Cc: Gerd Hoffmann Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Signed-off-by: Min Xu --- OvmfPkg/IntelTdx/README | 88 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 OvmfPkg/IntelTdx/README diff --git a/OvmfPkg/IntelTdx/README b/OvmfPkg/IntelTdx/README new file mode 100644 index 000000000000..302afac68c75 --- /dev/null +++ b/OvmfPkg/IntelTdx/README @@ -0,0 +1,88 @@ +TDVF Overview +------------- + +Intel Trust Domain Extension (TDX) is Intel Architecture extension +to provide trusted, isolated VM execution by removing CSP software +(hypervisor etc) from the TCB. TDX Virtual Firmware (TDVF) is an +EDK II based project to enable UEFI support for TDX based Virtual +Machines. It provides the capability to launch a TD. + +The Intel® TDX Virtual Firmware Design Guide is at +https://www.intel.com/content/dam/develop/external/us/en/documents/tdx-virtual-firmware-design-guide-rev-1.01.pdf. + +More information can be found at: +https://www.intel.com/content/www/us/en/developer/articles/technical/intel-trust-domain-extensions.html + + +Configurations and Features +---------------------------- + +There are 2 configurations for TDVF. + +Config-A: + - Merge the *basic* TDVF feature to existing OvmfX64Pkg.dsc. (Align + with existing SEV) + - Threat model: VMM is NOT out of TCB. (We don’t make things worse) + - The OvmfX64Pkg.dsc includes SEV/TDX/normal OVMF basic boot capability. + The final binary can run on SEV/TDX/normal OVMF. + - No changes to existing OvmfPkgX64 image layout. + - No need to add additional security features if they do not exist today. + - No need to remove features if they exist today. + - RTMR is not supported. + - PEI phase is NOT skipped in either Td or Non-Td. + +Config-B: + - (*) Add a standalone IntelTdx.dsc to a TDX specific directory for a *full* + feature TDVF.(Align with existing SEV) + - (*) Threat model: VMM is out of TCB. (We need necessary change to prevent + attack from VMM) + - (*) IntelTdx.dsc includes TDX/normal OVMF basic boot capability. The final + binary can run on TDX/normal OVMF. + - It might eventually merge with AmdSev.dsc, but NOT at this point of + time. And we don’t know when it will happen. We need sync with AMD in + the community after both of us think the solutions are mature to merge. + - Need to add necessary security feature as mandatory requirement, such + as RTMR based Trusted Boot support. + - Need to measure the external input from Host VMM, such as TdHob, CFV. + - Need to measure other external input, such as FW_CFG data, os loader, + initrd, etc. + - Need to remove unnecessary attack surfaces, such as network stack. + +In current stage, Config-A has been merged into edk2-master branch. +The corresponding pkg file is OvmfPkg/OvmfPkgX64.dsc. + +Config-B is split into several waves. The corresponding pkg file is +OvmfPkg/IntelTdx/IntelTdxX64.dsc. The features with (*) have been implemented +and merged into edk2-master branch. Others are in upstreaming progress. + +Build +------ +- Build the TDVF (Config-A) target: +`cd /path/to/edk2` +`source edksetup.sh` +`build.sh -p OvmfPkg/OvmfPkgX64.dsc -a X64 -t GCC5` + +- Build the TDVF (Config-B) target: +`cd /path/to/edk2` +`source edksetup.sh` +`build.sh -p OvmfPkg/IntelTdx/IntelTdxX64.dsc -a X64 -t GCC5` + +Usage +----- + +Assuming TDX-QEMU/TDX-KVM are already built, one can start a TD virtual +machine as follows: + +`$ /path/to/qemu-system-x86_64 \` +`-accel kvm \` +`-name process=tdxvm,debug-threads=on \` +`-smp 2,sockets=1 \` +`-m 2G -vga none -nographic -no-hpet \` +`-object tdx-guest,id=tdx,debug=on \` +`-machine q35,kvm-type=tdx,pic=no,kernel_irqchip=split,confidential-guest-support=tdx \` +`-device loader,file=/path/to/OVMF.fd,id=fd0 \` +`-cpu host,pmu=off,-kvm-steal-time \` +`-chardev stdio,id=mux,mux=on,signal=off,logfile=/path/to/logfile \` +`-device virtio-serial,romfile= \` +`-device virtconsole,chardev=mux -serial chardev:mux -monitor chardev:mux \` +`-drive file=/path/to/guest_img,if=virtio,format=raw` -- 2.29.2.windows.2