Re: [libvirt] [PATCH v2 2/6] tpm: Add support for external swtpm TPM emulator

2018-04-27 Thread Stefan Berger
On 04/26/2018 08:07 PM, John Ferlan wrote: [...] Two blank lines between new functions and we like Free instead of Delete unless of course this is something more specific... This is something more specifc. The TPM emulator writes state into files in a dedicated directory. That state

Re: [libvirt] [PATCH v2 2/6] tpm: Add support for external swtpm TPM emulator

2018-04-26 Thread John Ferlan
On 04/26/2018 10:31 AM, Stefan Berger wrote: > On 04/26/2018 09:38 AM, Stefan Berger wrote: >> On 04/25/2018 01:13 PM, John Ferlan wrote: +virTPMCreateEmulatorSocket(const char *swtpmStateDir, const char *vmname) +{ +    char *path = NULL; + +   

Re: [libvirt] [PATCH v2 2/6] tpm: Add support for external swtpm TPM emulator

2018-04-26 Thread John Ferlan
[...] >>>   >> Two blank lines between new functions and we like Free instead of Delete >> unless of course this is something more specific... > > This is something more specifc. The TPM emulator writes state into files > in a dedicated directory. That state would normally be written into >

Re: [libvirt] [PATCH v2 2/6] tpm: Add support for external swtpm TPM emulator

2018-04-26 Thread Stefan Berger
On 04/26/2018 09:38 AM, Stefan Berger wrote: On 04/25/2018 01:13 PM, John Ferlan wrote: +virTPMCreateEmulatorSocket(const char *swtpmStateDir, const char *vmname) +{ +char *path = NULL; + +ignore_value(virAsprintf(, "%s/%s-swtpm.sock", swtpmStateDir, +

Re: [libvirt] [PATCH v2 2/6] tpm: Add support for external swtpm TPM emulator

2018-04-26 Thread Stefan Berger
On 04/25/2018 01:13 PM, John Ferlan wrote: On 04/10/2018 10:50 PM, Stefan Berger wrote: This patch adds support for an external swtpm TPM emulator. The XML for this type of TPM looks as follows: The XML will currently only start a TPM 1.2. Upon first start, libvirt will run

Re: [libvirt] [PATCH v2 2/6] tpm: Add support for external swtpm TPM emulator

2018-04-25 Thread John Ferlan
On 04/10/2018 10:50 PM, Stefan Berger wrote: > This patch adds support for an external swtpm TPM emulator. The XML for > this type of TPM looks as follows: > > > > > > The XML will currently only start a TPM 1.2. > > Upon first start, libvirt will run `swtpm_setup`, which will

[libvirt] [PATCH v2 2/6] tpm: Add support for external swtpm TPM emulator

2018-04-10 Thread Stefan Berger
This patch adds support for an external swtpm TPM emulator. The XML for this type of TPM looks as follows: The XML will currently only start a TPM 1.2. Upon first start, libvirt will run `swtpm_setup`, which will simulate the manufacturing of a TPM and create certificates for it and