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

Re: [Xen-devel] [PATCH VTPM 1/9] Disable -DGNT_DEBUG and -DGNTMAP_DEBUG



The tpm front/back driver maps and unmaps a grant reference everytime it sends a message. I'm not sure this is the most efficient design choice but that's what the linux tpm driver did so I followed it. I'd like to consider redesigning the driver at some point but right now I don't have time.

Compare the outputs of vtpmmgrdom below. Whats happening here is a vtpm connects to the manager, requests some entropy from the hardware tpm, loads its data and then saves its data.

Tpmback:Info Frontend 10/0 connected
INFO[VTPM]: Passthrough: TPM_GetRandom
INFO[VTPM]: Waiting for commands from vTPM's:
INFO[VTPM]: Passthrough: TPM_GetRandom
INFO[VTPM]: Waiting for commands from vTPM's:
INFO[TPM]: TPM_UnBind
INFO[VTPM]: Loaded hash and key for vtpm ac0a5b9e-cbe2-4c07-b43b-1d69e46fb839
INFO[VTPM]: Waiting for commands from vTPM's:
INFO[TPM]: TPM_Bind
INFO[VTPM]: Saved hash and key for vtpm ac0a5b9e-cbe2-4c07-b43b-1d69e46fb839
INFO[VTPM]: Waiting for commands from vTPM's:


gntmap_map_grant_refs(map=0x46378, count=1, domids=0x11fd4c [13...], domids_stride=0, refs=0x11fd48 [2047...], writable=3)
gntmap_set_max_grants(map=0x46378, count=128)
Tpmback:Info Frontend 13/0 connected
gntmap_map_grant_refs(map=0x46378, count=1, domids=0x10de94 [13...], domids_stride=0, refs=0x2006008 [2046...], writable=1)
gntmap_set_max_grants(map=0x46378, count=128)
gntmap_munmap(map=0x46378, start_address=2007000, count=1)
INFO[VTPM]: Passthrough: TPM_GetRandom
gntmap_map_grant_refs(map=0x46378, count=1, domids=0x10dec4 [13...], domids_stride=0, refs=0x2006008 [2046...], writable=2)
gntmap_set_max_grants(map=0x46378, count=128)
gntmap_munmap(map=0x46378, start_address=2007000, count=1)
INFO[VTPM]: Waiting for commands from vTPM's:
gntmap_map_grant_refs(map=0x46378, count=1, domids=0x10de94 [13...], domids_stride=0, refs=0x2006008 [2046...], writable=1)
gntmap_set_max_grants(map=0x46378, count=128)
gntmap_munmap(map=0x46378, start_address=2007000, count=1)
INFO[VTPM]: Passthrough: TPM_GetRandom
gntmap_map_grant_refs(map=0x46378, count=1, domids=0x10dec4 [13...], domids_stride=0, refs=0x2006008 [2046...], writable=2)
gntmap_set_max_grants(map=0x46378, count=128)
gntmap_munmap(map=0x46378, start_address=2007000, count=1)
INFO[VTPM]: Waiting for commands from vTPM's:
gntmap_map_grant_refs(map=0x46378, count=1, domids=0x10de94 [13...], domids_stride=0, refs=0x2006008 [2045...], writable=1)
gntmap_set_max_grants(map=0x46378, count=128)
gntmap_munmap(map=0x46378, start_address=2007000, count=1)
INFO[TPM]: TPM_UnBind
INFO[VTPM]: Loaded hash and key for vtpm ac0a5b9e-cbe2-4c07-b43b-1d69e46fb839 gntmap_map_grant_refs(map=0x46378, count=1, domids=0x10dec4 [13...], domids_stride=0, refs=0x2006008 [2045...], writable=2)
gntmap_set_max_grants(map=0x46378, count=128)
gntmap_munmap(map=0x46378, start_address=2007000, count=1)
INFO[VTPM]: Waiting for commands from vTPM's:
gntmap_map_grant_refs(map=0x46378, count=1, domids=0x10de94 [13...], domids_stride=0, refs=0x2006008 [2045...], writable=1)
gntmap_set_max_grants(map=0x46378, count=128)
gntmap_munmap(map=0x46378, start_address=2007000, count=1)
INFO[TPM]: TPM_Bind
INFO[VTPM]: Saved hash and key for vtpm ac0a5b9e-cbe2-4c07-b43b-1d69e46fb839
gntmap_map_grant_refs(map=0x46378, count=1, domids=0x10dec4 [13...], domids_stride=0, refs=0x2006008 [2045...], writable=2)
gntmap_set_max_grants(map=0x46378, count=128)
gntmap_munmap(map=0x46378, start_address=2007000, count=1)


I'm perfectly willing to accept that this is just my problem and the tpm driver should be fixed. But I also think it makes sense in general to leave debug defines turned off for default builds.


-----Original Message-----
From: Samuel Thibault [mailto:samuel.thibault@xxxxxxxxxxxx] Sent: Monday, November 05, 2012 6:35 PM
To: Fioravante, Matthew E.
Cc: Ian.Campbell@xxxxxxxxxx; xen-devel@xxxxxxxxxxxxx
Subject: Re: [PATCH VTPM 1/9] Disable -DGNT_DEBUG and -DGNTMAP_DEBUG

Fioravante, Matthew E., le Fri 02 Nov 2012 09:19:34 -0400, a écrit :
It happens in my vtpm domains because the drivers often create and release 
grant references. This patch isn't completely necessary. Do we want to have 
these debug prints in the default build?

Well, surely -DGNT_DEBUG doesn't produce any output :) We could however drop it, since it only adds overhead to check something that is supposed to be already working (and which is quite well tested nowadays).

About -DGNTMAP_DEBUG, which message are you getting printed a lot? Are you running out of references in gntmap_find_free_entry, or using gntmap_map_grant_refs a lot?

Samuel

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

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

 


Rackspace

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