]> git.proxmox.com Git - mirror_qemu.git/blame - qapi/tpm.json
Merge remote-tracking branch 'remotes/berrange-gitlab/tags/sock-next-pull-request...
[mirror_qemu.git] / qapi / tpm.json
CommitLineData
3859b6cf 1# -*- Mode: Python -*-
f7160f32 2# vim: filetype=python
3859b6cf
MA
3#
4
5##
6# = TPM (trusted platform module) devices
7##
8
9##
10# @TpmModel:
11#
12# An enumeration of TPM models
13#
14# @tpm-tis: TPM TIS model
4ab6cb4c 15# @tpm-crb: TPM CRB model (since 2.12)
3676bc69 16# @tpm-spapr: TPM SPAPR model (since 5.0)
3859b6cf
MA
17#
18# Since: 1.5
19##
3676bc69 20{ 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb', 'tpm-spapr' ] }
3859b6cf
MA
21##
22# @query-tpm-models:
23#
24# Return a list of supported TPM models
25#
26# Returns: a list of TpmModel
27#
28# Since: 1.5
29#
30# Example:
31#
32# -> { "execute": "query-tpm-models" }
3676bc69 33# <- { "return": [ "tpm-tis", "tpm-crb", "tpm-spapr" ] }
3859b6cf
MA
34#
35##
36{ 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
37
38##
39# @TpmType:
40#
41# An enumeration of TPM types
42#
43# @passthrough: TPM passthrough type
f4ede81e
AV
44# @emulator: Software Emulator TPM type
45# Since: 2.11
3859b6cf
MA
46#
47# Since: 1.5
48##
f4ede81e 49{ 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ] }
3859b6cf
MA
50
51##
52# @query-tpm-types:
53#
54# Return a list of supported TPM types
55#
56# Returns: a list of TpmType
57#
58# Since: 1.5
59#
60# Example:
61#
62# -> { "execute": "query-tpm-types" }
f4ede81e 63# <- { "return": [ "passthrough", "emulator" ] }
3859b6cf
MA
64#
65##
66{ 'command': 'query-tpm-types', 'returns': ['TpmType'] }
67
68##
69# @TPMPassthroughOptions:
70#
71# Information about the TPM passthrough type
72#
73# @path: string describing the path used for accessing the TPM device
74#
75# @cancel-path: string showing the TPM's sysfs cancel file
76# for cancellation of TPM commands while they are executing
77#
78# Since: 1.5
79##
b0ddeba2
MAL
80{ 'struct': 'TPMPassthroughOptions',
81 'data': { '*path': 'str',
82 '*cancel-path': 'str' } }
3859b6cf 83
f4ede81e
AV
84##
85# @TPMEmulatorOptions:
86#
87# Information about the TPM emulator type
88#
89# @chardev: Name of a unix socket chardev
90#
91# Since: 2.11
92##
93{ 'struct': 'TPMEmulatorOptions', 'data': { 'chardev' : 'str' } }
94
3859b6cf
MA
95##
96# @TpmTypeOptions:
97#
98# A union referencing different TPM backend types' configuration options
99#
e050e426
PM
100# @type: - 'passthrough' The configuration options for the TPM passthrough type
101# - 'emulator' The configuration options for TPM emulator backend type
3859b6cf
MA
102#
103# Since: 1.5
104##
105{ 'union': 'TpmTypeOptions',
f4ede81e
AV
106 'data': { 'passthrough' : 'TPMPassthroughOptions',
107 'emulator': 'TPMEmulatorOptions' } }
3859b6cf
MA
108
109##
110# @TPMInfo:
111#
112# Information about the TPM
113#
114# @id: The Id of the TPM
115#
116# @model: The TPM frontend model
117#
118# @options: The TPM (backend) type configuration options
119#
120# Since: 1.5
121##
122{ 'struct': 'TPMInfo',
123 'data': {'id': 'str',
124 'model': 'TpmModel',
125 'options': 'TpmTypeOptions' } }
126
127##
128# @query-tpm:
129#
130# Return information about the TPM device
131#
132# Returns: @TPMInfo on success
133#
134# Since: 1.5
135#
136# Example:
137#
138# -> { "execute": "query-tpm" }
139# <- { "return":
140# [
141# { "model": "tpm-tis",
142# "options":
143# { "type": "passthrough",
144# "data":
145# { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
146# "path": "/dev/tpm0"
147# }
148# },
149# "id": "tpm0"
150# }
151# ]
152# }
153#
154##
155{ 'command': 'query-tpm', 'returns': ['TPMInfo'] }