vfio.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. VFIO virtual device
  2. ===================
  3. Device types supported:
  4. KVM_DEV_TYPE_VFIO
  5. Only one VFIO instance may be created per VM. The created device
  6. tracks VFIO groups in use by the VM and features of those groups
  7. important to the correctness and acceleration of the VM. As groups
  8. are enabled and disabled for use by the VM, KVM should be updated
  9. about their presence. When registered with KVM, a reference to the
  10. VFIO-group is held by KVM.
  11. Groups:
  12. KVM_DEV_VFIO_GROUP
  13. KVM_DEV_VFIO_GROUP attributes:
  14. KVM_DEV_VFIO_GROUP_ADD: Add a VFIO group to VFIO-KVM device tracking
  15. kvm_device_attr.addr points to an int32_t file descriptor
  16. for the VFIO group.
  17. KVM_DEV_VFIO_GROUP_DEL: Remove a VFIO group from VFIO-KVM device tracking
  18. kvm_device_attr.addr points to an int32_t file descriptor
  19. for the VFIO group.
  20. KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE: attaches a guest visible TCE table
  21. allocated by sPAPR KVM.
  22. kvm_device_attr.addr points to a struct:
  23. struct kvm_vfio_spapr_tce {
  24. __s32 groupfd;
  25. __s32 tablefd;
  26. };
  27. where
  28. @groupfd is a file descriptor for a VFIO group;
  29. @tablefd is a file descriptor for a TCE table allocated via
  30. KVM_CREATE_SPAPR_TCE.