Accepting request 579671 from Virtualization
OBS-URL: https://build.opensuse.org/request/show/579671 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libvirt?expand=0&rev=252
This commit is contained in:
commit
1ca16ee075
33
ef71caea-libxl-memalign.patch
Normal file
33
ef71caea-libxl-memalign.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
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) {
|
@ -30,7 +30,7 @@ Index: libvirt-4.0.0/src/Makefile.am
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-4.0.0.orig/src/Makefile.am
|
--- libvirt-4.0.0.orig/src/Makefile.am
|
||||||
+++ libvirt-4.0.0/src/Makefile.am
|
+++ libvirt-4.0.0/src/Makefile.am
|
||||||
@@ -1038,6 +1038,10 @@ if WITH_NETCF
|
@@ -1039,6 +1039,10 @@ if WITH_NETCF
|
||||||
INTERFACE_DRIVER_SOURCES += \
|
INTERFACE_DRIVER_SOURCES += \
|
||||||
interface/interface_backend_netcf.c
|
interface/interface_backend_netcf.c
|
||||||
endif WITH_NETCF
|
endif WITH_NETCF
|
||||||
@ -41,7 +41,7 @@ Index: libvirt-4.0.0/src/Makefile.am
|
|||||||
if WITH_UDEV
|
if WITH_UDEV
|
||||||
INTERFACE_DRIVER_SOURCES += \
|
INTERFACE_DRIVER_SOURCES += \
|
||||||
interface/interface_backend_udev.c
|
interface/interface_backend_udev.c
|
||||||
@@ -1658,6 +1662,10 @@ if WITH_NETCF
|
@@ -1659,6 +1663,10 @@ if WITH_NETCF
|
||||||
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
|
libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
|
||||||
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
|
libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
|
||||||
endif WITH_NETCF
|
endif WITH_NETCF
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 23 22:09:04 UTC 2018 - jfehlig@suse.com
|
||||||
|
|
||||||
|
- libxl: round memory values to next 1MiB increment
|
||||||
|
ef71caea-libxl-memalign.patch
|
||||||
|
bsc#1082041
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 21 23:32:55 UTC 2018 - jfehlig@suse.com
|
Wed Feb 21 23:32:55 UTC 2018 - jfehlig@suse.com
|
||||||
|
|
||||||
|
@ -326,6 +326,7 @@ Patch5: 6b3d716e-keycodemap-py3.patch
|
|||||||
Patch6: 759b4d1b-virlog-determine-the-hostname-on-startup-CVE-2018-67.patch
|
Patch6: 759b4d1b-virlog-determine-the-hostname-on-startup-CVE-2018-67.patch
|
||||||
Patch7: c2dc6698-fix-deadlock-obtaining-hostname.patch
|
Patch7: c2dc6698-fix-deadlock-obtaining-hostname.patch
|
||||||
Patch8: c391e07e-libxl-clock-settings.patch
|
Patch8: c391e07e-libxl-clock-settings.patch
|
||||||
|
Patch9: ef71caea-libxl-memalign.patch
|
||||||
# Patches pending upstream review
|
# Patches pending upstream review
|
||||||
Patch100: libxl-dom-reset.patch
|
Patch100: libxl-dom-reset.patch
|
||||||
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch
|
Patch101: network-don-t-use-dhcp-authoritative-on-static-netwo.patch
|
||||||
@ -926,6 +927,7 @@ popd
|
|||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
|
%patch9 -p1
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
%patch150 -p1
|
%patch150 -p1
|
||||||
|
@ -7,7 +7,7 @@ Index: libvirt-4.0.0/src/libxl/libxl_conf.c
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-4.0.0.orig/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.0.0/src/libxl/libxl_conf.c
|
||||||
@@ -765,6 +765,30 @@ libxlDiskSetDiscard(libxl_device_disk *x
|
@@ -769,6 +769,30 @@ libxlDiskSetDiscard(libxl_device_disk *x
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ Index: libvirt-4.0.0/src/libxl/libxl_conf.c
|
|||||||
static char *
|
static char *
|
||||||
libxlMakeNetworkDiskSrcStr(virStorageSourcePtr src,
|
libxlMakeNetworkDiskSrcStr(virStorageSourcePtr src,
|
||||||
const char *username,
|
const char *username,
|
||||||
@@ -1013,6 +1037,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
|
@@ -1017,6 +1041,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
|
||||||
x_disk->is_cdrom = l_disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM ? 1 : 0;
|
x_disk->is_cdrom = l_disk->device == VIR_DOMAIN_DISK_DEVICE_CDROM ? 1 : 0;
|
||||||
if (libxlDiskSetDiscard(x_disk, l_disk->discard) < 0)
|
if (libxlDiskSetDiscard(x_disk, l_disk->discard) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -11,7 +11,7 @@ Index: libvirt-4.0.0/src/libxl/libxl_conf.c
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- libvirt-4.0.0.orig/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.0.0/src/libxl/libxl_conf.c
|
||||||
@@ -765,6 +765,25 @@ libxlDiskSetDiscard(libxl_device_disk *x
|
@@ -769,6 +769,25 @@ libxlDiskSetDiscard(libxl_device_disk *x
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ Index: libvirt-4.0.0/src/libxl/libxl_conf.c
|
|||||||
static void
|
static void
|
||||||
libxlDiskSetCacheMode(libxl_device_disk *x_disk, int cachemode)
|
libxlDiskSetCacheMode(libxl_device_disk *x_disk, int cachemode)
|
||||||
{
|
{
|
||||||
@@ -910,6 +929,7 @@ libxlMakeNetworkDiskSrc(virStorageSource
|
@@ -914,6 +933,7 @@ libxlMakeNetworkDiskSrc(virStorageSource
|
||||||
int
|
int
|
||||||
libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
|
libxlMakeDisk(virDomainDiskDefPtr l_disk, libxl_device_disk *x_disk)
|
||||||
{
|
{
|
||||||
@ -45,7 +45,7 @@ Index: libvirt-4.0.0/src/libxl/libxl_conf.c
|
|||||||
const char *driver = virDomainDiskGetDriver(l_disk);
|
const char *driver = virDomainDiskGetDriver(l_disk);
|
||||||
int format = virDomainDiskGetFormat(l_disk);
|
int format = virDomainDiskGetFormat(l_disk);
|
||||||
int actual_type = virStorageSourceGetActualType(l_disk->src);
|
int actual_type = virStorageSourceGetActualType(l_disk->src);
|
||||||
@@ -925,7 +945,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
|
@@ -929,7 +949,7 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
|
||||||
if (libxlMakeNetworkDiskSrc(l_disk->src, &x_disk->pdev_path) < 0)
|
if (libxlMakeNetworkDiskSrc(l_disk->src, &x_disk->pdev_path) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
@ -54,7 +54,7 @@ Index: libvirt-4.0.0/src/libxl/libxl_conf.c
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1038,6 +1058,9 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
|
@@ -1042,6 +1062,9 @@ libxlMakeDisk(virDomainDiskDefPtr l_disk
|
||||||
if (libxlDiskSetDiscard(x_disk, l_disk->discard) < 0)
|
if (libxlDiskSetDiscard(x_disk, l_disk->discard) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
libxlDiskSetCacheMode(x_disk, l_disk->cachemode);
|
libxlDiskSetCacheMode(x_disk, l_disk->cachemode);
|
||||||
|
@ -45,7 +45,7 @@ Index: libvirt-4.0.0/src/lxc/lxc_driver.c
|
|||||||
#include "virstring.h"
|
#include "virstring.h"
|
||||||
#include "viraccessapicheck.h"
|
#include "viraccessapicheck.h"
|
||||||
#include "viraccessapichecklxc.h"
|
#include "viraccessapichecklxc.h"
|
||||||
@@ -4006,6 +4007,7 @@ lxcDomainAttachDeviceNetLive(virConnectP
|
@@ -4007,6 +4008,7 @@ lxcDomainAttachDeviceNetLive(virConnectP
|
||||||
case VIR_DOMAIN_NET_TYPE_NETWORK:
|
case VIR_DOMAIN_NET_TYPE_NETWORK:
|
||||||
case VIR_DOMAIN_NET_TYPE_ETHERNET:
|
case VIR_DOMAIN_NET_TYPE_ETHERNET:
|
||||||
ignore_value(virNetDevVethDelete(veth));
|
ignore_value(virNetDevVethDelete(veth));
|
||||||
@ -53,7 +53,7 @@ Index: libvirt-4.0.0/src/lxc/lxc_driver.c
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_NET_TYPE_DIRECT:
|
case VIR_DOMAIN_NET_TYPE_DIRECT:
|
||||||
@@ -4440,6 +4442,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb
|
@@ -4441,6 +4443,7 @@ lxcDomainDetachDeviceNetLive(virDomainOb
|
||||||
virDomainAuditNet(vm, detach, NULL, "detach", false);
|
virDomainAuditNet(vm, detach, NULL, "detach", false);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user