已开启
[openEuler 24.09]创建虚拟机启动报错Failed to put registers after init: Invalid argument #214
maxmadmax创建于  2025年4月7日
maxmadmax
maxmadmax
2025年4月7日 创建

【缺陷描述】:请补充详细的缺陷问题现象描述

一、缺陷信息

【缺陷所属的os版本】(如openEuler-22.03-LTS,参考命令"cat /etc/os-release"结果)
NAME="openEuler"
VERSION="24.09"
ID="openEuler"
VERSION_ID="24.09"
PRETTY_NAME="openEuler 24.09"
ANSI_COLOR="0;31"
【内核版本】(如kernel-5.10.0-60.138.0.165,参考命令"uname -r"结果)
6.6.0-10.0.0.10.oe2409.aarch64
【缺陷所属软件及版本号】(如kernel-5.10.0-60.138.0.165,参考命令"rpm -q 包名"结果)
qemu-8.2.0-17.oe2409.aarch64
【环境信息】
硬件信息
Architecture: aarch64
CPU op-mode(s): 64-bit
Byte Order: Little Endian
CPU(s): 128
On-line CPU(s) list: 0-127
Vendor ID: HiSilicon
BIOS Vendor ID: HiSilicon
Model name: Kunpeng-920
BIOS Model name: Kunpeng 920-6426 To be filled by O.E.M. CPU @ 2.6GHz
BIOS CPU family: 280
Model: 0
Thread(s) per core: 1
Core(s) per socket: 64
Socket(s): 2
Stepping: 0x1
BogoMIPS: 200.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm
Caches (sum of all):
L1d: 8 MiB (128 instances)
L1i: 8 MiB (128 instances)
L2: 64 MiB (128 instances)
L3: 128 MiB (4 instances)
NUMA:
NUMA node(s): 4
NUMA node0 CPU(s): 0-31
NUMA node1 CPU(s): 32-63
NUMA node2 CPU(s): 64-95
NUMA node3 CPU(s): 96-127
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Not affected
Spectre v1: Mitigation; __user pointer sanitization
Spectre v2: Not affected
Srbds: Not affected
Tsx async abort: Not affected

【问题复现步骤】:请描述具体的操作步骤
使用如下虚拟机配置:

<domain type='kvm'>
    <name>openEulerVM</name>
    <memory unit='GiB'>8</memory>
    <vcpu>4</vcpu>
    <os>
	<type arch='aarch64' machine='virt'>hvm</type>
	<loader readonly='yes' type='pflash'>/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw</loader>
	<nvram>/var/lib/libvirt/qemu/nvram/openEulerVM.fd</nvram>
    </os>
    <features>
	<acpi/>
	<gic version='3'/>
    </features>
    <cpu mode='host-passthrough'>
        <topology sockets='2' cores='2' threads='1'/>
    </cpu>
    <iothreads>1</iothreads>
    <clock offset='utc'/>
    <on_poweroff>destroy</on_poweroff>
    <on_reboot>restart</on_reboot>
    <on_crash>restart</on_crash>
    <devices>
	<emulator>/usr/libexec/qemu-kvm</emulator>
	<disk type='file' device='disk'>
	    <driver name='qemu' type='qcow2' iothread="1"/>
	    <source file='/mnt/openEuler-image.qcow2'/>
	    <target dev='vda' bus='virtio'/>
	    <boot order='1'/>
	</disk>
	<disk type='file' device='cdrom'>
	    <driver name='qemu' type='raw'/>
	    <source file='/mnt/openEuler-22.03-aarch64-dvd.iso'/>
	    <readonly/>
	    <target dev='sdb' bus='scsi'/>
	    <boot order='2'/>
	</disk>
	<interface type='bridge'>
	    <source bridge='br0'/>
	    <model type='virtio'/>
	</interface>
	<console type='pty'/>
        <video>
           <model type='virtio'/>
        </video>
        <controller type='scsi' index='0' model='virtio-scsi'/>
	<controller type='usb' model='ehci'/>
	<input type='tablet' bus='usb'/>
	<input type='keyboard' bus='usb'/>
	<graphics type='vnc' listen='0.0.0.0' passwd='n8VfjbFK'/>
    </devices>
    <seclabel type='dynamic' model='dac' relabel='yes'/>
</domain>

virsh define vm.xml
virsh start openEulerVM

【实际结果】
拉起虚机报错:qemu-kvm: Failed to put registers after init: Invalid argument
【期望结果】
正常创建虚机
【其他相关附件信息】
qemu日志内容:
2025-04-07 14:52:37.801+0000: Domain id=1 is tainted: high-privileges
char device redirected to /dev/pts/2 (label charserial0)
configure accelerator virt-8.2 start
machine init start
cpu init start
load the kernel
device init start
add qdev pcie-root-port:pci.1 success
add qdev pcie-root-port:pci.2 success
add qdev pcie-root-port:pci.3 success
add qdev pcie-pci-bridge:pci.4 success
add qdev pcie-root-port:pci.5 success
add qdev pcie-root-port:pci.6 success
add qdev pcie-root-port:pci.7 success
add qdev usb-ehci:usb success
add qdev virtio-scsi-pci:scsi0 success
virtio scsi HBA scsi0 begin to initialize.
add qdev virtio-blk-pci:virtio-disk0 success
add qdev scsi-cd:scsi0-0-0-1 success
add qdev virtio-net-pci:net0 success
add rom file: virtio-net-pci.rom
add qdev usb-tablet:input0 success
attach usb device "QEMU USB Tablet" (full+high speed) to VM bus "usb.0", port "1" (high speed)
add qdev usb-kbd:input1 success
attach usb device "QEMU USB Keyboard" (full+high speed) to VM bus "usb.0", port "2" (high speed)
add qdev virtio-gpu-pci:video0 success
2025-04-07T06:52:38.018362Z qemu-kvm: Failed to put registers after init: Invalid argument
2025-04-07 06:52:38.134+0000: shutting down, reason=failed

likedislike
maxmadmaxmaxmadmax
2025年4月7日 创建了缺陷
openeuler-ci-botopeneuler-ci-bot成员
2025年4月7日 添加了 &nbsp; sig/Virt 标签
maxmadmaxmaxmadmax
2025年4月7日 修改了描述