intel / KVMGT-kernel

Other
41 stars 20 forks source link

Continuously see error messages-> FIXME: igd_pgt is NULL! #25

Closed tcwu2005 closed 8 years ago

tcwu2005 commented 8 years ago
  1. I successfully boot with options intel_iommu=igfx_off i915.hvm_boot_foreground=1. Checked dmesg it looks ok.
  2. copy qemu-system-x86_64 and bios.bin to /opt/bin ,and run ./qemu-system-x86_64 -bios ./bios.bin -enable-kvm -M pc -smp 2 -cpu host -m 1024 -machine kernel_irqchip=on -vgt -vga vgt disk (disk is a Ubuntu15.04 image that replaced with kernel 4.2). Basically I follow README.kvmgt's guide.

    I continuously see error message "kick_off_i915_isr()-104: jike: FIXME: igd_pgt is NULL!" Sep 14 14:56:00 user-Z97-D3H kernel: [11595.275285] kick_off_i915_isr()-104: jike: FIXME: igd_pgt is NULL! Sep 14 14:56:00 user-Z97-D3H kernel: [11595.275475] kick_off_i915_isr()-104: jike: FIXME: igd_pgt is NULL! Sep 14 14:56:00 user-Z97-D3H kernel: [11595.275599] kick_off_i915_isr()-104: jike: FIXME: igd_pgt is NULL! Sep 14 14:56:00 user-Z97-D3H kernel: [11595.276422] kick_off_i915_isr()-104: jike: FIXME: igd_pgt is NULL!

Before this error, I saw call trace (not sure if it is related) Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677276] Call Trace: Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677303] [] dump_stack+0x45/0x56 Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677334] [] warn_slowpath_common+0x7a/0x93 Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677366] [] ? kvm_io_bus_register_dev+0x38/0x100 Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677395] [] warn_slowpath_null+0x15/0x17 Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677427] [] kvm_io_bus_register_dev+0x38/0x100 Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677455] [] kvm_create_pic+0x8e/0x11d Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677486] [] kvm_arch_vm_ioctl+0x1f4/0x83d Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677520] [] ? handle_mm_fault+0x2ce/0x8c6 Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677550] [] ? list_del+0xd/0x2b Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677581] [] kvm_vm_ioctl+0x610/0x64b Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677623] [] ? __schedule+0x531/0x78a Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677656] [] ? kvm_arch_dev_ioctl+0x101/0x167 Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677696] [] do_vfs_ioctl+0x34a/0x40e Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677720] [] SyS_ioctl+0x4b/0x76 Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677752] [] system_call_fastpath+0x16/0x1b Sep 14 14:55:11 user-Z97-D3H kernel: [11546.677772] ---[ end trace 17fafdc71a8c7d9f ]---

stuck on this issue...Any comment is appreciated. Thanks.

l1viathan commented 8 years ago

this seems to be a problem of host, This should never happen since igd_pgt is assigned in initialization, and never touched until de-initialization.

Did you see anything suspicious in dmesg? (the calltrace above is OK).

tcwu2005 commented 8 years ago

I will describe my environment first, Host: Hardware Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz , Kernel 3.14.1-igvt+ (kernel config file is config-3.14.1-host), boot option /vmlinuz-3.14.1-igvtro intel_iommu=igfx_off i915.hvm_boot_foreground=1 Guest: kernel 4.2 . boot option: i915.enable_ppgtt=0 i915.i915_enable_ppgtt=0 (installed in a image 'disk' Qemu parameter: ./qemu-system-x86_64 -bios ./bios.bin -enable-kvm -M pc -smp 2 -cpu host -m 1024 -machine kernel_irqchip=on -redir tcp:2222::22 -vgt -vga vgt disk

Here to paste suspicious part in dmesg: [ 0.844546] vGT info:(vgt_set_device_type:441) Detected Haswell [ 0.852509] bar-0 size: 400000 [ 0.860219] bar-1 size: 10000000 [ 0.867536] bar-2 size: 40 [ 0.874396] bar0: 0xf7800004, Bar1: 0xe000000c [ 0.881358] mmio size: 200000, gtt size: 200000 [ 0.888077] gttmmio: 0xf7800000, gmadr: 0xe0000000 [ 0.894670] gttmmio_base_va: 0xffffc90005280000 [ 0.901153] tmp_vgt_force_wake_setup()-107: jike: Using MT force wake [ 0.915021] gmadr_va: 0xffffc90005700000 [ 0.927523] vGT: GMBUS2 init value: 0, 800 [ 0.934880] vGT info:(initialize_gm_fence_allocation_bitmaps:313) total aperture: 0x10000000 bytes, total GM space: 0x80000000 bytes [ 0.950766] vGT info:(initialize_gm_fence_allocation_bitmaps:334) reserved aperture: [0xef800000, 0xf0000000) [ 0.967475] vGT: setup tracked reg info [ 0.976020] 711 listed, 652 used [ 0.984106] total 68277 registers tracked [ 0.992093] post mmio hooks initialized [ 0.999903] scratch page is allocated at gm(0xf800000) [ 1.007714] vGT info:(create_vgt_instance:118) vm_id=0, low_gm_sz=120MB, high_gm_sz=384MB, fence_sz=4, vgt_primary=1 [ 1.024010] vGT info:(create_vgt_instance:171) Virtual GTT size: 0x200000 [ 1.032604] VM0 Ring0 context_save_area is allocated at gm(f811000) [ 1.041211] VM0 Ring1 context_save_area is allocated at gm(f851000) [ 1.049509] VM0 Ring2 context_save_area is allocated at gm(f891000) [ 1.057489] VM0 Ring3 context_save_area is allocated at gm(f8d1000) [ 1.065490] vGT info:(create_vgt_instance:207) aperture: [0xe0000000, 0xe77fffff] guest [0xe0000000, 0xe77fffff] va(0xffffc90005700000) [ 1.082347] vGT info:(create_vgt_instance:218) GM: [0x0, 0x77fffff], [0x10000000, 0x27ffffff], guest[0x0, 0x77fffff], [0x10000000, 0x27ffffff] [ 1.101137] vGT info:(create_vgt_instance:255) filling VGT_PVINFO_PAGE for dom0: [ 1.101137] visable_gm_base=0x0, size=0x7800000 [ 1.101137] hidden_gm_base=0x10000000, size=0x18000000 [ 1.101137] fence_base=0, num=4 [ 1.147718] vGT(0): create debugfs node: virtual_mmio_space [ 1.156909] vGT(0): create debugfs node: shadow_mmio_space [ 1.165719] vGT(0): create debugfs node: frame_buffer_format [ 1.174163] vGT(0): create debugfs node: frame_buffer_format [ 1.182394] vGT: clear all GTT entries. [ 1.190638] ....dummy page (0xd7293000, 0xd7293000) [ 1.223418] vGT: allocate vGT aperture [ 1.265848] vGT: start kthread for dev (0, 10) [ 1.265863] vgt_initialize succeeds. seems be fine [ 1.346894] vGT: found matching pgt_device when registering irq for dev (0x10) [ 1.346924] [kvmgt] vgt_install_irq-1534: not request_irq here! [ 1.346963] vGT: allocate virq (-1) for i915, while keep original irq (16) for vgt [ 1.346978] vGT: track_nest: enabled vgt_install_irq IRQ installation fail???? [ 17.694632] Ring-2 starts work for vgt-0 [ 17.696225] vGT info:(vgt_handle_default_event_phys:822) IRQ: receive event (Blitter Command Streamer MI USER INTERRUPT) [ 17.696289] vGT info:(vgt_handle_default_event_virt:693) IRQ: VM(0) receive event (Blitter Command Streamer MI USER INTERRUPT) [ 17.696336] i9xx_update_plane [ 17.716637] vGT info:(vgt_handle_default_event_phys:822) IRQ: receive event (RP DOWN threshold interrupt) [ 17.716715] vGT info:(vgt_handle_default_event_virt:693) IRQ: VM(0) receive event (RP DOWN threshold interrupt) [ 17.834038] init: plymouth-upstart-bridge main process ended, respawning [ 20.109155] VM 0 activate context [ 20.109181] Ring-0 starts work for vgt-0 seems be fine [ 620.076247] ------------[ cut here ]------------ [ 620.076312] WARNING: CPU: 7 PID: 3108 at arch/x86/kvm/../../../virt/kvm/kvm_main.c:3002 kvm_io_bus_register_dev+0x38/0x100() [ 620.076313] Modules linked in: snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic fuse snd_hda_intel snd_hda_codec snd_hwdep ehci_pci snd_pcm_oss snd_mixer_oss snd_pcm ehci_hcd snd_timer parport_pc shpchp coretemp tpm_infineon battery snd soundcore hwmon x86_pkg_temp_thermal microcode ppdev tpm_tis tpm serio_raw acpi_cpufreq lp parport ext4 crc16 jbd2 mbcache usb_storage e1000e sd_mod ptp xhci_hcd pps_core [ 620.076585] CPU: 7 PID: 3108 Comm: qemu-system-x86 Tainted: G W 3.14.1-igvt+ #1 [ 620.076631] Hardware name: Gigabyte Technology Co., Ltd. Z97-D3H/Z97-D3H-CF, BIOS F8 04/21/2015 [ 620.076633] 0000000000000000 ffff8800cdefdce0 ffffffff8157118f 0000000000000000 [ 620.076670] ffff8800cdefdd18 ffffffff8108edbc ffffffff81008432 0000000000000001 [ 620.076707] ffff8800b7134000 ffff8800b7134008 0000000000000002 ffff8800cdefdd28 [ 620.076750] Call Trace: [ 620.076777] [] dump_stack+0x45/0x56 [ 620.076807] [] warn_slowpath_common+0x7a/0x93 [ 620.076840] [] ? kvm_io_bus_register_dev+0x38/0x100 [ 620.076868] [] warn_slowpath_null+0x15/0x17 [ 620.076900] [] kvm_io_bus_register_dev+0x38/0x100 [ 620.076928] [] kvm_create_pic+0x8e/0x11d [ 620.076958] [] kvm_arch_vm_ioctl+0x1f4/0x83d [ 620.076988] [] ? handle_mm_fault+0x2ce/0x8c6 [ 620.077013] [] ? list_del+0xd/0x2b [ 620.077040] [] kvm_vm_ioctl+0x610/0x64b [ 620.077067] [] ? schedule+0x531/0x78a [ 620.077098] [] ? kvm_arch_dev_ioctl+0x101/0x167 [ 620.077126] [] do_vfs_ioctl+0x34a/0x40e [ 620.077150] [] SyS_ioctl+0x4b/0x76 [ 620.077181] [] system_call_fastpath+0x16/0x1b [ 620.077205] ---[ end trace 65689b7ff7d987af ]--- the first warning call trace [ 869.161654] ------------[ cut here ]------------ [ 869.161715] WARNING: CPU: 5 PID: 3156 at arch/x86/kvm/../../../virt/kvm/kvm_main.c:736 install_new_memslots+0x45/0x116() [ 869.161716] Modules linked in: snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic fuse snd_hda_intel snd_hda_codec snd_hwdep ehci_pci snd_pcm_oss snd_mixer_oss snd_pcm ehci_hcd snd_timer parport_pc shpchp coretemp tpm_infineon battery snd soundcore hwmon x86_pkg_temp_thermal microcode ppdev tpm_tis tpm serio_raw acpi_cpufreq lp parport ext4 crc16 jbd2 mbcache usb_storage e1000e sd_mod ptp xhci_hcd pps_core [ 869.161987] CPU: 5 PID: 3156 Comm: qemu-system-x86 Tainted: G W 3.14.1-igvt+ #1 [ 869.162033] Hardware name: Gigabyte Technology Co., Ltd. Z97-D3H/Z97-D3H-CF, BIOS F8 04/21/2015 [ 869.162034] 0000000000000000 ffff8800b7177b70 ffffffff8157118f 0000000000000000 [ 869.162072] ffff8800b7177ba8 ffffffff8108edbc ffffffff81005005 ffff8800b93b4000 [ 869.162112] ffff8800b7144000 ffff8800b7177c68 ffff8800b93b4000 ffff8800b7177bb8 [ 869.162160] Call Trace: [ 869.162192] [] dump_stack+0x45/0x56 [ 869.162223] [] warn_slowpath_common+0x7a/0x93 [ 869.162269] [] ? install_new_memslots+0x45/0x116 [ 869.162310] [] warn_slowpath_null+0x15/0x17 [ 869.162341] [] install_new_memslots+0x45/0x116 [ 869.162374] [] kvm_set_memory_region+0x391/0x462 [ 869.162405] [] kvmgt_add_opreg_slot+0x62/0xa1 [ 869.162437] [] vgt_hvm_opregion_init+0x10a/0x291 [ 869.162468] [] create_vgt_instance+0x83e/0x978 [ 869.162503] [] vgt_create_instance_store+0x183/0x361 [ 869.162532] [] ? do_mmap_pgoff+0x2dc/0x347 [ 869.162559] [] kobj_attr_store+0xf/0x19 [ 869.162587] [] sysfs_kf_write+0x39/0x3b [ 869.162615] [] kernfs_fop_write+0xba/0xf7 [ 869.162640] [] vfs_write+0xbf/0x17c [ 869.162664] [] SyS_write+0x42/0x86 [ 869.162695] [] system_call_fastpath+0x16/0x1b [ 869.162715] ---[ end trace 65689b7ff7d987b0 ]--- 2nd warning call trace [ 904.617479] vGT warning:(get_sbi_reg_cached_value:1772) vGT(1): SBI reading did not find the cached value for offset 0x20c. 0 will be returned! [ 904.617829] vGT warning:(get_sbi_reg_cached_value:1772) vGT(1): SBI reading did not find the cached value for offset 0x2a00. 0 will be returned! [ 904.813133] vGT: activate vgt (1) on ring (0) [ 904.813153] vGT-1: add to render run queue! [ 904.813408] vGT: activate vgt (1) on ring (1) [ 904.813571] vGT: activate vgt (1) on ring (2) [ 904.813722] vGT: activate vgt (1) on ring (3) [ 904.931647] rebuild_pipe_mapping: Enable. pport = 4, vport = 4, hw_value = 0xc4030002, new_data = 0xc4030002 [ 904.945239] vGT warning:(get_sbi_reg_cached_value:1772) vGT(1): SBI reading did not find the cached value for offset 0x60c. 0 will be returned! [ 904.945321] vGT warning:(get_sbi_reg_cached_value:1772) vGT(1): SBI reading did not find the cached value for offset 0x600. 0 will be returned! [ 904.945402] vGT warning:(get_sbi_reg_cached_value:1772) vGT(1): SBI reading did not find the cached value for offset 0x610. 0 will be returned! [ 906.768299] VM3 write register RC_STATE_CTRL_1 with 0x0 [ 906.768345] VM3 write register RC_STATE_CTRL_1 with 0x0 [ 906.768480] VM3 write register RC_STATE_CTRL_1 with 0x88040000 [ 955.413099] [kvmgt] kvmgt_put_vgt-193: release vgt resource for KVM! [ 955.413124] prepare to destroy vgt (1) [ 955.413284] check render ownership... [ 955.413305] remove vgt(1) from runqueue safely [ 955.413328] vGT-1: disable render with enabled rings [ 955.413348] vGT-1: remove from render run queue! [ 955.413363] check display ownership... [ 955.413386] release display/render ownership... done [ 955.420161] vGT: vgt_release_instance done After some vGT warnings, it shows 'release vgt resource for KVM' and 'remove vgt(1) from runqueue safely' , very suspicious to me..... [ 1014.927644] kick_off_i915_isr()-104: jike: FIXME: igd_pgt is NULL! [ 1014.944276] kick_off_i915_isr()-104: jike: FIXME: igd_pgt is NULL! [ 1014.960907] kick_off_i915_isr()-104: jike: FIXME: igd_pgt is NULL! [ 1014.977539] kick_off_i915_isr()-104: jike: FIXME: igd_pgt is NULL! then a lots of igd_pgt null errors [ 1019.174381] vGT warning:(vgt_emulate_read:373) vGT: untracked MMIO read: vm_id(4), offset=0x40a0,len=4, val=0x0!!! [ 1019.174439] vGT warning:(vgt_emulate_read:373) vGT: untracked MMIO read: vm_id(4), offset=0x40b0,len=4, val=0x0!!! [ 1019.174507] vGT warning:(vgt_emulate_read:373) vGT: untracked MMIO read: vm_id(4), offset=0x20b0,len=4, val=0x0!!! [ 1019.174564] vGT warning:(vgt_emulate_read:373) vGT: untracked MMIO read: vm_id(4), offset=0x2024,len=4, val=0x0!!! [ 1019.174622] vGT warning:(vgt_emulate_read:373) vGT: untracked MMIO read: vm_id(4), offset=0x206c,len=4, val=0x0!!! [ 1019.174646] ------------------------------------------ [ 1019.174665] VM(4) likely triggers a gfx reset [ 1019.174689] Disable untracked MMIO warning for VM(4) and some other vGT warnings

For me it seems vgt should not be released but some reason it released and hence IRQ failed?? Willing to see your comment. Thanks in advance.

tcwu2005 commented 8 years ago

And some other suspicious messages

[ 1982.282639] vGT info:(vgt_vport_connection_store:594) Monitor detection: PORT_A is disconnected [ 1982.288493] vGT info:(vgt_vport_connection_store:594) Monitor detection: PORT_B is disconnected [ 1982.294091] vGT info:(vgt_vport_connection_store:594) Monitor detection: PORT_C is disconnected [ 1982.299259] vGT info:(vgt_vport_connection_store:594) Monitor detection: PORT_D is disconnected [ 1982.305191] vGT info:(vgt_vport_connection_store:582) Monitor detection: PORT_E is connected

it says PORT_E exists others(A-D) not exist, I'm not sure if this is important?

tcwu2005 commented 8 years ago

My guest OS is kernel4.1 because I read Readme.kvmgt , which says Kernel >4.1 should be ok. But not sure if this is worthy to spend more time to try it.

Maybe I should use the same kernel as the host (i.e. 3.14.1-igvt+) and give it a try? Any comment?

tcwu2005 commented 8 years ago

I kind of feel my trials till so far is gradually diverging. I will close this issue and try again alternately (for example, use the same guest kernel with host kernel and check hardware again, etc).