[Qemu-devel] [PATCH v2 0/5] tpm: Match frontend and backend buffer sizes (not 2.11)

Stefan Berger posted 5 patches 6 years, 5 months ago
Failed in applying to current master (apply log)
backends/tpm.c               |  11 ++-
hw/tpm/tpm_emulator.c        |  83 ++++++++++++++++++++++-
hw/tpm/tpm_int.h             |   9 +++
hw/tpm/tpm_ioctl.h           |  28 +++++++-
hw/tpm/tpm_passthrough.c     |  30 +++++++++
hw/tpm/tpm_tis.c             |  18 ++---
hw/tpm/tpm_util.c            | 155 ++++++++++++++++++++++++++++++++++++++++---
hw/tpm/tpm_util.h            |   3 +
include/sysemu/tpm_backend.h |  18 ++++-
9 files changed, 330 insertions(+), 25 deletions(-)
[Qemu-devel] [PATCH v2 0/5] tpm: Match frontend and backend buffer sizes (not 2.11)
Posted by Stefan Berger 6 years, 5 months ago
This patch series does away with the hard coded buffer size in the TIS
frontend and instead retrieves the buffer size from the device that's
being used. So it gets it from the host device or the external emulator.
In case the frontend (CRB) cannot support the backend's current buffer size
(typically 4k) it can adjust the buffer size the emulator is working with
so that we will not run into the problem that the backend produces packets
that the frontend cannot deliver to due mismatching buffer sizes.

   Stefan

v1->v2:
  - followed Marc-André's suggestions


Stefan Berger (5):
  tpm: Move getting TPM buffer size to backends
  tpm: pull tpm_util_request() out of tpm_util_test()
  tpm: tpm_passthrough: Read the buffer size from the host device
  tpm: tpm_emulator: get and set buffer size of device
  tpm: tpm_passthrough: Fail startup if FE buffer size < BE buffer size

 backends/tpm.c               |  11 ++-
 hw/tpm/tpm_emulator.c        |  83 ++++++++++++++++++++++-
 hw/tpm/tpm_int.h             |   9 +++
 hw/tpm/tpm_ioctl.h           |  28 +++++++-
 hw/tpm/tpm_passthrough.c     |  30 +++++++++
 hw/tpm/tpm_tis.c             |  18 ++---
 hw/tpm/tpm_util.c            | 155 ++++++++++++++++++++++++++++++++++++++++---
 hw/tpm/tpm_util.h            |   3 +
 include/sysemu/tpm_backend.h |  18 ++++-
 9 files changed, 330 insertions(+), 25 deletions(-)

-- 
2.5.5


Re: [Qemu-devel] [PATCH v2 0/5] tpm: Match frontend and backend buffer sizes (not 2.11)
Posted by Marc-André Lureau 6 years, 5 months ago
Hi

----- Original Message -----
> This patch series does away with the hard coded buffer size in the TIS
> frontend and instead retrieves the buffer size from the device that's
> being used. So it gets it from the host device or the external emulator.
> In case the frontend (CRB) cannot support the backend's current buffer size
> (typically 4k) it can adjust the buffer size the emulator is working with
> so that we will not run into the problem that the backend produces packets
> that the frontend cannot deliver to due mismatching buffer sizes.
> 
>    Stefan
> 
> v1->v2:
>   - followed Marc-André's suggestions
> 
> 
> Stefan Berger (5):
>   tpm: Move getting TPM buffer size to backends
>   tpm: pull tpm_util_request() out of tpm_util_test()
>   tpm: tpm_passthrough: Read the buffer size from the host device
>   tpm: tpm_emulator: get and set buffer size of device
>   tpm: tpm_passthrough: Fail startup if FE buffer size < BE buffer size

series,
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


> 
>  backends/tpm.c               |  11 ++-
>  hw/tpm/tpm_emulator.c        |  83 ++++++++++++++++++++++-
>  hw/tpm/tpm_int.h             |   9 +++
>  hw/tpm/tpm_ioctl.h           |  28 +++++++-
>  hw/tpm/tpm_passthrough.c     |  30 +++++++++
>  hw/tpm/tpm_tis.c             |  18 ++---
>  hw/tpm/tpm_util.c            | 155
>  ++++++++++++++++++++++++++++++++++++++++---
>  hw/tpm/tpm_util.h            |   3 +
>  include/sysemu/tpm_backend.h |  18 ++++-
>  9 files changed, 330 insertions(+), 25 deletions(-)
> 
> --
> 2.5.5
> 
> 

Re: [Qemu-devel] [PATCH v2 0/5] tpm: Match frontend and backend buffer sizes (not 2.11)
Posted by Stefan Berger 6 years, 5 months ago
On 11/09/2017 07:42 AM, Marc-André Lureau wrote:
> Reviewed-by: Marc-André Lureau<marcandre.lureau@redhat.com>

Thanks! I added it to the tpm-next branch.

https://github.com/stefanberger/qemu-tpm/commits/tpm-next


     Stefan