From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stefanb@linux.vnet.ibm.com; receiver=edk2-devel@lists.01.org Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 41B5C2253FB6D for ; Fri, 9 Mar 2018 05:48:46 -0800 (PST) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w29DsvgW004952 for ; Fri, 9 Mar 2018 08:55:02 -0500 Received: from e37.co.us.ibm.com (e37.co.us.ibm.com [32.97.110.158]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gkpnec0wk-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Fri, 09 Mar 2018 08:54:59 -0500 Received: from localhost by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Mar 2018 06:54:27 -0700 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e37.co.us.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 9 Mar 2018 06:54:23 -0700 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w29DsNDM6160786; Fri, 9 Mar 2018 06:54:23 -0700 Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4E94D6E038; Fri, 9 Mar 2018 06:54:23 -0700 (MST) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP id 9C5056E03D; Fri, 9 Mar 2018 06:54:22 -0700 (MST) To: "Shi, Steven" , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= References: <20180307155746.18526-1-marcandre.lureau@redhat.com> <06C8AB66E78EE34A949939824ABE2B313B651F39@shsmsx102.ccr.corp.intel.com> <06C8AB66E78EE34A949939824ABE2B313B6613A0@shsmsx102.ccr.corp.intel.com> Cc: "edk2-devel@lists.01.org" , "lersek@redhat.com" , "pjones@redhat.com" , "Yao, Jiewen" , "qemu-devel@nongnu.org" , "javierm@redhat.com" From: Stefan Berger Date: Fri, 9 Mar 2018 08:54:22 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <06C8AB66E78EE34A949939824ABE2B313B6613A0@shsmsx102.ccr.corp.intel.com> X-TM-AS-GCONF: 00 x-cbid: 18030913-0024-0000-0000-0000180E3387 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008641; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000254; SDB=6.01000539; UDB=6.00508935; IPR=6.00779869; MB=3.00019937; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-09 13:54:26 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030913-0025-0000-0000-00004F090E35 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-09_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803090177 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: Fri, 09 Mar 2018 13:48:47 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 03/08/2018 10:03 PM, Shi, Steven wrote: > 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 Try giving it both, swtpm and qemu, the full path to the socket. > > 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 >