Home
last modified time | relevance | path

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

/openbmc/qemu/hw/intc/
H A Darm_gicv3_its_kvm.c85 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL, in vm_change_state_handler()
96 s->dev_fd = kvm_create_device(kvm_state, KVM_DEV_TYPE_ARM_VGIC_ITS, false); in kvm_arm_its_realize()
97 if (s->dev_fd < 0) { in kvm_arm_its_realize()
98 error_setg_errno(errp, -s->dev_fd, "error creating in-kernel ITS"); in kvm_arm_its_realize()
103 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL, in kvm_arm_its_realize()
108 KVM_VGIC_ITS_ADDR_TYPE, s->dev_fd, 0); in kvm_arm_its_realize()
114 if (!kvm_device_check_attr(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_ITS_REGS, in kvm_arm_its_realize()
141 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_ITS_REGS, in kvm_arm_its_pre_save()
146 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_ITS_REGS, in kvm_arm_its_pre_save()
149 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_ITS_REGS, in kvm_arm_its_pre_save()
[all …]
H A Darm_gic_kvm.c84 return s->dev_fd >= 0; in kvm_arm_gic_can_save_restore()
96 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_DIST_REGS, in kvm_gicd_access()
103 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CPU_REGS, in kvm_gicc_access()
532 s->dev_fd = -1; in kvm_arm_gic_realize()
535 s->dev_fd = ret; in kvm_arm_gic_realize()
538 if (kvm_device_check_attr(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_NR_IRQS, 0)) { in kvm_arm_gic_realize()
540 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_NR_IRQS, 0, in kvm_arm_gic_realize()
544 if (kvm_device_check_attr(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL, in kvm_arm_gic_realize()
546 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL, in kvm_arm_gic_realize()
563 s->dev_fd, 0); in kvm_arm_gic_realize()
[all …]
H A Darm_gicv3_kvm.c96 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_DIST_REGS, in kvm_gicd_access()
104 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_REDIST_REGS, in kvm_gicr_access()
112 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS, in kvm_gicc_access()
120 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO, in kvm_gic_line_level_access()
699 kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS, in arm_gicv3_icc_reset()
769 ret = kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL, in vm_change_state_handler()
822 s->dev_fd = kvm_create_device(kvm_state, KVM_DEV_TYPE_ARM_VGIC_V3, false); in kvm_arm_gicv3_realize()
823 if (s->dev_fd < 0) { in kvm_arm_gicv3_realize()
824 error_setg_errno(errp, -s->dev_fd, "error creating in-kernel VGIC"); in kvm_arm_gicv3_realize()
829 kvm_device_check_attr(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_ADDR, in kvm_arm_gicv3_realize()
[all …]
/openbmc/linux/tools/testing/selftests/nci/
H A 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 …]
/openbmc/openbmc/poky/meta/recipes-devtools/syslinux/syslinux/
H A D0003-linux-syslinux-implement-install_to_ext2.patch44 + int i_flags, int dev_fd, const char *subdir)
49 static int install_to_ext2(const char *device, int dev_fd, const char *subdir)
73 + boot_image_len, EXT2_IMMUTABLE_FL, dev_fd, subdir);
83 + syslinux_ldlinuxc32_len, 0, dev_fd, subdir);
104 + retval = install_bootblock(dev_fd, device);
105 + close(dev_fd);
H A D0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch267 +static uint64_t get_size(int dev_fd)
274 + if (!ioctl(dev_fd, BLKGETSIZE64, &bytes))
277 + if (!ioctl(dev_fd, BLKGETSIZE, &sects))
279 + else if (!fstat(dev_fd, &st) && st.st_size)
293 +static int sysfs_get_offset(int dev_fd, unsigned long *start)
300 + if (fstat(dev_fd, &st))
336 +static int get_geometry(int dev_fd, uint64_t totalbytes, struct hd_geometry *geo)
346 + if (!ioctl(dev_fd, HDIO_GETGEO, geo)) {
348 + } else if (!ioctl(dev_fd, FDGETPRM, &fd_str)) {
383 + if (!ioctl(dev_fd, LOOP_GET_STATUS64, &li64))
[all …]
H A D0001-linux-syslinux-support-ext2-3-4-device.patch42 +static int install_to_ext2(const char *device, int dev_fd, const char *subdir)
58 + if (install_to_ext2(opt.device, dev_fd, subdir)) {
71 xpread(dev_fd, sectbuf, SECTOR_SIZE, opt.offset);
72 fsync(dev_fd);
H A D0006-linux-syslinux-implement-write_to_ext-and-add-syslin.patch34 +void syslinux_patch_bootsect(int dev_fd)
48 +void syslinux_patch_bootsect(int dev_fd);
98 int i_flags, int dev_fd, const char *subdir)
183 + syslinux_patch_bootsect(dev_fd);
/openbmc/linux/tools/testing/selftests/kvm/include/
H A Dkvm_util_base.h594 int __kvm_has_device_attr(int dev_fd, uint32_t group, uint64_t attr);
596 static inline void kvm_has_device_attr(int dev_fd, uint32_t group, uint64_t attr) in kvm_has_device_attr() argument
598 int ret = __kvm_has_device_attr(dev_fd, group, attr); in kvm_has_device_attr()
603 int __kvm_device_attr_get(int dev_fd, uint32_t group, uint64_t attr, void *val);
605 static inline void kvm_device_attr_get(int dev_fd, uint32_t group, in kvm_device_attr_get() argument
608 int ret = __kvm_device_attr_get(dev_fd, group, attr, val); in kvm_device_attr_get()
613 int __kvm_device_attr_set(int dev_fd, uint32_t group, uint64_t attr, void *val);
615 static inline void kvm_device_attr_set(int dev_fd, uint32_t group, in kvm_device_attr_set() argument
618 int ret = __kvm_device_attr_set(dev_fd, group, attr, val); in kvm_device_attr_set()
/openbmc/linux/Documentation/userspace-api/
H A 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);
/openbmc/linux/tools/testing/selftests/kvm/lib/
H A Dkvm_util.c1187 int dev_fd, ret; in vcpu_mmap_sz() local
1189 dev_fd = open_kvm_dev_path_or_exit(); in vcpu_mmap_sz()
1191 ret = ioctl(dev_fd, KVM_GET_VCPU_MMAP_SIZE, NULL); in vcpu_mmap_sz()
1195 close(dev_fd); in vcpu_mmap_sz()
1665 int __kvm_has_device_attr(int dev_fd, uint32_t group, uint64_t attr) in __kvm_has_device_attr() argument
1673 return ioctl(dev_fd, KVM_HAS_DEVICE_ATTR, &attribute); in __kvm_has_device_attr()
1700 int __kvm_device_attr_get(int dev_fd, uint32_t group, uint64_t attr, void *val) in __kvm_device_attr_get() argument
1709 return __kvm_ioctl(dev_fd, KVM_GET_DEVICE_ATTR, &kvmattr); in __kvm_device_attr_get()
1712 int __kvm_device_attr_set(int dev_fd, uint32_t group, uint64_t attr, void *val) in __kvm_device_attr_set() argument
1721 return __kvm_ioctl(dev_fd, KVM_SET_DEVICE_ATTR, &kvmattr); in __kvm_device_attr_set()
/openbmc/qemu/include/hw/intc/
H A Darm_gicv3_its_common.h66 int dev_fd; /* kvm device fd if backed by kvm vgic support */ member
H A Darm_gic_common.h147 int dev_fd; /* kvm device fd if backed by kvm vgic support */ member
H A Darm_gicv3_common.h241 int dev_fd; /* kvm device fd if backed by kvm vgic support */ member
/openbmc/qemu/target/arm/
H A Dkvm_arm.h36 uint64_t attr, int dev_fd, uint64_t addr_ormask);
H A Dkvm.c655 int dev_fd; member
699 ret = kvm_device_ioctl(kd->dev_fd, KVM_SET_DEVICE_ATTR, attr); in kvm_arm_set_device_addr()
728 uint64_t attr, int dev_fd, uint64_t addr_ormask) in kvm_arm_register_device() argument
747 kd->dev_fd = dev_fd; in kvm_arm_register_device()
/openbmc/linux/Documentation/target/
H A 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);
/openbmc/linux/Documentation/arch/x86/
H A Dresctrl.rst1079 int dev_fd;
1092 dev_fd = open("/dev/pseudo_lock/newlock", O_RDWR);
1093 if (dev_fd < 0) {
1099 dev_fd, 0);
1102 close(dev_fd);
1111 close(dev_fd);
1115 close(dev_fd);
/openbmc/openbmc/meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/files/
H A D0005-Replace-off64_t-stat64-with-off_t-stat.patch657 if (pwrite(dev_fd, lb, sizeof(lb), off) < 0)
/openbmc/qemu/accel/kvm/
H A Dkvm-all.c3388 int kvm_device_check_attr(int dev_fd, uint32_t group, uint64_t attr) in kvm_device_check_attr() argument
3396 return kvm_device_ioctl(dev_fd, KVM_HAS_DEVICE_ATTR, &attribute) ? 0 : 1; in kvm_device_check_attr()
/openbmc/linux/Documentation/virt/kvm/
H A Dapi.rst164 vm_fd = ioctl(dev_fd, KVM_CREATE_VM, KVM_VM_TYPE_ARM_IPA_SIZE(48));