Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-11 Thread Jarkko Sakkinen
On Thu, Mar 10, 2016 at 12:32:15PM -0500, Stefan Berger wrote: > On 03/10/2016 11:39 AM, Jarkko Sakkinen wrote: > >+/* above flags */ > >+#define VTPM_FLAG_TPM2 1 /* emulator is TPM 2 */ > >+ > >+/* all supported flags */ > >+#define VTPM_FLAGS_ALL (VTPM_FLAG_TPM2) > >+ > >+#define VTPM

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-11 Thread Jarkko Sakkinen
On Thu, Mar 10, 2016 at 12:30:44PM -0500, Stefan Berger wrote: > > Some might want to use this in a way that the created virtual device > > is not closed when /dev/vtpmx is closed. > > I don't see that happening. If you want the device pair to stay around after > an application terminates, you hav

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-10 Thread Jason Gunthorpe
On Thu, Mar 10, 2016 at 06:39:15PM +0200, Jarkko Sakkinen wrote: > Some might want to use this in a way that the created virtual device > is not closed when /dev/vtpmx is closed. No, there is no reason to create an API like that - TPM's are stateful, one cannot close the server side and re-connect

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-10 Thread Stefan Berger
On 03/09/2016 09:57 PM, Andy Lutomirski wrote: On Wed, Mar 9, 2016 at 6:34 PM, Stefan Berger wrote: On 03/09/2016 01:01 PM, Andy Lutomirski wrote: On Wed, Mar 9, 2016 at 9:39 AM, Stefan Berger wrote: This patch implements a driver for supporting multiple emulated TPMs in a system. The drive

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-10 Thread Stefan Berger
On 03/10/2016 11:39 AM, Jarkko Sakkinen wrote: +/* above flags */ +#define VTPM_FLAG_TPM2 1 /* emulator is TPM 2 */ + +/* all supported flags */ +#define VTPM_FLAGS_ALL (VTPM_FLAG_TPM2) + +#define VTPM_TPM 0xa0 + +#define VTPM_NEW_DEV _IOW(VTPM_TPM, 0x00, struct vtpm_new_dev)

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-10 Thread Stefan Berger
> On Wed, Mar 09, 2016 at 12:39:27PM -0500, Stefan Berger wrote: > > This patch implements a driver for supporting multiple emulated TPMs in a > > system. > > > > The driver implements a device /dev/vtpmx that is used to created > > a client device pair /dev/tpmX (e.g., /dev/tpm10) and a server

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-10 Thread Jarkko Sakkinen
On Wed, Mar 09, 2016 at 12:39:27PM -0500, Stefan Berger wrote: > This patch implements a driver for supporting multiple emulated TPMs in a > system. > > The driver implements a device /dev/vtpmx that is used to created > a client device pair /dev/tpmX (e.g., /dev/tpm10) and a server side that > is

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-10 Thread Jarkko Sakkinen
On Wed, Mar 09, 2016 at 12:39:27PM -0500, Stefan Berger wrote: > This patch implements a driver for supporting multiple emulated TPMs in a > system. > > The driver implements a device /dev/vtpmx that is used to created > a client device pair /dev/tpmX (e.g., /dev/tpm10) and a server side that > is

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-09 Thread Andy Lutomirski
On Wed, Mar 9, 2016 at 6:34 PM, Stefan Berger wrote: > On 03/09/2016 01:01 PM, Andy Lutomirski wrote: >> >> On Wed, Mar 9, 2016 at 9:39 AM, Stefan Berger >> wrote: >>> >>> This patch implements a driver for supporting multiple emulated TPMs in a >>> system. >>> >>> The driver implements a device

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-09 Thread Stefan Berger
On 03/09/2016 01:01 PM, Andy Lutomirski wrote: On Wed, Mar 9, 2016 at 9:39 AM, Stefan Berger wrote: This patch implements a driver for supporting multiple emulated TPMs in a system. The driver implements a device /dev/vtpmx that is used to created a client device pair /dev/tpmX (e.g., /dev/tpm

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-09 Thread Andy Lutomirski
On Wed, Mar 9, 2016 at 9:39 AM, Stefan Berger wrote: > This patch implements a driver for supporting multiple emulated TPMs in a > system. > > The driver implements a device /dev/vtpmx that is used to created > a client device pair /dev/tpmX (e.g., /dev/tpm10) and a server side that > is accessed

[PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-09 Thread Stefan Berger
This patch implements a driver for supporting multiple emulated TPMs in a system. The driver implements a device /dev/vtpmx that is used to created a client device pair /dev/tpmX (e.g., /dev/tpm10) and a server side that is accessed using a file descriptor returned by an ioctl. The device /dev/tpm