[PATCH v6 00/17] kvm-unit-tests/arm: initial drop

Andrew Jones
2014-07-11T08:19:54Z

This is a v6 of a series that introduces arm to kvm-unit-tests. As
the tidy-up patches from v5 have already been merged (thanks!), these
are just the remaining patches. Although there are several new patches
as well, as virtio-testdev was dropped in favor of the chr-testdev
backend[1]. The new patches are

06/17 Introduce alloc_ops
08/17 lib: add asm/page.h and virt_to_phys/phys_to_virt
09/17 virtio: add minimal support for virtqueues
10/17 Introduce chr-testdev
15/17 arm: Add arch-specific asm/page.h and __va/__pa

and of course "Introduce virtio-testdev" was dropped.

So, this series first adds support for device trees (libfdt), and for
chr-testdev (virtio). Next, it adds the basic infrastructure for booting
a test case (guest), and adds a first test case, a self-test to confirm
setup was completed successfully. Finally, it further prepares the
framework for more complicated tests by adding vector support, and
extends the self-test to test that too.

This initial drop doesn't require kvmarm. qemu-system-arm is enough,
but qemu must have mach-virt, and the chr-testdev patch[1].

These patches (v6) are also available from a git repo here
https://github.com/rhdrjones/kvm-unit-tests/commits/arm/v6-initial-drop%2Cchr-testdev

The v5 patches are available for reference here
https://github.com/rhdrjones/kvm-unit-tests/commits/arm/v5-initial-drop

Almost all changes since v5 are for the virtio-testdev to chr-testdev
switch. To see just the changes made for v6 that are unrelated to the
testdev switch, then look here[2], which is an interdiff between v5 and
a "v6" that does not include the testdev switch. Likewise to see just
the changes made for the switch, look here[3] at an interdiff between
"v6" and the real v6 "v6,chr-testdev". All details of patch changes are
in their own changelogs. Note, even though there were some bigger changes
needed for the testdev switch, I kept Christoffer's *-by's. Mainly the
already Reviewed-by patches

07/17 add minimal virtio support for devtree virtio-mmio
12/17 arm: initial drop

should get a second look (or interdiffed).

Thanks in advance for reviews!

[1] http://lists.nongnu.org/archive/html/qemu-devel/2014-07/msg01960.html
[2] http://fpaste.org/117172/
[3] http://fpaste.org/117173/

Andrew Jones (15):
libfdt: Import libfdt source
libfdt: get libfdt to build
add support for Linux device trees
libcflat: add abort() and assert()
Introduce asm-generic/*.h files
Introduce alloc_ops
add minimal virtio support for devtree virtio-mmio
lib: add asm/page.h and virt_to_phys/phys_to_virt
virtio: add minimal support for virtqueues
Introduce chr-testdev
libcflat: clean up libcflat.h
arm: initial drop
arm: Add arch-specific asm/page.h and __va/__pa
arm: add useful headers from the Linux kernel
arm: vectors support

Christoffer Dall (2):
arm: Add spinlock implementation
arm: Add IO accessors to avoid register-writeback

.gitignore | 1 +
Makefile | 26 +-
arm/cstart.S | 209 ++++++
arm/flat.lds | 23 +
arm/run | 46 ++
arm/selftest.c | 214 ++++++
arm/unittests.cfg | 30 +
config/asm-offsets.mak | 41 ++
config/config-arm.mak | 80 +++
configure | 23 +-
lib/abort.c | 20 +
lib/alloc.c | 2 +
lib/alloc.h | 31 +
lib/argv.c | 6 +
lib/arm/.gitignore | 1 +
lib/arm/asm-offsets.c | 39 ++
lib/arm/asm/asm-offsets.h | 1 +
lib/arm/asm/barrier.h | 18 +
lib/arm/asm/cp15.h | 37 ++
lib/arm/asm/io.h | 94 +++
lib/arm/asm/page.h | 33 +
lib/arm/asm/processor.h | 39 ++
lib/arm/asm/ptrace.h | 100 +++
lib/arm/asm/setup.h | 63 ++
lib/arm/asm/spinlock.h | 11 +
lib/arm/eabi_compat.c | 20 +
lib/arm/io.c | 65 ++
lib/arm/processor.c | 112 ++++
lib/arm/setup.c | 188 ++++++
lib/arm/spinlock.c | 28 +
lib/asm-generic/io.h | 175 +++++
lib/asm-generic/page.h | 28 +
lib/asm-generic/spinlock.h | 4 +
lib/chr-testdev.c | 72 ++
lib/chr-testdev.h | 14 +
lib/devicetree.c | 272 ++++++++
lib/devicetree.h | 236 +++++++
lib/generated/.gitignore | 1 +
lib/libcflat.h | 59 +-
lib/libfdt/Makefile.libfdt | 10 +
lib/libfdt/README | 4 +
lib/libfdt/fdt.c | 250 +++++++
lib/libfdt/fdt.h | 111 ++++
lib/libfdt/fdt_empty_tree.c | 84 +++
lib/libfdt/fdt_ro.c | 573 ++++++++++++++++
lib/libfdt/fdt_rw.c | 492 ++++++++++++++
lib/libfdt/fdt_strerror.c | 96 +++
lib/libfdt/fdt_sw.c | 256 +++++++
lib/libfdt/fdt_wip.c | 118 ++++
lib/libfdt/libfdt.h | 1514 ++++++++++++++++++++++++++++++++++++++++++
lib/libfdt/libfdt_env.h | 111 ++++
lib/libfdt/libfdt_internal.h | 95 +++
lib/libfdt/version.lds | 60 ++
lib/string.c | 54 ++
lib/string.h | 15 +
lib/virtio.c | 335 ++++++++++
lib/virtio.h | 194 ++++++
57 files changed, 6801 insertions(+), 33 deletions(-)
create mode 100644 arm/cstart.S
create mode 100644 arm/flat.lds
create mode 100755 arm/run
create mode 100644 arm/selftest.c
create mode 100644 arm/unittests.cfg
create mode 100644 config/asm-offsets.mak
create mode 100644 config/config-arm.mak
create mode 100644 lib/abort.c
create mode 100644 lib/alloc.c
create mode 100644 lib/alloc.h
create mode 100644 lib/arm/.gitignore
create mode 100644 lib/arm/asm-offsets.c
create mode 100644 lib/arm/asm/asm-offsets.h
create mode 100644 lib/arm/asm/barrier.h
create mode 100644 lib/arm/asm/cp15.h
create mode 100644 lib/arm/asm/io.h
create mode 100644 lib/arm/asm/page.h
create mode 100644 lib/arm/asm/processor.h
create mode 100644 lib/arm/asm/ptrace.h
create mode 100644 lib/arm/asm/setup.h
create mode 100644 lib/arm/asm/spinlock.h
create mode 100644 lib/arm/eabi_compat.c
create mode 100644 lib/arm/io.c
create mode 100644 lib/arm/processor.c
create mode 100644 lib/arm/setup.c
create mode 100644 lib/arm/spinlock.c
create mode 100644 lib/asm-generic/io.h
create mode 100644 lib/asm-generic/page.h
create mode 100644 lib/asm-generic/spinlock.h
create mode 100644 lib/chr-testdev.c
create mode 100644 lib/chr-testdev.h
create mode 100644 lib/devicetree.c
create mode 100644 lib/devicetree.h
create mode 100644 lib/generated/.gitignore
create mode 100644 lib/libfdt/Makefile.libfdt
create mode 100644 lib/libfdt/README
create mode 100644 lib/libfdt/fdt.c
create mode 100644 lib/libfdt/fdt.h
create mode 100644 lib/libfdt/fdt_empty_tree.c
create mode 100644 lib/libfdt/fdt_ro.c
create mode 100644 lib/libfdt/fdt_rw.c
create mode 100644 lib/libfdt/fdt_strerror.c
create mode 100644 lib/libfdt/fdt_sw.c
create mode 100644 lib/libfdt/fdt_wip.c
create mode 100644 lib/libfdt/libfdt.h
create mode 100644 lib/libfdt/libfdt_env.h
create mode 100644 lib/libfdt/libfdt_internal.h
create mode 100644 lib/libfdt/version.lds
create mode 100644 lib/string.h
create mode 100644 lib/virtio.c
create mode 100644 lib/virtio.h

--
1.9.3