problem with dma-buf support for GVT-g
by Yu Zhang
Hi Xiaoguang Chen,
I find that you’ve offered six patches relative to dma-buf support for
GVT-g.
I happen to have a Skylake machine(i3-6100U), so I investigate the upstream
version of GVT-g on it.
I apply the six patches to gvt-stable-4.10. Besides, I start a Win7 guest
using QEMU- kvmgt_dmabuf_example with SDL enabled. Everything seems OK.
However, after the windows logo freezes, SDL shows nothing but a blank
window to me. The guest is working properly in background since it can be
connected and displayed normally by Tightvnc.
I debug QEMU and find that:
ui/intel_vgt.c 337: static void check_for_new_primary_buffer(void)
346: kvmgt_fd_ioctl always returns r = -22 and dmabuf.start =0.
ui/intel_vgt.c 112: static int kvmgt_fd_ioctl(int fd, int type, …)
122: ioctl always returns ret= -1
I think the six patches may not be applicable to gvt-stable-4.10.
Could you give me some advice?
Thanks.
Yu Zhang
3 years, 9 months
Re: [iGVT-g] Getting GPU crashes when trying to do something in the guest
by Nick S
After reading the installation guide here
<https://github.com/01org/gvt-linux/wiki/GVTg_Setup_Guide> again I found
that either a few settings have changed there since I used it, or may be I
mixed it up with the old architecture. So, I removed intel-iommu and added
kvm.ignore_msr:
BOOT_IMAGE=/vmlinuz-4.12.0-rc1+ root=/dev/mapper/ubuntu--vg-root ro
transparent_hugepage=never i915.enable_gvt=1 kvm.ignore_msrs=1
Now I do not see any stack dumps in dmesg but the GPU crash is still there:
[ 478.882874] [drm] GPU HANG: ecode 9:0:0x85ddfffb, reason: Hang on rcs0,
action: reset
[ 478.882875] [drm] GPU hangs can indicate a bug anywhere in the entire
gfx stack, including userspace.
[ 478.882876] [drm] Please file a _new_ bug report on bugs.freedesktop.org
against DRI -> DRM/Intel
[ 478.882876] [drm] drm/i915 developers can then reassign to the right
component if it's not a kernel issue.
[ 478.882876] [drm] The gpu crash dump is required to analyze gpu hangs,
so please always attach it.
[ 478.882877] [drm] GPU crash dump saved to /sys/class/drm/card0/error
QEMU command is as follows:
qemu-system-x86_64 -enable-kvm -cpu host,kvm=off -m 6144 -smp
sockets=1,cores=2,threads=2 \
-serial none -vga qxl \
-monitor stdio \
-ctrl-grab -no-quit \
-parallel none \
-usbdevice tablet -usbdevice keyboard \
$soundarg \
-name devvm \
-rtc base=localtime \
-netdev tap,id=hn0,ifname=tap0,script=no,downscript=no -device
e1000,netdev=hn0,id=nic1,mac=$macaddr \
-device virtio-scsi-pci,id=scsi \
-device scsi-hd,drive=hd,serial=$hddserial \
-machine kernel_irqchip=on \
-drive file=$folder/W7_UEFI.qcow2,id=hd,if=none \
-device
vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/a297db4a-f4c2-11e6-90f6-d3b88d6c9525,rombar=0
On Mon, May 22, 2017 at 8:49 AM, Nick S <nick.kvmhv(a)gmail.com> wrote:
> Hi,
>
> I am running the gvt-stable-4.11 branch on Intel(R) Core(TM) i7-6600U CPU
> @ 2.60GHz and after I run some 3D apps in the guest for just about a
> minute, I start getting crashes. The host system becomes very sluggish. In
> dmesg output I found this:
>
> [ 1040.892234] [drm] GPU HANG: ecode 9:0:0x85ddfffb, reason: Hang on rcs0,
> action: reset
> [ 1040.892235] [drm] GPU hangs can indicate a bug anywhere in the entire
> gfx stack, including userspace.
> [ 1040.892236] [drm] Please file a _new_ bug report on
> bugs.freedesktop.org against DRI -> DRM/Intel
> [ 1040.892236] [drm] drm/i915 developers can then reassign to the right
> component if it's not a kernel issue.
> [ 1040.892236] [drm] The gpu crash dump is required to analyze gpu hangs,
> so please always attach it.
> [ 1040.892237] [drm] GPU crash dump saved to /sys/class/drm/card0/error
> [ 1040.892280] drm/i915: Resetting chip after gpu hang
>
> Followed by a lot of stack prints (full dmesg: https://drive.google.
> com/file/d/0B2oGb-3cZoyJRUgzRGdwRnlWZG8/view?usp=sharing)
>
> Also, /sys/class/drm/card0/error here: https://drive.google.
> com/file/d/0B2oGb-3cZoyJQXBJcDRRcHNQcEk/view?usp=sharing
> I am not sure whether it would be of any use.
>
> I was getting similar stability issues on 4.10 branch and decided to try
> 4.11 before asking for help. One improvement I saw is that there is no
> longer a kworker thread left after running a VM.
>
> Another minor issue: for some reason on 4.11 I no longer
> see i915-GVTg_V5_1, only i915-GVTg_V5_2, _4 and _8.
>
> Thank you!
>
>
>
3 years, 9 months
Getting GPU crashes when trying to do something in the guest
by Nick S
Hi,
I am running the gvt-stable-4.11 branch on Intel(R) Core(TM) i7-6600U CPU @
2.60GHz and after I run some 3D apps in the guest for just about a minute,
I start getting crashes. The host system becomes very sluggish. In dmesg
output I found this:
[ 1040.892234] [drm] GPU HANG: ecode 9:0:0x85ddfffb, reason: Hang on rcs0,
action: reset
[ 1040.892235] [drm] GPU hangs can indicate a bug anywhere in the entire
gfx stack, including userspace.
[ 1040.892236] [drm] Please file a _new_ bug report on bugs.freedesktop.org
against DRI -> DRM/Intel
[ 1040.892236] [drm] drm/i915 developers can then reassign to the right
component if it's not a kernel issue.
[ 1040.892236] [drm] The gpu crash dump is required to analyze gpu hangs,
so please always attach it.
[ 1040.892237] [drm] GPU crash dump saved to /sys/class/drm/card0/error
[ 1040.892280] drm/i915: Resetting chip after gpu hang
Followed by a lot of stack prints (full dmesg:
https://drive.google.com/file/d/0B2oGb-3cZoyJRUgzRGdwRnlWZG8/view?usp=sha...
)
Also, /sys/class/drm/card0/error here:
https://drive.google.com/file/d/0B2oGb-3cZoyJQXBJcDRRcHNQcEk/view?usp=sha...
I am not sure whether it would be of any use.
I was getting similar stability issues on 4.10 branch and decided to try
4.11 before asking for help. One improvement I saw is that there is no
longer a kworker thread left after running a VM.
Another minor issue: for some reason on 4.11 I no longer
see i915-GVTg_V5_1, only i915-GVTg_V5_2, _4 and _8.
Thank you!
3 years, 9 months
XenGT/KVMGT roadmap questions
by Rich Persaud
After reviewing https://01.org/sites/default/files/downloads/igvt-g/gvtflyer.pdf and a few conference presentations, I have a few questions related to Xen client virtualization (Qubes, OpenXT) use cases.
1. Will GVT-g support Linux, Windows 7, Windows 8 and Windows 10 guests?
2. Could GVT-g present a "Skylake" vGPU to a VM on a Kaby Lake host?
3. Could Intel Skylake GPU drivers work with VT-d passthrough of a Kaby Lake GPU that was identified/presented to the guest as a "Skylake GPU"? This would be similar to CPU masking, i.e. only the Skylake subset of GPU features would be attempted by the guest.
4. Will GVT-g work on an Intel CPU that has VT-x + EPT, but no VT-d?
5. Will gaming (DirectX/OpenGL/Vulkan) and media (H.264/H.265/VP8/VP9) workloads be supported?
6. How many concurrent GVT-g VMs could P530/P630 support with gaming / media workloads?
7. On an Intel GPU that supports multiple (e.g. three or four) display outputs, could GVT-g show one full-screen VM per monitor / display output? Or would one VM own all three display outputs?
8. Is each VM limited to full screen, or could a custom compositor be developed to show scaled VMs in "windows" on the screen, or in dual/quad sections of the screen?
9. In theory, could GVT-g work on an Optimus system that has both Intel and Nvidia GPUs?
Thanks,
Rich
3 years, 9 months
there is only one resolution option in win7 guest
by Yu Zhang
Hi,
I follow the guide from
https://github.com/01org/gvt-linux/wiki/GVTg_Setup_Guide.
The Win7 guest works normally, but it's weird that there is only one
resolution option, i.e., 1280*720?
Environment conditions:
i3-6100U with HD520
Ubuntu16.04.1(Host), Win7-64(Guest)
kernel(gvt-stable-4.10 or gvt-stable-4.11)
QEMU(v.2.8.0)
kernel boot parameter: i915.enable_gvt=1 kvm.ignore_msrs=1 intel_iommu=off
QEMU command:
/home/rcd/upstream/qemu/x86_64-softmmu/qemu-system-x86_64 \
-bios /home/rcd/upstream/qemu/roms/seabios/out/bios.bin \
-enable-kvm -m 2048 \
-cpu host -smp 4,sockets=1,cores=4,threads=1 \
-localtime -usb -usbdevice tablet \
-M pc -machine kernel_irqchip=on \
-hda /home/rcd/win7x64_cf_1.qcow2 \
-device intel-hda,id=sound1 -device
hda-micro,id=sound1-codec1,bus=sound1.0,cad=1 \
-global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 \
-spice port=5901,disable-ticketing \
-net nic -net tap,ifname=tap1,script=/home/rcd/qemu-ifup,downscript=no \
-device
vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:00:02.0/c01d5270-391f-11e7-a887-efe04d8627e0,rombar=0
\
Is there any details missing?
Thanks.
Yu Zhang
3 years, 9 months
Windows 10 guest very unresponsive and stuttering video playback
by Maik Broemme
Hi,
I've tried iGVT-g on a Thinkpad X260 with a Core i7-6500U and HD 520.
I've followed instructions from https://github.com/01org/gvt-linux/wiki/GVTg_Setup_Guide
but the Windows 10 display via TightVNC feels very slow and
unresponsive. Also during first startup I got a reproducible kernel
oops:
[ 86.764371] [drm:intel_vgpu_emulate_mmio_read [i915]] *ERROR* gvt: vgpu1: read untracked MMIO d40(4B) val 0
[ 87.259798] ------------[ cut here ]------------
[ 87.259826] WARNING: CPU: 2 PID: 911 at drivers/gpu/drm/i915/gvt/gtt.c:1818 intel_vgpu_emulate_gtt_mmio_write+0x1cb/0x250 [i915]
[ 87.259827] vgpu1: found oob ggtt write, offset 0
[ 87.259828] Modules linked in: vhost_net vhost macvtap macvlan ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter md4 nls_utf8 cifs dns_resolver fscache ctr ccm bonding ipheth bridge stp llc tun snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic joydev snd_soc_skl snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core snd_soc_sst_match snd_soc_core snd_compress snd_pcm_dmaengine ac97_bus arc4 ext4 jbd2 iTCO_wdt fscrypto iTCO_vendor_support mbcache iwlmvm mac80211 intel_rapl snd_hda_intel iwlwifi x86_pkg_temp_thermal intel_powerclamp coretemp rtsx_pci_ms memstick cfg80211 snd_hda_codec kvm_intel intel_cstate intel_rapl_perf snd_hda_core snd_hwdep e1000e
[ 87.259854] input_leds mousedev evdev psmouse pcspkr snd_pcm ptp mac_hid snd_timer pps_core i2c_i801 shpchp btusb btrtl btbcm btintel bluetooth uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media crc16 kvmgt vfio_mdev vfio_iommu_type1 mdev vfio kvm irqbypass i915 drm_kms_helper option usb_wwan usbserial drm cdc_ether mei_me usbnet mii intel_gtt syscopyarea sysfillrect sysimgblt mei fb_sys_fops i2c_algo_bit intel_pch_thermal thinkpad_acpi wmi nvram snd soundcore rfkill led_class battery ac fjes video thermal tpm_tis tpm_tis_core tpm button sch_fq_codel ip_tables x_tables xfs libcrc32c crc32c_generic algif_skcipher af_alg hid_generic usbhid hid dm_crypt dm_mod sd_mod crct10dif_pclmul crc32_pclmul rtsx_pci_sdmmc crc32c_intel mmc_core serio_raw atkbd libps2 ghash_clmulni_intel
[ 87.259883] pcbc aesni_intel aes_x86_64 crypto_simd glue_helper cryptd ahci libahci xhci_pci libata xhci_hcd rtsx_pci scsi_mod usbcore usb_common i8042 serio
[ 87.259898] CPU: 2 PID: 911 Comm: CPU 0/KVM Not tainted 4.10.13-1-ARCH #1
[ 87.259898] Hardware name: LENOVO 20F6007RGE/20F6007RGE, BIOS R02ET48W (1.21 ) 06/01/2016
[ 87.259899] Call Trace:
[ 87.259903] dump_stack+0x63/0x83
[ 87.259906] __warn+0xcb/0xf0
[ 87.259908] warn_slowpath_fmt+0x5f/0x80
[ 87.259910] ? futex_wait+0x248/0x270
[ 87.259922] intel_vgpu_emulate_gtt_mmio_write+0x1cb/0x250 [i915]
[ 87.259933] intel_vgpu_emulate_mmio_write+0x373/0x600 [i915]
[ 87.259936] intel_vgpu_rw+0x110/0x140 [kvmgt]
[ 87.259937] intel_vgpu_write+0x13a/0x180 [kvmgt]
[ 87.259940] vfio_mdev_write+0x20/0x30 [vfio_mdev]
[ 87.259942] vfio_device_fops_write+0x24/0x30 [vfio]
[ 87.259944] __vfs_write+0x37/0x140
[ 87.259946] ? do_vfs_ioctl+0xa3/0x5f0
[ 87.259947] vfs_write+0xb6/0x1a0
[ 87.259950] SyS_pwrite64+0x95/0xb0
[ 87.259958] entry_SYSCALL_64_fastpath+0x1a/0xa9
[ 87.259960] RIP: 0033:0x7feba3a0c753
[ 87.259961] RSP: 002b:00007feb9657a720 EFLAGS: 00000293 ORIG_RAX: 0000000000000012
[ 87.259963] RAX: ffffffffffffffda RBX: 000000000000ae80 RCX: 00007feba3a0c753
[ 87.259964] RDX: 0000000000000004 RSI: 00007feb9657a740 RDI: 000000000000001f
[ 87.259965] RBP: 00007feb983cbc40 R08: 0000000000000000 R09: 00000000ffffffff
[ 87.259965] R10: 0000000000800000 R11: 0000000000000293 R12: 0000000000000000
[ 87.259966] R13: 00007febaa78c000 R14: 0000000000000000 R15: 00007feb983cbc40
[ 87.259967] ---[ end trace 999dd7d4b17db3cb ]---
This happens only for the first start of the VM. After that whenever I
do some activity via VNC I get a lot of the following errors:
[ 91.491549] [drm:intel_vgpu_emulate_mmio_write [i915]] *ERROR* gvt: vgpu1: write untracked MMIO 24e0 len 4 val 4de0
[ 91.491588] [drm:intel_vgpu_emulate_mmio_write [i915]] *ERROR* gvt: vgpu1: write untracked MMIO 24e4 len 4 val 4de4
[ 91.491650] [drm:intel_vgpu_emulate_mmio_write [i915]] *ERROR* gvt: vgpu1: write untracked MMIO 24e8 len 4 val 2248
[ 91.492361] [drm:intel_vgpu_emulate_mmio_read [i915]] *ERROR* gvt: vgpu1: read untracked MMIO 2120(4B) val 0
[ 91.492386] [drm:intel_vgpu_emulate_mmio_read [i915]] *ERROR* gvt: vgpu1: read untracked MMIO 2124(4B) val 0
[ 91.492549] [drm:intel_vgpu_emulate_mmio_read [i915]] *ERROR* gvt: vgpu1: read untracked MMIO fdc(4B) val 0
[ 91.492564] [drm:intel_vgpu_emulate_mmio_write [i915]] *ERROR* gvt: vgpu1: write untracked MMIO fdc len 4 val 10000000
[ 91.492616] [drm:intel_vgpu_emulate_mmio_read [i915]] *ERROR* gvt: vgpu1: read untracked MMIO 420b0(4B) val ce76c0
[ 91.492631] [drm:intel_vgpu_emulate_mmio_write [i915]] *ERROR* gvt: vgpu1: write untracked MMIO 420b0 len 4 val ce76c3
During Video playback of some h264 video I get lots of:
May 10 15:34:12 bart.theraso.int kernel: [drm:cmd_reg_handler.isra.7 [i915]] *ERROR* gvt: vgpu1: lri access to non-render register (1a17c)
May 10 15:34:12 bart.theraso.int kernel: [drm:cmd_reg_handler.isra.7 [i915]] *ERROR* gvt: vgpu1: lri access to non-render register (1a178)
May 10 15:34:12 bart.theraso.int kernel: [drm:cmd_reg_handler.isra.7 [i915]] *ERROR* gvt: vgpu1: lri access to non-render register (1a178)
Host kernel: 4.10.13
Intel Guest driver: 15.45.18.4664 (5/3/2017)
GVT-g device:
low_gm_size: 64MB
high_gm_size: 512MB
fence: 4
Does anybody has a clue why the VM feels so unresponsive? Also I've
disabled QXL adapter already in device manager. If I use the same VM
without GVT-g card with QXL + Spice its response time is much faster.
--Maik
3 years, 9 months