Don't launch extra cores in QEMU to save resource (#2867)

This commit is contained in:
Huang Qi 2023-12-06 09:46:50 +08:00 committed by GitHub
parent 53c3fa27d4
commit 47993ec72d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1111,13 +1111,13 @@ def run_wasm_with_repl(wasm_tempfile, aot_tempfile, opts, r):
cmd = "qemu-system-aarch64 -cpu cortex-a53 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel".split()
cmd.append(opts.qemu_firmware)
elif opts.target.startswith("thumbv7"):
cmd = "qemu-system-arm -semihosting -M sabrelite -m 1024 -smp 4 -nographic -kernel".split()
cmd = "qemu-system-arm -semihosting -M sabrelite -m 1024 -smp 1 -nographic -kernel".split()
cmd.append(opts.qemu_firmware)
elif opts.target.startswith("riscv32"):
cmd = "qemu-system-riscv32 -semihosting -M virt,aclint=on -cpu rv32 -smp 8 -nographic -bios none -kernel".split()
cmd = "qemu-system-riscv32 -semihosting -M virt,aclint=on -cpu rv32 -smp 1 -nographic -bios none -kernel".split()
cmd.append(opts.qemu_firmware)
elif opts.target.startswith("riscv64"):
cmd = "qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp 8 -nographic -bios none -kernel".split()
cmd = "qemu-system-riscv64 -semihosting -M virt,aclint=on -cpu rv64 -smp 1 -nographic -bios none -kernel".split()
cmd.append(opts.qemu_firmware)
else:
raise Exception("Unknwon target for QEMU: %s" % opts.target)