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