How to upgrade kernel from 4.4.38 to 4.13???

https://devtalk.nvidia.com/default/topic/1017942/jetson-tx2-ioctl-dev-gt-contfd-vfio_set_iommu-vfio_type1_iommu-hang-up-/#5205343

Hi, i want to porting a user space nvme driver(github) which will use VFIO to Nvidia Jetson Tx2 and then I faced some issue.
In my userspace code,I sent lots of IOCTL to VFIO reference kernel /Documentation/vfio.txt,and during the VFIO_SET_IOMMU ioctl,the kernel oops BUG 0 occurred.
So if i want to upgrade kernel 4.4.38 to 4.13 on Nvidia Jetson Tx2,can you give me some guide and some advice?
I am looking forward to you reply.

I faced same issue, looks like it’s very hard to upgrade kernel by ourselves.

You are more likely to succeed backporting the 4.13 driver into 4.4.38.

Hi,xiaojie

Have you tried with QEMU?

To verify VFIO on arm, I am using QEMU to simulate an arm architecture referrence: http://www.linaro.org/blog/core-dump/kvm-pciemsi-passthrough-armarm64/

In Conclusions Chapter of this document, after Module Loading and VFIO-PCI driver binding on the host PC, launch the QEMU simulator.
The command line I used to launch the QEMU is:
qemu-system-arm -M vexpress-a9 -m 512M -dtb extra_folder/vexpress-v2p-ca9.dtb -kernel extra_folder/zImage -device vfio-pci,host=04:00.0 -append “root=/dev/mmcblk0 rw” -sd …/busybox-1.25.1/a9rootfs.ext3

The command result is:
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_input_mute() failed
pulseaudio: Reason: Invalid argument
qemu-system-arm: -device vfio-pci,host=04:00.0: No ‘PCI’ bus found for device ‘vfio-pci’

My host PC is running on ubuntu14.04 and I can find /dev/vfio/vfio, /sys/bus/pci/drivers/vfio-pci.
My NVMe storage device is on 04:00.0.
I don’t know why the qemu-system-arm still can’t find PCI bus for vfio-pci.

Maybe you can try this way.