[libvirt] [PATCH] Add support for firewalld
by Thomas Woerner
Add support for firewalld
* bridge_driver, nwfilter_driver: new dbus filters to get FirewallD1.Reloaded
signal and DBus.NameOwnerChanged on org.fedoraproject.FirewallD1
* iptables, ebtables, nwfilter_ebiptables_driver: use firewall-cmd direct
passthrough interface
---
configure.ac | 9 ++++++
src/Makefile.am | 8 ++---
src/network/bridge_driver.c | 50 +++++++++++++++++++++++++++++
src/nwfilter/nwfilter_driver.c | 49 ++++++++++++++++++++++++++++
src/nwfilter/nwfilter_ebiptables_driver.c | 27 ++++++++++++++++
src/util/ebtables.c | 32 ++++++++++++++++++
src/util/iptables.c | 25 ++++++++++++---
7 files changed, 192 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 89fe818..41d9371 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1191,6 +1191,15 @@ AM_CONDITIONAL([HAVE_POLKIT1], [test "x$with_polkit1" = "xyes"])
AC_SUBST([POLKIT_CFLAGS])
AC_SUBST([POLKIT_LIBS])
+dnl firewalld
+AC_ARG_WITH([firewalld],
+ AC_HELP_STRING([--with-firewalld], [enable firewalld support]))
+if test "x$with_firewalld" = "xyes" ; then
+ AC_DEFINE_UNQUOTED([HAVE_FIREWALLD], [1], [whether firewalld support is enabled])
+fi
+AM_CONDITIONAL([HAVE_FIREWALLD], [test "x$with_firewalld" = "xyes"])
+
+
dnl Avahi library
AC_ARG_WITH([avahi],
AC_HELP_STRING([--with-avahi], [use avahi to advertise remote daemon @<:@default=check@:>@]),
diff --git a/src/Makefile.am b/src/Makefile.am
index e48dfa5..e60a8af 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -941,9 +941,9 @@ noinst_LTLIBRARIES += libvirt_driver_network.la
#libvirt_la_BUILT_LIBADD += libvirt_driver_network.la
endif
libvirt_driver_network_la_CFLAGS = \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(top_srcdir)/src/conf $(AM_CFLAGS) $(DBUS_CFLAGS)
if WITH_DRIVER_MODULES
-libvirt_driver_network_la_LIBADD = ../gnulib/lib/libgnu.la
+libvirt_driver_network_la_LIBADD = ../gnulib/lib/libgnu.la $(DBUS_LIBS)
libvirt_driver_network_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
endif
libvirt_driver_network_la_SOURCES = $(NETWORK_DRIVER_SOURCES)
@@ -1086,9 +1086,9 @@ libvirt_la_BUILT_LIBADD += libvirt_driver_nwfilter.la
noinst_LTLIBRARIES += libvirt_driver_nwfilter.la
endif
libvirt_driver_nwfilter_la_CFLAGS = $(LIBPCAP_CFLAGS) \
- -I$(top_srcdir)/src/conf $(AM_CFLAGS)
+ -I$(top_srcdir)/src/conf $(AM_CFLAGS) $(DBUS_CFLAGS)
libvirt_driver_nwfilter_la_LDFLAGS = $(LD_AMFLAGS)
-libvirt_driver_nwfilter_la_LIBADD = $(LIBPCAP_LIBS)
+libvirt_driver_nwfilter_la_LIBADD = $(LIBPCAP_LIBS) $(DBUS_LIBS)
if WITH_DRIVER_MODULES
libvirt_driver_nwfilter_la_LIBADD += ../gnulib/lib/libgnu.la
libvirt_driver_nwfilter_la_LDFLAGS += -module -avoid-version
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index d82212f..094bbae 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -63,6 +63,11 @@
#include "virnetdevbridge.h"
#include "virnetdevtap.h"
+#if HAVE_FIREWALLD
+#include "virdbus.h"
+#include "logging.h"
+#endif
+
#define NETWORK_PID_DIR LOCALSTATEDIR "/run/libvirt/network"
#define NETWORK_STATE_DIR LOCALSTATEDIR "/lib/libvirt/network"
@@ -253,6 +258,24 @@ networkAutostartConfigs(struct network_driver *driver) {
}
}
+#if HAVE_FIREWALLD
+static DBusHandlerResult
+firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED, DBusMessage *message, void *user_data) {
+ struct network_driver *_driverState = (struct network_driver *) user_data;
+
+ if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS,
+ "NameOwnerChanged") ||
+ dbus_message_is_signal(message, "org.fedoraproject.FirewallD1",
+ "Reloaded"))
+ {
+ VIR_DEBUG("Reload in bridge_driver because of firewalld.");
+ networkReloadIptablesRules(_driverState);
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+#endif
+
/**
* networkStartup:
*
@@ -262,6 +285,9 @@ static int
networkStartup(int privileged) {
uid_t uid = geteuid();
char *base = NULL;
+#ifdef HAVE_FIREWALLD
+ DBusConnection *sysbus = NULL;
+#endif
if (VIR_ALLOC(driverState) < 0)
goto error;
@@ -326,6 +352,30 @@ networkStartup(int privileged) {
networkDriverUnlock(driverState);
+#ifdef HAVE_FIREWALLD
+ if (!(sysbus = virDBusGetSystemBus())) {
+ virErrorPtr err = virGetLastError();
+ VIR_WARN("DBus not available, disabling firewalld support in bridge_driver: %s", err->message);
+ } else {
+ /* add matches for
+ * NameOwnerChanged on org.freedesktop.DBus for firewalld start/stop
+ * Reloaded on org.fedoraproject.FirewallD1 for firewalld reload
+ */
+ dbus_bus_add_match(sysbus,
+ "type='signal'"
+ ",interface='"DBUS_INTERFACE_DBUS"'"
+ ",member='NameOwnerChanged'"
+ ",arg0='org.fedoraproject.FirewallD1'",
+ NULL);
+ dbus_bus_add_match(sysbus,
+ "type='signal'"
+ ",interface='org.fedoraproject.FirewallD1'"
+ ",member='Reloaded'",
+ NULL);
+ dbus_connection_add_filter(sysbus, firewalld_dbus_filter_bridge, (void *)driverState, NULL);
+ }
+#endif
+
return 0;
out_of_memory:
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
index ffb4b5d..da9f4a0 100644
--- a/src/nwfilter/nwfilter_driver.c
+++ b/src/nwfilter/nwfilter_driver.c
@@ -27,6 +27,11 @@
#include <config.h>
+#if HAVE_FIREWALLD
+#include "virdbus.h"
+#include "logging.h"
+#endif
+
#include "internal.h"
#include "virterror_internal.h"
@@ -47,6 +52,8 @@ static virNWFilterDriverStatePtr driverState;
static int nwfilterDriverShutdown(void);
+static int nwfilterDriverReload(void);
+
static void nwfilterDriverLock(virNWFilterDriverStatePtr driver)
{
virMutexLock(&driver->lock);
@@ -57,6 +64,22 @@ static void nwfilterDriverUnlock(virNWFilterDriverStatePtr driver)
}
+#if HAVE_FIREWALLD
+static DBusHandlerResult
+firewalld_dbus_filter_nwfilter(DBusConnection *connection ATTRIBUTE_UNUSED, DBusMessage *message, void *user_data ATTRIBUTE_UNUSED) {
+ if (dbus_message_is_signal(message, DBUS_INTERFACE_DBUS,
+ "NameOwnerChanged") ||
+ dbus_message_is_signal(message, "org.fedoraproject.FirewallD1",
+ "Reloaded"))
+ {
+ VIR_DEBUG("Reload in nwfilter_driver because of firewalld.");
+ nwfilterDriverReload();
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+#endif
+
/**
* virNWFilterStartup:
*
@@ -66,6 +89,32 @@ static int
nwfilterDriverStartup(int privileged) {
char *base = NULL;
+#ifdef HAVE_FIREWALLD
+ DBusConnection *sysbus = NULL;
+
+ if (!(sysbus = virDBusGetSystemBus())) {
+ virErrorPtr err = virGetLastError();
+ VIR_WARN("DBus not available, disabling firewalld support in nwfilter_driver: %s", err->message);
+ } else {
+ /* add matches for
+ * NameOwnerChanged on org.freedesktop.DBus for firewalld start/stop
+ * Reloaded on org.fedoraproject.FirewallD1 for firewalld reload
+ */
+ dbus_bus_add_match(sysbus,
+ "type='signal'"
+ ",interface='"DBUS_INTERFACE_DBUS"'"
+ ",member='NameOwnerChanged'"
+ ",arg0='org.fedoraproject.FirewallD1'",
+ NULL);
+ dbus_bus_add_match(sysbus,
+ "type='signal'"
+ ",interface='org.fedoraproject.FirewallD1'"
+ ",member='Reloaded'",
+ NULL);
+ dbus_connection_add_filter(sysbus, firewalld_dbus_filter_nwfilter, NULL, NULL);
+ }
+#endif
+
if (virNWFilterLearnInit() < 0)
return -1;
diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfilter_ebiptables_driver.c
index 8e4436f..0cd047a 100644
--- a/src/nwfilter/nwfilter_ebiptables_driver.c
+++ b/src/nwfilter/nwfilter_ebiptables_driver.c
@@ -4051,6 +4051,7 @@ ebiptablesDriverInit(bool privileged)
{
virBuffer buf = VIR_BUFFER_INITIALIZER;
char *errmsg = NULL;
+ char *firewall_cmd_path = NULL;
if (!privileged)
return 0;
@@ -4061,6 +4062,30 @@ ebiptablesDriverInit(bool privileged)
gawk_cmd_path = virFindFileInPath("gawk");
grep_cmd_path = virFindFileInPath("grep");
+ firewall_cmd_path = virFindFileInPath("firewall-cmd");
+ if (firewall_cmd_path) {
+ virBufferAsprintf(&buf, "IPT=%s\n", firewall_cmd_path);
+ /* basic probing */
+ virBufferAsprintf(&buf,
+ CMD_DEF("$IPT --state") CMD_SEPARATOR
+ CMD_EXEC
+ "%s",
+ CMD_STOPONERR(1));
+
+ if (ebiptablesExecCLI(&buf, NULL, NULL) >= 0) {
+ VIR_DEBUG("Using firewall-cmd in nwfilter_ebiptables_driver.");
+ ebtables_cmd_path = NULL;
+ iptables_cmd_path = NULL;
+ ip6tables_cmd_path = NULL;
+ virAsprintf(&ebtables_cmd_path, "%s --direct --passthrough eb", firewall_cmd_path);
+ virAsprintf(&iptables_cmd_path, "%s --direct --passthrough ipv4", firewall_cmd_path);
+ virAsprintf(&ip6tables_cmd_path, "%s --direct --passthrough ipv6", firewall_cmd_path);
+ }
+ VIR_FREE(firewall_cmd_path);
+ }
+ if (ebtables_cmd_path == NULL || iptables_cmd_path == NULL ||
+ ip6tables_cmd_path == NULL) {
+
ebtables_cmd_path = virFindFileInPath("ebtables");
if (ebtables_cmd_path) {
NWFILTER_SET_EBTABLES_SHELLVAR(&buf);
@@ -4099,6 +4124,8 @@ ebiptablesDriverInit(bool privileged)
VIR_WARN("Could not find 'iptables' executable");
}
+ }
+
ip6tables_cmd_path = virFindFileInPath("ip6tables");
if (ip6tables_cmd_path) {
NWFILTER_SET_IP6TABLES_SHELLVAR(&buf);
diff --git a/src/util/ebtables.c b/src/util/ebtables.c
index dcb3eb9..b7773ea 100644
--- a/src/util/ebtables.c
+++ b/src/util/ebtables.c
@@ -176,11 +176,34 @@ ebtablesAddRemoveRule(ebtRules *rules, int action, const char *arg, ...)
const char *s;
int n, command_idx;
+#if HAVE_FIREWALLD
+ int ret;
+ char *firewall_cmd_path = NULL;
+ virCommandPtr cmd = NULL;
+
+ firewall_cmd_path = virFindFileInPath("firewall-cmd");
+ if (firewall_cmd_path) {
+ cmd = virCommandNew(firewall_cmd_path);
+ virCommandAddArgList(cmd, "--state", NULL);
+ ret = virCommandRun(cmd, NULL);
+ if (ret != 0) {
+ VIR_FREE(firewall_cmd_path);
+ firewall_cmd_path = NULL;
+ }
+ virCommandFree(cmd);
+ }
+#endif
+
n = 1 + /* /sbin/ebtables */
2 + /* --table foo */
2 + /* --insert bar */
1; /* arg */
+#if HAVE_FIREWALLD
+ if (firewall_cmd_path)
+ n += 3; /* --direct --passthrough eb */
+#endif
+
va_start(args, arg);
while (va_arg(args, const char *))
n++;
@@ -192,6 +215,15 @@ ebtablesAddRemoveRule(ebtRules *rules, int action, const char *arg, ...)
n = 0;
+#if HAVE_FIREWALLD
+ if (firewall_cmd_path) {
+ if (!(argv[n++] = strdup(firewall_cmd_path)))
+ goto error;
+ argv[n++] = strdup("--direct");
+ argv[n++] = strdup("--passthrough");
+ argv[n++] = strdup("eb");
+ } else
+#endif
if (!(argv[n++] = strdup(EBTABLES_PATH)))
goto error;
diff --git a/src/util/iptables.c b/src/util/iptables.c
index 3023900..0cb3293 100644
--- a/src/util/iptables.c
+++ b/src/util/iptables.c
@@ -104,11 +104,28 @@ iptablesAddRemoveRule(iptRules *rules, int family, int action,
{
va_list args;
int ret;
- virCommandPtr cmd;
+ virCommandPtr cmd = NULL;
const char *s;
-
- cmd = virCommandNew((family == AF_INET6)
- ? IP6TABLES_PATH : IPTABLES_PATH);
+ char *firewall_cmd_path = NULL;
+
+#if HAVE_FIREWALLD
+ firewall_cmd_path = virFindFileInPath("firewall-cmd");
+ if (firewall_cmd_path) {
+ cmd = virCommandNew(firewall_cmd_path);
+ virCommandAddArgList(cmd, "--state", NULL);
+ ret = virCommandRun(cmd, NULL);
+ if (ret == 0) {
+ cmd = virCommandNew(firewall_cmd_path);
+ virCommandAddArgList(cmd, "--direct", "--passthrough",
+ (family == AF_INET6) ? "ipv6" : "ipv4", NULL);
+ } else
+ cmd = NULL;
+ VIR_FREE(firewall_cmd_path);
+ }
+ if (!cmd)
+#endif
+ cmd = virCommandNew((family == AF_INET6)
+ ? IP6TABLES_PATH : IPTABLES_PATH);
virCommandAddArgList(cmd, "--table", rules->table,
action == ADD ? "--insert" : "--delete",
--
1.7.10
12 years, 7 months
[libvirt] [PATCH] keepalive: Add ability to disable keepalive messages
by Peter Krempa
The docs for virConnectSetKeepAlive() advertise that this function
should be able to disable keepalives on negative or zero interval time.
This patch removes the check that prohibited this and adds code to
disable keepalives on negative/zero interval.
* src/libvirt.c: virConnectSetKeepAlive(): - remove check for negative
values
* src/rpc/virnetclient.c
* src/rpc/virnetclient.h: - add virNetClientKeepAliveStop() to disable
keepalive messages
* src/remote/remote_driver.c: remoteSetKeepAlive(): -add ability to
disable keepalives
---
src/libvirt.c | 6 ------
src/remote/remote_driver.c | 7 ++++++-
src/rpc/virnetclient.c | 8 ++++++++
src/rpc/virnetclient.h | 2 ++
4 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/libvirt.c b/src/libvirt.c
index af42d3b..3f043e1 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -18452,12 +18452,6 @@ int virConnectSetKeepAlive(virConnectPtr conn,
return -1;
}
- if (interval <= 0) {
- virLibConnError(VIR_ERR_INVALID_ARG,
- _("negative or zero interval make no sense"));
- goto error;
- }
-
if (conn->driver->setKeepAlive) {
ret = conn->driver->setKeepAlive(conn, interval, count);
if (ret < 0)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index af46384..7863b73 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -4631,7 +4631,12 @@ remoteSetKeepAlive(virConnectPtr conn, int interval, unsigned int count)
goto cleanup;
}
- ret = virNetClientKeepAliveStart(priv->client, interval, count);
+ if (interval > 0) {
+ ret = virNetClientKeepAliveStart(priv->client, interval, count);
+ } else {
+ virNetClientKeepAliveStop(priv->client);
+ ret = 0;
+ }
cleanup:
remoteDriverUnlock(priv);
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c
index 33b7701..2629c14 100644
--- a/src/rpc/virnetclient.c
+++ b/src/rpc/virnetclient.c
@@ -248,6 +248,14 @@ virNetClientKeepAliveStart(virNetClientPtr client,
return ret;
}
+void
+virNetClientKeepAliveStop(virNetClientPtr client)
+{
+ virNetClientLock(client);
+ virKeepAliveStop(client->keepalive);
+ virNetClientUnlock(client);
+}
+
static void
virNetClientKeepAliveDeadCB(void *opaque)
{
diff --git a/src/rpc/virnetclient.h b/src/rpc/virnetclient.h
index 7c30d2b..13b4f96 100644
--- a/src/rpc/virnetclient.h
+++ b/src/rpc/virnetclient.h
@@ -104,4 +104,6 @@ int virNetClientKeepAliveStart(virNetClientPtr client,
int interval,
unsigned int count);
+void virNetClientKeepAliveStop(virNetClientPtr client);
+
#endif /* __VIR_NET_CLIENT_H__ */
--
1.7.3.4
12 years, 7 months
[libvirt] [PATCH] fix memleak in linuxParseCPUmap
by Hu Tao
---
src/nodeinfo.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
index 7e993a9..e842474 100644
--- a/src/nodeinfo.c
+++ b/src/nodeinfo.c
@@ -605,6 +605,7 @@ linuxParseCPUmap(int *max_cpuid, const char *path)
}
*max_cpuid = max_id;
+ VIR_FREE(str);
return map;
error:
--
1.7.1
12 years, 7 months
[libvirt] [PATCH 0/5] -no-user-config option, move CPU models to /usr/share
by Eduardo Habkost
This is the first try of the new -no-user-config option.
Patches 1 to 3 just move some code around, patch 4 just adds the new option
without adding any new config file. Patch 5 finally creates a /usr/share/qemu
/cpus-x86_64.conf file, with the CPU models we currently have on Qemu.
Reference to previous discussion:
- http://marc.info/?l=qemu-devel&m=133278877315665
This series depends on the following:
Subject: [PATCH v5 00/14] configure: --with-confsuffix option
Message-Id: <1334778950-18660-1-git-send-email-ehabkost(a)redhat.com>
Eduardo Habkost (5):
move code to read default config files to a separate function
eliminate arch_config_name variable
move list of default config files to an array
implement -no-user-config command-line option
move CPU definitions to /usr/share/qemu/cpus-x86_64.conf
Makefile | 12 +++-
arch_init.c | 31 ++++++++-
arch_init.h | 6 +-
qemu-options.hx | 16 ++++-
sysconfigs/target/cpus-x86_64.conf | 128 ++++++++++++++++++++++++++++++++++
sysconfigs/target/target-x86_64.conf | 128 ----------------------------------
vl.c | 14 ++--
7 files changed, 190 insertions(+), 145 deletions(-)
create mode 100644 sysconfigs/target/cpus-x86_64.conf
--
1.7.3.2
12 years, 7 months
[libvirt] [PATCH v2] Improve on virAtomic implementation
by Stefan Berger
This patch improves the previously added virAtomicInt implementation
by using gcc-builtins if possible. The needed builtins are available
since GCC >= 4.1. At least the 4.0 docs don't mention them.
---
src/util/viratomic.h | 95
++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 79 insertions(+), 16 deletions(-)
Index: libvirt-acl/src/util/viratomic.h
===================================================================
--- libvirt-acl.orig/src/util/viratomic.h
+++ libvirt-acl/src/util/viratomic.h
@@ -30,6 +30,29 @@
typedef struct _virAtomicInt virAtomicInt;
typedef virAtomicInt *virAtomicIntPtr;
+# define __VIR_ATOMIC_USES_LOCK
+
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
+# undef __VIR_ATOMIC_USES_LOCK
+# endif
+
+static inline int virAtomicIntInit(virAtomicIntPtr vaip)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
+static inline int virAtomicIntRead(virAtomicIntPtr vaip)
+ ATTRIBUTE_NONNULL(1);
+static inline void virAtomicIntSet(virAtomicIntPtr vaip, int val)
+ ATTRIBUTE_NONNULL(1);
+static inline int virAtomicIntAdd(virAtomicIntPtr vaip, int add)
+ ATTRIBUTE_NONNULL(1);
+static inline int virAtomicIntSub(virAtomicIntPtr vaip, int add)
+ ATTRIBUTE_NONNULL(1);
+static inline int virAtomicIntInc(virAtomicIntPtr vaip)
+ ATTRIBUTE_NONNULL(1);
+static inline int virAtomicIntDec(virAtomicIntPtr vaip)
+ ATTRIBUTE_NONNULL(1);
+
+# ifdef __VIR_ATOMIC_USES_LOCK
+
struct _virAtomicInt {
virMutex lock;
int value;
@@ -42,22 +65,6 @@ virAtomicIntInit(virAtomicIntPtr vaip)
return virMutexInit(&vaip->lock);
}
-static inline void
-virAtomicIntSet(virAtomicIntPtr vaip, int value)
-{
- virMutexLock(&vaip->lock);
-
- vaip->value = value;
-
- virMutexUnlock(&vaip->lock);
-}
-
-static inline int
-virAtomicIntRead(virAtomicIntPtr vaip)
-{
- return vaip->value;
-}
-
static inline int
virAtomicIntAdd(virAtomicIntPtr vaip, int add)
{
@@ -88,4 +95,60 @@ virAtomicIntSub(virAtomicIntPtr vaip, in
return ret;
}
+# else /* __VIR_ATOMIC_USES_LOCK */
+
+struct _virAtomicInt {
+ int value;
+};
+
+static inline int
+virAtomicIntInit(virAtomicIntPtr vaip)
+{
+ vaip->value = 0;
+ return 0;
+}
+
+static inline int
+virAtomicIntAdd(virAtomicIntPtr vaip, int add)
+{
+ return __sync_add_and_fetch(&vaip->value, add);
+}
+
+static inline int
+virAtomicIntSub(virAtomicIntPtr vaip, int sub)
+{
+ return __sync_sub_and_fetch(&vaip->value, sub);
+}
+
+# endif /* __VIR_ATOMIC_USES_LOCK */
+
+
+
+/* common operations that need no locking or build on others */
+
+
+static inline void
+virAtomicIntSet(virAtomicIntPtr vaip, int value)
+{
+ vaip->value = value;
+}
+
+static inline int
+virAtomicIntRead(virAtomicIntPtr vaip)
+{
+ return *(volatile int *)&vaip->value;
+}
+
+static inline int
+virAtomicIntInc(virAtomicIntPtr vaip)
+{
+ return virAtomicIntAdd(vaip, 1);
+}
+
+static inline int
+virAtomicIntDec(virAtomicIntPtr vaip)
+{
+ return virAtomicIntSub(vaip, 1);
+}
+
#endif /* __VIR_ATOMIC_H */
12 years, 7 months
[libvirt] [PATCH] docs: Update libvirt-daemon-arch figure
by Michal Privoznik
Currently, we are showing libvirt client contains qemu and lxc drivers.
This is not correct as qemu and lxc drivers are always accessed via
remote driver. Therefore we need to substitute those two so we don't
confuse users. I've chosen vbox and vmware.
---
docs/libvirt-daemon-arch.fig | 62 +++++++++++++++++++++---------------------
docs/libvirt-daemon-arch.png | Bin 16479 -> 8070 bytes
2 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/docs/libvirt-daemon-arch.fig b/docs/libvirt-daemon-arch.fig
index 53e9c6d..d352583 100644
--- a/docs/libvirt-daemon-arch.fig
+++ b/docs/libvirt-daemon-arch.fig
@@ -1,72 +1,72 @@
-#FIG 3.2 Produced by xfig version 3.2.5
+#FIG 3.2 Produced by xfig version 3.2.5b
Landscape
Center
Inches
-Letter
+Letter
100.00
Single
-2
1200 2
-6 75 150 13050 5100
+6 75 150 13050 5025
6 4425 764 5938 1150
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
4425 764 5938 764 5938 1150 4425 1150 4425 764
-4 0 0 50 -1 16 15 0.0000 4 131 415 4519 1053 xen\001
+4 0 0 50 -1 16 15 0.0000 4 135 390 4519 1053 xen\001
-6
6 4425 1246 5938 1631
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
4425 1246 5938 1246 5938 1631 4425 1631 4425 1246
-4 0 0 50 -1 16 15 0.0000 4 178 640 4519 1535 qemu\001
+4 0 0 50 -1 16 15 0.0000 4 180 510 4519 1535 vbox\001
-6
6 4425 1728 5938 2113
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
4425 1728 5938 1728 5938 2113 4425 2113 4425 1728
-4 0 0 50 -1 16 15 0.0000 4 178 829 4519 2017 openvz\001
+4 0 0 50 -1 16 15 0.0000 4 195 780 4519 2017 openvz\001
-6
6 4425 2210 5938 2595
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
4425 2210 5938 2210 5938 2595 4425 2595 4425 2210
-4 0 0 50 -1 16 15 0.0000 4 178 320 4519 2499 lxc\001
+4 0 0 50 -1 16 15 0.0000 4 135 855 4519 2499 vmware\001
-6
6 4425 2691 5938 3077
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
4425 2691 5938 2691 5938 3077 4425 3077 4425 2691
-4 0 0 50 -1 16 15 0.0000 4 166 415 4519 2980 test\001
--6
-6 4425 3173 5938 3559
-2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
- 4425 3173 5938 3173 5938 3559 4425 3559 4425 3173
-4 0 0 50 -1 16 15 0.0000 4 166 794 4519 3462 remote\001
+4 0 0 50 -1 16 15 0.0000 4 165 405 4519 2980 test\001
-6
6 11328 764 12842 1150
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
11328 764 12842 764 12842 1150 11328 1150 11328 764
-4 0 0 50 -1 16 15 0.0000 4 131 415 11423 1053 xen\001
+4 0 0 50 -1 16 15 0.0000 4 135 390 11423 1053 xen\001
-6
6 11328 1246 12842 1631
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
11328 1246 12842 1246 12842 1631 11328 1631 11328 1246
-4 0 0 50 -1 16 15 0.0000 4 178 640 11423 1535 qemu\001
+4 0 0 50 -1 16 15 0.0000 4 195 615 11423 1535 qemu\001
-6
6 11328 1728 12842 2113
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
11328 1728 12842 1728 12842 2113 11328 2113 11328 1728
-4 0 0 50 -1 16 15 0.0000 4 178 829 11423 2017 openvz\001
+4 0 0 50 -1 16 15 0.0000 4 195 780 11423 2017 openvz\001
-6
6 11328 2210 12842 2595
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
11328 2210 12842 2210 12842 2595 11328 2595 11328 2210
-4 0 0 50 -1 16 15 0.0000 4 178 320 11423 2499 lxc\001
+4 0 0 50 -1 16 15 0.0000 4 180 285 11423 2499 lxc\001
-6
6 11328 2691 12842 3077
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
11328 2691 12842 2691 12842 3077 11328 3077 11328 2691
-4 0 0 50 -1 16 15 0.0000 4 166 415 11423 2980 test\001
+4 0 0 50 -1 16 15 0.0000 4 165 405 11423 2980 test\001
-6
6 11328 3173 12842 3559
2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
11328 3173 12842 3173 12842 3559 11328 3559 11328 3173
-4 0 0 50 -1 16 15 0.0000 4 166 794 11423 3462 remote\001
+4 0 0 50 -1 16 15 0.0000 4 165 765 11423 3462 remote\001
+-6
+6 4425 3173 5938 3559
+2 2 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
+ 4425 3173 5938 3173 5938 3559 4425 3559 4425 3173
+4 0 0 50 -1 16 15 0.0000 4 165 765 4519 3462 remote\001
-6
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
75 1342 1587 1342 1587 2113 75 2113 75 1342
@@ -99,16 +99,16 @@ Single
10004 572 10004 3751
2 1 2 5 0 7 50 -1 -1 3.000 0 0 -1 0 0 2
10760 572 10760 3751
-4 0 0 50 -1 16 15 0.0000 4 225 1256 170 1728 Application\001
-4 0 0 50 -1 16 13 0.0000 4 154 367 1966 1631 URI\001
-4 0 0 50 -1 16 15 5.3233 4 178 1149 3763 4040 Driver API\001
-4 0 0 50 -1 16 15 5.3233 4 178 1173 3101 4040 Public API\001
-4 0 0 50 -1 16 15 5.3233 4 225 1233 4992 4040 Driver Impl\001
-4 0 0 50 -1 16 18 0.0000 4 213 652 3763 379 libvirt\001
-4 0 0 50 -1 16 13 0.0000 4 154 901 1966 2017 lxc://host/\001
-4 0 0 50 -1 16 15 0.0000 4 178 747 7734 1728 libvirtd\001
-4 0 0 50 -1 16 15 5.3233 4 178 1149 10666 4040 Driver API\001
-4 0 0 50 -1 16 15 5.3233 4 178 1173 10004 4040 Public API\001
-4 0 0 50 -1 16 15 5.3233 4 225 1233 11896 4040 Driver Impl\001
-4 0 0 50 -1 16 18 0.0000 4 213 652 10666 379 libvirt\001
+4 0 0 50 -1 16 15 0.0000 4 240 1170 170 1728 Application\001
+4 0 0 50 -1 16 13 0.0000 4 165 360 1966 1631 URI\001
+4 0 0 50 -1 16 15 5.3233 4 180 1095 3763 4040 Driver API\001
+4 0 0 50 -1 16 15 5.3233 4 180 1110 3101 4040 Public API\001
+4 0 0 50 -1 16 15 5.3233 4 240 1155 4992 4040 Driver Impl\001
+4 0 0 50 -1 16 18 0.0000 4 210 675 3763 379 libvirt\001
+4 0 0 50 -1 16 13 0.0000 4 165 885 1966 2017 lxc://host/\001
+4 0 0 50 -1 16 15 0.0000 4 180 675 7734 1728 libvirtd\001
+4 0 0 50 -1 16 15 5.3233 4 180 1095 10666 4040 Driver API\001
+4 0 0 50 -1 16 15 5.3233 4 180 1110 10004 4040 Public API\001
+4 0 0 50 -1 16 15 5.3233 4 240 1155 11896 4040 Driver Impl\001
+4 0 0 50 -1 16 18 0.0000 4 210 675 10666 379 libvirt\001
-6
diff --git a/docs/libvirt-daemon-arch.png b/docs/libvirt-daemon-arch.png
index b7ed2f689112e45ffd5b108ed7a03f9808618d96..26a7abae2308cfa40057cc292f1fb73ea9feff2d 100644
GIT binary patch
literal 8070
zcmeHMXH-+$w%&knP(+M)z(k}4uz(<mD7{943W%MKLI_IlNE5IDN=K0*MNknjV59^H
z0W6e+1QZcM2Pr`UL`vx8?RY)+opbN|amO3u{yRTdjIr0wT650z%{jks?PxPowBR<_
zHUIzwPa2`l0RYcc0N_INbAwOvw|sF1|84a&vhV?b?WUYRuCRa@IQVd%?+J6?^B!2=
zfUDk)0NTu05`E3X$JfWf`?{yEq?+Q9qjz4qK>=XT&`Ffug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?>6o+p9T^BbQ?%zJvzBa{C3@ShO=(}e%5
z;6E$)zt;*FT!A*->=%ii3%>(JS9)M#``}){nG3fqJp#`81^V8+?dy5Y4+Wjl(njf=
z);_9vRI|2RrW$;@>z_|Ac?5ZQLuYULxp^GZR@dA+aky@TXEMK;TsdEO4)Oc{15a_B
AuK)l5
--
1.7.8.5
12 years, 7 months
[libvirt] [libvirt-glib][PATCH] test-domain-create: Don't shadow global variable
by Michal Privoznik
In function create_usb_controller variable 'index' shadows a global
declaration.
---
libvirt-gconfig/tests/test-domain-create.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c
index 699c255..00bd620 100644
--- a/libvirt-gconfig/tests/test-domain-create.c
+++ b/libvirt-gconfig/tests/test-domain-create.c
@@ -45,7 +45,7 @@ const char *features[] = { "foo", "bar", "baz", NULL };
static GVirConfigDomainControllerUsb *
-create_usb_controller(GVirConfigDomainControllerUsbModel model, guint index,
+create_usb_controller(GVirConfigDomainControllerUsbModel model, guint indx,
GVirConfigDomainControllerUsb *master, guint start_port,
guint domain, guint bus, guint slot, guint function,
gboolean multifunction)
@@ -55,7 +55,7 @@ create_usb_controller(GVirConfigDomainControllerUsbModel model, guint index,
controller = gvir_config_domain_controller_usb_new();
gvir_config_domain_controller_usb_set_model(controller, model);
- gvir_config_domain_controller_set_index(GVIR_CONFIG_DOMAIN_CONTROLLER(controller), index);
+ gvir_config_domain_controller_set_index(GVIR_CONFIG_DOMAIN_CONTROLLER(controller), indx);
if (master)
gvir_config_domain_controller_usb_set_master(controller, master, start_port);
address = gvir_config_domain_address_pci_new();
--
1.7.8.5
12 years, 7 months
[libvirt] [PATCH 0/2] physical cpu usages of virtual cpus
by Hu Tao
See patch 1 and patch 4 for the purpose of this series.
patches 1,2 are for libvirt.
patch 3 is for ocaml-libvirt.
patch 4 is for virt-top.
Hu Tao (2):
Add a new flag VIR_DOMAIN_CPU_STATS_F_VCPU to virDomainGetCPUStats
Adds support to VIR_DOMAIN_CPU_STATS_F_VCPU in qemu_driver.
include/libvirt/libvirt.h.in | 10 +++
src/qemu/qemu_driver.c | 152 +++++++++++++++++++++++++++++++++++++-----
src/util/cgroup.c | 4 +-
tools/virsh.c | 17 +++--
4 files changed, 160 insertions(+), 23 deletions(-)
12 years, 7 months
[libvirt] [PATCH] openvz: read vmguarpages/privvmpages to set memory tunables
by Guido Günther
---
OpenVZ's memory paramters [1,2] aren't very well supported at the
moment. Let's make a start with privvmpages/vmguarpages using already
available memtune parameters. I hope the mapping looks correct.
Cheers,
-- Guido
[1] http://wiki.openvz.org/UBC_primary_parameters
[2] http://wiki.openvz.org/UBC_secondary_parameters
src/openvz/openvz_conf.c | 103 +++++++++++++++++++++++
src/openvz/openvz_driver.c | 200 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 303 insertions(+)
diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c
index 5848ec4..579fcfc 100644
--- a/src/openvz/openvz_conf.c
+++ b/src/openvz/openvz_conf.c
@@ -423,6 +423,108 @@ error:
}
+/* Parse config values of the form barrier:limit into barrier and limit */
+static int
+openvzParseBarrierAndLimit(const char* value,
+ unsigned long *barrier,
+ unsigned long *limit)
+{
+ char *token;
+ char *saveptr = NULL;
+ char *str = strdup(value);
+
+ if (str == NULL) {
+ virReportOOMError();
+ goto error;
+ }
+
+ token = strtok_r(str, ":", &saveptr);
+ if (token == NULL) {
+ goto error;
+ } else {
+ if (barrier != NULL) {
+ if (virStrToLong_ul(token, NULL, 10, barrier))
+ goto error;
+ }
+ }
+ token = strtok_r(NULL, ":", &saveptr);
+ if (token == NULL) {
+ goto error;
+ } else {
+ if (limit != NULL) {
+ if (virStrToLong_ul(token, NULL, 10, limit))
+ goto error;
+ }
+ }
+ return 0;
+error:
+ VIR_FREE(str);
+ return -1;
+}
+
+
+static int
+openvzReadMemConf(virDomainDefPtr def, int veid)
+{
+ int ret;
+ char *temp = NULL;
+ unsigned long barrier, limit;
+ const char *param;
+ unsigned long kb_per_pages;
+
+ kb_per_pages = sysconf(_SC_PAGESIZE) / 1024;
+ if (kb_per_pages == -1) {
+ openvzError(VIR_ERR_INTERNAL_ERROR,
+ _("Can't determine page size"));
+ goto error;
+ }
+
+ /* Memory allocation guarantee */
+ param = "VMGUARPAGES";
+ ret = openvzReadVPSConfigParam(veid, param, &temp);
+ if (ret < 0) {
+ openvzError(VIR_ERR_INTERNAL_ERROR,
+ _("Could not read '%s' from config for container %d"),
+ param, veid);
+ goto error;
+ } else if (ret > 0) {
+ ret = openvzParseBarrierAndLimit(temp, &barrier, NULL);
+ if (ret < 0) {
+ openvzError(VIR_ERR_INTERNAL_ERROR,
+ _("Could not parse barrier of '%s' "
+ "from config for container %d"), param, veid);
+ goto error;
+ }
+ def->mem.min_guarantee = barrier * kb_per_pages;
+ }
+
+ /* Memory hard and soft limits */
+ param = "PRIVVMPAGES";
+ ret = openvzReadVPSConfigParam(veid, param, &temp);
+ if (ret < 0) {
+ openvzError(VIR_ERR_INTERNAL_ERROR,
+ _("Could not read '%s' from config for container %d"),
+ param, veid);
+ goto error;
+ } else if (ret > 0) {
+ ret = openvzParseBarrierAndLimit(temp, &barrier, &limit);
+ if (ret < 0) {
+ openvzError(VIR_ERR_INTERNAL_ERROR,
+ _("Could not parse barrier and limit of '%s' "
+ "from config for container %d"), param, veid);
+ goto error;
+ }
+ def->mem.soft_limit = barrier * kb_per_pages;
+ def->mem.hard_limit = limit * kb_per_pages;
+ }
+
+ ret = 0;
+error:
+ VIR_FREE(temp);
+ return ret;
+}
+
+
/* Free all memory associated with a openvz_driver structure */
void
openvzFreeDriver(struct openvz_driver *driver)
@@ -535,6 +637,7 @@ int openvzLoadDomains(struct openvz_driver *driver) {
openvzReadNetworkConf(dom->def, veid);
openvzReadFSConf(dom->def, veid);
+ openvzReadMemConf(dom->def, veid);
virUUIDFormat(dom->def->uuid, uuidstr);
if (virHashAddEntry(driver->domains.objs, uuidstr, dom) < 0)
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index e8b6915..6f8a6a8 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -54,6 +54,7 @@
#include "nodeinfo.h"
#include "memory.h"
#include "virfile.h"
+#include "virtypedparam.h"
#include "logging.h"
#include "command.h"
#include "viruri.h"
@@ -65,6 +66,8 @@
#define CMDBUF_LEN 1488
#define CMDOP_LEN 288
+#define OPENVZ_NB_MEM_PARAM 3
+
static int openvzGetProcessInfo(unsigned long long *cpuTime, int vpsid);
static int openvzGetMaxVCPUs(virConnectPtr conn, const char *type);
static int openvzDomainGetMaxVcpus(virDomainPtr dom);
@@ -1631,6 +1634,201 @@ cleanup:
return -1;
}
+
+static int
+openvzDomainGetBarrierLimit(virDomainPtr domain,
+ const char *param,
+ long *barrier,
+ long *limit)
+{
+ int status, ret = -1;
+ char *output = NULL;
+ virCommandPtr cmd = virCommandNewArgList(VZLIST, "--no-header", NULL);
+
+ virCommandSetOutputBuffer(cmd, &output);
+ virCommandAddArgFormat(cmd, "-o%s.b,%s.l", param, param);
+ virCommandAddArg(cmd, domain->name);
+ if (virCommandRun(cmd, &status)) {
+ openvzError(VIR_ERR_OPERATION_FAILED,
+ _("Failed to get %s for %s: %d"), param, domain->name,
+ status);
+ goto cleanup;
+ }
+
+ if (sscanf(output, "%ld %ld", barrier, limit) != 2) {
+ openvzError(VIR_ERR_INTERNAL_ERROR,
+ _("Can't parse "VZLIST" output, got %s"), output);
+ goto cleanup;
+ }
+
+ ret = 0;
+cleanup:
+ VIR_FREE(output);
+ virCommandFree(cmd);
+ return ret;
+}
+
+
+static int
+openvzDomainSetBarrierLimit(virDomainPtr domain,
+ const char *param,
+ long barrier,
+ long limit)
+{
+ int status, ret = -1;
+ virCommandPtr cmd = virCommandNewArgList(VZCTL, "--quiet", "set", NULL);
+
+ virCommandAddArg(cmd, domain->name);
+ virCommandAddArgFormat(cmd, "--%s", param);
+ virCommandAddArgFormat(cmd, "%ld:%ld", barrier, limit);
+ virCommandAddArg(cmd, "--save");
+ if (virCommandRun(cmd, &status)) {
+ openvzError(VIR_ERR_OPERATION_FAILED,
+ _("Failed to set %s for %s: %d"), param, domain->name,
+ status);
+ goto cleanup;
+ }
+
+ ret = 0;
+cleanup:
+ virCommandFree(cmd);
+ return ret;
+}
+
+
+static int
+openvzDomainGetMemoryParameters(virDomainPtr domain,
+ virTypedParameterPtr params,
+ int *nparams,
+ unsigned int flags)
+{
+ int i, result = -1;
+ const char *name;
+ long barrier, limit, kb_per_pages;
+ unsigned long long int val;
+
+ virCheckFlags(0, -1);
+
+ kb_per_pages = sysconf(_SC_PAGESIZE) / 1024;
+ if (kb_per_pages == -1) {
+ openvzError(VIR_ERR_INTERNAL_ERROR,
+ _("Can't determine page size"));
+ goto cleanup;
+ }
+
+ if (*nparams == 0) {
+ *nparams = OPENVZ_NB_MEM_PARAM;
+ return 0;
+ }
+
+ for (i = 0; i <= *nparams; i++) {
+ virMemoryParameterPtr param = ¶ms[i];
+
+ switch (i) {
+ case 0:
+ name = "privvmpages";
+ if (openvzDomainGetBarrierLimit(domain, name, &barrier, &limit) < 0)
+ goto cleanup;
+
+ val = limit * kb_per_pages;
+ if (virTypedParameterAssign(param, VIR_DOMAIN_MEMORY_HARD_LIMIT,
+ VIR_TYPED_PARAM_ULLONG, val) < 0)
+ goto cleanup;
+ break;
+
+ case 1:
+ name = "privvmpages";
+ if (openvzDomainGetBarrierLimit(domain, name, &barrier, &limit) < 0)
+ goto cleanup;
+
+ val = barrier * kb_per_pages;
+ if (virTypedParameterAssign(param, VIR_DOMAIN_MEMORY_SOFT_LIMIT,
+ VIR_TYPED_PARAM_ULLONG, val) < 0)
+ goto cleanup;
+ break;
+
+ case 2:
+ name = "vmguarpages";
+ if (openvzDomainGetBarrierLimit(domain, name, &barrier, &limit) < 0)
+ goto cleanup;
+
+ val = barrier * kb_per_pages;
+ if (virTypedParameterAssign(param, VIR_DOMAIN_MEMORY_MIN_GUARANTEE,
+ VIR_TYPED_PARAM_ULLONG, val) < 0)
+ goto cleanup;
+ break;
+ }
+ }
+
+ if (*nparams > OPENVZ_NB_MEM_PARAM)
+ *nparams = OPENVZ_NB_MEM_PARAM;
+ result = 0;
+
+cleanup:
+ return result;
+}
+
+
+static int
+openvzDomainSetMemoryParameters(virDomainPtr domain,
+ virTypedParameterPtr params,
+ int nparams,
+ unsigned int flags)
+{
+ int i, result = -1;
+ long kb_per_pages;
+
+ kb_per_pages = sysconf(_SC_PAGESIZE) / 1024;
+ if (kb_per_pages == -1) {
+ openvzError(VIR_ERR_INTERNAL_ERROR,
+ _("Can't determine page size"));
+ goto cleanup;
+ }
+
+ virCheckFlags(0, -1);
+ if (virTypedParameterArrayValidate(params, nparams,
+ VIR_DOMAIN_MEMORY_HARD_LIMIT,
+ VIR_TYPED_PARAM_ULLONG,
+ VIR_DOMAIN_MEMORY_SOFT_LIMIT,
+ VIR_TYPED_PARAM_ULLONG,
+ VIR_DOMAIN_MEMORY_MIN_GUARANTEE,
+ VIR_TYPED_PARAM_ULLONG,
+ NULL) < 0)
+ return -1;
+
+ for (i = 0; i < nparams; i++) {
+ virTypedParameterPtr param = ¶ms[i];
+ long barrier, limit;
+
+ if (STREQ(param->field, VIR_DOMAIN_MEMORY_HARD_LIMIT)) {
+ if (openvzDomainGetBarrierLimit(domain, "privvmpages",
+ &barrier, &limit) < 0)
+ goto cleanup;
+ limit = params[i].value.ul / kb_per_pages;
+ if (openvzDomainSetBarrierLimit(domain, "privvmpages",
+ barrier, limit) < 0)
+ goto cleanup;
+ } else if (STREQ(param->field, VIR_DOMAIN_MEMORY_SOFT_LIMIT)) {
+ if (openvzDomainGetBarrierLimit(domain, "privvmpages",
+ &barrier, &limit) < 0)
+ goto cleanup;
+ barrier = params[i].value.ul / kb_per_pages;
+ if (openvzDomainSetBarrierLimit(domain, "privvmpages",
+ barrier, limit) < 0)
+ goto cleanup;
+ } else if (STREQ(param->field, VIR_DOMAIN_MEMORY_MIN_GUARANTEE)) {
+ barrier = params[i].value.ul / kb_per_pages;
+ if (openvzDomainSetBarrierLimit(domain, "vmguarpages",
+ barrier, LONG_MAX) < 0)
+ goto cleanup;
+ }
+ }
+ result = 0;
+cleanup:
+ return result;
+}
+
+
static int
openvzGetVEStatus(virDomainObjPtr vm, int *status, int *reason)
{
@@ -1752,6 +1950,8 @@ static virDriver openvzDriver = {
.domainDestroy = openvzDomainShutdown, /* 0.3.1 */
.domainDestroyFlags = openvzDomainShutdownFlags, /* 0.9.4 */
.domainGetOSType = openvzGetOSType, /* 0.3.1 */
+ .domainGetMemoryParameters = openvzDomainGetMemoryParameters, /* 0.9.12 */
+ .domainSetMemoryParameters = openvzDomainSetMemoryParameters, /* 0.9.12 */
.domainGetInfo = openvzDomainGetInfo, /* 0.3.1 */
.domainGetState = openvzDomainGetState, /* 0.9.2 */
.domainSetVcpus = openvzDomainSetVcpus, /* 0.4.6 */
--
1.7.10
12 years, 7 months
[libvirt] [PATCH] vbox: Fix passing an empty IMedium* array to IMachine::Delete
by Matthias Bolte
vboxArray is not castable to a COM item type. vboxArray is a
wrapper around the XPCOM and MSCOM specific array handling.
In this case we can avoid passing NULL as an empty array to
IMachine::Delete by passing a dummy IMedium* array with a single
NULL item.
---
Jean-Baptiste, I can not reproduce the assertion you mentioned, or
I don't know where to look for it. So could you verify that is patch
avoids this assertion?
src/vbox/vbox_tmpl.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 57c18a4..4b0ee2e 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -5294,11 +5294,10 @@ vboxDomainUndefineFlags(virDomainPtr dom, unsigned int flags)
((IMachine_Delete)machine->vtbl->Delete)(machine, &safeArray, &progress);
# else
- union {
- vboxArray array;
- IMedium *medium;
- } u = { .array = VBOX_ARRAY_INITIALIZER };
- machine->vtbl->Delete(machine, 0, &u.medium, &progress);
+ /* XPCOM doesn't like NULL as an array, even when the array size is 0.
+ * Instead pass it a dummy array to avoid passing NULL. */
+ IMedium *array[] = { NULL };
+ machine->vtbl->Delete(machine, 0, array, &progress);
# endif
if (progress != NULL) {
progress->vtbl->WaitForCompletion(progress, -1);
--
1.7.4.1
12 years, 7 months