Home
last modified time | relevance | path

Searched refs:dev_fd (Results 1 – 7 of 7) sorted by relevance

/linux-6.12.1/tools/testing/selftests/nci/
Dnci_dev.c324 int dev_fd; in virtual_dev_open() local
327 dev_fd = *(int *)data; in virtual_dev_open()
329 len = read(dev_fd, buf, 258); in virtual_dev_open()
336 write(dev_fd, nci_reset_rsp, sizeof(nci_reset_rsp)); in virtual_dev_open()
338 len = read(dev_fd, buf, 258); in virtual_dev_open()
345 write(dev_fd, nci_init_rsp, sizeof(nci_init_rsp)); in virtual_dev_open()
347 len = read(dev_fd, buf, 258); in virtual_dev_open()
354 write(dev_fd, nci_rf_disc_map_rsp, sizeof(nci_rf_disc_map_rsp)); in virtual_dev_open()
364 int dev_fd; in virtual_dev_open_v2() local
367 dev_fd = *(int *)data; in virtual_dev_open_v2()
[all …]
/linux-6.12.1/tools/testing/selftests/kvm/include/
Dkvm_util.h756 int __kvm_has_device_attr(int dev_fd, uint32_t group, uint64_t attr);
758 static inline void kvm_has_device_attr(int dev_fd, uint32_t group, uint64_t attr) in kvm_has_device_attr() argument
760 int ret = __kvm_has_device_attr(dev_fd, group, attr); in kvm_has_device_attr()
765 int __kvm_device_attr_get(int dev_fd, uint32_t group, uint64_t attr, void *val);
767 static inline void kvm_device_attr_get(int dev_fd, uint32_t group, in kvm_device_attr_get() argument
770 int ret = __kvm_device_attr_get(dev_fd, group, attr, val); in kvm_device_attr_get()
775 int __kvm_device_attr_set(int dev_fd, uint32_t group, uint64_t attr, void *val);
777 static inline void kvm_device_attr_set(int dev_fd, uint32_t group, in kvm_device_attr_set() argument
780 int ret = __kvm_device_attr_set(dev_fd, group, attr, val); in kvm_device_attr_set()
/linux-6.12.1/Documentation/userspace-api/
Dvduse.rst113 static int vduse_message_handler(int dev_fd)
119 len = read(dev_fd, &req, sizeof(req));
131 len = write(dev_fd, &resp, sizeof(resp));
185 static void *iova_to_va(int dev_fd, uint64_t iova, uint64_t *len)
199 fd = ioctl(dev_fd, VDUSE_IOTLB_GET_FD, &entry);
/linux-6.12.1/tools/testing/selftests/kvm/lib/
Dkvm_util.c1234 int dev_fd, ret; in vcpu_mmap_sz() local
1236 dev_fd = open_kvm_dev_path_or_exit(); in vcpu_mmap_sz()
1238 ret = ioctl(dev_fd, KVM_GET_VCPU_MMAP_SIZE, NULL); in vcpu_mmap_sz()
1242 close(dev_fd); in vcpu_mmap_sz()
1730 int __kvm_has_device_attr(int dev_fd, uint32_t group, uint64_t attr) in __kvm_has_device_attr() argument
1738 return ioctl(dev_fd, KVM_HAS_DEVICE_ATTR, &attribute); in __kvm_has_device_attr()
1765 int __kvm_device_attr_get(int dev_fd, uint32_t group, uint64_t attr, void *val) in __kvm_device_attr_get() argument
1774 return __kvm_ioctl(dev_fd, KVM_GET_DEVICE_ATTR, &kvmattr); in __kvm_device_attr_get()
1777 int __kvm_device_attr_set(int dev_fd, uint32_t group, uint64_t attr, void *val) in __kvm_device_attr_set() argument
1786 return __kvm_ioctl(dev_fd, KVM_SET_DEVICE_ATTR, &kvmattr); in __kvm_device_attr_set()
/linux-6.12.1/Documentation/target/
Dtcmu-design.rst308 int fd, dev_fd;
331 dev_fd = open("/dev/uio0", O_RDWR);
332 map = mmap(NULL, map_len, PROT_READ|PROT_WRITE, MAP_SHARED, dev_fd, 0);
340 int ret = read(dev_fd, buf, 4); /* will block */
342 handle_device_events(dev_fd, map);
/linux-6.12.1/Documentation/arch/x86/
Dresctrl.rst1138 int dev_fd;
1151 dev_fd = open("/dev/pseudo_lock/newlock", O_RDWR);
1152 if (dev_fd < 0) {
1158 dev_fd, 0);
1161 close(dev_fd);
1170 close(dev_fd);
1174 close(dev_fd);
/linux-6.12.1/Documentation/virt/kvm/
Dapi.rst183 vm_fd = ioctl(dev_fd, KVM_CREATE_VM, KVM_VM_TYPE_ARM_IPA_SIZE(48));