Re: [Intel-gfx] question about i915 GPU driver in VM

2019-06-02 Thread Zhang, Xiong Y
> Hi,
> 
> I'm trying to get iGPU passthrough working in a VM running on a Chrome OS
> "7th Generation (Kaby Lake) Intel Core i5-7Y57 with HD Graphics 615" device.
> I'm able to pass the iGPU through to the VM and execute the i915 driver, but
> the driver doesn't succeed in getting the system to the point where the
> screen works.
> 
> With physical access to the iGPU from inside the guest, is it reasonable to
> just run the same kernel/driver that works on the host and expect it to work?
> Or are there often extra hoops to jump through even with
> physical/unemulated access to the host GPU and CPU?
[Zhang, Xiong Y] yes, both host and guest use the same kernel/driver.
> 
> On a higher level, it would help if anyone had an idea from the logs below if
> I'm "close" to getting this to work? Or maybe its hard to say?
[Zhang, Xiong Y] it is close to work.
> 
> NOTE: I totally avoid touching the GPU in the host, and have verified that the
> i915 driver in the guest should have all the info (e.g.
> OpRegion tables) it needs to drive the GPU. Interestingly, running
> i915 in the VM causes the VM kernel to crash at random code paths unless I
> wait until after system startup to modprobe i915. The VM doesn't crash at all
> if I disable i915. These crashes happen well after i915 is done trying to
> initialize the GPU, so not sure if i915 is touching memory it shouldn't be or
> what..
[Zhang, Xiong Y] Please check whether intel_iommu is enabled on host or not. If 
it isn't , please add intel_iommu=on to host grub.

is the dmesg from host or guest ?
If it is guest, this message shouldn't appear according to your qemu boot 
parameter.
> [0.475961] [drm:i915_ggtt_probe_hw] GTT stolen size = 64M
> [0.476927] [drm:i915_gem_init_stolen] Memory reserved for graphics
> device: 65536K, usable: 64512K
Please paste qemu output.

thanks
> 
> Thanks,
> Micah
> 
> KERNEL CONSOLE (modified for brevity):
> localhost ~ # qemu-system-x86_64 -serial mon:stdio -m 2G -smp 2 -M pc -vga
> none -usbdevice tablet -cpu host,-invpcid,-tsc-deadline,check -drive
> 'file=/mnt/stateful_partition/chromiumos_test_image.bin,index=0,media=dis
> k,cache=unsafe,format=raw'
> -enable-kvm -device
> vfio-pci,x-igd-opregion=on,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2,ro
> mbar=0
> -device 'virtio-net,netdev=eth0' -netdev
> 'user,id=eth0,net=10.0.2.0/27,hostfwd=tcp:127.0.0.1:9222-:22'
> qemu-system-x86_64: -usbdevice tablet: '-usbdevice' is deprecated, please
> use '-device usb-...' instead
> qemu-system-x86_64: -device
> vfio-pci,x-igd-opregion=on,host=00:02.0,id=hostdev0,bus=pci.0,addr=0x2,ro
> mbar=0:
> IGD device :00:02.0 has no ROM, legacy mode disabled VNC server
> running on 127.0.0.1:5900
> [0.00] Linux version 4.14.114
> (mort...@mortonm2.mtv.corp.google.com) (Chromium OS
> 9.0_pre353983_p20190325-r11 clang version 9.0.0
> (/var/cache/chromeos-cache/distfiles/host/egit-src/clang.git
> 171531e31716e2db2c372cf8b57220ddf9e721d8)
> (/var/cache/chromeos-cache/distfiles/host/egit-src/llvm.git
> 5077597e0d5b86d9f9c27286d8b28f8b3645a74c) (based on LLVM 9.0.0svn))
> #14 SMP PREEMPT Fri May 31 09:50:35 PDT 2019
> [0.00] Command line: BOOT_IMAGE=vmlinuz.A init=/sbin/init
> boot=local rootwait ro noresume noswap loglevel=7 noinitrd
> console=ttyS0 disablevmx=off
> root=PARTUUID=60B83A78-8581-014B-8942-6128789234C3 i915.modeset=1
> cros_legacy cros_debug
> 
> [snip]
> 
> [0.00] Reserving Intel graphics memory at [mem
> 0x7c00-0x7fff]
> 
> [snip]
> 
> [0.415534] ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 10
> [0.416418] [drm:i915_driver_load] Assuming SunrisePoint PCH
> [0.417296] [drm:intel_power_domains_init] Allowed DC state mask 03
> [0.418290] [drm:intel_device_info_dump] i915 device info:
> platform=KABYLAKE gen=9 pciid=0x591e rev=0x02
> [0.418292] [drm:intel_device_info_dump] i915 device info: is_mobile:
> no
> [0.419684] [drm:intel_device_info_dump] i915 device info: is_lp: no
> [0.420740] [drm:intel_device_info_dump] i915 device info:
> is_alpha_support: no
> [0.421712] [drm:intel_device_info_dump] i915 device info:
> has_64bit_reloc: yes
> [0.422806] [drm:intel_device_info_dump] i915 device info:
> has_aliasing_ppgtt: yes
> [0.423900] [drm:intel_device_info_dump] i915 device info: has_csr: yes
> [0.425036] [drm:intel_device_info_dump] i915 device info: has_ddi: yes
> [0.426033] [drm:intel_device_info_dump] i915 device info: has_dp_mst:
> yes
> [0.427040] [drm:intel_device_info_dump] i915 device info:
> has_reset_engine: yes
> [0.428076] [drm:intel_device_info_dump] i915 device info: has_fbc: yes
> [0.429180] [drm:intel_device_info_dump] i915 device info:
> has_fpga_dbg: yes
> [0.430181] [drm:intel_device_info_dump] i915 device info:
> has_full_ppgtt: yes
> [0.431726] [drm:intel_device_info_dump] i915 device info:
> has_full_48bit_ppgtt: yes
> [0.432810] [drm:intel_device_info_dump] i915 device info:
> has_gmch_display: no
> [

Re: [Intel-gfx] linux-next: unable to fetch the drm-intel-fixes tree

2019-06-02 Thread Stephen Rothwell
Hi Stephen,

On Mon, 3 Jun 2019 08:20:51 +1000 Stephen Rothwell  
wrote:
>
> Hi all,
> 
> Trying to fetch the drm-intel-fixes tree today gives me this error:
> 
> -
> fatal: Could not read from remote repository.
> 
> Please make sure you have the correct access rights
> and the repository exists.
> -
> 
> The same for drm-misc-fixes, drm-intel and drm-misc.  These are all
> hosted on git://anongit.freedesktop.org/ .

Also the drm-tegra tree.

-- 
Cheers,
Stephen Rothwell


pgpnIUkr3w3JC.pgp
Description: OpenPGP digital signature
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] linux-next: unable to fetch the drm-intel-fixes tree

2019-06-02 Thread Stephen Rothwell
Hi all,

Trying to fetch the drm-intel-fixes tree today gives me this error:

-
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
-

The same for drm-misc-fixes, drm-intel and drm-misc.  These are all
hosted on git://anongit.freedesktop.org/ .

-- 
Cheers,
Stephen Rothwell


pgpurRd_qWJTU.pgp
Description: OpenPGP digital signature
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [PATCH 2/2] drm/i915: Skip object locking around a no-op set-domain ioctl

2019-06-02 Thread Serge Belyshev
Hi!

> This patch causes lockups in firefox. They appear like non-fatal hangs
> of the webpage contents, "fixable" with alt-tab or a background system
> load.  I have verified that reverting the commit 754a254427 on top of
> current Linus tree fixes the problem.

This is still broken in v5.2-rc3.

I have also verified that the particular commit, if backported to v5.1
release, breaks firefox there too in the same way.


(for reference:)

commit 754a25442705c4f90e0d05f1a7bd303ffe700ca9
Author: Chris Wilson 
Date:   Thu Mar 21 16:19:08 2019 +

drm/i915: Skip object locking around a no-op set-domain ioctl


[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/perf: fix whitelist on Gen10+

2019-06-02 Thread Patchwork
== Series Details ==

Series: drm/i915/perf: fix whitelist on Gen10+
URL   : https://patchwork.freedesktop.org/series/61467/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6179_full -> Patchwork_13155_full


Summary
---

  **SUCCESS**

  No regressions found.

  

Known issues


  Here are the changes found in Patchwork_13155_full that come from known 
issues:

### IGT changes ###

 Issues hit 

  * igt@gem_softpin@noreloc-s3:
- shard-skl:  [PASS][1] -> [INCOMPLETE][2] ([fdo#104108]) +1 
similar issue
   [1]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-skl5/igt@gem_soft...@noreloc-s3.html
   [2]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13155/shard-skl9/igt@gem_soft...@noreloc-s3.html

  * igt@gem_tiled_swapping@non-threaded:
- shard-kbl:  [PASS][3] -> [FAIL][4] ([fdo#108686])
   [3]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-kbl2/igt@gem_tiled_swapp...@non-threaded.html
   [4]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13155/shard-kbl7/igt@gem_tiled_swapp...@non-threaded.html

  * igt@i915_suspend@debugfs-reader:
- shard-skl:  [PASS][5] -> [INCOMPLETE][6] ([fdo#104108] / 
[fdo#107773])
   [5]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-skl3/igt@i915_susp...@debugfs-reader.html
   [6]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13155/shard-skl4/igt@i915_susp...@debugfs-reader.html

  * igt@i915_suspend@sysfs-reader:
- shard-kbl:  [PASS][7] -> [DMESG-WARN][8] ([fdo#108566]) +2 
similar issues
   [7]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-kbl6/igt@i915_susp...@sysfs-reader.html
   [8]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13155/shard-kbl3/igt@i915_susp...@sysfs-reader.html

  * igt@kms_cursor_legacy@cursora-vs-flipa-atomic-transitions:
- shard-hsw:  [PASS][9] -> [INCOMPLETE][10] ([fdo#103540])
   [9]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-hsw4/igt@kms_cursor_leg...@cursora-vs-flipa-atomic-transitions.html
   [10]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13155/shard-hsw4/igt@kms_cursor_leg...@cursora-vs-flipa-atomic-transitions.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-indfb-pgflip-blt:
- shard-skl:  [PASS][11] -> [FAIL][12] ([fdo#108040])
   [11]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-skl10/igt@kms_frontbuffer_track...@fbcpsr-1p-primscrn-indfb-pgflip-blt.html
   [12]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13155/shard-skl8/igt@kms_frontbuffer_track...@fbcpsr-1p-primscrn-indfb-pgflip-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite:
- shard-iclb: [PASS][13] -> [FAIL][14] ([fdo#103167]) +4 similar 
issues
   [13]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-iclb3/igt@kms_frontbuffer_track...@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html
   [14]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13155/shard-iclb7/igt@kms_frontbuffer_track...@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html

  * igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-indfb-draw-mmap-cpu:
- shard-skl:  [PASS][15] -> [FAIL][16] ([fdo#103167])
   [15]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-skl10/igt@kms_frontbuffer_track...@psr-1p-offscren-pri-indfb-draw-mmap-cpu.html
   [16]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13155/shard-skl8/igt@kms_frontbuffer_track...@psr-1p-offscren-pri-indfb-draw-mmap-cpu.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes:
- shard-apl:  [PASS][17] -> [DMESG-WARN][18] ([fdo#108566]) +1 
similar issue
   [17]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-apl7/igt@kms_pl...@plane-panning-bottom-right-suspend-pipe-b-planes.html
   [18]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13155/shard-apl1/igt@kms_pl...@plane-panning-bottom-right-suspend-pipe-b-planes.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
- shard-skl:  [PASS][19] -> [FAIL][20] ([fdo#108145])
   [19]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-skl10/igt@kms_plane_alpha_bl...@pipe-a-coverage-7efc.html
   [20]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13155/shard-skl8/igt@kms_plane_alpha_bl...@pipe-a-coverage-7efc.html

  * igt@kms_psr@psr2_no_drrs:
- shard-iclb: [PASS][21] -> [SKIP][22] ([fdo#109441]) +2 similar 
issues
   [21]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-iclb2/igt@kms_psr@psr2_no_drrs.html
   [22]: 
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13155/shard-iclb5/igt@kms_psr@psr2_no_drrs.html

  * igt@perf_pmu@rc6-runtime-pm-long:
- shard-apl:  [PASS][23] -> [FAIL][24] ([fdo#105010])
   [23]: 
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6179/shard-apl6/igt@perf_...@rc6-runtime-pm-long.html
   [24]: 

[Intel-gfx] [PATCH i-g-t] i915/gem_ppgtt: Remove defunct test

2019-06-02 Thread Chris Wilson
i915_gem_gtt_info has been removed and so flink-and-exit-vma-leak is
defunct.

Signed-off-by: Chris Wilson 
---
 tests/i915/gem_ppgtt.c | 43 --
 1 file changed, 43 deletions(-)

diff --git a/tests/i915/gem_ppgtt.c b/tests/i915/gem_ppgtt.c
index b905ea559..0d40a7b78 100644
--- a/tests/i915/gem_ppgtt.c
+++ b/tests/i915/gem_ppgtt.c
@@ -289,46 +289,6 @@ static void flink_and_close(void)
close(fd2);
 }
 
-static void flink_and_exit(void)
-{
-   uint32_t fd, fd2, fd3;
-   uint32_t bo, flinked_bo, name;
-   char match[20];
-
-   fd = drm_open_driver(DRIVER_INTEL);
-   igt_require(gem_uses_full_ppgtt(fd));
-
-   bo = gem_create(fd, 4096);
-   name = gem_flink(fd, bo);
-   snprintf(match, sizeof(match), "(name: %u)", name);
-
-   fd2 = drm_open_driver(DRIVER_INTEL);
-   flinked_bo = gem_open(fd2, name);
-
-   /* Verify VMA is not there yet. */
-   igt_assert(!igt_debugfs_search(fd, "i915_gem_gtt", match));
-
-   exec_and_get_offset(fd2, flinked_bo);
-
-   /* Verify VMA has been created. */
-   igt_assert(igt_debugfs_search(fd, "i915_gem_gtt", match));
-
-   /* Close the context. */
-   close(fd2);
-
-   /* Execute a different and unrelated (wrt object sharing) context to
-* ensure engine drops its last context reference.
-*/
-   fd3 = drm_open_driver(DRIVER_INTEL);
-   exec_and_get_offset(fd3, gem_create(fd3, 4096));
-   close(fd3);
-
-   igt_drop_caches_set(fd, DROP_ACTIVE | DROP_RETIRE | DROP_IDLE);
-   igt_assert(!igt_debugfs_search(fd, "i915_gem_gtt", match));
-
-   close(fd);
-}
-
 #define N_CHILD 8
 igt_main
 {
@@ -364,7 +324,4 @@ igt_main
 
igt_subtest("flink-and-close-vma-leak")
flink_and_close();
-
-   igt_subtest("flink-and-exit-vma-leak")
-   flink_and_exit();
 }
-- 
2.20.1

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx