[libvirt PATCH 2/3] qemu: fill in domain capabilities for TPMs

Peter Krempa pkrempa at redhat.com
Wed Nov 24 11:03:33 UTC 2021


On Wed, Nov 24, 2021 at 11:51:29 +0100, Michal Prívozník wrote:
> On 11/24/21 10:10, Peter Krempa wrote:
> > On Tue, Nov 23, 2021 at 18:04:07 +0000, Daniel P. Berrangé wrote:
> >> This reports what TPM features QEMU supports, provided that swtpm is
> >> installed in the host.
> >>
> >> Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> >> ---
> > 
> > [...]
> > 
> >> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> >> index a4c492dde2..374909bef2 100644
> >> --- a/src/qemu/qemu_capabilities.c
> >> +++ b/src/qemu/qemu_capabilities.c

[...]

> > diff --git a/tests/domaincapsdata/qemu_2.11.0.s390x.xml b/tests/domaincapsdata/qemu_2.11.0.s390x.xml
> > index 804bf8020e..f76624ffc8 100644
> > --- a/tests/domaincapsdata/qemu_2.11.0.s390x.xml
> > +++ b/tests/domaincapsdata/qemu_2.11.0.s390x.xml
> > @@ -205,7 +205,12 @@
> >          <value>handle</value>
> >        </enum>
> >      </filesystem>
> > -    <tpm supported='no'/>
> > +    <tpm supported='yes'>
> > +      <enum name='model'/>
> > +      <enum name='backendModel'>
> > +        <value>emulator</value>
> > +      </enum>
> > +    </tpm>
> >    </devices>
> >    <features>
> >      <gic supported='no'/>
> > 
> > Does it even make sense to show that TPM is supported?
> 
> I think it does. Because domain capabilities XML is not QEMU specific.
> If 'virsh domcapabilities' was ran against say LXC it wouldn't show TPM.
> Or am I misunderstanding your question?

I was pointing to the fact that if the given qemu doesn't support any
TPM frontend (as witnessed by the empty 'model') then it probably
doesn't make sense to say that TPM is actually supported.




More information about the libvir-list mailing list