From: Matteo Croce Date: Thu, 12 Dec 2024 16:47:44 +0000 (+0100) Subject: Use host model cpu X-Git-Tag: v25~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6be07a7507f5fc66ac73ac99ece42100283dc6f;p=thirdparty%2Fmkosi.git Use host model cpu mkosi currently calls qemu with `-cpu max`. This enables all features supported by the accelerator, which could be less than the ones supported by the host. Switch to the default `-cpu host` and keep max only when using binary translation. --- diff --git a/mkosi/qemu.py b/mkosi/qemu.py index 4b5889a1a..aef731099 100644 --- a/mkosi/qemu.py +++ b/mkosi/qemu.py @@ -1093,6 +1093,7 @@ def run_qemu(args: Args, config: Config) -> None: accel += ",device=/dev/fdset/1" else: accel = "tcg" + cmdline += ["-cpu", "max"] cmdline += ["-accel", accel] @@ -1115,8 +1116,6 @@ def run_qemu(args: Args, config: Config) -> None: index = list(qemu_device_fds.keys()).index(QemuDeviceNode.vhost_vsock) cmdline += ["-device", f"vhost-vsock-pci,guest-cid={cid},vhostfd={SD_LISTEN_FDS_START + index}"] - cmdline += ["-cpu", "max"] - if config.qemu_gui: if config.architecture.is_arm_variant(): cmdline += ["-device", "virtio-gpu-pci"]