Hide Forgot
Description of problem: Hugetlbfs is not supported for s390x KVM guests in 7.6-alt - and doesn't work. However, it will not bail out, instead the guest will try to start and eventually fail/crash when running. This is problematic: E.g. starting a KVM guest with hugetlbfs under RHEL 8 (which works and is supported) and migrating it to 7.6-alt will not properly fail during migration and not fallback to the source side. Instead, the guest will crash after migration, essentially resulting in data loss. How reproducible: 100% Steps to Reproduce: 1. Try to start a guest with hugetlbfs backing Actual results: Guest will fail to run without a proper error message. Expected results: QEMU will properly bail out, saying that hugetlbfs is not supported before actually trying to start the guest.
Reproduced the bug on the following builds kernel-4.14.0-115.el7a.s390x qemu-kvm-ma-2.12.0-18.el7.s390x Steps, *Enabled Huge page on host beforehand 1.mount -t hugetlbfs none /mnt/kvm_hugepage 2.echo 1024 > /proc/sys/vm/nr_hugepages 3.boot up a guest with huge page /usr/libexec/qemu-kvm -name avocado-vt-vm1 -sandbox off -machine s390-ccw-virtio -nodefaults -vga none -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/1,server,nowait -mon chardev=qmp_id_qmpmonitor1,mode=control -chardev socket,id=qmp_id_catch_monitor,path=/tmp/2,server,nowait -mon chardev=qmp_id_catch_monitor,mode=control -chardev socket,id=serial_id_serial0,path=/tmp/3,server,nowait -device sclpconsole,chardev=serial_id_serial0 -device virtio-scsi-ccw,id=virtio_scsi_ccw0 -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=qcow2,file=rhel76-s390x-virtio-scsi.qcow2 -device scsi-hd,id=image1,drive=drive_image1 -m 1024 -mem-path /mnt/kvm_hugepage -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 -cpu host -nographic -rtc base=utc,clock=host,driftfix=slew -boot strict=on -no-shutdown -enable-kvm -monitor stdio Actual results, (qemu) qemu-kvm: warning: CMM will not be enabled because it is not compatible with hugetlbfs. error: kvm run failed Bad address PSW=mask 0000000180000000 addr 000000003fe006e0 cc 00 R00=0000000000000000 R01=0000000000000000 R02=0000000000000000 R03=0000000000000000 R04=0000000000000000 R05=0000000000000000 R06=0000000000000000 R07=0000000000000000 R08=0000000000000000 R09=0000000000000000 R10=0000000000000000 R11=0000000000000000 R12=0000000000000000 R13=0000000000000000 R14=0000000000000000 R15=0000000000000000 F00=0000000000000000 F01=0000000000000000 F02=0000000000000000 F03=0000000000000000 F04=0000000000000000 F05=0000000000000000 F06=0000000000000000 F07=0000000000000000 F08=0000000000000000 F09=0000000000000000 F10=0000000000000000 F11=0000000000000000 F12=0000000000000000 F13=0000000000000000 F14=0000000000000000 F15=0000000000000000 V00=00000000000000000000000000000000 V01=00000000000000000000000000000000 V02=00000000000000000000000000000000 V03=00000000000000000000000000000000 V04=00000000000000000000000000000000 V05=00000000000000000000000000000000 V06=00000000000000000000000000000000 V07=00000000000000000000000000000000 V08=00000000000000000000000000000000 V09=00000000000000000000000000000000 V10=00000000000000000000000000000000 V11=00000000000000000000000000000000 V12=00000000000000000000000000000000 V13=00000000000000000000000000000000 V14=00000000000000000000000000000000 V15=00000000000000000000000000000000 V16=00000000000000000000000000000000 V17=00000000000000000000000000000000 V18=00000000000000000000000000000000 V19=00000000000000000000000000000000 V20=00000000000000000000000000000000 V21=00000000000000000000000000000000 V22=00000000000000000000000000000000 V23=00000000000000000000000000000000 V24=00000000000000000000000000000000 V25=00000000000000000000000000000000 V26=00000000000000000000000000000000 V27=00000000000000000000000000000000 V28=00000000000000000000000000000000 V29=00000000000000000000000000000000 V30=00000000000000000000000000000000 V31=00000000000000000000000000000000 C00=00000000000000e0 C01=0000000000000000 C02=0000000000000000 C03=0000000000000000 C04=0000000000000000 C05=0000000000000000 C06=0000000000000000 C07=0000000000000000 C08=0000000000000000 C09=0000000000000000 C10=0000000000000000 C11=0000000000000000 C12=0000000000000000 C13=0000000000000000 C14=00000000c2000000 C15=0000000000000000 Expected results, QEMU will properly bail out, saying that hugetlbfs is not supported before actually trying to start the guest.