]> git.proxmox.com Git - mirror_qemu.git/blame - qapi/tpm.json
qapi: Fix misspelled section tags in doc comments
[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##
caff255a 20{ 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb', 'tpm-spapr' ],
8a9f1e1d 21 'if': 'CONFIG_TPM' }
caff255a 22
3859b6cf
MA
23##
24# @query-tpm-models:
25#
26# Return a list of supported TPM models
27#
28# Returns: a list of TpmModel
29#
30# Since: 1.5
31#
32# Example:
33#
34# -> { "execute": "query-tpm-models" }
3676bc69 35# <- { "return": [ "tpm-tis", "tpm-crb", "tpm-spapr" ] }
3859b6cf
MA
36#
37##
caff255a 38{ 'command': 'query-tpm-models', 'returns': ['TpmModel'],
8a9f1e1d 39 'if': 'CONFIG_TPM' }
3859b6cf
MA
40
41##
42# @TpmType:
43#
44# An enumeration of TPM types
45#
46# @passthrough: TPM passthrough type
f4ede81e
AV
47# @emulator: Software Emulator TPM type
48# Since: 2.11
3859b6cf
MA
49#
50# Since: 1.5
51##
caff255a 52{ 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ],
8a9f1e1d 53 'if': 'CONFIG_TPM' }
3859b6cf
MA
54
55##
56# @query-tpm-types:
57#
58# Return a list of supported TPM types
59#
60# Returns: a list of TpmType
61#
62# Since: 1.5
63#
64# Example:
65#
66# -> { "execute": "query-tpm-types" }
f4ede81e 67# <- { "return": [ "passthrough", "emulator" ] }
3859b6cf
MA
68#
69##
caff255a 70{ 'command': 'query-tpm-types', 'returns': ['TpmType'],
8a9f1e1d 71 'if': 'CONFIG_TPM' }
3859b6cf
MA
72
73##
74# @TPMPassthroughOptions:
75#
76# Information about the TPM passthrough type
77#
78# @path: string describing the path used for accessing the TPM device
79#
80# @cancel-path: string showing the TPM's sysfs cancel file
81# for cancellation of TPM commands while they are executing
82#
83# Since: 1.5
84##
b0ddeba2
MAL
85{ 'struct': 'TPMPassthroughOptions',
86 'data': { '*path': 'str',
caff255a 87 '*cancel-path': 'str' },
8a9f1e1d 88 'if': 'CONFIG_TPM' }
3859b6cf 89
f4ede81e
AV
90##
91# @TPMEmulatorOptions:
92#
93# Information about the TPM emulator type
94#
95# @chardev: Name of a unix socket chardev
96#
97# Since: 2.11
98##
caff255a 99{ 'struct': 'TPMEmulatorOptions', 'data': { 'chardev' : 'str' },
8a9f1e1d 100 'if': 'CONFIG_TPM' }
f4ede81e 101
39dc3e4a
MA
102##
103# @TPMPassthroughOptionsWrapper:
104#
105# Since: 1.5
106##
107{ 'struct': 'TPMPassthroughOptionsWrapper',
108 'data': { 'data': 'TPMPassthroughOptions' },
109 'if': 'CONFIG_TPM' }
110
111##
112# @TPMEmulatorOptionsWrapper:
113#
114# Since: 2.11
115##
116{ 'struct': 'TPMEmulatorOptionsWrapper',
117 'data': { 'data': 'TPMEmulatorOptions' },
118 'if': 'CONFIG_TPM' }
119
3859b6cf
MA
120##
121# @TpmTypeOptions:
122#
123# A union referencing different TPM backend types' configuration options
124#
e050e426
PM
125# @type: - 'passthrough' The configuration options for the TPM passthrough type
126# - 'emulator' The configuration options for TPM emulator backend type
3859b6cf
MA
127#
128# Since: 1.5
129##
130{ 'union': 'TpmTypeOptions',
39dc3e4a
MA
131 'base': { 'type': 'TpmType' },
132 'discriminator': 'type',
133 'data': { 'passthrough' : 'TPMPassthroughOptionsWrapper',
134 'emulator': 'TPMEmulatorOptionsWrapper' },
8a9f1e1d 135 'if': 'CONFIG_TPM' }
3859b6cf
MA
136
137##
138# @TPMInfo:
139#
140# Information about the TPM
141#
142# @id: The Id of the TPM
143#
144# @model: The TPM frontend model
145#
146# @options: The TPM (backend) type configuration options
147#
148# Since: 1.5
149##
150{ 'struct': 'TPMInfo',
151 'data': {'id': 'str',
152 'model': 'TpmModel',
caff255a 153 'options': 'TpmTypeOptions' },
8a9f1e1d 154 'if': 'CONFIG_TPM' }
3859b6cf
MA
155
156##
157# @query-tpm:
158#
159# Return information about the TPM device
160#
161# Returns: @TPMInfo on success
162#
163# Since: 1.5
164#
165# Example:
166#
167# -> { "execute": "query-tpm" }
168# <- { "return":
169# [
170# { "model": "tpm-tis",
171# "options":
172# { "type": "passthrough",
173# "data":
174# { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
175# "path": "/dev/tpm0"
176# }
177# },
178# "id": "tpm0"
179# }
180# ]
181# }
182#
183##
caff255a 184{ 'command': 'query-tpm', 'returns': ['TPMInfo'],
8a9f1e1d 185 'if': 'CONFIG_TPM' }