/******************************************************************************1* evtchn.h2*3* Interface to /dev/xen/evtchn.4*5* Copyright (c) 2003-2005, K A Fraser6*7* This program is free software; you can redistribute it and/or8* modify it under the terms of the GNU General Public License version 29* as published by the Free Software Foundation; or, when distributed10* separately from the Linux kernel or incorporated into other11* software packages, subject to the following license:12*13* Permission is hereby granted, free of charge, to any person obtaining a copy14* of this source file (the "Software"), to deal in the Software without15* restriction, including without limitation the rights to use, copy, modify,16* merge, publish, distribute, sublicense, and/or sell copies of the Software,17* and to permit persons to whom the Software is furnished to do so, subject to18* the following conditions:19*20* The above copyright notice and this permission notice shall be included in21* all copies or substantial portions of the Software.22*23* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR24* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,25* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE26* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER27* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING28* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS29* IN THE SOFTWARE.30*/3132#ifndef __LINUX_PUBLIC_EVTCHN_H__33#define __LINUX_PUBLIC_EVTCHN_H__3435/*36* Bind a fresh port to VIRQ @virq.37* Return allocated port.38*/39#define IOCTL_EVTCHN_BIND_VIRQ \40_IOC(_IOC_NONE, 'E', 0, sizeof(struct ioctl_evtchn_bind_virq))41struct ioctl_evtchn_bind_virq {42unsigned int virq;43};4445/*46* Bind a fresh port to remote <@remote_domain, @remote_port>.47* Return allocated port.48*/49#define IOCTL_EVTCHN_BIND_INTERDOMAIN \50_IOC(_IOC_NONE, 'E', 1, sizeof(struct ioctl_evtchn_bind_interdomain))51struct ioctl_evtchn_bind_interdomain {52unsigned int remote_domain, remote_port;53};5455/*56* Allocate a fresh port for binding to @remote_domain.57* Return allocated port.58*/59#define IOCTL_EVTCHN_BIND_UNBOUND_PORT \60_IOC(_IOC_NONE, 'E', 2, sizeof(struct ioctl_evtchn_bind_unbound_port))61struct ioctl_evtchn_bind_unbound_port {62unsigned int remote_domain;63};6465/*66* Unbind previously allocated @port.67*/68#define IOCTL_EVTCHN_UNBIND \69_IOC(_IOC_NONE, 'E', 3, sizeof(struct ioctl_evtchn_unbind))70struct ioctl_evtchn_unbind {71unsigned int port;72};7374/*75* Unbind previously allocated @port.76*/77#define IOCTL_EVTCHN_NOTIFY \78_IOC(_IOC_NONE, 'E', 4, sizeof(struct ioctl_evtchn_notify))79struct ioctl_evtchn_notify {80unsigned int port;81};8283/* Clear and reinitialise the event buffer. Clear error condition. */84#define IOCTL_EVTCHN_RESET \85_IOC(_IOC_NONE, 'E', 5, 0)8687#endif /* __LINUX_PUBLIC_EVTCHN_H__ */888990