From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCajs-0004mU-01 for qemu-devel@nongnu.org; Tue, 16 Dec 2008 09:17:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCajo-0004l2-JZ for qemu-devel@nongnu.org; Tue, 16 Dec 2008 09:17:31 -0500 Received: from [199.232.76.173] (port=56045 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCajo-0004kx-GD for qemu-devel@nongnu.org; Tue, 16 Dec 2008 09:17:28 -0500 Received: from outbound-sin.frontbridge.com ([207.46.51.80]:19932 helo=SG2EHSOBE005.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1LCajn-0006It-Rd for qemu-devel@nongnu.org; Tue, 16 Dec 2008 09:17:28 -0500 Message-ID: <4947B89E.2030603@amd.com> Date: Tue, 16 Dec 2008 15:18:06 +0100 From: Andre Przywara MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090005070609080502080101" Subject: [Qemu-devel] [PATCH 5/8] v2: libnuma check in configure Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Avi Kivity --------------090005070609080502080101 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Signed-off-by: Andre Przywara -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 277-84917 ----to satisfy European Law for business letters: AMD Saxony Limited Liability Company & Co. KG, Wilschdorfer Landstr. 101, 01109 Dresden, Germany Register Court Dresden: HRA 4896, General Partner authorized to represent: AMD Saxony LLC (Wilmington, Delaware, US) General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --------------090005070609080502080101 Content-Type: text/x-patch; name="qemunuma_v2_libnuma_check.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemunuma_v2_libnuma_check.patch" # HG changeset patch # User Andre Przywara # Date 1229431878 -3600 # Node ID c966a24fc826ccf77a698492003faeab87f0f9e5 # Parent 56efd06edc372f45820c382a4c2f0ac87766a2da check for existence of libnuma in configure diff -r 56efd06edc37 -r c966a24fc826 Makefile.target --- a/Makefile.target Tue Dec 16 13:45:28 2008 +0100 +++ b/Makefile.target Tue Dec 16 13:51:18 2008 +0100 @@ -604,6 +604,8 @@ ifdef CONFIG_CS4231A ifdef CONFIG_CS4231A SOUND_HW += cs4231a.o endif + +LIBS+=$(NUMALIBS) ifdef CONFIG_VNC_TLS CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS) diff -r 56efd06edc37 -r c966a24fc826 configure --- a/configure Tue Dec 16 13:45:28 2008 +0100 +++ b/configure Tue Dec 16 13:51:18 2008 +0100 @@ -112,6 +112,7 @@ uname_release="" uname_release="" curses="yes" aio="yes" +numa="yes" nptl="yes" mixemu="no" bluez="yes" @@ -365,6 +366,8 @@ for opt do ;; --enable-mixemu) mixemu="yes" ;; + --disable-numa) numa="no" + ;; --disable-aio) aio="no" ;; --disable-blobs) blobs="no" @@ -459,6 +462,7 @@ echo " --audio-card-list=LIST set lis echo " --audio-card-list=LIST set list of additional emulated audio cards" echo " Available cards: ac97 adlib cs4231a gus" echo " --enable-mixemu enable mixer emulation" +echo " --disable-numa disable NUMA support (host side)" echo " --disable-brlapi disable BrlAPI" echo " --disable-vnc-tls disable TLS encryption for VNC server" echo " --disable-curses disable curses output" @@ -865,6 +869,22 @@ done done ########################################## +# libnuma probe +NUMALIBS="" + +if test "$numa" = "yes" ; then + numa=no + cat > $TMPC << EOF +#include +int main(void) { return numa_available(); } +EOF + if $cc ${ARCH_CFLAGS} -o $TMPE ${OS_CFLAGS} $TMPC -lnuma > /dev/null 2> /dev/null ; then + numa=yes + NUMALIBS="-lnuma" + fi +fi + +########################################## # BrlAPI probe if test -z "$brlapi" ; then @@ -1056,6 +1076,7 @@ echo "Audio drivers $audio_drv_list" echo "Audio drivers $audio_drv_list" echo "Extra audio cards $audio_card_list" echo "Mixer emulation $mixemu" +echo "NUMA support $numa" echo "VNC TLS support $vnc_tls" if test "$vnc_tls" = "yes" ; then echo " TLS CFLAGS $vnc_tls_cflags" @@ -1122,6 +1143,7 @@ echo "LDFLAGS=$LDFLAGS" >> $config_mak echo "LDFLAGS=$LDFLAGS" >> $config_mak echo "EXESUF=$EXESUF" >> $config_mak echo "AIOLIBS=$AIOLIBS" >> $config_mak +echo "NUMALIBS=$NUMALIBS" >> $config_mak case "$cpu" in i386) echo "ARCH=i386" >> $config_mak @@ -1296,6 +1318,10 @@ if test "$mixemu" = "yes" ; then if test "$mixemu" = "yes" ; then echo "CONFIG_MIXEMU=yes" >> $config_mak echo "#define CONFIG_MIXEMU 1" >> $config_h +fi +if test "$numa" = "yes" ; then + echo "CONFIG_NUMA=yes" >> $config_mak + echo "#define CONFIG_NUMA 1" >> $config_h fi if test "$vnc_tls" = "yes" ; then echo "CONFIG_VNC_TLS=yes" >> $config_mak --------------090005070609080502080101--