1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
ppc: 0.654
device: 0.651
performance: 0.647
files: 0.617
architecture: 0.587
boot: 0.586
vnc: 0.581
graphic: 0.538
PID: 0.519
hypervisor: 0.488
permissions: 0.454
socket: 0.453
register: 0.449
user-level: 0.395
semantic: 0.369
peripherals: 0.315
risc-v: 0.311
kernel: 0.301
mistranslation: 0.299
VMM: 0.256
TCG: 0.232
x86: 0.224
i386: 0.217
debug: 0.210
network: 0.195
virtual: 0.185
arm: 0.165
KVM: 0.130
assembly: 0.122
WHPX accelerator run with edk2 EFI fails to process the reboot signal from guest OS
Description of problem:
Qemu freezes any time WHPX-accelerated guest Windows 11 sends a reboot signal to Qemu while running on edk2 EFI. At rare cases, Qemu errors out with `qemu: WHPX: Unexpected VP exit code 4`
Steps to reproduce:
1. Grab Windows 11 23H2 ISO from https://www.microsoft.com/en-Us/software-download/windows11 using either Media Creation Tool or directly and save it under C:\\windows11_23H2.iso
2. Download QEMU 9.0 from https://qemu.weilnetz.de/w64/qemu-w64-setup-20240423.exe and install it into C:\\Program Files\\qemu
3. Make one merged EFI file from two ones bundled in QEMU 9.0 (merged EFI is the only working option for edk2 EFI on windows host): `cd /d C:\Program Files\qemu\share`
`copy /B edk2-i386-vars.fd + edk2-x86_64-code.fd edk2-x86_64.fd`
4. Run this command:
`qemu-system-x86_64.exe -accel whpx -bios share\edk2-x86_64.fd -cpu Westmere,aes=on,avx=on,sse4.1=on,sse4.2=on,ssse3=on,x2apic=on,xsave=on -machine q35 -m 4096 -cdrom C:\windows11_23H2.iso`
5. Press any key once you see "Press any key to boot from CD..." and wait until Windows Setup suggests to opt for language and currency.
6. Click red "X" close button inside Windows Setup and confirm your choice when Windows Setup asks you to.
Windows Setup sends a reboot signal to the underlying hardware and Qemu freezes.
Additional information:
If `-bios share\edk2-x86_64.fd` switch is omitted, this command works ok:
`qemu-system-x86_64 -accel whpx -cpu Westmere,aes=on,avx=on,sse4.1=on,sse4.2=on,ssse3=on,x2apic=on,xsave=on -machine q35 -m 4096 -cdrom D:\originalWindows11_23H2.iso`
This bug seems to be closely related to this one: https://gitlab.com/qemu-project/qemu/-/issues/2042 - Not able to reboot Linux guest on Windows host
|