[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hyperviso
From: |
Luqman |
Subject: |
[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor |
Date: |
Sat, 19 Dec 2020 02:39:33 -0000 |
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-kvm \
-nodefaults \
-no-user-config \
-M q35,accel=kvm,kernel_irqchip=on,mem-merge=off \
-m 8192 -mem-prealloc -no-hpet \
-cpu
host,kvm=off,l3-cache=on,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
-smp 8,sockets=1,cores=4,threads=2 \
-global kvm-pit.lost_tick_policy=discard \
-rtc base=localtime \
-boot order=c \
-usb \
-device pcie-root-port,bus=pcie.0,id=root_port1,chassis=0,slot=0 \
-device
vfio-pci,host=01:00.0,id=hostdev1,bus=root_port1,addr=0x00,multifunction=on \
-device vfio-pci,host=01:00.1,id=hostdev2,bus=root_port1,addr=0x00.1 \
-drive if=pflash,format=raw,readonly,file=OVMF_CODE.fd \
-drive if=pflash,format=raw,file=OVMF_VARS.fd \
-drive if=none,id=drivec,file=disk.img,format=qcow2,cache=none,aio=threads \
-object iothread,id=iothread1 \
-device virtio-blk-pci,drive=drivec,scsi=off,iothread=iothread1 \
-monitor unix:/tmp/monitor.sock,server,nowait \
-device virtio-mouse-pci,id=input0 \
-device virtio-keyboard-pci,id=input1 \
-object
input-linux,id=kbd1,evdev=/dev/input/by-id/xxxxxxx,grab_all=yes,repeat=on \
-object input-linux,id=mouse1,evdev=/dev/input/by-id/xxxxxx \
-netdev tap,ifname=vnet,id=net0,script=no,downscript=no \
-device e1000,netdev=net0
--
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 QEMU:
New
Bug description:
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 Qemu 2.11-4.1 which work fine).
The -cpu arg I'm passing is simply:
-cpu host,l3-cache=on,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time
Using that Windows won't boot because the nested hypervisor (Hyper-V)
is unable to be initialize and so it just boot loops. Using the exact
same qemu command works fine with 4.1 and lower.
Switching to a named CPU model like Skylake-Client-noTSX-IBRS instead
of host lets the VM boot but causes some weird behaviour later trying
to use nested VMs.
If I had to guess I think it would probably be related to this change
https://github.com/qemu/qemu/commit/20a78b02d31534ae478779c2f2816c273601e869
which would line up with 4.2 being the first bad version but unsure.
For now I just have to keep an older build of QEMU to work around
this. Let me know if there's anything else needed. I can also try out
any patches. I already have at least a dozen copies of qemu lying
around now.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1908489/+subscriptions
- [Bug 1908489] [NEW] qemu 4.2 bootloops with -cpu host and nested hypervisor, Luqman, 2020/12/17
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor, Luqman, 2020/12/17
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor, Luqman, 2020/12/17
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor,
Luqman <=
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor, Luqman, 2020/12/20
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor, Luqman, 2020/12/20
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor, Luqman, 2020/12/20
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor, Luqman, 2020/12/20
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor, Paolo Bonzini, 2020/12/20
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor, Luqman, 2020/12/20
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor, Paolo Bonzini, 2020/12/20
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor, Luqman, 2020/12/20
- [Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor, Amdnative, 2020/12/23