[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] [Xen-devel] vTPM setup problem on the emulator





2013/1/15 Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>
On 01/10/2013 10:11 PM, Bei Guan wrote:


2013/1/10 Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>
On 01/09/2013 09:17 PM, Bei Guan wrote:
Hi Matthew, 

Thank you for your reply.



2013/1/10 Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>
On 01/09/2013 03:58 AM, gavin wrote:
Hi,

I tried to install the vTPM in Xen-4.1.0 + Dom0 kernel 2.6.18.8 + DomU kernel 2.6.18.8. The device is TPM emulator.
However, I  encountered several problems.

1. In DomU, I run "modprobe tpm_xenu" successfully. But it doesn't creates the /dev/tpm0 device as our had expected. So, the trousers cannot be started. An old thread in Xen mail-list can do this,(http://old-list-archives.xen.org/xense-devel/2006-12/msg00002.html) but it helps little to me.
Is there any problem with my vTPM front driver? The tpm related modules and other info in DomU is list here.
[root@gavin-pv ~]# lsmod | grep tpm
tpm_xenu               15752  0 [permanent]
tpm                        17952  1 tpm_xenu
tpm_bios               10112  1 tpm
[root@gavin-pv ~]# tcsd -f
TCSD TDDL ERROR: Could not find a device to open!
Any relevant output in dmesg? Also does your domu config file have a vtpm device specified?

When I run "insmod tpm_xenu.ko" at the first time in DomU, there is no special message in dmesg except for this "xen_tpm_fr: Initialising the vTPM driver."
Then, I reload the tpm_xenu module after removing it using "rmmod tpm_xenu.ko -f". I get the following message in dmesg.
...
xen_tpm_fr: Initialising the vTPM driver.
kobject_add failed for vtpm with -EEXIST, don't try to register things with the same
name in the same directory.
 [<c01ea4ea>] kobject_add+0x11a/0x1a0
 [<c01ea691>] kobject_register+0x21/0x50
 [<c02400fd>] bus_add_driver+0x7d/0x140
 [<c02856f9>] xenbus_register_driver_common+0x39/0x60
 [<c0285740>] xenbus_register_frontend+0x20/0x40
 [<e1227050>] tpmif_init+0x50/0x62 [tpm_xenu]
 [<c0143b08>] sys_init_module+0x148/0x1b40
 [<c01187fc>] do_page_fault+0x10c/0xc6f
 [<c010845e>] do_syscall_trace+0x1ee/0x205
 [<c01059bf>] syscall_call+0x7/0xb

In the DomUconfig file, I use vtpm = ['backend=0'].
But there is no vtpm device in Dom0 and DomU. See the following info.
The domU is PVM correct? You can also try just compiling in tpm_xenu instead of using it as a module.
Yes, it's DomU.
Now, I try vTPM in Xen-4.0.2, Dom0 and DomU are still with kernel 2.6.18.8. I can get the device /dev/tpm0 in DomU after modprobe tpm_xenu.
(Perhaps this problem has something to do with the hardware and the Xen version)

However, When I run tcsd in DomU, there is an error:
TCSD resetting mode of /usr/local/var/lib/tpm from 40755 to: 700
TCSD TDDL ioctl: (25) Inappropriate ioctl for device
TCSD TDDL Falling back to Read/Write device support.
TCSD TCS ERROR: TCS GetCapability failed with result = 0x9

Is this because vtpm_managerd is not running in Dom0 or physical TPM does not work well in Dom0?

What does the output of the vtpm say? You have to have the manager running before you start the domU otherwise it wont work.
Hi Matthew,

I don't think vtpm_managerd in Xen-4.0.2 can start on the tpm emulator. Because there's no code in the vtpmd (and its patch vtpm-0.5.1.patch) to create a fifo (#define TPM_TX_FNAME "/var/tpm/tpm_in.fifo") that needs to be shared by vtpm_managerd (tcs/transmit.c)

However, can I use the vtpmd code from Xen-3.4.4 in Xen-4.0.2? That version of vtpmd can create the fifo needed by vtpm_managerd.
I tried to use that version of vtpmd in Xen-4.0.2.  It seems tpm_emulator works well, but vtpm_managerd still cannot start to run. The output is as following. I think maybe it needs to change something in the code of vtpm_managerd.

[root@localhost tools]# vtpm_managerd 
INFO[VTPM]: Starting VTPM.
INFO[TCS]: Constructing new TCS:
INFO[TCS]: 
INFO[TCS]: Calling TCS_OpenContext:
INFO[VTSP]: OIAP.
INFO[VTSP]: Loading Key into TPM.
ERROR[TCS]: TCSP_LoadKeyByBlob Failed with return code TPM_INVALID_KEYHANDLE
ERROR in VTSP_LoadKey at vtsp.c:634 code: TPM_INVALID_KEYHANDLE.
ERROR in VTPM_LoadManagerData at securestorage.c:453 code: TPM_INVALID_KEYHANDLE.
ERROR[VTPM]: Failed to load service data with error = TPM_INVALID_KEYHANDLE
ERROR[VTPM]: Failed to read existing manager file


[root@localhost vtpm]# tpm_emulator clear
Initializing tpm: clear
TPMD: tpm/tpm_cmd_handler.c:4137: Debug: tpm_emulator_init()
TPMD: tpm/tpm_startup.c:30: Info: TPM_Init()
TPMD: tpm/tpm_testing.c:242: Info: TPM_SelfTestFull()
TPMD: tpm/tpm_testing.c:42: Debug: tpm_test_prng()
TPMD: tpm/tpm_testing.c:70: Debug: Monobit: 9995
TPMD: tpm/tpm_testing.c:71: Debug: Poker:   9.7
TPMD: tpm/tpm_testing.c:72: Debug: run_1:   2507, 2481
TPMD: tpm/tpm_testing.c:73: Debug: run_2:   1210, 1273
TPMD: tpm/tpm_testing.c:74: Debug: run_3:   659, 619
TPMD: tpm/tpm_testing.c:75: Debug: run_4:   310, 309
TPMD: tpm/tpm_testing.c:76: Debug: run_5:   145, 169
TPMD: tpm/tpm_testing.c:77: Debug: run_6+:  166, 147
TPMD: tpm/tpm_testing.c:78: Debug: run_34:  0
TPMD: tpm/tpm_testing.c:112: Debug: tpm_test_sha1()
TPMD: tpm/tpm_testing.c:156: Debug: tpm_test_hmac()
TPMD: tpm/tpm_testing.c:183: Debug: tpm_test_rsa_EK()
TPMD: tpm/tpm_testing.c:185: Debug: rsa_generate_key()
TPMD: tpm/tpm_testing.c:190: Debug: testing endorsement key
TPMD: tpm/tpm_testing.c:196: Debug: rsa_sign(RSA_SSA_PKCS1_SHA1)
TPMD: tpm/tpm_testing.c:199: Debug: rsa_verify(RSA_SSA_PKCS1_SHA1)
TPMD: tpm/tpm_testing.c:202: Debug: rsa_sign(RSA_SSA_PKCS1_DER)
TPMD: tpm/tpm_testing.c:205: Debug: rsa_verify(RSA_SSA_PKCS1_DER)
TPMD: tpm/tpm_testing.c:209: Debug: rsa_encrypt(RSA_ES_PKCSV15)
TPMD: tpm/tpm_testing.c:213: Debug: rsa_decrypt(RSA_ES_PKCSV15)
TPMD: tpm/tpm_testing.c:217: Debug: verify plain text
TPMD: tpm/tpm_testing.c:220: Debug: rsa_encrypt(RSA_ES_OAEP_SHA1)
TPMD: tpm/tpm_testing.c:224: Debug: rsa_decrypt(RSA_ES_OAEP_SHA1)
TPMD: tpm/tpm_testing.c:228: Debug: verify plain text
TPMD: tpm/tpm_testing.c:260: Info: Self-Test succeeded
TPMD: tpm/tpm_startup.c:45: Info: TPM_Startup(1)
Recv[14]: 0x0 c1 0 0 0 e 0 0 0 46 0 0 1 0 
TPMD: tpm/tpm_cmd_handler.c:4156: Debug: tpm_handle_command()
TPMD: tpm/tpm_cmd_handler.c:3467: Debug: [TPM_TAG_RQU_COMMAND]
TPMD: tpm/tpm_cmd_handler.c:3768: Debug: [TPM_ORD_GetRandom]
TPMD: tpm/tpm_crypto.c:159: Info: TPM_GetRandom()
TPMD: tpm/tpm_cmd_handler.c:4111: Info: TPM command succeeded
Sent[270]: 0 c4 0 0 1 e 0 0 0 0 0 0 1 0 17 d1 99 9b 5c 67 19 2b c0 7d 22 96 65 3a 84
3f ee 19 32 f2 db 7c d8 a7 3b ac 5d ad 62 db 6a 2c c3 c8 12 6f c2 3c 51 9c a1 81 76
7b fe 52 1c 50 5c 8d ac c9 6d f3 16 de 95 7e b1 52 2f c5 73 88 ce 7d bb f8 de 1 7a
6e 74 2e 29 2 fd 77 f4 7b 4a cb 36 34 a1 52 b2 31 25 dc 71 98 da a3 c3 94 b7 d0 32
82 7a 1d 6e cb a6 e8 c3 91 41 75 9a 58 90 2d f4 6d f4 38 2c 8e 5 f1 c3 c6 c9 7b 3 d7
1d f9 c 7b 4f d5 e5 b2 a6 a1 5c 41 b4 a7 b7 1 70 6d 9f 53 87 ca a9 62 c5 c7 26 19 f0
4d db 45 f fd 7e 5a 4e 39 34 6d 73 2b 3f 7f 27 b7 a7 ca bb 9b 35 ed 5c 57 fa 70 ec c
a9 c3 51 4 21 44 7d fd 7d bc b5 40 8 81 57 36 fa ea 83 34 3f d8 9c ca bd e 4c 44 99
5d cc c0 75 55 7e d8 e6 8d 98 7 a3 94 b4 2a f8 97 5b b7 b2 b0 f4 d2 34 5b d2 bb e1
d7 75 9d f8 d6 8a 87 75 61 82 f 48 24 
Recv[10]: 0x0 c1 0 0 0 a 0 0 0 a 
TPMD: tpm/tpm_cmd_handler.c:4156: Debug: tpm_handle_command()
TPMD: tpm/tpm_cmd_handler.c:3467: Debug: [TPM_TAG_RQU_COMMAND]
TPMD: tpm/tpm_cmd_handler.c:3863: Debug: [TPM_ORD_OIAP]
TPMD: tpm/tpm_authorization.c:182: Info: TPM_OIAP()
TPMD: tpm/tpm_cmd_handler.c:4111: Info: TPM command succeeded
Sent[34]: 0 c4 0 0 0 22 0 0 0 0 2 0 0 0 67 b6 9f ae 94 75 28 ef 8f b0 62 29 b7 1e 18
dc b8 35 53 8f 
Recv[618]: 0x0 c2 0 0 2 6a 0 0 0 20 40 0 0 0 1 1 0 0 0 14 0 0 0 0 1 0 0 0 1 0 3 0 1
0 0 0 c 0 0 8 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 1 0 ba bc 11 5b 90 50 db b 66 1b f4 81
64 72 eb 89 59 c3 27 a7 55 ea 16 c1 14 a0 96 45 20 94 f0 5 86 76 a1 40 1a d3 67 16
2d c9 73 32 e6 cf d5 ee e8 f5 1c f1 b5 9f 55 f7 6c d2 9b 98 32 ad e1 36 e5 2e fb c4
ac f6 8a aa c2 2d 72 dc ac fd af f5 c2 6e da db ab fb 53 fc 86 c1 33 c7 96 d2 1e da
f 50 2d ed 3a 66 f8 da db 2f 3d bb c3 b5 70 c3 9 83 bf e7 ba 44 5d 9f 22 29 b1 c5 40
cf 77 8b 5d d9 8c e0 1b 3b a2 c0 8c 51 d0 4f 8c ef d9 3a ea 17 a6 d5 88 aa a4 c4 77
27 d3 6 d9 38 c5 ba 91 a5 1b b6 10 ed 23 ac 1e dd f3 54 cf 1d 14 8b 59 1b 20 3b 13
40 4 74 39 c 72 18 b 12 fb b2 e2 9a 1d b5 34 19 be b7 e6 75 c3 c8 e4 ed 14 b0 24 31
45 f9 a1 a3 1c c4 a9 8d d5 57 49 95 a6 26 e8 3f eb 99 3e 86 26 a0 d0 5f 4 d b6 7 18
b5 81 70 73 86 2c 0 66 f5 75 96 e0 c3 33 c8 64 ef 0 0 1 0 82 1 36 f6 be de be 82 57
4b a9 fd a9 ad a 1d af 1e 93 7a 94 86 50 b1 8b cd 2d ad 88 ef 37 a3 d3 d5 e2 54 43
6a 7b 11 69 99 ed 67 dd 11 cd a2 a9 ee 8e 7b e6 49 48 5 e8 b8 20 25 b8 a5 c7 84 e8
92 dd b5 fa 3c 67 a5 9c 7d 64 eb aa 2c 9d 36 5f f 53 81 d5 7b e2 7b 1f 26 49 73 1c
60 bd ca 8 7e 4d 2e dd a8 fa ba a5 2d 52 e2 a7 4b 6e b7 95 70 31 57 6d 66 d8 d 72 af
10 e 9f 9b 71 db df 9b 27 fb 9e e4 75 35 e5 34 b3 ff 3e 98 40 b1 a 63 6f 67 e6 8b 9c
4 5d c8 3a a2 63 fa 43 7a df 31 f8 24 db 75 f8 d9 af 8b 26 e 2c e9 e7 f9 97 af 1b 80
db 9b 88 28 8e 9e 2c a0 97 a4 9d ea b9 a7 7f b1 0 dc 61 6a 5e b2 a2 8f da 68 8e 5b
e0 f8 5e 33 11 72 bf 4f d0 5b 44 c8 a 78 b1 27 6d d 50 2f af 5a ba 8b 8 6e 96 8b 27
5a c7 74 2d 66 7c 12 3 22 63 fe 62 f8 72 de be 3b af 77 2 0 0 0 cf 4e 6f 5a 4a 47 50
4 22 7a 51 1c 99 71 f9 90 b3 fc 2d db 1 e5 43 f4 9 ca 8f e5 53 93 9d e5 9c 3 da 3c
f3 2f fa 39 a1 
TPMD: tpm/tpm_cmd_handler.c:4156: Debug: tpm_handle_command()
TPMD: tpm/tpm_cmd_handler.c:3460: Debug: [TPM_TAG_RQU_AUTH1_COMMAND]
TPMD: tpm/tpm_cmd_handler.c:3648: Debug: [TPM_ORD_LoadKey]
TPMD: tpm/tpm_storage.c:526: Info: TPM_LoadKey()
TPMD: tpm/tpm_storage.c:528: Debug: [ parentHandle=40000000 ]
TPMD: tpm/tpm_cmd_handler.c:4104: Info: TPM command failed: (0x0c) The key handle
presented was invalid.
TPMD: tpm/tpm_eviction.c:56: Info: TPM_FlushSpecific()
TPMD: tpm/tpm_eviction.c:57: Debug: [ handle=02000000 resourceType=00000002 ]
Sent[10]: 0 c4 0 0 0 a 0 0 0 c 
Recv[0] to small: 0xRecv[14]: 0x0 c1 0 0 0 e 0 0 0 46 0 0 1 0 
TPMD: tpm/tpm_cmd_handler.c:4156: Debug: tpm_handle_command()
TPMD: tpm/tpm_cmd_handler.c:3467: Debug: [TPM_TAG_RQU_COMMAND]
TPMD: tpm/tpm_cmd_handler.c:3768: Debug: [TPM_ORD_GetRandom]
TPMD: tpm/tpm_crypto.c:159: Info: TPM_GetRandom()
TPMD: tpm/tpm_cmd_handler.c:4111: Info: TPM command succeeded
Sent[270]: 0 c4 0 0 1 e 0 0 0 0 0 0 1 0 c6 f4 37 65 55 c1 d7 7d 12 1 86 7b 6d 29 84
79 c 12 74 c6 65 3c a4 fd ff 88 79 13 99 67 24 da d2 4 b fc 7e f a7 2b 50 cf aa 2a
64 b0 e4 3c d3 2 54 a8 56 ec ff 88 af 62 4 14 db 12 8 b0 23 c3 77 8c 4f 5b 69 65 0 c
e0 1e 13 45 63 12 a2 4d 4d 5e f9 65 60 e8 a1 41 96 a8 a8 90 13 cb e5 e8 71 61 80 8f
7f b1 a1 3 ae dd a9 ec 83 96 f2 0 7e 1f ad 5f 8c 80 85 67 c5 c1 42 41 5f ac 62 89 61
52 25 73 8 3 a9 e2 d5 8b f3 67 3b e3 c0 61 ec af 2 4f 92 78 86 8 e1 3b 48 57 29 2e
f2 2d 23 b6 e7 8e 52 c2 50 e6 97 13 1b 23 59 7e ab e3 92 db 42 72 b6 12 76 64 ee 29
70 d 36 41 f1 83 3a dd 54 65 8a 64 85 2c c3 d c1 1f 9b a0 ba 95 51 ed 98 b0 9f cc 60
db f1 3f 93 b2 21 90 6 b d1 b0 a8 22 38 4d 9f 89 12 94 1c 3e 96 84 a3 e5 6c eb b0 ec
74 f4 ef 2e 1d 23 95 35 61 20 
Recv[10]: 0x0 c1 0 0 0 a 0 0 0 a 
TPMD: tpm/tpm_cmd_handler.c:4156: Debug: tpm_handle_command()
TPMD: tpm/tpm_cmd_handler.c:3467: Debug: [TPM_TAG_RQU_COMMAND]
TPMD: tpm/tpm_cmd_handler.c:3863: Debug: [TPM_ORD_OIAP]
TPMD: tpm/tpm_authorization.c:182: Info: TPM_OIAP()
TPMD: tpm/tpm_cmd_handler.c:4111: Info: TPM command succeeded
Sent[34]: 0 c4 0 0 0 22 0 0 0 0 2 0 0 0 75 5d b3 d2 fd 85 ef 5b 21 23 6f 77 d0 23 79
b4 7b d2 ba 6a 
Recv[618]: 0x0 c2 0 0 2 6a 0 0 0 20 40 0 0 0 1 1 0 0 0 14 0 0 0 0 1 0 0 0 1 0 3 0 1
0 0 0 c 0 0 8 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 1 0 ba bc 11 5b 90 50 db b 66 1b f4 81
64 72 eb 89 59 c3 27 a7 55 ea 16 c1 14 a0 96 45 20 94 f0 5 86 76 a1 40 1a d3 67 16
2d c9 73 32 e6 cf d5 ee e8 f5 1c f1 b5 9f 55 f7 6c d2 9b 98 32 ad e1 36 e5 2e fb c4
ac f6 8a aa c2 2d 72 dc ac fd af f5 c2 6e da db ab fb 53 fc 86 c1 33 c7 96 d2 1e da
f 50 2d ed 3a 66 f8 da db 2f 3d bb c3 b5 70 c3 9 83 bf e7 ba 44 5d 9f 22 29 b1 c5 40
cf 77 8b 5d d9 8c e0 1b 3b a2 c0 8c 51 d0 4f 8c ef d9 3a ea 17 a6 d5 88 aa a4 c4 77
27 d3 6 d9 38 c5 ba 91 a5 1b b6 10 ed 23 ac 1e dd f3 54 cf 1d 14 8b 59 1b 20 3b 13
40 4 74 39 c 72 18 b 12 fb b2 e2 9a 1d b5 34 19 be b7 e6 75 c3 c8 e4 ed 14 b0 24 31
45 f9 a1 a3 1c c4 a9 8d d5 57 49 95 a6 26 e8 3f eb 99 3e 86 26 a0 d0 5f 4 d b6 7 18
b5 81 70 73 86 2c 0 66 f5 75 96 e0 c3 33 c8 64 ef 0 0 1 0 82 1 36 f6 be de be 82 57
4b a9 fd a9 ad a 1d af 1e 93 7a 94 86 50 b1 8b cd 2d ad 88 ef 37 a3 d3 d5 e2 54 43
6a 7b 11 69 99 ed 67 dd 11 cd a2 a9 ee 8e 7b e6 49 48 5 e8 b8 20 25 b8 a5 c7 84 e8
92 dd b5 fa 3c 67 a5 9c 7d 64 eb aa 2c 9d 36 5f f 53 81 d5 7b e2 7b 1f 26 49 73 1c
60 bd ca 8 7e 4d 2e dd a8 fa ba a5 2d 52 e2 a7 4b 6e b7 95 70 31 57 6d 66 d8 d 72 af
10 e 9f 9b 71 db df 9b 27 fb 9e e4 75 35 e5 34 b3 ff 3e 98 40 b1 a 63 6f 67 e6 8b 9c
4 5d c8 3a a2 63 fa 43 7a df 31 f8 24 db 75 f8 d9 af 8b 26 e 2c e9 e7 f9 97 af 1b 80
db 9b 88 28 8e 9e 2c a0 97 a4 9d ea b9 a7 7f b1 0 dc 61 6a 5e b2 a2 8f da 68 8e 5b
e0 f8 5e 33 11 72 bf 4f d0 5b 44 c8 a 78 b1 27 6d d 50 2f af 5a ba 8b 8 6e 96 8b 27
5a c7 74 2d 66 7c 12 3 22 63 fe 62 f8 72 de be 3b af 77 2 0 0 0 31 ec ee 35 32 51 b0
30 84 5d 12 5f 93 a0 ff ac 5d 66 5 2b 1 ca 51 db 20 6e 69 51 25 d1 f1 8d 26 16 70 26
d1 ca bc 49 26 
TPMD: tpm/tpm_cmd_handler.c:4156: Debug: tpm_handle_command()
TPMD: tpm/tpm_cmd_handler.c:3460: Debug: [TPM_TAG_RQU_AUTH1_COMMAND]
TPMD: tpm/tpm_cmd_handler.c:3648: Debug: [TPM_ORD_LoadKey]
TPMD: tpm/tpm_storage.c:526: Info: TPM_LoadKey()
TPMD: tpm/tpm_storage.c:528: Debug: [ parentHandle=40000000 ]
TPMD: tpm/tpm_cmd_handler.c:4104: Info: TPM command failed: (0x0c) The key handle
presented was invalid.
TPMD: tpm/tpm_eviction.c:56: Info: TPM_FlushSpecific()
TPMD: tpm/tpm_eviction.c:57: Debug: [ handle=02000000 resourceType=00000002 ]
Sent[10]: 0 c4 0 0 0 a 0 0 0 c 
Recv[0] to small: 0xRecv[14]: 0x0 c1 0 0 0 e 0 0 0 46 0 0 1 0 
TPMD: tpm/tpm_cmd_handler.c:4156: Debug: tpm_handle_command()
TPMD: tpm/tpm_cmd_handler.c:3467: Debug: [TPM_TAG_RQU_COMMAND]
TPMD: tpm/tpm_cmd_handler.c:3768: Debug: [TPM_ORD_GetRandom]
TPMD: tpm/tpm_crypto.c:159: Info: TPM_GetRandom()
TPMD: tpm/tpm_cmd_handler.c:4111: Info: TPM command succeeded
Sent[270]: 0 c4 0 0 1 e 0 0 0 0 0 0 1 0 1b 40 4a bf 9e 23 1a 91 7c 4f c7 a5 3d 7e ac
4d db 23 28 f2 56 d6 52 e 5c 17 d7 f1 cb ad 57 8d 23 45 7b a8 6e 48 22 e3 a e3 aa 2a
65 61 6d e7 70 f2 a e7 c6 35 ff 3d cd d9 a 6c 4c 1a 66 c3 bc d5 ec 4a fb 77 31 81 48
d9 51 ce 70 c8 65 12 b2 a5 e5 f1 a6 fa d4 c9 48 4a 6d c3 4e 16 de 74 48 27 77 70 32
e3 c7 65 21 51 d2 c3 7c 21 d 8c dd eb 86 d6 46 fc ca e2 d8 11 41 48 ff 7c 3b e4 af
4e dc f4 66 d9 8d 8c 2b 47 a0 3e f2 f0 4d 28 94 1b 55 a2 c9 dc 41 60 df 4a f5 40 86
5 1 83 8f 1b ee 60 26 c1 70 3e 6d 2b 1e 38 d6 ec 81 9a a3 87 34 13 6c 8 c6 99 7a cc
2a e0 1f 54 f3 78 4c e3 c2 a2 5d 22 65 b1 65 7f d4 4 47 6 72 17 47 ef 71 b ce d7 a1
f5 df dd f 2f f8 54 41 ff d6 28 57 35 c8 f8 9a e9 35 e4 85 72 af e0 8a 9f 8 c2 13 54
86 75 3 74 7c 65 d8 1a 9b ff a6 87 
Recv[10]: 0x0 c1 0 0 0 a 0 0 0 a 
TPMD: tpm/tpm_cmd_handler.c:4156: Debug: tpm_handle_command()
TPMD: tpm/tpm_cmd_handler.c:3467: Debug: [TPM_TAG_RQU_COMMAND]
TPMD: tpm/tpm_cmd_handler.c:3863: Debug: [TPM_ORD_OIAP]
TPMD: tpm/tpm_authorization.c:182: Info: TPM_OIAP()
TPMD: tpm/tpm_cmd_handler.c:4111: Info: TPM command succeeded
Sent[34]: 0 c4 0 0 0 22 0 0 0 0 2 0 0 0 23 e1 c5 fe d5 78 d3 1f 60 9d b5 ad d0 71 2c
80 7 aa 9f bb 
Recv[618]: 0x0 c2 0 0 2 6a 0 0 0 20 40 0 0 0 1 1 0 0 0 14 0 0 0 0 1 0 0 0 1 0 3 0 1
0 0 0 c 0 0 8 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 1 0 ba bc 11 5b 90 50 db b 66 1b f4 81
64 72 eb 89 59 c3 27 a7 55 ea 16 c1 14 a0 96 45 20 94 f0 5 86 76 a1 40 1a d3 67 16
2d c9 73 32 e6 cf d5 ee e8 f5 1c f1 b5 9f 55 f7 6c d2 9b 98 32 ad e1 36 e5 2e fb c4
ac f6 8a aa c2 2d 72 dc ac fd af f5 c2 6e da db ab fb 53 fc 86 c1 33 c7 96 d2 1e da
f 50 2d ed 3a 66 f8 da db 2f 3d bb c3 b5 70 c3 9 83 bf e7 ba 44 5d 9f 22 29 b1 c5 40
cf 77 8b 5d d9 8c e0 1b 3b a2 c0 8c 51 d0 4f 8c ef d9 3a ea 17 a6 d5 88 aa a4 c4 77
27 d3 6 d9 38 c5 ba 91 a5 1b b6 10 ed 23 ac 1e dd f3 54 cf 1d 14 8b 59 1b 20 3b 13
40 4 74 39 c 72 18 b 12 fb b2 e2 9a 1d b5 34 19 be b7 e6 75 c3 c8 e4 ed 14 b0 24 31
45 f9 a1 a3 1c c4 a9 8d d5 57 49 95 a6 26 e8 3f eb 99 3e 86 26 a0 d0 5f 4 d b6 7 18
b5 81 70 73 86 2c 0 66 f5 75 96 e0 c3 33 c8 64 ef 0 0 1 0 82 1 36 f6 be de be 82 57
4b a9 fd a9 ad a 1d af 1e 93 7a 94 86 50 b1 8b cd 2d ad 88 ef 37 a3 d3 d5 e2 54 43
6a 7b 11 69 99 ed 67 dd 11 cd a2 a9 ee 8e 7b e6 49 48 5 e8 b8 20 25 b8 a5 c7 84 e8
92 dd b5 fa 3c 67 a5 9c 7d 64 eb aa 2c 9d 36 5f f 53 81 d5 7b e2 7b 1f 26 49 73 1c
60 bd ca 8 7e 4d 2e dd a8 fa ba a5 2d 52 e2 a7 4b 6e b7 95 70 31 57 6d 66 d8 d 72 af
10 e 9f 9b 71 db df 9b 27 fb 9e e4 75 35 e5 34 b3 ff 3e 98 40 b1 a 63 6f 67 e6 8b 9c
4 5d c8 3a a2 63 fa 43 7a df 31 f8 24 db 75 f8 d9 af 8b 26 e 2c e9 e7 f9 97 af 1b 80
db 9b 88 28 8e 9e 2c a0 97 a4 9d ea b9 a7 7f b1 0 dc 61 6a 5e b2 a2 8f da 68 8e 5b
e0 f8 5e 33 11 72 bf 4f d0 5b 44 c8 a 78 b1 27 6d d 50 2f af 5a ba 8b 8 6e 96 8b 27
5a c7 74 2d 66 7c 12 3 22 63 fe 62 f8 72 de be 3b af 77 2 0 0 0 16 c4 31 17 c6 e2 d1
7b 6e 7d 37 f 45 6a a8 40 53 c9 b8 23 1 c d9 6f 49 c4 bc 38 68 e4 e2 8b 36 cd 22 35
66 ee 54 d 23 
TPMD: tpm/tpm_cmd_handler.c:4156: Debug: tpm_handle_command()
TPMD: tpm/tpm_cmd_handler.c:3460: Debug: [TPM_TAG_RQU_AUTH1_COMMAND]
TPMD: tpm/tpm_cmd_handler.c:3648: Debug: [TPM_ORD_LoadKey]
TPMD: tpm/tpm_storage.c:526: Info: TPM_LoadKey()
TPMD: tpm/tpm_storage.c:528: Debug: [ parentHandle=40000000 ]
TPMD: tpm/tpm_cmd_handler.c:4104: Info: TPM command failed: (0x0c) The key handle
presented was invalid.
TPMD: tpm/tpm_eviction.c:56: Info: TPM_FlushSpecific()
TPMD: tpm/tpm_eviction.c:57: Debug: [ handle=02000000 resourceType=00000002 ]
Sent[10]: 0 c4 0 0 0 a 0 0 0 c 




Thank you very much.

-- 
Best Regards,
Gavin


 

 


Dom0:
[root@localhost fc8_new]# ls /sys/devices/xen-backend/
console-3-0  power  uevent  vbd-3-2049  vfb-3-0  vif-3-0  vkbd-3-0

DomU:
[root@gavin-pv tpm]# ls /sys/devices/xen
power  uevent  vbd-2049  vfb-0  vif-0  vkbd-0

 

2. In Dom0, I run "modprobe tpmd_dev" and "modprobe tpmbk" also successfully and I can get the devices /dev/tpm, /dev/tpm0, and /dev/vtpm. However, I cannot start the tpm emulator (# ./tpmd -f clear pvm 1) and vtpm manager (# vtpm_managerd). The related info and output error from Dom0 is also list here.
So you want to use the TPM emulator on dom0 instead of a physical TPM?
Yes, I try to use TPM emulator right now.
In fact, there is a physical TPM chip in my laptop. But I'm not sure how to make it work in fedora8. So, when the vTPM works well on emulator, I will try to abandon the emulator and use the physical TPM.
In that case you might want to make sure  the TPM is disabled in the BIOS if you want to use the emulator. Your dom0 kernel might have tpm drivers built in which could cause a possible conflict with the emulator.

Using the tpm emulator in dom0 has its own collection of issues. You might want to get the physical tpm working first and then play with vtpms. We used TPM successfully on Fedora 8.

Try this:
Reboot your machine and get into the bios. Clear the TPM and then activiate it. You might not have that option to clear if its disabled, in that case just activiate it. In fedora install trousers and tpm_tools. Start tcsd and try tpm_version or some other command to ensure your TPM is working. If not, make sure all of the TPM drivers are either compiled into the kernel or loaded as modules.
Now, I try to use physical TPM directly instead of an emulator. I try to make the physical TPM work firstly. I did what you suggested above, but I still encountered some problems.
The TPM relevant modules in Dom0 are loaded like this.

modprobe tpm_bios
modprobe tpm
modprobe tpm_tis force=1

Then, I got the /dev/tpm0.
However, I cannot start tcsd and vtpm_managerd in Dom0. The output is as the following.

[root@localhost Xen]# tcsd -f
TCSD TDDL ioctl: (25) Inappropriate ioctl for device
TCSD TDDL Falling back to Read/Write device support.
TCSD TDDL ERROR: read from device /dev/tpm0 failed: Input/output error
TCSD TCS ERROR: TCS GetCapability failed with result = 0x1087

[root@localhost vtpm_manager]# vtpm_managerd
INFO[VTPM]: Starting VTPM.
INFO[TCS]: Constructing new TCS:
INFO[TCS]: Calling TCS_OpenContext:
ERROR[TXDATA]: read() failed*** ERRORDIE in TDDL_TransmitData at transmit.c: 89
ERROR in VTPM_Init_Manager at vtpm_manager.c:215 code: TPM_FAIL.
ERROR[VTPM]: Closing vtpmd due to error during startup.


I searched in google for a while, but I still cannot resolve it. 
Do you have any suggestions on these problems? Thanks in advance.
You can't run tcsd and vtpm manager at the same time. Only use tcsd to test if your tpm if working and then kill the process and disable it from starting on boot (chkconfig tcsd off). Make sure tcsd is not already running in the background before you try running it yourself (ps -ef | grep tcsd). If you try 2 instances of tcsd it will fail.

 


 

I see you listed /dev/tpm and /dev/tpm0. I believe the old manager is hard coded to use the second one. Is tpmd creating both?
Yes. When modprobe the tpmd_dev module, these two devices are created.


Thanks again.

 


[root@localhost tpmd]# lsmod | grep tpm
tpmd_dev               10416  0 
tpmbk                     19516  0 [permanent]
[root@localhost tpmd]# ./tpmd -f clear pvm 1
VTPMD[0]: tpmd.c:766: Info: starting TPM Emulator daemon
VTPMD[0]: tpmd.c:369: Info: parsing options
VTPMD[1]: tpmd.c:478: Info: openening random device /dev/urandom
VTPMD[1]: tpmd.c:621: Info: staring main loop
Loading NVM.
Error in read_from_file:301
VTPMD[1]: ../tpm/tpm_data.c:83: Info: initializing TPM data to default values
VTPMD[1]: ../tpm/tpm_startup.c:30: Info: TPM_Init()
VTPMD[1]: ../tpm/tpm_testing.c:242: Info: TPM_SelfTestFull()
VTPMD[1]: ../tpm/tpm_testing.c:260: Info: Self-Test succeeded
VTPMD[1]: ../tpm/tpm_startup.c:44: Info: TPM_Startup(1)
VTPMD[1]: tpmd.c:661: Error: Failed to open devices to listen to guest.



[root@localhost vtpm]# vtpm_managerd
INFO[VTPM]: Starting VTPM.
INFO[TCS]: Constructing new TCS:
ERROR[TXDATA]: TPM open failedERROR in VTPM_Init_Manager at vtpm_manager.c:205 code:
TPM_IOERROR.
ERROR[VTPM]: Closing vtpmd due to error during startup.


Thanks in advance for your any reply.

--
Best Regards,
Gavin




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel




Keep in mind that the old vTPM system is deprecated and I can only provide limited support. If you can't get it to work I would suggest pulling the latest xen-unstable and my latest patch set on here and trying to use that.
Well, it's very nice. I think maybe I need to try it later.



--
Best Regards,
Gavin


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.