From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 111229] Unable to unbind GPU from amdgpu Date: Sat, 27 Jul 2019 04:14:03 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1002756913==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F4666EE87 for ; Sat, 27 Jul 2019 04:14:04 +0000 (UTC) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1002756913== Content-Type: multipart/alternative; boundary="15642008431.dBfb20.5491" Content-Transfer-Encoding: 7bit --15642008431.dBfb20.5491 Date: Sat, 27 Jul 2019 04:14:03 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D111229 Bug ID: 111229 Summary: Unable to unbind GPU from amdgpu Product: DRI Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: DRM/AMDgpu Assignee: dri-devel@lists.freedesktop.org Reporter: wedens13@yandex.ru Created attachment 144877 --> https://bugs.freedesktop.org/attachment.cgi?id=3D144877&action=3Dedit dmesg kernel 5.2.1 Arch linux Kernel version: 5.2.1 I have two GPUs in my system: integrated Intel and Sapphire Pulse Vega 56. I boot with Intel as my primary gpu and I use Vega for VFIO (gpu passthroug= h) and gpu offloading. What I'm trying to do is to boot with amdgpu driver for Vega and bind it to vfio-pci when I start VM (qemu). The problem occurs when I try to unbind Vega from amdgpu driver using this command: echo -n "0000:03:00.0" > /sys/bus/pci/drivers/amdgpu/unbind It results in segfault with following error in dmesg (full dmesg from boot = to shutdown is attached): [drm:amdgpu_pci_remove [amdgpu]] *ERROR* Device removal is currently not supported outside of fbcon After that I'm unable to rebind device back to amdgpu or any other driver: echo "0000:03:00.0" > /sys/bus/pci/drivers/amdgpu/bind bash: echo: write error: No such device Also I'm unable to shutdown properly. Shutdown process becomes stuck at some point and only holding the button helps. I've attached relevant lspci -vvv output before and after attempt to unbind= , in case it's useful. Another thing I've tried is to unbind using kernel 4.19.60 and it just hangs after executing the command. I've attached the log of this attempt (error is different from 5.2.1). --=20 You are receiving this mail because: You are the assignee for the bug.= --15642008431.dBfb20.5491 Date: Sat, 27 Jul 2019 04:14:03 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated
Bug ID 111229
Summary Unable to unbind GPU from amdgpu
Product DRI
Version unspecified
Hardware x86-64 (AMD64)
OS Linux (All)
Status NEW
Severity normal
Priority medium
Component DRM/AMDgpu
Assignee dri-devel@lists.freedesktop.org
Reporter wedens13@yandex.ru

Created attachment 144877=
 [details]
dmesg kernel 5.2.1

Arch linux
Kernel version: 5.2.1

I have two GPUs in my system: integrated Intel and Sapphire Pulse Vega 56.
I boot with Intel as my primary gpu and I use Vega for VFIO (gpu passthroug=
h)
and gpu offloading.
What I'm trying to do is to boot with amdgpu driver for Vega and bind it to
vfio-pci when I start VM (qemu).

The problem occurs when I try to unbind Vega from amdgpu driver using this
command:
echo -n "0000:03:00.0" > /sys/bus/pci/drivers/amdgpu/unbind

It results in segfault with following error in dmesg (full dmesg from boot =
to
shutdown is attached):
[drm:amdgpu_pci_remove [amdgpu]] *ERROR* Device removal is currently not
supported outside of fbcon

After that I'm unable to rebind device back to amdgpu or any other driver:
echo "0000:03:00.0" > /sys/bus/pci/drivers/amdgpu/bind
bash: echo: write error: No such device

Also I'm unable to shutdown properly. Shutdown process becomes stuck at some
point and only holding the button helps.

I've attached relevant lspci -vvv output before and after attempt to unbind=
, in
case it's useful.

Another thing I've tried is to unbind using kernel 4.19.60 and it just hangs
after executing the command. I've attached the log of this attempt (error is
different from 5.2.1).


You are receiving this mail because:
  • You are the assignee for the bug.
= --15642008431.dBfb20.5491-- --===============1002756913== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============1002756913==--