Accepting request 197361 from Virtualization
- Update to libvirt 1.1.2 - various improvements to libxl driver - systemd integration improvements - Add flag to BaselineCPU API to return detailed CPU features - Introduce a virt-login-shell binary - conf: add startupPolicy attribute for harddisk - Many incremental improvements and bug fixes, see http://libvirt.org/news.html - Drop upstream patches: bcef0f01-libxl-console.patch, 9d0557b9-legacy-xen-double-free.patch, d7a45bf2-legacy-xen-dumpxml.patch, 0e671a16-CVE-2013-4239.patch - Includes fixes for bnc#837530, bnc#837531, bnc#837999 Note: above bug fixes are CVE-2013-4291, CVE-2013-4292, and CVE-2013-5651 respectively. OBS-URL: https://build.opensuse.org/request/show/197361 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=128
This commit is contained in:
commit
1b0773390b
@ -1,60 +0,0 @@
|
|||||||
commit 0e671a1646df543eab683b38f6644f70d12fbee1
|
|
||||||
Author: Jim Fehlig <jfehlig@suse.com>
|
|
||||||
Date: Mon Aug 5 10:27:23 2013 -0600
|
|
||||||
|
|
||||||
xen: fix memory corruption in legacy driver
|
|
||||||
|
|
||||||
Commit 632180d1 introduced memory corruption in xenDaemonListDefinedDomains
|
|
||||||
by starting to populate the names array at index -1, causing all sorts
|
|
||||||
of havoc in libvirtd such as aborts like the following
|
|
||||||
|
|
||||||
*** Error in `/usr/sbin/libvirtd': double free or corruption (out): 0x00007fffe00ccf20 ***
|
|
||||||
======= Backtrace: =========
|
|
||||||
/lib64/libc.so.6(+0x7abf6)[0x7ffff3fa0bf6]
|
|
||||||
/lib64/libc.so.6(+0x7b973)[0x7ffff3fa1973]
|
|
||||||
/lib64/libc.so.6(xdr_array+0xde)[0x7ffff403cbae]
|
|
||||||
/usr/sbin/libvirtd(+0x50251)[0x5555555a4251]
|
|
||||||
/lib64/libc.so.6(xdr_free+0x15)[0x7ffff403ccd5]
|
|
||||||
/usr/lib64/libvirt.so.0(+0x1fad34)[0x7ffff76b1d34]
|
|
||||||
/usr/lib64/libvirt.so.0(virNetServerProgramDispatch+0x1fc)[0x7ffff76b16f1]
|
|
||||||
/usr/lib64/libvirt.so.0(+0x1f214a)[0x7ffff76a914a]
|
|
||||||
/usr/lib64/libvirt.so.0(+0x1f222d)[0x7ffff76a922d]
|
|
||||||
/usr/lib64/libvirt.so.0(+0xbcc4f)[0x7ffff7573c4f]
|
|
||||||
/usr/lib64/libvirt.so.0(+0xbc5e5)[0x7ffff75735e5]
|
|
||||||
/lib64/libpthread.so.0(+0x7e0f)[0x7ffff48f7e0f]
|
|
||||||
/lib64/libc.so.6(clone+0x6d)[0x7ffff400e7dd]
|
|
||||||
|
|
||||||
Fix by initializing ret to 0 and only setting to error on failure path.
|
|
||||||
|
|
||||||
Index: libvirt-1.1.1/src/xen/xend_internal.c
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-1.1.1.orig/src/xen/xend_internal.c
|
|
||||||
+++ libvirt-1.1.1/src/xen/xend_internal.c
|
|
||||||
@@ -2896,7 +2896,7 @@ xenDaemonListDefinedDomains(virConnectPt
|
|
||||||
{
|
|
||||||
struct sexpr *root = NULL;
|
|
||||||
size_t i;
|
|
||||||
- int ret = -1;
|
|
||||||
+ int ret = 0;
|
|
||||||
struct sexpr *_for_i, *node;
|
|
||||||
|
|
||||||
if (maxnames == 0)
|
|
||||||
@@ -2919,16 +2919,15 @@ xenDaemonListDefinedDomains(virConnectPt
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
- ret = 0;
|
|
||||||
-
|
|
||||||
cleanup:
|
|
||||||
sexpr_free(root);
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
error:
|
|
||||||
- for (i = 0; ret != -1 && i < ret; ++i)
|
|
||||||
+ for (i = 0; i < ret; ++i)
|
|
||||||
VIR_FREE(names[i]);
|
|
||||||
|
|
||||||
+ ret = -1;
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
commit 9d0557b9655fe4a3f31af2e1cc2f33de8acfaa7d
|
|
||||||
Author: Stefan Bader <stefan.bader@canonical.com>
|
|
||||||
Date: Wed Jul 31 11:59:21 2013 +0200
|
|
||||||
|
|
||||||
xen: Avoid double free of virDomainDef in xenDaemonCreateXML
|
|
||||||
|
|
||||||
The virDomainDef is allocated by the caller and also used after
|
|
||||||
calling to xenDaemonCreateXML. So it must not get freed by the
|
|
||||||
callee.
|
|
||||||
|
|
||||||
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
|
|
||||||
|
|
||||||
Index: libvirt-1.1.1/src/xen/xend_internal.c
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-1.1.1.orig/src/xen/xend_internal.c
|
|
||||||
+++ libvirt-1.1.1/src/xen/xend_internal.c
|
|
||||||
@@ -2171,7 +2171,6 @@ xenDaemonCreateXML(virConnectPtr conn, v
|
|
||||||
if (xenDaemonDomainResume(conn, def) < 0)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
- virDomainDefFree(def);
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
error:
|
|
@ -1,280 +0,0 @@
|
|||||||
commit bcef0f01585a63626d29126a8dcbf1e222f70145
|
|
||||||
Author: Bamvor Jian Zhang <bjzhang@suse.com>
|
|
||||||
Date: Fri Jul 26 11:30:50 2013 +0800
|
|
||||||
|
|
||||||
add console support in libxl
|
|
||||||
|
|
||||||
this patch introduce the console api in libxl driver for both pv and
|
|
||||||
hvm guest. and import and update the libxlMakeChrdevStr function
|
|
||||||
which was deleted in commit dfa1e1dd.
|
|
||||||
|
|
||||||
Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>
|
|
||||||
|
|
||||||
Index: libvirt-1.1.1/src/libxl/libxl_conf.c
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-1.1.1.orig/src/libxl/libxl_conf.c
|
|
||||||
+++ libvirt-1.1.1/src/libxl/libxl_conf.c
|
|
||||||
@@ -331,6 +331,92 @@ error:
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
+libxlMakeChrdevStr(virDomainChrDefPtr def, char **buf)
|
|
||||||
+{
|
|
||||||
+ virDomainChrSourceDef srcdef = def->source;
|
|
||||||
+ const char *type = virDomainChrTypeToString(srcdef.type);
|
|
||||||
+
|
|
||||||
+ if (!type) {
|
|
||||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
|
||||||
+ "%s", _("unknown chrdev type"));
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ switch (srcdef.type) {
|
|
||||||
+ case VIR_DOMAIN_CHR_TYPE_NULL:
|
|
||||||
+ case VIR_DOMAIN_CHR_TYPE_STDIO:
|
|
||||||
+ case VIR_DOMAIN_CHR_TYPE_VC:
|
|
||||||
+ case VIR_DOMAIN_CHR_TYPE_PTY:
|
|
||||||
+ if (VIR_STRDUP(*buf, type) < 0)
|
|
||||||
+ return -1;
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ case VIR_DOMAIN_CHR_TYPE_FILE:
|
|
||||||
+ case VIR_DOMAIN_CHR_TYPE_PIPE:
|
|
||||||
+ if (virAsprintf(buf, "%s:%s", type, srcdef.data.file.path) < 0)
|
|
||||||
+ return -1;
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ case VIR_DOMAIN_CHR_TYPE_DEV:
|
|
||||||
+ if (VIR_STRDUP(*buf, srcdef.data.file.path) < 0)
|
|
||||||
+ return -1;
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ case VIR_DOMAIN_CHR_TYPE_UDP: {
|
|
||||||
+ const char *connectHost = srcdef.data.udp.connectHost;
|
|
||||||
+ const char *bindHost = srcdef.data.udp.bindHost;
|
|
||||||
+ const char *bindService = srcdef.data.udp.bindService;
|
|
||||||
+
|
|
||||||
+ if (connectHost == NULL)
|
|
||||||
+ connectHost = "";
|
|
||||||
+ if (bindHost == NULL)
|
|
||||||
+ bindHost = "";
|
|
||||||
+ if (bindService == NULL)
|
|
||||||
+ bindService = "0";
|
|
||||||
+
|
|
||||||
+ if (virAsprintf(buf, "udp:%s:%s@%s:%s",
|
|
||||||
+ connectHost,
|
|
||||||
+ srcdef.data.udp.connectService,
|
|
||||||
+ bindHost,
|
|
||||||
+ bindService) < 0)
|
|
||||||
+ return -1;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ case VIR_DOMAIN_CHR_TYPE_TCP: {
|
|
||||||
+ const char *prefix;
|
|
||||||
+
|
|
||||||
+ if (srcdef.data.tcp.protocol == VIR_DOMAIN_CHR_TCP_PROTOCOL_TELNET)
|
|
||||||
+ prefix = "telnet";
|
|
||||||
+ else
|
|
||||||
+ prefix = "tcp";
|
|
||||||
+
|
|
||||||
+ if (virAsprintf(buf, "%s:%s:%s%s",
|
|
||||||
+ prefix,
|
|
||||||
+ srcdef.data.tcp.host,
|
|
||||||
+ srcdef.data.tcp.service,
|
|
||||||
+ srcdef.data.tcp.listen ? ",server,nowait" : "") < 0)
|
|
||||||
+ return -1;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ case VIR_DOMAIN_CHR_TYPE_UNIX:
|
|
||||||
+ if (virAsprintf(buf, "unix:%s%s",
|
|
||||||
+ srcdef.data.nix.path,
|
|
||||||
+ srcdef.data.nix.listen ? ",server,nowait" : "") < 0)
|
|
||||||
+ return -1;
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
+ default:
|
|
||||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
|
||||||
+ _("unsupported chardev '%s'"), type);
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
libxlMakeDomBuildInfo(virDomainObjPtr vm, libxl_domain_config *d_config)
|
|
||||||
{
|
|
||||||
virDomainDefPtr def = vm->def;
|
|
||||||
@@ -411,6 +497,24 @@ libxlMakeDomBuildInfo(virDomainObjPtr vm
|
|
||||||
if (VIR_STRDUP(b_info->u.hvm.boot, bootorder) < 0)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
+ if (def->nserials) {
|
|
||||||
+ if (def->nserials > 1) {
|
|
||||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
|
||||||
+ "%s",
|
|
||||||
+ _("Only one serial device is supported by libxl"));
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
+ if (libxlMakeChrdevStr(def->serials[0], &b_info->u.hvm.serial) < 0)
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (def->nparallels) {
|
|
||||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
|
||||||
+ "%s",
|
|
||||||
+ _("Parallel devices are not supported by libxl"));
|
|
||||||
+ goto error;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* The following comment and calculation were taken directly from
|
|
||||||
* libxenlight's internal function libxl_get_required_shadow_memory():
|
|
||||||
Index: libvirt-1.1.1/src/libxl/libxl_conf.h
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-1.1.1.orig/src/libxl/libxl_conf.h
|
|
||||||
+++ libvirt-1.1.1/src/libxl/libxl_conf.h
|
|
||||||
@@ -34,6 +34,7 @@
|
|
||||||
# include "configmake.h"
|
|
||||||
# include "virportallocator.h"
|
|
||||||
# include "virobject.h"
|
|
||||||
+# include "virchrdev.h"
|
|
||||||
|
|
||||||
|
|
||||||
# define LIBXL_VNC_PORT_MIN 5900
|
|
||||||
@@ -94,6 +95,8 @@ struct _libxlDomainObjPrivate {
|
|
||||||
|
|
||||||
/* per domain libxl ctx */
|
|
||||||
libxl_ctx *ctx;
|
|
||||||
+ /* console */
|
|
||||||
+ virChrdevsPtr devs;
|
|
||||||
libxl_evgen_domain_death *deathW;
|
|
||||||
|
|
||||||
/* list of libxl timeout registrations */
|
|
||||||
Index: libvirt-1.1.1/src/libxl/libxl_driver.c
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-1.1.1.orig/src/libxl/libxl_driver.c
|
|
||||||
+++ libvirt-1.1.1/src/libxl/libxl_driver.c
|
|
||||||
@@ -417,6 +417,9 @@ libxlDomainObjPrivateAlloc(void)
|
|
||||||
|
|
||||||
libxl_osevent_register_hooks(priv->ctx, &libxl_event_callbacks, priv);
|
|
||||||
|
|
||||||
+ if (!(priv->devs = virChrdevAlloc()))
|
|
||||||
+ return NULL;
|
|
||||||
+
|
|
||||||
return priv;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -428,6 +431,7 @@ libxlDomainObjPrivateDispose(void *obj)
|
|
||||||
if (priv->deathW)
|
|
||||||
libxl_evdisable_domain_death(priv->ctx, priv->deathW);
|
|
||||||
|
|
||||||
+ virChrdevFree(priv->devs);
|
|
||||||
libxl_ctx_free(priv->ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -4502,6 +4506,94 @@ cleanup:
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+libxlDomainOpenConsole(virDomainPtr dom,
|
|
||||||
+ const char *dev_name,
|
|
||||||
+ virStreamPtr st,
|
|
||||||
+ unsigned int flags)
|
|
||||||
+{
|
|
||||||
+ libxlDriverPrivatePtr driver = dom->conn->privateData;
|
|
||||||
+ virDomainObjPtr vm = NULL;
|
|
||||||
+ int ret = -1;
|
|
||||||
+ virDomainChrDefPtr chr = NULL;
|
|
||||||
+ libxlDomainObjPrivatePtr priv;
|
|
||||||
+ char *console = NULL;
|
|
||||||
+
|
|
||||||
+ virCheckFlags(VIR_DOMAIN_CONSOLE_FORCE, -1);
|
|
||||||
+
|
|
||||||
+ if (dev_name) {
|
|
||||||
+ /* XXX support device aliases in future */
|
|
||||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
||||||
+ _("Named device aliases are not supported"));
|
|
||||||
+ goto cleanup;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ libxlDriverLock(driver);
|
|
||||||
+ vm = virDomainObjListFindByUUID(driver->domains, dom->uuid);
|
|
||||||
+ libxlDriverUnlock(driver);
|
|
||||||
+ if (!vm) {
|
|
||||||
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
|
|
||||||
+ virUUIDFormat(dom->uuid, uuidstr);
|
|
||||||
+ virReportError(VIR_ERR_NO_DOMAIN,
|
|
||||||
+ _("No domain with matching uuid '%s'"), uuidstr);
|
|
||||||
+ goto cleanup;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (virDomainOpenConsoleEnsureACL(dom->conn, vm->def) < 0)
|
|
||||||
+ goto cleanup;
|
|
||||||
+
|
|
||||||
+ if (!virDomainObjIsActive(vm)) {
|
|
||||||
+ virReportError(VIR_ERR_OPERATION_INVALID,
|
|
||||||
+ "%s", _("domain is not running"));
|
|
||||||
+ goto cleanup;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ priv = vm->privateData;
|
|
||||||
+
|
|
||||||
+ if (vm->def->nserials)
|
|
||||||
+ chr = vm->def->serials[0];
|
|
||||||
+
|
|
||||||
+ if (!chr) {
|
|
||||||
+ virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
+ _("cannot find character device %s"),
|
|
||||||
+ NULLSTR(dev_name));
|
|
||||||
+ goto cleanup;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (chr->source.type != VIR_DOMAIN_CHR_TYPE_PTY) {
|
|
||||||
+ virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
+ _("character device %s is not using a PTY"),
|
|
||||||
+ NULLSTR(dev_name));
|
|
||||||
+ goto cleanup;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ret = libxl_primary_console_get_tty(priv->ctx, vm->def->id, &console);
|
|
||||||
+ if (ret)
|
|
||||||
+ goto cleanup;
|
|
||||||
+
|
|
||||||
+ if (VIR_STRDUP(chr->source.data.file.path, console) < 0)
|
|
||||||
+ goto cleanup;
|
|
||||||
+
|
|
||||||
+ /* handle mutually exclusive access to console devices */
|
|
||||||
+ ret = virChrdevOpen(priv->devs,
|
|
||||||
+ &chr->source,
|
|
||||||
+ st,
|
|
||||||
+ (flags & VIR_DOMAIN_CONSOLE_FORCE) != 0);
|
|
||||||
+
|
|
||||||
+ if (ret == 1) {
|
|
||||||
+ virReportError(VIR_ERR_OPERATION_FAILED, "%s",
|
|
||||||
+ _("Active console session exists for this domain"));
|
|
||||||
+ ret = -1;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+cleanup:
|
|
||||||
+ VIR_FREE(console);
|
|
||||||
+ if (vm)
|
|
||||||
+ virObjectUnlock(vm);
|
|
||||||
+ return ret;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static int
|
|
||||||
libxlDomainSetSchedulerParameters(virDomainPtr dom, virTypedParameterPtr params,
|
|
||||||
int nparams)
|
|
||||||
@@ -4884,6 +4976,7 @@ static virDriver libxlDriver = {
|
|
||||||
.domainManagedSave = libxlDomainManagedSave, /* 0.9.2 */
|
|
||||||
.domainHasManagedSaveImage = libxlDomainHasManagedSaveImage, /* 0.9.2 */
|
|
||||||
.domainManagedSaveRemove = libxlDomainManagedSaveRemove, /* 0.9.2 */
|
|
||||||
+ .domainOpenConsole = libxlDomainOpenConsole, /* 1.1.2 */
|
|
||||||
.domainIsActive = libxlDomainIsActive, /* 0.9.0 */
|
|
||||||
.domainIsPersistent = libxlDomainIsPersistent, /* 0.9.0 */
|
|
||||||
.domainIsUpdated = libxlDomainIsUpdated, /* 0.9.0 */
|
|
@ -32,7 +32,7 @@ Index: src/lxc/lxc_container.c
|
|||||||
VIR_FREE(stack);
|
VIR_FREE(stack);
|
||||||
if (cpid < 0) {
|
if (cpid < 0) {
|
||||||
virReportSystemError(errno, "%s",
|
virReportSystemError(errno, "%s",
|
||||||
@@ -1879,7 +1887,11 @@ int lxcContainerStart(virDomainDefPtr de
|
@@ -1893,7 +1901,11 @@ int lxcContainerStart(virDomainDefPtr de
|
||||||
cflags |= CLONE_NEWNET;
|
cflags |= CLONE_NEWNET;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ Index: src/lxc/lxc_container.c
|
|||||||
VIR_FREE(stack);
|
VIR_FREE(stack);
|
||||||
VIR_DEBUG("clone() completed, new container PID is %d", pid);
|
VIR_DEBUG("clone() completed, new container PID is %d", pid);
|
||||||
|
|
||||||
@@ -1905,6 +1917,7 @@ int lxcContainerAvailable(int features)
|
@@ -1919,6 +1931,7 @@ int lxcContainerAvailable(int features)
|
||||||
int cpid;
|
int cpid;
|
||||||
char *childStack;
|
char *childStack;
|
||||||
char *stack;
|
char *stack;
|
||||||
@ -52,7 +52,7 @@ Index: src/lxc/lxc_container.c
|
|||||||
|
|
||||||
if (features & LXC_CONTAINER_FEATURE_USER)
|
if (features & LXC_CONTAINER_FEATURE_USER)
|
||||||
flags |= CLONE_NEWUSER;
|
flags |= CLONE_NEWUSER;
|
||||||
@@ -1912,14 +1925,21 @@ int lxcContainerAvailable(int features)
|
@@ -1926,14 +1939,21 @@ int lxcContainerAvailable(int features)
|
||||||
if (features & LXC_CONTAINER_FEATURE_NET)
|
if (features & LXC_CONTAINER_FEATURE_NET)
|
||||||
flags |= CLONE_NEWNET;
|
flags |= CLONE_NEWNET;
|
||||||
|
|
||||||
|
@ -1,238 +0,0 @@
|
|||||||
commit d7a45bf22368161869963b92a0a1d5599590fdf5
|
|
||||||
Author: Stefan Bader <stefan.bader@canonical.com>
|
|
||||||
Date: Tue Aug 6 12:28:58 2013 +0100
|
|
||||||
|
|
||||||
xen: Use internal interfaces in xenDomainUsedCpus
|
|
||||||
|
|
||||||
Since commit 95e18efd most public interfaces (xenUnified...) obtain
|
|
||||||
a virDomainDefPtr via xenGetDomainDefFor...() which take the unified
|
|
||||||
lock.
|
|
||||||
This is already taken before calling xenDomainUsedCpus(), so we get
|
|
||||||
a deadlock for active guests. Avoid this by splitting up
|
|
||||||
xenUnifiedDomainGetVcpusFlags() and xenUnifiedDomainGetVcpus() into
|
|
||||||
public and private function calls (which get the virDomainDefPtr passed)
|
|
||||||
and use those in xenDomainUsedCpus().
|
|
||||||
|
|
||||||
xenDomainUsedCpus
|
|
||||||
...
|
|
||||||
nb_vcpu = xenUnifiedDomainGetMaxVcpus(dom);
|
|
||||||
return xenUnifiedDomainGetVcpusFlags(...)
|
|
||||||
...
|
|
||||||
if (!(def = xenGetDomainDefForDom(dom)))
|
|
||||||
return xenGetDomainDefForUUID(dom->conn, dom->uuid);
|
|
||||||
...
|
|
||||||
ret = xenHypervisorLookupDomainByUUID(conn, uuid);
|
|
||||||
...
|
|
||||||
xenUnifiedLock(priv);
|
|
||||||
name = xenStoreDomainGetName(conn, id);
|
|
||||||
xenUnifiedUnlock(priv);
|
|
||||||
...
|
|
||||||
if ((ncpus = xenUnifiedDomainGetVcpus(dom, cpuinfo, nb_vcpu,
|
|
||||||
...
|
|
||||||
if (!(def = xenGetDomainDefForDom(dom)))
|
|
||||||
[again like above]
|
|
||||||
|
|
||||||
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
|
|
||||||
|
|
||||||
Index: libvirt-1.1.1/src/xen/xen_driver.c
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-1.1.1.orig/src/xen/xen_driver.c
|
|
||||||
+++ libvirt-1.1.1/src/xen/xen_driver.c
|
|
||||||
@@ -73,12 +73,19 @@
|
|
||||||
|
|
||||||
static int
|
|
||||||
xenUnifiedNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info);
|
|
||||||
+
|
|
||||||
static int
|
|
||||||
-xenUnifiedDomainGetMaxVcpus(virDomainPtr dom);
|
|
||||||
+xenUnifiedDomainGetVcpusFlagsInternal(virDomainPtr dom,
|
|
||||||
+ virDomainDefPtr def,
|
|
||||||
+ unsigned int flags);
|
|
||||||
+
|
|
||||||
static int
|
|
||||||
-xenUnifiedDomainGetVcpus(virDomainPtr dom,
|
|
||||||
- virVcpuInfoPtr info, int maxinfo,
|
|
||||||
- unsigned char *cpumaps, int maplen);
|
|
||||||
+xenUnifiedDomainGetVcpusInternal(virDomainPtr dom,
|
|
||||||
+ virDomainDefPtr def,
|
|
||||||
+ virVcpuInfoPtr info,
|
|
||||||
+ int maxinfo,
|
|
||||||
+ unsigned char *cpumaps,
|
|
||||||
+ int maplen);
|
|
||||||
|
|
||||||
|
|
||||||
static bool is_privileged = false;
|
|
||||||
@@ -173,6 +180,7 @@ xenNumaInit(virConnectPtr conn) {
|
|
||||||
/**
|
|
||||||
* xenDomainUsedCpus:
|
|
||||||
* @dom: the domain
|
|
||||||
+ * @def: the domain definition
|
|
||||||
*
|
|
||||||
* Analyze which set of CPUs are used by the domain and
|
|
||||||
* return a string providing the ranges.
|
|
||||||
@@ -181,7 +189,7 @@ xenNumaInit(virConnectPtr conn) {
|
|
||||||
* NULL if the domain uses all CPU or in case of error.
|
|
||||||
*/
|
|
||||||
char *
|
|
||||||
-xenDomainUsedCpus(virDomainPtr dom)
|
|
||||||
+xenDomainUsedCpus(virDomainPtr dom, virDomainDefPtr def)
|
|
||||||
{
|
|
||||||
char *res = NULL;
|
|
||||||
int ncpus;
|
|
||||||
@@ -202,7 +210,9 @@ xenDomainUsedCpus(virDomainPtr dom)
|
|
||||||
|
|
||||||
if (priv->nbNodeCpus <= 0)
|
|
||||||
return NULL;
|
|
||||||
- nb_vcpu = xenUnifiedDomainGetMaxVcpus(dom);
|
|
||||||
+ nb_vcpu = xenUnifiedDomainGetVcpusFlagsInternal(dom, def,
|
|
||||||
+ (VIR_DOMAIN_VCPU_LIVE |
|
|
||||||
+ VIR_DOMAIN_VCPU_MAXIMUM));
|
|
||||||
if (nb_vcpu <= 0)
|
|
||||||
return NULL;
|
|
||||||
if (xenUnifiedNodeGetInfo(dom->conn, &nodeinfo) < 0)
|
|
||||||
@@ -217,8 +227,8 @@ xenDomainUsedCpus(virDomainPtr dom)
|
|
||||||
VIR_ALLOC_N(cpumap, nb_vcpu * cpumaplen) < 0)
|
|
||||||
goto done;
|
|
||||||
|
|
||||||
- if ((ncpus = xenUnifiedDomainGetVcpus(dom, cpuinfo, nb_vcpu,
|
|
||||||
- cpumap, cpumaplen)) >= 0) {
|
|
||||||
+ if ((ncpus = xenUnifiedDomainGetVcpusInternal(dom, def, cpuinfo, nb_vcpu,
|
|
||||||
+ cpumap, cpumaplen)) >= 0) {
|
|
||||||
for (n = 0; n < ncpus; n++) {
|
|
||||||
for (m = 0; m < priv->nbNodeCpus; m++) {
|
|
||||||
bool used;
|
|
||||||
@@ -1416,54 +1426,62 @@ cleanup:
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
-xenUnifiedDomainGetVcpus(virDomainPtr dom,
|
|
||||||
- virVcpuInfoPtr info, int maxinfo,
|
|
||||||
- unsigned char *cpumaps, int maplen)
|
|
||||||
+xenUnifiedDomainGetVcpusInternal(virDomainPtr dom,
|
|
||||||
+ virDomainDefPtr def,
|
|
||||||
+ virVcpuInfoPtr info,
|
|
||||||
+ int maxinfo,
|
|
||||||
+ unsigned char *cpumaps,
|
|
||||||
+ int maplen)
|
|
||||||
{
|
|
||||||
xenUnifiedPrivatePtr priv = dom->conn->privateData;
|
|
||||||
- virDomainDefPtr def = NULL;
|
|
||||||
int ret = -1;
|
|
||||||
|
|
||||||
- if (!(def = xenGetDomainDefForDom(dom)))
|
|
||||||
- goto cleanup;
|
|
||||||
-
|
|
||||||
- if (virDomainGetVcpusEnsureACL(dom->conn, def) < 0)
|
|
||||||
- goto cleanup;
|
|
||||||
-
|
|
||||||
if (dom->id < 0) {
|
|
||||||
if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4) {
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
|
||||||
_("Cannot get VCPUs of inactive domain"));
|
|
||||||
- goto cleanup;
|
|
||||||
} else {
|
|
||||||
- ret = xenDaemonDomainGetVcpus(dom->conn, def, info, maxinfo, cpumaps, maplen);
|
|
||||||
+ ret = xenDaemonDomainGetVcpus(dom->conn, def, info, maxinfo,
|
|
||||||
+ cpumaps, maplen);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- ret = xenHypervisorGetVcpus(dom->conn, def, info, maxinfo, cpumaps, maplen);
|
|
||||||
+ ret = xenHypervisorGetVcpus(dom->conn, def, info, maxinfo, cpumaps,
|
|
||||||
+ maplen);
|
|
||||||
}
|
|
||||||
|
|
||||||
-cleanup:
|
|
||||||
- virDomainDefFree(def);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
-xenUnifiedDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
|
|
||||||
+xenUnifiedDomainGetVcpus(virDomainPtr dom,
|
|
||||||
+ virVcpuInfoPtr info, int maxinfo,
|
|
||||||
+ unsigned char *cpumaps, int maplen)
|
|
||||||
{
|
|
||||||
- xenUnifiedPrivatePtr priv = dom->conn->privateData;
|
|
||||||
virDomainDefPtr def = NULL;
|
|
||||||
int ret = -1;
|
|
||||||
|
|
||||||
- virCheckFlags(VIR_DOMAIN_VCPU_LIVE |
|
|
||||||
- VIR_DOMAIN_VCPU_CONFIG |
|
|
||||||
- VIR_DOMAIN_VCPU_MAXIMUM, -1);
|
|
||||||
-
|
|
||||||
if (!(def = xenGetDomainDefForDom(dom)))
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
- if (virDomainGetVcpusFlagsEnsureACL(dom->conn, def) < 0)
|
|
||||||
+ if (virDomainGetVcpusEnsureACL(dom->conn, def) < 0)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
+ ret = xenUnifiedDomainGetVcpusInternal(dom, def, info, maxinfo, cpumaps,
|
|
||||||
+ maplen);
|
|
||||||
+
|
|
||||||
+cleanup:
|
|
||||||
+ virDomainDefFree(def);
|
|
||||||
+ return ret;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+xenUnifiedDomainGetVcpusFlagsInternal(virDomainPtr dom,
|
|
||||||
+ virDomainDefPtr def,
|
|
||||||
+ unsigned int flags)
|
|
||||||
+{
|
|
||||||
+ xenUnifiedPrivatePtr priv = dom->conn->privateData;
|
|
||||||
+ int ret = -1;
|
|
||||||
+
|
|
||||||
if (dom->id < 0) {
|
|
||||||
if (priv->xendConfigVersion < XEND_CONFIG_VERSION_3_0_4)
|
|
||||||
ret = xenXMDomainGetVcpusFlags(dom->conn, def, flags);
|
|
||||||
@@ -1476,6 +1494,27 @@ xenUnifiedDomainGetVcpusFlags(virDomainP
|
|
||||||
ret = xenDaemonDomainGetVcpusFlags(dom->conn, def, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ return ret;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+xenUnifiedDomainGetVcpusFlags(virDomainPtr dom, unsigned int flags)
|
|
||||||
+{
|
|
||||||
+ virDomainDefPtr def = NULL;
|
|
||||||
+ int ret = -1;
|
|
||||||
+
|
|
||||||
+ virCheckFlags(VIR_DOMAIN_VCPU_LIVE |
|
|
||||||
+ VIR_DOMAIN_VCPU_CONFIG |
|
|
||||||
+ VIR_DOMAIN_VCPU_MAXIMUM, -1);
|
|
||||||
+
|
|
||||||
+ if (!(def = xenGetDomainDefForDom(dom)))
|
|
||||||
+ goto cleanup;
|
|
||||||
+
|
|
||||||
+ if (virDomainGetVcpusFlagsEnsureACL(dom->conn, def) < 0)
|
|
||||||
+ goto cleanup;
|
|
||||||
+
|
|
||||||
+ ret = xenUnifiedDomainGetVcpusFlagsInternal(dom, def, flags);
|
|
||||||
+
|
|
||||||
cleanup:
|
|
||||||
virDomainDefFree(def);
|
|
||||||
return ret;
|
|
||||||
@@ -1507,7 +1546,7 @@ xenUnifiedDomainGetXMLDesc(virDomainPtr
|
|
||||||
} else {
|
|
||||||
char *cpus;
|
|
||||||
xenUnifiedLock(priv);
|
|
||||||
- cpus = xenDomainUsedCpus(dom);
|
|
||||||
+ cpus = xenDomainUsedCpus(dom, minidef);
|
|
||||||
xenUnifiedUnlock(priv);
|
|
||||||
def = xenDaemonDomainGetXMLDesc(dom->conn, minidef, cpus);
|
|
||||||
VIR_FREE(cpus);
|
|
||||||
Index: libvirt-1.1.1/src/xen/xen_driver.h
|
|
||||||
===================================================================
|
|
||||||
--- libvirt-1.1.1.orig/src/xen/xen_driver.h
|
|
||||||
+++ libvirt-1.1.1/src/xen/xen_driver.h
|
|
||||||
@@ -187,7 +187,7 @@ struct _xenUnifiedPrivate {
|
|
||||||
|
|
||||||
typedef struct _xenUnifiedPrivate *xenUnifiedPrivatePtr;
|
|
||||||
|
|
||||||
-char *xenDomainUsedCpus(virDomainPtr dom);
|
|
||||||
+char *xenDomainUsedCpus(virDomainPtr dom, virDomainDefPtr def);
|
|
||||||
|
|
||||||
virDomainXMLOptionPtr xenDomainXMLConfInit(void);
|
|
||||||
|
|
@ -8,10 +8,10 @@ uses the 'device_configure' RPC.
|
|||||||
This patch changes the xend driver to always call 'device_configure' for
|
This patch changes the xend driver to always call 'device_configure' for
|
||||||
PCI devices to be consistent with the usage in the xen tools.
|
PCI devices to be consistent with the usage in the xen tools.
|
||||||
|
|
||||||
Index: libvirt-1.1.1/src/xen/xend_internal.c
|
Index: libvirt-1.1.2/src/xen/xend_internal.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/src/xen/xend_internal.c
|
--- libvirt-1.1.2.orig/src/xen/xend_internal.c
|
||||||
+++ libvirt-1.1.1/src/xen/xend_internal.c
|
+++ libvirt-1.1.2/src/xen/xend_internal.c
|
||||||
@@ -2206,6 +2206,7 @@ xenDaemonAttachDeviceFlags(virConnectPtr
|
@@ -2206,6 +2206,7 @@ xenDaemonAttachDeviceFlags(virConnectPtr
|
||||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||||
char class[8], ref[80];
|
char class[8], ref[80];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: libvirt-1.1.1/examples/apparmor/Makefile.am
|
Index: libvirt-1.1.2/examples/apparmor/Makefile.am
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/examples/apparmor/Makefile.am
|
--- libvirt-1.1.2.orig/examples/apparmor/Makefile.am
|
||||||
+++ libvirt-1.1.1/examples/apparmor/Makefile.am
|
+++ libvirt-1.1.2/examples/apparmor/Makefile.am
|
||||||
@@ -14,8 +14,45 @@
|
@@ -14,8 +14,45 @@
|
||||||
## License along with this library. If not, see
|
## License along with this library. If not, see
|
||||||
## <http://www.gnu.org/licenses/>.
|
## <http://www.gnu.org/licenses/>.
|
||||||
@ -53,10 +53,10 @@ Index: libvirt-1.1.1/examples/apparmor/Makefile.am
|
|||||||
+ rm -f $(DESTDIR)$(sysconfdir)/apparmor.d/libvirt/TEMPLATE
|
+ rm -f $(DESTDIR)$(sysconfdir)/apparmor.d/libvirt/TEMPLATE
|
||||||
+
|
+
|
||||||
+endif
|
+endif
|
||||||
Index: libvirt-1.1.1/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
|
Index: libvirt-1.1.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ libvirt-1.1.1/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
|
+++ libvirt-1.1.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
|
||||||
@@ -0,0 +1,40 @@
|
@@ -0,0 +1,40 @@
|
||||||
+# Last Modified: Fri Aug 19 11:21:48 2011
|
+# Last Modified: Fri Aug 19 11:21:48 2011
|
||||||
+#include <tunables/global>
|
+#include <tunables/global>
|
||||||
@ -98,9 +98,9 @@ Index: libvirt-1.1.1/examples/apparmor/usr.lib.libvirt.virt-aa-helper.in
|
|||||||
+ /var/lib/kvm/images/ r,
|
+ /var/lib/kvm/images/ r,
|
||||||
+ /var/lib/kvm/images/** r,
|
+ /var/lib/kvm/images/** r,
|
||||||
+}
|
+}
|
||||||
Index: libvirt-1.1.1/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
Index: libvirt-1.1.2/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
--- libvirt-1.1.2.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,38 +0,0 @@
|
@@ -1,38 +0,0 @@
|
||||||
-# Last Modified: Mon Apr 5 15:10:27 2010
|
-# Last Modified: Mon Apr 5 15:10:27 2010
|
||||||
@ -141,9 +141,9 @@ Index: libvirt-1.1.1/examples/apparmor/usr.lib.libvirt.virt-aa-helper
|
|||||||
- /var/lib/libvirt/images/ r,
|
- /var/lib/libvirt/images/ r,
|
||||||
- /var/lib/libvirt/images/** r,
|
- /var/lib/libvirt/images/** r,
|
||||||
-}
|
-}
|
||||||
Index: libvirt-1.1.1/examples/apparmor/usr.sbin.libvirtd
|
Index: libvirt-1.1.2/examples/apparmor/usr.sbin.libvirtd
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/examples/apparmor/usr.sbin.libvirtd
|
--- libvirt-1.1.2.orig/examples/apparmor/usr.sbin.libvirtd
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,52 +0,0 @@
|
@@ -1,52 +0,0 @@
|
||||||
-# Last Modified: Mon Apr 5 15:03:58 2010
|
-# Last Modified: Mon Apr 5 15:03:58 2010
|
||||||
@ -198,10 +198,10 @@ Index: libvirt-1.1.1/examples/apparmor/usr.sbin.libvirtd
|
|||||||
- change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*,
|
- change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*,
|
||||||
-
|
-
|
||||||
-}
|
-}
|
||||||
Index: libvirt-1.1.1/examples/apparmor/usr.sbin.libvirtd.in
|
Index: libvirt-1.1.2/examples/apparmor/usr.sbin.libvirtd.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ libvirt-1.1.1/examples/apparmor/usr.sbin.libvirtd.in
|
+++ libvirt-1.1.2/examples/apparmor/usr.sbin.libvirtd.in
|
||||||
@@ -0,0 +1,58 @@
|
@@ -0,0 +1,58 @@
|
||||||
+# Last Modified: Fri Aug 19 11:20:36 2011
|
+# Last Modified: Fri Aug 19 11:20:36 2011
|
||||||
+#include <tunables/global>
|
+#include <tunables/global>
|
||||||
@ -261,9 +261,9 @@ Index: libvirt-1.1.1/examples/apparmor/usr.sbin.libvirtd.in
|
|||||||
+ change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*,
|
+ change_profile -> @{LIBVIRT}-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*,
|
||||||
+
|
+
|
||||||
+}
|
+}
|
||||||
Index: libvirt-1.1.1/examples/apparmor/libvirt-qemu
|
Index: libvirt-1.1.2/examples/apparmor/libvirt-qemu
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/examples/apparmor/libvirt-qemu
|
--- libvirt-1.1.2.orig/examples/apparmor/libvirt-qemu
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,129 +0,0 @@
|
@@ -1,129 +0,0 @@
|
||||||
-# Last Modified: Fri Mar 9 14:43:22 2012
|
-# Last Modified: Fri Mar 9 14:43:22 2012
|
||||||
@ -395,10 +395,10 @@ Index: libvirt-1.1.1/examples/apparmor/libvirt-qemu
|
|||||||
-
|
-
|
||||||
- /usr/libexec/qemu-bridge-helper rmix,
|
- /usr/libexec/qemu-bridge-helper rmix,
|
||||||
- }
|
- }
|
||||||
Index: libvirt-1.1.1/examples/apparmor/libvirt-qemu.in
|
Index: libvirt-1.1.2/examples/apparmor/libvirt-qemu.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ libvirt-1.1.1/examples/apparmor/libvirt-qemu.in
|
+++ libvirt-1.1.2/examples/apparmor/libvirt-qemu.in
|
||||||
@@ -0,0 +1,132 @@
|
@@ -0,0 +1,132 @@
|
||||||
+# Last Modified: Fri Mar 9 14:43:22 2012
|
+# Last Modified: Fri Mar 9 14:43:22 2012
|
||||||
+
|
+
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:40d275e6bf3ffc7acec330458fc59f7ff2144327210690fd6f9ac9eccfee6396
|
|
||||||
size 18261281
|
|
3
libvirt-1.1.2.tar.bz2
Normal file
3
libvirt-1.1.2.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9aa2fd6d2e7737323c846092cb2f8bf95e0b622c570b29ee4060eed634409cf4
|
||||||
|
size 18774400
|
@ -1,9 +1,9 @@
|
|||||||
Adjust libvirt-guests init files to conform to SUSE standards
|
Adjust libvirt-guests init files to conform to SUSE standards
|
||||||
|
|
||||||
Index: libvirt-1.1.1/tools/libvirt-guests.init.in
|
Index: libvirt-1.1.2/tools/libvirt-guests.init.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/tools/libvirt-guests.init.in
|
--- libvirt-1.1.2.orig/tools/libvirt-guests.init.in
|
||||||
+++ libvirt-1.1.1/tools/libvirt-guests.init.in
|
+++ libvirt-1.1.2/tools/libvirt-guests.init.in
|
||||||
@@ -3,15 +3,15 @@
|
@@ -3,15 +3,15 @@
|
||||||
# the following is the LSB init header
|
# the following is the LSB init header
|
||||||
#
|
#
|
||||||
@ -28,10 +28,10 @@ Index: libvirt-1.1.1/tools/libvirt-guests.init.in
|
|||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# the following is chkconfig init header
|
# the following is chkconfig init header
|
||||||
Index: libvirt-1.1.1/tools/libvirt-guests.sh.in
|
Index: libvirt-1.1.2/tools/libvirt-guests.sh.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/tools/libvirt-guests.sh.in
|
--- libvirt-1.1.2.orig/tools/libvirt-guests.sh.in
|
||||||
+++ libvirt-1.1.1/tools/libvirt-guests.sh.in
|
+++ libvirt-1.1.2/tools/libvirt-guests.sh.in
|
||||||
@@ -16,14 +16,13 @@
|
@@ -16,14 +16,13 @@
|
||||||
# License along with this library. If not, see
|
# License along with this library. If not, see
|
||||||
# <http://www.gnu.org/licenses/>.
|
# <http://www.gnu.org/licenses/>.
|
||||||
@ -189,10 +189,10 @@ Index: libvirt-1.1.1/tools/libvirt-guests.sh.in
|
|||||||
esac
|
esac
|
||||||
-exit $RETVAL
|
-exit $RETVAL
|
||||||
+rc_exit
|
+rc_exit
|
||||||
Index: libvirt-1.1.1/tools/libvirt-guests.sysconf
|
Index: libvirt-1.1.2/tools/libvirt-guests.sysconf
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/tools/libvirt-guests.sysconf
|
--- libvirt-1.1.2.orig/tools/libvirt-guests.sysconf
|
||||||
+++ libvirt-1.1.1/tools/libvirt-guests.sysconf
|
+++ libvirt-1.1.2/tools/libvirt-guests.sysconf
|
||||||
@@ -1,19 +1,29 @@
|
@@ -1,19 +1,29 @@
|
||||||
+## Path: System/Virtualization/libvirt-guests
|
+## Path: System/Virtualization/libvirt-guests
|
||||||
+
|
+
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: libvirt-1.1.1/configure.ac
|
Index: libvirt-1.1.2/configure.ac
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/configure.ac
|
--- libvirt-1.1.2.orig/configure.ac
|
||||||
+++ libvirt-1.1.1/configure.ac
|
+++ libvirt-1.1.2/configure.ac
|
||||||
@@ -172,6 +172,7 @@ LIBVIRT_CHECK_DBUS
|
@@ -173,6 +173,7 @@ LIBVIRT_CHECK_DBUS
|
||||||
LIBVIRT_CHECK_FUSE
|
LIBVIRT_CHECK_FUSE
|
||||||
LIBVIRT_CHECK_HAL
|
LIBVIRT_CHECK_HAL
|
||||||
LIBVIRT_CHECK_NETCF
|
LIBVIRT_CHECK_NETCF
|
||||||
@ -10,7 +10,7 @@ Index: libvirt-1.1.1/configure.ac
|
|||||||
LIBVIRT_CHECK_NUMACTL
|
LIBVIRT_CHECK_NUMACTL
|
||||||
LIBVIRT_CHECK_OPENWSMAN
|
LIBVIRT_CHECK_OPENWSMAN
|
||||||
LIBVIRT_CHECK_PCIACCESS
|
LIBVIRT_CHECK_PCIACCESS
|
||||||
@@ -2226,11 +2227,12 @@ if test "$with_libvirtd" = "no" ; then
|
@@ -2288,11 +2289,12 @@ if test "$with_libvirtd" = "no" ; then
|
||||||
with_interface=no
|
with_interface=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ Index: libvirt-1.1.1/configure.ac
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
if test "$with_interface" = "yes" ; then
|
if test "$with_interface" = "yes" ; then
|
||||||
@@ -2527,6 +2529,7 @@ LIBVIRT_RESULT_DBUS
|
@@ -2600,6 +2602,7 @@ LIBVIRT_RESULT_DBUS
|
||||||
LIBVIRT_RESULT_FUSE
|
LIBVIRT_RESULT_FUSE
|
||||||
LIBVIRT_RESULT_HAL
|
LIBVIRT_RESULT_HAL
|
||||||
LIBVIRT_RESULT_NETCF
|
LIBVIRT_RESULT_NETCF
|
||||||
@ -34,11 +34,11 @@ Index: libvirt-1.1.1/configure.ac
|
|||||||
LIBVIRT_RESULT_NUMACTL
|
LIBVIRT_RESULT_NUMACTL
|
||||||
LIBVIRT_RESULT_OPENWSMAN
|
LIBVIRT_RESULT_OPENWSMAN
|
||||||
LIBVIRT_RESULT_PCIACCESS
|
LIBVIRT_RESULT_PCIACCESS
|
||||||
Index: libvirt-1.1.1/src/Makefile.am
|
Index: libvirt-1.1.2/src/Makefile.am
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/src/Makefile.am
|
--- libvirt-1.1.2.orig/src/Makefile.am
|
||||||
+++ libvirt-1.1.1/src/Makefile.am
|
+++ libvirt-1.1.2/src/Makefile.am
|
||||||
@@ -741,6 +741,10 @@ if WITH_NETCF
|
@@ -750,6 +750,10 @@ if WITH_NETCF
|
||||||
INTERFACE_DRIVER_SOURCES += \
|
INTERFACE_DRIVER_SOURCES += \
|
||||||
interface/interface_backend_netcf.c
|
interface/interface_backend_netcf.c
|
||||||
endif
|
endif
|
||||||
@ -49,7 +49,7 @@ Index: libvirt-1.1.1/src/Makefile.am
|
|||||||
if WITH_UDEV
|
if WITH_UDEV
|
||||||
INTERFACE_DRIVER_SOURCES += \
|
INTERFACE_DRIVER_SOURCES += \
|
||||||
interface/interface_backend_udev.c
|
interface/interface_backend_udev.c
|
||||||
@@ -1293,11 +1297,16 @@ if WITH_NETCF
|
@@ -1310,11 +1314,16 @@ if WITH_NETCF
|
||||||
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
|
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
|
||||||
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
|
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
|
||||||
else
|
else
|
||||||
@ -66,11 +66,11 @@ Index: libvirt-1.1.1/src/Makefile.am
|
|||||||
if WITH_DRIVER_MODULES
|
if WITH_DRIVER_MODULES
|
||||||
libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la
|
libvirt_driver_interface_la_LIBADD += ../gnulib/lib/libgnu.la
|
||||||
libvirt_driver_interface_la_LDFLAGS += -module -avoid-version
|
libvirt_driver_interface_la_LDFLAGS += -module -avoid-version
|
||||||
Index: libvirt-1.1.1/tools/virsh.c
|
Index: libvirt-1.1.2/tools/virsh.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/tools/virsh.c
|
--- libvirt-1.1.2.orig/tools/virsh.c
|
||||||
+++ libvirt-1.1.1/tools/virsh.c
|
+++ libvirt-1.1.2/tools/virsh.c
|
||||||
@@ -2882,6 +2882,8 @@ vshShowVersion(vshControl *ctl ATTRIBUTE
|
@@ -2864,6 +2864,8 @@ vshShowVersion(vshControl *ctl ATTRIBUTE
|
||||||
vshPrint(ctl, " Interface");
|
vshPrint(ctl, " Interface");
|
||||||
# if defined(WITH_NETCF)
|
# if defined(WITH_NETCF)
|
||||||
vshPrint(ctl, " netcf");
|
vshPrint(ctl, " netcf");
|
||||||
@ -79,10 +79,10 @@ Index: libvirt-1.1.1/tools/virsh.c
|
|||||||
# elif defined(WITH_UDEV)
|
# elif defined(WITH_UDEV)
|
||||||
vshPrint(ctl, " udev");
|
vshPrint(ctl, " udev");
|
||||||
# endif
|
# endif
|
||||||
Index: libvirt-1.1.1/src/interface/interface_backend_netcf.c
|
Index: libvirt-1.1.2/src/interface/interface_backend_netcf.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/src/interface/interface_backend_netcf.c
|
--- libvirt-1.1.2.orig/src/interface/interface_backend_netcf.c
|
||||||
+++ libvirt-1.1.1/src/interface/interface_backend_netcf.c
|
+++ libvirt-1.1.2/src/interface/interface_backend_netcf.c
|
||||||
@@ -23,7 +23,12 @@
|
@@ -23,7 +23,12 @@
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
@ -147,10 +147,10 @@ Index: libvirt-1.1.1/src/interface/interface_backend_netcf.c
|
|||||||
/* open netcf */
|
/* open netcf */
|
||||||
if (ncf_init(&driverState->netcf, NULL) != 0)
|
if (ncf_init(&driverState->netcf, NULL) != 0)
|
||||||
{
|
{
|
||||||
Index: libvirt-1.1.1/src/interface/interface_driver.c
|
Index: libvirt-1.1.2/src/interface/interface_driver.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/src/interface/interface_driver.c
|
--- libvirt-1.1.2.orig/src/interface/interface_driver.c
|
||||||
+++ libvirt-1.1.1/src/interface/interface_driver.c
|
+++ libvirt-1.1.2/src/interface/interface_driver.c
|
||||||
@@ -28,8 +28,15 @@ interfaceRegister(void) {
|
@@ -28,8 +28,15 @@ interfaceRegister(void) {
|
||||||
if (netcfIfaceRegister() == 0)
|
if (netcfIfaceRegister() == 0)
|
||||||
return 0;
|
return 0;
|
||||||
@ -168,10 +168,10 @@ Index: libvirt-1.1.1/src/interface/interface_driver.c
|
|||||||
if (udevIfaceRegister() == 0)
|
if (udevIfaceRegister() == 0)
|
||||||
return 0;
|
return 0;
|
||||||
#endif /* WITH_UDEV */
|
#endif /* WITH_UDEV */
|
||||||
Index: libvirt-1.1.1/m4/virt-netcontrol.m4
|
Index: libvirt-1.1.2/m4/virt-netcontrol.m4
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ libvirt-1.1.1/m4/virt-netcontrol.m4
|
+++ libvirt-1.1.2/m4/virt-netcontrol.m4
|
||||||
@@ -0,0 +1,35 @@
|
@@ -0,0 +1,35 @@
|
||||||
+dnl The libnetcontrol library
|
+dnl The libnetcontrol library
|
||||||
+dnl
|
+dnl
|
||||||
|
@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 3 11:04:45 MDT 2013 - jfehlig@suse.com
|
||||||
|
|
||||||
|
- Update to libvirt 1.1.2
|
||||||
|
- various improvements to libxl driver
|
||||||
|
- systemd integration improvements
|
||||||
|
- Add flag to BaselineCPU API to return detailed CPU features
|
||||||
|
- Introduce a virt-login-shell binary
|
||||||
|
- conf: add startupPolicy attribute for harddisk
|
||||||
|
- Many incremental improvements and bug fixes, see
|
||||||
|
http://libvirt.org/news.html
|
||||||
|
- Drop upstream patches: bcef0f01-libxl-console.patch,
|
||||||
|
9d0557b9-legacy-xen-double-free.patch,
|
||||||
|
d7a45bf2-legacy-xen-dumpxml.patch, 0e671a16-CVE-2013-4239.patch
|
||||||
|
- Includes fixes for bnc#837530, bnc#837531, bnc#837999
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Aug 13 10:47:37 MDT 2013 - jfehlig@suse.com
|
Tue Aug 13 10:47:37 MDT 2013 - jfehlig@suse.com
|
||||||
|
|
||||||
|
23
libvirt.spec
23
libvirt.spec
@ -225,7 +225,7 @@
|
|||||||
|
|
||||||
Name: libvirt
|
Name: libvirt
|
||||||
Url: http://libvirt.org/
|
Url: http://libvirt.org/
|
||||||
Version: 1.1.1
|
Version: 1.1.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Library providing a simple virtualization API
|
Summary: Library providing a simple virtualization API
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
@ -404,10 +404,6 @@ Source1: libvirtd.init
|
|||||||
Source2: libvirtd-relocation-server.fw
|
Source2: libvirtd-relocation-server.fw
|
||||||
Source99: baselibs.conf
|
Source99: baselibs.conf
|
||||||
# Upstream patches
|
# Upstream patches
|
||||||
Patch0: bcef0f01-libxl-console.patch
|
|
||||||
Patch1: 9d0557b9-legacy-xen-double-free.patch
|
|
||||||
Patch2: d7a45bf2-legacy-xen-dumpxml.patch
|
|
||||||
Patch3: 0e671a16-CVE-2013-4239.patch
|
|
||||||
# Need to go upstream
|
# Need to go upstream
|
||||||
Patch100: xen-name-for-devid.patch
|
Patch100: xen-name-for-devid.patch
|
||||||
Patch101: clone.patch
|
Patch101: clone.patch
|
||||||
@ -906,10 +902,6 @@ of recent versions of Linux (and other OSes).
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch101
|
%patch101
|
||||||
%patch102 -p1
|
%patch102 -p1
|
||||||
@ -1369,11 +1361,14 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
%config(noreplace) %{_sysconfdir}/libvirt/libvirtd.conf
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd
|
||||||
|
%config(noreplace) %{_sysconfdir}/libvirt/virtlockd.conf
|
||||||
%dir %{_datadir}/augeas/
|
%dir %{_datadir}/augeas/
|
||||||
%dir %{_datadir}/augeas/lenses
|
%dir %{_datadir}/augeas/lenses
|
||||||
%dir %{_datadir}/augeas/lenses/tests
|
%dir %{_datadir}/augeas/lenses/tests
|
||||||
%{_datadir}/augeas/lenses/libvirtd.aug
|
%{_datadir}/augeas/lenses/libvirtd.aug
|
||||||
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
|
%{_datadir}/augeas/lenses/tests/test_libvirtd.aug
|
||||||
|
%{_datadir}/augeas/lenses/virtlockd.aug
|
||||||
|
%{_datadir}/augeas/lenses/tests/test_virtlockd.aug
|
||||||
%{_datadir}/augeas/lenses/libvirt_lockd.aug
|
%{_datadir}/augeas/lenses/libvirt_lockd.aug
|
||||||
%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
|
%{_datadir}/augeas/lenses/tests/test_libvirt_lockd.aug
|
||||||
%if %{with_dtrace}
|
%if %{with_dtrace}
|
||||||
@ -1401,6 +1396,8 @@ fi
|
|||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
|
%config(noreplace) %{_sysconfdir}/logrotate.d/libvirtd.qemu
|
||||||
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
|
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/
|
||||||
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
|
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/cache/libvirt/qemu/
|
||||||
|
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/
|
||||||
|
%dir %attr(0750, %{qemu_user}, %{qemu_group}) %{_localstatedir}/lib/libvirt/qemu/channel/target/
|
||||||
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
%dir %attr(0700, root, root) %{_localstatedir}/log/libvirt/qemu/
|
||||||
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
|
%{_datadir}/augeas/lenses/libvirtd_qemu.aug
|
||||||
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
|
%{_datadir}/augeas/lenses/tests/test_libvirtd_qemu.aug
|
||||||
@ -1428,6 +1425,7 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%attr(0755, root, root) %{_libdir}/%{name}/libvirt_iohelper
|
%attr(0755, root, root) %{_libdir}/%{name}/libvirt_iohelper
|
||||||
%doc %{_mandir}/man8/libvirtd.8*
|
%doc %{_mandir}/man8/libvirtd.8*
|
||||||
|
%{_mandir}/man8/virtlockd.8*
|
||||||
%if %{with_apparmor}
|
%if %{with_apparmor}
|
||||||
%dir %{_sysconfdir}/apparmor.d
|
%dir %{_sysconfdir}/apparmor.d
|
||||||
%dir %{_sysconfdir}/apparmor.d/abstractions
|
%dir %{_sysconfdir}/apparmor.d/abstractions
|
||||||
@ -1584,11 +1582,17 @@ fi
|
|||||||
%doc %{_mandir}/man1/virt-xml-validate.1*
|
%doc %{_mandir}/man1/virt-xml-validate.1*
|
||||||
%doc %{_mandir}/man1/virt-pki-validate.1*
|
%doc %{_mandir}/man1/virt-pki-validate.1*
|
||||||
%doc %{_mandir}/man1/virt-host-validate.1*
|
%doc %{_mandir}/man1/virt-host-validate.1*
|
||||||
|
%doc %{_mandir}/man1/virt-login-shell.1*
|
||||||
%config(noreplace) %{_sysconfdir}/%{name}/libvirt.conf
|
%config(noreplace) %{_sysconfdir}/%{name}/libvirt.conf
|
||||||
|
%config(noreplace) %{_sysconfdir}/libvirt/virt-login-shell.conf
|
||||||
%{_bindir}/virsh
|
%{_bindir}/virsh
|
||||||
%{_bindir}/virt-xml-validate
|
%{_bindir}/virt-xml-validate
|
||||||
%{_bindir}/virt-pki-validate
|
%{_bindir}/virt-pki-validate
|
||||||
%{_bindir}/virt-host-validate
|
%{_bindir}/virt-host-validate
|
||||||
|
# setuid binary that needs security audit - bnc#837609
|
||||||
|
# In the meantime, don't install setuid
|
||||||
|
#%attr(4755, root, root) %{_bindir}/virt-login-shell
|
||||||
|
%{_bindir}/virt-login-shell
|
||||||
%dir %{_libdir}/%{name}
|
%dir %{_libdir}/%{name}
|
||||||
%{_libdir}/lib*.so.*
|
%{_libdir}/lib*.so.*
|
||||||
%attr(0755, root, root) %{_libdir}/%{name}/libvirt-guests.sh
|
%attr(0755, root, root) %{_libdir}/%{name}/libvirt-guests.sh
|
||||||
@ -1676,7 +1680,6 @@ fi
|
|||||||
%{py_sitedir}/libvirt_qemu.py*
|
%{py_sitedir}/libvirt_qemu.py*
|
||||||
%{py_sitedir}/libvirt_lxc.py*
|
%{py_sitedir}/libvirt_lxc.py*
|
||||||
%{py_sitedir}/libvirtmod*
|
%{py_sitedir}/libvirtmod*
|
||||||
%doc python/tests/*.py
|
|
||||||
%doc examples/python
|
%doc examples/python
|
||||||
%doc examples/domain-events/events-python
|
%doc examples/domain-events/events-python
|
||||||
%endif
|
%endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: libvirt-1.1.1/daemon/libvirtd.conf
|
Index: libvirt-1.1.2/daemon/libvirtd.conf
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/daemon/libvirtd.conf
|
--- libvirt-1.1.2.orig/daemon/libvirtd.conf
|
||||||
+++ libvirt-1.1.1/daemon/libvirtd.conf
|
+++ libvirt-1.1.2/daemon/libvirtd.conf
|
||||||
@@ -18,8 +18,8 @@
|
@@ -18,8 +18,8 @@
|
||||||
# It is necessary to setup a CA and issue server certificates before
|
# It is necessary to setup a CA and issue server certificates before
|
||||||
# using this capability.
|
# using this capability.
|
||||||
@ -13,10 +13,10 @@ Index: libvirt-1.1.1/daemon/libvirtd.conf
|
|||||||
|
|
||||||
# Listen for unencrypted TCP connections on the public TCP/IP port.
|
# Listen for unencrypted TCP connections on the public TCP/IP port.
|
||||||
# NB, must pass the --listen flag to the libvirtd process for this to
|
# NB, must pass the --listen flag to the libvirtd process for this to
|
||||||
Index: libvirt-1.1.1/daemon/libvirtd-config.c
|
Index: libvirt-1.1.2/daemon/libvirtd-config.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/daemon/libvirtd-config.c
|
--- libvirt-1.1.2.orig/daemon/libvirtd-config.c
|
||||||
+++ libvirt-1.1.1/daemon/libvirtd-config.c
|
+++ libvirt-1.1.2/daemon/libvirtd-config.c
|
||||||
@@ -222,7 +222,7 @@ daemonConfigNew(bool privileged ATTRIBUT
|
@@ -222,7 +222,7 @@ daemonConfigNew(bool privileged ATTRIBUT
|
||||||
if (VIR_ALLOC(data) < 0)
|
if (VIR_ALLOC(data) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Adjust libvirtd sysconfig file to conform to SUSE standards
|
Adjust libvirtd sysconfig file to conform to SUSE standards
|
||||||
|
|
||||||
Index: libvirt-1.1.1/daemon/libvirtd.sysconf
|
Index: libvirt-1.1.2/daemon/libvirtd.sysconf
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/daemon/libvirtd.sysconf
|
--- libvirt-1.1.2.orig/daemon/libvirtd.sysconf
|
||||||
+++ libvirt-1.1.1/daemon/libvirtd.sysconf
|
+++ libvirt-1.1.2/daemon/libvirtd.sysconf
|
||||||
@@ -1,16 +1,25 @@
|
@@ -1,16 +1,25 @@
|
||||||
+## Path: System/Virtualization/libvirt
|
+## Path: System/Virtualization/libvirt
|
||||||
+
|
+
|
||||||
|
@ -8,10 +8,10 @@ Subject: [PATCH] support managed pci devices in xen driver
|
|||||||
src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++-
|
src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++-
|
||||||
2 files changed, 35 insertions(+), 15 deletions(-)
|
2 files changed, 35 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
Index: libvirt-1.1.1/src/xenxs/xen_sxpr.c
|
Index: libvirt-1.1.2/src/xenxs/xen_sxpr.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/src/xenxs/xen_sxpr.c
|
--- libvirt-1.1.2.orig/src/xenxs/xen_sxpr.c
|
||||||
+++ libvirt-1.1.1/src/xenxs/xen_sxpr.c
|
+++ libvirt-1.1.2/src/xenxs/xen_sxpr.c
|
||||||
@@ -993,6 +993,7 @@ xenParseSxprPCI(virDomainDefPtr def,
|
@@ -993,6 +993,7 @@ xenParseSxprPCI(virDomainDefPtr def,
|
||||||
int busID;
|
int busID;
|
||||||
int slotID;
|
int slotID;
|
||||||
@ -35,7 +35,7 @@ Index: libvirt-1.1.1/src/xenxs/xen_sxpr.c
|
|||||||
dev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI;
|
dev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI;
|
||||||
dev->source.subsys.u.pci.addr.domain = domainID;
|
dev->source.subsys.u.pci.addr.domain = domainID;
|
||||||
dev->source.subsys.u.pci.addr.bus = busID;
|
dev->source.subsys.u.pci.addr.bus = busID;
|
||||||
@@ -1993,11 +1996,15 @@ static void
|
@@ -1990,11 +1993,15 @@ static void
|
||||||
xenFormatSxprPCI(virDomainHostdevDefPtr def,
|
xenFormatSxprPCI(virDomainHostdevDefPtr def,
|
||||||
virBufferPtr buf)
|
virBufferPtr buf)
|
||||||
{
|
{
|
||||||
@ -52,7 +52,7 @@ Index: libvirt-1.1.1/src/xenxs/xen_sxpr.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2016,12 +2023,6 @@ xenFormatSxprOnePCI(virDomainHostdevDefP
|
@@ -2013,12 +2020,6 @@ xenFormatSxprOnePCI(virDomainHostdevDefP
|
||||||
virBufferPtr buf,
|
virBufferPtr buf,
|
||||||
int detach)
|
int detach)
|
||||||
{
|
{
|
||||||
@ -65,7 +65,7 @@ Index: libvirt-1.1.1/src/xenxs/xen_sxpr.c
|
|||||||
virBufferAddLit(buf, "(pci ");
|
virBufferAddLit(buf, "(pci ");
|
||||||
xenFormatSxprPCI(def, buf);
|
xenFormatSxprPCI(def, buf);
|
||||||
if (detach)
|
if (detach)
|
||||||
@@ -2076,12 +2077,6 @@ xenFormatSxprAllPCI(virDomainDefPtr def,
|
@@ -2073,12 +2074,6 @@ xenFormatSxprAllPCI(virDomainDefPtr def,
|
||||||
for (i = 0; i < def->nhostdevs; i++) {
|
for (i = 0; i < def->nhostdevs; i++) {
|
||||||
if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
|
if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
|
||||||
def->hostdevs[i]->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {
|
def->hostdevs[i]->source.subsys.type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI) {
|
||||||
@ -78,10 +78,10 @@ Index: libvirt-1.1.1/src/xenxs/xen_sxpr.c
|
|||||||
xenFormatSxprPCI(def->hostdevs[i], buf);
|
xenFormatSxprPCI(def->hostdevs[i], buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Index: libvirt-1.1.1/src/xenxs/xen_xm.c
|
Index: libvirt-1.1.2/src/xenxs/xen_xm.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/src/xenxs/xen_xm.c
|
--- libvirt-1.1.2.orig/src/xenxs/xen_xm.c
|
||||||
+++ libvirt-1.1.1/src/xenxs/xen_xm.c
|
+++ libvirt-1.1.2/src/xenxs/xen_xm.c
|
||||||
@@ -802,6 +802,8 @@ xenParseXM(virConfPtr conf, int xendConf
|
@@ -802,6 +802,8 @@ xenParseXM(virConfPtr conf, int xendConf
|
||||||
int busID;
|
int busID;
|
||||||
int slotID;
|
int slotID;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: libvirt-1.1.1/src/qemu/qemu.conf
|
Index: libvirt-1.1.2/src/qemu/qemu.conf
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/src/qemu/qemu.conf
|
--- libvirt-1.1.2.orig/src/qemu/qemu.conf
|
||||||
+++ libvirt-1.1.1/src/qemu/qemu.conf
|
+++ libvirt-1.1.2/src/qemu/qemu.conf
|
||||||
@@ -175,7 +175,16 @@
|
@@ -175,7 +175,16 @@
|
||||||
# a special value; security_driver can be set to that value in
|
# a special value; security_driver can be set to that value in
|
||||||
# isolation, but it cannot appear in a list of drivers.
|
# isolation, but it cannot appear in a list of drivers.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: libvirt-1.1.1/daemon/libvirtd.service.in
|
Index: libvirt-1.1.2/daemon/libvirtd.service.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/daemon/libvirtd.service.in
|
--- libvirt-1.1.2.orig/daemon/libvirtd.service.in
|
||||||
+++ libvirt-1.1.1/daemon/libvirtd.service.in
|
+++ libvirt-1.1.2/daemon/libvirtd.service.in
|
||||||
@@ -9,6 +9,8 @@ Before=libvirt-guests.service
|
@@ -9,6 +9,8 @@ Before=libvirt-guests.service
|
||||||
After=network.target
|
After=network.target
|
||||||
After=dbus.service
|
After=dbus.service
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Adjust virtlockd init files to conform to SUSE standards
|
Adjust virtlockd init files to conform to SUSE standards
|
||||||
|
|
||||||
Index: libvirt-1.1.1/src/locking/virtlockd.sysconf
|
Index: libvirt-1.1.2/src/locking/virtlockd.sysconf
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/src/locking/virtlockd.sysconf
|
--- libvirt-1.1.2.orig/src/locking/virtlockd.sysconf
|
||||||
+++ libvirt-1.1.1/src/locking/virtlockd.sysconf
|
+++ libvirt-1.1.2/src/locking/virtlockd.sysconf
|
||||||
@@ -1,3 +1,7 @@
|
@@ -1,3 +1,7 @@
|
||||||
+## Path: System/Virtualization/virtlockd
|
+## Path: System/Virtualization/virtlockd
|
||||||
+
|
+
|
||||||
@ -12,10 +12,10 @@ Index: libvirt-1.1.1/src/locking/virtlockd.sysconf
|
|||||||
#
|
#
|
||||||
# Pass extra arguments to virtlockd
|
# Pass extra arguments to virtlockd
|
||||||
#VIRTLOCKD_ARGS=
|
#VIRTLOCKD_ARGS=
|
||||||
Index: libvirt-1.1.1/src/locking/virtlockd.init.in
|
Index: libvirt-1.1.2/src/locking/virtlockd.init.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/src/locking/virtlockd.init.in
|
--- libvirt-1.1.2.orig/src/locking/virtlockd.init.in
|
||||||
+++ libvirt-1.1.1/src/locking/virtlockd.init.in
|
+++ libvirt-1.1.2/src/locking/virtlockd.init.in
|
||||||
@@ -4,11 +4,13 @@
|
@@ -4,11 +4,13 @@
|
||||||
# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV
|
# http://www.linux-foundation.org/spec//booksets/LSB-Core-generic/LSB-Core-generic.html#INITSCRCOMCONV
|
||||||
#
|
#
|
||||||
@ -34,7 +34,7 @@ Index: libvirt-1.1.1/src/locking/virtlockd.init.in
|
|||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# the following is chkconfig init header
|
# the following is chkconfig init header
|
||||||
@@ -23,35 +25,39 @@
|
@@ -23,35 +25,31 @@
|
||||||
# pidfile: @localstatedir@/run/libvirt/virtlockd.pid
|
# pidfile: @localstatedir@/run/libvirt/virtlockd.pid
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -53,12 +53,7 @@ Index: libvirt-1.1.1/src/locking/virtlockd.init.in
|
|||||||
test -f @sysconfdir@/sysconfig/virtlockd && . @sysconfdir@/sysconfig/virtlockd
|
test -f @sysconfdir@/sysconfig/virtlockd && . @sysconfdir@/sysconfig/virtlockd
|
||||||
|
|
||||||
-RETVAL=0
|
-RETVAL=0
|
||||||
+if [ -d @localstatedir@/lock/subsys ]; then
|
-
|
||||||
+ VAR_SUBSYS_VIRTLOCKD=@localstatedir@/lock/subsys/$SERVICE
|
|
||||||
+else
|
|
||||||
+ VAR_SUBSYS_VIRTLOCKD=@localstatedir@/lock/$SERVICE
|
|
||||||
+fi
|
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
- echo -n $"Starting $SERVICE daemon: "
|
- echo -n $"Starting $SERVICE daemon: "
|
||||||
- daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $VIRTLOCKD_ARGS
|
- daemon --pidfile $PIDFILE --check $SERVICE $PROCESS --daemon $VIRTLOCKD_ARGS
|
||||||
@ -68,7 +63,6 @@ Index: libvirt-1.1.1/src/locking/virtlockd.init.in
|
|||||||
- echo
|
- echo
|
||||||
- [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$SERVICE
|
- [ $RETVAL -eq 0 ] && touch @localstatedir@/lock/subsys/$SERVICE
|
||||||
+ rc_status -v
|
+ rc_status -v
|
||||||
+ [ $RETVAL -eq 0 ] && touch $VAR_SUBSYS_VIRTLOCKD
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
@ -82,11 +76,10 @@ Index: libvirt-1.1.1/src/locking/virtlockd.init.in
|
|||||||
+ rc_status -v
|
+ rc_status -v
|
||||||
if [ $RETVAL -eq 0 ]; then
|
if [ $RETVAL -eq 0 ]; then
|
||||||
- rm -f @localstatedir@/lock/subsys/$SERVICE
|
- rm -f @localstatedir@/lock/subsys/$SERVICE
|
||||||
+ rm -f $VAR_SUBSYS_VIRTLOCKD
|
|
||||||
rm -f $PIDFILE
|
rm -f $PIDFILE
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -65,9 +71,7 @@ reload() {
|
@@ -65,9 +63,7 @@ reload() {
|
||||||
echo -n $"Reloading $SERVICE configuration: "
|
echo -n $"Reloading $SERVICE configuration: "
|
||||||
|
|
||||||
killproc -p $PIDFILE $PROCESS -HUP
|
killproc -p $PIDFILE $PROCESS -HUP
|
||||||
@ -97,7 +90,7 @@ Index: libvirt-1.1.1/src/locking/virtlockd.init.in
|
|||||||
}
|
}
|
||||||
|
|
||||||
# See how we were called.
|
# See how we were called.
|
||||||
@@ -76,18 +80,20 @@ case "$1" in
|
@@ -76,18 +72,20 @@ case "$1" in
|
||||||
$1
|
$1
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
@ -112,7 +105,7 @@ Index: libvirt-1.1.1/src/locking/virtlockd.init.in
|
|||||||
;;
|
;;
|
||||||
condrestart|try-restart)
|
condrestart|try-restart)
|
||||||
- [ -f @localstatedir@/lock/subsys/$SERVICE ] && restart || :
|
- [ -f @localstatedir@/lock/subsys/$SERVICE ] && restart || :
|
||||||
+ [ -f $VAR_SUBSYS_VIRTLOCKD ] && restart || :
|
+ status >/dev/null && restart || :
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload|try-restart}"
|
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|force-reload|try-restart}"
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
is inactive. We obviously can't search xenstore when the domain is
|
is inactive. We obviously can't search xenstore when the domain is
|
||||||
inactive.
|
inactive.
|
||||||
|
|
||||||
Index: libvirt-1.1.1/src/xen/xend_internal.c
|
Index: libvirt-1.1.2/src/xen/xend_internal.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/src/xen/xend_internal.c
|
--- libvirt-1.1.2.orig/src/xen/xend_internal.c
|
||||||
+++ libvirt-1.1.1/src/xen/xend_internal.c
|
+++ libvirt-1.1.2/src/xen/xend_internal.c
|
||||||
@@ -70,7 +70,7 @@
|
@@ -70,7 +70,7 @@
|
||||||
#define XEND_RCV_BUF_MAX_LEN (256 * 1024)
|
#define XEND_RCV_BUF_MAX_LEN (256 * 1024)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: libvirt-1.1.1/src/xenxs/xen_sxpr.c
|
Index: libvirt-1.1.2/src/xenxs/xen_sxpr.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-1.1.1.orig/src/xenxs/xen_sxpr.c
|
--- libvirt-1.1.2.orig/src/xenxs/xen_sxpr.c
|
||||||
+++ libvirt-1.1.1/src/xenxs/xen_sxpr.c
|
+++ libvirt-1.1.2/src/xenxs/xen_sxpr.c
|
||||||
@@ -327,7 +327,7 @@ error:
|
@@ -327,7 +327,7 @@ error:
|
||||||
static int
|
static int
|
||||||
xenParseSxprDisks(virDomainDefPtr def,
|
xenParseSxprDisks(virDomainDefPtr def,
|
||||||
|
Loading…
Reference in New Issue
Block a user