[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 98979c: tpm: Use EMSGSIZE instead of EBADMSG
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 98979c: tpm: Use EMSGSIZE instead of EBADMSG to compile on... |
Date: |
Mon, 16 Oct 2017 06:27:11 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 98979cdca44ba0e21055ee7736694aa5ebb54347
https://github.com/qemu/qemu/commit/98979cdca44ba0e21055ee7736694aa5ebb54347
Author: Stefan Berger <address@hidden>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Changed paths:
M hw/tpm/tpm_util.c
Log Message:
-----------
tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD
EBADMSG was only added to OpenBSD very recently. To make QEMU compilable
on older OpenBSD versions use EMSGSIZE instead when a mismatch between
number of received bytes and message size indicated in the header was
found.
Return -EMSGSIZE and convert all other errnos in the same functions to
return the negative errno.
Signed-off-by: Stefan Berger <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Commit: fb4b0c6765471dad2363875989e7661ca5f9a608
https://github.com/qemu/qemu/commit/fb4b0c6765471dad2363875989e7661ca5f9a608
Author: Amarnath Valluri <address@hidden>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Changed paths:
M hw/tpm/tpm_passthrough.c
M include/sysemu/tpm_backend.h
M tpm.c
Log Message:
-----------
tpm-backend: Remove unneeded member variable from backend class
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 <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Stefan Berger <address@hidden>
Signed-off-by: Stefan Berger <address@hidden>
Commit: b19a5eea5a26e9bd83a48c742172d2a6aa8c4180
https://github.com/qemu/qemu/commit/b19a5eea5a26e9bd83a48c742172d2a6aa8c4180
Author: Amarnath Valluri <address@hidden>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Changed paths:
M backends/tpm.c
M hw/tpm/tpm_passthrough.c
M include/sysemu/tpm_backend.h
R include/sysemu/tpm_backend_int.h
Log Message:
-----------
tpm-backend: Move thread handling inside TPMBackend
Move thread handling inside TPMBackend, this way backend implementations need
not to maintain their own thread life cycle, instead they needs to implement
'handle_request()' class method that always been called from a thread.
This change made tpm_backend_int.h kind of useless, hence removed it.
Signed-off-by: Amarnath Valluri <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Stefan Berger <address@hidden>
Signed-off-by: Stefan Berger <address@hidden>
Commit: f35fe5cb97bbdaa6a6967f2fefc3fc1f79680601
https://github.com/qemu/qemu/commit/f35fe5cb97bbdaa6a6967f2fefc3fc1f79680601
Author: Amarnath Valluri <address@hidden>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Changed paths:
M backends/tpm.c
M hw/tpm/tpm_passthrough.c
M include/sysemu/tpm_backend.h
M tpm.c
Log Message:
-----------
tpm-backend: Initialize and free data members in it's own methods
Initialize and free TPMBackend data members in it's own instance_init() and
instance_finalize methods.
Took the opportunity to remove unneeded destroy() method from TpmDriverOps
interface 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 <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Stefan Berger <address@hidden>
Signed-off-by: Stefan Berger <address@hidden>
Commit: 93330cf542b920b6ea5fea8120a08b76bb353113
https://github.com/qemu/qemu/commit/93330cf542b920b6ea5fea8120a08b76bb353113
Author: Amarnath Valluri <address@hidden>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Changed paths:
M backends/tpm.c
M hw/tpm/tpm_passthrough.c
M include/sysemu/tpm_backend.h
M tpm.c
Log Message:
-----------
tpm-backend: Made few interface methods optional
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 <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Stefan Berger<address@hidden>
Signed-off-by: Stefan Berger <address@hidden>
Commit: f59864ba3aedd26aef7c84545cc1e565caccebf7
https://github.com/qemu/qemu/commit/f59864ba3aedd26aef7c84545cc1e565caccebf7
Author: Amarnath Valluri <address@hidden>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Changed paths:
M backends/tpm.c
M hw/tpm/tpm_passthrough.c
M include/sysemu/tpm_backend.h
M tpm.c
Log Message:
-----------
tpm-backend: Add new API to read backend TpmInfo
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 method, get_tpm_options() to
TPMDriverOps., which shall be implemented by the derived classes 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 <address@hidden>
Reviewed-by: Stefan Berger <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Signed-off-by: Stefan Berger <address@hidden>
Commit: d0c519bdffa303d141727369e55b157c45b03147
https://github.com/qemu/qemu/commit/d0c519bdffa303d141727369e55b157c45b03147
Author: Amarnath Valluri <address@hidden>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Changed paths:
M backends/tpm.c
M hw/tpm/tpm_passthrough.c
M hw/tpm/tpm_tis.c
M include/sysemu/tpm_backend.h
Log Message:
-----------
tpm-backend: Move realloc_buffer() implementation to tpm-tis model
buffer reallocation is very unlikely to be backend specific. Hence move inside
the tis.
Signed-off-by: Amarnath Valluri <address@hidden>
Reviewed-by: Stefan Berger <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Signed-off-by: Stefan Berger <address@hidden>
Commit: 4a3d80980ebf71d8faf9d0ce2e2e23bdda5728df
https://github.com/qemu/qemu/commit/4a3d80980ebf71d8faf9d0ce2e2e23bdda5728df
Author: Amarnath Valluri <address@hidden>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Changed paths:
M hw/tpm/tpm_passthrough.c
M hw/tpm/tpm_util.c
M hw/tpm/tpm_util.h
Log Message:
-----------
tpm-passthrough: move reusable code to utils
Signed-off-by: Amarnath Valluri <address@hidden>
Reviewed-by: Stefan Berger <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Signed-off-by: Stefan Berger <address@hidden>
Commit: f4ede81eed29e6140374177d1f2808248c5b5650
https://github.com/qemu/qemu/commit/f4ede81eed29e6140374177d1f2808248c5b5650
Author: Amarnath Valluri <address@hidden>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Changed paths:
M configure
M hmp.c
M hw/tpm/Makefile.objs
A hw/tpm/tpm_emulator.c
A hw/tpm/tpm_ioctl.h
M qapi/tpm.json
M qemu-options.hx
Log Message:
-----------
tpm: Added support for TPM emulator
This change introduces a new TPM backend driver that can communicate with
swtpm(software TPM emulator) using unix domain socket interface. QEMU talks to
the TPM emulator using QEMU's socket-based chardev backend device.
Swtpm uses two Unix sockets for communications, one for plain TPM commands and
responses, and one for out-of-band control messages. QEMU passes the data
socket to be used over the control channel.
The swtpm and associated tools can be found here:
https://github.com/stefanberger/swtpm
The swtpm's control channel protocol specification can be found here:
https://github.com/stefanberger/swtpm/wiki/Control-Channel-Specification
Usage:
# setup TPM state directory
mkdir /tmp/mytpm
chown -R tss:root /tmp/mytpm
/usr/bin/swtpm_setup --tpm-state /tmp/mytpm --createek
# Ask qemu to use TPM emulator with given tpm state directory
qemu-system-x86_64 \
[...] \
-chardev socket,id=chrtpm,path=/tmp/swtpm-sock \
-tpmdev emulator,id=tpm0,chardev=chrtpm \
-device tpm-tis,tpmdev=tpm0 \
[...]
Signed-off-by: Amarnath Valluri <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Tested-by: Stefan Berger <address@hidden>
Signed-off-by: Stefan Berger <address@hidden>
Commit: c37cacabf2285b0731b44c1f667781fdd4f2b658
https://github.com/qemu/qemu/commit/c37cacabf2285b0731b44c1f667781fdd4f2b658
Author: Amarnath Valluri <address@hidden>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Changed paths:
M tpm.c
M vl.c
Log Message:
-----------
tpm: Move tpm_cleanup() to right place
As Emulator TPM backend uses chardev, tpm cleanup should happen before chardev
similar to other vhost-users.
Signed-off-by: Amarnath Valluri <address@hidden>
Reviewed-by: Stefan Berger <address@hidden>
Signed-off-by: Stefan Berger <address@hidden>
Commit: 8dc67017220109fd5bc9d2bffa73674595f62e08
https://github.com/qemu/qemu/commit/8dc67017220109fd5bc9d2bffa73674595f62e08
Author: Stefan Berger <address@hidden>
Date: 2017-10-13 (Fri, 13 Oct 2017)
Changed paths:
A docs/specs/tpm.txt
Log Message:
-----------
specs: Describe the TPM support in QEMU
This patch adds a description of the current TPM support in QEMU
to the specs.
Several public specs are referenced via their landing page on the
trustedcomputinggroup.org website.
Signed-off-by: Stefan Berger <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Commit: 78b62d37669230fbc4cb1e780cf33713dfd740ca
https://github.com/qemu/qemu/commit/78b62d37669230fbc4cb1e780cf33713dfd740ca
Author: Peter Maydell <address@hidden>
Date: 2017-10-16 (Mon, 16 Oct 2017)
Changed paths:
M backends/tpm.c
M configure
A docs/specs/tpm.txt
M hmp.c
M hw/tpm/Makefile.objs
A hw/tpm/tpm_emulator.c
A hw/tpm/tpm_ioctl.h
M hw/tpm/tpm_passthrough.c
M hw/tpm/tpm_tis.c
M hw/tpm/tpm_util.c
M hw/tpm/tpm_util.h
M include/sysemu/tpm_backend.h
R include/sysemu/tpm_backend_int.h
M qapi/tpm.json
M qemu-options.hx
M tpm.c
M vl.c
Log Message:
-----------
Merge remote-tracking branch
'remotes/stefanberger/tags/pull-tpm-2017-10-04-3' into staging
Merge tpm 2017/10/04 v3
# gpg: Signature made Fri 13 Oct 2017 12:37:07 BST
# gpg: using RSA key 0x75AD65802A0B4211
# gpg: Good signature from "Stefan Berger <address@hidden>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: B818 B9CA DF90 89C2 D5CE C66B 75AD 6580 2A0B 4211
* remotes/stefanberger/tags/pull-tpm-2017-10-04-3:
specs: Describe the TPM support in QEMU
tpm: Move tpm_cleanup() to right place
tpm: Added support for TPM emulator
tpm-passthrough: move reusable code to utils
tpm-backend: Move realloc_buffer() implementation to tpm-tis model
tpm-backend: Add new API to read backend TpmInfo
tpm-backend: Made few interface methods optional
tpm-backend: Initialize and free data members in it's own methods
tpm-backend: Move thread handling inside TPMBackend
tpm-backend: Remove unneeded member variable from backend class
tpm: Use EMSGSIZE instead of EBADMSG to compile on OpenBSD
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/40a1e8ac2e10...78b62d376692
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 98979c: tpm: Use EMSGSIZE instead of EBADMSG to compile on...,
GitHub <=