qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: qiaonuohan <qiaonuohan@cn.fujitsu.com>
To: lcapitulino@redhat.com, qemu-devel@nongnu.org
Cc: qiaonuohan <qiaonuohan@cn.fujitsu.com>
Subject: [Qemu-devel] [PATCH v9 06/14] dump: add support for lzo/snappy
Date: Tue, 18 Feb 2014 14:11:30 +0800	[thread overview]
Message-ID: <1392703898-20083-7-git-send-email-qiaonuohan@cn.fujitsu.com> (raw)
In-Reply-To: <1392703898-20083-1-git-send-email-qiaonuohan@cn.fujitsu.com>

kdump-compressed format supports three compression format, zlib/lzo/snappy.
Currently, only zlib is available. This patch is used to support lzo/snappy.
'--enable-lzo/--enable-snappy' is needed to be specified with configure to make
lzo/snappy available for qemu

Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
---
 configure |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 4648117..8631d9b 100755
--- a/configure
+++ b/configure
@@ -245,6 +245,8 @@ libusb=""
 usb_redir=""
 glx=""
 zlib="yes"
+lzo="no"
+snappy="no"
 guest_agent=""
 guest_agent_with_vss="no"
 vss_win32_sdk=""
@@ -953,6 +955,10 @@ for opt do
   ;;
   --disable-zlib-test) zlib="no"
   ;;
+  --enable-lzo) lzo="yes"
+  ;;
+  --enable-snappy) snappy="yes"
+  ;;
   --enable-guest-agent) guest_agent="yes"
   ;;
   --disable-guest-agent) guest_agent="no"
@@ -1242,6 +1248,8 @@ Advanced options (experts only):
   --enable-libusb          enable libusb (for usb passthrough)
   --disable-usb-redir      disable usb network redirection support
   --enable-usb-redir       enable usb network redirection support
+  --enable-lzo             enable the support of lzo compression library
+  --enable-snappy          enable the support of snappy compression library
   --disable-guest-agent    disable building of the QEMU Guest Agent
   --enable-guest-agent     enable building of the QEMU Guest Agent
   --with-vss-sdk=SDK-path  enable Windows VSS support in QEMU Guest Agent
@@ -1553,6 +1561,42 @@ fi
 libs_softmmu="$libs_softmmu -lz"
 
 ##########################################
+# lzo check
+
+if test "$lzo" != "no" ; then
+    cat > $TMPC << EOF
+#include <lzo/lzo1x.h>
+int main(void) { lzo_version(); return 0; }
+EOF
+    if compile_prog "" "-llzo2" ; then
+        :
+    else
+        error_exit "lzo check failed" \
+            "Make sure to have the lzo libs and headers installed."
+    fi
+
+    libs_softmmu="$libs_softmmu -llzo2"
+fi
+
+##########################################
+# snappy check
+
+if test "$snappy" != "no" ; then
+    cat > $TMPC << EOF
+#include <snappy-c.h>
+int main(void) { snappy_max_compressed_length(4096); return 0; }
+EOF
+    if compile_prog "" "-lsnappy" ; then
+        :
+    else
+        error_exit "snappy check failed" \
+            "Make sure to have the snappy libs and headers installed."
+    fi
+
+    libs_softmmu="$libs_softmmu -lsnappy"
+fi
+
+##########################################
 # libseccomp check
 
 if test "$seccomp" != "no" ; then
@@ -3872,6 +3916,8 @@ echo "libssh2 support   $libssh2"
 echo "TPM passthrough   $tpm_passthrough"
 echo "QOM debugging     $qom_cast_debug"
 echo "vhdx              $vhdx"
+echo "lzo support       $lzo"
+echo "snappy support    $snappy"
 
 if test "$sdl_too_old" = "yes"; then
 echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -4187,6 +4233,14 @@ if test "$glx" = "yes" ; then
   echo "GLX_LIBS=$glx_libs" >> $config_host_mak
 fi
 
+if test "$lzo" = "yes" ; then
+  echo "CONFIG_LZO=y" >> $config_host_mak
+fi
+
+if test "$snappy" = "yes" ; then
+  echo "CONFIG_SNAPPY=y" >> $config_host_mak
+fi
+
 if test "$libiscsi" = "yes" ; then
   echo "CONFIG_LIBISCSI=y" >> $config_host_mak
   if test "$libiscsi_version" = "1.4.0"; then
-- 
1.7.1

  parent reply	other threads:[~2014-02-18  6:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18  6:11 [Qemu-devel] [PATCH v9 00/14] Make 'dump-guest-memory' dump in kdump-compressed format qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 01/14] dump: const-qualify the buf of WriteCoreDumpFunction qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 02/14] dump: add argument to write_elfxx_notes qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 03/14] dump: add API to write header of flatten format qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 04/14] dump: add API to write vmcore qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 05/14] dump: add API to write elf notes to buffer qiaonuohan
2014-02-18  6:11 ` qiaonuohan [this message]
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 07/14] dump: add members to DumpState and init some of them qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 08/14] dump: add API to write dump header qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 09/14] dump: add API to write dump_bitmap qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 10/14] dump: add APIs to operate DataCache qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 11/14] dump: add API to write dump pages qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 12/14] dump: make kdump-compressed format available for 'dump-guest-memory' qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 13/14] Define the architecture for compressed dump format qiaonuohan
2014-02-18  6:11 ` [Qemu-devel] [PATCH v9 14/14] dump: add 'query-dump-guest-memory-capability' command qiaonuohan
2014-02-28 17:05 ` [Qemu-devel] [PATCH v9 00/14] Make 'dump-guest-memory' dump in kdump-compressed format Luiz Capitulino

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=1392703898-20083-7-git-send-email-qiaonuohan@cn.fujitsu.com \
    --to=qiaonuohan@cn.fujitsu.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).