public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Shi, Steven" <steven.shi@intel.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	"lersek@redhat.com" <lersek@redhat.com>,
	"pjones@redhat.com" <pjones@redhat.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"javierm@redhat.com" <javierm@redhat.com>,
	Stefan Berger <stefanb@linux.vnet.ibm.com>
Subject: Re: [PATCH v2 0/8] RFC: ovmf: preliminary TPM2 support
Date: Fri, 9 Mar 2018 03:03:51 +0000	[thread overview]
Message-ID: <06C8AB66E78EE34A949939824ABE2B313B6613A0@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <CAJ+F1CKuHzO-F3XbjqQyLL49JipsR+Sk8zFy1ZuMssUz_71qvA@mail.gmail.com>

Hi Marcandre,
Thanks for your command steps and I tried them, but my qemu failed to connect the socket tpmemu.sock. When I added the control channel to the TPM, the swtpm socket command stuck there and never exit. Not sure whether it was successful. 
Below are the command steps running output in my side

> Then you can run:
> mkdir tpmstatedir
> swtpm_setup.sh --tpm2 --tpm-state tpmstatedir
$ swtpm_setup.sh --tpm2 --tpm-state tpmstatedir
Starting vTPM manufacturing as jshi19:jshi19 @ 2018年03月09日 星期五 10时28分39秒
TPM is listening on TCP port 47364.
Successfully authored TPM state.
Ending vTPM manufacturing @ 2018年03月09日 星期五 10时28分39秒

> Run the emulator:
> swtpm socket --tpmstate dir=tpmstatedir --ctrl type=unixio,path=tpmemu.sock  --tpm2
$ swtpm socket --tpmstate dir=tpmstatedir --ctrl type=unixio,path=tpmemu.sock --tpm2
(the swtpm socket command stuck there and never exit)

> Run qemu (from git) with ovmf (with this series):
> qemu ... -chardev socket,id=chrtpm,path=tpmemu.sock -tpmdev
> emulator,id=tpm0,chardev=chrtpm  -device tpm-crb,tpmdev=tpm0
> -drive if=pflash,format=raw,file=OVMF_CODE.fd,readonly -drive
> if=pflash,format=raw,file=OVMF_VARS.fd ..
$ qemu-system-x86_64  -serial file:serial.log -m 5120 -hda fat:. -monitor stdio --enable-kvm -smp 4 -bios ../Ovmf3264/NOOPT_GCC5/FV/OVMF.fd -chardev socket,id=chrtpm,path=tpmemu.sock -tpmdev emulator,id=tpm0,chardev=chrtpm  -device tpm-crb,tpmdev=tpm0
qemu-system-x86_64: -chardev socket,id=chrtpm,path=tpmemu.sock: Failed to connect socket tpmemu.sock: No such file or directory

I use the latest version qemu as below:
$ qemu-system-x86_64 --version
QEMU emulator version 2.11.50 (v2.10.0-4184-g930b01138b-dirty)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers

Thanks
Steven Shi


  reply	other threads:[~2018-03-09  2:57 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 15:57 [PATCH v2 0/8] RFC: ovmf: preliminary TPM2 support marcandre.lureau
2018-03-07 15:57 ` [PATCH v2 1/8] SecurityPkg: also clear HashInterfaceHob.SupportedHashMask marcandre.lureau
2018-03-08  0:35   ` Zhang, Chao B
2018-03-08  0:48     ` Zeng, Star
2018-03-08 11:40   ` Laszlo Ersek
2018-03-07 15:57 ` [PATCH v2 2/8] SecurityPkg/Tcg2Pei: drop PeiReadOnlyVariable from Depex marcandre.lureau
2018-03-07 16:04   ` Yao, Jiewen
2018-03-08  0:36   ` Zhang, Chao B
2018-03-09 13:05     ` Marc-André Lureau
2018-03-09 15:05       ` Laszlo Ersek
2018-03-08 11:41   ` Laszlo Ersek
2018-03-07 15:57 ` [PATCH v2 3/8] MdeModulePkg: fix REGISITER -> REGISTER marcandre.lureau
2018-03-08 11:59   ` Laszlo Ersek
2018-03-08 12:08     ` Zeng, Star
2018-03-07 15:57 ` [PATCH v2 4/8] ovmf: simplify SecurityStubDxe.inf inclusion marcandre.lureau
2018-03-08 16:35   ` Laszlo Ersek
2018-03-07 15:57 ` [PATCH v2 5/8] ovmf: add OvmfPkg Tcg2ConfigPei module marcandre.lureau
2018-03-08 17:46   ` Laszlo Ersek
2018-03-08 18:10     ` Laszlo Ersek
2018-03-07 15:57 ` [PATCH v2 6/8] ovmf: link with Tcg2Pei module marcandre.lureau
2018-03-08 18:20   ` Laszlo Ersek
2018-03-08 18:33     ` Laszlo Ersek
2018-03-07 15:57 ` [PATCH v2 7/8] ovmf: link with Tcg2Dxe module marcandre.lureau
2018-03-08 19:14   ` Laszlo Ersek
2018-03-07 15:57 ` [PATCH v2 8/8] ovmf: add DxeTpm2MeasureBootLib marcandre.lureau
2018-03-08 19:54   ` Laszlo Ersek
2018-03-08 19:56     ` Laszlo Ersek
2018-03-09  0:39     ` Yao, Jiewen
2018-03-09  0:47       ` Yao, Jiewen
2018-03-09 10:26       ` Laszlo Ersek
2018-03-09 11:37         ` Yao, Jiewen
2018-03-08 12:31 ` [PATCH v2 0/8] RFC: ovmf: preliminary TPM2 support Shi, Steven
2018-03-08 13:59   ` Marc-André Lureau
2018-03-09  3:03     ` Shi, Steven [this message]
2018-03-09 13:54       ` Stefan Berger
2018-03-12  5:00         ` Shi, Steven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=06C8AB66E78EE34A949939824ABE2B313B6613A0@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox