Re: [PATCH v2 2/2] qemu: tpm: Extend TPM domain XML with PCR banks to activate

2021-11-04 Thread Stefan Berger
On 11/2/21 05:38, Michal Prívozník wrote: On 11/1/21 6:23 PM, Stefan Berger wrote: So this runs reconfigure on every cold boot of a guest. I wonder whether there's a way to run it just once, when activePcrBanks have changed. For instance, in qemuDomainDefineXMLFlags() the @oldDef is set to

Re: [PATCH v2 2/2] qemu: tpm: Extend TPM domain XML with PCR banks to activate

2021-11-03 Thread Daniel P . Berrangé
On Wed, Nov 03, 2021 at 09:07:11AM -0400, Stefan Berger wrote: > > On 11/2/21 05:57, Daniel P. Berrangé wrote: > > On Tue, Nov 02, 2021 at 10:38:05AM +0100, Michal Prívozník wrote: > > > > Yes, the golden rule of XML design is that you should not have to write > > a second parser to interpret

Re: [PATCH v2 2/2] qemu: tpm: Extend TPM domain XML with PCR banks to activate

2021-11-03 Thread Stefan Berger
On 11/2/21 05:57, Daniel P. Berrangé wrote: On Tue, Nov 02, 2021 at 10:38:05AM +0100, Michal Prívozník wrote: Yes, the golden rule of XML design is that you should not have to write a second parser to interpret the value of an attribute / element. Any structure should be represented in the

Re: [PATCH v2 2/2] qemu: tpm: Extend TPM domain XML with PCR banks to activate

2021-11-02 Thread Stefan Berger
On 11/2/21 04:43, Marc-André Lureau wrote: Hi On Mon, Nov 1, 2021 at 9:23 PM Stefan Berger wrote: Extend the TPM domain XML with an attribute active_pcr_banks that allows a user to specify the PCR banks to activate before starting a VM. A comma- separated list of PCR banks with the choices

Re: [PATCH v2 2/2] qemu: tpm: Extend TPM domain XML with PCR banks to activate

2021-11-02 Thread Daniel P . Berrangé
On Tue, Nov 02, 2021 at 10:38:05AM +0100, Michal Prívozník wrote: > On 11/1/21 6:23 PM, Stefan Berger wrote: > > Extend the TPM domain XML with an attribute active_pcr_banks that allows > > a user to specify the PCR banks to activate before starting a VM. A comma- > > separated list of PCR banks

Re: [PATCH v2 2/2] qemu: tpm: Extend TPM domain XML with PCR banks to activate

2021-11-02 Thread Michal Prívozník
On 11/1/21 6:23 PM, Stefan Berger wrote: > Extend the TPM domain XML with an attribute active_pcr_banks that allows > a user to specify the PCR banks to activate before starting a VM. A comma- > separated list of PCR banks with the choices of sha1, sha256, sha384 and > sha512 is allowed. When the

Re: [PATCH v2 2/2] qemu: tpm: Extend TPM domain XML with PCR banks to activate

2021-11-02 Thread Marc-André Lureau
Hi On Mon, Nov 1, 2021 at 9:23 PM Stefan Berger wrote: > > Extend the TPM domain XML with an attribute active_pcr_banks that allows > a user to specify the PCR banks to activate before starting a VM. A comma- > separated list of PCR banks with the choices of sha1, sha256, sha384 and > sha512 is

[PATCH v2 2/2] qemu: tpm: Extend TPM domain XML with PCR banks to activate

2021-11-01 Thread Stefan Berger
Extend the TPM domain XML with an attribute active_pcr_banks that allows a user to specify the PCR banks to activate before starting a VM. A comma- separated list of PCR banks with the choices of sha1, sha256, sha384 and sha512 is allowed. When the XML attribute is provided, the set of active PCR