Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #89352

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

From Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#1114912: linux-image-amd64: KVM GPU passthrough causes kernel crash and system hang on Debian 13 after VM shutdown
Date 2025-09-22 15:00 +0200
Message-ID <LxOj7-hjxi-15@gated-at.bofh.it> (permalink)
References <LtQtb-exlU-1@gated-at.bofh.it> <LtQtb-exlU-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.debian.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Bug#1114912: linux-image-amd64: KVM GPU passthrough causes kernel crash and system hang on Debian 13 after VM shutdown Naunte <dec01-2021@hotmail.com> - 2025-09-11 16:30 +0200
  Bug#1114912: linux-image-amd64: KVM GPU passthrough causes kernel crash and system hang on Debian 13 after VM shutdown Uwe Kleine-König <u.kleine-koenig@baylibre.com> - 2025-09-22 15:00 +0200

csiph-web