From patchwork Fri Apr 17 14:22:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 462058 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id C8E651401AB for ; Sat, 18 Apr 2015 00:25:02 +1000 (AEST) Received: from localhost ([::1]:41631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7CW-0007GR-BV for incoming@patchwork.ozlabs.org; Fri, 17 Apr 2015 10:25:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7Bw-00064s-BJ for qemu-devel@nongnu.org; Fri, 17 Apr 2015 10:24:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yj7Bt-0003Hc-4H for qemu-devel@nongnu.org; Fri, 17 Apr 2015 10:24:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yj7Bs-0003HW-Sl for qemu-devel@nongnu.org; Fri, 17 Apr 2015 10:24:21 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3HEOJog027256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 17 Apr 2015 10:24:20 -0400 Received: from localhost.localdomain.com (vpn1-5-19.ams2.redhat.com [10.36.5.19]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3HENPZI011852; Fri, 17 Apr 2015 10:24:16 -0400 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Fri, 17 Apr 2015 15:22:12 +0100 Message-Id: <1429280557-8887-10-git-send-email-berrange@redhat.com> In-Reply-To: <1429280557-8887-1-git-send-email-berrange@redhat.com> References: <1429280557-8887-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Paolo Bonzini , Gerd Hoffmann , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH v1 RFC 09/34] crypto: move built-in AES implementation into crypto/ 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 To prepare for a generic internal cipher API, move the built-in AES implementation into the crypto/ directory Signed-off-by: Daniel P. Berrange --- block/qcow.c | 2 +- block/qcow2.c | 1 - block/qcow2.h | 2 +- crypto/Makefile.objs | 1 + {util => crypto}/aes.c | 2 +- include/{qemu => crypto}/aes.h | 0 target-arm/crypto_helper.c | 2 +- target-i386/fpu_helper.c | 1 - target-i386/ops_sse.h | 2 +- target-ppc/int_helper.c | 2 +- util/Makefile.objs | 2 +- 11 files changed, 8 insertions(+), 9 deletions(-) rename {util => crypto}/aes.c (99%) rename include/{qemu => crypto}/aes.h (100%) diff --git a/block/qcow.c b/block/qcow.c index 0558969..cb07e8d 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -25,7 +25,7 @@ #include "block/block_int.h" #include "qemu/module.h" #include -#include "qemu/aes.h" +#include "crypto/aes.h" #include "migration/migration.h" /**************************************************************/ diff --git a/block/qcow2.c b/block/qcow2.c index 316a8db..824bf52 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -25,7 +25,6 @@ #include "block/block_int.h" #include "qemu/module.h" #include -#include "qemu/aes.h" #include "block/qcow2.h" #include "qemu/error-report.h" #include "qapi/qmp/qerror.h" diff --git a/block/qcow2.h b/block/qcow2.h index 422b825..3cf5318 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -25,7 +25,7 @@ #ifndef BLOCK_QCOW2_H #define BLOCK_QCOW2_H -#include "qemu/aes.h" +#include "crypto/aes.h" #include "block/coroutine.h" //#define DEBUG_ALLOC diff --git a/crypto/Makefile.objs b/crypto/Makefile.objs index 03cc1b2..9efc9b4 100644 --- a/crypto/Makefile.objs +++ b/crypto/Makefile.objs @@ -1,2 +1,3 @@ util-obj-y += init.o util-obj-y += hash.o +util-obj-y += aes.o diff --git a/util/aes.c b/crypto/aes.c similarity index 99% rename from util/aes.c rename to crypto/aes.c index 3d7c4be..244a388 100644 --- a/util/aes.c +++ b/crypto/aes.c @@ -28,7 +28,7 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "qemu-common.h" -#include "qemu/aes.h" +#include "crypto/aes.h" typedef uint32_t u32; typedef uint8_t u8; diff --git a/include/qemu/aes.h b/include/crypto/aes.h similarity index 100% rename from include/qemu/aes.h rename to include/crypto/aes.h diff --git a/target-arm/crypto_helper.c b/target-arm/crypto_helper.c index 1fe975d..5d22838 100644 --- a/target-arm/crypto_helper.c +++ b/target-arm/crypto_helper.c @@ -14,7 +14,7 @@ #include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" -#include "qemu/aes.h" +#include "crypto/aes.h" union CRYPTO_STATE { uint8_t bytes[16]; diff --git a/target-i386/fpu_helper.c b/target-i386/fpu_helper.c index 30d34d5..280adba 100644 --- a/target-i386/fpu_helper.c +++ b/target-i386/fpu_helper.c @@ -20,7 +20,6 @@ #include #include "cpu.h" #include "exec/helper-proto.h" -#include "qemu/aes.h" #include "qemu/host-utils.h" #include "exec/cpu_ldst.h" diff --git a/target-i386/ops_sse.h b/target-i386/ops_sse.h index 0765073..bee134b 100644 --- a/target-i386/ops_sse.h +++ b/target-i386/ops_sse.h @@ -18,7 +18,7 @@ * License along with this library; if not, see . */ -#include "qemu/aes.h" +#include "crypto/aes.h" #if SHIFT == 0 #define Reg MMXReg diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c index 4c2b71c..0a55d5e 100644 --- a/target-ppc/int_helper.c +++ b/target-ppc/int_helper.c @@ -19,7 +19,7 @@ #include "cpu.h" #include "qemu/host-utils.h" #include "exec/helper-proto.h" -#include "qemu/aes.h" +#include "crypto/aes.h" #include "helper_regs.h" /*****************************************************************************/ diff --git a/util/Makefile.objs b/util/Makefile.objs index ceaba30..114d657 100644 --- a/util/Makefile.objs +++ b/util/Makefile.objs @@ -9,7 +9,7 @@ util-obj-y += acl.o util-obj-y += error.o qemu-error.o util-obj-$(CONFIG_POSIX) += compatfd.o util-obj-y += id.o -util-obj-y += iov.o aes.o qemu-config.o qemu-sockets.o uri.o notify.o +util-obj-y += iov.o qemu-config.o qemu-sockets.o uri.o notify.o util-obj-y += qemu-option.o qemu-progress.o util-obj-y += hexdump.o util-obj-y += crc32c.o