[libvirt] [PATCH v2] maint: use $(SED) instead of sed for syntax-check
by Roman Bogorodskiy
This is actually almost the same patch that I've sent back in January,
decided to re-send as much time has passed. Also, now we're not blocked by
the gnulib part.
I've been using this patch on FreeBSD for quite some time now and had no
problems with it. Also, I tested it on Linux and it doesn't seem to cause
any regressions.
Roman Bogorodskiy (1):
maint: use $(SED) instead of sed for syntax-check
cfg.mk | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--
1.9.0
10 years, 6 months
Re: [libvirt] [Qemu-devel] [PATCH] cirrus_vga: adding sanity check for vram size
by Eric Blake
[adding libvirt]
On 05/09/2014 05:54 AM, Gerd Hoffmann wrote:
> Hi,
>
>> virt-manager/libvirt seems to default to 9 MByte of Vram for cirrus,
>> so this would break a lot of setups.
>
> It wouldn't. libvirt sticks that into the xml, but it doesn't set any
> qemu parameters. The libvirt parameter actually predates the qemu
> property for setting the size.
>
Then we should probably re-evaluate what libvirt does with the
parameters, which avoids breaking any guest that happens to be
pre-existing with the odd 9MB sizing in the XML.
>> Looking at datasheets on the web seems to say the chips actually went
>> down to 1 MB or less.
>
> I have my doubts we emulate that correctly (register telling the guest
> how much memory is actually there etc.). Also it is pretty much useless
> these days, even the 4MB imply serious constrains when FullHD displays
> are commonplace. Newer cirrus drivers such as the kernel's drm driver
> are specifically written to qemu's cirrus cards, I have my doubs that
> they are prepared to handle 1MB cirrus cards correctly.
>
> Bottom line: Allowing less than 4MB is asking for trouble for no good
> reason ;)
>
> cheers,
> Gerd
>
>
>
>
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
10 years, 6 months
[libvirt] troubles creating an OVS network with xen, libxl and libvirt.
by Alvin Starr
One more quirk
I can create a domain using the lx commands and a slightly modified
.conf file.
"virsh start kvmtest" returns a failure.
I tracked the information passed to vif-openvswitch and it is being
called with type_if=tap and it needs to be type_if=vif.
Any help would be greatly appreciated once again.
--
Alvin Starr || voice: (905)513-7688
Netvel Inc. || Cell: (416)806-0133
alvin(a)netvel.net ||
10 years, 6 months
[libvirt] [PATCH] bhyve: implement connectGetSysinfo
by Roman Bogorodskiy
---
src/bhyve/bhyve_driver.c | 31 +++++++++++++++++++++++++++++++
src/bhyve/bhyve_utils.h | 1 +
2 files changed, 32 insertions(+)
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 0cafe4c..ec1ba69 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -237,6 +237,33 @@ bhyveConnectGetHostname(virConnectPtr conn ATTRIBUTE_UNUSED)
return virGetHostname();
}
+static char *
+bhyveConnectGetSysinfo(virConnectPtr conn, unsigned int flags)
+{
+ bhyveConnPtr privconn = conn->privateData;
+ virBuffer buf = VIR_BUFFER_INITIALIZER;
+
+ virCheckFlags(0, NULL);
+
+ if (virConnectGetSysinfoEnsureACL(conn) < 0)
+ return NULL;
+
+ if (!privconn->hostsysinfo) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Host SMBIOS information is not available"));
+ return NULL;
+ }
+
+ if (virSysinfoFormat(&buf, privconn->hostsysinfo) < 0)
+ return NULL;
+ if (virBufferError(&buf)) {
+ virReportOOMError();
+ return NULL;
+ }
+
+ return virBufferContentAndReset(&buf);
+}
+
static int
bhyveConnectGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED, unsigned long *version)
{
@@ -976,6 +1003,7 @@ bhyveStateCleanup(void)
virObjectUnref(bhyve_driver->domains);
virObjectUnref(bhyve_driver->caps);
virObjectUnref(bhyve_driver->xmlopt);
+ virObjectUnref(bhyve_driver->hostsysinfo);
virObjectUnref(bhyve_driver->closeCallbacks);
virMutexDestroy(&bhyve_driver->lock);
@@ -1015,6 +1043,8 @@ bhyveStateInitialize(bool priveleged ATTRIBUTE_UNUSED,
if (!(bhyve_driver->domains = virDomainObjListNew()))
goto cleanup;
+ bhyve_driver->hostsysinfo = virSysinfoRead();
+
if (virFileMakePath(BHYVE_LOG_DIR) < 0) {
virReportSystemError(errno,
_("Failed to mkdir %s"),
@@ -1173,6 +1203,7 @@ static virDriver bhyveDriver = {
.connectClose = bhyveConnectClose, /* 1.2.2 */
.connectGetVersion = bhyveConnectGetVersion, /* 1.2.2 */
.connectGetHostname = bhyveConnectGetHostname, /* 1.2.2 */
+ .connectGetSysinfo = bhyveConnectGetSysinfo, /* 1.2.4 */
.domainGetInfo = bhyveDomainGetInfo, /* 1.2.2 */
.domainGetState = bhyveDomainGetState, /* 1.2.2 */
.connectGetCapabilities = bhyveConnectGetCapabilities, /* 1.2.2 */
diff --git a/src/bhyve/bhyve_utils.h b/src/bhyve/bhyve_utils.h
index 94f31b0..22f458d 100644
--- a/src/bhyve/bhyve_utils.h
+++ b/src/bhyve/bhyve_utils.h
@@ -39,6 +39,7 @@ struct _bhyveConn {
virCapsPtr caps;
virDomainXMLOptionPtr xmlopt;
char *pidfile;
+ virSysinfoDefPtr hostsysinfo;
virCloseCallbacksPtr closeCallbacks;
};
--
1.9.0
10 years, 6 months
[libvirt] [libvirt-glib] domain-device-private: fix typo in header guard
by Christophe Fergeau
From: Timm Bäder <mail(a)baedert.org>
---
I've reviewed and pushed this patch directly as it's trivial
Christophe
libvirt-gobject/libvirt-gobject-domain-device-private.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libvirt-gobject/libvirt-gobject-domain-device-private.h b/libvirt-gobject/libvirt-gobject-domain-device-private.h
index f15fea6..73b3956 100644
--- a/libvirt-gobject/libvirt-gobject-domain-device-private.h
+++ b/libvirt-gobject/libvirt-gobject-domain-device-private.h
@@ -20,7 +20,7 @@
* Author: Marc-André Lureau <marcandre.lureau(a)redhat.com>
*/
#ifndef __LIBVIRT_GOBJECT_DOMAIN_DEVICE_PRIVATE_H__
-#define __LIBVIRT_GOBJECT_DOMAIN_DEVICE_PRIVATEH__
+#define __LIBVIRT_GOBJECT_DOMAIN_DEVICE_PRIVATE_H__
G_BEGIN_DECLS
@@ -30,4 +30,4 @@ virDomainPtr gvir_domain_device_get_domain_handle(GVirDomainDevice *self);
G_END_DECLS
-#endif /* __LIBVIRT_GOBJECT_DOMAIN_DEVICE_PRIVATEH__ */
+#endif /* __LIBVIRT_GOBJECT_DOMAIN_DEVICE_PRIVATE_H__ */
--
1.9.0
10 years, 6 months
[libvirt] [PATCH] qemu: Adjust size for qcow2/qed if not on sector boundary (rewrite)
by John Ferlan
A post commit id 'e3d66229' review (and followup):
http://www.redhat.com/archives/libvir-list/2014-May/msg00268.html
noted some issues with the code, so I have adjusted the code
accordingly. The difference between this and the commit prior
to the change (commit id 'f3be5f0c') will just be the check for
qcow2/qed using a non 512 block aligned size will result in a
round up of size. If the size is within the last 512 bytes to
ULLONG_MAX, then just set it there rather than erroring out.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/qemu/qemu_driver.c | 28 +++++++++-------------------
1 file changed, 9 insertions(+), 19 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 4ff8a2d..8771cae 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9413,7 +9413,6 @@ qemuDomainBlockResize(virDomainPtr dom,
virDomainObjPtr vm;
qemuDomainObjPrivatePtr priv;
int ret = -1, idx;
- unsigned long long size_up;
char *device = NULL;
virDomainDiskDefPtr disk = NULL;
@@ -9434,12 +9433,6 @@ qemuDomainBlockResize(virDomainPtr dom,
return -1;
}
size *= 1024;
- size_up = size;
- } else {
- /* For 'qcow2' and 'qed', qemu resize blocks expects values
- * on sector boundary, so round our value up to prepare
- */
- size_up = VIR_ROUND_UP(size, 512);
}
if (!(vm = qemuDomObjFromDomain(dom)))
@@ -9466,19 +9459,16 @@ qemuDomainBlockResize(virDomainPtr dom,
}
disk = vm->def->disks[idx];
- /* qcow2 and qed must be sized appropriately, so be sure our value
- * is sized appropriately and will fit
+ /* qcow2 and qed must be sized on 512 byte blocks/sectors,
+ * so adjust size if necessary to round up (if possible).
*/
- if (size != size_up &&
- (disk->src.format == VIR_STORAGE_FILE_QCOW2 ||
- disk->src.format == VIR_STORAGE_FILE_QED)) {
- if (size_up > ULLONG_MAX) {
- virReportError(VIR_ERR_OVERFLOW,
- _("size must be less than %llu KiB"),
- ULLONG_MAX / 1024);
- goto endjob;
- }
- size = size_up;
+ if ((disk->src.format == VIR_STORAGE_FILE_QCOW2 ||
+ disk->src.format == VIR_STORAGE_FILE_QED) &&
+ (size % 512)) {
+ if ((ULLONG_MAX - size) < 512)
+ size = ULLONG_MAX;
+ else
+ size = VIR_ROUND_UP(size, 512);
}
if (virAsprintf(&device, "%s%s", QEMU_DRIVE_HOST_PREFIX,
--
1.9.0
10 years, 6 months
[libvirt] [PATCH libvirt-glib 1/2] gconfig: add spiceport chardev
by Marc-André Lureau
From: Marc-André Lureau <marcandre.lureau(a)gmail.com>
---
libvirt-gconfig/Makefile.am | 2 +
libvirt-gconfig/libvirt-gconfig-domain-channel.h | 1 +
...bvirt-gconfig-domain-chardev-source-spiceport.c | 101 +++++++++++++++++++++
...bvirt-gconfig-domain-chardev-source-spiceport.h | 71 +++++++++++++++
libvirt-gconfig/libvirt-gconfig.h | 1 +
libvirt-gconfig/libvirt-gconfig.sym | 9 ++
6 files changed, 185 insertions(+)
create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
create mode 100644 libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.h
diff --git a/libvirt-gconfig/Makefile.am b/libvirt-gconfig/Makefile.am
index d328ca7..83d521f 100644
--- a/libvirt-gconfig/Makefile.am
+++ b/libvirt-gconfig/Makefile.am
@@ -28,6 +28,7 @@ GCONFIG_HEADER_FILES = \
libvirt-gconfig-domain-chardev.h \
libvirt-gconfig-domain-chardev-source.h \
libvirt-gconfig-domain-chardev-source-pty.h \
+ libvirt-gconfig-domain-chardev-source-spiceport.h \
libvirt-gconfig-domain-chardev-source-spicevmc.h \
libvirt-gconfig-domain-clock.h \
libvirt-gconfig-domain-console.h \
@@ -114,6 +115,7 @@ GCONFIG_SOURCE_FILES = \
libvirt-gconfig-domain-chardev.c \
libvirt-gconfig-domain-chardev-source.c \
libvirt-gconfig-domain-chardev-source-pty.c \
+ libvirt-gconfig-domain-chardev-source-spiceport.c \
libvirt-gconfig-domain-chardev-source-spicevmc.c \
libvirt-gconfig-domain-clock.c \
libvirt-gconfig-domain-console.c \
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-channel.h b/libvirt-gconfig/libvirt-gconfig-domain-channel.h
index 889b09a..4f1130e 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-channel.h
+++ b/libvirt-gconfig/libvirt-gconfig-domain-channel.h
@@ -59,6 +59,7 @@ struct _GVirConfigDomainChannelClass
typedef enum {
GVIR_CONFIG_DOMAIN_CHANNEL_TARGET_GUESTFWD,
GVIR_CONFIG_DOMAIN_CHANNEL_TARGET_VIRTIO,
+ GVIR_CONFIG_DOMAIN_CHANNEL_TARGET_SPICEPORT,
} GVirConfigDomainChannelTargetType;
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
new file mode 100644
index 0000000..570e7ea
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.c
@@ -0,0 +1,101 @@
+/*
+ * libvirt-gconfig-domain-chardev-source-spiceport.c: libvirt domain chardev spiceport configuration
+ *
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#include <config.h>
+
+#include "libvirt-gconfig/libvirt-gconfig.h"
+#include "libvirt-gconfig/libvirt-gconfig-private.h"
+
+#define GVIR_CONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE((obj), GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE_SPICE_PORT, GVirConfigDomainChardevSourceSpicePortPrivate))
+
+struct _GVirConfigDomainChardevSourceSpicePortPrivate
+{
+ gboolean unused;
+};
+
+G_DEFINE_TYPE(GVirConfigDomainChardevSourceSpicePort, gvir_config_domain_chardev_source_spiceport, GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE);
+
+
+static void gvir_config_domain_chardev_source_spiceport_class_init(GVirConfigDomainChardevSourceSpicePortClass *klass)
+{
+ g_type_class_add_private(klass, sizeof(GVirConfigDomainChardevSourceSpicePortPrivate));
+}
+
+
+static void gvir_config_domain_chardev_source_spiceport_init(GVirConfigDomainChardevSourceSpicePort *source)
+{
+ g_debug("Init GVirConfigDomainChardevSourceSpicePort=%p", source);
+
+ source->priv = GVIR_CONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT_GET_PRIVATE(source);
+}
+
+
+GVirConfigDomainChardevSourceSpicePort *gvir_config_domain_chardev_source_spiceport_new(void)
+{
+ GVirConfigObject *object;
+
+ /* the name of the root node is just a placeholder, it will be
+ * overwritten when the GVirConfigDomainChardevSourceSpicePort is attached to a
+ * GVirConfigDomainChardevSourceSpicePort
+ */
+ object = gvir_config_object_new(GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE_SPICE_PORT, "dummy", NULL);
+ gvir_config_object_set_attribute(object, "type", "spiceport", NULL);
+ return GVIR_CONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT(object);
+}
+
+
+GVirConfigDomainChardevSourceSpicePort *gvir_config_domain_chardev_source_spiceport_new_from_xml(const gchar *xml,
+ GError **error)
+{
+ GVirConfigObject *object;
+
+ /* the name of the root node is just a placeholder, it will be
+ * overwritten when the GVirConfigDomainChardevSourceSpicePort is attached to a
+ * GVirConfigDomainChardevSourceSpicePort
+ */
+ object = gvir_config_object_new_from_xml(GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE_SPICE_PORT,
+ "dummy", NULL, xml, error);
+ if (g_strcmp0(gvir_config_object_get_attribute(object, NULL, "type"), "spiceport") != 0) {
+ g_object_unref(G_OBJECT(object));
+ g_return_val_if_reached(NULL);
+ }
+ return GVIR_CONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT(object);
+}
+
+void gvir_config_domain_chardev_source_spiceport_set_channel(GVirConfigDomainChardevSourceSpicePort *port,
+ const char *channel)
+{
+ g_return_if_fail(GVIR_CONFIG_IS_DOMAIN_CHARDEV_SOURCE_SPICE_PORT(port));
+
+ gvir_config_object_replace_child_with_attribute(GVIR_CONFIG_OBJECT(port),
+ "source",
+ "channel",
+ channel);
+
+}
+
+const gchar * gvir_config_domain_chardev_source_spiceport_get_channel(GVirConfigDomainChardevSourceSpicePort *port)
+{
+ g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_CHARDEV_SOURCE_SPICE_PORT(port), NULL);
+
+ return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(port),
+ "source", "channel");
+}
diff --git a/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.h b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.h
new file mode 100644
index 0000000..5ff7794
--- /dev/null
+++ b/libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.h
@@ -0,0 +1,71 @@
+/*
+ * libvirt-gconfig-domain-chardev-source-spiceport.h: libvirt domain chardev spiceport configuration
+ *
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ */
+
+#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD)
+#error "Only <libvirt-gconfig/libvirt-gconfig.h> can be included directly."
+#endif
+
+#ifndef __LIBVIRT_GCONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT_H__
+#define __LIBVIRT_GCONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT_H__
+
+G_BEGIN_DECLS
+
+#define GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE_SPICE_PORT (gvir_config_domain_chardev_source_spiceport_get_type ())
+#define GVIR_CONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE_SPICE_PORT, GVirConfigDomainChardevSourceSpicePort))
+#define GVIR_CONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE_SPICE_PORT, GVirConfigDomainChardevSourceSpicePortClass))
+#define GVIR_CONFIG_IS_DOMAIN_CHARDEV_SOURCE_SPICE_PORT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE_SPICE_PORT))
+#define GVIR_CONFIG_IS_DOMAIN_CHARDEV_SOURCE_SPICE_PORT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE_SPICE_PORT))
+#define GVIR_CONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GVIR_CONFIG_TYPE_DOMAIN_CHARDEV_SOURCE_SPICE_PORT, GVirConfigDomainChardevSourceSpicePortClass))
+
+typedef struct _GVirConfigDomainChardevSourceSpicePort GVirConfigDomainChardevSourceSpicePort;
+typedef struct _GVirConfigDomainChardevSourceSpicePortPrivate GVirConfigDomainChardevSourceSpicePortPrivate;
+typedef struct _GVirConfigDomainChardevSourceSpicePortClass GVirConfigDomainChardevSourceSpicePortClass;
+
+struct _GVirConfigDomainChardevSourceSpicePort
+{
+ GVirConfigDomainChardevSource parent;
+
+ GVirConfigDomainChardevSourceSpicePortPrivate *priv;
+
+ /* Do not add fields to this struct */
+};
+
+struct _GVirConfigDomainChardevSourceSpicePortClass
+{
+ GVirConfigDomainChardevSourceClass parent_class;
+
+ gpointer padding[20];
+};
+
+
+GType gvir_config_domain_chardev_source_spiceport_get_type(void);
+
+GVirConfigDomainChardevSourceSpicePort *gvir_config_domain_chardev_source_spiceport_new(void);
+GVirConfigDomainChardevSourceSpicePort *gvir_config_domain_chardev_source_spiceport_new_from_xml(const gchar *xml,
+ GError **error);
+
+void gvir_config_domain_chardev_source_spiceport_set_channel(GVirConfigDomainChardevSourceSpicePort *port,
+ const char *channel);
+
+const gchar * gvir_config_domain_chardev_source_spiceport_get_channel(GVirConfigDomainChardevSourceSpicePort *port);
+
+G_END_DECLS
+
+#endif /* __LIBVIRT_GCONFIG_DOMAIN_CHARDEV_SOURCE_SPICE_PORT_H__ */
diff --git a/libvirt-gconfig/libvirt-gconfig.h b/libvirt-gconfig/libvirt-gconfig.h
index 61b5a04..1582109 100644
--- a/libvirt-gconfig/libvirt-gconfig.h
+++ b/libvirt-gconfig/libvirt-gconfig.h
@@ -44,6 +44,7 @@
#include <libvirt-gconfig/libvirt-gconfig-domain-chardev.h>
#include <libvirt-gconfig/libvirt-gconfig-domain-chardev-source.h>
#include <libvirt-gconfig/libvirt-gconfig-domain-chardev-source-pty.h>
+#include <libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spiceport.h>
#include <libvirt-gconfig/libvirt-gconfig-domain-chardev-source-spicevmc.h>
#include <libvirt-gconfig/libvirt-gconfig-domain-channel.h>
#include <libvirt-gconfig/libvirt-gconfig-domain-clock.h>
diff --git a/libvirt-gconfig/libvirt-gconfig.sym b/libvirt-gconfig/libvirt-gconfig.sym
index ead313b..fc68050 100644
--- a/libvirt-gconfig/libvirt-gconfig.sym
+++ b/libvirt-gconfig/libvirt-gconfig.sym
@@ -687,4 +687,13 @@ global:
gvir_config_object_new_from_xml;
} LIBVIRT_GCONFIG_0.1.7;
+LIBVIRT_GCONFIG_0.1.9 {
+global:
+ gvir_config_domain_chardev_source_spiceport_get_channel;
+ gvir_config_domain_chardev_source_spiceport_get_type;
+ gvir_config_domain_chardev_source_spiceport_new;
+ gvir_config_domain_chardev_source_spiceport_new_from_xml;
+ gvir_config_domain_chardev_source_spiceport_set_channel;
+} LIBVIRT_GCONFIG_0.1.8;
+
# .... define new API here using predicted next version number ....
--
1.8.5.3
10 years, 6 months
[libvirt] [PATCH] util: Fix return type mismatch for nl_recv
by Wangrui (K)
1.
As shown in the definition of nl_recv, its return value is of INT type.
int nl_recv(struct nl_handle *handle, struct sockaddr_nl *nla,
unsigned char **buf, struct ucred **creds)
However, in function virNetlinkCommand, it uses an unsigned int param,
respbuflen, to receive its return value. Thus, the branch "*respbuflen < 0"
is unreachable, negative return values are handled incorrectly.
2.
It's said in nl_recv's description that "The caller is responsible for
freeing the buffer allocated * in \c *buf if a positive value is returned."
which means, we needn't to free it in case it fails.
Additionally, nl_recv has a BUG in handling buf: in the error branch, it frees
the buf, but didn't set it to NULL. Freeing it outside in the caller function
will cause double free.
Thus, we set but(resp) to NULL if nl_recv fails.
Signed-off-by: Zhang Bo <oscar.zhangbo(a)huawei.com>
---
src/util/virnetlink.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
index 0cf18f2..1a09567 100644
--- a/src/util/virnetlink.c
+++ b/src/util/virnetlink.c
@@ -192,6 +192,7 @@ int virNetlinkCommand(struct nl_msg *nl_msg,
int n;
struct nlmsghdr *nlmsg = nlmsg_hdr(nl_msg);
virNetlinkHandle *nlhandle = NULL;
+ int length = 0;
if (protocol >= MAX_LINKS) {
virReportSystemError(EINVAL,
@@ -257,12 +258,15 @@ int virNetlinkCommand(struct nl_msg *nl_msg,
goto error;
}
- *respbuflen = nl_recv(nlhandle, &nladdr,
- (unsigned char **)resp, NULL);
+ length = nl_recv(nlhandle, &nladdr,
+ (unsigned char **)resp, NULL);
- if (*respbuflen <= 0) {
+ if (length <= 0) {
virReportSystemError(errno,
"%s", _("nl_recv failed"));
+ *resp = NULL;
rc = -1;
+ } else {
+ *respbuflen = length;
}
error:
if (rc == -1) {
--
1.7.12.4
10 years, 6 months
[libvirt] [VHPC’14] LAST Call for Papers - Deadline in 4 weeks
by VHPC 14
=================================================================
CALL FOR PAPERS
9th Workshop on Virtualization in High-Performance Cloud Computing (VHPC
'14)
held in conjunction with Euro-Par 2014, August 25-29, Porto, Portugal
(Springer LNCS)
=================================================================
Date: August 26, 2014
Workshop URL: http://vhpc.org
Paper Submission Deadline: June 9, 2014 (extended)
Confirmed Keynote Speakers:
Ron Brightwell, Sandia National Laboratory
Hobbes: Using Virtualization to Enable Exascale Applications
and
Helge Meinhard, CERN
CALL FOR PAPERS
Virtualization technologies constitute a key enabling factor for flexible
resource
management in modern data centers, and particularly in cloud environments.
Cloud providers need to dynamically manage complex infrastructures in a
seamless fashion for varying workloads and hosted applications,
independently of
the customers deploying software or users submitting highly dynamic and
heterogeneous workloads. Thanks to virtualization, we have the ability to
manage
vast computing and networking resources dynamically and close to the
marginal
cost of providing the services, which is unprecedented in the history of
scientific
and commercial computing.
Various virtualization technologies contribute to the overall picture in
different
ways: machine virtualization, with its capability to enable consolidation
of multiple
under-utilized servers with heterogeneous software and operating systems
(OSes),
and its capability to live-migrate a fully operating virtual machine (VM)
with a very
short downtime, enables novel and dynamic ways to manage physical servers;
OS-level virtualization, with its capability to isolate multiple user-space
environments and to allow for their co-existence within the same OS kernel,
promises to provide many of the advantages of machine virtualization with
high
levels of responsiveness and performance; I/O Virtualization allows physical
NICs/HBAs to take traffic from multiple VMs; network virtualization, with
its
capability to create logical network overlays that are independent of the
underlying physical topology and IP addressing, provides the fundamental
ground on top of which evolved network services can be realized with an
unprecedented level of dynamicity and flexibility; the increasingly adopted
paradigm of Software-Defined Networking (SDN) promises to extend this
flexibility to the control and data planes of network paths. These
technologies
have to be inter-mixed and integrated in an intelligent way, to support
workloads that are increasingly demanding in terms of absolute performance,
responsiveness and interactivity, and have to respect well-specified
Service-
Level Agreements (SLAs), as needed for industrial-grade provided services.
Indeed, among emerging and increasingly interesting application domains
for virtualization, we can find big-data application workloads in cloud
infrastructures, interactive and real-time multimedia services in the cloud,
including real-time big-data streaming platforms such as used in real-time
analytics supporting nowadays a plethora of application domains. Distributed
cloud infrastructures promise to offer unprecedented responsiveness levels
for
hosted applications, but that is only possible if the underlying
virtualization
technologies can overcome most of the latency impairments typical of current
virtualized infrastructures (e.g., far worse tail-latency). What is more,
in data
communications Network Function Virtualization (NFV) is becoming a key
technology enabling a shift from supplying hardware-based network functions,
to providing them in a software-based and elastic way. In conjunction with
(public and private) cloud technologies, NFV may be used for constructing
the
foundation for cost-effective network functions that can easily and
seamlessly
adapt to demand, still keeping their major carrier-grade characteristics in
terms
of QoS and reliability.
The Workshop on Virtualization in High-Performance Cloud Computing (VHPC)
aims to bring together researchers and industrial practitioners facing the
challenges
posed by virtualization in order to foster discussion, collaboration,
mutual exchange
of knowledge and experience, enabling research to ultimately provide novel
solutions for virtualized computing systems of tomorrow.
The workshop will be one day in length, composed of 20 min paper
presentations,
each followed by 10 min discussion sections, and lightning talks, limited
to 5
minutes. Presentations may be accompanied by interactive demonstrations.
TOPICS
Topics of interest include, but are not limited to:
- Management, deployment and monitoring of virtualized environments
- Language-process virtual machines
- Performance monitoring for virtualized/cloud workloads
- Virtual machine monitor platforms
- Topology management and optimization for distributed virtualized
applications
- Paravirtualized I/O
- Improving I/O and network virtualization including use of RDMA,
Infiniband, PCIe
- Improving performance in VM access to GPUs, GPU clusters, GP-GPUs
- HPC storage virtualization
- Virtualized systems for big-data and analytics workloads
- Optimizations and enhancements to OS virtualization support
- Improving OS-level virtualization and its integration within cloud
management
- Performance modelling for virtualized/cloud applications
- Heterogeneous virtualized environments
- Parallel virtualized - virtualization aware file systems
- Network virtualization
- Software defined networking
- Network function virtualization
- Hypervisor and network virtualization QoS and SLAs
- Cloudbursting
- Evolved European grid architectures including such based on network
virtualization
- Workload characterization for VM-based environments
- Optimized communication libraries/protocols in the cloud
- System and process/bytecode VM convergence
- Cloud frameworks and APIs
- Checkpointing/migration of VM-based large compute jobs
- Job scheduling/control/policy with VMs
- Instrumentation interfaces and languages
- VMM performance (auto-)tuning on various load types
- Cloud reliability, fault-tolerance, and security
- Research, industrial and educational use cases
- Virtualization in cloud, cluster and grid environments
- Cross-layer VM optimizations
- Cloud HPC use cases including optimizations
- Services in cloud HPC
- Hypervisor extensions and tools for cluster and grid computing
- Cluster provisioning in the cloud
- Performance and cost modelling
- Languages for describing highly-distributed compute jobs
- VM cloud and cluster distribution algorithms, load balancing
- Instrumentation interfaces and languages
- Energy-aware virtualization
Important Dates
Rolling Paper registration
June 9, 2014 - Full paper submission (extended)
July 4, 2014 - Acceptance notification
October 3, 2014 - Camera-ready version due
August 26, 2014 - Workshop Date
TPC
CHAIR
Michael Alexander (chair), TU Wien, Austria
Anastassios Nanos (co-chair), NTUA, Greece
Tommaso Cucinotta (co-chair), Bell Labs, Dublin, Ireland
PROGRAM COMMITTEE
Costas Bekas, IBM
Jakob Blomer, CERN
Roberto Canonico, University of Napoli Federico II, Italy
Piero Castoldi, Sant'Anna School of Advanced Studies
Paolo Costa, MS Research Cambridge, England
Jorge Ejarque Artigas, Barcelona Supercomputing Center, Spain
William Gardner, University of Guelph, USA
Balazs Gerofi, University of Tokyo, Japan
Krishna Kant, Temple University, USA
Romeo Kinzler, IBM
Nectarios Koziris, National Technical University of Athens, Greece
Giuseppe Lettieri, University of Pisa, Italy
Jean-Marc Menaud, Ecole des Mines de Nantes, France
Christine Morin, INRIA, France
Dimitrios Nikolopoulos, Queen's University of Belfast, UK
Herbert Poetzl, VServer, Austria
Luigi Rizzo, University of Pisa, Italy
Josh Simons, VMware, USA
Borja Sotomayor, University of Chicago, USA
Vangelis Tasoulas, Simula Research Lab, Norway
Yoshio Turner, HP Labs, USA
Kurt Tutschku, Blekinge Institute of Technology, Sweden
Chao-Tung Yang, Tunghai University, Taiwan
PAPER SUBMISSION-PUBLICATION
Papers submitted to the workshop will be reviewed by at least two
members of the program committee and external reviewers. Submissions
should include abstract, key words, the e-mail address of the
corresponding author, and must not exceed 10 pages, including tables
and figures at a main font size no smaller than 11 point. Submission
of a paper should be regarded as a commitment that, should the paper
be accepted, at least one of the authors will register and attend the
conference to present the work.
Accepted papers will be published in the Springer LNCS series - the
format must be according to the Springer LNCS Style. Initial
submissions are in PDF; authors of accepted papers will be requested
to provide source files.
Format Guidelines:
http://www.springer.de/comp/lncs/authors.html
EasyChair Abstract Submission Link:
https://www.easychair.org/conferences/?conf=europar2014ws
GENERAL INFORMATION
The workshop is one day in length and will be held in conjunction with
Euro-Par 2014, 25-29 August, Porto, Portugal
10 years, 6 months
[libvirt] [PATCH 2/2] util: do not set resp to NULL after VIR_FREE
by Wangrui (K)
Signed-off-by: Zhang Bo <oscar.zhangbo(a)huawei.com>
---
src/util/virnetlink.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c
index 4f4dedc..40912f5 100644
--- a/src/util/virnetlink.c
+++ b/src/util/virnetlink.c
@@ -271,7 +271,6 @@ int virNetlinkCommand(struct nl_msg *nl_msg,
cleanup:
if (rc == -1) {
VIR_FREE(*resp);
- *resp = NULL;
*respbuflen = 0;
}
--
1.7.12.4
10 years, 6 months