Skip to content

Live migration failed with AMX feature enabled. #5800

@zhangylc

Description

@zhangylc

Describe the bug*
Start vm with cpus feature AMX on,then execute live migration, the migration failed.

To Reproduce
Steps to reproduce the behaviour:

#!/bin/sh
RUST_BACKTRACE=1 ./cloud-hypervisor-static \
    -v -v -v \
    --seccomp false \
    --cpus boot=8,features=amx \
    --log-file /vm_data/zhangyanlin/ch-fw.log \
    --memory size=4G,shared=on \
    --disk path=/vm_data/zyl/openEuler_22.03_x86_64.ch.img.base.1   \
    --kernel   CLOUDHV.fd \
    --serial tty \
    --console off \
    --api-socket /tmp/cloud-hypervisor.sock
sudo ./cloud-hypervisor-static --api-socket /tmp/api2 --seccomp false -v -v -v --log-file ./log
sudo ./ch-remote-static --api-socket /tmp/api2 receive-migration unix:/tmp/sock
sudo ./ch-remote-static --api-socket /tmp/cloud-hypervisor.sock send-migration   unix:/tmp/sock

Version

cloud hypervisor version is 35.0

VM configuration

What command line did you run (or JSON config data):

Guest OS version details:

system version: openEuler release 22.03 LTS
kernel version: 5.10.0-136.49.0.127.oe2203sp1.x86_64

Host OS version details:

5.10

Logs

Output of cloud-hypervisor -v from either standard error or via --log-file:

error log(/vm_data/zhangyanlin/ch-fw.log):

6418 cloud-hypervisor: 232.895121s: <vmm> INFO:vmm/src/memory_manager.rs:2681 -- GPA: 13fdd8000 size: 8 (KiB)
6419 cloud-hypervisor: 232.895133s: <vmm> INFO:vmm/src/memory_manager.rs:2681 -- GPA: 13fdf1000 size: 8 (KiB)
6420 cloud-hypervisor: 232.895145s: <vmm> INFO:vmm/src/memory_manager.rs:2681 -- GPA: 13fe2f000 size: 4 (KiB)
6421 cloud-hypervisor: 232.895157s: <vmm> INFO:vmm/src/memory_manager.rs:2681 -- GPA: 13fe5c000 size: 4 (KiB)
6422 cloud-hypervisor: 232.895169s: <vmm> INFO:vmm/src/memory_manager.rs:2681 -- GPA: 13fe87000 size: 4 (KiB)
6423 cloud-hypervisor: 232.895181s: <vmm> INFO:vmm/src/memory_manager.rs:2681 -- GPA: 13fe9f000 size: 4 (KiB)
6424 cloud-hypervisor: 232.895192s: <vmm> INFO:vmm/src/memory_manager.rs:2681 -- GPA: 13fea6000 size: 4 (KiB)
6425 cloud-hypervisor: 232.895204s: <vmm> INFO:vmm/src/memory_manager.rs:2681 -- GPA: 13ff27000 size: 4 (KiB)
6426 cloud-hypervisor: 232.896967s: <vmm> INFO:vmm/src/lib.rs:1714 -- Dirty memory migration 1 of 5
6427 cloud-hypervisor: 232.898102s: <vmm> INFO:vmm/src/memory_manager.rs:2677 -- Dirty Memory Range Table is empty
6428 cloud-hypervisor: 232.898511s: <vmm> INFO:vmm/src/memory_manager.rs:2677 -- Dirty Memory Range Table is empty
6429 cloud-hypervisor: 232.907046s: <vmm> INFO:virtio-devices/src/device.rs:312 -- Pausing virtio-block
6430 cloud-hypervisor: 232.907084s: <_disk0_q0> INFO:virtio-devices/src/epoll_helper.rs:220 -- PAUSE_EVENT received, pausing epoll loop
6431 cloud-hypervisor: 232.907103s: <vmm> INFO:virtio-devices/src/device.rs:312 -- Pausing virtio-rng
6432 cloud-hypervisor: 232.907126s: <__rng> INFO:virtio-devices/src/epoll_helper.rs:220 -- PAUSE_EVENT received, pausing epoll loop
6433 cloud-hypervisor: 232.908131s: <vmm> INFO:vmm/src/memory_manager.rs:2677 -- Dirty Memory Range Table is empty
6434 cloud-hypervisor: 232.908535s: <vmm> INFO:vmm/src/memory_manager.rs:2677 -- Dirty Memory Range Table is empty
6435 cloud-hypervisor: 232.924840s: <vmm> INFO:arch/src/x86_64/mod.rs:577 -- Generating guest CPUID for with physical address size: 46
6436 cloud-hypervisor: 232.925107s: <vmm> ERROR:vmm/src/lib.rs:1794 -- Migration failed: Pause(Could not get vCPU state GetXsaveState(Invalid argument (os error 22)))
6437 cloud-hypervisor: 232.925171s: <vmm> INFO:virtio-devices/src/device.rs:334 -- Resuming virtio-block
6438 cloud-hypervisor: 232.925187s: <vmm> INFO:virtio-devices/src/device.rs:334 -- Resuming virtio-rng
6439 cloud-hypervisor: 2935.612185s: <serial-manager> DEBUG:devices/src/ioapic.rs:423 -- Interrupt successfully delivered
6440 cloud-hypervisor: 2935.612499s: <vcpu4> DEBUG:devices/src/ioapic.rs:423 -- Interrupt successfully delivered
6441 cloud-hypervisor: 2935.612543s: <vcpu4> DEBUG:devices/src/ioapic.rs:423 -- Interrupt successfully delivered
6442 cloud-hypervisor: 2935.612615s: <vcpu4> DEBUG:devices/src/ioapic.rs:423 -- Interrupt successfully delivered
6443 cloud-hypervisor: 2935.612637s: <vcpu4> DEBUG:devices/src/ioapic.rs:423 -- Interrupt successfully delivered
6444 cloud-hypervisor: 2935.612657s: <vcpu4> DEBUG:devices/src/ioapic.rs:423 -- Interrupt successfully delivered
6445 cloud-hypervisor: 2935.612678s: <vcpu4> DEBUG:devices/src/ioapic.rs:423 -- Interrupt successfully delivered
6446 cloud-hypervisor: 2935.612698s: <vcpu4> DEBUG:devices/src/ioapic.rs:423 -- Interrupt successfully delivered

Linux kernel output:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions