Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1687886 - "kvm run failed Function not implemented" on incoming migration with hugepages
Summary: "kvm run failed Function not implemented" on incoming migration with hugepages
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: qemu-kvm
Version: 8.0
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Wei Huang
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1677408
TreeView+ depends on / blocked
 
Reported: 2019-03-12 14:53 UTC by Lukas Doktor
Modified: 2019-03-14 17:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)
Test logs including serial console, job log and host dmesg (deleted)
2019-03-12 14:53 UTC, Lukas Doktor
no flags Details

Description Lukas Doktor 2019-03-12 14:53:23 UTC
Created attachment 1543221 [details]
Test logs including serial console, job log and host dmesg

Description of problem:
Today I got "error: kvm run failed Function not implemented" followed by registers when migrating over TCP on single host using 512MB hugepages.

Version-Release number of selected component (if applicable):
host: kernel-4.18.0-78.el8.aarch64
host: qemu-kvm-2.12.0-63.module+el8+2833+c7d6d092.aarch64
guest: RHEL-8.0-20181113.1-aarch64-dvd1.iso

How reproducible:
1/3

Steps to Reproduce:
1. Run source qemu: MALLOC_PERTURB_=1  /usr/libexec/qemu-kvm \
    -S  \
    -name 'avocado-vt-vm1' \
    -drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on \
    -drive file=/var/lib/libvirt/images/avocado/avocado-vt/images/rhel7devel-aarch64_AAVMF_VARS.fd,if=pflash,format=raw,unit=1 \
    -machine virt,gic-version=host  \
    -nodefaults \
    -device virtio-gpu-pci,bus=pcie.0,addr=0x1  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/avocado_3eu56v4n/monitor-qmpmonitor1-20190312-000302-oPxxjHdO,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=qmp_id_catch_monitor,path=/var/tmp/avocado_3eu56v4n/monitor-catch_monitor-20190312-000302-oPxxjHdO,server,nowait \
    -mon chardev=qmp_id_catch_monitor,mode=control  \
    -serial unix:'/var/tmp/avocado_3eu56v4n/serial-serial0-20190312-000302-oPxxjHdO',server,nowait \
    -device pcie-root-port,id=pcie.0-root-port-2,slot=2,chassis=2,addr=0x2,bus=pcie.0 \
    -device qemu-xhci,id=usb1,bus=pcie.0-root-port-2,addr=0x0 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie.0,addr=0x3 \
    -drive id=drive_image1,if=none,format=qcow2,file=/var/lib/libvirt/images/avocado/avocado-vt/images/rhel7devel-aarch64.qcow2 \
    -device scsi-hd,id=image1,drive=drive_image1 \
    -device pcie-root-port,id=pcie.0-root-port-4,slot=4,chassis=4,addr=0x4,bus=pcie.0 \
    -device virtio-net-pci,mac=9a:ff:00:01:02:03,rombar=0,id=idII4raC,vectors=4,netdev=id2hVHZB,bus=pcie.0-root-port-4,addr=0x0  \
    -netdev tap,id=id2hVHZB,fd=15 \
    -m 4096  \
    -smp 2,maxcpus=2,cores=1,threads=1,sockets=2  \
    -cpu 'host' \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :0  \
    -rtc base=utc,clock=host  \
    -mem-path /mnt/kvm_hugepage \
    -enable-kvm \
    -device pcie-root-port,id=pcie_extra_root_port_0,slot=5,chassis=5,addr=0x5,bus=pcie.0 \
    -device pcie-root-port,id=pcie_extra_root_port_1,slot=6,chassis=6,addr=0x6,bus=pcie.0
2. Wait for it to boot (ssh to it)
3. Run destination VM with: MALLOC_PERTURB_=1  /usr/libexec/qemu-kvm \
    -S  \
    -name 'avocado-vt-vm1' \
    -drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on \
    -drive file=/var/lib/libvirt/images/avocado/avocado-vt/images/rhel7devel-aarch64_AAVMF_VARS.fd,if=pflash,format=raw,unit=1 \
    -machine virt,gic-version=host  \
    -nodefaults \
    -device virtio-gpu-pci,bus=pcie.0,addr=0x1  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/avocado_3eu56v4n/monitor-qmpmonitor1-20190312-000416-pkDY5mJ7,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=qmp_id_catch_monitor,path=/var/tmp/avocado_3eu56v4n/monitor-catch_monitor-20190312-000416-pkDY5mJ7,server,nowait \
    -mon chardev=qmp_id_catch_monitor,mode=control  \
    -serial unix:'/var/tmp/avocado_3eu56v4n/serial-serial0-20190312-000416-pkDY5mJ7',server,nowait \
    -device pcie-root-port,id=pcie.0-root-port-2,slot=2,chassis=2,addr=0x2,bus=pcie.0 \
    -device qemu-xhci,id=usb1,bus=pcie.0-root-port-2,addr=0x0 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie.0,addr=0x3 \
    -drive id=drive_image1,if=none,format=qcow2,file=/var/lib/libvirt/images/avocado/avocado-vt/images/rhel7devel-aarch64.qcow2 \
    -device scsi-hd,id=image1,drive=drive_image1 \
    -device pcie-root-port,id=pcie.0-root-port-4,slot=4,chassis=4,addr=0x4,bus=pcie.0 \
    -device virtio-net-pci,mac=9a:ff:00:01:02:03,rombar=0,id=idDynWlv,vectors=4,netdev=idyLTpBO,bus=pcie.0-root-port-4,addr=0x0  \
    -netdev tap,id=idyLTpBO,fd=27 \
    -m 4096  \
    -smp 2,maxcpus=2,cores=1,threads=1,sockets=2  \
    -cpu 'host' \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :1  \
    -rtc base=utc,clock=host  \
    -mem-path /mnt/kvm_hugepage \
    -enable-kvm \
    -device pcie-root-port,id=pcie_extra_root_port_0,slot=5,chassis=5,addr=0x5,bus=pcie.0 \
    -device pcie-root-port,id=pcie_extra_root_port_1,slot=6,chassis=6,addr=0x6,bus=pcie.0 \
    -incoming tcp:0:5200
4. get capabilities on QMP monitors: {'execute': 'qmp_capabilities', 'id': 'RgrqJjcM'}
5. query cpus on QMP monitor: {'execute': 'query-cpus', 'id': 'gI5HUE7p'}
6. Start the migration: {'execute': 'migrate', 'arguments': {'uri': 'tcp:localhost:5200', 'blk': False, 'inc': False}, 'id': '4LupqWLq'}

Actual results:
qemu process prints:
error: kvm run failed Function not implemented
PC=000000013ffcf388  SP=000000013c01e9c0
X00=000000000010c387 X01=00000000001e288e X02=00000000005d994d X03=000000013ffbe000
X04=0000000000000010 X05=0000000000000211 X06=0000000000000015 X07=0000000000ffffff
X08=00000000005d994d X09=0000000000000003 X10=000000013c01eae0 X11=0000000000000800
X12=000000000000002e X13=000000000000d3a8 X14=0000000000137888 X15=0000000000202cd0
X16=0000000000000128 X17=000000013f942000 X18=0000000000000000 X19=000000000067b250
X20=0000000000000021 X21=0000000000ff9ab8 X22=000000000067b250 X23=0000000000000000
X24=0000000000000006 X25=0000000000000003 X26=000000013ffbe96c X27=0000000000000000
X28=000000000067b250 X29=000000013c01e9c0 X30=000000013ffbe644
PSTATE=800003c5 N--- EL1h

Expected results:
Migration should proceed

Additional info:
This was executed as Avocado-vt test, should be reproducible by running "avocado run io-github-autotest-qemu.migrate.with_reboot.tcp"

Comment 1 Andrew Jones 2019-03-14 17:16:57 UTC
This mail thread may be discussing a related issue

https://lkml.org/lkml/2019/3/11/691


Note You need to log in before you can comment on or make changes to this bug.