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