From patchwork Wed Sep 30 15:59:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jones X-Patchwork-Id: 54343 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 45AFA23009 for ; Thu, 1 Oct 2015 07:08:56 +0000 (UTC) Received: by laak17 with SMTP id k17sf32567255laa.3 for ; Thu, 01 Oct 2015 00:08:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list; bh=mShiZ+YjF4C6JT8EZysV3tdMeYb0qgIopKazijQRmqs=; b=SHkqWoKcKpV8DxWBsbpdOiuY+v8ItfzoJWiEwJZ5+3P9jNLOxgUXid0D+vXCZMXerK hmOAWZtK4/ElJWP/LKI67FgaCdr6CtVgy2Wo00VHvuN1rmAJBOzYAgTUjfM2HgmOBTz9 xwst8psssWYW6Y23BzQx+WXIV1ZHaSB3sTcr9Zb4OkffFGMPp9RJR9jgeZVTimI8V5uR v2ACXvKw27X9Tn7/x0F59po8fijd+BkP990ZEMUX0Vqv+kvzvmn1bSeWSy4k54hOz95I 9bifZoQeSVfDoylYcv2tksb7Por0OXLrWGOQH4d59J01mO4H9iNbFhzxLkLqptX9DXhI qsGQ== X-Gm-Message-State: ALoCoQnltbbMvwC9+4wJZeisjzV36nSZD4sDsTWNaVWj1MJDSht5KVOcBI+8/tG6ULW1Y8pED5UA X-Received: by 10.112.164.1 with SMTP id ym1mr1115699lbb.15.1443683335231; Thu, 01 Oct 2015 00:08:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.202 with SMTP id a10ls92848lak.101.gmail; Thu, 01 Oct 2015 00:08:54 -0700 (PDT) X-Received: by 10.152.21.9 with SMTP id r9mr2248297lae.1.1443683334917; Thu, 01 Oct 2015 00:08:54 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id 2si2137702laj.5.2015.10.01.00.08.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Oct 2015 00:08:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by laclj5 with SMTP id lj5so68924122lac.3 for ; Thu, 01 Oct 2015 00:08:54 -0700 (PDT) X-Received: by 10.152.23.170 with SMTP id n10mr2389546laf.32.1443683334795; Thu, 01 Oct 2015 00:08:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp399815lbq; Thu, 1 Oct 2015 00:08:53 -0700 (PDT) X-Received: by 10.50.118.67 with SMTP id kk3mr1573025igb.65.1443683333293; Thu, 01 Oct 2015 00:08:53 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id k4si1090102igu.85.2015.10.01.00.08.53 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 01 Oct 2015 00:08:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:39348 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhXz2-0003H9-Im for patch@linaro.org; Thu, 01 Oct 2015 03:08:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43600) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhJmz-0007lx-Vd for qemu-devel@nongnu.org; Wed, 30 Sep 2015 11:59:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhJmv-0004fO-0O for qemu-devel@nongnu.org; Wed, 30 Sep 2015 11:59:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhJmu-0004dv-Rd for qemu-devel@nongnu.org; Wed, 30 Sep 2015 11:59:24 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 979F12FD9BA; Wed, 30 Sep 2015 15:59:21 +0000 (UTC) Received: from apm-mustang-ev3-05.ml3.eng.bos.redhat.com (apm-mustang-ev3-05.ml3.eng.bos.redhat.com [10.19.176.136]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8UFxJlr012173; Wed, 30 Sep 2015 11:59:20 -0400 From: Andrew Jones To: qemu-devel@nongnu.org Date: Wed, 30 Sep 2015 11:59:18 -0400 Message-Id: <1443628758-26038-1-git-send-email-drjones@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, eduardo.otubo@profitbricks.com Subject: [Qemu-devel] [PATCH] configure: arm/aarch64: allow enable-seccomp X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: drjones@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This is a revert of ae6e8ef11e6cb, but with a bit of refactoring, and also specifically adding arm/aarch64, rather than all architectures. Currently, libseccomp code appears to also support mips, ppc, and s390. We could therefore allow qemu to enable seccomp for those platforms as well, with additional configure patches, given they're tested and proven to work. Signed-off-by: Andrew Jones Acked-by: Eduardo Otubo --- Depends on http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg00191.html configure | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/configure b/configure index f14454e691b36..2d993bf210b56 100755 --- a/configure +++ b/configure @@ -1870,16 +1870,34 @@ fi # libseccomp check if test "$seccomp" != "no" ; then - if test "$cpu" = "i386" || test "$cpu" = "x86_64" && - $pkg_config --atleast-version=2.1.1 libseccomp; then + case "$cpu" in + i386|x86_64) + libseccomp_minver="2.1.1" + ;; + arm|aarch64) + libseccomp_minver="2.2.3" + ;; + *) + libseccomp_minver="" + ;; + esac + + if test "$libseccomp_minver" != "" && + $pkg_config --atleast-version=$libseccomp_minver libseccomp ; then libs_softmmu="$libs_softmmu `$pkg_config --libs libseccomp`" QEMU_CFLAGS="$QEMU_CFLAGS `$pkg_config --cflags libseccomp`" - seccomp="yes" + seccomp="yes" else - if test "$seccomp" = "yes"; then - feature_not_found "libseccomp" "Install libseccomp devel >= 2.1.1" - fi - seccomp="no" + if test "$seccomp" = "yes" ; then + if test "$libseccomp_minver" != "" ; then + feature_not_found "libseccomp" \ + "Install libseccomp devel >= $libseccomp_minver" + else + feature_not_found "libseccomp" \ + "libseccomp is not supported for host cpu $cpu" + fi + fi + seccomp="no" fi fi ##########################################