Skip kernel-irqchip=off when installing with --install-from-img

Move the setting from qemu/windows11-darwin-arm64.ini to a -machine option
that run-windows11.py adds on macOS arm64 unless --install-from-img is given.
The workaround is only needed for usb-storage, which the NVMe install disk
does not use, and Setup hangs with the emulated interrupt controller.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GuofangandClaude Sonnet 5.5 committed 2026-10-29 13:33:06 +08:00
1 parent 887da87340
commit 07a2c6db3e
3 files changed
+11 -6

No files matched your search

+2 -5
View File
@@ -7,13 +7,10 @@
[accel] [accel]
accel = "tcg" accel = "tcg"
# With the HVF in-kernel GICv3, QEMU's usb-storage races on the status packet # run-windows11.py adds kernel-irqchip=off unless installing with
# and Windows Setup stalls 10 s after every burst of reads (utmapp/UTM#7970), # --install-from-img (see there).
# so use the emulated interrupt controller; upstream QEMU only gets the fix
# from the UTM fork.
[machine] [machine]
type = "virt" type = "virt"
kernel-irqchip = "off"
# The "virt" machine has no IDE. NVMe and USB mass storage (used by the # The "virt" machine has no IDE. NVMe and USB mass storage (used by the
# installation media of --install-from-iso) both have inbox Windows drivers. # installation media of --install-from-iso) both have inbox Windows drivers.
+8
View File
@@ -461,6 +461,14 @@ qemu_args += [
"-display", display_backend, "-display", display_backend,
# "-display", "none", "-spice", "port=5900,addr=127.0.0.1,disable-ticketing=on,agent-mouse=off", "-device", "virtio-vga", # "-display", "none", "-spice", "port=5900,addr=127.0.0.1,disable-ticketing=on,agent-mouse=off", "-device", "virtio-vga",
] ]
if host_os == "darwin" and host_arch == "arm64" and not install_from_img:
# With the HVF in-kernel GICv3, QEMU's usb-storage races on the status
# packet and Windows Setup stalls 10 s after every burst of reads
# (utmapp/UTM#7970), so use the emulated interrupt controller; upstream
# QEMU only gets the fix from the UTM fork. The NVMe install disk of
# --install-from-img does not use usb-storage, and hangs with the emulated
# controller.
qemu_args += ["-machine", "kernel-irqchip=off"]
if installing_from_iso: if installing_from_iso:
# q35 has IDE for the installation media; "virt" does not, so use USB. # q35 has IDE for the installation media; "virt" does not, so use USB.
for media_id, media_file, boot_index, ide_bus in ( for media_id, media_file, boot_index, ide_bus in (
+1 -1
View File
@@ -6,7 +6,7 @@
## 结论 ## 结论
- **根因(第五节)**:HVF 的内核态 GICv3 与 QEMU 的 `usb-storage` 有竞态,Windows Setup 每读一批数据就卡约 10 秒。 - **根因(第五节)**:HVF 的内核态 GICv3 与 QEMU 的 `usb-storage` 有竞态,Windows Setup 每读一批数据就卡约 10 秒。
在 `[machine]` 里加 `kernel-irqchip = "off"`(已写入 `qemu/windows11-darwin-arm64.ini`)后, 由 `run-windows11.py` 加 `-machine kernel-irqchip=off`(`--install-from-img` 时不加)后,
**同样走 USB 光驱的 `--install-from-iso` 也变快了**,和 UTM 的速度一致。 **同样走 USB 光驱的 `--install-from-iso` 也变快了**,和 UTM 的速度一致。
- 下面第一到五节是更早的分析:当时把慢归因于"模拟 USB 光驱吞吐低"(平均约 4 MB/s), - 下面第一到五节是更早的分析:当时把慢归因于"模拟 USB 光驱吞吐低"(平均约 4 MB/s),
这个归因不准确,真实原因是上面的 10 秒停顿;那时测到的低吞吐就是停顿拉低的平均值。 这个归因不准确,真实原因是上面的 10 秒停顿;那时测到的低吞吐就是停顿拉低的平均值。