[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor

2020-12-20 Thread Luqman
Oh, and I guess I misinterpreted what -mpx was for. To be clear, I was running into 2 issues: 1. Hyper-V fails to initialize. "Fixed" by one of: a) using named cpu model b) cpu=host and running `bcdedit /set xsavedisable 1` in Windows before enabling Hyper-V c) cpu=host,-mpx

[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor

2020-12-20 Thread Luqman
I haven't tried 5.9, just: - 5.4.0-58 Works - 5.8.0-33 (20.04 HWE Edge)Bootloop - 5.10.1-051001Works If I have time later I can try narrowing down which kernel causes the issue. But is the BNDCFGS MSR issue considered a bug in qemu or what? -- You receive

[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor

2020-12-20 Thread Luqman
Adding -mpx doesn't seem to help on 5.8, the guest still bootloops. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1908489 Title: qemu 4.2 bootloops with -cpu host and nested hypervisor Status in Q

[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor

2020-12-20 Thread Luqman
Aha! The final boot loop issue is resolved if I either upgrade to 5.10 or downgrade to 5.4 from 5.8. So the main issue then seems to be the missing control bits. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.

[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor

2020-12-20 Thread Luqman
** Bug watch added: bugs.centos.org/ #17788 https://bugs.centos.org/view.php?id=17788 ** Also affects: qemu-kvm (CentOS) via https://bugs.centos.org/view.php?id=17788 Importance: Unknown Status: Unknown -- You received this bug notification because you are a member of qemu- devel

[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor

2020-12-20 Thread Luqman
Ok, so I narrowed done one possible issue: the BNDCFGS bits in the vm entry/exit control MSRs are not set but HyperV expects them to be set if xsave is supported. This quick patch actually lets Hyper-V initialize and continue booting: https://gist.github.com/552baa8be026e67bef2d223076b81636 An alt

[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor

2020-12-18 Thread Luqman
Ok, after bisect between stable-4.1 and stable-4.2 I did confirm that https://github.com/qemu/qemu/commit/20a78b02d31534ae478779c2f2816c273601e869 is the first bad commit. The full qemu command line is: qemu-system-x86_64 \ -name guest=test,debug-threads=on \ -serial none \ -enable-kv

[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor

2020-12-17 Thread Luqman
** Attachment added: "cpuinfo.txt" https://bugs.launchpad.net/qemu/+bug/1908489/+attachment/556/+files/cpuinfo.txt -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1908489 Title: qemu 4.2 boot

[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor

2020-12-17 Thread Luqman
** Attachment added: "vmxcap" https://bugs.launchpad.net/qemu/+bug/1908489/+attachment/555/+files/vmxcap.txt -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1908489 Title: qemu 4.2 bootloops

[Bug 1908489] [NEW] qemu 4.2 bootloops with -cpu host and nested hypervisor

2020-12-16 Thread Luqman
Public bug reported: I've noticed that after upgrading from Ubuntu 18.04 to 20.04 that nested virtualization isn't working anymore. I have a simple repro where I create a Windows 10 2004 guest and enable Hyper-V in it. This worked fine in 18.04 and specifically qemu <4.2 (I specifically tested Qe