rr icon indicating copy to clipboard operation
rr copied to clipboard

PVE虚拟化RTL8125直通时RR shell/menu.sh下令poweroff无法关机

Open ctl26481 opened this issue 9 months ago • 0 comments

Install ENV: (You can find it in the boot interface.)

  • DMI: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 3.20230228-4 06/06/2023
  • CPU: Intel Core i5-7500
  • NIC: M.2 A+E key转RTL8125BG,不带ROM款式[10ec:8125]

RR version: (You can find it in the update menu.)

  • RR: test 23.10.5 OK/24.2.0 4G OK/24.3.9 OK/24.4.0 OK/24.4.1 OK/24.4.2 NG/24.4.5 NG/24.4.8 NG/24.5.0 NG/24.7.2 NG/24.11.1 NG/25.4.2 NG
  • addons: default/auto
  • modules: default/auto
  • lkms: prod

DSM:

  • model: 仅测试DS3622xs+
  • version: "7.2(72806)"

Issue: PVE虚拟化RTL8125直通时RR shell/menu.sh下令poweroff无法关机

使用M.2 A+E key转RTL8125BG,不带ROM款式连接1Gbps交換機,无法在RR shell环境下达poweroff命令 PVE GUI左侧显示感叹号(internal-error),必须在PVE选择VM后按右上角Stop强制关闭VM 直通Windows 11 VM无关机问题

目前回推RR版本测试24.4.1为最后可在RR shell/menu.sh下达poweroff的版本,24.4.2以上则NG(no-go) 上面RR version那串是已测试过的

若在无法shell/menu.sh下令poweroff的RR版本(RR≥24.4.2,包含最新版25.4.2):

  • 所有环境下正常DHCP
  • 使用modprobe -r r8125移除驱动后可从RR shell下达poweroff指令 (init.sh显示Network devices not found! Please re execute init.sh after connecting to the network!)
  • 在DS3622xs+/7.2/junior(欢迎页面)下可从串口(serial0)下达poweroff指令
  • DS环境可用GUI关机选项,无异常关机log
  • DS环境1Gbps正常传输

若在可从shell/menu.sh下令poweroff的RR版本(RR≤24.4.1):

  • 所有环境下正常DHCP
  • 所有环境下都可以正常poweroff,DS GUI关机选项无异常关机log
  • DS环境1Gbps正常传输

为了方便debug loader,手动在VMID.conf用模拟USB的方式: args: -device 'nec-usb-xhci,id=usb-bus0,multifunction=on' -drive 'file=/XXXXXX/rr.img,media=disk,format=raw,if=none,id=drive-disk-bootloader' -device 'usb-storage,bus=usb-bus0.0,port=1,drive=drive-disk-bootloader,id=usb-disk-bootloader,bootindex=999,removable=on'

VMID.conf

agent: 0 balloon: 0 bios: ovmf boot: cores: 4 cpu: host hostpci0: 0000:05:00,pcie=1 #RTL8125BG/All_Function/ROM-BAR/PCI-E machine: q35 memory: 4096 meta: creation-qemu=9.2.0,ctime=XXXX name: 8125test numa: 0 ostype: l26 scsi0: VM:101/vm-101-disk-0.qcow2,backup=0,discard=on,iothread=1,size=64G,ssd=1 scsihw: virtio-scsi-single serial0: socket smbios1: uuid=XXXX sockets: 1 tablet: 0 vmgenid: XXXX

logs:
PVE syslog(25.4.2 RR shell无法poweroff,PVE显示internal-error时):

May 02 20:12:02 pve QEMU[1563981]: error: kvm run failed Bad address May 02 20:12:02 pve QEMU[1563981]: RAX=ffff93ea405c0000 RBX=ffff8aab0b000000 RCX=0000000000000001 RDX=ffff8aab0b47e12c May 02 20:12:02 pve QEMU[1563981]: RSI=0000000135eb6000 RDI=ffff8aab0b000940 RBP=ffff8aab0b000940 RSP=ffff93ea40293bd0 May 02 20:12:02 pve QEMU[1563981]: R8 =000000000000081d R9 =000000000001c10f R10=00000000000006da R11=0000000000000001 May 02 20:12:02 pve QEMU[1563981]: R12=ffff8aaaf5eb6000 R13=0000000135eb6000 R14=0000000000000000 R15=0000000000000000 May 02 20:12:02 pve QEMU[1563981]: RIP=ffffffffc0408013 RFL=00010202 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 May 02 20:12:02 pve QEMU[1563981]: ES =0000 0000000000000000 ffffffff 00c00000 May 02 20:12:02 pve QEMU[1563981]: CS =0010 0000000000000000 ffffffff 00a09b00 DPL=0 CS64 [-RA] May 02 20:12:02 pve QEMU[1563981]: SS =0018 0000000000000000 ffffffff 00c09300 DPL=0 DS [-WA] May 02 20:12:02 pve QEMU[1563981]: DS =0000 0000000000000000 ffffffff 00c00000 May 02 20:12:02 pve QEMU[1563981]: FS =0000 0000000000000000 ffffffff 00c00000 May 02 20:12:02 pve QEMU[1563981]: GS =0000 ffff8aab3bc00000 ffffffff 00c00000 May 02 20:12:02 pve QEMU[1563981]: LDT=0000 0000000000000000 ffffffff 00c00000 May 02 20:12:02 pve QEMU[1563981]: TR =0040 fffffe7730946000 00004087 00008b00 DPL=0 TSS64-busy May 02 20:12:02 pve QEMU[1563981]: GDT= fffffe7730944000 0000007f May 02 20:12:02 pve QEMU[1563981]: IDT= fffffe0000000000 00000fff May 02 20:12:02 pve QEMU[1563981]: CR0=80050033 CR2=00007f290c2ea8f5 CR3=000000014b1a4005 CR4=00370ef0 May 02 20:12:02 pve QEMU[1563981]: DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 May 02 20:12:02 pve QEMU[1563981]: DR6=00000000fffe0ff0 DR7=0000000000000400 May 02 20:12:02 pve QEMU[1563981]: EFER=0000000000000d01 May 02 20:12:02 pve QEMU[1563981]: Code=90 66 0f 1f 00 48 89 f1 55 48 89 fd 53 48 c1 e9 20 48 8b 07 <89> 48 14 48 8b 07 89 70 10 48 8b 07 83 ce 08 89 70 10 31 db eb 12 bf c6 a7 00 00 83 c3 01

lspci -knn #PVE8.4.1

05:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 05) Subsystem: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] Kernel driver in use: vfio-pci Kernel modules: r8169

dmesg | grep -i 8125 #PVE8.4.1

[ 0.314390] pci 0000:05:00.0: [10ec:8125] type 00 class 0x020000 PCIe Endpoint [ 1.047364] r8169 0000:05:00.0 eth0: RTL8125B, 00:e0:4c:68:06:c2, XID 641, IRQ 130

reset_method

root@pve:~# cat /sys/bus/pci/devices/0000:05:00.0/reset_method #PVE8.4.1 bus

dmesg | grep -i 8125 (RR 24.4.1 OK)

root@rr:/opt/rr# dmesg | grep -i 8125 [ 0.363974] pci 0000:01:00.0: [10ec:8125] type 00 class 0x020000 [ 12.557065] r8125: loading out-of-tree module taints kernel. [ 12.558292] r8125 Ethernet controller driver 9.012.04-NAPI loaded [ 12.579540] r8125: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625. [ 12.581589] r8125 Copyright (C) 2023 Realtek NIC software team [email protected] [ 18.817205] r8125: eth0: link up

dmesg | grep -i 8125 (junior 24.4.1)

SynologyNAS> dmesg | grep -i 8125 [ 0.272016] pci 0000:01:00.0: [10ec:8125] type 00 class 0x020000 [ 5.439981] r8125_v9 2.5Gigabit Ethernet driver 9.009.02-NAPI loaded [ 5.472826] r8125_v9: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625. [ 5.476411] r8125 Copyright (C) 2022 Realtek NIC software team [email protected] [ 28.462229] r8125_v9: eth0: link up

dmesg | grep -i 8125 (RR 24.4.2 NG)

root@rr:/opt/rr# dmesg | grep -i 8125 [ 0.353578] pci 0000:01:00.0: [10ec:8125] type 00 class 0x020000 [ 12.542155] r8125: loading out-of-tree module taints kernel. [ 12.544086] r8125 Ethernet controller driver 9.012.04-NAPI loaded [ 12.571745] r8125: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625. [ 12.573921] r8125 Copyright (C) 2023 Realtek NIC software team [email protected] [ 18.775642] r8125: eth0: link up

dmesg | grep -i 8125 (junior 24.4.2)

SynologyNAS> dmesg | grep -i 8125 [ 0.310002] pci 0000:01:00.0: [10ec:8125] type 00 class 0x020000 [ 5.407419] r8125_v9 2.5Gigabit Ethernet driver 9.009.02-NAPI loaded [ 5.433476] r8125_v9: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625. [ 5.437121] r8125 Copyright (C) 2022 Realtek NIC software team [email protected] [ 27.495494] r8125_v9: eth0: link up

不急着找解决方案,感谢dalao 看有没有用户遇见相同问题 随缘吧,毕竟修螃蟹卡的bug可能牵一发而动全身(早知就买i226了)

ctl26481 avatar May 02 '25 12:05 ctl26481