Update to libvirt 0.8.5

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=72
This commit is contained in:
James Fehlig 2010-11-01 22:38:39 +00:00 committed by Git OBS Bridge
parent 9e7c1f54c1
commit f666bb4e1e
13 changed files with 301 additions and 123 deletions

View File

@ -0,0 +1,57 @@
commit b164db623c7dce2d75b100abae3be6ffd162c4e4
Author: Eric Blake <eblake@redhat.com>
Date: Mon Nov 1 12:18:06 2010 -0600
build: avoid compiler warning in xen code
* src/xen/xend_internal.c (xenDaemonFormatSxpr): Hoist verify
outside of function to avoid a -Wnested-externs warning.
* src/xen/xm_internal.c (xenXMDomainConfigFormat): Likewise.
Reported by Daniel P. Berrange.
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index 614c036..5c3a4bd 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -5744,6 +5744,10 @@ xenDaemonFormatSxprInput(virDomainInputDefPtr input,
}
+/* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is
+ either 32, or 64 on a platform where long is big enough. */
+verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT);
+
/**
* xenDaemonFormatSxpr:
* @conn: pointer to the hypervisor connection
@@ -5772,7 +5776,6 @@ xenDaemonFormatSxpr(virConnectPtr conn,
virBufferVSprintf(&buf, "(vcpus %u)", def->maxvcpus);
/* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is
either 32, or 64 on a platform where long is big enough. */
- verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT);
if (def->vcpus < def->maxvcpus)
virBufferVSprintf(&buf, "(vcpu_avail %lu)", (1UL << def->vcpus) - 1);
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index 6c5df0f..a4d1a30 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -2304,6 +2304,10 @@ error:
}
+/* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is
+ either 32, or 64 on a platform where long is big enough. */
+verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT);
+
virConfPtr xenXMDomainConfigFormat(virConnectPtr conn,
virDomainDefPtr def) {
virConfPtr conf = NULL;
@@ -2338,7 +2342,6 @@ virConfPtr xenXMDomainConfigFormat(virConnectPtr conn,
goto no_memory;
/* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is
either 32, or 64 on a platform where long is big enough. */
- verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT);
if (def->vcpus < def->maxvcpus &&
xenXMConfigSetInt(conf, "vcpu_avail", (1UL << def->vcpus) - 1) < 0)
goto no_memory;

136
dc27e089-xen-max-cpu.patch Normal file
View File

@ -0,0 +1,136 @@
commit dc27e089bf40ef0336667e2678774b6dadd876a5
Author: Eric Blake <eblake@redhat.com>
Date: Fri Oct 29 10:51:01 2010 -0600
xen: work with ia64 MAX_VIRT_CPUS of 64
* src/xen/xen_hypervisor.c (MAX_VIRT_CPUS): Move...
* src/xen/xen_driver.h (MAX_VIRT_CPUS): ...so all xen code can see
same value.
* src/xen/xend_internal.c (sexpr_to_xend_domain_info)
(xenDaemonDomainGetVcpusFlags, xenDaemonParseSxpr)
(xenDaemonFormatSxpr): Work if MAX_VIRT_CPUS is 64 on a platform
where long is 64-bits.
* src/xen/xm_internal.c (xenXMDomainConfigParse)
(xenXMDomainConfigFormat): Likewise.
diff --git a/src/xen/xen_driver.h b/src/xen/xen_driver.h
index 53f97d4..16d22f1 100644
--- a/src/xen/xen_driver.h
+++ b/src/xen/xen_driver.h
@@ -29,6 +29,14 @@
# include <winsock2.h>
# endif
+/* xen-unstable changeset 19788 removed MAX_VIRT_CPUS from public
+ * headers. Its semantic was retained with XEN_LEGACY_MAX_VCPUS.
+ * Ensure MAX_VIRT_CPUS is defined accordingly.
+ */
+# if !defined(MAX_VIRT_CPUS) && defined(XEN_LEGACY_MAX_VCPUS)
+# define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
+# endif
+
extern int xenRegister (void);
# define XEN_UNIFIED_HYPERVISOR_OFFSET 0
diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
index 3797865..ec726fe 100644
--- a/src/xen/xen_hypervisor.c
+++ b/src/xen/xen_hypervisor.c
@@ -109,14 +109,6 @@ typedef privcmd_hypercall_t hypercall_t;
# define SYS_IFACE_MIN_VERS_NUMA 4
#endif
-/* xen-unstable changeset 19788 removed MAX_VIRT_CPUS from public
- * headers. Its semanitc was retained with XEN_LEGACY_MAX_VCPUS.
- * Ensure MAX_VIRT_CPUS is defined accordingly.
- */
-#if !defined(MAX_VIRT_CPUS) && defined(XEN_LEGACY_MAX_VCPUS)
-# define MAX_VIRT_CPUS XEN_LEGACY_MAX_VCPUS
-#endif
-
static int xen_ioctl_hypercall_cmd = 0;
static int initialized = 0;
static int in_init = 0;
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index e96b762..614c036 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -2192,7 +2192,7 @@ xenDaemonParseSxpr(virConnectPtr conn,
}
def->maxvcpus = sexpr_int(root, "domain/vcpus");
- def->vcpus = count_one_bits(sexpr_int(root, "domain/vcpu_avail"));
+ def->vcpus = count_one_bits_l(sexpr_u64(root, "domain/vcpu_avail"));
if (!def->vcpus || def->maxvcpus < def->vcpus)
def->vcpus = def->maxvcpus;
@@ -2468,7 +2468,7 @@ sexpr_to_xend_domain_info(virDomainPtr domain, const struct sexpr *root,
}
info->cpuTime = sexpr_float(root, "domain/cpu_time") * 1000000000;
vcpus = sexpr_int(root, "domain/vcpus");
- info->nrVirtCpu = count_one_bits(sexpr_int(root, "domain/vcpu_avail"));
+ info->nrVirtCpu = count_one_bits_l(sexpr_u64(root, "domain/vcpu_avail"));
if (!info->nrVirtCpu || vcpus < info->nrVirtCpu)
info->nrVirtCpu = vcpus;
@@ -3706,7 +3706,7 @@ xenDaemonDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags)
ret = sexpr_int(root, "domain/vcpus");
if (!(flags & VIR_DOMAIN_VCPU_MAXIMUM)) {
- int vcpus = count_one_bits(sexpr_int(root, "domain/vcpu_avail"));
+ int vcpus = count_one_bits_l(sexpr_u64(root, "domain/vcpu_avail"));
if (vcpus)
ret = MIN(vcpus, ret);
}
@@ -5770,9 +5770,11 @@ xenDaemonFormatSxpr(virConnectPtr conn,
virBufferVSprintf(&buf, "(memory %lu)(maxmem %lu)",
def->mem.cur_balloon/1024, def->mem.max_balloon/1024);
virBufferVSprintf(&buf, "(vcpus %u)", def->maxvcpus);
- /* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is 32. */
+ /* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is
+ either 32, or 64 on a platform where long is big enough. */
+ verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT);
if (def->vcpus < def->maxvcpus)
- virBufferVSprintf(&buf, "(vcpu_avail %u)", (1U << def->vcpus) - 1);
+ virBufferVSprintf(&buf, "(vcpu_avail %lu)", (1UL << def->vcpus) - 1);
if (def->cpumask) {
char *ranges = virDomainCpuSetFormat(def->cpumask, def->cpumasklen);
@@ -5869,8 +5871,8 @@ xenDaemonFormatSxpr(virConnectPtr conn,
virBufferVSprintf(&buf, "(vcpus %u)", def->maxvcpus);
if (def->vcpus < def->maxvcpus)
- virBufferVSprintf(&buf, "(vcpu_avail %u)",
- (1U << def->vcpus) - 1);
+ virBufferVSprintf(&buf, "(vcpu_avail %lu)",
+ (1UL << def->vcpus) - 1);
for (i = 0 ; i < def->os.nBootDevs ; i++) {
switch (def->os.bootDevs[i]) {
diff --git a/src/xen/xm_internal.c b/src/xen/xm_internal.c
index 430d40b..6c5df0f 100644
--- a/src/xen/xm_internal.c
+++ b/src/xen/xm_internal.c
@@ -776,7 +776,7 @@ xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf) {
def->maxvcpus = count;
if (xenXMConfigGetULong(conf, "vcpu_avail", &count, -1) < 0)
goto cleanup;
- def->vcpus = MIN(count_one_bits(count), def->maxvcpus);
+ def->vcpus = MIN(count_one_bits_l(count), def->maxvcpus);
if (xenXMConfigGetString(conf, "cpus", &str, NULL) < 0)
goto cleanup;
@@ -2336,8 +2336,11 @@ virConfPtr xenXMDomainConfigFormat(virConnectPtr conn,
if (xenXMConfigSetInt(conf, "vcpus", def->maxvcpus) < 0)
goto no_memory;
+ /* Computing the vcpu_avail bitmask works because MAX_VIRT_CPUS is
+ either 32, or 64 on a platform where long is big enough. */
+ verify(MAX_VIRT_CPUS <= sizeof(1UL) * CHAR_BIT);
if (def->vcpus < def->maxvcpus &&
- xenXMConfigSetInt(conf, "vcpu_avail", (1U << def->vcpus) - 1) < 0)
+ xenXMConfigSetInt(conf, "vcpu_avail", (1UL << def->vcpus) - 1) < 0)
goto no_memory;
if ((def->cpumask != NULL) &&

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1f07f5ba0f9be4026866ee049a555777c525d3d4c754a69ebf92185878a8c128
size 8432891

3
libvirt-0.8.5.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2e4b053a5d74f886e0d75c7824ff078e4a3557d9a93186f248827baad11873e2
size 8679525

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Mon Nov 1 16:12:54 MDT 2010 - jfehlig@novell.com
- Update to libvirt 0.8.5
- Enable JSON and netdev features in QEMU > 0.13
- framework for auditing integration
- framework for DTrace/SystemTap integration
- Setting the number of vcpu at boot
- Enable support for nested SVM
- Virtio plan9fs filesystem QEMU
- Memory parameter controls
- portability to OS-X
- lot of bug fixes and other improvements
-------------------------------------------------------------------
Wed Oct 13 17:44:27 MDT 2010 - jfehlig@novell.com

View File

@ -1,5 +1,5 @@
#
# spec file for package libvirt (Version 0.8.4)
# spec file for package libvirt (Version 0.8.5)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -131,8 +131,8 @@ Url: http://libvirt.org/
License: LGPLv2.1+
Group: Development/Libraries/C and C++
AutoReqProv: yes
Version: 0.8.4
Release: 2
Version: 0.8.5
Release: 1
Summary: A C toolkit to interract with the virtualization capabilities of Linux
# The client side, i.e. shared libs and virsh are in a subpackage
Requires: %{name}-client = %{version}-%{release}
@ -156,7 +156,9 @@ Requires: PolicyKit >= 0.6
Source0: %{name}-%{version}.tar.bz2
Source1: libvirtd.init
# Upstream patches
Patch0: vport-configure.patch
Patch0: dc27e089-xen-max-cpu.patch
Patch1: b164db62-xen-compile-warnings.patch
Patch2: max-cpus-fixup.patch
# Need to go upstream
Patch100: xen-name-for-devid.patch
Patch102: clone.patch
@ -269,6 +271,8 @@ Authors:
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch100 -p1
%patch102
%patch103 -p1
@ -525,6 +529,8 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/gtk-doc/html/libvirt
%doc %{_docdir}/%{name}/*.png
%doc %{_docdir}/%{name}/*.html
%doc %{_docdir}/%{name}/*.gif
%doc %{_docdir}/%{name}/*.css
%doc %{_docdir}/%{name}/html
%files python

View File

@ -1,7 +1,7 @@
Index: libvirt-0.8.4/daemon/libvirtd.conf
Index: libvirt-0.8.5/daemon/libvirtd.conf
===================================================================
--- libvirt-0.8.4.orig/daemon/libvirtd.conf
+++ libvirt-0.8.4/daemon/libvirtd.conf
--- libvirt-0.8.5.orig/daemon/libvirtd.conf
+++ libvirt-0.8.5/daemon/libvirtd.conf
@@ -18,8 +18,8 @@
# It is necessary to setup a CA and issue server certificates before
# using this capability.
@ -28,11 +28,11 @@ Index: libvirt-0.8.4/daemon/libvirtd.conf
# Override the default mDNS advertizement name. This must be
# unique on the immediate broadcast network.
Index: libvirt-0.8.4/daemon/libvirtd.c
Index: libvirt-0.8.5/daemon/libvirtd.c
===================================================================
--- libvirt-0.8.4.orig/daemon/libvirtd.c
+++ libvirt-0.8.4/daemon/libvirtd.c
@@ -142,7 +142,7 @@ static int sigwrite = -1; /* Signa
--- libvirt-0.8.5.orig/daemon/libvirtd.c
+++ libvirt-0.8.5/daemon/libvirtd.c
@@ -143,7 +143,7 @@ static int sigwrite = -1; /* Signa
static int ipsock = 0; /* -l Listen for TCP/IP */
/* Defaults for configuration file elements */
@ -41,7 +41,7 @@ Index: libvirt-0.8.4/daemon/libvirtd.c
static int listen_tcp = 0;
static char *listen_addr = (char *) LIBVIRTD_LISTEN_ADDR;
static char *tls_port = (char *) LIBVIRTD_TLS_PORT;
@@ -164,7 +164,7 @@ static int auth_tcp = REMOTE_AUTH_NONE;
@@ -165,7 +165,7 @@ static int auth_tcp = REMOTE_AUTH_NONE;
#endif
static int auth_tls = REMOTE_AUTH_NONE;

38
max-cpus-fixup.patch Normal file
View File

@ -0,0 +1,38 @@
I'm waiting for an ACK before pushing this, but it sure seems
pretty trivial. I don't know why the xen 4.0.1 headers of rawhide
are different from the xen 3.4.3 headers of Fedora 13 (translation:
something used to implicitly include xen/xen.h in the older headers,
but no longer does in the newer xen, but I didn't bother to figure
out where the inclusion chain differs).
Tested on F13 and rawhide; fixes the MAX_VIRT_CPUS undeclared issue
that was occurring on rawhide.
src/xen/xen_driver.h | 2 ++
src/xen/xs_internal.c | 1 -
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/xen/xen_driver.h b/src/xen/xen_driver.h
index 16d22f1..6af6132 100644
--- a/src/xen/xen_driver.h
+++ b/src/xen/xen_driver.h
@@ -29,6 +29,8 @@
# include <winsock2.h>
# endif
+# include <xen/xen.h>
+
/* xen-unstable changeset 19788 removed MAX_VIRT_CPUS from public
* headers. Its semantic was retained with XEN_LEGACY_MAX_VCPUS.
* Ensure MAX_VIRT_CPUS is defined accordingly.
diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c
index a9817b1..eba1b95 100644
--- a/src/xen/xs_internal.c
+++ b/src/xen/xs_internal.c
@@ -22,7 +22,6 @@
#include <xen/dom0_ops.h>
#include <xen/version.h>
-#include <xen/xen.h>
#include <xs.h>

View File

@ -1,82 +0,0 @@
Rework configure logic for virtualport support
V2:
- added missing AC_ARG_WITH() for --with-virtualport
In this patch I am reworking the logic around detecting virtual port support and requiring the libnl dependency.
- It requires --with-macvtap and displays an error in case of --without-macvtap --with-virtualport.
- It tests for availability of certain data in include files and displays an error in case the include file is not at the correct level and --with-virtualport was chosen
- displays 'checking' messages for macvtap and virtualport support and results
- libnl support is required when macvtap is found or requested; if libnl is not there, please supply without-macvtap
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Index: libvirt-0.8.4/configure.ac
===================================================================
--- libvirt-0.8.4.orig/configure.ac
+++ libvirt-0.8.4/configure.ac
@@ -2060,6 +2060,7 @@ AC_ARG_WITH([macvtap],
[with_macvtap=${withval}],
[with_macvtap=check])
+AC_MSG_CHECKING([whether to compile with macvtap support])
if test "$with_macvtap" != "no" ; then
AC_TRY_COMPILE([ #include <sys/socket.h>
#include <linux/rtnetlink.h> ],
@@ -2077,19 +2078,35 @@ if test "$with_macvtap" != "no" ; then
AC_DEFINE_UNQUOTED([WITH_MACVTAP], $val, [whether macvtap support is enabled])
fi
AM_CONDITIONAL([WITH_MACVTAP], [test "$with_macvtap" = "yes"])
+AC_MSG_RESULT([$with_macvtap])
-AC_TRY_COMPILE([ #include <sys/socket.h>
- #include <linux/rtnetlink.h> ],
- [ int x = IFLA_PORT_MAX; ],
- [ with_virtualport=yes ],
- [ with_virtualport=no ])
-if test "$with_virtualport" = "yes"; then
- val=1
-else
- val=0
+AC_ARG_WITH([virtualport],
+ AC_HELP_STRING([--with-virtualport],[enable virtual port support @<:@default=check@:>@]),
+ [with_virtualport=${withval}],
+ [with_virtualport=check])
+
+if test "$with_virtualport" != "no"; then
+ if test "$with_macvtap" = "no"; then
+ AC_MSG_ERROR([--with-virtualport requires --with-macvtap])
+ fi
+ AC_MSG_CHECKING([whether to compile with virtual port support])
+ AC_TRY_COMPILE([ #include <sys/socket.h>
+ #include <linux/rtnetlink.h> ],
+ [ int x = IFLA_PORT_MAX; ],
+ [ with_virtualport=yes ],
+ [ if test "$with_virtualport" = "yes" ; then
+ AC_MSG_ERROR([Installed linux headers don't show support for virtual port support.])
+ fi
+ with_virtualport=no ])
+ if test "$with_virtualport" = "yes"; then
+ val=1
+ else
+ val=0
+ fi
+ AC_DEFINE_UNQUOTED([WITH_VIRTUALPORT], $val,
+ [whether vsi vepa support is enabled])
+ AC_MSG_RESULT([$with_virtualport])
fi
-AC_DEFINE_UNQUOTED([WITH_VIRTUALPORT], $val,
- [whether vsi vepa support is enabled])
AM_CONDITIONAL([WITH_VIRTUALPORT], [test "$with_virtualport" = "yes"])
@@ -2098,7 +2115,7 @@ dnl netlink library
LIBNL_CFLAGS=""
LIBNL_LIBS=""
-if test "$with_macvtap" = "yes" || test "$with_virtualport" = "yes"; then
+if test "$with_macvtap" = "yes"; then
PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [
], [
AC_MSG_ERROR([libnl >= $LIBNL_REQUIRED is required for macvtap support])

View File

@ -1,8 +1,8 @@
Index: libvirt-0.8.0/src/xen/xen_hypervisor.c
Index: libvirt-0.8.5/src/xen/xen_hypervisor.c
===================================================================
--- libvirt-0.8.0.orig/src/xen/xen_hypervisor.c
+++ libvirt-0.8.0/src/xen/xen_hypervisor.c
@@ -230,11 +230,28 @@ struct xen_v2d6_getdomaininfo {
--- libvirt-0.8.5.orig/src/xen/xen_hypervisor.c
+++ libvirt-0.8.5/src/xen/xen_hypervisor.c
@@ -222,11 +222,28 @@ struct xen_v2d6_getdomaininfo {
};
typedef struct xen_v2d6_getdomaininfo xen_v2d6_getdomaininfo;
@ -31,7 +31,7 @@ Index: libvirt-0.8.0/src/xen/xen_hypervisor.c
};
typedef union xen_getdomaininfo xen_getdomaininfo;
@@ -243,6 +260,7 @@ union xen_getdomaininfolist {
@@ -235,6 +252,7 @@ union xen_getdomaininfolist {
struct xen_v2_getdomaininfo *v2;
struct xen_v2d5_getdomaininfo *v2d5;
struct xen_v2d6_getdomaininfo *v2d6;
@ -39,7 +39,7 @@ Index: libvirt-0.8.0/src/xen/xen_hypervisor.c
};
typedef union xen_getdomaininfolist xen_getdomaininfolist;
@@ -280,147 +298,179 @@ typedef struct xen_v2s5_availheap xen_v
@@ -272,147 +290,179 @@ typedef struct xen_v2s5_availheap xen_v
#define XEN_GETDOMAININFOLIST_ALLOC(domlist, size) \
(hypervisor_version < 2 ? \
(VIR_ALLOC_N(domlist.v0, (size)) == 0) : \
@ -251,7 +251,7 @@ Index: libvirt-0.8.0/src/xen/xen_hypervisor.c
static int
@@ -2105,8 +2155,16 @@ xenHypervisorInit(void)
@@ -2095,8 +2145,16 @@ xenHypervisorInit(void)
sys_interface_version = 7; /* XEN_SYSCTL_INTERFACE_VERSION */
if (virXen_getdomaininfo(fd, 0, &info) == 1) {
dom_interface_version = 6; /* XEN_DOMCTL_INTERFACE_VERSION */

View File

@ -13,11 +13,11 @@ Date: Wed Jan 27 16:11:41 2010 -0700
This approach allows removing a disk when domain is inactive. We
obviously can't search xenstore when the domain is inactive.
Index: libvirt-0.8.4/src/xen/xend_internal.c
Index: libvirt-0.8.5/src/xen/xend_internal.c
===================================================================
--- libvirt-0.8.4.orig/src/xen/xend_internal.c
+++ libvirt-0.8.4/src/xen/xend_internal.c
@@ -92,6 +92,7 @@ xenDaemonFormatSxprOnePCI(virDomainHostd
--- libvirt-0.8.5.orig/src/xen/xend_internal.c
+++ libvirt-0.8.5/src/xen/xend_internal.c
@@ -93,6 +93,7 @@ xenDaemonFormatSxprOnePCI(virDomainHostd
static int
virDomainXMLDevID(virDomainPtr domain,
@ -25,7 +25,7 @@ Index: libvirt-0.8.4/src/xen/xend_internal.c
virDomainDeviceDefPtr dev,
char *class,
char *ref,
@@ -3964,7 +3965,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
@@ -4072,7 +4073,7 @@ xenDaemonAttachDeviceFlags(virDomainPtr
sexpr = virBufferContentAndReset(&buf);
@ -34,7 +34,7 @@ Index: libvirt-0.8.4/src/xen/xend_internal.c
/* device doesn't exist, define it */
ret = xend_op(domain->conn, domain->name, "op", "device_create",
"config", sexpr, NULL);
@@ -4081,7 +4082,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr
@@ -4190,7 +4191,7 @@ xenDaemonUpdateDeviceFlags(virDomainPtr
sexpr = virBufferContentAndReset(&buf);
@ -43,7 +43,7 @@ Index: libvirt-0.8.4/src/xen/xend_internal.c
virXendError(VIR_ERR_OPERATION_INVALID, "%s",
_("requested device does not exist"));
goto cleanup;
@@ -4173,7 +4174,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
@@ -4283,7 +4284,7 @@ xenDaemonDetachDeviceFlags(virDomainPtr
def, xml, VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
@ -52,7 +52,7 @@ Index: libvirt-0.8.4/src/xen/xend_internal.c
goto cleanup;
if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV) {
@@ -5923,6 +5924,7 @@ error:
@@ -6042,6 +6043,7 @@ error:
*/
static int
virDomainXMLDevID(virDomainPtr domain,
@ -60,7 +60,7 @@ Index: libvirt-0.8.4/src/xen/xend_internal.c
virDomainDeviceDefPtr dev,
char *class,
char *ref,
@@ -5931,8 +5933,12 @@ virDomainXMLDevID(virDomainPtr domain,
@@ -6050,8 +6052,12 @@ virDomainXMLDevID(virDomainPtr domain,
xenUnifiedPrivatePtr priv = domain->conn->privateData;
char *xref;
char *tmp;
@ -73,7 +73,7 @@ Index: libvirt-0.8.4/src/xen/xend_internal.c
if (dev->data.disk->driverName &&
STREQ(dev->data.disk->driverName, "tap"))
strcpy(class, "tap");
@@ -5942,19 +5948,21 @@ virDomainXMLDevID(virDomainPtr domain,
@@ -6061,19 +6067,21 @@ virDomainXMLDevID(virDomainPtr domain,
else
strcpy(class, "vbd");

View File

@ -1,8 +1,17 @@
Index: libvirt-0.8.4/src/xen/xend_internal.c
Index: libvirt-0.8.5/src/xen/xend_internal.c
===================================================================
--- libvirt-0.8.4.orig/src/xen/xend_internal.c
+++ libvirt-0.8.4/src/xen/xend_internal.c
@@ -1422,7 +1422,6 @@ xenDaemonParseSxprDisks(virDomainDefPtr
--- libvirt-0.8.5.orig/src/xen/xend_internal.c
+++ libvirt-0.8.5/src/xen/xend_internal.c
@@ -1376,7 +1376,7 @@ error:
static int
xenDaemonParseSxprDisks(virDomainDefPtr def,
const struct sexpr *root,
- int hvm,
+ int hvm ATTRIBUTE_UNUSED,
int xendConfigVersion)
{
const struct sexpr *cur, *node;
@@ -1423,7 +1423,6 @@ xenDaemonParseSxprDisks(virDomainDefPtr
/* There is a case without the uname to the CD-ROM device */
offset = strchr(dst, ':');
if (!offset ||

View File

@ -1,8 +1,8 @@
Index: libvirt-0.8.4/src/xen/xend_internal.c
Index: libvirt-0.8.5/src/xen/xend_internal.c
===================================================================
--- libvirt-0.8.4.orig/src/xen/xend_internal.c
+++ libvirt-0.8.4/src/xen/xend_internal.c
@@ -1393,20 +1393,24 @@ xenDaemonParseSxprDisks(virDomainDefPtr
--- libvirt-0.8.5.orig/src/xen/xend_internal.c
+++ libvirt-0.8.5/src/xen/xend_internal.c
@@ -1394,20 +1394,24 @@ xenDaemonParseSxprDisks(virDomainDefPtr
const char *src = NULL;
const char *dst = NULL;
const char *mode = NULL;
@ -27,7 +27,7 @@ Index: libvirt-0.8.4/src/xen/xend_internal.c
}
if (VIR_ALLOC(disk) < 0)
@@ -1531,7 +1535,12 @@ xenDaemonParseSxprDisks(virDomainDefPtr
@@ -1532,7 +1536,12 @@ xenDaemonParseSxprDisks(virDomainDefPtr
if (VIR_REALLOC_N(def->disks, def->ndisks+1) < 0)
goto no_memory;