]> git.proxmox.com Git - mirror_qemu.git/blame - qapi/tpm.json
Merge tag 'pull-halloween-omnibus-311023-2' of https://gitlab.com/stsquad/qemu into...
[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
a937b6aa 15#
4ab6cb4c 16# @tpm-crb: TPM CRB model (since 2.12)
a937b6aa 17#
3676bc69 18# @tpm-spapr: TPM SPAPR model (since 5.0)
3859b6cf
MA
19#
20# Since: 1.5
21##
caff255a 22{ 'enum': 'TpmModel', 'data': [ 'tpm-tis', 'tpm-crb', 'tpm-spapr' ],
8a9f1e1d 23 'if': 'CONFIG_TPM' }
caff255a 24
3859b6cf
MA
25##
26# @query-tpm-models:
27#
28# Return a list of supported TPM models
29#
30# Returns: a list of TpmModel
31#
32# Since: 1.5
33#
34# Example:
35#
36# -> { "execute": "query-tpm-models" }
3676bc69 37# <- { "return": [ "tpm-tis", "tpm-crb", "tpm-spapr" ] }
3859b6cf 38##
caff255a 39{ 'command': 'query-tpm-models', 'returns': ['TpmModel'],
8a9f1e1d 40 'if': 'CONFIG_TPM' }
3859b6cf
MA
41
42##
43# @TpmType:
44#
45# An enumeration of TPM types
46#
47# @passthrough: TPM passthrough type
a937b6aa 48#
94546de1 49# @emulator: Software Emulator TPM type (since 2.11)
3859b6cf
MA
50#
51# Since: 1.5
52##
caff255a 53{ 'enum': 'TpmType', 'data': [ 'passthrough', 'emulator' ],
8a9f1e1d 54 'if': 'CONFIG_TPM' }
3859b6cf
MA
55
56##
57# @query-tpm-types:
58#
59# Return a list of supported TPM types
60#
61# Returns: a list of TpmType
62#
63# Since: 1.5
64#
65# Example:
66#
67# -> { "execute": "query-tpm-types" }
f4ede81e 68# <- { "return": [ "passthrough", "emulator" ] }
3859b6cf 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#
a937b6aa
MA
80# @cancel-path: string showing the TPM's sysfs cancel file for
81# cancellation of TPM commands while they are executing
3859b6cf
MA
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#
a937b6aa
MA
123# A union referencing different TPM backend types' configuration
124# options
3859b6cf 125#
a937b6aa
MA
126# @type:
127# - 'passthrough' The configuration options for the TPM
128# passthrough type
129# - 'emulator' The configuration options for TPM emulator backend
130# type
3859b6cf
MA
131#
132# Since: 1.5
133##
134{ 'union': 'TpmTypeOptions',
39dc3e4a
MA
135 'base': { 'type': 'TpmType' },
136 'discriminator': 'type',
137 'data': { 'passthrough' : 'TPMPassthroughOptionsWrapper',
138 'emulator': 'TPMEmulatorOptionsWrapper' },
8a9f1e1d 139 'if': 'CONFIG_TPM' }
3859b6cf
MA
140
141##
142# @TPMInfo:
143#
144# Information about the TPM
145#
146# @id: The Id of the TPM
147#
148# @model: The TPM frontend model
149#
150# @options: The TPM (backend) type configuration options
151#
152# Since: 1.5
153##
154{ 'struct': 'TPMInfo',
155 'data': {'id': 'str',
156 'model': 'TpmModel',
caff255a 157 'options': 'TpmTypeOptions' },
8a9f1e1d 158 'if': 'CONFIG_TPM' }
3859b6cf
MA
159
160##
161# @query-tpm:
162#
163# Return information about the TPM device
164#
165# Returns: @TPMInfo on success
166#
167# Since: 1.5
168#
169# Example:
170#
171# -> { "execute": "query-tpm" }
172# <- { "return":
173# [
174# { "model": "tpm-tis",
175# "options":
176# { "type": "passthrough",
177# "data":
178# { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
179# "path": "/dev/tpm0"
180# }
181# },
182# "id": "tpm0"
183# }
184# ]
185# }
3859b6cf 186##
caff255a 187{ 'command': 'query-tpm', 'returns': ['TPMInfo'],
8a9f1e1d 188 'if': 'CONFIG_TPM' }