1*ab7ce14bSJulien Grall /*- 2*ab7ce14bSJulien Grall * SPDX-License-Identifier: MIT OR GPL-2.0-only 3*ab7ce14bSJulien Grall * 4*ab7ce14bSJulien Grall * Copyright © 2002-2005 K A Fraser 5*ab7ce14bSJulien Grall * Copyright © 2005 Intel Corporation <xiaofeng.ling@intel.com> 6*ab7ce14bSJulien Grall * Copyright © 2013 Spectra Logic Corporation 7*ab7ce14bSJulien Grall * Copyright © 2015 Julien Grall 8*ab7ce14bSJulien Grall * Copyright © 2021,2022 Elliott Mitchell 9*ab7ce14bSJulien Grall * 10*ab7ce14bSJulien Grall * This file may be distributed separately from the Linux kernel, or 11*ab7ce14bSJulien Grall * incorporated into other software packages, subject to the following license: 12*ab7ce14bSJulien Grall * 13*ab7ce14bSJulien Grall * Permission is hereby granted, free of charge, to any person obtaining a copy 14*ab7ce14bSJulien Grall * of this source file (the "Software"), to deal in the Software without 15*ab7ce14bSJulien Grall * restriction, including without limitation the rights to use, copy, modify, 16*ab7ce14bSJulien Grall * merge, publish, distribute, sublicense, and/or sell copies of the Software, 17*ab7ce14bSJulien Grall * and to permit persons to whom the Software is furnished to do so, subject to 18*ab7ce14bSJulien Grall * the following conditions: 19*ab7ce14bSJulien Grall * 20*ab7ce14bSJulien Grall * The above copyright notice and this permission notice shall be included in 21*ab7ce14bSJulien Grall * all copies or substantial portions of the Software. 22*ab7ce14bSJulien Grall * 23*ab7ce14bSJulien Grall * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24*ab7ce14bSJulien Grall * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25*ab7ce14bSJulien Grall * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26*ab7ce14bSJulien Grall * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27*ab7ce14bSJulien Grall * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28*ab7ce14bSJulien Grall * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 29*ab7ce14bSJulien Grall * IN THE SOFTWARE. 30*ab7ce14bSJulien Grall */ 31*ab7ce14bSJulien Grall 32*ab7ce14bSJulien Grall #ifndef _XEN_INTR_INTERNAL_H_ 33*ab7ce14bSJulien Grall #define _XEN_INTR_INTERNAL_H_ 34*ab7ce14bSJulien Grall 35*ab7ce14bSJulien Grall #ifndef _MACHINE__XEN_ARCH_INTR_H_ 36*ab7ce14bSJulien Grall #error "do not #include intr-internal.h, #include machine/arch-intr.h instead" 37*ab7ce14bSJulien Grall #endif 38*ab7ce14bSJulien Grall 39*ab7ce14bSJulien Grall /* Current implementation only supports 2L event channels. */ 40*ab7ce14bSJulien Grall #define NR_EVENT_CHANNELS EVTCHN_2L_NR_CHANNELS 41*ab7ce14bSJulien Grall 42*ab7ce14bSJulien Grall struct xenisrc { 43*ab7ce14bSJulien Grall xen_arch_isrc_t xi_arch; /* @TOP -> *xi_arch=*xenisrc */ 44*ab7ce14bSJulien Grall enum evtchn_type xi_type; 45*ab7ce14bSJulien Grall u_int xi_cpu; /* VCPU for delivery */ 46*ab7ce14bSJulien Grall evtchn_port_t xi_port; 47*ab7ce14bSJulien Grall u_int xi_virq; 48*ab7ce14bSJulien Grall void *xi_cookie; 49*ab7ce14bSJulien Grall bool xi_close:1; /* close on unbind? */ 50*ab7ce14bSJulien Grall bool xi_masked:1; 51*ab7ce14bSJulien Grall volatile u_int xi_refcount; 52*ab7ce14bSJulien Grall }; 53*ab7ce14bSJulien Grall 54*ab7ce14bSJulien Grall #endif /* _XEN_INTR_INTERNAL_H_ */ 55