Accepting request 583091 from Virtualization

OBS-URL: https://build.opensuse.org/request/show/583091
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=253
This commit is contained in:
Dominique Leuenberger 2018-03-08 09:54:21 +00:00 committed by Git OBS Bridge
commit 1c5513ba38
44 changed files with 290 additions and 1366 deletions

View File

@ -18,11 +18,11 @@ them.
create mode 100644 src/conf/domain_stats.c
create mode 100644 src/conf/domain_stats.h
diff --git a/src/Makefile.am b/src/Makefile.am
index 166c9a8e9..25f913a5f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -404,6 +404,7 @@ DOMAIN_CONF_SOURCES = \
Index: libvirt-4.1.0/src/Makefile.am
===================================================================
--- libvirt-4.1.0.orig/src/Makefile.am
+++ libvirt-4.1.0/src/Makefile.am
@@ -441,6 +441,7 @@ DOMAIN_CONF_SOURCES = \
conf/domain_conf.c conf/domain_conf.h \
conf/domain_audit.c conf/domain_audit.h \
conf/domain_nwfilter.c conf/domain_nwfilter.h \
@ -30,11 +30,10 @@ index 166c9a8e9..25f913a5f 100644
conf/virsavecookie.c conf/virsavecookie.h \
conf/snapshot_conf.c conf/snapshot_conf.h \
conf/numa_conf.c conf/numa_conf.h \
diff --git a/src/conf/domain_stats.c b/src/conf/domain_stats.c
new file mode 100644
index 000000000..beb3c09d5
Index: libvirt-4.1.0/src/conf/domain_stats.c
===================================================================
--- /dev/null
+++ b/src/conf/domain_stats.c
+++ libvirt-4.1.0/src/conf/domain_stats.c
@@ -0,0 +1,139 @@
+/*
+ * domain_stats.c: domain stats extraction helpers
@ -175,11 +174,10 @@ index 000000000..beb3c09d5
+}
+
+#undef STATS_ADD_NET_PARAM
diff --git a/src/conf/domain_stats.h b/src/conf/domain_stats.h
new file mode 100644
index 000000000..42f8cb6d3
Index: libvirt-4.1.0/src/conf/domain_stats.h
===================================================================
--- /dev/null
+++ b/src/conf/domain_stats.h
+++ libvirt-4.1.0/src/conf/domain_stats.h
@@ -0,0 +1,64 @@
+/*
+ * domain_stats.h: domain stats extraction helpers
@ -245,11 +243,11 @@ index 000000000..42f8cb6d3
+ int *maxparams);
+
+#endif /* __DOMAIN_STATS_H */
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index bc8cc1fba..2e22abcec 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -630,6 +630,9 @@ virDomainConfNWFilterRegister;
Index: libvirt-4.1.0/src/libvirt_private.syms
===================================================================
--- libvirt-4.1.0.orig/src/libvirt_private.syms
+++ libvirt-4.1.0/src/libvirt_private.syms
@@ -644,6 +644,9 @@ virDomainConfNWFilterRegister;
virDomainConfNWFilterTeardown;
virDomainConfVMNWFilterTeardown;
@ -259,7 +257,7 @@ index bc8cc1fba..2e22abcec 100644
# conf/interface_conf.h
virInterfaceDefFormat;
@@ -1468,6 +1471,7 @@ virCgroupGetMemoryUsage;
@@ -1500,6 +1503,7 @@ virCgroupGetMemoryUsage;
virCgroupGetMemSwapHardLimit;
virCgroupGetMemSwapUsage;
virCgroupGetPercpuStats;
@ -267,10 +265,10 @@ index bc8cc1fba..2e22abcec 100644
virCgroupHasController;
virCgroupHasEmptyTasks;
virCgroupKill;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a203c9297..f60436e4c 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
Index: libvirt-4.1.0/src/qemu/qemu_driver.c
===================================================================
--- libvirt-4.1.0.orig/src/qemu/qemu_driver.c
+++ libvirt-4.1.0/src/qemu/qemu_driver.c
@@ -72,6 +72,7 @@
#include "viralloc.h"
#include "viruuid.h"
@ -279,7 +277,7 @@ index a203c9297..f60436e4c 100644
#include "domain_audit.h"
#include "node_device_conf.h"
#include "virpci.h"
@@ -19380,21 +19381,7 @@ qemuDomainGetStatsState(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
@@ -19518,21 +19519,7 @@ qemuDomainGetStatsState(virQEMUDriverPtr
int *maxparams,
unsigned int privflags ATTRIBUTE_UNUSED)
{
@ -302,7 +300,7 @@ index a203c9297..f60436e4c 100644
}
@@ -19417,37 +19404,7 @@ qemuDomainGetStatsCpu(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
@@ -19555,37 +19542,7 @@ qemuDomainGetStatsCpu(virQEMUDriverPtr d
unsigned int privflags ATTRIBUTE_UNUSED)
{
qemuDomainObjPrivatePtr priv = dom->privateData;
@ -341,7 +339,7 @@ index a203c9297..f60436e4c 100644
}
static int
@@ -19624,44 +19581,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver,
@@ -19764,44 +19721,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr
return ret;
}
@ -386,7 +384,7 @@ index a203c9297..f60436e4c 100644
static int
qemuDomainGetStatsInterface(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
virDomainObjPtr dom,
@@ -19669,68 +19588,9 @@ qemuDomainGetStatsInterface(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
@@ -19809,68 +19728,9 @@ qemuDomainGetStatsInterface(virQEMUDrive
int *maxparams,
unsigned int privflags ATTRIBUTE_UNUSED)
{
@ -456,7 +454,7 @@ index a203c9297..f60436e4c 100644
#define QEMU_ADD_BLOCK_PARAM_UI(record, maxparams, num, name, value) \
do { \
char param_name[VIR_TYPED_PARAM_FIELD_LENGTH]; \
@@ -19852,10 +19712,10 @@ qemuDomainGetStatsOneBlock(virQEMUDriverPtr driver,
@@ -19992,10 +19852,10 @@ qemuDomainGetStatsOneBlock(virQEMUDriver
if (disk->info.alias)
alias = qemuDomainStorageAlias(disk->info.alias, backing_idx);
@ -469,7 +467,7 @@ index a203c9297..f60436e4c 100644
block_idx, src->path);
if (backing_idx)
QEMU_ADD_BLOCK_PARAM_UI(record, maxparams, block_idx, "backingIndex",
@@ -19971,7 +19831,7 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr driver,
@@ -20111,7 +19971,7 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr
* after the iteration than it is to iterate twice; but we still
* want count listed first. */
count_index = record->nparams;
@ -478,7 +476,7 @@ index a203c9297..f60436e4c 100644
for (i = 0; i < dom->def->ndisks; i++) {
virDomainDiskDefPtr disk = dom->def->disks[i];
@@ -20005,10 +19865,6 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr driver,
@@ -20145,10 +20005,6 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr
#undef QEMU_ADD_BLOCK_PARAM_ULL
@ -489,11 +487,11 @@ index a203c9297..f60436e4c 100644
static int
qemuDomainGetStatsPerfOneEvent(virPerfPtr perf,
virPerfEventType type,
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 0a31947b0..04ef4c1a7 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -4122,6 +4122,44 @@ virCgroupControllerAvailable(int controller)
Index: libvirt-4.1.0/src/util/vircgroup.c
===================================================================
--- libvirt-4.1.0.orig/src/util/vircgroup.c
+++ libvirt-4.1.0/src/util/vircgroup.c
@@ -4122,6 +4122,44 @@ virCgroupControllerAvailable(int control
return ret;
}
@ -538,7 +536,7 @@ index 0a31947b0..04ef4c1a7 100644
#else /* !VIR_CGROUP_SUPPORTED */
bool
@@ -4899,6 +4937,14 @@ virCgroupControllerAvailable(int controller ATTRIBUTE_UNUSED)
@@ -4899,6 +4937,14 @@ virCgroupControllerAvailable(int control
{
return false;
}
@ -553,11 +551,11 @@ index 0a31947b0..04ef4c1a7 100644
#endif /* !VIR_CGROUP_SUPPORTED */
diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
index d83392767..2ebdf9505 100644
--- a/src/util/vircgroup.h
+++ b/src/util/vircgroup.h
@@ -297,4 +297,8 @@ int virCgroupSetOwner(virCgroupPtr cgroup,
Index: libvirt-4.1.0/src/util/vircgroup.h
===================================================================
--- libvirt-4.1.0.orig/src/util/vircgroup.h
+++ libvirt-4.1.0/src/util/vircgroup.h
@@ -297,4 +297,8 @@ int virCgroupSetOwner(virCgroupPtr cgrou
int virCgroupHasEmptyTasks(virCgroupPtr cgroup, int controller);
bool virCgroupControllerAvailable(int controller);
@ -566,6 +564,3 @@ index d83392767..2ebdf9505 100644
+ virDomainStatsRecordPtr record,
+ int *maxparams);
#endif /* __VIR_CGROUP_H__ */
--
2.15.1

View File

@ -9,11 +9,11 @@ them using the existing API.
src/lxc/lxc_driver.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 138 insertions(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index b3447100f..10667c134 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -81,6 +81,7 @@
Index: libvirt-4.1.0/src/lxc/lxc_driver.c
===================================================================
--- libvirt-4.1.0.orig/src/lxc/lxc_driver.c
+++ libvirt-4.1.0/src/lxc/lxc_driver.c
@@ -80,6 +80,7 @@
#include "viraccessapichecklxc.h"
#include "virhostdev.h"
#include "netdev_bandwidth_conf.h"
@ -21,7 +21,7 @@ index b3447100f..10667c134 100644
#define VIR_FROM_THIS VIR_FROM_LXC
@@ -5485,6 +5486,142 @@ lxcDomainHasManagedSaveImage(virDomainPtr dom, unsigned int flags)
@@ -5514,6 +5515,142 @@ lxcDomainHasManagedSaveImage(virDomainPt
return ret;
}
@ -164,7 +164,7 @@ index b3447100f..10667c134 100644
/* Function Tables */
static virHypervisorDriver lxcHypervisorDriver = {
@@ -5579,6 +5716,7 @@ static virHypervisorDriver lxcHypervisorDriver = {
@@ -5608,6 +5745,7 @@ static virHypervisorDriver lxcHypervisor
.nodeGetFreePages = lxcNodeGetFreePages, /* 1.2.6 */
.nodeAllocPages = lxcNodeAllocPages, /* 1.2.9 */
.domainHasManagedSaveImage = lxcDomainHasManagedSaveImage, /* 1.2.13 */
@ -172,6 +172,3 @@ index b3447100f..10667c134 100644
};
static virConnectDriver lxcConnectDriver = {
--
2.15.1

View File

@ -1,52 +0,0 @@
commit 0c710a37ea265dc7dfa0ebcebf1e21e4c6b2ea21
Author: Jim Fehlig <jfehlig@suse.com>
Date: Wed Jan 24 14:23:04 2018 -0700
libxl: resume lock process after failed migration
During migration, the lock process is paused in the perform phase
but not resumed if there is a subsequent failure, leaving the locked
resource unprotected.
The perform phase itself can fail, in which case the lock process
should be resumed before returning from perform. The finish phase
could also fail on the destination host, in which case the migration
is canceled in the confirm phase and the VM is resumed. The lock
process needs to be resumed there as well.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Index: libvirt-4.0.0/src/libxl/libxl_migration.c
===================================================================
--- libvirt-4.0.0.orig/src/libxl/libxl_migration.c
+++ libvirt-4.0.0/src/libxl/libxl_migration.c
@@ -1238,6 +1238,12 @@ libxlDomainMigrationPerform(libxlDriverP
ret = libxlDoMigrateSend(driver, vm, flags, sockfd);
virObjectLock(vm);
+ if (ret < 0)
+ virDomainLockProcessResume(driver->lockManager,
+ "xen:///system",
+ vm,
+ priv->lockState);
+
cleanup:
VIR_FORCE_CLOSE(sockfd);
virURIFree(uri);
@@ -1349,10 +1355,16 @@ libxlDomainMigrationConfirm(libxlDriverP
int cancelled)
{
libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
+ libxlDomainObjPrivatePtr priv = vm->privateData;
virObjectEventPtr event = NULL;
int ret = -1;
if (cancelled) {
+ /* Resume lock process that was paused in MigrationPerform */
+ virDomainLockProcessResume(driver->lockManager,
+ "xen:///system",
+ vm,
+ priv->lockState);
if (libxl_domain_resume(cfg->ctx, vm->def->id, 1, 0) == 0) {
ret = 0;
} else {

View File

@ -1,245 +0,0 @@
commit 68eed56b2d51e66bb540062fe09f5ffd44e99f6e
Author: Daniel P. Berrange <berrange@redhat.com>
Date: Sat Oct 28 14:56:51 2017 +0100
conf: add support for setting OEM strings SMBIOS data fields
The OEM strings table in SMBIOS allows the vendor to pass arbitrary
strings into the guest OS. This can be used as a way to pass data to an
application like cloud-init, or potentially as an alternative to the
kernel command line for OS installers where you can't modify the install
ISO image to change the kernel args.
As an example, consider if cloud-init and anaconda supported OEM strings
you could use something like
<oemStrings>
<entry>cloud-init:ds=nocloud-net;s=http://10.10.0.1:8000/</entry>
<entry>anaconda:method=http://dl.fedoraproject.org/pub/fedora/linux/releases/25/x86_64/os</entry>
</oemStrings>
use of a application specific prefix as illustrated above is
recommended, but not mandated, so that an app can reliably identify
which of the many OEM strings are targetted at it.
Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Index: libvirt-4.0.0/docs/formatdomain.html.in
===================================================================
--- libvirt-4.0.0.orig/docs/formatdomain.html.in
+++ libvirt-4.0.0/docs/formatdomain.html.in
@@ -411,6 +411,10 @@
&lt;entry name='version'&gt;0B98401 Pro&lt;/entry&gt;
&lt;entry name='serial'&gt;W1KS427111E&lt;/entry&gt;
&lt;/baseBoard&gt;
+ &lt;oemStrings&gt;
+ &lt;entry&gt;myappname:some arbitrary data&lt;/entry&gt;
+ &lt;entry&gt;otherappname:more arbitrary data&lt;/entry&gt;
+ &lt;/oemStrings&gt;
&lt;/sysinfo&gt;
...</pre>
@@ -498,6 +502,15 @@
validation and <code>date</code> format checking, all values are
passed as strings to the hypervisor driver.
</dd>
+ <dt><code>oemStrings</code></dt>
+ <dd>
+ This is block 11 of SMBIOS. This element should appear once and
+ can have multiple <code>entry</code> child elements, each providing
+ arbitrary string data. There are no restrictions on what data can
+ be provided in the entries, however, if the data is intended to be
+ consumed by an application in the guest, it is recommended to use
+ the application name as a prefix in the string. (<span class="since">Since 4.1.0</span>)
+ </dd>
</dl>
</dd>
</dl>
Index: libvirt-4.0.0/docs/schemas/domaincommon.rng
===================================================================
--- libvirt-4.0.0.orig/docs/schemas/domaincommon.rng
+++ libvirt-4.0.0/docs/schemas/domaincommon.rng
@@ -4857,6 +4857,15 @@
</oneOrMore>
</element>
</zeroOrMore>
+ <optional>
+ <element name="oemStrings">
+ <oneOrMore>
+ <element name="entry">
+ <ref name="sysinfo-value"/>
+ </element>
+ </oneOrMore>
+ </element>
+ </optional>
</interleave>
</element>
</define>
Index: libvirt-4.0.0/src/conf/domain_conf.c
===================================================================
--- libvirt-4.0.0.orig/src/conf/domain_conf.c
+++ libvirt-4.0.0/src/conf/domain_conf.c
@@ -14461,6 +14461,42 @@ virSysinfoBaseBoardParseXML(xmlXPathCont
return ret;
}
+
+static int
+virSysinfoOEMStringsParseXML(xmlXPathContextPtr ctxt,
+ virSysinfoOEMStringsDefPtr *oem)
+{
+ int ret = -1;
+ virSysinfoOEMStringsDefPtr def;
+ xmlNodePtr *strings = NULL;
+ int nstrings;
+ size_t i;
+
+ nstrings = virXPathNodeSet("./entry", ctxt, &strings);
+ if (nstrings < 0)
+ return -1;
+ if (nstrings == 0)
+ return 0;
+
+ if (VIR_ALLOC(def) < 0)
+ goto cleanup;
+
+ if (VIR_ALLOC_N(def->values, nstrings) < 0)
+ goto cleanup;
+
+ def->nvalues = nstrings;
+ for (i = 0; i < nstrings; i++)
+ def->values[i] = virXMLNodeContentString(strings[i]);
+
+ *oem = def;
+ def = NULL;
+ ret = 0;
+ cleanup:
+ VIR_FREE(strings);
+ virSysinfoOEMStringsDefFree(def);
+ return ret;
+}
+
static virSysinfoDefPtr
virSysinfoParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt,
@@ -14519,6 +14555,17 @@ virSysinfoParseXML(xmlNodePtr node,
if (virSysinfoBaseBoardParseXML(ctxt, &def->baseBoard, &def->nbaseBoard) < 0)
goto error;
+ /* Extract system related metadata */
+ if ((tmpnode = virXPathNode("./oemStrings[1]", ctxt)) != NULL) {
+ oldnode = ctxt->node;
+ ctxt->node = tmpnode;
+ if (virSysinfoOEMStringsParseXML(ctxt, &def->oemStrings) < 0) {
+ ctxt->node = oldnode;
+ goto error;
+ }
+ ctxt->node = oldnode;
+ }
+
cleanup:
VIR_FREE(type);
return def;
Index: libvirt-4.0.0/src/util/virsysinfo.c
===================================================================
--- libvirt-4.0.0.orig/src/util/virsysinfo.c
+++ libvirt-4.0.0/src/util/virsysinfo.c
@@ -108,6 +108,20 @@ void virSysinfoBaseBoardDefClear(virSysi
VIR_FREE(def->location);
}
+void virSysinfoOEMStringsDefFree(virSysinfoOEMStringsDefPtr def)
+{
+ size_t i;
+
+ if (def == NULL)
+ return;
+
+ for (i = 0; i < def->nvalues; i++)
+ VIR_FREE(def->values[i]);
+ VIR_FREE(def->values);
+
+ VIR_FREE(def);
+}
+
/**
* virSysinfoDefFree:
* @def: a sysinfo structure
@@ -157,6 +171,8 @@ void virSysinfoDefFree(virSysinfoDefPtr
}
VIR_FREE(def->memory);
+ virSysinfoOEMStringsDefFree(def->oemStrings);
+
VIR_FREE(def);
}
@@ -1294,6 +1310,24 @@ virSysinfoMemoryFormat(virBufferPtr buf,
}
}
+static void
+virSysinfoOEMStringsFormat(virBufferPtr buf, virSysinfoOEMStringsDefPtr def)
+{
+ size_t i;
+
+ if (!def)
+ return;
+
+ virBufferAddLit(buf, "<oemStrings>\n");
+ virBufferAdjustIndent(buf, 2);
+ for (i = 0; i < def->nvalues; i++) {
+ virBufferEscapeString(buf, "<entry>%s</entry>\n",
+ def->values[i]);
+ }
+ virBufferAdjustIndent(buf, -2);
+ virBufferAddLit(buf, "</oemStrings>\n");
+}
+
/**
* virSysinfoFormat:
* @buf: buffer to append output to (may use auto-indentation)
@@ -1324,6 +1358,7 @@ virSysinfoFormat(virBufferPtr buf, virSy
virSysinfoBaseBoardFormat(&childrenBuf, def->baseBoard, def->nbaseBoard);
virSysinfoProcessorFormat(&childrenBuf, def);
virSysinfoMemoryFormat(&childrenBuf, def);
+ virSysinfoOEMStringsFormat(&childrenBuf, def->oemStrings);
virBufferAsprintf(buf, "<sysinfo type='%s'", type);
if (virBufferUse(&childrenBuf)) {
Index: libvirt-4.0.0/src/util/virsysinfo.h
===================================================================
--- libvirt-4.0.0.orig/src/util/virsysinfo.h
+++ libvirt-4.0.0/src/util/virsysinfo.h
@@ -98,6 +98,13 @@ struct _virSysinfoBaseBoardDef {
/* XXX board type */
};
+typedef struct _virSysinfoOEMStringsDef virSysinfoOEMStringsDef;
+typedef virSysinfoOEMStringsDef *virSysinfoOEMStringsDefPtr;
+struct _virSysinfoOEMStringsDef {
+ size_t nvalues;
+ char **values;
+};
+
typedef struct _virSysinfoDef virSysinfoDef;
typedef virSysinfoDef *virSysinfoDefPtr;
struct _virSysinfoDef {
@@ -114,6 +121,8 @@ struct _virSysinfoDef {
size_t nmemory;
virSysinfoMemoryDefPtr memory;
+
+ virSysinfoOEMStringsDefPtr oemStrings;
};
virSysinfoDefPtr virSysinfoRead(void);
@@ -121,6 +130,7 @@ virSysinfoDefPtr virSysinfoRead(void);
void virSysinfoBIOSDefFree(virSysinfoBIOSDefPtr def);
void virSysinfoSystemDefFree(virSysinfoSystemDefPtr def);
void virSysinfoBaseBoardDefClear(virSysinfoBaseBoardDefPtr def);
+void virSysinfoOEMStringsDefFree(virSysinfoOEMStringsDefPtr def);
void virSysinfoDefFree(virSysinfoDefPtr def);
int virSysinfoFormat(virBufferPtr buf, virSysinfoDefPtr def)

View File

@ -1,96 +0,0 @@
commit 71d56a397925a1bd55d3aee30afdbdcd1a14f9a8
Author: Jim Fehlig <jfehlig@suse.com>
Date: Fri Jan 5 17:10:47 2018 -0700
nodedev: Fix failing to parse PCI address for non-PCI network devices
Commit 8708ca01c added virNetDevSwitchdevFeature() to check if a network
device has Switchdev capabilities. virNetDevSwitchdevFeature() attempts
to retrieve the PCI device associated with the network device, ignoring
non-PCI devices. It does so via the following call chain
virNetDevSwitchdevFeature()->virNetDevGetPCIDevice()->
virPCIGetDeviceAddressFromSysfsLink()
For non-PCI network devices (qeth, Xen vif, etc),
virPCIGetDeviceAddressFromSysfsLink() will report an error when
virPCIDeviceAddressParse() fails. virPCIDeviceAddressParse() also
logs an error. After commit 8708ca01c there are now two errors reported
for each non-PCI network device even though the errors are harmless.
To avoid the errors, introduce virNetDevIsPCIDevice() and use it in
virNetDevGetPCIDevice() before attempting to retrieve the associated
PCI device. virNetDevIsPCIDevice() uses the 'subsystem' property of the
device to determine if it is PCI. See the sysfs rules in kernel
documentation for more details
https://www.kernel.org/doc/html/latest/admin-guide/sysfs-rules.html
Index: libvirt-4.0.0/src/util/virnetdev.c
===================================================================
--- libvirt-4.0.0.orig/src/util/virnetdev.c
+++ libvirt-4.0.0/src/util/virnetdev.c
@@ -22,6 +22,7 @@
#include <config.h>
+#include "dirname.h"
#include "virnetdev.h"
#include "virnetlink.h"
#include "virmacaddr.h"
@@ -1147,6 +1148,45 @@ virNetDevSysfsDeviceFile(char **pf_sysfs
return 0;
}
+/**
+ * Determine if the device path specified in devpath is a PCI Device
+ * by resolving the 'subsystem'-link in devpath and looking for
+ * 'pci' in the last component. For more information see the rules
+ * for accessing sysfs in the kernel docs
+ *
+ * https://www.kernel.org/doc/html/latest/admin-guide/sysfs-rules.html
+ *
+ * Returns true if devpath's susbsystem is pci, false otherwise.
+ */
+static bool
+virNetDevIsPCIDevice(const char *devpath)
+{
+ char *subsys_link = NULL;
+ char *abs_path = NULL;
+ char *subsys = NULL;
+ bool ret = false;
+
+ if (virAsprintf(&subsys_link, "%s/subsystem", devpath) < 0)
+ return false;
+
+ if (!virFileExists(subsys_link))
+ goto cleanup;
+
+ if (virFileResolveLink(subsys_link, &abs_path) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Unable to resolve device subsystem symlink %s"),
+ subsys_link);
+ goto cleanup;
+ }
+
+ subsys = last_component(abs_path);
+ ret = STRPREFIX(subsys, "pci");
+
+ cleanup:
+ VIR_FREE(subsys_link);
+ VIR_FREE(abs_path);
+ return ret;
+}
static virPCIDevicePtr
virNetDevGetPCIDevice(const char *devName)
@@ -1158,6 +1198,9 @@ virNetDevGetPCIDevice(const char *devNam
if (virNetDevSysfsFile(&vfSysfsDevicePath, devName, "device") < 0)
goto cleanup;
+ if (!virNetDevIsPCIDevice(vfSysfsDevicePath))
+ goto cleanup;
+
vfPCIAddr = virPCIGetDeviceAddressFromSysfsLink(vfSysfsDevicePath);
if (!vfPCIAddr)
goto cleanup;

View File

@ -1,60 +0,0 @@
commit 72adaf2f10509c3682f2c65ffad4176e00e5a2fb
Author: Michal Privoznik <mprivozn@redhat.com>
Date: Fri Jan 19 13:53:57 2018 +0100
Revert "qemu: monitor: do not report error on shutdown"
https://bugzilla.redhat.com/show_bug.cgi?id=1536461
This reverts commit aeda1b8c56dc58b0a413acc61bbea938b40499e1.
Problem is that we need mon->lastError to be set because it's
used all over the place. Also, there's nothing wrong with
reporting error if one occurred. I mean, if there's a thread
executing an API and which currently is talking on monitor it
definitely wants the error reported.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Index: libvirt-4.0.0/src/qemu/qemu_monitor.c
===================================================================
--- libvirt-4.0.0.orig/src/qemu/qemu_monitor.c
+++ libvirt-4.0.0/src/qemu/qemu_monitor.c
@@ -78,7 +78,6 @@ struct _qemuMonitor {
* < 0: an error occurred during the registration of @fd */
int watch;
int hasSendFD;
- int willhangup;
virDomainObjPtr vm;
@@ -716,10 +715,8 @@ qemuMonitorIO(int watch, int fd, int eve
if (events & VIR_EVENT_HANDLE_HANGUP) {
hangup = true;
if (!error) {
- if (!mon->willhangup) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("End of file from qemu monitor"));
- }
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("End of file from qemu monitor"));
eof = true;
events &= ~VIR_EVENT_HANDLE_HANGUP;
}
@@ -758,7 +755,7 @@ qemuMonitorIO(int watch, int fd, int eve
if (mon->lastError.code != VIR_ERR_OK) {
/* Already have an error, so clear any new error */
virResetLastError();
- } else if (!mon->willhangup) {
+ } else {
virErrorPtr err = virGetLastError();
if (!err)
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -1352,7 +1349,6 @@ qemuMonitorEmitShutdown(qemuMonitorPtr m
{
int ret = -1;
VIR_DEBUG("mon=%p guest=%u", mon, guest);
- mon->willhangup = 1;
QEMU_MONITOR_CALLBACK(mon, ret, domainShutdown, mon->vm, guest);
return ret;

View File

@ -1,65 +0,0 @@
From 759b4d1b0fe5f4d84d98b99153dfa7ac289dd167 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Sat, 27 Jan 2018 23:43:58 +0100
Subject: [PATCH] virlog: determine the hostname on startup CVE-2018-6764
At later point it might not be possible or even safe to use getaddrinfo(). It
can in turn result in a load of NSS module.
Notably, on a LXC container startup we may find ourselves with the guest
filesystem already having replaced the host one. Loading a NSS module
from the guest tree would allow a malicous guest to escape the
confinement of its container environment because libvirt will not yet
have locked it down.
---
src/util/virlog.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/util/virlog.c b/src/util/virlog.c
index 68439b919..9105337ce 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -64,6 +64,7 @@
VIR_LOG_INIT("util.log");
static regex_t *virLogRegex;
+static char *virLogHostname;
#define VIR_LOG_DATE_REGEX "[0-9]{4}-[0-9]{2}-[0-9]{2}"
@@ -271,6 +272,12 @@ virLogOnceInit(void)
VIR_FREE(virLogRegex);
}
+ /* We get and remember the hostname early, because at later time
+ * it might not be possible to load NSS modules via getaddrinfo()
+ * (e.g. at container startup the host filesystem will not be
+ * accessible anymore. */
+ virLogHostname = virGetHostnameQuiet();
+
virLogUnlock();
return 0;
}
@@ -466,17 +473,14 @@ static int
virLogHostnameString(char **rawmsg,
char **msg)
{
- char *hostname = virGetHostnameQuiet();
char *hoststr;
- if (!hostname)
+ if (!virLogHostname)
return -1;
- if (virAsprintfQuiet(&hoststr, "hostname: %s", hostname) < 0) {
- VIR_FREE(hostname);
+ if (virAsprintfQuiet(&hoststr, "hostname: %s", virLogHostname) < 0) {
return -1;
}
- VIR_FREE(hostname);
if (virLogFormatString(msg, 0, NULL, VIR_LOG_INFO, hoststr) < 0) {
VIR_FREE(hoststr);
--
2.15.1

View File

@ -1,110 +0,0 @@
commit 7697706135562121732a5ddb5574a4afb269645f
Author: Daniel P. Berrange <berrange@redhat.com>
Date: Wed Jan 17 17:35:13 2018 +0000
qemu: add support for generating SMBIOS OEM strings command line
This wires up the previously added OEM strings XML schema to be able to
generate comamnd line args for QEMU. This requires QEMU >= 2.12 release
containing this patch:
commit 2d6dcbf93fb01b4a7f45a93d276d4d74b16392dd
Author: Daniel P. Berrange <berrange@redhat.com>
Date: Sat Oct 28 21:51:36 2017 +0100
smbios: support setting OEM strings table
Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Index: libvirt-4.0.0/src/qemu/qemu_command.c
===================================================================
--- libvirt-4.0.0.orig/src/qemu/qemu_command.c
+++ libvirt-4.0.0/src/qemu/qemu_command.c
@@ -6142,6 +6142,26 @@ qemuBuildSmbiosBaseBoardStr(virSysinfoBa
}
+static char *
+qemuBuildSmbiosOEMStringsStr(virSysinfoOEMStringsDefPtr def)
+{
+ virBuffer buf = VIR_BUFFER_INITIALIZER;
+ size_t i;
+
+ if (!def)
+ return NULL;
+
+ virBufferAddLit(&buf, "type=11");
+
+ for (i = 0; i < def->nvalues; i++) {
+ virBufferAddLit(&buf, ",value=");
+ virQEMUBuildBufferEscapeComma(&buf, def->values[i]);
+ }
+
+ return virBufferContentAndReset(&buf);
+}
+
+
static int
qemuBuildSmbiosCommandLine(virCommandPtr cmd,
virQEMUDriverPtr driver,
@@ -6210,6 +6230,14 @@ qemuBuildSmbiosCommandLine(virCommandPtr
return -1;
virCommandAddArgList(cmd, "-smbios", smbioscmd, NULL);
+ VIR_FREE(smbioscmd);
+ }
+
+ if (source->oemStrings) {
+ if (!(smbioscmd = qemuBuildSmbiosOEMStringsStr(source->oemStrings)))
+ return -1;
+
+ virCommandAddArgList(cmd, "-smbios", smbioscmd, NULL);
VIR_FREE(smbioscmd);
}
}
Index: libvirt-4.0.0/tests/qemuxml2argvdata/smbios.args
===================================================================
--- libvirt-4.0.0.orig/tests/qemuxml2argvdata/smbios.args
+++ libvirt-4.0.0/tests/qemuxml2argvdata/smbios.args
@@ -17,6 +17,8 @@ serial=32dfcb37-5af1-552b-357c-be8c3aa38
uuid=c7a5fdbd-edaf-9455-926a-d65c16db1809,sku=1234567890,family=Red Hat' \
-smbios 'type=2,manufacturer=Hewlett-Packard,product=0B4Ch,version=D,\
serial=CZC1065993,asset=CZC1065993,location=Upside down' \
+-smbios 'type=11,value=Hello,value=World,value=This is,,\
+ more tricky value=escaped' \
-nographic \
-nodefaults \
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
Index: libvirt-4.0.0/tests/qemuxml2argvdata/smbios.xml
===================================================================
--- libvirt-4.0.0.orig/tests/qemuxml2argvdata/smbios.xml
+++ libvirt-4.0.0/tests/qemuxml2argvdata/smbios.xml
@@ -26,6 +26,11 @@
<entry name='asset'>CZC1065993</entry>
<entry name='location'>Upside down</entry>
</baseBoard>
+ <oemStrings>
+ <entry>Hello</entry>
+ <entry>World</entry>
+ <entry>This is, more tricky value=escaped</entry>
+ </oemStrings>
</sysinfo>
<os>
<type arch='i686' machine='pc'>hvm</type>
Index: libvirt-4.0.0/tests/qemuxml2xmloutdata/smbios.xml
===================================================================
--- libvirt-4.0.0.orig/tests/qemuxml2xmloutdata/smbios.xml
+++ libvirt-4.0.0/tests/qemuxml2xmloutdata/smbios.xml
@@ -26,6 +26,11 @@
<entry name='asset'>CZC1065993</entry>
<entry name='location'>Upside down</entry>
</baseBoard>
+ <oemStrings>
+ <entry>Hello</entry>
+ <entry>World</entry>
+ <entry>This is, more tricky value=escaped</entry>
+ </oemStrings>
</sysinfo>
<os>
<type arch='i686' machine='pc'>hvm</type>

View File

@ -1,7 +1,7 @@
Index: libvirt-4.0.0/docs/apibuild.py
Index: libvirt-4.1.0/docs/apibuild.py
===================================================================
--- libvirt-4.0.0.orig/docs/apibuild.py
+++ libvirt-4.0.0/docs/apibuild.py
--- libvirt-4.1.0.orig/docs/apibuild.py
+++ libvirt-4.1.0/docs/apibuild.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3

View File

@ -1,7 +1,7 @@
Index: libvirt-4.0.0/examples/apparmor/libvirt-lxc
Index: libvirt-4.1.0/examples/apparmor/libvirt-lxc
===================================================================
--- libvirt-4.0.0.orig/examples/apparmor/libvirt-lxc
+++ libvirt-4.0.0/examples/apparmor/libvirt-lxc
--- libvirt-4.1.0.orig/examples/apparmor/libvirt-lxc
+++ libvirt-4.1.0/examples/apparmor/libvirt-lxc
@@ -2,39 +2,15 @@
#include <abstractions/base>

View File

@ -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-4.0.0/src/qemu/qemu_driver.c
Index: libvirt-4.1.0/src/qemu/qemu_driver.c
===================================================================
--- libvirt-4.0.0.orig/src/qemu/qemu_driver.c
+++ libvirt-4.0.0/src/qemu/qemu_driver.c
@@ -17159,6 +17159,14 @@ qemuDomainBlockCopyCommon(virDomainObjPt
--- libvirt-4.1.0.orig/src/qemu/qemu_driver.c
+++ libvirt-4.1.0/src/qemu/qemu_driver.c
@@ -17275,6 +17275,14 @@ qemuDomainBlockCopyCommon(virDomainObjPt
goto endjob;
}

View File

@ -1,121 +0,0 @@
From c2dc6698c88fb591639e542c8ecb0076c54f3dfb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Mon, 12 Feb 2018 10:03:08 +0000
Subject: [PATCH] log: fix deadlock obtaining hostname (related CVE-2018-6764)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The fix for CVE-2018-6764 introduced a potential deadlock scenario
that gets triggered by the NSS module when virGetHostname() calls
getaddrinfo to resolve the hostname:
#0 0x00007f6e714b57e7 in futex_wait
#1 futex_wait_simple
#2 __pthread_once_slow
#3 0x00007f6e71d16e7d in virOnce
#4 0x00007f6e71d0997c in virLogInitialize
#5 0x00007f6e71d0a09a in virLogVMessage
#6 0x00007f6e71d09ffd in virLogMessage
#7 0x00007f6e71d0db22 in virObjectNew
#8 0x00007f6e71d0dbf1 in virObjectLockableNew
#9 0x00007f6e71d0d3e5 in virMacMapNew
#10 0x00007f6e71cdc50a in findLease
#11 0x00007f6e71cdcc56 in _nss_libvirt_gethostbyname4_r
#12 0x00007f6e724631fc in gaih_inet
#13 0x00007f6e72464697 in __GI_getaddrinfo
#14 0x00007f6e71d19e81 in virGetHostnameImpl
#15 0x00007f6e71d1a057 in virGetHostnameQuiet
#16 0x00007f6e71d09936 in virLogOnceInit
#17 0x00007f6e71d09952 in virLogOnce
#18 0x00007f6e714b5829 in __pthread_once_slow
#19 0x00007f6e71d16e7d in virOnce
#20 0x00007f6e71d0997c in virLogInitialize
#21 0x00007f6e71d0a09a in virLogVMessage
#22 0x00007f6e71d09ffd in virLogMessage
#23 0x00007f6e71d0db22 in virObjectNew
#24 0x00007f6e71d0dbf1 in virObjectLockableNew
#25 0x00007f6e71d0d3e5 in virMacMapNew
#26 0x00007f6e71cdc50a in findLease
#27 0x00007f6e71cdc839 in _nss_libvirt_gethostbyname3_r
#28 0x00007f6e71cdc724 in _nss_libvirt_gethostbyname2_r
#29 0x00007f6e7248f72f in __gethostbyname2_r
#30 0x00007f6e7248f494 in gethostbyname2
#31 0x000056348c30c36d in hosts_keys
#32 0x000056348c30b7d2 in main
Fortunately the extra stuff virGetHostname does is totally irrelevant to
the needs of the logging code, so we can just inline a call to the
native hostname() syscall directly.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
cfg.mk | 2 +-
src/util/virlog.c | 20 ++++++++++++++------
2 files changed, 15 insertions(+), 7 deletions(-)
Index: libvirt-4.0.0/cfg.mk
===================================================================
--- libvirt-4.0.0.orig/cfg.mk
+++ libvirt-4.0.0/cfg.mk
@@ -1183,7 +1183,7 @@ _src2=src/(util/vircommand|libvirt|lxc/l
exclude_file_name_regexp--sc_prohibit_fork_wrappers = \
(^($(_src2)|tests/testutils|daemon/libvirtd)\.c$$)
-exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/virutil\.c$$
+exclude_file_name_regexp--sc_prohibit_gethostname = ^src/util/vir(util|log)\.c$$
exclude_file_name_regexp--sc_prohibit_internal_functions = \
^src/(util/(viralloc|virutil|virfile)\.[hc]|esx/esx_vi\.c)$$
Index: libvirt-4.0.0/src/util/virlog.c
===================================================================
--- libvirt-4.0.0.orig/src/util/virlog.c
+++ libvirt-4.0.0/src/util/virlog.c
@@ -64,7 +64,7 @@
VIR_LOG_INIT("util.log");
static regex_t *virLogRegex;
-static char *virLogHostname;
+static char virLogHostname[HOST_NAME_MAX+1];
#define VIR_LOG_DATE_REGEX "[0-9]{4}-[0-9]{2}-[0-9]{2}"
@@ -261,6 +261,8 @@ virLogPriorityString(virLogPriority lvl)
static int
virLogOnceInit(void)
{
+ int r;
+
if (virMutexInit(&virLogMutex) < 0)
return -1;
@@ -275,8 +277,17 @@ virLogOnceInit(void)
/* We get and remember the hostname early, because at later time
* it might not be possible to load NSS modules via getaddrinfo()
* (e.g. at container startup the host filesystem will not be
- * accessible anymore. */
- virLogHostname = virGetHostnameQuiet();
+ * accessible anymore.
+ * Must not use virGetHostname though as that causes re-entrancy
+ * problems if it triggers logging codepaths
+ */
+ r = gethostname(virLogHostname, sizeof(virLogHostname));
+ if (r == -1) {
+ ignore_value(virStrcpy(virLogHostname,
+ "(unknown)", sizeof(virLogHostname)));
+ } else {
+ NUL_TERMINATE(virLogHostname);
+ }
virLogUnlock();
return 0;
@@ -475,9 +486,6 @@ virLogHostnameString(char **rawmsg,
{
char *hoststr;
- if (!virLogHostname)
- return -1;
-
if (virAsprintfQuiet(&hoststr, "hostname: %s", virLogHostname) < 0) {
return -1;
}

View File

@ -1,284 +0,0 @@
commit c391e07eb08d713474ae8998cfd859e1827a4b2d
Author: Jim Fehlig <jfehlig@suse.com>
Date: Tue Feb 20 16:51:27 2018 -0700
libxl: add support for specifying clock offset and adjustment
libxl supports setting the domain real time clock to local time or
UTC via the localtime field of libxl_domain_build_info. Adjustment
of the clock is also supported via the rtc_timeoffset field. The
libvirt libxl driver has never supported these settings, instead
relying on libxl's default of a UTC real time clock with adjustment
set to 0.
There is at least one user that would like the ability to change
the defaults
https://www.redhat.com/archives/libvirt-users/2018-February/msg00059.html
Add support for specifying a local time clock and for specifying an
adjustment for both local time and UTC clocks. Add a test case to
verify the XML to libxl_domain_config conversion.
Local time clock and clock adjustment is already supported by the
XML <-> xl.cfg converter. What is missing is an explicit test for
the conversion. There are plenty of existing tests that all use UTC
with 0 adjustment. Hijack test-fullvirt-tsc-timer to test a local
time clock with 1 hour adjustment.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Index: libvirt-4.0.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-4.0.0.orig/src/libxl/libxl_conf.c
+++ libvirt-4.0.0/src/libxl/libxl_conf.c
@@ -274,6 +274,7 @@ libxlMakeDomBuildInfo(virDomainDefPtr de
virCapsPtr caps,
libxl_domain_config *d_config)
{
+ virDomainClockDef clock = def->clock;
libxl_domain_build_info *b_info = &d_config->b_info;
int hvm = def->os.type == VIR_DOMAIN_OSTYPE_HVM;
size_t i;
@@ -293,10 +294,38 @@ libxlMakeDomBuildInfo(virDomainDefPtr de
for (i = 0; i < virDomainDefGetVcpus(def); i++)
libxl_bitmap_set((&b_info->avail_vcpus), i);
- for (i = 0; i < def->clock.ntimers; i++) {
- switch ((virDomainTimerNameType) def->clock.timers[i]->name) {
+ switch ((virDomainClockOffsetType) clock.offset) {
+ case VIR_DOMAIN_CLOCK_OFFSET_VARIABLE:
+ if (clock.data.variable.basis == VIR_DOMAIN_CLOCK_BASIS_LOCALTIME)
+ libxl_defbool_set(&b_info->localtime, true);
+ b_info->rtc_timeoffset = clock.data.variable.adjustment;
+ break;
+
+ case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME:
+ libxl_defbool_set(&b_info->localtime, true);
+ break;
+
+ /* Nothing to do since UTC is the default in libxl */
+ case VIR_DOMAIN_CLOCK_OFFSET_UTC:
+ break;
+
+ case VIR_DOMAIN_CLOCK_OFFSET_TIMEZONE:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unsupported clock offset '%s'"),
+ virDomainClockOffsetTypeToString(clock.offset));
+ return -1;
+
+ case VIR_DOMAIN_CLOCK_OFFSET_LAST:
+ default:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unexpected clock offset '%d'"), clock.offset);
+ return -1;
+ }
+
+ for (i = 0; i < clock.ntimers; i++) {
+ switch ((virDomainTimerNameType) clock.timers[i]->name) {
case VIR_DOMAIN_TIMER_NAME_TSC:
- switch (def->clock.timers[i]->mode) {
+ switch (clock.timers[i]->mode) {
case VIR_DOMAIN_TIMER_MODE_NATIVE:
b_info->tsc_mode = LIBXL_TSC_MODE_NATIVE;
break;
@@ -315,10 +344,10 @@ libxlMakeDomBuildInfo(virDomainDefPtr de
if (!hvm) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unsupported timer type (name) '%s'"),
- virDomainTimerNameTypeToString(def->clock.timers[i]->name));
+ virDomainTimerNameTypeToString(clock.timers[i]->name));
return -1;
}
- if (def->clock.timers[i]->present == 1)
+ if (clock.timers[i]->present == 1)
libxl_defbool_set(&b_info->u.hvm.hpet, 1);
break;
@@ -329,7 +358,7 @@ libxlMakeDomBuildInfo(virDomainDefPtr de
case VIR_DOMAIN_TIMER_NAME_PIT:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("unsupported timer type (name) '%s'"),
- virDomainTimerNameTypeToString(def->clock.timers[i]->name));
+ virDomainTimerNameTypeToString(clock.timers[i]->name));
return -1;
case VIR_DOMAIN_TIMER_NAME_LAST:
Index: libvirt-4.0.0/tests/libxlxml2domconfigdata/variable-clock-hvm.json
===================================================================
--- /dev/null
+++ libvirt-4.0.0/tests/libxlxml2domconfigdata/variable-clock-hvm.json
@@ -0,0 +1,91 @@
+{
+ "c_info": {
+ "type": "hvm",
+ "name": "test-hvm",
+ "uuid": "2147d599-9cc6-c0dc-92ab-4064b5446e9b"
+ },
+ "b_info": {
+ "max_vcpus": 4,
+ "avail_vcpus": [
+ 0,
+ 1,
+ 2,
+ 3
+ ],
+ "max_memkb": 1048576,
+ "target_memkb": 1048576,
+ "video_memkb": 8192,
+ "shadow_memkb": 12288,
+ "rtc_timeoffset": 3600,
+ "localtime": "True",
+ "device_model_version": "qemu_xen",
+ "device_model": "/bin/true",
+ "sched_params": {
+ "weight": 1000
+ },
+ "type.hvm": {
+ "pae": "True",
+ "apic": "True",
+ "acpi": "True",
+ "vga": {
+ "kind": "cirrus"
+ },
+ "vnc": {
+ "enable": "True",
+ "listen": "0.0.0.0",
+ "findunused": "False"
+ },
+ "sdl": {
+ "enable": "False"
+ },
+ "spice": {
+
+ },
+ "boot": "c",
+ "rdm": {
+
+ }
+ },
+ "arch_arm": {
+
+ }
+ },
+ "disks": [
+ {
+ "pdev_path": "/var/lib/xen/images/test-hvm.img",
+ "vdev": "hda",
+ "backend": "qdisk",
+ "format": "raw",
+ "removable": 1,
+ "readwrite": 1
+ }
+ ],
+ "nics": [
+ {
+ "devid": 0,
+ "mac": "00:16:3e:66:12:b4",
+ "bridge": "br0",
+ "script": "/etc/xen/scripts/vif-bridge",
+ "nictype": "vif_ioemu"
+ }
+ ],
+ "vfbs": [
+ {
+ "devid": -1,
+ "vnc": {
+ "enable": "True",
+ "listen": "0.0.0.0",
+ "findunused": "False"
+ },
+ "sdl": {
+ "enable": "False"
+ }
+ }
+ ],
+ "vkbs": [
+ {
+ "devid": -1
+ }
+ ],
+ "on_reboot": "restart"
+}
Index: libvirt-4.0.0/tests/libxlxml2domconfigdata/variable-clock-hvm.xml
===================================================================
--- /dev/null
+++ libvirt-4.0.0/tests/libxlxml2domconfigdata/variable-clock-hvm.xml
@@ -0,0 +1,36 @@
+<domain type='xen'>
+ <name>test-hvm</name>
+ <description>None</description>
+ <uuid>2147d599-9cc6-c0dc-92ab-4064b5446e9b</uuid>
+ <memory>1048576</memory>
+ <currentMemory>1048576</currentMemory>
+ <vcpu>4</vcpu>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <clock offset='localtime' adjustment='3600'/>
+ <os>
+ <type>hvm</type>
+ <loader>/usr/lib/xen/boot/hvmloader</loader>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <apic/>
+ <acpi/>
+ <pae/>
+ </features>
+ <devices>
+ <emulator>/bin/true</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu'/>
+ <source file='/var/lib/xen/images/test-hvm.img'/>
+ <target dev='hda'/>
+ </disk>
+ <interface type='bridge'>
+ <source bridge='br0'/>
+ <mac address='00:16:3e:66:12:b4'/>
+ <script path='/etc/xen/scripts/vif-bridge'/>
+ </interface>
+ <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
+ </devices>
+</domain>
Index: libvirt-4.0.0/tests/libxlxml2domconfigtest.c
===================================================================
--- libvirt-4.0.0.orig/tests/libxlxml2domconfigtest.c
+++ libvirt-4.0.0/tests/libxlxml2domconfigtest.c
@@ -188,6 +188,7 @@ mymain(void)
DO_TEST("basic-pv");
DO_TEST("basic-hvm");
+ DO_TEST("variable-clock-hvm");
DO_TEST("moredevs-hvm");
DO_TEST("vnuma-hvm");
DO_TEST("multiple-ip");
Index: libvirt-4.0.0/tests/xlconfigdata/test-fullvirt-tsc-timer.cfg
===================================================================
--- libvirt-4.0.0.orig/tests/xlconfigdata/test-fullvirt-tsc-timer.cfg
+++ libvirt-4.0.0/tests/xlconfigdata/test-fullvirt-tsc-timer.cfg
@@ -9,8 +9,8 @@ apic = 1
hap = 0
viridian = 0
tsc_mode = "native"
-rtc_timeoffset = 0
-localtime = 0
+rtc_timeoffset = 3600
+localtime = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
Index: libvirt-4.0.0/tests/xlconfigdata/test-fullvirt-tsc-timer.xml
===================================================================
--- libvirt-4.0.0.orig/tests/xlconfigdata/test-fullvirt-tsc-timer.xml
+++ libvirt-4.0.0/tests/xlconfigdata/test-fullvirt-tsc-timer.xml
@@ -15,7 +15,7 @@
<pae/>
<hap state='off'/>
</features>
- <clock offset='variable' adjustment='0' basis='utc'>
+ <clock offset='variable' adjustment='3600' basis='localtime'>
<timer name='tsc' present='yes' mode='native'/>
</clock>
<on_poweroff>destroy</on_poweroff>

View File

@ -1,33 +0,0 @@
commit ef71caeaa81ab75daf441fe702d267c9b722bafb
Author: Jim Fehlig <jfehlig@suse.com>
Date: Wed Feb 21 18:48:38 2018 -0700
libxl: round memory values to next 1MiB increment
libxl requires the memory sizes to be rounded to 1MiB increments.
Attempting to start a domain that violates this requirement will
fail with the marginally helpful error
2018-02-22 01:55:32.921+0000: xc: panic: xc_dom_boot.c:141: xc_dom_boot_mem_init: can't allocate low memory for domain: Out of memory
2018-02-22 01:55:32.921+0000: libxl: libxl_dom.c:671:libxl__build_dom: xc_dom_boot_mem_init failed: No such file or directory
Round the maximum and current memory values to the next 1MiB
increment when generating the libxl_domain_config object.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Index: libvirt-4.0.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-4.0.0.orig/src/libxl/libxl_conf.c
+++ libvirt-4.0.0/src/libxl/libxl_conf.c
@@ -367,6 +367,10 @@ libxlMakeDomBuildInfo(virDomainDefPtr de
}
b_info->sched_params.weight = 1000;
+ /* Xen requires the memory sizes to be rounded to 1MiB increments */
+ virDomainDefSetMemoryTotal(def,
+ VIR_ROUND_UP(virDomainDefGetMemoryInitial(def), 1024));
+ def->mem.cur_balloon = VIR_ROUND_UP(def->mem.cur_balloon, 1024);
b_info->max_memkb = virDomainDefGetMemoryInitial(def);
b_info->target_memkb = def->mem.cur_balloon;
if (hvm) {

View File

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

View File

@ -1,10 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJaYc40AAoJEBVYiyZZa+pdapkIAJsN77Xyts8WupSGAjNx7BE+
aWlLfUnXc3TmtvXaqIYP0Vyc0AtWbiDaLAuIxdOXBM7ehABfka4xLevC4+t+cN8P
tMpT+oGnI+PhIAt1u6UAPjNwFvzV91/hwPEeA2Mhcc1+Mgzh/dU6VtbMl0iupgic
tUJOP0r3FN2woh8y5CZUwpCMTIDZ4FlOrqC1iyZfmhAE5nyqM+bO/tArRDZwK4TE
G1oLtioaN0ESY7zY7Vf4fpD9tufyyVfKjDvoMTKSmgzyLTzU3NpPi0NjE1Iw5TqP
m8jlmxvTHati6U6GLVerfZTMOKVfR6WzyWrUPnGkE65xfh9+Eyo66XMtgb04lMo=
=NAMU
-----END PGP SIGNATURE-----

3
libvirt-4.1.0.tar.xz Normal file
View File

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

10
libvirt-4.1.0.tar.xz.asc Normal file
View File

@ -0,0 +1,10 @@
-----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJanQlIAAoJEBVYiyZZa+pdrxsIAJN6V0s6j1gTS76KO0njYtJP
zaoOrTgI5D26I5ZsLQq8f7z+IB9g+2c5O2dl7Za0vNRKbDMDwj2+4W+Lm50swcVm
p4vJPGWD3zYst+yIWW2rny7+nZ14h51Q7henlIDt4CSFDhQ6rh8ngcaVpB9CdrUM
34hIzxgUVd9PPIVoWfMcFLkeQypIfqJArsF8RLMogOcyapwXPXVOn2oxaVbqYsVt
XkwIw7NFBY4bdjeZZo6dzvC78sjk2a9cutUjg3/odomhN/9PN/KVIfCJCSLmSfwI
+FmVfQD+s0rx0asvqGV8bLVkpmWTVegYjyZPu2hB3RzAAfVbEYBXLVjE57Xf/do=
=3Whv
-----END PGP SIGNATURE-----

View File

@ -2,11 +2,11 @@ Add POWER8 v2.0 and v2.1 to cpu map XML
From: <ro@suse.de>
Index: libvirt-4.0.0/src/cpu/cpu_map.xml
Index: libvirt-4.1.0/src/cpu/cpu_map.xml
===================================================================
--- libvirt-4.0.0.orig/src/cpu/cpu_map.xml
+++ libvirt-4.0.0/src/cpu/cpu_map.xml
@@ -2346,6 +2346,8 @@
--- libvirt-4.1.0.orig/src/cpu/cpu_map.xml
+++ libvirt-4.1.0/src/cpu/cpu_map.xml
@@ -2349,6 +2349,8 @@
<pvr value='0x004b0000' mask='0xffff0000'/>
<pvr value='0x004c0000' mask='0xffff0000'/>
<pvr value='0x004d0000' mask='0xffff0000'/>

View File

@ -1,8 +1,8 @@
Index: libvirt-4.0.0/configure.ac
Index: libvirt-4.1.0/configure.ac
===================================================================
--- libvirt-4.0.0.orig/configure.ac
+++ libvirt-4.0.0/configure.ac
@@ -257,6 +257,7 @@ LIBVIRT_ARG_LIBSSH
--- libvirt-4.1.0.orig/configure.ac
+++ libvirt-4.1.0/configure.ac
@@ -258,6 +258,7 @@ LIBVIRT_ARG_LIBSSH
LIBVIRT_ARG_LIBXML
LIBVIRT_ARG_MACVTAP
LIBVIRT_ARG_NETCF
@ -10,7 +10,7 @@ Index: libvirt-4.0.0/configure.ac
LIBVIRT_ARG_NSS
LIBVIRT_ARG_NUMACTL
LIBVIRT_ARG_OPENWSMAN
@@ -298,6 +299,7 @@ LIBVIRT_CHECK_LIBSSH
@@ -299,6 +300,7 @@ LIBVIRT_CHECK_LIBSSH
LIBVIRT_CHECK_LIBXML
LIBVIRT_CHECK_MACVTAP
LIBVIRT_CHECK_NETCF
@ -26,11 +26,11 @@ Index: libvirt-4.0.0/configure.ac
LIBVIRT_RESULT_NSS
LIBVIRT_RESULT_NUMACTL
LIBVIRT_RESULT_OPENWSMAN
Index: libvirt-4.0.0/src/Makefile.am
Index: libvirt-4.1.0/src/Makefile.am
===================================================================
--- libvirt-4.0.0.orig/src/Makefile.am
+++ libvirt-4.0.0/src/Makefile.am
@@ -1039,6 +1039,10 @@ if WITH_NETCF
--- libvirt-4.1.0.orig/src/Makefile.am
+++ libvirt-4.1.0/src/Makefile.am
@@ -857,6 +857,10 @@ if WITH_NETCF
INTERFACE_DRIVER_SOURCES += \
interface/interface_backend_netcf.c
endif WITH_NETCF
@ -41,7 +41,7 @@ Index: libvirt-4.0.0/src/Makefile.am
if WITH_UDEV
INTERFACE_DRIVER_SOURCES += \
interface/interface_backend_udev.c
@@ -1659,6 +1663,10 @@ if WITH_NETCF
@@ -1228,6 +1232,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-4.0.0/src/Makefile.am
if WITH_UDEV
libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
Index: libvirt-4.0.0/tools/virsh.c
Index: libvirt-4.1.0/tools/virsh.c
===================================================================
--- libvirt-4.0.0.orig/tools/virsh.c
+++ libvirt-4.0.0/tools/virsh.c
--- libvirt-4.1.0.orig/tools/virsh.c
+++ libvirt-4.1.0/tools/virsh.c
@@ -578,6 +578,8 @@ virshShowVersion(vshControl *ctl ATTRIBU
vshPrint(ctl, " Interface");
# if defined(WITH_NETCF)
@ -65,10 +65,10 @@ Index: libvirt-4.0.0/tools/virsh.c
# elif defined(WITH_UDEV)
vshPrint(ctl, " udev");
# endif
Index: libvirt-4.0.0/src/interface/interface_backend_netcf.c
Index: libvirt-4.1.0/src/interface/interface_backend_netcf.c
===================================================================
--- libvirt-4.0.0.orig/src/interface/interface_backend_netcf.c
+++ libvirt-4.0.0/src/interface/interface_backend_netcf.c
--- libvirt-4.1.0.orig/src/interface/interface_backend_netcf.c
+++ libvirt-4.1.0/src/interface/interface_backend_netcf.c
@@ -23,7 +23,12 @@
#include <config.h>
@ -83,7 +83,7 @@ Index: libvirt-4.0.0/src/interface/interface_backend_netcf.c
#include "virerror.h"
#include "datatypes.h"
@@ -66,6 +71,37 @@ VIR_ONCE_GLOBAL_INIT(virNetcfDriverState
@@ -67,6 +72,37 @@ VIR_ONCE_GLOBAL_INIT(virNetcfDriverState
static virNetcfDriverStatePtr driver;
@ -121,9 +121,9 @@ Index: libvirt-4.0.0/src/interface/interface_backend_netcf.c
static void
virNetcfDriverStateDispose(void *obj)
@@ -88,6 +124,10 @@ netcfStateInitialize(bool privileged ATT
if (!(driver = virObjectLockableNew(virNetcfDriverStateClass)))
return -1;
@@ -91,6 +127,10 @@ netcfStateInitialize(bool privileged,
driver->privileged = privileged;
+#ifdef WITH_NETCONTROL
+ nc_logger_redirect_to(interface_nc_log_driver);
@ -132,7 +132,7 @@ Index: libvirt-4.0.0/src/interface/interface_backend_netcf.c
/* open netcf */
if (ncf_init(&driver->netcf, NULL) != 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -1143,6 +1183,19 @@ static virStateDriver interfaceStateDriv
@@ -1238,6 +1278,19 @@ static virStateDriver interfaceStateDriv
int netcfIfaceRegister(void)
{
@ -149,13 +149,13 @@ Index: libvirt-4.0.0/src/interface/interface_backend_netcf.c
+
+ ncf_close(netcf);
+
if (virSetSharedInterfaceDriver(&interfaceDriver) < 0)
if (virRegisterConnectDriver(&interfaceConnectDriver, false) < 0)
return -1;
if (virRegisterStateDriver(&interfaceStateDriver) < 0)
Index: libvirt-4.0.0/src/interface/interface_driver.c
if (virSetSharedInterfaceDriver(&interfaceDriver) < 0)
Index: libvirt-4.1.0/src/interface/interface_driver.c
===================================================================
--- libvirt-4.0.0.orig/src/interface/interface_driver.c
+++ libvirt-4.0.0/src/interface/interface_driver.c
--- libvirt-4.1.0.orig/src/interface/interface_driver.c
+++ libvirt-4.1.0/src/interface/interface_driver.c
@@ -30,8 +30,15 @@ interfaceRegister(void)
if (netcfIfaceRegister() == 0)
return 0;
@ -173,10 +173,10 @@ Index: libvirt-4.0.0/src/interface/interface_driver.c
if (udevIfaceRegister() == 0)
return 0;
#endif /* WITH_UDEV */
Index: libvirt-4.0.0/m4/virt-netcontrol.m4
Index: libvirt-4.1.0/m4/virt-netcontrol.m4
===================================================================
--- /dev/null
+++ libvirt-4.0.0/m4/virt-netcontrol.m4
+++ libvirt-4.1.0/m4/virt-netcontrol.m4
@@ -0,0 +1,39 @@
+dnl The libnetcontrol library
+dnl

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Mon Mar 5 15:55:07 UTC 2018 - jfehlig@suse.com
- Update to libvirt 4.1.0
- Many incremental improvements and bug fixes, see
http://libvirt.org/news.html
- Dropped patches:
72adaf2f-revert-qemu-monitor-error-report.patch,
71d56a39-nodedev-fix-parse-PCI-address.patch,
68eed56b-conf-smbios-oem-strings.patch,
76977061-qemu-smbios-oem-strings.patch,
0c710a37-libxl-resume-lock-on-mig-failure.patch,
759b4d1b-virlog-determine-the-hostname-on-startup-CVE-2018-67.patch,
c2dc6698-fix-deadlock-obtaining-hostname.patch,
c391e07e-libxl-clock-settings.patch,
ef71caea-libxl-memalign.patch,
suse-apparmor-signal.patch
-------------------------------------------------------------------
Fri Feb 23 22:09:04 UTC 2018 - jfehlig@suse.com

View File

@ -171,10 +171,10 @@
Name: libvirt
Url: http://libvirt.org/
Version: 4.0.0
Version: 4.1.0
Release: 0
Summary: Library providing a simple virtualization API
License: LGPL-2.1+
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
Requires: %{name}-daemon = %{version}-%{release}
@ -317,16 +317,7 @@ Source5: suse-qemu-domain-hook.py
Source99: baselibs.conf
Source100: %{name}-rpmlintrc
# Upstream patches
Patch0: 72adaf2f-revert-qemu-monitor-error-report.patch
Patch1: 71d56a39-nodedev-fix-parse-PCI-address.patch
Patch2: 68eed56b-conf-smbios-oem-strings.patch
Patch3: 76977061-qemu-smbios-oem-strings.patch
Patch4: 0c710a37-libxl-resume-lock-on-mig-failure.patch
Patch5: 6b3d716e-keycodemap-py3.patch
Patch6: 759b4d1b-virlog-determine-the-hostname-on-startup-CVE-2018-67.patch
Patch7: c2dc6698-fix-deadlock-obtaining-hostname.patch
Patch8: c391e07e-libxl-clock-settings.patch
Patch9: ef71caea-libxl-memalign.patch
Patch0: 6b3d716e-keycodemap-py3.patch
# Patches pending upstream review
Patch100: libxl-dom-reset.patch
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch
@ -350,15 +341,14 @@ Patch205: suse-libvirtd-service-xen.patch
Patch206: suse-qemu-conf.patch
Patch207: suse-ovmf-paths.patch
Patch208: suse-apparmor-libnl-paths.patch
Patch209: suse-apparmor-signal.patch
Patch210: support-managed-pci-xen-driver.patch
Patch211: xen-sxpr-disk-type.patch
Patch212: libxl-support-block-script.patch
Patch213: apparmor-no-mount.patch
Patch214: qemu-apparmor-screenshot.patch
Patch215: libvirt-suse-netcontrol.patch
Patch216: lxc-wait-after-eth-del.patch
Patch217: libxl-qemu-emulator-caps.patch
Patch209: support-managed-pci-xen-driver.patch
Patch210: xen-sxpr-disk-type.patch
Patch211: libxl-support-block-script.patch
Patch212: apparmor-no-mount.patch
Patch213: qemu-apparmor-screenshot.patch
Patch214: libvirt-suse-netcontrol.patch
Patch215: lxc-wait-after-eth-del.patch
Patch216: libxl-qemu-emulator-caps.patch
# SLES-Only patches
%if ! 0%{?is_opensuse}
Patch400: virt-create-rootfs.patch
@ -840,6 +830,9 @@ Requires: gettext-runtime
# Needed by virt-pki-validate script.
Requires: cyrus-sasl
Requires: gnutls
%if %{with_bash_completion}
Requires: %{name}-bash-completion = %{version}-%{release}
%endif
%description client
The client binaries needed to access the virtualization
@ -863,10 +856,22 @@ Summary: Set of tools to control libvirt daemon
Group: Development/Libraries/C and C++
Requires: %{name}-libs = %{version}-%{release}
Requires: readline
%if %{with_bash_completion}
Requires: %{name}-bash-completion = %{version}-%{release}
%endif
%description admin
The client side utilities to control the libvirt daemon.
%if %{with_bash_completion}
%package bash-completion
Summary: Bash completion script
Group: Development/Libraries/C and C++
%description bash-completion
Bash completion script stub.
%endif
%package devel
Summary: Libraries, includes, etc. to compile with the libvirt library
Group: Development/Libraries/C and C++
@ -915,19 +920,10 @@ libvirt plugin for NSS for translating domain names into IP addresses.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
# it is submodule in git
# 6b3d716e-keycodemap-py3.patch patches the keycodemapdb git submodule
pushd src/keycodemapdb
%patch5 -p1
%patch0 -p1
popd
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch100 -p1
%patch101 -p1
%patch150 -p1
@ -956,7 +952,6 @@ popd
%patch214 -p1
%patch215 -p1
%patch216 -p1
%patch217 -p1
%if ! 0%{?is_opensuse}
%patch400 -p1
%endif
@ -1305,20 +1300,20 @@ fi
%pre daemon
%{_bindir}/getent group libvirt >/dev/null || %{_sbindir}/groupadd -r libvirt
%service_add_pre libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket
%service_add_pre libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket
%post daemon
/sbin/ldconfig
%if %{with_apparmor}
%apparmor_reload /etc/apparmor.d/usr.sbin.libvirtd
%endif
%service_add_post libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket
%service_add_post libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket
%{fillup_only -n libvirtd}
%{fillup_only -n virtlockd}
%{fillup_only -n virtlogd}
%preun daemon
%service_del_preun libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket
%service_del_preun libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket
%postun daemon
/sbin/ldconfig
@ -1329,7 +1324,7 @@ if test $1 -eq 0 ; then
done
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%service_del_postun libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket
%service_del_postun libvirtd.service virtlockd.service virtlockd.socket virtlogd.service virtlogd.socket virtlockd-admin.socket virtlogd-admin.socket
%posttrans daemon
# All connection drivers should be installed post transaction.
@ -1390,8 +1385,10 @@ fi
%{_unitdir}/virt-guest-shutdown.target
%{_unitdir}/virtlogd.service
%{_unitdir}/virtlogd.socket
%{_unitdir}/virtlogd-admin.socket
%{_unitdir}/virtlockd.service
%{_unitdir}/virtlockd.socket
%{_unitdir}/virtlockd-admin.socket
%{_sbindir}/rclibvirtd
%{_sbindir}/rcvirtlogd
%{_sbindir}/rcvirtlockd
@ -1414,7 +1411,7 @@ fi
%{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp
%{_datadir}/systemtap/tapset/libvirt_functions.stp
%if %{with_bash_completion}
%{_datadir}/bash-completion/completions/vsh
%{_datadir}/bash-completion/completions/virsh
%endif
%dir %{_localstatedir}/lib/libvirt/
%dir %attr(0711, root, root) %{_localstatedir}/lib/libvirt/images/
@ -1683,6 +1680,14 @@ fi
%files admin
%doc %{_mandir}/man1/virt-admin.1*
%{_bindir}/virt-admin
%if %{with_bash_completion}
%{_datadir}/bash-completion/completions/virt-admin
%endif
%if %{with_bash_completion}
%files bash-completion
%{_datadir}/bash-completion/completions/vsh
%endif
%files devel
%{_libdir}/libvirt.so

View File

@ -8,11 +8,11 @@ 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-4.0.0/src/libxl/libxl_driver.c
Index: libvirt-4.1.0/src/libxl/libxl_driver.c
===================================================================
--- libvirt-4.0.0.orig/src/libxl/libxl_driver.c
+++ libvirt-4.0.0/src/libxl/libxl_driver.c
@@ -1382,6 +1382,61 @@ libxlDomainReboot(virDomainPtr dom, unsi
--- libvirt-4.1.0.orig/src/libxl/libxl_driver.c
+++ libvirt-4.1.0/src/libxl/libxl_driver.c
@@ -1380,6 +1380,61 @@ libxlDomainReboot(virDomainPtr dom, unsi
}
static int
@ -74,7 +74,7 @@ Index: libvirt-4.0.0/src/libxl/libxl_driver.c
libxlDomainDestroyFlags(virDomainPtr dom,
unsigned int flags)
{
@@ -6498,6 +6553,7 @@ static virHypervisorDriver libxlHypervis
@@ -6496,6 +6551,7 @@ static virHypervisorDriver libxlHypervis
.domainShutdown = libxlDomainShutdown, /* 0.9.0 */
.domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */
.domainReboot = libxlDomainReboot, /* 0.9.0 */

View File

@ -8,10 +8,10 @@ as the default <emulator>, instead of the qemu-xen one.
See FATE#320638 for details.
Index: libvirt-4.0.0/src/libxl/libxl_capabilities.c
Index: libvirt-4.1.0/src/libxl/libxl_capabilities.c
===================================================================
--- libvirt-4.0.0.orig/src/libxl/libxl_capabilities.c
+++ libvirt-4.0.0/src/libxl/libxl_capabilities.c
--- libvirt-4.1.0.orig/src/libxl/libxl_capabilities.c
+++ libvirt-4.1.0/src/libxl/libxl_capabilities.c
@@ -38,6 +38,7 @@
#include "libxl_capabilities.h"
#include "cpu/cpu_x86.h"

View File

@ -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-4.0.0/src/libxl/libxl_conf.c
Index: libvirt-4.1.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-4.0.0.orig/src/libxl/libxl_conf.c
+++ libvirt-4.0.0/src/libxl/libxl_conf.c
--- libvirt-4.1.0.orig/src/libxl/libxl_conf.c
+++ libvirt-4.1.0/src/libxl/libxl_conf.c
@@ -769,6 +769,30 @@ libxlDiskSetDiscard(libxl_device_disk *x
#endif
}

View File

@ -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-4.0.0/include/libvirt/libvirt-domain.h
Index: libvirt-4.1.0/include/libvirt/libvirt-domain.h
===================================================================
--- libvirt-4.0.0.orig/include/libvirt/libvirt-domain.h
+++ libvirt-4.0.0/include/libvirt/libvirt-domain.h
--- libvirt-4.1.0.orig/include/libvirt/libvirt-domain.h
+++ libvirt-4.1.0/include/libvirt/libvirt-domain.h
@@ -1008,6 +1008,31 @@ typedef enum {
*/
# define VIR_MIGRATE_PARAM_AUTO_CONVERGE_INCREMENT "auto_converge.increment"
@ -52,11 +52,11 @@ Index: libvirt-4.0.0/include/libvirt/libvirt-domain.h
/* Domain migration. */
virDomainPtr virDomainMigrate (virDomainPtr domain, virConnectPtr dconn,
unsigned long flags, const char *dname,
Index: libvirt-4.0.0/src/libxl/libxl_driver.c
Index: libvirt-4.1.0/src/libxl/libxl_driver.c
===================================================================
--- libvirt-4.0.0.orig/src/libxl/libxl_driver.c
+++ libvirt-4.0.0/src/libxl/libxl_driver.c
@@ -6100,6 +6100,9 @@ libxlDomainMigratePerform3Params(virDoma
--- libvirt-4.1.0.orig/src/libxl/libxl_driver.c
+++ libvirt-4.1.0/src/libxl/libxl_driver.c
@@ -6098,6 +6098,9 @@ libxlDomainMigratePerform3Params(virDoma
const char *dname = NULL;
const char *uri = NULL;
int ret = -1;
@ -66,7 +66,7 @@ Index: libvirt-4.0.0/src/libxl/libxl_driver.c
#ifdef LIBXL_HAVE_NO_SUSPEND_RESUME
virReportUnsupportedError();
@@ -6116,6 +6119,18 @@ libxlDomainMigratePerform3Params(virDoma
@@ -6114,6 +6117,18 @@ libxlDomainMigratePerform3Params(virDoma
virTypedParamsGetString(params, nparams,
VIR_MIGRATE_PARAM_DEST_NAME,
&dname) < 0 ||
@ -85,7 +85,7 @@ Index: libvirt-4.0.0/src/libxl/libxl_driver.c
virTypedParamsGetString(params, nparams,
VIR_MIGRATE_PARAM_URI,
&uri) < 0)
@@ -6130,11 +6145,11 @@ libxlDomainMigratePerform3Params(virDoma
@@ -6128,11 +6143,11 @@ libxlDomainMigratePerform3Params(virDoma
if ((flags & (VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER))) {
if (libxlDomainMigrationPerformP2P(driver, vm, dom->conn, dom_xml,
@ -99,10 +99,10 @@ Index: libvirt-4.0.0/src/libxl/libxl_driver.c
goto cleanup;
}
Index: libvirt-4.0.0/src/libxl/libxl_migration.c
Index: libvirt-4.1.0/src/libxl/libxl_migration.c
===================================================================
--- libvirt-4.0.0.orig/src/libxl/libxl_migration.c
+++ libvirt-4.0.0/src/libxl/libxl_migration.c
--- libvirt-4.1.0.orig/src/libxl/libxl_migration.c
+++ libvirt-4.1.0/src/libxl/libxl_migration.c
@@ -359,18 +359,39 @@ libxlMigrateReceive(virNetSocketPtr sock
static int
libxlDoMigrateSend(libxlDriverPrivatePtr driver,
@ -263,10 +263,10 @@ Index: libvirt-4.0.0/src/libxl/libxl_migration.c
virObjectLock(vm);
if (ret < 0)
Index: libvirt-4.0.0/src/libxl/libxl_migration.h
Index: libvirt-4.1.0/src/libxl/libxl_migration.h
===================================================================
--- libvirt-4.0.0.orig/src/libxl/libxl_migration.h
+++ libvirt-4.0.0/src/libxl/libxl_migration.h
--- libvirt-4.1.0.orig/src/libxl/libxl_migration.h
+++ libvirt-4.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, \
@ -311,10 +311,10 @@ Index: libvirt-4.0.0/src/libxl/libxl_migration.h
virDomainPtr
libxlDomainMigrationFinish(virConnectPtr dconn,
Index: libvirt-4.0.0/tools/virsh-domain.c
Index: libvirt-4.1.0/tools/virsh-domain.c
===================================================================
--- libvirt-4.0.0.orig/tools/virsh-domain.c
+++ libvirt-4.0.0/tools/virsh-domain.c
--- libvirt-4.1.0.orig/tools/virsh-domain.c
+++ libvirt-4.1.0/tools/virsh-domain.c
@@ -10540,6 +10540,22 @@ static const vshCmdOptDef opts_migrate[]
.type = VSH_OT_BOOL,
.help = N_("use TLS for migration")
@ -374,10 +374,10 @@ Index: libvirt-4.0.0/tools/virsh-domain.c
if (vshCommandOptStringReq(ctl, cmd, "xml", &opt) < 0)
goto out;
if (opt) {
Index: libvirt-4.0.0/tools/virsh.pod
Index: libvirt-4.1.0/tools/virsh.pod
===================================================================
--- libvirt-4.0.0.orig/tools/virsh.pod
+++ libvirt-4.0.0/tools/virsh.pod
--- libvirt-4.1.0.orig/tools/virsh.pod
+++ libvirt-4.1.0/tools/virsh.pod
@@ -1849,6 +1849,14 @@ Providing I<--tls> causes the migration
the migration of the domain. Usage requires proper TLS setup for both source
and target.

View File

@ -7,10 +7,10 @@ and npiv.
For more details, see bsc#954872 and FATE#319810
Index: libvirt-4.0.0/src/libxl/libxl_conf.c
Index: libvirt-4.1.0/src/libxl/libxl_conf.c
===================================================================
--- libvirt-4.0.0.orig/src/libxl/libxl_conf.c
+++ libvirt-4.0.0/src/libxl/libxl_conf.c
--- libvirt-4.1.0.orig/src/libxl/libxl_conf.c
+++ libvirt-4.1.0/src/libxl/libxl_conf.c
@@ -769,6 +769,25 @@ libxlDiskSetDiscard(libxl_device_disk *x
#endif
}

View File

@ -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-4.0.0/src/lxc/lxc_controller.c
Index: libvirt-4.1.0/src/lxc/lxc_controller.c
===================================================================
--- libvirt-4.0.0.orig/src/lxc/lxc_controller.c
+++ libvirt-4.0.0/src/lxc/lxc_controller.c
--- libvirt-4.1.0.orig/src/lxc/lxc_controller.c
+++ libvirt-4.1.0/src/lxc/lxc_controller.c
@@ -73,6 +73,7 @@
#include "rpc/virnetdaemon.h"
#include "virstring.h"
@ -25,7 +25,7 @@ Index: libvirt-4.0.0/src/lxc/lxc_controller.c
#define VIR_FROM_THIS VIR_FROM_LXC
@@ -1997,6 +1998,7 @@ static int virLXCControllerDeleteInterfa
@@ -2003,6 +2004,7 @@ static int virLXCControllerDeleteInterfa
if (virNetDevVethDelete(ctrl->veths[i]) < 0)
ret = -1;
}
@ -33,11 +33,11 @@ Index: libvirt-4.0.0/src/lxc/lxc_controller.c
return ret;
}
Index: libvirt-4.0.0/src/lxc/lxc_driver.c
Index: libvirt-4.1.0/src/lxc/lxc_driver.c
===================================================================
--- libvirt-4.0.0.orig/src/lxc/lxc_driver.c
+++ libvirt-4.0.0/src/lxc/lxc_driver.c
@@ -76,6 +76,7 @@
--- libvirt-4.1.0.orig/src/lxc/lxc_driver.c
+++ libvirt-4.1.0/src/lxc/lxc_driver.c
@@ -75,6 +75,7 @@
#include "virtime.h"
#include "virtypedparam.h"
#include "viruri.h"
@ -45,7 +45,7 @@ Index: libvirt-4.0.0/src/lxc/lxc_driver.c
#include "virstring.h"
#include "viraccessapicheck.h"
#include "viraccessapichecklxc.h"
@@ -4007,6 +4008,7 @@ lxcDomainAttachDeviceNetLive(virConnectP
@@ -4021,6 +4022,7 @@ lxcDomainAttachDeviceNetLive(virConnectP
case VIR_DOMAIN_NET_TYPE_NETWORK:
case VIR_DOMAIN_NET_TYPE_ETHERNET:
ignore_value(virNetDevVethDelete(veth));
@ -53,7 +53,7 @@ Index: libvirt-4.0.0/src/lxc/lxc_driver.c
break;
case VIR_DOMAIN_NET_TYPE_DIRECT:
@@ -4441,6 +4443,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb
@@ -4464,6 +4466,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb
virDomainAuditNet(vm, detach, NULL, "detach", false);
goto cleanup;
}
@ -61,11 +61,11 @@ Index: libvirt-4.0.0/src/lxc/lxc_driver.c
break;
/* It'd be nice to support this, but with macvlan
Index: libvirt-4.0.0/src/lxc/lxc_process.c
Index: libvirt-4.1.0/src/lxc/lxc_process.c
===================================================================
--- libvirt-4.0.0.orig/src/lxc/lxc_process.c
+++ libvirt-4.0.0/src/lxc/lxc_process.c
@@ -52,6 +52,7 @@
--- libvirt-4.1.0.orig/src/lxc/lxc_process.c
+++ libvirt-4.1.0/src/lxc/lxc_process.c
@@ -51,6 +51,7 @@
#include "viratomic.h"
#include "virprocess.h"
#include "virsystemd.h"
@ -73,9 +73,9 @@ Index: libvirt-4.0.0/src/lxc/lxc_process.c
#include "netdev_bandwidth_conf.h"
#define VIR_FROM_THIS VIR_FROM_LXC
@@ -221,6 +222,7 @@ static void virLXCProcessCleanup(virLXCD
@@ -220,6 +221,7 @@ static void virLXCProcessCleanup(virLXCD
}
networkReleaseActualDevice(vm->def, iface);
virDomainNetReleaseActualDevice(vm->def, iface);
}
+ virWaitForDevices();

View File

@ -17,11 +17,11 @@ Signed-off-by: Martin Wilck <mwilck@suse.com>
tests/networkxml2confdata/dhcp6host-routed-network.conf | 1 -
2 files changed, 8 insertions(+), 2 deletions(-)
Index: libvirt-4.0.0/src/network/bridge_driver.c
Index: libvirt-4.1.0/src/network/bridge_driver.c
===================================================================
--- libvirt-4.0.0.orig/src/network/bridge_driver.c
+++ libvirt-4.0.0/src/network/bridge_driver.c
@@ -1393,7 +1393,14 @@ networkDnsmasqConfContents(virNetworkObj
--- libvirt-4.1.0.orig/src/network/bridge_driver.c
+++ libvirt-4.1.0/src/network/bridge_driver.c
@@ -1470,7 +1470,14 @@ networkDnsmasqConfContents(virNetworkObj
if (VIR_SOCKET_ADDR_IS_FAMILY(&ipdef->address, AF_INET)) {
if (ipdef->nranges || ipdef->nhosts) {
virBufferAddLit(&configbuf, "dhcp-no-override\n");
@ -37,10 +37,10 @@ Index: libvirt-4.0.0/src/network/bridge_driver.c
}
if (ipdef->tftproot) {
Index: libvirt-4.0.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
Index: libvirt-4.1.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
===================================================================
--- libvirt-4.0.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf
+++ libvirt-4.0.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
--- libvirt-4.1.0.orig/tests/networkxml2confdata/dhcp6host-routed-network.conf
+++ libvirt-4.1.0/tests/networkxml2confdata/dhcp6host-routed-network.conf
@@ -10,7 +10,6 @@ bind-dynamic
interface=virbr1
dhcp-range=192.168.122.1,static

View File

@ -2,10 +2,10 @@ Canonicalize hostarch name ppc64le to ppc64
See bnc#894956
Index: libvirt-4.0.0/src/util/virarch.c
Index: libvirt-4.1.0/src/util/virarch.c
===================================================================
--- libvirt-4.0.0.orig/src/util/virarch.c
+++ libvirt-4.0.0/src/util/virarch.c
--- libvirt-4.1.0.orig/src/util/virarch.c
+++ libvirt-4.1.0/src/util/virarch.c
@@ -169,6 +169,8 @@ virArch virArchFromHost(void)
arch = VIR_ARCH_I686;
} else if (STREQ(ut.machine, "amd64")) {

View File

@ -1,7 +1,7 @@
Index: libvirt-4.0.0/examples/apparmor/libvirt-qemu
Index: libvirt-4.1.0/examples/apparmor/libvirt-qemu
===================================================================
--- libvirt-4.0.0.orig/examples/apparmor/libvirt-qemu
+++ libvirt-4.0.0/examples/apparmor/libvirt-qemu
--- libvirt-4.1.0.orig/examples/apparmor/libvirt-qemu
+++ libvirt-4.1.0/examples/apparmor/libvirt-qemu
@@ -193,3 +193,6 @@
# silence refusals to open lttng files (see LP: #1432644)
deny /dev/shm/lttng-ust-wait-* r,

View File

@ -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-4.0.0/src/xenconfig/xen_common.c
Index: libvirt-4.1.0/src/xenconfig/xen_common.c
===================================================================
--- libvirt-4.0.0.orig/src/xenconfig/xen_common.c
+++ libvirt-4.0.0/src/xenconfig/xen_common.c
--- libvirt-4.1.0.orig/src/xenconfig/xen_common.c
+++ libvirt-4.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-4.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-4.0.0/src/xenconfig/xen_sxpr.c
Index: libvirt-4.1.0/src/xenconfig/xen_sxpr.c
===================================================================
--- libvirt-4.0.0.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-4.0.0/src/xenconfig/xen_sxpr.c
--- libvirt-4.1.0.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-4.1.0/src/xenconfig/xen_sxpr.c
@@ -1057,6 +1057,7 @@ xenParseSxprPCI(virDomainDefPtr def,
int busID;
int slotID;

View File

@ -8,10 +8,10 @@ It was also noticed that the per-domain profiles need a libnl rule
to squelch a denial when starting confined domains.
Found while investigating bsc#1058847
Index: libvirt-4.0.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
Index: libvirt-4.1.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
===================================================================
--- libvirt-4.0.0.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
+++ libvirt-4.0.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
--- libvirt-4.1.0.orig/examples/apparmor/usr.lib.libvirt.virt-aa-helper
+++ libvirt-4.1.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
@@ -17,7 +17,7 @@ profile virt-aa-helper /usr/{lib,lib64}/
owner @{PROC}/[0-9]*/status r,
@{PROC}/filesystems r,
@ -21,10 +21,10 @@ Index: libvirt-4.0.0/examples/apparmor/usr.lib.libvirt.virt-aa-helper
# for hostdev
/sys/devices/ r,
Index: libvirt-4.0.0/examples/apparmor/libvirt-qemu
Index: libvirt-4.1.0/examples/apparmor/libvirt-qemu
===================================================================
--- libvirt-4.0.0.orig/examples/apparmor/libvirt-qemu
+++ libvirt-4.0.0/examples/apparmor/libvirt-qemu
--- libvirt-4.1.0.orig/examples/apparmor/libvirt-qemu
+++ libvirt-4.1.0/examples/apparmor/libvirt-qemu
@@ -62,6 +62,7 @@
#/dev/fb* rw,

View File

@ -1,25 +0,0 @@
apparmor: allow libvirtd to send signals to unconfined processes
When confinement of QEMU/KVM domains is not enforced (security_default_confined = 0),
qemu processes run unconfined. Add a rule to the libvirtd apparmor profile allowing
sending signals to unconfined processes. Without the rule, libvirtd
is unable to signal QEMU/KVM domains. E.g. 'virsh destroy dom' results in the
following denial in audit.log
type=AVC msg=audit(1510951646.581:939): apparmor="DENIED" operation="signal"
profile="/usr/sbin/libvirtd" pid=18891 comm="libvirtd" requested_mask="send"
denied_mask="send" signal=term peer="unconfined"
Index: libvirt-4.0.0/examples/apparmor/usr.sbin.libvirtd
===================================================================
--- libvirt-4.0.0.orig/examples/apparmor/usr.sbin.libvirtd
+++ libvirt-4.0.0/examples/apparmor/usr.sbin.libvirtd
@@ -63,7 +63,7 @@
signal (send) peer=/usr/sbin/dnsmasq,
signal (read, send) peer=libvirt-*,
- signal (send) set=("kill") peer=unconfined,
+ signal (send) set=("kill", "term", "hup") peer=unconfined,
# Very lenient profile for libvirtd since we want to first focus on confining
# the guests. Guests will have a very restricted profile.

View File

@ -1,9 +1,9 @@
Adjust libvirt-guests service to conform to SUSE standards
Index: libvirt-4.0.0/tools/libvirt-guests.init.in
Index: libvirt-4.1.0/tools/libvirt-guests.init.in
===================================================================
--- libvirt-4.0.0.orig/tools/libvirt-guests.init.in
+++ libvirt-4.0.0/tools/libvirt-guests.init.in
--- libvirt-4.1.0.orig/tools/libvirt-guests.init.in
+++ libvirt-4.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
#
@ -46,10 +46,10 @@ Index: libvirt-4.0.0/tools/libvirt-guests.init.in
+
exec @libexecdir@/libvirt-guests.sh "$@"
Index: libvirt-4.0.0/tools/libvirt-guests.sh.in
Index: libvirt-4.1.0/tools/libvirt-guests.sh.in
===================================================================
--- libvirt-4.0.0.orig/tools/libvirt-guests.sh.in
+++ libvirt-4.0.0/tools/libvirt-guests.sh.in
--- libvirt-4.1.0.orig/tools/libvirt-guests.sh.in
+++ libvirt-4.1.0/tools/libvirt-guests.sh.in
@@ -16,14 +16,13 @@
# License along with this library. If not, see
# <http://www.gnu.org/licenses/>.
@ -151,7 +151,7 @@ Index: libvirt-4.0.0/tools/libvirt-guests.sh.in
eval_gettext "Resuming guests on \$uri URI..."; echo
for guest in $list; do
name=$(guest_name "$uri" "$guest")
@@ -409,7 +437,7 @@ shutdown_guests_parallel()
@@ -412,7 +440,7 @@ shutdown_guests_parallel()
timeout=$(($timeout - 1))
if [ $timeout -le 0 ]; then
eval_gettext "Timeout expired while shutting down domains"; echo
@ -160,7 +160,7 @@ Index: libvirt-4.0.0/tools/libvirt-guests.sh.in
return
fi
else
@@ -437,7 +465,7 @@ stop() {
@@ -441,7 +469,7 @@ stop() {
if [ $SHUTDOWN_TIMEOUT -lt 0 ]; then
gettext "SHUTDOWN_TIMEOUT must be equal or greater than 0"
echo
@ -169,7 +169,7 @@ Index: libvirt-4.0.0/tools/libvirt-guests.sh.in
return
fi
fi
@@ -485,14 +513,14 @@ stop() {
@@ -489,14 +517,14 @@ stop() {
if [ $? -ne 0 ]; then
eval_gettext "Failed to list persistent guests on \$uri"
echo
@ -186,7 +186,7 @@ Index: libvirt-4.0.0/tools/libvirt-guests.sh.in
set +f
return
fi
@@ -551,14 +579,13 @@ gueststatus() {
@@ -555,14 +583,13 @@ gueststatus() {
rh_status() {
if [ -f "$LISTFILE" ]; then
gettext "stopped, with saved guests"; echo
@ -203,16 +203,16 @@ Index: libvirt-4.0.0/tools/libvirt-guests.sh.in
fi
fi
}
@@ -603,4 +630,4 @@ case "$1" in
@@ -607,4 +634,4 @@ case "$1" in
usage
;;
esac
-exit $RETVAL
+rc_exit
Index: libvirt-4.0.0/tools/libvirt-guests.sysconf
Index: libvirt-4.1.0/tools/libvirt-guests.sysconf
===================================================================
--- libvirt-4.0.0.orig/tools/libvirt-guests.sysconf
+++ libvirt-4.0.0/tools/libvirt-guests.sysconf
--- libvirt-4.1.0.orig/tools/libvirt-guests.sysconf
+++ libvirt-4.1.0/tools/libvirt-guests.sysconf
@@ -1,19 +1,29 @@
+## Path: System/Virtualization/libvirt-guests
+

View File

@ -3,10 +3,10 @@ Disable TLS by default
On SUSE distros, the default is for libvirtd to listen only on the
Unix Domain Socket. The libvirt client still provides remote access
via a SSH tunnel.
Index: libvirt-4.0.0/daemon/libvirtd.conf
Index: libvirt-4.1.0/src/remote/libvirtd.conf
===================================================================
--- libvirt-4.0.0.orig/daemon/libvirtd.conf
+++ libvirt-4.0.0/daemon/libvirtd.conf
--- libvirt-4.1.0.orig/src/remote/libvirtd.conf
+++ libvirt-4.1.0/src/remote/libvirtd.conf
@@ -18,8 +18,8 @@
# It is necessary to setup a CA and issue server certificates before
# using this capability.
@ -18,10 +18,10 @@ Index: libvirt-4.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-4.0.0/daemon/libvirtd-config.c
Index: libvirt-4.1.0/src/remote/remote_daemon_config.c
===================================================================
--- libvirt-4.0.0.orig/daemon/libvirtd-config.c
+++ libvirt-4.0.0/daemon/libvirtd-config.c
--- libvirt-4.1.0.orig/src/remote/remote_daemon_config.c
+++ libvirt-4.1.0/src/remote/remote_daemon_config.c
@@ -110,7 +110,7 @@ daemonConfigNew(bool privileged ATTRIBUT
if (VIR_ALLOC(data) < 0)
return NULL;
@ -31,10 +31,10 @@ Index: libvirt-4.0.0/daemon/libvirtd-config.c
data->listen_tcp = 0;
if (VIR_STRDUP(data->tls_port, LIBVIRTD_TLS_PORT) < 0 ||
Index: libvirt-4.0.0/daemon/test_libvirtd.aug.in
Index: libvirt-4.1.0/src/remote/test_libvirtd.aug.in
===================================================================
--- libvirt-4.0.0.orig/daemon/test_libvirtd.aug.in
+++ libvirt-4.0.0/daemon/test_libvirtd.aug.in
--- libvirt-4.1.0.orig/src/remote/test_libvirtd.aug.in
+++ libvirt-4.1.0/src/remote/test_libvirtd.aug.in
@@ -2,7 +2,7 @@ module Test_libvirtd =
::CONFIG::

View File

@ -7,14 +7,14 @@ On SUSE distros, we promote libvirt and all the libvirt-based
tools. If a user installs libvirt on their SUSE Xen host, then
libvirt should be king and override xendomains. See bsc#1015348
Index: libvirt-4.0.0/daemon/libvirtd.service.in
Index: libvirt-4.1.0/src/remote/libvirtd.service.in
===================================================================
--- libvirt-4.0.0.orig/daemon/libvirtd.service.in
+++ libvirt-4.0.0/daemon/libvirtd.service.in
@@ -14,6 +14,8 @@ After=iscsid.service
After=apparmor.service
--- libvirt-4.1.0.orig/src/remote/libvirtd.service.in
+++ libvirt-4.1.0/src/remote/libvirtd.service.in
@@ -16,6 +16,8 @@ After=apparmor.service
After=local-fs.target
After=remote-fs.target
After=systemd-machined.service
+After=xencommons.service
+Conflicts=xendomains.service
Documentation=man:libvirtd(8)

View File

@ -1,9 +1,9 @@
Adjust libvirtd sysconfig file to conform to SUSE standards
Index: libvirt-4.0.0/daemon/libvirtd.sysconf
Index: libvirt-4.1.0/src/remote/libvirtd.sysconf
===================================================================
--- libvirt-4.0.0.orig/daemon/libvirtd.sysconf
+++ libvirt-4.0.0/daemon/libvirtd.sysconf
--- libvirt-4.1.0.orig/src/remote/libvirtd.sysconf
+++ libvirt-4.1.0/src/remote/libvirtd.sysconf
@@ -1,16 +1,25 @@
+## Path: System/Virtualization/libvirt
+

View File

@ -1,9 +1,9 @@
Adjust paths of OVMF firmwares on SUSE distros
Index: libvirt-4.0.0/src/qemu/qemu.conf
Index: libvirt-4.1.0/src/qemu/qemu.conf
===================================================================
--- libvirt-4.0.0.orig/src/qemu/qemu.conf
+++ libvirt-4.0.0/src/qemu/qemu.conf
--- libvirt-4.1.0.orig/src/qemu/qemu.conf
+++ libvirt-4.1.0/src/qemu/qemu.conf
@@ -743,10 +743,9 @@ security_default_confined = 0
# for x86_64 and i686, but it's AAVMF for aarch64. The libvirt default
# follows this scheme.
@ -18,10 +18,10 @@ Index: libvirt-4.0.0/src/qemu/qemu.conf
#]
# The backend to use for handling stdout/stderr output from
Index: libvirt-4.0.0/src/qemu/qemu_conf.c
Index: libvirt-4.1.0/src/qemu/qemu_conf.c
===================================================================
--- libvirt-4.0.0.orig/src/qemu/qemu_conf.c
+++ libvirt-4.0.0/src/qemu/qemu_conf.c
--- libvirt-4.1.0.orig/src/qemu/qemu_conf.c
+++ libvirt-4.1.0/src/qemu/qemu_conf.c
@@ -127,10 +127,9 @@ void qemuDomainCmdlineDefFree(qemuDomain
#ifndef DEFAULT_LOADER_NVRAM

View File

@ -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-4.0.0/src/qemu/qemu.conf
Index: libvirt-4.1.0/src/qemu/qemu.conf
===================================================================
--- libvirt-4.0.0.orig/src/qemu/qemu.conf
+++ libvirt-4.0.0/src/qemu/qemu.conf
--- libvirt-4.1.0.orig/src/qemu/qemu.conf
+++ libvirt-4.1.0/src/qemu/qemu.conf
@@ -380,11 +380,20 @@
# isolation, but it cannot appear in a list of drivers.
#

View File

@ -1,9 +1,9 @@
Adjust virtlockd sysconfig file to conform to SUSE standards
Index: libvirt-4.0.0/src/locking/virtlockd.sysconf
Index: libvirt-4.1.0/src/locking/virtlockd.sysconf
===================================================================
--- libvirt-4.0.0.orig/src/locking/virtlockd.sysconf
+++ libvirt-4.0.0/src/locking/virtlockd.sysconf
--- libvirt-4.1.0.orig/src/locking/virtlockd.sysconf
+++ libvirt-4.1.0/src/locking/virtlockd.sysconf
@@ -1,3 +1,7 @@
+## Path: System/Virtualization/virtlockd
+

View File

@ -1,9 +1,9 @@
Adjust virtlogd sysconfig file to conform to SUSE standards
Index: libvirt-4.0.0/src/logging/virtlogd.sysconf
Index: libvirt-4.1.0/src/logging/virtlogd.sysconf
===================================================================
--- libvirt-4.0.0.orig/src/logging/virtlogd.sysconf
+++ libvirt-4.0.0/src/logging/virtlogd.sysconf
--- libvirt-4.1.0.orig/src/logging/virtlogd.sysconf
+++ libvirt-4.1.0/src/logging/virtlogd.sysconf
@@ -1,3 +1,7 @@
+## Path: System/Virtualization/virtlogd
+

View File

@ -1,7 +1,7 @@
Index: libvirt-4.0.0/src/xenconfig/xen_sxpr.c
Index: libvirt-4.1.0/src/xenconfig/xen_sxpr.c
===================================================================
--- libvirt-4.0.0.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-4.0.0/src/xenconfig/xen_sxpr.c
--- libvirt-4.1.0.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-4.1.0/src/xenconfig/xen_sxpr.c
@@ -387,7 +387,7 @@ xenParseSxprVifRate(const char *rate, un
static int
xenParseSxprDisks(virDomainDefPtr def,

View File

@ -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-4.0.0/src/xenconfig/xen_sxpr.c
Index: libvirt-4.1.0/src/xenconfig/xen_sxpr.c
===================================================================
--- libvirt-4.0.0.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-4.0.0/src/xenconfig/xen_sxpr.c
--- libvirt-4.1.0.orig/src/xenconfig/xen_sxpr.c
+++ libvirt-4.1.0/src/xenconfig/xen_sxpr.c
@@ -501,10 +501,11 @@ xenParseSxprDisks(virDomainDefPtr def,
omnipotent, we can revisit this, perhaps stat()'ing
the src file in question */