summaryrefslogtreecommitdiff
path: root/docs/api_extension/0003-Step-3-of-15-define-internal-driver-API.patch
blob: 2156d974c507b3c942df80c57c39c2000a1e5611 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
From dd255d64053e9960cd375994ce8f056522e12acc Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@redhat.com>
Date: Mon, 27 Sep 2010 09:18:22 -0600
Subject: [PATCH 03/15] vcpu: define internal driver API

* src/driver.h (virDrvDomainSetVcpusFlags)
(virDrvDomainGetVcpusFlags): New typedefs.
(_virDriver): New callback members.
* src/esx/esx_driver.c (esxDriver): Add stub for driver.
* src/lxc/lxc_driver.c (lxcDriver): Likewise.
* src/opennebula/one_driver.c (oneDriver): Likewise.
* src/openvz/openvz_driver.c (openvzDriver): Likewise.
* src/phyp/phyp_driver.c (phypDriver): Likewise.
* src/qemu/qemu_driver.c (qemuDriver): Likewise.
* src/remote/remote_driver.c (remote_driver): Likewise.
* src/test/test_driver.c (testDriver): Likewise.
* src/uml/uml_driver.c (umlDriver): Likewise.
* src/vbox/vbox_tmpl.c (Driver): Likewise.
* src/xen/xen_driver.c (xenUnifiedDriver): Likewise.
* src/xenapi/xenapi_driver.c (xenapiDriver): Likewise.
---
 src/driver.h                |    9 +++++++++
 src/esx/esx_driver.c        |    2 ++
 src/lxc/lxc_driver.c        |    2 ++
 src/opennebula/one_driver.c |    2 ++
 src/openvz/openvz_driver.c  |    2 ++
 src/phyp/phyp_driver.c      |    2 ++
 src/qemu/qemu_driver.c      |    2 ++
 src/remote/remote_driver.c  |    2 ++
 src/test/test_driver.c      |    2 ++
 src/uml/uml_driver.c        |    2 ++
 src/vbox/vbox_tmpl.c        |    2 ++
 src/xen/xen_driver.c        |    2 ++
 src/xenapi/xenapi_driver.c  |    2 ++
 13 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/src/driver.h b/src/driver.h
index 32aeb04..79a96c1 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -185,6 +185,13 @@ typedef int
         (*virDrvDomainSetVcpus)		(virDomainPtr domain,
                                          unsigned int nvcpus);
 typedef int
+        (*virDrvDomainSetVcpusFlags)	(virDomainPtr domain,
+                                         unsigned int nvcpus,
+                                         unsigned int flags);
+typedef int
+        (*virDrvDomainGetVcpusFlags)	(virDomainPtr domain,
+                                         unsigned int flags);
+typedef int
         (*virDrvDomainPinVcpu)		(virDomainPtr domain,
                                          unsigned int vcpu,
                                          unsigned char *cpumap,
@@ -520,6 +527,8 @@ struct _virDriver {
     virDrvDomainRestore		domainRestore;
     virDrvDomainCoreDump		domainCoreDump;
     virDrvDomainSetVcpus		domainSetVcpus;
+    virDrvDomainSetVcpusFlags		domainSetVcpusFlags;
+    virDrvDomainGetVcpusFlags		domainGetVcpusFlags;
     virDrvDomainPinVcpu		domainPinVcpu;
     virDrvDomainGetVcpus		domainGetVcpus;
     virDrvDomainGetMaxVcpus		domainGetMaxVcpus;
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 1b4ee29..2a32374 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -4160,6 +4160,8 @@ static virDriver esxDriver = {
     NULL,                            /* domainRestore */
     NULL,                            /* domainCoreDump */
     esxDomainSetVcpus,               /* domainSetVcpus */
+    NULL,                            /* domainSetVcpusFlags */
+    NULL,                            /* domainGetVcpusFlags */
     NULL,                            /* domainPinVcpu */
     NULL,                            /* domainGetVcpus */
     esxDomainGetMaxVcpus,            /* domainGetMaxVcpus */
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index df814da..7563a8c 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -2768,6 +2768,8 @@ static virDriver lxcDriver = {
     NULL, /* domainRestore */
     NULL, /* domainCoreDump */
     NULL, /* domainSetVcpus */
+    NULL, /* domainSetVcpusFlags */
+    NULL, /* domainGetVcpusFlags */
     NULL, /* domainPinVcpu */
     NULL, /* domainGetVcpus */
     NULL, /* domainGetMaxVcpus */
diff --git a/src/opennebula/one_driver.c b/src/opennebula/one_driver.c
index ced9a38..199fca3 100644
--- a/src/opennebula/one_driver.c
+++ b/src/opennebula/one_driver.c
@@ -751,6 +751,8 @@ static virDriver oneDriver = {
     NULL, /* domainRestore */
     NULL, /* domainCoreDump */
     NULL, /* domainSetVcpus */
+    NULL, /* domainSetVcpusFlags */
+    NULL, /* domainGetVcpusFlags */
     NULL, /* domainPinVcpu */
     NULL, /* domainGetVcpus */
     NULL, /* domainGetMaxVcpus */
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 92cf4a1..9d19aeb 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -1590,6 +1590,8 @@ static virDriver openvzDriver = {
     NULL, /* domainRestore */
     NULL, /* domainCoreDump */
     openvzDomainSetVcpus, /* domainSetVcpus */
+    NULL, /* domainSetVcpusFlags */
+    NULL, /* domainGetVcpusFlags */
     NULL, /* domainPinVcpu */
     NULL, /* domainGetVcpus */
     openvzDomainGetMaxVcpus, /* domainGetMaxVcpus */
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index e63d8d9..6e0a5e9 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -3941,6 +3941,8 @@ static virDriver phypDriver = {
     NULL,                       /* domainRestore */
     NULL,                       /* domainCoreDump */
     phypDomainSetCPU,           /* domainSetVcpus */
+    NULL,                       /* domainSetVcpusFlags */
+    NULL,                       /* domainGetVcpusFlags */
     NULL,                       /* domainPinVcpu */
     NULL,                       /* domainGetVcpus */
     phypGetLparCPUMAX,          /* domainGetMaxVcpus */
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index abd8e9d..3d17e04 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12938,6 +12938,8 @@ static virDriver qemuDriver = {
     qemudDomainRestore, /* domainRestore */
     qemudDomainCoreDump, /* domainCoreDump */
     qemudDomainSetVcpus, /* domainSetVcpus */
+    NULL, /* domainSetVcpusFlags */
+    NULL, /* domainGetVcpusFlags */
     qemudDomainPinVcpu, /* domainPinVcpu */
     qemudDomainGetVcpus, /* domainGetVcpus */
     qemudDomainGetMaxVcpus, /* domainGetMaxVcpus */
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 0b10406..1a687ad 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -10468,6 +10468,8 @@ static virDriver remote_driver = {
     remoteDomainRestore, /* domainRestore */
     remoteDomainCoreDump, /* domainCoreDump */
     remoteDomainSetVcpus, /* domainSetVcpus */
+    NULL, /* domainSetVcpusFlags */
+    NULL, /* domainGetVcpusFlags */
     remoteDomainPinVcpu, /* domainPinVcpu */
     remoteDomainGetVcpus, /* domainGetVcpus */
     remoteDomainGetMaxVcpus, /* domainGetMaxVcpus */
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 7d4d119..6a00558 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5260,6 +5260,8 @@ static virDriver testDriver = {
     testDomainRestore, /* domainRestore */
     testDomainCoreDump, /* domainCoreDump */
     testSetVcpus, /* domainSetVcpus */
+    NULL, /* domainSetVcpusFlags */
+    NULL, /* domainGetVcpusFlags */
     testDomainPinVcpu, /* domainPinVcpu */
     testDomainGetVcpus, /* domainGetVcpus */
     testDomainGetMaxVcpus, /* domainGetMaxVcpus */
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 3dcd321..5161012 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -2129,6 +2129,8 @@ static virDriver umlDriver = {
     NULL, /* domainRestore */
     NULL, /* domainCoreDump */
     NULL, /* domainSetVcpus */
+    NULL, /* domainSetVcpusFlags */
+    NULL, /* domainGetVcpusFlags */
     NULL, /* domainPinVcpu */
     NULL, /* domainGetVcpus */
     NULL, /* domainGetMaxVcpus */
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 7e7d8e4..cb9193a 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -8267,6 +8267,8 @@ virDriver NAME(Driver) = {
     NULL, /* domainRestore */
     NULL, /* domainCoreDump */
     vboxDomainSetVcpus, /* domainSetVcpus */
+    NULL, /* domainSetVcpusFlags */
+    NULL, /* domainGetVcpusFlags */
     NULL, /* domainPinVcpu */
     NULL, /* domainGetVcpus */
     vboxDomainGetMaxVcpus, /* domainGetMaxVcpus */
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index c2a4de3..7d67ced 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -1951,6 +1951,8 @@ static virDriver xenUnifiedDriver = {
     xenUnifiedDomainRestore, /* domainRestore */
     xenUnifiedDomainCoreDump, /* domainCoreDump */
     xenUnifiedDomainSetVcpus, /* domainSetVcpus */
+    NULL, /* domainSetVcpusFlags */
+    NULL, /* domainGetVcpusFlags */
     xenUnifiedDomainPinVcpu, /* domainPinVcpu */
     xenUnifiedDomainGetVcpus, /* domainGetVcpus */
     xenUnifiedDomainGetMaxVcpus, /* domainGetMaxVcpus */
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index e62a139..753169c 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -1754,6 +1754,8 @@ static virDriver xenapiDriver = {
     NULL, /* domainRestore */
     NULL, /* domainCoreDump */
     xenapiDomainSetVcpus, /* domainSetVcpus */
+    NULL, /* domainSetVcpusFlags */
+    NULL, /* domainGetVcpusFlags */
     xenapiDomainPinVcpu, /* domainPinVcpu */
     xenapiDomainGetVcpus, /* domainGetVcpus */
     xenapiDomainGetMaxVcpus, /* domainGetMaxVcpus */
-- 
1.7.2.3