From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::229; helo=mail-wm0-x229.google.com; envelope-from=marcandre.lureau@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5F54D22568625 for ; Thu, 8 Mar 2018 05:52:49 -0800 (PST) Received: by mail-wm0-x229.google.com with SMTP id t6so11230885wmt.5 for ; Thu, 08 Mar 2018 05:59:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=qAD092WNtATojeAqt1PR8H8Uo+GV8MC+UmhSZ2WvnMs=; b=V6fJm3+i1I9x0tU1RuV3ejXsYTK0zom7TepQdhSlB05wwWXf+etotGhuR+U3Yyr4fE 4f2B3ULZuLOaBHtkQMftp6/e8a9vlvzfoxuC9bT3duaVor0GCLMT7BBicFmEdejk9BJy OFQ0vjIMt3S+24pZI/BAa1zc0KXL1sds7rZwmN0W4L8eMqVIplOGTtQiHvsrePayxphB x0y5kVnfHQKV4L/Xd5yhmNRh67U7BhPo/2EBsDEohbYJxSW/Sm+/26RBUvLgE+vZeAma nAu67FRKBE4+1Fw7DNAArKqa/ctvMPVZTzm8R60+Ip8xznPmbcQYaYFUFvXa4hCC40Qa 9pCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qAD092WNtATojeAqt1PR8H8Uo+GV8MC+UmhSZ2WvnMs=; b=tpXJqGQJe8K0MONSRFXgI0IojVdmGKCsQ87BhkUzqZ6n1KtSGYSCXFm+wdNq/KLmQI elDiCTLYW6rIVKbdlFuPhGJt7kQBYp+OPJkWlJqdYTqSKVBHW/wl4E2629VeKH1/hkyD jHVLY1PzWO/2lEaieE/9YEDbRRXl3VhTTMptalz2iwn96SuwqmVA+hPxmEDN/DzcjT4i aJA8K9Ryd2kqvW9VGuOtTNDgvR77Z20iGHwGcrvfL9ffxoAPp4L2E47mD8BW4OdXIcID KXcIHQDkNbAEuN4vPIRPI/r9TatsrNPZ7B+67Ylz83SjKneM4g6DErV+d2IaXoyPNrYD iGWg== X-Gm-Message-State: AElRT7H0lUrwm1umZ3GkHkpzG3QsMLXUHXD3C8weUV61e8aWtQuuAK+8 omp94VB4elicbv4PY1/Gp9t7QX2drE7BW67maEQ= X-Google-Smtp-Source: AG47ELvWJXI/kV8FXOHP8h3TACWI23MeqwXuh7SZEShmdgg+9XvVqBuZ/xjBqpB2zIoyIxvZH+E2Vldgmul09/JRsdc= X-Received: by 10.28.74.16 with SMTP id x16mr1745197wma.36.1520517543987; Thu, 08 Mar 2018 05:59:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.185.67 with HTTP; Thu, 8 Mar 2018 05:59:03 -0800 (PST) In-Reply-To: <06C8AB66E78EE34A949939824ABE2B313B651F39@shsmsx102.ccr.corp.intel.com> References: <20180307155746.18526-1-marcandre.lureau@redhat.com> <06C8AB66E78EE34A949939824ABE2B313B651F39@shsmsx102.ccr.corp.intel.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Thu, 8 Mar 2018 14:59:03 +0100 Message-ID: To: "Shi, Steven" Cc: "edk2-devel@lists.01.org" , "lersek@redhat.com" , "pjones@redhat.com" , "Yao, Jiewen" , "qemu-devel@nongnu.org" , "javierm@redhat.com" , Stefan Berger Subject: Re: [PATCH v2 0/8] RFC: ovmf: preliminary TPM2 support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2018 13:52:50 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Thu, Mar 8, 2018 at 1:31 PM, Shi, Steven wrote: > Hi Marcandre, >> I test with qemu & swtpm/libtpms (tpm2 branches, swtpm_setup.sh --tpm2 -= -tpm-state tpmstatedir) >> $ swtpm socket --tpmstate tpmstatedir --ctrl type=3Dunixio,path=3Dtpmsoc= k --tpm2 & > > Where is the swtpm_setup.sh? And could you tell how to build & install th= e swtpm? > You need to compile & install libtpms & swtpm : git clone -b tpm2-preview.rev146.v2 https://github.com/stefanberger/libtpms cd libtpms autoreconf -vfi && ./configure --with-tpm2 --with-openssl && make install git clone -b tpm2-preview.v2 https://github.com/stefanberger/swtpm cd swtpm autoreconf -vfi && ./configure --with-openssl && make install Then you can run: mkdir tpmstatedir swtpm_setup.sh --tpm2 --tpm-state tpmstatedir Run the emulator: swtpm socket --tpmstate dir=3Dtpmstatedir --ctrl type=3Dunixio,path=3Dtpmemu.sock --tpm2 Run qemu (from git) with ovmf (with this series): qemu ... -chardev socket,id=3Dchrtpm,path=3Dtpmemu.sock -tpmdev emulator,id=3Dtpm0,chardev=3Dchrtpm -device tpm-crb,tpmdev=3Dtpm0 -drive if=3Dpflash,format=3Draw,file=3DOVMF_CODE.fd,readonly -drive if=3Dpflash,format=3Draw,file=3DOVMF_VARS.fd .. cheers --=20 Marc-Andr=C3=A9 Lureau