diff --git a/repbuild/src/main.rs b/repbuild/src/main.rs index ba519db..7ae36d7 100644 --- a/repbuild/src/main.rs +++ b/repbuild/src/main.rs @@ -429,6 +429,8 @@ fn run(release: bool, target: Target, do_accel: bool) -> Result<(), Error> { let vmx = cpuid.get_feature_info().unwrap().has_vmx(); let svm = cpuid.get_svm_info().is_some(); + let mut cpu = "max"; + if supported.contains("kvm") && (vmx || svm) { "accel=kvm" } else if cpuid @@ -440,6 +442,7 @@ fn run(release: bool, target: Target, do_accel: bool) -> Result<(), Error> { { "accel=hax" } else if supported.contains("whpx") { + cpu = "Westmere"; "accel=whpx,kernel-irqchip=off" } else { "accel=tcg" @@ -464,7 +467,7 @@ fn run(release: bool, target: Target, do_accel: bool) -> Result<(), Error> { "-parallel", "none", "-monitor", "none", "-machine", accel, - "-cpu", "max", + "-cpu", cpu, "-device", "isa-debug-exit,iobase=0xf4,iosize=0x04", ]); }