Bug 101713 - [BDW/SKL/KBL] Kernel Oops while booting up with "i915.enable_ppgtt=1"
Summary: [BDW/SKL/KBL] Kernel Oops while booting up with "i915.enable_ppgtt=1"
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-07 03:06 UTC by Terrence Xu
Modified: 2017-07-07 18:51 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg.log (59.17 KB, text/plain)
2017-07-07 04:23 UTC, Terrence Xu
no flags Details

Description Terrence Xu 2017-07-07 03:06:23 UTC
System Environment
=======
kernel repo: drm-intel
kernel commit: drm-tip: 2017y-06m-23d-09h-09m-45s


Regression?
=======
Yes 
drm-tip: 2017y-06m-20d-08h-32m-41s is good.
drm-tip: 2017y-06m-23d-09h-09m-45s is bad.

Bug detailed description
=======
The guest boot up with the latest drm-intel 4.9.0-rc4+ kernel with kernel panic, but can boot up with the drm-intel 4.8.0-rc2+.
This is KVM GVT-d environment issue.

Reproduce Steps
==============
Kernel boot up with default grub with no problem.
Kernel boot up with i915.enable_ppgtt=1 (aliasing ppgtt) with Oops, it will not crash boot cannot start X well.

Expected Result
=============
Kernel boot up successfully.

Actual Result
===========
Guest boot up with Oops.

Analysis & Root Cause
===========
[   11.076861] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   11.077162] Bluetooth: BNEP filters: protocol multicast
[   11.077469] Bluetooth: BNEP socket layer initialized
[   13.720934] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready
[   13.937653] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready
[   14.904595] BUG: unable to handle kernel NULL pointer dereference at           (null)
[   14.905159] IP: gen8_ppgtt_insert_3lvl+0x88/0x1a0 [i915]
[   14.905452] PGD 0
[   14.905452] P4D 0

[   14.905768] Oops: 0000 [#1] SMP
[   14.905942] Modules linked in: bnep snd_soc_skl snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core snd_hda_codec_hdmi intel_rapl snd_soc_sst_match snd_hda_codec_realtek snd_soc_core snd_hda_codec_generic snd_compress snd_pcm_dmaengine ac97_bus x86_pkg_temp_thermal intel_powerclamp coretemp 8250_dw snd_hda_intel kvm_intel snd_hda_codec snd_hda_core crct10dif_pclmul input_leds crc32_pclmul snd_hwdep ghash_clmulni_intel pcbc snd_pcm aesni_intel hci_uart btusb iwlwifi snd_seq ir_lirc_codec aes_x86_64 btrtl btqca ir_rc6_decoder lirc_dev btbcm btintel bluetooth rc_rc6_mce crypto_simd glue_helper ecdh_generic cryptd ite_cir snd_seq_device rc_core snd_timer cfg80211 snd soundcore idma64 virt_dma mac_hid mei_me mei shpchp intel_lpss_pci intel_lpss_acpi intel_lpss acpi_pad acpi_als intel_pch_thermal
[   14.909690]  kfifo_buf industrialio parport_pc ppdev lp parport autofs4 kvmgt vfio_mdev mdev vfio_iommu_type1 vfio kvm irqbypass hid_generic usbhid i915 i2c_algo_bit drm_kms_helper ahci syscopyarea e1000e sysfillrect sysimgblt sdhci_pci fb_sys_fops ptp pps_core sdhci libahci drm video pinctrl_sunrisepoint i2c_hid pinctrl_intel hid
[   14.911245] CPU: 3 PID: 903 Comm: Xorg Tainted: G     U          4.12.0-rc7+ #1
[   14.911634] Hardware name:                  /NUC6i5SYB, BIOS SYSKLi35.86A.0042.2016.0409.1246 04/09/2016
[   14.912137] task: ffff95bf00ec3c00 task.stack: ffffb0bb4260c000
[   14.912472] RIP: 0010:gen8_ppgtt_insert_3lvl+0x88/0x1a0 [i915]
[   14.912790] RSP: 0018:ffffb0bb4260fa10 EFLAGS: 00010293
[   14.913072] RAX: 0000000482c09000 RBX: ffff95bf01fd4dc0 RCX: 0000000000000004
[   14.913453] RDX: 0000000000000029 RSI: 0000000000000000 RDI: 0000000482c0a000
[   14.913834] RBP: ffffb0bb4260fa30 R08: 0000000000000000 R09: 0000000000000083
[   14.914214] R10: 0000000000000001 R11: 0000000000000004 R12: 0000000000000000
[   14.914595] R13: ffff95befc7db7b0 R14: ffff95beff04ea80 R15: 0000000000000001
[   14.914976] FS:  00007f508a859a00(0000) GS:ffff95bf16d80000(0000) knlGS:0000000000000000
[   14.915408] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   14.915715] CR2: 0000000000000000 CR3: 0000000482104000 CR4: 00000000003406e0
[   14.916098] Call Trace:
[   14.916251]  aliasing_gtt_bind_vma+0xeb/0x150 [i915]
[   14.916541]  i915_vma_bind+0x63/0xc0 [i915]
[   14.916790]  __i915_vma_do_pin+0x2d6/0x3b0 [i915]
[   14.917064]  eb_lookup_vmas+0x457/0x7e0 [i915]
[   14.917313]  ? __pm_runtime_resume+0x5b/0x80
[   14.917560]  i915_gem_do_execbuffer+0x4ad/0xec0 [i915]
[   14.917844]  ? shmem_write_end+0x4b/0x240
[   14.918063]  ? pagecache_write_end+0x13/0x20
[   14.918310]  ? i915_gem_object_pwrite_gtt+0xc9/0x150 [i915]
[   14.918616]  ? __kmalloc_node+0x1ef/0x2a0
[   14.918848]  i915_gem_execbuffer2+0xa0/0x1b0 [i915]
[   14.919139]  drm_ioctl+0x201/0x490 [drm]
[   14.919372]  ? i915_gem_execbuffer+0x2b0/0x2b0 [i915]
[   14.919651]  do_vfs_ioctl+0xa1/0x5d0
[   14.919848]  ? handle_mm_fault+0xf3/0x210
[   14.920068]  ? __do_page_fault+0x265/0x4e0
[   14.920290]  SyS_ioctl+0x79/0x90
[   14.920470]  entry_SYSCALL_64_fastpath+0x1e/0xa9
[   14.920720] RIP: 0033:0x7f50886b5357
[   14.920916] RSP: 002b:00007ffd01bd6bc8 EFLAGS: 00003246 ORIG_RAX: 0000000000000010
[   14.921320] RAX: ffffffffffffffda RBX: 00007f508a7c0460 RCX: 00007f50886b5357
[   14.921702] RDX: 00007ffd01bd6c70 RSI: 0000000040406469 RDI: 000000000000000a
[   14.922083] RBP: 00000000fffffe00 R08: 00007ffd01bd6cc0 R09: 0000000000000001
[   14.922464] R10: 00007f508897d2c8 R11: 0000000000003246 R12: 00000000ffff8001
[   14.922846] R13: 000055e204fae410 R14: 00007f508a7c0000 R15: 00007f508a7c0004
[   14.923226] Code: 89 f4 41 89 cb 48 01 c7 45 85 d2 74 14 41 83 fa 03 41 b8 83 00 00 00 41 b9 13 00 00 00 4d 0f 45 c8 4d 8b 85 48 05 00 00 48 63 c9 <49> 8b 1c f0 48 8b 4c cb 10 4c 8b 01 65 4c 8b 14 25 40 d4 00 00
[   14.924256] RIP: gen8_ppgtt_insert_3lvl+0x88/0x1a0 [i915] RSP: ffffb0bb4260fa10
[   14.924651] CR2: 0000000000000000
[   14.930894] ---[ end trace b1c744137a0a5140 ]---
Comment 1 Terrence Xu 2017-07-07 04:23:27 UTC
Created attachment 132489 [details]
dmesg.log

Attach the dmesg log.
Comment 2 Chris Wilson 2017-07-07 10:56:27 UTC
commit 17369ba08c065967b7b8c48253f20b73acc0b9f5
Author: Chuanxiao Dong <chuanxiao.dong@intel.com>
Date:   Fri Jul 7 17:50:59 2017 +0800

    drm/i915: Fix the kernel panic when using aliasing ppgtt
    
    The ppgtt should be get directly from i915_address_space *vm instead of
    vma->vm.
    
    v2:
    - add one more fix for bxt. (Chris)
    
    Fixes: 4a234c5fae16 ("drm/i915: pass the vma to insert_entries")
    Bugzilla:https://bugs.freedesktop.org/show_bug.cgi?id=101713
    Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.