2 Replies Latest reply on Sep 14, 2017 12:23 AM by sunshinemao

    How  to use amd s7150 gpu's sriov on KVM

    sunshinemao

      I want to use amd s7150 on KVM.

      I tried a lot of the environment, such as centos7.2, centos7.3, ubuntu17.4,but all not support sriov .

      Can you provide me with the gpu's drivers on KVM?

          • Re: How  to use amd s7150 gpu's sriov on KVM
            sunshinemao

            一、My System:

            AMD Graphics Card

                AMD FirePro s7150

            Desktop or Laptop System

                centos7.3 kvm

            Operating System

                windows 7

            Driver version installed

                [root@centos7-3 ~]# lsmod|grep amd

                amdkfd                134022  1

                amd_iommu_v2           18864  1 amdkfd

                amdgpu               1006224  0

                drm_kms_helper        146456  2 amdgpu,nouveau

                ttm                    93908  2 amdgpu,nouveau

                drm                   372540  5 ttm,drm_kms_helper,amdgpu,nouveau

                i2c_algo_bit           13413  3 igb,amdgpu,nouveau

                i2c_core               40756  7 drm,igb,i2c_i801,drm_kms_helper,i2c_algo_bit,amdgpu,nouveau

                [root@centos7-3 ~]#

                Kernel driver in use: amdgpu

                Kernel modules: amdgpu

            Display Devices

                vga

            Motherboard + Bios Revision

                BIOS Revision: 5.6

            CPU/APU

                Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz

            Power Supply Unit  Make, Model & Wattage

                Power Supply State: Safe

            RAM

                64G

               

                   

            二、My issue

            I can not found sriov_numvfs and sriov_totalvfs in /sys :

            The detail is:

            root@centos7-3 ~]# lspci -nn|grep -i vga

            02:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Tonga XT GL [FirePro S7150] [1002:6929]

            81:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF119 [GeForce 605] [10de:1048] (rev a1)

            [root@centos7-3 ~]# find /sys -name '*iov*'

            /sys/kernel/slab/biovec-16

            /sys/kernel/slab/biovec-64

            /sys/kernel/slab/iommu_iova

            /sys/kernel/slab/biovec-128

            /sys/kernel/slab/biovec-256

            /sys/kernel/debug/tracing/events/skb/skb_copy_datagram_iovec

            [root@centos7-3 ~]# find /sys -name '*02:00.0*'

            /sys/bus/pci/devices/0000:02:00.0

            /sys/bus/pci/drivers/amdgpu/0000:02:00.0

            /sys/devices/pci0000:00/0000:00:03.0/0000:02:00.0

            /sys/devices/virtual/iommu/dmar1/devices/0000:02:00.0

            /sys/kernel/iommu_groups/43/devices/0000:02:00.0

            [root@centos7-3 ~]# ls -lh /sys/devices/virtual/iommu/dmar1/devices/0000:02:00.0

            lrwxrwxrwx. 1 root root 0 Jul 31 21:45 /sys/devices/virtual/iommu/dmar1/devices/0000:02:00.0 -> ../../../../pci0000:00/0000:00:03.0/0000:02:00.0

            [root@centos7-3 ~]# ls -lh /sys/kernel/iommu_groups/43/devices/0000:02:00.0

            lrwxrwxrwx. 1 root root 0 Jul 31 21:45 /sys/kernel/iommu_groups/43/devices/0000:02:00.0 -> ../../../../devices/pci0000:00/0000:00:03.0/0000:02:00.0

            [root@centos7-3 ~]# ls -lh /sys/bus/pci/devices/0000:02:00.0

            lrwxrwxrwx. 1 root root 0 Jul 31 21:39 /sys/bus/pci/devices/0000:02:00.0 -> ../../../devices/pci0000:00/0000:00:03.0/0000:02:00.0

            [root@centos7-3 ~]# ls -lh /sys/bus/pci/drivers/amdgpu/0000:02:00.0

            lrwxrwxrwx. 1 root root 0 Jul 31 21:45 /sys/bus/pci/drivers/amdgpu/0000:02:00.0 -> ../../../../devices/pci0000:00/0000:00:03.0/0000:02:00.0

            [root@centos7-3 ~]# ls -lh /sys/devices/pci0000:00/0000:00:03.0/0000:02:00.0

            total 0

            -r--r--r--. 1 root root 4.0K Jul 31 21:45 boot_vga

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 broken_parity_status

            -r--r--r--. 1 root root 4.0K Jul 31 21:39 class

            -rw-r--r--. 1 root root 4.0K Jul 31 21:43 config

            -r--r--r--. 1 root root 4.0K Jul 31 21:45 consistent_dma_mask_bits

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 d3cold_allowed

            -r--r--r--. 1 root root 4.0K Jul 31 21:43 device

            -r--r--r--. 1 root root 4.0K Jul 31 21:45 dma_mask_bits

            lrwxrwxrwx. 1 root root    0 Jul 31 21:39 driver -> ../../../../bus/pci/drivers/amdgpu

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 driver_override

            drwxr-xr-x. 5 root root    0 Jul 31 21:39 drm

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 enable

            lrwxrwxrwx. 1 root root    0 Jul 31 21:45 firmware_node -> ../../../LNXSYSTM:00/device:00/PNP0A08:00/device:a2/device:a3

            drwxr-xr-x. 3 root root    0 Jul 31 21:39 hwmon

            drwxr-xr-x. 3 root root    0 Jul 31 21:39 i2c-13

            drwxr-xr-x. 3 root root    0 Jul 31 21:39 i2c-14

            drwxr-xr-x. 3 root root    0 Jul 31 21:39 i2c-15

            drwxr-xr-x. 3 root root    0 Jul 31 21:39 i2c-16

            drwxr-xr-x. 3 root root    0 Jul 31 21:39 i2c-17

            drwxr-xr-x. 3 root root    0 Jul 31 21:39 i2c-18

            drwxr-xr-x. 3 root root    0 Jul 31 21:39 i2c-19

            drwxr-xr-x. 3 root root    0 Jul 31 21:39 i2c-20

            lrwxrwxrwx. 1 root root    0 Jul 31 21:45 iommu -> ../../../virtual/iommu/dmar1

            lrwxrwxrwx. 1 root root    0 Jul 31 21:45 iommu_group -> ../../../../kernel/iommu_groups/43

            -r--r--r--. 1 root root 4.0K Jul 31 21:43 irq

            -r--r--r--. 1 root root 4.0K Jul 31 21:45 local_cpulist

            -r--r--r--. 1 root root 4.0K Jul 31 21:39 local_cpus

            -r--r--r--. 1 root root 4.0K Jul 31 21:45 modalias

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 msi_bus

            drwxr-xr-x. 2 root root    0 Jul 31 21:39 msi_irqs

            -rw-r--r--. 1 root root 4.0K Jul 31 21:39 numa_node

            drwxr-xr-x. 2 root root    0 Jul 31 21:44 power

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 power_dpm_force_performance_level

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 power_dpm_state

            -r--r--r--. 1 root root 4.0K Jul 31 21:45 pp_cur_state

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 pp_dpm_mclk

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 pp_dpm_pcie

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 pp_dpm_sclk

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 pp_force_state

            -r--r--r--. 1 root root 4.0K Jul 31 21:45 pp_num_states

            -rw-r--r--. 1 root root 4.0K Jul 31 21:45 pp_table

            --w--w----. 1 root root 4.0K Jul 31 21:45 remove

            --w--w----. 1 root root 4.0K Jul 31 21:45 rescan

            --w-------. 1 root root 4.0K Jul 31 21:45 reset

            -r--r--r--. 1 root root 4.0K Jul 31 21:43 resource

            -rw-------. 1 root root 256M Jul 31 21:45 resource0

            -rw-------. 1 root root 256M Jul 31 21:45 resource0_wc

            -rw-------. 1 root root 2.0M Jul 31 21:45 resource2

            -rw-------. 1 root root 2.0M Jul 31 21:45 resource2_wc

            -rw-------. 1 root root  256 Jul 31 21:45 resource4

            -rw-------. 1 root root 256K Jul 31 21:45 resource5

            -rw-------. 1 root root 128K Jul 31 21:45 rom

            lrwxrwxrwx. 1 root root    0 Jul 31 21:39 subsystem -> ../../../../bus/pci

            -r--r--r--. 1 root root 4.0K Jul 31 21:45 subsystem_device

            -r--r--r--. 1 root root 4.0K Jul 31 21:45 subsystem_vendor

            -rw-r--r--. 1 root root 4.0K Jul 31 21:39 uevent

            -r--r--r--. 1 root root 4.0K Jul 31 21:43 vendor