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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
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 <nikos.nikoleris@xxxxxxx>
---
 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)

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



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux