/usr/src/linux-headers-5.15.0-190/include/uapi/linux
NameSizeModeActions
android/-0755rm
byteorder/-0755rm
caif/-0755rm
can/-0755rm
cifs/-0755rm
dvb/-0755rm
genwqe/-0755rm
hdlc/-0755rm
hsi/-0755rm
iio/-0755rm
isdn/-0755rm
misc/-0755rm
mmc/-0755rm
netfilter/-0755rm
netfilter_arp/-0755rm
netfilter_bridge/-0755rm
netfilter_ipv4/-0755rm
netfilter_ipv6/-0755rm
nfsd/-0755rm
raid/-0755rm
sched/-0755rm
spi/-0755rm
sunrpc/-0755rm
surface_aggregator/-0755rm
tc_act/-0755rm
tc_ematch/-0755rm
usb/-0755rm
a.out.h69590644editdlrm
acct.h40130644editdlrm
acrn.h167050644editdlrm
adb.h11550644editdlrm
adfs_fs.h10080644editdlrm
affs_hardblocks.h15780644editdlrm
agpgart.h40010644editdlrm
aio_abi.h33980644editdlrm
am437x-vpfe.h36810644editdlrm
apm_bios.h36980644editdlrm
arcfb.h2130644editdlrm
arm_sdei.h27660644editdlrm
aspeed-lpc-ctrl.h17950644editdlrm
aspeed-p2a-ctrl.h19210644editdlrm
atalk.h10380644editdlrm
atm.h79370644editdlrm
atmapi.h9520644editdlrm
atmarp.h12960644editdlrm
atmbr2684.h32710644editdlrm
atmclip.h5760644editdlrm
atmdev.h76990644editdlrm
atmioc.h16470644editdlrm
atmlec.h23810644editdlrm
atmmpc.h42260644editdlrm
atmppp.h6390644editdlrm
atmsap.h49700644editdlrm
atmsvc.h18530644editdlrm
atm_eni.h6480644editdlrm
atm_he.h4060644editdlrm
atm_idt77105.h9550644editdlrm
atm_nicstar.h12780644editdlrm
atm_tcp.h16370644editdlrm
atm_zatm.h15400644editdlrm
audit.h212670644editdlrm
aufs_type.h126410644editdlrm
auto_dev-ioctl.h49960644editdlrm
auto_fs.h64500644editdlrm
auto_fs4.h4660644editdlrm
auxvec.h16120644editdlrm
ax25.h28240644editdlrm
batadv_packet.h203600644editdlrm
batman_adv.h169020644editdlrm
baycom.h8830644editdlrm
bcache.h99100644editdlrm
bcm933xx_hcs.h4190644editdlrm
bfs_fs.h19050644editdlrm
binfmts.h7910644editdlrm
blkpg.h9530644editdlrm
blktrace_api.h47160644editdlrm
blkzoned.h65080644editdlrm
bpf.h2350840644editdlrm
bpfilter.h4800644editdlrm
bpf_common.h13820644editdlrm
bpf_perf_event.h5440644editdlrm
bpqether.h9810644editdlrm
bsg.h25090644editdlrm
bt-bmc.h5870644editdlrm
btf.h48110644editdlrm
btrfs.h309040644editdlrm
btrfs_tree.h273920644editdlrm
can.h92680644editdlrm
capability.h135470644editdlrm
capi.h31570644editdlrm
cciss_defs.h32810644editdlrm
cciss_ioctl.h27900644editdlrm
ccs.h7670644editdlrm
cdrom.h289490644editdlrm
cec-funcs.h534530644editdlrm
cec.h413340644editdlrm
cfm_bridge.h14660644editdlrm
cgroupstats.h22190644editdlrm
chio.h53040644editdlrm
close_range.h3920644editdlrm
cm4000_cs.h18210644editdlrm
cn_proc.h34710644editdlrm
coda.h183930644editdlrm
coff.h125640644editdlrm
connector.h22680644editdlrm
const.h10060644editdlrm
coresight-stm.h7470644editdlrm
cramfs_fs.h35700644editdlrm
cryptouser.h53360644editdlrm
cuda.h9200644editdlrm
cxl_mem.h64890644editdlrm
cyclades.h9840644editdlrm
cycx_cfm.h29900644editdlrm
dcbnl.h252920644editdlrm
dccp.h64470644editdlrm
devlink.h202070644editdlrm
dlm.h25680644editdlrm
dlmconstants.h50800644editdlrm
dlm_device.h25990644editdlrm
dlm_netlink.h11590644editdlrm
dlm_plock.h9090644editdlrm
dm-ioctl.h116020644editdlrm
dm-log-userspace.h151910644editdlrm
dma-buf.h38040644editdlrm
dma-heap.h14090644editdlrm
dns_resolver.h39040644editdlrm
dqblk_xfs.h93880644editdlrm
edd.h56190644editdlrm
efs_fs_sb.h22270644editdlrm
elf-em.h25860644editdlrm
elf-fdpic.h11390644editdlrm
elf.h141800644editdlrm
errno.h230644editdlrm
errqueue.h20660644editdlrm
erspan.h10740644editdlrm
ethtool.h825860644editdlrm
ethtool_netlink.h230880644editdlrm
eventpoll.h30560644editdlrm
f2fs.h33160644editdlrm
fadvise.h8420644editdlrm
falloc.h35990644editdlrm
fanotify.h74950644editdlrm
fb.h165180644editdlrm
fcntl.h42660644editdlrm
fd.h121660644editdlrm
fdreg.h53640644editdlrm
fib_rules.h20360644editdlrm
fiemap.h27900644editdlrm
filter.h22650644editdlrm
firewire-cdev.h442400644editdlrm
firewire-constants.h32310644editdlrm
fou.h9090644editdlrm
fpga-dfl.h87430644editdlrm
fs.h124110644editdlrm
fscrypt.h66380644editdlrm
fsi.h22700644editdlrm
fsl_hypervisor.h73160644editdlrm
fsl_mc.h7490644editdlrm
fsmap.h43850644editdlrm
fsverity.h32930644editdlrm
fuse.h230480644editdlrm
futex.h51450644editdlrm
gameport.h9120644editdlrm
genetlink.h21900644editdlrm
gen_stats.h15260644editdlrm
gfs2_ondisk.h147690644editdlrm
gpio.h197830644editdlrm
gsmmux.h11440644editdlrm
gtp.h7310644editdlrm
hash_info.h9860644editdlrm
hdlc.h6520644editdlrm
hdlcdrv.h29230644editdlrm
hdreg.h229450644editdlrm
hid.h19160644editdlrm
hiddev.h63600644editdlrm
hidraw.h20080644editdlrm
hpet.h7850644editdlrm
hsr_netlink.h11010644editdlrm
hw_breakpoint.h7570644editdlrm
hyperv.h106070644editdlrm
i2c-dev.h19310644editdlrm
i2c.h69050644editdlrm
i2o-dev.h116460644editdlrm
i8k.h15280644editdlrm
icmp.h48000644editdlrm
icmpv6.h42840644editdlrm
idxd.h76240644editdlrm
if.h110150644editdlrm
ife.h3510644editdlrm
if_addr.h19120644editdlrm
if_addrlabel.h7210644editdlrm
if_alg.h15660644editdlrm
if_arcnet.h37170644editdlrm
if_arp.h66040644editdlrm
if_bonding.h51450644editdlrm
if_bridge.h191210644editdlrm
if_cablemodem.h9860644editdlrm
if_eql.h13640644editdlrm
if_ether.h84570644editdlrm
if_fc.h17380644editdlrm
if_fddi.h43840644editdlrm
if_hippi.h42350644editdlrm
if_infiniband.h12450644editdlrm
if_link.h317600644editdlrm
if_ltalk.h2250644editdlrm
if_macsec.h64900644editdlrm
if_packet.h81470644editdlrm
if_phonet.h4390644editdlrm
if_plip.h6600644editdlrm
if_ppp.h290644editdlrm
if_pppol2tp.h33180644editdlrm
if_pppox.h48040644editdlrm
if_slip.h8720644editdlrm
if_team.h26150644editdlrm
if_tun.h41130644editdlrm
if_tunnel.h48580644editdlrm
if_vlan.h18460644editdlrm
if_x25.h8810644editdlrm
if_xdp.h30110644editdlrm
igmp.h30790644editdlrm
ila.h12610644editdlrm
in.h108970644editdlrm
in6.h75930644editdlrm
inet_diag.h50320644editdlrm
inotify.h33070644editdlrm
input-event-codes.h288940644editdlrm
input.h160300644editdlrm
in_route.h9360644editdlrm
ioam6.h23990644editdlrm
ioam6_genl.h9600644editdlrm
ioam6_iptunnel.h4510644editdlrm
ioctl.h1630644editdlrm
iommu.h120310644editdlrm
ioprio.h14710644editdlrm
io_uring.h97950644editdlrm
ip.h48280644editdlrm
ip6_tunnel.h19530644editdlrm
ipc.h21230644editdlrm
ipmi.h151120644editdlrm
ipmi_bmc.h5030644editdlrm
ipmi_msgdefs.h34300644editdlrm
ipsec.h9470644editdlrm
ipu-isys.h4810644editdlrm
ipu-psys.h36630644editdlrm
ipv6.h43410644editdlrm
ipv6_route.h19230644editdlrm
ip_vs.h141350644editdlrm
irqnr.h1040644editdlrm
iso_fs.h64850644editdlrm
isst_if.h54040644editdlrm
ivtv.h30630644editdlrm
ivtvfb.h12410644editdlrm
jffs2.h68150644editdlrm
joystick.h34490644editdlrm
kcm.h8220644editdlrm
kcmp.h5370644editdlrm
kcov.h19590644editdlrm
kd.h63110644editdlrm
kdev_t.h4410644editdlrm
kernel-page-flags.h9150644editdlrm
kernel.h2090644editdlrm
kernelcapi.h10340644editdlrm
kexec.h19700644editdlrm
keyboard.h134740644editdlrm
keyctl.h60100644editdlrm
kfd_ioctl.h241510644editdlrm
kvm.h607960644editdlrm
kvm_para.h10160644editdlrm
l2tp.h57880644editdlrm
landlock.h49150644editdlrm
libc-compat.h83040644editdlrm
limits.h9470644editdlrm
lirc.h81440644editdlrm
llc.h31790644editdlrm
loop.h35120644editdlrm
lp.h42050644editdlrm
lwtunnel.h22380644editdlrm
magic.h38010644editdlrm
major.h46570644editdlrm
map_to_7segment.h66080644editdlrm
matroxfb.h14640644editdlrm
max2175.h10350644editdlrm
mctp.h7360644editdlrm
mdio.h172830644editdlrm
media-bus-format.h69090644editdlrm
media.h132230644editdlrm
mei.h34750644editdlrm
membarrier.h93770644editdlrm
memfd.h13390644editdlrm
mempolicy.h25830644editdlrm
meye.h25290644editdlrm
mii.h95660644editdlrm
minix_fs.h21220644editdlrm
mman.h15990644editdlrm
mmtimer.h21170644editdlrm
module.h2700644editdlrm
mount.h51070644editdlrm
mpls.h23170644editdlrm
mpls_iptunnel.h7760644editdlrm
mptcp.h57500644editdlrm
mqueue.h22010644editdlrm
mroute.h59370644editdlrm
mroute6.h49450644editdlrm
mrp_bridge.h17180644editdlrm
msdos_fs.h67460644editdlrm
msg.h34010644editdlrm
mtio.h81750644editdlrm
nbd-netlink.h24230644editdlrm
nbd.h30390644editdlrm
ncsi.h48280644editdlrm
ndctl.h67930644editdlrm
neighbour.h51240644editdlrm
net.h21000644editdlrm
netconf.h6290644editdlrm
netdevice.h22680644editdlrm
netfilter.h17800644editdlrm
netfilter_arp.h4710644editdlrm
netfilter_bridge.h13050644editdlrm
netfilter_ipv4.h15480644editdlrm
netfilter_ipv6.h14430644editdlrm
netlink.h117170644editdlrm
netlink_diag.h15500644editdlrm
netrom.h8070644editdlrm
net_dropmon.h28860644editdlrm
net_namespace.h7300644editdlrm
net_tstamp.h55710644editdlrm
nexthop.h28350644editdlrm
nfc.h112360644editdlrm
nfs.h44810644editdlrm
nfs2.h14680644editdlrm
nfs3.h24680644editdlrm
nfs4.h65060644editdlrm
nfs4_mount.h19530644editdlrm
nfsacl.h7330644editdlrm
nfs_fs.h16560644editdlrm
nfs_idmap.h22580644editdlrm
nfs_mount.h21420644editdlrm
nilfs2_api.h75650644editdlrm
nilfs2_ondisk.h180530644editdlrm
nitro_enclaves.h131670644editdlrm
nl80211-vnd-intel.h29370644editdlrm
nl80211.h3140080644editdlrm
nsfs.h6390644editdlrm
nubus.h82060644editdlrm
nvme_ioctl.h16760644editdlrm
nvram.h5470644editdlrm
omap3isp.h214230644editdlrm
omapfb.h59400644editdlrm
oom.h5260644editdlrm
openat2.h14650644editdlrm
openvswitch.h406950644editdlrm
packet_diag.h16720644editdlrm
param.h1410644editdlrm
parport.h36590644editdlrm
patchkey.h9650644editdlrm
pci.h13950644editdlrm
pcitest.h8780644editdlrm
pci_regs.h586560644editdlrm
perf_event.h397810644editdlrm
personality.h21120644editdlrm
pfkeyv2.h105690644editdlrm
pg.h24090644editdlrm
phantom.h16540644editdlrm
phonet.h46400644editdlrm
pidfd.h2710644editdlrm
pktcdvd.h27020644editdlrm
pkt_cls.h181710644editdlrm
pkt_sched.h301060644editdlrm
pmu.h54590644editdlrm
poll.h220644editdlrm
posix_acl.h12540644editdlrm
posix_acl_xattr.h11150644editdlrm
posix_types.h10980644editdlrm
ppdev.h33000644editdlrm
ppp-comp.h25420644editdlrm
ppp-ioctl.h57630644editdlrm
ppp_defs.h55720644editdlrm
pps.h47340644editdlrm
pr.h10880644editdlrm
prctl.h93950644editdlrm
psample.h22710644editdlrm
psci.h43430644editdlrm
psp-sev.h40530644editdlrm
ptp_clock.h74560644editdlrm
ptrace.h44260644editdlrm
qemu_fw_cfg.h24690644editdlrm
qnx4_fs.h23280644editdlrm
qnxtypes.h6240644editdlrm
qrtr.h8780644editdlrm
quota.h63060644editdlrm
radeonfb.h3600644editdlrm
random.h14300644editdlrm
rds.h111680644editdlrm
reboot.h13580644editdlrm
reiserfs_fs.h7750644editdlrm
reiserfs_xattr.h5330644editdlrm
remoteproc_cdev.h11120644editdlrm
resource.h23880644editdlrm
rfkill.h61180644editdlrm
rio_cm_cdev.h32480644editdlrm
rio_mport_cdev.h93300644editdlrm
rkisp1-config.h313770644editdlrm
romfs_fs.h12380644editdlrm
rose.h22320644editdlrm
route.h23920644editdlrm
rpl.h8240644editdlrm
rpl_iptunnel.h4340644editdlrm
rpmsg.h8130644editdlrm
rpmsg_types.h3030644editdlrm
rseq.h47210644editdlrm
rtc.h46100644editdlrm
rtnetlink.h207840644editdlrm
rxrpc.h49370644editdlrm
scc.h46390644editdlrm
sched.h62810644editdlrm
scif_ioctl.h63820644editdlrm
screen_info.h24940644editdlrm
sctp.h360990644editdlrm
seccomp.h57740644editdlrm
securebits.h27190644editdlrm
sed-opal.h37770644editdlrm
seg6.h11800644editdlrm
seg6_genl.h5990644editdlrm
seg6_hmac.h4330644editdlrm
seg6_iptunnel.h9940644editdlrm
seg6_local.h33380644editdlrm
selinux_netlink.h12210644editdlrm
sem.h30940644editdlrm
serial.h38250644editdlrm
serial_core.h61290644editdlrm
serial_reg.h155520644editdlrm
serio.h21140644editdlrm
shm.h38350644editdlrm
signal.h4030644editdlrm
signalfd.h12480644editdlrm
smc.h80190644editdlrm
smc_diag.h28500644editdlrm
smiapp.h10580644editdlrm
snmp.h139500644editdlrm
socket.h9550644editdlrm
sockios.h68460644editdlrm
sock_diag.h13160644editdlrm
sonet.h23050644editdlrm
sonypi.h53240644editdlrm
sound.h12520644editdlrm
soundcard.h461700644editdlrm
stat.h67670644editdlrm
stddef.h15770644editdlrm
stm.h12900644editdlrm
string.h2960644editdlrm
suspend_ioctls.h14310644editdlrm
swab.h70160644editdlrm
switchtec_ioctl.h52720644editdlrm
synclink.h90000644editdlrm
sync_file.h28990644editdlrm
sysctl.h259880644editdlrm
sysinfo.h10490644editdlrm
target_core_user.h45570644editdlrm
taskstats.h72900644editdlrm
tcp.h119490644editdlrm
tcp_metrics.h15490644editdlrm
tee.h135920644editdlrm
termios.h1720644editdlrm
thermal.h30880644editdlrm
time.h17930644editdlrm
timerfd.h9510644editdlrm
times.h2780644editdlrm
timex.h78840644editdlrm
time_types.h12820644editdlrm
tiocl.h17290644editdlrm
tipc.h88050644editdlrm
tipc_config.h148380644editdlrm
tipc_netlink.h93950644editdlrm
tipc_sockets_diag.h4830644editdlrm
tls.h49180644editdlrm
toshiba.h19450644editdlrm
tty.h16000644editdlrm
tty_flags.h45530644editdlrm
types.h17380644editdlrm
udf_fs_i.h6970644editdlrm
udmabuf.h6580644editdlrm
udp.h17030644editdlrm
uhid.h46550644editdlrm
uinput.h92760644editdlrm
uio.h7810644editdlrm
uleds.h8130644editdlrm
ultrasound.h45620644editdlrm
um_timetravel.h39760644editdlrm
un.h3840644editdlrm
unistd.h2200644editdlrm
unix_diag.h13280644editdlrm
usbdevice_fs.h83740644editdlrm
usbip.h6550644editdlrm
userfaultfd.h90890644editdlrm
userio.h15160644editdlrm
utime.h2230644editdlrm
utsname.h6840644editdlrm
uuid.h13710644editdlrm
uvcvideo.h25810644editdlrm
v4l2-common.h42030644editdlrm
v4l2-controls.h864530644editdlrm
v4l2-dv-timings.h315620644editdlrm
v4l2-mediabus.h54610644editdlrm
v4l2-subdev.h77820644editdlrm
vboxguest.h93680644editdlrm
vbox_err.h72570644editdlrm
vbox_vmmdev_types.h116090644editdlrm
vdpa.h11830644editdlrm
vduse.h83060644editdlrm
veth.h2240644editdlrm
vfio.h538090644editdlrm
vfio_ccw.h12570644editdlrm
vfio_zdev.h25420644editdlrm
vhost.h64180644editdlrm
vhost_types.h40240644editdlrm
videodev2.h961870644editdlrm
virtio_9p.h20530644editdlrm
virtio_balloon.h52790644editdlrm
virtio_blk.h68880644editdlrm
virtio_bt.h7870644editdlrm
virtio_config.h40630644editdlrm
virtio_console.h31710644editdlrm
virtio_crypto.h138870644editdlrm
virtio_fs.h5880644editdlrm
virtio_gpio.h10390644editdlrm
virtio_gpu.h110530644editdlrm
virtio_i2c.h10040644editdlrm
virtio_ids.h43030644editdlrm
virtio_input.h25150644editdlrm
virtio_iommu.h37930644editdlrm
virtio_mem.h69550644editdlrm
virtio_mmio.h49690644editdlrm
virtio_net.h138310644editdlrm
virtio_pci.h74060644editdlrm
virtio_pcidev.h24620644editdlrm
virtio_pmem.h6510644editdlrm
virtio_ring.h86060644editdlrm
virtio_rng.h2650644editdlrm
virtio_scmi.h6520644editdlrm
virtio_scsi.h60850644editdlrm
virtio_snd.h93040644editdlrm
virtio_types.h21680644editdlrm
virtio_vsock.h33630644editdlrm
vmcore.h4700644editdlrm
vm_sockets.h66090644editdlrm
vm_sockets_diag.h9780644editdlrm
vsockmon.h18950644editdlrm
vt.h30740644editdlrm
vtpm_proxy.h17340644editdlrm
wait.h6970644editdlrm
watchdog.h23500644editdlrm
watch_queue.h35050644editdlrm
wireguard.h77480644editdlrm
wireless.h428040644editdlrm
wmi.h17180644editdlrm
wwan.h3100644editdlrm
x25.h35620644editdlrm
xattr.h30380644editdlrm
xdp_diag.h14680644editdlrm
xfrm.h124330644editdlrm
xilinx-v4l2-controls.h29760644editdlrm
zorro.h32660644editdlrm
zorro_ids.h300650644editdlrm
Edit: /usr/src/linux-headers-5.15.0-190/include/uapi/linux/acrn.h (16705B)
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * Userspace interface for /dev/acrn_hsm - ACRN Hypervisor Service Module * * This file can be used by applications that need to communicate with the HSM * via the ioctl interface. * * Copyright (C) 2021 Intel Corporation. All rights reserved. */ #ifndef _UAPI_ACRN_H #define _UAPI_ACRN_H #include #include #define ACRN_IO_REQUEST_MAX 16 #define ACRN_IOREQ_STATE_PENDING 0 #define ACRN_IOREQ_STATE_COMPLETE 1 #define ACRN_IOREQ_STATE_PROCESSING 2 #define ACRN_IOREQ_STATE_FREE 3 #define ACRN_IOREQ_TYPE_PORTIO 0 #define ACRN_IOREQ_TYPE_MMIO 1 #define ACRN_IOREQ_TYPE_PCICFG 2 #define ACRN_IOREQ_DIR_READ 0 #define ACRN_IOREQ_DIR_WRITE 1 /** * struct acrn_mmio_request - Info of a MMIO I/O request * @direction: Access direction of this request (ACRN_IOREQ_DIR_*) * @reserved: Reserved for alignment and should be 0 * @address: Access address of this MMIO I/O request * @size: Access size of this MMIO I/O request * @value: Read/write value of this MMIO I/O request */ struct acrn_mmio_request { __u32 direction; __u32 reserved; __u64 address; __u64 size; __u64 value; }; /** * struct acrn_pio_request - Info of a PIO I/O request * @direction: Access direction of this request (ACRN_IOREQ_DIR_*) * @reserved: Reserved for alignment and should be 0 * @address: Access address of this PIO I/O request * @size: Access size of this PIO I/O request * @value: Read/write value of this PIO I/O request */ struct acrn_pio_request { __u32 direction; __u32 reserved; __u64 address; __u64 size; __u32 value; }; /** * struct acrn_pci_request - Info of a PCI I/O request * @direction: Access direction of this request (ACRN_IOREQ_DIR_*) * @reserved: Reserved for alignment and should be 0 * @size: Access size of this PCI I/O request * @value: Read/write value of this PIO I/O request * @bus: PCI bus value of this PCI I/O request * @dev: PCI device value of this PCI I/O request * @func: PCI function value of this PCI I/O request * @reg: PCI config space offset of this PCI I/O request * * Need keep same header layout with &struct acrn_pio_request. */ struct acrn_pci_request { __u32 direction; __u32 reserved[3]; __u64 size; __u32 value; __u32 bus; __u32 dev; __u32 func; __u32 reg; }; /** * struct acrn_io_request - 256-byte ACRN I/O request * @type: Type of this request (ACRN_IOREQ_TYPE_*). * @completion_polling: Polling flag. Hypervisor will poll completion of the * I/O request if this flag set. * @reserved0: Reserved fields. * @reqs: Union of different types of request. Byte offset: 64. * @reqs.pio_request: PIO request data of the I/O request. * @reqs.pci_request: PCI configuration space request data of the I/O request. * @reqs.mmio_request: MMIO request data of the I/O request. * @reqs.data: Raw data of the I/O request. * @reserved1: Reserved fields. * @kernel_handled: Flag indicates this request need be handled in kernel. * @processed: The status of this request (ACRN_IOREQ_STATE_*). * * The state transitions of ACRN I/O request: * * FREE -> PENDING -> PROCESSING -> COMPLETE -> FREE -> ... * * An I/O request in COMPLETE or FREE state is owned by the hypervisor. HSM and * ACRN userspace are in charge of processing the others. * * On basis of the states illustrated above, a typical lifecycle of ACRN IO * request would look like: * * Flow (assume the initial state is FREE) * | * | Service VM vCPU 0 Service VM vCPU x User vCPU y * | * | hypervisor: * | fills in type, addr, etc. * | pauses the User VM vCPU y * | sets the state to PENDING (a) * | fires an upcall to Service VM * | * | HSM: * | scans for PENDING requests * | sets the states to PROCESSING (b) * | assigns the requests to clients (c) * V * | client: * | scans for the assigned requests * | handles the requests (d) * | HSM: * | sets states to COMPLETE * | notifies the hypervisor * | * | hypervisor: * | resumes User VM vCPU y (e) * | * | hypervisor: * | post handling (f) * V sets states to FREE * * Note that the procedures (a) to (f) in the illustration above require to be * strictly processed in the order. One vCPU cannot trigger another request of * I/O emulation before completing the previous one. * * Atomic and barriers are required when HSM and hypervisor accessing the state * of &struct acrn_io_request. * */ struct acrn_io_request { __u32 type; __u32 completion_polling; __u32 reserved0[14]; union { struct acrn_pio_request pio_request; struct acrn_pci_request pci_request; struct acrn_mmio_request mmio_request; __u64 data[8]; } reqs; __u32 reserved1; __u32 kernel_handled; __u32 processed; } __attribute__((aligned(256))); struct acrn_io_request_buffer { union { struct acrn_io_request req_slot[ACRN_IO_REQUEST_MAX]; __u8 reserved[4096]; }; }; /** * struct acrn_ioreq_notify - The structure of ioreq completion notification * @vmid: User VM ID * @reserved: Reserved and should be 0 * @vcpu: vCPU ID */ struct acrn_ioreq_notify { __u16 vmid; __u16 reserved; __u32 vcpu; }; /** * struct acrn_vm_creation - Info to create a User VM * @vmid: User VM ID returned from the hypervisor * @reserved0: Reserved and must be 0 * @vcpu_num: Number of vCPU in the VM. Return from hypervisor. * @reserved1: Reserved and must be 0 * @uuid: UUID of the VM. Pass to hypervisor directly. * @vm_flag: Flag of the VM creating. Pass to hypervisor directly. * @ioreq_buf: Service VM GPA of I/O request buffer. Pass to * hypervisor directly. * @cpu_affinity: CPU affinity of the VM. Pass to hypervisor directly. * It's a bitmap which indicates CPUs used by the VM. */ struct acrn_vm_creation { __u16 vmid; __u16 reserved0; __u16 vcpu_num; __u16 reserved1; guid_t uuid; __u64 vm_flag; __u64 ioreq_buf; __u64 cpu_affinity; }; /** * struct acrn_gp_regs - General registers of a User VM * @rax: Value of register RAX * @rcx: Value of register RCX * @rdx: Value of register RDX * @rbx: Value of register RBX * @rsp: Value of register RSP * @rbp: Value of register RBP * @rsi: Value of register RSI * @rdi: Value of register RDI * @r8: Value of register R8 * @r9: Value of register R9 * @r10: Value of register R10 * @r11: Value of register R11 * @r12: Value of register R12 * @r13: Value of register R13 * @r14: Value of register R14 * @r15: Value of register R15 */ struct acrn_gp_regs { __le64 rax; __le64 rcx; __le64 rdx; __le64 rbx; __le64 rsp; __le64 rbp; __le64 rsi; __le64 rdi; __le64 r8; __le64 r9; __le64 r10; __le64 r11; __le64 r12; __le64 r13; __le64 r14; __le64 r15; }; /** * struct acrn_descriptor_ptr - Segment descriptor table of a User VM. * @limit: Limit field. * @base: Base field. * @reserved: Reserved and must be 0. */ struct acrn_descriptor_ptr { __le16 limit; __le64 base; __le16 reserved[3]; } __attribute__ ((__packed__)); /** * struct acrn_regs - Registers structure of a User VM * @gprs: General registers * @gdt: Global Descriptor Table * @idt: Interrupt Descriptor Table * @rip: Value of register RIP * @cs_base: Base of code segment selector * @cr0: Value of register CR0 * @cr4: Value of register CR4 * @cr3: Value of register CR3 * @ia32_efer: Value of IA32_EFER MSR * @rflags: Value of regsiter RFLAGS * @reserved_64: Reserved and must be 0 * @cs_ar: Attribute field of code segment selector * @cs_limit: Limit field of code segment selector * @reserved_32: Reserved and must be 0 * @cs_sel: Value of code segment selector * @ss_sel: Value of stack segment selector * @ds_sel: Value of data segment selector * @es_sel: Value of extra segment selector * @fs_sel: Value of FS selector * @gs_sel: Value of GS selector * @ldt_sel: Value of LDT descriptor selector * @tr_sel: Value of TSS descriptor selector */ struct acrn_regs { struct acrn_gp_regs gprs; struct acrn_descriptor_ptr gdt; struct acrn_descriptor_ptr idt; __le64 rip; __le64 cs_base; __le64 cr0; __le64 cr4; __le64 cr3; __le64 ia32_efer; __le64 rflags; __le64 reserved_64[4]; __le32 cs_ar; __le32 cs_limit; __le32 reserved_32[3]; __le16 cs_sel; __le16 ss_sel; __le16 ds_sel; __le16 es_sel; __le16 fs_sel; __le16 gs_sel; __le16 ldt_sel; __le16 tr_sel; }; /** * struct acrn_vcpu_regs - Info of vCPU registers state * @vcpu_id: vCPU ID * @reserved: Reserved and must be 0 * @vcpu_regs: vCPU registers state * * This structure will be passed to hypervisor directly. */ struct acrn_vcpu_regs { __u16 vcpu_id; __u16 reserved[3]; struct acrn_regs vcpu_regs; }; #define ACRN_MEM_ACCESS_RIGHT_MASK 0x00000007U #define ACRN_MEM_ACCESS_READ 0x00000001U #define ACRN_MEM_ACCESS_WRITE 0x00000002U #define ACRN_MEM_ACCESS_EXEC 0x00000004U #define ACRN_MEM_ACCESS_RWX (ACRN_MEM_ACCESS_READ | \ ACRN_MEM_ACCESS_WRITE | \ ACRN_MEM_ACCESS_EXEC) #define ACRN_MEM_TYPE_MASK 0x000007C0U #define ACRN_MEM_TYPE_WB 0x00000040U #define ACRN_MEM_TYPE_WT 0x00000080U #define ACRN_MEM_TYPE_UC 0x00000100U #define ACRN_MEM_TYPE_WC 0x00000200U #define ACRN_MEM_TYPE_WP 0x00000400U /* Memory mapping types */ #define ACRN_MEMMAP_RAM 0 #define ACRN_MEMMAP_MMIO 1 /** * struct acrn_vm_memmap - A EPT memory mapping info for a User VM. * @type: Type of the memory mapping (ACRM_MEMMAP_*). * Pass to hypervisor directly. * @attr: Attribute of the memory mapping. * Pass to hypervisor directly. * @user_vm_pa: Physical address of User VM. * Pass to hypervisor directly. * @service_vm_pa: Physical address of Service VM. * Pass to hypervisor directly. * @vma_base: VMA address of Service VM. Pass to hypervisor directly. * @len: Length of the memory mapping. * Pass to hypervisor directly. */ struct acrn_vm_memmap { __u32 type; __u32 attr; __u64 user_vm_pa; union { __u64 service_vm_pa; __u64 vma_base; }; __u64 len; }; /* Type of interrupt of a passthrough device */ #define ACRN_PTDEV_IRQ_INTX 0 #define ACRN_PTDEV_IRQ_MSI 1 #define ACRN_PTDEV_IRQ_MSIX 2 /** * struct acrn_ptdev_irq - Interrupt data of a passthrough device. * @type: Type (ACRN_PTDEV_IRQ_*) * @virt_bdf: Virtual Bus/Device/Function * @phys_bdf: Physical Bus/Device/Function * @intx: Info of interrupt * @intx.virt_pin: Virtual IOAPIC pin * @intx.phys_pin: Physical IOAPIC pin * @intx.is_pic_pin: Is PIC pin or not * * This structure will be passed to hypervisor directly. */ struct acrn_ptdev_irq { __u32 type; __u16 virt_bdf; __u16 phys_bdf; struct { __u32 virt_pin; __u32 phys_pin; __u32 is_pic_pin; } intx; }; /* Type of PCI device assignment */ #define ACRN_PTDEV_QUIRK_ASSIGN (1U << 0) #define ACRN_PCI_NUM_BARS 6 /** * struct acrn_pcidev - Info for assigning or de-assigning a PCI device * @type: Type of the assignment * @virt_bdf: Virtual Bus/Device/Function * @phys_bdf: Physical Bus/Device/Function * @intr_line: PCI interrupt line * @intr_pin: PCI interrupt pin * @bar: PCI BARs. * * This structure will be passed to hypervisor directly. */ struct acrn_pcidev { __u32 type; __u16 virt_bdf; __u16 phys_bdf; __u8 intr_line; __u8 intr_pin; __u32 bar[ACRN_PCI_NUM_BARS]; }; /** * struct acrn_msi_entry - Info for injecting a MSI interrupt to a VM * @msi_addr: MSI addr[19:12] with dest vCPU ID * @msi_data: MSI data[7:0] with vector */ struct acrn_msi_entry { __u64 msi_addr; __u64 msi_data; }; struct acrn_acpi_generic_address { __u8 space_id; __u8 bit_width; __u8 bit_offset; __u8 access_size; __u64 address; } __attribute__ ((__packed__)); /** * struct acrn_cstate_data - A C state package defined in ACPI * @cx_reg: Register of the C state object * @type: Type of the C state object * @latency: The worst-case latency to enter and exit this C state * @power: The average power consumption when in this C state */ struct acrn_cstate_data { struct acrn_acpi_generic_address cx_reg; __u8 type; __u32 latency; __u64 power; }; /** * struct acrn_pstate_data - A P state package defined in ACPI * @core_frequency: CPU frequency (in MHz). * @power: Power dissipation (in milliwatts). * @transition_latency: The worst-case latency in microseconds that CPU is * unavailable during a transition from any P state to * this P state. * @bus_master_latency: The worst-case latency in microseconds that Bus Masters * are prevented from accessing memory during a transition * from any P state to this P state. * @control: The value to be written to Performance Control Register * @status: Transition status. */ struct acrn_pstate_data { __u64 core_frequency; __u64 power; __u64 transition_latency; __u64 bus_master_latency; __u64 control; __u64 status; }; #define PMCMD_TYPE_MASK 0x000000ff enum acrn_pm_cmd_type { ACRN_PMCMD_GET_PX_CNT, ACRN_PMCMD_GET_PX_DATA, ACRN_PMCMD_GET_CX_CNT, ACRN_PMCMD_GET_CX_DATA, }; #define ACRN_IOEVENTFD_FLAG_PIO 0x01 #define ACRN_IOEVENTFD_FLAG_DATAMATCH 0x02 #define ACRN_IOEVENTFD_FLAG_DEASSIGN 0x04 /** * struct acrn_ioeventfd - Data to operate a &struct hsm_ioeventfd * @fd: The fd of eventfd associated with a hsm_ioeventfd * @flags: Logical-OR of ACRN_IOEVENTFD_FLAG_* * @addr: The start address of IO range of ioeventfd * @len: The length of IO range of ioeventfd * @reserved: Reserved and should be 0 * @data: Data for data matching * * Without flag ACRN_IOEVENTFD_FLAG_DEASSIGN, ioctl ACRN_IOCTL_IOEVENTFD * creates a &struct hsm_ioeventfd with properties originated from &struct * acrn_ioeventfd. With flag ACRN_IOEVENTFD_FLAG_DEASSIGN, ioctl * ACRN_IOCTL_IOEVENTFD destroys the &struct hsm_ioeventfd matching the fd. */ struct acrn_ioeventfd { __u32 fd; __u32 flags; __u64 addr; __u32 len; __u32 reserved; __u64 data; }; #define ACRN_IRQFD_FLAG_DEASSIGN 0x01 /** * struct acrn_irqfd - Data to operate a &struct hsm_irqfd * @fd: The fd of eventfd associated with a hsm_irqfd * @flags: Logical-OR of ACRN_IRQFD_FLAG_* * @msi: Info of MSI associated with the irqfd */ struct acrn_irqfd { __s32 fd; __u32 flags; struct acrn_msi_entry msi; }; /* The ioctl type, documented in ioctl-number.rst */ #define ACRN_IOCTL_TYPE 0xA2 /* * Common IOCTL IDs definition for ACRN userspace */ #define ACRN_IOCTL_CREATE_VM \ _IOWR(ACRN_IOCTL_TYPE, 0x10, struct acrn_vm_creation) #define ACRN_IOCTL_DESTROY_VM \ _IO(ACRN_IOCTL_TYPE, 0x11) #define ACRN_IOCTL_START_VM \ _IO(ACRN_IOCTL_TYPE, 0x12) #define ACRN_IOCTL_PAUSE_VM \ _IO(ACRN_IOCTL_TYPE, 0x13) #define ACRN_IOCTL_RESET_VM \ _IO(ACRN_IOCTL_TYPE, 0x15) #define ACRN_IOCTL_SET_VCPU_REGS \ _IOW(ACRN_IOCTL_TYPE, 0x16, struct acrn_vcpu_regs) #define ACRN_IOCTL_INJECT_MSI \ _IOW(ACRN_IOCTL_TYPE, 0x23, struct acrn_msi_entry) #define ACRN_IOCTL_VM_INTR_MONITOR \ _IOW(ACRN_IOCTL_TYPE, 0x24, unsigned long) #define ACRN_IOCTL_SET_IRQLINE \ _IOW(ACRN_IOCTL_TYPE, 0x25, __u64) #define ACRN_IOCTL_NOTIFY_REQUEST_FINISH \ _IOW(ACRN_IOCTL_TYPE, 0x31, struct acrn_ioreq_notify) #define ACRN_IOCTL_CREATE_IOREQ_CLIENT \ _IO(ACRN_IOCTL_TYPE, 0x32) #define ACRN_IOCTL_ATTACH_IOREQ_CLIENT \ _IO(ACRN_IOCTL_TYPE, 0x33) #define ACRN_IOCTL_DESTROY_IOREQ_CLIENT \ _IO(ACRN_IOCTL_TYPE, 0x34) #define ACRN_IOCTL_CLEAR_VM_IOREQ \ _IO(ACRN_IOCTL_TYPE, 0x35) #define ACRN_IOCTL_SET_MEMSEG \ _IOW(ACRN_IOCTL_TYPE, 0x41, struct acrn_vm_memmap) #define ACRN_IOCTL_UNSET_MEMSEG \ _IOW(ACRN_IOCTL_TYPE, 0x42, struct acrn_vm_memmap) #define ACRN_IOCTL_SET_PTDEV_INTR \ _IOW(ACRN_IOCTL_TYPE, 0x53, struct acrn_ptdev_irq) #define ACRN_IOCTL_RESET_PTDEV_INTR \ _IOW(ACRN_IOCTL_TYPE, 0x54, struct acrn_ptdev_irq) #define ACRN_IOCTL_ASSIGN_PCIDEV \ _IOW(ACRN_IOCTL_TYPE, 0x55, struct acrn_pcidev) #define ACRN_IOCTL_DEASSIGN_PCIDEV \ _IOW(ACRN_IOCTL_TYPE, 0x56, struct acrn_pcidev) #define ACRN_IOCTL_PM_GET_CPU_STATE \ _IOWR(ACRN_IOCTL_TYPE, 0x60, __u64) #define ACRN_IOCTL_IOEVENTFD \ _IOW(ACRN_IOCTL_TYPE, 0x70, struct acrn_ioeventfd) #define ACRN_IOCTL_IRQFD \ _IOW(ACRN_IOCTL_TYPE, 0x71, struct acrn_irqfd) #endif /* _UAPI_ACRN_H */