<div dir="ltr"><div dir="ltr">On Thu, Jun 20, 2019 at 11:20 AM Eric Fried <openstack@fried.cc> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Jim-<br>
<br>
> So, I'd like to propose we<br>
> implement TPM passthrough in Nova. My team is happy to do the work, but I'd<br>
> love some guidance as to the best way to implement this so we can get a spec<br>
> done (I assume it's "just another resource class"?).<br>
<br>
And by "just another resource class" you mean:<br>
<br>
- Add TPM to os-resource-classes (exact name subject to bikeshedding).<br>
- Virt driver's update_provider_tree() looks at the guts of the host to<br>
figure out how many TPM devices exist and, if nonzero, tacks an<br>
inventory of that many TPM onto the root provider (max_unit 1<br>
presumably; all others default).<br>
- Flavor desiring this thingy is authored with extra spec resources:TPM=1.<br>
- Scheduler lands instance on host with TPM inventory, and allocates<br>
one. (This is free, no additional code changes necessary.)<br>
- Virt driver's spawn() looks at the allocation, sees TPM:1, and<br>
augments the guest's domain XML to attach the thingy.<br>
<br>
Is it any more complicated than that?<br></blockquote><div><br></div><div>That makes sense to me. I don't know these bits well enough</div><div>to comment if there's anything else to do. Maybe choosing</div><div>the correct /dev/tpmN may get weird?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I'm fine with this.<br></blockquote><div><br></div><div>Cool, will attempt to get a spec going, unless violent</div><div>opposition shows up in this thread in the meantime.</div><div><br></div><div>Thanks!</div><div><br></div><div>// jim</div></div></div>