GPUOpen-LibrariesAndSDKs / MxGPU-Virtualization

MIT License
190 stars 89 forks source link

GIM

Copyright (c) 2014-2019 Advanced Micro Devices, Inc. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE

What is GIM?

GIM (GPU-IOV Module) is a Linux kernel module for AMD SR-IOV based HW Virtualization (MxGPU) product. It can support KVM, open source Xen and any other Linux kernel based hypervisors with necessary kernel compatibility modification. GIM is reponsible for:

DOCUMENTATION:

All documents are listed in SRC_ROOT/docs

SOFTWARE REQUIREMENTS:

HOW TO BUILD & INSTALL:

All driver source codes are under SRC_ROOT/drv.

  1. Typing command "make" in terminal under SRC_ROOT/drv can generate gim.ko.
  2. Typing command "make install" in terminal under SRC_ROOT/drv can install gim.ko to /lib/modules/$(KERNELRELEASE)/GIM/.
  3. Generally, Just run helper SRC_ROOT/gim.sh in a command terminal also can completed build and installation. And gim.sh -help can display usages.
  4. Blacklist amdgpu and amdkfd and reboot the server. Such as, under Ubuntu, by adding the following line to the end of file /etc/modprobe.d/blacklist.conf

    blacklist amdgpu
    blacklist amdkfd

    HOW TO LOAD:

  5. Typing command "modprobe gim" in terminal can load gim driver
  6. Usually, Typing command "lsmod | grep gim " and "lspci | grep AMD" in terminal can help to check if gim driver is loaded

HOW TO CONFIGURE BUILD:

Read this section carefully. New configuration options could be added in each release, and unexpected problems can occur if the configuration files are not set up as expected.

HISTORY: