]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vcpu: remove dead xen code
authorEric Blake <eblake@redhat.com>
Thu, 7 Oct 2010 14:59:27 +0000 (08:59 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 19 Oct 2010 16:07:10 +0000 (10:07 -0600)
* src/xen/xen_driver.h (xenUnifiedDriver): Remove now-unused
domainGetMaxVcpus, domainSetVcpus.
* src/xen/proxy_internal.c (xenProxyDriver): Likewise.
* src/xen/xen_hypervisor.c (xenHypervisorDriver): Likewise.
* src/xen/xen_inotify.c (xenInotifyDriver): Likewise.
* src/xen/xend_internal.c (xenDaemonDriver)
(xenDaemonDomainSetVcpus): Likewise.
* src/xen/xm_internal.c (xenXMDriver, xenXMDomainSetVcpus):
Likewise.
* src/xen/xs_internal.c (xenStoreDriver): Likewise.

src/xen/proxy_internal.c
src/xen/xen_driver.h
src/xen/xen_hypervisor.c
src/xen/xen_inotify.c
src/xen/xend_internal.c
src/xen/xm_internal.c
src/xen/xs_internal.c

index 335dfc4f12222605a153f8a2bda2f32bc563a73f..40337273554384ac8f6823d9e9eba32c05ac77d5 100644 (file)
@@ -67,10 +67,8 @@ struct xenUnifiedDriver xenProxyDriver = {
     NULL, /* domainSave */
     NULL, /* domainRestore */
     NULL, /* domainCoreDump */
-    NULL, /* domainSetVcpus */
     NULL, /* domainPinVcpu */
     NULL, /* domainGetVcpus */
-    NULL, /* domainGetMaxVcpus */
     NULL, /* listDefinedDomains */
     NULL, /* numOfDefinedDomains */
     NULL, /* domainCreate */
index 115a26a57afc1cfff8a9339bdbc26a0811a057ca..53f97d4748b75a12c4988ec2cb0961fb279c9f02 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * xen_unified.c: Unified Xen driver.
  *
- * Copyright (C) 2007 Red Hat, Inc.
+ * Copyright (C) 2007, 2010 Red Hat, Inc.
  *
  * See COPYING.LIB for the License of this software
  *
@@ -84,10 +84,8 @@ struct xenUnifiedDriver {
         virDrvDomainSave               domainSave;
         virDrvDomainRestore            domainRestore;
         virDrvDomainCoreDump           domainCoreDump;
-        virDrvDomainSetVcpus           domainSetVcpus;
         virDrvDomainPinVcpu            domainPinVcpu;
         virDrvDomainGetVcpus           domainGetVcpus;
-        virDrvDomainGetMaxVcpus                domainGetMaxVcpus;
         virDrvListDefinedDomains       listDefinedDomains;
         virDrvNumOfDefinedDomains      numOfDefinedDomains;
         virDrvDomainCreate             domainCreate;
index 6246513dc47c8e46ca29c0efe70a1c11892ece0f..3797865e52772b5d3870e7a7a44987c2b3a6d8af 100644 (file)
@@ -784,10 +784,8 @@ struct xenUnifiedDriver xenHypervisorDriver = {
     NULL, /* domainSave */
     NULL, /* domainRestore */
     NULL, /* domainCoreDump */
-    xenHypervisorSetVcpus, /* domainSetVcpus */
     xenHypervisorPinVcpu, /* domainPinVcpu */
     xenHypervisorGetVcpus, /* domainGetVcpus */
-    xenHypervisorGetVcpuMax, /* domainGetMaxVcpus */
     NULL, /* listDefinedDomains */
     NULL, /* numOfDefinedDomains */
     NULL, /* domainCreate */
index d24b20f0c4f3a057c5233c9ad5a2d04125142405..950706162d8e7fa5fc154da591c63e3129589a86 100644 (file)
@@ -71,10 +71,8 @@ struct xenUnifiedDriver xenInotifyDriver = {
     NULL, /* domainSave */
     NULL, /* domainRestore */
     NULL, /* domainCoreDump */
-    NULL, /* domainSetVcpus */
     NULL, /* domainPinVcpu */
     NULL, /* domainGetVcpus */
-    NULL, /* domainGetMaxVcpus */
     NULL, /* listDefinedDomains */
     NULL, /* numOfDefinedDomains */
     NULL, /* domainCreate */
index 55c2cc4c16a2620dfd97b12bdd721a4d4f349ac8..b90c33140f39a0400cb3c749de85f829ec31fcb5 100644 (file)
@@ -3610,37 +3610,6 @@ xenDaemonDomainSetVcpusFlags(virDomainPtr domain, unsigned int vcpus,
                    buf, NULL);
 }
 
-/**
- * xenDaemonDomainSetVcpus:
- * @domain: pointer to domain object
- * @nvcpus: the new number of virtual CPUs for this domain
- *
- * Dynamically change the number of virtual CPUs used by the domain.
- *
- * Returns 0 for success; -1 (with errno) on error
- */
-int
-xenDaemonDomainSetVcpus(virDomainPtr domain, unsigned int vcpus)
-{
-    char buf[VIR_UUID_BUFLEN];
-    xenUnifiedPrivatePtr priv;
-
-    if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)
-     || (vcpus < 1)) {
-        virXendError(VIR_ERR_INVALID_ARG, __FUNCTION__);
-        return (-1);
-    }
-
-    priv = (xenUnifiedPrivatePtr) domain->conn->privateData;
-
-    if (domain->id < 0 && priv->xendConfigVersion < 3)
-        return(-1);
-
-    snprintf(buf, sizeof(buf), "%d", vcpus);
-    return(xend_op(domain->conn, domain->name, "op", "set_vcpus", "vcpus",
-                   buf, NULL));
-}
-
 /**
  * xenDaemonDomainPinCpu:
  * @domain: pointer to domain object
@@ -5213,10 +5182,8 @@ struct xenUnifiedDriver xenDaemonDriver = {
     xenDaemonDomainSave,         /* domainSave */
     xenDaemonDomainRestore,      /* domainRestore */
     xenDaemonDomainCoreDump,     /* domainCoreDump */
-    xenDaemonDomainSetVcpus,     /* domainSetVcpus */
     xenDaemonDomainPinVcpu,      /* domainPinVcpu */
     xenDaemonDomainGetVcpus,     /* domainGetVcpus */
-    NULL,                        /* domainGetMaxVcpus */
     xenDaemonListDefinedDomains, /* listDefinedDomains */
     xenDaemonNumOfDefinedDomains,/* numOfDefinedDomains */
     xenDaemonDomainCreate,       /* domainCreate */
index 2b8e51ec57e9193fa96bf59776a47e4fb51fea33..430d40b5f69f73ab163cda937037892df2a97f93 100644 (file)
@@ -103,10 +103,8 @@ struct xenUnifiedDriver xenXMDriver = {
     NULL, /* domainSave */
     NULL, /* domainRestore */
     NULL, /* domainCoreDump */
-    xenXMDomainSetVcpus, /* domainSetVcpus */
     xenXMDomainPinVcpu, /* domainPinVcpu */
     NULL, /* domainGetVcpus */
-    NULL, /* domainGetMaxVcpus */
     xenXMListDefinedDomains, /* listDefinedDomains */
     xenXMNumOfDefinedDomains, /* numOfDefinedDomains */
     xenXMDomainCreate, /* domainCreate */
@@ -1629,47 +1627,6 @@ cleanup:
     return ret;
 }
 
-/*
- * Set the VCPU count in config
- */
-int xenXMDomainSetVcpus(virDomainPtr domain, unsigned int vcpus) {
-    xenUnifiedPrivatePtr priv;
-    const char *filename;
-    xenXMConfCachePtr entry;
-    int ret = -1;
-
-    if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
-        xenXMError(VIR_ERR_INVALID_ARG, __FUNCTION__);
-        return (-1);
-    }
-    if (domain->conn->flags & VIR_CONNECT_RO)
-        return (-1);
-    if (domain->id != -1)
-        return (-1);
-
-    priv = domain->conn->privateData;
-    xenUnifiedLock(priv);
-
-    if (!(filename = virHashLookup(priv->nameConfigMap, domain->name)))
-        goto cleanup;
-
-    if (!(entry = virHashLookup(priv->configCache, filename)))
-        goto cleanup;
-
-    entry->def->maxvcpus = entry->def->vcpus = vcpus;
-
-    /* If this fails, should we try to undo our changes to the
-     * in-memory representation of the config file. I say not!
-     */
-    if (xenXMConfigSaveFile(domain->conn, entry->filename, entry->def) < 0)
-        goto cleanup;
-    ret = 0;
-
-cleanup:
-    xenUnifiedUnlock(priv);
-    return ret;
-}
-
 /*
  * xenXMDomainSetVcpusFlags:
  * @domain: pointer to domain object
index 9296f25ffff94a80c0baaca0ca81a3c8ca75aca0..a9817b10ea3c1f68042e9af661558e3a56db2c8d 100644 (file)
@@ -67,10 +67,8 @@ struct xenUnifiedDriver xenStoreDriver = {
     NULL, /* domainSave */
     NULL, /* domainRestore */
     NULL, /* domainCoreDump */
-    NULL, /* domainSetVcpus */
     NULL, /* domainPinVcpu */
     NULL, /* domainGetVcpus */
-    NULL, /* domainGetMaxVcpus */
     NULL, /* listDefinedDomains */
     NULL, /* numOfDefinedDomains */
     NULL, /* domainCreate */