diff --git a/0001-libxl-add-support-for-BlockResize-API.patch b/0001-libxl-add-support-for-BlockResize-API.patch index 5480ac2..d563766 100644 --- a/0001-libxl-add-support-for-BlockResize-API.patch +++ b/0001-libxl-add-support-for-BlockResize-API.patch @@ -23,7 +23,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c =================================================================== --- libvirt-6.0.0.orig/src/libxl/libxl_driver.c +++ libvirt-6.0.0/src/libxl/libxl_driver.c -@@ -5275,6 +5275,96 @@ libxlDomainMemoryStats(virDomainPtr dom, +@@ -5280,6 +5280,96 @@ libxlDomainMemoryStats(virDomainPtr dom, #undef LIBXL_SET_MEMSTAT @@ -120,7 +120,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c static int libxlDomainGetJobInfo(virDomainPtr dom, virDomainJobInfoPtr info) -@@ -6693,6 +6783,7 @@ static virHypervisorDriver libxlHypervis +@@ -6698,6 +6788,7 @@ static virHypervisorDriver libxlHypervis #endif .nodeGetFreeMemory = libxlNodeGetFreeMemory, /* 0.9.0 */ .nodeGetCellsFreeMemory = libxlNodeGetCellsFreeMemory, /* 1.1.1 */ diff --git a/6c1dddaf-libxl-shutdown-inhibit.patch b/6c1dddaf-libxl-shutdown-inhibit.patch index 4566234..bf97b3f 100644 --- a/6c1dddaf-libxl-shutdown-inhibit.patch +++ b/6c1dddaf-libxl-shutdown-inhibit.patch @@ -12,11 +12,11 @@ Date: Sat Jan 18 03:37:42 2020 +0100 Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Jim Fehlig -diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c -index ef02a066d9..eb166244ba 100644 ---- a/src/libxl/libxl_driver.c -+++ b/src/libxl/libxl_driver.c -@@ -648,8 +648,8 @@ libxlAddDom0(libxlDriverPrivatePtr driver) +Index: libvirt-6.0.0/src/libxl/libxl_driver.c +=================================================================== +--- libvirt-6.0.0.orig/src/libxl/libxl_driver.c ++++ libvirt-6.0.0/src/libxl/libxl_driver.c +@@ -648,8 +648,8 @@ libxlAddDom0(libxlDriverPrivatePtr drive static int libxlStateInitialize(bool privileged, diff --git a/849052ec-libxl-support-credit2.patch b/849052ec-libxl-support-credit2.patch new file mode 100644 index 0000000..e05b1f9 --- /dev/null +++ b/849052ec-libxl-support-credit2.patch @@ -0,0 +1,68 @@ +commit 849052ec61e18780713bec171748e859e32dfd6d +Author: Dario Faggioli +Date: Wed Jan 29 12:05:15 2020 +0100 + + libxl: support getting and setting parameters for the Credit2 + + With Credit2 being Xen default scheduler, it's definitely the case to + allow Credit2's scheduling parameters to be get and set via libvirt. + + This is easy, as Credit and Credit2 have (at least as of now) the very + same parameters ('weight' and 'cap'). So we can just let credit2 pass + the scheduler-type check and the same code will work for both. + + Signed-off-by: Dario Faggioli + Reviewed-by: Jim Fehlig + +Index: libvirt-6.0.0/src/libxl/libxl_driver.c +=================================================================== +--- libvirt-6.0.0.orig/src/libxl/libxl_driver.c ++++ libvirt-6.0.0/src/libxl/libxl_driver.c +@@ -73,7 +73,7 @@ VIR_LOG_INIT("libxl.libxl_driver"); + #define HYPERVISOR_CAPABILITIES "/proc/xen/capabilities" + #define HYPERVISOR_XENSTORED "/dev/xen/xenstored" + +-/* Number of Xen scheduler parameters */ ++/* Number of Xen scheduler parameters. credit and credit2 both support 2 */ + #define XEN_SCHED_CREDIT_NPARAM 2 + + #define LIBXL_CHECK_DOM0_GOTO(name, label) \ +@@ -4579,6 +4579,8 @@ libxlDomainGetSchedulerType(virDomainPtr + break; + case LIBXL_SCHEDULER_CREDIT2: + name = "credit2"; ++ if (nparams) ++ *nparams = XEN_SCHED_CREDIT_NPARAM; + break; + case LIBXL_SCHEDULER_ARINC653: + name = "arinc653"; +@@ -4625,11 +4627,11 @@ libxlDomainGetSchedulerParametersFlags(v + if (virDomainObjCheckActive(vm) < 0) + goto cleanup; + ++ /* Only credit and credit2 are supported for now. */ + sched_id = libxl_get_scheduler(cfg->ctx); +- +- if (sched_id != LIBXL_SCHEDULER_CREDIT) { ++ if (sched_id != LIBXL_SCHEDULER_CREDIT && sched_id != LIBXL_SCHEDULER_CREDIT2) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", +- _("Only 'credit' scheduler is supported")); ++ _("Only 'credit' and 'credit2' schedulers are supported")); + goto cleanup; + } + +@@ -4702,11 +4704,11 @@ libxlDomainSetSchedulerParametersFlags(v + if (virDomainObjCheckActive(vm) < 0) + goto endjob; + ++ /* Only credit and credit2 are supported for now. */ + sched_id = libxl_get_scheduler(cfg->ctx); +- +- if (sched_id != LIBXL_SCHEDULER_CREDIT) { ++ if (sched_id != LIBXL_SCHEDULER_CREDIT && sched_id != LIBXL_SCHEDULER_CREDIT2) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", +- _("Only 'credit' scheduler is supported")); ++ _("Only 'credit' and 'credit2' schedulers are supported")); + goto endjob; + } + diff --git a/libvirt.changes b/libvirt.changes index 4c1d547..c327417 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jan 30 00:45:39 UTC 2020 - James Fehlig + +- xen: Support setting credit2 scheduler parameters + 849052ec-libxl-support-credit2.patch + bsc#1162160 + ------------------------------------------------------------------- Wed Jan 29 20:56:13 UTC 2020 - James Fehlig diff --git a/libvirt.spec b/libvirt.spec index b34bfc0..5d90b96 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -339,6 +339,7 @@ Source99: baselibs.conf Source100: %{name}-rpmlintrc # Upstream patches Patch0: 6c1dddaf-libxl-shutdown-inhibit.patch +Patch1: 849052ec-libxl-support-credit2.patch # Patches pending upstream review Patch100: libxl-dom-reset.patch Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch @@ -873,6 +874,7 @@ libvirt plugin for NSS for translating domain names into IP addresses. %prep %setup -q %patch0 -p1 +%patch1 -p1 %patch100 -p1 %patch101 -p1 %patch150 -p1 diff --git a/libxl-dom-reset.patch b/libxl-dom-reset.patch index b4e135f..1cf9811 100644 --- a/libxl-dom-reset.patch +++ b/libxl-dom-reset.patch @@ -12,7 +12,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c =================================================================== --- libvirt-6.0.0.orig/src/libxl/libxl_driver.c +++ libvirt-6.0.0/src/libxl/libxl_driver.c -@@ -1361,6 +1361,61 @@ libxlDomainReboot(virDomainPtr dom, unsi +@@ -1364,6 +1364,61 @@ libxlDomainReboot(virDomainPtr dom, unsi } static int @@ -74,7 +74,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c libxlDomainDestroyFlags(virDomainPtr dom, unsigned int flags) { -@@ -6568,6 +6623,7 @@ static virHypervisorDriver libxlHypervis +@@ -6573,6 +6628,7 @@ static virHypervisorDriver libxlHypervis .domainShutdown = libxlDomainShutdown, /* 0.9.0 */ .domainShutdownFlags = libxlDomainShutdownFlags, /* 0.9.10 */ .domainReboot = libxlDomainReboot, /* 0.9.0 */ diff --git a/libxl-set-migration-constraints.patch b/libxl-set-migration-constraints.patch index 42b4644..a39acad 100644 --- a/libxl-set-migration-constraints.patch +++ b/libxl-set-migration-constraints.patch @@ -56,7 +56,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c =================================================================== --- libvirt-6.0.0.orig/src/libxl/libxl_driver.c +++ libvirt-6.0.0/src/libxl/libxl_driver.c -@@ -6133,6 +6133,9 @@ libxlDomainMigratePerform3Params(virDoma +@@ -6138,6 +6138,9 @@ libxlDomainMigratePerform3Params(virDoma const char *dname = NULL; const char *uri = NULL; int ret = -1; @@ -66,7 +66,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c #ifdef LIBXL_HAVE_NO_SUSPEND_RESUME virReportUnsupportedError(); -@@ -6149,6 +6152,18 @@ libxlDomainMigratePerform3Params(virDoma +@@ -6154,6 +6157,18 @@ libxlDomainMigratePerform3Params(virDoma virTypedParamsGetString(params, nparams, VIR_MIGRATE_PARAM_DEST_NAME, &dname) < 0 || @@ -85,7 +85,7 @@ Index: libvirt-6.0.0/src/libxl/libxl_driver.c virTypedParamsGetString(params, nparams, VIR_MIGRATE_PARAM_URI, &uri) < 0) -@@ -6163,11 +6178,11 @@ libxlDomainMigratePerform3Params(virDoma +@@ -6168,11 +6183,11 @@ libxlDomainMigratePerform3Params(virDoma if ((flags & (VIR_MIGRATE_TUNNELLED | VIR_MIGRATE_PEER2PEER))) { if (libxlDomainMigrationSrcPerformP2P(driver, vm, dom->conn, dom_xml,