PATH: //proc/thread-self/root/proc/self/root/proc/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: hyperv.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * * Copyright (c) 2011, Microsoft Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307 USA. * * Authors: * Haiyang Zhang <haiyangz@microsoft.com> * Hank Janssen <hjanssen@microsoft.com> * K. Y. Srinivasan <kys@microsoft.com> * */ #ifndef _HYPERV_H #define _HYPERV_H #include <linux/types.h> /* * Framework version for util services. */ #define UTIL_FW_MINOR 0 #define UTIL_WS2K8_FW_MAJOR 1 #define UTIL_WS2K8_FW_VERSION (UTIL_WS2K8_FW_MAJOR << 16 | UTIL_FW_MINOR) #define UTIL_FW_MAJOR 3 #define UTIL_FW_VERSION (UTIL_FW_MAJOR << 16 | UTIL_FW_MINOR) /* * Implementation of host controlled snapshot of the guest. */ #define VSS_OP_REGISTER 128 /* Daemon code with full handshake support. */ #define VSS_OP_REGISTER1 129 enum hv_vss_op { VSS_OP_CREATE = 0, VSS_OP_DELETE, VSS_OP_HOT_BACKUP, VSS_OP_GET_DM_INFO, VSS_OP_BU_COMPLETE, /* * Following operations are only supported with IC version >= 5.0 */ VSS_OP_FREEZE, /* Freeze the file systems in the VM */ VSS_OP_THAW, /* Unfreeze the file systems */ VSS_OP_AUTO_RECOVER, VSS_OP_COUNT /* Number of operations, must be last */ }; /* * Header for all VSS messages. */ struct hv_vss_hdr { __u8 operation; __u8 reserved[7]; } __attribute__((packed)); /* * Flag values for the hv_vss_check_feature. Linux supports only * one value. */ #define VSS_HBU_NO_AUTO_RECOVERY 0x00000005 struct hv_vss_check_feature { __u32 flags; } __attribute__((packed)); struct hv_vss_check_dm_info { __u32 flags; } __attribute__((packed)); /* * struct hv_vss_msg encodes the fields that the Linux VSS * driver accesses. However, FREEZE messages from Hyper-V contain * additional LUN information that Linux doesn't use and are not * represented in struct hv_vss_msg. A received FREEZE message may * be as large as 6,260 bytes, so the driver must allocate at least * that much space, not sizeof(struct hv_vss_msg). Other messages * such as AUTO_RECOVER may be as large as 12,500 bytes. However, * because the Linux VSS driver responds that it doesn't support * auto-recovery, it should not receive such messages. */ struct hv_vss_msg { union { struct hv_vss_hdr vss_hdr; int error; }; union { struct hv_vss_check_feature vss_cf; struct hv_vss_check_dm_info dm_info; }; } __attribute__((packed)); /* * Implementation of a host to guest copy facility. */ #define FCOPY_VERSION_0 0 #define FCOPY_VERSION_1 1 #define FCOPY_CURRENT_VERSION FCOPY_VERSION_1 #define W_MAX_PATH 260 enum hv_fcopy_op { START_FILE_COPY = 0, WRITE_TO_FILE, COMPLETE_FCOPY, CANCEL_FCOPY, }; struct hv_fcopy_hdr { __u32 operation; __u8 service_id0[16]; /* currently unused */ __u8 service_id1[16]; /* currently unused */ } __attribute__((packed)); #define OVER_WRITE 0x1 #define CREATE_PATH 0x2 struct hv_start_fcopy { struct hv_fcopy_hdr hdr; __u16 file_name[W_MAX_PATH]; __u16 path_name[W_MAX_PATH]; __u32 copy_flags; __u64 file_size; } __attribute__((packed)); /* * The file is chunked into fragments. */ #define DATA_FRAGMENT (6 * 1024) struct hv_do_fcopy { struct hv_fcopy_hdr hdr; __u32 pad; __u64 offset; __u32 size; __u8 data[DATA_FRAGMENT]; } __attribute__((packed)); /* * An implementation of HyperV key value pair (KVP) functionality for Linux. * * * Copyright (C) 2010, Novell, Inc. * Author : K. Y. Srinivasan <ksrinivasan@novell.com> * */ /* * Maximum value size - used for both key names and value data, and includes * any applicable NULL terminators. * * Note: This limit is somewhat arbitrary, but falls easily within what is * supported for all native guests (back to Win 2000) and what is reasonable * for the IC KVP exchange functionality. Note that Windows Me/98/95 are * limited to 255 character key names. * * MSDN recommends not storing data values larger than 2048 bytes in the * registry. * * Note: This value is used in defining the KVP exchange message - this value * cannot be modified without affecting the message size and compatibility. */ /* * bytes, including any null terminators */ #define HV_KVP_EXCHANGE_MAX_VALUE_SIZE (2048) /* * Maximum key size - the registry limit for the length of an entry name * is 256 characters, including the null terminator */ #define HV_KVP_EXCHANGE_MAX_KEY_SIZE (512) /* * In Linux, we implement the KVP functionality in two components: * 1) The kernel component which is packaged as part of the hv_utils driver * is responsible for communicating with the host and responsible for * implementing the host/guest protocol. 2) A user level daemon that is * responsible for data gathering. * * Host/Guest Protocol: The host iterates over an index and expects the guest * to assign a key name to the index and also return the value corresponding to * the key. The host will have atmost one KVP transaction outstanding at any * given point in time. The host side iteration stops when the guest returns * an error. Microsoft has specified the following mapping of key names to * host specified index: * * Index Key Name * 0 FullyQualifiedDomainName * 1 IntegrationServicesVersion * 2 NetworkAddressIPv4 * 3 NetworkAddressIPv6 * 4 OSBuildNumber * 5 OSName * 6 OSMajorVersion * 7 OSMinorVersion * 8 OSVersion * 9 ProcessorArchitecture * * The Windows host expects the Key Name and Key Value to be encoded in utf16. * * Guest Kernel/KVP Daemon Protocol: As noted earlier, we implement all of the * data gathering functionality in a user mode daemon. The user level daemon * is also responsible for binding the key name to the index as well. The * kernel and user-level daemon communicate using a connector channel. * * The user mode component first registers with the * kernel component. Subsequently, the kernel component requests, data * for the specified keys. In response to this message the user mode component * fills in the value corresponding to the specified key. We overload the * sequence field in the cn_msg header to define our KVP message types. * * * The kernel component simply acts as a conduit for communication between the * Windows host and the user-level daemon. The kernel component passes up the * index received from the Host to the user-level daemon. If the index is * valid (supported), the corresponding key as well as its * value (both are strings) is returned. If the index is invalid * (not supported), a NULL key string is returned. */ /* * Registry value types. */ #define REG_SZ 1 #define REG_U32 4 #define REG_U64 8 /* * As we look at expanding the KVP functionality to include * IP injection functionality, we need to maintain binary * compatibility with older daemons. * * The KVP opcodes are defined by the host and it was unfortunate * that I chose to treat the registration operation as part of the * KVP operations defined by the host. * Here is the level of compatibility * (between the user level daemon and the kernel KVP driver) that we * will implement: * * An older daemon will always be supported on a newer driver. * A given user level daemon will require a minimal version of the * kernel driver. * If we cannot handle the version differences, we will fail gracefully * (this can happen when we have a user level daemon that is more * advanced than the KVP driver. * * We will use values used in this handshake for determining if we have * workable user level daemon and the kernel driver. We begin by taking the * registration opcode out of the KVP opcode namespace. We will however, * maintain compatibility with the existing user-level daemon code. */ /* * Daemon code not supporting IP injection (legacy daemon). */ #define KVP_OP_REGISTER 4 /* * Daemon code supporting IP injection. * The KVP opcode field is used to communicate the * registration information; so define a namespace that * will be distinct from the host defined KVP opcode. */ #define KVP_OP_REGISTER1 100 enum hv_kvp_exchg_op { KVP_OP_GET = 0, KVP_OP_SET, KVP_OP_DELETE, KVP_OP_ENUMERATE, KVP_OP_GET_IP_INFO, KVP_OP_SET_IP_INFO, KVP_OP_COUNT /* Number of operations, must be last. */ }; enum hv_kvp_exchg_pool { KVP_POOL_EXTERNAL = 0, KVP_POOL_GUEST, KVP_POOL_AUTO, KVP_POOL_AUTO_EXTERNAL, KVP_POOL_AUTO_INTERNAL, KVP_POOL_COUNT /* Number of pools, must be last. */ }; /* * Some Hyper-V status codes. */ #define HV_S_OK 0x00000000 #define HV_E_FAIL 0x80004005 #define HV_S_CONT 0x80070103 #define HV_ERROR_NOT_SUPPORTED 0x80070032 #define HV_ERROR_MACHINE_LOCKED 0x800704F7 #define HV_ERROR_DEVICE_NOT_CONNECTED 0x8007048F #define HV_INVALIDARG 0x80070057 #define HV_GUID_NOTFOUND 0x80041002 #define HV_ERROR_ALREADY_EXISTS 0x80070050 #define HV_ERROR_DISK_FULL 0x80070070 #define ADDR_FAMILY_NONE 0x00 #define ADDR_FAMILY_IPV4 0x01 #define ADDR_FAMILY_IPV6 0x02 #define MAX_ADAPTER_ID_SIZE 128 #define MAX_IP_ADDR_SIZE 1024 #define MAX_GATEWAY_SIZE 512 struct hv_kvp_ipaddr_value { __u16 adapter_id[MAX_ADAPTER_ID_SIZE]; __u8 addr_family; __u8 dhcp_enabled; __u16 ip_addr[MAX_IP_ADDR_SIZE]; __u16 sub_net[MAX_IP_ADDR_SIZE]; __u16 gate_way[MAX_GATEWAY_SIZE]; __u16 dns_addr[MAX_IP_ADDR_SIZE]; } __attribute__((packed)); struct hv_kvp_hdr { __u8 operation; __u8 pool; __u16 pad; } __attribute__((packed)); struct hv_kvp_exchg_msg_value { __u32 value_type; __u32 key_size; __u32 value_size; __u8 key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; union { __u8 value[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; __u32 value_u32; __u64 value_u64; }; } __attribute__((packed)); struct hv_kvp_msg_enumerate { __u32 index; struct hv_kvp_exchg_msg_value data; } __attribute__((packed)); struct hv_kvp_msg_get { struct hv_kvp_exchg_msg_value data; }; struct hv_kvp_msg_set { struct hv_kvp_exchg_msg_value data; }; struct hv_kvp_msg_delete { __u32 key_size; __u8 key[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; }; struct hv_kvp_register { __u8 version[HV_KVP_EXCHANGE_MAX_KEY_SIZE]; }; struct hv_kvp_msg { union { struct hv_kvp_hdr kvp_hdr; int error; }; union { struct hv_kvp_msg_get kvp_get; struct hv_kvp_msg_set kvp_set; struct hv_kvp_msg_delete kvp_delete; struct hv_kvp_msg_enumerate kvp_enum_data; struct hv_kvp_ipaddr_value kvp_ip_val; struct hv_kvp_register kvp_register; } body; } __attribute__((packed)); struct hv_kvp_ip_msg { __u8 operation; __u8 pool; struct hv_kvp_ipaddr_value kvp_ip_val; } __attribute__((packed)); #endif /* _HYPERV_H */
SIMPAN PERUBAHAN