]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
qemu: do not pass -cpu max,pcid=off unless it's for x86_64
authorLuca Boccassi <luca.boccassi@gmail.com>
Fri, 4 Jul 2025 18:48:13 +0000 (19:48 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 12 Jul 2025 09:25:32 +0000 (10:25 +0100)
qemu-system-aarch64: can't apply global max-arm-cpu.pcid=off: Property 'max-arm-cpu.pcid' not found

tests/__init__.py

index acc653f76be3812002984206a705b32e09b3c563..3d7b3eb4c7898fadf23b7df2d1e9ca77e442702d 100644 (file)
@@ -135,13 +135,15 @@ class Image:
         return result
 
     def vm(self, options: Sequence[str] = (), args: Sequence[str] = ()) -> CompletedProcess:
+        need_hyperv_workaround = os.uname().machine == "x86_64"
+
         result = self.mkosi(
             "vm",
             [
                 "--runtime-build-sources=no",
                 "--vsock=yes",
                 # TODO: Drop once both Hyper-V bugs are fixed in Github Actions.
-                "--qemu-args=-cpu max,pcid=off",
+                *(["--qemu-args=-cpu max,pcid=off"] if need_hyperv_workaround else []),
                 "--ram=2G",
                 "--ephemeral=yes",
                 "--register=no",