xref: /netbsd-src/sys/external/mit/xen-include-public/dist/xen/include/public/xencomm.h (revision a215bf017205c151c294992dd060042ee327e78c)
1*a215bf01Scherry /*
2*a215bf01Scherry  * Permission is hereby granted, free of charge, to any person obtaining a copy
3*a215bf01Scherry  * of this software and associated documentation files (the "Software"), to
4*a215bf01Scherry  * deal in the Software without restriction, including without limitation the
5*a215bf01Scherry  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
6*a215bf01Scherry  * sell copies of the Software, and to permit persons to whom the Software is
7*a215bf01Scherry  * furnished to do so, subject to the following conditions:
8*a215bf01Scherry  *
9*a215bf01Scherry  * The above copyright notice and this permission notice shall be included in
10*a215bf01Scherry  * all copies or substantial portions of the Software.
11*a215bf01Scherry  *
12*a215bf01Scherry  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13*a215bf01Scherry  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14*a215bf01Scherry  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15*a215bf01Scherry  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16*a215bf01Scherry  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17*a215bf01Scherry  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
18*a215bf01Scherry  * DEALINGS IN THE SOFTWARE.
19*a215bf01Scherry  *
20*a215bf01Scherry  * Copyright (C) IBM Corp. 2006
21*a215bf01Scherry  */
22*a215bf01Scherry 
23*a215bf01Scherry #ifndef _XEN_XENCOMM_H_
24*a215bf01Scherry #define _XEN_XENCOMM_H_
25*a215bf01Scherry 
26*a215bf01Scherry /* A xencomm descriptor is a scatter/gather list containing physical
27*a215bf01Scherry  * addresses corresponding to a virtually contiguous memory area. The
28*a215bf01Scherry  * hypervisor translates these physical addresses to machine addresses to copy
29*a215bf01Scherry  * to and from the virtually contiguous area.
30*a215bf01Scherry  */
31*a215bf01Scherry 
32*a215bf01Scherry #define XENCOMM_MAGIC 0x58434F4D /* 'XCOM' */
33*a215bf01Scherry #define XENCOMM_INVALID (~0UL)
34*a215bf01Scherry 
35*a215bf01Scherry struct xencomm_desc {
36*a215bf01Scherry     uint32_t magic;
37*a215bf01Scherry     uint32_t nr_addrs; /* the number of entries in address[] */
38*a215bf01Scherry     uint64_t address[0];
39*a215bf01Scherry };
40*a215bf01Scherry 
41*a215bf01Scherry #endif /* _XEN_XENCOMM_H_ */
42