mbox series

[kvm-unit-tests,0/7] arm/arm64: Add support for running under kvmtool

Message ID 20190124111634.4727-1-alexandru.elisei@arm.com (mailing list archive)
Headers show
Series arm/arm64: Add support for running under kvmtool | expand

Message

Alexandru Elisei Jan. 24, 2019, 11:16 a.m. UTC
kvm-unit-tests is designed to be run with QEMU as the virtual machine
monitor. It relies on devices emulated by QEMU (like isa-debug-exit or
testdev) and it makes certain assumptions based on the implicit QEMU
virtual environment configuration (like the serial base address).

kvmtool [1] is a lightweight virtual machine monitor for running KVM
guests. kvmtool has reduced complexity compared to QEMU and is easily
hackable.

This patch series aims to make it possible to run kvm-unit-tests using
kvmtool on the arm and arm64 architectures, with one caveat: when
terminating a test, the userspace process won't exit with an exit code that
signals the success or failure of the test. Output from the test can still
be parsed to determine the outcome of the test.

* Patches 1 and 2 add support for discovering the ns16550a UART emulated by
  kvmtool on arm and arm64.
* Patches 3,4 and 5 provide an alternative mechanism for terminating the
  virtual machine by using PSCI.
* Patches 6 and 7 remove an error when parsing the test parameters
  generated by kvmtool.


[1] https://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git/

Alexandru Elisei (7):
  lib: arm: Discover ns16550a UART
  lib: arm: Remove warning about uart0_base mismatch
  lib: chr-testdev: Make chr_testdev_init() return status
  lib: arm: Implement PSCI SYSTEM_OFF in psci_system_off()
  lib: arm: Fallback to psci_system_off() in exit()
  lib: argv: Implement argv_find() for test parameters
  arm/arm64: Use argv_find() for test names

 lib/arm/asm/psci.h |  1 +
 lib/argv.h         |  1 +
 lib/chr-testdev.h  |  2 +-
 lib/argv.c         | 11 +++++++++++
 lib/arm/io.c       | 38 +++++++++++++++++++++++---------------
 lib/arm/psci.c     |  6 ++++++
 lib/chr-testdev.c  |  8 +++++---
 arm/gic.c          |  7 ++++---
 arm/selftest.c     | 19 ++++++++++++-------
 9 files changed, 64 insertions(+), 29 deletions(-)