1263035Stychon/*-
2263035Stychon * Copyright (c) 2014 Tycho Nightingale <tycho.nightingale@pluribusnetworks.com>
3263035Stychon * All rights reserved.
4263035Stychon *
5263035Stychon * Redistribution and use in source and binary forms, with or without
6263035Stychon * modification, are permitted provided that the following conditions
7263035Stychon * are met:
8263035Stychon * 1. Redistributions of source code must retain the above copyright
9263035Stychon *    notice, this list of conditions and the following disclaimer.
10263035Stychon * 2. Redistributions in binary form must reproduce the above copyright
11263035Stychon *    notice, this list of conditions and the following disclaimer in the
12263035Stychon *    documentation and/or other materials provided with the distribution.
13263035Stychon *
14263035Stychon * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
15263035Stychon * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16263035Stychon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17263035Stychon * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18263035Stychon * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19263035Stychon * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20263035Stychon * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21263035Stychon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22263035Stychon * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23263035Stychon * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24263035Stychon * SUCH DAMAGE.
25263035Stychon *
26263035Stychon * $FreeBSD$
27263035Stychon */
28263035Stychon
29263035Stychon#ifndef	_VMM_IOPORT_H_
30263035Stychon#define	_VMM_IOPORT_H_
31263035Stychon
32276429Sneeltypedef int (*ioport_handler_func_t)(struct vm *vm, int vcpuid,
33268891Sjhb    bool in, int port, int bytes, uint32_t *val);
34263035Stychon
35268976Sjhbint vm_handle_inout(struct vm *vm, int vcpuid, struct vm_exit *vme, bool *retu);
36263035Stychon
37263035Stychon#endif	/* _VMM_IOPORT_H_ */
38