[libvirt] [PATCH] libxl: add missing 'break' from commit 1298daca
by Jim Fehlig
Add missing 'break's from commit 1298daca, as noted by John Ferlan
https://www.redhat.com/archives/libvir-list/2014-October/msg00430.html
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
src/libxl/libxl_domain.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index f2cd07b..9c62291 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -522,6 +522,7 @@ libxlDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
else
dev->data.video->vram = 8 * 1024;
}
+ break;
case VIR_DOMAIN_VIDEO_TYPE_CIRRUS:
if (dev->data.video->vram == 0) {
if (dm_type == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN)
@@ -529,6 +530,7 @@ libxlDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
else
dev->data.video->vram = 4 * 1024;
}
+ break;
}
}
--
1.8.4.5
10 years, 1 month
[libvirt] [PATCH 0/5] libxl: user-specified domain config improvements
by Jim Fehlig
This is essentially a V2 of Stefan's patch to add support
for user-specified video device in the libxl driver.
https://www.redhat.com/archives/libvir-list/2014-September/msg01157.html
It goes a bit further and adds support for user-specfied <emulator>,
which was trivial to add after introducing libxlDomainGetEmulatorType
in patch 3. To ease review, the series has been split up as follows:
- Missed keymap config from commit 4dfc34c3 split out to patch 1
- Patch 2 added to defer setting default vram value to the Xen drivers
- Patch 3 added to detect old qemu-dm vs qemu with xen support
- Patch 4 is a slightly reworked version of Stefan's patch
- Patch 5 added to support user-specified <emulator>
Jim Fehlig (4):
libxl: Copy user-specified keymap to libxl build info struct
Xen: Defer setting default vram value to Xen drivers
libxl: Add function to determine device model type
libxl: Support user-specified <emulator>
Stefan Bader (1):
libxl: Implement basic video device selection
src/conf/domain_conf.c | 4 ++
src/libxl/libxl_conf.c | 124 +++++++++++++++++++++++++++++++++++++++++++++++
src/libxl/libxl_conf.h | 3 ++
src/libxl/libxl_domain.c | 22 +++++++++
src/xen/xen_driver.c | 19 ++++++++
5 files changed, 172 insertions(+)
--
1.8.4.5
10 years, 1 month
Re: [libvirt] [GIT PULL] namespace updates for v3.17-rc1
by Adrian Davey
On 21.08.2014 08:54:57, writes Eric W. Biederman:
> Richard Weinberger <richard nod at> writes:
>
>> Am 21.08.2014 08:29, schrieb Richard Weinberger:
>>> Am 21.08.2014 06:53, schrieb Eric W. Biederman:
>>>> The bugs fixed are security issues, so if we have to break a small
>>>> number of userspace applications we will. Anything that we can
>>>> reasonably do to avoid regressions will be done.
>>>>
>>>> Could you please look at my user-namespace.git#for-next branch I
>>>> have a
>>>> fix for at least one regresion causing issue in there. I think it
>>>> may
>>>> fix your issues but I am not fully certain more comments below.
>>>
>>> I'll run this on my LXC testbed today.
>>
>> Looks good. With these patches applied libvirt works again. :)
>
> Darn I read my email in the wrong order. I am glad to hear that my
> changes were enough to fix libvirt-lxc.
>
> I will aim at pushing this to Linus after the conference is over and I
> can trust myself to think clearly.
>
> Eric
Apologies for the poor etiquette on posting (normal email client is
broken so using a web version). I am trying to track down if my issues
with libvirt_lxc are down to me missing the changes in libvirt or the
kernel (libvirt 1.2.9, Linux 3.16.3) that are mentioned from this
thread.
I am looking for either the git changes in both libvirt and linux
(currently failing to find either) or if indeed these changes made it
upstream? Is anyone able to point me in the right direction please?
This is for the issue I have with proc remounting while using <idmap>
which I believe is the problem talked about in this thread, but I could
well be barking up the wrong tree.
virsh # start testvm
error: Failed to start domain testvm
error: internal error: guest failed to start: Failed to re-mount
/proc/sys on /proc/sys flags=1021: Operation not permitted
Many thanks,
Adrian
10 years, 1 month
[libvirt] [libvirt-python PATCH] Improve error output when use getTime with a nonzero flags.
by Luyao Huang
When give a nonzero flags to getTime, c_retval will get -1 and goto cleanup.
But py_retval still is NULL,so pass c_retval value to py_retval.
This will make the output message more correct.
error before use this patch:
SystemError: error return without exception set
after use the patch:
libvirtError: unsupported flags (0x1) in function qemuDomainGetTime
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
libvirt-override.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libvirt-override.c b/libvirt-override.c
index 9ba87eb..eed8d50 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -7758,6 +7758,7 @@ libvirt_virDomainGetTime(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
LIBVIRT_END_ALLOW_THREADS;
if (c_retval < 0)
+ py_retval = libvirt_intWrap(c_retval);
goto cleanup;
if (!(pyobj_seconds = libvirt_longlongWrap(seconds)) ||
--
1.8.3.1
10 years, 1 month
[libvirt] [libvirt-python PATCH 1/1] Change the comment in getPyNodeCPUCount method reflecting correct called methods
by Pradipta Kr. Banerjee
Comment mentions virGetNodeCPUMap whereas the actual method is
virNodeGetCPUMap. Similarly comment mentions virGetNodeInfo whereas the actual
method is virNodeGetInfo
Signed-off-by: Pradipta Kr. Banerjee <bpradip(a)in.ibm.com>
---
libvirt-override.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libvirt-override.c b/libvirt-override.c
index 8b3c503..9ba87eb 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -437,10 +437,10 @@ cleanup:
/*
* Utility function to retrieve the number of node CPUs present.
- * It first tries virGetNodeCPUMap, which will return the
+ * It first tries virNodeGetCPUMap, which will return the
* number reliably, if available.
* As a fallback and for compatibility with backlevel libvirt
- * versions virGetNodeInfo will be called to calculate the
+ * versions virNodeGetInfo will be called to calculate the
* CPU number, which has the potential to return a too small
* number if some host CPUs are offline.
*/
--
1.9.3
10 years, 1 month
[libvirt] [PATCH] tools: compatible with old wireshark
by Jincheng Miao
Old version wireshark doesn't have ws_symbol_export.h, which is added
from wireshark-v1.10.0. But some distros, like RHEL6u5, only have
wireshark-v1.8, so libvirt should be compatible with these wiresharks.
Signed-off-by: Jincheng Miao <jmiao(a)redhat.com>
---
configure.ac | 2 +-
tools/wireshark/util/make-dissector-reg | 16 +++++++++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index f7b02ff..c62f934 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2667,7 +2667,7 @@ if test "$with_wireshark_dissector" != "no"; then
LIBVIRT_WS_HANDLE_ERROR([wireshark/config.h is required for wireshark-dissector support])
])
AC_CHECK_HEADERS([wireshark/epan/packet.h wireshark/epan/dissectors/packet-tcp.h],, [
- LIBVIRT_WS_HANDLE_ERROR([wireshark/epan/{packet,packet-tcp}.h are required for wireshark-dissector support])
+ LIBVIRT_WS_HANDLE_ERROR([wireshark/epan/{packet,/dissectors/packet-tcp}.h are required for wireshark-dissector support])
], [
#include <wireshark/config.h>
])
diff --git a/tools/wireshark/util/make-dissector-reg b/tools/wireshark/util/make-dissector-reg
index 6fa25c1..2524f09 100755
--- a/tools/wireshark/util/make-dissector-reg
+++ b/tools/wireshark/util/make-dissector-reg
@@ -53,7 +53,21 @@ then
/* plugins are DLLs */
#define WS_BUILD_DLL
-#include "ws_symbol_export.h"
+
+/* File ws_symbol_export.h is introduced from commit id
+ * 45c2884 (1.10.0). For compatability with old wireshark,
+ * which is provided by some distros, like RHEL6u5,
+ * here define WS_DLL_PUBLIC_NOEXTERN manually.
+ */
+#if WIRESHARK_VERSION < 1010000
+# if __GNUC__ >= 4
+# define WS_DLL_PUBLIC_NOEXTERN __attribute__ ((visibility("default")))
+# else
+# define WS_DLL_PUBLIC_NOEXTERN __attribute__ ((dllexport))
+# endif
+#else
+# include "ws_symbol_export.h"
+#endif
/* In 1.12 wireshark WS_DLL_PUBLIC_NOEXTERN was substitued with
* WS_DLL_PUBLIC_DEF. See wireshark's commit
--
1.9.3
10 years, 1 month
[libvirt] [PATCH 0/5] qemu: Fix rest of hot/cold-add/remove device functions to use typecasted switch
by Peter Krempa
Tweak the rest of the stuff to get notified at compile time when adding a new
device type to implement it's backend functions.
Peter Krempa (5):
qemu: Convert qemuDomainDetachDeviceLive to typecasted enum
qemu: Convert qemuDomainUpdateDeviceLive to typecasted enum
qemu: Convert qemuDomainAttachDeviceConfig to typecasted enum
qemu: Convert qemuDomainDetachDeviceConfig to typecasted enum
qemu: Convert qemuDomainUpdateDeviceConfig to typecasted enum
src/qemu/qemu_driver.c | 96 ++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 85 insertions(+), 11 deletions(-)
--
2.1.0
10 years, 1 month
[libvirt] [PATCH] conf: fix an memory leak in virSocketAddrIsNumericLocalhost()
by Chen Fan
Signed-off-by: Chen Fan <chen.fan.fnst(a)cn.fujitsu.com>
---
src/util/virsocketaddr.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/src/util/virsocketaddr.c b/src/util/virsocketaddr.c
index 8c9f05f..5f54e68 100644
--- a/src/util/virsocketaddr.c
+++ b/src/util/virsocketaddr.c
@@ -894,19 +894,24 @@ virSocketAddrIsNumericLocalhost(const char *addr)
struct in_addr tmp = { .s_addr = htonl(INADDR_LOOPBACK) };
struct sockaddr_in *inet4;
struct sockaddr_in6 *inet6;
+ bool ret = false;
if (virSocketAddrParseInternal(&res, addr, AF_UNSPEC, false) < 0)
- return false;
+ return ret;
switch (res->ai_addr->sa_family) {
case AF_INET:
inet4 = (struct sockaddr_in*) res->ai_addr;
- return memcmp(&inet4->sin_addr.s_addr, &tmp.s_addr,
- sizeof(inet4->sin_addr.s_addr)) == 0;
+ ret = memcmp(&inet4->sin_addr.s_addr, &tmp.s_addr,
+ sizeof(inet4->sin_addr.s_addr)) == 0;
+ break;
case AF_INET6:
inet6 = (struct sockaddr_in6*) res->ai_addr;
- return IN6_IS_ADDR_LOOPBACK(&(inet6->sin6_addr));
+ ret = IN6_IS_ADDR_LOOPBACK(&(inet6->sin6_addr));
+ break;
}
- return false;
+
+ freeaddrinfo(res);
+ return ret;
}
--
1.9.3
10 years, 1 month
[libvirt] [PATCH v3 0/3] Check migration configuration
by Chen Fan
add some check in migration configuration.
Chen Fan (3):
migration: add migration_host support for Ipv6 address without
brackets
conf: add check if migration_host is a localhost address
conf: Check migration_address whether is localhost
src/libvirt_private.syms | 3 +-
src/qemu/qemu.conf | 2 +-
src/qemu/qemu_conf.c | 58 ++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_conf.h | 2 ++
src/qemu/qemu_migration.c | 49 ++++++++++++++++----------------
src/qemu/test_libvirtd_qemu.aug.in | 2 +-
src/util/virsocketaddr.c | 43 +++++++++++++++++++++-------
src/util/virsocketaddr.h | 4 ++-
tests/sockettest.c | 2 +-
9 files changed, 125 insertions(+), 40 deletions(-)
--
1.9.3
10 years, 1 month