macOS HVF broken with WinXP after Aug 21 2018 92d5f1a414

Bug #1844946 reported by Adam Strzelecki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

I use macOS with own built Qemu to run old XP system that I have migrated from physical machine. My setup is very simple qemu-system-x86_64 with args:
-machine pc,accel=hvf,usb=off,vmport=off
-cpu host
-vga std
-m 2048
-drive file="$img",format=qcow2,cache=none,detect-zeroes=on
-usb -device usb-tablet

Unfortunately as soon I enable HVF with first 2 lines WinXP SP3 hangs on boot (famous mup.sys). It works fine in TCG.

I dived into the code checking the differences between HVF, KVM and HAXM and my analysis is:

1. Sergio Andres Gomez Del Real b7394c8394 - replaces explicit VMCS_GUEST_INTERRUPTIBILITY checks with hflags/hflags2.

2. Paolo Bonzini 92d5f1a414 - changes hflags/hflags2 behavior which breaks in the end HVF interrupt handling and makes WinXP unable to boot. NOTE: This does not break I believe KVM and HAXM as they still do explicit check instead what HVF does in 1. That's why it was probably not reported and Qemu macOS users are rather niche ;)

Reverting 92d5f1a414 makes WinXP boot well and work flawlessly.
Unfortunately b7394c8394 is not easy anymore as too many changes on the way, so it may be not an option.

This can be reproduced simply by installing /Users/ono/VM/ISO/en_windows_xp_professional_with_service_pack_3_x86_cd_vl_x14-73974.iso
with HAL as "Standard PC" selectable with F5 on first run.

I can also provide fresh ~600MB qcow2 image (without activation key entered yet) that is created before boot that fails. No need for full XP installation to test that.

Nevertheless I would really appreciate Paolo looking into this.
Many thanks for great software,
Adam

Tags: hvf
tags: added: hvf
Changed in qemu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.