[libvirt] [PATCHv2 0/2] Fix snapshot-revert and managedsave with host-passthrough CPU mode
by Ján Tomko
Ján Tomko (2):
Use UPDATE_CPU when saving domain status
Ignore missing CPU model for HOST_PASSTHROUGH
src/conf/cpu_conf.c | 4 +-
src/conf/domain_conf.c | 1 +
...argv-cpu-host-passthrough-features-invalid.args | 22 +++++++++
...2argv-cpu-host-passthrough-features-invalid.xml | 55 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 1 +
5 files changed, 81 insertions(+), 2 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-host-passthrough-features-invalid.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-cpu-host-passthrough-features-invalid.xml
--
2.0.4
10 years
[libvirt] [PATCH] nodeinfo: report error when failure in nodeSetMemoryParameters
by Jincheng Miao
nodeSetMemoryParameters() will call nodeSetMemoryParameterValue()
to set parameters. But it just filter the return code '-2' as
failure. Indeed we should report error when rc is negative.
https://bugzilla.redhat.com/show_bug.cgi?id=1161541
Signed-off-by: Jincheng Miao <jmiao(a)redhat.com>
---
src/nodeinfo.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 2e2fffa..3c22ebc 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -1374,8 +1374,7 @@ nodeSetMemoryParameters(virTypedParameterPtr params ATTRIBUTE_UNUSED,
for (i = 0; i < nparams; i++) {
rc = nodeSetMemoryParameterValue(¶ms[i]);
- /* Out of memory */
- if (rc == -2)
+ if (rc < 0)
return -1;
}
--
1.7.1
10 years
[libvirt] [PATCH v2] phyp: Fix NULL dereference in phypConnectOpen
by Martin Kletzander
Coverity found out that commit cd490086 caused a possible NULL pointer
dereference. This is due to the fact, that phyp_driver is NULL at the
time of closing the socket, instead of connection_data, which kept the
socket before the mentioned commit, could not be NULL.
However, internal_socket is still the local socket that can be
closed, even unconditionally, if we initialize it to -1.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/phyp/phyp_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 7c8bc5c..386d25f 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1128,7 +1128,7 @@ phypConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth, unsigned int flags)
{
LIBSSH2_SESSION *session = NULL;
- int internal_socket;
+ int internal_socket = -1;
uuid_tablePtr uuid_table = NULL;
phyp_driverPtr phyp_driver = NULL;
char *char_ptr;
@@ -1232,7 +1232,7 @@ phypConnectOpen(virConnectPtr conn,
libssh2_session_free(session);
}
- VIR_FORCE_CLOSE(phyp_driver->sock);
+ VIR_FORCE_CLOSE(internal_socket);
return VIR_DRV_OPEN_ERROR;
}
--
2.1.3
10 years
[libvirt] [PATCH] security:selinux: Fix crash when tcon is NULL
by Luyao Huang
https://bugzilla.redhat.com/show_bug.cgi?id=1161831
Libvirtd will crash when parameter tcon = NULL in virSecuritySELinuxSetFileconHelper
function, because libvirt do not check the first parameter when use strcmp().
Add a check for tcon before use strcmp() and output a error in log when tcon is NULL.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/security/security_selinux.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index f96be50..4fd09b8 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -887,6 +887,11 @@ virSecuritySELinuxSetFileconHelper(const char *path, char *tcon, bool optional)
int setfilecon_errno = errno;
if (getfilecon_raw(path, &econ) >= 0) {
+ if (tcon == NULL) {
+ virReportSystemError(errno,"%s",
+ _("Invalid security context : NULL"));
+ return -1;
+ }
if (STREQ(tcon, econ)) {
freecon(econ);
/* It's alright, there's nothing to change anyway. */
--
1.8.3.1
10 years
[libvirt] [PATCH] phyp: Fix NULL dereference in phypConnectOpen
by Martin Kletzander
Coverity found out that commit cd490086 caused a possible NULL pointer
dereference. This is due to the fact, that phyp_driver might be
NULL (if VIR_ALLOC() fails), but connection_data, which kept the socket
before the mentioned commit, could not be NULL.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/phyp/phyp_driver.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 7c8bc5c..0d3ad53 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1222,6 +1222,7 @@ phypConnectOpen(virConnectPtr conn,
if (phyp_driver != NULL) {
virObjectUnref(phyp_driver->caps);
virObjectUnref(phyp_driver->xmlopt);
+ VIR_FORCE_CLOSE(phyp_driver->sock);
VIR_FREE(phyp_driver);
}
@@ -1232,8 +1233,6 @@ phypConnectOpen(virConnectPtr conn,
libssh2_session_free(session);
}
- VIR_FORCE_CLOSE(phyp_driver->sock);
-
return VIR_DRV_OPEN_ERROR;
}
--
2.1.3
10 years
[libvirt] [Bug report] - vm start failed after image snapshot rebase
by weiwei li
Hi ,
I hit a bug with libvirt+ qemu+kvm when doing follow steps:
1.initial status :vm = base+z(z is a snapshot)
2. call snapshotCreateXML( ): vm = base+z +z'
3. call blockRebase( ): vm = base+z''(z rebase to z')
4 .(after rebasing work done) vm shutdown and then start
an error accord like this:
unable to set user and group to '0:0' on
'/tvm/tvm/405b9ea5-10a7-4e56-946d-58e93e2688d6/405b9ea5-10a7-4e56-946d-58e93e2688d6.vda_20141101044033':
No such file or directory
A second start may sucess.
I debugged with gdb and found that the error message was cauesed by
virSecurityDACSetSecurityDiskLabel misuse the disk chain(that is base+z
+z',
after rebase), and z' was deleted yet.
why virSecurityDACSetSecurityDiskLabel used old disk chain after rebasing
?
I finally find that In qemuProcessHandleBlockJob when rebase complete, disk
chain in vm->def is updated but vm->newDef is not(when vm->newDef is not
null). In shutdown( actrully in qemuProcessStop ), if vm->newDef is not
null , vm->def will be replaced by vm->newDef, which contains a wrong disk
chain!!! the next start will failed with above message.
10 years
[libvirt] [PATCH v2] esx: Simplify VI (vSphere) API and VMware product version handling
by Matthias Bolte
Store version numbers in this format
version = 1000000 * major + 1000 * minor + micro
produced by virParseVersionString instead of dedicated enums.
Split the complex esxVI_ProductVersion enum into a simpler
esxVI_ProductLine enum and a product version number.
Relax API and product version number checks to accept everything that
is equal or greater than the supported minimum version. VMware ESX
went through 3 major versions and the vSphere API always stayed
backward compatible. This commit assumes that this will also be true
for future VMware ESX versions.
Also reword error messages in esxConnectTo* to say what was expected
and what was found instead (suggested by Richard W.M. Jones).
---
v2: - Fix copy&paste accident that replaced hostname with conn->uri->server
in esxConnectToVCenter
- Fix and improve commit message
src/esx/esx_driver.c | 59 +++++---------
src/esx/esx_vi.c | 215 ++++++++++++++++++++++++++-------------------------
src/esx/esx_vi.h | 55 +++----------
3 files changed, 140 insertions(+), 189 deletions(-)
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 39784b9..64265ed 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -646,9 +646,9 @@ esxConnectToHost(esxPrivate *priv,
esxVI_String *propertyNameList = NULL;
esxVI_ObjectContent *hostSystem = NULL;
esxVI_Boolean inMaintenanceMode = esxVI_Boolean_Undefined;
- esxVI_ProductVersion expectedProductVersion = STRCASEEQ(conn->uri->scheme, "esx")
- ? esxVI_ProductVersion_ESX
- : esxVI_ProductVersion_GSX;
+ esxVI_ProductLine expectedProductLine = STRCASEEQ(conn->uri->scheme, "esx")
+ ? esxVI_ProductLine_ESX
+ : esxVI_ProductLine_GSX;
if (!vCenterIpAddress || *vCenterIpAddress) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid argument"));
@@ -695,25 +695,13 @@ esxConnectToHost(esxPrivate *priv,
goto cleanup;
}
- if (expectedProductVersion == esxVI_ProductVersion_ESX) {
- if (priv->host->productVersion != esxVI_ProductVersion_ESX35 &&
- priv->host->productVersion != esxVI_ProductVersion_ESX40 &&
- priv->host->productVersion != esxVI_ProductVersion_ESX41 &&
- priv->host->productVersion != esxVI_ProductVersion_ESX4x &&
- priv->host->productVersion != esxVI_ProductVersion_ESX50 &&
- priv->host->productVersion != esxVI_ProductVersion_ESX51 &&
- priv->host->productVersion != esxVI_ProductVersion_ESX5x) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("%s is neither an ESX 3.5, 4.x nor 5.x host"),
- conn->uri->server);
- goto cleanup;
- }
- } else { /* GSX */
- if (priv->host->productVersion != esxVI_ProductVersion_GSX20) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("%s isn't a GSX 2.0 host"), conn->uri->server);
- goto cleanup;
- }
+ if (priv->host->productLine != expectedProductLine) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Expecting '%s' to be a %s host, but found a %s host"),
+ conn->uri->server,
+ esxVI_ProductLineToDisplayName(expectedProductLine),
+ esxVI_ProductLineToDisplayName(priv->host->productLine));
+ goto cleanup;
}
/* Query the host for maintenance mode and vCenter IP address */
@@ -815,16 +803,12 @@ esxConnectToVCenter(esxPrivate *priv,
goto cleanup;
}
- if (priv->vCenter->productVersion != esxVI_ProductVersion_VPX25 &&
- priv->vCenter->productVersion != esxVI_ProductVersion_VPX40 &&
- priv->vCenter->productVersion != esxVI_ProductVersion_VPX41 &&
- priv->vCenter->productVersion != esxVI_ProductVersion_VPX4x &&
- priv->vCenter->productVersion != esxVI_ProductVersion_VPX50 &&
- priv->vCenter->productVersion != esxVI_ProductVersion_VPX51 &&
- priv->vCenter->productVersion != esxVI_ProductVersion_VPX5x) {
+ if (priv->vCenter->productLine != esxVI_ProductLine_VPX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("%s is neither a vCenter 2.5, 4.x nor 5.x server"),
- hostname);
+ _("Expecting '%s' to be a %s host but found a %s host"),
+ hostname,
+ esxVI_ProductLineToDisplayName(esxVI_ProductLine_VPX),
+ esxVI_ProductLineToDisplayName(priv->vCenter->productLine));
goto cleanup;
}
@@ -1217,14 +1201,7 @@ esxConnectGetVersion(virConnectPtr conn, unsigned long *version)
{
esxPrivate *priv = conn->privateData;
- if (virParseVersionString(priv->primary->service->about->version,
- version, false) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not parse version number from '%s'"),
- priv->primary->service->about->version);
-
- return -1;
- }
+ *version = priv->primary->productVersion;
return 0;
}
@@ -2934,7 +2911,7 @@ esxConnectDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
}
virtualHW_version = esxVI_ProductVersionToDefaultVirtualHWVersion
- (priv->primary->productVersion);
+ (priv->primary->productLine, priv->primary->productVersion);
if (virtualHW_version < 0) {
return NULL;
@@ -3190,7 +3167,7 @@ esxDomainDefineXML(virConnectPtr conn, const char *xml)
/* Build VMX from domain XML */
virtualHW_version = esxVI_ProductVersionToDefaultVirtualHWVersion
- (priv->primary->productVersion);
+ (priv->primary->productLine, priv->primary->productVersion);
if (virtualHW_version < 0) {
goto cleanup;
diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index b00d8e7..d28b8e0 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -1040,98 +1040,77 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
return -1;
}
- if (STREQ(ctx->service->about->apiType, "HostAgent") ||
- STREQ(ctx->service->about->apiType, "VirtualCenter")) {
- if (STRPREFIX(ctx->service->about->apiVersion, "2.5")) {
- ctx->apiVersion = esxVI_APIVersion_25;
- } else if (STRPREFIX(ctx->service->about->apiVersion, "4.0")) {
- ctx->apiVersion = esxVI_APIVersion_40;
- } else if (STRPREFIX(ctx->service->about->apiVersion, "4.1")) {
- ctx->apiVersion = esxVI_APIVersion_41;
- } else if (STRPREFIX(ctx->service->about->apiVersion, "4.")) {
- ctx->apiVersion = esxVI_APIVersion_4x;
- } else if (STRPREFIX(ctx->service->about->apiVersion, "5.0")) {
- ctx->apiVersion = esxVI_APIVersion_50;
- } else if (STRPREFIX(ctx->service->about->apiVersion, "5.1")) {
- ctx->apiVersion = esxVI_APIVersion_51;
- } else if (STRPREFIX(ctx->service->about->apiVersion, "5.")) {
- ctx->apiVersion = esxVI_APIVersion_5x;
- } else {
+ if (STRNEQ(ctx->service->about->apiType, "HostAgent") &&
+ STRNEQ(ctx->service->about->apiType, "VirtualCenter")) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Expecting VI API type 'HostAgent' or 'VirtualCenter' "
+ "but found '%s'"), ctx->service->about->apiType);
+ return -1;
+ }
+
+ if (virParseVersionString(ctx->service->about->apiVersion,
+ &ctx->apiVersion, true) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Could not parse VI API version '%s'"),
+ ctx->service->about->apiVersion);
+ return -1;
+ }
+
+ if (ctx->apiVersion < 1000000 * 2 + 1000 * 5 /* 2.5 */) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Minimum supported %s version is %s but found version '%s'"),
+ "VI API", "2.5", ctx->service->about->apiVersion);
+ return -1;
+ }
+
+ if (virParseVersionString(ctx->service->about->version,
+ &ctx->productVersion, true) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Could not parse product version '%s'"),
+ ctx->service->about->version);
+ return -1;
+ }
+
+ if (STREQ(ctx->service->about->productLineId, "gsx")) {
+ if (ctx->productVersion < 1000000 * 2 + 1000 * 0 /* 2.0 */) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VI API major/minor version '2.5', '4.x' or "
- "'5.x' but found '%s'"), ctx->service->about->apiVersion);
+ _("Minimum supported %s version is %s but found version '%s'"),
+ esxVI_ProductLineToDisplayName(esxVI_ProductLine_GSX),
+ "2.0", ctx->service->about->version);
return -1;
}
- if (STREQ(ctx->service->about->productLineId, "gsx")) {
- if (STRPREFIX(ctx->service->about->version, "2.0")) {
- ctx->productVersion = esxVI_ProductVersion_GSX20;
- } else {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting GSX major/minor version '2.0' but "
- "found '%s'"), ctx->service->about->version);
- return -1;
- }
- } else if (STREQ(ctx->service->about->productLineId, "esx") ||
- STREQ(ctx->service->about->productLineId, "embeddedEsx")) {
- if (STRPREFIX(ctx->service->about->version, "3.5")) {
- ctx->productVersion = esxVI_ProductVersion_ESX35;
- } else if (STRPREFIX(ctx->service->about->version, "4.0")) {
- ctx->productVersion = esxVI_ProductVersion_ESX40;
- } else if (STRPREFIX(ctx->service->about->version, "4.1")) {
- ctx->productVersion = esxVI_ProductVersion_ESX41;
- } else if (STRPREFIX(ctx->service->about->version, "4.")) {
- ctx->productVersion = esxVI_ProductVersion_ESX4x;
- } else if (STRPREFIX(ctx->service->about->version, "5.0")) {
- ctx->productVersion = esxVI_ProductVersion_ESX50;
- } else if (STRPREFIX(ctx->service->about->version, "5.1")) {
- ctx->productVersion = esxVI_ProductVersion_ESX51;
- } else if (STRPREFIX(ctx->service->about->version, "5.")) {
- ctx->productVersion = esxVI_ProductVersion_ESX5x;
- } else {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting ESX major/minor version '3.5', "
- "'4.x' or '5.x' but found '%s'"),
- ctx->service->about->version);
- return -1;
- }
- } else if (STREQ(ctx->service->about->productLineId, "vpx")) {
- if (STRPREFIX(ctx->service->about->version, "2.5")) {
- ctx->productVersion = esxVI_ProductVersion_VPX25;
- } else if (STRPREFIX(ctx->service->about->version, "4.0")) {
- ctx->productVersion = esxVI_ProductVersion_VPX40;
- } else if (STRPREFIX(ctx->service->about->version, "4.1")) {
- ctx->productVersion = esxVI_ProductVersion_VPX41;
- } else if (STRPREFIX(ctx->service->about->version, "4.")) {
- ctx->productVersion = esxVI_ProductVersion_VPX4x;
- } else if (STRPREFIX(ctx->service->about->version, "5.0")) {
- ctx->productVersion = esxVI_ProductVersion_VPX50;
- } else if (STRPREFIX(ctx->service->about->version, "5.1")) {
- ctx->productVersion = esxVI_ProductVersion_VPX51;
- } else if (STRPREFIX(ctx->service->about->version, "5.")) {
- ctx->productVersion = esxVI_ProductVersion_VPX5x;
- } else {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VPX major/minor version '2.5', '4.x' "
- "or '5.x' but found '%s'"),
- ctx->service->about->version);
- return -1;
- }
- } else {
+ ctx->productLine = esxVI_ProductLine_GSX;
+ } else if (STREQ(ctx->service->about->productLineId, "esx") ||
+ STREQ(ctx->service->about->productLineId, "embeddedEsx")) {
+ if (ctx->productVersion < 1000000 * 3 + 1000 * 5 /* 3.5 */) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Minimum supported %s version is %s but found version '%s'"),
+ esxVI_ProductLineToDisplayName(esxVI_ProductLine_ESX),
+ "3.5", ctx->service->about->version);
+ return -1;
+ }
+
+ ctx->productLine = esxVI_ProductLine_ESX;
+ } else if (STREQ(ctx->service->about->productLineId, "vpx")) {
+ if (ctx->productVersion < 1000000 * 2 + 1000 * 5 /* 2.5 */) {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting product 'gsx' or 'esx' or 'embeddedEsx' "
- "or 'vpx' but found '%s'"),
- ctx->service->about->productLineId);
+ _("Minimum supported %s version is %s but found version '%s'"),
+ esxVI_ProductLineToDisplayName(esxVI_ProductLine_VPX),
+ "2.5", ctx->service->about->version);
return -1;
}
+
+ ctx->productLine = esxVI_ProductLine_VPX;
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Expecting VI API type 'HostAgent' or 'VirtualCenter' "
- "but found '%s'"), ctx->service->about->apiType);
+ _("Expecting product 'gsx' or 'esx' or 'embeddedEsx' "
+ "or 'vpx' but found '%s'"),
+ ctx->service->about->productLineId);
return -1;
}
- if (ctx->productVersion & esxVI_ProductVersion_ESX) {
+ if (ctx->productLine == esxVI_ProductLine_ESX) {
/*
* FIXME: Actually this should be detected by really calling
* QueryVirtualDiskUuid and checking if a NotImplemented fault is
@@ -1142,7 +1121,7 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
ctx->hasQueryVirtualDiskUuid = true;
}
- if (ctx->productVersion & esxVI_ProductVersion_VPX) {
+ if (ctx->productLine == esxVI_ProductLine_VPX) {
ctx->hasSessionIsActive = true;
}
@@ -4770,9 +4749,33 @@ esxVI_ParseHostCpuIdInfo(esxVI_ParsedHostCpuIdInfo *parsedHostCpuIdInfo,
+const char *
+esxVI_ProductLineToDisplayName(esxVI_ProductLine productLine)
+{
+ switch (productLine) {
+ case esxVI_ProductLine_GSX:
+ return "Server/GSX";
+
+ case esxVI_ProductLine_ESX:
+ return "ESX(i)";
+
+ case esxVI_ProductLine_VPX:
+ return "vCenter/VPX";
+
+ default:
+ return "<unknown>";
+ }
+}
+
+
+
int
-esxVI_ProductVersionToDefaultVirtualHWVersion(esxVI_ProductVersion productVersion)
+esxVI_ProductVersionToDefaultVirtualHWVersion(esxVI_ProductLine productLine,
+ unsigned long productVersion)
{
+ /* product version == 1000000 * major + 1000 * minor + micro */
+ int major = productVersion / 1000000;
+
/*
* virtualHW.version compatibility matrix:
*
@@ -4785,35 +4788,39 @@ esxVI_ProductVersionToDefaultVirtualHWVersion(esxVI_ProductVersion productVersio
* ESX 5.5 + + + + + 5.5
* GSX 2.0 + + 2.5
*/
- switch (productVersion) {
- case esxVI_ProductVersion_ESX35:
- case esxVI_ProductVersion_VPX25:
- return 4;
-
- case esxVI_ProductVersion_GSX20:
- case esxVI_ProductVersion_ESX40:
- case esxVI_ProductVersion_ESX41:
- case esxVI_ProductVersion_VPX40:
- case esxVI_ProductVersion_VPX41:
+ switch (productLine) {
+ case esxVI_ProductLine_GSX:
return 7;
- case esxVI_ProductVersion_ESX4x:
- case esxVI_ProductVersion_VPX4x:
- return 7;
+ case esxVI_ProductLine_ESX:
+ switch (major) {
+ case 3:
+ return 4;
- case esxVI_ProductVersion_ESX50:
- case esxVI_ProductVersion_VPX50:
- return 8;
+ case 4:
+ return 7;
- case esxVI_ProductVersion_ESX51:
- case esxVI_ProductVersion_ESX5x:
- case esxVI_ProductVersion_VPX51:
- case esxVI_ProductVersion_VPX5x:
- return 8;
+ case 5:
+ default:
+ return 8;
+ }
+
+ case esxVI_ProductLine_VPX:
+ switch (major) {
+ case 2:
+ return 4;
+
+ case 4:
+ return 7;
+
+ case 5:
+ default:
+ return 8;
+ }
default:
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("Unexpected product version"));
+ _("Unexpected product line"));
return -1;
}
}
diff --git a/src/esx/esx_vi.h b/src/esx/esx_vi.h
index dac36cd..b7f0160 100644
--- a/src/esx/esx_vi.h
+++ b/src/esx/esx_vi.h
@@ -75,8 +75,7 @@
-typedef enum _esxVI_APIVersion esxVI_APIVersion;
-typedef enum _esxVI_ProductVersion esxVI_ProductVersion;
+typedef enum _esxVI_ProductLine esxVI_ProductLine;
typedef enum _esxVI_Occurrence esxVI_Occurrence;
typedef struct _esxVI_ParsedHostCpuIdInfo esxVI_ParsedHostCpuIdInfo;
typedef struct _esxVI_CURL esxVI_CURL;
@@ -90,45 +89,10 @@ typedef struct _esxVI_List esxVI_List;
-enum _esxVI_APIVersion {
- esxVI_APIVersion_Undefined = 0,
- esxVI_APIVersion_Unknown,
- esxVI_APIVersion_25,
- esxVI_APIVersion_40,
- esxVI_APIVersion_41,
- esxVI_APIVersion_4x, /* > 4.1 */
- esxVI_APIVersion_50,
- esxVI_APIVersion_51,
- esxVI_APIVersion_5x /* > 5.1 */
-};
-
-/*
- * AAAABBBB: where AAAA0000 is the product and BBBB the version. this format
- * allows simple bitmask testing for a product independent of the version
- */
-enum _esxVI_ProductVersion {
- esxVI_ProductVersion_Undefined = 0,
-
- esxVI_ProductVersion_GSX = (1 << 0) << 16,
- esxVI_ProductVersion_GSX20 = esxVI_ProductVersion_GSX | 1,
-
- esxVI_ProductVersion_ESX = (1 << 1) << 16,
- esxVI_ProductVersion_ESX35 = esxVI_ProductVersion_ESX | 1,
- esxVI_ProductVersion_ESX40 = esxVI_ProductVersion_ESX | 2,
- esxVI_ProductVersion_ESX41 = esxVI_ProductVersion_ESX | 3,
- esxVI_ProductVersion_ESX4x = esxVI_ProductVersion_ESX | 4, /* > 4.1 */
- esxVI_ProductVersion_ESX50 = esxVI_ProductVersion_ESX | 5,
- esxVI_ProductVersion_ESX51 = esxVI_ProductVersion_ESX | 6,
- esxVI_ProductVersion_ESX5x = esxVI_ProductVersion_ESX | 7, /* > 5.1 */
-
- esxVI_ProductVersion_VPX = (1 << 2) << 16,
- esxVI_ProductVersion_VPX25 = esxVI_ProductVersion_VPX | 1,
- esxVI_ProductVersion_VPX40 = esxVI_ProductVersion_VPX | 2,
- esxVI_ProductVersion_VPX41 = esxVI_ProductVersion_VPX | 3,
- esxVI_ProductVersion_VPX4x = esxVI_ProductVersion_VPX | 4, /* > 4.1 */
- esxVI_ProductVersion_VPX50 = esxVI_ProductVersion_VPX | 5,
- esxVI_ProductVersion_VPX51 = esxVI_ProductVersion_VPX | 6,
- esxVI_ProductVersion_VPX5x = esxVI_ProductVersion_VPX | 7 /* > 5.1 */
+enum _esxVI_ProductLine {
+ esxVI_ProductLine_GSX = 0,
+ esxVI_ProductLine_ESX,
+ esxVI_ProductLine_VPX
};
enum _esxVI_Occurrence {
@@ -226,8 +190,9 @@ struct _esxVI_Context {
char *username;
char *password;
esxVI_ServiceContent *service;
- esxVI_APIVersion apiVersion;
- esxVI_ProductVersion productVersion;
+ unsigned long apiVersion; /* = 1000000 * major + 1000 * minor + micro */
+ esxVI_ProductLine productLine;
+ unsigned long productVersion; /* = 1000000 * major + 1000 * minor + micro */
esxVI_UserSession *session; /* ... except the session ... */
virMutexPtr sessionLock; /* ... that is protected by this mutex */
esxVI_Datacenter *datacenter;
@@ -536,8 +501,10 @@ int esxVI_WaitForTaskCompletion(esxVI_Context *ctx,
int esxVI_ParseHostCpuIdInfo(esxVI_ParsedHostCpuIdInfo *parsedHostCpuIdInfo,
esxVI_HostCpuIdInfo *hostCpuIdInfo);
+const char *esxVI_ProductLineToDisplayName(esxVI_ProductLine productLine);
+
int esxVI_ProductVersionToDefaultVirtualHWVersion
- (esxVI_ProductVersion productVersion);
+ (esxVI_ProductLine productLine, unsigned long productVersion);
int esxVI_LookupHostInternetScsiHbaStaticTargetByName
(esxVI_Context *ctx, const char *name,
--
1.8.3.2
10 years
[libvirt] [PATCH 0/2] Resolve fc_host startup config issues
by John Ferlan
Fix a couple of bugs related to attempting to start an fc_host with
incorrect 'parent' attributes. One consideration is a parent that is
not capable to support the vport operations and the other is providing
the incorrect scsi_host# for the parent from the nodedev-create used
to generate the wwnn,wwpn
Updated the documentation in order to add some more cautions I've find
during my investigation and make it clearer what must be provided.
John Ferlan (2):
storage: Check for valid fc_host parent at startup
storage: Ensure fc_host parent matches wwnn/wwpn
docs/formatstorage.html.in | 15 ++++-
src/storage/storage_backend_scsi.c | 115 ++++++++++++++++++++++++++++++++++---
2 files changed, 119 insertions(+), 11 deletions(-)
--
1.9.3
10 years
[libvirt] [PATCH] domain_conf: Use virDomainParseMemory more widely
by Michal Privoznik
As reviewing patches upstream it occurred to me, that we have two
functions doing nearly the same: virDomainParseMemory which
expects XML in the following format:
<memory unit='MiB'>1337</memory>
The other function being virDomainHugepagesParseXML expecting the
following format:
<someElement memory='1337' unit='MiB'/>
It wouldn't matter to have two functions handle two different
scenarios like this if we could only not copy code that handles
32bit arches around. So this code merges the common parts into
one by inventing new @units_xpath argument to
virDomainParseMemory which allows overriding the default location
of @unit attribute in XML. With this change both scenarios above
can be parsed with virDomainParseMemory. Sweet. Of course,
everything is commented as it should be.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/domain_conf.c | 137 +++++++++++++++++++++++++++++--------------------
1 file changed, 80 insertions(+), 57 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 21309b0..e097af7 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6318,14 +6318,30 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
goto cleanup;
}
-
-/* Parse a value located at XPATH within CTXT, and store the
- * result into val. If REQUIRED, then the value must exist;
- * otherwise, the value is optional. The value is in bytes.
- * Return 1 on success, 0 if the value was not present and
- * is not REQUIRED, -1 on failure after issuing error. */
+/**
+ * virDomainParseScaledValue:
+ * @bytes_xpath: XPath to memory amount
+ * @units_xpath: XPath to units attribute
+ * @ctxt: XPath context
+ * @val: scaled value is stored here
+ * @scale: default scale for @val
+ * @max: maximal @val allowed
+ * @required: is the value required?
+ *
+ * Parse a value located at @bytes_xpath within @ctxt, and store
+ * the result into @val. By default, if @units_xpath is NULL the
+ * unit attribute must be an attribute to @bytes_xpath.
+ * Otherwise, the unit attribute is looked for under specified
+ * path. If @required is set, then the value must exist;
+ * otherwise, the value is optional. The value is in bytes.
+ *
+ * Returns 1 on success,
+ * 0 if the value was not present and !@required,
+ * -1 on failure after issuing error.
+ */
static int
-virDomainParseScaledValue(const char *xpath,
+virDomainParseScaledValue(const char *bytes_xpath,
+ const char *units_xpath,
xmlXPathContextPtr ctxt,
unsigned long long *val,
unsigned long long scale,
@@ -6339,7 +6355,7 @@ virDomainParseScaledValue(const char *xpath,
unsigned long long bytes;
*val = 0;
- if (virAsprintf(&xpath_full, "string(%s)", xpath) < 0)
+ if (virAsprintf(&xpath_full, "string(%s)", bytes_xpath) < 0)
goto cleanup;
bytes_str = virXPathString(xpath_full, ctxt);
@@ -6348,8 +6364,8 @@ virDomainParseScaledValue(const char *xpath,
ret = 0;
} else {
virReportError(VIR_ERR_XML_ERROR,
- _("missing element %s"),
- xpath);
+ _("missing element or attribute '%s'"),
+ bytes_xpath);
}
goto cleanup;
}
@@ -6357,12 +6373,15 @@ virDomainParseScaledValue(const char *xpath,
if (virStrToLong_ullp(bytes_str, NULL, 10, &bytes) < 0) {
virReportError(VIR_ERR_XML_ERROR,
- _("Invalid value '%s' for element '%s'"),
- bytes_str, xpath);
+ _("Invalid value '%s' for element or attribute '%s'"),
+ bytes_str, bytes_xpath);
goto cleanup;
}
- if (virAsprintf(&xpath_full, "string(%s/@unit)", xpath) < 0)
+ if ((units_xpath &&
+ virAsprintf(&xpath_full, "string(%s)", units_xpath) < 0) ||
+ (!units_xpath &&
+ virAsprintf(&xpath_full, "string(%s/@unit)", bytes_xpath) < 0))
goto cleanup;
unit = virXPathString(xpath_full, ctxt);
@@ -6379,17 +6398,35 @@ virDomainParseScaledValue(const char *xpath,
}
-/* Parse a memory element located at XPATH within CTXT, and store the
- * result into MEM, in blocks of 1024. If REQUIRED, then the value
- * must exist; otherwise, the value is optional. The value must not
- * exceed VIR_DOMAIN_MEMORY_PARAM_UNLIMITED once scaled; additionally,
- * if CAPPED is true, the value must fit within an unsigned long (only
- * matters on 32-bit platforms).
+/**
+ * virDomainParseMemory:
+ * @bytes_xpath: XPath to memory amount
+ * @units_xpath: XPath to units attribute
+ * @ctxt: XPath context
+ * @mem: scaled memory amount is stored here
+ * @required: whether value is required
+ * @capped: whether scaled value must fit within unsigned long
*
- * Return 0 on success, -1 on failure after issuing error. */
+ * Parse a memory element or attribute located at @bytes_xpath
+ * within @ctxt, and store the result into @mem, in blocks of
+ * 1024. By default, if @units_xpath is NULL the unit attribute
+ * must be an attribute to @bytes_xpath. Otherwise, the unit
+ * attribute is looked for under specified path. If @required is
+ * set, then the value must exist; otherwise, the value is
+ * optional. The value must not exceed
+ * VIR_DOMAIN_MEMORY_PARAM_UNLIMITED once scaled; additionally,
+ * if @capped is true, the value must fit within an unsigned long
+ * (only matters on 32-bit platforms).
+ *
+ * Return 0 on success, -1 on failure after issuing error.
+ */
static int
-virDomainParseMemory(const char *xpath, xmlXPathContextPtr ctxt,
- unsigned long long *mem, bool required, bool capped)
+virDomainParseMemory(const char *bytes_xpath,
+ const char *units_xpath,
+ xmlXPathContextPtr ctxt,
+ unsigned long long *mem,
+ bool required,
+ bool capped)
{
int ret = -1;
unsigned long long bytes, max;
@@ -6401,7 +6438,8 @@ virDomainParseMemory(const char *xpath, xmlXPathContextPtr ctxt,
else
max = LLONG_MAX;
- ret = virDomainParseScaledValue(xpath, ctxt, &bytes, 1024, max, required);
+ ret = virDomainParseScaledValue(bytes_xpath, units_xpath, ctxt,
+ &bytes, 1024, max, required);
if (ret < 0)
goto cleanup;
@@ -6585,8 +6623,8 @@ virDomainControllerDefParseXML(xmlNodePtr node,
"should have index 0"));
goto error;
}
- if ((rc = virDomainParseScaledValue("./pcihole64", ctxt,
- &bytes, 1024,
+ if ((rc = virDomainParseScaledValue("./pcihole64", NULL,
+ ctxt, &bytes, 1024,
1024ULL * ULONG_MAX, false)) < 0)
goto error;
@@ -6684,14 +6722,14 @@ virDomainFSDefParseXML(xmlNodePtr node,
def->accessmode = VIR_DOMAIN_FS_ACCESSMODE_PASSTHROUGH;
}
- if (virDomainParseScaledValue("./space_hard_limit[1]", ctxt,
- &def->space_hard_limit, 1,
- ULLONG_MAX, false) < 0)
+ if (virDomainParseScaledValue("./space_hard_limit[1]",
+ NULL, ctxt, &def->space_hard_limit,
+ 1, ULLONG_MAX, false) < 0)
goto error;
- if (virDomainParseScaledValue("./space_soft_limit[1]", ctxt,
- &def->space_soft_limit, 1,
- ULLONG_MAX, false) < 0)
+ if (virDomainParseScaledValue("./space_soft_limit[1]",
+ NULL, ctxt, &def->space_soft_limit,
+ 1, ULLONG_MAX, false) < 0)
goto error;
cur = node->children;
@@ -9824,8 +9862,8 @@ virDomainShmemDefParseXML(xmlNodePtr node,
goto cleanup;
}
- if (virDomainParseScaledValue("./size[1]", ctxt, &def->size,
- 1, ULLONG_MAX, false) < 0)
+ if (virDomainParseScaledValue("./size[1]", NULL, ctxt,
+ &def->size, 1, ULLONG_MAX, false) < 0)
goto cleanup;
if ((server = virXPathNode("./server[1]", ctxt))) {
@@ -11965,30 +12003,15 @@ virDomainHugepagesParseXML(xmlNodePtr node,
{
int ret = -1;
xmlNodePtr oldnode = ctxt->node;
- unsigned long long bytes, max;
char *unit = NULL, *nodeset = NULL;
ctxt->node = node;
- /* On 32-bit machines, our bound is 0xffffffff * KiB. On 64-bit
- * machines, our bound is off_t (2^63). */
- if (sizeof(unsigned long) < sizeof(long long))
- max = 1024ull * ULONG_MAX;
- else
- max = LLONG_MAX;
-
- if (virXPathULongLong("string(./@size)", ctxt, &bytes) < 0) {
- virReportError(VIR_ERR_XML_DETAIL, "%s",
- _("unable to parse size attribute"));
- goto cleanup;
- }
-
- unit = virXPathString("string(./@unit)", ctxt);
-
- if (virScaleInteger(&bytes, unit, 1024, max) < 0)
+ if (virDomainParseMemory("./@size", "./@unit", ctxt,
+ &hugepage->size, true, false) < 0)
goto cleanup;
- if (!(hugepage->size = VIR_DIV_UP(bytes, 1024))) {
+ if (!hugepage->size) {
virReportError(VIR_ERR_XML_DETAIL, "%s",
_("hugepage size can't be zero"));
goto cleanup;
@@ -12225,11 +12248,11 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error;
/* Extract domain memory */
- if (virDomainParseMemory("./memory[1]", ctxt,
+ if (virDomainParseMemory("./memory[1]", NULL, ctxt,
&def->mem.max_balloon, true, true) < 0)
goto error;
- if (virDomainParseMemory("./currentMemory[1]", ctxt,
+ if (virDomainParseMemory("./currentMemory[1]", NULL, ctxt,
&def->mem.cur_balloon, false, true) < 0)
goto error;
@@ -12349,19 +12372,19 @@ virDomainDefParseXML(xmlDocPtr xml,
VIR_FREE(nodes);
/* Extract other memory tunables */
- if (virDomainParseMemory("./memtune/hard_limit[1]", ctxt,
+ if (virDomainParseMemory("./memtune/hard_limit[1]", NULL, ctxt,
&def->mem.hard_limit, false, false) < 0)
goto error;
- if (virDomainParseMemory("./memtune/soft_limit[1]", ctxt,
+ if (virDomainParseMemory("./memtune/soft_limit[1]", NULL, ctxt,
&def->mem.soft_limit, false, false) < 0)
goto error;
- if (virDomainParseMemory("./memtune/min_guarantee[1]", ctxt,
+ if (virDomainParseMemory("./memtune/min_guarantee[1]", NULL, ctxt,
&def->mem.min_guarantee, false, false) < 0)
goto error;
- if (virDomainParseMemory("./memtune/swap_hard_limit[1]", ctxt,
+ if (virDomainParseMemory("./memtune/swap_hard_limit[1]", NULL, ctxt,
&def->mem.swap_hard_limit, false, false) < 0)
goto error;
--
2.0.4
10 years
[libvirt] [PATCH 00/15] Cleanup some curly braces
by Martin Kletzander
There were unnecessary curly braces in few places (and the whole esx
driver), so this series proposes fixing them. As this couldn't be
done automatically, there is no syntax-check. We have to keep trying
to eliminate that ;)
Martin Kletzander (15):
vbox: Remove useless condition branches
Remove unneeded curly brackets around oneline code blocks in src/conf/
Remove unneeded curly brackets around oneline code blocks in src/esx/
Remove unneeded curly brackets around oneline code blocks in
src/hyperv/
Remove unneeded curly brackets around oneline code blocks in
src/node_device/
Remove unneeded curly brackets around oneline code blocks in src/qemu/
Remove unneeded curly brackets around oneline code blocks in src/util/
Remove unneeded curly brackets around oneline code blocks in src/vbox/
Remove unneeded curly brackets around oneline code blocks in src/vmx/
Remove unneeded curly brackets around oneline code blocks in
src/[u-z]*/
Remove unneeded curly brackets around oneline code blocks in
src/[st]*/
Remove unneeded curly brackets around oneline code blocks in
src/[n-r]*/
Remove unneeded curly brackets around oneline code blocks in
src/[a-m]*/
Remove unneeded curly brackets around oneline code blocks in tests/
Remove unneeded curly brackets around oneline code blocks
daemon/libvirtd.c | 15 +-
daemon/remote.c | 15 +-
examples/object-events/event-test.c | 3 +-
examples/openauth/openauth.c | 9 +-
src/access/viraccessdriverstack.c | 3 +-
src/bhyve/bhyve_driver.c | 3 +-
src/conf/capabilities.c | 3 +-
src/conf/device_conf.c | 6 +-
src/conf/domain_conf.c | 203 +++-----
src/conf/interface_conf.c | 9 +-
src/conf/netdev_vport_profile_conf.c | 12 +-
src/conf/network_conf.c | 114 ++--
src/conf/node_device_conf.c | 27 +-
src/conf/nwfilter_conf.c | 24 +-
src/conf/object_event.c | 6 +-
src/conf/storage_conf.c | 30 +-
src/cpu/cpu_powerpc.c | 3 +-
src/cpu/cpu_x86.c | 3 +-
src/datatypes.c | 6 +-
src/driver.c | 3 +-
src/esx/esx_device_monitor.c | 3 +-
src/esx/esx_driver.c | 838 ++++++++++--------------------
src/esx/esx_interface_driver.c | 36 +-
src/esx/esx_network_driver.c | 132 ++---
src/esx/esx_nwfilter_driver.c | 3 +-
src/esx/esx_secret_driver.c | 3 +-
src/esx/esx_storage_backend_iscsi.c | 78 +--
src/esx/esx_storage_backend_vmfs.c | 204 +++-----
src/esx/esx_storage_driver.c | 81 +--
src/esx/esx_util.c | 51 +-
src/esx/esx_vi.c | 606 +++++++--------------
src/esx/esx_vi_methods.c | 3 +-
src/esx/esx_vi_types.c | 54 +-
src/hyperv/hyperv_device_monitor.c | 3 +-
src/hyperv/hyperv_driver.c | 132 ++---
src/hyperv/hyperv_interface_driver.c | 3 +-
src/hyperv/hyperv_network_driver.c | 3 +-
src/hyperv/hyperv_nwfilter_driver.c | 3 +-
src/hyperv/hyperv_secret_driver.c | 3 +-
src/hyperv/hyperv_storage_driver.c | 3 +-
src/hyperv/hyperv_util.c | 6 +-
src/hyperv/hyperv_wmi.c | 45 +-
src/interface/interface_backend_udev.c | 15 +-
src/libvirt-domain.c | 6 +-
src/libvirt-lxc.c | 3 +-
src/libvirt-nodedev.c | 3 +-
src/libvirt-storage.c | 6 +-
src/libxl/libxl_conf.c | 3 +-
src/libxl/libxl_driver.c | 12 +-
src/locking/lock_daemon.c | 9 +-
src/locking/lock_driver_sanlock.c | 6 +-
src/lxc/lxc_container.c | 12 +-
src/lxc/lxc_driver.c | 12 +-
src/lxc/lxc_process.c | 6 +-
src/network/bridge_driver.c | 53 +-
src/network/bridge_driver_linux.c | 9 +-
src/network/leaseshelper.c | 3 +-
src/node_device/node_device_driver.c | 33 +-
src/node_device/node_device_hal.c | 6 +-
src/node_device/node_device_udev.c | 222 +++-----
src/nodeinfo.c | 3 +-
src/nwfilter/nwfilter_dhcpsnoop.c | 6 +-
src/nwfilter/nwfilter_ebiptables_driver.c | 12 +-
src/nwfilter/nwfilter_gentech_driver.c | 12 +-
src/nwfilter/nwfilter_learnipaddr.c | 3 +-
src/openvz/openvz_conf.c | 3 +-
src/openvz/openvz_driver.c | 33 +-
src/parallels/parallels_driver.c | 6 +-
src/phyp/phyp_driver.c | 21 +-
src/qemu/qemu_agent.c | 3 +-
src/qemu/qemu_capabilities.c | 15 +-
src/qemu/qemu_cgroup.c | 12 +-
src/qemu/qemu_command.c | 42 +-
src/qemu/qemu_conf.c | 3 +-
src/qemu/qemu_domain.c | 9 +-
src/qemu/qemu_driver.c | 57 +-
src/qemu/qemu_hotplug.c | 42 +-
src/qemu/qemu_migration.c | 18 +-
src/qemu/qemu_monitor_json.c | 30 +-
src/qemu/qemu_monitor_text.c | 9 +-
src/qemu/qemu_process.c | 36 +-
src/remote/remote_driver.c | 33 +-
src/rpc/virnetclient.c | 9 +-
src/rpc/virnetserver.c | 3 +-
src/rpc/virnetserverclient.c | 3 +-
src/rpc/virnetserverservice.c | 3 +-
src/security/security_dac.c | 9 +-
src/security/security_manager.c | 3 +-
src/security/security_selinux.c | 6 +-
src/security/virt-aa-helper.c | 15 +-
src/storage/parthelper.c | 3 +-
src/storage/storage_backend.c | 9 +-
src/storage/storage_backend_disk.c | 21 +-
src/storage/storage_backend_fs.c | 9 +-
src/storage/storage_backend_mpath.c | 30 +-
src/storage/storage_backend_rbd.c | 30 +-
src/storage/storage_backend_scsi.c | 9 +-
src/storage/storage_driver.c | 9 +-
src/test/test_driver.c | 66 +--
src/uml/uml_conf.c | 6 +-
src/uml/uml_driver.c | 9 +-
src/util/virauth.c | 21 +-
src/util/virbitmap.c | 6 +-
src/util/virbuffer.c | 3 +-
src/util/vircgroup.c | 3 +-
src/util/vircommand.c | 12 +-
src/util/virconf.c | 15 +-
src/util/virdbus.c | 6 +-
src/util/virdnsmasq.c | 6 +-
src/util/vireventpoll.c | 12 +-
src/util/virfile.c | 9 +-
src/util/virfirewall.c | 6 +-
src/util/virhostdev.c | 6 +-
src/util/viriscsi.c | 12 +-
src/util/virjson.c | 3 +-
src/util/virlockspace.c | 6 +-
src/util/virlog.c | 6 +-
src/util/virnetdev.c | 12 +-
src/util/virnetdevbridge.c | 3 +-
src/util/virnetdevmacvlan.c | 15 +-
src/util/virnetdevtap.c | 9 +-
src/util/virnetdevvlan.c | 3 +-
src/util/virnetdevvportprofile.c | 6 +-
src/util/virpci.c | 33 +-
src/util/virsexpr.c | 30 +-
src/util/virstorageencryption.c | 3 +-
src/util/virstoragefile.c | 6 +-
src/util/virsysinfo.c | 3 +-
src/util/virthreadpool.c | 9 +-
src/util/virutil.c | 12 +-
src/util/virxml.c | 18 +-
src/vbox/vbox_MSCOMGlue.c | 33 +-
src/vbox/vbox_XPCOMCGlue.c | 33 +-
src/vbox/vbox_common.c | 77 +--
src/vbox/vbox_network.c | 24 +-
src/vbox/vbox_snapshot_conf.c | 21 +-
src/vbox/vbox_storage.c | 30 +-
src/vbox/vbox_tmpl.c | 30 +-
src/vmware/vmware_conf.c | 9 +-
src/vmware/vmware_driver.c | 6 +-
src/vmx/vmx.c | 369 +++++--------
src/xen/block_stats.c | 3 +-
src/xen/xen_driver.c | 6 +-
src/xen/xen_hypervisor.c | 12 +-
src/xen/xen_inotify.c | 3 +-
src/xen/xend_internal.c | 21 +-
src/xen/xm_internal.c | 11 +-
src/xenapi/xenapi_driver.c | 15 +-
src/xenapi/xenapi_utils.c | 15 +-
src/xenconfig/xen_common.c | 12 +-
src/xenconfig/xen_sxpr.c | 12 +-
src/xenconfig/xen_xm.c | 3 +-
tests/commandhelper.c | 3 +-
tests/esxutilstest.c | 18 +-
tests/eventtest.c | 3 +-
tests/networkxml2conftest.c | 3 +-
tests/networkxml2xmltest.c | 3 +-
tests/networkxml2xmlupdatetest.c | 3 +-
tests/nodeinfotest.c | 3 +-
tests/nwfilterxml2xmltest.c | 3 +-
tests/openvzutilstest.c | 9 +-
tests/qemuxml2argvtest.c | 6 +-
tests/qemuxmlnstest.c | 3 +-
tests/secretxml2xmltest.c | 3 +-
tests/securityselinuxlabeltest.c | 6 +-
tests/sexpr2xmltest.c | 3 +-
tests/shunloadtest.c | 6 +-
tests/storagepoolxml2xmltest.c | 3 +-
tests/storagevolxml2argvtest.c | 3 +-
tests/storagevolxml2xmltest.c | 3 +-
tests/sysinfotest.c | 6 +-
tests/utiltest.c | 3 +-
tests/virbuftest.c | 3 +-
tests/virhashtest.c | 42 +-
tests/virtimetest.c | 3 +-
tests/vmx2xmltest.c | 24 +-
tests/xml2sexprtest.c | 3 +-
tests/xml2vmxtest.c | 39 +-
tools/virsh-console.c | 15 +-
tools/virsh-domain.c | 30 +-
tools/virsh-edit.c | 6 +-
tools/virsh-host.c | 3 +-
tools/virsh-interface.c | 6 +-
tools/virsh-pool.c | 6 +-
tools/virsh-volume.c | 15 +-
tools/virsh.c | 18 +-
tools/wireshark/src/packet-libvirt.c | 6 +-
187 files changed, 1746 insertions(+), 3474 deletions(-)
--
2.1.3
10 years