diff --git a/b164db62-xen-compile-warnings.patch b/b164db62-xen-compile-warnings.patch new file mode 100644 index 0000000..60f65cf --- /dev/null +++ b/b164db62-xen-compile-warnings.patch @@ -0,0 +1,57 @@ +commit b164db623c7dce2d75b100abae3be6ffd162c4e4 +Author: Eric Blake +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; diff --git a/dc27e089-xen-max-cpu.patch b/dc27e089-xen-max-cpu.patch new file mode 100644 index 0000000..b99b923 --- /dev/null +++ b/dc27e089-xen-max-cpu.patch @@ -0,0 +1,136 @@ +commit dc27e089bf40ef0336667e2678774b6dadd876a5 +Author: Eric Blake +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 + # 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) && diff --git a/libvirt-0.8.4.tar.bz2 b/libvirt-0.8.4.tar.bz2 deleted file mode 100644 index 0f87f92..0000000 --- a/libvirt-0.8.4.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1f07f5ba0f9be4026866ee049a555777c525d3d4c754a69ebf92185878a8c128 -size 8432891 diff --git a/libvirt-0.8.5.tar.bz2 b/libvirt-0.8.5.tar.bz2 new file mode 100644 index 0000000..f014bbf --- /dev/null +++ b/libvirt-0.8.5.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2e4b053a5d74f886e0d75c7824ff078e4a3557d9a93186f248827baad11873e2 +size 8679525 diff --git a/libvirt.changes b/libvirt.changes index 2e161d4..3db2b22 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Mon Nov 1 17:27:29 MDT 2010 - jfehlig@novell.com + +- Fix build when using "policy kit 0" + polkit0.patch + +------------------------------------------------------------------- +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 diff --git a/libvirt.spec b/libvirt.spec index 2852b9f..fe39d4e 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -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,10 @@ 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 +Patch3: polkit0.patch # Need to go upstream Patch100: xen-name-for-devid.patch Patch102: clone.patch @@ -269,6 +272,9 @@ Authors: %prep %setup -q %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %patch100 -p1 %patch102 %patch103 -p1 @@ -525,6 +531,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 diff --git a/libvirtd-defaults.patch b/libvirtd-defaults.patch index 0ca0f0e..66dd246 100644 --- a/libvirtd-defaults.patch +++ b/libvirtd-defaults.patch @@ -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; diff --git a/max-cpus-fixup.patch b/max-cpus-fixup.patch new file mode 100644 index 0000000..ff8a6b7 --- /dev/null +++ b/max-cpus-fixup.patch @@ -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 + # endif + ++# include ++ + /* 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 + #include +-#include + + #include diff --git a/polkit0.patch b/polkit0.patch new file mode 100644 index 0000000..88ef6e6 --- /dev/null +++ b/polkit0.patch @@ -0,0 +1,12 @@ +Index: libvirt-0.8.5/daemon/remote.c +=================================================================== +--- libvirt-0.8.5.orig/daemon/remote.c ++++ libvirt-0.8.5/daemon/remote.c +@@ -4152,6 +4152,7 @@ remoteDispatchAuthPolkit (struct qemud_s + DBusError err; + const char *action; + char ident[100]; ++ int rv; + + memset(ident, 0, sizeof ident); + diff --git a/vport-configure.patch b/vport-configure.patch deleted file mode 100644 index aa2cec1..0000000 --- a/vport-configure.patch +++ /dev/null @@ -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 - -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 - #include ], -@@ -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 -- #include ], -- [ 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 -+ #include ], -+ [ 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]) diff --git a/xen-domctl-ver7.patch b/xen-domctl-ver7.patch index af7f4c5..589d95b 100644 --- a/xen-domctl-ver7.patch +++ b/xen-domctl-ver7.patch @@ -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 */ diff --git a/xen-name-for-devid.patch b/xen-name-for-devid.patch index 7a9e402..e6aa497 100644 --- a/xen-name-for-devid.patch +++ b/xen-name-for-devid.patch @@ -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"); diff --git a/xen-pv-cdrom.patch b/xen-pv-cdrom.patch index a4d3fc9..f0918ca 100644 --- a/xen-pv-cdrom.patch +++ b/xen-pv-cdrom.patch @@ -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 || diff --git a/xend-disk-order.patch b/xend-disk-order.patch index 3ec5123..fd01e1a 100644 --- a/xend-disk-order.patch +++ b/xend-disk-order.patch @@ -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;