mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-02-23 15:34:28 +01:00
scripts/qemu: enable libpmem
Enable libpmem to support PMEM when running under Kubernetes. see https://github.com/kata-containers/runtime/issues/2262 According to QEMU's nvdimm documentation: When 'pmem' is 'on' and QEMU is built with libpmem support, QEMU will take necessary operations to guarantee the persistence of its own writes to the vNVDIMM backend. fixes #958 Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
@@ -330,10 +330,6 @@ generate_qemu_options() {
|
||||
qemu_options+=(size:--disable-linux-aio)
|
||||
|
||||
if [[ "${qemu_version_major}" -ge 4 || ( "${qemu_version_major}" -eq 3 && "${qemu_version_minor}" -ge 1 ) ]]; then
|
||||
# Disable libpmem, vNVDIMM backend (aka rootfs image) shouldn't be modifed
|
||||
# by the guest
|
||||
qemu_options+=(security:--disable-libpmem)
|
||||
|
||||
# Disable graphics
|
||||
qemu_options+=(size:--disable-virglrenderer)
|
||||
|
||||
@@ -396,6 +392,11 @@ generate_qemu_options() {
|
||||
fi
|
||||
# Enable libc malloc_trim() for memory optimization.
|
||||
qemu_options+=(speed:--enable-malloc-trim)
|
||||
|
||||
# According to QEMU's nvdimm documentation: When 'pmem' is 'on' and QEMU is
|
||||
# built with libpmem support, QEMU will take necessary operations to guarantee
|
||||
# the persistence of its own writes to the vNVDIMM backend.
|
||||
qemu_options+=(functionality:--enable-libpmem)
|
||||
fi
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user