Home | History | Annotate | Line # | Download | only in include
xenio3.h revision 1.2.10.1
      1  1.2.10.1    yamt /* $NetBSD: xenio3.h,v 1.2.10.1 2010/10/09 03:31:59 yamt Exp $ */
      2       1.1  bouyer /******************************************************************************
      3       1.1  bouyer  * evtchn.h
      4       1.1  bouyer  *
      5       1.1  bouyer  * Interface to /dev/xen/evtchn.
      6       1.1  bouyer  *
      7       1.1  bouyer  * Copyright (c) 2003-2005, K A Fraser
      8       1.1  bouyer  *
      9       1.1  bouyer  * This file may be distributed separately from the Linux kernel, or
     10       1.1  bouyer  * incorporated into other software packages, subject to the following license:
     11       1.1  bouyer  *
     12       1.1  bouyer  * Permission is hereby granted, free of charge, to any person obtaining a copy
     13       1.1  bouyer  * of this source file (the "Software"), to deal in the Software without
     14       1.1  bouyer  * restriction, including without limitation the rights to use, copy, modify,
     15       1.1  bouyer  * merge, publish, distribute, sublicense, and/or sell copies of the Software,
     16       1.1  bouyer  * and to permit persons to whom the Software is furnished to do so, subject to
     17       1.1  bouyer  * the following conditions:
     18       1.1  bouyer  *
     19       1.1  bouyer  * The above copyright notice and this permission notice shall be included in
     20       1.1  bouyer  * all copies or substantial portions of the Software.
     21       1.1  bouyer  *
     22       1.1  bouyer  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     23       1.1  bouyer  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     24       1.1  bouyer  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     25       1.1  bouyer  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     26       1.1  bouyer  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     27       1.1  bouyer  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
     28       1.1  bouyer  * IN THE SOFTWARE.
     29       1.1  bouyer  */
     30       1.1  bouyer 
     31  1.2.10.1    yamt #ifndef __XEN_XENIO3_H__
     32  1.2.10.1    yamt #define __XEN_XENIO3_H__
     33       1.1  bouyer 
     34       1.1  bouyer /*
     35       1.1  bouyer  * Bind a fresh port to VIRQ @virq.
     36       1.1  bouyer  * Return allocated port.
     37       1.1  bouyer  */
     38       1.1  bouyer #define IOCTL_EVTCHN_BIND_VIRQ				\
     39       1.1  bouyer 	_IOWR('E', 4, struct ioctl_evtchn_bind_virq)
     40       1.1  bouyer struct ioctl_evtchn_bind_virq {
     41       1.1  bouyer 	unsigned int virq;
     42       1.1  bouyer 	unsigned int port;
     43       1.1  bouyer };
     44       1.1  bouyer 
     45       1.1  bouyer /*
     46       1.1  bouyer  * Bind a fresh port to remote <@remote_domain, @remote_port>.
     47       1.1  bouyer  * Return allocated port.
     48       1.1  bouyer  */
     49       1.1  bouyer #define IOCTL_EVTCHN_BIND_INTERDOMAIN			\
     50       1.1  bouyer 	_IOWR('E', 5, struct ioctl_evtchn_bind_interdomain)
     51       1.1  bouyer struct ioctl_evtchn_bind_interdomain {
     52       1.1  bouyer 	unsigned int remote_domain, remote_port;
     53       1.1  bouyer 	unsigned int port;
     54       1.1  bouyer };
     55       1.1  bouyer 
     56       1.1  bouyer /*
     57       1.1  bouyer  * Allocate a fresh port for binding to @remote_domain.
     58       1.1  bouyer  * Return allocated port.
     59       1.1  bouyer  */
     60       1.1  bouyer #define IOCTL_EVTCHN_BIND_UNBOUND_PORT			\
     61       1.1  bouyer 	_IOWR('E', 6, struct ioctl_evtchn_bind_unbound_port)
     62       1.1  bouyer struct ioctl_evtchn_bind_unbound_port {
     63       1.1  bouyer 	unsigned int remote_domain;
     64       1.1  bouyer 	unsigned int port;
     65       1.1  bouyer };
     66       1.1  bouyer 
     67       1.1  bouyer /*
     68       1.1  bouyer  * Unbind previously allocated @port.
     69       1.1  bouyer  */
     70       1.1  bouyer #define IOCTL_EVTCHN_UNBIND				\
     71       1.1  bouyer 	_IOW('E', 7, struct ioctl_evtchn_unbind)
     72       1.1  bouyer struct ioctl_evtchn_unbind {
     73       1.1  bouyer 	unsigned int port;
     74       1.1  bouyer };
     75       1.1  bouyer 
     76       1.1  bouyer /*
     77       1.1  bouyer  * Send event to previously allocated @port.
     78       1.1  bouyer  */
     79       1.1  bouyer #define IOCTL_EVTCHN_NOTIFY				\
     80       1.1  bouyer 	_IOW('E', 8, struct ioctl_evtchn_notify)
     81       1.1  bouyer struct ioctl_evtchn_notify {
     82       1.1  bouyer 	unsigned int port;
     83       1.1  bouyer };
     84       1.1  bouyer 
     85       1.1  bouyer /* Clear and reinitialise the event buffer. Clear error condition. */
     86       1.1  bouyer #define IOCTL_EVTCHN_RESET				\
     87       1.1  bouyer 	_IO('E', 9)
     88       1.1  bouyer 
     89  1.2.10.1    yamt #endif /* __XEN_XENIO3_H__ */
     90