Re: [kvm-unit-tests PATCH] configure: arm: Fixes to build and run tests on Apple Silicon

2022-02-20 Thread Nikos Nikoleris

On 17/02/2022 16:10, Andrew Jones wrote:

On Thu, Feb 17, 2022 at 10:28:06AM +, Nikos Nikoleris wrote:

On MacOS:

$> uname -m

returns:

arm64

To unify how we handle the achitecture detection across different
systems, sed it to aarch64 which is what's typically reported on


Was "sed" a typo or a new verb for "sedding" stuff :-)


A much needed amendment to English  :)




Linux.

In addition, when HVF is the acceleration method on aarch64, make sure
we select the right processor when invoking qemu.

Signed-off-by: Nikos Nikoleris 
---
  arm/run   | 3 +++
  configure | 2 +-
  2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/arm/run b/arm/run
index 2153bd3..0629b69 100755
--- a/arm/run
+++ b/arm/run
@@ -27,6 +27,9 @@ if [ "$ACCEL" = "kvm" ]; then
if $qemu $M,\? 2>&1 | grep gic-version > /dev/null; then
M+=',gic-version=host'
fi
+fi
+
+if [ "$ACCEL" = "kvm" ] || [ "$ACCEL" = "hvf" ]; then
if [ "$HOST" = "aarch64" ] || [ "$HOST" = "arm" ]; then
processor="host"
if [ "$ARCH" = "arm" ] && [ "$HOST" = "aarch64" ]; then
diff --git a/configure b/configure
index 2d9c3e0..ff840c1 100755
--- a/configure
+++ b/configure
@@ -14,7 +14,7 @@ objcopy=objcopy
  objdump=objdump
  ar=ar
  addr2line=addr2line
-arch=$(uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/')
+arch=$(uname -m | sed -e 
's/i.86/i386/;s/arm64/aarch64/;s/arm.*/arm/;s/ppc64.*/ppc64/')
  host=$arch
  cross_prefix=
  endian=""
--
2.32.0 (Apple Git-132)



So, with this, we've got kvm-unit-tests running on HVF now?
 


Just a step to get everything up and running. Not all tests pass, but I 
haven't had the time to understand what's supported with HVF and what's not:


PASS selftest-setup (2 tests)
FAIL selftest-vectors-kernel (timeout; duration=90s)
PASS selftest-vectors-user (2 tests)
PASS selftest-smp (1 tests)
SKIP pci-test (KVM is needed, but not available on this host)
SKIP pmu-cycle-counter (0 tests)
SKIP pmu-event-introspection (0 tests)
SKIP pmu-event-counter-config (0 tests)
SKIP pmu-basic-event-count (0 tests)
SKIP pmu-mem-access (0 tests)
SKIP pmu-sw-incr (0 tests)
SKIP pmu-chained-counters (0 tests)
SKIP pmu-chained-sw-incr (0 tests)
SKIP pmu-chain-promotion (0 tests)
SKIP pmu-overflow-interrupt (0 tests)
PASS gicv2-ipi (3 tests)
PASS gicv2-mmio (17 tests, 1 skipped)
FAIL gicv2-mmio-up (17 tests, 2 unexpected failures)
FAIL gicv2-mmio-3p (17 tests, 3 unexpected failures)
FAIL gicv3-ipi
PASS gicv2-active (1 tests)
FAIL gicv3-active
PASS its-introspection (5 tests)
FAIL its-trigger
SKIP its-migration
SKIP its-pending-migration
SKIP its-migrate-unmapped-collection
PASS psci (4 tests)
FAIL timer (10 tests, 1 unexpected failures)
SKIP micro-bench (test marked as manual run only)
PASS cache (1 tests)
PASS debug-bp (6 tests)
SKIP debug-bp-migration
PASS debug-wp (8 tests)
SKIP debug-wp-migration
PASS debug-sstep (1 tests)
SKIP debug-sstep-migration


Applied to arm/queue

https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue



Thanks for the review!

Nikos


Thanks,
drew


___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm


Re: [kvm-unit-tests PATCH] configure: arm: Fixes to build and run tests on Apple Silicon

2022-02-17 Thread Andrew Jones
On Thu, Feb 17, 2022 at 10:28:06AM +, Nikos Nikoleris wrote:
> On MacOS:
> 
> $> uname -m
> 
> returns:
> 
> arm64
> 
> To unify how we handle the achitecture detection across different
> systems, sed it to aarch64 which is what's typically reported on

Was "sed" a typo or a new verb for "sedding" stuff :-)

> Linux.
> 
> In addition, when HVF is the acceleration method on aarch64, make sure
> we select the right processor when invoking qemu.
> 
> Signed-off-by: Nikos Nikoleris 
> ---
>  arm/run   | 3 +++
>  configure | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arm/run b/arm/run
> index 2153bd3..0629b69 100755
> --- a/arm/run
> +++ b/arm/run
> @@ -27,6 +27,9 @@ if [ "$ACCEL" = "kvm" ]; then
>   if $qemu $M,\? 2>&1 | grep gic-version > /dev/null; then
>   M+=',gic-version=host'
>   fi
> +fi
> +
> +if [ "$ACCEL" = "kvm" ] || [ "$ACCEL" = "hvf" ]; then
>   if [ "$HOST" = "aarch64" ] || [ "$HOST" = "arm" ]; then
>   processor="host"
>   if [ "$ARCH" = "arm" ] && [ "$HOST" = "aarch64" ]; then
> diff --git a/configure b/configure
> index 2d9c3e0..ff840c1 100755
> --- a/configure
> +++ b/configure
> @@ -14,7 +14,7 @@ objcopy=objcopy
>  objdump=objdump
>  ar=ar
>  addr2line=addr2line
> -arch=$(uname -m | sed -e 's/i.86/i386/;s/arm.*/arm/;s/ppc64.*/ppc64/')
> +arch=$(uname -m | sed -e 
> 's/i.86/i386/;s/arm64/aarch64/;s/arm.*/arm/;s/ppc64.*/ppc64/')
>  host=$arch
>  cross_prefix=
>  endian=""
> -- 
> 2.32.0 (Apple Git-132)
>

So, with this, we've got kvm-unit-tests running on HVF now?

Applied to arm/queue

https://gitlab.com/rhdrjones/kvm-unit-tests/-/commits/arm/queue

Thanks,
drew

___
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm