From patchwork Sat Sep 1 05:11:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Huang X-Patchwork-Id: 10584615 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 976CB139B for ; Sat, 1 Sep 2018 05:24:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8782B2B324 for ; Sat, 1 Sep 2018 05:24:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BD6D2B333; Sat, 1 Sep 2018 05:24:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 197F92B324 for ; Sat, 1 Sep 2018 05:24:59 +0000 (UTC) Received: from localhost ([::1]:59579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvyP4-0000k5-DI for patchwork-qemu-devel@patchwork.kernel.org; Sat, 01 Sep 2018 01:24:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvyNY-00083H-OL for qemu-devel@nongnu.org; Sat, 01 Sep 2018 01:23:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fvyBt-0001F3-Ip for qemu-devel@nongnu.org; Sat, 01 Sep 2018 01:11:24 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37012 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fvyBt-00018v-AU for qemu-devel@nongnu.org; Sat, 01 Sep 2018 01:11:21 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B8AE7A7E6; Sat, 1 Sep 2018 05:11:18 +0000 (UTC) Received: from amd-seattle-08.khw.lab.eng.bos.redhat.com (amd-seattle-08.khw.lab.eng.bos.redhat.com [10.16.184.111]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1313410FFE74; Sat, 1 Sep 2018 05:11:15 +0000 (UTC) From: Wei Huang To: qemu-devel@nongnu.org Date: Sat, 1 Sep 2018 01:11:11 -0400 Message-Id: <1535778675-32170-1-git-send-email-wei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Sat, 01 Sep 2018 05:11:18 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Sat, 01 Sep 2018 05:11:18 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'wei@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH V8 0/4] tests: Add migration test for aarch64 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, peter.maydell@linaro.org, drjones@redhat.com, wei@redhat.com, quintela@redhat.com, dgilbert@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patchset adds a migration test for aarch64. It leverages Dave Gilbert's migration boot block patches to create a new test case for aarch64. V7->V8: * Support cross compilation by searching for CROSS_CC_GUEST option, instead of using the find-cross-prefix defined in roms/Makefile * Use the "max" options for ARM guest VM's CPU and GIC types * $(TARGET)/Makefile rules are rewritten based on Laurent Vivier's comment * NOTE: because Patch 1/2 is re-written, I remove the "Reviewed-by" for reviewers to take a look again. Thanks. V6->V7: * Define test memory start/end addresses for all architectures * Check aarch64 kernel binary size, limit under 512KB V5->V6: * Add Reviewed-by to patch 1-3 * Add more design notes in patch 4 (aarch64 assembly compilation, bin space) V4->V5: * Extract cross compilation detection code into rules.mak for sharing * Minor comment and code revision in migration-test.c & aarch64-a-b-kernel.S V3->V4: * Rename .s to .S, allowing assembly to include C-style header file * Move test defines into a new migration-test.h file * Use different cpu & gic settings for kvm and tcg modes on aarch64 * Clean up aarch64-a-b-kernel.S based on Andrew Jones' comments V2->V3: * Convert build script to Makefile * Add cross-compilation support * Fix CPU type for "tcg" machine type * Revise asm code and the compilation process from asm to header file V1->V2: * Similar to Dave Gilbert's recent changes to migration-test, we provide the test source and a build script in V2. * aarch64 kernel blob is defined as "unsigned char" because the source is now provided in V2. * Add "-machine none" to test_deprecated() because aarch64 doesn't have a default machine type. RFC->V1: * aarch64 kernel blob is defined as an uint32_t array * The test code is re-written to address a data caching issue under KVM. Tests passed under both x86 and aarch64. * Re-use init_bootfile_x86() for both x86 and aarch64 * Other minor fixes Thanks, -Wei Wei Huang (4): tests/migration: Convert x86 boot block compilation script into Makefile tests/migration: Support cross compiler in generating boot block header file tests/migration: Add migration-test header file tests: Add migration test for aarch64 tests/Makefile.include | 1 + tests/migration-test.c | 68 +++++++++++++++----- tests/migration/Makefile | 34 ++++++++++ tests/migration/aarch64/Makefile | 20 ++++++ tests/migration/aarch64/aarch64-a-b-kernel.S | 75 ++++++++++++++++++++++ tests/migration/aarch64/aarch64-a-b-kernel.h | 19 ++++++ tests/migration/migration-test.h | 30 +++++++++ tests/migration/rebuild-x86-bootblock.sh | 33 ---------- tests/migration/x86_64/Makefile | 22 +++++++ .../x86-a-b-bootblock.S} | 0 tests/migration/{ => x86_64}/x86-a-b-bootblock.h | 8 +-- 11 files changed, 258 insertions(+), 52 deletions(-) create mode 100644 tests/migration/Makefile create mode 100644 tests/migration/aarch64/Makefile create mode 100644 tests/migration/aarch64/aarch64-a-b-kernel.S create mode 100644 tests/migration/aarch64/aarch64-a-b-kernel.h create mode 100644 tests/migration/migration-test.h delete mode 100755 tests/migration/rebuild-x86-bootblock.sh create mode 100644 tests/migration/x86_64/Makefile rename tests/migration/{x86-a-b-bootblock.s => x86_64/x86-a-b-bootblock.S} (100%) rename tests/migration/{ => x86_64}/x86-a-b-bootblock.h (93%)