diff --git a/0001-Extract-stats-functions-from-the-qemu-driver.patch b/0001-Extract-stats-functions-from-the-qemu-driver.patch index 05e78dd..26ad264 100644 --- a/0001-Extract-stats-functions-from-the-qemu-driver.patch +++ b/0001-Extract-stats-functions-from-the-qemu-driver.patch @@ -18,10 +18,10 @@ them. create mode 100644 src/conf/domain_stats.c create mode 100644 src/conf/domain_stats.h -Index: libvirt-4.9.0/src/conf/domain_stats.c +Index: libvirt-4.10.0/src/conf/domain_stats.c =================================================================== --- /dev/null -+++ libvirt-4.9.0/src/conf/domain_stats.c ++++ libvirt-4.10.0/src/conf/domain_stats.c @@ -0,0 +1,139 @@ +/* + * domain_stats.c: domain stats extraction helpers @@ -162,10 +162,10 @@ Index: libvirt-4.9.0/src/conf/domain_stats.c +} + +#undef STATS_ADD_NET_PARAM -Index: libvirt-4.9.0/src/conf/domain_stats.h +Index: libvirt-4.10.0/src/conf/domain_stats.h =================================================================== --- /dev/null -+++ libvirt-4.9.0/src/conf/domain_stats.h ++++ libvirt-4.10.0/src/conf/domain_stats.h @@ -0,0 +1,64 @@ +/* + * domain_stats.h: domain stats extraction helpers @@ -231,11 +231,11 @@ Index: libvirt-4.9.0/src/conf/domain_stats.h + int *maxparams); + +#endif /* __DOMAIN_STATS_H */ -Index: libvirt-4.9.0/src/libvirt_private.syms +Index: libvirt-4.10.0/src/libvirt_private.syms =================================================================== ---- libvirt-4.9.0.orig/src/libvirt_private.syms -+++ libvirt-4.9.0/src/libvirt_private.syms -@@ -653,6 +653,9 @@ virDomainConfNWFilterInstantiate; +--- libvirt-4.10.0.orig/src/libvirt_private.syms ++++ libvirt-4.10.0/src/libvirt_private.syms +@@ -658,6 +658,9 @@ virDomainConfNWFilterInstantiate; virDomainConfNWFilterTeardown; virDomainConfVMNWFilterTeardown; @@ -245,7 +245,7 @@ Index: libvirt-4.9.0/src/libvirt_private.syms # conf/interface_conf.h virInterfaceDefFormat; -@@ -1541,6 +1544,7 @@ virCgroupGetMemoryUsage; +@@ -1547,6 +1550,7 @@ virCgroupGetMemoryUsage; virCgroupGetMemSwapHardLimit; virCgroupGetMemSwapUsage; virCgroupGetPercpuStats; @@ -253,10 +253,10 @@ Index: libvirt-4.9.0/src/libvirt_private.syms virCgroupHasController; virCgroupHasEmptyTasks; virCgroupKillPainfully; -Index: libvirt-4.9.0/src/qemu/qemu_driver.c +Index: libvirt-4.10.0/src/qemu/qemu_driver.c =================================================================== ---- libvirt-4.9.0.orig/src/qemu/qemu_driver.c -+++ libvirt-4.9.0/src/qemu/qemu_driver.c +--- libvirt-4.10.0.orig/src/qemu/qemu_driver.c ++++ libvirt-4.10.0/src/qemu/qemu_driver.c @@ -69,6 +69,7 @@ #include "virarptable.h" #include "viruuid.h" @@ -265,7 +265,7 @@ Index: libvirt-4.9.0/src/qemu/qemu_driver.c #include "domain_audit.h" #include "node_device_conf.h" #include "virpci.h" -@@ -19677,21 +19678,7 @@ qemuDomainGetStatsState(virQEMUDriverPtr +@@ -19908,21 +19909,7 @@ qemuDomainGetStatsState(virQEMUDriverPtr int *maxparams, unsigned int privflags ATTRIBUTE_UNUSED) { @@ -288,8 +288,8 @@ Index: libvirt-4.9.0/src/qemu/qemu_driver.c } -@@ -19714,37 +19701,7 @@ qemuDomainGetStatsCpu(virQEMUDriverPtr d - unsigned int privflags ATTRIBUTE_UNUSED) +@@ -20112,37 +20099,7 @@ qemuDomainGetStatsCpuCgroup(virDomainObj + int *maxparams) { qemuDomainObjPrivatePtr priv = dom->privateData; - unsigned long long cpu_time = 0; @@ -326,8 +326,8 @@ Index: libvirt-4.9.0/src/qemu/qemu_driver.c + return virCgroupGetStatsCpu(priv->cgroup, record, maxparams); } - static int -@@ -19924,44 +19881,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr + +@@ -20340,44 +20297,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr return ret; } @@ -372,7 +372,7 @@ Index: libvirt-4.9.0/src/qemu/qemu_driver.c static int qemuDomainGetStatsInterface(virQEMUDriverPtr driver ATTRIBUTE_UNUSED, virDomainObjPtr dom, -@@ -19969,68 +19888,9 @@ qemuDomainGetStatsInterface(virQEMUDrive +@@ -20385,68 +20304,9 @@ qemuDomainGetStatsInterface(virQEMUDrive int *maxparams, unsigned int privflags ATTRIBUTE_UNUSED) { @@ -442,7 +442,7 @@ Index: libvirt-4.9.0/src/qemu/qemu_driver.c #define QEMU_ADD_BLOCK_PARAM_UI(record, maxparams, num, name, value) \ do { \ char param_name[VIR_TYPED_PARAM_FIELD_LENGTH]; \ -@@ -20263,10 +20123,10 @@ qemuDomainGetStatsBlockExportHeader(virD +@@ -20679,10 +20539,10 @@ qemuDomainGetStatsBlockExportHeader(virD { int ret = -1; @@ -455,7 +455,7 @@ Index: libvirt-4.9.0/src/qemu/qemu_driver.c if (src->id) QEMU_ADD_BLOCK_PARAM_UI(records, nrecords, recordnr, "backingIndex", src->id); -@@ -20406,7 +20266,7 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr +@@ -20822,7 +20682,7 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr * after the iteration than it is to iterate twice; but we still * want count listed first. */ count_index = record->nparams; @@ -464,21 +464,37 @@ Index: libvirt-4.9.0/src/qemu/qemu_driver.c for (i = 0; i < dom->def->ndisks; i++) { if (qemuDomainGetStatsBlockExportDisk(dom->def->disks[i], stats, nodestats, -@@ -20431,10 +20291,6 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr +@@ -20847,8 +20707,6 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr #undef QEMU_ADD_BLOCK_PARAM_ULL -#undef QEMU_ADD_NAME_PARAM - + #define QEMU_ADD_IOTHREAD_PARAM_UI(record, maxparams, id, name, value) \ + do { \ + char param_name[VIR_TYPED_PARAM_FIELD_LENGTH]; \ +@@ -20896,7 +20754,7 @@ qemuDomainGetStatsIOThread(virQEMUDriver + if (niothreads == 0) + return 0; + +- QEMU_ADD_COUNT_PARAM(record, maxparams, "iothread", niothreads); ++ VIR_DOMAIN_STATS_ADD_COUNT_PARAM(record, maxparams, "iothread", niothreads); + + for (i = 0; i < niothreads; i++) { + if (iothreads[i]->poll_valid) { +@@ -20929,8 +20787,6 @@ qemuDomainGetStatsIOThread(virQEMUDriver + + #undef QEMU_ADD_IOTHREAD_PARAM_ULL + -#undef QEMU_ADD_COUNT_PARAM - static int qemuDomainGetStatsPerfOneEvent(virPerfPtr perf, virPerfEventType type, -Index: libvirt-4.9.0/src/util/vircgroup.c +Index: libvirt-4.10.0/src/util/vircgroup.c =================================================================== ---- libvirt-4.9.0.orig/src/util/vircgroup.c -+++ libvirt-4.9.0/src/util/vircgroup.c +--- libvirt-4.10.0.orig/src/util/vircgroup.c ++++ libvirt-4.10.0/src/util/vircgroup.c @@ -2794,6 +2794,44 @@ virCgroupControllerAvailable(int control return ret; } @@ -540,10 +556,10 @@ Index: libvirt-4.9.0/src/util/vircgroup.c int virCgroupNewPartition(const char *path ATTRIBUTE_UNUSED, bool create ATTRIBUTE_UNUSED, -Index: libvirt-4.9.0/src/util/vircgroup.h +Index: libvirt-4.10.0/src/util/vircgroup.h =================================================================== ---- libvirt-4.9.0.orig/src/util/vircgroup.h -+++ libvirt-4.9.0/src/util/vircgroup.h +--- libvirt-4.10.0.orig/src/util/vircgroup.h ++++ libvirt-4.10.0/src/util/vircgroup.h @@ -287,4 +287,9 @@ int virCgroupSetOwner(virCgroupPtr cgrou int virCgroupHasEmptyTasks(virCgroupPtr cgroup, int controller); @@ -554,10 +570,10 @@ Index: libvirt-4.9.0/src/util/vircgroup.h + int *maxparams); + #endif /* __VIR_CGROUP_H__ */ -Index: libvirt-4.9.0/src/conf/Makefile.inc.am +Index: libvirt-4.10.0/src/conf/Makefile.inc.am =================================================================== ---- libvirt-4.9.0.orig/src/conf/Makefile.inc.am -+++ libvirt-4.9.0/src/conf/Makefile.inc.am +--- libvirt-4.10.0.orig/src/conf/Makefile.inc.am ++++ libvirt-4.10.0/src/conf/Makefile.inc.am @@ -20,6 +20,8 @@ DOMAIN_CONF_SOURCES = \ conf/domain_audit.h \ conf/domain_nwfilter.c \ diff --git a/0001-libxl-add-support-for-BlockResize-API.patch b/0001-libxl-add-support-for-BlockResize-API.patch index 5fdf1c0..8a22938 100644 --- a/0001-libxl-add-support-for-BlockResize-API.patch +++ b/0001-libxl-add-support-for-BlockResize-API.patch @@ -19,10 +19,10 @@ reworking this patch and submitting it to upstream libvirt. src/libxl/libxl_driver.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) -Index: libvirt-4.9.0/src/libxl/libxl_driver.c +Index: libvirt-4.10.0/src/libxl/libxl_driver.c =================================================================== ---- libvirt-4.9.0.orig/src/libxl/libxl_driver.c -+++ libvirt-4.9.0/src/libxl/libxl_driver.c +--- libvirt-4.10.0.orig/src/libxl/libxl_driver.c ++++ libvirt-4.10.0/src/libxl/libxl_driver.c @@ -5253,6 +5253,97 @@ libxlDomainMemoryStats(virDomainPtr dom, #undef LIBXL_SET_MEMSTAT @@ -121,7 +121,7 @@ Index: libvirt-4.9.0/src/libxl/libxl_driver.c static int libxlDomainGetJobInfo(virDomainPtr dom, virDomainJobInfoPtr info) -@@ -6635,6 +6726,7 @@ static virHypervisorDriver libxlHypervis +@@ -6637,6 +6728,7 @@ static virHypervisorDriver libxlHypervis #endif .nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */ .nodeGetCellsFreeMemory = libxlNodeGetCellsFreeMemory, /* 1.1.1 */ diff --git a/0002-lxc-implement-connectGetAllDomainStats.patch b/0002-lxc-implement-connectGetAllDomainStats.patch index 2e5df44..249bc09 100644 --- a/0002-lxc-implement-connectGetAllDomainStats.patch +++ b/0002-lxc-implement-connectGetAllDomainStats.patch @@ -9,10 +9,10 @@ them using the existing API. src/lxc/lxc_driver.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) -Index: libvirt-4.9.0/src/lxc/lxc_driver.c +Index: libvirt-4.10.0/src/lxc/lxc_driver.c =================================================================== ---- libvirt-4.9.0.orig/src/lxc/lxc_driver.c -+++ libvirt-4.9.0/src/lxc/lxc_driver.c +--- libvirt-4.10.0.orig/src/lxc/lxc_driver.c ++++ libvirt-4.10.0/src/lxc/lxc_driver.c @@ -78,6 +78,7 @@ #include "viraccessapichecklxc.h" #include "virhostdev.h" diff --git a/14d03b27-libxl-rm-redundant-virObjectEventStateQueue.patch b/14d03b27-libxl-rm-redundant-virObjectEventStateQueue.patch deleted file mode 100644 index fb963ee..0000000 --- a/14d03b27-libxl-rm-redundant-virObjectEventStateQueue.patch +++ /dev/null @@ -1,36 +0,0 @@ -commit 14d03b27bf8f8a13da27a297e23e2b1b80688459 -Author: Jim Fehlig -Date: Wed Oct 31 10:41:28 2018 -0600 - - libxl: remove redundant calls to virObjectEventStateQueue - - In libxlDomainShutdownThread, virObjectEventStateQueue is needlessly - called in the destroy and restart labels. The cleanup label aready - queues whatever event was created based on libxl_shutdown_reason. - There is no need to handle destroy and restart differently. - - Signed-off-by: Jim Fehlig - ACKed-by: Michal Privoznik - -diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c -index 0032b9dd11..9ed6ee8fb3 100644 ---- a/src/libxl/libxl_domain.c -+++ b/src/libxl/libxl_domain.c -@@ -538,8 +538,6 @@ libxlDomainShutdownThread(void *opaque) - } - - destroy: -- virObjectEventStateQueue(driver->domainEventState, dom_event); -- dom_event = NULL; - libxlDomainDestroyInternal(driver, vm); - libxlDomainCleanup(driver, vm); - if (!vm->persistent) -@@ -548,8 +546,6 @@ libxlDomainShutdownThread(void *opaque) - goto endjob; - - restart: -- virObjectEventStateQueue(driver->domainEventState, dom_event); -- dom_event = NULL; - libxlDomainDestroyInternal(driver, vm); - libxlDomainCleanup(driver, vm); - if (libxlDomainStartNew(driver, vm, false) < 0) { diff --git a/82452a5d-libxl-rm-goto-libxlDomainShutdownThread.patch b/82452a5d-libxl-rm-goto-libxlDomainShutdownThread.patch deleted file mode 100644 index 5034e17..0000000 --- a/82452a5d-libxl-rm-goto-libxlDomainShutdownThread.patch +++ /dev/null @@ -1,133 +0,0 @@ -commit 82452a5d7f55c7698459728a3ee071402f43bb4d -Author: Jim Fehlig -Date: Wed Oct 31 10:54:14 2018 -0600 - - libxl: Remove some goto labels in libxlDomainShutdownThread - - There are too many goto labels in libxlDomainShutdownThread. Convert the - 'destroy' and 'restart' labels to helper functions, leaving only the - commonly used pattern of 'endjob' and 'cleanup' labels. - - Signed-off-by: Jim Fehlig - ACKed-by: Michal Privoznik - -diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c -index 9ed6ee8fb3..4cdaee0e51 100644 ---- a/src/libxl/libxl_domain.c -+++ b/src/libxl/libxl_domain.c -@@ -430,6 +430,30 @@ virDomainDefParserConfig libxlDomainDefParserConfig = { - }; - - -+static void -+libxlDomainShutdownHandleDestroy(libxlDriverPrivatePtr driver, -+ virDomainObjPtr vm) -+{ -+ libxlDomainDestroyInternal(driver, vm); -+ libxlDomainCleanup(driver, vm); -+ if (!vm->persistent) -+ virDomainObjListRemove(driver->domains, vm); -+} -+ -+ -+static void -+libxlDomainShutdownHandleRestart(libxlDriverPrivatePtr driver, -+ virDomainObjPtr vm) -+{ -+ libxlDomainDestroyInternal(driver, vm); -+ libxlDomainCleanup(driver, vm); -+ if (libxlDomainStartNew(driver, vm, false) < 0) { -+ VIR_ERROR(_("Failed to restart VM '%s': %s"), -+ vm->def->name, virGetLastErrorMessage()); -+ } -+} -+ -+ - struct libxlShutdownThreadInfo - { - libxlDriverPrivatePtr driver; -@@ -468,10 +492,12 @@ libxlDomainShutdownThread(void *opaque) - VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN); - switch ((virDomainLifecycleAction) vm->def->onPoweroff) { - case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY: -- goto destroy; -+ libxlDomainShutdownHandleDestroy(driver, vm); -+ goto endjob; - case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART: - case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME: -- goto restart; -+ libxlDomainShutdownHandleRestart(driver, vm); -+ goto endjob; - case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE: - case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: - case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: -@@ -487,19 +513,23 @@ libxlDomainShutdownThread(void *opaque) - VIR_DOMAIN_EVENT_STOPPED_CRASHED); - switch ((virDomainLifecycleAction) vm->def->onCrash) { - case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY: -- goto destroy; -+ libxlDomainShutdownHandleDestroy(driver, vm); -+ goto endjob; - case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART: - case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME: -- goto restart; -+ libxlDomainShutdownHandleRestart(driver, vm); -+ goto endjob; - case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE: - case VIR_DOMAIN_LIFECYCLE_ACTION_LAST: - goto endjob; - case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: - libxlDomainAutoCoreDump(driver, vm); -- goto destroy; -+ libxlDomainShutdownHandleDestroy(driver, vm); -+ goto endjob; - case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: - libxlDomainAutoCoreDump(driver, vm); -- goto restart; -+ libxlDomainShutdownHandleRestart(driver, vm); -+ goto endjob; - } - } else if (xl_reason == LIBXL_SHUTDOWN_REASON_REBOOT) { - virDomainObjSetState(vm, VIR_DOMAIN_SHUTOFF, -@@ -510,10 +540,12 @@ libxlDomainShutdownThread(void *opaque) - VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN); - switch ((virDomainLifecycleAction) vm->def->onReboot) { - case VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY: -- goto destroy; -+ libxlDomainShutdownHandleDestroy(driver, vm); -+ goto endjob; - case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART: - case VIR_DOMAIN_LIFECYCLE_ACTION_RESTART_RENAME: -- goto restart; -+ libxlDomainShutdownHandleRestart(driver, vm); -+ goto endjob; - case VIR_DOMAIN_LIFECYCLE_ACTION_PRESERVE: - case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_DESTROY: - case VIR_DOMAIN_LIFECYCLE_ACTION_COREDUMP_RESTART: -@@ -531,26 +563,8 @@ libxlDomainShutdownThread(void *opaque) - * Similar to the xl implementation, ignore SUSPEND. Any actions needed - * after calling libxl_domain_suspend() are handled by it's callers. - */ -- goto endjob; - } else { - VIR_INFO("Unhandled shutdown_reason %d", xl_reason); -- goto endjob; -- } -- -- destroy: -- libxlDomainDestroyInternal(driver, vm); -- libxlDomainCleanup(driver, vm); -- if (!vm->persistent) -- virDomainObjListRemove(driver->domains, vm); -- -- goto endjob; -- -- restart: -- libxlDomainDestroyInternal(driver, vm); -- libxlDomainCleanup(driver, vm); -- if (libxlDomainStartNew(driver, vm, false) < 0) { -- VIR_ERROR(_("Failed to restart VM '%s': %s"), -- vm->def->name, virGetLastErrorMessage()); - } - - endjob: diff --git a/apparmor-no-mount.patch b/apparmor-no-mount.patch index a4b6397..13483c9 100644 --- a/apparmor-no-mount.patch +++ b/apparmor-no-mount.patch @@ -1,7 +1,7 @@ -Index: libvirt-4.9.0/examples/apparmor/libvirt-lxc +Index: libvirt-4.10.0/examples/apparmor/libvirt-lxc =================================================================== ---- libvirt-4.9.0.orig/examples/apparmor/libvirt-lxc -+++ libvirt-4.9.0/examples/apparmor/libvirt-lxc +--- libvirt-4.10.0.orig/examples/apparmor/libvirt-lxc ++++ libvirt-4.10.0/examples/apparmor/libvirt-lxc @@ -2,39 +2,15 @@ #include diff --git a/blockcopy-check-dst-identical-device.patch b/blockcopy-check-dst-identical-device.patch index 1da6d38..a0557c1 100644 --- a/blockcopy-check-dst-identical-device.patch +++ b/blockcopy-check-dst-identical-device.patch @@ -11,11 +11,11 @@ Signed-off-by: Chunyan Liu src/qemu/qemu_driver.c | 7 +++++++ 1 file changed, 7 insertions(+) -Index: libvirt-4.9.0/src/qemu/qemu_driver.c +Index: libvirt-4.10.0/src/qemu/qemu_driver.c =================================================================== ---- libvirt-4.9.0.orig/src/qemu/qemu_driver.c -+++ libvirt-4.9.0/src/qemu/qemu_driver.c -@@ -17506,6 +17506,14 @@ qemuDomainBlockCopyCommon(virDomainObjPt +--- libvirt-4.10.0.orig/src/qemu/qemu_driver.c ++++ libvirt-4.10.0/src/qemu/qemu_driver.c +@@ -17737,6 +17737,14 @@ qemuDomainBlockCopyCommon(virDomainObjPt goto endjob; } diff --git a/da4b0fd9-libxl-support-soft-reset.patch b/da4b0fd9-libxl-support-soft-reset.patch deleted file mode 100644 index e4c9a85..0000000 --- a/da4b0fd9-libxl-support-soft-reset.patch +++ /dev/null @@ -1,85 +0,0 @@ -commit da4b0fd9d3cdd117427e7e1981e8639bc859e844 -Author: Jim Fehlig -Date: Wed Oct 31 11:03:37 2018 -0600 - - libxl: add support for soft reset - - The pvops Linux kernel implements machine_ops.crash_shutdown as - - static void xen_hvm_crash_shutdown(struct pt_regs *regs) - { - native_machine_crash_shutdown(regs); - xen_reboot(SHUTDOWN_soft_reset); - } - - but currently the libxl driver does not handle the soft reset - shutdown event. As a result, the guest domain never proceeds - past xen_reboot(), making it impossible for HVM domains to save - a crash dump using kexec. - - This patch adds support for handling the soft reset event by - calling libxl_domain_soft_reset() and re-enabling domain death - events, which is similar to the xl tool handling of soft reset - shutdown event. - - Signed-off-by: Jim Fehlig - ACKed-by: Michal Privoznik - -Index: libvirt-4.9.0/src/libxl/libxl_domain.c -=================================================================== ---- libvirt-4.9.0.orig/src/libxl/libxl_domain.c -+++ libvirt-4.9.0/src/libxl/libxl_domain.c -@@ -471,8 +471,10 @@ libxlDomainShutdownThread(void *opaque) - virObjectEventPtr dom_event = NULL; - libxl_shutdown_reason xl_reason = ev->u.domain_shutdown.shutdown_reason; - libxlDriverConfigPtr cfg; -+ libxl_domain_config d_config; - - cfg = libxlDriverConfigGet(driver); -+ libxl_domain_config_init(&d_config); - - vm = virDomainObjListFindByID(driver->domains, ev->domid); - if (!vm) { -@@ -563,6 +565,34 @@ libxlDomainShutdownThread(void *opaque) - * Similar to the xl implementation, ignore SUSPEND. Any actions needed - * after calling libxl_domain_suspend() are handled by it's callers. - */ -+#ifdef LIBXL_HAVE_SOFT_RESET -+ } else if (xl_reason == LIBXL_SHUTDOWN_REASON_SOFT_RESET) { -+ libxlDomainObjPrivatePtr priv = vm->privateData; -+ -+ if (libxl_retrieve_domain_configuration(cfg->ctx, vm->def->id, -+ &d_config) != 0) { -+ VIR_ERROR(_("Failed to retrieve config for VM '%s'. " -+ "Unable to perform soft reset. Destroying VM"), -+ vm->def->name); -+ libxlDomainShutdownHandleDestroy(driver, vm); -+ goto endjob; -+ } -+ -+ if (priv->deathW) { -+ libxl_evdisable_domain_death(cfg->ctx, priv->deathW); -+ priv->deathW = NULL; -+ } -+ -+ if (libxl_domain_soft_reset(cfg->ctx, &d_config, vm->def->id, -+ NULL, NULL) != 0) { -+ VIR_ERROR(_("Failed to soft reset VM '%s'. Destroying VM"), -+ vm->def->name); -+ libxlDomainShutdownHandleDestroy(driver, vm); -+ goto endjob; -+ } -+ libxl_evenable_domain_death(cfg->ctx, vm->def->id, 0, &priv->deathW); -+ libxl_domain_unpause(cfg->ctx, vm->def->id); -+#endif - } else { - VIR_INFO("Unhandled shutdown_reason %d", xl_reason); - } -@@ -575,6 +605,7 @@ libxlDomainShutdownThread(void *opaque) - virObjectEventStateQueue(driver->domainEventState, dom_event); - libxl_event_free(cfg->ctx, ev); - VIR_FREE(shutdown_info); -+ libxl_domain_config_dispose(&d_config); - virObjectUnref(cfg); - } - diff --git a/libvirt-4.10.0.tar.xz b/libvirt-4.10.0.tar.xz new file mode 100644 index 0000000..e2d9f94 --- /dev/null +++ b/libvirt-4.10.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f9d830173f146ed3b8a8fdf6b6e03a99ce72b21a26c1468b2b688e5fdff276c +size 14841188 diff --git a/libvirt-4.10.0.tar.xz.asc b/libvirt-4.10.0.tar.xz.asc new file mode 100644 index 0000000..d98a696 --- /dev/null +++ b/libvirt-4.10.0.tar.xz.asc @@ -0,0 +1,10 @@ +-----BEGIN PGP SIGNATURE----- + +iQEcBAABAgAGBQJcBREvAAoJEBVYiyZZa+pdNYEH/3lT2nLYV10dOSTevgXzAM3j +yjZFUOwD/Vm4HZynFDp5TFTIm7xCy954Jr9ga9h1AufdDhHv+OrXfuDRt1GLVWV7 +wbrRyf8UJWXl9F0BWKG1bl6nEGqnCgRewpRYjIW9NvGhpijsuDt3TyBf4kYikKZb +7ZozD+JGl7DFasIKHXSp6AZY7QdT8LDepIeKql7KF6MdyglSFvmYZwbvJNCGGDV3 +PmCBd8Ma2SQNn+Qb4mHetOw6sLapjESIGF1oqNRWjfX2Cb00GFeQcXVJJTXwNgz8 +DffzJwLEMlDSLtEdzhteSmiXnQOsWTn+A02rkgGG172KBOsfOXfhT/dMTUoZJpo= +=CSLV +-----END PGP SIGNATURE----- diff --git a/libvirt-4.9.0.tar.xz b/libvirt-4.9.0.tar.xz deleted file mode 100644 index 9e9f2d4..0000000 --- a/libvirt-4.9.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4fd4bfe7312b7996a817c7919cf0062de0d5b3c400c93bd30855a46c40dd455a -size 14744184 diff --git a/libvirt-4.9.0.tar.xz.asc b/libvirt-4.9.0.tar.xz.asc deleted file mode 100644 index 83e8551..0000000 --- a/libvirt-4.9.0.tar.xz.asc +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQEcBAABAgAGBQJb3yVYAAoJEBVYiyZZa+pde8QIALgbitxgn79S7cAYatk5xv7n -5OKXY6MjaF1568fx6uCnFo/hM7GR4l43Lqjk4lc3nNxYjhnCIjK6fpwdnIKg0G+F -JgsGV0Ydjxrqs140SnhgYYWyaHq6juHdqSdfKqnLJ/uPYVUPhUomhZ5c4LvBcYCX -3Sy9TKJOpFjEmuBpzZHMzvXibtS+fUkTyzlNixOQ/tjVNnYu1OboOuXov4ay+aS4 -uild4jnO86mDa0LBxHWVEobjLiJs5RTDPbnnn8DT6nRdn14TzAsIJU2wms8OO36w -x3h1Ao59X7yUKOE5rYZnIIG6oW2I6jM3Vy6NxDVNAx0P/1/bCqE7lwgJD4uh2Zg= -=aLc3 ------END PGP SIGNATURE----- diff --git a/libvirt-power8-models.patch b/libvirt-power8-models.patch index 04a8097..227b168 100644 --- a/libvirt-power8-models.patch +++ b/libvirt-power8-models.patch @@ -2,10 +2,10 @@ Add POWER8 v2.0 and v2.1 to cpu map XML From: -Index: libvirt-4.9.0/src/cpu_map/ppc64_POWER8.xml +Index: libvirt-4.10.0/src/cpu_map/ppc64_POWER8.xml =================================================================== ---- libvirt-4.9.0.orig/src/cpu_map/ppc64_POWER8.xml -+++ libvirt-4.9.0/src/cpu_map/ppc64_POWER8.xml +--- libvirt-4.10.0.orig/src/cpu_map/ppc64_POWER8.xml ++++ libvirt-4.10.0/src/cpu_map/ppc64_POWER8.xml @@ -4,5 +4,7 @@ diff --git a/libvirt-suse-netcontrol.patch b/libvirt-suse-netcontrol.patch index 64f2aa2..63dcab6 100644 --- a/libvirt-suse-netcontrol.patch +++ b/libvirt-suse-netcontrol.patch @@ -1,7 +1,7 @@ -Index: libvirt-4.9.0/configure.ac +Index: libvirt-4.10.0/configure.ac =================================================================== ---- libvirt-4.9.0.orig/configure.ac -+++ libvirt-4.9.0/configure.ac +--- libvirt-4.10.0.orig/configure.ac ++++ libvirt-4.10.0/configure.ac @@ -256,6 +256,7 @@ LIBVIRT_ARG_LIBSSH LIBVIRT_ARG_LIBXML LIBVIRT_ARG_MACVTAP @@ -26,10 +26,10 @@ Index: libvirt-4.9.0/configure.ac LIBVIRT_RESULT_NLS LIBVIRT_RESULT_NSS LIBVIRT_RESULT_NUMACTL -Index: libvirt-4.9.0/tools/virsh.c +Index: libvirt-4.10.0/tools/virsh.c =================================================================== ---- libvirt-4.9.0.orig/tools/virsh.c -+++ libvirt-4.9.0/tools/virsh.c +--- libvirt-4.10.0.orig/tools/virsh.c ++++ libvirt-4.10.0/tools/virsh.c @@ -570,6 +570,8 @@ virshShowVersion(vshControl *ctl ATTRIBU vshPrint(ctl, " Interface"); # if defined(WITH_NETCF) @@ -39,10 +39,10 @@ Index: libvirt-4.9.0/tools/virsh.c # elif defined(WITH_UDEV) vshPrint(ctl, " udev"); # endif -Index: libvirt-4.9.0/src/interface/interface_backend_netcf.c +Index: libvirt-4.10.0/src/interface/interface_backend_netcf.c =================================================================== ---- libvirt-4.9.0.orig/src/interface/interface_backend_netcf.c -+++ libvirt-4.9.0/src/interface/interface_backend_netcf.c +--- libvirt-4.10.0.orig/src/interface/interface_backend_netcf.c ++++ libvirt-4.10.0/src/interface/interface_backend_netcf.c @@ -23,7 +23,12 @@ #include @@ -126,10 +126,10 @@ Index: libvirt-4.9.0/src/interface/interface_backend_netcf.c if (virRegisterConnectDriver(&interfaceConnectDriver, false) < 0) return -1; if (virSetSharedInterfaceDriver(&interfaceDriver) < 0) -Index: libvirt-4.9.0/src/interface/interface_driver.c +Index: libvirt-4.10.0/src/interface/interface_driver.c =================================================================== ---- libvirt-4.9.0.orig/src/interface/interface_driver.c -+++ libvirt-4.9.0/src/interface/interface_driver.c +--- libvirt-4.10.0.orig/src/interface/interface_driver.c ++++ libvirt-4.10.0/src/interface/interface_driver.c @@ -30,8 +30,15 @@ interfaceRegister(void) if (netcfIfaceRegister() == 0) return 0; @@ -147,10 +147,10 @@ Index: libvirt-4.9.0/src/interface/interface_driver.c if (udevIfaceRegister() == 0) return 0; #endif /* WITH_UDEV */ -Index: libvirt-4.9.0/m4/virt-netcontrol.m4 +Index: libvirt-4.10.0/m4/virt-netcontrol.m4 =================================================================== --- /dev/null -+++ libvirt-4.9.0/m4/virt-netcontrol.m4 ++++ libvirt-4.10.0/m4/virt-netcontrol.m4 @@ -0,0 +1,39 @@ +dnl The libnetcontrol library +dnl @@ -191,10 +191,10 @@ Index: libvirt-4.9.0/m4/virt-netcontrol.m4 +AC_DEFUN([LIBVIRT_RESULT_NETCONTROL],[ + LIBVIRT_RESULT_LIB([NETCONTROL]) +]) -Index: libvirt-4.9.0/src/interface/Makefile.inc.am +Index: libvirt-4.10.0/src/interface/Makefile.inc.am =================================================================== ---- libvirt-4.9.0.orig/src/interface/Makefile.inc.am -+++ libvirt-4.9.0/src/interface/Makefile.inc.am +--- libvirt-4.10.0.orig/src/interface/Makefile.inc.am ++++ libvirt-4.10.0/src/interface/Makefile.inc.am @@ -4,6 +4,7 @@ INTERFACE_DRIVER_SOURCES = \ $(NULL) diff --git a/libvirt.changes b/libvirt.changes index ab36c3b..a271f88 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Mon Dec 3 21:58:53 UTC 2018 - James Fehlig + +- Update to libvirt 4.10.0 + - Many incremental improvements and bug fixes, see + http://libvirt.org/news.html + - Dropped patches: + 14d03b27-libxl-rm-redundant-virObjectEventStateQueue.patch, + 82452a5d-libxl-rm-goto-libxlDomainShutdownThread.patch, + da4b0fd9-libxl-support-soft-reset.patch, + libxl-qemu-emulator-caps.patch + - Added patches: + libxl-support-ovswitch.patch, + libxl-ovswitch-config-format-conversions.patch + - FATE#320928, FATE#325817, FATE#326380, FATE#326698 + ------------------------------------------------------------------- Tue Nov 6 18:33:26 UTC 2018 - James Fehlig diff --git a/libvirt.spec b/libvirt.spec index dba0de0..3756182 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -185,7 +185,7 @@ Name: libvirt Url: http://libvirt.org/ -Version: 4.9.0 +Version: 4.10.0 Release: 0 Summary: Library providing a virtualization API License: LGPL-2.1-or-later @@ -339,12 +339,11 @@ Source6: libvirtd-relocation-server.xml Source99: baselibs.conf Source100: %{name}-rpmlintrc # Upstream patches -Patch0: 14d03b27-libxl-rm-redundant-virObjectEventStateQueue.patch -Patch1: 82452a5d-libxl-rm-goto-libxlDomainShutdownThread.patch -Patch2: da4b0fd9-libxl-support-soft-reset.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch +Patch102: libxl-support-ovswitch.patch +Patch103: libxl-ovswitch-config-format-conversions.patch # Need to go upstream Patch150: xen-pv-cdrom.patch Patch151: blockcopy-check-dst-identical-device.patch @@ -372,7 +371,6 @@ 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 @@ -904,11 +902,10 @@ libvirt plugin for NSS for translating domain names into IP addresses. %prep %setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 %patch100 -p1 %patch101 -p1 +%patch102 -p1 +%patch103 -p1 %patch150 -p1 %patch151 -p1 %patch152 -p1 @@ -934,7 +931,6 @@ libvirt plugin for NSS for translating domain names into IP addresses. %patch213 -p1 %patch214 -p1 %patch215 -p1 -%patch216 -p1 %if ! 0%{?is_opensuse} %patch400 -p1 %endif diff --git a/libxl-dom-reset.patch b/libxl-dom-reset.patch index 719c6a2..2124bcc 100644 --- a/libxl-dom-reset.patch +++ b/libxl-dom-reset.patch @@ -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-4.9.0/src/libxl/libxl_driver.c +Index: libvirt-4.10.0/src/libxl/libxl_driver.c =================================================================== ---- libvirt-4.9.0.orig/src/libxl/libxl_driver.c -+++ libvirt-4.9.0/src/libxl/libxl_driver.c +--- libvirt-4.10.0.orig/src/libxl/libxl_driver.c ++++ libvirt-4.10.0/src/libxl/libxl_driver.c @@ -1355,6 +1355,61 @@ libxlDomainReboot(virDomainPtr dom, unsi } @@ -74,7 +74,7 @@ Index: libvirt-4.9.0/src/libxl/libxl_driver.c libxlDomainDestroyFlags(virDomainPtr dom, unsigned int flags) { -@@ -6510,6 +6565,7 @@ static virHypervisorDriver libxlHypervis +@@ -6512,6 +6567,7 @@ static virHypervisorDriver libxlHypervis .domainShutdown = libxlDomainShutdown, /* 0.9.0 */ .domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */ .domainReboot = libxlDomainReboot, /* 0.9.0 */ diff --git a/libxl-ovswitch-config-format-conversions.patch b/libxl-ovswitch-config-format-conversions.patch new file mode 100644 index 0000000..29c6340 --- /dev/null +++ b/libxl-ovswitch-config-format-conversions.patch @@ -0,0 +1,348 @@ +commit 17c45f4014eb4f98cca86a944b61e0393d597059 +Author: Jim Fehlig +Date: Fri Nov 16 13:08:23 2018 -0700 + + xenconfig: add support for openvswitch configuration + + Add support for converting openvswitch interface configuration + to/from libvirt domXML and xl.cfg(5). The xl config syntax for + virtual interfaces is described in detail in the + xl-network-configuration(5) man page. The Xen Networking wiki + also contains information and examples for using openvswitch + in xl.cfg config format + + https://wiki.xenproject.org/wiki/Xen_Networking#Open_vSwitch + + Tests are added to check conversions of openvswitch tagged and + trunked VLAN configuration. + + Signed-off-by: Jim Fehlig + +Index: libvirt-4.10.0/src/xenconfig/xen_common.c +=================================================================== +--- libvirt-4.10.0.orig/src/xenconfig/xen_common.c ++++ libvirt-4.10.0/src/xenconfig/xen_common.c +@@ -856,6 +856,84 @@ xenParseCharDev(virConfPtr conf, virDoma + } + + ++static int ++xenParseVifBridge(virDomainNetDefPtr net, char *bridge) ++{ ++ char *vlanstr; ++ unsigned int tag; ++ ++ /* 'bridge' string contains a bridge name and single vlan tag */ ++ vlanstr = strchr(bridge, '.'); ++ if (vlanstr) { ++ if (VIR_STRNDUP(net->data.bridge.brname, bridge, vlanstr - bridge) < 0) ++ return -1; ++ ++ vlanstr++; ++ if (virStrToLong_ui(vlanstr, NULL, 10, &tag) < 0) ++ return -1; ++ ++ if (VIR_ALLOC_N(net->vlan.tag, 1) < 0) ++ return -1; ++ ++ net->vlan.tag[0] = tag; ++ net->vlan.nTags = 1; ++ ++ if (VIR_ALLOC(net->virtPortProfile) < 0) ++ return -1; ++ ++ net->virtPortProfile->virtPortType = VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH; ++ return 0; ++ } ++ ++ /* 'bridge' string contains a bridge name and one or more vlan trunks */ ++ vlanstr = strchr(bridge, ':'); ++ if (vlanstr) { ++ size_t i; ++ size_t nvlans = 0; ++ char **vlanstr_list = virStringSplit(bridge, ":", 0); ++ ++ if (!vlanstr_list) ++ return -1; ++ ++ if (VIR_STRDUP(net->data.bridge.brname, vlanstr_list[0]) < 0) { ++ virStringListFree(vlanstr_list); ++ return -1; ++ } ++ ++ for (i = 1; vlanstr_list[i]; i++) ++ nvlans++; ++ ++ if (VIR_ALLOC_N(net->vlan.tag, nvlans) < 0) { ++ virStringListFree(vlanstr_list); ++ return -1; ++ } ++ ++ for (i = 1; i <= nvlans; i++) { ++ if (virStrToLong_ui(vlanstr_list[i], NULL, 10, &tag) < 0) { ++ virStringListFree(vlanstr_list); ++ return -1; ++ } ++ net->vlan.tag[i - 1] = tag; ++ } ++ net->vlan.nTags = nvlans; ++ net->vlan.trunk = true; ++ virStringListFree(vlanstr_list); ++ ++ if (VIR_ALLOC(net->virtPortProfile) < 0) ++ return -1; ++ ++ net->virtPortProfile->virtPortType = VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH; ++ return 0; ++ } ++ ++ /* 'bridge' string only contains the bridge name */ ++ if (VIR_STRDUP(net->data.bridge.brname, bridge) < 0) ++ return -1; ++ ++ return 0; ++} ++ ++ + static virDomainNetDefPtr + xenParseVif(char *entry, const char *vif_typename) + { +@@ -974,8 +1052,8 @@ xenParseVif(char *entry, const char *vif + net->type = VIR_DOMAIN_NET_TYPE_ETHERNET; + } + +- if (net->type == VIR_DOMAIN_NET_TYPE_BRIDGE) { +- if (bridge[0] && VIR_STRDUP(net->data.bridge.brname, bridge) < 0) ++ if (net->type == VIR_DOMAIN_NET_TYPE_BRIDGE && bridge[0]) { ++ if (xenParseVifBridge(net, bridge) < 0) + goto cleanup; + } + if (ip[0]) { +@@ -1264,14 +1342,41 @@ xenFormatNet(virConnectPtr conn, + + switch (net->type) { + case VIR_DOMAIN_NET_TYPE_BRIDGE: ++ { ++ virNetDevVPortProfilePtr port_profile = virDomainNetGetActualVirtPortProfile(net); ++ virNetDevVlanPtr virt_vlan = virDomainNetGetActualVlan(net); ++ const char *script = net->script; ++ size_t i; ++ + virBufferAsprintf(&buf, ",bridge=%s", net->data.bridge.brname); ++ if (port_profile && ++ port_profile->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH) { ++ if (!script) ++ script = "vif-openvswitch"; ++ /* ++ * libxl_device_nic->bridge supports an extended format for ++ * specifying VLAN tags and trunks ++ * ++ * BRIDGE_NAME[.VLAN][:TRUNK:TRUNK] ++ */ ++ if (virt_vlan && virt_vlan->nTags > 0) { ++ if (virt_vlan->trunk) { ++ for (i = 0; i < virt_vlan->nTags; i++) ++ virBufferAsprintf(&buf, ":%d", virt_vlan->tag[i]); ++ } else { ++ virBufferAsprintf(&buf, ".%d", virt_vlan->tag[0]); ++ } ++ } ++ } ++ + if (net->guestIP.nips > 0) { + char *ipStr = xenMakeIPList(&net->guestIP); + virBufferAsprintf(&buf, ",ip=%s", ipStr); + VIR_FREE(ipStr); + } +- virBufferAsprintf(&buf, ",script=%s", DEFAULT_VIF_SCRIPT); +- break; ++ virBufferAsprintf(&buf, ",script=%s", script ? script : DEFAULT_VIF_SCRIPT); ++ } ++ break; + + case VIR_DOMAIN_NET_TYPE_ETHERNET: + if (net->script) +Index: libvirt-4.10.0/tests/xlconfigdata/test-fullvirt-ovswitch-tagged.cfg +=================================================================== +--- /dev/null ++++ libvirt-4.10.0/tests/xlconfigdata/test-fullvirt-ovswitch-tagged.cfg +@@ -0,0 +1,25 @@ ++name = "XenGuest2" ++uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809" ++maxmem = 8192 ++memory = 8192 ++vcpus = 8 ++pae = 1 ++acpi = 1 ++apic = 1 ++viridian = 0 ++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=ovsbr0.42,script=vif-openvswitch,model=e1000" ] ++parallel = "none" ++serial = "none" ++builder = "hvm" ++boot = "c" ++disk = [ "format=raw,vdev=hda,access=rw,backendtype=phy,target=/dev/HostVG/XenGuest2" ] +Index: libvirt-4.10.0/tests/xlconfigdata/test-fullvirt-ovswitch-tagged.xml +=================================================================== +--- /dev/null ++++ libvirt-4.10.0/tests/xlconfigdata/test-fullvirt-ovswitch-tagged.xml +@@ -0,0 +1,50 @@ ++ ++ XenGuest2 ++ c7a5fdb2-cdaf-9455-926a-d65c16db1809 ++ 8388608 ++ 8388608 ++ 8 ++ ++ hvm ++ /usr/lib/xen/boot/hvmloader ++ ++ ++ ++ ++ ++ ++ ++ ++ destroy ++ restart ++ restart ++ ++ /usr/lib/xen/bin/qemu-system-i386 ++ ++ ++ ++ ++
++ ++ ++ ++ ++ ++ ++ ++ ++ ++