/usr/include/linux
NameSizeModeActions
android/-0755rm
byteorder/-0755rm
caif/-0755rm
can/-0755rm
cifs/-0755rm
dvb/-0755rm
genwqe/-0755rm
hdlc/-0755rm
hsi/-0755rm
iio/-0755rm
isdn/-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
tc_act/-0755rm
tc_ematch/-0755rm
usb/-0755rm
wimax/-0755rm
a.out.h68920644editdlrm
acct.h37330644editdlrm
adb.h11400644editdlrm
adfs_fs.h9360644editdlrm
affs_hardblocks.h15440644editdlrm
agpgart.h39400644editdlrm
aio_abi.h34170644editdlrm
am437x-vpfe.h36810644editdlrm
apm_bios.h36830644editdlrm
arcfb.h2130644editdlrm
arm_sdei.h27510644editdlrm
aspeed-lpc-ctrl.h17800644editdlrm
atalk.h10230644editdlrm
atm.h78880644editdlrm
atmapi.h9520644editdlrm
atmarp.h12960644editdlrm
atmbr2684.h32710644editdlrm
atmclip.h5760644editdlrm
atmdev.h76770644editdlrm
atmioc.h16460644editdlrm
atmlec.h23810644editdlrm
atmmpc.h42260644editdlrm
atmppp.h6390644editdlrm
atmsap.h49700644editdlrm
atmsvc.h18530644editdlrm
atm_eni.h6480644editdlrm
atm_he.h4060644editdlrm
atm_idt77105.h9550644editdlrm
atm_nicstar.h12780644editdlrm
atm_tcp.h16220644editdlrm
atm_zatm.h15400644editdlrm
audit.h203940644editdlrm
auto_dev-ioctl.h49860644editdlrm
auto_fs.h64280644editdlrm
auto_fs4.h4510644editdlrm
auxvec.h15970644editdlrm
ax25.h28240644editdlrm
b1lli.h17170644editdlrm
batadv_packet.h204950644editdlrm
batman_adv.h119770644editdlrm
baycom.h8830644editdlrm
bcache.h83660644editdlrm
bcm933xx_hcs.h4190644editdlrm
bfs_fs.h18930644editdlrm
binfmts.h6280644editdlrm
blkpg.h9040644editdlrm
blktrace_api.h47010644editdlrm
blkzoned.h66080644editdlrm
bpf.h2286600644editdlrm
bpfilter.h4650644editdlrm
bpf_common.h13670644editdlrm
bpf_perf_event.h5290644editdlrm
bpqether.h9810644editdlrm
bsg.h24940644editdlrm
bt-bmc.h5720644editdlrm
btf.h47960644editdlrm
btrfs.h289130644editdlrm
btrfs_tree.h252850644editdlrm
can.h78810644editdlrm
capability.h135210644editdlrm
capi.h31240644editdlrm
cciss_defs.h32810644editdlrm
cciss_ioctl.h27610644editdlrm
cdrom.h288590644editdlrm
cec-funcs.h539010644editdlrm
cec.h376910644editdlrm
cfm_bridge.h14560644editdlrm
cgroupstats.h22190644editdlrm
chio.h53440644editdlrm
close_range.h3770644editdlrm
cm4000_cs.h18060644editdlrm
cn_proc.h34560644editdlrm
coda.h175050644editdlrm
coda_psdev.h7830644editdlrm
coff.h124760644editdlrm
connector.h22530644editdlrm
const.h7880644editdlrm
coresight-stm.h6740644editdlrm
cramfs_fs.h35550644editdlrm
cryptouser.h33920644editdlrm
cuda.h9050644editdlrm
cyclades.h171080644editdlrm
cycx_cfm.h29900644editdlrm
dcbnl.h252380644editdlrm
dccp.h64360644editdlrm
devlink.h215560644editdlrm
dlm.h25530644editdlrm
dlmconstants.h50800644editdlrm
dlm_device.h25430644editdlrm
dlm_netlink.h11590644editdlrm
dlm_plock.h8940644editdlrm
dm-ioctl.h114000644editdlrm
dm-log-userspace.h151910644editdlrm
dma-buf.h52470644editdlrm
dn.h46420644editdlrm
dqblk_xfs.h92450644editdlrm
edd.h56040644editdlrm
efs_fs_sb.h22270644editdlrm
elf-em.h21870644editdlrm
elf-fdpic.h11240644editdlrm
elf.h134710644editdlrm
elfcore.h29950644editdlrm
errno.h230644editdlrm
errqueue.h14770644editdlrm
erspan.h10590644editdlrm
ethtool.h838550644editdlrm
ethtool_netlink.h228260644editdlrm
eventpoll.h27340644editdlrm
fadvise.h8420644editdlrm
falloc.h35840644editdlrm
fanotify.h53410644editdlrm
fb.h164770644editdlrm
fcntl.h41740644editdlrm
fd.h116720644editdlrm
fdreg.h54200644editdlrm
fib_rules.h20360644editdlrm
fiemap.h27750644editdlrm
filter.h22160644editdlrm
firewire-cdev.h438860644editdlrm
firewire-constants.h32310644editdlrm
flat.h21480644editdlrm
fou.h6940644editdlrm
fpga-dfl.h87280644editdlrm
fs.h134240644editdlrm
fsl_hypervisor.h73010644editdlrm
fsmap.h43930644editdlrm
fuse.h234730644editdlrm
futex.h49930644editdlrm
gameport.h8970644editdlrm
genetlink.h21750644editdlrm
gen_stats.h15260644editdlrm
gfs2_ondisk.h147430644editdlrm
gigaset_dev.h14420644editdlrm
gpio.h67510644editdlrm
gsmmux.h10410644editdlrm
gtp.h6810644editdlrm
hash_info.h9210644editdlrm
hdlc.h6370644editdlrm
hdlcdrv.h29080644editdlrm
hdreg.h227030644editdlrm
hid.h19010644editdlrm
hiddev.h63450644editdlrm
hidraw.h19930644editdlrm
hpet.h7430644editdlrm
hsr_netlink.h10810644editdlrm
hw_breakpoint.h7420644editdlrm
hyperv.h111520644editdlrm
hysdn_if.h13820644editdlrm
i2c-dev.h26120644editdlrm
i2c.h71320644editdlrm
i2o-dev.h115550644editdlrm
i8k.h15280644editdlrm
icmp.h29750644editdlrm
icmpv6.h40380644editdlrm
idxd.h84170644editdlrm
if.h109010644editdlrm
ife.h3510644editdlrm
if_addr.h18860644editdlrm
if_addrlabel.h7210644editdlrm
if_alg.h9460644editdlrm
if_arcnet.h37170644editdlrm
if_arp.h65770644editdlrm
if_bonding.h52910644editdlrm
if_bridge.h195140644editdlrm
if_cablemodem.h9860644editdlrm
if_eql.h13490644editdlrm
if_ether.h82480644editdlrm
if_fc.h17380644editdlrm
if_fddi.h37480644editdlrm
if_frad.h30190644editdlrm
if_hippi.h42350644editdlrm
if_infiniband.h12450644editdlrm
if_link.h310050644editdlrm
if_ltalk.h2100644editdlrm
if_macsec.h58320644editdlrm
if_packet.h79190644editdlrm
if_phonet.h4240644editdlrm
if_plip.h6600644editdlrm
if_ppp.h290644editdlrm
if_pppol2tp.h32920644editdlrm
if_pppox.h48790644editdlrm
if_slip.h8720644editdlrm
if_team.h26000644editdlrm
if_tun.h40980644editdlrm
if_tunnel.h45120644editdlrm
if_vlan.h18310644editdlrm
if_x25.h8810644editdlrm
if_xdp.h30110644editdlrm
igmp.h30640644editdlrm
ila.h12460644editdlrm
in.h100140644editdlrm
in6.h74380644editdlrm
inet_diag.h46720644editdlrm
inotify.h32920644editdlrm
input-event-codes.h286060644editdlrm
input.h159850644editdlrm
in_route.h9360644editdlrm
ioctl.h1630644editdlrm
iommu.h49040644editdlrm
io_uring.h62070644editdlrm
ip.h47280644editdlrm
ip6_tunnel.h19530644editdlrm
ipc.h21010644editdlrm
ipmi.h154420644editdlrm
ipmi_bmc.h4640644editdlrm
ipmi_msgdefs.h34300644editdlrm
ipmi_ssif_bmc.h4410644editdlrm
ipsec.h9470644editdlrm
ipv6.h39670644editdlrm
ipv6_route.h19080644editdlrm
ipx.h23470644editdlrm
ip_vs.h136310644editdlrm
irqnr.h1040644editdlrm
isdn.h57740644editdlrm
isdnif.h23700644editdlrm
isdn_divertif.h12000644editdlrm
isdn_ppp.h19230644editdlrm
iso_fs.h64850644editdlrm
isst_if.h53840644editdlrm
ivtv.h30220644editdlrm
ivtvfb.h12070644editdlrm
jffs2.h70180644editdlrm
joystick.h34340644editdlrm
kcm.h8220644editdlrm
kcmp.h5220644editdlrm
kcov.h10990644editdlrm
kd.h62530644editdlrm
kdev_t.h3830644editdlrm
kernel-page-flags.h9000644editdlrm
kernel.h4380644editdlrm
kernelcapi.h10190644editdlrm
kexec.h18350644editdlrm
keyboard.h127830644editdlrm
keyctl.h35000644editdlrm
kfd_ioctl.h288140644editdlrm
kfd_sysfs.h43500644editdlrm
kvm.h615610644editdlrm
kvm_para.h10010644editdlrm
l2tp.h55910644editdlrm
libc-compat.h82890644editdlrm
lightnvm.h50420644editdlrm
limits.h9370644editdlrm
lirc.h78130644editdlrm
llc.h31640644editdlrm
loop.h34970644editdlrm
lp.h41900644editdlrm
lwtunnel.h21790644editdlrm
magic.h35310644editdlrm
major.h47130644editdlrm
map_to_7segment.h72510644editdlrm
matroxfb.h14640644editdlrm
max2175.h10350644editdlrm
mdio.h172720644editdlrm
media-bus-format.h64110644editdlrm
media.h113820644editdlrm
mei.h34750644editdlrm
membarrier.h78990644editdlrm
memfd.h13240644editdlrm
mempolicy.h22310644editdlrm
meye.h25290644editdlrm
mic_common.h65190644editdlrm
mic_ioctl.h22520644editdlrm
mii.h94960644editdlrm
minix_fs.h21220644editdlrm
mman.h13850644editdlrm
mmtimer.h21170644editdlrm
module.h2550644editdlrm
mount.h45460644editdlrm
mpls.h23020644editdlrm
mpls_iptunnel.h7610644editdlrm
mptcp.h56080644editdlrm
mqueue.h22010644editdlrm
mroute.h54270644editdlrm
mroute6.h45770644editdlrm
mrp_bridge.h17080644editdlrm
msdos_fs.h69630644editdlrm
msg.h33740644editdlrm
mtio.h81750644editdlrm
nbd-netlink.h24080644editdlrm
nbd.h30240644editdlrm
ncsi.h38800644editdlrm
ndctl.h68660644editdlrm
neighbour.h51380644editdlrm
net.h20850644editdlrm
netconf.h6140644editdlrm
netdevice.h22530644editdlrm
netfilter.h18200644editdlrm
netfilter_arp.h4450644editdlrm
netfilter_bridge.h11680644editdlrm
netfilter_decnet.h19790644editdlrm
netfilter_ipv4.h21690644editdlrm
netfilter_ipv6.h21890644editdlrm
netlink.h114950644editdlrm
netlink_diag.h15240644editdlrm
netrom.h8070644editdlrm
net_dropmon.h29220644editdlrm
net_namespace.h7150644editdlrm
net_tstamp.h58060644editdlrm
nexthop.h15340644editdlrm
nfc.h112090644editdlrm
nfs.h45000644editdlrm
nfs2.h14680644editdlrm
nfs3.h24530644editdlrm
nfs4.h65990644editdlrm
nfs4_mount.h19320644editdlrm
nfsacl.h7180644editdlrm
nfs_fs.h16410644editdlrm
nfs_idmap.h22430644editdlrm
nfs_mount.h21420644editdlrm
nilfs2_api.h75890644editdlrm
nilfs2_ondisk.h180330644editdlrm
nitro_enclaves.h131520644editdlrm
nl80211.h3352640644editdlrm
nsfs.h6390644editdlrm
nubus.h81910644editdlrm
nvme_ioctl.h21120644editdlrm
nvram.h5320644editdlrm
n_r3964.h24100644editdlrm
omap3isp.h208530644editdlrm
omapfb.h59180644editdlrm
oom.h5110644editdlrm
openat2.h12890644editdlrm
openvswitch.h401840644editdlrm
packet_diag.h16720644editdlrm
param.h1410644editdlrm
parport.h36440644editdlrm
patchkey.h8920644editdlrm
pci.h13800644editdlrm
pcitest.h7110644editdlrm
pci_regs.h578270644editdlrm
perf_event.h405800644editdlrm
personality.h20970644editdlrm
pfkeyv2.h105690644editdlrm
pfrut.h79870644editdlrm
pg.h23940644editdlrm
phantom.h16540644editdlrm
phonet.h46770644editdlrm
pktcdvd.h26870644editdlrm
pkt_cls.h185110644editdlrm
pkt_sched.h302960644editdlrm
pmu.h53190644editdlrm
poll.h220644editdlrm
posix_acl.h12540644editdlrm
posix_acl_xattr.h11150644editdlrm
posix_types.h10980644editdlrm
ppdev.h32110644editdlrm
ppp-comp.h25270644editdlrm
ppp-ioctl.h54750644editdlrm
ppp_defs.h51070644editdlrm
pps.h47340644editdlrm
pr.h10730644editdlrm
prctl.h80230644editdlrm
psample.h22710644editdlrm
psci.h43280644editdlrm
psp-sev.h45860644editdlrm
ptp_clock.h74560644editdlrm
ptrace.h36740644editdlrm
qemu_fw_cfg.h24690644editdlrm
qnx4_fs.h23280644editdlrm
qnxtypes.h6240644editdlrm
qrtr.h8930644editdlrm
quota.h62910644editdlrm
radeonfb.h3600644editdlrm
random.h13700644editdlrm
raw.h3650644editdlrm
rds.h93010644editdlrm
reboot.h13430644editdlrm
reiserfs_fs.h7750644editdlrm
reiserfs_xattr.h5330644editdlrm
resource.h23470644editdlrm
rfkill.h66080644editdlrm
rio_cm_cdev.h32480644editdlrm
rio_mport_cdev.h93300644editdlrm
romfs_fs.h12380644editdlrm
rose.h22320644editdlrm
route.h23320644editdlrm
rpmsg.h5440644editdlrm
rseq.h49040644editdlrm
rtc.h40090644editdlrm
rtnetlink.h202010644editdlrm
rxrpc.h50800644editdlrm
scc.h45970644editdlrm
sched.h27970644editdlrm
scif_ioctl.h63820644editdlrm
screen_info.h24790644editdlrm
sctp.h359940644editdlrm
sdla.h28390644editdlrm
seccomp.h22570644editdlrm
securebits.h27040644editdlrm
sed-opal.h32750644editdlrm
seg6.h11700644editdlrm
seg6_genl.h5890644editdlrm
seg6_hmac.h4230644editdlrm
seg6_iptunnel.h9270644editdlrm
seg6_local.h20600644editdlrm
selinux_netlink.h11950644editdlrm
sem.h30430644editdlrm
serial.h38660644editdlrm
serial_core.h62450644editdlrm
serial_reg.h154960644editdlrm
serio.h20370644editdlrm
sev-guest.h23030644editdlrm
shm.h37850644editdlrm
signal.h3880644editdlrm
signalfd.h12330644editdlrm
smc.h85130644editdlrm
smc_diag.h27280644editdlrm
smiapp.h10580644editdlrm
snmp.h136630644editdlrm
socket.h9010644editdlrm
sockios.h61060644editdlrm
sock_diag.h13010644editdlrm
sonet.h22900644editdlrm
sonypi.h53090644editdlrm
sound.h12370644editdlrm
soundcard.h460380644editdlrm
stat.h63520644editdlrm
stddef.h15320644editdlrm
stm.h12750644editdlrm
string.h2380644editdlrm
suspend_ioctls.h14310644editdlrm
swab.h69210644editdlrm
switchtec_ioctl.h52620644editdlrm
synclink.h89850644editdlrm
sync_file.h28830644editdlrm
sysctl.h258420644editdlrm
sysinfo.h10490644editdlrm
target_core_user.h46330644editdlrm
taskstats.h71800644editdlrm
tcp.h99200644editdlrm
tcp_metrics.h15490644editdlrm
tdx-guest.h13050644editdlrm
tee.h131650644editdlrm
termios.h5060644editdlrm
thermal.h33090644editdlrm
time.h17480644editdlrm
timerfd.h9360644editdlrm
times.h2780644editdlrm
timex.h64030644editdlrm
time_types.h11750644editdlrm
tiocl.h17290644editdlrm
tipc.h88250644editdlrm
tipc_config.h147080644editdlrm
tipc_netlink.h93950644editdlrm
tipc_sockets_diag.h4680644editdlrm
tls.h42880644editdlrm
toshiba.h19300644editdlrm
tty.h15850644editdlrm
tty_flags.h45270644editdlrm
types.h14760644editdlrm
udf_fs_i.h6970644editdlrm
udp.h16610644editdlrm
uhid.h46480644editdlrm
uinput.h92610644editdlrm
uio.h7320644editdlrm
uleds.h7980644editdlrm
ultrasound.h45620644editdlrm
un.h3840644editdlrm
unistd.h2200644editdlrm
unix_diag.h12530644editdlrm
usbdevice_fs.h83170644editdlrm
usbip.h6400644editdlrm
userfaultfd.h77740644editdlrm
userio.h15160644editdlrm
utime.h2150644editdlrm
utsname.h6690644editdlrm
uuid.h13560644editdlrm
uvcvideo.h26350644editdlrm
v4l2-common.h41770644editdlrm
v4l2-controls.h517770644editdlrm
v4l2-dv-timings.h315620644editdlrm
v4l2-mediabus.h51010644editdlrm
v4l2-subdev.h60960644editdlrm
vboxguest.h87290644editdlrm
vbox_err.h72570644editdlrm
vbox_vmmdev_types.h83560644editdlrm
vdpa.h14210644editdlrm
version.h4300644editdlrm
veth.h2240644editdlrm
vfio.h522230644editdlrm
vfio_ccw.h13170644editdlrm
vfio_zdev.h25420644editdlrm
vhost.h64180644editdlrm
vhost_types.h39970644editdlrm
videodev2.h907410644editdlrm
virtio_9p.h20410644editdlrm
virtio_balloon.h52740644editdlrm
virtio_blk.h67970644editdlrm
virtio_bt.h7720644editdlrm
virtio_config.h40050644editdlrm
virtio_console.h31360644editdlrm
virtio_crypto.h138740644editdlrm
virtio_fs.h5720644editdlrm
virtio_gpu.h114540644editdlrm
virtio_ids.h32690644editdlrm
virtio_input.h25060644editdlrm
virtio_iommu.h37830644editdlrm
virtio_mem.h71570644editdlrm
virtio_mmio.h49690644editdlrm
virtio_net.h105490644editdlrm
virtio_pci.h74060644editdlrm
virtio_ring.h74970644editdlrm
virtio_rng.h2650644editdlrm
virtio_scsi.h60350644editdlrm
virtio_snd.h93040644editdlrm
virtio_types.h21530644editdlrm
virtio_vsock.h30860644editdlrm
vmcore.h4310644editdlrm
vm_sockets.h64940644editdlrm
vm_sockets_diag.h9630644editdlrm
vsockmon.h18850644editdlrm
vt.h30590644editdlrm
vtpm_proxy.h17190644editdlrm
wait.h6820644editdlrm
wanrouter.h4530644editdlrm
watchdog.h23350644editdlrm
wimax.h83710644editdlrm
wireless.h427030644editdlrm
wmi.h18860644editdlrm
x25.h35620644editdlrm
xattr.h28600644editdlrm
xdp_diag.h14680644editdlrm
xfrm.h119940644editdlrm
xilinx-v4l2-controls.h29760644editdlrm
zorro.h32960644editdlrm
zorro_ids.h299630644editdlrm
Edit: /usr/include/linux/nitro_enclaves.h (13152B)
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. */ #ifndef _LINUX_NITRO_ENCLAVES_H_ #define _LINUX_NITRO_ENCLAVES_H_ #include /** * DOC: Nitro Enclaves (NE) Kernel Driver Interface */ /** * NE_CREATE_VM - The command is used to create a slot that is associated with * an enclave VM. * The generated unique slot id is an output parameter. * The ioctl can be invoked on the /dev/nitro_enclaves fd, before * setting any resources, such as memory and vCPUs, for an * enclave. Memory and vCPUs are set for the slot mapped to an enclave. * A NE CPU pool has to be set before calling this function. The * pool can be set after the NE driver load, using * /sys/module/nitro_enclaves/parameters/ne_cpus. * Its format is the detailed in the cpu-lists section: * https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html * CPU 0 and its siblings have to remain available for the * primary / parent VM, so they cannot be set for enclaves. Full * CPU core(s), from the same NUMA node, need(s) to be included * in the CPU pool. * * Context: Process context. * Return: * * Enclave file descriptor - Enclave file descriptor used with * ioctl calls to set vCPUs and memory * regions, then start the enclave. * * -1 - There was a failure in the ioctl logic. * On failure, errno is set to: * * EFAULT - copy_to_user() failure. * * ENOMEM - Memory allocation failure for internal * bookkeeping variables. * * NE_ERR_NO_CPUS_AVAIL_IN_POOL - No NE CPU pool set / no CPUs available * in the pool. * * Error codes from get_unused_fd_flags() and anon_inode_getfile(). * * Error codes from the NE PCI device request. */ #define NE_CREATE_VM _IOR(0xAE, 0x20, __u64) /** * NE_ADD_VCPU - The command is used to set a vCPU for an enclave. The vCPU can * be auto-chosen from the NE CPU pool or it can be set by the * caller, with the note that it needs to be available in the NE * CPU pool. Full CPU core(s), from the same NUMA node, need(s) to * be associated with an enclave. * The vCPU id is an input / output parameter. If its value is 0, * then a CPU is chosen from the enclave CPU pool and returned via * this parameter. * The ioctl can be invoked on the enclave fd, before an enclave * is started. * * Context: Process context. * Return: * * 0 - Logic succesfully completed. * * -1 - There was a failure in the ioctl logic. * On failure, errno is set to: * * EFAULT - copy_from_user() / copy_to_user() failure. * * ENOMEM - Memory allocation failure for internal * bookkeeping variables. * * EIO - Current task mm is not the same as the one * that created the enclave. * * NE_ERR_NO_CPUS_AVAIL_IN_POOL - No CPUs available in the NE CPU pool. * * NE_ERR_VCPU_ALREADY_USED - The provided vCPU is already used. * * NE_ERR_VCPU_NOT_IN_CPU_POOL - The provided vCPU is not available in the * NE CPU pool. * * NE_ERR_VCPU_INVALID_CPU_CORE - The core id of the provided vCPU is invalid * or out of range. * * NE_ERR_NOT_IN_INIT_STATE - The enclave is not in init state * (init = before being started). * * NE_ERR_INVALID_VCPU - The provided vCPU is not in the available * CPUs range. * * Error codes from the NE PCI device request. */ #define NE_ADD_VCPU _IOWR(0xAE, 0x21, __u32) /** * NE_GET_IMAGE_LOAD_INFO - The command is used to get information needed for * in-memory enclave image loading e.g. offset in * enclave memory to start placing the enclave image. * The image load info is an input / output parameter. * It includes info provided by the caller - flags - * and returns the offset in enclave memory where to * start placing the enclave image. * The ioctl can be invoked on the enclave fd, before * an enclave is started. * * Context: Process context. * Return: * * 0 - Logic succesfully completed. * * -1 - There was a failure in the ioctl logic. * On failure, errno is set to: * * EFAULT - copy_from_user() / copy_to_user() failure. * * NE_ERR_NOT_IN_INIT_STATE - The enclave is not in init state (init = * before being started). * * NE_ERR_INVALID_FLAG_VALUE - The value of the provided flag is invalid. */ #define NE_GET_IMAGE_LOAD_INFO _IOWR(0xAE, 0x22, struct ne_image_load_info) /** * NE_SET_USER_MEMORY_REGION - The command is used to set a memory region for an * enclave, given the allocated memory from the * userspace. Enclave memory needs to be from the * same NUMA node as the enclave CPUs. * The user memory region is an input parameter. It * includes info provided by the caller - flags, * memory size and userspace address. * The ioctl can be invoked on the enclave fd, * before an enclave is started. * * Context: Process context. * Return: * * 0 - Logic succesfully completed. * * -1 - There was a failure in the ioctl logic. * On failure, errno is set to: * * EFAULT - copy_from_user() failure. * * EINVAL - Invalid physical memory region(s) e.g. * unaligned address. * * EIO - Current task mm is not the same as * the one that created the enclave. * * ENOMEM - Memory allocation failure for internal * bookkeeping variables. * * NE_ERR_NOT_IN_INIT_STATE - The enclave is not in init state * (init = before being started). * * NE_ERR_INVALID_MEM_REGION_SIZE - The memory size of the region is not * multiple of 2 MiB. * * NE_ERR_INVALID_MEM_REGION_ADDR - Invalid user space address given. * * NE_ERR_UNALIGNED_MEM_REGION_ADDR - Unaligned user space address given. * * NE_ERR_MEM_REGION_ALREADY_USED - The memory region is already used. * * NE_ERR_MEM_NOT_HUGE_PAGE - The memory region is not backed by * huge pages. * * NE_ERR_MEM_DIFFERENT_NUMA_NODE - The memory region is not from the same * NUMA node as the CPUs. * * NE_ERR_MEM_MAX_REGIONS - The number of memory regions set for * the enclave reached maximum. * * NE_ERR_INVALID_PAGE_SIZE - The memory region is not backed by * pages multiple of 2 MiB. * * NE_ERR_INVALID_FLAG_VALUE - The value of the provided flag is invalid. * * Error codes from get_user_pages(). * * Error codes from the NE PCI device request. */ #define NE_SET_USER_MEMORY_REGION _IOW(0xAE, 0x23, struct ne_user_memory_region) /** * NE_START_ENCLAVE - The command is used to trigger enclave start after the * enclave resources, such as memory and CPU, have been set. * The enclave start info is an input / output parameter. It * includes info provided by the caller - enclave cid and * flags - and returns the cid (if input cid is 0). * The ioctl can be invoked on the enclave fd, after an * enclave slot is created and resources, such as memory and * vCPUs are set for an enclave. * * Context: Process context. * Return: * * 0 - Logic succesfully completed. * * -1 - There was a failure in the ioctl logic. * On failure, errno is set to: * * EFAULT - copy_from_user() / copy_to_user() failure. * * NE_ERR_NOT_IN_INIT_STATE - The enclave is not in init state * (init = before being started). * * NE_ERR_NO_MEM_REGIONS_ADDED - No memory regions are set. * * NE_ERR_NO_VCPUS_ADDED - No vCPUs are set. * * NE_ERR_FULL_CORES_NOT_USED - Full core(s) not set for the enclave. * * NE_ERR_ENCLAVE_MEM_MIN_SIZE - Enclave memory is less than minimum * memory size (64 MiB). * * NE_ERR_INVALID_FLAG_VALUE - The value of the provided flag is invalid. * * NE_ERR_INVALID_ENCLAVE_CID - The provided enclave CID is invalid. * * Error codes from the NE PCI device request. */ #define NE_START_ENCLAVE _IOWR(0xAE, 0x24, struct ne_enclave_start_info) /** * DOC: NE specific error codes */ /** * NE_ERR_VCPU_ALREADY_USED - The provided vCPU is already used. */ #define NE_ERR_VCPU_ALREADY_USED (256) /** * NE_ERR_VCPU_NOT_IN_CPU_POOL - The provided vCPU is not available in the * NE CPU pool. */ #define NE_ERR_VCPU_NOT_IN_CPU_POOL (257) /** * NE_ERR_VCPU_INVALID_CPU_CORE - The core id of the provided vCPU is invalid * or out of range of the NE CPU pool. */ #define NE_ERR_VCPU_INVALID_CPU_CORE (258) /** * NE_ERR_INVALID_MEM_REGION_SIZE - The user space memory region size is not * multiple of 2 MiB. */ #define NE_ERR_INVALID_MEM_REGION_SIZE (259) /** * NE_ERR_INVALID_MEM_REGION_ADDR - The user space memory region address range * is invalid. */ #define NE_ERR_INVALID_MEM_REGION_ADDR (260) /** * NE_ERR_UNALIGNED_MEM_REGION_ADDR - The user space memory region address is * not aligned. */ #define NE_ERR_UNALIGNED_MEM_REGION_ADDR (261) /** * NE_ERR_MEM_REGION_ALREADY_USED - The user space memory region is already used. */ #define NE_ERR_MEM_REGION_ALREADY_USED (262) /** * NE_ERR_MEM_NOT_HUGE_PAGE - The user space memory region is not backed by * contiguous physical huge page(s). */ #define NE_ERR_MEM_NOT_HUGE_PAGE (263) /** * NE_ERR_MEM_DIFFERENT_NUMA_NODE - The user space memory region is backed by * pages from different NUMA nodes than the CPUs. */ #define NE_ERR_MEM_DIFFERENT_NUMA_NODE (264) /** * NE_ERR_MEM_MAX_REGIONS - The supported max memory regions per enclaves has * been reached. */ #define NE_ERR_MEM_MAX_REGIONS (265) /** * NE_ERR_NO_MEM_REGIONS_ADDED - The command to start an enclave is triggered * and no memory regions are added. */ #define NE_ERR_NO_MEM_REGIONS_ADDED (266) /** * NE_ERR_NO_VCPUS_ADDED - The command to start an enclave is triggered and no * vCPUs are added. */ #define NE_ERR_NO_VCPUS_ADDED (267) /** * NE_ERR_ENCLAVE_MEM_MIN_SIZE - The enclave memory size is lower than the * minimum supported. */ #define NE_ERR_ENCLAVE_MEM_MIN_SIZE (268) /** * NE_ERR_FULL_CORES_NOT_USED - The command to start an enclave is triggered and * full CPU cores are not set. */ #define NE_ERR_FULL_CORES_NOT_USED (269) /** * NE_ERR_NOT_IN_INIT_STATE - The enclave is not in init state when setting * resources or triggering start. */ #define NE_ERR_NOT_IN_INIT_STATE (270) /** * NE_ERR_INVALID_VCPU - The provided vCPU is out of range of the available CPUs. */ #define NE_ERR_INVALID_VCPU (271) /** * NE_ERR_NO_CPUS_AVAIL_IN_POOL - The command to create an enclave is triggered * and no CPUs are available in the pool. */ #define NE_ERR_NO_CPUS_AVAIL_IN_POOL (272) /** * NE_ERR_INVALID_PAGE_SIZE - The user space memory region is not backed by pages * multiple of 2 MiB. */ #define NE_ERR_INVALID_PAGE_SIZE (273) /** * NE_ERR_INVALID_FLAG_VALUE - The provided flag value is invalid. */ #define NE_ERR_INVALID_FLAG_VALUE (274) /** * NE_ERR_INVALID_ENCLAVE_CID - The provided enclave CID is invalid, either * being a well-known value or the CID of the * parent / primary VM. */ #define NE_ERR_INVALID_ENCLAVE_CID (275) /** * DOC: Image load info flags */ /** * NE_EIF_IMAGE - Enclave Image Format (EIF) */ #define NE_EIF_IMAGE (0x01) #define NE_IMAGE_LOAD_MAX_FLAG_VAL (0x02) /** * struct ne_image_load_info - Info necessary for in-memory enclave image * loading (in / out). * @flags: Flags to determine the enclave image type * (e.g. Enclave Image Format - EIF) (in). * @memory_offset: Offset in enclave memory where to start placing the * enclave image (out). */ struct ne_image_load_info { __u64 flags; __u64 memory_offset; }; /** * DOC: User memory region flags */ /** * NE_DEFAULT_MEMORY_REGION - Memory region for enclave general usage. */ #define NE_DEFAULT_MEMORY_REGION (0x00) #define NE_MEMORY_REGION_MAX_FLAG_VAL (0x01) /** * struct ne_user_memory_region - Memory region to be set for an enclave (in). * @flags: Flags to determine the usage for the memory region (in). * @memory_size: The size, in bytes, of the memory region to be set for * an enclave (in). * @userspace_addr: The start address of the userspace allocated memory of * the memory region to set for an enclave (in). */ struct ne_user_memory_region { __u64 flags; __u64 memory_size; __u64 userspace_addr; }; /** * DOC: Enclave start info flags */ /** * NE_ENCLAVE_PRODUCTION_MODE - Start enclave in production mode. */ #define NE_ENCLAVE_PRODUCTION_MODE (0x00) /** * NE_ENCLAVE_DEBUG_MODE - Start enclave in debug mode. */ #define NE_ENCLAVE_DEBUG_MODE (0x01) #define NE_ENCLAVE_START_MAX_FLAG_VAL (0x02) /** * struct ne_enclave_start_info - Setup info necessary for enclave start (in / out). * @flags: Flags for the enclave to start with (e.g. debug mode) (in). * @enclave_cid: Context ID (CID) for the enclave vsock device. If 0 as * input, the CID is autogenerated by the hypervisor and * returned back as output by the driver (in / out). */ struct ne_enclave_start_info { __u64 flags; __u64 enclave_cid; }; #endif /* _LINUX_NITRO_ENCLAVES_H_ */