- Update to libvirt 1.1.0

- Adding device removal or deletion events
  - Introduce new domain create APIs to pass pre-opened FDs to LXC
  - Add interface versions for Xen 4.3
  - Add new public API virDomainSetMemoryStatsPeriod
  - Various LXC improvements
  - Many incremental improvements and bug fixes, see
    http://libvirt.org/news.html
  - Drop upstream patches: f38c8185-CVE-2013-2230.patch,
    fd2e3c4c-xen-sysctl-domctl.patch, dfc69235-CVE-2013-4153.patch,
    96518d43-CVE-2013-4154.patch, fe89fd3b-storage-pool-deadlock.patch
  - Drop relax-qemu-usergroup-check.patch - no longer needed
    after hypervisor-specific daemon package split

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=290
This commit is contained in:
James Fehlig 2013-07-30 20:33:47 +00:00 committed by Git OBS Bridge
parent 0572a9487c
commit 0119ca3996
22 changed files with 133 additions and 718 deletions

View File

@ -1,85 +0,0 @@
commit 96518d4316b711c72205117f8d5c967d5127bbb6
Author: Alex Jia <ajia@redhat.com>
Date: Tue Jul 16 17:30:20 2013 +0800
qemu: Prevent crash of libvirtd without guest agent configuration
If users haven't configured guest agent then qemuAgentCommand() will
dereference a NULL 'mon' pointer, which causes crash of libvirtd when
using agent based cpu (un)plug.
With the patch, when the qemu-ga service isn't running in the guest,
a expected error "error: Guest agent is not responding: Guest agent
not available for now" will be raised, and the error "error: argument
unsupported: QEMU guest agent is not configured" is raised when the
guest hasn't configured guest agent.
GDB backtrace:
(gdb) bt
#0 virNetServerFatalSignal (sig=11, siginfo=<value optimized out>, context=<value optimized out>) at rpc/virnetserver.c:326
#1 <signal handler called>
#2 qemuAgentCommand (mon=0x0, cmd=0x7f39300017b0, reply=0x7f394b090910, seconds=-2) at qemu/qemu_agent.c:975
#3 0x00007f39429507f6 in qemuAgentGetVCPUs (mon=0x0, info=0x7f394b0909b8) at qemu/qemu_agent.c:1475
#4 0x00007f39429d9857 in qemuDomainGetVcpusFlags (dom=<value optimized out>, flags=9) at qemu/qemu_driver.c:4849
#5 0x00007f3957dffd8d in virDomainGetVcpusFlags (domain=0x7f39300009c0, flags=8) at libvirt.c:9843
How to reproduce?
# To start a guest without guest agent configuration
# then run the following cmdline
# virsh vcpucount foobar --guest
error: End of file while reading data: Input/output error
error: One or more references were leaked after disconnect from the hypervisor
error: Failed to reconnect to the hypervisor
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=984821
Signed-off-by: Alex Jia <ajia@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Index: libvirt-1.1.0/src/qemu/qemu_driver.c
===================================================================
--- libvirt-1.1.0.orig/src/qemu/qemu_driver.c
+++ libvirt-1.1.0/src/qemu/qemu_driver.c
@@ -3963,6 +3963,19 @@ qemuDomainSetVcpusFlags(virDomainPtr dom
goto endjob;
}
+ if (priv->agentError) {
+ virReportError(VIR_ERR_AGENT_UNRESPONSIVE, "%s",
+ _("QEMU guest agent is not "
+ "available due to an error"));
+ goto endjob;
+ }
+
+ if (!priv->agent) {
+ virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
+ _("QEMU guest agent is not configured"));
+ goto endjob;
+ }
+
qemuDomainObjEnterAgent(vm);
ncpuinfo = qemuAgentGetVCPUs(priv->agent, &cpuinfo);
qemuDomainObjExitAgent(vm);
@@ -4685,6 +4698,19 @@ qemuDomainGetVcpusFlags(virDomainPtr dom
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
goto cleanup;
+ if (priv->agentError) {
+ virReportError(VIR_ERR_AGENT_UNRESPONSIVE, "%s",
+ _("QEMU guest agent is not "
+ "available due to an error"));
+ goto endjob;
+ }
+
+ if (!priv->agent) {
+ virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
+ _("QEMU guest agent is not configured"));
+ goto endjob;
+ }
+
if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("domain is not running"));

View File

@ -2,7 +2,7 @@ Index: src/lxc/lxc_container.c
===================================================================
--- src/lxc/lxc_container.c.orig
+++ src/lxc/lxc_container.c
@@ -142,6 +142,7 @@ int lxcContainerHasReboot(void)
@@ -144,6 +144,7 @@ int lxcContainerHasReboot(void)
int cmd, v;
int status;
char *tmp;
@ -10,53 +10,41 @@ Index: src/lxc/lxc_container.c
if (virFileReadAll("/proc/sys/kernel/ctrl-alt-del", 10, &buf) < 0)
return -1;
@@ -158,14 +159,21 @@ int lxcContainerHasReboot(void)
@@ -160,12 +161,19 @@ int lxcContainerHasReboot(void)
VIR_FREE(buf);
cmd = v ? LINUX_REBOOT_CMD_CAD_ON : LINUX_REBOOT_CMD_CAD_OFF;
- if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0) {
- if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0)
+#ifdef __ia64__
+ stacksize *= 2;
+#endif
+ if (VIR_ALLOC_N(stack, stacksize) < 0) {
virReportOOMError();
+ if (VIR_ALLOC_N(stack, stacksize) < 0)
return -1;
}
- childStack = stack + (getpagesize() * 4);
+ childStack = stack + stacksize;
+#ifdef __ia64__
+ cpid = __clone2(lxcContainerRebootChild, stack, stacksize, flags, &cmd);
+ cpid = __clone2(lxcContainerRebootChild, childStack, stacksize, flags, &cmd);
+#else
cpid = clone(lxcContainerRebootChild, childStack, flags, &cmd);
+#endif
VIR_FREE(stack);
if (cpid < 0) {
virReportSystemError(errno, "%s",
@@ -2097,6 +2105,9 @@ int lxcContainerStart(virDomainDefPtr de
ttyPaths, nttyPaths, handshakefd};
/* allocate a stack for the container */
+#ifdef __ia64__
+ stacksize *= 2;
+#endif
if (VIR_ALLOC_N(stack, stacksize) < 0) {
virReportOOMError();
return -1;
@@ -2115,7 +2126,11 @@ int lxcContainerStart(virDomainDefPtr de
@@ -1879,7 +1887,11 @@ int lxcContainerStart(virDomainDefPtr de
cflags |= CLONE_NEWNET;
}
+#ifdef __ia64__
+ pid = __clone2(lxcContainerChild, stack, stacksize, cflags, &args);
+ pid = __clone2(lxcContainerChild, stacktop, stacksize, cflags, &args);
+#else
pid = clone(lxcContainerChild, stacktop, cflags, &args);
+#endif
VIR_FREE(stack);
VIR_DEBUG("clone() completed, new container PID is %d", pid);
@@ -2141,6 +2156,7 @@ int lxcContainerAvailable(int features)
@@ -1905,6 +1917,7 @@ int lxcContainerAvailable(int features)
int cpid;
char *childStack;
char *stack;
@ -64,7 +52,7 @@ Index: src/lxc/lxc_container.c
if (features & LXC_CONTAINER_FEATURE_USER)
flags |= CLONE_NEWUSER;
@@ -2148,14 +2164,21 @@ int lxcContainerAvailable(int features)
@@ -1912,14 +1925,21 @@ int lxcContainerAvailable(int features)
if (features & LXC_CONTAINER_FEATURE_NET)
flags |= CLONE_NEWNET;
@ -81,7 +69,7 @@ Index: src/lxc/lxc_container.c
+ childStack = stack + stacksize;
+#ifdef __ia64__
+ cpid = __clone2(lxcContainerDummyChild, stack, stacksize, flags, NULL);
+ cpid = __clone2(lxcContainerDummyChild, childStack, stacksize, flags, NULL);
+#else
cpid = clone(lxcContainerDummyChild, childStack, flags, NULL);
+#endif

View File

@ -1,25 +0,0 @@
commit dfc692350a04a70b4ca65667c30869b3bfdaf034
Author: Peter Krempa <pkrempa@redhat.com>
Date: Tue Jul 16 15:39:06 2013 +0200
qemu: Fix double free of returned JSON array in qemuAgentGetVCPUs()
A part of the returned monitor response was freed twice and caused
crashes of the daemon when using guest agent cpu count retrieval.
# virsh vcpucount dom --guest
Introduced in v1.0.6-48-gc6afcb0
Index: libvirt-1.1.0/src/qemu/qemu_agent.c
===================================================================
--- libvirt-1.1.0.orig/src/qemu/qemu_agent.c
+++ libvirt-1.1.0/src/qemu/qemu_agent.c
@@ -1538,7 +1538,6 @@ qemuAgentGetVCPUs(qemuAgentPtr mon,
cleanup:
virJSONValueFree(cmd);
virJSONValueFree(reply);
- virJSONValueFree(data);
return ret;
}

View File

@ -1,28 +0,0 @@
commit f38c8185f97720ecae7ef2291fbaa5d6b0209e17
Author: Ján Tomko <jtomko@redhat.com>
Date: Tue Jul 2 15:17:09 2013 +0200
Fix crash when multiple event callbacks were registered
CVE-2013-2230
Don't overwrite the callback ID returned by
virDomainEventStateRegisterID in ret by 0.
Introduced by abf75aea.
Index: libvirt-1.1.0/src/qemu/qemu_driver.c
===================================================================
--- libvirt-1.1.0.orig/src/qemu/qemu_driver.c
+++ libvirt-1.1.0/src/qemu/qemu_driver.c
@@ -9914,9 +9914,7 @@ qemuConnectDomainEventRegisterAny(virCon
driver->domainEventState,
dom, eventID,
callback, opaque, freecb, &ret) < 0)
- goto cleanup;
-
- ret = 0;
+ ret = -1;
cleanup:
return ret;

View File

@ -1,352 +0,0 @@
commit fd2e3c4c500d92d182492cfeaa0a6c6d0444b3cc
Author: Stefan Bader <stefan.bader@canonical.com>
Date: Tue Jul 16 18:11:16 2013 +0200
xen: Add interface versions for Xen 4.3
Xen 4.3 changes sysctl version to 10 and domctl version to 9. Update
the hypervisor driver to work with those.
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Index: libvirt-1.1.0/src/xen/xen_hypervisor.c
===================================================================
--- libvirt-1.1.0.orig/src/xen/xen_hypervisor.c
+++ libvirt-1.1.0/src/xen/xen_hypervisor.c
@@ -271,6 +271,24 @@ struct xen_v2d8_getdomaininfo {
};
typedef struct xen_v2d8_getdomaininfo xen_v2d8_getdomaininfo;
+struct xen_v2d9_getdomaininfo {
+ domid_t domain; /* the domain number */
+ uint32_t flags; /* flags, see before */
+ uint64_t tot_pages ALIGN_64; /* total number of pages used */
+ uint64_t max_pages ALIGN_64; /* maximum number of pages allowed */
+ uint64_t outstanding_pages ALIGN_64;
+ uint64_t shr_pages ALIGN_64; /* number of shared pages */
+ uint64_t paged_pages ALIGN_64; /* number of paged pages */
+ uint64_t shared_info_frame ALIGN_64; /* MFN of shared_info struct */
+ uint64_t cpu_time ALIGN_64; /* CPU time used */
+ uint32_t nr_online_vcpus; /* Number of VCPUs currently online. */
+ uint32_t max_vcpu_id; /* Maximum VCPUID in use by this domain. */
+ uint32_t ssidref;
+ xen_domain_handle_t handle;
+ uint32_t cpupool;
+};
+typedef struct xen_v2d9_getdomaininfo xen_v2d9_getdomaininfo;
+
union xen_getdomaininfo {
struct xen_v0_getdomaininfo v0;
struct xen_v2_getdomaininfo v2;
@@ -278,6 +296,7 @@ union xen_getdomaininfo {
struct xen_v2d6_getdomaininfo v2d6;
struct xen_v2d7_getdomaininfo v2d7;
struct xen_v2d8_getdomaininfo v2d8;
+ struct xen_v2d9_getdomaininfo v2d9;
};
typedef union xen_getdomaininfo xen_getdomaininfo;
@@ -288,6 +307,7 @@ union xen_getdomaininfolist {
struct xen_v2d6_getdomaininfo *v2d6;
struct xen_v2d7_getdomaininfo *v2d7;
struct xen_v2d8_getdomaininfo *v2d8;
+ struct xen_v2d8_getdomaininfo *v2d9;
};
typedef union xen_getdomaininfolist xen_getdomaininfolist;
@@ -325,7 +345,9 @@ typedef struct xen_v2s5_availheap xen_v
#define XEN_GETDOMAININFOLIST_ALLOC(domlist, size) \
(hv_versions.hypervisor < 2 ? \
(VIR_ALLOC_N(domlist.v0, (size)) == 0) : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ (VIR_ALLOC_N(domlist.v2d9, (size)) == 0) : \
+ (hv_versions.dom_interface == 8 ? \
(VIR_ALLOC_N(domlist.v2d8, (size)) == 0) : \
(hv_versions.dom_interface == 7 ? \
(VIR_ALLOC_N(domlist.v2d7, (size)) == 0) : \
@@ -333,12 +355,14 @@ typedef struct xen_v2s5_availheap xen_v
(VIR_ALLOC_N(domlist.v2d6, (size)) == 0) : \
(hv_versions.dom_interface == 5 ? \
(VIR_ALLOC_N(domlist.v2d5, (size)) == 0) : \
- (VIR_ALLOC_N(domlist.v2, (size)) == 0))))))
+ (VIR_ALLOC_N(domlist.v2, (size)) == 0)))))))
#define XEN_GETDOMAININFOLIST_FREE(domlist) \
(hv_versions.hypervisor < 2 ? \
VIR_FREE(domlist.v0) : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ VIR_FREE(domlist.v2d9) : \
+ (hv_versions.dom_interface == 8 ? \
VIR_FREE(domlist.v2d8) : \
(hv_versions.dom_interface == 7 ? \
VIR_FREE(domlist.v2d7) : \
@@ -346,12 +370,14 @@ typedef struct xen_v2s5_availheap xen_v
VIR_FREE(domlist.v2d6) : \
(hv_versions.dom_interface == 5 ? \
VIR_FREE(domlist.v2d5) : \
- VIR_FREE(domlist.v2))))))
+ VIR_FREE(domlist.v2)))))))
#define XEN_GETDOMAININFOLIST_CLEAR(domlist, size) \
(hv_versions.hypervisor < 2 ? \
memset(domlist.v0, 0, sizeof(*domlist.v0) * size) : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ memset(domlist.v2d9, 0, sizeof(*domlist.v2d9) * size) : \
+ (hv_versions.dom_interface == 8 ? \
memset(domlist.v2d8, 0, sizeof(*domlist.v2d8) * size) : \
(hv_versions.dom_interface == 7 ? \
memset(domlist.v2d7, 0, sizeof(*domlist.v2d7) * size) : \
@@ -359,12 +385,14 @@ typedef struct xen_v2s5_availheap xen_v
memset(domlist.v2d6, 0, sizeof(*domlist.v2d6) * size) : \
(hv_versions.dom_interface == 5 ? \
memset(domlist.v2d5, 0, sizeof(*domlist.v2d5) * size) : \
- memset(domlist.v2, 0, sizeof(*domlist.v2) * size))))))
+ memset(domlist.v2, 0, sizeof(*domlist.v2) * size)))))))
#define XEN_GETDOMAININFOLIST_DOMAIN(domlist, n) \
(hv_versions.hypervisor < 2 ? \
domlist.v0[n].domain : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ domlist.v2d9[n].domain : \
+ (hv_versions.dom_interface == 8 ? \
domlist.v2d8[n].domain : \
(hv_versions.dom_interface == 7 ? \
domlist.v2d7[n].domain : \
@@ -372,12 +400,14 @@ typedef struct xen_v2s5_availheap xen_v
domlist.v2d6[n].domain : \
(hv_versions.dom_interface == 5 ? \
domlist.v2d5[n].domain : \
- domlist.v2[n].domain)))))
+ domlist.v2[n].domain))))))
#define XEN_GETDOMAININFOLIST_UUID(domlist, n) \
(hv_versions.hypervisor < 2 ? \
domlist.v0[n].handle : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ domlist.v2d9[n].handle : \
+ (hv_versions.dom_interface == 8 ? \
domlist.v2d8[n].handle : \
(hv_versions.dom_interface == 7 ? \
domlist.v2d7[n].handle : \
@@ -385,12 +415,14 @@ typedef struct xen_v2s5_availheap xen_v
domlist.v2d6[n].handle : \
(hv_versions.dom_interface == 5 ? \
domlist.v2d5[n].handle : \
- domlist.v2[n].handle)))))
+ domlist.v2[n].handle))))))
#define XEN_GETDOMAININFOLIST_DATA(domlist) \
(hv_versions.hypervisor < 2 ? \
(void*)(domlist->v0) : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ (void*)(domlist->v2d9) : \
+ (hv_versions.dom_interface == 8 ? \
(void*)(domlist->v2d8) : \
(hv_versions.dom_interface == 7 ? \
(void*)(domlist->v2d7) : \
@@ -398,12 +430,14 @@ typedef struct xen_v2s5_availheap xen_v
(void*)(domlist->v2d6) : \
(hv_versions.dom_interface == 5 ? \
(void*)(domlist->v2d5) : \
- (void*)(domlist->v2))))))
+ (void*)(domlist->v2)))))))
#define XEN_GETDOMAININFO_SIZE \
(hv_versions.hypervisor < 2 ? \
sizeof(xen_v0_getdomaininfo) : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ sizeof(xen_v2d9_getdomaininfo) : \
+ (hv_versions.dom_interface == 8 ? \
sizeof(xen_v2d8_getdomaininfo) : \
(hv_versions.dom_interface == 7 ? \
sizeof(xen_v2d7_getdomaininfo) : \
@@ -411,12 +445,14 @@ typedef struct xen_v2s5_availheap xen_v
sizeof(xen_v2d6_getdomaininfo) : \
(hv_versions.dom_interface == 5 ? \
sizeof(xen_v2d5_getdomaininfo) : \
- sizeof(xen_v2_getdomaininfo))))))
+ sizeof(xen_v2_getdomaininfo)))))))
#define XEN_GETDOMAININFO_CLEAR(dominfo) \
(hv_versions.hypervisor < 2 ? \
memset(&(dominfo.v0), 0, sizeof(xen_v0_getdomaininfo)) : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ memset(&(dominfo.v2d9), 0, sizeof(xen_v2d9_getdomaininfo)) : \
+ (hv_versions.dom_interface == 8 ? \
memset(&(dominfo.v2d8), 0, sizeof(xen_v2d8_getdomaininfo)) : \
(hv_versions.dom_interface == 7 ? \
memset(&(dominfo.v2d7), 0, sizeof(xen_v2d7_getdomaininfo)) : \
@@ -424,12 +460,14 @@ typedef struct xen_v2s5_availheap xen_v
memset(&(dominfo.v2d6), 0, sizeof(xen_v2d6_getdomaininfo)) : \
(hv_versions.dom_interface == 5 ? \
memset(&(dominfo.v2d5), 0, sizeof(xen_v2d5_getdomaininfo)) : \
- memset(&(dominfo.v2), 0, sizeof(xen_v2_getdomaininfo)))))))
+ memset(&(dominfo.v2), 0, sizeof(xen_v2_getdomaininfo))))))))
#define XEN_GETDOMAININFO_DOMAIN(dominfo) \
(hv_versions.hypervisor < 2 ? \
dominfo.v0.domain : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ dominfo.v2d9.domain : \
+ (hv_versions.dom_interface == 8 ? \
dominfo.v2d8.domain : \
(hv_versions.dom_interface == 7 ? \
dominfo.v2d7.domain : \
@@ -437,12 +475,14 @@ typedef struct xen_v2s5_availheap xen_v
dominfo.v2d6.domain : \
(hv_versions.dom_interface == 5 ? \
dominfo.v2d5.domain : \
- dominfo.v2.domain)))))
+ dominfo.v2.domain))))))
#define XEN_GETDOMAININFO_CPUTIME(dominfo) \
(hv_versions.hypervisor < 2 ? \
dominfo.v0.cpu_time : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ dominfo.v2d9.cpu_time : \
+ (hv_versions.dom_interface == 8 ? \
dominfo.v2d8.cpu_time : \
(hv_versions.dom_interface == 7 ? \
dominfo.v2d7.cpu_time : \
@@ -450,13 +490,15 @@ typedef struct xen_v2s5_availheap xen_v
dominfo.v2d6.cpu_time : \
(hv_versions.dom_interface == 5 ? \
dominfo.v2d5.cpu_time : \
- dominfo.v2.cpu_time)))))
+ dominfo.v2.cpu_time))))))
#define XEN_GETDOMAININFO_CPUCOUNT(dominfo) \
(hv_versions.hypervisor < 2 ? \
dominfo.v0.nr_online_vcpus : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ dominfo.v2d9.nr_online_vcpus : \
+ (hv_versions.dom_interface == 8 ? \
dominfo.v2d8.nr_online_vcpus : \
(hv_versions.dom_interface == 7 ? \
dominfo.v2d7.nr_online_vcpus : \
@@ -464,12 +506,14 @@ typedef struct xen_v2s5_availheap xen_v
dominfo.v2d6.nr_online_vcpus : \
(hv_versions.dom_interface == 5 ? \
dominfo.v2d5.nr_online_vcpus : \
- dominfo.v2.nr_online_vcpus)))))
+ dominfo.v2.nr_online_vcpus))))))
#define XEN_GETDOMAININFO_MAXCPUID(dominfo) \
(hv_versions.hypervisor < 2 ? \
dominfo.v0.max_vcpu_id : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ dominfo.v2d9.max_vcpu_id : \
+ (hv_versions.dom_interface == 8 ? \
dominfo.v2d8.max_vcpu_id : \
(hv_versions.dom_interface == 7 ? \
dominfo.v2d7.max_vcpu_id : \
@@ -477,12 +521,14 @@ typedef struct xen_v2s5_availheap xen_v
dominfo.v2d6.max_vcpu_id : \
(hv_versions.dom_interface == 5 ? \
dominfo.v2d5.max_vcpu_id : \
- dominfo.v2.max_vcpu_id)))))
+ dominfo.v2.max_vcpu_id))))))
#define XEN_GETDOMAININFO_FLAGS(dominfo) \
(hv_versions.hypervisor < 2 ? \
dominfo.v0.flags : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ dominfo.v2d9.flags : \
+ (hv_versions.dom_interface == 8 ? \
dominfo.v2d8.flags : \
(hv_versions.dom_interface == 7 ? \
dominfo.v2d7.flags : \
@@ -490,12 +536,14 @@ typedef struct xen_v2s5_availheap xen_v
dominfo.v2d6.flags : \
(hv_versions.dom_interface == 5 ? \
dominfo.v2d5.flags : \
- dominfo.v2.flags)))))
+ dominfo.v2.flags))))))
#define XEN_GETDOMAININFO_TOT_PAGES(dominfo) \
(hv_versions.hypervisor < 2 ? \
dominfo.v0.tot_pages : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ dominfo.v2d9.tot_pages : \
+ (hv_versions.dom_interface == 8 ? \
dominfo.v2d8.tot_pages : \
(hv_versions.dom_interface == 7 ? \
dominfo.v2d7.tot_pages : \
@@ -503,12 +551,14 @@ typedef struct xen_v2s5_availheap xen_v
dominfo.v2d6.tot_pages : \
(hv_versions.dom_interface == 5 ? \
dominfo.v2d5.tot_pages : \
- dominfo.v2.tot_pages)))))
+ dominfo.v2.tot_pages))))))
#define XEN_GETDOMAININFO_MAX_PAGES(dominfo) \
(hv_versions.hypervisor < 2 ? \
dominfo.v0.max_pages : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ dominfo.v2d9.max_pages : \
+ (hv_versions.dom_interface == 8 ? \
dominfo.v2d8.max_pages : \
(hv_versions.dom_interface == 7 ? \
dominfo.v2d7.max_pages : \
@@ -516,12 +566,14 @@ typedef struct xen_v2s5_availheap xen_v
dominfo.v2d6.max_pages : \
(hv_versions.dom_interface == 5 ? \
dominfo.v2d5.max_pages : \
- dominfo.v2.max_pages)))))
+ dominfo.v2.max_pages))))))
#define XEN_GETDOMAININFO_UUID(dominfo) \
(hv_versions.hypervisor < 2 ? \
dominfo.v0.handle : \
- (hv_versions.dom_interface >= 8 ? \
+ (hv_versions.dom_interface >= 9 ? \
+ dominfo.v2d9.handle : \
+ (hv_versions.dom_interface == 8 ? \
dominfo.v2d8.handle : \
(hv_versions.dom_interface == 7 ? \
dominfo.v2d7.handle : \
@@ -529,7 +581,7 @@ typedef struct xen_v2s5_availheap xen_v
dominfo.v2d6.handle : \
(hv_versions.dom_interface == 5 ? \
dominfo.v2d5.handle : \
- dominfo.v2.handle)))))
+ dominfo.v2.handle))))))
static int
@@ -1919,6 +1971,19 @@ xenHypervisorInit(struct xenHypervisorVe
goto done;
}
}
+
+ /* Xen 4.3
+ * sysctl version 10 -> xen-unstable commit bec8f17e
+ * domctl version 9 -> xen-unstable commit 65c9792d
+ */
+ hv_versions.sys_interface = 10; /* XEN_SYSCTL_INTERFACE_VERSION */
+ if (virXen_getdomaininfo(fd, 0, &info) == 1) {
+ hv_versions.dom_interface = 9; /* XEN_DOMCTL_INTERFACE_VERSION */
+ if (virXen_getvcpusinfo(fd, 0, 0, ipt, NULL, 0) == 0) {
+ VIR_DEBUG("Using hypervisor call v2, sys ver10 dom ver9");
+ goto done;
+ }
+ }
hv_versions.hypervisor = 1;
hv_versions.sys_interface = -1;

View File

@ -1,52 +0,0 @@
commit fe89fd3b4071242ce9bbae6e1178fee30dc2f4f9
Author: Ján Tomko <jtomko@redhat.com>
Date: Thu Jul 4 14:41:46 2013 +0200
Unlock the storage volume object after looking it up
Introduced by c930410.
https://bugzilla.redhat.com/show_bug.cgi?id=980676
Index: libvirt-1.1.0/src/storage/storage_driver.c
===================================================================
--- libvirt-1.1.0.orig/src/storage/storage_driver.c
+++ libvirt-1.1.0/src/storage/storage_driver.c
@@ -1361,15 +1361,16 @@ storageVolLookupByKey(virConnectPtr conn
virStorageVolDefFindByKey(driver->pools.objs[i], key);
if (vol) {
- if (virStorageVolLookupByKeyEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0)
+ if (virStorageVolLookupByKeyEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) {
+ virStoragePoolObjUnlock(driver->pools.objs[i]);
goto cleanup;
+ }
ret = virGetStorageVol(conn,
driver->pools.objs[i]->def->name,
vol->name,
vol->key,
NULL, NULL);
- goto cleanup;
}
}
virStoragePoolObjUnlock(driver->pools.objs[i]);
@@ -1421,15 +1422,16 @@ storageVolLookupByPath(virConnectPtr con
VIR_FREE(stable_path);
if (vol) {
- if (virStorageVolLookupByPathEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0)
+ if (virStorageVolLookupByPathEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) {
+ virStoragePoolObjUnlock(driver->pools.objs[i]);
goto cleanup;
+ }
ret = virGetStorageVol(conn,
driver->pools.objs[i]->def->name,
vol->name,
vol->key,
NULL, NULL);
- goto cleanup;
}
}
virStoragePoolObjUnlock(driver->pools.objs[i]);

View File

@ -8,11 +8,11 @@ uses the 'device_configure' RPC.
This patch changes the xend driver to always call 'device_configure' for
PCI devices to be consistent with the usage in the xen tools.
Index: libvirt-1.1.0/src/xen/xend_internal.c
Index: libvirt-1.1.1/src/xen/xend_internal.c
===================================================================
--- libvirt-1.1.0.orig/src/xen/xend_internal.c
+++ libvirt-1.1.0/src/xen/xend_internal.c
@@ -2220,6 +2220,7 @@ xenDaemonAttachDeviceFlags(virConnectPtr
--- libvirt-1.1.1.orig/src/xen/xend_internal.c
+++ libvirt-1.1.1/src/xen/xend_internal.c
@@ -2207,6 +2207,7 @@ xenDaemonAttachDeviceFlags(virConnectPtr
virBuffer buf = VIR_BUFFER_INITIALIZER;
char class[8], ref[80];
char *target = NULL;
@ -20,7 +20,7 @@ Index: libvirt-1.1.0/src/xen/xend_internal.c
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1);
@@ -2320,8 +2321,18 @@ xenDaemonAttachDeviceFlags(virConnectPtr
@@ -2305,8 +2306,18 @@ xenDaemonAttachDeviceFlags(virConnectPtr
}
sexpr = virBufferContentAndReset(&buf);

View File

@ -1,7 +1,7 @@
Index: libvirt-1.1.0/examples/apparmor/Makefile.am
Index: libvirt-1.1.1/examples/apparmor/Makefile.am
===================================================================
--- libvirt-1.1.0.orig/examples/apparmor/Makefile.am
+++ libvirt-1.1.0/examples/apparmor/Makefile.am
--- libvirt-1.1.1.orig/examples/apparmor/Makefile.am
+++ libvirt-1.1.1/examples/apparmor/Makefile.am
@@ -14,8 +14,45 @@
## License along with this library. If not, see
## <http://www.gnu.org/licenses/>.
@ -53,10 +53,10 @@ Index: libvirt-1.1.0/examples/apparmor/Makefile.am
+ rm -f $(DESTDIR)$(sysconfdir)/apparmor.d/libvirt/TEMPLATE
+
+endif
Index: libvirt-1.1.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
Index: libvirt-1.1.1/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
===================================================================
--- /dev/null
+++ libvirt-1.1.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
+++ libvirt-1.1.1/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
@@ -0,0 +1,40 @@
+# Last Modified: Fri Aug 19 11:21:48 2011
+#include <tunables/global>
@ -98,9 +98,9 @@ Index: libvirt-1.1.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
+ /var/lib/kvm/images/ r,
+ /var/lib/kvm/images/** r,
+}
Index: libvirt-1.1.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
Index: libvirt-1.1.1/examples/apparmor/usr.lib.libvirt.virt-aa-helper
===================================================================
--- libvirt-1.1.0.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
--- libvirt-1.1.1.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
+++ /dev/null
@@ -1,38 +0,0 @@
-# Last Modified: Mon Apr 5 15:10:27 2010
@ -141,9 +141,9 @@ Index: libvirt-1.1.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
- /var/lib/libvirt/images/ r,
- /var/lib/libvirt/images/** r,
-}
Index: libvirt-1.1.0/examples/apparmor/usr.sbin.libvirtd
Index: libvirt-1.1.1/examples/apparmor/usr.sbin.libvirtd
===================================================================
--- libvirt-1.1.0.orig/examples/apparmor/usr.sbin.libvirtd
--- libvirt-1.1.1.orig/examples/apparmor/usr.sbin.libvirtd
+++ /dev/null
@@ -1,52 +0,0 @@
-# Last Modified: Mon Apr 5 15:03:58 2010
@ -198,10 +198,10 @@ Index: libvirt-1.1.0/examples/apparmor/usr.sbin.libvirtd
- change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*,
-
-}
Index: libvirt-1.1.0/examples/apparmor/usr.sbin.libvirtd.in
Index: libvirt-1.1.1/examples/apparmor/usr.sbin.libvirtd.in
===================================================================
--- /dev/null
+++ libvirt-1.1.0/examples/apparmor/usr.sbin.libvirtd.in
+++ libvirt-1.1.1/examples/apparmor/usr.sbin.libvirtd.in
@@ -0,0 +1,58 @@
+# Last Modified: Fri Aug 19 11:20:36 2011
+#include <tunables/global>
@ -261,9 +261,9 @@ Index: libvirt-1.1.0/examples/apparmor/usr.sbin.libvirtd.in
+ change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*,
+
+}
Index: libvirt-1.1.0/examples/apparmor/libvirt-qemu
Index: libvirt-1.1.1/examples/apparmor/libvirt-qemu
===================================================================
--- libvirt-1.1.0.orig/examples/apparmor/libvirt-qemu
--- libvirt-1.1.1.orig/examples/apparmor/libvirt-qemu
+++ /dev/null
@@ -1,129 +0,0 @@
-# Last Modified: Fri Mar 9 14:43:22 2012
@ -395,10 +395,10 @@ Index: libvirt-1.1.0/examples/apparmor/libvirt-qemu
-
- /usr/libexec/qemu-bridge-helper rmix,
- }
Index: libvirt-1.1.0/examples/apparmor/libvirt-qemu.in
Index: libvirt-1.1.1/examples/apparmor/libvirt-qemu.in
===================================================================
--- /dev/null
+++ libvirt-1.1.0/examples/apparmor/libvirt-qemu.in
+++ libvirt-1.1.1/examples/apparmor/libvirt-qemu.in
@@ -0,0 +1,132 @@
+# Last Modified: Fri Mar 9 14:43:22 2012
+

View File

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

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

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

View File

@ -1,9 +1,9 @@
Adjust libvirt-guests init files to conform to SUSE standards
Index: libvirt-1.1.0/tools/libvirt-guests.init.in
Index: libvirt-1.1.1/tools/libvirt-guests.init.in
===================================================================
--- libvirt-1.1.0.orig/tools/libvirt-guests.init.in
+++ libvirt-1.1.0/tools/libvirt-guests.init.in
--- libvirt-1.1.1.orig/tools/libvirt-guests.init.in
+++ libvirt-1.1.1/tools/libvirt-guests.init.in
@@ -3,15 +3,15 @@
# the following is the LSB init header
#
@ -28,10 +28,10 @@ Index: libvirt-1.1.0/tools/libvirt-guests.init.in
### END INIT INFO
# the following is chkconfig init header
Index: libvirt-1.1.0/tools/libvirt-guests.sh.in
Index: libvirt-1.1.1/tools/libvirt-guests.sh.in
===================================================================
--- libvirt-1.1.0.orig/tools/libvirt-guests.sh.in
+++ libvirt-1.1.0/tools/libvirt-guests.sh.in
--- libvirt-1.1.1.orig/tools/libvirt-guests.sh.in
+++ libvirt-1.1.1/tools/libvirt-guests.sh.in
@@ -16,14 +16,13 @@
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
@ -189,10 +189,10 @@ Index: libvirt-1.1.0/tools/libvirt-guests.sh.in
esac
-exit $RETVAL
+rc_exit
Index: libvirt-1.1.0/tools/libvirt-guests.sysconf
Index: libvirt-1.1.1/tools/libvirt-guests.sysconf
===================================================================
--- libvirt-1.1.0.orig/tools/libvirt-guests.sysconf
+++ libvirt-1.1.0/tools/libvirt-guests.sysconf
--- libvirt-1.1.1.orig/tools/libvirt-guests.sysconf
+++ libvirt-1.1.1/tools/libvirt-guests.sysconf
@@ -1,19 +1,29 @@
+## Path: System/Virtualization/libvirt-guests
+

View File

@ -1,7 +1,7 @@
Index: libvirt-1.1.0/configure.ac
Index: libvirt-1.1.1/configure.ac
===================================================================
--- libvirt-1.1.0.orig/configure.ac
+++ libvirt-1.1.0/configure.ac
--- libvirt-1.1.1.orig/configure.ac
+++ libvirt-1.1.1/configure.ac
@@ -172,6 +172,7 @@ LIBVIRT_CHECK_DBUS
LIBVIRT_CHECK_FUSE
LIBVIRT_CHECK_HAL
@ -10,7 +10,7 @@ Index: libvirt-1.1.0/configure.ac
LIBVIRT_CHECK_NUMACTL
LIBVIRT_CHECK_OPENWSMAN
LIBVIRT_CHECK_PCIACCESS
@@ -2225,11 +2226,12 @@ if test "$with_libvirtd" = "no" ; then
@@ -2226,11 +2227,12 @@ if test "$with_libvirtd" = "no" ; then
with_interface=no
fi
@ -26,7 +26,7 @@ Index: libvirt-1.1.0/configure.ac
esac
if test "$with_interface" = "yes" ; then
@@ -2519,6 +2521,7 @@ LIBVIRT_RESULT_DBUS
@@ -2527,6 +2529,7 @@ LIBVIRT_RESULT_DBUS
LIBVIRT_RESULT_FUSE
LIBVIRT_RESULT_HAL
LIBVIRT_RESULT_NETCF
@ -34,11 +34,11 @@ Index: libvirt-1.1.0/configure.ac
LIBVIRT_RESULT_NUMACTL
LIBVIRT_RESULT_OPENWSMAN
LIBVIRT_RESULT_PCIACCESS
Index: libvirt-1.1.0/src/Makefile.am
Index: libvirt-1.1.1/src/Makefile.am
===================================================================
--- libvirt-1.1.0.orig/src/Makefile.am
+++ libvirt-1.1.0/src/Makefile.am
@@ -735,6 +735,10 @@ if WITH_NETCF
--- libvirt-1.1.1.orig/src/Makefile.am
+++ libvirt-1.1.1/src/Makefile.am
@@ -741,6 +741,10 @@ if WITH_NETCF
INTERFACE_DRIVER_SOURCES += \
interface/interface_backend_netcf.c
endif
@ -49,7 +49,7 @@ Index: libvirt-1.1.0/src/Makefile.am
if WITH_UDEV
INTERFACE_DRIVER_SOURCES += \
interface/interface_backend_udev.c
@@ -1276,11 +1280,16 @@ if WITH_NETCF
@@ -1293,11 +1297,16 @@ if WITH_NETCF
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
else
@ -66,11 +66,11 @@ Index: libvirt-1.1.0/src/Makefile.am
if WITH_DRIVER_MODULES
libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la
libvirt_driver_interface_la_LDFLAGS += -module -avoid-version
Index: libvirt-1.1.0/tools/virsh.c
Index: libvirt-1.1.1/tools/virsh.c
===================================================================
--- libvirt-1.1.0.orig/tools/virsh.c
+++ libvirt-1.1.0/tools/virsh.c
@@ -2883,6 +2883,8 @@ vshShowVersion(vshControl *ctl ATTRIBUTE
--- libvirt-1.1.1.orig/tools/virsh.c
+++ libvirt-1.1.1/tools/virsh.c
@@ -2882,6 +2882,8 @@ vshShowVersion(vshControl *ctl ATTRIBUTE
vshPrint(ctl, " Interface");
# if defined(WITH_NETCF)
vshPrint(ctl, " netcf");
@ -79,10 +79,10 @@ Index: libvirt-1.1.0/tools/virsh.c
# elif defined(WITH_UDEV)
vshPrint(ctl, " udev");
# endif
Index: libvirt-1.1.0/src/interface/interface_backend_netcf.c
Index: libvirt-1.1.1/src/interface/interface_backend_netcf.c
===================================================================
--- libvirt-1.1.0.orig/src/interface/interface_backend_netcf.c
+++ libvirt-1.1.0/src/interface/interface_backend_netcf.c
--- libvirt-1.1.1.orig/src/interface/interface_backend_netcf.c
+++ libvirt-1.1.1/src/interface/interface_backend_netcf.c
@@ -23,7 +23,12 @@
#include <config.h>
@ -136,7 +136,7 @@ Index: libvirt-1.1.0/src/interface/interface_backend_netcf.c
/*
* Get a minimal virInterfaceDef containing enough metadata
* for access control checks to be performed. Currently
@@ -169,6 +206,10 @@ static virDrvOpenStatus netcfInterfaceOp
@@ -164,6 +201,10 @@ static virDrvOpenStatus netcfInterfaceOp
goto mutex_error;
}
@ -147,10 +147,10 @@ Index: libvirt-1.1.0/src/interface/interface_backend_netcf.c
/* open netcf */
if (ncf_init(&driverState->netcf, NULL) != 0)
{
Index: libvirt-1.1.0/src/interface/interface_driver.c
Index: libvirt-1.1.1/src/interface/interface_driver.c
===================================================================
--- libvirt-1.1.0.orig/src/interface/interface_driver.c
+++ libvirt-1.1.0/src/interface/interface_driver.c
--- libvirt-1.1.1.orig/src/interface/interface_driver.c
+++ libvirt-1.1.1/src/interface/interface_driver.c
@@ -28,8 +28,15 @@ interfaceRegister(void) {
if (netcfIfaceRegister() == 0)
return 0;
@ -168,10 +168,10 @@ Index: libvirt-1.1.0/src/interface/interface_driver.c
if (udevIfaceRegister() == 0)
return 0;
#endif /* WITH_UDEV */
Index: libvirt-1.1.0/m4/virt-netcontrol.m4
Index: libvirt-1.1.1/m4/virt-netcontrol.m4
===================================================================
--- /dev/null
+++ libvirt-1.1.0/m4/virt-netcontrol.m4
+++ libvirt-1.1.1/m4/virt-netcontrol.m4
@@ -0,0 +1,35 @@
+dnl The libnetcontrol library
+dnl

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Tue Jul 30 14:25:26 MDT 2013 - jfehlig@suse.com
- Update to libvirt 1.1.0
- Adding device removal or deletion events
- Introduce new domain create APIs to pass pre-opened FDs to LXC
- Add interface versions for Xen 4.3
- Add new public API virDomainSetMemoryStatsPeriod
- Various LXC improvements
- Many incremental improvements and bug fixes, see
http://libvirt.org/news.html
- Drop upstream patches: f38c8185-CVE-2013-2230.patch,
fd2e3c4c-xen-sysctl-domctl.patch, dfc69235-CVE-2013-4153.patch,
96518d43-CVE-2013-4154.patch, fe89fd3b-storage-pool-deadlock.patch
- Drop relax-qemu-usergroup-check.patch - no longer needed
after hypervisor-specific daemon package split
-------------------------------------------------------------------
Mon Jul 22 17:17:42 MDT 2013 - jfehlig@suse.com

View File

@ -225,7 +225,7 @@
Name: libvirt
Url: http://libvirt.org/
Version: 1.1.0
Version: 1.1.1
Release: 0
Summary: Library providing a simple virtualization API
License: LGPL-2.1+
@ -404,11 +404,6 @@ Source1: libvirtd.init
Source2: libvirtd-relocation-server.fw
Source99: baselibs.conf
# Upstream patches
Patch0: f38c8185-CVE-2013-2230.patch
Patch1: fd2e3c4c-xen-sysctl-domctl.patch
Patch2: dfc69235-CVE-2013-4153.patch
Patch3: 96518d43-CVE-2013-4154.patch
Patch4: fe89fd3b-storage-pool-deadlock.patch
# Need to go upstream
Patch100: xen-name-for-devid.patch
Patch101: clone.patch
@ -418,11 +413,10 @@ Patch200: libvirtd-defaults.patch
Patch201: libvirtd-init-script.patch
Patch202: libvirt-guests-init-script.patch
Patch203: virtlockd-init-script.patch
Patch204: relax-qemu-usergroup-check.patch
Patch205: suse-qemu-conf.patch
Patch206: fix-pci-attach-xen-driver.patch
Patch207: support-managed-pci-xen-driver.patch
Patch208: systemd-service-xen.patch
Patch204: suse-qemu-conf.patch
Patch205: fix-pci-attach-xen-driver.patch
Patch206: support-managed-pci-xen-driver.patch
Patch207: systemd-service-xen.patch
%if %{with_apparmor}
Patch250: install-apparmor-profiles.patch
%endif
@ -908,11 +902,6 @@ of recent versions of Linux (and other OSes).
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch100 -p1
%patch101
%patch102 -p1
@ -924,7 +913,6 @@ of recent versions of Linux (and other OSes).
%patch205 -p1
%patch206 -p1
%patch207 -p1
%patch208 -p1
%if %{with_apparmor}
%patch250 -p1
%endif
@ -1681,7 +1669,6 @@ fi
%{py_sitedir}/libvirt_lxc.py*
%{py_sitedir}/libvirtmod*
%doc python/tests/*.py
%doc python/TODO
%doc examples/python
%doc examples/domain-events/events-python
%endif

View File

@ -1,7 +1,7 @@
Index: libvirt-1.1.0/daemon/libvirtd.conf
Index: libvirt-1.1.1/daemon/libvirtd.conf
===================================================================
--- libvirt-1.1.0.orig/daemon/libvirtd.conf
+++ libvirt-1.1.0/daemon/libvirtd.conf
--- libvirt-1.1.1.orig/daemon/libvirtd.conf
+++ libvirt-1.1.1/daemon/libvirtd.conf
@@ -18,8 +18,8 @@
# It is necessary to setup a CA and issue server certificates before
# using this capability.
@ -13,13 +13,13 @@ Index: libvirt-1.1.0/daemon/libvirtd.conf
# Listen for unencrypted TCP connections on the public TCP/IP port.
# NB, must pass the --listen flag to the libvirtd process for this to
Index: libvirt-1.1.0/daemon/libvirtd-config.c
Index: libvirt-1.1.1/daemon/libvirtd-config.c
===================================================================
--- libvirt-1.1.0.orig/daemon/libvirtd-config.c
+++ libvirt-1.1.0/daemon/libvirtd-config.c
@@ -225,7 +225,7 @@ daemonConfigNew(bool privileged ATTRIBUT
--- libvirt-1.1.1.orig/daemon/libvirtd-config.c
+++ libvirt-1.1.1/daemon/libvirtd-config.c
@@ -222,7 +222,7 @@ daemonConfigNew(bool privileged ATTRIBUT
if (VIR_ALLOC(data) < 0)
return NULL;
}
- data->listen_tls = 1;
+ data->listen_tls = 0;

View File

@ -1,35 +0,0 @@
Allow qemu driver (and hence libvirtd) to load when qemu
user:group does not exist. The kvm package, which may not
exist on a xen host, creates qemu user:group.
A better (future) solution would be to build the libvirtd
drivers as loadable modules instead of built-in to the
daemon. Then the qemu driver would only be loaded when needed,
which would never be the case on a xen-only configuration.
Index: libvirt-1.1.0/src/qemu/qemu_conf.c
===================================================================
--- libvirt-1.1.0.orig/src/qemu/qemu_conf.c
+++ libvirt-1.1.0/src/qemu/qemu_conf.c
@@ -465,15 +465,15 @@ int virQEMUDriverConfigLoadFile(virQEMUD
p = virConfGetValue(conf, "user");
CHECK_TYPE("user", VIR_CONF_STRING);
- if (p && p->str &&
- virGetUserID(p->str, &cfg->user) < 0)
- goto cleanup;
+ if (p && p->str)
+ if (virGetUserID(p->str, &cfg->user) < 0)
+ VIR_WARN("User %s does not exist! Continuing...", p->str);
p = virConfGetValue(conf, "group");
CHECK_TYPE("group", VIR_CONF_STRING);
- if (p && p->str &&
- virGetGroupID(p->str, &cfg->group) < 0)
- goto cleanup;
+ if (p && p->str)
+ if (virGetGroupID(p->str, &cfg->group) < 0)
+ VIR_WARN("Group %s does not exist! Continuing...", p->str);
GET_VALUE_BOOL("dynamic_ownership", cfg->dynamicOwnership);

View File

@ -8,11 +8,11 @@ Subject: [PATCH] support managed pci devices in xen driver
src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++-
2 files changed, 35 insertions(+), 15 deletions(-)
Index: libvirt-1.1.0/src/xenxs/xen_sxpr.c
Index: libvirt-1.1.1/src/xenxs/xen_sxpr.c
===================================================================
--- libvirt-1.1.0.orig/src/xenxs/xen_sxpr.c
+++ libvirt-1.1.0/src/xenxs/xen_sxpr.c
@@ -1006,6 +1006,7 @@ xenParseSxprPCI(virDomainDefPtr def,
--- libvirt-1.1.1.orig/src/xenxs/xen_sxpr.c
+++ libvirt-1.1.1/src/xenxs/xen_sxpr.c
@@ -993,6 +993,7 @@ xenParseSxprPCI(virDomainDefPtr def,
int busID;
int slotID;
int funcID;
@ -20,7 +20,7 @@ Index: libvirt-1.1.0/src/xenxs/xen_sxpr.c
node = cur->u.s.car;
if (!sexpr_lookup(node, "dev"))
@@ -1053,11 +1054,13 @@ xenParseSxprPCI(virDomainDefPtr def,
@@ -1040,11 +1041,13 @@ xenParseSxprPCI(virDomainDefPtr def,
goto error;
}
@ -35,7 +35,7 @@ Index: libvirt-1.1.0/src/xenxs/xen_sxpr.c
dev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI;
dev->source.subsys.u.pci.addr.domain = domainID;
dev->source.subsys.u.pci.addr.bus = busID;
@@ -2013,11 +2016,15 @@ static void
@@ -1993,11 +1996,15 @@ static void
xenFormatSxprPCI(virDomainHostdevDefPtr def,
virBufferPtr buf)
{
@ -52,7 +52,7 @@ Index: libvirt-1.1.0/src/xenxs/xen_sxpr.c
}
@@ -2036,12 +2043,6 @@ xenFormatSxprOnePCI(virDomainHostdevDefP
@@ -2016,12 +2023,6 @@ xenFormatSxprOnePCI(virDomainHostdevDefP
virBufferPtr buf,
int detach)
{
@ -65,7 +65,7 @@ Index: libvirt-1.1.0/src/xenxs/xen_sxpr.c
virBufferAddLit(buf, "(pci ");
xenFormatSxprPCI(def, buf);
if (detach)
@@ -2096,12 +2097,6 @@ xenFormatSxprAllPCI(virDomainDefPtr def,
@@ -2076,12 +2077,6 @@ xenFormatSxprAllPCI(virDomainDefPtr def,
for (i = 0; i < def->nhostdevs; i++) {
if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
def->hostdevs[i]->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {
@ -78,11 +78,11 @@ Index: libvirt-1.1.0/src/xenxs/xen_sxpr.c
xenFormatSxprPCI(def->hostdevs[i], buf);
}
}
Index: libvirt-1.1.0/src/xenxs/xen_xm.c
Index: libvirt-1.1.1/src/xenxs/xen_xm.c
===================================================================
--- libvirt-1.1.0.orig/src/xenxs/xen_xm.c
+++ libvirt-1.1.0/src/xenxs/xen_xm.c
@@ -806,6 +806,8 @@ xenParseXM(virConfPtr conf, int xendConf
--- libvirt-1.1.1.orig/src/xenxs/xen_xm.c
+++ libvirt-1.1.1/src/xenxs/xen_xm.c
@@ -802,6 +802,8 @@ xenParseXM(virConfPtr conf, int xendConf
int busID;
int slotID;
int funcID;
@ -91,7 +91,7 @@ Index: libvirt-1.1.0/src/xenxs/xen_xm.c
domain[0] = bus[0] = slot[0] = func[0] = '\0';
@@ -815,6 +817,11 @@ xenParseXM(virConfPtr conf, int xendConf
@@ -811,6 +813,11 @@ xenParseXM(virConfPtr conf, int xendConf
/* pci=['0000:00:1b.0','0000:00:13.0'] */
if (!(key = list->str))
goto skippci;
@ -103,7 +103,7 @@ Index: libvirt-1.1.0/src/xenxs/xen_xm.c
if (!(nextkey = strchr(key, ':')))
goto skippci;
@@ -863,10 +870,30 @@ xenParseXM(virConfPtr conf, int xendConf
@@ -859,10 +866,30 @@ xenParseXM(virConfPtr conf, int xendConf
if (virStrToLong_i(func, NULL, 16, &funcID) < 0)
goto skippci;

View File

@ -1,7 +1,7 @@
Index: libvirt-1.1.0/src/qemu/qemu.conf
Index: libvirt-1.1.1/src/qemu/qemu.conf
===================================================================
--- libvirt-1.1.0.orig/src/qemu/qemu.conf
+++ libvirt-1.1.0/src/qemu/qemu.conf
--- libvirt-1.1.1.orig/src/qemu/qemu.conf
+++ libvirt-1.1.1/src/qemu/qemu.conf
@@ -175,7 +175,16 @@
# a special value; security_driver can be set to that value in
# isolation, but it cannot appear in a list of drivers.

View File

@ -1,7 +1,7 @@
Index: libvirt-1.1.0/daemon/libvirtd.service.in
Index: libvirt-1.1.1/daemon/libvirtd.service.in
===================================================================
--- libvirt-1.1.0.orig/daemon/libvirtd.service.in
+++ libvirt-1.1.0/daemon/libvirtd.service.in
--- libvirt-1.1.1.orig/daemon/libvirtd.service.in
+++ libvirt-1.1.1/daemon/libvirtd.service.in
@@ -9,6 +9,8 @@ Before=libvirt-guests.service
After=network.target
After=dbus.service

View File

@ -1,9 +1,9 @@
Adjust virtlockd init files to conform to SUSE standards
Index: libvirt-1.1.0/src/locking/virtlockd.sysconf
Index: libvirt-1.1.1/src/locking/virtlockd.sysconf
===================================================================
--- libvirt-1.1.0.orig/src/locking/virtlockd.sysconf
+++ libvirt-1.1.0/src/locking/virtlockd.sysconf
--- libvirt-1.1.1.orig/src/locking/virtlockd.sysconf
+++ libvirt-1.1.1/src/locking/virtlockd.sysconf
@@ -1,3 +1,7 @@
+## Path: System/Virtualization/virtlockd
+
@ -12,10 +12,10 @@ Index: libvirt-1.1.0/src/locking/virtlockd.sysconf
#
# Pass extra arguments to virtlockd
#VIRTLOCKD_ARGS=
Index: libvirt-1.1.0/src/locking/virtlockd.init.in
Index: libvirt-1.1.1/src/locking/virtlockd.init.in
===================================================================
--- libvirt-1.1.0.orig/src/locking/virtlockd.init.in
+++ libvirt-1.1.0/src/locking/virtlockd.init.in
--- libvirt-1.1.1.orig/src/locking/virtlockd.init.in
+++ libvirt-1.1.1/src/locking/virtlockd.init.in
@@ -4,11 +4,13 @@
# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV
#

View File

@ -14,10 +14,10 @@
is inactive. We obviously can't search xenstore when the domain is
inactive.
Index: libvirt-1.1.0/src/xen/xend_internal.c
Index: libvirt-1.1.1/src/xen/xend_internal.c
===================================================================
--- libvirt-1.1.0.orig/src/xen/xend_internal.c
+++ libvirt-1.1.0/src/xen/xend_internal.c
--- libvirt-1.1.1.orig/src/xen/xend_internal.c
+++ libvirt-1.1.1/src/xen/xend_internal.c
@@ -70,7 +70,7 @@
#define XEND_RCV_BUF_MAX_LEN (256 * 1024)
@ -27,7 +27,7 @@ Index: libvirt-1.1.0/src/xen/xend_internal.c
virDomainDeviceDefPtr dev, char *class,
char *ref, int ref_len);
@@ -3332,18 +3332,18 @@ xenDaemonDomainBlockPeek(virConnectPtr c
@@ -3316,18 +3316,18 @@ xenDaemonDomainBlockPeek(virConnectPtr c
* Returns 0 in case of success, -1 in case of failure.
*/
static int
@ -50,7 +50,7 @@ Index: libvirt-1.1.0/src/xen/xend_internal.c
if (dev->data.disk->driverName &&
STREQ(dev->data.disk->driverName, "tap"))
strcpy(class, "tap");
@@ -3353,19 +3353,17 @@ virDomainXMLDevID(virConnectPtr conn,
@@ -3337,19 +3337,17 @@ virDomainXMLDevID(virConnectPtr conn,
else
strcpy(class, "vbd");
@ -81,7 +81,7 @@ Index: libvirt-1.1.0/src/xen/xend_internal.c
} else if (dev->type == VIR_DOMAIN_DEVICE_NET) {
char mac[VIR_MAC_STRING_BUFLEN];
virDomainNetDefPtr netdef = dev->data.net;
@@ -3373,16 +3371,22 @@ virDomainXMLDevID(virConnectPtr conn,
@@ -3357,16 +3355,22 @@ virDomainXMLDevID(virConnectPtr conn,
strcpy(class, "vif");
@ -114,7 +114,7 @@ Index: libvirt-1.1.0/src/xen/xend_internal.c
} else if (dev->type == VIR_DOMAIN_DEVICE_HOSTDEV &&
dev->data.hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
dev->data.hostdev->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {
@@ -3400,17 +3404,44 @@ virDomainXMLDevID(virConnectPtr conn,
@@ -3382,17 +3386,44 @@ virDomainXMLDevID(virConnectPtr conn,
strcpy(class, "pci");

View File

@ -1,8 +1,8 @@
Index: libvirt-1.1.0/src/xenxs/xen_sxpr.c
Index: libvirt-1.1.1/src/xenxs/xen_sxpr.c
===================================================================
--- libvirt-1.1.0.orig/src/xenxs/xen_sxpr.c
+++ libvirt-1.1.0/src/xenxs/xen_sxpr.c
@@ -328,7 +328,7 @@ error:
--- libvirt-1.1.1.orig/src/xenxs/xen_sxpr.c
+++ libvirt-1.1.1/src/xenxs/xen_sxpr.c
@@ -327,7 +327,7 @@ error:
static int
xenParseSxprDisks(virDomainDefPtr def,
const struct sexpr *root,
@ -11,7 +11,7 @@ Index: libvirt-1.1.0/src/xenxs/xen_sxpr.c
int xendConfigVersion)
{
const struct sexpr *cur, *node;
@@ -379,7 +379,6 @@ xenParseSxprDisks(virDomainDefPtr def,
@@ -378,7 +378,6 @@ xenParseSxprDisks(virDomainDefPtr def,
/* There is a case without the uname to the CD-ROM device */
offset = strchr(dst, ':');
if (!offset ||