From: Jingqi Liu <jingqi.liu@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>,
Xiao Guangrong <xiaoguangrong.eric@gmail.com>,
Dan Williams <dan.j.williams@intel.com>
Cc: Jingqi Liu <jingqi.liu@intel.com>, qemu-devel@nongnu.org
Subject: [PATCH v2 3/3] configure: add libdaxctl support
Date: Wed, 15 Apr 2020 11:35:38 +0800 [thread overview]
Message-ID: <20200415033538.43329-4-jingqi.liu@intel.com> (raw)
In-Reply-To: <20200415033538.43329-1-jingqi.liu@intel.com>
Add a pair of configure options --{enable,disable}-libdaxctl to control
whether QEMU is compiled with libdaxctl [1]. Libdaxctl is a utility
library for managing the device dax subsystem.
QEMU uses mmap(2) to maps vNVDIMM backends and aligns the mapping
address to the page size (getpagesize(2)) by default. However, some
types of backends may require an alignment different than the page
size. The 'align' option is provided to memory-backend-file to allow
users to specify the proper alignment.
For device dax (e.g., /dev/dax0.0), the 'align' option needs to match
the alignment requirement of the device dax, which can be fetched
through the libdaxctl APIs.
[1] Libdaxctl is a part of ndctl project.
The project's repository is: https://github.com/pmem/ndctl
For more information about libdaxctl APIs, you can refer to the
comments in source code of: pmem/ndctl/daxctl/lib/libdaxctl.c.
Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
---
configure | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/configure b/configure
index e225a1e3ff..df1752cf08 100755
--- a/configure
+++ b/configure
@@ -509,6 +509,7 @@ libpmem=""
default_devices="yes"
plugins="no"
fuzzing="no"
+libdaxctl=""
supported_cpu="no"
supported_os="no"
@@ -1601,6 +1602,10 @@ for opt do
;;
--gdb=*) gdb_bin="$optarg"
;;
+ --enable-libdaxctl) libdaxctl=yes
+ ;;
+ --disable-libdaxctl) libdaxctl=no
+ ;;
*)
echo "ERROR: unknown option $opt"
echo "Try '$0 --help' for more information"
@@ -1894,6 +1899,7 @@ disabled with --disable-FEATURE, default is enabled if available:
debug-mutex mutex debugging support
libpmem libpmem support
xkbcommon xkbcommon support
+ libdaxctl libdaxctl support
NOTE: The object files are built at the place where configure is launched
EOF
@@ -6190,6 +6196,25 @@ if test "$libpmem" != "no"; then
fi
fi
+##########################################
+# check for libdaxctl
+
+if test "$libdaxctl" != "no"; then
+ if $pkg_config --exists "libdaxctl"; then
+ libdaxctl="yes"
+ libdaxctl_libs=$($pkg_config --libs libdaxctl)
+ libdaxctl_cflags=$($pkg_config --cflags libdaxctl)
+ libs_softmmu="$libs_softmmu $libdaxctl_libs"
+ QEMU_CFLAGS="$QEMU_CFLAGS $libdaxctl_cflags"
+ else
+ if test "$libdaxctl" = "yes" ; then
+ feature_not_found "libdaxctl" "Install libdaxctl"
+ fi
+ libdaxctl="no"
+ fi
+fi
+
+
##########################################
# check for slirp
@@ -6767,6 +6792,7 @@ echo "parallels support $parallels"
echo "sheepdog support $sheepdog"
echo "capstone $capstone"
echo "libpmem support $libpmem"
+echo "libdaxctl support $libdaxctl"
echo "libudev $libudev"
echo "default devices $default_devices"
echo "plugin support $plugins"
@@ -7590,6 +7616,10 @@ if test "$libpmem" = "yes" ; then
echo "CONFIG_LIBPMEM=y" >> $config_host_mak
fi
+if test "$libdaxctl" = "yes" ; then
+ echo "CONFIG_LIBDAXCTL=y" >> $config_host_mak
+fi
+
if test "$bochs" = "yes" ; then
echo "CONFIG_BOCHS=y" >> $config_host_mak
fi
--
2.17.1
next prev parent reply other threads:[~2020-04-15 3:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 3:35 [PATCH v2 0/3] fetch the alignment of device dax Jingqi Liu
2020-04-15 3:35 ` [PATCH v2 1/3] exec: fetch the alignment of Linux devdax pmem character device nodes Jingqi Liu
2020-04-28 16:22 ` Joao Martins
2020-04-15 3:35 ` [PATCH v2 2/3] docs/nvdimm: add description of alignment requirement of device dax Jingqi Liu
2020-04-28 16:22 ` Joao Martins
2020-04-29 6:11 ` Liu, Jingqi
2020-04-15 3:35 ` Jingqi Liu [this message]
2020-04-28 16:23 ` [PATCH v2 3/3] configure: add libdaxctl support Joao Martins
2020-04-29 7:03 ` Liu, Jingqi
2020-04-19 13:48 ` [PATCH v2 0/3] fetch the alignment of device dax Liu, Jingqi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200415033538.43329-4-jingqi.liu@intel.com \
--to=jingqi.liu@intel.com \
--cc=dan.j.williams@intel.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=xiaoguangrong.eric@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).