qemu-v8: Use cpu as cortex-a57 for XEN_BOOT

XEN fails to boot linux when cpu is selected as max with following
kernel crash. Hence revert to using cortex-a57 when XEN_BOOT is
selected.

[    0.000000] ------------[ cut here ]------------
[    0.000000] kernel BUG at arch/arm64/kernel/traps.c:498!
[    0.000000] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.16.0-gdbeb6ea978fc #1
[    0.000000] Hardware name: linux,dummy-virt (DT)
[    0.000000] pstate: 000000c5 (nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    0.000000] pc : do_undefinstr+0x2bc/0x2e0
[    0.000000] lr : do_undefinstr+0x2c8/0x2e0
[    0.000000] sp : ffffd399cddc3c60
[    0.000000] x29: ffffd399cddc3c60 x28: ffffd399cddd34c0 x27: 0000000000000000
[    0.000000] x26: 0000000000000000 x25: 0000000000000000 x24: ffffd399cd830008
[    0.000000] x23: 00000000000000c5 x22: ffffd399cd7810bc x21: ffffd399cddc3e30
[    0.000000] x20: 00000000d5182101 x19: ffffd399cddc3ce0 x18: 0000000000000014
[    0.000000] x17: 0000000049426f60 x16: 0000000056a84232 x15: 0000000099ac15ae
[    0.000000] x14: 00000000ab810c49 x13: 501bac190a4c3eb1 x12: 89c8a6a0aab2e7c5
[    0.000000] x11: 00000000c16d9c19 x10: 00000000e4fb46a5 x9 : 00000000d78a73db
[    0.000000] x8 : 0000000000000014 x7 : 501bac190a4c3eb1 x6 : 89c8a6a0aab2e7c5
[    0.000000] x5 : ffffd399cddd5910 x4 : 0000000000000000 x3 : ffffd399ce0e70f8
[    0.000000] x2 : 0000000000000000 x1 : ffffd399cddd34c0 x0 : 00000000000000c5
[    0.000000] Call trace:
[    0.000000]  do_undefinstr+0x2bc/0x2e0
[    0.000000]  el1_undef+0x2c/0x4c
[    0.000000]  el1h_64_sync_handler+0x84/0xd0
[    0.000000]  el1h_64_sync+0x78/0x7c
[    0.000000]  start_kernel+0x4c4/0x664
[    0.000000]  __primary_switched+0xc0/0xc8
[    0.000000] Code: 17ffff8d a9425bf5 17ffffb1 a9025bf5 (d4210000)
[    0.000000] ---[ end trace 32823fcd1957a64b ]---
[    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[    0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Reviewed-by: Jerome Forissier <jerome@forissier.org>
diff --git a/qemu_v8.mk b/qemu_v8.mk
index 4abe868..77b31f4 100644
--- a/qemu_v8.mk
+++ b/qemu_v8.mk
@@ -387,12 +387,14 @@
 
 
 ifeq ($(XEN_BOOT),y)
+QEMU_CPU	?= cortex-a57
 QEMU_MEM 	?= 2048
 QEMU_SMP	?= 4
 QEMU_VIRT	= true
 QEMU_XEN	?= -drive if=none,file=$(XEN_EXT4),format=raw,id=hd1 \
 		   -device virtio-blk-device,drive=hd1
 else
+QEMU_CPU	?= max,sve=off
 QEMU_SMP 	?= 2
 QEMU_MEM 	?= 1057
 QEMU_VIRT	= false
@@ -411,7 +413,7 @@
 		-serial tcp:localhost:54320 -serial tcp:localhost:54321 \
 		-smp $(QEMU_SMP) \
 		-s -S -machine virt,secure=on,gic-version=$(QEMU_GIC_VERSION),virtualization=$(QEMU_VIRT) \
-		-cpu max,sve=off \
+		-cpu $(QEMU_CPU) \
 		-d unimp -semihosting-config enable=on,target=native \
 		-m $(QEMU_MEM) \
 		-bios bl1.bin		\
@@ -439,6 +441,7 @@
 		export QEMU_SMP=$(QEMU_SMP) && \
 		export QEMU_GIC=$(QEMU_GIC_VERSION) && \
 		export QEMU_MEM=$(QEMU_MEM) && \
+		export QEMU_CPU=$(QEMU_CPU) && \
 		export XEN_BOOT=$(XEN_BOOT) && \
 		expect $(ROOT)/build/qemu-check.exp -- $(check-args) || \
 		(if [ "$(DUMP_LOGS_ON_ERROR)" ]; then \