1
0
Fork 0
forked from AbleOS/ableos

additional fix

This commit is contained in:
koniifer 2025-01-31 00:40:42 +00:00
parent 09bf7053b6
commit 5d90ae9e4d

View file

@ -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",
]);
}