Accepting request 476768 from Virtualization
1 OBS-URL: https://build.opensuse.org/request/show/476768 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=223
This commit is contained in:
commit
4a95c68586
@ -1,27 +0,0 @@
|
||||
commit 2dc1cf19dbaf648662fbf3c810db65ddcf5d0444
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Wed Feb 15 10:45:27 2017 -0700
|
||||
|
||||
libxl: fix potential double free in libxlDriverGetDom0MaxmemConf
|
||||
|
||||
Commit 4ab0c959 fixed a memory leak in libxlDriverGetDom0MaxmemConf
|
||||
but introduced a potential double free of mem_tokens
|
||||
|
||||
*** Error in `/usr/sbin/libvirtd': double free or corruption (out):
|
||||
0x00007fffc808cfd0 ***
|
||||
|
||||
Avoid double free by setting mem_tokens to NULL after calling
|
||||
virStringListFree.
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
@@ -1623,6 +1623,7 @@ libxlDriverGetDom0MaxmemConf(libxlDriver
|
||||
}
|
||||
}
|
||||
virStringListFree(mem_tokens);
|
||||
+ mem_tokens = NULL;
|
||||
}
|
||||
|
||||
physmem:
|
@ -1,99 +0,0 @@
|
||||
commit 321a28c6aef6fb31b4ba309a1b3d252f7cd0f05c
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Tue Feb 7 11:00:33 2017 -0700
|
||||
|
||||
libxl: set default disk format in device post-parse
|
||||
|
||||
When starting a domian, a libxl_domain_config object is created from
|
||||
virDomainDef. Any virDomainDiskDef devices with a format of
|
||||
VIR_STORAGE_FILE_NONE are mapped to LIBXL_DISK_FORMAT_RAW in the
|
||||
corresponding libxl_disk_device, but the virDomainDiskDef format is
|
||||
never updated to reflect the change.
|
||||
|
||||
A better place to set a default format for disk devices is the
|
||||
device post-parse callback, ensuring the virDomainDiskDef object
|
||||
reflects the default format.
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
@@ -765,8 +765,6 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
|
||||
x_disk->format = LIBXL_DISK_FORMAT_VHD;
|
||||
x_disk->backend = LIBXL_DISK_BACKEND_TAP;
|
||||
break;
|
||||
- case VIR_STORAGE_FILE_NONE:
|
||||
- /* No subtype specified, default to raw/tap */
|
||||
case VIR_STORAGE_FILE_RAW:
|
||||
x_disk->format = LIBXL_DISK_FORMAT_RAW;
|
||||
x_disk->backend = LIBXL_DISK_BACKEND_TAP;
|
||||
@@ -802,8 +800,6 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
|
||||
case VIR_STORAGE_FILE_VHD:
|
||||
x_disk->format = LIBXL_DISK_FORMAT_VHD;
|
||||
break;
|
||||
- case VIR_STORAGE_FILE_NONE:
|
||||
- /* No subtype specified, default to raw */
|
||||
case VIR_STORAGE_FILE_RAW:
|
||||
x_disk->format = LIBXL_DISK_FORMAT_RAW;
|
||||
break;
|
||||
@@ -816,8 +812,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
|
||||
return -1;
|
||||
}
|
||||
} else if (STREQ(driver, "file")) {
|
||||
- if (format != VIR_STORAGE_FILE_NONE &&
|
||||
- format != VIR_STORAGE_FILE_RAW) {
|
||||
+ if (format != VIR_STORAGE_FILE_RAW) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("libxenlight does not support disk format %s "
|
||||
"with disk driver %s"),
|
||||
@@ -828,8 +823,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
|
||||
x_disk->format = LIBXL_DISK_FORMAT_RAW;
|
||||
x_disk->backend = LIBXL_DISK_BACKEND_QDISK;
|
||||
} else if (STREQ(driver, "phy")) {
|
||||
- if (format != VIR_STORAGE_FILE_NONE &&
|
||||
- format != VIR_STORAGE_FILE_RAW) {
|
||||
+ if (format != VIR_STORAGE_FILE_RAW) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("libxenlight does not support disk format %s "
|
||||
"with disk driver %s"),
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_domain.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_domain.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_domain.c
|
||||
@@ -362,16 +362,21 @@ libxlDomainDeviceDefPostParse(virDomainD
|
||||
}
|
||||
}
|
||||
|
||||
- /* for network-based disks, set 'qemu' as the default driver */
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
|
||||
virDomainDiskDefPtr disk = dev->data.disk;
|
||||
int actual_type = virStorageSourceGetActualType(disk->src);
|
||||
+ int format = virDomainDiskGetFormat(disk);
|
||||
|
||||
+ /* for network-based disks, set 'qemu' as the default driver */
|
||||
if (actual_type == VIR_STORAGE_TYPE_NETWORK) {
|
||||
if (!virDomainDiskGetDriver(disk) &&
|
||||
virDomainDiskSetDriver(disk, "qemu") < 0)
|
||||
return -1;
|
||||
}
|
||||
+
|
||||
+ /* xl.cfg default format is raw. See xl-disk-configuration(5) */
|
||||
+ if (format == VIR_STORAGE_FILE_NONE)
|
||||
+ virDomainDiskSetFormat(disk, VIR_STORAGE_FILE_RAW);
|
||||
}
|
||||
|
||||
return 0;
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
@@ -5466,8 +5466,7 @@ libxlDomainBlockStatsGatherSingle(virDom
|
||||
disk_drv = "qemu";
|
||||
|
||||
if (STREQ(disk_drv, "phy")) {
|
||||
- if (disk_fmt != VIR_STORAGE_FILE_RAW &&
|
||||
- disk_fmt != VIR_STORAGE_FILE_NONE) {
|
||||
+ if (disk_fmt != VIR_STORAGE_FILE_RAW) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
|
||||
_("unsupported format %s"),
|
||||
virStorageFileFormatTypeToString(disk_fmt));
|
@ -1,25 +0,0 @@
|
||||
commit 4ab0c959e936de7fa2752160ff532913740d4da9
|
||||
Author: John Ferlan <jferlan@redhat.com>
|
||||
Date: Fri Feb 10 06:54:56 2017 -0500
|
||||
|
||||
libxl: Resolve possible resource leak in dom0 maximum memory setting
|
||||
|
||||
If either the "if (STRPREFIX(mem_tokens[j], "max:"))" is never entered
|
||||
or the "if (virStrToLong_ull(mem_tokens[j] + 4, &p, 10, maxmem) < 0)" break
|
||||
is hit, control goes back to the outer loop processing 'cmd_tokens' and
|
||||
it's possible that the 'mem_tokens' would be overwritten.
|
||||
|
||||
Found by Coverity
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
@@ -1622,6 +1622,7 @@ libxlDriverGetDom0MaxmemConf(libxlDriver
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
+ virStringListFree(mem_tokens);
|
||||
}
|
||||
|
||||
physmem:
|
@ -1,81 +0,0 @@
|
||||
commit 6e4759d0695429e36765f3e1c516939a369799f2
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Mon Jan 16 15:37:40 2017 -0700
|
||||
|
||||
libxl: fix timer configuration
|
||||
|
||||
The current logic around configuring timers in libxl based on
|
||||
virDomainDef object is a bit brain dead. Unsupported timers are
|
||||
silently ignored and tsc is only recognized if it is the first
|
||||
timer specified.
|
||||
|
||||
Change the logic to reject unsupported timers and honor the tsc
|
||||
timer regardless of its order when multiple timers are specified.
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
@@ -313,9 +313,10 @@ libxlMakeDomBuildInfo(virDomainDefPtr de
|
||||
for (i = 0; i < virDomainDefGetVcpus(def); i++)
|
||||
libxl_bitmap_set((&b_info->avail_vcpus), i);
|
||||
|
||||
- if (def->clock.ntimers > 0 &&
|
||||
- def->clock.timers[0]->name == VIR_DOMAIN_TIMER_NAME_TSC) {
|
||||
- switch (def->clock.timers[0]->mode) {
|
||||
+ for (i = 0; i < def->clock.ntimers; i++) {
|
||||
+ switch ((virDomainTimerNameType) def->clock.timers[i]->name) {
|
||||
+ case VIR_DOMAIN_TIMER_NAME_TSC:
|
||||
+ switch (def->clock.timers[i]->mode) {
|
||||
case VIR_DOMAIN_TIMER_MODE_NATIVE:
|
||||
b_info->tsc_mode = 2;
|
||||
break;
|
||||
@@ -324,8 +325,35 @@ libxlMakeDomBuildInfo(virDomainDefPtr de
|
||||
break;
|
||||
default:
|
||||
b_info->tsc_mode = 1;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_DOMAIN_TIMER_NAME_HPET:
|
||||
+ if (!hvm) {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
+ _("unsupported timer type (name) '%s'"),
|
||||
+ virDomainTimerNameTypeToString(def->clock.timers[i]->name));
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (def->clock.timers[i]->present == 1)
|
||||
+ libxl_defbool_set(&b_info->u.hvm.hpet, 1);
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_DOMAIN_TIMER_NAME_PLATFORM:
|
||||
+ case VIR_DOMAIN_TIMER_NAME_KVMCLOCK:
|
||||
+ case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK:
|
||||
+ case VIR_DOMAIN_TIMER_NAME_RTC:
|
||||
+ case VIR_DOMAIN_TIMER_NAME_PIT:
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
+ _("unsupported timer type (name) '%s'"),
|
||||
+ virDomainTimerNameTypeToString(def->clock.timers[i]->name));
|
||||
+ return -1;
|
||||
+
|
||||
+ case VIR_DOMAIN_TIMER_NAME_LAST:
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
+
|
||||
b_info->sched_params.weight = 1000;
|
||||
b_info->max_memkb = virDomainDefGetMemoryInitial(def);
|
||||
b_info->target_memkb = def->mem.cur_balloon;
|
||||
@@ -341,12 +369,6 @@ libxlMakeDomBuildInfo(virDomainDefPtr de
|
||||
libxl_defbool_set(&b_info->u.hvm.acpi,
|
||||
def->features[VIR_DOMAIN_FEATURE_ACPI] ==
|
||||
VIR_TRISTATE_SWITCH_ON);
|
||||
- for (i = 0; i < def->clock.ntimers; i++) {
|
||||
- if (def->clock.timers[i]->name == VIR_DOMAIN_TIMER_NAME_HPET &&
|
||||
- def->clock.timers[i]->present == 1) {
|
||||
- libxl_defbool_set(&b_info->u.hvm.hpet, 1);
|
||||
- }
|
||||
- }
|
||||
|
||||
if (def->nsounds > 0) {
|
||||
/*
|
@ -1,159 +0,0 @@
|
||||
commit 79692c387497a0b67f65b0293291d1137461985f
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Tue Jan 31 17:10:34 2017 -0700
|
||||
|
||||
libxl: fix dom0 maximum memory setting
|
||||
|
||||
When the libxl driver is initialized, it creates a virDomainDef
|
||||
object for dom0 and adds it to the list of domains. Total memory
|
||||
for dom0 was being set from the max_memkb field of libxl_dominfo
|
||||
struct retrieved from libxl, but this field can be set to
|
||||
LIBXL_MEMKB_DEFAULT (~0ULL) if dom0 maximum memory has not been
|
||||
explicitly set by the user.
|
||||
|
||||
This patch adds some simple parsing of the Xen commandline,
|
||||
looking for a dom0_mem parameter that also specifies a 'max' value.
|
||||
If not specified, dom0 maximum memory is effectively all physical
|
||||
host memory.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "internal.h"
|
||||
#include "virlog.h"
|
||||
#include "virerror.h"
|
||||
+#include "c-ctype.h"
|
||||
#include "datatypes.h"
|
||||
#include "virconf.h"
|
||||
#include "virfile.h"
|
||||
@@ -1559,6 +1560,88 @@ int libxlDriverConfigLoadFile(libxlDrive
|
||||
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * dom0's maximum memory can be controled by the user with the 'dom0_mem' Xen
|
||||
+ * command line parameter. E.g. to set dom0's initial memory to 4G and max
|
||||
+ * memory to 8G: dom0_mem=4G,max:8G
|
||||
+ * Supported unit suffixes are [bBkKmMgGtT]. If not specified the default
|
||||
+ * unit is kilobytes.
|
||||
+ *
|
||||
+ * If not constrained by the user, dom0 can effectively use all host memory.
|
||||
+ * This function returns the configured maximum memory for dom0 in kilobytes,
|
||||
+ * either the user-specified value or total physical memory as a default.
|
||||
+ */
|
||||
+int
|
||||
+libxlDriverGetDom0MaxmemConf(libxlDriverConfigPtr cfg,
|
||||
+ unsigned long long *maxmem)
|
||||
+{
|
||||
+ char **cmd_tokens = NULL;
|
||||
+ char **mem_tokens = NULL;
|
||||
+ size_t i;
|
||||
+ size_t j;
|
||||
+ libxl_physinfo physinfo;
|
||||
+ int ret = -1;
|
||||
+
|
||||
+ if (cfg->verInfo->commandline == NULL ||
|
||||
+ !(cmd_tokens = virStringSplit(cfg->verInfo->commandline, " ", 0)))
|
||||
+ goto physmem;
|
||||
+
|
||||
+ for (i = 0; cmd_tokens[i] != NULL; i++) {
|
||||
+ if (!STRPREFIX(cmd_tokens[i], "dom0_mem="))
|
||||
+ continue;
|
||||
+
|
||||
+ if (!(mem_tokens = virStringSplit(cmd_tokens[i], ",", 0)))
|
||||
+ break;
|
||||
+ for (j = 0; mem_tokens[j] != NULL; j++) {
|
||||
+ if (STRPREFIX(mem_tokens[j], "max:")) {
|
||||
+ char *p = mem_tokens[j] + 4;
|
||||
+ unsigned long long multiplier = 1;
|
||||
+
|
||||
+ while (c_isdigit(*p))
|
||||
+ p++;
|
||||
+ if (virStrToLong_ull(mem_tokens[j] + 4, &p, 10, maxmem) < 0)
|
||||
+ break;
|
||||
+ if (*p) {
|
||||
+ switch (*p) {
|
||||
+ case 'm':
|
||||
+ case 'M':
|
||||
+ multiplier = 1024;
|
||||
+ break;
|
||||
+ case 'g':
|
||||
+ case 'G':
|
||||
+ multiplier = 1024 * 1024;
|
||||
+ break;
|
||||
+ case 't':
|
||||
+ case 'T':
|
||||
+ multiplier = 1024 * 1024 * 1024;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ *maxmem = *maxmem * multiplier;
|
||||
+ ret = 0;
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ physmem:
|
||||
+ /* No 'max' specified in dom0_mem, so dom0 can use all physical memory */
|
||||
+ libxl_physinfo_init(&physinfo);
|
||||
+ if (libxl_get_physinfo(cfg->ctx, &physinfo)) {
|
||||
+ VIR_WARN("libxl_get_physinfo failed");
|
||||
+ goto cleanup;
|
||||
+ }
|
||||
+ *maxmem = (physinfo.total_pages * cfg->verInfo->pagesize) / 1024;
|
||||
+ libxl_physinfo_dispose(&physinfo);
|
||||
+ ret = 0;
|
||||
+
|
||||
+ cleanup:
|
||||
+ virStringListFree(cmd_tokens);
|
||||
+ virStringListFree(mem_tokens);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+
|
||||
#ifdef LIBXL_HAVE_DEVICE_CHANNEL
|
||||
static int
|
||||
libxlPrepareChannel(virDomainChrDefPtr channel,
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.h
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.h
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.h
|
||||
@@ -174,6 +174,10 @@ int libxlDriverConfigLoadFile(libxlDrive
|
||||
const char *filename);
|
||||
|
||||
int
|
||||
+libxlDriverGetDom0MaxmemConf(libxlDriverConfigPtr cfg,
|
||||
+ unsigned long long *maxmem);
|
||||
+
|
||||
+int
|
||||
libxlMakeDisk(virDomainDiskDefPtr l_dev, libxl_device_disk *x_dev);
|
||||
|
||||
void
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
@@ -576,6 +576,7 @@ libxlAddDom0(libxlDriverPrivatePtr drive
|
||||
virDomainObjPtr vm = NULL;
|
||||
virDomainDefPtr oldDef = NULL;
|
||||
libxl_dominfo d_info;
|
||||
+ unsigned long long maxmem;
|
||||
int ret = -1;
|
||||
|
||||
libxl_dominfo_init(&d_info);
|
||||
@@ -615,7 +616,9 @@ libxlAddDom0(libxlDriverPrivatePtr drive
|
||||
if (virDomainDefSetVcpus(vm->def, d_info.vcpu_online) < 0)
|
||||
goto cleanup;
|
||||
vm->def->mem.cur_balloon = d_info.current_memkb;
|
||||
- virDomainDefSetMemoryTotal(vm->def, d_info.max_memkb);
|
||||
+ if (libxlDriverGetDom0MaxmemConf(cfg, &maxmem) < 0)
|
||||
+ maxmem = d_info.current_memkb;
|
||||
+ virDomainDefSetMemoryTotal(vm->def, maxmem);
|
||||
|
||||
ret = 0;
|
||||
|
@ -1,33 +0,0 @@
|
||||
commit 87df87e06b57dedd39906cd46166842179732668
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Thu Jan 19 16:21:34 2017 -0700
|
||||
|
||||
libxl: support emulate mode of tsc timer
|
||||
|
||||
While at it, use members of libxl_tsc_mode enum instead of literal
|
||||
int values.
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
@@ -318,13 +318,16 @@ libxlMakeDomBuildInfo(virDomainDefPtr de
|
||||
case VIR_DOMAIN_TIMER_NAME_TSC:
|
||||
switch (def->clock.timers[i]->mode) {
|
||||
case VIR_DOMAIN_TIMER_MODE_NATIVE:
|
||||
- b_info->tsc_mode = 2;
|
||||
+ b_info->tsc_mode = LIBXL_TSC_MODE_NATIVE;
|
||||
break;
|
||||
case VIR_DOMAIN_TIMER_MODE_PARAVIRT:
|
||||
- b_info->tsc_mode = 3;
|
||||
+ b_info->tsc_mode = LIBXL_TSC_MODE_NATIVE_PARAVIRT;
|
||||
+ break;
|
||||
+ case VIR_DOMAIN_TIMER_MODE_EMULATE:
|
||||
+ b_info->tsc_mode = LIBXL_TSC_MODE_ALWAYS_EMULATE;
|
||||
break;
|
||||
default:
|
||||
- b_info->tsc_mode = 1;
|
||||
+ b_info->tsc_mode = LIBXL_TSC_MODE_DEFAULT;
|
||||
}
|
||||
break;
|
||||
|
@ -1,167 +0,0 @@
|
||||
commit 8f6a7866102346691fce84ade9a6d8534aaffcdc
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Thu Feb 2 19:26:13 2017 -0700
|
||||
|
||||
apparmor: don't fail on non-apparmor <seclabel>
|
||||
|
||||
If the apparmor security driver is loaded/enabled and domain config
|
||||
contains a <seclabel> element whose type attribute is not 'apparmor',
|
||||
starting the domain fails when attempting to label resources such
|
||||
as tap FDs.
|
||||
|
||||
Many of the apparmor driver entry points attempt to retrieve the
|
||||
apparmor security label from the domain def, returning failure if
|
||||
not found. Functions such as AppArmorSetFDLabel fail even though
|
||||
domain config contains an explicit 'none' secuirty driver, e.g.
|
||||
|
||||
<seclabel type='none' model='none'/>
|
||||
|
||||
Change the entry points to succeed if the domain config <seclabel>
|
||||
is not apparmor. This matches the behavior of the selinux driver.
|
||||
|
||||
Index: libvirt-3.0.0/src/security/security_apparmor.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/security/security_apparmor.c
|
||||
+++ libvirt-3.0.0/src/security/security_apparmor.c
|
||||
@@ -289,10 +289,7 @@ reload_profile(virSecurityManagerPtr mgr
|
||||
virSecurityLabelDefPtr secdef = virDomainDefGetSecurityLabelDef(
|
||||
def, SECURITY_APPARMOR_NAME);
|
||||
|
||||
- if (!secdef)
|
||||
- return rc;
|
||||
-
|
||||
- if (!secdef->relabel)
|
||||
+ if (!secdef || !secdef->relabel)
|
||||
return 0;
|
||||
|
||||
if ((profile_name = get_profile_name(def)) == NULL)
|
||||
@@ -435,7 +432,7 @@ AppArmorGenSecurityLabel(virSecurityMana
|
||||
SECURITY_APPARMOR_NAME);
|
||||
|
||||
if (!secdef)
|
||||
- return -1;
|
||||
+ return 0;
|
||||
|
||||
if ((secdef->type == VIR_DOMAIN_SECLABEL_STATIC) ||
|
||||
(secdef->type == VIR_DOMAIN_SECLABEL_NONE))
|
||||
@@ -495,10 +492,7 @@ AppArmorSetSecurityAllLabel(virSecurityM
|
||||
{
|
||||
virSecurityLabelDefPtr secdef = virDomainDefGetSecurityLabelDef(def,
|
||||
SECURITY_APPARMOR_NAME);
|
||||
- if (!secdef)
|
||||
- return -1;
|
||||
-
|
||||
- if (!secdef->relabel)
|
||||
+ if (!secdef || !secdef->relabel)
|
||||
return 0;
|
||||
|
||||
/* Reload the profile if stdin_path is specified. Note that
|
||||
@@ -559,12 +553,11 @@ AppArmorReleaseSecurityLabel(virSecurity
|
||||
{
|
||||
virSecurityLabelDefPtr secdef = virDomainDefGetSecurityLabelDef(def,
|
||||
SECURITY_APPARMOR_NAME);
|
||||
- if (!secdef)
|
||||
- return -1;
|
||||
-
|
||||
- VIR_FREE(secdef->model);
|
||||
- VIR_FREE(secdef->label);
|
||||
- VIR_FREE(secdef->imagelabel);
|
||||
+ if (secdef) {
|
||||
+ VIR_FREE(secdef->model);
|
||||
+ VIR_FREE(secdef->label);
|
||||
+ VIR_FREE(secdef->imagelabel);
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -580,7 +573,7 @@ AppArmorRestoreSecurityAllLabel(virSecur
|
||||
virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME);
|
||||
|
||||
if (!secdef)
|
||||
- return -1;
|
||||
+ return 0;
|
||||
|
||||
if (secdef->type == VIR_DOMAIN_SECLABEL_DYNAMIC) {
|
||||
if ((rc = remove_profile(secdef->label)) != 0) {
|
||||
@@ -604,10 +597,7 @@ AppArmorSetSecurityProcessLabel(virSecur
|
||||
virSecurityLabelDefPtr secdef =
|
||||
virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME);
|
||||
|
||||
- if (!secdef)
|
||||
- return -1;
|
||||
-
|
||||
- if (secdef->label == NULL)
|
||||
+ if (!secdef || !secdef->label)
|
||||
return 0;
|
||||
|
||||
if ((profile_name = get_profile_name(def)) == NULL)
|
||||
@@ -653,10 +643,7 @@ AppArmorSetSecurityChildProcessLabel(vir
|
||||
virSecurityLabelDefPtr secdef =
|
||||
virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME);
|
||||
|
||||
- if (!secdef)
|
||||
- goto cleanup;
|
||||
-
|
||||
- if (secdef->label == NULL)
|
||||
+ if (!secdef || !secdef->label)
|
||||
return 0;
|
||||
|
||||
if (STRNEQ(SECURITY_APPARMOR_NAME, secdef->model)) {
|
||||
@@ -738,10 +725,8 @@ AppArmorSetSecurityImageLabel(virSecurit
|
||||
if (!src->path || !virStorageSourceIsLocalStorage(src))
|
||||
return 0;
|
||||
|
||||
- if (!(secdef = virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME)))
|
||||
- return -1;
|
||||
-
|
||||
- if (!secdef->relabel)
|
||||
+ secdef = virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME);
|
||||
+ if (!secdef || !secdef->relabel)
|
||||
return 0;
|
||||
|
||||
if (secdef->imagelabel) {
|
||||
@@ -792,7 +777,7 @@ AppArmorSecurityVerify(virSecurityManage
|
||||
virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME);
|
||||
|
||||
if (!secdef)
|
||||
- return -1;
|
||||
+ return 0;
|
||||
|
||||
if (secdef->type == VIR_DOMAIN_SECLABEL_STATIC) {
|
||||
if (use_apparmor() < 0 || profile_status(secdef->label, 0) < 0) {
|
||||
@@ -829,10 +814,7 @@ AppArmorSetSecurityHostdevLabel(virSecur
|
||||
virDomainHostdevSubsysSCSIPtr scsisrc = &dev->source.subsys.u.scsi;
|
||||
virDomainHostdevSubsysSCSIVHostPtr hostsrc = &dev->source.subsys.u.scsi_host;
|
||||
|
||||
- if (!secdef)
|
||||
- return -1;
|
||||
-
|
||||
- if (!secdef->relabel)
|
||||
+ if (!secdef || !secdef->relabel)
|
||||
return 0;
|
||||
|
||||
if (dev->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS)
|
||||
@@ -940,10 +922,7 @@ AppArmorRestoreSecurityHostdevLabel(virS
|
||||
virSecurityLabelDefPtr secdef =
|
||||
virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME);
|
||||
|
||||
- if (!secdef)
|
||||
- return -1;
|
||||
-
|
||||
- if (!secdef->relabel)
|
||||
+ if (!secdef || !secdef->relabel)
|
||||
return 0;
|
||||
|
||||
return reload_profile(mgr, def, NULL, false);
|
||||
@@ -978,10 +957,7 @@ AppArmorSetFDLabel(virSecurityManagerPtr
|
||||
virSecurityLabelDefPtr secdef =
|
||||
virDomainDefGetSecurityLabelDef(def, SECURITY_APPARMOR_NAME);
|
||||
|
||||
- if (!secdef)
|
||||
- return -1;
|
||||
-
|
||||
- if (secdef->imagelabel == NULL)
|
||||
+ if (!secdef || !secdef->imagelabel)
|
||||
return 0;
|
||||
|
||||
if (virAsprintf(&proc, "/proc/self/fd/%d", fd) == -1)
|
@ -1,34 +0,0 @@
|
||||
commit 789999f481b31398f147e547550184bf303ce729
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Thu Feb 2 19:17:29 2017 -0700
|
||||
|
||||
apparmor: don't overwrite error from reload_profile
|
||||
|
||||
Like other callers of reload_profile, don't overwrite errors in
|
||||
AppArmorSetSecurityHostdevLabelHelper.
|
||||
|
||||
Index: libvirt-3.0.0/src/security/security_apparmor.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/security/security_apparmor.c
|
||||
+++ libvirt-3.0.0/src/security/security_apparmor.c
|
||||
@@ -322,19 +322,7 @@ AppArmorSetSecurityHostdevLabelHelper(co
|
||||
struct SDPDOP *ptr = opaque;
|
||||
virDomainDefPtr def = ptr->def;
|
||||
|
||||
- if (reload_profile(ptr->mgr, def, file, true) < 0) {
|
||||
- virSecurityLabelDefPtr secdef = virDomainDefGetSecurityLabelDef(
|
||||
- def, SECURITY_APPARMOR_NAME);
|
||||
- if (!secdef) {
|
||||
- virReportOOMError();
|
||||
- return -1;
|
||||
- }
|
||||
- virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
- _("cannot update AppArmor profile \'%s\'"),
|
||||
- secdef->imagelabel);
|
||||
- return -1;
|
||||
- }
|
||||
- return 0;
|
||||
+ return reload_profile(ptr->mgr, def, file, true);
|
||||
}
|
||||
|
||||
static int
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-3.0.0/examples/apparmor/libvirt-qemu
|
||||
Index: libvirt-3.1.0/examples/apparmor/libvirt-qemu
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/examples/apparmor/libvirt-qemu
|
||||
+++ libvirt-3.0.0/examples/apparmor/libvirt-qemu
|
||||
--- libvirt-3.1.0.orig/examples/apparmor/libvirt-qemu
|
||||
+++ libvirt-3.1.0/examples/apparmor/libvirt-qemu
|
||||
@@ -146,6 +146,9 @@
|
||||
# for restore
|
||||
/{usr/,}bin/bash rmix,
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-3.0.0/examples/apparmor/libvirt-lxc
|
||||
Index: libvirt-3.1.0/examples/apparmor/libvirt-lxc
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/examples/apparmor/libvirt-lxc
|
||||
+++ libvirt-3.0.0/examples/apparmor/libvirt-lxc
|
||||
--- libvirt-3.1.0.orig/examples/apparmor/libvirt-lxc
|
||||
+++ libvirt-3.1.0/examples/apparmor/libvirt-lxc
|
||||
@@ -2,39 +2,15 @@
|
||||
|
||||
#include <abstractions/base>
|
||||
|
@ -1,33 +0,0 @@
|
||||
commit b018ada3304c08e02b0750f8735b0702f0fd5f8c
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Mon Jan 16 10:58:00 2017 -0700
|
||||
|
||||
tests: fix compilation of shunloadtest
|
||||
|
||||
While local builds succeed fine, a build worker building in a
|
||||
chroot environment is encountering the following error with
|
||||
libvirt 3.0.0 release candidates
|
||||
|
||||
[ 162s] shunloadtest.o: In function `main':
|
||||
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:110: undefined reference to `dlopen'
|
||||
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:114: undefined reference to `dlsym'
|
||||
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:133: undefined reference to `dlclose'
|
||||
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:111: undefined reference to `dlerror'
|
||||
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:115: undefined reference to `dlerror'
|
||||
[ 162s] /home/abuild/rpmbuild/BUILD/libvirt-3.0.0/tests/shunloadtest.c:116: undefined reference to `dlclose'
|
||||
|
||||
Fix by appending DLOPEN_LIBS to shunloadtest_LDADD.
|
||||
|
||||
Index: libvirt-3.0.0/tests/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/tests/Makefile.am
|
||||
+++ libvirt-3.0.0/tests/Makefile.am
|
||||
@@ -1348,7 +1348,7 @@ libshunload_la_LDFLAGS = $(MOCKLIBS_LDFL
|
||||
|
||||
shunloadtest_SOURCES = \
|
||||
shunloadtest.c
|
||||
-shunloadtest_LDADD = $(LIB_PTHREAD)
|
||||
+shunloadtest_LDADD = $(LIB_PTHREAD) $(DLOPEN_LIBS)
|
||||
shunloadtest_DEPENDENCIES = libshunload.la
|
||||
|
||||
sysinfotest_SOURCES = \
|
@ -1,145 +0,0 @@
|
||||
commit b4386fdac7b063fc1775e1554f6f1f21b034b355
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Thu Jan 19 16:51:05 2017 -0700
|
||||
|
||||
xenconfig: add support for more timers
|
||||
|
||||
Currently xenconfig only supports the hpet timer for HVM domains.
|
||||
Include support for tsc timer for both PV and HVM domains.
|
||||
|
||||
Index: libvirt-3.0.0/src/xenconfig/xen_common.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/xenconfig/xen_common.c
|
||||
+++ libvirt-3.0.0/src/xenconfig/xen_common.c
|
||||
@@ -490,6 +490,7 @@ xenParseCPUFeatures(virConfPtr conf,
|
||||
unsigned long count = 0;
|
||||
const char *str = NULL;
|
||||
int val = 0;
|
||||
+ virDomainTimerDefPtr timer;
|
||||
|
||||
if (xenConfigGetULong(conf, "vcpus", &count, 1) < 0)
|
||||
return -1;
|
||||
@@ -514,6 +515,29 @@ xenParseCPUFeatures(virConfPtr conf,
|
||||
if (str && (virBitmapParse(str, &def->cpumask, 4096) < 0))
|
||||
return -1;
|
||||
|
||||
+ if (xenConfigGetString(conf, "tsc_mode", &str, NULL) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (str) {
|
||||
+ if (VIR_EXPAND_N(def->clock.timers, def->clock.ntimers, 1) < 0 ||
|
||||
+ VIR_ALLOC(timer) < 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ timer->name = VIR_DOMAIN_TIMER_NAME_TSC;
|
||||
+ timer->present = 1;
|
||||
+ timer->tickpolicy = -1;
|
||||
+ timer->mode = VIR_DOMAIN_TIMER_MODE_AUTO;
|
||||
+ timer->track = -1;
|
||||
+ if (STREQ_NULLABLE(str, "always_emulate"))
|
||||
+ timer->mode = VIR_DOMAIN_TIMER_MODE_EMULATE;
|
||||
+ else if (STREQ_NULLABLE(str, "native"))
|
||||
+ timer->mode = VIR_DOMAIN_TIMER_MODE_NATIVE;
|
||||
+ else if (STREQ_NULLABLE(str, "native_paravirt"))
|
||||
+ timer->mode = VIR_DOMAIN_TIMER_MODE_PARAVIRT;
|
||||
+
|
||||
+ def->clock.timers[def->clock.ntimers - 1] = timer;
|
||||
+ }
|
||||
+
|
||||
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) {
|
||||
if (xenConfigGetBool(conf, "pae", &val, 1) < 0)
|
||||
return -1;
|
||||
@@ -545,9 +569,7 @@ xenParseCPUFeatures(virConfPtr conf,
|
||||
return -1;
|
||||
|
||||
if (val != -1) {
|
||||
- virDomainTimerDefPtr timer;
|
||||
-
|
||||
- if (VIR_ALLOC_N(def->clock.timers, 1) < 0 ||
|
||||
+ if (VIR_EXPAND_N(def->clock.timers, def->clock.ntimers, 1) < 0 ||
|
||||
VIR_ALLOC(timer) < 0)
|
||||
return -1;
|
||||
|
||||
@@ -557,8 +579,7 @@ xenParseCPUFeatures(virConfPtr conf,
|
||||
timer->mode = -1;
|
||||
timer->track = -1;
|
||||
|
||||
- def->clock.ntimers = 1;
|
||||
- def->clock.timers[0] = timer;
|
||||
+ def->clock.timers[def->clock.ntimers - 1] = timer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1584,8 +1605,9 @@ static int
|
||||
xenFormatCPUFeatures(virConfPtr conf, virDomainDefPtr def)
|
||||
{
|
||||
size_t i;
|
||||
+ bool hvm = !!(def->os.type == VIR_DOMAIN_OSTYPE_HVM);
|
||||
|
||||
- if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) {
|
||||
+ if (hvm) {
|
||||
if (xenConfigSetInt(conf, "pae",
|
||||
(def->features[VIR_DOMAIN_FEATURE_PAE] ==
|
||||
VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0)
|
||||
@@ -1610,12 +1632,57 @@ xenFormatCPUFeatures(virConfPtr conf, vi
|
||||
(def->features[VIR_DOMAIN_FEATURE_VIRIDIAN] ==
|
||||
VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0)
|
||||
return -1;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < def->clock.ntimers; i++) {
|
||||
+ switch ((virDomainTimerNameType) def->clock.timers[i]->name) {
|
||||
+ case VIR_DOMAIN_TIMER_NAME_TSC:
|
||||
+ switch (def->clock.timers[i]->mode) {
|
||||
+ case VIR_DOMAIN_TIMER_MODE_NATIVE:
|
||||
+ if (xenConfigSetString(conf, "tsc_mode", "native") < 0)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+ case VIR_DOMAIN_TIMER_MODE_PARAVIRT:
|
||||
+ if (xenConfigSetString(conf, "tsc_mode", "native_paravirt") < 0)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+ case VIR_DOMAIN_TIMER_MODE_EMULATE:
|
||||
+ if (xenConfigSetString(conf, "tsc_mode", "always_emulate") < 0)
|
||||
+ return -1;
|
||||
+ break;
|
||||
+ default:
|
||||
+ if (xenConfigSetString(conf, "tsc_mode", "default") < 0)
|
||||
+ return -1;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_DOMAIN_TIMER_NAME_HPET:
|
||||
+ if (hvm) {
|
||||
+ int enable_hpet = def->clock.timers[i]->present != 0;
|
||||
|
||||
- for (i = 0; i < def->clock.ntimers; i++) {
|
||||
- if (def->clock.timers[i]->name == VIR_DOMAIN_TIMER_NAME_HPET &&
|
||||
- def->clock.timers[i]->present != -1 &&
|
||||
- xenConfigSetInt(conf, "hpet", def->clock.timers[i]->present) < 0)
|
||||
+ /* disable hpet if 'present' is 0, enable otherwise */
|
||||
+ if (xenConfigSetInt(conf, "hpet", enable_hpet) < 0)
|
||||
+ return -1;
|
||||
+ } else {
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
+ _("unsupported timer type (name) '%s'"),
|
||||
+ virDomainTimerNameTypeToString(def->clock.timers[i]->name));
|
||||
return -1;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case VIR_DOMAIN_TIMER_NAME_PLATFORM:
|
||||
+ case VIR_DOMAIN_TIMER_NAME_KVMCLOCK:
|
||||
+ case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK:
|
||||
+ case VIR_DOMAIN_TIMER_NAME_RTC:
|
||||
+ case VIR_DOMAIN_TIMER_NAME_PIT:
|
||||
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
+ _("unsupported timer type (name) '%s'"),
|
||||
+ virDomainTimerNameTypeToString(def->clock.timers[i]->name));
|
||||
+ return -1;
|
||||
+
|
||||
+ case VIR_DOMAIN_TIMER_NAME_LAST:
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
@ -1,132 +0,0 @@
|
||||
commit bd1168101a0ea5efcf3b2dc5ee782af6ad911320
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Tue Feb 7 12:05:15 2017 -0700
|
||||
|
||||
libxl: fix disk detach when <driver> not specified
|
||||
|
||||
When a user does not explicitly set a <driver> in the disk config,
|
||||
libvirt defers selection of a default to libxl. This approach works
|
||||
fine when starting a domain with such configuration or attaching a
|
||||
disk to a running domain. But when detaching such a disk, libxl
|
||||
will fail with "unrecognized disk backend type: 0". libxl makes no
|
||||
attempt to recalculate a default backend (driver) on detach and
|
||||
simply fails when uninitialized.
|
||||
|
||||
This patch updates the libvirt disk config with the backend selected
|
||||
by libxl when starting a domain or attaching a disk to a running
|
||||
domain. Another benefit of this approach is that the live XML is
|
||||
also updated with the backend driver selected by libxl.
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
@@ -907,6 +907,38 @@ libxlMakeDiskList(virDomainDefPtr def, l
|
||||
return -1;
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * Update libvirt disk config with libxl disk config.
|
||||
+ *
|
||||
+ * This function can be used to update the libvirt disk config with default
|
||||
+ * values selected by libxl. Currently only the backend type is selected by
|
||||
+ * libxl when not explicitly specified by the user.
|
||||
+ */
|
||||
+void
|
||||
+libxlUpdateDiskDef(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
|
||||
+{
|
||||
+ const char *driver = NULL;
|
||||
+
|
||||
+ if (virDomainDiskGetDriver(l_disk))
|
||||
+ return;
|
||||
+
|
||||
+ switch (x_disk->backend) {
|
||||
+ case LIBXL_DISK_BACKEND_QDISK:
|
||||
+ driver = "qemu";
|
||||
+ break;
|
||||
+ case LIBXL_DISK_BACKEND_TAP:
|
||||
+ driver = "tap";
|
||||
+ break;
|
||||
+ case LIBXL_DISK_BACKEND_PHY:
|
||||
+ driver = "phy";
|
||||
+ break;
|
||||
+ case LIBXL_DISK_BACKEND_UNKNOWN:
|
||||
+ break;
|
||||
+ }
|
||||
+ if (driver)
|
||||
+ ignore_value(virDomainDiskSetDriver(l_disk, driver));
|
||||
+}
|
||||
+
|
||||
int
|
||||
libxlMakeNic(virDomainDefPtr def,
|
||||
virDomainNetDefPtr l_nic,
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.h
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.h
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.h
|
||||
@@ -175,6 +175,10 @@ int libxlDriverConfigLoadFile(libxlDrive
|
||||
|
||||
int
|
||||
libxlMakeDisk(virDomainDiskDefPtr l_dev, libxl_device_disk *x_dev);
|
||||
+
|
||||
+void
|
||||
+libxlUpdateDiskDef(virDomainDiskDefPtr l_dev, libxl_device_disk *x_dev);
|
||||
+
|
||||
int
|
||||
libxlMakeNic(virDomainDefPtr def,
|
||||
virDomainNetDefPtr l_nic,
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_domain.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_domain.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_domain.c
|
||||
@@ -1072,6 +1072,30 @@ libxlDomainCreateIfaceNames(virDomainDef
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+libxlDomainUpdateDiskParams(virDomainDefPtr def, libxl_ctx *ctx)
|
||||
+{
|
||||
+ libxl_device_disk *disks;
|
||||
+ int num_disks = 0;
|
||||
+ size_t i;
|
||||
+ int idx;
|
||||
+
|
||||
+ disks = libxl_device_disk_list(ctx, def->id, &num_disks);
|
||||
+ if (!disks)
|
||||
+ return;
|
||||
+
|
||||
+ for (i = 0; i < num_disks; i++) {
|
||||
+ if ((idx = virDomainDiskIndexByName(def, disks[i].vdev, false)) < 0)
|
||||
+ continue;
|
||||
+
|
||||
+ libxlUpdateDiskDef(def->disks[idx], &disks[i]);
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < num_disks; i++)
|
||||
+ libxl_device_disk_dispose(&disks[i]);
|
||||
+ VIR_FREE(disks);
|
||||
+}
|
||||
+
|
||||
#ifdef LIBXL_HAVE_DEVICE_CHANNEL
|
||||
static void
|
||||
libxlDomainCreateChannelPTY(virDomainDefPtr def, libxl_ctx *ctx)
|
||||
@@ -1315,6 +1339,7 @@ libxlDomainStart(libxlDriverPrivatePtr d
|
||||
goto destroy_dom;
|
||||
|
||||
libxlDomainCreateIfaceNames(vm->def, &d_config);
|
||||
+ libxlDomainUpdateDiskParams(vm->def, cfg->ctx);
|
||||
|
||||
#ifdef LIBXL_HAVE_DEVICE_CHANNEL
|
||||
if (vm->def->nchannels > 0)
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
@@ -3028,6 +3028,7 @@ libxlDomainAttachDeviceDiskLive(virDomai
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
+ libxlUpdateDiskDef(l_disk, &x_disk);
|
||||
virDomainDiskInsertPreAlloced(vm->def, l_disk);
|
||||
|
||||
} else {
|
@ -11,11 +11,11 @@ Signed-off-by: Chunyan Liu <cyliu@suse.com>
|
||||
src/qemu/qemu_driver.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
Index: libvirt-3.0.0/src/qemu/qemu_driver.c
|
||||
Index: libvirt-3.1.0/src/qemu/qemu_driver.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/qemu/qemu_driver.c
|
||||
+++ libvirt-3.0.0/src/qemu/qemu_driver.c
|
||||
@@ -16828,6 +16828,15 @@ qemuDomainBlockCopyCommon(virDomainObjPt
|
||||
--- libvirt-3.1.0.orig/src/qemu/qemu_driver.c
|
||||
+++ libvirt-3.1.0/src/qemu/qemu_driver.c
|
||||
@@ -16523,6 +16523,15 @@ qemuDomainBlockCopyCommon(virDomainObjPt
|
||||
_("non-file destination not supported yet"));
|
||||
goto endjob;
|
||||
}
|
||||
|
@ -1,103 +0,0 @@
|
||||
commit c89a6e7878e630718cce0af940e9c070c132ce30
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Tue Jan 31 20:07:30 2017 -0700
|
||||
|
||||
libxl: use init and dispose functions with libxl_physinfo
|
||||
|
||||
The typical pattern when calling libxl functions that populate a
|
||||
structure is
|
||||
|
||||
libxl_foo foo;
|
||||
libxl_foo_init(&foo);
|
||||
libxl_get_foo(ctx, &foo);
|
||||
...
|
||||
libxl_foo_dispose(&foo);
|
||||
|
||||
Fix several instances of libxl_physinfo missing the init and
|
||||
dispose calls.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_capabilities.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_capabilities.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_capabilities.c
|
||||
@@ -211,27 +211,33 @@ libxlCapsInitHost(libxl_ctx *ctx, virCap
|
||||
const libxl_version_info *ver_info;
|
||||
enum libxlHwcapVersion version;
|
||||
libxl_physinfo phy_info;
|
||||
+ int ret = -1;
|
||||
|
||||
+ libxl_physinfo_init(&phy_info);
|
||||
if (libxl_get_physinfo(ctx, &phy_info) != 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Failed to get node physical info from libxenlight"));
|
||||
- return -1;
|
||||
+ goto cleanup;
|
||||
}
|
||||
|
||||
if ((ver_info = libxl_get_version_info(ctx)) == NULL) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Failed to get version info from libxenlight"));
|
||||
- return -1;
|
||||
+ goto cleanup;
|
||||
}
|
||||
|
||||
version = (ver_info->xen_version_minor >= 7);
|
||||
if (libxlCapsInitCPU(caps, &phy_info, version) < 0)
|
||||
- return -1;
|
||||
+ goto cleanup;
|
||||
|
||||
if (virCapabilitiesSetNetPrefix(caps, LIBXL_GENERATED_PREFIX_XEN) < 0)
|
||||
- return -1;
|
||||
+ goto cleanup;
|
||||
|
||||
- return 0;
|
||||
+ ret = 0;
|
||||
+
|
||||
+ cleanup:
|
||||
+ libxl_physinfo_dispose(&phy_info);
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
@@ -1969,6 +1969,7 @@ libxlDriverNodeGetInfo(libxlDriverPrivat
|
||||
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
|
||||
int ret = -1;
|
||||
|
||||
+ libxl_physinfo_init(&phy_info);
|
||||
if (libxl_get_physinfo(cfg->ctx, &phy_info)) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("libxl_get_physinfo_info failed"));
|
||||
@@ -1993,6 +1994,7 @@ libxlDriverNodeGetInfo(libxlDriverPrivat
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
+ libxl_physinfo_dispose(&phy_info);
|
||||
virObjectUnref(cfg);
|
||||
return ret;
|
||||
}
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
@@ -4284,6 +4284,7 @@ libxlNodeGetFreeMemory(virConnectPtr con
|
||||
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
|
||||
unsigned long long ret = 0;
|
||||
|
||||
+ libxl_physinfo_init(&phy_info);
|
||||
if (virNodeGetFreeMemoryEnsureACL(conn) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@@ -4296,6 +4297,7 @@ libxlNodeGetFreeMemory(virConnectPtr con
|
||||
ret = phy_info.free_pages * cfg->verInfo->pagesize;
|
||||
|
||||
cleanup:
|
||||
+ libxl_physinfo_dispose(&phy_info);
|
||||
virObjectUnref(cfg);
|
||||
return ret;
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
commit d2b77608e9e9c23416a9ac93a50054348cb51653
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Mon Jan 16 10:51:40 2017 -0700
|
||||
|
||||
libxl: fix reporting of maximum memory
|
||||
|
||||
The libxl driver reports different values of maximum memory depending
|
||||
on state of a domain. If inactive, maximum memory value is reported
|
||||
correctly. When active, maximum memory is derived from max_pages value
|
||||
returned by the XEN_SYSCTL_getdomaininfolist sysctl operation. But
|
||||
max_pages can be changed by toolstacks and does not necessarily
|
||||
represent the maximum memory a domain can use during its active
|
||||
lifetime.
|
||||
|
||||
A better location for determining a domain's maximum memory is the
|
||||
/local/domain/<id>/memory/static-max node in xenstore. This value
|
||||
is set from the libxl_domain_build_info.max_memkb field when creating
|
||||
the domain. Currently it cannot be changed nor can its value be
|
||||
exceeded by a balloon operation. From libvirt's perspective, always
|
||||
reporting maximum memory with virDomainDefGetMemoryTotal() will produce
|
||||
the same results as reading the static-max node in xenstore.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
@@ -1640,10 +1640,10 @@ libxlDomainGetInfo(virDomainPtr dom, vir
|
||||
if (virDomainGetInfoEnsureACL(dom->conn, vm->def) < 0)
|
||||
goto cleanup;
|
||||
|
||||
+ info->maxMem = virDomainDefGetMemoryTotal(vm->def);
|
||||
if (!virDomainObjIsActive(vm)) {
|
||||
info->cpuTime = 0;
|
||||
info->memory = vm->def->mem.cur_balloon;
|
||||
- info->maxMem = virDomainDefGetMemoryTotal(vm->def);
|
||||
} else {
|
||||
libxl_dominfo_init(&d_info);
|
||||
|
||||
@@ -1655,7 +1655,6 @@ libxlDomainGetInfo(virDomainPtr dom, vir
|
||||
}
|
||||
info->cpuTime = d_info.cpu_time;
|
||||
info->memory = d_info.current_memkb;
|
||||
- info->maxMem = d_info.max_memkb;
|
||||
|
||||
libxl_dominfo_dispose(&d_info);
|
||||
}
|
||||
@@ -5175,7 +5174,7 @@ libxlDomainMemoryStats(virDomainPtr dom,
|
||||
goto endjob;
|
||||
}
|
||||
mem = d_info.current_memkb;
|
||||
- maxmem = d_info.max_memkb;
|
||||
+ maxmem = virDomainDefGetMemoryTotal(vm->def);
|
||||
|
||||
LIBXL_SET_MEMSTAT(VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON, mem);
|
||||
LIBXL_SET_MEMSTAT(VIR_DOMAIN_MEMORY_STAT_AVAILABLE, maxmem);
|
@ -1,325 +0,0 @@
|
||||
commit d397092591518006b41131f9fc921f74248e60a3
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Thu Jan 19 17:19:18 2017 -0700
|
||||
|
||||
tests: add xlconfig tests for <timer> configurations
|
||||
|
||||
Index: libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-hpet-timer.cfg
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-hpet-timer.cfg
|
||||
@@ -0,0 +1,27 @@
|
||||
+name = "XenGuest2"
|
||||
+uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809"
|
||||
+maxmem = 579
|
||||
+memory = 394
|
||||
+vcpus = 1
|
||||
+pae = 1
|
||||
+acpi = 1
|
||||
+apic = 1
|
||||
+hap = 0
|
||||
+viridian = 0
|
||||
+hpet = 1
|
||||
+rtc_timeoffset = 0
|
||||
+localtime = 0
|
||||
+on_poweroff = "destroy"
|
||||
+on_reboot = "restart"
|
||||
+on_crash = "restart"
|
||||
+device_model = "/usr/lib/xen/bin/qemu-system-i386"
|
||||
+sdl = 0
|
||||
+vnc = 1
|
||||
+vncunused = 1
|
||||
+vnclisten = "127.0.0.1"
|
||||
+vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,rate=10240KB/s" ]
|
||||
+parallel = "none"
|
||||
+serial = "none"
|
||||
+builder = "hvm"
|
||||
+boot = "d"
|
||||
+disk = [ "format=raw,vdev=hda,access=rw,backendtype=phy,target=/dev/HostVG/XenGuest2", "format=qcow2,vdev=hdb,access=rw,backendtype=qdisk,target=/var/lib/libvirt/images/XenGuest2-home", "format=raw,vdev=hdc,access=ro,backendtype=qdisk,devtype=cdrom,target=/root/boot.iso" ]
|
||||
Index: libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-hpet-timer.xml
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-hpet-timer.xml
|
||||
@@ -0,0 +1,64 @@
|
||||
+<domain type='xen'>
|
||||
+ <name>XenGuest2</name>
|
||||
+ <uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid>
|
||||
+ <memory unit='KiB'>592896</memory>
|
||||
+ <currentMemory unit='KiB'>403456</currentMemory>
|
||||
+ <vcpu placement='static'>1</vcpu>
|
||||
+ <os>
|
||||
+ <type arch='x86_64' machine='xenfv'>hvm</type>
|
||||
+ <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
|
||||
+ <boot dev='cdrom'/>
|
||||
+ </os>
|
||||
+ <features>
|
||||
+ <acpi/>
|
||||
+ <apic/>
|
||||
+ <pae/>
|
||||
+ <hap state='off'/>
|
||||
+ </features>
|
||||
+ <clock offset='variable' adjustment='0' basis='utc'>
|
||||
+ <timer name='hpet' present='yes'/>
|
||||
+ </clock>
|
||||
+ <on_poweroff>destroy</on_poweroff>
|
||||
+ <on_reboot>restart</on_reboot>
|
||||
+ <on_crash>restart</on_crash>
|
||||
+ <devices>
|
||||
+ <emulator>/usr/lib/xen/bin/qemu-system-i386</emulator>
|
||||
+ <disk type='block' device='disk'>
|
||||
+ <driver name='phy' type='raw'/>
|
||||
+ <source dev='/dev/HostVG/XenGuest2'/>
|
||||
+ <target dev='hda' bus='ide'/>
|
||||
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
+ </disk>
|
||||
+ <disk type='file' device='disk'>
|
||||
+ <driver name='qemu' type='qcow2'/>
|
||||
+ <source file='/var/lib/libvirt/images/XenGuest2-home'/>
|
||||
+ <target dev='hdb' bus='ide'/>
|
||||
+ <address type='drive' controller='0' bus='0' target='0' unit='1'/>
|
||||
+ </disk>
|
||||
+ <disk type='file' device='cdrom'>
|
||||
+ <driver name='qemu' type='raw'/>
|
||||
+ <source file='/root/boot.iso'/>
|
||||
+ <target dev='hdc' bus='ide'/>
|
||||
+ <readonly/>
|
||||
+ <address type='drive' controller='0' bus='1' target='0' unit='0'/>
|
||||
+ </disk>
|
||||
+ <controller type='ide' index='0'/>
|
||||
+ <interface type='bridge'>
|
||||
+ <mac address='00:16:3e:66:92:9c'/>
|
||||
+ <source bridge='xenbr1'/>
|
||||
+ <bandwidth>
|
||||
+ <outbound average='10240'/>
|
||||
+ </bandwidth>
|
||||
+ <script path='vif-bridge'/>
|
||||
+ <model type='e1000'/>
|
||||
+ </interface>
|
||||
+ <input type='mouse' bus='ps2'/>
|
||||
+ <input type='keyboard' bus='ps2'/>
|
||||
+ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
|
||||
+ <listen type='address' address='127.0.0.1'/>
|
||||
+ </graphics>
|
||||
+ <video>
|
||||
+ <model type='cirrus' vram='8192' heads='1' primary='yes'/>
|
||||
+ </video>
|
||||
+ </devices>
|
||||
+</domain>
|
||||
Index: libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-multi-timer.cfg
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-multi-timer.cfg
|
||||
@@ -0,0 +1,28 @@
|
||||
+name = "XenGuest2"
|
||||
+uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809"
|
||||
+maxmem = 579
|
||||
+memory = 394
|
||||
+vcpus = 1
|
||||
+pae = 1
|
||||
+acpi = 1
|
||||
+apic = 1
|
||||
+hap = 0
|
||||
+viridian = 0
|
||||
+tsc_mode = "native"
|
||||
+hpet = 1
|
||||
+rtc_timeoffset = 0
|
||||
+localtime = 0
|
||||
+on_poweroff = "destroy"
|
||||
+on_reboot = "restart"
|
||||
+on_crash = "restart"
|
||||
+device_model = "/usr/lib/xen/bin/qemu-system-i386"
|
||||
+sdl = 0
|
||||
+vnc = 1
|
||||
+vncunused = 1
|
||||
+vnclisten = "127.0.0.1"
|
||||
+vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,rate=10240KB/s" ]
|
||||
+parallel = "none"
|
||||
+serial = "none"
|
||||
+builder = "hvm"
|
||||
+boot = "d"
|
||||
+disk = [ "format=raw,vdev=hda,access=rw,backendtype=phy,target=/dev/HostVG/XenGuest2", "format=qcow2,vdev=hdb,access=rw,backendtype=qdisk,target=/var/lib/libvirt/images/XenGuest2-home", "format=raw,vdev=hdc,access=ro,backendtype=qdisk,devtype=cdrom,target=/root/boot.iso" ]
|
||||
Index: libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-multi-timer.xml
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-multi-timer.xml
|
||||
@@ -0,0 +1,65 @@
|
||||
+<domain type='xen'>
|
||||
+ <name>XenGuest2</name>
|
||||
+ <uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid>
|
||||
+ <memory unit='KiB'>592896</memory>
|
||||
+ <currentMemory unit='KiB'>403456</currentMemory>
|
||||
+ <vcpu placement='static'>1</vcpu>
|
||||
+ <os>
|
||||
+ <type arch='x86_64' machine='xenfv'>hvm</type>
|
||||
+ <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
|
||||
+ <boot dev='cdrom'/>
|
||||
+ </os>
|
||||
+ <features>
|
||||
+ <acpi/>
|
||||
+ <apic/>
|
||||
+ <pae/>
|
||||
+ <hap state='off'/>
|
||||
+ </features>
|
||||
+ <clock offset='variable' adjustment='0' basis='utc'>
|
||||
+ <timer name='tsc' present='yes' mode='native'/>
|
||||
+ <timer name='hpet' present='yes'/>
|
||||
+ </clock>
|
||||
+ <on_poweroff>destroy</on_poweroff>
|
||||
+ <on_reboot>restart</on_reboot>
|
||||
+ <on_crash>restart</on_crash>
|
||||
+ <devices>
|
||||
+ <emulator>/usr/lib/xen/bin/qemu-system-i386</emulator>
|
||||
+ <disk type='block' device='disk'>
|
||||
+ <driver name='phy' type='raw'/>
|
||||
+ <source dev='/dev/HostVG/XenGuest2'/>
|
||||
+ <target dev='hda' bus='ide'/>
|
||||
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
+ </disk>
|
||||
+ <disk type='file' device='disk'>
|
||||
+ <driver name='qemu' type='qcow2'/>
|
||||
+ <source file='/var/lib/libvirt/images/XenGuest2-home'/>
|
||||
+ <target dev='hdb' bus='ide'/>
|
||||
+ <address type='drive' controller='0' bus='0' target='0' unit='1'/>
|
||||
+ </disk>
|
||||
+ <disk type='file' device='cdrom'>
|
||||
+ <driver name='qemu' type='raw'/>
|
||||
+ <source file='/root/boot.iso'/>
|
||||
+ <target dev='hdc' bus='ide'/>
|
||||
+ <readonly/>
|
||||
+ <address type='drive' controller='0' bus='1' target='0' unit='0'/>
|
||||
+ </disk>
|
||||
+ <controller type='ide' index='0'/>
|
||||
+ <interface type='bridge'>
|
||||
+ <mac address='00:16:3e:66:92:9c'/>
|
||||
+ <source bridge='xenbr1'/>
|
||||
+ <bandwidth>
|
||||
+ <outbound average='10240'/>
|
||||
+ </bandwidth>
|
||||
+ <script path='vif-bridge'/>
|
||||
+ <model type='e1000'/>
|
||||
+ </interface>
|
||||
+ <input type='mouse' bus='ps2'/>
|
||||
+ <input type='keyboard' bus='ps2'/>
|
||||
+ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
|
||||
+ <listen type='address' address='127.0.0.1'/>
|
||||
+ </graphics>
|
||||
+ <video>
|
||||
+ <model type='cirrus' vram='8192' heads='1' primary='yes'/>
|
||||
+ </video>
|
||||
+ </devices>
|
||||
+</domain>
|
||||
Index: libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-tsc-timer.cfg
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-tsc-timer.cfg
|
||||
@@ -0,0 +1,27 @@
|
||||
+name = "XenGuest2"
|
||||
+uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809"
|
||||
+maxmem = 579
|
||||
+memory = 394
|
||||
+vcpus = 1
|
||||
+pae = 1
|
||||
+acpi = 1
|
||||
+apic = 1
|
||||
+hap = 0
|
||||
+viridian = 0
|
||||
+tsc_mode = "native"
|
||||
+rtc_timeoffset = 0
|
||||
+localtime = 0
|
||||
+on_poweroff = "destroy"
|
||||
+on_reboot = "restart"
|
||||
+on_crash = "restart"
|
||||
+device_model = "/usr/lib/xen/bin/qemu-system-i386"
|
||||
+sdl = 0
|
||||
+vnc = 1
|
||||
+vncunused = 1
|
||||
+vnclisten = "127.0.0.1"
|
||||
+vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,rate=10240KB/s" ]
|
||||
+parallel = "none"
|
||||
+serial = "none"
|
||||
+builder = "hvm"
|
||||
+boot = "d"
|
||||
+disk = [ "format=raw,vdev=hda,access=rw,backendtype=phy,target=/dev/HostVG/XenGuest2", "format=qcow2,vdev=hdb,access=rw,backendtype=qdisk,target=/var/lib/libvirt/images/XenGuest2-home", "format=raw,vdev=hdc,access=ro,backendtype=qdisk,devtype=cdrom,target=/root/boot.iso" ]
|
||||
Index: libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-tsc-timer.xml
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-3.0.0/tests/xlconfigdata/test-fullvirt-tsc-timer.xml
|
||||
@@ -0,0 +1,64 @@
|
||||
+<domain type='xen'>
|
||||
+ <name>XenGuest2</name>
|
||||
+ <uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid>
|
||||
+ <memory unit='KiB'>592896</memory>
|
||||
+ <currentMemory unit='KiB'>403456</currentMemory>
|
||||
+ <vcpu placement='static'>1</vcpu>
|
||||
+ <os>
|
||||
+ <type arch='x86_64' machine='xenfv'>hvm</type>
|
||||
+ <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader>
|
||||
+ <boot dev='cdrom'/>
|
||||
+ </os>
|
||||
+ <features>
|
||||
+ <acpi/>
|
||||
+ <apic/>
|
||||
+ <pae/>
|
||||
+ <hap state='off'/>
|
||||
+ </features>
|
||||
+ <clock offset='variable' adjustment='0' basis='utc'>
|
||||
+ <timer name='tsc' present='yes' mode='native'/>
|
||||
+ </clock>
|
||||
+ <on_poweroff>destroy</on_poweroff>
|
||||
+ <on_reboot>restart</on_reboot>
|
||||
+ <on_crash>restart</on_crash>
|
||||
+ <devices>
|
||||
+ <emulator>/usr/lib/xen/bin/qemu-system-i386</emulator>
|
||||
+ <disk type='block' device='disk'>
|
||||
+ <driver name='phy' type='raw'/>
|
||||
+ <source dev='/dev/HostVG/XenGuest2'/>
|
||||
+ <target dev='hda' bus='ide'/>
|
||||
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||
+ </disk>
|
||||
+ <disk type='file' device='disk'>
|
||||
+ <driver name='qemu' type='qcow2'/>
|
||||
+ <source file='/var/lib/libvirt/images/XenGuest2-home'/>
|
||||
+ <target dev='hdb' bus='ide'/>
|
||||
+ <address type='drive' controller='0' bus='0' target='0' unit='1'/>
|
||||
+ </disk>
|
||||
+ <disk type='file' device='cdrom'>
|
||||
+ <driver name='qemu' type='raw'/>
|
||||
+ <source file='/root/boot.iso'/>
|
||||
+ <target dev='hdc' bus='ide'/>
|
||||
+ <readonly/>
|
||||
+ <address type='drive' controller='0' bus='1' target='0' unit='0'/>
|
||||
+ </disk>
|
||||
+ <controller type='ide' index='0'/>
|
||||
+ <interface type='bridge'>
|
||||
+ <mac address='00:16:3e:66:92:9c'/>
|
||||
+ <source bridge='xenbr1'/>
|
||||
+ <bandwidth>
|
||||
+ <outbound average='10240'/>
|
||||
+ </bandwidth>
|
||||
+ <script path='vif-bridge'/>
|
||||
+ <model type='e1000'/>
|
||||
+ </interface>
|
||||
+ <input type='mouse' bus='ps2'/>
|
||||
+ <input type='keyboard' bus='ps2'/>
|
||||
+ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'>
|
||||
+ <listen type='address' address='127.0.0.1'/>
|
||||
+ </graphics>
|
||||
+ <video>
|
||||
+ <model type='cirrus' vram='8192' heads='1' primary='yes'/>
|
||||
+ </video>
|
||||
+ </devices>
|
||||
+</domain>
|
||||
Index: libvirt-3.0.0/tests/xlconfigtest.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/tests/xlconfigtest.c
|
||||
+++ libvirt-3.0.0/tests/xlconfigtest.c
|
||||
@@ -265,6 +265,9 @@ mymain(void)
|
||||
DO_TEST("spice-features");
|
||||
DO_TEST("vif-rate");
|
||||
DO_TEST("fullvirt-nohap");
|
||||
+ DO_TEST("fullvirt-hpet-timer");
|
||||
+ DO_TEST("fullvirt-tsc-timer");
|
||||
+ DO_TEST("fullvirt-multi-timer");
|
||||
|
||||
DO_TEST("paravirt-cmdline");
|
||||
DO_TEST_FORMAT("paravirt-cmdline-extra-root", false);
|
@ -1,52 +0,0 @@
|
||||
commit f86a7a837207a1260ff7a8e4469b9057fbde11c8
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Tue Jan 17 15:11:32 2017 -0700
|
||||
|
||||
libxl: fix dom0 autoballooning with Xen 4.8
|
||||
|
||||
xen.git commit 57f8b13c changed several of the libxl memory
|
||||
get/set functions to take 64 bit parameters. The libvirt
|
||||
libxl driver still uses uint32_t variables for these various
|
||||
parameters, which is particularly problematic for the
|
||||
libxl_set_memory_target() function.
|
||||
|
||||
When dom0 autoballooning is enabled, libvirt (like xl) determines
|
||||
the memory needed to start a domain and the memory available. If
|
||||
memory available is less than memory needed, dom0 is ballooned
|
||||
down by passing a negative value to libxl_set_memory_target()
|
||||
'target_memkb' parameter. Prior to xen.git commit 57f8b13c,
|
||||
'target_memkb' was an int32_t. Subtracting a larger uint32 from
|
||||
a smaller uint32 and assigning it to int32 resulted in a negative
|
||||
number. After commit 57f8b13c, the same subtraction is widened
|
||||
to a int64, resulting in a large positive number. The simple
|
||||
fix taken by this patch is to assign the difference of the
|
||||
uint32 values to a temporary int32 variable, which is then
|
||||
passed to 'target_memkb' parameter of libxl_set_memory_target().
|
||||
|
||||
Note that it is undesirable to change libvirt to use 64 bit
|
||||
variables since it requires setting LIBXL_API_VERSION to 0x040800.
|
||||
Currently libvirt supports LIBXL_API_VERSION >= 0x040400,
|
||||
essentially Xen >= 4.4.
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_domain.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_domain.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_domain.c
|
||||
@@ -909,6 +909,7 @@ libxlDomainFreeMem(libxl_ctx *ctx, libxl
|
||||
{
|
||||
uint32_t needed_mem;
|
||||
uint32_t free_mem;
|
||||
+ int32_t target_mem;
|
||||
int tries = 3;
|
||||
int wait_secs = 10;
|
||||
|
||||
@@ -922,7 +923,8 @@ libxlDomainFreeMem(libxl_ctx *ctx, libxl
|
||||
if (free_mem >= needed_mem)
|
||||
return 0;
|
||||
|
||||
- if (libxl_set_memory_target(ctx, 0, free_mem - needed_mem,
|
||||
+ target_mem = free_mem - needed_mem;
|
||||
+ if (libxl_set_memory_target(ctx, 0, target_mem,
|
||||
/* relative */ 1, 0) < 0)
|
||||
goto error;
|
||||
|
@ -1,32 +0,0 @@
|
||||
commit ff225538d42f8e50bbc2c1c74d0a882ebaa73cd4
|
||||
Author: Jim Fehlig <jfehlig@suse.com>
|
||||
Date: Mon Jan 30 11:43:15 2017 -0700
|
||||
|
||||
libxl: honor autoballoon setting in libxl.conf
|
||||
|
||||
libxlGetAutoballoonConf is supposed to honor user-specified
|
||||
autoballoon setting in libxl.conf. As written, the user-specified
|
||||
setting could be overwritten by the subsequent logic to check
|
||||
dom0_mem parameter. If user-specified setting is present and
|
||||
correct, accept it. Only fallback to checking Xen dom0_mem
|
||||
command line parameter if user-specfied setting is not present.
|
||||
|
||||
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
@@ -1381,8 +1381,11 @@ libxlGetAutoballoonConf(libxlDriverConfi
|
||||
regex_t regex;
|
||||
int res;
|
||||
|
||||
- if (virConfGetValueBool(conf, "autoballoon", &cfg->autoballoon) < 0)
|
||||
+ res = virConfGetValueBool(conf, "autoballoon", &cfg->autoballoon);
|
||||
+ if (res < 0)
|
||||
return -1;
|
||||
+ else if (res == 1)
|
||||
+ return 0;
|
||||
|
||||
if ((res = regcomp(®ex,
|
||||
"(^| )dom0_mem=((|min:|max:)[0-9]+[bBkKmMgG]?,?)+($| )",
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9d9d26b70e13b1b2dfde5789ed52fc4528289a37e0f158418e9746263b37175e
|
||||
size 13815736
|
@ -1,10 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEcBAABAgAGBQJYfl7BAAoJEBVYiyZZa+pdlPoH/0nWMZ7B4U8PAz/WCW1vasvF
|
||||
MC/2BN9owUgA5LTKKROTMG2eoY1daJJgpZ+kC61Xnlnt39DDSvisQlPlnmhb6RLU
|
||||
1JtopaDIkhTQ/lL9JG4pnvAHTcHbBqWmGC3jSKBrLAfjjfpkPHYuJqnnDfnMQ9a7
|
||||
lm4PE0MQZtvZILqYUPJiuzYinvyBkzHacd1+FlUZZIdBEOGp28xoh4ILHc7f6iDL
|
||||
P/87gsmrIE/A/ElWCCntQPpn5s99Oz2WIpdnyK+9jBxd5EfZOTo/69qTNLn4XLRE
|
||||
F4LlkAX7HducBOtNPIVMYNXWI1sdq+LzhKW5lL5wQDFh7kKTK8WL5sc3EPNmHnw=
|
||||
=mauQ
|
||||
-----END PGP SIGNATURE-----
|
3
libvirt-3.1.0.tar.xz
Normal file
3
libvirt-3.1.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7879029a0fcac4e58dbeec66f0bc77771565c4b6667212c8f6251eefb03732a9
|
||||
size 13906204
|
10
libvirt-3.1.0.tar.xz.asc
Normal file
10
libvirt-3.1.0.tar.xz.asc
Normal file
@ -0,0 +1,10 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEcBAABAgAGBQJYuUErAAoJEBVYiyZZa+pdWBkIAKVc+m0tbSTxBgszQCarG/f6
|
||||
cde4qCXZOVTpyIQFAtJajV/yhqM4uMhDOAZOGvxRWWIIGAXfPI5EAcsKGajIgAdX
|
||||
GWkzMc1a3JMzsXSveSUXboXvnfEilHquVVN+Hm2U9Y2eWy+daGCyl8j9+jyKRmzo
|
||||
sXzajagqNP/WrQTxoeIKbIaNlNoM/YmnySHNq/jjkWUYFFhK2dTz/qqfLCqrcygD
|
||||
iOARRi6QLQ2zbRiIOqf/tz2MNEPdgj6o31i2FT+pqLzIOTAhKXBXHD3V6TlSlRdY
|
||||
kwJWcIm8tjMqJ0UuJNRDvO1jQ9m4sbpLqRdL0HCaYHz5Pa1n04n/hzsCLIuePoY=
|
||||
=WTde
|
||||
-----END PGP SIGNATURE-----
|
@ -1,9 +1,9 @@
|
||||
Adjust libvirt-guests init files to conform to SUSE standards
|
||||
|
||||
Index: libvirt-3.0.0/tools/libvirt-guests.init.in
|
||||
Index: libvirt-3.1.0/tools/libvirt-guests.init.in
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/tools/libvirt-guests.init.in
|
||||
+++ libvirt-3.0.0/tools/libvirt-guests.init.in
|
||||
--- libvirt-3.1.0.orig/tools/libvirt-guests.init.in
|
||||
+++ libvirt-3.1.0/tools/libvirt-guests.init.in
|
||||
@@ -4,27 +4,27 @@
|
||||
# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
|
||||
#
|
||||
@ -45,10 +45,10 @@ Index: libvirt-3.0.0/tools/libvirt-guests.init.in
|
||||
#
|
||||
|
||||
exec @libexecdir@/libvirt-guests.sh "$@"
|
||||
Index: libvirt-3.0.0/tools/libvirt-guests.sh.in
|
||||
Index: libvirt-3.1.0/tools/libvirt-guests.sh.in
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/tools/libvirt-guests.sh.in
|
||||
+++ libvirt-3.0.0/tools/libvirt-guests.sh.in
|
||||
--- libvirt-3.1.0.orig/tools/libvirt-guests.sh.in
|
||||
+++ libvirt-3.1.0/tools/libvirt-guests.sh.in
|
||||
@@ -16,14 +16,13 @@
|
||||
# License along with this library. If not, see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
@ -208,10 +208,10 @@ Index: libvirt-3.0.0/tools/libvirt-guests.sh.in
|
||||
esac
|
||||
-exit $RETVAL
|
||||
+rc_exit
|
||||
Index: libvirt-3.0.0/tools/libvirt-guests.sysconf
|
||||
Index: libvirt-3.1.0/tools/libvirt-guests.sysconf
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/tools/libvirt-guests.sysconf
|
||||
+++ libvirt-3.0.0/tools/libvirt-guests.sysconf
|
||||
--- libvirt-3.1.0.orig/tools/libvirt-guests.sysconf
|
||||
+++ libvirt-3.1.0/tools/libvirt-guests.sysconf
|
||||
@@ -1,19 +1,29 @@
|
||||
+## Path: System/Virtualization/libvirt-guests
|
||||
+
|
||||
|
@ -2,10 +2,10 @@ Add POWER8 v2.0 and v2.1 to cpu map XML
|
||||
|
||||
From: <ro@suse.de>
|
||||
|
||||
Index: libvirt-3.0.0/src/cpu/cpu_map.xml
|
||||
Index: libvirt-3.1.0/src/cpu/cpu_map.xml
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/cpu/cpu_map.xml
|
||||
+++ libvirt-3.0.0/src/cpu/cpu_map.xml
|
||||
--- libvirt-3.1.0.orig/src/cpu/cpu_map.xml
|
||||
+++ libvirt-3.1.0/src/cpu/cpu_map.xml
|
||||
@@ -1569,6 +1569,8 @@
|
||||
<pvr value='0x004b0000' mask='0xffff0000'/>
|
||||
<pvr value='0x004c0000' mask='0xffff0000'/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-3.0.0/configure.ac
|
||||
Index: libvirt-3.1.0/configure.ac
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/configure.ac
|
||||
+++ libvirt-3.0.0/configure.ac
|
||||
--- libvirt-3.1.0.orig/configure.ac
|
||||
+++ libvirt-3.1.0/configure.ac
|
||||
@@ -255,6 +255,7 @@ LIBVIRT_ARG_LIBSSH
|
||||
LIBVIRT_ARG_LIBXML
|
||||
LIBVIRT_ARG_MACVTAP
|
||||
@ -10,7 +10,7 @@ Index: libvirt-3.0.0/configure.ac
|
||||
LIBVIRT_ARG_NSS
|
||||
LIBVIRT_ARG_NUMACTL
|
||||
LIBVIRT_ARG_OPENWSMAN
|
||||
@@ -294,6 +295,7 @@ LIBVIRT_CHECK_LIBSSH
|
||||
@@ -295,6 +296,7 @@ LIBVIRT_CHECK_LIBSSH
|
||||
LIBVIRT_CHECK_LIBXML
|
||||
LIBVIRT_CHECK_MACVTAP
|
||||
LIBVIRT_CHECK_NETCF
|
||||
@ -18,7 +18,7 @@ Index: libvirt-3.0.0/configure.ac
|
||||
LIBVIRT_CHECK_NUMACTL
|
||||
LIBVIRT_CHECK_NWFILTER
|
||||
LIBVIRT_CHECK_OPENWSMAN
|
||||
@@ -977,6 +979,7 @@ LIBVIRT_RESULT_LIBXL
|
||||
@@ -966,6 +968,7 @@ LIBVIRT_RESULT_LIBXL
|
||||
LIBVIRT_RESULT_LIBXML
|
||||
LIBVIRT_RESULT_MACVTAP
|
||||
LIBVIRT_RESULT_NETCF
|
||||
@ -26,11 +26,11 @@ Index: libvirt-3.0.0/configure.ac
|
||||
LIBVIRT_RESULT_NSS
|
||||
LIBVIRT_RESULT_NUMACTL
|
||||
LIBVIRT_RESULT_OPENWSMAN
|
||||
Index: libvirt-3.0.0/src/Makefile.am
|
||||
Index: libvirt-3.1.0/src/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/Makefile.am
|
||||
+++ libvirt-3.0.0/src/Makefile.am
|
||||
@@ -957,6 +957,10 @@ if WITH_NETCF
|
||||
--- libvirt-3.1.0.orig/src/Makefile.am
|
||||
+++ libvirt-3.1.0/src/Makefile.am
|
||||
@@ -959,6 +959,10 @@ if WITH_NETCF
|
||||
INTERFACE_DRIVER_SOURCES += \
|
||||
interface/interface_backend_netcf.c
|
||||
endif WITH_NETCF
|
||||
@ -41,7 +41,7 @@ Index: libvirt-3.0.0/src/Makefile.am
|
||||
if WITH_UDEV
|
||||
INTERFACE_DRIVER_SOURCES += \
|
||||
interface/interface_backend_udev.c
|
||||
@@ -1610,6 +1614,10 @@ if WITH_NETCF
|
||||
@@ -1620,6 +1624,10 @@ if WITH_NETCF
|
||||
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
|
||||
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
|
||||
endif WITH_NETCF
|
||||
@ -52,10 +52,10 @@ Index: libvirt-3.0.0/src/Makefile.am
|
||||
if WITH_UDEV
|
||||
libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
|
||||
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
|
||||
Index: libvirt-3.0.0/tools/virsh.c
|
||||
Index: libvirt-3.1.0/tools/virsh.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/tools/virsh.c
|
||||
+++ libvirt-3.0.0/tools/virsh.c
|
||||
--- libvirt-3.1.0.orig/tools/virsh.c
|
||||
+++ libvirt-3.1.0/tools/virsh.c
|
||||
@@ -602,6 +602,8 @@ virshShowVersion(vshControl *ctl ATTRIBU
|
||||
vshPrint(ctl, " Interface");
|
||||
# if defined(WITH_NETCF)
|
||||
@ -65,10 +65,10 @@ Index: libvirt-3.0.0/tools/virsh.c
|
||||
# elif defined(WITH_UDEV)
|
||||
vshPrint(ctl, " udev");
|
||||
# endif
|
||||
Index: libvirt-3.0.0/src/interface/interface_backend_netcf.c
|
||||
Index: libvirt-3.1.0/src/interface/interface_backend_netcf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/interface/interface_backend_netcf.c
|
||||
+++ libvirt-3.0.0/src/interface/interface_backend_netcf.c
|
||||
--- libvirt-3.1.0.orig/src/interface/interface_backend_netcf.c
|
||||
+++ libvirt-3.1.0/src/interface/interface_backend_netcf.c
|
||||
@@ -23,7 +23,12 @@
|
||||
|
||||
#include <config.h>
|
||||
@ -152,10 +152,10 @@ Index: libvirt-3.0.0/src/interface/interface_backend_netcf.c
|
||||
if (virSetSharedInterfaceDriver(&interfaceDriver) < 0)
|
||||
return -1;
|
||||
if (virRegisterStateDriver(&interfaceStateDriver) < 0)
|
||||
Index: libvirt-3.0.0/src/interface/interface_driver.c
|
||||
Index: libvirt-3.1.0/src/interface/interface_driver.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/interface/interface_driver.c
|
||||
+++ libvirt-3.0.0/src/interface/interface_driver.c
|
||||
--- libvirt-3.1.0.orig/src/interface/interface_driver.c
|
||||
+++ libvirt-3.1.0/src/interface/interface_driver.c
|
||||
@@ -30,8 +30,15 @@ interfaceRegister(void)
|
||||
if (netcfIfaceRegister() == 0)
|
||||
return 0;
|
||||
@ -173,10 +173,10 @@ Index: libvirt-3.0.0/src/interface/interface_driver.c
|
||||
if (udevIfaceRegister() == 0)
|
||||
return 0;
|
||||
#endif /* WITH_UDEV */
|
||||
Index: libvirt-3.0.0/m4/virt-netcontrol.m4
|
||||
Index: libvirt-3.1.0/m4/virt-netcontrol.m4
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-3.0.0/m4/virt-netcontrol.m4
|
||||
+++ libvirt-3.1.0/m4/virt-netcontrol.m4
|
||||
@@ -0,0 +1,39 @@
|
||||
+dnl The libnetcontrol library
|
||||
+dnl
|
||||
|
@ -1,3 +1,37 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 3 14:11:24 UTC 2017 - jfehlig@suse.com
|
||||
|
||||
- Update to libvirt 3.1.0
|
||||
- Modularize storage driver by splitting it into backend-specific
|
||||
subpackages
|
||||
- CVE-2017-2635, bsc#1027075
|
||||
- Many incremental improvements and bug fixes, see
|
||||
http://libvirt.org/news.html
|
||||
- Dropped patches:
|
||||
b018ada3-shunloadtest-build-fix.patch,
|
||||
f86a7a83-libxl-dom0-balloon-fix.patch,
|
||||
6e4759d0-libxl-timer-fix.patch,
|
||||
87df87e0-libxl-timer-tsc-emulate.patch,
|
||||
b4386fda-xenconfig-timer-fix.patch,
|
||||
d3970925-timer-tests.patch,
|
||||
321a28c6-libxl-default-disk-format.patch,
|
||||
bd116810-libxl-fix-disk-detach.patch,
|
||||
ff225538-libxl-autoballoon-setting.patch,
|
||||
c89a6e78-libxl-physinfo-cleanup.patch,
|
||||
d2b77608-libxl-maxmem-fix.patch,
|
||||
79692c38-libxl-dom0-maxmem.patch,
|
||||
4ab0c959-libxl-mem-leak.patch,
|
||||
2dc1cf19-libxl-double-free.patch,
|
||||
apparmor-errormsg-fix.patch,
|
||||
apparmor-alt-seclabel.patch,
|
||||
qemu-disable-namespaces.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 2 09:01:21 UTC 2017 - jengelh@inai.de
|
||||
|
||||
- Drop author list from description. Fix summary to be more
|
||||
accurate as to what the subpackage pertains to.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Feb 18 18:22:02 CET 2017 - kukuk@suse.de
|
||||
|
||||
|
212
libvirt.spec
212
libvirt.spec
@ -175,7 +175,7 @@
|
||||
|
||||
Name: libvirt
|
||||
Url: http://libvirt.org/
|
||||
Version: 3.0.0
|
||||
Version: 3.1.0
|
||||
Release: 0
|
||||
Summary: Library providing a simple virtualization API
|
||||
License: LGPL-2.1+
|
||||
@ -226,6 +226,10 @@ BuildRequires: pkgconfig(systemd)
|
||||
%if %{with_xen} || %{with_libxl}
|
||||
BuildRequires: xen-devel
|
||||
%endif
|
||||
%if %{with_qemu}
|
||||
# For managing ACLs
|
||||
BuildRequires: libacl-devel
|
||||
%endif
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libattr-devel
|
||||
BuildRequires: libgcrypt-devel
|
||||
@ -313,24 +317,8 @@ Source4: libvirtd-relocation-server.fw
|
||||
Source99: baselibs.conf
|
||||
Source100: %{name}-rpmlintrc
|
||||
# Upstream patches
|
||||
Patch0: b018ada3-shunloadtest-build-fix.patch
|
||||
Patch1: f86a7a83-libxl-dom0-balloon-fix.patch
|
||||
Patch2: 6e4759d0-libxl-timer-fix.patch
|
||||
Patch3: 87df87e0-libxl-timer-tsc-emulate.patch
|
||||
Patch4: b4386fda-xenconfig-timer-fix.patch
|
||||
Patch5: d3970925-timer-tests.patch
|
||||
Patch6: 321a28c6-libxl-default-disk-format.patch
|
||||
Patch7: bd116810-libxl-fix-disk-detach.patch
|
||||
Patch8: ff225538-libxl-autoballoon-setting.patch
|
||||
Patch9: c89a6e78-libxl-physinfo-cleanup.patch
|
||||
Patch10: d2b77608-libxl-maxmem-fix.patch
|
||||
Patch11: 79692c38-libxl-dom0-maxmem.patch
|
||||
Patch12: 4ab0c959-libxl-mem-leak.patch
|
||||
Patch13: 2dc1cf19-libxl-double-free.patch
|
||||
# Patches pending upstream review
|
||||
Patch100: libxl-dom-reset.patch
|
||||
Patch101: apparmor-errormsg-fix.patch
|
||||
Patch102: apparmor-alt-seclabel.patch
|
||||
# Need to go upstream
|
||||
Patch150: xen-pv-cdrom.patch
|
||||
Patch151: blockcopy-check-dst-identical-device.patch
|
||||
@ -355,10 +343,6 @@ Patch211: qemu-apparmor-screenshot.patch
|
||||
Patch212: libvirt-suse-netcontrol.patch
|
||||
Patch213: lxc-wait-after-eth-del.patch
|
||||
Patch214: libxl-qemu-emulator-caps.patch
|
||||
# Similar to upstream, temporarily disable qemu namespaces until all issues
|
||||
# are resolved. See
|
||||
# https://www.redhat.com/archives/libvir-list/2017-January/msg00790.html
|
||||
Patch300: qemu-disable-namespaces.patch
|
||||
# SLES-Only patches
|
||||
%if %{with_sle_build}
|
||||
Patch400: virt-create-rootfs.patch
|
||||
@ -373,16 +357,8 @@ on a single hardware system where the basic resources are driven by a
|
||||
Linux instance. The library aims to provide long term stable C API
|
||||
to interact with Linux virtualization technologies.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Daniel Veillard <veillard@redhat.com>
|
||||
Karel Zak <kzak@redhat.com>
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: API reference and website documentation
|
||||
Summary: API reference and website documentation for libvirt
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
%description doc
|
||||
@ -390,7 +366,7 @@ Includes the API reference for the libvirt C library, and a complete
|
||||
copy of the libvirt.org website documentation.
|
||||
|
||||
%package daemon
|
||||
Summary: Server side daemon and supporting files for libvirt library
|
||||
Summary: Server side daemon and supporting files for libvirt
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
# All runtime requirements for the libvirt package (runtime requirements
|
||||
@ -501,8 +477,8 @@ Requires: libvirt-daemon = %{version}-%{release}
|
||||
The secret driver plugin for the libvirtd daemon, providing
|
||||
an implementation of the secret key APIs.
|
||||
|
||||
%package daemon-driver-storage
|
||||
Summary: Storage driver plugin for the libvirtd daemon
|
||||
%package daemon-driver-storage-core
|
||||
Summary: Storage driver plugin including base backends for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libvirt-daemon = %{version}-%{release}
|
||||
Requires: nfs-utils
|
||||
@ -512,15 +488,115 @@ Requires: util-linux
|
||||
# From QEMU RPMs
|
||||
Requires: /usr/bin/qemu-img
|
||||
%endif
|
||||
# For LVM drivers
|
||||
|
||||
%description daemon-driver-storage-core
|
||||
The storage driver plugin for the libvirtd daemon, providing
|
||||
an implementation of the storage APIs using files, local disks, LVM, SCSI,
|
||||
iSCSI, and multipath storage.
|
||||
|
||||
%package daemon-driver-storage-logical
|
||||
Summary: Storage driver plugin for lvm volumes
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: lvm2
|
||||
# For ISCSI driver
|
||||
Requires: open-iscsi
|
||||
# For disk driver
|
||||
|
||||
%description daemon-driver-storage-logical
|
||||
The storage driver backend adding implementation of the storage APIs for block
|
||||
volumes using lvm.
|
||||
|
||||
%package daemon-driver-storage-disk
|
||||
Summary: Storage driver plugin for disk
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: device-mapper
|
||||
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: parted
|
||||
# For multipath support
|
||||
|
||||
%description daemon-driver-storage-disk
|
||||
The storage driver backend adding implementation of the storage APIs for block
|
||||
volumes using the host disks.
|
||||
|
||||
%package daemon-driver-storage-scsi
|
||||
Summary: Storage driver plugin for local scsi devices
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
|
||||
|
||||
%description daemon-driver-storage-scsi
|
||||
The storage driver backend adding implementation of the storage APIs for scsi
|
||||
host devices.
|
||||
|
||||
%package daemon-driver-storage-iscsi
|
||||
Summary: Storage driver plugin for iscsi
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: open-iscsi
|
||||
|
||||
%description daemon-driver-storage-iscsi
|
||||
The storage driver backend adding implementation of the storage APIs for iscsi
|
||||
volumes using the host iscsi stack.
|
||||
|
||||
%package daemon-driver-storage-mpath
|
||||
Summary: Storage driver plugin for multipath volumes
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: device-mapper
|
||||
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
|
||||
|
||||
%description daemon-driver-storage-mpath
|
||||
The storage driver backend adding implementation of the storage APIs for
|
||||
multipath storage using device mapper.
|
||||
|
||||
|
||||
%if %{with_storage_gluster}
|
||||
%package daemon-driver-storage-gluster
|
||||
Summary: Storage driver plugin for gluster
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
|
||||
|
||||
%description daemon-driver-storage-gluster
|
||||
The storage driver backend adding implementation of the storage APIs for gluster
|
||||
volumes using libgfapi.
|
||||
%endif
|
||||
|
||||
%if %{with_storage_rbd}
|
||||
%package daemon-driver-storage-rbd
|
||||
Summary: Storage driver plugin for rbd
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
|
||||
|
||||
%description daemon-driver-storage-rbd
|
||||
The storage driver backend adding implementation of the storage APIs for rbd
|
||||
volumes using the ceph protocol.
|
||||
%endif
|
||||
|
||||
%if %{with_storage_sheepdog}
|
||||
%package daemon-driver-storage-sheepdog
|
||||
Summary: Storage driver plugin for sheepdog
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: sheepdog
|
||||
|
||||
%description daemon-driver-storage-sheepdog
|
||||
The storage driver backend adding implementation of the storage APIs for
|
||||
sheepdog volumes using.
|
||||
%endif
|
||||
|
||||
%package daemon-driver-storage
|
||||
Summary: Storage driver plugin including all backends for the libvirtd daemon
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-storage-disk = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-storage-iscsi = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-storage-logical = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-storage-mpath = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-storage-scsi = %{version}-%{release}
|
||||
%if %{with_storage_gluster}
|
||||
Requires: libvirt-daemon-driver-storage-gluster = %{version}-%{release}
|
||||
%endif
|
||||
%if %{with_storage_rbd}
|
||||
Requires: libvirt-daemon-driver-storage-rbd = %{version}-%{release}
|
||||
%endif
|
||||
%if %{with_storage_sheepdog}
|
||||
Requires: libvirt-daemon-driver-storage-sheepdog = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description daemon-driver-storage
|
||||
The storage driver plugin for the libvirtd daemon, providing
|
||||
@ -536,7 +612,7 @@ Requires: libvirt-daemon = %{version}-%{release}
|
||||
# There really is a hard cross-driver dependency here
|
||||
Requires: /usr/bin/qemu-img
|
||||
Requires: libvirt-daemon-driver-network = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-storage = %{version}-%{release}
|
||||
Requires: libvirt-daemon-driver-storage-core = %{version}-%{release}
|
||||
# For image compression
|
||||
Requires: bzip2
|
||||
Requires: gzip
|
||||
@ -738,7 +814,7 @@ The client binaries needed to access the virtualization
|
||||
capabilities of recent versions of Linux (and other OSes).
|
||||
|
||||
%package libs
|
||||
Summary: Client side libraries
|
||||
Summary: Client side libraries for libvirt
|
||||
# So remote clients can access libvirt over SSH tunnel
|
||||
# (client invokes 'nc' against the UNIX socket on the server)
|
||||
Group: Development/Libraries/C and C++
|
||||
@ -807,23 +883,7 @@ libvirt plugin for NSS for translating domain names into IP addresses.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch150 -p1
|
||||
%patch151 -p1
|
||||
%patch152 -p1
|
||||
@ -846,7 +906,6 @@ libvirt plugin for NSS for translating domain names into IP addresses.
|
||||
%patch212 -p1
|
||||
%patch213 -p1
|
||||
%patch214 -p1
|
||||
%patch300 -p1
|
||||
%if %{with_sle_build}
|
||||
%patch400 -p1
|
||||
%endif
|
||||
@ -995,11 +1054,14 @@ export CFLAGS="$RPM_OPT_FLAGS"
|
||||
--with-storage-fs \
|
||||
--with-storage-lvm \
|
||||
--with-storage-iscsi \
|
||||
--with-storage-scsi \
|
||||
--with-storage-disk \
|
||||
--with-storage-mpath \
|
||||
%{?arg_storage_rbd} \
|
||||
%{?arg_storage_sheepdog} \
|
||||
%{?arg_storage_gluster} \
|
||||
--without-storage-zfs \
|
||||
--without-storage-vstorage \
|
||||
%{?arg_numactl} \
|
||||
%{?arg_numad} \
|
||||
--with-capng \
|
||||
@ -1048,6 +1110,8 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lock-driver/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/lock-driver/*.a
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/connection-driver/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/connection-driver/*.a
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/storage-backend/*.la
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/%{name}/storage-backend/*.a
|
||||
# remove currently unsupported locale(s)
|
||||
for dir in $RPM_BUILD_ROOT/usr/share/locale/*
|
||||
do
|
||||
@ -1446,9 +1510,43 @@ fi
|
||||
%{_libdir}/%{name}/connection-driver/libvirt_driver_secret.so
|
||||
|
||||
%files daemon-driver-storage
|
||||
|
||||
%files daemon-driver-storage-core
|
||||
%attr(0755, root, root) %{_libdir}/%{name}/libvirt_parthelper
|
||||
%dir %{_libdir}/%{name}/connection-driver
|
||||
%{_libdir}/%{name}/connection-driver/libvirt_driver_storage.so
|
||||
%dir %{_libdir}/%{name}/storage-backend
|
||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_fs.so
|
||||
|
||||
%files daemon-driver-storage-disk
|
||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_disk.so
|
||||
|
||||
%files daemon-driver-storage-logical
|
||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_logical.so
|
||||
|
||||
%files daemon-driver-storage-scsi
|
||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_scsi.so
|
||||
|
||||
%files daemon-driver-storage-iscsi
|
||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_iscsi.so
|
||||
|
||||
%files daemon-driver-storage-mpath
|
||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_mpath.so
|
||||
|
||||
%if %{with_storage_gluster}
|
||||
%files daemon-driver-storage-gluster
|
||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_gluster.so
|
||||
%endif
|
||||
|
||||
%if %{with_storage_rbd}
|
||||
%files daemon-driver-storage-rbd
|
||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_rbd.so
|
||||
%endif
|
||||
|
||||
%if %{with_storage_sheepdog}
|
||||
%files daemon-driver-storage-sheepdog
|
||||
%{_libdir}/%{name}/storage-backend/libvirt_storage_backend_sheepdog.so
|
||||
%endif
|
||||
|
||||
%if %{with_qemu}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-3.0.0/daemon/libvirtd.conf
|
||||
Index: libvirt-3.1.0/daemon/libvirtd.conf
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/daemon/libvirtd.conf
|
||||
+++ libvirt-3.0.0/daemon/libvirtd.conf
|
||||
--- libvirt-3.1.0.orig/daemon/libvirtd.conf
|
||||
+++ libvirt-3.1.0/daemon/libvirtd.conf
|
||||
@@ -18,8 +18,8 @@
|
||||
# It is necessary to setup a CA and issue server certificates before
|
||||
# using this capability.
|
||||
@ -13,11 +13,11 @@ Index: libvirt-3.0.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-3.0.0/daemon/libvirtd-config.c
|
||||
Index: libvirt-3.1.0/daemon/libvirtd-config.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/daemon/libvirtd-config.c
|
||||
+++ libvirt-3.0.0/daemon/libvirtd-config.c
|
||||
@@ -109,7 +109,7 @@ daemonConfigNew(bool privileged ATTRIBUT
|
||||
--- libvirt-3.1.0.orig/daemon/libvirtd-config.c
|
||||
+++ libvirt-3.1.0/daemon/libvirtd-config.c
|
||||
@@ -110,7 +110,7 @@ daemonConfigNew(bool privileged ATTRIBUT
|
||||
if (VIR_ALLOC(data) < 0)
|
||||
return NULL;
|
||||
|
||||
@ -26,10 +26,10 @@ Index: libvirt-3.0.0/daemon/libvirtd-config.c
|
||||
data->listen_tcp = 0;
|
||||
|
||||
if (VIR_STRDUP(data->tls_port, LIBVIRTD_TLS_PORT) < 0 ||
|
||||
Index: libvirt-3.0.0/daemon/test_libvirtd.aug.in
|
||||
Index: libvirt-3.1.0/daemon/test_libvirtd.aug.in
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/daemon/test_libvirtd.aug.in
|
||||
+++ libvirt-3.0.0/daemon/test_libvirtd.aug.in
|
||||
--- libvirt-3.1.0.orig/daemon/test_libvirtd.aug.in
|
||||
+++ libvirt-3.1.0/daemon/test_libvirtd.aug.in
|
||||
@@ -2,7 +2,7 @@ module Test_libvirtd =
|
||||
::CONFIG::
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
Adjust libvirtd sysconfig file to conform to SUSE standards
|
||||
|
||||
Index: libvirt-3.0.0/daemon/libvirtd.sysconf
|
||||
Index: libvirt-3.1.0/daemon/libvirtd.sysconf
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/daemon/libvirtd.sysconf
|
||||
+++ libvirt-3.0.0/daemon/libvirtd.sysconf
|
||||
--- libvirt-3.1.0.orig/daemon/libvirtd.sysconf
|
||||
+++ libvirt-3.1.0/daemon/libvirtd.sysconf
|
||||
@@ -1,16 +1,25 @@
|
||||
+## Path: System/Virtualization/libvirt
|
||||
+
|
||||
|
@ -8,10 +8,10 @@ Date: Mon Jun 23 15:51:20 2014 -0600
|
||||
option, but domainReset can be implemented in the libxl driver by
|
||||
forcibly destroying the domain and starting it again.
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
Index: libvirt-3.1.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
--- libvirt-3.1.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-3.1.0/src/libxl/libxl_driver.c
|
||||
@@ -1389,6 +1389,61 @@ libxlDomainReboot(virDomainPtr dom, unsi
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ Index: libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
libxlDomainDestroyFlags(virDomainPtr dom,
|
||||
unsigned int flags)
|
||||
{
|
||||
@@ -6442,6 +6497,7 @@ static virHypervisorDriver libxlHypervis
|
||||
@@ -6497,6 +6552,7 @@ static virHypervisorDriver libxlHypervis
|
||||
.domainShutdown = libxlDomainShutdown, /* 0.9.0 */
|
||||
.domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */
|
||||
.domainReboot = libxlDomainReboot, /* 0.9.0 */
|
||||
|
@ -8,10 +8,10 @@ as the default <emulator>, instead of the qemu-xen one.
|
||||
|
||||
See FATE#320638 for details.
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_capabilities.c
|
||||
Index: libvirt-3.1.0/src/libxl/libxl_capabilities.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_capabilities.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_capabilities.c
|
||||
--- libvirt-3.1.0.orig/src/libxl/libxl_capabilities.c
|
||||
+++ libvirt-3.1.0/src/libxl/libxl_capabilities.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "libxl_capabilities.h"
|
||||
#include "cpu/cpu_x86.h"
|
||||
@ -20,7 +20,7 @@ Index: libvirt-3.0.0/src/libxl/libxl_capabilities.c
|
||||
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_LIBXL
|
||||
@@ -489,7 +490,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virC
|
||||
@@ -491,7 +492,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virC
|
||||
if ((guest = virCapabilitiesAddGuest(caps,
|
||||
guest_archs[i].hvm ? VIR_DOMAIN_OSTYPE_HVM : VIR_DOMAIN_OSTYPE_XEN,
|
||||
guest_archs[i].arch,
|
||||
|
@ -3,10 +3,10 @@ https://bugzilla.novell.com/show_bug.cgi?id=879425
|
||||
src/libxl/libxl_conf.c | 25 +++++++++++++++++++++++++
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
Index: libvirt-3.1.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
--- libvirt-3.1.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.1.0/src/libxl/libxl_conf.c
|
||||
@@ -609,6 +609,30 @@ libxlDiskSetDiscard(libxl_device_disk *x
|
||||
#endif
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ Signed-off-by: Jim Fehlig <jfehlig@suse.com>
|
||||
tools/virsh.pod | 8 ++++++++
|
||||
6 files changed, 125 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: libvirt-3.0.0/include/libvirt/libvirt-domain.h
|
||||
Index: libvirt-3.1.0/include/libvirt/libvirt-domain.h
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/include/libvirt/libvirt-domain.h
|
||||
+++ libvirt-3.0.0/include/libvirt/libvirt-domain.h
|
||||
--- libvirt-3.1.0.orig/include/libvirt/libvirt-domain.h
|
||||
+++ libvirt-3.1.0/include/libvirt/libvirt-domain.h
|
||||
@@ -1000,6 +1000,31 @@ typedef enum {
|
||||
*/
|
||||
# define VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT "auto_converge.increment"
|
||||
@ -52,11 +52,11 @@ Index: libvirt-3.0.0/include/libvirt/libvirt-domain.h
|
||||
/* Domain migration. */
|
||||
virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn,
|
||||
unsigned long flags, const char *dname,
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
Index: libvirt-3.1.0/src/libxl/libxl_driver.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
@@ -6060,6 +6060,9 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
--- libvirt-3.1.0.orig/src/libxl/libxl_driver.c
|
||||
+++ libvirt-3.1.0/src/libxl/libxl_driver.c
|
||||
@@ -6115,6 +6115,9 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
const char *dname = NULL;
|
||||
const char *uri = NULL;
|
||||
int ret = -1;
|
||||
@ -66,7 +66,7 @@ Index: libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
|
||||
#ifdef LIBXL_HAVE_NO_SUSPEND_RESUME
|
||||
virReportUnsupportedError();
|
||||
@@ -6076,6 +6079,18 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
@@ -6131,6 +6134,18 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
virTypedParamsGetString(params, nparams,
|
||||
VIR_MIGRATE_PARAM_DEST_NAME,
|
||||
&dname) < 0 ||
|
||||
@ -85,9 +85,9 @@ Index: libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
virTypedParamsGetString(params, nparams,
|
||||
VIR_MIGRATE_PARAM_URI,
|
||||
&uri) < 0)
|
||||
@@ -6090,11 +6105,11 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
@@ -6145,11 +6160,11 @@ libxlDomainMigratePerform3Params(virDoma
|
||||
|
||||
if (flags & VIR_MIGRATE_PEER2PEER) {
|
||||
if ((flags & (VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER))) {
|
||||
if (libxlDomainMigrationPerformP2P(driver, vm, dom->conn, dom_xml,
|
||||
- dconnuri, uri, dname, flags) < 0)
|
||||
+ dconnuri, uri, dname, &props) < 0)
|
||||
@ -99,11 +99,11 @@ Index: libvirt-3.0.0/src/libxl/libxl_driver.c
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_migration.c
|
||||
Index: libvirt-3.1.0/src/libxl/libxl_migration.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_migration.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_migration.c
|
||||
@@ -358,18 +358,39 @@ libxlMigrateReceive(virNetSocketPtr sock
|
||||
--- libvirt-3.1.0.orig/src/libxl/libxl_migration.c
|
||||
+++ libvirt-3.1.0/src/libxl/libxl_migration.c
|
||||
@@ -359,18 +359,39 @@ libxlMigrateReceive(virNetSocketPtr sock
|
||||
static int
|
||||
libxlDoMigrateSend(libxlDriverPrivatePtr driver,
|
||||
virDomainObjPtr vm,
|
||||
@ -145,7 +145,25 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.c
|
||||
if (ret != 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Failed to send migration data to destination host"));
|
||||
@@ -727,7 +748,7 @@ libxlDoMigrateP2P(libxlDriverPrivatePtr
|
||||
@@ -908,7 +929,7 @@ struct libxlTunnelControl {
|
||||
static int
|
||||
libxlMigrationStartTunnel(libxlDriverPrivatePtr driver,
|
||||
virDomainObjPtr vm,
|
||||
- unsigned long flags,
|
||||
+ const libxlDomainMigrationProps *props,
|
||||
virStreamPtr st,
|
||||
struct libxlTunnelControl **tnl)
|
||||
{
|
||||
@@ -941,7 +962,7 @@ libxlMigrationStartTunnel(libxlDriverPri
|
||||
|
||||
virObjectUnlock(vm);
|
||||
/* Send data to pipe */
|
||||
- ret = libxlDoMigrateSend(driver, vm, flags, tc->dataFD[1]);
|
||||
+ ret = libxlDoMigrateSend(driver, vm, props, tc->dataFD[1]);
|
||||
virObjectLock(vm);
|
||||
|
||||
out:
|
||||
@@ -976,7 +997,7 @@ libxlDoMigrateP2P(libxlDriverPrivatePtr
|
||||
const char *dconnuri ATTRIBUTE_UNUSED,
|
||||
const char *dname,
|
||||
const char *uri,
|
||||
@ -154,7 +172,7 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.c
|
||||
{
|
||||
virDomainPtr ddomain = NULL;
|
||||
virTypedParameterPtr params = NULL;
|
||||
@@ -764,7 +785,7 @@ libxlDoMigrateP2P(libxlDriverPrivatePtr
|
||||
@@ -1016,11 +1037,11 @@ libxlDoMigrateP2P(libxlDriverPrivatePtr
|
||||
/* We don't require the destination to have P2P support
|
||||
* as it looks to be normal migration from the receiver perpective.
|
||||
*/
|
||||
@ -163,16 +181,36 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.c
|
||||
|
||||
VIR_DEBUG("Prepare3");
|
||||
virObjectUnlock(vm);
|
||||
@@ -789,7 +810,7 @@ libxlDoMigrateP2P(libxlDriverPrivatePtr
|
||||
- if (flags & VIR_MIGRATE_TUNNELLED) {
|
||||
+ if (props->virFlags & VIR_MIGRATE_TUNNELLED) {
|
||||
if (!(st = virStreamNew(dconn, 0)))
|
||||
goto cleanup;
|
||||
ret = dconn->driver->domainMigratePrepareTunnel3Params
|
||||
@@ -1034,7 +1055,7 @@ libxlDoMigrateP2P(libxlDriverPrivatePtr
|
||||
if (ret == -1)
|
||||
goto cleanup;
|
||||
|
||||
- if (!(flags & VIR_MIGRATE_TUNNELLED)) {
|
||||
+ if (!(props->virFlags & VIR_MIGRATE_TUNNELLED)) {
|
||||
if (uri_out) {
|
||||
if (virTypedParamsReplaceString(¶ms, &nparams,
|
||||
VIR_MIGRATE_PARAM_URI, uri_out) < 0) {
|
||||
@@ -1049,11 +1070,11 @@ libxlDoMigrateP2P(libxlDriverPrivatePtr
|
||||
}
|
||||
|
||||
VIR_DEBUG("Perform3 uri=%s", NULLSTR(uri_out));
|
||||
ret = libxlDomainMigrationPerform(driver, vm, NULL, NULL,
|
||||
- uri_out, NULL, flags);
|
||||
+ uri_out, NULL, props);
|
||||
|
||||
- if (flags & VIR_MIGRATE_TUNNELLED)
|
||||
- ret = libxlMigrationStartTunnel(driver, vm, flags, st, &tc);
|
||||
+ if (props->virFlags & VIR_MIGRATE_TUNNELLED)
|
||||
+ ret = libxlMigrationStartTunnel(driver, vm, props, st, &tc);
|
||||
else
|
||||
ret = libxlDomainMigrationPerform(driver, vm, NULL, NULL,
|
||||
- uri_out, NULL, flags);
|
||||
+ uri_out, NULL, props);
|
||||
if (ret < 0)
|
||||
orig_err = virSaveLastError();
|
||||
@@ -821,7 +842,7 @@ libxlDoMigrateP2P(libxlDriverPrivatePtr
|
||||
|
||||
@@ -1084,14 +1105,14 @@ libxlDoMigrateP2P(libxlDriverPrivatePtr
|
||||
orig_err = virSaveLastError();
|
||||
|
||||
VIR_DEBUG("Confirm3 cancelled=%d vm=%p", cancelled, vm);
|
||||
@ -181,7 +219,15 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.c
|
||||
|
||||
if (ret < 0)
|
||||
VIR_WARN("Guest %s probably left in 'paused' state on source",
|
||||
@@ -870,7 +891,7 @@ libxlDomainMigrationPerformP2P(libxlDriv
|
||||
vm->def->name);
|
||||
|
||||
cleanup:
|
||||
- if (flags & VIR_MIGRATE_TUNNELLED) {
|
||||
+ if (props->virFlags & VIR_MIGRATE_TUNNELLED) {
|
||||
libxlMigrationStopTunnel(tc);
|
||||
virObjectUnref(st);
|
||||
}
|
||||
@@ -1138,7 +1159,7 @@ libxlDomainMigrationPerformP2P(libxlDriv
|
||||
const char *dconnuri,
|
||||
const char *uri_str ATTRIBUTE_UNUSED,
|
||||
const char *dname,
|
||||
@ -190,7 +236,7 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.c
|
||||
{
|
||||
int ret = -1;
|
||||
bool useParams;
|
||||
@@ -905,7 +926,7 @@ libxlDomainMigrationPerformP2P(libxlDriv
|
||||
@@ -1173,7 +1194,7 @@ libxlDomainMigrationPerformP2P(libxlDriv
|
||||
}
|
||||
|
||||
ret = libxlDoMigrateP2P(driver, vm, sconn, xmlin, dconn, dconnuri,
|
||||
@ -199,7 +245,7 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.c
|
||||
|
||||
cleanup:
|
||||
orig_err = virSaveLastError();
|
||||
@@ -927,7 +948,7 @@ libxlDomainMigrationPerform(libxlDriverP
|
||||
@@ -1195,7 +1216,7 @@ libxlDomainMigrationPerform(libxlDriverP
|
||||
const char *dconnuri ATTRIBUTE_UNUSED,
|
||||
const char *uri_str,
|
||||
const char *dname ATTRIBUTE_UNUSED,
|
||||
@ -208,7 +254,7 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.c
|
||||
{
|
||||
libxlDomainObjPrivatePtr priv = vm->privateData;
|
||||
char *hostname = NULL;
|
||||
@@ -967,7 +988,7 @@ libxlDomainMigrationPerform(libxlDriverP
|
||||
@@ -1235,7 +1256,7 @@ libxlDomainMigrationPerform(libxlDriverP
|
||||
|
||||
/* suspend vm and send saved data to dst through socket fd */
|
||||
virObjectUnlock(vm);
|
||||
@ -217,11 +263,11 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.c
|
||||
virObjectLock(vm);
|
||||
|
||||
cleanup:
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_migration.h
|
||||
Index: libvirt-3.1.0/src/libxl/libxl_migration.h
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_migration.h
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_migration.h
|
||||
@@ -38,6 +38,10 @@
|
||||
--- libvirt-3.1.0.orig/src/libxl/libxl_migration.h
|
||||
+++ libvirt-3.1.0/src/libxl/libxl_migration.h
|
||||
@@ -39,6 +39,10 @@
|
||||
VIR_MIGRATE_PARAM_URI, VIR_TYPED_PARAM_STRING, \
|
||||
VIR_MIGRATE_PARAM_DEST_NAME, VIR_TYPED_PARAM_STRING, \
|
||||
VIR_MIGRATE_PARAM_DEST_XML, VIR_TYPED_PARAM_STRING, \
|
||||
@ -232,7 +278,7 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.h
|
||||
NULL
|
||||
|
||||
char *
|
||||
@@ -61,6 +65,14 @@ libxlDomainMigrationPrepare(virConnectPt
|
||||
@@ -70,6 +74,14 @@ libxlDomainMigrationPrepare(virConnectPt
|
||||
int cookieinlen,
|
||||
unsigned int flags);
|
||||
|
||||
@ -247,7 +293,7 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.h
|
||||
int
|
||||
libxlDomainMigrationPerformP2P(libxlDriverPrivatePtr driver,
|
||||
virDomainObjPtr vm,
|
||||
@@ -69,7 +81,7 @@ libxlDomainMigrationPerformP2P(libxlDriv
|
||||
@@ -78,7 +90,7 @@ libxlDomainMigrationPerformP2P(libxlDriv
|
||||
const char *dconnuri,
|
||||
const char *uri_str,
|
||||
const char *dname,
|
||||
@ -256,7 +302,7 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.h
|
||||
|
||||
int
|
||||
libxlDomainMigrationPerform(libxlDriverPrivatePtr driver,
|
||||
@@ -78,7 +90,7 @@ libxlDomainMigrationPerform(libxlDriverP
|
||||
@@ -87,7 +99,7 @@ libxlDomainMigrationPerform(libxlDriverP
|
||||
const char *dconnuri,
|
||||
const char *uri_str,
|
||||
const char *dname,
|
||||
@ -265,11 +311,11 @@ Index: libvirt-3.0.0/src/libxl/libxl_migration.h
|
||||
|
||||
virDomainPtr
|
||||
libxlDomainMigrationFinish(virConnectPtr dconn,
|
||||
Index: libvirt-3.0.0/tools/virsh-domain.c
|
||||
Index: libvirt-3.1.0/tools/virsh-domain.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/tools/virsh-domain.c
|
||||
+++ libvirt-3.0.0/tools/virsh-domain.c
|
||||
@@ -10135,6 +10135,22 @@ static const vshCmdOptDef opts_migrate[]
|
||||
--- libvirt-3.1.0.orig/tools/virsh-domain.c
|
||||
+++ libvirt-3.1.0/tools/virsh-domain.c
|
||||
@@ -10222,6 +10222,22 @@ static const vshCmdOptDef opts_migrate[]
|
||||
.type = VSH_OT_STRING,
|
||||
.help = N_("filename containing updated persistent XML for the target")
|
||||
},
|
||||
@ -292,7 +338,7 @@ Index: libvirt-3.0.0/tools/virsh-domain.c
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
@@ -10158,6 +10174,7 @@ doMigrate(void *opaque)
|
||||
@@ -10245,6 +10261,7 @@ doMigrate(void *opaque)
|
||||
unsigned long long ullOpt = 0;
|
||||
int rv;
|
||||
virConnectPtr dconn = data->dconn;
|
||||
@ -300,7 +346,7 @@ Index: libvirt-3.0.0/tools/virsh-domain.c
|
||||
|
||||
sigemptyset(&sigmask);
|
||||
sigaddset(&sigmask, SIGINT);
|
||||
@@ -10277,6 +10294,27 @@ doMigrate(void *opaque)
|
||||
@@ -10364,6 +10381,27 @@ doMigrate(void *opaque)
|
||||
goto save_error;
|
||||
}
|
||||
|
||||
@ -328,11 +374,11 @@ Index: libvirt-3.0.0/tools/virsh-domain.c
|
||||
if (vshCommandOptStringReq(ctl, cmd, "xml", &opt) < 0)
|
||||
goto out;
|
||||
if (opt) {
|
||||
Index: libvirt-3.0.0/tools/virsh.pod
|
||||
Index: libvirt-3.1.0/tools/virsh.pod
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/tools/virsh.pod
|
||||
+++ libvirt-3.0.0/tools/virsh.pod
|
||||
@@ -1709,6 +1709,14 @@ compression. I<--comp-mt-threads> and I<
|
||||
--- libvirt-3.1.0.orig/tools/virsh.pod
|
||||
+++ libvirt-3.1.0/tools/virsh.pod
|
||||
@@ -1732,6 +1732,14 @@ compression. I<--comp-mt-threads> and I<
|
||||
of compress threads on source and the number of decompress threads on target
|
||||
respectively. I<--comp-xbzrle-cache> sets size of page cache in bytes.
|
||||
|
||||
|
@ -7,10 +7,10 @@ and npiv.
|
||||
|
||||
For more details, see bsc#954872 and FATE#319810
|
||||
|
||||
Index: libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
Index: libvirt-3.1.0/src/libxl/libxl_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.0.0/src/libxl/libxl_conf.c
|
||||
--- libvirt-3.1.0.orig/src/libxl/libxl_conf.c
|
||||
+++ libvirt-3.1.0/src/libxl/libxl_conf.c
|
||||
@@ -609,6 +609,25 @@ libxlDiskSetDiscard(libxl_device_disk *x
|
||||
#endif
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ device with the same name that is being created.
|
||||
src/lxc/lxc_process.c | 1 +
|
||||
3 files changed, 4 insertions(+)
|
||||
|
||||
Index: libvirt-3.0.0/src/lxc/lxc_controller.c
|
||||
Index: libvirt-3.1.0/src/lxc/lxc_controller.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/lxc/lxc_controller.c
|
||||
+++ libvirt-3.0.0/src/lxc/lxc_controller.c
|
||||
--- libvirt-3.1.0.orig/src/lxc/lxc_controller.c
|
||||
+++ libvirt-3.1.0/src/lxc/lxc_controller.c
|
||||
@@ -1997,6 +1997,7 @@ static int virLXCControllerDeleteInterfa
|
||||
if (virNetDevVethDelete(ctrl->veths[i]) < 0)
|
||||
ret = -1;
|
||||
@ -25,10 +25,10 @@ Index: libvirt-3.0.0/src/lxc/lxc_controller.c
|
||||
|
||||
return ret;
|
||||
}
|
||||
Index: libvirt-3.0.0/src/lxc/lxc_driver.c
|
||||
Index: libvirt-3.1.0/src/lxc/lxc_driver.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/lxc/lxc_driver.c
|
||||
+++ libvirt-3.0.0/src/lxc/lxc_driver.c
|
||||
--- libvirt-3.1.0.orig/src/lxc/lxc_driver.c
|
||||
+++ libvirt-3.1.0/src/lxc/lxc_driver.c
|
||||
@@ -4036,6 +4036,7 @@ lxcDomainAttachDeviceNetLive(virConnectP
|
||||
case VIR_DOMAIN_NET_TYPE_NETWORK:
|
||||
case VIR_DOMAIN_NET_TYPE_ETHERNET:
|
||||
@ -45,10 +45,10 @@ Index: libvirt-3.0.0/src/lxc/lxc_driver.c
|
||||
break;
|
||||
|
||||
/* It'd be nice to support this, but with macvlan
|
||||
Index: libvirt-3.0.0/src/lxc/lxc_process.c
|
||||
Index: libvirt-3.1.0/src/lxc/lxc_process.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/lxc/lxc_process.c
|
||||
+++ libvirt-3.0.0/src/lxc/lxc_process.c
|
||||
--- libvirt-3.1.0.orig/src/lxc/lxc_process.c
|
||||
+++ libvirt-3.1.0/src/lxc/lxc_process.c
|
||||
@@ -221,6 +221,7 @@ static void virLXCProcessCleanup(virLXCD
|
||||
}
|
||||
networkReleaseActualDevice(vm->def, iface);
|
||||
|
@ -2,10 +2,10 @@ Canonicalize hostarch name ppc64le to ppc64
|
||||
|
||||
See bnc#894956
|
||||
|
||||
Index: libvirt-3.0.0/src/util/virarch.c
|
||||
Index: libvirt-3.1.0/src/util/virarch.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/util/virarch.c
|
||||
+++ libvirt-3.0.0/src/util/virarch.c
|
||||
--- libvirt-3.1.0.orig/src/util/virarch.c
|
||||
+++ libvirt-3.1.0/src/util/virarch.c
|
||||
@@ -169,6 +169,8 @@ virArch virArchFromHost(void)
|
||||
arch = VIR_ARCH_I686;
|
||||
} else if (STREQ(ut.machine, "amd64")) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-3.0.0/examples/apparmor/libvirt-qemu
|
||||
Index: libvirt-3.1.0/examples/apparmor/libvirt-qemu
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/examples/apparmor/libvirt-qemu
|
||||
+++ libvirt-3.0.0/examples/apparmor/libvirt-qemu
|
||||
--- libvirt-3.1.0.orig/examples/apparmor/libvirt-qemu
|
||||
+++ libvirt-3.1.0/examples/apparmor/libvirt-qemu
|
||||
@@ -154,3 +154,6 @@
|
||||
/etc/udev/udev.conf r,
|
||||
/sys/bus/ r,
|
||||
|
@ -1,29 +0,0 @@
|
||||
commit eaa2043dee8b8ada7b0b80c9b5b0b0db575a4abf
|
||||
Author: Daniel P. Berrange <berrange@redhat.com>
|
||||
Date: Wed Jan 18 10:49:59 2017 +0000
|
||||
|
||||
Disable use of namespaces by default
|
||||
|
||||
When namespaces are enabled there is currently breakage when
|
||||
using disk hotplug and when using AppArmor
|
||||
|
||||
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
Index: libvirt-3.0.0/src/qemu/qemu_conf.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/qemu/qemu_conf.c
|
||||
+++ libvirt-3.0.0/src/qemu/qemu_conf.c
|
||||
@@ -317,13 +317,6 @@ virQEMUDriverConfigPtr virQEMUDriverConf
|
||||
if (!(cfg->namespaces = virBitmapNew(QEMU_DOMAIN_NS_LAST)))
|
||||
goto error;
|
||||
|
||||
-#if defined(__linux__)
|
||||
- if (privileged &&
|
||||
- virProcessNamespaceAvailable(VIR_PROCESS_NAMESPACE_MNT) == 0 &&
|
||||
- virBitmapSetBit(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) < 0)
|
||||
- goto error;
|
||||
-#endif /* defined(__linux__) */
|
||||
-
|
||||
#ifdef DEFAULT_LOADER_NVRAM
|
||||
if (virFirmwareParseList(DEFAULT_LOADER_NVRAM,
|
||||
&cfg->firmwares,
|
@ -8,10 +8,10 @@ Subject: [PATCH] support managed pci devices in xen driver
|
||||
src/xenxs/xen_xm.c | 28 +++++++++++++++++++++++++++-
|
||||
2 files changed, 35 insertions(+), 15 deletions(-)
|
||||
|
||||
Index: libvirt-3.0.0/src/xenconfig/xen_common.c
|
||||
Index: libvirt-3.1.0/src/xenconfig/xen_common.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/xenconfig/xen_common.c
|
||||
+++ libvirt-3.0.0/src/xenconfig/xen_common.c
|
||||
--- libvirt-3.1.0.orig/src/xenconfig/xen_common.c
|
||||
+++ libvirt-3.1.0/src/xenconfig/xen_common.c
|
||||
@@ -394,6 +394,8 @@ xenParsePCI(virConfPtr conf, virDomainDe
|
||||
{
|
||||
virConfValuePtr list = virConfGetValue(conf, "pci");
|
||||
@ -66,10 +66,10 @@ Index: libvirt-3.0.0/src/xenconfig/xen_common.c
|
||||
hostdev->source.subsys.type = VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI;
|
||||
hostdev->source.subsys.u.pci.addr.domain = domainID;
|
||||
hostdev->source.subsys.u.pci.addr.bus = busID;
|
||||
Index: libvirt-3.0.0/src/xenconfig/xen_sxpr.c
|
||||
Index: libvirt-3.1.0/src/xenconfig/xen_sxpr.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-3.0.0/src/xenconfig/xen_sxpr.c
|
||||
--- libvirt-3.1.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-3.1.0/src/xenconfig/xen_sxpr.c
|
||||
@@ -1062,6 +1062,7 @@ xenParseSxprPCI(virDomainDefPtr def,
|
||||
int busID;
|
||||
int slotID;
|
||||
|
@ -7,10 +7,10 @@ suse-qemu-conf-secdriver.patch, suse-qemu-conf-lockmgr.patch,
|
||||
etc.), but for now they are all lumped together in this
|
||||
single patch.
|
||||
|
||||
Index: libvirt-3.0.0/src/qemu/qemu.conf
|
||||
Index: libvirt-3.1.0/src/qemu/qemu.conf
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/qemu/qemu.conf
|
||||
+++ libvirt-3.0.0/src/qemu/qemu.conf
|
||||
--- libvirt-3.1.0.orig/src/qemu/qemu.conf
|
||||
+++ libvirt-3.1.0/src/qemu/qemu.conf
|
||||
@@ -283,11 +283,20 @@
|
||||
# isolation, but it cannot appear in a list of drivers.
|
||||
#
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: libvirt-3.0.0/daemon/libvirtd.service.in
|
||||
Index: libvirt-3.1.0/daemon/libvirtd.service.in
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/daemon/libvirtd.service.in
|
||||
+++ libvirt-3.0.0/daemon/libvirtd.service.in
|
||||
@@ -13,6 +13,7 @@ After=iscsid.service
|
||||
--- libvirt-3.1.0.orig/daemon/libvirtd.service.in
|
||||
+++ libvirt-3.1.0/daemon/libvirtd.service.in
|
||||
@@ -14,6 +14,7 @@ After=iscsid.service
|
||||
After=apparmor.service
|
||||
After=local-fs.target
|
||||
After=remote-fs.target
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-3.0.0/tools/Makefile.am
|
||||
Index: libvirt-3.1.0/tools/Makefile.am
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/tools/Makefile.am
|
||||
+++ libvirt-3.0.0/tools/Makefile.am
|
||||
--- libvirt-3.1.0.orig/tools/Makefile.am
|
||||
+++ libvirt-3.1.0/tools/Makefile.am
|
||||
@@ -43,6 +43,7 @@ PODFILES = \
|
||||
virt-sanlock-cleanup.pod \
|
||||
virt-xml-validate.pod \
|
||||
@ -28,10 +28,10 @@ Index: libvirt-3.0.0/tools/Makefile.am
|
||||
virt-xml-validate: virt-xml-validate.in Makefile
|
||||
$(AM_V_GEN)sed -e 's|[@]schemadir@|$(pkgdatadir)/schemas|g' \
|
||||
-e 's|[@]VERSION@|$(VERSION)|g' \
|
||||
Index: libvirt-3.0.0/tools/virt-create-rootfs
|
||||
Index: libvirt-3.1.0/tools/virt-create-rootfs
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-3.0.0/tools/virt-create-rootfs
|
||||
+++ libvirt-3.1.0/tools/virt-create-rootfs
|
||||
@@ -0,0 +1,214 @@
|
||||
+#!/bin/sh
|
||||
+set -e
|
||||
@ -247,10 +247,10 @@ Index: libvirt-3.0.0/tools/virt-create-rootfs
|
||||
+ echo "pts/0" >> "$ROOT/etc/securetty"
|
||||
+ chroot "$ROOT" /usr/bin/passwd
|
||||
+fi
|
||||
Index: libvirt-3.0.0/tools/virt-create-rootfs.pod
|
||||
Index: libvirt-3.1.0/tools/virt-create-rootfs.pod
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libvirt-3.0.0/tools/virt-create-rootfs.pod
|
||||
+++ libvirt-3.1.0/tools/virt-create-rootfs.pod
|
||||
@@ -0,0 +1,77 @@
|
||||
+=head1 NAME
|
||||
+
|
||||
|
@ -1,9 +1,9 @@
|
||||
Adjust virtlockd init files to conform to SUSE standards
|
||||
|
||||
Index: libvirt-3.0.0/src/locking/virtlockd.sysconf
|
||||
Index: libvirt-3.1.0/src/locking/virtlockd.sysconf
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/locking/virtlockd.sysconf
|
||||
+++ libvirt-3.0.0/src/locking/virtlockd.sysconf
|
||||
--- libvirt-3.1.0.orig/src/locking/virtlockd.sysconf
|
||||
+++ libvirt-3.1.0/src/locking/virtlockd.sysconf
|
||||
@@ -1,3 +1,7 @@
|
||||
+## Path: System/Virtualization/virtlockd
|
||||
+
|
||||
@ -12,10 +12,10 @@ Index: libvirt-3.0.0/src/locking/virtlockd.sysconf
|
||||
#
|
||||
# Pass extra arguments to virtlockd
|
||||
#VIRTLOCKD_ARGS=
|
||||
Index: libvirt-3.0.0/src/locking/virtlockd.init.in
|
||||
Index: libvirt-3.1.0/src/locking/virtlockd.init.in
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/locking/virtlockd.init.in
|
||||
+++ libvirt-3.0.0/src/locking/virtlockd.init.in
|
||||
--- libvirt-3.1.0.orig/src/locking/virtlockd.init.in
|
||||
+++ libvirt-3.1.0/src/locking/virtlockd.init.in
|
||||
@@ -4,59 +4,57 @@
|
||||
# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
|
||||
#
|
||||
|
@ -1,9 +1,9 @@
|
||||
Adjust virtlogd init files to conform to SUSE standards
|
||||
|
||||
Index: libvirt-3.0.0/src/logging/virtlogd.init.in
|
||||
Index: libvirt-3.1.0/src/logging/virtlogd.init.in
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/logging/virtlogd.init.in
|
||||
+++ libvirt-3.0.0/src/logging/virtlogd.init.in
|
||||
--- libvirt-3.1.0.orig/src/logging/virtlogd.init.in
|
||||
+++ libvirt-3.1.0/src/logging/virtlogd.init.in
|
||||
@@ -4,59 +4,56 @@
|
||||
# http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/initscrcomconv.html
|
||||
#
|
||||
@ -126,10 +126,10 @@ Index: libvirt-3.0.0/src/logging/virtlogd.init.in
|
||||
esac
|
||||
-exit $RETVAL
|
||||
+rc_exit
|
||||
Index: libvirt-3.0.0/src/logging/virtlogd.sysconf
|
||||
Index: libvirt-3.1.0/src/logging/virtlogd.sysconf
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/logging/virtlogd.sysconf
|
||||
+++ libvirt-3.0.0/src/logging/virtlogd.sysconf
|
||||
--- libvirt-3.1.0.orig/src/logging/virtlogd.sysconf
|
||||
+++ libvirt-3.1.0/src/logging/virtlogd.sysconf
|
||||
@@ -1,3 +1,7 @@
|
||||
+## Path: System/Virtualization/virtlogd
|
||||
+
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: libvirt-3.0.0/src/xenconfig/xen_sxpr.c
|
||||
Index: libvirt-3.1.0/src/xenconfig/xen_sxpr.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-3.0.0/src/xenconfig/xen_sxpr.c
|
||||
--- libvirt-3.1.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-3.1.0/src/xenconfig/xen_sxpr.c
|
||||
@@ -392,7 +392,7 @@ xenParseSxprVifRate(const char *rate, un
|
||||
static int
|
||||
xenParseSxprDisks(virDomainDefPtr def,
|
||||
|
@ -6,10 +6,10 @@ and 'file'. This was implicitly done prior to commit 9673418c.
|
||||
|
||||
https://bugzilla.suse.com/show_bug.cgi?id=938228
|
||||
|
||||
Index: libvirt-3.0.0/src/xenconfig/xen_sxpr.c
|
||||
Index: libvirt-3.1.0/src/xenconfig/xen_sxpr.c
|
||||
===================================================================
|
||||
--- libvirt-3.0.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-3.0.0/src/xenconfig/xen_sxpr.c
|
||||
--- libvirt-3.1.0.orig/src/xenconfig/xen_sxpr.c
|
||||
+++ libvirt-3.1.0/src/xenconfig/xen_sxpr.c
|
||||
@@ -506,10 +506,11 @@ xenParseSxprDisks(virDomainDefPtr def,
|
||||
omnipotent, we can revisit this, perhaps stat()'ing
|
||||
the src file in question */
|
||||
|
Loading…
Reference in New Issue
Block a user