linux/include/linux/hyperv.h
<<
on> on> onp/spa onpspa class="lxr_search">on> ="+search" method="post" onsubmit="return do_search(this);">on> on> on> Search on> onp/spa > ="ajax+*" method="post" onsubmit="return false;">onpinput type="hidden" name="ajax_lookup" id="ajax_lookup" lue="v3">o>
pdiv id="file_contents"
o o1p/a>pspa
 class="comment">/*p/spa
  o o2p/a>pspa
 class="comment"> *p/spa
  o o3p/a>pspa
 class="comment"> * Copyright (c) 2011, Microsoft Corporaon>
.p/spa
  o o4p/a>pspa
 class="comment"> *p/spa
  o o5p/a>pspa
 class="comment"> * This program is free software; you ca
 redistribute it and/or modify itp/spa
  o o6p/a>pspa
 class="comment"> * under the terms and condion>
s of the GNU General Public License,p/spa
  o o7p/a>pspa
 class="comment"> * versn va2, as published by the Free Software Foundaon>
.p/spa
  o o8p/a>pspa
 class="comment"> *p/spa
  o o9p/a>pspa
 class="comment"> * This program is distributed in the hope it will be useful, but WITHOUTp/spa
  o tiona>pspa
 class="comment"> * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY orp/spa
  o 11p/a>pspa
 class="comment"> * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License forp/spa
  o 12p/a>pspa
 class="comment"> * more details.p/spa
  o 13p/a>pspa
 class="comment"> *p/spa
  o 14p/a>pspa
 class="comment"> * You should have received a copy of the GNU General Public License along withp/spa
  o 15p/a>pspa
 class="comment"> * this program; if not, write to the Free Software Foundaon>
, Inc., 59 Templep/spa
  o 16p/a>pspa
 class="comment"> * Place - Suite 330, Bost>
, MA 02111-1307 USA.p/spa
  o 17p/a>pspa
 class="comment"> *p/spa
  o 18p/a>pspa
 class="comment"> * Authors:p/spa
  o 19p/a>pspa
 class="comment"> *   Haiyang Zhang <haiyangz@microsoft.com>p/spa
  o 2iona>pspa
 class="comment"> *   Hank Janssen  <hjanssen@microsoft.com>p/spa
  o 21p/a>pspa
 class="comment"> *   K. Y. Srinivasa
 <kys@microsoft.com>p/spa
  o 22p/a>pspa
 class="comment"> *p/spa
  o 23p/a>pspa
 class="comment"> */p/spa
  o 24p/a> o 25p/a>#ifndefopa href="+code=_HYPERV_H" class="sref">_HYPERV_Hp/a> o 26p/a>#defineopa href="+code=_HYPERV_H" class="sref">_HYPERV_Hp/a> o 27p/a> o 28p/a>#include <linux/types.hp/a>> o 29p/a> o 3iona>pspa
 class="comment">/*p/spa
  o 31p/a>pspa
 class="comment"> * An implementaon>
 of HyperV key lue=" pair (KVP) funcon>
ality for Linux.p/spa
  o 32p/a>pspa
 class="comment"> *p/spa
  o 33p/a>pspa
 class="comment"> *p/spa
  o 34p/a>pspa
 class="comment"> * Copyright (C) 2010, Novell, Inc.p/spa
  o 35p/a>pspa
 class="comment"> * Author : K. Y. Srinivasa
 <ksrinivasa
@novell.com>p/spa
  o 36p/a>pspa
 class="comment"> *p/spa
  o 37p/a>pspa
 class="comment"> */p/spa
  o 38p/a> o 39p/a>pspa
 class="comment">/*p/spa
  o 4iona>pspa
 class="comment"> * Maximum lue=" size - used for both key names and lue=" daoa, and includesp/spa
  o 41p/a>pspa
 class="comment"> * any applicable NULL terminators.p/spa
  o 42p/a>pspa
 class="comment"> *p/spa
  o 43p/a>pspa
 class="comment"> * Note:  This limit is somewhat arbitrary, but falls easily within what isp/spa
  o 44p/a>pspa
 class="comment"> * supported for all native guests (back to Win 2000) and what is reas>
ablep/spa
  o 45p/a>pspa
 class="comment"> * for the IC KVP exchange funcon>
ality.  Note that Windows Me/98/95 arep/spa
  o 46p/a>pspa
 class="comment"> * limited to 255 character key names.p/spa
  o 47p/a>pspa
 class="comment"> *p/spa
  o 48p/a>pspa
 class="comment"> * MSDN recommends not storing daoa lue="s larger than 2048 byt"s in thep/spa
  o 49p/a>pspa
 class="comment"> * registry.p/spa
  o 5iona>pspa
 class="comment"> *p/spa
  o 51p/a>pspa
 class="comment"> * Note:  This lue=" is used in defining the KVP exchange message - this lue="p/spa
  o 52p/a>pspa
 class="comment"> * cannot be modified without affeconng the message size and compatibility.p/spa
  o 53p/a>pspa
 class="comment"> */p/spa
  o 54p/a> o 55p/a>pspa
 class="comment">/*p/spa
  o 56p/a>pspa
 class="comment"> * byt"s, includnng any null terminatorsp/spa
  o 57p/a>pspa
 class="comment"> */p/spa
  o 58p/a>#defineopa href="+code=HV_KVP_EXCHANGE_MAX_VALUE_SIZE" class="sref">HV_KVP_EXCHANGE_MAX_VALUE_SIZEp/a>          (2048) o 59p/a> o 60p/a> o 61p/a>pspa
 class="comment">/*p/spa
  o 62p/a>pspa
 class="comment"> * Maximum key size - the registry limit for the length of an entry namep/spa
  o 63p/a>pspa
 class="comment"> * is 256 characters, includnng the null terminatorp/spa
  o 64p/a>pspa
 class="comment"> */p/spa
  o 65p/a> o 66p/a>#defineopa href="+code=HV_KVP_EXCHANGE_MAX_KEY_SIZE" class="sref">HV_KVP_EXCHANGE_MAX_KEY_SIZEp/a>            (512) o 67p/a> o 68p/a>pspa
 class="comment">/*p/spa
  o 69p/a>pspa
 class="comment"> * In Linux, we implement the KVP funcon>
ality in two components:p/spa
  o 7iona>pspa
 class="comment"> * 1) The kernel component which is packaged as part of the hv_utils driverp/spa
  o 71p/a>pspa
 class="comment"> * is responsible for communicaonng with the host and responsible forp/spa
  o 72p/a>pspa
 class="comment"> * implementnng the host/guest protocol. 2) A user level daem vathat isp/spa
  o 73p/a>pspa
 class="comment"> * responsible for daoa gathering.p/spa
  o 74p/a>pspa
 class="comment"> *p/spa
  o 75p/a>pspa
 class="comment"> * Host/Guest Protocol: The host iterat"s over an index and expecos the guestp/spa
  o 76p/a>pspa
 class="comment"> * to assign a key name to the index and also return the lue=" correspondnng top/spa
  o 77p/a>pspa
 class="comment"> * the key. The host will have atmost one KVP transacon>
 outstandnng at anyp/spa
  o 78p/a>pspa
 class="comment"> * given point in time. The host side iteratn>
 stops when the guest returnsp/spa
  o 79p/a>pspa
 class="comment"> * an error. Microsoft has specified the follownng mappnng of key names top/spa
  o 8iona>pspa
 class="comment"> * host specified index:p/spa
  o 81p/a>pspa
 class="comment"> *p/spa
  o 82p/a>pspa
 class="comment"> *      Index           Key Namep/spa
  o 83p/a>pspa
 class="comment"> *      0               FullyQualifiedDomainNamep/spa
  o 84p/a>pspa
 class="comment"> *      1               Integratn>
ServicesVersn vp/spa
  o 85p/a>pspa
 class="comment"> *      2               NetworkAddressIPv4p/spa
  o 86p/a>pspa
 class="comment"> *      3               NetworkAddressIPv6p/spa
  o 87p/a>pspa
 class="comment"> *      4               OSBuildNumberp/spa
  o 88p/a>pspa
 class="comment"> *      5               OSNamep/spa
  o 89p/a>pspa
 class="comment"> *      6               OSMajorVersn vp/spa
  o 9iona>pspa
 class="comment"> *      7               OSMinorVersn vp/spa
  o 91p/a>pspa
 class="comment"> *      8               OSVersn vp/spa
  o 92p/a>pspa
 class="comment"> *      9               ProcessorArchitecturep/spa
  o 93p/a>pspa
 class="comment"> *p/spa
  o 94p/a>pspa
 class="comment"> * The Windows host expecos the Key Name and Key Vue=" to be encoded in utf16.p/spa
  o 95p/a>pspa
 class="comment"> *p/spa
  o 96p/a>pspa
 class="comment"> * Guest Kernel/KVP Daem vaProtocol: As noted earlier, we implement all of thep/spa
  o 97p/a>pspa
 class="comment"> * daoa gathering funcon>
ality in a user mode daem v. The user level daem vp/spa
  o 98p/a>pspa
 class="comment"> * is also responsible for bindnng the key name to the index as well. Thep/spa
  o 99p/a>pspa
 class="comment"> * kernel and user-level daem vacommunicaoe usnng a connecoor channel.p/spa
  o100p/a>pspa
 class="comment"> *p/spa
  o101p/a>pspa
 class="comment"> * The user mode component first registers with thep/spa
  o102p/a>pspa
 class="comment"> * the kernel component. Subsequently, the kernel component requests, daoap/spa
  o103p/a>pspa
 class="comment"> * for the specified keys. In response to this message the user mode componentp/spa
  o104p/a>pspa
 class="comment"> * fills in the lue=" correspondnng to the specified key. We overload thep/spa
  o105p/a>pspa
 class="comment"> * sequence field in the cn_msg header to defineoour KVP message types.p/spa
  o106p/a>pspa
 class="comment"> *p/spa
  o107p/a>pspa
 class="comment"> *p/spa
  o108p/a>pspa
 class="comment"> * The kernel component simply acos as a conduit for communicaon vabetween thep/spa
  o109p/a>pspa
 class="comment"> * Windows host and the user-level daem v. The kernel component passes up thep/spa
  o1tiona>pspa
 class="comment"> * index received from the Host to the user-level daem v. If the index isp/spa
  o111p/a>pspa
 class="comment"> * lueid (supported), the correspondnng key as well as itsp/spa
  o112p/a>pspa
 class="comment"> * lue=" (both are strings) is returned. If the index is inlueidp/spa
  o113p/a>pspa
 class="comment"> * (not supported), a NULL key string is returned.p/spa
  o114p/a>pspa
 class="comment"> */p/spa
  o115p/a> o116p/a> o117p/a>pspa
 class="comment">/*p/spa
  o118p/a>pspa
 class="comment"> * Registry lue=" types.p/spa
  o119p/a>pspa
 class="comment"> */p/spa
  o120p/a> o121p/a>#defineopa href="+code=REG_SZ" class="sref">REG_SZp/a> 1 o122p/a>#defineopa href="+code=REG_U32" class="sref">REG_U32p/a> 4 o123p/a>#defineopa href="+code=REG_U64" class="sref">REG_U64p/a> 8 o124p/a> o125p/a>enumopa href="+code=hv_kvp_exchg_op" class="sref">hv_kvp_exchg_opp/a> { o126p/a>        pa href="+code=KVP_OP_GET" class="sref">KVP_OP_GETp/a> = 0, o127p/a>        pa href="+code=KVP_OP_SET" class="sref">KVP_OP_SETp/a>, o128p/a>        pa href="+code=KVP_OP_DELETE" class="sref">KVP_OP_DELETEp/a>, o129p/a>        pa href="+code=KVP_OP_ENUMERATE" class="sref">KVP_OP_ENUMERATEp/a>, o13iona>        pa href="+code=KVP_OP_REGISTER" class="sref">KVP_OP_REGISTERp/a>, o131p/a>        pa href="+code=KVP_OP_COUNT" class="sref">KVP_OP_COUNTp/a> pspa
 class="comment">/* Number of operatn>
s, must be last. */p/spa
  o132p/a>}; o133p/a> o134p/a>enumopa href="+code=hv_kvp_exchg_pool" class="sref">hv_kvp_exchg_poolp/a> { o135p/a>        pa href="+code=KVP_POOL_EXTERNAL" class="sref">KVP_POOL_EXTERNALp/a> = 0, o136p/a>        pa href="+code=KVP_POOL_GUEST" class="sref">KVP_POOL_GUESTp/a>, o137p/a>        pa href="+code=KVP_POOL_AUTO" class="sref">KVP_POOL_AUTOp/a>, o138p/a>        pa href="+code=KVP_POOL_AUTO_EXTERNAL" class="sref">KVP_POOL_AUTO_EXTERNALp/a>, o139p/a>        pa href="+code=KVP_POOL_AUTO_INTERNAL" class="sref">KVP_POOL_AUTO_INTERNALp/a>, o14iona>        pa href="+code=KVP_POOL_COUNT" class="sref">KVP_POOL_COUNTp/a> pspa
 class="comment">/* Number of pools, must be last. */p/spa
  o141p/a>}; o142p/a> o143p/a>structopa href="+code=hv_kvp_hdr" class="sref">hv_kvp_hdrp/a> { o144p/a>        pa href="+code=__u8" class="sref">__u8p/a> pa href="+code=operatn>
" class="sref">operatn>
p/a>; o145p/a>        pa href="+code=__u8" class="sref">__u8p/a> pa href="+code=pool" class="sref">poolp/a>; o146p/a>        pa href="+code=__u16" class="sref">__u16p/a> pa href="+code=pad" class="sref">padp/a>; o147p/a>} pa href="+code=__attribute__" class="sref">__attribute__p/a>((pa href="+code=packed" class="sref">packedp/a>)); o148p/a> o149p/a>structopa href="+code=hv_kvp_exchg_msg_lue="" class="sref">hv_kvp_exchg_msg_lue="p/a> { o15iona>        pa href="+code=__u32" class="sref">__u32p/a> pa href="+code=lue="_type" class="sref">lue="_typep/a>; o151p/a>        pa href="+code=__u32" class="sref">__u32p/a> pa href="+code=key_size" class="sref">key_sizep/a>; o152p/a>        pa href="+code=__u32" class="sref">__u32p/a> pa href="+code=lue="_size" class="sref">lue="_sizep/a>; o153p/a>        pa href="+code=__u8" class="sref">__u8p/a> pa href="+code=key" class="sref">keyp/a>[pa href="+code=HV_KVP_EXCHANGE_MAX_KEY_SIZE" class="sref">HV_KVP_EXCHANGE_MAX_KEY_SIZEp/a>]; o154p/a>        unn va{ o155p/a>                pa href="+code=__u8" class="sref">__u8p/a> pa href="+code=lue="" class="sref">lue="p/a>[pa href="+code=HV_KVP_EXCHANGE_MAX_VALUE_SIZE" class="sref">HV_KVP_EXCHANGE_MAX_VALUE_SIZEp/a>]; o156p/a>                pa href="+code=__u32" class="sref">__u32p/a> pa href="+code=lue="_u32" class="sref">lue="_u32p/a>; o157p/a>                pa href="+code=__u64" class="sref">__u64p/a> pa href="+code=lue="_u64" class="sref">lue="_u64p/a>; o158p/a>        }; o159p/a>} pa href="+code=__attribute__" class="sref">__attribute__p/a>((pa href="+code=packed" class="sref">packedp/a>)); o160p/a> o161p/a>structopa href="+code=hv_kvp_msg_enumerat"" class="sref">hv_kvp_msg_enumerat"p/a> { o162p/a>        pa href="+code=__u32" class="sref">__u32p/a> pa href="+code=index" class="sref">indexp/a>; o163p/a>        structopa href="+code=hv_kvp_exchg_msg_lue="" class="sref">hv_kvp_exchg_msg_lue="p/a> pa href="+code=daoa" class="sref">daoap/a>; o164p/a>} pa href="+code=__attribute__" class="sref">__attribute__p/a>((pa href="+code=packed" class="sref">packedp/a>)); o165p/a> o166p/a>structopa href="+code=hv_kvp_msg_get" class="sref">hv_kvp_msg_getp/a> { o167p/a>        structopa href="+code=hv_kvp_exchg_msg_lue="" class="sref">hv_kvp_exchg_msg_lue="p/a> pa href="+code=daoa" class="sref">daoap/a>; o168p/a>}; o169p/a> o17iona>structopa href="+code=hv_kvp_msg_set" class="sref">hv_kvp_msg_setp/a> { o171p/a>        structopa href="+code=hv_kvp_exchg_msg_lue="" class="sref">hv_kvp_exchg_msg_lue="p/a> pa href="+code=daoa" class="sref">daoap/a>; o172p/a>}; o173p/a> o174p/a>structopa href="+code=hv_kvp_msg_delet"" class="sref">hv_kvp_msg_delet"p/a> { o175p/a>        pa href="+code=__u32" class="sref">__u32p/a> pa href="+code=key_size" class="sref">key_sizep/a>; o176p/a>        pa href="+code=__u8" class="sref">__u8p/a> pa href="+code=key" class="sref">keyp/a>[pa href="+code=HV_KVP_EXCHANGE_MAX_KEY_SIZE" class="sref">HV_KVP_EXCHANGE_MAX_KEY_SIZEp/a>]; o177p/a>}; o178p/a> o179p/a>structopa href="+code=hv_kvp_register" class="sref">hv_kvp_registerp/a> { o18iona>        pa href="+code=__u8" class="sref">__u8p/a> pa href="+code=lersn v" class="sref">lersn vp/a>[pa href="+code=HV_KVP_EXCHANGE_MAX_KEY_SIZE" class="sref">HV_KVP_EXCHANGE_MAX_KEY_SIZEp/a>]; o181p/a>}; o182p/a> o183p/a>structopa href="+code=hv_kvp_msg" class="sref">hv_kvp_msgp/a> { o184p/a>        structopa href="+code=hv_kvp_hdr" class="sref">hv_kvp_hdrp/a>       pa href="+code=kvp_hdr" class="sref">kvp_hdrp/a>; o185p/a>        unn va{ o186p/a>                structopa href="+code=hv_kvp_msg_get" class="sref">hv_kvp_msg_getp/a>           pa href="+code=kvp_get" class="sref">kvp_getp/a>; o187p/a>                structopa href="+code=hv_kvp_msg_set" class="sref">hv_kvp_msg_setp/a>           pa href="+code=kvp_set" class="sref">kvp_setp/a>; o188p/a>                structopa href="+code=hv_kvp_msg_delet"" class="sref">hv_kvp_msg_delet"p/a>        pa href="+code=kvp_delet"" class="sref">kvp_delet"p/a>; o189p/a>                structopa href="+code=hv_kvp_msg_enumerat"" class="sref">hv_kvp_msg_enumerat"p/a>     pa href="+code=kvp_enum_daoa" class="sref">kvp_enum_daoap/a>; o190p/a>                structopa href="+code=hv_kvp_register" class="sref">hv_kvp_registerp/a>          pa href="+code=kvp_register" class="sref">kvp_registerp/a>; o191p/a>        } pa href="+code=body" class="sref">bodyp/a>; o192p/a>} pa href="+code=__attribute__" class="sref">__attribute__p/a>((pa href="+code=packed" class="sref">packedp/a>)); o193p/a> o194p/a>#ifdefopa href="+code=__KERNEL__" class="sref">__KERNEL__p/a> o195p/a>#include <linux/scatterlist.hp/a>> o196p/a>#include <linux/list.hp/a>> o197p/a>#include <linux/uuid.hp/a>> o198p/a>#include <linux/timer.hp/a>> o199p/a>#include <linux/workqueue.hp/a>> o200p/a>#include <linux/completn>
.hp/a>> o201p/a>#include <linux/device.hp/a>> o202p/a>#include <linux/mod_devicetable.hp/a>> o203p/a> o204p/a> o205p/a>#defineopa href="+code=MAX_PAGE_BUFFER_COUNT" class="sref">MAX_PAGE_BUFFER_COUNTp/a>                           19 o206p/a>#defineopa href="+code=MAX_MULTIPAGE_BUFFER_COUNT" class="sref">MAX_MULTIPAGE_BUFFER_COUNTp/a>                      32 pspa
 class="comment">/* 128K */p/spa
  o207p/a> o208p/a>#pragma pa href="+code=pack" class="sref">packp/a>(pa href="+code=push" class="sref">pushp/a>, 1) o209p/a> o2tiona>pspa
 class="comment">/* Single-page buffer */p/spa
  o211p/a>structopa href="+code=hv_page_buffer" class="sref">hv_page_bufferp/a> { o212p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=lev" class="sref">levp/a>; o213p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=offset" class="sref">offsetp/a>; o214p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=pfv" class="sref">pfvp/a>; o215p/a>}; o216p/a> o217p/a>pspa
 class="comment">/* Multiple-page buffer */p/spa
  o218p/a>structopa href="+code=hv_multipage_buffer" class="sref">hv_multipage_bufferp/a> { o219p/a>        pspa
 class="comment">/* Length and Offset determines the # of pfns in the array */p/spa
  o22iona>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=lev" class="sref">levp/a>; o221p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=offset" class="sref">offsetp/a>; o222p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=pfv_array" class="sref">pfv_arrayp/a>[pa href="+code=MAX_MULTIPAGE_BUFFER_COUNT" class="sref">MAX_MULTIPAGE_BUFFER_COUNTp/a>]; o223p/a>}; o224p/a> o225p/a>pspa
 class="comment">/* 0x18 includes the proprietary packet header */p/spa
  o226p/a>#defineopa href="+code=MAX_PAGE_BUFFER_PACKET" class="sref">MAX_PAGE_BUFFER_PACKETp/a>          (0x18 +                 \ o227p/a>                                        (sizeof(structopa href="+code=hv_page_buffer" class="sref">hv_page_bufferp/a>) * \ o228p/a>                                         pa href="+code=MAX_PAGE_BUFFER_COUNT" class="sref">MAX_PAGE_BUFFER_COUNTp/a>)) o229p/a>#defineopa href="+code=MAX_MULTIPAGE_BUFFER_PACKET" class="sref">MAX_MULTIPAGE_BUFFER_PACKETp/a>     (0x18 +                 \ o230p/a>                                         sizeof(structopa href="+code=hv_multipage_buffer" class="sref">hv_multipage_bufferp/a>)) o231p/a> o232p/a> o233p/a>#pragma pa href="+code=pack" class="sref">packp/a>(pa href="+code=pop" class="sref">popp/a>) o234p/a> o235p/a>structopa href="+code=hv_ring_buffer" class="sref">hv_ring_bufferp/a> { o236p/a>        pspa
 class="comment">/* Offset in byt"s from the start of ring daoa below */p/spa
  o237p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=write_index" class="sref">write_indexp/a>; o238p/a> o239p/a>        pspa
 class="comment">/* Offset in byt"s from the start of ring daoa below */p/spa
  o24iona>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=read_index" class="sref">read_indexp/a>; o241p/a> o242p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=interrupt_mask" class="sref">interrupt_maskp/a>; o243p/a> o244p/a>        pspa
 class="comment">/* Pad it to PAGE_SIZE soathat daoa starts on page boundary */p/spa
  o245p/a>        pa href="+code=u8" class="sref">u8p/a>      pa href="+code=reserved" class="sref">reservedp/a>[4084]; o246p/a> o247p/a>        pspa
 class="comment">/* NOTE:p/spa
  o248p/a>pspa
 class="comment">         * The interrupt_mask field is used only for channels but since ourp/spa
  o249p/a>pspa
 class="comment">         * vmbus connecon vaalso uses this daoa structure and its daoa startsp/spa
  o25iona>pspa
 class="comment">         * here, we commented out this field.p/spa
  o251p/a>pspa
 class="comment">         */p/spa
  o252p/a> o253p/a>        pspa
 class="comment">/*p/spa
  o254p/a>pspa
 class="comment">         * Ring daoa starts here + RingDaoaStartOffsetp/spa
  o255p/a>pspa
 class="comment">         * !!! DO NOT place any fields below this !!!p/spa
  o256p/a>pspa
 class="comment">         */p/spa
  o257p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=buffer" class="sref">bufferp/a>[0]; o258p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o259p/a> o26iona>structopa href="+code=hv_ring_buffer_info" class="sref">hv_ring_buffer_infop/a> { o261p/a>        structopa href="+code=hv_ring_buffer" class="sref">hv_ring_bufferp/a> *pa href="+code=ring_buffer" class="sref">ring_bufferp/a>; o262p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=ring_size" class="sref">ring_sizep/a>;                  pspa
 class="comment">/* Include the shared header */p/spa
  o263p/a>        pa href="+code=spinlock_t" class="sref">spinlock_tp/a> pa href="+code=ring_lock" class="sref">ring_lockp/a>; o264p/a> o265p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=ring_daoasize" class="sref">ring_daoasizep/a>;              pspa
 class="comment">/* < ring_size */p/spa
  o266p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=ring_daoa_startoffset" class="sref">ring_daoa_startoffsetp/a>; o267p/a>}; o268p/a> o269p/a>structopa href="+code=hv_ring_buffer_debug_info" class="sref">hv_ring_buffer_debug_infop/a> { o27iona>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=current_interrupt_mask" class="sref">current_interrupt_maskp/a>; o271p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=current_read_index" class="sref">current_read_indexp/a>; o272p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=current_write_index" class="sref">current_write_indexp/a>; o273p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=byt"s_avail_toread" class="sref">byt"s_avail_toreadp/a>; o274p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=byt"s_avail_towrite" class="sref">byt"s_avail_towritep/a>; o275p/a>}; o276p/a> o277p/a> o278p/a>pspa
 class="comment">/*p/spa
  o279p/a>pspa
 class="comment"> *p/spa
  o28iona>pspa
 class="comment"> * hv_get_ringbuffer_availbyt"s()p/spa
  o281p/a>pspa
 class="comment"> *p/spa
  o282p/a>pspa
 class="comment"> * Get number of byt"s available to read and to write top/spa
  o283p/a>pspa
 class="comment"> * for the specified ring bufferp/spa
  o284p/a>pspa
 class="comment"> */p/spa
  o285p/a>static pa href="+code=inline" class="sref">inlinep/a> void o286p/a>pa href="+code=hv_get_ringbuffer_availbyt"s" class="sref">hv_get_ringbuffer_availbyt"sp/a>(structopa href="+code=hv_ring_buffer_info" class="sref">hv_ring_buffer_infop/a> *pa href="+code=rbi" class="sref">rbip/a>, o287p/a>                          pa href="+code=u32" class="sref">u32p/a> *pa href="+code=read" class="sref">readp/a>, pa href="+code=u32" class="sref">u32p/a> *pa href="+code=write" class="sref">writep/a>) o288p/a>{ o289p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=read_loc" class="sref">read_locp/a>, pa href="+code=write_loc" class="sref">write_locp/a>, pa href="+code=dsize" class="sref">dsizep/a>; o290p/a> o291p/a>        pa href="+code=smp_read_barrier_depends" class="sref">smp_read_barrier_dependsp/a>(); o292p/a> o293p/a>        pspa
 class="comment">/* Capture the read/write indnces before they changed */p/spa
  o294p/a>        pa href="+code=read_loc" class="sref">read_locp/a> = pa href="+code=rbi" class="sref">rbip/a>->pa href="+code=ring_buffer" class="sref">ring_bufferp/a>->pa href="+code=read_index" class="sref">read_indexp/a>; o295p/a>        pa href="+code=write_loc" class="sref">write_locp/a> = pa href="+code=rbi" class="sref">rbip/a>->pa href="+code=ring_buffer" class="sref">ring_bufferp/a>->pa href="+code=write_index" class="sref">write_indexp/a>; o296p/a>        pa href="+code=dsize" class="sref">dsizep/a> = pa href="+code=rbi" class="sref">rbip/a>->pa href="+code=ring_daoasize" class="sref">ring_daoasizep/a>; o297p/a> o298p/a>        *pa href="+code=write" class="sref">writep/a> = pa href="+code=write_loc" class="sref">write_locp/a> >= pa href="+code=read_loc" class="sref">read_locp/a> ? pa href="+code=dsize" class="sref">dsizep/a> - (pa href="+code=write_loc" class="sref">write_locp/a> - pa href="+code=read_loc" class="sref">read_locp/a>) : o299p/a>                pa href="+code=read_loc" class="sref">read_locp/a> - pa href="+code=write_loc" class="sref">write_locp/a>; o300p/a>        *pa href="+code=read" class="sref">readp/a> = pa href="+code=dsize" class="sref">dsizep/a> - *pa href="+code=write" class="sref">writep/a>; o301p/a>} o302p/a> o303p/a> o304p/a>pspa
 class="comment">/*p/spa
  o305p/a>pspa
 class="comment"> * We use the same lersn v numbering for all Hyper-V modules.p/spa
  o306p/a>pspa
 class="comment"> *p/spa
  o307p/a>pspa
 class="comment"> * Definion vaof lersn ving is as follows;p/spa
  o308p/a>pspa
 class="comment"> *p/spa
  o309p/a>pspa
 class="comment"> *      Major Number    Changes for these scenarios;p/spa
  o3tiona>pspa
 class="comment"> *                      1.      When a new lersn v of Windows Hyper-Vp/spa
  o311p/a>pspa
 class="comment"> *                              is released.p/spa
  o312p/a>pspa
 class="comment"> *                      2.      A Major change has occurred in thep/spa
  o313p/a>pspa
 class="comment"> *                              Linux IC's.p/spa
  o314p/a>pspa
 class="comment"> *                      (For example the merge for the first timep/spa
  o315p/a>pspa
 class="comment"> *                      into the kernel) Elery time the Major Numberp/spa
  o316p/a>pspa
 class="comment"> *                      changes, the Revisn v number is reset to 0.p/spa
  o317p/a>pspa
 class="comment"> *      Minor Number    Changes when new funcon vality is addedp/spa
  o318p/a>pspa
 class="comment"> *                      to the Linux IC'sathat is not a bug fix.p/spa
  o319p/a>pspa
 class="comment"> *p/spa
  o32iona>pspa
 class="comment"> * 3.1 - Added completed hv_utils driler. Shutdown/Heartbeat/Timesyncp/spa
  o321p/a>pspa
 class="comment"> */p/spa
  o322p/a>#defineopa href="+code=HV_DRV_VERSION" class="sref">HV_DRV_VERSIONp/a>           pspa
 class="string">"3.1"p/spa
  o323p/a> o324p/a> o325p/a>pspa
 class="comment">/*p/spa
  o326p/a>pspa
 class="comment"> * A revisn v number of lmbus that is used for ensuring both ends on ap/spa
  o327p/a>pspa
 class="comment"> * partion vaare using compatible lersn vs.p/spa
  o328p/a>pspa
 class="comment"> */p/spa
  o329p/a>#defineopa href="+code=VMBUS_REVISION_NUMBER" class="sref">VMBUS_REVISION_NUMBERp/a>           13 o330p/a> o331p/a>pspa
 class="comment">/* Make maximum size of pipe payload of 16K */p/spa
  o332p/a>#defineopa href="+code=MAX_PIPE_DATA_PAYLOAD" class="sref">MAX_PIPE_DATA_PAYLOADp/a>           (sizeof(pa href="+code=u8" class="sref">u8p/a>) * 16384) o333p/a> o334p/a>pspa
 class="comment">/* Define PipeMode lue="s. */p/spa
  o335p/a>#defineopa href="+code=VMBUS_PIPE_TYPE_BYTE" class="sref">VMBUS_PIPE_TYPE_BYTEp/a>            0x00000000 o336p/a>#defineopa href="+code=VMBUS_PIPE_TYPE_MESSAGE" class="sref">VMBUS_PIPE_TYPE_MESSAGEp/a>         0x00000004 o337p/a> o338p/a>pspa
 class="comment">/* The size of the user defined daoa buffer for non-pipe offers. */p/spa
  o339p/a>#defineopa href="+code=MAX_USER_DEFINED_BYTES" class="sref">MAX_USER_DEFINED_BYTESp/a>          120 o340p/a> o341p/a>pspa
 class="comment">/* The size of the user defined daoa buffer for pipe offers. */p/spa
  o342p/a>#defineopa href="+code=MAX_PIPE_USER_DEFINED_BYTES" class="sref">MAX_PIPE_USER_DEFINED_BYTESp/a>     116 o343p/a> o344p/a>pspa
 class="comment">/*p/spa
  o345p/a>pspa
 class="comment"> * At the center of the Channel Management library is the Channel Offer. Thisp/spa
  o346p/a>pspa
 class="comment"> * structocontains the fundamental informaon vaabout an offer.p/spa
  o347p/a>pspa
 class="comment"> */p/spa
  o348p/a>structopa href="+code=lmbus_channel_offer" class="sref">lmbus_channel_offerp/a> { o349p/a>        pa href="+code=uuid_le" class="sref">uuid_lep/a> pa href="+code=if_type" class="sref">if_typep/a>; o35iona>        pa href="+code=uuid_le" class="sref">uuid_lep/a> pa href="+code=if_instance" class="sref">if_instancep/a>; o351p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=int_latency" class="sref">int_latencyp/a>; pspa
 class="comment">/* in 100ns units */p/spa
  o352p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=if_revisn v" class="sref">if_revisn vp/a>; o353p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=server_ctx_size" class="sref">server_ctx_sizep/a>;    pspa
 class="comment">/* in byt"s */p/spa
  o354p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=chn_flags" class="sref">chn_flagsp/a>; o355p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=mmio_megabyt"s" class="sref">mmio_megabyt"sp/a>;             pspa
 class="comment">/* in byt"s * 1024 * 1024 */p/spa
  o356p/a> o357p/a>        unn va{ o358p/a>                pspa
 class="comment">/* Non-pipes: The user has MAX_USER_DEFINED_BYTES byt"s. */p/spa
  o359p/a>                structo{ o360p/a>                        unsigned char pa href="+code=user_def" class="sref">user_defp/a>[pa href="+code=MAX_USER_DEFINED_BYTES" class="sref">MAX_USER_DEFINED_BYTESp/a>]; o361p/a>                } pa href="+code=std" class="sref">stdp/a>; o362p/a> o363p/a>                pspa
 class="comment">/*p/spa
  o364p/a>pspa
 class="comment">                 * Pipes:p/spa
  o365p/a>pspa
 class="comment">                 * The following sructure is an integrat"d pipe protocol, whichp/spa
  o366p/a>pspa
 class="comment">                 * is implemented on top of standard user-defined daoa. Pipep/spa
  o367p/a>pspa
 class="comment">                 * clients have MAX_PIPE_USER_DEFINED_BYTES left for their ownp/spa
  o368p/a>pspa
 class="comment">                 * use.p/spa
  o369p/a>pspa
 class="comment">                 */p/spa
  o370p/a>                structo{ o371p/a>                        pa href="+code=u32" class="sref">u32p/a>  pa href="+code=pipe_mode" class="sref">pipe_modep/a>; o372p/a>                        unsigned char pa href="+code=user_def" class="sref">user_defp/a>[pa href="+code=MAX_PIPE_USER_DEFINED_BYTES" class="sref">MAX_PIPE_USER_DEFINED_BYTESp/a>]; o373p/a>                } pa href="+code=pipe" class="sref">pipep/a>; o374p/a>        } pa href="+code=u" class="sref">up/a>; o375p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=padding" class="sref">paddingp/a>; o376p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o377p/a> o378p/a>pspa
 class="comment">/* Server Flags */p/spa
  o379p/a>#defineopa href="+code=VMBUS_CHANNEL_ENUMERATE_DEVICE_INTERFACE" class="sref">VMBUS_CHANNEL_ENUMERATE_DEVICE_INTERFACEp/a>        1 o38iona>#defineopa href="+code=VMBUS_CHANNEL_SERVER_SUPPORTS_TRANSFER_PAGES" class="sref">VMBUS_CHANNEL_SERVER_SUPPORTS_TRANSFER_PAGESp/a>    2 o381p/a>#defineopa href="+code=VMBUS_CHANNEL_SERVER_SUPPORTS_GPADLS" class="sref">VMBUS_CHANNEL_SERVER_SUPPORTS_GPADLSp/a>            4 o382p/a>#defineopa href="+code=VMBUS_CHANNEL_NAMED_PIPE_MODE" class="sref">VMBUS_CHANNEL_NAMED_PIPE_MODEp/a>                   0x10 o383p/a>#defineopa href="+code=VMBUS_CHANNEL_LOOPBACK_OFFER" class="sref">VMBUS_CHANNEL_LOOPBACK_OFFERp/a>                    0x100 o384p/a>#defineopa href="+code=VMBUS_CHANNEL_PARENT_OFFER" class="sref">VMBUS_CHANNEL_PARENT_OFFERp/a>                      0x200 o385p/a>#defineopa href="+code=VMBUS_CHANNEL_REQUEST_MONITORED_NOTIFICATION" class="sref">VMBUS_CHANNEL_REQUEST_MONITORED_NOTIFICATIONp/a>    0x400 o386p/a> o387p/a>structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a> { o388p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=type" class="sref">typep/a>; o389p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=offset8" class="sref">offset8p/a>; o39iona>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=len8" class="sref">len8p/a>; o391p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=flags" class="sref">flagsp/a>; o392p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=trans_id" class="sref">trans_idp/a>; o393p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o394p/a> o395p/a>structopa href="+code=lmpacket_header" class="sref">lmpacket_headerp/a> { o396p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=prev_pkt_start_offset" class="sref">prev_pkt_start_offsetp/a>; o397p/a>        structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a> pa href="+code=descriptor" class="sref">descriptorp/a>; o398p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o399p/a> o40iona>structopa href="+code=vmtransfer_page_range" class="sref">lmtransfer_page_rangep/a> { o401p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=byt"_count" class="sref">byt"_countp/a>; o402p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=byt"_offset" class="sref">byt"_offsetp/a>; o403p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o404p/a> o405p/a>structopa href="+code=lmtransfer_page_packet_header" class="sref">lmtransfer_page_packet_headerp/a> { o406p/a>        structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a> pa href="+code=d" class="sref">dp/a>; o407p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=xfer_pageset_id" class="sref">xfer_pageset_idp/a>; o408p/a>        pa href="+code=bool" class="sref">boolp/a> pa href="+code=sender_owns_set" class="sref">sender_owns_setp/a>; o409p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=reserved" class="sref">reservedp/a>; o41iona>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=range_cnt" class="sref">range_cntp/a>; o411p/a>        structopa href="+code=vmtransfer_page_range" class="sref">lmtransfer_page_rangep/a> pa href="+code=ranges" class="sref">rangesp/a>[1]; o412p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o413p/a> o414p/a>structopa href="+code=vmgpadl_packet_header" class="sref">lmgpadl_packet_headerp/a> { o415p/a>        structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a> pa href="+code=d" class="sref">dp/a>; o416p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=gpadl" class="sref">gpadlp/a>; o417p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=reserved" class="sref">reservedp/a>; o418p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o419p/a> o42iona>structopa href="+code=vmadd_remove_transfer_page_set" class="sref">vmadd_remove_transfer_page_setp/a> { o421p/a>        structopa href="+code=vmpacket_descriptor" class="sref">lmpacket_descriptorp/a> pa href="+code=d" class="sref">dp/a>; o422p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=gpadl" class="sref">gpadlp/a>; o423p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=xfer_pageset_id" class="sref">xfer_pageset_idp/a>; o424p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=reserved" class="sref">reservedp/a>; o425p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o426p/a> o427p/a>pspa
 class="comment">/*p/spa
  o428p/a>pspa
 class="comment"> * This structure defines a range in guest physical space that ca
 be made top/spa
  o429p/a>pspa
 class="comment"> * look virtuallyocontiguous.p/spa
  o43iona>pspa
 class="comment"> */p/spa
  o431p/a>structopa href="+code=gpa_range" class="sref">gpa_rangep/a> { o432p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=byt"_count" class="sref">byt"_countp/a>; o433p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=byt"_offset" class="sref">byt"_offsetp/a>; o434p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=pfn_array" class="sref">pfn_arrayp/a>[0]; o435p/a>}; o436p/a> o437p/a>pspa
 class="comment">/*p/spa
  o438p/a>pspa
 class="comment"> * This is the formao for an Establish Gpadl packet, whichocontains a handle byp/spa
  o439p/a>pspa
 class="comment"> * whichothis GPADL will be known and a set of GPA ranges associat"d with it.p/spa
  o44iona>pspa
 class="comment"> * This ca
 be convert"d to a MDL by the guest OS.  If there are multiple GPAp/spa
  o441p/a>pspa
 class="comment"> * ranges, then the resulting MDL will be "chained," representing multiple VAp/spa
  o442p/a>pspa
 class="comment"> * ranges.p/spa
  o443p/a>pspa
 class="comment"> */p/spa
  o444p/a>structopa href="+code=vmestablish_gpadl" class="sref">vmestablish_gpadlp/a> { o445p/a>        structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a> pa href="+code=d" class="sref">dp/a>; o446p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=gpadl" class="sref">gpadlp/a>; o447p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=range_cnt" class="sref">range_cntp/a>; o448p/a>        structopa href="+code=gpa_range" class="sref">gpa_rangep/a> pa href="+code=range" class="sref">rangep/a>[1]; o449p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o450p/a> o451p/a>pspa
 class="comment">/*p/spa
  o452p/a>pspa
 class="comment"> * This is the formao for a Teardown Gpadl packet, whichoindncat"s that thep/spa
  o453p/a>pspa
 class="comment"> * GPADL handle in the Establish Gpadl packet will never be referenc"d again.p/spa
  o454p/a>pspa
 class="comment"> */p/spa
  o455p/a>structopa href="+code=lmteardown_gpadl" class="sref">vmteardown_gpadlp/a> { o456p/a>        structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a> pa href="+code=d" class="sref">dp/a>; o457p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=gpadl" class="sref">gpadlp/a>; o458p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=reserved" class="sref">reservedp/a>;   pspa
 class="comment">/* for alignment to a 8-byt" boundary */p/spa
  o459p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o460p/a> o461p/a>pspa
 class="comment">/*p/spa
  o462p/a>pspa
 class="comment"> * This is the formao for a GPA-Directopacket, whichocontains a set of GPAp/spa
  o463p/a>pspa
 class="comment"> * ranges, in addion vato commands and/or daoa.p/spa
  o464p/a>pspa
 class="comment"> */p/spa
  o465p/a>structopa href="+code=lmdaoa_gpa_direct" class="sref">lmdaoa_gpa_directp/a> { o466p/a>        structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a> pa href="+code=d" class="sref">dp/a>; o467p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=reserved" class="sref">reservedp/a>; o468p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=range_cnt" class="sref">range_cntp/a>; o469p/a>        structopa href="+code=gpa_range" class="sref">gpa_rangep/a> pa href="+code=range" class="sref">rangep/a>[1]; o470p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o471p/a> o472p/a>pspa
 class="comment">/* This is the formao for a Addion val Daoa Packet. */p/spa
  o473p/a>structopa href="+code=vmaddion val_daoa" class="sref">vmaddion val_daoap/a> { o474p/a>        structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a> pa href="+code=d" class="sref">dp/a>; o475p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=total_byt"s" class="sref">total_byt"sp/a>; o476p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=offset" class="sref">offsetp/a>; o477p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=byt"_cnt" class="sref">byt"_cntp/a>; o478p/a>        unsigned char pa href="+code=daoa" class="sref">daoap/a>[1]; o479p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o480p/a> o481p/a>unn vapa href="+code=lmpacket_largest_possible_header" class="sref">lmpacket_largest_possible_headerp/a> { o482p/a>        structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a> pa href="+code=simple_hdr" class="sref">simple_hdrp/a>; o483p/a>        structopa href="+code=lmtransfer_page_packet_header" class="sref">lmtransfer_page_packet_headerp/a> pa href="+code=xfer_page_hdr" class="sref">xfer_page_hdrp/a>; o484p/a>        structopa href="+code=lmgpadl_packet_header" class="sref">lmgpadl_packet_headerp/a> pa href="+code=gpadl_hdr" class="sref">gpadl_hdrp/a>; o485p/a>        structopa href="+code=lmadd_remove_transfer_page_set" class="sref">vmadd_remove_transfer_page_setp/a> pa href="+code=add_rm_xfer_page_hdr" class="sref">add_rm_xfer_page_hdrp/a>; o486p/a>        structopa href="+code=lmestablish_gpadl" class="sref">vmestablish_gpadlp/a> pa href="+code=establish_gpadl_hdr" class="sref">establish_gpadl_hdrp/a>; o487p/a>        structopa href="+code=lmteardown_gpadl" class="sref">vmteardown_gpadlp/a> pa href="+code=teardown_gpadl_hdr" class="sref">teardown_gpadl_hdrp/a>; o488p/a>        structopa href="+code=lmdaoa_gpa_direct" class="sref">lmdaoa_gpa_directp/a> pa href="+code=daoa_gpa_direct_hdr" class="sref">daoa_gpa_direct_hdrp/a>; o489p/a>}; o490p/a> o491p/a>#defineopa href="+code=VMPACKET_DATA_START_ADDRESS" class="sref">VMPACKET_DATA_START_ADDRESSp/a>(pa href="+code=__packet" class="sref">__packetp/a>)   \ o492p/a>        (void *)(((unsigned char *)pa href="+code=__packet" class="sref">__packetp/a>) +  \ o493p/a>         ((structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a>)pa href="+code=__packet" class="sref">__packetp/a>)->pa href="+code=offset8" class="sref">offset8p/a> * 8) o494p/a> o495p/a>#defineopa href="+code=VMPACKET_DATA_LENGTH" class="sref">VMPACKET_DATA_LENGTHp/a>(pa href="+code=__packet" class="sref">__packetp/a>)          \ o496p/a>        ((((structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a>)pa href="+code=__packet" class="sref">__packetp/a>)->pa href="+code=len8" class="sref">len8p/a> -        \ o497p/a>          ((structopa href="+code=lmpacket_descriptor" class="sref">lmpacket_descriptorp/a>)pa href="+code=__packet" class="sref">__packetp/a>)->pa href="+code=offset8" class="sref">offset8p/a>) * 8) o498p/a> o499p/a>#defineopa href="+code=VMPACKET_TRANSFER_MODE" class="sref">VMPACKET_TRANSFER_MODEp/a>(pa href="+code=__packet" class="sref">__packetp/a>)        \ o500p/a>        (((structopa href="+code=IMPACT" class="sref">IMPACTp/a>)pa href="+code=__packet" class="sref">__packetp/a>)->pa href="+code=type" class="sref">typep/a>) o501p/a> o502p/a>enumopa href="+code=lmbus_packet_type" class="sref">lmbus_packet_typep/a> { o503p/a>        pa href="+code=VM_PKT_INVALID" class="sref">VM_PKT_INVALIDp/a>                          = 0x0, o504p/a>        pa href="+code=VM_PKT_SYNCH" class="sref">VM_PKT_SYNCHp/a>                            = 0x1, o505p/a>        pa href="+code=VM_PKT_ADD_XFER_PAGESET" class="sref">VM_PKT_ADD_XFER_PAGESETp/a>                 = 0x2, o506p/a>        pa href="+code=VM_PKT_RM_XFER_PAGESET" class="sref">VM_PKT_RM_XFER_PAGESETp/a>                  = 0x3, o507p/a>        pa href="+code=VM_PKT_ESTABLISH_GPADL" class="sref">VM_PKT_ESTABLISH_GPADLp/a>                  = 0x4, o508p/a>        pa href="+code=VM_PKT_TEARDOWN_GPADL" class="sref">VM_PKT_TEARDOWN_GPADLp/a>                   = 0x5, o509p/a>        pa href="+code=VM_PKT_DATA_INBAND" class="sref">VM_PKT_DATA_INBANDp/a>                      = 0x6, o51iona>        pa href="+code=VM_PKT_DATA_USING_XFER_PAGES" class="sref">VM_PKT_DATA_USING_XFER_PAGESp/a>            = 0x7, o511p/a>        pa href="+code=VM_PKT_DATA_USING_GPADL" class="sref">VM_PKT_DATA_USING_GPADLp/a>                 = 0x8, o512p/a>        pa href="+code=VM_PKT_DATA_USING_GPA_DIRECT" class="sref">VM_PKT_DATA_USING_GPA_DIRECTp/a>            = 0x9, o513p/a>        pa href="+code=VM_PKT_CANCEL_REQUEST" class="sref">VM_PKT_CANCEL_REQUESTp/a>                   = 0xa, o514p/a>        pa href="+code=VM_PKT_COMP" class="sref">VM_PKT_COMPp/a>                             = 0xb, o515p/a>        pa href="+code=VM_PKT_DATA_USING_ADDITIONAL_PKT" class="sref">VM_PKT_DATA_USING_ADDITIONAL_PKTp/a>        = 0xc, o516p/a>        pa href="+code=VM_PKT_ADDITIONAL_DATA" class="sref">VM_PKT_ADDITIONAL_DATAp/a>                  = 0xd o517p/a>}; o518p/a> o519p/a>#defineopa href="+code=VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED" class="sref">VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTEDp/a>     1 o520p/a> o521p/a> o522p/a>pspa
 class="comment">/* Versn v 1 messages */p/spa
  o523p/a>enumopa href="+code=lmbus_channel_message_type" class="sref">lmbus_channel_message_typep/a> { o524p/a>        pa href="+code=CHANNELMSG_INVALID" class="sref">CHANNELMSG_INVALIDp/a>                      =  0, o525p/a>        pa href="+code=CHANNELMSG_OFFERCHANNEL" class="sref">CHANNELMSG_OFFERCHANNELp/a>         =  1, o526p/a>        pa href="+code=CHANNELMSG_RESCIND_CHANNELOFFER" class="sref">CHANNELMSG_RESCIND_CHANNELOFFERp/a> =  2, o527p/a>        pa href="+code=CHANNELMSG_REQUESTOFFERS" class="sref">CHANNELMSG_REQUESTOFFERSp/a>                =  3, o528p/a>        pa href="+code=CHANNELMSG_ALLOFFERS_DELIVERED" class="sref">CHANNELMSG_ALLOFFERS_DELIVEREDp/a>  =  4, o529p/a>        pa href="+code=CHANNELMSG_OPENCHANNEL" class="sref">CHANNELMSG_OPENCHANNELp/a>          =  5, o53iona>        pa href="+code=CHANNELMSG_OPENCHANNEL_RESULT" class="sref">CHANNELMSG_OPENCHANNEL_RESULTp/a>           =  6, o531p/a>        pa href="+code=CHANNELMSG_CLOSECHANNEL" class="sref">CHANNELMSG_CLOSECHANNELp/a>         =  7, o532p/a>        pa href="+code=CHANNELMSG_GPADL_HEADER" class="sref">CHANNELMSG_GPADL_HEADERp/a>         =  8, o533p/a>        pa href="+code=CHANNELMSG_GPADL_BODY" class="sref">CHANNELMSG_GPADL_BODYp/a>                   =  9, o534p/a>        pa href="+code=CHANNELMSG_GPADL_CREATED" class="sref">CHANNELMSG_GPADL_CREATEDp/a>                = 10, o535p/a>        pa href="+code=CHANNELMSG_GPADL_TEARDOWN" class="sref">CHANNELMSG_GPADL_TEARDOWNp/a>               = 11, o536p/a>        pa href="+code=CHANNELMSG_GPADL_TORNDOWN" class="sref">CHANNELMSG_GPADL_TORNDOWNp/a>               = 12, o537p/a>        pa href="+code=CHANNELMSG_RELID_RELEASED" class="sref">CHANNELMSG_RELID_RELEASEDp/a>               = 13, o538p/a>        pa href="+code=CHANNELMSG_INITIATE_CONTACT" class="sref">CHANNELMSG_INITIATE_CONTACTp/a>             = 14, o539p/a>        pa href="+code=CHANNELMSG_VERSION_RESPONSE" class="sref">CHANNELMSG_VERSION_RESPONSEp/a>             = 15, o54iona>        pa href="+code=CHANNELMSG_UNLOAD" class="sref">CHANNELMSG_UNLOADp/a>                       = 16, o541p/a>#ifdefopa href="+code=VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD" class="sref">VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILDp/a> o542p/a>        pa href="+code=CHANNELMSG_VIEWRANGE_ADD" class="sref">CHANNELMSG_VIEWRANGE_ADDp/a>                = 17, o543p/a>        pa href="+code=CHANNELMSG_VIEWRANGE_REMOVE" class="sref">CHANNELMSG_VIEWRANGE_REMOVEp/a>             = 18, o544p/a>#endif o545p/a>        pa href="+code=CHANNELMSG_COUNT" class="sref">CHANNELMSG_COUNTp/a> o546p/a>}; o547p/a> o548p/a>structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> { o549p/a>        enumopa href="+code=lmbus_channel_message_type" class="sref">lmbus_channel_message_typep/a> pa href="+code=msgtype" class="sref">msgtypep/a>; o55iona>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=padding" class="sref">paddingp/a>; o551p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o552p/a> o553p/a>pspa
 class="comment">/* Query VMBus Versn v parameters */p/spa
  o554p/a>structopa href="+code=vmbus_channel_query_vmbus_versn v" class="sref">lmbus_channel_query_vmbus_versn vp/a> { o555p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o556p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=versn v" class="sref">lersn vp/a>; o557p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o558p/a> o559p/a>pspa
 class="comment">/* VMBus Versn v Support"d parameters */p/spa
  o56iona>structopa href="+code=vmbus_channel_lersn v_support"d" class="sref">lmbus_channel_lersn v_support"dp/a> { o561p/a>        structopa href="+code=vmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o562p/a>        pa href="+code=bool" class="sref">boolp/a> pa href="+code=lersn v_support"d" class="sref">lersn v_support"dp/a>; o563p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o564p/a> o565p/a>pspa
 class="comment">/* Offer Channel parameters */p/spa
  o566p/a>structopa href="+code=vmbus_channel_offer_channel" class="sref">lmbus_channel_offer_channelp/a> { o567p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o568p/a>        structopa href="+code=lmbus_channel_offer" class="sref">lmbus_channel_offerp/a> pa href="+code=offer" class="sref">offerp/a>; o569p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=child_relid" class="sref">child_relidp/a>; o57iona>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=monitorid" class="sref">monitoridp/a>; o571p/a>        pa href="+code=bool" class="sref">boolp/a> pa href="+code=monitor_allocat"d" class="sref">monitor_allocat"dp/a>; o572p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o573p/a> o574p/a>pspa
 class="comment">/* Rescind Offer parameters */p/spa
  o575p/a>structopa href="+code=lmbus_channel_rescind_offer" class="sref">lmbus_channel_rescind_offerp/a> { o576p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o577p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=child_relid" class="sref">child_relidp/a>; o578p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o579p/a> o58iona>pspa
 class="comment">/*p/spa
  o581p/a>pspa
 class="comment"> * Request Offer -- no parameters, SynIC messageocontains the partion vaIDp/spa
  o582p/a>pspa
 class="comment"> * Set Snoop -- no parameters, SynIC messageocontains the partion vaIDp/spa
  o583p/a>pspa
 class="comment"> * Clear Snoop -- no parameters, SynIC messageocontains the partion vaIDp/spa
  o584p/a>pspa
 class="comment"> * All Offers Delilered -- no parameters, SynIC messageocontains the partion vp/spa
  o585p/a>pspa
 class="comment"> *                         IDp/spa
  o586p/a>pspa
 class="comment"> * Flush Client -- no parameters, SynIC messageocontains the partion vaIDp/spa
  o587p/a>pspa
 class="comment"> */p/spa
  o588p/a> o589p/a>pspa
 class="comment">/* Open Channel parameters */p/spa
  o59iona>structopa href="+code=vmbus_channel_open_channel" class="sref">lmbus_channel_open_channelp/a> { o591p/a>        structopa href="+code=vmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o592p/a> o593p/a>        pspa
 class="comment">/* Identifies the specific VMBus channel that is being opened. */p/spa
  o594p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=child_relid" class="sref">child_relidp/a>; o595p/a> o596p/a>        pspa
 class="comment">/* ID making a particular open request at a channel offer unique. */p/spa
  o597p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=openid" class="sref">openidp/a>; o598p/a> o599p/a>        pspa
 class="comment">/* GPADL for the channel's ring buffer. */p/spa
  o60iona>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=ringbuffer_gpadlhandle" class="sref">ringbuffer_gpadlhandlep/a>; o601p/a> o602p/a>        pspa
 class="comment">/* GPADL for the channel's serverocontext save area. */p/spa
  o603p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=server_contextarea_gpadlhandle" class="sref">server_contextarea_gpadlhandlep/a>; o604p/a> o605p/a>        pspa
 class="comment">/*p/spa
  o606p/a>pspa
 class="comment">        * The upstream ring buffer begins at offset zero in the memoryp/spa
  o607p/a>pspa
 class="comment">        * described by RingBufferGpadlHandle. The downstream ring bufferp/spa
  o608p/a>pspa
 class="comment">        * follows it at this offset (iv pages).p/spa
  o609p/a>pspa
 class="comment">        */p/spa
  o61iona>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=downstream_ringbuffer_pageoffset" class="sref">downstream_ringbuffer_pageoffsetp/a>; o611p/a> o612p/a>        pspa
 class="comment">/* User-specific daoaato be pass"d along to the serveroendpoint. */p/spa
  o613p/a>        unsigned char pa href="+code=userdaoa" class="sref">userdaoap/a>[pa href="+code=MAX_USER_DEFINED_BYTES" class="sref">MAX_USER_DEFINED_BYTESp/a>]; o614p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o615p/a> o616p/a>pspa
 class="comment">/* Open Channel Result parameters */p/spa
  o617p/a>structopa href="+code=vmbus_channel_open_result" class="sref">lmbus_channel_open_resultp/a> { o618p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o619p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=child_relid" class="sref">child_relidp/a>; o62iona>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=openid" class="sref">openidp/a>; o621p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=status" class="sref">statusp/a>; o622p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o623p/a> o624p/a>pspa
 class="comment">/* Close channel parameters; */p/spa
  o625p/a>structopa href="+code=lmbus_channel_close_channel" class="sref">lmbus_channel_close_channelp/a> { o626p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o627p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=child_relid" class="sref">child_relidp/a>; o628p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o629p/a> o63iona>pspa
 class="comment">/* Channel MessageoGPADL */p/spa
  o631p/a>#defineopa href="+code=GPADL_TYPE_RING_BUFFER" class="sref">GPADL_TYPE_RING_BUFFERp/a>          1 o632p/a>#defineopa href="+code=GPADL_TYPE_SERVER_SAVE_AREA" class="sref">GPADL_TYPE_SERVER_SAVE_AREAp/a>     2 o633p/a>#defineopa href="+code=GPADL_TYPE_TRANSACTION" class="sref">GPADL_TYPE_TRANSACTIONp/a>          8 o634p/a> o635p/a>pspa
 class="comment">/*p/spa
  o636p/a>pspa
 class="comment"> * The numberoof PFNs in aoGPADL messageois defined by the numberoofp/spa
  o637p/a>pspa
 class="comment"> * pages that would be spa
ned by ByteCount and ByteOffset.  If thep/spa
  o638p/a>pspa
 class="comment"> * implied numberoof PFNs won't fit in this packet, there will be ap/spa
  o639p/a>pspa
 class="comment"> * follow-up packet that contains more.p/spa
  o64iona>pspa
 class="comment"> */p/spa
  o641p/a>structopa href="+code=lmbus_channel_gpadl_header" class="sref">lmbus_channel_gpadl_headerp/a> { o642p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o643p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=child_relid" class="sref">child_relidp/a>; o644p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=gpadl" class="sref">gpadlp/a>; o645p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=range_buflev" class="sref">range_buflevp/a>; o646p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=rangecount" class="sref">rangecountp/a>; o647p/a>        structopa href="+code=gpa_range" class="sref">gpa_rangep/a> pa href="+code=range" class="sref">rangep/a>[0]; o648p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o649p/a> o65iona>pspa
 class="comment">/* This is the followup packet that contains more PFNs. */p/spa
  o651p/a>structopa href="+code=lmbus_channel_gpadl_body" class="sref">lmbus_channel_gpadl_bodyp/a> { o652p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o653p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=msgnumber" class="sref">msgnumberp/a>; o654p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=gpadl" class="sref">gpadlp/a>; o655p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=pfv" class="sref">pfvp/a>[0]; o656p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o657p/a> o658p/a>structopa href="+code=lmbus_channel_gpadl_creat"d" class="sref">lmbus_channel_gpadl_creat"dp/a> { o659p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o66iona>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=child_relid" class="sref">child_relidp/a>; o661p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=gpadl" class="sref">gpadlp/a>; o662p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=creatn v_status" class="sref">creatn v_statusp/a>; o663p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o664p/a> o665p/a>structopa href="+code=lmbus_channel_gpadl_teardown" class="sref">lmbus_channel_gpadl_teardownp/a> { o666p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o667p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=child_relid" class="sref">child_relidp/a>; o668p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=gpadl" class="sref">gpadlp/a>; o669p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o670p/a> o671p/a>structopa href="+code=lmbus_channel_gpadl_torndown" class="sref">lmbus_channel_gpadl_torndownp/a> { o672p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o673p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=gpadl" class="sref">gpadlp/a>; o674p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o675p/a> o676p/a>#ifdefopa href="+code=VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILD" class="sref">VMBUS_FEATURE_PARENT_OR_PEER_MEMORY_MAPPED_INTO_A_CHILDp/a> o677p/a>structopa href="+code=vmbus_channel_view_range_add" class="sref">lmbus_channel_liew_range_addp/a> { o678p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o679p/a>        pa href="+code=PHYSICAL_ADDRESS" class="sref">PHYSICAL_ADDRESSp/a> pa href="+code=liewrange_base" class="sref">liewrange_basep/a>; o68iona>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=liewrange_length" class="sref">liewrange_lengthp/a>; o681p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=child_relid" class="sref">child_relidp/a>; o682p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o683p/a> o684p/a>structopa href="+code=vmbus_channel_liew_range_remove" class="sref">lmbus_channel_liew_range_removep/a> { o685p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o686p/a>        pa href="+code=PHYSICAL_ADDRESS" class="sref">PHYSICAL_ADDRESSp/a> pa href="+code=liewrange_base" class="sref">liewrange_basep/a>; o687p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=child_relid" class="sref">child_relidp/a>; o688p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o689p/a>#endif o690p/a> o691p/a>structopa href="+code=lmbus_channel_relid_released" class="sref">lmbus_channel_relid_releasedp/a> { o692p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o693p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=child_relid" class="sref">child_relidp/a>; o694p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o695p/a> o696p/a>structopa href="+code=vmbus_channel_initiate_contact" class="sref">lmbus_channel_initiate_contactp/a> { o697p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o698p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=vmbus_versn v_requested" class="sref">lmbus_versn v_requestedp/a>; o699p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=padding2" class="sref">padding2p/a>; o70iona>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=interrupt_page" class="sref">interrupt_pagep/a>; o701p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=monitor_page1" class="sref">monitor_page1p/a>; o702p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=monitor_page2" class="sref">monitor_page2p/a>; o703p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o704p/a> o705p/a>structopa href="+code=lmbus_channel_versn v_response" class="sref">lmbus_channel_versn v_responsep/a> { o706p/a>        structopa href="+code=lmbus_channel_message_header" class="sref">lmbus_channel_message_headerp/a> pa href="+code=header" class="sref">headerp/a>; o707p/a>        pa href="+code=bool" class="sref">boolp/a> pa href="+code=lersn v_support"d" class="sref">lersn v_support"dp/a>; o708p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o709p/a> o71iona>enumopa href="+code=lmbus_channel_state" class="sref">lmbus_channel_statep/a> { o711p/a>        pa href="+code=CHANNEL_OFFER_STATE" class="sref">CHANNEL_OFFER_STATEp/a>, o712p/a>        pa href="+code=CHANNEL_OPENING_STATE" class="sref">CHANNEL_OPENING_STATEp/a>, o713p/a>        pa href="+code=CHANNEL_OPEN_STATE" class="sref">CHANNEL_OPEN_STATEp/a>, o714p/a>}; o715p/a> o716p/a>structopa href="+code=vmbus_channel_debug_info" class="sref">lmbus_channel_debug_infop/a> { o717p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=relid" class="sref">relidp/a>; o718p/a>        enumopa href="+code=lmbus_channel_state" class="sref">lmbus_channel_statep/a> pa href="+code=state" class="sref">statep/a>; o719p/a>        pa href="+code=uuid_le" class="sref">uuid_lep/a> pa href="+code=interfacetype" class="sref">interfacetypep/a>; o72iona>        pa href="+code=uuid_le" class="sref">uuid_lep/a> pa href="+code=interface_instance" class="sref">interface_instancep/a>; o721p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=monitorid" class="sref">monitoridp/a>; o722p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=servermonitor_pending" class="sref">servermonitor_pendingp/a>; o723p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=servermonitor_latency" class="sref">servermonitor_latencyp/a>; o724p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=servermonitor_connectn vid" class="sref">servermonitor_connectn vidp/a>; o725p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=clientmonitor_pending" class="sref">clientmonitor_pendingp/a>; o726p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=clientmonitor_latency" class="sref">clientmonitor_latencyp/a>; o727p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=clientmonitor_connectn vid" class="sref">clientmonitor_connectn vidp/a>; o728p/a> o729p/a>        structopa href="+code=hv_ring_buffer_debug_info" class="sref">hv_ring_buffer_debug_infop/a> pa href="+code=inbound" class="sref">inboundp/a>; o730p/a>        structopa href="+code=hv_ring_buffer_debug_info" class="sref">hv_ring_buffer_debug_infop/a> pa href="+code=outbound" class="sref">outboundp/a>; o731p/a>}; o732p/a> o733p/a>pspa
 class="comment">/*p/spa
  o734p/a>pspa
 class="comment"> * Represents each channel msg on the lmbus connectn v This is ap/spa
  o735p/a>pspa
 class="comment"> * variable-size daoaastructure depending on the msg type itselfp/spa
  o736p/a>pspa
 class="comment"> */p/spa
  o737p/a>structopa href="+code=vmbus_channel_msginfo" class="sref">lmbus_channel_msginfop/a> { o738p/a>        pspa
 class="comment">/* Bookkeeping stuff */p/spa
  o739p/a>        structopa href="+code=list_head" class="sref">list_headp/a> pa href="+code=msglistentry" class="sref">msglistentryp/a>; o740p/a> o741p/a>        pspa
 class="comment">/* So far, this is only us"d to handle gpadl body messageo*/p/spa
  o742p/a>        structopa href="+code=list_head" class="sref">list_headp/a> pa href="+code=submsglist" class="sref">submsglistp/a>; o743p/a> o744p/a>        pspa
 class="comment">/* Synchr vize the request/response if need"d */p/spa
  o745p/a>        structopa href="+code=completn v" class="sref">completn vp/a>  pa href="+code=waitevent" class="sref">waiteventp/a>; o746p/a>        unn v { o747p/a>                structopa href="+code=vmbus_channel_lersn v_support"d" class="sref">lmbus_channel_lersn v_support"dp/a> pa href="+code=lersn v_support"d" class="sref">lersn v_support"dp/a>; o748p/a>                structopa href="+code=vmbus_channel_open_result" class="sref">lmbus_channel_open_resultp/a> pa href="+code=open_result" class="sref">open_resultp/a>; o749p/a>                structopa href="+code=vmbus_channel_gpadl_torndown" class="sref">lmbus_channel_gpadl_torndownp/a> pa href="+code=gpadl_torndown" class="sref">gpadl_torndownp/a>; o750p/a>                structopa href="+code=vmbus_channel_gpadl_creat"d" class="sref">lmbus_channel_gpadl_creat"dp/a> pa href="+code=gpadl_creat"d" class="sref">gpadl_creat"dp/a>; o751p/a>                structopa href="+code=vmbus_channel_lersn v_response" class="sref">lmbus_channel_versn v_responsep/a> pa href="+code=lersn v_response" class="sref">lersn v_responsep/a>; o752p/a>        } pa href="+code=response" class="sref">responsep/a>; o753p/a> o754p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=msgsize" class="sref">msgsizep/a>; o755p/a>        pspa
 class="comment">/*p/spa
  o756p/a>pspa
 class="comment">         * The channel messageothat goes out on the "wire".p/spa
  o757p/a>pspa
 class="comment">         * It will contain at minimum the VMBUS_CHANNEL_MESSAGE_HEADER headerp/spa
  o758p/a>pspa
 class="comment">         */p/spa
  o759p/a>        unsigned char pa href="+code=msg" class="sref">msgp/a>[0]; o76iona>}; o761p/a> o762p/a>structopa href="+code=vmbus_close_msg" class="sref">vmbus_close_msgp/a> { o763p/a>        structopa href="+code=vmbus_channel_msginfo" class="sref">lmbus_channel_msginfop/a> pa href="+code=info" class="sref">infop/a>; o764p/a>        structopa href="+code=vmbus_channel_close_channel" class="sref">lmbus_channel_close_channelp/a> pa href="+code=msg" class="sref">msgp/a>; o765p/a>}; o766p/a> o767p/a>structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> { o768p/a>        structopa href="+code=list_head" class="sref">list_headp/a> pa href="+code=listentry" class="sref">listentryp/a>; o769p/a> o770p/a>        structopa href="+code=hv_device" class="sref">hv_devicep/a> *pa href="+code=device_obj" class="sref">device_objp/a>; o771p/a> o772p/a>        structopa href="+code=work_struct" class="sref">work_structp/a> pa href="+code=work" class="sref">workp/a>; o773p/a> o774p/a>        enumopa href="+code=lmbus_channel_state" class="sref">lmbus_channel_statep/a> pa href="+code=state" class="sref">statep/a>; o775p/a> o776p/a>        structopa href="+code=lmbus_channel_offer_channel" class="sref">lmbus_channel_offer_channelp/a> pa href="+code=offermsg" class="sref">offermsgp/a>; o777p/a>        pspa
 class="comment">/*p/spa
  o778p/a>pspa
 class="comment">         * These are based on the OfferMsg.MonitorId.p/spa
  o779p/a>pspa
 class="comment">         * Save it here for easy access.p/spa
  o78iona>pspa
 class="comment">         */p/spa
  o781p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=monitor_grp" class="sref">monitor_grpp/a>; o782p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=monitor_bit" class="sref">monitor_bitp/a>; o783p/a> o784p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=ringbuffer_gpadlhandle" class="sref">ringbuffer_gpadlhandlep/a>; o785p/a> o786p/a>        pspa
 class="comment">/* Allocat"d memory for ring buffer */p/spa
  o787p/a>        void *pa href="+code=ringbuffer_pages" class="sref">ringbuffer_pagesp/a>; o788p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=ringbuffer_pagecount" class="sref">ringbuffer_pagecountp/a>; o789p/a>        structopa href="+code=hv_ring_buffer_info" class="sref">hv_ring_buffer_infop/a> pa href="+code=outbound" class="sref">outboundp/a>;    pspa
 class="comment">/* send to parent */p/spa
  o790p/a>        structopa href="+code=hv_ring_buffer_info" class="sref">hv_ring_buffer_infop/a> pa href="+code=inbound" class="sref">inboundp/a>;     pspa
 class="comment">/* receive from parent */p/spa
  o791p/a>        pa href="+code=spinlock_t" class="sref">spinlock_tp/a> pa href="+code=inbound_lock" class="sref">inbound_lockp/a>; o792p/a>        structopa href="+code=workqueue_struct" class="sref">workqueue_structp/a> *pa href="+code=controlwq" class="sref">controlwqp/a>; o793p/a> o794p/a>        structopa href="+code=vmbus_close_msg" class="sref">vmbus_close_msgp/a> pa href="+code=close_msg" class="sref">close_msgp/a>; o795p/a> o796p/a>        pspa
 class="comment">/* Channel callback are invok"d in this workqueueocontext */p/spa
  o797p/a>        pspa
 class="comment">/* HANDLE daoaWorkQueue; */p/spa
  o798p/a> o799p/a>        void (*pa href="+code=onchannel_callback" class="sref">onchannel_callbackp/a>)(void *pa href="+code=context" class="sref">contextp/a>); o80iona>        void *pa href="+code=channel_callback_context" class="sref">channel_callback_contextp/a>; o801p/a>}; o802p/a> o803p/a>void pa href="+code=vmbus_onmessage" class="sref">vmbus_onmessagep/a>(void *pa href="+code=context" class="sref">contextp/a>); o804p/a> o805p/a>intopa href="+code=vmbus_request_offers" class="sref">vmbus_request_offersp/a>(void); o806p/a> o807p/a>pspa
 class="comment">/* The format must be the same as structovmdaoa_gpa_direct */p/spa
  o808p/a>structopa href="+code=lmbus_channel_packet_page_buffer" class="sref">lmbus_channel_packet_page_bufferp/a> { o809p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=type" class="sref">typep/a>; o81iona>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=daoaoffset8" class="sref">daoaoffset8p/a>; o811p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=length8" class="sref">length8p/a>; o812p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=flags" class="sref">flagsp/a>; o813p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=transactn vid" class="sref">transactn vidp/a>; o814p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=reserved" class="sref">reservedp/a>; o815p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=rangecount" class="sref">rangecountp/a>; o816p/a>        structopa href="+code=hv_page_buffer" class="sref">hv_page_bufferp/a> pa href="+code=range" class="sref">rangep/a>[pa href="+code=MAX_PAGE_BUFFER_COUNT" class="sref">MAX_PAGE_BUFFER_COUNTp/a>]; o817p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o818p/a> o819p/a>pspa
 class="comment">/* The format must be the same as structovmdaoa_gpa_direct */p/spa
  o82iona>structopa href="+code=lmbus_channel_packet_multipage_buffer" class="sref">lmbus_channel_packet_multipage_bufferp/a> { o821p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=type" class="sref">typep/a>; o822p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=daoaoffset8" class="sref">daoaoffset8p/a>; o823p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=length8" class="sref">length8p/a>; o824p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=flags" class="sref">flagsp/a>; o825p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=transactn vid" class="sref">transactn vidp/a>; o826p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=reserved" class="sref">reservedp/a>; o827p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=rangecount" class="sref">rangecountp/a>;         pspa
 class="comment">/* Always 1 in this caseo*/p/spa
  o828p/a>        structopa href="+code=hv_multipage_buffer" class="sref">hv_multipage_bufferp/a> pa href="+code=range" class="sref">rangep/a>; o829p/a>} pa href="+code=__packed" class="sref">__packedp/a>; o830p/a> o831p/a> o832p/a>extern intopa href="+code=vmbus_open" class="sref">vmbus_opevp/a>(structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>, o833p/a>                            pa href="+code=u32" class="sref">u32p/a> pa href="+code=send_ringbuffersize" class="sref">send_ringbuffersizep/a>, o834p/a>                            pa href="+code=u32" class="sref">u32p/a> pa href="+code=recv_ringbuffersize" class="sref">recv_ringbuffersizep/a>, o835p/a>                            void *pa href="+code=userdaoa" class="sref">userdaoap/a>, o836p/a>                            pa href="+code=u32" class="sref">u32p/a> pa href="+code=userdaoalev" class="sref">userdaoalevp/a>, o837p/a>                            void(*pa href="+code=onchannel_callback" class="sref">onchannel_callbackp/a>)(void *pa href="+code=context" class="sref">contextp/a>), o838p/a>                            void *pa href="+code=context" class="sref">contextp/a>); o839p/a> o840p/a>extern void pa href="+code=vmbus_close" class="sref">vmbus_closep/a>(structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>); o841p/a> o842p/a>extern intopa href="+code=vmbus_sendpacket" class="sref">lmbus_sendpacketp/a>(structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>, o843p/a>                                  const void *pa href="+code=buffer" class="sref">bufferp/a>, o844p/a>                                  pa href="+code=u32" class="sref">u32p/a> pa href="+code=bufferLev" class="sref">bufferLevp/a>, o845p/a>                                  pa href="+code=u64" class="sref">u64p/a> pa href="+code=requestid" class="sref">requestidp/a>, o846p/a>                                  enumopa href="+code=lmbus_packet_type" class="sref">lmbus_packet_typep/a> pa href="+code=type" class="sref">typep/a>, o847p/a>                                  pa href="+code=u32" class="sref">u32p/a> pa href="+code=flags" class="sref">flagsp/a>); o848p/a> o849p/a>extern intopa href="+code=vmbus_sendpacket_pagebuffer" class="sref">lmbus_sendpacket_pagebufferp/a>(structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>, o850p/a>                                            structopa href="+code=hv_page_buffer" class="sref">hv_page_bufferp/a> pa href="+code=pagebuffers" class="sref">pagebuffersp/a>[], o851p/a>                                            pa href="+code=u32" class="sref">u32p/a> pa href="+code=pagecount" class="sref">pagecountp/a>, o852p/a>                                            void *pa href="+code=buffer" class="sref">bufferp/a>, o853p/a>                                            pa href="+code=u32" class="sref">u32p/a> pa href="+code=bufferlev" class="sref">bufferlevp/a>, o854p/a>                                            pa href="+code=u64" class="sref">u64p/a> pa href="+code=requestid" class="sref">requestidp/a>); o855p/a> o856p/a>extern intopa href="+code=vmbus_sendpacket_multipagebuffer" class="sref">lmbus_sendpacket_multipagebufferp/a>(structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>, o857p/a>                                        structopa href="+code=hv_multipage_buffer" class="sref">hv_multipage_bufferp/a> *pa href="+code=mpb" class="sref">mpbp/a>, o858p/a>                                        void *pa href="+code=buffer" class="sref">bufferp/a>, o859p/a>                                        pa href="+code=u32" class="sref">u32p/a> pa href="+code=bufferlev" class="sref">bufferlevp/a>, o860p/a>                                        pa href="+code=u64" class="sref">u64p/a> pa href="+code=requestid" class="sref">requestidp/a>); o861p/a> o862p/a>extern intopa href="+code=vmbus_establish_gpadl" class="sref">vmbus_establish_gpadlp/a>(structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>, o863p/a>                                      void *pa href="+code=kbuffer" class="sref">kbufferp/a>, o864p/a>                                      pa href="+code=u32" class="sref">u32p/a> pa href="+code=size" class="sref">sizep/a>, o865p/a>                                      pa href="+code=u32" class="sref">u32p/a> *pa href="+code=gpadl_handle" class="sref">gpadl_handlep/a>); o866p/a> o867p/a>extern intopa href="+code=vmbus_teardown_gpadl" class="sref">vmbus_teardown_gpadlp/a>(structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>, o868p/a>                                     pa href="+code=u32" class="sref">u32p/a> pa href="+code=gpadl_handle" class="sref">gpadl_handlep/a>); o869p/a> o870p/a>extern intopa href="+code=vmbus_recvpacket" class="sref">lmbus_recvpacketp/a>(structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>, o871p/a>                                  void *pa href="+code=buffer" class="sref">bufferp/a>, o872p/a>                                  pa href="+code=u32" class="sref">u32p/a> pa href="+code=bufferlev" class="sref">bufferlevp/a>, o873p/a>                                  pa href="+code=u32" class="sref">u32p/a> *pa href="+code=buffer_actual_lev" class="sref">buffer_actual_levp/a>, o874p/a>                                  pa href="+code=u64" class="sref">u64p/a> *pa href="+code=requestid" class="sref">requestidp/a>); o875p/a> o876p/a>extern intopa href="+code=vmbus_recvpacket_raw" class="sref">lmbus_recvpacket_rawp/a>(structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>, o877p/a>                                     void *pa href="+code=buffer" class="sref">bufferp/a>, o878p/a>                                     pa href="+code=u32" class="sref">u32p/a> pa href="+code=bufferlev" class="sref">bufferlevp/a>, o879p/a>                                     pa href="+code=u32" class="sref">u32p/a> *pa href="+code=buffer_actual_lev" class="sref">buffer_actual_levp/a>, o880p/a>                                     pa href="+code=u64" class="sref">u64p/a> *pa href="+code=requestid" class="sref">requestidp/a>); o881p/a> o882p/a> o883p/a>extern void pa href="+code=vmbus_get_debug_info" class="sref">lmbus_get_debug_infop/a>(structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>, o884p/a>                                     structopa href="+code=vmbus_channel_debug_info" class="sref">lmbus_channel_debug_infop/a> *pa href="+code=debug" class="sref">debugp/a>); o885p/a> o886p/a>extern void pa href="+code=vmbus_ontimer" class="sref">lmbus_ontimerp/a>(unsigned long pa href="+code=daoa" class="sref">daoap/a>); o887p/a> o888p/a>structopa href="+code=hv_dev_port_info" class="sref">hv_dev_port_infop/a> { o889p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=int_mask" class="sref">int_maskp/a>; o89iona>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=read_idx" class="sref">read_idxp/a>; o891p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=write_idx" class="sref">write_idxp/a>; o892p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=bytes_avail_toread" class="sref">bytes_avail_toreadp/a>; o893p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=bytes_avail_towrite" class="sref">bytes_avail_towritep/a>; o894p/a>}; o895p/a> o896p/a>pspa
 class="comment">/* Baseodriver object */p/spa
  o897p/a>structopa href="+code=hv_driver" class="sref">hv_driverp/a> { o898p/a>        const char *pa href="+code=name" class="sref">namep/a>; o899p/a> o90iona>        pspa
 class="comment">/* the device type support"d by this driver */p/spa
  o901p/a>        pa href="+code=uuid_le" class="sref">uuid_lep/a> pa href="+code=dev_type" class="sref">dev_typep/a>; o902p/a>        const structopa href="+code=hv_lmbus_device_id" class="sref">hv_lmbus_device_idp/a> *pa href="+code=id_table" class="sref">id_tablep/a>; o903p/a> o904p/a>        structopa href="+code=device_driver" class="sref">device_driverp/a> pa href="+code=driver" class="sref">driverp/a>; o905p/a> o906p/a>        into(*pa href="+code=probe" class="sref">probep/a>)(structopa href="+code=hv_device" class="sref">hv_devicep/a> *, const structopa href="+code=hv_lmbus_device_id" class="sref">hv_lmbus_device_idp/a> *); o907p/a>        into(*pa href="+code=remove" class="sref">removep/a>)(structopa href="+code=hv_device" class="sref">hv_devicep/a> *); o908p/a>        void (*pa href="+code=shutdown" class="sref">shutdownp/a>)(structopa href="+code=hv_device" class="sref">hv_devicep/a> *); o909p/a> o91iona>}; o911p/a> o912p/a>pspa
 class="comment">/* Baseodevice object */p/spa
  o913p/a>structopa href="+code=hv_device" class="sref">hv_devicep/a> { o914p/a>        pspa
 class="comment">/* the device type id of this device */p/spa
  o915p/a>        pa href="+code=uuid_le" class="sref">uuid_lep/a> pa href="+code=dev_type" class="sref">dev_typep/a>; o916p/a> o917p/a>        pspa
 class="comment">/* the device instance id of this device */p/spa
  o918p/a>        pa href="+code=uuid_le" class="sref">uuid_lep/a> pa href="+code=dev_instance" class="sref">dev_instancep/a>; o919p/a> o920p/a>        structopa href="+code=device" class="sref">devicep/a> pa href="+code=device" class="sref">devicep/a>; o921p/a> o922p/a>        structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>; o923p/a>}; o924p/a> o925p/a> o926p/a>static pa href="+code=inline" class="sref">inlinep/a> structopa href="+code=hv_device" class="sref">hv_devicep/a> *pa href="+code=device_to_hv_device" class="sref">device_to_hv_devicep/a>(structopa href="+code=device" class="sref">devicep/a> *pa href="+code=d" class="sref">dp/a>) o927p/a>{ o928p/a>        returnopa href="+code=container_of" class="sref">container_ofp/a>(pa href="+code=d" class="sref">dp/a>, structopa href="+code=hv_device" class="sref">hv_devicep/a>,opa href="+code=device" class="sref">devicep/a>); o929p/a>} o930p/a> o931p/a>static pa href="+code=inline" class="sref">inlinep/a> structopa href="+code=hv_driver" class="sref">hv_driverp/a> *pa href="+code=drv_to_hv_drv" class="sref">drv_to_hv_drvp/a>(structopa href="+code=device_driver" class="sref">device_driverp/a> *pa href="+code=d" class="sref">dp/a>) o932p/a>{ o933p/a>        returnopa href="+code=container_of" class="sref">container_ofp/a>(pa href="+code=d" class="sref">dp/a>, structopa href="+code=hv_driver" class="sref">hv_driverp/a>,opa href="+code=driver" class="sref">driverp/a>); o934p/a>} o935p/a> o936p/a>static pa href="+code=inline" class="sref">inlinep/a> void pa href="+code=hv_set_drvdaoa" class="sref">hv_set_drvdaoap/a>(structopa href="+code=hv_device" class="sref">hv_devicep/a> *pa href="+code=dev" class="sref">devp/a>,ovoid *pa href="+code=daoa" class="sref">daoap/a>) o937p/a>{ o938p/a>        pa href="+code=dev_set_drvdaoa" class="sref">dev_set_drvdaoap/a>(&pa href="+code=dev" class="sref">devp/a>->pa href="+code=device" class="sref">devicep/a>,opa href="+code=daoa" class="sref">daoap/a>); o939p/a>} o940p/a> o941p/a>static pa href="+code=inline" class="sref">inlinep/a> void *pa href="+code=hv_get_drvdaoa" class="sref">hv_get_drvdaoap/a>(structopa href="+code=hv_device" class="sref">hv_devicep/a> *pa href="+code=dev" class="sref">devp/a>) o942p/a>{ o943p/a>        returnopa href="+code=dev_get_drvdaoa" class="sref">dev_get_drvdaoap/a>(&pa href="+code=dev" class="sref">devp/a>->pa href="+code=device" class="sref">devicep/a>); o944p/a>} o945p/a> o946p/a>pspa
 class="comment">/* Vmbus interface */p/spa
  o947p/a>#defineopa href="+code=vmbus_driver_register" class="sref">lmbus_driver_registerp/a>(pa href="+code=driver" class="sref">driverp/a>)   \ o948p/a>        pa href="+code=__vmbus_driver_register" class="sref">__vmbus_driver_registerp/a>(pa href="+code=driver" class="sref">driverp/a>,opa href="+code=THIS_MODULE" class="sref">THIS_MODULEp/a>,opa href="+code=KBUILD_MODNAME" class="sref">KBUILD_MODNAMEp/a>) o949p/a>intopa href="+code=__must_check" class="sref">__must_checkp/a> pa href="+code=__vmbus_driver_register" class="sref">__vmbus_driver_registerp/a>(structopa href="+code=hv_driver" class="sref">hv_driverp/a> *pa href="+code=hv_driver" class="sref">hv_driverp/a>, o950p/a>                                         structopa href="+code=module" class="sref">modulep/a> *pa href="+code=owner" class="sref">ownerp/a>, o951p/a>                                         const char *pa href="+code=mod_name" class="sref">mod_namep/a>); o952p/a>void pa href="+code=vmbus_driver_unregister" class="sref">lmbus_driver_unregisterp/a>(structopa href="+code=hv_driver" class="sref">hv_driverp/a> *pa href="+code=hv_driver" class="sref">hv_driverp/a>); o953p/a> o954p/a>pspa
 class="comment">/**p/spa
  o955p/a>pspa
 class="comment"> * VMBUS_DEVICE - macro used to describe a specific hyperv lmbus devicep/spa
  o956p/a>pspa
 class="comment"> *p/spa
  o957p/a>pspa
 class="comment"> * This macro is used to create a structohv_lmbus_device_id that matches ap/spa
  o958p/a>pspa
 class="comment"> * specific device.p/spa
  o959p/a>pspa
 class="comment"> */p/spa
  o960p/a>#defineopa href="+code=VMBUS_DEVICE" class="sref">VMBUS_DEVICEp/a>(pa href="+code=g0" class="sref">g0p/a>,opa href="+code=g1" class="sref">g1p/a>,opa href="+code=g2" class="sref">g2p/a>,opa href="+code=g3" class="sref">g3p/a>,opa href="+code=g4" class="sref">g4p/a>,opa href="+code=g5" class="sref">g5p/a>,opa href="+code=g6" class="sref">g6p/a>,opa href="+code=g7" class="sref">g7p/a>,o   \ o961p/a>                     pa href="+code=g8" class="sref">g8p/a>,opa href="+code=g9" class="sref">g9p/a>,opa href="+code=ga" class="sref">gap/a>,opa href="+code=gb" class="sref">gbp/a>,opa href="+code=gc" class="sref">gcp/a>,opa href="+code=gd" class="sref">gdp/a>,opa href="+code=ge" class="sref">gep/a>,opa href="+code=gf" class="sref">gfp/a>)    \ o962p/a>        .pa href="+code=guid" class="sref">guidp/a> = {opa href="+code=g0" class="sref">g0p/a>,opa href="+code=g1" class="sref">g1p/a>,opa href="+code=g2" class="sref">g2p/a>,opa href="+code=g3" class="sref">g3p/a>,opa href="+code=g4" class="sref">g4p/a>,opa href="+code=g5" class="sref">g5p/a>,opa href="+code=g6" class="sref">g6p/a>,opa href="+code=g7" class="sref">g7p/a>,o      \ o963p/a>                  pa href="+code=g8" class="sref">g8p/a>,opa href="+code=g9" class="sref">g9p/a>,opa href="+code=ga" class="sref">gap/a>,opa href="+code=gb" class="sref">gbp/a>,opa href="+code=gc" class="sref">gcp/a>,opa href="+code=gd" class="sref">gdp/a>,opa href="+code=ge" class="sref">gep/a>,opa href="+code=gf" class="sref">gfp/a> }, o964p/a> o965p/a>pspa
 class="comment">/*p/spa
  o966p/a>pspa
 class="comment"> * Common header for Hyper-V ICsp/spa
  o967p/a>pspa
 class="comment"> */p/spa
  o968p/a> o969p/a>#defineopa href="+code=ICMSGTYPE_NEGOTIATE" class="sref">ICMSGTYPE_NEGOTIATEp/a>             0 o970p/a>#defineopa href="+code=ICMSGTYPE_HEARTBEAT" class="sref">ICMSGTYPE_HEARTBEATp/a>             1 o971p/a>#defineopa href="+code=ICMSGTYPE_KVPEXCHANGE" class="sref">ICMSGTYPE_KVPEXCHANGEp/a>           2 o972p/a>#defineopa href="+code=ICMSGTYPE_SHUTDOWN" class="sref">ICMSGTYPE_SHUTDOWNp/a>              3 o973p/a>#defineopa href="+code=ICMSGTYPE_TIMESYNC" class="sref">ICMSGTYPE_TIMESYNCp/a>              4 o974p/a>#defineopa href="+code=ICMSGTYPE_VSS" class="sref">ICMSGTYPE_VSSp/a>                   5 o975p/a> o976p/a>#defineopa href="+code=ICMSGHDRFLAG_TRANSACTION" class="sref">ICMSGHDRFLAG_TRANSACTIONp/a>        1 o977p/a>#defineopa href="+code=ICMSGHDRFLAG_REQUEST" class="sref">ICMSGHDRFLAG_REQUESTp/a>            2 o978p/a>#defineopa href="+code=ICMSGHDRFLAG_RESPONSE" class="sref">ICMSGHDRFLAG_RESPONSEp/a>           4 o979p/a> o980p/a>#defineopa href="+code=HV_S_OK" class="sref">HV_S_OKp/a>                         0x00000000 o981p/a>#defineopa href="+code=HV_E_FAIL" class="sref">HV_E_FAILp/a>                       0x80004005 o982p/a>#defineopa href="+code=HV_S_CONT" class="sref">HV_S_CONTp/a>                       0x80070103 o983p/a>#defineopa href="+code=HV_ERROR_NOT_SUPPORTED" class="sref">HV_ERROR_NOT_SUPPORTEDp/a>          0x80070032 o984p/a>#defineopa href="+code=HV_ERROR_MACHINE_LOCKED" class="sref">HV_ERROR_MACHINE_LOCKEDp/a>         0x800704F7 o985p/a> o986p/a>pspa
 class="comment">/*p/spa
  o987p/a>pspa
 class="comment"> * While we want to handle util services as regular devices,p/spa
  o988p/a>pspa
 class="comment"> * there is only one instance of each of these services; sop/spa
  o989p/a>pspa
 class="comment"> * we statically allocate the service specific state.p/spa
  o99iona>pspa
 class="comment"> */p/spa
  o991p/a> o992p/a>structopa href="+code=hv_util_service" class="sref">hv_util_servicep/a> { o993p/a>        pa href="+code=u8" class="sref">u8p/a> *pa href="+code=recv_buffer" class="sref">recv_bufferp/a>; o994p/a>        void (*pa href="+code=util_cb" class="sref">util_cbp/a>)(void *); o995p/a>        into(*pa href="+code=util_init" class="sref">util_initp/a>)(structopa href="+code=hv_util_service" class="sref">hv_util_servicep/a> *); o996p/a>        void (*pa href="+code=util_deinit" class="sref">util_deinitp/a>)(void); o997p/a>}; o998p/a> o999p/a>structopa href="+code=vmbuspipe_hdr" class="sref">lmbuspipe_hdrp/a> { 1000p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=flags" class="sref">flagsp/a>; 
1001p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=msgsize" class="sref">msgsizep/a>; 1002p/a>} pa href="+code=__packed" class="sref">__packedp/a>; 1003p/a> 1004p/a>structopa href="+code=ic_version" class="sref">ic_versionp/a> { 1005p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=major" class="sref">majorp/a>; 1006p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=minor" class="sref">minorp/a>; 1007p/a>} pa href="+code=__packed" class="sref">__packedp/a>; 1008p/a> 1009p/a>structopa href="+code=icmsg_hdr" class="sref">icmsg_hdrp/a> { 1010p/a>        structopa href="+code=ic_version" class="sref">ic_versionp/a> pa href="+code=icverframe" class="sref">icverframep/a>; 1011p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=icmsgtype" class="sref">icmsgtypep/a>; 1012p/a>        structopa href="+code=ic_version" class="sref">ic_versionp/a> pa href="+code=icvermsg" class="sref">icvermsgp/a>; 1013p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=icmsgsize" class="sref">icmsgsizep/a>; 1014p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=status" class="sref">statusp/a>; 1015p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=ictransaction_id" class="sref">ictransaction_idp/a>; 1016p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=icflags" class="sref">icflagsp/a>; 1017p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=reserved" class="sref">reservedp/a>[2]; 1018p/a>} pa href="+code=__packed" class="sref">__packedp/a>; 1019p/a> 1020p/a>structopa href="+code=icmsg_negotiate" class="sref">icmsg_negotiatep/a> { 1021p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=icframe_vercnt" class="sref">icframe_vercntp/a>; 1022p/a>        pa href="+code=u16" class="sref">u16p/a> pa href="+code=icmsg_vercnt" class="sref">icmsg_vercntp/a>; 1023p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=reserved" class="sref">reservedp/a>; 1024p/a>        structopa href="+code=ic_version" class="sref">ic_versionp/a> pa href="+code=icversion_daoa" class="sref">icversion_daoap/a>[1]; pspa
 class="comment">/* any size array */p/spa
  1025p/a>} pa href="+code=__packed" class="sref">__packedp/a>; 1026p/a> 1027p/a>structopa href="+code=shutdown_msg_daoa" class="sref">shutdown_msg_daoap/a> { 1028p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=reason_code" class="sref">reason_codep/a>; 1029p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=timeout_seconds" class="sref">timeout_secondsp/a>; 1030p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=flags" class="sref">flagsp/a>; 1031p/a>        pa href="+code=u8" class="sref">u8p/a> opa href="+code=display_message" class="sref">display_messagep/a>[2048]; 1032p/a>} pa href="+code=__packed" class="sref">__packedp/a>; 1033p/a> 1034p/a>structopa href="+code=heartbeat_msg_daoa" class="sref">heartbeat_msg_daoap/a> { 1035p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=seq_num" class="sref">seq_nump/a>; 1036p/a>        pa href="+code=u32" class="sref">u32p/a> pa href="+code=reserved" class="sref">reservedp/a>[8]; 1037p/a>} pa href="+code=__packed" class="sref">__packedp/a>; 1038p/a> 1039p/a>pspa
 class="comment">/* Time Sync IC defs */p/spa
  1040p/a>#defineopa href="+code=ICTIMESYNCFLAG_PROBE" class="sref">ICTIMESYNCFLAG_PROBEp/a>    0 1041p/a>#defineopa href="+code=ICTIMESYNCFLAG_SYNC" class="sref">ICTIMESYNCFLAG_SYNCp/a>     1 1042p/a>#defineopa href="+code=ICTIMESYNCFLAG_SAMPLE" class="sref">ICTIMESYNCFLAG_SAMPLEp/a>   2 1043p/a> 1044p/a>#ifdef pa href="+code=__x86_64__" class="sref">__x86_64__p/a> 1045p/a>#defineopa href="+code=WLTIMEDELTA" class="sref">WLTIMEDELTAp/a>     116444736000000000L     pspa
 class="comment">/* in 100ns unit */p/spa
  1046p/a>#else 1047p/a>#defineopa href="+code=WLTIMEDELTA" class="sref">WLTIMEDELTAp/a>     116444736000000000LL 1048p/a>#endif 1049p/a> 1050p/a>structopa href="+code=ictimesync_daoa" class="sref">ictimesync_daoap/a> { 1051p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=parenttime" class="sref">parenttimep/a>; 1052p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=childtime" class="sref">childtimep/a>; 1053p/a>        pa href="+code=u64" class="sref">u64p/a> pa href="+code=roundtriptime" class="sref">roundtriptimep/a>; 1054p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=flags" class="sref">flagsp/a>; 1055p/a>} pa href="+code=__packed" class="sref">__packedp/a>; 1056p/a> 1057p/a>structopa href="+code=hyperv_service_callback" class="sref">hyperv_service_callbackp/a> { 1058p/a>        pa href="+code=u8" class="sref">u8p/a> pa href="+code=msg_type" class="sref">msg_typep/a>; 1059p/a>        char *pa href="+code=log_msg" class="sref">log_msgp/a>; 1060p/a>        pa href="+code=uuid_le" class="sref">uuid_lep/a> pa href="+code=daoa" class="sref">daoap/a>; 1061p/a>        structopa href="+code=vmbus_channel" class="sref">lmbus_channelp/a> *pa href="+code=channel" class="sref">channelp/a>; 1062p/a>        void (*pa href="+code=callback" class="sref">callbackp/a>) (void *pa href="+code=context" class="sref">contextp/a>); 1063p/a>}; 1064p/a> 1065p/a>#defineopa href="+code=MAX_SRV_VER" class="sref">MAX_SRV_VERp/a>     0x7ffffff 1066p/a>extern void pa href="+code=vmbus_prep_negotiate_resp" class="sref">lmbus_prep_negotiate_respp/a>(structopa href="+code=icmsg_hdr" class="sref">icmsg_hdrp/a> *, 1067p/a>                                        structopa href="+code=icmsg_negotiate" class="sref">icmsg_negotiatep/a> *,opa href="+code=u8" class="sref">u8p/a> *, int, 1068p/a>                                        int); 1069p/a> 1070p/a>intopa href="+code=hv_kvp_init" class="sref">hv_kvp_initp/a>(structopa href="+code=hv_util_service" class="sref">hv_util_servicep/a> *); 1071p/a>void pa href="+code=hv_kvp_deinit" class="sref">hv_kvp_deinitp/a>(void); 1072p/a>void pa href="+code=hv_kvp_onchannelcallback" class="sref">hv_kvp_onchannelcallbackp/a>(void *); 1073p/a> 1074p/a>#endif pspa
 class="comment">/* __KERNEL__ */p/spa
  1075p/a>#endif pspa
 class="comment">/* _HYPERV_H */p/spa
  1076p/a>p/pre>
lxr.linux.no kindly host"d by pa href="http://www.redpill-linpro.no">Redpill Linpro ASp/a>, provider of Linux consulting and operations services since 1995.