Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20…
…181011a' into staging Migration pull 2018-10-11 With one bonus HMP fix. # gpg: Signature made Thu 11 Oct 2018 20:23:12 BST # gpg: using RSA key 0516331EBC5BFDE7 # gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>" # Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A 9FA9 0516 331E BC5B FDE7 * remotes/dgilbert/tags/pull-migration-20181011a: migration-test: Only generate a single target architecture qmp, hmp: make subsystem/system-vendor identities optional vhost-user: Don't ask for reply on postcopy mem table set vhost-user: Fix userfaultfd leak migration: Stop postcopy fault thread before notifying tests/migration: Enable the migration test on s390x, too tests: Add migration test for aarch64 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
- Loading branch information
Showing
15 changed files
with
531 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# To specify cross compiler prefix, use CROSS_PREFIX= | ||
# $ make CROSS_PREFIX=aarch64-linux-gnu- | ||
|
||
.PHONY: all clean | ||
all: a-b-kernel.h | ||
|
||
a-b-kernel.h: aarch64.kernel | ||
echo "$$__note" > $@ | ||
xxd -i $< | sed -e 's/.*int.*//' >> $@ | ||
|
||
aarch64.kernel: aarch64.elf | ||
$(CROSS_PREFIX)objcopy -O binary $< $@ | ||
|
||
aarch64.elf: a-b-kernel.S | ||
$(CROSS_PREFIX)gcc -o $@ -nostdlib -Wl,--build-id=none $< | ||
|
||
clean: | ||
$(RM) *.kernel *.elf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# | ||
# Copyright (c) 2018 Red Hat, Inc. and/or its affiliates | ||
# | ||
# Author: | ||
# Wei Huang <wei@redhat.com> | ||
# | ||
# This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
# See the COPYING file in the top-level directory. | ||
# | ||
# Note: Please make sure the compiler compiles the assembly code below with | ||
# pc-relative address. Also the branch instructions should use relative | ||
# addresses only. | ||
|
||
#include "../migration-test.h" | ||
|
||
.section .text | ||
|
||
.globl _start | ||
|
||
_start: | ||
/* disable MMU to use phys mem address */ | ||
mrs x0, sctlr_el1 | ||
bic x0, x0, #(1<<0) | ||
msr sctlr_el1, x0 | ||
isb | ||
|
||
/* traverse test memory region */ | ||
mov x0, #ARM_TEST_MEM_START | ||
mov x1, #ARM_TEST_MEM_END | ||
|
||
/* output char 'A' to PL011 */ | ||
mov w3, 'A' | ||
mov x2, #ARM_MACH_VIRT_UART | ||
strb w3, [x2] | ||
|
||
/* clean up memory */ | ||
mov w3, #0 | ||
mov x4, x0 | ||
clean: | ||
strb w3, [x4] | ||
add x4, x4, #TEST_MEM_PAGE_SIZE | ||
cmp x4, x1 | ||
ble clean | ||
|
||
/* w5 keeps a counter so we can limit the output speed */ | ||
mov w5, #0 | ||
|
||
/* main body */ | ||
mainloop: | ||
mov x4, x0 | ||
|
||
innerloop: | ||
/* increment the first byte of each page by 1 */ | ||
ldrb w3, [x4] | ||
add w3, w3, #1 | ||
and w3, w3, #0xff | ||
strb w3, [x4] | ||
|
||
/* make sure QEMU user space can see consistent data as MMU is off */ | ||
dc civac, x4 | ||
|
||
add x4, x4, #TEST_MEM_PAGE_SIZE | ||
cmp x4, x1 | ||
blt innerloop | ||
|
||
add w5, w5, #1 | ||
and w5, w5, #0xff | ||
cmp w5, #0 | ||
bne mainloop | ||
|
||
/* output char 'B' to PL011 */ | ||
mov w3, 'B' | ||
strb w3, [x2] | ||
|
||
b mainloop |
Oops, something went wrong.