[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1114912: linux-image-amd64: KVM GPU passthrough causes kernel crash and system hang on Debian 13 after VM shutdown



Hello,

On Thu, Sep 11, 2025 at 10:25:59PM +0800, Naunte wrote:
> I configured AMD RX-7900XTX GPU passthrough to a KVM virtual machine running Windows 10 on Debian 13.1.0. 
> 
> After shutting down the Windows 10 VM, the Linux host kernel reports errors related to vfio_pci and AMD GPU passthrough.
> 
> This causes virt-manager to freeze and become unresponsive; virsh
> commands also hang. The GPU fails to reset, and rebooting the host
> system often hangs, requiring a forced reboot via hardware reset or
> power off.

Can you please provide a full bootlog?

Also can you please provide the output of:

	ls -l /sys/devices/pci0000:00/0000:03:00.0/driver

when run a) before kvm starts, b) while kvm is running and c) after the
problem triggered?

I suspect that somehow there are two different threads that access
the hardware: Both vfio_pci and the amdgpu driver. I guess before you
start kvm, the amdgpu driver is loaded already. Does it help to
blacklist it (i.e. pass

	module_blacklist=amdgpu

on the kernel commandline and verify using

	lsmod | grep amdgpu

that the module isn't loaded before kvm is started.)

Not knowing how pci passthrough works exactly, I'd expect that the host
driver is unbound when kvm is started with a passed through pci device.
So if the above helps the likely problem is that the amdgpu fails to
completely free all resources.

Does it produce any kernel or shell output if you do:

	echo 0000:03:00.0 > /sys/bus/pci/drivers/amdgpu/unbind
	echo 0000:03:00.0 > /sys/bus/pci/drivers/amdgpu/bind

instead of/before starting kvm?

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature


Reply to: