From patchwork Mon Oct 22 11:54:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 193125 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BB7892C008D for ; Mon, 22 Oct 2012 22:55:15 +1100 (EST) Received: from localhost ([::1]:50104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQGbA-0005x9-Jz for incoming@patchwork.ozlabs.org; Mon, 22 Oct 2012 07:55:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQGau-0005td-OU for qemu-devel@nongnu.org; Mon, 22 Oct 2012 07:55:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQGaq-0007vb-AG for qemu-devel@nongnu.org; Mon, 22 Oct 2012 07:54:56 -0400 Received: from 38.0.169.217.in-addr.arpa ([217.169.0.38]:51889 helo=mnementh.archaic.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQGaq-0007u4-3A for qemu-devel@nongnu.org; Mon, 22 Oct 2012 07:54:52 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1TQGad-0008G4-7d; Mon, 22 Oct 2012 12:54:39 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 22 Oct 2012 12:54:39 +0100 Message-Id: <1350906879-31721-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 217.169.0.38 Cc: Marcelo Tosatti , Jan Kiszka , Avi Kivity , kvm@vger.kernel.org, patches@linaro.org Subject: [Qemu-devel] [PATCH] update-linux-headers.sh: Handle new kernel uapi/ directories 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Recent kernels have moved to keeping the userspace headers in uapi/ subdirectories. This breaks the detection of whether an architecture has KVM support in the kernel because kvm.h has moved in the kernel source tree. Update the check to support both the old and new locations. Signed-off-by: Peter Maydell --- This would otherwise cause us to ignore the architectures which have moved over to uapi/ (which for QEMU's purposes means "everything but x86"...) scripts/update-linux-headers.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/update-linux-headers.sh b/scripts/update-linux-headers.sh index 67be2ef..4c7b566 100755 --- a/scripts/update-linux-headers.sh +++ b/scripts/update-linux-headers.sh @@ -34,7 +34,8 @@ ARCHLIST=$(cd "$linux/arch" && echo *) for arch in $ARCHLIST; do # Discard anything which isn't a KVM-supporting architecture - if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ]; then + if ! [ -e "$linux/arch/$arch/include/asm/kvm.h" ] && + ! [ -e "$linux/arch/$arch/include/uapi/asm/kvm.h" ] ; then continue fi