win-pvdrivers

annotate common/include/public/callback.h @ 62:edd4a2ad5b44

Removed old inf files
author James Harper <james.harper@bendigoit.com.au>
date Wed Dec 19 10:22:50 2007 +1100 (2007-12-19)
parents 5712dede5a1b
children
rev   line source
andy@12 1 /******************************************************************************
andy@12 2 * callback.h
andy@12 3 *
andy@12 4 * Register guest OS callbacks with Xen.
andy@12 5 *
andy@12 6 * Permission is hereby granted, free of charge, to any person obtaining a copy
andy@12 7 * of this software and associated documentation files (the "Software"), to
andy@12 8 * deal in the Software without restriction, including without limitation the
andy@12 9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
andy@12 10 * sell copies of the Software, and to permit persons to whom the Software is
andy@12 11 * furnished to do so, subject to the following conditions:
andy@12 12 *
andy@12 13 * The above copyright notice and this permission notice shall be included in
andy@12 14 * all copies or substantial portions of the Software.
andy@12 15 *
andy@12 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
andy@12 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
andy@12 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
andy@12 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
andy@12 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
andy@12 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
andy@12 22 * DEALINGS IN THE SOFTWARE.
andy@12 23 *
andy@12 24 * Copyright (c) 2006, Ian Campbell
andy@12 25 */
andy@12 26
andy@12 27 #ifndef __XEN_PUBLIC_CALLBACK_H__
andy@12 28 #define __XEN_PUBLIC_CALLBACK_H__
andy@12 29
andy@12 30 #include "xen.h"
andy@12 31
andy@12 32 /*
andy@12 33 * Prototype for this hypercall is:
andy@12 34 * long callback_op(int cmd, void *extra_args)
andy@12 35 * @cmd == CALLBACKOP_??? (callback operation).
andy@12 36 * @extra_args == Operation-specific extra arguments (NULL if none).
andy@12 37 */
andy@12 38
andy@12 39 #define CALLBACKTYPE_event 0
andy@12 40 #define CALLBACKTYPE_failsafe 1
andy@12 41 #define CALLBACKTYPE_syscall 2 /* x86_64 only */
andy@12 42 /*
andy@12 43 * sysenter is only available on x86_32 with the
andy@12 44 * supervisor_mode_kernel option enabled.
andy@12 45 */
andy@12 46 #define CALLBACKTYPE_sysenter 3
andy@12 47 #define CALLBACKTYPE_nmi 4
andy@12 48
andy@12 49 /*
andy@12 50 * Disable event deliver during callback? This flag is ignored for event and
andy@12 51 * NMI callbacks: event delivery is unconditionally disabled.
andy@12 52 */
andy@12 53 #define _CALLBACKF_mask_events 0
andy@12 54 #define CALLBACKF_mask_events (1U << _CALLBACKF_mask_events)
andy@12 55
andy@12 56 /*
andy@12 57 * Register a callback.
andy@12 58 */
andy@12 59 #define CALLBACKOP_register 0
andy@12 60 struct callback_register {
andy@12 61 uint16_t type;
andy@12 62 uint16_t flags;
andy@12 63 xen_callback_t address;
andy@12 64 };
andy@12 65 typedef struct callback_register callback_register_t;
andy@12 66 DEFINE_XEN_GUEST_HANDLE(callback_register_t);
andy@12 67
andy@12 68 /*
andy@12 69 * Unregister a callback.
andy@12 70 *
andy@12 71 * Not all callbacks can be unregistered. -EINVAL will be returned if
andy@12 72 * you attempt to unregister such a callback.
andy@12 73 */
andy@12 74 #define CALLBACKOP_unregister 1
andy@12 75 struct callback_unregister {
andy@12 76 uint16_t type;
andy@12 77 uint16_t _unused;
andy@12 78 };
andy@12 79 typedef struct callback_unregister callback_unregister_t;
andy@12 80 DEFINE_XEN_GUEST_HANDLE(callback_unregister_t);
andy@12 81
andy@12 82 #endif /* __XEN_PUBLIC_CALLBACK_H__ */
andy@12 83
andy@12 84 /*
andy@12 85 * Local variables:
andy@12 86 * mode: C
andy@12 87 * c-set-style: "BSD"
andy@12 88 * c-basic-offset: 4
andy@12 89 * tab-width: 4
andy@12 90 * indent-tabs-mode: nil
andy@12 91 * End:
andy@12 92 */