]> git.proxmox.com Git - mirror_qemu.git/blob - qapi/tpm.json
qapi-schema: Collect TPM stuff in qapi/tpm.json
[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 #
15 # Since: 1.5
16 ##
17 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
18
19 ##
20 # @query-tpm-models:
21 #
22 # Return a list of supported TPM models
23 #
24 # Returns: a list of TpmModel
25 #
26 # Since: 1.5
27 #
28 # Example:
29 #
30 # -> { "execute": "query-tpm-models" }
31 # <- { "return": [ "tpm-tis" ] }
32 #
33 ##
34 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
35
36 ##
37 # @TpmType:
38 #
39 # An enumeration of TPM types
40 #
41 # @passthrough: TPM passthrough type
42 #
43 # Since: 1.5
44 ##
45 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
46
47 ##
48 # @query-tpm-types:
49 #
50 # Return a list of supported TPM types
51 #
52 # Returns: a list of TpmType
53 #
54 # Since: 1.5
55 #
56 # Example:
57 #
58 # -> { "execute": "query-tpm-types" }
59 # <- { "return": [ "passthrough" ] }
60 #
61 ##
62 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
63
64 ##
65 # @TPMPassthroughOptions:
66 #
67 # Information about the TPM passthrough type
68 #
69 # @path: string describing the path used for accessing the TPM device
70 #
71 # @cancel-path: string showing the TPM's sysfs cancel file
72 # for cancellation of TPM commands while they are executing
73 #
74 # Since: 1.5
75 ##
76 { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
77 '*cancel-path' : 'str'} }
78
79 ##
80 # @TpmTypeOptions:
81 #
82 # A union referencing different TPM backend types' configuration options
83 #
84 # @type: 'passthrough' The configuration options for the TPM passthrough type
85 #
86 # Since: 1.5
87 ##
88 { 'union': 'TpmTypeOptions',
89 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
90
91 ##
92 # @TPMInfo:
93 #
94 # Information about the TPM
95 #
96 # @id: The Id of the TPM
97 #
98 # @model: The TPM frontend model
99 #
100 # @options: The TPM (backend) type configuration options
101 #
102 # Since: 1.5
103 ##
104 { 'struct': 'TPMInfo',
105 'data': {'id': 'str',
106 'model': 'TpmModel',
107 'options': 'TpmTypeOptions' } }
108
109 ##
110 # @query-tpm:
111 #
112 # Return information about the TPM device
113 #
114 # Returns: @TPMInfo on success
115 #
116 # Since: 1.5
117 #
118 # Example:
119 #
120 # -> { "execute": "query-tpm" }
121 # <- { "return":
122 # [
123 # { "model": "tpm-tis",
124 # "options":
125 # { "type": "passthrough",
126 # "data":
127 # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
128 # "path": "/dev/tpm0"
129 # }
130 # },
131 # "id": "tpm0"
132 # }
133 # ]
134 # }
135 #
136 ##
137 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }