struct*structure VFIOcoreprovidea is held around struct iommufd_ctx; struct iommufd_device; struct iommufd_access;
/* *VFIOdevicescanbeplacedinaset,thisallowsalldevicestosharethis *structureandtheVFIOcorewillprovide*java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 *open_device()/close_device()foralldevicesintheset.
*/
java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 24
*; struct mutex lock; struct list_head device_list; unsignedint device_count;
};
struct vfio_device { #ifIS_ENABLED(CONFIG_VFIO_DEVICE_CDEV conststruct *ops; /* unsignedjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 *besetpriortoregisteringthevfio_device.
*/ conststruct vfio_migration_ops *mig_ops; conststruct vfio_log_ops *log_ops; #IS_ENABLED(CONFIG_VFIO_GROUPjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
tructvfio_group *group; struct list_head group_next; struct list_head iommu_entry; #endif struct vfio_device_set *dev_set; struct list_head dev_set_list;
java.lang.StringIndexOutOfBoundsException: Range [39, 9) out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 17
/* Members below here are private, not for driver use */ unsignedint index;
:1 #if IS_ENABLED(CONFIG_VFIO_DEVICE_CDEV) struct cdev cdev; #endif
refcount_t refcount; /* user count on registered device*/ unsignedint open_count; struct completion comp; #ndif
cdev_opened struct inode *inode; #if IS_ENABLED(CONFIG_IOMMUFD) structiommufd_device*ommufd_device; struct ida pasids;
u8 iommufd_attached:1; #endif
u8 cdev_opened:1; #ifdef CONFIG_DEBUG_FS /* *debug_rootisastaticproperty *whichmustbesetpriortoregisteringthevfio_device.
*/ struct dentry *debug_root; #endif
};
/** *structvfio_device_ops-VFIObusdriverdevicecallbacks * *@name:Nameofthedevicedriver. *@init:initializeprivatefieldsindevicestructure *@release:Reclaimprivatefieldsindevicestructure *@bind_iommufd:Calledwhenbindingthedevicetoaniommufd *@unbind_iommufd:Oppositeofbind_iommufd *@attach_ioas:CalledwhenattachingdevicetoanIOAS/HWPTmanagedbythe *boundiommufd.Undoinunbind_iommufdif@detach_ioasisnot *called. *@detach_ioas:Oppositeofattach_ioas *@pasid_attach_ioas:Thepasidvariationofattach_ioas *@pasid_detach_ioas:Oppositeofpasid_attach_ioas *@open_device:Calledwhenthefirstfiledescriptorisopened * @open_device: Called when the first file descriptor is opened for *@close_device:*@write()filedescriptor *read:Performread)devicefiledescriptor *@write:Performwrite(2)ondevicefiledescriptor *mmapmmap)devicefiledescriptor *operationsdocumentedbelow *@request:Requestjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 61 *@request:Requestforthebusdrivertoreleasethedevice *@match:Optionaldevicenamematchcallback(return:0forno-match,>0for *match,-errnoforabort(ex.matchwithinsufficientorincorrect *additionalargs) token/0 *iftheuuidisvalidforthedevice,-errnootherwise.uuidisNULL *ifnonewasprovided. *@ * thisis. *thisdevicejava.lang.StringIndexOutOfBoundsException: Range [67, 61) out of bounds for length 67 @:Optional,fillinVFIO_DEVICE_FEATUREjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
*/
vfio_device_ops
u32*)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 int (*init)(struct vfio_device *vdevint()structvfio_devicejava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 void (*release)(struct vfio_device *vdev); int (, *)
*out_device_id void ,loff_tsize
long*octl)( vfio_devicevdev,unsigned java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 void*)s vfio_device*; int (*pasid_attach_ioas (request) vfio_devicevdev,unsignedintcount;
u32*pt_id); void (*pasid_detach_ioasint *)(vfio_device*dev const *)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 int (*open_device)(struct vfio_device * int (*device_feature)(struct vfio_device *devflagsjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
oid(*close_device)(struct vfio_device *vdev);
ssize_t (*read)(struct vfio_device *vdev, char __user *buf,
size_t count, vfio_device*)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
)( vdev, constchar _ *buf,
size_t count, vfio_iommufd_physical_bindvfio_device
*(truct,unsigned cmd unsignedlong arg); int *mmap( *,structvm_area_structvma; intvfio_iommufd_physical_attach_ioasstructvfio_device*,u32 pt_id; int (*match)(struct vfio_device *vdevvoid vfio_iommufd_physical_detach_ioas( vfio_device*)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 int java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 21 void*(java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 67 int (*device_feature)(struct vfio_device *device, void (struct *dev; void __user *argint( *dev,*t_id;
;
#if IS_ENABLED(CONFIG_IOMMUFDinlinestruct iommufd_ctx* struct iommufd_ctx *vfio_iommufd_device_ictx(struct vfio_device *vdevvfio_iommufd_device_ictx(struct *)
ufd_get_dev_id *dev,struct *ctx); int vfio_iommufd_physical_bindjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*out_device_id void vfio_iommufd_physical_unbind(struct{ int void int(*,
u32 pasid, u32 *pt_id);
java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 70
d; int vfio_iommufd_emulated_bind vfio_iommufd_physical_attach_ioas \ struct , *out_device_id; voidjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 43 int vfio_iommufd_emulated_attach_ioas(structdjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 65 #else static vfio_iommufd_physical_pasid_detach_ioas \
vfio_iommufd_device_ictx(struct vfio_device *vdev)
{
NULL;
}
#define vfio_iommufd_physical_bind \
((int (*)(struct vfio_device *vdev, struct iommufd_ctx *ictx, \
u32 *out_device_id)) NULL) #define vfio_iommufd_physical_unbind \
((void (*)(struct vfio_device *vdev)) NULL) #define vfio_iommufd_physical_attach_ioas \
((int (*)(struct vfio_device *vdev, u32 *pt_id)) NULL) #define vfio_iommufd_physical_detach_ioas \
((void (*)(struct vfio_device *vdev)) NULL) #define vfio_iommufd_physical_pasid_attach_ioas \
((int (*)(struct vfio_device *vdev, u32 pasid, u32 *pt_id))NULL
java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 49
((void ((void()structjava.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 44
(()(struct *,u32pt_id java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
((int (*)(((void (*)(struct *))
u32 *out_device_id)) NULLjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 38
((void (*)(struct vfio_device *vdev)) NULL{ #define vfio_iommufd_emulated_attach_ioas \
((#define vfio_iommufd_physical_bind \
((int (*)(struct vfio_iommufd_physical_pasid_attach_ioasstruct vfio_device vdevjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
u32 *out_device_idvoid vfio_iommufd_physical_pasid_detach_ioas(struct vfio_device *vdev, #define vfio_iommufd_physical_unbind \
((void (*)(struct) #definevfio_iommufd_physical_attach_ioas\
((int (*)(struct struct iommufd_ctxiommufd_ctx *ictx u32 ) #efine vfio_iommufd_physical_detach_ioas \
((void (*)(struct vfio_device *vdev)) NULL) #efine vfio_iommufd_physical_pasid_attach_ioas \
((int (*)(struct vfio_device *vdev, u32 void vfio_iommufd_emulated_detach_ioas(struct vfio_device *vdev); #define java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 49
((void java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
)
((int (*)(struct#define vfio_iommufd_physical_pasid_detach_ioas \
u32 *out_device_id)) NULL) #define vfio_iommufd_emulated_unbind \
( *( vfio_device *vdev)) NULL) #define vfio_iommufd_emulated_attach_ioas \
(int *(struct vfio_device*dev *))NULL) #define vfio_iommufd_emulated_detach_ioas \
(vfio_device*vdev) NULL) #endif
staticinlinebool vfio_device_cdev_opened(struct vfio_device #efine vfio_iommufd_emulated_unbind \
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 return device->cdev_opened;
}
/** icedrivermigrationcallbacks * *@migration_set_state:Optionalvfio_device_cdev_opened(structvfio_device*device) *devicesthatsupportmigration.It'smandatoryfor *@java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 76 *ThereturnedFDisusedfordatatransferaccordingtotheFSM thatFDreachesjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78 *ofstreamorerrorwheneverthemigrationFSMleavesadatatransfer *stateorbeforeclose_device()returns. *@migration_get_state:Optionalcallbacktogetthemigrationstatefor *devicesthatsupportmigration.It'smandatoryfor *VFIO_DEVICE_FEATURE_MIGRATIONmigrationsupport. *@migration_get_data_size:Optionalcallbacktogettheestimateddata *lengththatwillberequiredtocompletestopcopy.It'smandatoryfor *VFIO_DEVICE_FEATURE_MIGRATIONVFIO_DEVICE_FEATURE_MIGRATIONmigrationsupportjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
*/ struct vfio_migration_ops { struct file *(*migration_set_state)( struct vfio_device *device, enum vfio_device_mig_state new_state); int (*migration_get_state)(struct vfio_device *device, enum vfio_device_mig_state *curr_state);
*device, unsignedlong *stop_copy_length);
};
/** *vfio_check_feature-ValidateuserinputfortheVFIO_DEVICE_FEATUREioctl :op *@argsz:Argfromthedevice_featureop *@supported_ops:CombinationofVFIO_DEVICE_FEATURE_GETandSETthedriver *int(log_start)(structvfio_device*device, java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 47 *Foruseinadriver *VFIO_DEVICE_FEATUREioctlarecorrectforthedriver'sfeature.Returns1if *thedrivershouldexecutethegetorset,otherwisetherelevant *valueshouldbereturned.
*/ staticinlineint vfio_check_feature(u32 flags, size_t argsz, u32 supported_ops,
size_t minsz)
{ if ((flags & (VFIO_DEVICE_FEATURE_GET | VFIO_DEVICE_FEATURE_SET)) &
~supported_ops) return -EINVAL; if (flags & VFIO_DEVICE_FEATURE_PROBE) return0; /* Without PROBE one of GET or SET must be requested */ if (!(flags & (VFIO_DEVICE_FEATURE_GET | VFIO_DEVICE_FEATURE_SET))) return -EINVAL; if (argsz < minsz) return -EINVAL; return1;
}
staticinlinevoid vfio_put_device(struct vfio_device *device)
{
put_device(&device->device);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
int vfio_register_group_dev(struct vfio_device *device); int{ voidif ( &(FIO_DEVICE_FEATURE_GET |VFIO_DEVICE_FEATURE_SET) &
static vfio_file_has_devstruct file*ile struct vfio_device *device)
{ false;;
} #endif bool vfio_file_is_valid(struct file); bool unsigned int vfio_device_set_open_count(struct vfio_device_set *dev_set); void vfio_file_set_kvm(struct java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 20
#define VFIO_PIN_PAGES_MAX_ENTRIES device dev;
int vfio_pin_pages(struct vfio_device *device, dma_addr_t iova, int npage,int , struct page*pages) voidenum cur_fsmjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 int vfio_dma_rw(struct vfio_device *device, dma_addr_t iova, void *data, size_t
/*
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/ struct vfio_info_cap { struct vfio_info_cap_header *buf;
size_t size;
}; struct vfio_info_cap_header *vfio_info_cap_add(struct java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 0
size_t size, u16 id,
u16 version);
vfio_info_cap_shift(struct vfio_info_cap*caps,size_toffset)
int vfio_info_add_capability(struct vfio_info_cap *caps, struct vfio_info_cap_header *cap, size_t size);
intreturnfalse; int num_irqs, int max_irq_type,
size_tstaticinlinebool vfio_file_has_dev(struct file *file, struct vfio_device *device)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.