mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00

This patch adds migration test support for aarch64. The test code, which implements the same functionality as x86, is booted as a kernel in qemu. Here are the design choices we make for aarch64: * We choose this -kernel approach because aarch64 QEMU doesn't provide a built-in fw like x86 does. So instead of relying on a boot loader, we use -kernel approach for aarch64. * The serial output is sent to PL011 directly. * The physical memory base for mach-virt machine is 0x40000000. We change the start_address and end_address for aarch64. In addition to providing the binary, this patch also includes the source code and the build script in tests/migration/aarch64. So users can change the source and/or re-compile the binary as they wish. Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Wei Huang <wei@redhat.com> Message-Id: <1538669326-28135-1-git-send-email-wei@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
30 lines
891 B
C
30 lines
891 B
C
/*
|
|
* Copyright (c) 2018 Red Hat, Inc. and/or its affiliates
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
#ifndef _TEST_MIGRATION_H_
|
|
#define _TEST_MIGRATION_H_
|
|
|
|
/* Common */
|
|
#define TEST_MEM_PAGE_SIZE 4096
|
|
|
|
/* x86 */
|
|
#define X86_TEST_MEM_START (1 * 1024 * 1024)
|
|
#define X86_TEST_MEM_END (100 * 1024 * 1024)
|
|
|
|
/* PPC */
|
|
#define PPC_TEST_MEM_START (1 * 1024 * 1024)
|
|
#define PPC_TEST_MEM_END (100 * 1024 * 1024)
|
|
|
|
/* ARM */
|
|
#define ARM_TEST_MEM_START (0x40000000 + 1 * 1024 * 1024)
|
|
#define ARM_TEST_MEM_END (0x40000000 + 100 * 1024 * 1024)
|
|
#define ARM_MACH_VIRT_UART 0x09000000
|
|
/* AArch64 kernel load address is 0x40080000, and the test memory starts at
|
|
* 0x40100000. So the maximum allowable kernel size is 512KB.
|
|
*/
|
|
#define ARM_TEST_MAX_KERNEL_SIZE (512 * 1024)
|
|
|
|
#endif /* _TEST_MIGRATION_H_ */
|