[Qemu-devel] [PATCH for-4.2 v2 0/2] spapr: Implement H_TPM_COMM for accessing host TPM device

Michael Roth posted 2 patches 4 years, 9 months ago
Test docker-clang@ubuntu passed
Test FreeBSD passed
Test asan passed
Test docker-mingw@fedora passed
Test s390x passed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190717205842.17827-1-mdroth@linux.vnet.ibm.com
Maintainers: David Gibson <david@gibson.dropbear.id.au>
docs/specs/ppc-spapr-uv-hcalls.txt |  76 +++++++++++++++++++++++++++
hw/ppc/Makefile.objs               |   1 +
hw/ppc/spapr.c                     |  33 +++++++++++-
hw/ppc/spapr_hcall.c               |  13 +++++
hw/ppc/spapr_tpm_proxy.c           | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
hw/ppc/trace-events                |   4 ++
include/hw/ppc/spapr.h             |  11 ++++
include/hw/ppc/spapr_tpm_proxy.h   |  31 +++++++++++
8 files changed, 344 insertions(+), 1 deletion(-)
[Qemu-devel] [PATCH for-4.2 v2 0/2] spapr: Implement H_TPM_COMM for accessing host TPM device
Posted by Michael Roth 4 years, 9 months ago
These patches are based on ppc-for-4.2 and are also available at:

  https://github.com/mdroth/qemu/commits/spapr-tpm-hcall-v2

This patchset implements the H_TPM_COMM hypercall, which provides a way
for an Ultravisor to pass raw TPM commands on to a host's TPM device,
either directly or through a TPM Resource Manager (needed to support
multiple guests).

Secure VMs running on an Ultravisor have a symmetric key that is
encrypted using a public key that is bound to a trusted host's TPM
hardware. This hypercall provides a means to decrypt the symmetric
key on behalf of a Secure VMs using the host's TPM hardware.

More details are provided in the spec summary introduced in patch 1.

Changes since v1:
 - use separate hcall table for SVM hcall range (David)
 - document reserved hcall range in ppc-spapr-uv-hcalls.txt

Changes since RFC/v0:
 - configure TPM path via -device spapr-tpm-proxy instead of -machine (David)
 - return H_FUNCTION (not H_RESOURCE) if TPM has not been configured (David)
 - drop use of global for storing TPM FD (David)
 - fix checkpatch errors relating to case statement indents, newlines in
   error_report(), and lines over 80.
 - fix some minor typos in documentation
 - rebased on ppc-for-4.2

 docs/specs/ppc-spapr-uv-hcalls.txt |  76 +++++++++++++++++++++++++++
 hw/ppc/Makefile.objs               |   1 +
 hw/ppc/spapr.c                     |  33 +++++++++++-
 hw/ppc/spapr_hcall.c               |  13 +++++
 hw/ppc/spapr_tpm_proxy.c           | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/ppc/trace-events                |   4 ++
 include/hw/ppc/spapr.h             |  11 ++++
 include/hw/ppc/spapr_tpm_proxy.h   |  31 +++++++++++
 8 files changed, 344 insertions(+), 1 deletion(-)



Re: [Qemu-devel] [PATCH for-4.2 v2 0/2] spapr: Implement H_TPM_COMM for accessing host TPM device
Posted by David Gibson 4 years, 9 months ago
On Wed, Jul 17, 2019 at 03:58:40PM -0500, Michael Roth wrote:
> These patches are based on ppc-for-4.2 and are also available at:
> 
>   https://github.com/mdroth/qemu/commits/spapr-tpm-hcall-v2
> 
> This patchset implements the H_TPM_COMM hypercall, which provides a way
> for an Ultravisor to pass raw TPM commands on to a host's TPM device,
> either directly or through a TPM Resource Manager (needed to support
> multiple guests).
> 
> Secure VMs running on an Ultravisor have a symmetric key that is
> encrypted using a public key that is bound to a trusted host's TPM
> hardware. This hypercall provides a means to decrypt the symmetric
> key on behalf of a Secure VMs using the host's TPM hardware.
> 
> More details are provided in the spec summary introduced in patch 1.

LGTM, applied to ppc-for-4.2.

> 
> Changes since v1:
>  - use separate hcall table for SVM hcall range (David)
>  - document reserved hcall range in ppc-spapr-uv-hcalls.txt
> 
> Changes since RFC/v0:
>  - configure TPM path via -device spapr-tpm-proxy instead of -machine (David)
>  - return H_FUNCTION (not H_RESOURCE) if TPM has not been configured (David)
>  - drop use of global for storing TPM FD (David)
>  - fix checkpatch errors relating to case statement indents, newlines in
>    error_report(), and lines over 80.
>  - fix some minor typos in documentation
>  - rebased on ppc-for-4.2
> 
>  docs/specs/ppc-spapr-uv-hcalls.txt |  76 +++++++++++++++++++++++++++
>  hw/ppc/Makefile.objs               |   1 +
>  hw/ppc/spapr.c                     |  33 +++++++++++-
>  hw/ppc/spapr_hcall.c               |  13 +++++
>  hw/ppc/spapr_tpm_proxy.c           | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  hw/ppc/trace-events                |   4 ++
>  include/hw/ppc/spapr.h             |  11 ++++
>  include/hw/ppc/spapr_tpm_proxy.h   |  31 +++++++++++
>  8 files changed, 344 insertions(+), 1 deletion(-)
> 
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson