[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <636f315e-f1d0-0e2c-849c-b7f393da2bc9@redhat.com>
Date: Tue, 6 Jul 2021 16:23:49 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: isaku.yamahata@...el.com, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
"H . Peter Anvin" <hpa@...or.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, erdemaktas@...gle.com,
Connor Kuehl <ckuehl@...hat.com>,
Sean Christopherson <seanjc@...gle.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Cc: isaku.yamahata@...il.com
Subject: Re: [RFC PATCH v2 68/69] KVM: TDX: add document on TDX MODULE
On 03/07/21 00:05, isaku.yamahata@...el.com wrote:
> From: Isaku Yamahata <isaku.yamahata@...el.com>
>
> Add a document on how to integrate TDX MODULE into initrd so that
> TDX MODULE can be updated on kernel startup.
>
> Signed-off-by: Isaku Yamahata <isaku.yamahata@...el.com>
> ---
> Documentation/virt/kvm/tdx-module.rst | 48 +++++++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
> create mode 100644 Documentation/virt/kvm/tdx-module.rst
>
> diff --git a/Documentation/virt/kvm/tdx-module.rst b/Documentation/virt/kvm/tdx-module.rst
> new file mode 100644
> index 000000000000..8beea8302f94
> --- /dev/null
> +++ b/Documentation/virt/kvm/tdx-module.rst
> @@ -0,0 +1,48 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +==========
> +TDX MODULE
> +==========
> +
> +Integrating TDX MODULE into initrd
> +==================================
> +If TDX is enabled in KVM(CONFIG_KVM_INTEL_TDX=y), kernel is able to load
> +tdx seam module from initrd.
> +The related modules (seamldr.ac, libtdx.so and libtdx.so.sigstruct) need to be
> +stored in initrd.
> +
> +tdx-seam is a sample hook script for initramfs-tools.
> +TDXSEAM_SRCDIR are the directory in the host file system to store files related
> +to TDX MODULE.
> +
> +Since it heavily depends on distro how to prepare initrd, here's a example how
> +to prepare an initrd.
> +(Actually this is taken from Documentation/x86/microcode.rst)
> +::
> + #!/bin/bash
> +
> + if [ -z "$1" ]; then
> + echo "You need to supply an initrd file"
> + exit 1
> + fi
> +
> + INITRD="$1"
> +
> + DSTDIR=lib/firmware/intel-seam
> + TMPDIR=/tmp/initrd
> + LIBTDX="/lib/firmware/intel-seam/seamldr.acm /lib/firmware/intel-seam/libtdx.so /lib/firmware/intel-seam/libtdx.so.sigstruct"
> +
> + rm -rf $TMPDIR
> +
> + mkdir $TMPDIR
> + cd $TMPDIR
> + mkdir -p $DSTDIR
> +
> + cp ${LIBTDX} ${DSTDIR}
> +
> + find . | cpio -o -H newc > ../tdx-seam.cpio
> + cd ..
> + mv $INITRD $INITRD.orig
> + cat tdx-seam.cpio $INITRD.orig > $INITRD
> +
> + rm -rf $TMPDIR
>
I think this belongs in a different series that adds SEAM loading?
Paolo
Powered by blists - more mailing lists