Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
scripts/qemu: enable libpmem
Browse files Browse the repository at this point in the history
Enable libpmem to support PMEM when running under Kubernetes.

see kata-containers/runtime#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 <[email protected]>
  • Loading branch information
Julio Montes committed Feb 28, 2020
1 parent 9a37ebe commit 120593e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions obs-packaging/qemu-vanilla/debian.control-template
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Source: qemu-vanilla
Section: devel
Priority: optional
Maintainer: Kata containers team <https://github.com/kata-containers/>
Build-Depends: debhelper (>= 9), cpio, libelf-dev, rsync, libdw-dev, pkg-config, flex, bison, libaudit-dev, bc, python-dev, gawk, autoconf, automake, libtool, libltdl-dev, libglib2.0-dev, libglib2.0-0, libcap-dev, libcap-ng-dev, libattr1-dev, m4, libnuma-dev, zlib1g-dev, libpixman-1-0, libpixman-1-dev
Build-Depends: debhelper (>= 9), cpio, libelf-dev, rsync, libdw-dev, pkg-config, flex, bison, libaudit-dev, bc, python-dev, gawk, autoconf, automake, libtool, libltdl-dev, libglib2.0-dev, libglib2.0-0, libcap-dev, libcap-ng-dev, libattr1-dev, m4, libnuma-dev, zlib1g-dev, libpixman-1-0, libpixman-1-dev, libpmem-dev
Standards-Version: 3.9.6
Homepage: https://katacontainers.io

Expand All @@ -11,4 +11,3 @@ Architecture: @deb_arch@
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends},
Description: linux kernel optimised for container-like workloads.
Linux kernel optimised for container-like workloads

1 change: 1 addition & 0 deletions obs-packaging/qemu-vanilla/qemu-vanilla.spec-template
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ BuildRequires : python
BuildRequires : python-devel
BuildRequires : zlib-devel
BuildRequires : pkgconfig(pixman-1)
BuildRequires : libpmem-devel

# Patches
@RPM_PATCH_LIST@
Expand Down
9 changes: 5 additions & 4 deletions scripts/configure-hypervisor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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

#---------------------------------------------------------------------
Expand Down

0 comments on commit 120593e

Please sign in to comment.