PATH: //proc/self/root/proc/thread-self/root/proc/thread-self/root/usr/include/linux
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
π a.out.h
β
X
π acct.h
β
X
π acrn.h
β
X
π adb.h
β
X
π adfs_fs.h
β
X
π affs_hardblocks.h
β
X
π agpgart.h
β
X
π aio_abi.h
β
X
π am437x-vpfe.h
β
X
π android/
X
π apm_bios.h
β
X
π arcfb.h
β
X
π arm_sdei.h
β
X
π aspeed-lpc-ctrl.h
β
X
π aspeed-p2a-ctrl.h
β
X
π atalk.h
β
X
π atm.h
β
X
π atm_eni.h
β
X
π atm_he.h
β
X
π atm_idt77105.h
β
X
π atm_nicstar.h
β
X
π atm_tcp.h
β
X
π atm_zatm.h
β
X
π atmapi.h
β
X
π atmarp.h
β
X
π atmbr2684.h
β
X
π atmclip.h
β
X
π atmdev.h
β
X
π atmioc.h
β
X
π atmlec.h
β
X
π atmmpc.h
β
X
π atmppp.h
β
X
π atmsap.h
β
X
π atmsvc.h
β
X
π audit.h
β
X
π auto_dev-ioctl.h
β
X
π auto_fs.h
β
X
π auto_fs4.h
β
X
π auxvec.h
β
X
π ax25.h
β
X
π batadv_packet.h
β
X
π batman_adv.h
β
X
π baycom.h
β
X
π bcm933xx_hcs.h
β
X
π bfs_fs.h
β
X
π binfmts.h
β
X
π bits.h
β
X
π blkpg.h
β
X
π blktrace_api.h
β
X
π blkzoned.h
β
X
π bpf.h
β
X
π bpf_common.h
β
X
π bpf_perf_event.h
β
X
π bpfilter.h
β
X
π bpqether.h
β
X
π bsg.h
β
X
π bt-bmc.h
β
X
π btf.h
β
X
π btrfs.h
β
X
π btrfs_tree.h
β
X
π byteorder/
X
π cachefiles.h
β
X
π caif/
X
π can/
X
π can.h
β
X
π capability.h
β
X
π capi.h
β
X
π cciss_defs.h
β
X
π cciss_ioctl.h
β
X
π ccs.h
β
X
π cdrom.h
β
X
π cec-funcs.h
β
X
π cec.h
β
X
π cfm_bridge.h
β
X
π cgroupstats.h
β
X
π chio.h
β
X
π cifs/
X
π close_range.h
β
X
π cm4000_cs.h
β
X
π cn_proc.h
β
X
π coda.h
β
X
π coff.h
β
X
π connector.h
β
X
π const.h
β
X
π coresight-stm.h
β
X
π cramfs_fs.h
β
X
π cryptouser.h
β
X
π cuda.h
β
X
π cxl_mem.h
β
X
π cycx_cfm.h
β
X
π dcbnl.h
β
X
π dccp.h
β
X
π devlink.h
β
X
π dlm.h
β
X
π dlm_device.h
β
X
π dlm_netlink.h
β
X
π dlm_plock.h
β
X
π dlmconstants.h
β
X
π dm-ioctl.h
β
X
π dm-log-userspace.h
β
X
π dma-buf.h
β
X
π dma-heap.h
β
X
π dn.h
β
X
π dns_resolver.h
β
X
π dpll.h
β
X
π dqblk_xfs.h
β
X
π dvb/
X
π edd.h
β
X
π efs_fs_sb.h
β
X
π elf-em.h
β
X
π elf-fdpic.h
β
X
π elf.h
β
X
π errno.h
β
X
π errqueue.h
β
X
π erspan.h
β
X
π ethtool.h
β
X
π ethtool_netlink.h
β
X
π ethtool_netlink_generated.h
β
X
π eventfd.h
β
X
π eventpoll.h
β
X
π f2fs.h
β
X
π fadvise.h
β
X
π falloc.h
β
X
π fanotify.h
β
X
π fb.h
β
X
π fcntl.h
β
X
π fd.h
β
X
π fdreg.h
β
X
π fib_rules.h
β
X
π fiemap.h
β
X
π filter.h
β
X
π firewire-cdev.h
β
X
π firewire-constants.h
β
X
π fou.h
β
X
π fpga-dfl.h
β
X
π fs.h
β
X
π fscrypt.h
β
X
π fsi.h
β
X
π fsl_hypervisor.h
β
X
π fsl_mc.h
β
X
π fsmap.h
β
X
π fsverity.h
β
X
π fuse.h
β
X
π futex.h
β
X
π gameport.h
β
X
π gen_stats.h
β
X
π genetlink.h
β
X
π genwqe/
X
π gfs2_ondisk.h
β
X
π gpio.h
β
X
π gsmmux.h
β
X
π gtp.h
β
X
π handshake.h
β
X
π hash_info.h
β
X
π hdlc/
X
π hdlc.h
β
X
π hdlcdrv.h
β
X
π hdreg.h
β
X
π hid.h
β
X
π hiddev.h
β
X
π hidraw.h
β
X
π hpet.h
β
X
π hsi/
X
π hsr_netlink.h
β
X
π hw_breakpoint.h
β
X
π hyperv.h
β
X
π i2c-dev.h
β
X
π i2c.h
β
X
π i2o-dev.h
β
X
π i8k.h
β
X
π icmp.h
β
X
π icmpv6.h
β
X
π idxd.h
β
X
π if.h
β
X
π if_addr.h
β
X
π if_addrlabel.h
β
X
π if_alg.h
β
X
π if_arcnet.h
β
X
π if_arp.h
β
X
π if_bonding.h
β
X
π if_bridge.h
β
X
π if_cablemodem.h
β
X
π if_eql.h
β
X
π if_ether.h
β
X
π if_fc.h
β
X
π if_fddi.h
β
X
π if_hippi.h
β
X
π if_infiniband.h
β
X
π if_link.h
β
X
π if_ltalk.h
β
X
π if_macsec.h
β
X
π if_packet.h
β
X
π if_phonet.h
β
X
π if_plip.h
β
X
π if_ppp.h
β
X
π if_pppol2tp.h
β
X
π if_pppox.h
β
X
π if_slip.h
β
X
π if_team.h
β
X
π if_tun.h
β
X
π if_tunnel.h
β
X
π if_vlan.h
β
X
π if_x25.h
β
X
π if_xdp.h
β
X
π ife.h
β
X
π igmp.h
β
X
π iio/
X
π ila.h
β
X
π in.h
β
X
π in6.h
β
X
π in_route.h
β
X
π inet_diag.h
β
X
π inotify.h
β
X
π input-event-codes.h
β
X
π input.h
β
X
π io_uring.h
β
X
π ioctl.h
β
X
π iommufd.h
β
X
π ioprio.h
β
X
π ip.h
β
X
π ip6_tunnel.h
β
X
π ip_vs.h
β
X
π ipc.h
β
X
π ipmi.h
β
X
π ipmi_bmc.h
β
X
π ipmi_msgdefs.h
β
X
π ipmi_ssif_bmc.h
β
X
π ipsec.h
β
X
π ipv6.h
β
X
π ipv6_route.h
β
X
π ipx.h
β
X
π irqnr.h
β
X
π isdn/
X
π iso_fs.h
β
X
π isst_if.h
β
X
π ivtv.h
β
X
π ivtvfb.h
β
X
π jffs2.h
β
X
π joystick.h
β
X
π kcm.h
β
X
π kcmp.h
β
X
π kcov.h
β
X
π kd.h
β
X
π kdev_t.h
β
X
π kernel-page-flags.h
β
X
π kernel.h
β
X
π kernelcapi.h
β
X
π kexec.h
β
X
π keyboard.h
β
X
π keyctl.h
β
X
π kfd_ioctl.h
β
X
π kfd_sysfs.h
β
X
π kvm.h
β
X
π kvm_para.h
β
X
π l2tp.h
β
X
π landlock.h
β
X
π libc-compat.h
β
X
π limits.h
β
X
π lirc.h
β
X
π llc.h
β
X
π loadpin.h
β
X
π loop.h
β
X
π lp.h
β
X
π lsm.h
β
X
π lwtunnel.h
β
X
π magic.h
β
X
π major.h
β
X
π map_to_7segment.h
β
X
π matroxfb.h
β
X
π max2175.h
β
X
π mdio.h
β
X
π media-bus-format.h
β
X
π media.h
β
X
π mei.h
β
X
π mei_uuid.h
β
X
π membarrier.h
β
X
π memfd.h
β
X
π mempolicy.h
β
X
π meye.h
β
X
π mii.h
β
X
π minix_fs.h
β
X
π misc/
X
π mman.h
β
X
π mmc/
X
π mmtimer.h
β
X
π module.h
β
X
π mount.h
β
X
π mpls.h
β
X
π mpls_iptunnel.h
β
X
π mptcp.h
β
X
π mptcp_pm.h
β
X
π mqueue.h
β
X
π mroute.h
β
X
π mroute6.h
β
X
π mrp_bridge.h
β
X
π msdos_fs.h
β
X
π msg.h
β
X
π mshv.h
β
X
π mtio.h
β
X
π nbd-netlink.h
β
X
π nbd.h
β
X
π ncsi.h
β
X
π ndctl.h
β
X
π neighbour.h
β
X
π net.h
β
X
π net_dropmon.h
β
X
π net_namespace.h
β
X
π net_shaper.h
β
X
π net_tstamp.h
β
X
π netconf.h
β
X
π netdev.h
β
X
π netdevice.h
β
X
π netfilter/
X
π netfilter.h
β
X
π netfilter_arp/
X
π netfilter_arp.h
β
X
π netfilter_bridge/
X
π netfilter_bridge.h
β
X
π netfilter_decnet.h
β
X
π netfilter_ipv4/
X
π netfilter_ipv4.h
β
X
π netfilter_ipv6/
X
π netfilter_ipv6.h
β
X
π netlink.h
β
X
π netlink_diag.h
β
X
π netrom.h
β
X
π nexthop.h
β
X
π nfc.h
β
X
π nfs.h
β
X
π nfs2.h
β
X
π nfs3.h
β
X
π nfs4.h
β
X
π nfs4_mount.h
β
X
π nfs_fs.h
β
X
π nfs_idmap.h
β
X
π nfs_mount.h
β
X
π nfsacl.h
β
X
π nfsd/
X
π nfsd_netlink.h
β
X
π nilfs2_api.h
β
X
π nilfs2_ondisk.h
β
X
π nitro_enclaves.h
β
X
π nl80211.h
β
X
π nsfs.h
β
X
π nubus.h
β
X
π nvme_ioctl.h
β
X
π nvram.h
β
X
π omap3isp.h
β
X
π omapfb.h
β
X
π oom.h
β
X
π openat2.h
β
X
π openvswitch.h
β
X
π packet_diag.h
β
X
π param.h
β
X
π parport.h
β
X
π patchkey.h
β
X
π pci.h
β
X
π pci_regs.h
β
X
π pcitest.h
β
X
π perf_event.h
β
X
π personality.h
β
X
π pfkeyv2.h
β
X
π pfrut.h
β
X
π pg.h
β
X
π phantom.h
β
X
π phonet.h
β
X
π pidfd.h
β
X
π pkt_cls.h
β
X
π pkt_sched.h
β
X
π pktcdvd.h
β
X
π pmu.h
β
X
π poll.h
β
X
π posix_acl.h
β
X
π posix_acl_xattr.h
β
X
π posix_types.h
β
X
π ppdev.h
β
X
π ppp-comp.h
β
X
π ppp-ioctl.h
β
X
π ppp_defs.h
β
X
π pps.h
β
X
π pr.h
β
X
π prctl.h
β
X
π psample.h
β
X
π psci.h
β
X
π psp-dbc.h
β
X
π psp-sev.h
β
X
π ptp_clock.h
β
X
π ptrace.h
β
X
π qemu_fw_cfg.h
β
X
π qnx4_fs.h
β
X
π qnxtypes.h
β
X
π qrtr.h
β
X
π quota.h
β
X
π radeonfb.h
β
X
π raid/
X
π random.h
β
X
π rds.h
β
X
π reboot.h
β
X
π reiserfs_fs.h
β
X
π reiserfs_xattr.h
β
X
π remoteproc_cdev.h
β
X
π resource.h
β
X
π rfkill.h
β
X
π rio_cm_cdev.h
β
X
π rio_mport_cdev.h
β
X
π rkisp1-config.h
β
X
π romfs_fs.h
β
X
π rose.h
β
X
π route.h
β
X
π rpl.h
β
X
π rpl_iptunnel.h
β
X
π rpmsg.h
β
X
π rpmsg_types.h
β
X
π rseq.h
β
X
π rtc.h
β
X
π rtnetlink.h
β
X
π rxrpc.h
β
X
π scc.h
β
X
π sched/
X
π sched.h
β
X
π scif_ioctl.h
β
X
π screen_info.h
β
X
π sctp.h
β
X
π seccomp.h
β
X
π securebits.h
β
X
π sed-opal.h
β
X
π seg6.h
β
X
π seg6_genl.h
β
X
π seg6_hmac.h
β
X
π seg6_iptunnel.h
β
X
π seg6_local.h
β
X
π selinux_netlink.h
β
X
π sem.h
β
X
π serial.h
β
X
π serial_core.h
β
X
π serial_reg.h
β
X
π serio.h
β
X
π sev-guest.h
β
X
π shm.h
β
X
π signal.h
β
X
π signalfd.h
β
X
π smc.h
β
X
π smc_diag.h
β
X
π smiapp.h
β
X
π snmp.h
β
X
π sock_diag.h
β
X
π socket.h
β
X
π sockios.h
β
X
π sonet.h
β
X
π sonypi.h
β
X
π sound.h
β
X
π soundcard.h
β
X
π spi/
X
π stat.h
β
X
π stddef.h
β
X
π stm.h
β
X
π string.h
β
X
π sunrpc/
X
π surface_aggregator/
X
π suspend_ioctls.h
β
X
π swab.h
β
X
π switchtec_ioctl.h
β
X
π sync_file.h
β
X
π synclink.h
β
X
π sysctl.h
β
X
π sysinfo.h
β
X
π target_core_user.h
β
X
π taskstats.h
β
X
π tc_act/
X
π tc_ematch/
X
π tcp.h
β
X
π tcp_metrics.h
β
X
π tdx-guest.h
β
X
π tee.h
β
X
π termios.h
β
X
π thermal.h
β
X
π time.h
β
X
π time_types.h
β
X
π timerfd.h
β
X
π times.h
β
X
π timex.h
β
X
π tiocl.h
β
X
π tipc.h
β
X
π tipc_config.h
β
X
π tipc_netlink.h
β
X
π tipc_sockets_diag.h
β
X
π tls.h
β
X
π toshiba.h
β
X
π tps6594_pfsm.h
β
X
π tty.h
β
X
π tty_flags.h
β
X
π types.h
β
X
π udf_fs_i.h
β
X
π udmabuf.h
β
X
π udp.h
β
X
π uhid.h
β
X
π uinput.h
β
X
π uio.h
β
X
π uleds.h
β
X
π ultrasound.h
β
X
π um_timetravel.h
β
X
π un.h
β
X
π unistd.h
β
X
π unix_diag.h
β
X
π usb/
X
π usbdevice_fs.h
β
X
π usbip.h
β
X
π userfaultfd.h
β
X
π userio.h
β
X
π utime.h
β
X
π utsname.h
β
X
π uuid.h
β
X
π uvcvideo.h
β
X
π v4l2-common.h
β
X
π v4l2-controls.h
β
X
π v4l2-dv-timings.h
β
X
π v4l2-mediabus.h
β
X
π v4l2-subdev.h
β
X
π vbox_err.h
β
X
π vbox_vmmdev_types.h
β
X
π vboxguest.h
β
X
π vdpa.h
β
X
π vduse.h
β
X
π version.h
β
X
π veth.h
β
X
π vfio.h
β
X
π vfio_ccw.h
β
X
π vfio_zdev.h
β
X
π vhost.h
β
X
π vhost_types.h
β
X
π videodev2.h
β
X
π virtio_9p.h
β
X
π virtio_balloon.h
β
X
π virtio_blk.h
β
X
π virtio_bt.h
β
X
π virtio_config.h
β
X
π virtio_console.h
β
X
π virtio_crypto.h
β
X
π virtio_fs.h
β
X
π virtio_gpio.h
β
X
π virtio_gpu.h
β
X
π virtio_i2c.h
β
X
π virtio_ids.h
β
X
π virtio_input.h
β
X
π virtio_iommu.h
β
X
π virtio_mem.h
β
X
π virtio_mmio.h
β
X
π virtio_net.h
β
X
π virtio_pci.h
β
X
π virtio_pcidev.h
β
X
π virtio_pmem.h
β
X
π virtio_ring.h
β
X
π virtio_rng.h
β
X
π virtio_scmi.h
β
X
π virtio_scsi.h
β
X
π virtio_snd.h
β
X
π virtio_types.h
β
X
π virtio_vsock.h
β
X
π vm_sockets.h
β
X
π vm_sockets_diag.h
β
X
π vmcore.h
β
X
π vsockmon.h
β
X
π vt.h
β
X
π vtpm_proxy.h
β
X
π wait.h
β
X
π watch_queue.h
β
X
π watchdog.h
β
X
π wireguard.h
β
X
π wireless.h
β
X
π wmi.h
β
X
π wwan.h
β
X
π x25.h
β
X
π xattr.h
β
X
π xdp_diag.h
β
X
π xfrm.h
β
X
π xilinx-v4l2-controls.h
β
X
π zorro.h
β
X
π zorro_ids.h
β
X
SAVING...
BERHASIL DIUBAH!
EDITING: vduse.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _VDUSE_H_ #define _VDUSE_H_ #include <linux/types.h> #define VDUSE_BASE 0x81 /* The ioctls for control device (/dev/vduse/control) */ #define VDUSE_API_VERSION 0 /* * Get the version of VDUSE API that kernel supported (VDUSE_API_VERSION). * This is used for future extension. */ #define VDUSE_GET_API_VERSION _IOR(VDUSE_BASE, 0x00, __u64) /* Set the version of VDUSE API that userspace supported. */ #define VDUSE_SET_API_VERSION _IOW(VDUSE_BASE, 0x01, __u64) /** * struct vduse_dev_config - basic configuration of a VDUSE device * @name: VDUSE device name, needs to be NUL terminated * @vendor_id: virtio vendor id * @device_id: virtio device id * @features: virtio features * @vq_num: the number of virtqueues * @vq_align: the allocation alignment of virtqueue's metadata * @reserved: for future use, needs to be initialized to zero * @config_size: the size of the configuration space * @config: the buffer of the configuration space * * Structure used by VDUSE_CREATE_DEV ioctl to create VDUSE device. */ struct vduse_dev_config { #define VDUSE_NAME_MAX 256 char name[VDUSE_NAME_MAX]; __u32 vendor_id; __u32 device_id; __u64 features; __u32 vq_num; __u32 vq_align; __u32 reserved[13]; __u32 config_size; __u8 config[]; }; /* Create a VDUSE device which is represented by a char device (/dev/vduse/$NAME) */ #define VDUSE_CREATE_DEV _IOW(VDUSE_BASE, 0x02, struct vduse_dev_config) /* * Destroy a VDUSE device. Make sure there are no more references * to the char device (/dev/vduse/$NAME). */ #define VDUSE_DESTROY_DEV _IOW(VDUSE_BASE, 0x03, char[VDUSE_NAME_MAX]) /* The ioctls for VDUSE device (/dev/vduse/$NAME) */ /** * struct vduse_iotlb_entry - entry of IOTLB to describe one IOVA region [start, last] * @offset: the mmap offset on returned file descriptor * @start: start of the IOVA region * @last: last of the IOVA region * @perm: access permission of the IOVA region * * Structure used by VDUSE_IOTLB_GET_FD ioctl to find an overlapped IOVA region. */ struct vduse_iotlb_entry { __u64 offset; __u64 start; __u64 last; #define VDUSE_ACCESS_RO 0x1 #define VDUSE_ACCESS_WO 0x2 #define VDUSE_ACCESS_RW 0x3 __u8 perm; }; /* * Find the first IOVA region that overlaps with the range [start, last] * and return the corresponding file descriptor. Return -EINVAL means the * IOVA region doesn't exist. Caller should set start and last fields. */ #define VDUSE_IOTLB_GET_FD _IOWR(VDUSE_BASE, 0x10, struct vduse_iotlb_entry) /* * Get the negotiated virtio features. It's a subset of the features in * struct vduse_dev_config which can be accepted by virtio driver. It's * only valid after FEATURES_OK status bit is set. */ #define VDUSE_DEV_GET_FEATURES _IOR(VDUSE_BASE, 0x11, __u64) /** * struct vduse_config_data - data used to update configuration space * @offset: the offset from the beginning of configuration space * @length: the length to write to configuration space * @buffer: the buffer used to write from * * Structure used by VDUSE_DEV_SET_CONFIG ioctl to update device * configuration space. */ struct vduse_config_data { __u32 offset; __u32 length; __u8 buffer[]; }; /* Set device configuration space */ #define VDUSE_DEV_SET_CONFIG _IOW(VDUSE_BASE, 0x12, struct vduse_config_data) /* * Inject a config interrupt. It's usually used to notify virtio driver * that device configuration space has changed. */ #define VDUSE_DEV_INJECT_CONFIG_IRQ _IO(VDUSE_BASE, 0x13) /** * struct vduse_vq_config - basic configuration of a virtqueue * @index: virtqueue index * @max_size: the max size of virtqueue * @reserved: for future use, needs to be initialized to zero * * Structure used by VDUSE_VQ_SETUP ioctl to setup a virtqueue. */ struct vduse_vq_config { __u32 index; __u16 max_size; __u16 reserved[13]; }; /* * Setup the specified virtqueue. Make sure all virtqueues have been * configured before the device is attached to vDPA bus. */ #define VDUSE_VQ_SETUP _IOW(VDUSE_BASE, 0x14, struct vduse_vq_config) /** * struct vduse_vq_state_split - split virtqueue state * @avail_index: available index */ struct vduse_vq_state_split { __u16 avail_index; }; /** * struct vduse_vq_state_packed - packed virtqueue state * @last_avail_counter: last driver ring wrap counter observed by device * @last_avail_idx: device available index * @last_used_counter: device ring wrap counter * @last_used_idx: used index */ struct vduse_vq_state_packed { __u16 last_avail_counter; __u16 last_avail_idx; __u16 last_used_counter; __u16 last_used_idx; }; /** * struct vduse_vq_info - information of a virtqueue * @index: virtqueue index * @num: the size of virtqueue * @desc_addr: address of desc area * @driver_addr: address of driver area * @device_addr: address of device area * @split: split virtqueue state * @packed: packed virtqueue state * @ready: ready status of virtqueue * * Structure used by VDUSE_VQ_GET_INFO ioctl to get virtqueue's information. */ struct vduse_vq_info { __u32 index; __u32 num; __u64 desc_addr; __u64 driver_addr; __u64 device_addr; union { struct vduse_vq_state_split split; struct vduse_vq_state_packed packed; }; __u8 ready; }; /* Get the specified virtqueue's information. Caller should set index field. */ #define VDUSE_VQ_GET_INFO _IOWR(VDUSE_BASE, 0x15, struct vduse_vq_info) /** * struct vduse_vq_eventfd - eventfd configuration for a virtqueue * @index: virtqueue index * @fd: eventfd, -1 means de-assigning the eventfd * * Structure used by VDUSE_VQ_SETUP_KICKFD ioctl to setup kick eventfd. */ struct vduse_vq_eventfd { __u32 index; #define VDUSE_EVENTFD_DEASSIGN -1 int fd; }; /* * Setup kick eventfd for specified virtqueue. The kick eventfd is used * by VDUSE kernel module to notify userspace to consume the avail vring. */ #define VDUSE_VQ_SETUP_KICKFD _IOW(VDUSE_BASE, 0x16, struct vduse_vq_eventfd) /* * Inject an interrupt for specific virtqueue. It's used to notify virtio driver * to consume the used vring. */ #define VDUSE_VQ_INJECT_IRQ _IOW(VDUSE_BASE, 0x17, __u32) /** * struct vduse_iova_umem - userspace memory configuration for one IOVA region * @uaddr: start address of userspace memory, it must be aligned to page size * @iova: start of the IOVA region * @size: size of the IOVA region * @reserved: for future use, needs to be initialized to zero * * Structure used by VDUSE_IOTLB_REG_UMEM and VDUSE_IOTLB_DEREG_UMEM * ioctls to register/de-register userspace memory for IOVA regions */ struct vduse_iova_umem { __u64 uaddr; __u64 iova; __u64 size; __u64 reserved[3]; }; /* Register userspace memory for IOVA regions */ #define VDUSE_IOTLB_REG_UMEM _IOW(VDUSE_BASE, 0x18, struct vduse_iova_umem) /* De-register the userspace memory. Caller should set iova and size field. */ #define VDUSE_IOTLB_DEREG_UMEM _IOW(VDUSE_BASE, 0x19, struct vduse_iova_umem) /** * struct vduse_iova_info - information of one IOVA region * @start: start of the IOVA region * @last: last of the IOVA region * @capability: capability of the IOVA regsion * @reserved: for future use, needs to be initialized to zero * * Structure used by VDUSE_IOTLB_GET_INFO ioctl to get information of * one IOVA region. */ struct vduse_iova_info { __u64 start; __u64 last; #define VDUSE_IOVA_CAP_UMEM (1 << 0) __u64 capability; __u64 reserved[3]; }; /* * Find the first IOVA region that overlaps with the range [start, last] * and return some information on it. Caller should set start and last fields. */ #define VDUSE_IOTLB_GET_INFO _IOWR(VDUSE_BASE, 0x1a, struct vduse_iova_info) /* The control messages definition for read(2)/write(2) on /dev/vduse/$NAME */ /** * enum vduse_req_type - request type * @VDUSE_GET_VQ_STATE: get the state for specified virtqueue from userspace * @VDUSE_SET_STATUS: set the device status * @VDUSE_UPDATE_IOTLB: Notify userspace to update the memory mapping for * specified IOVA range via VDUSE_IOTLB_GET_FD ioctl */ enum vduse_req_type { VDUSE_GET_VQ_STATE, VDUSE_SET_STATUS, VDUSE_UPDATE_IOTLB, }; /** * struct vduse_vq_state - virtqueue state * @index: virtqueue index * @split: split virtqueue state * @packed: packed virtqueue state */ struct vduse_vq_state { __u32 index; union { struct vduse_vq_state_split split; struct vduse_vq_state_packed packed; }; }; /** * struct vduse_dev_status - device status * @status: device status */ struct vduse_dev_status { __u8 status; }; /** * struct vduse_iova_range - IOVA range [start, last] * @start: start of the IOVA range * @last: last of the IOVA range */ struct vduse_iova_range { __u64 start; __u64 last; }; /** * struct vduse_dev_request - control request * @type: request type * @request_id: request id * @reserved: for future use * @vq_state: virtqueue state, only index field is available * @s: device status * @iova: IOVA range for updating * @padding: padding * * Structure used by read(2) on /dev/vduse/$NAME. */ struct vduse_dev_request { __u32 type; __u32 request_id; __u32 reserved[4]; union { struct vduse_vq_state vq_state; struct vduse_dev_status s; struct vduse_iova_range iova; __u32 padding[32]; }; }; /** * struct vduse_dev_response - response to control request * @request_id: corresponding request id * @result: the result of request * @reserved: for future use, needs to be initialized to zero * @vq_state: virtqueue state * @padding: padding * * Structure used by write(2) on /dev/vduse/$NAME. */ struct vduse_dev_response { __u32 request_id; #define VDUSE_REQ_RESULT_OK 0x00 #define VDUSE_REQ_RESULT_FAILED 0x01 __u32 result; __u32 reserved[4]; union { struct vduse_vq_state vq_state; __u32 padding[32]; }; }; #endif /* _VDUSE_H_ */
SIMPAN PERUBAHAN