id = 1031 title = "Intel 12th Gen CPU not working with QEMU Hyper-V nested virtualization" state = "opened" created_at = "2022-05-19T13:42:11.330Z" closed_at = "n/a" labels = ["accel: WHPX", "target: i386"] url = "https://gitlab.com/qemu-project/qemu/-/issues/1031" host-os = "Manjaro" host-arch = "x86_64" qemu-version = "QEMU emulator version 7.0.0" guest-os = "Windows 10" guest-arch = "x86_64" description = """When booting with Hyper-V + host-passthrough it gets stuck at tianocore, does not change until I reboot which then loops into windows diagnostics which leads nowhere. Done using Windows 10, tried using newest windows version and 1909. Specs: Manjaro Gnome 5.15 LTS, i5-12600k, z690 gigabyte aorus elite ddr4, rtx 3070ti. I’ve spent days trying to figure out what was messing with it and it turned out I could boot when messing with my CPU topology, for some reason my 12th gen + Hyper-V + host-passthrough only works with sockets. Cores and threads above 1 causes boot problems, apart from disabling vme which boots, but the hypervisor does not load. This fails (normal host-passthrough): ``` ``` This boots (-can only change sockets): ``` ``` This boots (-no hypervisor): ``` ``` No matter what adjustment I do I cannot change the cores or threads or it will result in a boot failure, host-model just does not work once I boot the machine the host model changes to cooperlake. My current way of bypassing this is I’ve downloaded the QEMU source code, gone through cpu.c and modified the default skylake-client CPU model to match my CPU, then I added in most of my i5-12600k flags manually, this seems to work with a 35-45% performance drop in CPU and in ram. Without Hyper-V enabled and using the normal host-passthrough I get near bare metal performance. Tried with multiple versions of QEMU, EDK2, and loads of kernel versions (to add to this my i5-12600k gen does not work on kernel version 5.13 and below) even went ahead to try Ubuntu and had the same problem, my other (i7-9700k) PC works fine with Hyper-V. Also disabled my E-cores through bios resulting in the same issue. CPU pinning the P-cores to the guest does not seem to help.""" reproduce = """1. Enable hyper-v in windows features 2. Restart guest 3. Boot failure""" additional = """Hyper-V host-passthrough XML: https://pst.klgrth.io/paste/yc5wk"""