Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod From: Johannes Schauer Newsgroups: linux.debian.bugs.dist,linux.debian.kernel Subject: Bug#923393: CONFIG_DRM_I915_GVT_KVMGT is not enabled Date: Wed, 20 Mar 2019 09:40:01 +0100 Message-ID: References: X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Mar 20 08:36:13 2019 Old-Return-Path: X-Spam-Flag: NO X-Spam-Score: -4.2 Reply-To: Johannes Schauer , 923393@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: Debian Kernel Team X-Debian-Pr-Message: followup 923393 X-Debian-Pr-Package: linux-image-4.19.0-2-amd64 X-Debian-Pr-Source: linux-signed-amd64 X-Spam-Bayes: score:0.0000 Tokens: new, 48; hammy, 150; neutral, 177; spammy, 0. spammytokens: hammytokens:0.000-+--H*ct:application, 0.000-+--H*ct:protocol, 0.000-+--H*ct:micalg, 0.000-+--H*ct:signed, 0.000-+--H*ct:pgp-signature Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="===============1102464634768724673==" MIME-Version: 1.0 Content-Disposition: inline User-Agent: alot/0.8.1 X-Debian-Message: from BTS X-Mailing-List: archive/latest/1528392 List-ID: List-URL: Approved: robomod@news.nic.it Lines: 138 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: michael@fritscher.net X-Original-Date: Wed, 20 Mar 2019 09:32:06 +0100 X-Original-Message-ID: <155307072605.30286.1511332756844118280@hoothoot> X-Original-References: <8a692914-e770-d2dd-6f7a-870667597d16@fritscher.net> <155286026384.12461.17405238210700577614@hoothoot> <8a692914-e770-d2dd-6f7a-870667597d16@fritscher.net> <155286026384.12461.17405238210700577614@hoothoot> Xref: csiph.com linux.debian.bugs.dist:950918 linux.debian.kernel:63661 --===============1102464634768724673== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Control: tag -1 + patch Control: reassign -1 linux Hi, On Sun, 17 Mar 2019 23:04:23 +0100 Johannes Schauer wrot= e: > On Wed, 27 Feb 2019 15:01:39 +0100 Michael Fritscher wrote: > > I would like to try GVT like described in > > https://github.com/intel/gvt-linux/wiki/GVTg_Setup_Guide to get native = 3D > > accelaration in a KVM guest. Unfortunately, the kernel compile options > > CONFIG_DRM_I915_GVT and CONFIG_DRM_I915_GVT_KVMGT are not set. So I ca= n't > > use it with the provided kernels. >=20 > CONFIG_DRM_I915_GVT_KVMGT depends on CONFIG_VFIO_MDEV and > CONFIG_VFIO_MDEV_DEVICE, so these would also have to be enabled (both are > disabled by default). I can confirm that the patch at the end of this email gives me this: $ ls /sys/devices/pci0000:00/0000:00:02.0/mdev_supported_types/ i915-GVTg_V4_2 i915-GVTg_V4_4 i915-GVTg_V4_8 And after an "echo $uuid | sudo /sys/[...]/i915-GVTg_V4_2/create" I get a n= ew virtual card in /sys/devices/pci0000:00/0000:00:02.0/$uuid. Unfortunately, I haven't had much luck with using this feature in practice.= I start qemu-system-x86_64 with: $ qemu-system-x86_64 -device vfio-pci,sysfsdev=3D/sys/[...]/$uuid/ \ -vga qxl -display gtk,gl=3Don And indeed the Windows guest shows me an Intel 5500 card but after installi= ng the drivers I constantly get a bluescreen immediately after boot. Neither Windows 7, 8.1 or 10 worked. In Windows 10 the bluescreen shows a "video tdr failure". On my host system I get spammed with dmesg output like: [Wed Mar 20 04:19:07 2019] vfio_pin_page_external: Task qemu-system-x86= (28656) RLIMIT_MEMLOCK (16777216) exceeded [Wed Mar 20 04:19:07 2019] gvt: vgpu 1: vfio_pin_pages failed for gfn 0= x4359e, ret -12 [Wed Mar 20 04:19:07 2019] gvt: vgpu 1: fail: spt 0000000030299d2a gues= t entry 0x4359e007 type 1 [Wed Mar 20 04:19:07 2019] gvt: vgpu 1: fail: shadow page 0000000030299= d2a guest entry 0x4359e007 type 1. [Wed Mar 20 04:19:07 2019] gvt: guest page write error, gpa f7acae0 or [Wed Mar 20 04:19:07 2019] vfio_pin_page_external: Task qemu-system-x86= (28656) RLIMIT_MEMLOCK (16777216) exceeded [Wed Mar 20 04:19:07 2019] gvt: vgpu 1: vfio_pin_pages failed for gfn 0= x622cd, ret -12 [Wed Mar 20 04:19:07 2019] gvt: vgpu 1: fail to populate guest ggtt ent= ry I'm using Debian buster, Linux 4.19.16 and qemu 1:3.1+dfsg-5 on an Intel Broadwell system. I don't know if these problems are due to my hardware or due to qemu or due= to my Windows guests but maybe it would make sense to see this setup working in practice before enabling the respective kernel options? Somebody on Arch Linux claims it's working: https://www.reddit.com/r/VFIO/comments/8h352p This bug should probably be assigned to src:linux instead of src:linux-signed-amd64 as only the former contains the kernel sources. Thanks! cheers, josch diff -Nru linux-4.19.16/debian/config/config linux-4.19.16/debian/config/co= nfig --- linux-4.19.16/debian/config/config 2019-01-08 07:03:19.000000000 +0000 +++ linux-4.19.16/debian/config/config 2019-03-17 22:06:06.000000000 +0000 @@ -680,6 +680,8 @@ ## file: drivers/gpu/drm/i915/Kconfig ## CONFIG_DRM_I915_USERPTR=3Dy +CONFIG_DRM_I915_GVT=3Dy +CONFIG_DRM_I915_GVT_KVMGT=3Dm =20 ## ## file: drivers/gpu/drm/i915/Kconfig.debug @@ -5229,6 +5231,12 @@ # CONFIG_VFIO_NOIOMMU is not set =20 ## +## file: drivers/vfio/mdev/Kconfig +## +CONFIG_VFIO_MDEV=3Dm +CONFIG_VFIO_MDEV_DEVICE=3Dm + +## ## file: drivers/vhost/Kconfig ## CONFIG_VHOST_NET=3Dm --===============1102464634768724673== MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Description: signature Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAlyR+oIACgkQ8sulx4+9 g+FRUw//aScJH2gvTch/LCAvPr9Tm2MBnFE8/dtfJIVi86ntC4bbM+29udlU3dTD VDQqmfMjF5nd5nXD1XPSPFldtkX1YC1NQpPp28Hkj/qE3Ue7HnuBFvjqut14WphZ HqmoZq4bKe+YEde3FCLJnwp59yLB8L6CGcakfTDqT9zWGasqUwmU+ThxsHcUVOTS D/Bhngy8WGLq0lQx4eajtr/v+CC6Qupd1DFWTNKnTbJfuBwtU+kSOYtb3wcbR2S9 l+lTMnyp3b+xg4ybXXpNQ7oWyKvLazQN7wW2du3EHwYp2ZdV9nUZKQEI6Ne8/9H3 RChNep3p/Ai7DnbuIwE5shqu9BAfdby7nD0MWnkumjS+PUnaO4v0TWc1gCZPeRcf 602JNUE27GSzfAS4lxpp3Ss4xtb1vExbOF1zAB/ML+rLhT700Ssg1PzpWIAGp1W9 AunPZIp/XNmDY2XutYAgPxv2t3chQON9mqptlzBVZbtO+XIl5YzGQqf/wc9Gys++ ZZR5MsOoNwhobzVn9SC/gOTrHau9QuS3yMV2CQjFztcxnG/4HEPXIBrCFcfmHyYG 3XpNn8XLrvcmyMqSmqu5KNrIjOFmH0Mudpe11p5PDhe0Vq6XKCrEx1T2EHIi0uTE LgQ5gaJblJIqDfQ+Wx/c0zLXtEyzJyjMUN12/d5Rz1JzrZEf+Mo= =tqWj -----END PGP SIGNATURE----- --===============1102464634768724673==--