Re: [Qemu-devel] [PATCH v2 0/4] tpm: add stubs to fix compiling with --disable-tpm

2017-10-24 Thread Amarnath Valluri
> v2: > - added Richard W.M. Jones Tested-by tag > - remove #ifdef CONFIG_TPM in tpm.c (Stefan Berger) > > Regards, > > Phil. > > PD: I missed Amarnath Valluri in my first series, you might want to add > yourself > a R: tag in MAINTAINTERS. > > Ph

[Qemu-devel] [PATCH v9 4/8] tpm-backend: Made few interface methods optional

2017-09-28 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Took the opportunity to remove unused methods: - tpm_backend_get_desc() - TPMDriverOps->handle_startup_error Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com>

[Qemu-devel] [PATCH v9 8/8] tpm: Added support for TPM emulator

2017-09-28 Thread Amarnath Valluri
\ [...] \ -chardev socket,id=chrtpm,path=/tmp/swtpm-sock \ -tpmdev emulator,id=tpm0,chardev=chrtpm \ -device tpm-tis,tpmdev=tpm0 \ [...] Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- configure | 13 +- hmp.c

[Qemu-devel] [PATCH v9 2/8] tpm-backend: Move thread handling inside TPMBackend

2017-09-28 Thread Amarnath Valluri
it. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c | 62 +--- hw/tpm/tpm_passthro

[Qemu-devel] [PATCH v9 5/8] tmp backend: Add new api to read backend TpmInfo

2017-09-28 Thread Amarnath Valluri
to return configured tpm options. A new tpm backend api - tpm_backend_query_tpm() which uses _get_tpm_options() to prepare TpmInfo. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c

[Qemu-devel] [PATCH v9 6/8] tpm-backend: Move realloc_buffer() implementation to tpm-tis model

2017-09-28 Thread Amarnath Valluri
buffer reallocation is very unlikely to be backend specific. Hence move inside the tis. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> -

[Qemu-devel] [PATCH v9 0/8] Provide support for the software TPM

2017-09-28 Thread Amarnath Valluri
comments maded by Stefan Berger ** Changes in v7: - rebased agianst latest master - Rewritten emulater backend using chardev backend ** Changes in v[89]: - Address review comments maded by Stefan Berger and Marc-Andre - Removed unneeded had_startup_error() method from TPMDriverOps Amarnath Valluri

[Qemu-devel] [PATCH v9 7/8] tpm-passthrough: move reusable code to utils

2017-09-28 Thread Amarnath Valluri
Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- hw/tpm/tpm_passthrough.c | 64 hw/tpm/tpm_

[Qemu-devel] [PATCH v9 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-09-28 Thread Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present. Signed-off-by: Amarnath Valluri <amarnath.v

[Qemu-devel] [PATCH v9 3/8] tpm-backend: Initialize and free data members in it's own methods

2017-09-28 Thread Amarnath Valluri
the backend object, hence removed destroy() from TPMDriverOps interface. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c

[Qemu-devel] [PATCH v8 4/8] tpm-backend: Made few interface methods optional

2017-09-27 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Took the opportunity to remove unused methods: - tpm_backend_get_desc() - TPMDriverOps->handle_startup_error Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com>

[Qemu-devel] [PATCH v8 5/8] tmp backend: Add new api to read backend TpmInfo

2017-09-27 Thread Amarnath Valluri
to return configured tpm options. A new tpm backend api - tpm_backend_query_tpm() which uses _get_tpm_options() to prepare TpmInfo. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c

[Qemu-devel] [PATCH v8 8/8] tpm: Added support for TPM emulator

2017-09-27 Thread Amarnath Valluri
\ [...] \ -chardev socket,id=chrtpm,path=/tmp/swtpm-sock \ -tpmdev emulator,id=tpm0,chardev=chrtpm \ -device tpm-tis,tpmdev=tpm0 \ [...] Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- configure | 13 +- hmp.c

[Qemu-devel] [PATCH v7 7/8] tpm-passthrough: move reusable code to utils

2017-09-22 Thread Amarnath Valluri
Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- hw/tpm/tpm_passthrough.c | 64 hw/tpm/tpm_

[Qemu-devel] [PATCH v7 8/8] tpm: Added support for TPM emulator

2017-09-22 Thread Amarnath Valluri
\ [...] \ -chardev socket,id=chrtpm,path=/tmp/swtpm-sock \ -tpmdev emulator,id=tpm0,chardev=chrtpm \ -device tpm-tis,tpmdev=tpm0 \ [...] Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- configure | 15 +- hmp.c | 5

[Qemu-devel] [PATCH v7 2/8] tpm-backend: Move thread handling inside TPMBackend

2017-09-22 Thread Amarnath Valluri
it. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c | 62 +--- hw/tpm/tpm_passthro

[Qemu-devel] [PATCH v7 5/8] tmp backend: Add new api to read backend TpmInfo

2017-09-22 Thread Amarnath Valluri
to return configured tpm options. A new tpm backend api - tpm_backend_query_tpm() which uses _get_tpm_options() to prepare TpmInfo. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c

[Qemu-devel] [PATCH v7 4/8] tpm-backend: Made few interface methods optional

2017-09-22 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Took the opportunity to remove unused tpm_backend_get_desc() method Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Marc-André Lureau <marc

[Qemu-devel] [PATCH v7 6/8] tpm-backend: Move realloc_buffer() implementation to tpm-tis model

2017-09-22 Thread Amarnath Valluri
buffer reallocation is very unlikely to be backend specific. Hence move inside the tis. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> -

[Qemu-devel] [PATCH v7 0/8] Provide support for the software TPM emulator

2017-09-22 Thread Amarnath Valluri
comments maded by Stefan Berger ** Changes in v7: - rebased agianst latest master - Rewritten emulater backend using chardev backend Amarnath Valluri (8): tpm-backend: Remove unneeded member variable from backend class tpm-backend: Move thread handling inside TPMBackend tpm-backend: Initialize

[Qemu-devel] [PATCH v7 3/8] tpm-backend: Initialize and free data members in it's own methods

2017-09-22 Thread Amarnath Valluri
the backend object, hence removed destroy() from TPMDriverOps interface. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c

[Qemu-devel] [PATCH v7 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-09-22 Thread Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present. Signed-off-by: Amarnath Valluri <amarnath.v

Re: [Qemu-devel] [PATCH v6 8/8] tpm: Added support for TPM emulator

2017-07-25 Thread Amarnath Valluri
On Tue, 2017-07-25 at 20:18 -0400, Stefan Berger wrote: > On 07/18/2017 04:49 AM, Amarnath Valluri wrote: > > diff --git a/hw/tpm/Makefile.objs b/hw/tpm/Makefile.objs > > index 64cecc3..41f0b7a 100644 > > --- a/hw/tpm/Makefile.objs > > +++ b/hw/tpm/Makefile.objs >

Re: [Qemu-devel] [PATCH v6 8/8] tpm: Added support for TPM emulator

2017-07-21 Thread Amarnath Valluri
On Tue, 2017-07-18 at 05:08 -0700, Marc-André Lureau wrote: > Hi > > On Tue, Jul 18, 2017 at 1:49 AM, Amarnath Valluri > <amarnath.vall...@intel.com> wrote: > > This change introduces a new TPM backend driver that can communicate with > > swtpm(software TPM emul

Re: [Qemu-devel] [PATCH v6 4/8] tpm-backend: Made few interface methods optional

2017-07-21 Thread Amarnath Valluri
On Tue, 2017-07-18 at 10:15 +, Marc-André Lureau wrote: > Hi > > On Tue, Jul 18, 2017 at 10:48 AM Amarnath Valluri > <amarnath.vall...@intel.com> wrote: > > This allows backend implementations left optional interface > methods. > For mand

Re: [Qemu-devel] [PATCH v6 5/8] tmp backend: Add new api to read backend TpmInfo

2017-07-21 Thread Amarnath Valluri
On Tue, 2017-07-18 at 09:28 -0500, Eric Blake wrote: > On 07/18/2017 05:39 AM, Marc-André Lureau wrote: > > Hi > > > > On Tue, Jul 18, 2017 at 1:49 AM, Amarnath Valluri > > <amarnath.vall...@intel.com> wrote: > >> TPM configuration options ar

[Qemu-devel] [PATCH v6 8/8] tpm: Added support for TPM emulator

2017-07-18 Thread Amarnath Valluri
-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- configure | 15 +- hmp.c | 21 ++ hw/tpm/Makefile.objs | 1 + hw/tpm/tpm_emulator.c | 973 ++ hw/tpm/tpm_ioctl.h| 243 + qapi-schem

[Qemu-devel] [PATCH v6 7/8] tpm-passthrough: move reusable code to utils

2017-07-18 Thread Amarnath Valluri
Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- hw/tpm/tpm_passthrough.c | 64 hw/tpm/tpm_util.c| 25 +++ hw/tpm/tpm_util.h| 4

[Qemu-devel] [PATCH v6 6/8] tpm-backend: Move realloc_buffer() implementation to tpm-tis model

2017-07-18 Thread Amarnath Valluri
buffer reallocation is very unlikely to be backend specific. Hence move inside the tis. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c | 9 - hw/tpm/tpm_passthroug

Re: [Qemu-devel] [PATCH v5 8/8] tpm: Added support for TPM emulator

2017-07-18 Thread Amarnath Valluri
Thank Stefan for your comments, i sent the newer version of the patchset by addressing all your comments. - Amarnath On Wed, 2017-07-12 at 14:24 -0400, Stefan Berger wrote: > On 06/05/2017 08:45 AM, Amarnath Valluri wrote: > > This change introduces a new TPM backend driver that can co

[Qemu-devel] [PATCH v6 0/8] Provide support for the software TPM emulator

2017-07-18 Thread Amarnath Valluri
- Address review comments maded by Stefan Berger Amarnath Valluri (8): tpm-backend: Remove unneeded member variable from backend class tpm-backend: Move thread handling inside TPMBackend tpm-backend: Initialize and free data members in it's own methods tpm-backend: Made few interface

[Qemu-devel] [PATCH v6 2/8] tpm-backend: Move thread handling inside TPMBackend

2017-07-18 Thread Amarnath Valluri
it. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c | 62 +--- hw/tpm/tpm_passthro

[Qemu-devel] [PATCH v6 5/8] tmp backend: Add new api to read backend TpmInfo

2017-07-18 Thread Amarnath Valluri
to return configured tpm options. A new tpm backend api - tpm_backend_query_tpm() which uses _get_tpm_options() to prepare TpmInfo. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c

[Qemu-devel] [PATCH v6 3/8] tpm-backend: Initialize and free data members in it's own methods

2017-07-18 Thread Amarnath Valluri
the backend object, hence removed destroy() from TPMDriverOps interface. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c

[Qemu-devel] [PATCH v6 4/8] tpm-backend: Made few interface methods optional

2017-07-18 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Took the opportunity to remove unused methods: tpm_backend_get_type() tpm_backend_get_desc() Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Marc

[Qemu-devel] [PATCH v6 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-07-18 Thread Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present. Signed-off-by: Amarnath Valluri <amarnath.v

[Qemu-devel] [PATCH v5 6/8] tpm-backend: Move realloc_buffer() implementation to tpm-tis model

2017-06-05 Thread Amarnath Valluri
buffer reallocation is very unlikely to be backend specific. Hence move inside the tis. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c | 9 - hw/tpm/tpm_passthroug

[Qemu-devel] [PATCH v4 0/8] Provide support for the software TPM emulator

2017-06-05 Thread Amarnath Valluri
by Stefan Berger and Deniel P Berrange ** Changes in v4: - Moved realloc_buffer() to TIS model - Made TpmInfo related change backwards compatible. ** Changes in v5: - updated Reviewed-By: tag to git commits - added migration blocker to TPM emulator backend Amarnath Valluri (8): tpm-backend: Remove

[Qemu-devel] [PATCH v5 3/8] tpm-backend: Initialize and free data members in it's own methods

2017-06-05 Thread Amarnath Valluri
the backend object, hence removed destroy() from TPMDriverOps interface. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c

[Qemu-devel] [PATCH v5 7/8] tpm-passthrough: move reusable code to utils

2017-06-05 Thread Amarnath Valluri
Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- hw/tpm/tpm_passthrough.c | 64 hw/tpm/tpm_util.c| 25 +++ hw/tpm/tpm_util.h| 4

[Qemu-devel] [PATCH v5 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-06-05 Thread Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present. Signed-off-by: Amarnath Valluri <amarnath.v

[Qemu-devel] [PATCH v5 4/8] tpm-backend: Made few interface methods optional

2017-06-05 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Took the opportunity to remove unused methods: tpm_backend_get_type() tpm_backend_get_desc() Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Marc

[Qemu-devel] [PATCH v5 8/8] tpm: Added support for TPM emulator

2017-06-05 Thread Amarnath Valluri
-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- configure | 15 +- hmp.c | 21 ++ hw/tpm/Makefile.objs | 1 + hw/tpm/tpm_emulator.c | 973 ++ hw/tpm/tpm_ioctl.h| 243 + qapi-schem

[Qemu-devel] [PATCH v5 5/8] tmp backend: Add new api to read backend TpmInfo

2017-06-05 Thread Amarnath Valluri
to return configured tpm options. A new tpm backend api - tpm_backend_query_tpm() which uses _get_tpm_options() to prepare TpmInfo. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c

[Qemu-devel] [PATCH v5 2/8] tpm-backend: Move thread handling inside TPMBackend

2017-06-05 Thread Amarnath Valluri
it. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> Reviewed-by: Marc-André Lureau <marcandre.lur...@redhat.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- backends/tpm.c | 62 +--- hw/tpm/tpm_passthro

[Qemu-devel] [PATCH v4 8/8] tpm: Added support for TPM emulator

2017-05-16 Thread Amarnath Valluri
-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- configure | 15 +- hmp.c | 21 ++ hw/tpm/Makefile.objs | 1 + hw/tpm/tpm_emulator.c | 950 ++ hw/tpm/tpm_ioctl.h| 243 + qapi-schem

[Qemu-devel] [PATCH v4 0/8] Provide support for the software TPM emulator

2017-05-16 Thread Amarnath Valluri
by Stefan Berger and Deniel P Berrange ** Changes in v4: - Moved realloc_buffer() to TIS model - Made TpmInfo related change backwards compatible. Amarnath Valluri (8): tpm-backend: Remove unneeded member variable from backend class tpm-backend: Move thread handling inside TPMBackend tpm-backend

[Qemu-devel] [PATCH v4 4/8] tpm-backend: Made few interface methods optional

2017-05-16 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Took the opportunity to remove unused methods: tpm_backend_get_type() tpm_backend_get_desc() Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends

[Qemu-devel] [PATCH v4 2/8] tpm-backend: Move thread handling inside TPMBackend

2017-05-16 Thread Amarnath Valluri
it. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 62 +--- hw/tpm/tpm_passthrough.c | 58 ++--- include/sysemu/tpm_backend.h | 32 + include/

[Qemu-devel] [PATCH v4 6/8] tpm-backend: Move realloc_buffer() implementation to tpm-tis model

2017-05-16 Thread Amarnath Valluri
buffer reallocation is very unlikely to be backend specific. Hence move inside the tis. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 9 - hw/tpm/tpm_passthrough.c | 12 hw/tpm/tpm_tis.c

[Qemu-devel] [PATCH v4 5/8] tmp backend: Add new api to read backend TpmInfo

2017-05-16 Thread Amarnath Valluri
to return configured tpm options. A new tpm backend api - tpm_backend_query_tpm() which uses _get_tpm_options() to prepare TpmInfo. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 22 +-- hmp.c| 6 ++---

[Qemu-devel] [PATCH v4 3/8] tpm-backend: Initialize and free data members in it's own methods

2017-05-16 Thread Amarnath Valluri
the backend object, hence removed destroy() from TPMDriverOps interface. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 16 ++-- hw/tpm/tpm_passthrough.c | 31 --- include/sysemu/tpm_backend.h | 7 ---

[Qemu-devel] [PATCH v4 7/8] tpm-passthrough: move reusable code to utils

2017-05-16 Thread Amarnath Valluri
Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- hw/tpm/tpm_passthrough.c | 64 hw/tpm/tpm_util.c| 25 +++ hw/tpm/tpm_util.h| 4 +++ 3 files changed, 34 insertions(+), 59 deletions(-) diff

[Qemu-devel] [PATCH v4 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-05-16 Thread Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present. Signed-off-by: Amarnath Valluri <amarnath.v

Re: [Qemu-devel] [PATCH v3 0/8] Provide support for the software TPM emulator

2017-05-05 Thread Amarnath Valluri
On 05/04/2017 03:28 PM, Stefan Berger wrote: On 05/02/2017 07:52 AM, Amarnath Valluri wrote: Briefly, Theses set of patches introduces: - new TPM backend driver to support software TPM emulators(swtpm(1)). - and few supported fixes/enhancements/cleanup to existing tpm backend code

[Qemu-devel] [PATCH v4 8/8] tpm: Added support for TPM emulator

2017-05-04 Thread Amarnath Valluri
-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- configure | 15 +- hmp.c | 21 ++ hw/tpm/Makefile.objs | 1 + hw/tpm/tpm_emulator.c | 950 ++ hw/tpm/tpm_ioctl.h| 243 + qapi-schem

[Qemu-devel] [PATCH v4 6/8] tpm-backend: Move realloc_buffer() implementation to tpm-tis model

2017-05-04 Thread Amarnath Valluri
buffer reallocation is very unlikely to be backend specific. Hence move inside the tis. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 9 - hw/tpm/tpm_passthrough.c | 12 hw/tpm/tpm_tis.c

[Qemu-devel] [PATCH v4 5/8] tmp backend: Add new api to read backend TpmInfo

2017-05-04 Thread Amarnath Valluri
to return configured tpm options. A new tpm backend api - tpm_backend_query_tpm() which uses _get_tpm_options() to prepare TpmInfo. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 22 +-- hmp.c| 6 ++---

[Qemu-devel] [PATCH v4 4/8] tpm-backend: Made few interface methods optional

2017-05-04 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Took the opportunity to remove unused methods: tpm_backend_get_type() tpm_backend_get_desc() Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends

Re: [Qemu-devel] [PATCH v3 6/8] tpm-backend: Move realloc_buffer() implementation to base class

2017-05-04 Thread Amarnath Valluri
On 05/02/2017 06:54 PM, Marc-André Lureau wrote: Hi On Tue, May 2, 2017 at 3:53 PM Amarnath Valluri <amarnath.vall...@intel.com <mailto:amarnath.vall...@intel.com>> wrote: Provide base implementation of realloc_buffer(), so that backend implementations can resu

Re: [Qemu-devel] [PATCH v3 5/8] tmp backend: Add new api to read backend TpmInfo

2017-05-04 Thread Amarnath Valluri
On 05/02/2017 04:35 PM, Eric Blake wrote: On 05/02/2017 06:52 AM, Amarnath Valluri wrote: TPM configuration options are backend implementation details and shall not be part of base TPMBackend object, and these shall not be accessed directly outside of the class, hence added a new interface

Re: [Qemu-devel] [PATCH v3 4/8] tpm-backend: Made few interface methods optional

2017-05-04 Thread Amarnath Valluri
On 05/02/2017 03:29 PM, Marc-André Lureau wrote: On Tue, May 2, 2017 at 3:52 PM Amarnath Valluri <amarnath.vall...@intel.com <mailto:amarnath.vall...@intel.com>> wrote: This allows backend implementations left optional interface methods. For mandatory methods asse

[Qemu-devel] [PATCH v3 7/8] tpm-passthrough: move reusable code to utils

2017-05-02 Thread Amarnath Valluri
Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- hw/tpm/tpm_passthrough.c | 64 hw/tpm/tpm_util.c| 25 +++ hw/tpm/tpm_util.h| 4 +++ 3 files changed, 34 insertions(+), 59 deletions(-) diff

[Qemu-devel] [PATCH v3 8/8] tpm: Added support for TPM emulator

2017-05-02 Thread Amarnath Valluri
\ [...] \ -tpmdev emulator,id=tpm0,tpmstatedir=/tmp/mytpm,logfile=/tmp/swtpm.log \ -device tpm-tis,tpmdev=tpm0 \ [...] Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- configure | 15 +- hmp.c | 21 ++ hw/tpm/Makefile.objs

[Qemu-devel] [PATCH v3 5/8] tmp backend: Add new api to read backend TpmInfo

2017-05-02 Thread Amarnath Valluri
by all backend implementations to define their tpm configuration options. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 24 ++-- hmp.c| 10 hw/tpm/tpm_passthrough.c

[Qemu-devel] [PATCH v3 4/8] tpm-backend: Made few interface methods optional

2017-05-02 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 24 ++-- hw/tpm/tpm_passthrough.c | 16 2

[Qemu-devel] [PATCH v3 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-05-02 Thread Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present. Signed-off-by: Amarnath Valluri <amarnath.v

[Qemu-devel] [PATCH v3 6/8] tpm-backend: Move realloc_buffer() implementation to base class

2017-05-02 Thread Amarnath Valluri
Provide base implementation of realloc_buffer(), so that backend implementations can resue. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 9 - hw/tpm/tpm_passthrough.c | 12 2 files changed, 8 insertions(+), 13 del

[Qemu-devel] [PATCH v3 3/8] tpm-backend: Initialize and free data members in it's own methods

2017-05-02 Thread Amarnath Valluri
the backend object, hence removed destroy() from TPMDriverOps interface. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 16 ++-- hw/tpm/tpm_passthrough.c | 31 --- include/sysemu/tpm_backend.h | 7 ---

[Qemu-devel] [PATCH v3 0/8] Provide support for the software TPM emulator

2017-05-02 Thread Amarnath Valluri
by Stefan Berger and Deniel P Berrange Amarnath Valluri (8): tpm-backend: Remove unneeded member variable from backend class tpm-backend: Move thread handling inside TPMBackend tpm-backend: Initialize and free data members in it's own methods tpm-backend: Made few interface methods optional tmp

[Qemu-devel] [PATCH v3 2/8] tpm-backend: Move thread handling inside TPMBackend

2017-05-02 Thread Amarnath Valluri
it. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 62 +--- hw/tpm/tpm_passthrough.c | 58 ++--- include/sysemu/tpm_backend.h | 32 + include/

Re: [Qemu-devel] [PATCH v2 6/9] tpm-backend: Remove unneeded destroy() method from TpmDriverOps interface

2017-05-02 Thread Amarnath Valluri
On 04/25/2017 09:59 PM, Stefan Berger wrote: On 04/07/2017 10:30 AM, Amarnath Valluri wrote: As TPMBackend is a Qemu Object, we can use object_unref() inplace of tpm_backend_destroy() to free the backend object, hence removed destroy() from TPMDriverOps interface. Signed-off-by: Amarnath

Re: [Qemu-devel] [PATCH v2 5/9] tmp backend: Add new api to read backend TpmInfo

2017-05-02 Thread Amarnath Valluri
On 04/25/2017 09:59 PM, Eric Blake wrote: On 04/25/2017 01:51 PM, Stefan Berger wrote: +++ b/qapi-schema.json @@ -5140,6 +5140,16 @@ { 'command': 'query-tpm-types', 'returns': ['TpmType'] } ## +# @TPMOptions: +# +# Base type for TPM options +# +# Since: 2.10 +## +{ 'struct':

Re: [Qemu-devel] [PATCH v2 3/9] tpm-backend: Initialize and free data members in it's own methods

2017-05-02 Thread Amarnath Valluri
On 04/25/2017 09:27 PM, Stefan Berger wrote: On 04/07/2017 10:30 AM, Amarnath Valluri wrote: Initialize and free TPMBackend data members in it's own instance_init() and instance_finalize methods. Took the opportunity to fix object cleanup in tpm_backend_{create,destroy} methods Signed

Re: [Qemu-devel] [PATCH v2 9/9] tpm: Added support for TPM emulator

2017-04-10 Thread Amarnath Valluri
On 07.04.2017 18:11, Marc-André Lureau wrote: Hi On Fri, Apr 7, 2017 at 4:41 PM Daniel P. Berrange > +.name = "data-path", > +.type = QEMU_OPT_STRING, > +.help = "Socket path to use for data exhange", > +}, > +{ > +.name =

Re: [Qemu-devel] [PATCH v2 9/9] tpm: Added support for TPM emulator

2017-04-10 Thread Amarnath Valluri
On 07.04.2017 17:41, Daniel P. Berrange wrote: On Fri, Apr 07, 2017 at 05:30:31PM +0300, Amarnath Valluri wrote: This change introduces a new TPM backend driver that can communicate with swtpm(software TPM emulator) using unix domain socket interface. Swtpm uses two unix sockets, one

[Qemu-devel] [PATCH v2 8/9] tpm-passthrough: move reusable code to utils

2017-04-07 Thread Amarnath Valluri
Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- hw/tpm/tpm_passthrough.c | 64 hw/tpm/tpm_util.c| 25 +++ hw/tpm/tpm_util.h| 4 +++ 3 files changed, 34 insertions(+), 59 deletions(-) diff

[Qemu-devel] [PATCH v2 5/9] tmp backend: Add new api to read backend TpmInfo

2017-04-07 Thread Amarnath Valluri
by all backend implementations to define their tpm configuration options. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 24 +-- hmp.c| 10 hw/tpm/tpm_passthrough.c

[Qemu-devel] [PATCH v2 6/9] tpm-backend: Remove unneeded destroy() method from TpmDriverOps interface

2017-04-07 Thread Amarnath Valluri
As TPMBackend is a Qemu Object, we can use object_unref() inplace of tpm_backend_destroy() to free the backend object, hence removed destroy() from TPMDriverOps interface. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 11 ---

[Qemu-devel] [PATCH v2 7/9] tpm-backend: Move realloc_buffer() implementation to base class

2017-04-07 Thread Amarnath Valluri
Provide base implementation of realloc_buffer(), so that backend implementations can resue. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 9 - hw/tpm/tpm_passthrough.c | 12 2 files changed, 8 insertions(+), 13 del

[Qemu-devel] [PATCH v2 9/9] tpm: Added support for TPM emulator

2017-04-07 Thread Amarnath Valluri
\ [...] \ -tpmdev emulator,id=tpm0,tpmstatedir=/tmp/mytpm,logfile=/tmp/swtpm.log \ -device tpm-tis,tpmdev=tpm0 \ [...] Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- configure | 15 +- hmp.c | 21 ++ hw/tpm/Makefile.objs

[Qemu-devel] [PATCH v2 2/9] tpm-backend: Move thread handling inside TPMBackend

2017-04-07 Thread Amarnath Valluri
it. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 63 +--- hw/tpm/tpm_passthrough.c | 58 +--- include/sysemu/tpm_backend.h | 32 include/

[Qemu-devel] [PATCH v2 4/9] tpm-backend: Made few interface methods optional

2017-04-07 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 28 +--- hw/tpm/tpm_passthrough.c | 16 2

[Qemu-devel] [PATCH v2 3/9] tpm-backend: Initialize and free data members in it's own methods

2017-04-07 Thread Amarnath Valluri
Initialize and free TPMBackend data members in it's own instance_init() and instance_finalize methods. Took the opportunity to fix object cleanup in tpm_backend_{create,destroy} methods Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 8 ++

[Qemu-devel] [PATCH v2 1/9] tpm-backend: Remove unneeded member variable from backend class

2017-04-07 Thread Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present. Signed-off-by: Amarnath Valluri <amarnath.v

[Qemu-devel] [PATCH v2 0/9] Provide support for the software TPM

2017-04-07 Thread Amarnath Valluri
/stefanberger/swtpm 2) https://lists.nongnu.org/archive/html/qemu-devel/2016-01/msg00089.html ** Changes in V2: - Made spawnning swtpm optional - used QIOChannel instead of plain unix sockets - incorporated other fixes pointed in v1 review Amarnath Valluri (9): tpm-backend: Remove unneeded

Re: [Qemu-devel] [PATCH 0/7] Provide support for the software TPM emulator

2017-04-05 Thread Amarnath Valluri
On 03.04.2017 20:07, Daniel P. Berrange wrote: On Fri, Mar 31, 2017 at 04:10:09PM +0300, Amarnath Valluri wrote: Briefly, Theses set of patches introduces: - new TPM backend driver to support software TPM emulators(swtpm(1)). - and few supported fixes/enhancements/cleanup to existing tpm

Re: [Qemu-devel] [PATCH 2/7] tpm-backend: Move thread handling inside TPMBackend

2017-04-04 Thread Amarnath Valluri
On 04.04.2017 13:56, Marc-André Lureau wrote: Hi On Fri, Mar 31, 2017 at 5:04 PM Amarnath Valluri <amarnath.vall...@intel.com <mailto:amarnath.vall...@intel.com>> wrote: Move thread handling inside TPMBackend, this way backend implementations need not to mainta

[Qemu-devel] [PATCH v2 5/7] tmp backend: Add new api to read backend tpm options

2017-04-04 Thread Amarnath Valluri
implementations to define their tpm configuration options. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 12 ++ hw/tpm/tpm_passthrough.c | 55 +++- include/sysemu/tpm_backend.

[Qemu-devel] [PATCH 2/7] tpm-backend: Move thread handling inside TPMBackend

2017-03-31 Thread Amarnath Valluri
to tpm_backend_int.h. As handle_request() method is internal to TPMBackend and its derived classes, and shall not be visible for others. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 66 ++-- hw/tpm/tpm_passthr

[Qemu-devel] [PATCH 7/7] Added support for TPM emulator

2017-03-31 Thread Amarnath Valluri
\ [...] \ -tpmdev emulator,id=tpm0,tpmstatedir=/tmp/mytpm,logfile=/tmp/swtpm.log \ -device tpm-tis,tpmdev=tpm0 \ [...] Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- configure | 6 + hmp.c | 14 + hw/tpm/Makefile.objs

[Qemu-devel] [PATCH 7/7] tpm: New backend driver to support TPM emulator

2017-03-31 Thread Amarnath Valluri
\ [...] \ -tpmdev emulator,id=tpm0,tpmstatedir=/tmp/mytpm,logfile=/tmp/swtpm.log \ -device tpm-tis,tpmdev=tpm0 \ [...] Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- configure | 6 + hmp.c | 14 + hw/tpm/Makefile.objs

[Qemu-devel] [PATCH 0/7] Provide support for the software TPM emulator

2017-03-31 Thread Amarnath Valluri
2) https://lists.nongnu.org/archive/html/qemu-devel/2016-01/msg00089.html Amarnath Valluri (7): tpm-backend: Remove unneeded member variable from backend class tpm-backend: Move thread handling inside TPMBackend tpm-backend: Initialize and free data members in it's own methods tpm-backend

[Qemu-devel] [PATCH 3/7] tpm-backend: Initialize and free data members in it's own methods

2017-03-31 Thread Amarnath Valluri
Initialize and free TPMBackend data members in it's own instance_init() and instance_finalize methods. Took the opportunity to fix object cleanup in tpm_backend_destroy() method Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 14 +-

[Qemu-devel] [PATCH 1/7] tpm-backend: Remove unneeded member variable from backend class

2017-03-31 Thread Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present. Signed-off-by: Amarnath Valluri <amarnath.v

[Qemu-devel] [PATCH 5/7] tmp backend: Add new api to read backend tpm options

2017-03-31 Thread Amarnath Valluri
, get_tpm_options() to TPMDriverOps., which shall be implemented by the derived classes to return configured tpm options. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 12 ++ hw/tpm/tpm_passthrough.c

[Qemu-devel] [PATCH 4/7] tpm-backend: Call interface methods only if backend implements them

2017-03-31 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- backends/tpm.c | 22 ++ hw/tpm/tpm_passthrough.c | 16 2 files changed, 14 insertions(+), 24 deletions(-)

[Qemu-devel] [PATCH 6/7] tpm-passthrough: move reusable code to utils

2017-03-31 Thread Amarnath Valluri
Signed-off-by: Amarnath Valluri <amarnath.vall...@intel.com> --- hw/tpm/tpm_passthrough.c | 77 hw/tpm/tpm_util.c| 60 + hw/tpm/tpm_util.h| 8 + 3 files changed, 73 insertions(