daemon: Move TLS initialization to virInitialize
[libvirt/zwu.git] / docs / api_extension / 0015-remove-dead-xen-code.patch
blob56b99a3355a9a4a450cef00aa6126eb6934ad69e
1 From b013788742183afec9aa5068d3cfd185a3b5c62e Mon Sep 17 00:00:00 2001
2 From: Eric Blake <eblake@redhat.com>
3 Date: Thu, 7 Oct 2010 08:59:27 -0600
4 Subject: [PATCH 15/15] vcpu: remove dead xen code
6 * src/xen/xen_driver.h (xenUnifiedDriver): Remove now-unused
7 domainGetMaxVcpus, domainSetVcpus.
8 * src/xen/proxy_internal.c (xenProxyDriver): Likewise.
9 * src/xen/xen_hypervisor.c (xenHypervisorDriver): Likewise.
10 * src/xen/xen_inotify.c (xenInotifyDriver): Likewise.
11 * src/xen/xend_internal.c (xenDaemonDriver)
12 (xenDaemonDomainSetVcpus): Likewise.
13 * src/xen/xm_internal.c (xenXMDriver, xenXMDomainSetVcpus):
14 Likewise.
15 * src/xen/xs_internal.c (xenStoreDriver): Likewise.
16 ---
17 src/xen/proxy_internal.c | 2 --
18 src/xen/xen_driver.h | 4 +---
19 src/xen/xen_hypervisor.c | 2 --
20 src/xen/xen_inotify.c | 2 --
21 src/xen/xend_internal.c | 33 ---------------------------------
22 src/xen/xm_internal.c | 43 -------------------------------------------
23 src/xen/xs_internal.c | 2 --
24 7 files changed, 1 insertions(+), 87 deletions(-)
26 diff --git a/src/xen/proxy_internal.c b/src/xen/proxy_internal.c
27 index 335dfc4..4033727 100644
28 --- a/src/xen/proxy_internal.c
29 +++ b/src/xen/proxy_internal.c
30 @@ -67,10 +67,8 @@ struct xenUnifiedDriver xenProxyDriver = {
31 NULL, /* domainSave */
32 NULL, /* domainRestore */
33 NULL, /* domainCoreDump */
34 - NULL, /* domainSetVcpus */
35 NULL, /* domainPinVcpu */
36 NULL, /* domainGetVcpus */
37 - NULL, /* domainGetMaxVcpus */
38 NULL, /* listDefinedDomains */
39 NULL, /* numOfDefinedDomains */
40 NULL, /* domainCreate */
41 diff --git a/src/xen/xen_driver.h b/src/xen/xen_driver.h
42 index 115a26a..53f97d4 100644
43 --- a/src/xen/xen_driver.h
44 +++ b/src/xen/xen_driver.h
45 @@ -1,7 +1,7 @@
47 * xen_unified.c: Unified Xen driver.
49 - * Copyright (C) 2007 Red Hat, Inc.
50 + * Copyright (C) 2007, 2010 Red Hat, Inc.
52 * See COPYING.LIB for the License of this software
54 @@ -84,10 +84,8 @@ struct xenUnifiedDriver {
55 virDrvDomainSave domainSave;
56 virDrvDomainRestore domainRestore;
57 virDrvDomainCoreDump domainCoreDump;
58 - virDrvDomainSetVcpus domainSetVcpus;
59 virDrvDomainPinVcpu domainPinVcpu;
60 virDrvDomainGetVcpus domainGetVcpus;
61 - virDrvDomainGetMaxVcpus domainGetMaxVcpus;
62 virDrvListDefinedDomains listDefinedDomains;
63 virDrvNumOfDefinedDomains numOfDefinedDomains;
64 virDrvDomainCreate domainCreate;
65 diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
66 index 6246513..3797865 100644
67 --- a/src/xen/xen_hypervisor.c
68 +++ b/src/xen/xen_hypervisor.c
69 @@ -784,10 +784,8 @@ struct xenUnifiedDriver xenHypervisorDriver = {
70 NULL, /* domainSave */
71 NULL, /* domainRestore */
72 NULL, /* domainCoreDump */
73 - xenHypervisorSetVcpus, /* domainSetVcpus */
74 xenHypervisorPinVcpu, /* domainPinVcpu */
75 xenHypervisorGetVcpus, /* domainGetVcpus */
76 - xenHypervisorGetVcpuMax, /* domainGetMaxVcpus */
77 NULL, /* listDefinedDomains */
78 NULL, /* numOfDefinedDomains */
79 NULL, /* domainCreate */
80 diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c
81 index d24b20f..9507061 100644
82 --- a/src/xen/xen_inotify.c
83 +++ b/src/xen/xen_inotify.c
84 @@ -71,10 +71,8 @@ struct xenUnifiedDriver xenInotifyDriver = {
85 NULL, /* domainSave */
86 NULL, /* domainRestore */
87 NULL, /* domainCoreDump */
88 - NULL, /* domainSetVcpus */
89 NULL, /* domainPinVcpu */
90 NULL, /* domainGetVcpus */
91 - NULL, /* domainGetMaxVcpus */
92 NULL, /* listDefinedDomains */
93 NULL, /* numOfDefinedDomains */
94 NULL, /* domainCreate */
95 diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
96 index 55c2cc4..b90c331 100644
97 --- a/src/xen/xend_internal.c
98 +++ b/src/xen/xend_internal.c
99 @@ -3611,37 +3611,6 @@ xenDaemonDomainSetVcpusFlags(virDomainPtr domain, unsigned int vcpus,
103 - * xenDaemonDomainSetVcpus:
104 - * @domain: pointer to domain object
105 - * @nvcpus: the new number of virtual CPUs for this domain
107 - * Dynamically change the number of virtual CPUs used by the domain.
109 - * Returns 0 for success; -1 (with errno) on error
110 - */
111 -int
112 -xenDaemonDomainSetVcpus(virDomainPtr domain, unsigned int vcpus)
114 - char buf[VIR_UUID_BUFLEN];
115 - xenUnifiedPrivatePtr priv;
117 - if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)
118 - || (vcpus < 1)) {
119 - virXendError(VIR_ERR_INVALID_ARG, __FUNCTION__);
120 - return (-1);
123 - priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
125 - if (domain->id < 0 && priv->xendConfigVersion < 3)
126 - return(-1);
128 - snprintf(buf, sizeof(buf), "%d", vcpus);
129 - return(xend_op(domain->conn, domain->name, "op", "set_vcpus", "vcpus",
130 - buf, NULL));
133 -/**
134 * xenDaemonDomainPinCpu:
135 * @domain: pointer to domain object
136 * @vcpu: virtual CPU number
137 @@ -5213,10 +5182,8 @@ struct xenUnifiedDriver xenDaemonDriver = {
138 xenDaemonDomainSave, /* domainSave */
139 xenDaemonDomainRestore, /* domainRestore */
140 xenDaemonDomainCoreDump, /* domainCoreDump */
141 - xenDaemonDomainSetVcpus, /* domainSetVcpus */
142 xenDaemonDomainPinVcpu, /* domainPinVcpu */
143 xenDaemonDomainGetVcpus, /* domainGetVcpus */
144 - NULL, /* domainGetMaxVcpus */
145 xenDaemonListDefinedDomains, /* listDefinedDomains */
146 xenDaemonNumOfDefinedDomains,/* numOfDefinedDomains */
147 xenDaemonDomainCreate, /* domainCreate */
148 diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
149 index 2b8e51e..430d40b 100644
150 --- a/src/xen/xm_internal.c
151 +++ b/src/xen/xm_internal.c
152 @@ -103,10 +103,8 @@ struct xenUnifiedDriver xenXMDriver = {
153 NULL, /* domainSave */
154 NULL, /* domainRestore */
155 NULL, /* domainCoreDump */
156 - xenXMDomainSetVcpus, /* domainSetVcpus */
157 xenXMDomainPinVcpu, /* domainPinVcpu */
158 NULL, /* domainGetVcpus */
159 - NULL, /* domainGetMaxVcpus */
160 xenXMListDefinedDomains, /* listDefinedDomains */
161 xenXMNumOfDefinedDomains, /* numOfDefinedDomains */
162 xenXMDomainCreate, /* domainCreate */
163 @@ -1630,47 +1628,6 @@ cleanup:
167 - * Set the VCPU count in config
168 - */
169 -int xenXMDomainSetVcpus(virDomainPtr domain, unsigned int vcpus) {
170 - xenUnifiedPrivatePtr priv;
171 - const char *filename;
172 - xenXMConfCachePtr entry;
173 - int ret = -1;
175 - if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
176 - xenXMError(VIR_ERR_INVALID_ARG, __FUNCTION__);
177 - return (-1);
179 - if (domain->conn->flags & VIR_CONNECT_RO)
180 - return (-1);
181 - if (domain->id != -1)
182 - return (-1);
184 - priv = domain->conn->privateData;
185 - xenUnifiedLock(priv);
187 - if (!(filename = virHashLookup(priv->nameConfigMap, domain->name)))
188 - goto cleanup;
190 - if (!(entry = virHashLookup(priv->configCache, filename)))
191 - goto cleanup;
193 - entry->def->maxvcpus = entry->def->vcpus = vcpus;
195 - /* If this fails, should we try to undo our changes to the
196 - * in-memory representation of the config file. I say not!
197 - */
198 - if (xenXMConfigSaveFile(domain->conn, entry->filename, entry->def) < 0)
199 - goto cleanup;
200 - ret = 0;
202 -cleanup:
203 - xenUnifiedUnlock(priv);
204 - return ret;
208 * xenXMDomainSetVcpusFlags:
209 * @domain: pointer to domain object
210 * @nvcpus: number of vcpus
211 diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c
212 index 9296f25..a9817b1 100644
213 --- a/src/xen/xs_internal.c
214 +++ b/src/xen/xs_internal.c
215 @@ -67,10 +67,8 @@ struct xenUnifiedDriver xenStoreDriver = {
216 NULL, /* domainSave */
217 NULL, /* domainRestore */
218 NULL, /* domainCoreDump */
219 - NULL, /* domainSetVcpus */
220 NULL, /* domainPinVcpu */
221 NULL, /* domainGetVcpus */
222 - NULL, /* domainGetMaxVcpus */
223 NULL, /* listDefinedDomains */
224 NULL, /* numOfDefinedDomains */
225 NULL, /* domainCreate */
227 1.7.2.3