vmm_ioport.h revision 264648
1178476Sjb/*- 2178476Sjb * Copyright (c) 2014 Tycho Nightingale <tycho.nightingale@pluribusnetworks.com> 3178476Sjb * All rights reserved. 4178476Sjb * 5178476Sjb * Redistribution and use in source and binary forms, with or without 6178476Sjb * modification, are permitted provided that the following conditions 7178476Sjb * are met: 8178476Sjb * 1. Redistributions of source code must retain the above copyright 9178476Sjb * notice, this list of conditions and the following disclaimer. 10178476Sjb * 2. Redistributions in binary form must reproduce the above copyright 11178476Sjb * notice, this list of conditions and the following disclaimer in the 12178476Sjb * documentation and/or other materials provided with the distribution. 13178476Sjb * 14178476Sjb * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 15178476Sjb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16178476Sjb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17178476Sjb * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18178476Sjb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19178476Sjb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20178476Sjb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21178476Sjb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22178476Sjb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23178476Sjb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24178476Sjb * SUCH DAMAGE. 25178476Sjb * 26178476Sjb * $FreeBSD: head/sys/amd64/vmm/vmm_ioport.h 264648 2014-04-18 15:22:56Z tychon $ 27178476Sjb */ 28178476Sjb 29178476Sjb#ifndef _VMM_IOPORT_H_ 30178476Sjb#define _VMM_IOPORT_H_ 31178476Sjb 32178476Sjbtypedef int (*ioport_handler_func_t)(void *vm, int vcpuid, 33178476Sjb bool in, int port, int bytes, uint32_t *val); 34178476Sjb 35178476Sjbint emulate_ioport(struct vm *vm, int vcpuid, struct vm_exit *vmexit); 36178476Sjb 37178476Sjb#endif /* _VMM_IOPORT_H_ */ 38178476Sjb